executor 1.0.6 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -99
- package/bin/executor.js +2 -0
- package/bin/executor.mjs +215647 -0
- package/bin/pglite.data +0 -0
- package/bin/pglite.wasm +0 -0
- package/package.json +32 -100
- package/resources/migrations/20260306091536_abnormal_martin_li/migration.sql +158 -0
- package/resources/migrations/20260306091536_abnormal_martin_li/snapshot.json +1937 -0
- package/resources/migrations/20260306094249_large_giant_girl/migration.sql +39 -0
- package/resources/migrations/20260306094249_large_giant_girl/snapshot.json +2425 -0
- package/resources/migrations/20260307090915_blue_bullseye/migration.sql +70 -0
- package/resources/migrations/20260307090915_blue_bullseye/snapshot.json +3122 -0
- package/resources/migrations/20260307134000_openapi_tool_identity/migration.sql +37 -0
- package/resources/migrations/20260307152000_source_document_text/migration.sql +1 -0
- package/resources/migrations/20260308041000_credentials_model/migration.sql +41 -0
- package/resources/migrations/20260308120000_search_and_indexes/migration.sql +16 -0
- package/resources/migrations/20260308140000_secret_materials_name/migration.sql +1 -0
- package/resources/web/assets/abap-BXYWi5l2.js +1 -0
- package/resources/web/assets/abap-BdImnpbu.js +1 -0
- package/resources/web/assets/actionscript-3-CRLSHa9e.js +1 -0
- package/resources/web/assets/actionscript-3-CoDkCxhg.js +1 -0
- package/resources/web/assets/ada-DeReRNhg.js +1 -0
- package/resources/web/assets/ada-bCR0ucgS.js +1 -0
- package/resources/web/assets/andromeeda-C4gqWexZ.js +1 -0
- package/resources/web/assets/andromeeda-CF6_y_Qj.js +1 -0
- package/resources/web/assets/angular-html-6NEUuZou.js +1 -0
- package/resources/web/assets/angular-html-CU67Zn6k.js +1 -0
- package/resources/web/assets/angular-ts-BfBSdvnY.js +1 -0
- package/resources/web/assets/angular-ts-BwZT4LLn.js +1 -0
- package/resources/web/assets/apache-CCUDgqAf.js +1 -0
- package/resources/web/assets/apache-Pmp26Uib.js +1 -0
- package/resources/web/assets/apex-Bh6oOW3o.js +1 -0
- package/resources/web/assets/apex-D8_7TLub.js +1 -0
- package/resources/web/assets/apl-C-KxP0FL.js +1 -0
- package/resources/web/assets/apl-dKokRX4l.js +1 -0
- package/resources/web/assets/applescript-Co6uUVPk.js +1 -0
- package/resources/web/assets/applescript-Dd26Nb5t.js +1 -0
- package/resources/web/assets/ara-BRHolxvo.js +1 -0
- package/resources/web/assets/ara-D6vCOKVX.js +1 -0
- package/resources/web/assets/asciidoc-DSG2rbEP.js +1 -0
- package/resources/web/assets/asciidoc-Ve4PFQV2.js +1 -0
- package/resources/web/assets/asm-CbVMAfFB.js +1 -0
- package/resources/web/assets/asm-D_Q5rh1f.js +1 -0
- package/resources/web/assets/astro-CbQHKStN.js +1 -0
- package/resources/web/assets/astro-OEl6i-aI.js +1 -0
- package/resources/web/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/resources/web/assets/aurora-x-DOuLBLNn.js +1 -0
- package/resources/web/assets/awk-DMzUqQB5.js +1 -0
- package/resources/web/assets/awk-UmR4Ublb.js +1 -0
- package/resources/web/assets/ayu-dark-BXQCOcka.js +1 -0
- package/resources/web/assets/ayu-dark-DYE7WIF3.js +1 -0
- package/resources/web/assets/ayu-light-BA47KaF1.js +1 -0
- package/resources/web/assets/ayu-light-McBaoK3Y.js +1 -0
- package/resources/web/assets/ayu-mirage-32ctXXKs.js +1 -0
- package/resources/web/assets/ayu-mirage-urwrJgdN.js +1 -0
- package/resources/web/assets/ballerina-BFfxhgS-.js +1 -0
- package/resources/web/assets/ballerina-BMbY-1wP.js +1 -0
- package/resources/web/assets/bat-BkioyH1T.js +1 -0
- package/resources/web/assets/bat-Dcnh2ot_.js +1 -0
- package/resources/web/assets/beancount-B92nBv9q.js +1 -0
- package/resources/web/assets/beancount-k_qm7-4y.js +1 -0
- package/resources/web/assets/berry-C9fz7p0n.js +1 -0
- package/resources/web/assets/berry-uYugtg8r.js +1 -0
- package/resources/web/assets/bibtex-CHM0blh-.js +1 -0
- package/resources/web/assets/bibtex-DELXwv0g.js +1 -0
- package/resources/web/assets/bicep-Bmn6On1c.js +1 -0
- package/resources/web/assets/bicep-D2njIRU5.js +1 -0
- package/resources/web/assets/bird2-D-8n_ahI.js +1 -0
- package/resources/web/assets/bird2-DPOp833l.js +1 -0
- package/resources/web/assets/blade-D4QpJJKB.js +1 -0
- package/resources/web/assets/blade-DrbQMUV-.js +1 -0
- package/resources/web/assets/bsl-BO_Y6i37.js +1 -0
- package/resources/web/assets/bsl-C4qeDxuX.js +1 -0
- package/resources/web/assets/c-BIGW1oBm.js +1 -0
- package/resources/web/assets/c-CyUOlKFr.js +1 -0
- package/resources/web/assets/c3-B1fh2zee.js +1 -0
- package/resources/web/assets/c3-eo99z4R2.js +1 -0
- package/resources/web/assets/cadence-Bv_4Rxtq.js +1 -0
- package/resources/web/assets/cadence-bIHbUj02.js +1 -0
- package/resources/web/assets/cairo-C_mOTUpN.js +1 -0
- package/resources/web/assets/cairo-KRGpt6FW.js +1 -0
- package/resources/web/assets/catppuccin-frappe-BCqV45_h.js +1 -0
- package/resources/web/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/resources/web/assets/catppuccin-latte-BWlfbWlw.js +1 -0
- package/resources/web/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/resources/web/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/resources/web/assets/catppuccin-macchiato-L0ooYkqX.js +1 -0
- package/resources/web/assets/catppuccin-mocha-CPxVXonm.js +1 -0
- package/resources/web/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/resources/web/assets/clarity-A4x-rz24.js +1 -0
- package/resources/web/assets/clarity-D53aC0YG.js +1 -0
- package/resources/web/assets/clojure-Bb2-3A0I.js +1 -0
- package/resources/web/assets/clojure-P80f7IUj.js +1 -0
- package/resources/web/assets/cmake-Cv5ljclQ.js +1 -0
- package/resources/web/assets/cmake-D1j8_8rp.js +1 -0
- package/resources/web/assets/cobol-CELfDnG_.js +1 -0
- package/resources/web/assets/cobol-nwyudZeR.js +1 -0
- package/resources/web/assets/codeowners-Bp6g37R7.js +1 -0
- package/resources/web/assets/codeowners-CKT8dJip.js +1 -0
- package/resources/web/assets/codeql-DXd8ggn3.js +1 -0
- package/resources/web/assets/codeql-DsOJ9woJ.js +1 -0
- package/resources/web/assets/coffee-CSg58a7P.js +1 -0
- package/resources/web/assets/coffee-Ch7k5sss.js +1 -0
- package/resources/web/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/resources/web/assets/common-lisp-v102bg8X.js +1 -0
- package/resources/web/assets/coq-CxCehFeR.js +1 -0
- package/resources/web/assets/coq-DkFqJrB1.js +1 -0
- package/resources/web/assets/cpp-C28rag7_.js +1 -0
- package/resources/web/assets/cpp-CofmeUqb.js +1 -0
- package/resources/web/assets/crystal-kLfOnxTY.js +1 -0
- package/resources/web/assets/crystal-tKQVLTB8.js +1 -0
- package/resources/web/assets/csharp-COcwbKMJ.js +1 -0
- package/resources/web/assets/csharp-DieIJxYJ.js +1 -0
- package/resources/web/assets/css-BSK200cd.js +1 -0
- package/resources/web/assets/css-DPfMkruS.js +1 -0
- package/resources/web/assets/csv-AZNL9t8Q.js +1 -0
- package/resources/web/assets/csv-fuZLfV_i.js +1 -0
- package/resources/web/assets/cue-D82EKSYY.js +1 -0
- package/resources/web/assets/cue-nzsbQn5T.js +1 -0
- package/resources/web/assets/cypher-BM7Pwunj.js +1 -0
- package/resources/web/assets/cypher-COkxafJQ.js +1 -0
- package/resources/web/assets/d-85-TOEBH.js +1 -0
- package/resources/web/assets/d-TG9YRPoI.js +1 -0
- package/resources/web/assets/dark-plus-C3mMm8J8.js +1 -0
- package/resources/web/assets/dark-plus-DNUujdjh.js +1 -0
- package/resources/web/assets/dart-CF10PKvl.js +1 -0
- package/resources/web/assets/dart-DArdxSyj.js +1 -0
- package/resources/web/assets/dax-B28Cho4e.js +1 -0
- package/resources/web/assets/dax-CEL-wOlO.js +1 -0
- package/resources/web/assets/desktop-BmXAJ9_W.js +1 -0
- package/resources/web/assets/desktop-Z9LhWKWr.js +1 -0
- package/resources/web/assets/diff-BlzBhZx2.js +1 -0
- package/resources/web/assets/diff-D97Zzqfu.js +1 -0
- package/resources/web/assets/docker-BcOcwvcX.js +1 -0
- package/resources/web/assets/docker-DIG_IqVK.js +1 -0
- package/resources/web/assets/dotenv-Bf0GLMGc.js +1 -0
- package/resources/web/assets/dotenv-Da5cRb03.js +1 -0
- package/resources/web/assets/dracula-BzJJZx-M.js +1 -0
- package/resources/web/assets/dracula-Dl-8puSV.js +1 -0
- package/resources/web/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/resources/web/assets/dracula-soft-CSMZw4vz.js +1 -0
- package/resources/web/assets/dream-maker-BtqSS_iP.js +1 -0
- package/resources/web/assets/dream-maker-DBhfoDN-.js +1 -0
- package/resources/web/assets/edge-BkV0erSs.js +1 -0
- package/resources/web/assets/edge-C9mkmEUa.js +1 -0
- package/resources/web/assets/elixir-B1OcFvXE.js +1 -0
- package/resources/web/assets/elixir-CDX3lj18.js +1 -0
- package/resources/web/assets/elm-BX_9EnK8.js +1 -0
- package/resources/web/assets/elm-DbKCFpqz.js +1 -0
- package/resources/web/assets/emacs-lisp-C9XAeP06.js +1 -0
- package/resources/web/assets/emacs-lisp-fXIB3QbG.js +1 -0
- package/resources/web/assets/erb-B12qg9BL.js +1 -0
- package/resources/web/assets/erb-C0Gc-WV-.js +1 -0
- package/resources/web/assets/erlang-Dh270pQQ.js +1 -0
- package/resources/web/assets/erlang-DsQrWhSR.js +1 -0
- package/resources/web/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/resources/web/assets/everforest-dark-BxQkAq-6.js +1 -0
- package/resources/web/assets/everforest-light-C8M2exoo.js +1 -0
- package/resources/web/assets/everforest-light-CcLVmqFl.js +1 -0
- package/resources/web/assets/fennel-BYunw83y.js +1 -0
- package/resources/web/assets/fennel-CKW7gc4E.js +1 -0
- package/resources/web/assets/fish-BiaFC76h.js +1 -0
- package/resources/web/assets/fish-BvzEVeQv.js +1 -0
- package/resources/web/assets/fluent-C1VbA1FI.js +1 -0
- package/resources/web/assets/fluent-C4IJs8-o.js +1 -0
- package/resources/web/assets/fortran-fixed-form-B5hFr6Yn.js +1 -0
- package/resources/web/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- package/resources/web/assets/fortran-free-form-BuX3zftO.js +1 -0
- package/resources/web/assets/fortran-free-form-BxgE0vQu.js +1 -0
- package/resources/web/assets/fsharp-B6CigNpP.js +1 -0
- package/resources/web/assets/fsharp-CXgrBDvD.js +1 -0
- package/resources/web/assets/gdresource-BOOCDP_w.js +1 -0
- package/resources/web/assets/gdresource-ChoLB09i.js +1 -0
- package/resources/web/assets/gdscript-BajwJ0jS.js +1 -0
- package/resources/web/assets/gdscript-C5YyOfLZ.js +1 -0
- package/resources/web/assets/gdshader-DkwncUOv.js +1 -0
- package/resources/web/assets/gdshader-MbeiIFWW.js +1 -0
- package/resources/web/assets/genie-CTXGoN_z.js +1 -0
- package/resources/web/assets/genie-D0YGMca9.js +1 -0
- package/resources/web/assets/gherkin-DQeIZrj7.js +1 -0
- package/resources/web/assets/gherkin-DyxjwDmM.js +1 -0
- package/resources/web/assets/git-commit-BicZTByO.js +1 -0
- package/resources/web/assets/git-commit-F4YmCXRG.js +1 -0
- package/resources/web/assets/git-rebase-Bzlpfr7M.js +1 -0
- package/resources/web/assets/git-rebase-r7XF79zn.js +1 -0
- package/resources/web/assets/github-dark-DHJKELXO.js +1 -0
- package/resources/web/assets/github-dark-default-BuB7GGZr.js +1 -0
- package/resources/web/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/resources/web/assets/github-dark-dimmed-CQQ2kH1a.js +1 -0
- package/resources/web/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/resources/web/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/resources/web/assets/github-dark-high-contrast-fZoHxlg3.js +1 -0
- package/resources/web/assets/github-dark-vbPMK5nw.js +1 -0
- package/resources/web/assets/github-light-CBO01_j6.js +1 -0
- package/resources/web/assets/github-light-DAi9KRSo.js +1 -0
- package/resources/web/assets/github-light-default-D7oLnXFd.js +1 -0
- package/resources/web/assets/github-light-default-DNniaknl.js +1 -0
- package/resources/web/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/resources/web/assets/github-light-high-contrast-Kh_Z1r_U.js +1 -0
- package/resources/web/assets/gleam-B-IqXlZK.js +1 -0
- package/resources/web/assets/gleam-BspZqrRM.js +1 -0
- package/resources/web/assets/glimmer-js-Rg0-pVw9.js +1 -0
- package/resources/web/assets/glimmer-js-cZi37nA1.js +1 -0
- package/resources/web/assets/glimmer-ts-BY3QTAW9.js +1 -0
- package/resources/web/assets/glimmer-ts-U6CK756n.js +1 -0
- package/resources/web/assets/glsl-Bk7TyU8J.js +1 -0
- package/resources/web/assets/glsl-DplSGwfg.js +1 -0
- package/resources/web/assets/gn-deNdZ1en.js +1 -0
- package/resources/web/assets/gn-n2N0HUVH.js +1 -0
- package/resources/web/assets/gnuplot-BBjkHhdK.js +1 -0
- package/resources/web/assets/gnuplot-DdkO51Og.js +1 -0
- package/resources/web/assets/go-CxLEBnE3.js +1 -0
- package/resources/web/assets/go-Dn4lI1Tv.js +1 -0
- package/resources/web/assets/graphql-By4-2MiP.js +1 -0
- package/resources/web/assets/graphql-ChdNCCLP.js +1 -0
- package/resources/web/assets/groovy-DjMbfbx0.js +1 -0
- package/resources/web/assets/groovy-gcz8RCvz.js +1 -0
- package/resources/web/assets/gruvbox-dark-hard-B-lrt2RD.js +1 -0
- package/resources/web/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/resources/web/assets/gruvbox-dark-medium-DqRMfHwY.js +1 -0
- package/resources/web/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/resources/web/assets/gruvbox-dark-soft-0cd3aJ5k.js +1 -0
- package/resources/web/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/resources/web/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/resources/web/assets/gruvbox-light-hard-CdMyBl7-.js +1 -0
- package/resources/web/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/resources/web/assets/gruvbox-light-medium-k_NbMmjL.js +1 -0
- package/resources/web/assets/gruvbox-light-soft-B_wmbOPu.js +1 -0
- package/resources/web/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/resources/web/assets/hack-CaT9iCJl.js +1 -0
- package/resources/web/assets/hack-Ce3HFLQu.js +1 -0
- package/resources/web/assets/haml-B8DHNrY2.js +1 -0
- package/resources/web/assets/haml-C-C08OMF.js +1 -0
- package/resources/web/assets/handlebars-BFxKmXBZ.js +1 -0
- package/resources/web/assets/handlebars-BL8al0AC.js +1 -0
- package/resources/web/assets/haskell-Df6bDoY_.js +1 -0
- package/resources/web/assets/haskell-DtebQ3Kv.js +1 -0
- package/resources/web/assets/haxe-CzTSHFRz.js +1 -0
- package/resources/web/assets/haxe-n0Q_eay_.js +1 -0
- package/resources/web/assets/hcl-BWvSN4gD.js +1 -0
- package/resources/web/assets/hcl-shhv74hy.js +1 -0
- package/resources/web/assets/highlighted-body-TPN3WLV5-DBK2Kin6.js +1 -0
- package/resources/web/assets/hjson-BEMFYqr7.js +1 -0
- package/resources/web/assets/hjson-D5-asLiD.js +1 -0
- package/resources/web/assets/hlsl-D3lLCCz7.js +1 -0
- package/resources/web/assets/hlsl-Pefxhtaj.js +1 -0
- package/resources/web/assets/horizon-BUw7H-hv.js +1 -0
- package/resources/web/assets/horizon-Dr-pOaOB.js +1 -0
- package/resources/web/assets/horizon-bright-CUuTKBJd.js +1 -0
- package/resources/web/assets/horizon-bright-Cn-bp-IR.js +1 -0
- package/resources/web/assets/houston-D7pTNItX.js +1 -0
- package/resources/web/assets/houston-DnULxvSX.js +1 -0
- package/resources/web/assets/html-DBrZJmtb.js +1 -0
- package/resources/web/assets/html-GMplVEZG.js +1 -0
- package/resources/web/assets/html-derivative-BFtXZ54Q.js +1 -0
- package/resources/web/assets/html-derivative-DgyNW28a.js +1 -0
- package/resources/web/assets/http-D0p2QOuJ.js +1 -0
- package/resources/web/assets/http-jrhK8wxY.js +1 -0
- package/resources/web/assets/hurl-CeF7EoTQ.js +1 -0
- package/resources/web/assets/hurl-irOxFIW8.js +1 -0
- package/resources/web/assets/hxml-B_SuSTPP.js +1 -0
- package/resources/web/assets/hxml-Bvhsp5Yf.js +1 -0
- package/resources/web/assets/hy-CTpXmg0M.js +1 -0
- package/resources/web/assets/hy-DFXneXwc.js +1 -0
- package/resources/web/assets/imba-DGztddWO.js +1 -0
- package/resources/web/assets/imba-z_cUhu9e.js +1 -0
- package/resources/web/assets/index-CRiSLfbF.js +10 -0
- package/resources/web/assets/index-CRuElBS1.js +1 -0
- package/resources/web/assets/ini-BEwlwnbL.js +1 -0
- package/resources/web/assets/ini-DOGW4-0C.js +1 -0
- package/resources/web/assets/java-B2AjWfgk.js +1 -0
- package/resources/web/assets/java-CylS5w8V.js +1 -0
- package/resources/web/assets/javascript-XPxc2APE.js +1 -0
- package/resources/web/assets/javascript-wDzz0qaB.js +1 -0
- package/resources/web/assets/jinja-4LBKfQ-Z.js +1 -0
- package/resources/web/assets/jinja-DlBE7Xgz.js +1 -0
- package/resources/web/assets/jison-DRGa8fbr.js +1 -0
- package/resources/web/assets/jison-wvAkD_A8.js +1 -0
- package/resources/web/assets/json-CjLXzM_z.js +1 -0
- package/resources/web/assets/json-Cp-IABpG.js +1 -0
- package/resources/web/assets/json5-C9tS-k6U.js +1 -0
- package/resources/web/assets/json5-DE06a0U2.js +1 -0
- package/resources/web/assets/jsonc-BYi4HS05.js +1 -0
- package/resources/web/assets/jsonc-Des-eS-w.js +1 -0
- package/resources/web/assets/jsonl-CuhIcKDk.js +1 -0
- package/resources/web/assets/jsonl-DcaNXYhu.js +1 -0
- package/resources/web/assets/jsonnet-DFQXde-d.js +1 -0
- package/resources/web/assets/jsonnet-DtQdHwK-.js +1 -0
- package/resources/web/assets/jssm-BlhucWo7.js +1 -0
- package/resources/web/assets/jssm-C2t-YnRu.js +1 -0
- package/resources/web/assets/jsx-BGEKFWBk.js +1 -0
- package/resources/web/assets/jsx-g9-lgVsj.js +1 -0
- package/resources/web/assets/julia-BxjEHQ54.js +1 -0
- package/resources/web/assets/julia-CxzCAyBv.js +1 -0
- package/resources/web/assets/just-Abn-AdSa.js +1 -0
- package/resources/web/assets/just-Cw27pwNe.js +1 -0
- package/resources/web/assets/kanagawa-dragon-9xlKYyML.js +1 -0
- package/resources/web/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/resources/web/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/resources/web/assets/kanagawa-lotus-D7R2-rgR.js +1 -0
- package/resources/web/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/resources/web/assets/kanagawa-wave-DXzwPY55.js +1 -0
- package/resources/web/assets/kdl-DJsF4U57.js +1 -0
- package/resources/web/assets/kdl-DV7GczEv.js +1 -0
- package/resources/web/assets/kotlin-BdnUsdx6.js +1 -0
- package/resources/web/assets/kotlin-DwKqsDKK.js +1 -0
- package/resources/web/assets/kusto-C0JqhYMw.js +1 -0
- package/resources/web/assets/kusto-DZf3V79B.js +1 -0
- package/resources/web/assets/laserwave-Crdg5MSq.js +1 -0
- package/resources/web/assets/laserwave-DUszq2jm.js +1 -0
- package/resources/web/assets/latex-C-qBiGC3.js +1 -0
- package/resources/web/assets/latex-CWtU0Tv5.js +1 -0
- package/resources/web/assets/lean-BZvkOJ9d.js +1 -0
- package/resources/web/assets/lean-QIsVZaRF.js +1 -0
- package/resources/web/assets/less-B1dDrJ26.js +1 -0
- package/resources/web/assets/less-C76OjOdF.js +1 -0
- package/resources/web/assets/light-plus-B7mTdjB0.js +1 -0
- package/resources/web/assets/light-plus-Keeg-hmX.js +1 -0
- package/resources/web/assets/liquid-DYVedYrR.js +1 -0
- package/resources/web/assets/liquid-DdraCjph.js +1 -0
- package/resources/web/assets/llvm-ByOMZdUC.js +1 -0
- package/resources/web/assets/llvm-DjAJT7YJ.js +1 -0
- package/resources/web/assets/log-2UxHyX5q.js +1 -0
- package/resources/web/assets/log-CbW7hOWU.js +1 -0
- package/resources/web/assets/logo-BbooMuDm.js +1 -0
- package/resources/web/assets/logo-BtOb2qkB.js +1 -0
- package/resources/web/assets/lua-BaeVxFsk.js +1 -0
- package/resources/web/assets/lua-JmSlR1pZ.js +1 -0
- package/resources/web/assets/luau-C-HG3fhB.js +1 -0
- package/resources/web/assets/luau-lY4yXJyn.js +1 -0
- package/resources/web/assets/make-CHLpvVh8.js +1 -0
- package/resources/web/assets/make-s9FKP0VE.js +1 -0
- package/resources/web/assets/markdown-CKXSK5AY.js +1 -0
- package/resources/web/assets/markdown-Cvjx9yec.js +1 -0
- package/resources/web/assets/marko-CQjc_OQE.js +1 -0
- package/resources/web/assets/marko-CnJfTvn9.js +1 -0
- package/resources/web/assets/material-theme-BjSij5jK.js +1 -0
- package/resources/web/assets/material-theme-D5KoaKCx.js +1 -0
- package/resources/web/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/resources/web/assets/material-theme-darker-Ci314V8G.js +1 -0
- package/resources/web/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/resources/web/assets/material-theme-lighter-BsHhGFQr.js +1 -0
- package/resources/web/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/resources/web/assets/material-theme-ocean-DcalBkIS.js +1 -0
- package/resources/web/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/resources/web/assets/material-theme-palenight-GGCMgrXw.js +1 -0
- package/resources/web/assets/matlab-BQKM-LA_.js +1 -0
- package/resources/web/assets/matlab-D7o27uSR.js +1 -0
- package/resources/web/assets/mdc-BMNejdWA.js +1 -0
- package/resources/web/assets/mdc-CqpcwBMx.js +1 -0
- package/resources/web/assets/mdx-BWRhHdFl.js +1 -0
- package/resources/web/assets/mdx-Cmh6b_Ma.js +1 -0
- package/resources/web/assets/mermaid-COhksqSL.js +1 -0
- package/resources/web/assets/mermaid-O7DHMXV3-D4O3Se1l.js +389 -0
- package/resources/web/assets/mermaid-O7DHMXV3-DZzHnE1c.css +1 -0
- package/resources/web/assets/mermaid-mWjccvbQ.js +1 -0
- package/resources/web/assets/min-dark-CDSXMz5a.js +1 -0
- package/resources/web/assets/min-dark-CafNBF8u.js +1 -0
- package/resources/web/assets/min-light-CM5JNFAA.js +1 -0
- package/resources/web/assets/min-light-CTRr51gU.js +1 -0
- package/resources/web/assets/mipsasm-BElnB_7Q.js +1 -0
- package/resources/web/assets/mipsasm-CKIfxQSi.js +1 -0
- package/resources/web/assets/mojo-CsmCHy7A.js +1 -0
- package/resources/web/assets/mojo-rZm6bMo-.js +1 -0
- package/resources/web/assets/monokai-D4h5O-jR.js +1 -0
- package/resources/web/assets/monokai-O2TR9gDo.js +1 -0
- package/resources/web/assets/moonbit-B8hphrHK.js +1 -0
- package/resources/web/assets/moonbit-_H4v1dQx.js +1 -0
- package/resources/web/assets/move-Ccg_HAOv.js +1 -0
- package/resources/web/assets/move-IF9eRakj.js +1 -0
- package/resources/web/assets/narrat-Cy2k80UN.js +1 -0
- package/resources/web/assets/narrat-DRg8JJMk.js +1 -0
- package/resources/web/assets/nextflow-DCuLxrAx.js +1 -0
- package/resources/web/assets/nextflow-Zz6hmt5N.js +1 -0
- package/resources/web/assets/nextflow-groovy-BeH2EWoN.js +1 -0
- package/resources/web/assets/nextflow-groovy-COOIDLZf.js +1 -0
- package/resources/web/assets/nginx-BpAMiNFr.js +1 -0
- package/resources/web/assets/nginx-bBKbG2uI.js +1 -0
- package/resources/web/assets/night-owl-C39BiMTA.js +1 -0
- package/resources/web/assets/night-owl-NZdGqbHT.js +1 -0
- package/resources/web/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/resources/web/assets/night-owl-light-Dx-BWqtN.js +1 -0
- package/resources/web/assets/nim-CVrawwO9.js +1 -0
- package/resources/web/assets/nim-Cm6-Nayq.js +1 -0
- package/resources/web/assets/nix-CwoSXNpI.js +1 -0
- package/resources/web/assets/nix-DFZZLjuC.js +1 -0
- package/resources/web/assets/nord-BNMOv-tL.js +1 -0
- package/resources/web/assets/nord-Ddv68eIx.js +1 -0
- package/resources/web/assets/nushell-BaAZo4zx.js +1 -0
- package/resources/web/assets/nushell-Cz2AlsmD.js +1 -0
- package/resources/web/assets/objective-c-DXmwc3jG.js +1 -0
- package/resources/web/assets/objective-c-sgtl-PdD.js +1 -0
- package/resources/web/assets/objective-cpp-BTQ37cYs.js +1 -0
- package/resources/web/assets/objective-cpp-CLxacb5B.js +1 -0
- package/resources/web/assets/ocaml-BvBP9Lm0.js +1 -0
- package/resources/web/assets/ocaml-C0hk2d4L.js +1 -0
- package/resources/web/assets/odin-BBf5iR-q.js +1 -0
- package/resources/web/assets/odin-BTnrxC4P.js +1 -0
- package/resources/web/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/resources/web/assets/one-dark-pro-DnMjqbdW.js +1 -0
- package/resources/web/assets/one-light-C3Wv6jpd.js +1 -0
- package/resources/web/assets/one-light-dsKzgxTn.js +1 -0
- package/resources/web/assets/openapi_extractor_bg-DZrbVm4x.wasm +0 -0
- package/resources/web/assets/openscad-C4EeE6gA.js +1 -0
- package/resources/web/assets/openscad-Dmi2c_42.js +1 -0
- package/resources/web/assets/pascal-D93ZcfNL.js +1 -0
- package/resources/web/assets/pascal-DYjw0AuS.js +1 -0
- package/resources/web/assets/perl-C0TMdlhV.js +1 -0
- package/resources/web/assets/perl-Djxv1YJ9.js +1 -0
- package/resources/web/assets/php-DczsLzXi.js +1 -0
- package/resources/web/assets/php-Dhbhpdrm.js +1 -0
- package/resources/web/assets/pkl-Cij4Vm9z.js +1 -0
- package/resources/web/assets/pkl-u5AG7uiY.js +1 -0
- package/resources/web/assets/plastic-3e1v2bzS.js +1 -0
- package/resources/web/assets/plastic-Ckcm5hoS.js +1 -0
- package/resources/web/assets/plsql-Bd6NdBJI.js +1 -0
- package/resources/web/assets/plsql-ChMvpjG-.js +1 -0
- package/resources/web/assets/po-BTJTHyun.js +1 -0
- package/resources/web/assets/po-CUhVi7la.js +1 -0
- package/resources/web/assets/poimandres-BbcZclLp.js +1 -0
- package/resources/web/assets/poimandres-CS3Unz2-.js +1 -0
- package/resources/web/assets/polar-B-qJ3AIy.js +1 -0
- package/resources/web/assets/polar-C0HS_06l.js +1 -0
- package/resources/web/assets/postcss-BSGhOJ4k.js +1 -0
- package/resources/web/assets/postcss-CXtECtnM.js +1 -0
- package/resources/web/assets/powerquery-CC1XieQO.js +1 -0
- package/resources/web/assets/powerquery-CEu0bR-o.js +1 -0
- package/resources/web/assets/powershell-DdRAnR4Z.js +1 -0
- package/resources/web/assets/powershell-Dpen1YoG.js +1 -0
- package/resources/web/assets/prisma-C0hJlfqX.js +1 -0
- package/resources/web/assets/prisma-Dd19v3D-.js +1 -0
- package/resources/web/assets/prolog-CbFg5uaA.js +1 -0
- package/resources/web/assets/prolog-bSi0SE3D.js +1 -0
- package/resources/web/assets/proto-BZ_yZy5q.js +1 -0
- package/resources/web/assets/proto-C7zT0LnQ.js +1 -0
- package/resources/web/assets/pug-CGlum2m_.js +1 -0
- package/resources/web/assets/pug-ClQUpJlV.js +1 -0
- package/resources/web/assets/puppet-BMWR74SV.js +1 -0
- package/resources/web/assets/puppet-ja2MI9-b.js +1 -0
- package/resources/web/assets/purescript-CklMAg4u.js +1 -0
- package/resources/web/assets/purescript-CxgsQa43.js +1 -0
- package/resources/web/assets/python-B6aJPvgy.js +1 -0
- package/resources/web/assets/python-DgE28U1V.js +1 -0
- package/resources/web/assets/qml-3beO22l8.js +1 -0
- package/resources/web/assets/qml-BEkX6VoX.js +1 -0
- package/resources/web/assets/qmldir-C8lEn-DE.js +1 -0
- package/resources/web/assets/qmldir-DNYHzgow.js +1 -0
- package/resources/web/assets/qss-BZsEMKxJ.js +1 -0
- package/resources/web/assets/qss-IeuSbFQv.js +1 -0
- package/resources/web/assets/r-BcofxrH1.js +1 -0
- package/resources/web/assets/r-Dspwwk_N.js +1 -0
- package/resources/web/assets/racket-BqYA7rlc.js +1 -0
- package/resources/web/assets/racket-CzHBKLyy.js +1 -0
- package/resources/web/assets/raku-CPccoUN1.js +1 -0
- package/resources/web/assets/raku-DXvB9xmW.js +1 -0
- package/resources/web/assets/razor-DnCvuKPj.js +1 -0
- package/resources/web/assets/razor-Uh8Bk_45.js +1 -0
- package/resources/web/assets/red-BQzOET_I.js +1 -0
- package/resources/web/assets/red-bN70gL4F.js +1 -0
- package/resources/web/assets/reg-C-SQnVFl.js +1 -0
- package/resources/web/assets/reg-DkqHJyC0.js +1 -0
- package/resources/web/assets/regexp-BW_zLBm-.js +1 -0
- package/resources/web/assets/regexp-CDVJQ6XC.js +1 -0
- package/resources/web/assets/rel-BIqKdwke.js +1 -0
- package/resources/web/assets/rel-C3B-1QV4.js +1 -0
- package/resources/web/assets/riscv-BM1_JUlF.js +1 -0
- package/resources/web/assets/riscv-s6spwTFp.js +1 -0
- package/resources/web/assets/ron-CloI94uS.js +1 -0
- package/resources/web/assets/ron-D8l8udqQ.js +1 -0
- package/resources/web/assets/rose-pine-B3EY3h2-.js +1 -0
- package/resources/web/assets/rose-pine-dawn-6WQi5eS6.js +1 -0
- package/resources/web/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- package/resources/web/assets/rose-pine-moon-BTPbmVvF.js +1 -0
- package/resources/web/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- package/resources/web/assets/rose-pine-qdsjHGoJ.js +1 -0
- package/resources/web/assets/rosmsg-BJDFO7_C.js +1 -0
- package/resources/web/assets/rosmsg-TcL_zzr8.js +1 -0
- package/resources/web/assets/rst-BQ8kJ8ZW.js +1 -0
- package/resources/web/assets/rst-BrH8l1NY.js +1 -0
- package/resources/web/assets/ruby-DsIP2xqq.js +1 -0
- package/resources/web/assets/ruby-Dw2BHqvy.js +1 -0
- package/resources/web/assets/rust-B1yitclQ.js +1 -0
- package/resources/web/assets/rust-DJErdhjk.js +1 -0
- package/resources/web/assets/sas-BZeeyq_z.js +1 -0
- package/resources/web/assets/sas-cz2c8ADy.js +1 -0
- package/resources/web/assets/sass-CIfQ9yqV.js +1 -0
- package/resources/web/assets/sass-Cj5Yp3dK.js +1 -0
- package/resources/web/assets/scala-C151Ov-r.js +1 -0
- package/resources/web/assets/scala-CWwlNtab.js +1 -0
- package/resources/web/assets/scheme-ByM66cy_.js +1 -0
- package/resources/web/assets/scheme-C98Dy4si.js +1 -0
- package/resources/web/assets/scss-Dk05w39G.js +1 -0
- package/resources/web/assets/scss-OYdSNvt2.js +1 -0
- package/resources/web/assets/sdbl-C5Q1usnU.js +1 -0
- package/resources/web/assets/sdbl-DVxCFoDh.js +1 -0
- package/resources/web/assets/shaderlab-DNkMdb2B.js +1 -0
- package/resources/web/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/resources/web/assets/shellscript-CE-5zpiL.js +1 -0
- package/resources/web/assets/shellscript-Yzrsuije.js +1 -0
- package/resources/web/assets/shellsession-BADoaaVG.js +1 -0
- package/resources/web/assets/shellsession-BhddCRKA.js +1 -0
- package/resources/web/assets/slack-dark-BthQWCQV.js +1 -0
- package/resources/web/assets/slack-dark-DBfAPHjY.js +1 -0
- package/resources/web/assets/slack-ochin-DqwNpetd.js +1 -0
- package/resources/web/assets/slack-ochin-szRk-9hG.js +1 -0
- package/resources/web/assets/smalltalk-BERRCDM3.js +1 -0
- package/resources/web/assets/smalltalk-GKfhTxrk.js +1 -0
- package/resources/web/assets/snazzy-light-Bw305WKR.js +1 -0
- package/resources/web/assets/snazzy-light-CBYPMa6b.js +1 -0
- package/resources/web/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/resources/web/assets/solarized-dark-Tf4Pofl7.js +1 -0
- package/resources/web/assets/solarized-light-L9t79GZl.js +1 -0
- package/resources/web/assets/solarized-light-n46tpZ2s.js +1 -0
- package/resources/web/assets/solidity-DanOLEvk.js +1 -0
- package/resources/web/assets/solidity-rGO070M0.js +1 -0
- package/resources/web/assets/soy-Brmx7dQM.js +1 -0
- package/resources/web/assets/soy-C6ERzLIv.js +1 -0
- package/resources/web/assets/sparql-CHK3vDkL.js +1 -0
- package/resources/web/assets/sparql-rVzFXLq3.js +1 -0
- package/resources/web/assets/splunk-BtCnVYZw.js +1 -0
- package/resources/web/assets/splunk-YU1HCmJX.js +1 -0
- package/resources/web/assets/sql-BLtJtn59.js +1 -0
- package/resources/web/assets/sql-CKXjX23X.js +1 -0
- package/resources/web/assets/ssh-config-Cpnw3KEt.js +1 -0
- package/resources/web/assets/ssh-config-_ykCGR6B.js +1 -0
- package/resources/web/assets/stata-BH5u7GGu.js +1 -0
- package/resources/web/assets/stata-BJqnY-gO.js +1 -0
- package/resources/web/assets/stylus-BEDo0Tqx.js +1 -0
- package/resources/web/assets/stylus-CHekGIgu.js +1 -0
- package/resources/web/assets/surrealql-Bq5Q-fJD.js +1 -0
- package/resources/web/assets/surrealql-CYeReaNr.js +1 -0
- package/resources/web/assets/svelte-C_ipcX3V.js +1 -0
- package/resources/web/assets/svelte-xWy8v8x_.js +1 -0
- package/resources/web/assets/swift-D82vCrfD.js +1 -0
- package/resources/web/assets/swift-DjrYMa62.js +1 -0
- package/resources/web/assets/synthwave-84-CNQ9Fj-_.js +1 -0
- package/resources/web/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/resources/web/assets/system-verilog-CnnmHF94.js +1 -0
- package/resources/web/assets/system-verilog-rKNYENrf.js +1 -0
- package/resources/web/assets/systemd-4A_iFExJ.js +1 -0
- package/resources/web/assets/systemd-C1FfcI00.js +1 -0
- package/resources/web/assets/talonscript-CkByrt1z.js +1 -0
- package/resources/web/assets/talonscript-bksoRmW6.js +1 -0
- package/resources/web/assets/tasl-Bl4tsGRM.js +1 -0
- package/resources/web/assets/tasl-QIJgUcNo.js +1 -0
- package/resources/web/assets/tcl-B2_VAYrd.js +1 -0
- package/resources/web/assets/tcl-dwOrl1Do.js +1 -0
- package/resources/web/assets/templ-Bod2PxCB.js +1 -0
- package/resources/web/assets/templ-P3uqSqPl.js +1 -0
- package/resources/web/assets/terraform-BETggiCN.js +1 -0
- package/resources/web/assets/terraform-Ba94thAr.js +1 -0
- package/resources/web/assets/tex-BLPnQt1V.js +1 -0
- package/resources/web/assets/tex-idrVyKtj.js +1 -0
- package/resources/web/assets/tokyo-night-J9jDJp4U.js +1 -0
- package/resources/web/assets/tokyo-night-hegEt444.js +1 -0
- package/resources/web/assets/toml-Btlk-g9G.js +1 -0
- package/resources/web/assets/toml-vGWfd6FD.js +1 -0
- package/resources/web/assets/ts-tags-eLBrqaVN.js +1 -0
- package/resources/web/assets/ts-tags-zn1MmPIZ.js +1 -0
- package/resources/web/assets/tsv-B_m7g4N7.js +1 -0
- package/resources/web/assets/tsv-DYfmKMIW.js +1 -0
- package/resources/web/assets/tsx-COt5Ahok.js +1 -0
- package/resources/web/assets/tsx-Dio8iE-N.js +1 -0
- package/resources/web/assets/turtle-BsS91CYL.js +1 -0
- package/resources/web/assets/turtle-whXsfw69.js +1 -0
- package/resources/web/assets/twig-DNn4PbVi.js +1 -0
- package/resources/web/assets/twig-LEyH1z5E.js +1 -0
- package/resources/web/assets/typescript-BPQ3VLAy.js +1 -0
- package/resources/web/assets/typescript-DttGkNCf.js +1 -0
- package/resources/web/assets/typespec-BGHnOYBU.js +1 -0
- package/resources/web/assets/typespec-C_z-8Pri.js +1 -0
- package/resources/web/assets/typst-D2RORpaG.js +1 -0
- package/resources/web/assets/typst-DHCkPAjA.js +1 -0
- package/resources/web/assets/v-BcVCzyr7.js +1 -0
- package/resources/web/assets/v-CvM42WIw.js +1 -0
- package/resources/web/assets/vala-B_5xOBNr.js +1 -0
- package/resources/web/assets/vala-CsfeWuGM.js +1 -0
- package/resources/web/assets/vb-BVDm3zBt.js +1 -0
- package/resources/web/assets/vb-D17OF-Vu.js +1 -0
- package/resources/web/assets/verilog-BQ8w6xss.js +1 -0
- package/resources/web/assets/verilog-D5iownw6.js +1 -0
- package/resources/web/assets/vesper-C5GDOJD3.js +1 -0
- package/resources/web/assets/vesper-DU1UobuO.js +1 -0
- package/resources/web/assets/vhdl-Bmgbkl_-.js +1 -0
- package/resources/web/assets/vhdl-CeAyd5Ju.js +1 -0
- package/resources/web/assets/viml-3ZODU9FQ.js +1 -0
- package/resources/web/assets/viml-CJc9bBzg.js +1 -0
- package/resources/web/assets/vitesse-black-BeJXV_f5.js +1 -0
- package/resources/web/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/resources/web/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/resources/web/assets/vitesse-dark-mzFqOv-V.js +1 -0
- package/resources/web/assets/vitesse-light-BoFwUIac.js +1 -0
- package/resources/web/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/resources/web/assets/vue-DN_0RTcg.js +1 -0
- package/resources/web/assets/vue-DiyPqOwP.js +1 -0
- package/resources/web/assets/vue-html-AaS7Mt5G.js +1 -0
- package/resources/web/assets/vue-html-BM4TQ0nH.js +1 -0
- package/resources/web/assets/vue-vine-CQOfvN7w.js +1 -0
- package/resources/web/assets/vue-vine-CcuWFpUQ.js +1 -0
- package/resources/web/assets/vyper-B6NKdirK.js +1 -0
- package/resources/web/assets/vyper-CDx5xZoG.js +1 -0
- package/resources/web/assets/wasm-CG6Dc4jp.js +1 -0
- package/resources/web/assets/wasm-Ck_ssClF.js +1 -0
- package/resources/web/assets/wasm-LUzQYg3H.js +1 -0
- package/resources/web/assets/wasm-MzD3tlZU.js +1 -0
- package/resources/web/assets/wenyan-8fXatRyt.js +1 -0
- package/resources/web/assets/wenyan-BV7otONQ.js +1 -0
- package/resources/web/assets/wgsl-CECC3vJ5.js +1 -0
- package/resources/web/assets/wgsl-Dx-B1_4e.js +1 -0
- package/resources/web/assets/wikitext-BaRWL9sq.js +1 -0
- package/resources/web/assets/wikitext-BhOHFoWU.js +1 -0
- package/resources/web/assets/wit-5i3qLPDT.js +1 -0
- package/resources/web/assets/wit-MEd50GYB.js +1 -0
- package/resources/web/assets/wolfram-CmMaIVaG.js +1 -0
- package/resources/web/assets/wolfram-lXgVvXCa.js +1 -0
- package/resources/web/assets/xml-DtyAt_xK.js +1 -0
- package/resources/web/assets/xml-sdJ4AIDG.js +1 -0
- package/resources/web/assets/xsl-Btrj9DhN.js +1 -0
- package/resources/web/assets/xsl-CtQFsRM5.js +1 -0
- package/resources/web/assets/yaml-B92AUxDB.js +1 -0
- package/resources/web/assets/yaml-Buea-lGh.js +1 -0
- package/resources/web/assets/zenscript-DVFEvuxE.js +1 -0
- package/resources/web/assets/zenscript-Dja4fBOE.js +1 -0
- package/resources/web/assets/zig-LhWa2ADv.js +1 -0
- package/resources/web/assets/zig-VOosw3JB.js +1 -0
- package/resources/web/index.html +24 -0
- package/CHANGELOG.md +0 -30
- package/LICENSE +0 -21
- package/bin/x.js +0 -61
- package/docs/README-ES.md +0 -110
- package/docs/_config.yml +0 -1
- package/docs/img/en.png +0 -0
- package/docs/img/jake.gif +0 -0
- package/docs/img/sp.png +0 -0
- package/lib/builders.js +0 -285
- package/lib/config.js +0 -133
- package/lib/defaults.js +0 -29
- package/lib/extends.js +0 -100
- package/lib/i18n.js +0 -57
- package/lib/interpolate.js +0 -79
- package/lib/utils.js +0 -132
- package/lib/validators.js +0 -192
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-6NEUuZou.js","assets/html-DBrZJmtb.js","assets/javascript-XPxc2APE.js","assets/css-BSK200cd.js","assets/angular-ts-BfBSdvnY.js","assets/scss-Dk05w39G.js","assets/apl-C-KxP0FL.js","assets/xml-DtyAt_xK.js","assets/java-B2AjWfgk.js","assets/json-CjLXzM_z.js","assets/astro-OEl6i-aI.js","assets/typescript-DttGkNCf.js","assets/postcss-BSGhOJ4k.js","assets/tsx-Dio8iE-N.js","assets/blade-DrbQMUV-.js","assets/html-derivative-DgyNW28a.js","assets/sql-CKXjX23X.js","assets/bsl-C4qeDxuX.js","assets/sdbl-C5Q1usnU.js","assets/cairo-C_mOTUpN.js","assets/python-DgE28U1V.js","assets/cobol-CELfDnG_.js","assets/coffee-CSg58a7P.js","assets/cpp-C28rag7_.js","assets/regexp-BW_zLBm-.js","assets/glsl-Bk7TyU8J.js","assets/c-CyUOlKFr.js","assets/crystal-kLfOnxTY.js","assets/shellscript-CE-5zpiL.js","assets/edge-C9mkmEUa.js","assets/elixir-B1OcFvXE.js","assets/elm-BX_9EnK8.js","assets/erb-C0Gc-WV-.js","assets/ruby-DsIP2xqq.js","assets/haml-C-C08OMF.js","assets/graphql-By4-2MiP.js","assets/jsx-BGEKFWBk.js","assets/lua-JmSlR1pZ.js","assets/yaml-B92AUxDB.js","assets/erlang-Dh270pQQ.js","assets/markdown-CKXSK5AY.js","assets/fortran-fixed-form-B5hFr6Yn.js","assets/fortran-free-form-BuX3zftO.js","assets/fsharp-B6CigNpP.js","assets/gdresource-ChoLB09i.js","assets/gdshader-MbeiIFWW.js","assets/gdscript-BajwJ0jS.js","assets/git-commit-BicZTByO.js","assets/diff-BlzBhZx2.js","assets/git-rebase-Bzlpfr7M.js","assets/glimmer-js-cZi37nA1.js","assets/glimmer-ts-BY3QTAW9.js","assets/hack-Ce3HFLQu.js","assets/handlebars-BFxKmXBZ.js","assets/http-D0p2QOuJ.js","assets/hurl-CeF7EoTQ.js","assets/csv-AZNL9t8Q.js","assets/hxml-B_SuSTPP.js","assets/haxe-n0Q_eay_.js","assets/jinja-DlBE7Xgz.js","assets/jison-DRGa8fbr.js","assets/julia-BxjEHQ54.js","assets/r-BcofxrH1.js","assets/just-Abn-AdSa.js","assets/perl-Djxv1YJ9.js","assets/latex-C-qBiGC3.js","assets/tex-BLPnQt1V.js","assets/liquid-DdraCjph.js","assets/marko-CQjc_OQE.js","assets/less-C76OjOdF.js","assets/mdc-CqpcwBMx.js","assets/nextflow-DCuLxrAx.js","assets/nextflow-groovy-COOIDLZf.js","assets/nginx-bBKbG2uI.js","assets/nim-Cm6-Nayq.js","assets/php-DczsLzXi.js","assets/pug-ClQUpJlV.js","assets/qml-BEkX6VoX.js","assets/razor-DnCvuKPj.js","assets/csharp-DieIJxYJ.js","assets/rst-BQ8kJ8ZW.js","assets/cmake-Cv5ljclQ.js","assets/sas-BZeeyq_z.js","assets/shaderlab-DNkMdb2B.js","assets/hlsl-Pefxhtaj.js","assets/shellsession-BhddCRKA.js","assets/soy-C6ERzLIv.js","assets/sparql-CHK3vDkL.js","assets/turtle-whXsfw69.js","assets/stata-BJqnY-gO.js","assets/surrealql-CYeReaNr.js","assets/svelte-xWy8v8x_.js","assets/templ-Bod2PxCB.js","assets/go-Dn4lI1Tv.js","assets/ts-tags-eLBrqaVN.js","assets/twig-LEyH1z5E.js","assets/vue-DiyPqOwP.js","assets/vue-html-BM4TQ0nH.js","assets/vue-vine-CcuWFpUQ.js","assets/stylus-CHekGIgu.js","assets/xsl-Btrj9DhN.js","assets/highlighted-body-TPN3WLV5-DBK2Kin6.js","assets/index-CRuElBS1.js","assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-B12qg9BL.js","assets/ruby-Dw2BHqvy.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-Cw27pwNe.js","assets/perl-C0TMdlhV.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-DYVedYrR.js","assets/marko-CnJfTvn9.js","assets/less-B1dDrJ26.js","assets/mdc-BMNejdWA.js","assets/nextflow-Zz6hmt5N.js","assets/nextflow-groovy-BeH2EWoN.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-BrH8l1NY.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-C_ipcX3V.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-DNn4PbVi.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as mx,j as b,b as oq,r as cq,_ as x}from"./index-CRuElBS1.js";function Yy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O=mx();const $h=Yy(O);var Jt=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Jt||{});function l$({update:e,notify:t,unwatched:n}){return{link:r,unlink:s,propagate:i,checkDirty:a,shallowPropagate:o};function r(u,l,d){const f=l.depsTail;if(f!==void 0&&f.dep===u)return;const h=f!==void 0?f.nextDep:l.deps;if(h!==void 0&&h.dep===u){h.version=d,l.depsTail=h;return}const m=u.subsTail;if(m!==void 0&&m.version===d&&m.sub===l)return;const y=l.depsTail=u.subsTail={version:d,dep:u,sub:l,prevDep:f,nextDep:h,prevSub:m,nextSub:void 0};h!==void 0&&(h.prevDep=y),f!==void 0?f.nextDep=y:l.deps=y,m!==void 0?m.nextSub=y:u.subs=y}function s(u,l=u.sub){const d=u.dep,f=u.prevDep,h=u.nextDep,m=u.nextSub,y=u.prevSub;return h!==void 0?h.prevDep=f:l.depsTail=f,f!==void 0?f.nextDep=h:l.deps=h,m!==void 0?m.prevSub=y:d.subsTail=y,y!==void 0?y.nextSub=m:(d.subs=m)===void 0&&n(d),h}function i(u){let l=u.nextSub,d;e:do{const f=u.sub;let h=f.flags;if(h&60?h&12?h&4?!(h&48)&&c(u,f)?(f.flags=h|40,h&=1):h=0:f.flags=h&-9|32:h=0:f.flags=h|32,h&2&&t(f),h&1){const m=f.subs;if(m!==void 0){const y=(u=m).nextSub;y!==void 0&&(d={value:l,prev:d},l=y);continue}}if((u=l)!==void 0){l=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){l=u.nextSub;continue e}break}while(!0)}function a(u,l){let d,f=0,h=!1;e:do{const m=u.dep,y=m.flags;if(l.flags&16)h=!0;else if((y&17)===17){if(e(m)){const g=m.subs;g.nextSub!==void 0&&o(g),h=!0}}else if((y&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=m.deps,l=m,++f;continue}if(!h){const g=u.nextDep;if(g!==void 0){u=g;continue}}for(;f--;){const g=l.subs,p=g.nextSub!==void 0;if(p?(u=d.value,d=d.prev):u=g,h){if(e(l)){p&&o(g),l=u.sub;continue}h=!1}else l.flags&=-33;l=u.sub;const _=u.nextDep;if(_!==void 0){u=_;continue e}}return h}while(!0)}function o(u){do{const l=u.sub,d=l.flags;(d&48)===32&&(l.flags=d|16,(d&6)===2&&t(l))}while((u=u.nextSub)!==void 0)}function c(u,l){let d=l.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}let px=0,uc=0,nh=0;const Ta=[],{link:vFe,unlink:d$,propagate:xFe,checkDirty:uq,shallowPropagate:TFe}=l$({update(e){return e.depsTail!==void 0?hq(e):mq(e)},notify(e){let t=nh,n=t;do if(Ta[t++]=e,e.flags&=-3,e=e.subs?.sub,e===void 0||!(e.flags&2))break;while(!0);for(nh=t;n<--t;){const r=Ta[n];Ta[n++]=Ta[t],Ta[t]=r}},unwatched(e){e.flags&1?e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,Qy(e)):bq.call(e)}});function lq(){return px}function dq(){++px}function fq(){--px||gq()}function hq(e){e.depsTail=void 0,e.flags=5;try{const t=e.value;return t!==(e.value=e.getter(t))}finally{e.flags&=-5,Qy(e)}}function mq(e){return e.flags=1,e.currentValue!==(e.currentValue=e.pendingValue)}function pq(e){const t=e.flags;if(t&16||t&32&&uq(e.deps,e)){e.depsTail=void 0,e.flags=6;try{e.fn()}finally{e.flags&=-5,Qy(e)}}else e.flags=2}function gq(){try{for(;uc<nh;){const e=Ta[uc];Ta[uc++]=void 0,pq(e)}}finally{for(;uc<nh;){const e=Ta[uc];Ta[uc++]=void 0,e.flags|=10}uc=0,nh=0}}function bq(){this.depsTail=void 0,this.flags=0,Qy(this);const e=this.subs;e!==void 0&&d$(e)}function Qy(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=d$(n,e)}function gx(e,t,n){const r=typeof e=="object",s=r?e:void 0;return{next:(r?e.next:e)?.bind(s),error:(r?e.error:t)?.bind(s),complete:(r?e.complete:n)?.bind(s)}}const Cw=[];let f0=0;const{link:d2,unlink:yq,propagate:_q,checkDirty:f$,shallowPropagate:f2}=l$({update(e){return e._update()},notify(e){Cw[Pw++]=e,e.flags&=~Jt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Jt.Mutable|Jt.Dirty,Z0(e))}});let Np=0,Pw=0,Mi;function Z0(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=yq(n,e)}function h$(){if(!(lq()>0)){for(;Np<Pw;){const e=Cw[Np];Cw[Np++]=void 0,e.notify()}Np=0,Pw=0}}function m$(e,t){const n=typeof e=="function",r=e,s={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Jt.None:Jt.Mutable,get(){return Mi!==void 0&&d2(s,Mi,f0),s._snapshot},subscribe(i){const a=gx(i),o={current:!1},c=kq(()=>{s.get(),o.current?a.next?.(s._snapshot):o.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(i){const a=Mi,o=Object.is;if(n)Mi=s,++f0,s.depsTail=void 0;else if(i===void 0)return!1;n&&(s.flags=Jt.Mutable|Jt.RecursedCheck);try{const c=s._snapshot,u=typeof i=="function"?i(c):i===void 0&&n?r(c):i;return c===void 0||!o(c,u)?(s._snapshot=u,!0):!1}finally{Mi=a,n&&(s.flags&=~Jt.RecursedCheck),Z0(s)}}};return n?(s.flags=Jt.Mutable|Jt.Dirty,s.get=function(){const i=s.flags;if(i&Jt.Dirty||i&Jt.Pending&&f$(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&f2(a)}}else i&Jt.Pending&&(s.flags=i&~Jt.Pending);return Mi!==void 0&&d2(s,Mi,f0),s._snapshot}):s.set=function(i){if(s._update(i)){const a=s.subs;a!==void 0&&(_q(a),f2(a),h$())}},s}function kq(e){const t=()=>{const r=Mi;Mi=n,++f0,n.depsTail=void 0,n.flags=Jt.Watching|Jt.RecursedCheck;try{return e()}finally{Mi=r,n.flags&=~Jt.RecursedCheck,Z0(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Jt.Watching|Jt.RecursedCheck,notify(){const r=this.flags;r&Jt.Dirty||r&Jt.Pending&&f$(this.deps,this)?t():this.flags=Jt.Watching},stop(){this.flags=Jt.None,this.depsTail=void 0,Z0(this)}};return t(),n}class Eq{constructor(t){this.atom=m$(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(gx(t))}}class wq{constructor(t){this.atom=m$(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(gx(t))}}function Sq(e){return typeof e=="function"?new wq(e):new Eq(e)}function vq(e){try{dq(),e()}finally{fq(),h$()}}const go="__TSR_index",h2="popstate",m2="beforeunload";function xq(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(o=>o({location:t,action:a}))},s=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},i=async({task:a,navigateOpts:o,...c})=>{if(o?.ignoreBlocker??!1){a();return}const l=e.getBlockers?.()??[],d=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&l.length&&d)for(const f of l){const h=eb(c.path,c.state);if(await f.blockerFn({currentLocation:t,nextLocation:h,action:c.type})){e.onBlocked?.();return}}a()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,o,c)=>{const u=t.state[go];o=p2(u+1,o),i({task:()=>{e.pushState(a,o),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:o})},replace:(a,o,c)=>{const u=t.state[go];o=p2(u,o),i({task:()=>{e.replaceState(a,o),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:o})},go:(a,o)=>{i({task:()=>{e.go(a),s({type:"GO",index:a})},navigateOpts:o,type:"GO"})},back:a=>{i({task:()=>{e.back(a?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{i({task:()=>{e.forward(a?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>t.state[go]!==0,createHref:a=>e.createHref(a),block:a=>{if(!e.setBlockers)return()=>{};const o=e.getBlockers?.()??[];return e.setBlockers([...o,a]),()=>{const c=e.getBlockers?.()??[];e.setBlockers?.(c.filter(u=>u!==a))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function p2(e,t){t||(t={});const n=bx();return{...t,key:n,__TSR_key:n,[go]:e}}function Tq(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let s=[];const i=()=>s,a=I=>s=I,o=(I=>I),c=(()=>eb(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const I=bx();t.history.replaceState({[go]:0,key:I,__TSR_key:I},"")}let u=c(),l,d=!1,f=!1,h=!1,m=!1;const y=()=>u;let g,p;const _=()=>{g&&(T._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,"",g.href),T._ignoreSubscribers=!1,g=void 0,p=void 0,l=void 0)},k=(I,D,R)=>{const z=o(D);p||(l=u),u=eb(D,R),g={href:z,state:R,isPush:g?.isPush||I==="push"},p||(p=Promise.resolve().then(()=>_()))},v=I=>{u=c(),T.notify({type:I})},w=async()=>{if(f){f=!1;return}const I=c(),D=I.state[go]-u.state[go],R=D===1,z=D===-1,V=!R&&!z||d;d=!1;const H=V?"GO":z?"BACK":"FORWARD",G=V?{type:"GO",index:D}:{type:z?"BACK":"FORWARD"};if(h)h=!1;else{const Q=i();if(typeof document<"u"&&Q.length){for(const ne of Q)if(await ne.blockerFn({currentLocation:u,nextLocation:I,action:H})){f=!0,t.history.go(1),T.notify(G);return}}}u=c(),T.notify(G)},S=I=>{if(m){m=!1;return}let D=!1;const R=i();if(typeof document<"u"&&R.length)for(const z of R){const V=z.enableBeforeUnload??!0;if(V===!0){D=!0;break}if(typeof V=="function"&&V()===!0){D=!0;break}}if(D)return I.preventDefault(),I.returnValue=""},T=xq({getLocation:y,getLength:()=>t.history.length,pushState:(I,D)=>k("push",I,D),replaceState:(I,D)=>k("replace",I,D),back:I=>(I&&(h=!0),m=!0,t.history.back()),forward:I=>{I&&(h=!0),m=!0,t.history.forward()},go:I=>{d=!0,t.history.go(I)},createHref:I=>o(I),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(m2,S,{capture:!0}),t.removeEventListener(h2,w)},onBlocked:()=>{l&&u!==l&&(u=l)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(m2,S,{capture:!0}),t.addEventListener(h2,w),t.history.pushState=function(...I){const D=n.apply(t.history,I);return T._ignoreSubscribers||v("PUSH"),D},t.history.replaceState=function(...I){const D=r.apply(t.history,I);return T._ignoreSubscribers||v("REPLACE"),D},T}function Iq(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function eb(e,t){const n=Iq(e),r=n.indexOf("#"),s=n.indexOf("?"),i=bx();return{href:n,pathname:n.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:n.length),hash:r>-1?n.substring(r):"",search:s>-1?n.slice(s,r===-1?void 0:r):"",state:t||{[go]:0,key:i,__TSR_key:i}}}function bx(){return(Math.random()+1).toString(36).substring(7)}const Aq=!1;function rh(e){let t;return vq(()=>{t=e()}),t}function Mh(e){return e[e.length-1]}function Cq(e){return typeof e=="function"}function co(e,t){return Cq(e)?e(t):e}const Pq=Object.prototype.hasOwnProperty,g2=Object.prototype.propertyIsEnumerable;function us(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,s=_2(e)&&_2(r);if(!s&&!(tb(e)&&tb(r)))return r;const i=s?e:b2(e);if(!i)return r;const a=s?r:b2(r);if(!a)return r;const o=i.length,c=a.length,u=s?new Array(c):{};let l=0;for(let d=0;d<c;d++){const f=s?d:a[d],h=e[f],m=r[f];if(h===m){u[f]=h,(s?d<o:Pq.call(e,f))&&l++;continue}if(h===null||m===null||typeof h!="object"||typeof m!="object"){u[f]=m;continue}const y=us(h,m,n+1);u[f]=y,y===h&&l++}return o===c&&l===o?e:u}function b2(e){const t=Object.getOwnPropertyNames(e);for(const s of t)if(!g2.call(e,s))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const s of n){if(!g2.call(e,s))return!1;r.push(s)}return r}function tb(e){if(!y2(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!y2(n)||!n.hasOwnProperty("isPrototypeOf"))}function y2(e){return Object.prototype.toString.call(e)==="[object Object]"}function _2(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function zc(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,s=e.length;r<s;r++)if(!zc(e[r],t[r],n))return!1;return!0}if(tb(e)&&tb(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in t)if((!r||t[a]!==void 0)&&!zc(e[a],t[a],n))return!1;return!0}let s=0;if(!r)s=Object.keys(e).length;else for(const a in e)e[a]!==void 0&&s++;let i=0;for(const a in t)if((!r||t[a]!==void 0)&&(i++,i>s||!zc(e[a],t[a],n)))return!1;return s===i}return!1}function ql(e){let t,n;const r=new Promise((s,i)=>{t=s,n=i});return r.status="pending",r.resolve=s=>{r.status="resolved",r.value=s,t(s),e?.(s)},r.reject=s=>{r.status="rejected",n(s)},r}function jh(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Nq(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function k2(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return Nq(t)}const Rq=["http:","https:","mailto:","tel:"];function nb(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function af(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",s;for(;(s=t.exec(e))!==null;)r+=k2(e.slice(n,s.index))+s[0],n=t.lastIndex;r=r+k2(n?e.slice(n):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function Oq(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}var Lq="Invariant failed";function Po(e,t){if(!e)throw new Error(Lq)}function rb(e){const t=new Map;let n,r;const s=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,n=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const a=t.get(i);if(a)return s(a),a.value},set(i,a){if(t.size>=e&&n){const c=n;t.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const o=t.get(i);if(o)o.value=a,s(o);else{const c={key:i,value:a,prev:r};r&&(r.next=c),r=c,n||(n=c),t.set(i,c)}},clear(){t.clear(),n=void 0,r=void 0}}}const Gl=0,tu=1,nu=2,Fh=3,Pc=4,p$=5;function Dq(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function yx(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),s=r===-1?e.length:r,i=e.substring(t,s);if(!i||!i.includes("$"))return n[0]=Gl,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n;if(i==="$"){const o=e.length;return n[0]=nu,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}if(i.charCodeAt(0)===36)return n[0]=tu,n[1]=t,n[2]=t+1,n[3]=s,n[4]=s,n[5]=s,n;const a=Dq(i);if(a){const[o,c]=a,u=i.charCodeAt(o+1);if(u===45){if(o+2<i.length&&i.charCodeAt(o+2)===36){const l=o+3,d=c;if(l<d)return n[0]=Fh,n[1]=t+o,n[2]=t+l,n[3]=t+d,n[4]=t+c+1,n[5]=s,n}}else if(u===36){const l=o+1,d=o+2;return d===c?(n[0]=nu,n[1]=t+o,n[2]=t+l,n[3]=t+d,n[4]=t+c+1,n[5]=e.length,n):(n[0]=tu,n[1]=t+o,n[2]=t+d,n[3]=t+c,n[4]=t+c+1,n[5]=s,n)}}return n[0]=Gl,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n}function Xy(e,t,n,r,s,i,a){a?.(n);let o=r;{const c=n.fullPath??n.from,u=c.length,l=n.options?.caseSensitive??e,d=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;o<u;){const h=yx(c,o,t);let m;const y=o,g=h[5];switch(o=g+1,i++,h[0]){case Gl:{const _=c.substring(h[2],h[3]);if(l){const k=s.static?.get(_);if(k)m=k;else{s.static??=new Map;const v=Nc(n.fullPath??n.from);v.parent=s,v.depth=i,m=v,s.static.set(_,v)}}else{const k=_.toLowerCase(),v=s.staticInsensitive?.get(k);if(v)m=v;else{s.staticInsensitive??=new Map;const w=Nc(n.fullPath??n.from);w.parent=s,w.depth=i,m=w,s.staticInsensitive.set(k,w)}}break}case tu:{const _=c.substring(y,h[1]),k=c.substring(h[4],g),v=l&&!!(_||k),w=_?v?_:_.toLowerCase():void 0,S=k?v?k:k.toLowerCase():void 0,T=!d&&s.dynamic?.find(I=>!I.skipOnParamError&&I.caseSensitive===v&&I.prefix===w&&I.suffix===S);if(T)m=T;else{const I=gk(tu,n.fullPath??n.from,v,w,S);m=I,I.depth=i,I.parent=s,s.dynamic??=[],s.dynamic.push(I)}break}case Fh:{const _=c.substring(y,h[1]),k=c.substring(h[4],g),v=l&&!!(_||k),w=_?v?_:_.toLowerCase():void 0,S=k?v?k:k.toLowerCase():void 0,T=!d&&s.optional?.find(I=>!I.skipOnParamError&&I.caseSensitive===v&&I.prefix===w&&I.suffix===S);if(T)m=T;else{const I=gk(Fh,n.fullPath??n.from,v,w,S);m=I,I.parent=s,I.depth=i,s.optional??=[],s.optional.push(I)}break}case nu:{const _=c.substring(y,h[1]),k=c.substring(h[4],g),v=l&&!!(_||k),w=_?v?_:_.toLowerCase():void 0,S=k?v?k:k.toLowerCase():void 0,T=gk(nu,n.fullPath??n.from,v,w,S);m=T,T.parent=s,T.depth=i,s.wildcard??=[],s.wildcard.push(T)}}s=m}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const h=Nc(n.fullPath??n.from);h.kind=p$,h.parent=s,i++,h.depth=i,s.pathless??=[],s.pathless.push(h),s=h}const f=(n.path||!n.children)&&!n.isRoot;if(f&&c.endsWith("/")){const h=Nc(n.fullPath??n.from);h.kind=Pc,h.parent=s,i++,h.depth=i,s.index=h,s=h}s.parse=n.options?.params?.parse??null,s.skipOnParamError=d,s.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,f&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const c of n.children)Xy(e,t,c,o,s,i,a)}function pk(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function io(e){if(e.pathless)for(const t of e.pathless)io(t);if(e.static)for(const t of e.static.values())io(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())io(t);if(e.dynamic?.length){e.dynamic.sort(pk);for(const t of e.dynamic)io(t)}if(e.optional?.length){e.optional.sort(pk);for(const t of e.optional)io(t)}if(e.wildcard?.length){e.wildcard.sort(pk);for(const t of e.wildcard)io(t)}}function Nc(e){return{kind:Gl,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function gk(e,t,n,r,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:s}}function $q(e,t){const n=Nc("/"),r=new Uint16Array(6);for(const s of e)Xy(!1,r,s,1,n,0);io(n),t.masksTree=n,t.flatCache=rb(1e3)}function Mq(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=_x(e,t.masksTree);return t.flatCache.set(e,r),r}function jq(e,t,n,r,s){e||="/",r||="/";const i=t?`case\0${e}`:e;let a=s.singleCache.get(i);if(!a){a=Nc("/");const o=new Uint16Array(6);Xy(t,o,{from:e},1,a,0),s.singleCache.set(i,a)}return _x(r,a,n)}function Fq(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,s=t.matchCache.get(r);if(s!==void 0)return s;e||="/";let i;try{i=_x(e,t.segmentTree,n)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=Uq(i.route)),t.matchCache.set(r,i),i}function Bq(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function zq(e,t=!1,n){const r=Nc(e.fullPath),s=new Uint16Array(6),i={},a={};let o=0;return Xy(t,s,e,1,r,0,u=>{if(n?.(u,o),Po(!(u.id in i),`Duplicate routes found with id: ${String(u.id)}`),i[u.id]=u,o!==0&&u.path){const l=Bq(u.fullPath);(!a[l]||u.fullPath.endsWith("/"))&&(a[l]=u)}o++}),io(r),{processedTree:{segmentTree:r,singleCache:rb(1e3),matchCache:rb(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function _x(e,t,n=!1){const r=e.split("/"),s=Hq(e,r,t,n);if(!s)return null;const[i]=g$(e,r,s);return{route:s.node.route,rawParams:i,parsedParams:s.parsedParams}}function g$(e,t,n){const r=Vq(n.node);let s=null;const i={};let a=n.extract?.part??0,o=n.extract?.node??0,c=n.extract?.path??0,u=n.extract?.segment??0;for(;o<r.length;a++,o++,c++,u++){const l=r[o];if(l.kind===Pc)break;if(l.kind===p$){u--,a--,c--;continue}const d=t[a],f=c;if(d&&(c+=d.length),l.kind===tu){s??=n.node.fullPath.split("/");const h=s[u],m=l.prefix?.length??0;if(h.charCodeAt(m)===123){const g=l.suffix?.length??0,p=h.substring(m+2,h.length-g-1),_=d.substring(m,d.length-g);i[p]=decodeURIComponent(_)}else{const g=h.substring(1);i[g]=decodeURIComponent(d)}}else if(l.kind===Fh){if(n.skipped&1<<o){a--,c=f-1;continue}s??=n.node.fullPath.split("/");const h=s[u],m=l.prefix?.length??0,y=l.suffix?.length??0,g=h.substring(m+3,h.length-y-1),p=l.suffix||l.prefix?d.substring(m,d.length-y):d;p&&(i[g]=decodeURIComponent(p))}else if(l.kind===nu){const h=l,m=e.substring(f+(h.prefix?.length??0),e.length-(h.suffix?.length??0)),y=decodeURIComponent(m);i["*"]=y,i._splat=y;break}}return n.rawParams&&Object.assign(i,n.rawParams),[i,{part:a,node:o,path:c,segment:u}]}function Uq(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Vq(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Hq(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const s=!Mh(t),i=s&&e!=="/",a=t.length-(s?1:0),o=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let c=null,u=null,l=null;for(;o.length;){const d=o.pop(),{node:f,index:h,skipped:m,depth:y,statics:g,dynamics:p,optionals:_}=d;let{extract:k,rawParams:v,parsedParams:w}=d;if(f.skipOnParamError){if(!bk(e,t,d))continue;v=d.rawParams,k=d.extract,w=d.parsedParams}r&&f.route&&f.kind!==Pc&&of(u,d)&&(u=d);const S=h===a;if(S&&(f.route&&!i&&of(l,d)&&(l=d),!f.optional&&!f.wildcard&&!f.index&&!f.pathless))continue;const T=S?void 0:t[h];let I;if(S&&f.index){const D={node:f.index,index:h,skipped:m,depth:y+1,statics:g,dynamics:p,optionals:_,extract:k,rawParams:v,parsedParams:w};let R=!0;if(f.index.skipOnParamError&&(bk(e,t,D)||(R=!1)),R){if(g===a&&!p&&!_&&!m)return D;of(l,D)&&(l=D)}}if(f.wildcard&&of(c,d))for(const D of f.wildcard){const{prefix:R,suffix:z}=D;if(R&&(S||!(D.caseSensitive?T:I??=T.toLowerCase()).startsWith(R)))continue;if(z){if(S)continue;const H=t.slice(h).join("/").slice(-z.length);if((D.caseSensitive?H:H.toLowerCase())!==z)continue}const V={node:D,index:a,skipped:m,depth:y,statics:g,dynamics:p,optionals:_,extract:k,rawParams:v,parsedParams:w};if(!(D.skipOnParamError&&!bk(e,t,V))){c=V;break}}if(f.optional){const D=m|1<<y,R=y+1;for(let z=f.optional.length-1;z>=0;z--){const V=f.optional[z];o.push({node:V,index:h,skipped:D,depth:R,statics:g,dynamics:p,optionals:_,extract:k,rawParams:v,parsedParams:w})}if(!S)for(let z=f.optional.length-1;z>=0;z--){const V=f.optional[z],{prefix:H,suffix:G}=V;if(H||G){const Q=V.caseSensitive?T:I??=T.toLowerCase();if(H&&!Q.startsWith(H)||G&&!Q.endsWith(G))continue}o.push({node:V,index:h+1,skipped:m,depth:R,statics:g,dynamics:p,optionals:_+1,extract:k,rawParams:v,parsedParams:w})}}if(!S&&f.dynamic&&T)for(let D=f.dynamic.length-1;D>=0;D--){const R=f.dynamic[D],{prefix:z,suffix:V}=R;if(z||V){const H=R.caseSensitive?T:I??=T.toLowerCase();if(z&&!H.startsWith(z)||V&&!H.endsWith(V))continue}o.push({node:R,index:h+1,skipped:m,depth:y+1,statics:g,dynamics:p+1,optionals:_,extract:k,rawParams:v,parsedParams:w})}if(!S&&f.staticInsensitive){const D=f.staticInsensitive.get(I??=T.toLowerCase());D&&o.push({node:D,index:h+1,skipped:m,depth:y+1,statics:g+1,dynamics:p,optionals:_,extract:k,rawParams:v,parsedParams:w})}if(!S&&f.static){const D=f.static.get(T);D&&o.push({node:D,index:h+1,skipped:m,depth:y+1,statics:g+1,dynamics:p,optionals:_,extract:k,rawParams:v,parsedParams:w})}if(f.pathless){const D=y+1;for(let R=f.pathless.length-1;R>=0;R--){const z=f.pathless[R];o.push({node:z,index:h,skipped:m,depth:D,statics:g,dynamics:p,optionals:_,extract:k,rawParams:v,parsedParams:w})}}}if(l&&c)return of(c,l)?l:c;if(l)return l;if(c)return c;if(r&&u){let d=u.index;for(let h=0;h<u.index;h++)d+=t[h].length;const f=d===e.length?"/":e.slice(d);return u.rawParams??={},u.rawParams["**"]=decodeURIComponent(f),u}return null}function bk(e,t,n){try{const[r,s]=g$(e,t,n);n.rawParams=r,n.extract=s;const i=n.node.parse(r);return n.parsedParams=Object.assign({},n.parsedParams,i),!0}catch{return null}}function of(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Pc)>(e.node.kind===Pc)||t.node.kind===Pc==(e.node.kind===Pc)&&t.depth>e.depth))):!0}function h0(e){return kx(e.filter(t=>t!==void 0).join("/"))}function kx(e){return e.replace(/\/{2,}/g,"/")}function b$(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function bo(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function y$(e){return bo(b$(e))}function sb(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function qq(e,t,n){return sb(e,n)===sb(t,n)}function Gq({base:e,to:t,trailingSlash:n="never",cache:r}){const s=t.startsWith("/"),i=!s&&t===".";let a;if(r){a=s?t:i?e:e+"\0"+t;const d=r.get(a);if(d)return d}let o;if(i)o=e.split("/");else if(s)o=t.split("/");else{for(o=e.split("/");o.length>1&&Mh(o)==="";)o.pop();const d=t.split("/");for(let f=0,h=d.length;f<h;f++){const m=d[f];m===""?f?f===h-1&&o.push(m):o=[m]:m===".."?o.pop():m==="."||o.push(m)}}o.length>1&&(Mh(o)===""?n==="never"&&o.pop():n==="always"&&o.push(""));let c,u="";for(let d=0;d<o.length;d++){d>0&&(u+="/");const f=o[d];if(!f)continue;c=yx(f,0,c);const h=c[0];if(h===Gl){u+=f;continue}const m=c[5],y=f.substring(0,c[1]),g=f.substring(c[4],m),p=f.substring(c[2],c[3]);h===tu?u+=y||g?`${y}{$${p}}${g}`:`$${p}`:h===nu?u+=y||g?`${y}{$}${g}`:"$":u+=`${y}{-$${p}}${g}`}u=kx(u);const l=u||"/";return a&&r&&r.set(a,l),l}function Kq(e){const t=new Map(e.map(s=>[encodeURIComponent(s),s])),n=Array.from(t.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return s=>s.replace(r,i=>t.get(i)??i)}function yk(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>w2(s,n)).join("/"):w2(r,n)}function E2({path:e,params:t,decoder:n,...r}){let s=!1;const i={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:s};const a=e.length;let o=0,c,u="";for(;o<a;){const d=o;c=yx(e,d,c);const f=c[5];if(o=f+1,d===f)continue;const h=c[0];if(h===Gl){u+="/"+e.substring(d,f);continue}if(h===nu){const m=t._splat;i._splat=m,i["*"]=m;const y=e.substring(d,c[1]),g=e.substring(c[4],f);if(!m){s=!0,(y||g)&&(u+="/"+y+g);continue}const p=yk("_splat",t,n);u+="/"+y+p+g;continue}if(h===tu){const m=e.substring(c[2],c[3]);!s&&!(m in t)&&(s=!0),i[m]=t[m];const y=e.substring(d,c[1]),g=e.substring(c[4],f),p=yk(m,t,n)??"undefined";u+="/"+y+p+g;continue}if(h===Fh){const m=e.substring(c[2],c[3]),y=t[m];if(y==null)continue;i[m]=y;const g=e.substring(d,c[1]),p=e.substring(c[4],f),_=yk(m,t,n)??"";u+="/"+g+_+p;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:i,interpolatedPath:u||"/",isMissingParams:s}}function w2(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function Yr(e){return!!e?.isNotFound}function Wq(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Nw="tsr-scroll-restoration-v1_3",Jq=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function Yq(){const e=Wq();if(!e)return null;const t=e.getItem(Nw);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=co(r,n)||n;try{e.setItem(Nw,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const Rp=Yq(),Qq=e=>e.state.__TSR_key||e.href;function Xq(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let ib=!1;function Zq({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:s,location:i}){let a;try{a=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(u){console.error(u);return}const o=t||window.history.state?.__TSR_key,c=a[o];ib=!0;e:{if(r&&c&&Object.keys(c).length>0){for(const d in c){const f=c[d];if(d==="window")window.scrollTo({top:f.scrollY,left:f.scrollX,behavior:n});else if(d){const h=document.querySelector(d);h&&(h.scrollLeft=f.scrollX,h.scrollTop=f.scrollY)}}break e}const u=(i??window.location).hash.split("#",2)[1];if(u){const d=window.history.state?.__hashScrollIntoViewOptions??!0;if(d){const f=document.getElementById(u);f&&f.scrollIntoView(d)}break e}const l={top:0,left:0,behavior:n};if(window.scrollTo(l),s)for(const d of s){if(d==="window")continue;const f=typeof d=="function"?d():document.querySelector(d);f&&f.scrollTo(l)}}ib=!1}function eG(e,t){if(!Rp||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!Rp))return;e.isScrollRestorationSetup=!0,ib=!1;const r=e.options.getScrollRestorationKey||Qq;window.history.scrollRestoration="manual";const s=i=>{if(ib||!e.isScrollRestoring)return;let a="";if(i.target===document||i.target===window)a="window";else{const c=i.target.getAttribute("data-scroll-restoration-id");c?a=`[data-scroll-restoration-id="${c}"]`:a=Xq(i.target)}const o=r(e.state.location);Rp.set(c=>{const u=c[o]||={},l=u[a]||={};if(a==="window")l.scrollX=window.scrollX||0,l.scrollY=window.scrollY||0;else if(a){const d=document.querySelector(a);d&&(l.scrollX=d.scrollLeft||0,l.scrollY=d.scrollTop||0)}return c})};typeof document<"u"&&document.addEventListener("scroll",Jq(s,100),!0),e.subscribe("onRendered",i=>{const a=r(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(Zq({storageKey:Nw,key:a,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Rp.set(o=>(o[a]||={},o)))})}function tG(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function nG(e,t=String){const n=new URLSearchParams;for(const r in e){const s=e[r];s!==void 0&&n.set(r,t(s))}return n.toString()}function _k(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function rG(e){const t=new URLSearchParams(e),n={};for(const[r,s]of t.entries()){const i=n[r];i==null?n[r]=_k(s):Array.isArray(i)?i.push(_k(s)):n[r]=[i,_k(s)]}return n}const sG=aG(JSON.parse),iG=oG(JSON.stringify,JSON.parse);function aG(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=rG(t);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=e(s)}catch{}}return n}}function oG(e,t){const n=typeof t=="function";function r(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(n&&typeof s=="string")try{return t(s),e(s)}catch{}return s}return s=>{const i=nG(s,r);return i?`?${i}`:""}}const Ps="__root__";function cG(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function ms(e){return e instanceof Response&&!!e.options}const Rw=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Zy=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Pl=(e,t,n=!0)=>{const r={...e.router.options.context??{}},s=n?t:t-1;for(let i=0;i<=s;i++){const a=e.matches[i];if(!a)continue;const o=e.router.getMatch(a.id);o&&Object.assign(r,o.__routeContext,o.__beforeLoadContext)}return r},S2=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(a=>a.routeId===e.router.routeTree.id),s=r>=0?r:0;let i=n?e.matches.findIndex(a=>a.routeId===n):e.firstBadMatchIndex??e.matches.length-1;i<0&&(i=s);for(let a=i;a>=0;a--){const o=e.matches[a];if(e.router.looseRoutesById[o.routeId].options.notFoundComponent)return a}return n?i:s},uo=(e,t,n)=>{if(!(!ms(n)&&!Yr(n)))throw ms(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:ms(n)?"redirected":r.status==="pending"?"success":r.status,context:Pl(e,t.index),isFetching:!1,error:n})),Yr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),ms(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},_$=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,cf=(e,t,n,r)=>{const{id:s,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,uo(e,e.router.getMatch(s),n);try{a.options.onError?.(n)}catch(o){n=o,uo(e,e.router.getMatch(s),n)}e.updateMatch(s,o=>(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loadPromise?.resolve(),{...o,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!ms(n)&&!Yr(n)&&(e.serialError??=n)},k$=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Zy(e,t)&&(n.options.loader||n.options.beforeLoad||w$(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const a=setTimeout(()=>{Rw(e)},s);r._nonReactive.pendingTimeout=a}},uG=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;k$(e,t,n,r);const s=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&uo(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(s):s()},lG=(e,t,n,r)=>{const s=e.router.getMatch(t),i=s._nonReactive.loadPromise;s._nonReactive.loadPromise=ql(()=>{i?.resolve()});const{paramsError:a,searchError:o}=s;a&&cf(e,n,a,"PARSE_PARAMS"),o&&cf(e,n,o,"VALIDATE_SEARCH"),k$(e,t,r,s);const c=new AbortController;let u=!1;const l=()=>{u||(u=!0,e.updateMatch(t,v=>({...v,isFetching:"beforeLoad",fetchCount:v.fetchCount+1,abortController:c})))},d=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,v=>({...v,isFetching:!1}))};if(!r.options.beforeLoad){rh(()=>{l(),d()});return}s._nonReactive.beforeLoadPromise=ql();const f={...Pl(e,n,!1),...s.__routeContext},{search:h,params:m,cause:y}=s,g=Zy(e,t),p={search:h,abortController:c,params:m,preload:g,context:f,location:e.location,navigate:v=>e.router.navigate({...v,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:g?"preload":y,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},_=v=>{if(v===void 0){rh(()=>{l(),d()});return}(ms(v)||Yr(v))&&(l(),cf(e,n,v,"BEFORE_LOAD")),rh(()=>{l(),e.updateMatch(t,w=>({...w,__beforeLoadContext:v})),d()})};let k;try{if(k=r.options.beforeLoad(p),jh(k))return l(),k.catch(v=>{cf(e,n,v,"BEFORE_LOAD")}).then(_)}catch(v){l(),cf(e,n,v,"BEFORE_LOAD")}_(k)},dG=(e,t)=>{const{id:n,routeId:r}=e.matches[t],s=e.router.looseRoutesById[r],i=()=>o(),a=()=>lG(e,n,t,s),o=()=>{if(_$(e,n))return;const c=uG(e,n,s);return jh(c)?c.then(a):a()};return i()},fG=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(s),n.options.scripts?.(s),n.options.headers?.(s)]).then(([i,a,o])=>{const c=i?.meta,u=i?.links,l=i?.scripts,d=i?.styles;return{meta:c,links:u,headScripts:l,headers:o,scripts:a,styles:d}})},E$=(e,t,n,r,s)=>{const i=t[r-1],{params:a,loaderDeps:o,abortController:c,cause:u}=e.router.getMatch(n),l=Pl(e,r),d=Zy(e,n);return{params:a,deps:o,preload:!!d,parentMatchPromise:i,abortController:c,context:l,location:e.location,navigate:f=>e.router.navigate({...f,_fromLocation:e.location}),cause:d?"preload":u,route:s,...e.router.options.additionalContext}},v2=async(e,t,n,r,s)=>{try{const i=e.router.getMatch(n);try{(!(Aq??e.router.isServer)||i.ssr===!0)&&ab(s);const a=s.options.loader?.(E$(e,t,n,r,s)),o=s.options.loader&&jh(a);if((o||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(n,l=>({...l,isFetching:"loader"})),s.options.loader){const l=o?await a:a;uo(e,e.router.getMatch(n),l),l!==void 0&&e.updateMatch(n,d=>({...d,loaderData:l}))}s._lazyPromise&&await s._lazyPromise;const u=i._nonReactive.minPendingPromise;u&&await u,s._componentsPromise&&await s._componentsPromise,e.updateMatch(n,l=>({...l,error:void 0,context:Pl(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let o=a;if(o?.name==="AbortError"){if(i.abortController.signal.aborted){i._nonReactive.loaderPromise?.resolve(),i._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,u=>({...u,status:u.status==="pending"?"success":u.status,isFetching:!1,context:Pl(e,r)}));return}const c=i._nonReactive.minPendingPromise;c&&await c,Yr(a)&&await s.options.notFoundComponent?.preload?.(),uo(e,e.router.getMatch(n),a);try{s.options.onError?.(a)}catch(u){o=u,uo(e,e.router.getMatch(n),u)}e.updateMatch(n,u=>({...u,error:o,context:Pl(e,r),status:"error",isFetching:!1}))}}catch(i){const a=e.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),uo(e,a,i)}},hG=async(e,t,n)=>{async function r(d,f,h,m){const y=Date.now()-f.updatedAt,g=d?m.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:m.options.staleTime??e.router.options.defaultStaleTime??0,p=m.options.shouldReload,_=typeof p=="function"?p(E$(e,t,s,n,m)):p,{status:k,invalid:v}=h;a=k==="success"&&(v||(_??y>g)),d&&m.options.preload===!1||(a&&!e.sync?(o=!0,(async()=>{try{await v2(e,t,s,n,m);const w=e.router.getMatch(s);w._nonReactive.loaderPromise?.resolve(),w._nonReactive.loadPromise?.resolve(),w._nonReactive.loaderPromise=void 0}catch(w){ms(w)&&await e.router.navigate(w.options)}})()):(k!=="success"||a&&e.sync)&&await v2(e,t,s,n,m))}const{id:s,routeId:i}=e.matches[n];let a=!1,o=!1;const c=e.router.looseRoutesById[i];if(!_$(e,s)){const d=e.router.getMatch(s),f=Zy(e,s);if(d._nonReactive.loaderPromise){if(d.status==="success"&&!e.sync&&!d.preload)return d;await d._nonReactive.loaderPromise;const h=e.router.getMatch(s),m=h._nonReactive.error||h.error;m&&uo(e,h,m),h.status==="pending"&&await r(f,d,h,c)}else{const h=f&&!e.router.state.matches.some(y=>y.id===s),m=e.router.getMatch(s);m._nonReactive.loaderPromise=ql(),h!==m.preload&&e.updateMatch(s,y=>({...y,preload:h})),await r(f,d,m,c)}}const u=e.router.getMatch(s);o||(u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loadPromise?.resolve()),clearTimeout(u._nonReactive.pendingTimeout),u._nonReactive.pendingTimeout=void 0,o||(u._nonReactive.loaderPromise=void 0),u._nonReactive.dehydrated=void 0;const l=o?u.isFetching:!1;return l!==u.isFetching||u.invalid!==!1?(e.updateMatch(s,d=>({...d,isFetching:l,invalid:!1})),e.router.getMatch(s)):u};async function x2(e){const t=e,n=[];t.router.state.matches.some(f=>f._forcePending)&&Rw(t);let r;for(let f=0;f<t.matches.length;f++){try{const h=dG(t,f);jh(h)&&await h}catch(h){if(ms(h))throw h;if(Yr(h))r=h;else if(!t.preload)throw h;break}if(t.serialError)break}const s=t.firstBadMatchIndex??t.matches.length,i=r&&!t.preload?S2(t,r):void 0,a=r&&t.preload?0:i!==void 0?Math.min(i+1,s):s;let o,c;for(let f=0;f<a;f++)n.push(hG(t,n,f));try{await Promise.all(n)}catch{const f=await Promise.allSettled(n);for(const h of f){if(h.status!=="rejected")continue;const m=h.reason;if(ms(m))throw m;Yr(m)?o??=m:c??=m}if(c!==void 0)throw c}const u=o??(r&&!t.preload?r:void 0);let l=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!u&&r&&t.preload)return t.matches;if(u){const f=S2(t,u);Po(f!==void 0);const h=t.matches[f],m=t.router.looseRoutesById[h.routeId],y=t.router.options?.defaultNotFoundComponent;!m.options.notFoundComponent&&y&&(m.options.notFoundComponent=y),u.routeId=h.routeId;const g=h.routeId===t.router.routeTree.id;t.updateMatch(h.id,p=>({...p,...g?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:u},isFetching:!1})),l=f,await ab(m)}else if(!t.preload){const f=t.matches[0];f.globalNotFound||t.router.getMatch(f.id)?.globalNotFound&&t.updateMatch(f.id,m=>({...m,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const f=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await ab(f)}for(let f=0;f<=l;f++){const h=t.matches[f],{id:m,routeId:y}=h,g=t.router.looseRoutesById[y];try{const p=fG(t,m,g);if(p){const _=await p;t.updateMatch(m,k=>({...k,..._}))}}catch(p){console.error(`Error executing head for route ${y}:`,p)}}const d=Rw(t);if(jh(d)&&await d,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}async function ab(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of S$){const s=e.options[r]?.preload;s&&n.push(s())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function w$(e){for(const t of S$)if(e.options[t]?.preload)return!0;return!1}const S$=["component","errorComponent","pendingComponent","notFoundComponent"];function mG(e){return{input:({url:t})=>{for(const n of e)t=Ow(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=v$(e[n],t);return t}}}function pG(e){const t=y$(e.basepath),n=`/${t}`,r=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:a})=>{const o=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return o===s?a.pathname="/":o.startsWith(i)&&(a.pathname=a.pathname.slice(n.length)),a},output:({url:a})=>(a.pathname=h0(["/",t,a.pathname]),a)}}function Ow(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function v$(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Uc(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,s=t?.href!==n.href,i=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:s,hashChanged:i}}function gG(e){const t=e.filter(n=>n.status!=="redirected");return t.length===e.length?e:t}class bG{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{const r=this.options,s=this.basepath??r?.basepath??"/",i=this.basepath===void 0,a=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Kq(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Tq()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let f;this.resolvePathCache=rb(1e3),f=this.buildRouteTree(),this.setRoutes(f)}!this.__store&&this.latestLocation&&(this.__store=Sq(_G(this.latestLocation)),eG(this));let o=!1;const c=this.options.basepath??"/",u=this.options.rewrite;if(i||s!==c||a!==u){this.basepath=c;const f=[],h=y$(c);h&&h!=="/"&&f.push(pG({basepath:c})),u&&f.push(u),this.rewrite=f.length===0?void 0:f.length===1?f[0]:mG(f),this.history&&this.updateLatestLocation(),o=!0}o&&this.__store&&this.__store.setState(f=>({...f,location:this.latestLocation})),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=zq(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&$q(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const s={eventType:n,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const s=({pathname:c,search:u,hash:l,href:d,state:f})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const _=this.options.parseSearch(u),k=this.options.stringifySearch(_);return{href:c+k+l,publicHref:d,pathname:af(c).path,external:!1,searchStr:k,search:us(r?.search,_),hash:af(l.slice(1)).path,state:us(r?.state,f)}}const h=new URL(d,this.origin),m=Ow(this.rewrite,h),y=this.options.parseSearch(m.search),g=this.options.stringifySearch(y);return m.search=g,{href:m.href.replace(m.origin,""),publicHref:d,pathname:af(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:g,search:us(r?.search,y),hash:af(m.hash.slice(1)).path,state:us(r?.state,f)}},i=s(n),{__tempLocation:a,__tempKey:o}=i.state;if(a&&(!o||o===this.tempLocationKey)){const c=s(a);return c.state.key=i.state.key,c.state.__TSR_key=i.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:i}}return i},this.resolvePathWithBase=(n,r)=>Gq({base:n,to:kx(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},s):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>kG({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(i=>i.status==="pending"),r=this.state.matches.filter(i=>i.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=n=>{const r=(i={})=>{const a=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,o=this.matchRoutesLightweight(a);i.from;const c=i.unsafeRelative==="path"?a.pathname:i.from??o.fullPath,u=this.resolvePathWithBase(c,"."),l=o.search,d={...o.params},f=i.to?this.resolvePathWithBase(u,`${i.to}`):this.resolvePathWithBase(u,"."),h=i.params===!1||i.params===null?{}:(i.params??!0)===!0?d:Object.assign(d,co(i.params,d)),m=this.getMatchedRoutes(f);let y=m.matchedRoutes;if((!m.foundRoute||m.foundRoute.path!=="/"&&m.routeParams["**"])&&this.options.notFoundRoute&&(y=[...y,this.options.notFoundRoute]),Object.keys(h).length>0)for(const z of y){const V=z.options.params?.stringify??z.options.stringifyParams;if(V)try{Object.assign(h,V(h))}catch{}}const p=n.leaveParams?f:af(E2({path:f,params:h,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let _=l;if(n._includeValidateSearch&&this.options.search?.strict){const z={};y.forEach(V=>{if(V.options.validateSearch)try{Object.assign(z,m0(V.options.validateSearch,{...z,..._}))}catch{}}),_=z}_=EG({search:_,dest:i,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),_=us(l,_);const k=this.options.stringifySearch(_),v=i.hash===!0?a.hash:i.hash?co(i.hash,a.hash):void 0,w=v?`#${v}`:"";let S=i.state===!0?a.state:i.state?co(i.state,a.state):{};S=us(a.state,S);const T=`${p}${k}${w}`;let I,D,R=!1;if(this.rewrite){const z=new URL(T,this.origin),V=v$(this.rewrite,z);I=z.href.replace(z.origin,""),V.origin!==this.origin?(D=V.href,R=!0):D=V.pathname+V.search+V.hash}else I=Oq(T),D=I;return{publicHref:D,href:I,pathname:p,search:_,searchStr:k,state:S,hash:v??"",external:R,unmaskOnReload:i.unmaskOnReload}},s=(i={},a)=>{const o=r(i);let c=a?r(a):void 0;if(!c){const u={};if(this.options.routeMasks){const l=Mq(o.pathname,this.processedTree);if(l){Object.assign(u,l.rawParams);const{from:d,params:f,...h}=l.route,m=f===!1||f===null?{}:(f??!0)===!0?u:Object.assign(u,co(f,u));a={from:n.from,...h,params:m},c=r(a)}}}return c&&(o.maskedLocation=c),o};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...s})=>{const i=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(l=>{s.state[l]=this.latestLocation.state[l]});const u=zc(s.state,this.latestLocation.state);return c.forEach(l=>{delete s.state[l]}),u},a=bo(this.latestLocation.href)===bo(s.href),o=this.commitLocationPromise;if(this.commitLocationPromise=ql(()=>{o?.resolve()}),a&&i())this.load();else{let{maskedLocation:c,hashScrollIntoView:u,...l}=s;c&&(l={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...l,search:l.searchStr,state:{...l.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(l.unmaskOnReload??this.options.unmaskOnReload??!1)&&(l.state.__tempKey=this.tempLocationKey)),l.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[s.replace?"replace":"push"](l.publicHref,l.state,{ignoreBlocker:r})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:s,viewTransition:i,ignoreBlocker:a,href:o,...c}={})=>{if(o){const d=this.history.location.state.__TSR_index,f=eb(o,{__TSR_index:n?d:d+1}),h=new URL(f.pathname,this.origin),m=Ow(this.rewrite,h);c.to=m.pathname,c.search=this.options.parseSearch(f.search),c.hash=f.hash.slice(1)}const u=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const l=this.commitLocation({...u,viewTransition:i,replace:n,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),l},this.navigate=async({to:n,reloadDocument:r,href:s,publicHref:i,...a})=>{let o=!1;if(s)try{new URL(`${s}`),o=!0}catch{}if(o&&!r&&(r=!0),r){if(n!==void 0||!s){const u=this.buildLocation({to:n,...a});s=s??u.publicHref,i=i??u.publicHref}const c=!o&&i?i:s;if(nb(c,this.protocolAllowlist))return Promise.resolve();if(!a.ignoreBlocker){const l=this.history.getBlockers?.()??[];for(const d of l)if(d?.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return a.replace?window.location.replace(c):window.location.href=c,Promise.resolve()}return this.buildAndCommitLocation({...a,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(s=>!n.some(i=>i.id===s.id))}))},this.load=async n=>{let r,s,i;for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad();const c=this.latestLocation,u=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Uc({resolvedLocation:u,location:c})}),this.emit({type:"onBeforeLoad",...Uc({resolvedLocation:u,location:c})}),await x2({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let l=[],d=[],f=[],h=[];rh(()=>{this.__store.setState(m=>{const y=m.matches,g=m.pendingMatches||m.matches;return l=y.filter(p=>!g.some(_=>_.id===p.id)),d=y.filter(p=>!g.some(_=>_.routeId===p.routeId)),f=g.filter(p=>!y.some(_=>_.routeId===p.routeId)),h=g.filter(p=>y.some(_=>_.routeId===p.routeId)),{...m,isLoading:!1,loadedAt:Date.now(),matches:g,pendingMatches:void 0,cachedMatches:[...m.cachedMatches,...l.filter(p=>p.status!=="error"&&p.status!=="notFound"&&p.status!=="redirected")]}}),this.clearExpiredCache()}),[[d,"onLeave"],[f,"onEnter"],[h,"onStay"]].forEach(([m,y])=>{m.forEach(g=>{this.looseRoutesById[g.routeId].options[y]?.(g)})})})})}})}catch(c){ms(c)?(r=c,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Yr(c)&&(s=c),this.__store.setState(u=>({...u,statusCode:r?r.status:s?404:u.matches.some(l=>l.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.__store.state.matches.some(o=>o.status==="error")&&(a=500),a!==void 0&&this.__store.setState(o=>({...o,statusCode:a}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,a=this.state.resolvedLocation,o=typeof r.types=="function"?r.types(Uc({resolvedLocation:a,location:i})):r.types;if(o===!1){n();return}s={update:n,types:o}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const s=this.state.pendingMatches?.some(i=>i.id===n)?"pendingMatches":this.state.matches.some(i=>i.id===n)?"matches":this.state.cachedMatches.some(i=>i.id===n)?"cachedMatches":"";s&&(s==="cachedMatches"?this.__store.setState(i=>({...i,cachedMatches:gG(i.cachedMatches.map(a=>a.id===n?r(a):a))})):this.__store.setState(i=>({...i,[s]:i[s]?.map(a=>a.id===n?r(a):a)})))})},this.getMatch=n=>{const r=s=>s.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=s=>n?.filter?.(s)??!0?{...s,invalid:!0,...n?.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s;return this.__store.setState(s=>({...s,matches:s.matches.map(r),cachedMatches:s.cachedMatches.map(r),pendingMatches:s.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const s=n.options._builtLocation??this.buildLocation(n.options),i=this.getParsedLocationHref(s);n.options.href=i,n.headers.set("Location",i)}else if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const i=s.pathname+s.search+s.hash;n.options.href=i,n.headers.set("Location",i)}}catch{}if(n.options.href&&!n.options._builtLocation&&nb(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(s=>({...s,cachedMatches:s.cachedMatches.filter(i=>!r(i))})):this.__store.setState(s=>({...s,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const s=this.looseRoutesById[r.routeId];if(!s.options.loader)return!0;const i=(r.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=i};this.clearCache({filter:n})},this.loadRouteChunk=ab,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let s=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(o=>o.id)),a=new Set([...i,...this.state.cachedMatches.map(o=>o.id)]);rh(()=>{s.forEach(o=>{a.has(o.id)||this.__store.setState(c=>({...c,cachedMatches:[...c.cachedMatches,o]}))})});try{return s=await x2({router:this,matches:s,location:r,preload:!0,updateMatch:(o,c)=>{i.has(o)?s=s.map(u=>u.id===o?c(u):u):this.updateMatch(o,c)}}),s}catch(o){if(ms(o))return o.options.reloadDocument?void 0:await this.preloadRoute({...o.options,_fromLocation:r});Yr(o)||console.error(o);return}},this.matchRoute=(n,r)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},i=this.buildLocation(s);if(r?.pending&&this.state.status!=="pending")return!1;const o=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,c=jq(i.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,o.pathname,this.processedTree);return!c||n.params&&!zc(c.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?zc(o.search,i.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??iG,parseSearch:t.parseSearch??sG,protocolAllowlist:t.protocolAllowlist??Rq}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:n,processedTree:r}){this.routesById=t,this.routesByPath=n,this.processedTree=r;const s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:s,routeParams:i,parsedParams:a}=r;let{matchedRoutes:o}=r,c=!1;(s?s.path!=="/"&&i["**"]:bo(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:c=!0);const u=c?SG(this.options.notFoundMode,o):void 0,l=new Array(o.length),d=new Map(this.state.matches.map(f=>[f.routeId,f]));for(let f=0;f<o.length;f++){const h=o[f],m=l[f-1];let y,g,p;{const G=m?.search??t.search,Q=m?._strictSearch??void 0;try{const ne=m0(h.options.validateSearch,{...G})??void 0;y={...G,...ne},g={...Q,...ne},p=void 0}catch(ne){let me=ne;if(ne instanceof ob||(me=new ob(ne.message,{cause:ne})),n?.throwOnError)throw me;y=G,g={},p=me}}const _=h.options.loaderDeps?.({search:y})??"",k=_?JSON.stringify(_):"",{interpolatedPath:v,usedParams:w}=E2({path:h.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),S=h.id+v+k,T=this.getMatch(S),I=d.get(h.id),D=T?._strictParams??w;let R;if(!T)try{T2(h,w,a,D)}catch(G){if(Yr(G)||ms(G)?R=G:R=new yG(G.message,{cause:G}),n?.throwOnError)throw R}Object.assign(i,D);const z=I?"stay":"enter";let V;if(T)V={...T,cause:z,params:I?.params??i,_strictParams:D,search:us(I?I.search:T.search,y),_strictSearch:g};else{const G=h.options.loader||h.options.beforeLoad||h.lazyFn||w$(h)?"pending":"success";V={id:S,ssr:h.options.ssr,index:f,routeId:h.id,params:I?.params??i,_strictParams:D,pathname:v,updatedAt:Date.now(),search:I?us(I.search,y):y,_strictSearch:g,searchError:void 0,status:G,isFetching:!1,error:void 0,paramsError:R,__routeContext:void 0,_nonReactive:{loadPromise:ql()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:z,loaderDeps:I?us(I.loaderDeps,_):_,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},fullPath:h.fullPath}}n?.preload||(V.globalNotFound=u===h.id),V.searchError=p;const H=this.getParentContext(m);V.context={...H,...V.__routeContext,...V.__beforeLoadContext},l[f]=V}for(let f=0;f<l.length;f++){const h=l[f],m=this.looseRoutesById[h.routeId],y=this.getMatch(h.id),g=d.get(h.routeId);if(h.params=g?us(g.params,i):i,!y){const p=l[f-1],_=this.getParentContext(p);if(m.options.context){const k={deps:h.loaderDeps,params:h.params,context:_??{},location:t,navigate:v=>this.navigate({...v,_fromLocation:t}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:l,routeId:m.id};h.__routeContext=m.options.context(k)??void 0}h.context={..._,...h.__routeContext,...h.__beforeLoadContext}}}return l}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:r,parsedParams:s}=this.getMatchedRoutes(t.pathname),i=Mh(n),a={...t.search};for(const l of n)try{Object.assign(a,m0(l.options.validateSearch,a))}catch{}const o=Mh(this.state.matches),c=o&&o.routeId===i.id&&t.pathname===this.state.location.pathname;let u;if(c)u=o.params;else{const l={...r};for(const d of n)try{T2(d,r,s??{},l)}catch{}u=l}return{matchedRoutes:n,fullPath:i.fullPath,search:a,params:u}}}class ob extends Error{}class yG extends Error{}function _G(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function m0(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new ob("Async validation not supported");if(n.issues)throw new ob(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function kG({pathname:e,routesById:t,processedTree:n}){const r={},s=bo(e);let i,a;const o=Fq(s,n,!0);return o&&(i=o.route,Object.assign(r,o.rawParams),a=Object.assign({},o.parsedParams)),{matchedRoutes:o?.branch||[t[Ps]],routeParams:r,foundRoute:i,parsedParams:a}}function EG({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return wG(n)(e,t,r??!1)}function wG(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const s of e){if("search"in s.options)s.options.search?.middlewares&&t.middlewares.push(...s.options.search.middlewares);else if(s.options.preSearchFilters||s.options.postSearchFilters){const i=({search:a,next:o})=>{let c=a;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(c=s.options.preSearchFilters.reduce((l,d)=>d(l),a));const u=o(c);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((l,d)=>d(l),u):u};t.middlewares.push(i)}if(s.options.validateSearch){const i=({search:a,next:o})=>{const c=o(a);if(!t._includeValidateSearch)return c;try{return{...c,...m0(s.options.validateSearch,c)??void 0}}catch{return c}};t.middlewares.push(i)}}const n=({search:s})=>{const i=t.dest;return i.search?i.search===!0?s:co(i.search,s):{}};t.middlewares.push(n);const r=(s,i,a)=>{if(s>=a.length)return i;const o=a[s];return o({search:i,next:u=>r(s+1,u,a)})};return function(i,a,o){return t.dest=a,t._includeValidateSearch=o,r(0,i,t.middlewares)}}function SG(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return Ps}function T2(e,t,n,r){const s=e.options.params?.parse??e.options.parseParams;if(s)if(e.options.skipRouteOnParseError)for(const i in t)i in n&&(r[i]=n[i]);else{const i=s(r);Object.assign(r,i)}}const vG="Error preloading route! ☝️";class x${constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,s=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=Ps:this.parentRoute||Po(!1);let i=s?Ps:r?.path;i&&i!=="/"&&(i=b$(i));const a=r?.id||i;let o=s?Ps:h0([this.parentRoute.id===Ps?"":this.parentRoute.id,a]);i===Ps&&(i="/"),o!==Ps&&(o=h0(["/",o]));const c=o===Ps?"/":h0([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=c,this._to=bo(c)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>cG({from:this.fullPath,...n}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class xG extends x${constructor(t){super(t)}}const Op=typeof window<"u"?O.useLayoutEffect:O.useEffect;function kk(e){const t=O.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function TG(e,t,n={},r={}){O.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([i])=>{t(i)},n);return s.observe(e.current),()=>{s.disconnect()}},[t,n,r.disabled,e])}function IG(e){const t=O.useRef(null);return O.useImperativeHandle(e,()=>t.current,[]),t}function Ex(e){const t=e.errorComponent??wx;return b.jsx(AG,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?O.createElement(t,{error:n,reset:r}):e.children})}class AG extends O.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function wx({error:e}){const[t,n]=O.useState(!1);return b.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[b.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),b.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),b.jsx("div",{style:{height:".25rem"}}),t?b.jsx("div",{children:b.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?b.jsx("code",{children:e.message}):null})}):null]})}function CG({children:e,fallback:t=null}){return T$()?b.jsx($h.Fragment,{children:e}):b.jsx($h.Fragment,{children:t})}function T$(){return $h.useSyncExternalStore(PG,()=>!0,()=>!1)}function PG(){return()=>{}}var Ek={exports:{}},wk={},Sk={exports:{}},vk={};var I2;function NG(){if(I2)return vk;I2=1;var e=mx();function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function o(d,f){var h=f(),m=r({inst:{value:h,getSnapshot:f}}),y=m[0].inst,g=m[1];return i(function(){y.value=h,y.getSnapshot=f,c(y)&&g({inst:y})},[d,h,f]),s(function(){return c(y)&&g({inst:y}),d(function(){c(y)&&g({inst:y})})},[d]),a(h),h}function c(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function u(d,f){return f()}var l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return vk.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:l,vk}var A2;function RG(){return A2||(A2=1,Sk.exports=NG()),Sk.exports}var C2;function OG(){if(C2)return wk;C2=1;var e=mx(),t=RG();function n(u,l){return u===l&&(u!==0||1/u===1/l)||u!==u&&l!==l}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,c=e.useDebugValue;return wk.useSyncExternalStoreWithSelector=function(u,l,d,f,h){var m=i(null);if(m.current===null){var y={hasValue:!1,value:null};m.current=y}else y=m.current;m=o(function(){function p(S){if(!_){if(_=!0,k=S,S=f(S),h!==void 0&&y.hasValue){var T=y.value;if(h(T,S))return v=T}return v=S}if(T=v,r(k,S))return T;var I=f(S);return h!==void 0&&h(T,I)?(k=S,T):(k=S,v=I)}var _=!1,k,v,w=d===void 0?null:d;return[function(){return p(l())},w===null?void 0:function(){return p(w())}]},[l,d,f,h]);var g=s(u,m[0],m[1]);return a(function(){y.hasValue=!0,y.value=g},[g]),c(g),g},wk}var P2;function LG(){return P2||(P2=1,Ek.exports=OG()),Ek.exports}var DG=LG();function $G(e,t){return e===t}function MG(e,t,n=$G){const r=O.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:o}=e.subscribe(a);return o},[e]),s=O.useCallback(()=>e?.get(),[e]);return DG.useSyncExternalStoreWithSelector(r,s,s,t,n)}const I$=O.createContext(null);function ws(e){const t=O.useContext(I$);return e?.warn,t}function ps(e){const t=ws({warn:e?.router===void 0}),n=e?.router||t,r=O.useRef(void 0);return MG(n.__store,s=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=us(r.current,e.select(s));return r.current=i,i}return e.select(s)}return s})}const e_=O.createContext(void 0),jG=O.createContext(void 0);function Qi(e){const t=O.useContext(e.from?jG:e_);return ps({select:r=>{const s=r.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(Po(!((e.shouldThrow??!0)&&!s),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),s!==void 0)return e.select?e.select(s):s},structuralSharing:e.structuralSharing})}function Sx(e){return Qi({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function vx(e){const{select:t,...n}=e;return Qi({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function xx(e){return Qi({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Tx(e){return Qi({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function kd(e){const t=ws();return O.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var Ix=oq();function FG(e,t){const n=ws(),r=IG(t),{activeProps:s,inactiveProps:i,activeOptions:a,to:o,preload:c,preloadDelay:u,hashScrollIntoView:l,replace:d,startTransition:f,resetScroll:h,viewTransition:m,children:y,target:g,disabled:p,style:_,className:k,onClick:v,onBlur:w,onFocus:S,onMouseEnter:T,onMouseLeave:I,onTouchStart:D,ignoreBlocker:R,params:z,search:V,hash:H,state:G,mask:Q,reloadDocument:ne,unsafeRelative:me,from:ke,_fromLocation:et,...C}=e,M=T$(),K=ps({select:X=>{const ae=X.matches[X.matches.length-1];return{search:ae?.search,hash:X.location.hash,path:ae?.pathname}},structuralSharing:!0}),A=e.from,N=O.useMemo(()=>({...e,from:A}),[n,K,A,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),B=O.useMemo(()=>n.buildLocation({...N}),[n,N]),J=B.maskedLocation?B.maskedLocation.publicHref:B.publicHref,be=B.maskedLocation?B.maskedLocation.external:B.external,ge=O.useMemo(()=>qG(J,be,n.history,p),[p,be,J,n.history]),Ee=O.useMemo(()=>{if(ge?.external)return nb(ge.href,n.protocolAllowlist)?void 0:ge.href;if(!GG(o)&&!(typeof o!="string"||o.indexOf(":")===-1))try{return new URL(o),nb(o,n.protocolAllowlist)?void 0:o}catch{}},[o,ge,n.protocolAllowlist]),Re=ps({select:X=>{if(Ee)return!1;if(a?.exact){if(!qq(X.location.pathname,B.pathname,n.basepath))return!1}else{const ae=sb(X.location.pathname,n.basepath),Ae=sb(B.pathname,n.basepath);if(!(ae.startsWith(Ae)&&(ae.length===Ae.length||ae[Ae.length]==="/")))return!1}return(a?.includeSearch??!0)&&!zc(X.location.search,B.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?M&&X.location.hash===B.hash:!0}}),q=Re?co(s,{})??BG:xk,W=Re?xk:co(i,{})??xk,se=[k,q.className,W.className].filter(Boolean).join(" "),le=(_||q.style||W.style)&&{..._,...q.style,...W.style},[we,Fe]=O.useState(!1),Ie=O.useRef(!1),Me=e.reloadDocument||Ee?!1:c??n.options.defaultPreload,mt=u??n.options.defaultPreloadDelay??0,it=O.useCallback(()=>{n.preloadRoute({...N,_builtLocation:B}).catch(X=>{console.warn(X),console.warn(vG)})},[n,N,B]),At=O.useCallback(X=>{X?.isIntersecting&&it()},[it]);TG(r,At,HG,{disabled:!!p||Me!=="viewport"}),O.useEffect(()=>{Ie.current||!p&&Me==="render"&&(it(),Ie.current=!0)},[p,it,Me]);const zr=X=>{const ae=X.currentTarget.getAttribute("target"),Ae=g!==void 0?g:ae;if(!p&&!KG(X)&&!X.defaultPrevented&&(!Ae||Ae==="_self")&&X.button===0){X.preventDefault(),Ix.flushSync(()=>{Fe(!0)});const xe=n.subscribe("onResolved",()=>{xe(),Fe(!1)});n.navigate({...N,replace:d,resetScroll:h,hashScrollIntoView:l,startTransition:f,viewTransition:m,ignoreBlocker:R})}};if(Ee)return{...C,ref:r,href:Ee,...y&&{children:y},...g&&{target:g},...p&&{disabled:p},..._&&{style:_},...k&&{className:k},...v&&{onClick:v},...w&&{onBlur:w},...S&&{onFocus:S},...T&&{onMouseEnter:T},...I&&{onMouseLeave:I},...D&&{onTouchStart:D}};const pn=X=>{if(p||Me!=="intent")return;if(!mt){it();return}const ae=X.currentTarget;if(uf.has(ae))return;const Ae=setTimeout(()=>{uf.delete(ae),it()},mt);uf.set(ae,Ae)},Gs=X=>{p||Me!=="intent"||it()},rs=X=>{if(p||!Me||!mt)return;const ae=X.currentTarget,Ae=uf.get(ae);Ae&&(clearTimeout(Ae),uf.delete(ae))};return{...C,...q,...W,href:ge?.href,ref:r,onClick:Vu([v,zr]),onBlur:Vu([w,rs]),onFocus:Vu([S,pn]),onMouseEnter:Vu([T,pn]),onMouseLeave:Vu([I,rs]),onTouchStart:Vu([D,Gs]),disabled:!!p,target:g,...le&&{style:le},...se&&{className:se},...p&&zG,...Re&&UG,...M&&we&&VG}}const xk={},BG={className:"active"},zG={role:"link","aria-disabled":!0},UG={"data-status":"active","aria-current":"page"},VG={"data-transitioning":"transitioning"},uf=new WeakMap,HG={rootMargin:"100px"},Vu=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function qG(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function GG(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Dr=O.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:s,...i}=FG(r,t),a=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;if(!n){const{disabled:o,...c}=i;return O.createElement("a",c,a)}return O.createElement(n,i,a)});function KG(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class WG extends x${constructor(t){super(t),this.useMatch=n=>Qi({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Qi({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Tx({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>xx({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>vx({...n,from:this.id}),this.useLoaderData=n=>Sx({...n,from:this.id}),this.useNavigate=()=>kd({from:this.fullPath}),this.Link=$h.forwardRef((n,r)=>b.jsx(Dr,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function wu(e){return new WG(e)}class JG extends xG{constructor(t){super(t),this.useMatch=n=>Qi({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Qi({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Tx({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>xx({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>vx({...n,from:this.id}),this.useLoaderData=n=>Sx({...n,from:this.id}),this.useNavigate=()=>kd({from:this.fullPath}),this.Link=$h.forwardRef((n,r)=>b.jsx(Dr,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function YG(e){return new JG(e)}function N2(e){return typeof e=="object"?new R2(e,{silent:!0}).createRoute(e):new R2(e,{silent:!0}).createRoute}class R2{constructor(t,n){this.path=t,this.createRoute=r=>{const s=wu(r);return s.isRoot=!1,s},this.silent=n?.silent}}class O2{constructor(t){this.useMatch=n=>Qi({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Qi({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Tx({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>xx({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>vx({...n,from:this.options.id}),this.useLoaderData=n=>Sx({...n,from:this.options.id}),this.useNavigate=()=>{const n=ws();return kd({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function L2(e){return typeof e=="object"?new O2(e):t=>new O2({id:e,...t})}function QG(){const e=ws(),t=O.useRef({router:e,mounted:!1}),[n,r]=O.useState(!1),{hasPendingMatches:s,isLoading:i}=ps({select:d=>({isLoading:d.isLoading,hasPendingMatches:d.matches.some(f=>f.status==="pending")}),structuralSharing:!0}),a=kk(i),o=i||n||s,c=kk(o),u=i||s,l=kk(u);return e.startTransition=d=>{r(!0),O.startTransition(()=>{d(),r(!1)})},O.useEffect(()=>{const d=e.history.subscribe(e.load),f=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return bo(e.latestLocation.publicHref)!==bo(f.publicHref)&&e.commitLocation({...f,replace:!0}),()=>{d()}},[e,e.history]),Op(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(f){console.error(f)}})()},[e]),Op(()=>{a&&!i&&e.emit({type:"onLoad",...Uc(e.state)})},[a,e,i]),Op(()=>{l&&!u&&e.emit({type:"onBeforeRouteMount",...Uc(e.state)})},[u,l,e]),Op(()=>{if(c&&!o){const d=Uc(e.state);e.emit({type:"onResolved",...d}),e.__store.setState(f=>({...f,status:"idle",resolvedLocation:f.location})),d.hrefChanged&&tG(e)}},[o,c,e]),null}function XG(e){const t=ps({select:n=>`not-found-${n.location.pathname}-${n.status}`});return b.jsx(Ex,{getResetKey:()=>t,onCatch:(n,r)=>{if(Yr(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(Yr(n))return e.fallback?.(n);throw n},children:e.children})}function ZG(){return b.jsx("p",{children:"Not Found"})}function cl(e){return b.jsx(b.Fragment,{children:e.children})}function A$(e,t,n){return t.options.notFoundComponent?b.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?b.jsx(e.options.defaultNotFoundComponent,{...n}):b.jsx(ZG,{})}function eK(){return ws().isScrollRestoring,null}const C$=O.memo(function({matchId:t}){const n=ws(),r=ps({select:y=>{const g=y.matches.findIndex(_=>_.id===t),p=y.matches[g];return Po(p),{routeId:p.routeId,ssr:p.ssr,_displayPending:p._displayPending,resetKey:y.loadedAt,parentRouteId:y.matches[g-1]?.routeId}},structuralSharing:!0}),s=n.routesById[r.routeId],i=s.options.pendingComponent??n.options.defaultPendingComponent,a=i?b.jsx(i,{}):null,o=s.options.errorComponent??n.options.defaultErrorComponent,c=s.options.onCatch??n.options.defaultOnCatch,u=s.isRoot?s.options.notFoundComponent??n.options.notFoundRoute?.options.component:s.options.notFoundComponent,l=r.ssr===!1||r.ssr==="data-only",d=(!s.isRoot||s.options.wrapInSuspense||l)&&(s.options.wrapInSuspense??i??(s.options.errorComponent?.preload||l))?O.Suspense:cl,f=o?Ex:cl,h=u?XG:cl,m=s.isRoot?s.options.shellComponent??cl:cl;return b.jsxs(m,{children:[b.jsx(e_.Provider,{value:t,children:b.jsx(d,{fallback:a,children:b.jsx(f,{getResetKey:()=>r.resetKey,errorComponent:o||wx,onCatch:(y,g)=>{if(Yr(y))throw y;c?.(y,g)},children:b.jsx(h,{fallback:y=>{if(!u||y.routeId&&y.routeId!==r.routeId||!y.routeId&&!s.isRoot)throw y;return O.createElement(u,y)},children:l||r._displayPending?b.jsx(CG,{fallback:a,children:b.jsx(D2,{matchId:t})}):b.jsx(D2,{matchId:t})})})})}),r.parentRouteId===Ps&&n.options.scrollRestoration?b.jsxs(b.Fragment,{children:[b.jsx(tK,{}),b.jsx(eK,{})]}):null]})});function tK(){const e=ws(),t=O.useRef(void 0);return b.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Uc(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const D2=O.memo(function({matchId:t}){const n=ws(),{match:r,key:s,routeId:i}=ps({select:c=>{const u=c.matches.find(m=>m.id===t),l=u.routeId,f=(n.routesById[l].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:l,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return{key:f?JSON.stringify(f):void 0,routeId:l,match:{id:u.id,status:u.status,error:u.error,invalid:u.invalid,_forcePending:u._forcePending,_displayPending:u._displayPending}}},structuralSharing:!0}),a=n.routesById[i],o=O.useMemo(()=>{const c=a.options.component??n.options.defaultComponent;return c?b.jsx(c,{},s):b.jsx(P$,{})},[s,a.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const c=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(c){const u=n.getMatch(r.id);if(u&&!u._nonReactive.minPendingPromise){const l=ql();u._nonReactive.minPendingPromise=l,setTimeout(()=>{l.resolve(),u._nonReactive.minPendingPromise=void 0},c)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return Po(Yr(r.error)),A$(n,a,r.error);if(r.status==="redirected")throw Po(ms(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error")throw r.error;return o}),P$=O.memo(function(){const t=ws(),n=O.useContext(e_),r=ps({select:u=>u.matches.find(l=>l.id===n)?.routeId}),s=t.routesById[r],i=ps({select:u=>{const d=u.matches.find(f=>f.id===n);return Po(d),d.globalNotFound}}),a=ps({select:u=>{const l=u.matches,d=l.findIndex(f=>f.id===n);return l[d+1]?.id}}),o=t.options.defaultPendingComponent?b.jsx(t.options.defaultPendingComponent,{}):null;if(i)return A$(t,s,void 0);if(!a)return null;const c=b.jsx(C$,{matchId:a});return r===Ps?b.jsx(O.Suspense,{fallback:o,children:c}):c});function nK(){const e=ws(),n=e.routesById[Ps].options.pendingComponent??e.options.defaultPendingComponent,r=n?b.jsx(n,{}):null,s=typeof document<"u"&&e.ssr?cl:O.Suspense,i=b.jsxs(s,{fallback:r,children:[b.jsx(QG,{}),b.jsx(rK,{})]});return e.options.InnerWrap?b.jsx(e.options.InnerWrap,{children:i}):i}function rK(){const e=ws(),t=ps({select:s=>s.matches[0]?.id}),n=ps({select:s=>s.loadedAt}),r=t?b.jsx(C$,{matchId:t}):null;return b.jsx(e_.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:b.jsx(Ex,{getResetKey:()=>n,errorComponent:wx,onCatch:void 0,children:r})})}function sK(){const e=ws();return ps({select:t=>[t.location.href,t.resolvedLocation?.href,t.status],structuralSharing:!0}),O.useCallback(t=>{const{pending:n,caseSensitive:r,fuzzy:s,includeSearch:i,...a}=t;return e.matchRoute(a,{pending:n,caseSensitive:r,fuzzy:s,includeSearch:i})},[e])}const iK=e=>new aK(e);class aK extends bG{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=N2,globalThis.createLazyFileRoute=L2):typeof window<"u"&&(window.createFileRoute=N2,window.createLazyFileRoute=L2);function oK({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=b.jsx(I$.Provider,{value:e,children:t});return e.options.Wrap?b.jsx(e.options.Wrap,{children:r}):r}function cK({router:e,...t}){return b.jsx(oK,{router:e,...t,children:b.jsx(nK,{})})}const uK=e=>typeof e=="function",P=function(e,t){if(typeof e=="function")return function(){return e(arguments)?t.apply(this,arguments):n=>t(n,...arguments)};switch(e){case 0:case 1:throw new RangeError(`Invalid arity ${e}`);case 2:return function(n,r){return arguments.length>=2?t(n,r):function(s){return t(s,n)}};case 3:return function(n,r,s){return arguments.length>=3?t(n,r,s):function(i){return t(i,n,r)}};case 4:return function(n,r,s,i){return arguments.length>=4?t(n,r,s,i):function(a){return t(a,n,r,s)}};case 5:return function(n,r,s,i,a){return arguments.length>=5?t(n,r,s,i,a):function(o){return t(o,n,r,s,i)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);const n=arguments;return function(r){return t(r,...n)}}}},ze=e=>e,t_=e=>()=>e,$2=t_(!0),La=t_(!1),N$=t_(void 0),Kl=N$;function F(e,t,n,r,s,i,a,o,c){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return s(r(n(t(e))));case 6:return i(s(r(n(t(e)))));case 7:return a(i(s(r(n(t(e))))));case 8:return o(a(i(s(r(n(t(e)))))));case 9:return c(o(a(i(s(r(n(t(e))))))));default:{let u=arguments[0];for(let l=1;l<arguments.length;l++)u=arguments[l](u);return u}}}const M2="effect/GlobalValue";let lf;const $e=(e,t)=>(lf||(globalThis[M2]??=new Map,lf=globalThis[M2]),lf.has(e)||lf.set(e,t()),lf.get(e)),kn=e=>typeof e=="string",pi=e=>typeof e=="number",No=e=>typeof e=="boolean",n_=e=>typeof e=="bigint",cb=e=>typeof e=="symbol",Ed=uK,lK=e=>e===void 0,dK=e=>!1,Ax=e=>typeof e=="object"&&e!==null,_s=e=>Ax(e)||Ed(e),Ne=P(2,(e,t)=>_s(e)&&t in e),R$=P(2,(e,t)=>Ne(e,"_tag")&&e._tag===t),Hu=e=>e==null,fK=e=>e!=null,hK=e=>e instanceof Uint8Array,O$=e=>e instanceof Date,L$=e=>typeof e=="string"||Ne(e,Symbol.iterator),Bh=e=>Ax(e)&&!Array.isArray(e),mK=e=>Ne(e,"then")&&Ed(e.then),r_=e=>`BUG: ${e} - please report an issue at https://github.com/Effect-TS/effect/issues`;let D$=class $${self;called=!1;constructor(t){this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new $$(this.self)}};const pK=335903614,gK=4150755663,bK=1481765933,yK=1284865837,_K=9007199254740992,kK=134217728;class EK{_state;constructor(t,n,r,s){return Hu(n)&&Hu(t)?(n=Math.random()*4294967295>>>0,t=0):Hu(n)&&(n=t,t=0),Hu(s)&&Hu(r)?(s=this._state?this._state[3]:gK,r=this._state?this._state[2]:pK):Hu(s)&&(s=r,r=0),this._state=new Int32Array([0,0,r>>>0,((s||0)|1)>>>0]),this._next(),j2(this._state,this._state[0],this._state[1],t>>>0,n>>>0),this._next(),this}getState(){return[this._state[0],this._state[1],this._state[2],this._state[3]]}setState(t){this._state[0]=t[0],this._state[1]=t[1],this._state[2]=t[2],this._state[3]=t[3]|1}integer(t){return Math.round(this.number()*Number.MAX_SAFE_INTEGER)%t}number(){const t=(this._next()&67108863)*1,n=(this._next()&134217727)*1;return(t*kK+n)/_K}_next(){const t=this._state[0]>>>0,n=this._state[1]>>>0;wK(this._state,t,n,bK,yK),j2(this._state,this._state[0],this._state[1],this._state[2],this._state[3]);let r=t>>>18,s=(n>>>18|t<<14)>>>0;r=(r^t)>>>0,s=(s^n)>>>0;const i=(s>>>27|r<<5)>>>0,a=t>>>27,o=(-a>>>0&31)>>>0;return(i>>>a|i<<o)>>>0}}function wK(e,t,n,r,s){let i=(n>>>16)*(s&65535)>>>0,a=(n&65535)*(s>>>16)>>>0,o=(n&65535)*(s&65535)>>>0,c=(n>>>16)*(s>>>16)+((a>>>16)+(i>>>16))>>>0;a=a<<16>>>0,o=o+a>>>0,o>>>0<a>>>0&&(c=c+1>>>0),i=i<<16>>>0,o=o+i>>>0,o>>>0<i>>>0&&(c=c+1>>>0),c=c+Math.imul(n,r)>>>0,c=c+Math.imul(t,s)>>>0,e[0]=c,e[1]=o}function j2(e,t,n,r,s){let i=t+r>>>0;const a=n+s>>>0;a>>>0<n>>>0&&(i=i+1|0),e[0]=i,e[1]=a}const Lw=Symbol.for("effect/Utils/YieldWrap");class Am{#e;constructor(t){this.#e=t}[Lw](){return this.#e}}function SK(e){if(typeof e=="object"&&e!==null&&Lw in e)return e[Lw]();throw new Error(r_("yieldWrapGet"))}const Ts=$e("effect/Utils/isStructuralRegion",()=>({enabled:!1,tester:void 0})),M$={effect_internal_function:e=>e()},vK={effect_internal_function:e=>e()},xK=M$.effect_internal_function(()=>new Error().stack)?.includes("effect_internal_function")===!0,or=xK?M$.effect_internal_function:vK.effect_internal_function,Tk=$e(Symbol.for("effect/Hash/randomHashCache"),()=>new WeakMap),Ge=Symbol.for("effect/Hash"),Ce=e=>{if(Ts.enabled===!0)return 0;switch(typeof e){case"number":return Px(e);case"bigint":return Xt(e.toString(10));case"boolean":return Xt(String(e));case"symbol":return Xt(String(e));case"string":return Xt(e);case"undefined":return Xt("undefined");case"function":case"object":return e===null?Xt("null"):e instanceof Date?Number.isNaN(e.getTime())?Xt("Invalid Date"):Ce(e.toISOString()):e instanceof URL?Ce(e.href):TK(e)?e[Ge]():Cx(e);default:throw new Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},Cx=e=>(Tk.has(e)||Tk.set(e,Px(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))),Tk.get(e)),ot=e=>t=>t*53^e,s_=e=>e&3221225471|e>>>1&1073741824,TK=e=>Ne(e,Ge),Px=e=>{if(e!==e||e===1/0)return 0;let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return s_(t)},Xt=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return s_(t)},IK=(e,t)=>{let n=12289;for(let r=0;r<t.length;r++)n^=F(Xt(t[r]),ot(Ce(e[t[r]])));return s_(n)},j$=e=>IK(e,Object.keys(e)),Cm=e=>{let t=6151;for(let n=0;n<e.length;n++)t=F(t,ot(Ce(e[n])));return s_(t)},Ht=function(){if(arguments.length===1){const n=arguments[0];return function(r){return Object.defineProperty(n,Ge,{value(){return r},enumerable:!1}),r}}const e=arguments[0],t=arguments[1];return Object.defineProperty(e,Ge,{value(){return t},enumerable:!1}),t},Ke=Symbol.for("effect/Equal");function je(){return arguments.length===1?e=>ub(e,arguments[0]):ub(arguments[0],arguments[1])}function ub(e,t){if(e===t)return!0;const n=typeof e;if(n!==typeof t)return!1;if(n==="object"||n==="function"){if(e!==null&&t!==null){if(zh(e)&&zh(t))return Ce(e)===Ce(t)&&e[Ke](t)?!0:Ts.enabled&&Ts.tester?Ts.tester(e,t):!1;if(e instanceof Date&&t instanceof Date){const r=e.getTime(),s=t.getTime();return r===s||Number.isNaN(r)&&Number.isNaN(s)}else if(e instanceof URL&&t instanceof URL)return e.href===t.href}if(Ts.enabled){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((r,s)=>ub(r,t[s]));if(Object.getPrototypeOf(e)===Object.prototype&&Object.getPrototypeOf(t)===Object.prototype){const r=Object.keys(e),s=Object.keys(t);if(r.length===s.length){for(const i of r)if(!(i in t&&ub(e[i],t[i])))return Ts.tester?Ts.tester(e,t):!1;return!0}}return Ts.tester?Ts.tester(e,t):!1}}return Ts.enabled&&Ts.tester?Ts.tester(e,t):!1}const zh=e=>Ne(e,Ke),Nx=()=>je,gt=Symbol.for("nodejs.util.inspect.custom"),Yt=e=>{try{if(Ne(e,"toJSON")&&Ed(e.toJSON)&&e.toJSON.length===0)return e.toJSON();if(Array.isArray(e))return e.map(Yt)}catch{return{}}return Rx(e)},Ik="[Circular]";function F$(e){try{return e.toISOString()}catch{return"Invalid Date"}}function AK(e){try{const t=e.toString();return typeof t=="string"?t:String(t)}catch{return"[toString threw]"}}function Pm(e){return kn(e)?JSON.stringify(e):String(e)}function za(e,t){const n=new WeakSet,r=(a,o)=>{const c=a?.constructor;return c&&c!==Object.prototype.constructor&&c.name?`${c.name}(${o})`:o},s=a=>{try{return Reflect.ownKeys(a)}catch{return["[ownKeys threw]"]}};function i(a,o=0){if(Array.isArray(a))return n.has(a)?Ik:(n.add(a),`[${a.map(c=>i(c,o)).join(",")}]`);if(O$(a))return F$(a);if(Ne(a,"toString")&&Ed(a.toString)&&a.toString!==Object.prototype.toString&&a.toString!==Array.prototype.toString){const c=AK(a);return a instanceof Error&&a.cause?`${c} (cause: ${i(a.cause,o)})`:c}if(kn(a))return JSON.stringify(a);if(pi(a)||a==null||No(a)||cb(a))return String(a);if(n_(a))return String(a)+"n";if(a instanceof Set||a instanceof Map)return n.has(a)?Ik:(n.add(a),`${a.constructor.name}(${i(Array.from(a),o)})`);if(_s(a)){if(n.has(a))return Ik;n.add(a);const c=s(a);{const u=`{${c.map(l=>`${Pm(l)}:${i(a[l],o)}`).join(",")}}`;return r(a,u)}}return String(a)}return i(e,0)}const Dt=e=>JSON.stringify(e,null,2),i_={toJSON(){return Yt(this)},[gt](){return this.toJSON()},toString(){return Dt(this.toJSON())}};let CK=class{[gt](){return this.toJSON()}toString(){return Dt(this.toJSON())}};const Wl=(e,t=2)=>{if(typeof e=="string")return e;try{return typeof e=="object"?B$(e,t):String(e)}catch{return String(e)}},B$=(e,t)=>{let n=[];const r=JSON.stringify(e,(s,i)=>typeof i=="object"&&i!==null?n.includes(i)?void 0:n.push(i)&&(Vc.fiberRefs!==void 0&&z$(i)?i[a_](Vc.fiberRefs):i):i,t);return n=void 0,r},a_=Symbol.for("effect/Inspectable/Redactable"),z$=e=>typeof e=="object"&&e!==null&&a_ in e,Vc=$e("effect/Inspectable/redactableState",()=>({fiberRefs:void 0})),PK=(e,t)=>{const n=Vc.fiberRefs;Vc.fiberRefs=e;try{return t()}finally{Vc.fiberRefs=n}},Rx=e=>z$(e)&&Vc.fiberRefs!==void 0?e[a_](Vc.fiberRefs):e,Se=(e,t)=>{switch(t.length){case 0:return e;case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let n=e;for(let r=0,s=t.length;r<s;r++)n=t[r](n);return n}}},sh="Async",o_="Commit",Qn="Failure",p0="OnFailure",lb="OnSuccess",db="OnSuccessAndFailure",Xn="Success",U$="Sync",NK="Tag",wd="UpdateRuntimeFlags",fb="While",ih="Iterator",V$="WithRuntime",g0="Yield",Ox="RevertFlags";let RK="3.19.19";const Lx=()=>RK,OK=Symbol.for("effect/Effect"),LK=Symbol.for("effect/Stream"),DK=Symbol.for("effect/Sink"),$K=Symbol.for("effect/Channel"),Jl={_R:e=>e,_E:e=>e,_A:e=>e,_V:Lx()},MK={_A:e=>e,_In:e=>e,_L:e=>e,_E:e=>e,_R:e=>e},jK={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutElem:e=>e,_OutDone:e=>e},Nm={[OK]:Jl,[LK]:Jl,[DK]:MK,[$K]:jK,[Ke](e){return this===e},[Ge](){return Ht(this,Cx(this))},[Symbol.iterator](){return new D$(new Am(this))},pipe(){return Se(this,arguments)}},Dx={[Ge](){return Ht(this,j$(this))},[Ke](e){const t=Object.keys(this),n=Object.keys(e);if(t.length!==n.length)return!1;for(const r of t)if(!(r in e&&je(this[r],e[r])))return!1;return!0}},Rm={...Nm,_op:o_},FK={...Rm,...Dx},BK=(function(){function e(){}return e.prototype=Rm,e})(),H$=Symbol.for("effect/Option"),q$={...Nm,[H$]:{_A:e=>e},[gt](){return this.toJSON()},toString(){return Dt(this.toJSON())}},zK=Object.assign(Object.create(q$),{_tag:"Some",_op:"Some",[Ke](e){return G$(e)&&K$(e)&&je(this.value,e.value)},[Ge](){return Ht(this,ot(Ce(this._tag))(Ce(this.value)))},toJSON(){return{_id:"Option",_tag:this._tag,value:Yt(this.value)}}}),UK=Ce("None"),VK=Object.assign(Object.create(q$),{_tag:"None",_op:"None",[Ke](e){return G$(e)&&$x(e)},[Ge](){return UK},toJSON(){return{_id:"Option",_tag:this._tag}}}),G$=e=>Ne(e,H$),$x=e=>e._tag==="None",K$=e=>e._tag==="Some",c_=Object.create(VK),Uh=e=>{const t=Object.create(zK);return t.value=e,t},W$=Symbol.for("effect/Context/Tag"),hb=Symbol.for("effect/Context/Reference"),HK="effect/STM",qK=Symbol.for(HK),Mx={...Nm,_op:"Tag",[qK]:Jl,[W$]:{_Service:e=>e,_Identifier:e=>e},toString(){return Dt(this.toJSON())},toJSON(){return{_id:"Tag",key:this.key,stack:this.stack}},[gt](){return this.toJSON()},of(e){return e},context(e){return X$(this,e)}},GK={...Mx,[hb]:hb},KK=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;Error.stackTraceLimit=t;const r=Object.create(Mx);return Object.defineProperty(r,"stack",{get(){return n.stack}}),r.key=e,r},WK=e=>()=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;Error.stackTraceLimit=t;function r(){}return Object.setPrototypeOf(r,Mx),r.key=e,Object.defineProperty(r,"stack",{get(){return n.stack}}),r},JK=()=>(e,t)=>{const n=Error.stackTraceLimit;Error.stackTraceLimit=2;const r=new Error;Error.stackTraceLimit=n;function s(){}return Object.setPrototypeOf(s,GK),s.key=e,s.defaultValue=t.defaultValue,Object.defineProperty(s,"stack",{get(){return r.stack}}),s},J$=Symbol.for("effect/Context"),YK={[J$]:{_Services:e=>e},[Ke](e){if(Y$(e)&&this.unsafeMap.size===e.unsafeMap.size){for(const t of this.unsafeMap.keys())if(!e.unsafeMap.has(t)||!je(this.unsafeMap.get(t),e.unsafeMap.get(t)))return!1;return!0}return!1},[Ge](){return Ht(this,Px(this.unsafeMap.size))},pipe(){return Se(this,arguments)},toString(){return Dt(this.toJSON())},toJSON(){return{_id:"Context",services:Array.from(this.unsafeMap).map(Yt)}},[gt](){return this.toJSON()}},Ro=e=>{const t=Object.create(YK);return t.unsafeMap=e,t},QK=e=>{const t=new Error(`Service not found${e.key?`: ${String(e.key)}`:""}`);if(e.stack){const n=e.stack.split(`
|
|
3
|
+
`);if(n.length>2){const r=n[2].match(/at (.*)/);r&&(t.message=t.message+` (defined at ${r[1]})`)}}if(t.stack){const n=t.stack.split(`
|
|
4
|
+
`);n.splice(1,3),t.stack=n.join(`
|
|
5
|
+
`)}return t},Y$=e=>Ne(e,J$),XK=e=>Ne(e,W$),Q$=e=>Ne(e,hb),ZK=Ro(new Map),eW=()=>ZK,X$=(e,t)=>Ro(new Map([[e.key,t]])),tW=P(3,(e,t,n)=>{const r=new Map(e.unsafeMap);return r.set(t.key,n),Ro(r)}),Ak=$e("effect/Context/defaultValueCache",()=>new Map),u_=e=>{if(Ak.has(e.key))return Ak.get(e.key);const t=e.defaultValue();return Ak.set(e.key,t),t},nW=(e,t)=>e.unsafeMap.has(t.key)?e.unsafeMap.get(t.key):u_(t),Z$=P(2,(e,t)=>{if(!e.unsafeMap.has(t.key)){if(hb in t)return u_(t);throw QK(t)}return e.unsafeMap.get(t.key)}),rW=Z$,sW=P(3,(e,t,n)=>e.unsafeMap.has(t.key)?e.unsafeMap.get(t.key):Q$(t)?u_(t):n()),iW=P(2,(e,t)=>e.unsafeMap.has(t.key)?Uh(e.unsafeMap.get(t.key)):Q$(t)?Uh(u_(t)):c_),aW=P(2,(e,t)=>{const n=new Map(e.unsafeMap);for(const[r,s]of t.unsafeMap)n.set(r,s);return Ro(n)}),oW=(...e)=>{const t=new Map;for(let n=0;n<e.length;n++)e[n].unsafeMap.forEach((r,s)=>{t.set(s,r)});return Ro(t)},Ko=KK,cW=Ro,uW=Y$,eM=XK,gi=eW,jx=X$,ls=tW,ci=rW,df=sW,tM=Z$,Wo=iW,Xr=aW,lW=oW,Fr=WK,Su=JK,Fx=e=>(t,n)=>t===n||e(t,n),dW=(e,t)=>e===t,fW=()=>dW,hW=fW(),nM=P(2,(e,t)=>Fx((n,r)=>e(t(n),t(r)))),mW=nM(hW,e=>e.getTime()),pW=e=>Fx((t,n)=>{if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1;return!0}),Bx=Symbol.for("effect/Either"),rM={...Nm,[Bx]:{_R:e=>e},[gt](){return this.toJSON()},toString(){return Dt(this.toJSON())}},gW=Object.assign(Object.create(rM),{_tag:"Right",_op:"Right",[Ke](e){return zx(e)&&sM(e)&&je(this.right,e.right)},[Ge](){return ot(Ce(this._tag))(Ce(this.right))},toJSON(){return{_id:"Either",_tag:this._tag,right:Yt(this.right)}}}),bW=Object.assign(Object.create(rM),{_tag:"Left",_op:"Left",[Ke](e){return zx(e)&&Ux(e)&&je(this.left,e.left)},[Ge](){return ot(Ce(this._tag))(Ce(this.left))},toJSON(){return{_id:"Either",_tag:this._tag,left:Yt(this.left)}}}),zx=e=>Ne(e,Bx),Ux=e=>e._tag==="Left",sM=e=>e._tag==="Right",iM=e=>{const t=Object.create(bW);return t.left=e,t},aM=e=>{const t=Object.create(gW);return t.right=e,t},yW=e=>Ux(e)?c_:Uh(e.right),_W=P(2,(e,t)=>$x(e)?iM(t()):aM(e.value)),kW=Bx,Ue=aM,Be=iM,EW=_W,wW=e=>{if(Ed(e))try{return Ue(e())}catch(t){return Be(t)}else try{return Ue(e.try())}catch(t){return Be(e.catch(t))}},SW=zx,ir=Ux,Bi=sM,vW=P(2,(e,t)=>ir(e)?Be(t(e.left)):Ue(e.right)),xW=P(2,(e,t)=>Bi(e)?Ue(t(e.right)):Be(e.left)),Kr=P(2,(e,{onLeft:t,onRight:n})=>ir(e)?t(e.left):n(e.right)),TW=Kr({onLeft:ze,onRight:ze}),oM=P(2,(e,t)=>{if(Bi(e))return e.right;throw t(e.left)}),cM=oM(()=>new Error("getOrThrow called on a Left")),uM=e=>e.length>0,lM=e=>(t,n)=>t===n?0:e(t,n),IW=lM((e,t)=>e<t?-1:1),dM=P(2,(e,t)=>lM((n,r)=>e(t(n),t(r)))),AW=e=>P(2,(t,n)=>e(t,n)===1),CW=Symbol.for("effect/Option"),fe=()=>c_,ye=Uh,xn=$x,ft=K$,hn=P(2,(e,{onNone:t,onSome:n})=>xn(e)?t():n(e.value)),PW=yW,Kt=P(2,(e,t)=>xn(e)?t():e.value),Gi=P(2,(e,t)=>xn(e)?t():e),NW=P(2,(e,t)=>xn(e)?ye(t()):e),Sd=e=>e==null?fe():ye(e),Pr=Kt(N$),RW=e=>(...t)=>{try{return ye(e(...t))}catch{return fe()}},fM=P(2,(e,t)=>{if(ft(e))return e.value;throw t()}),OW=fM(()=>new Error("getOrThrow called on a None")),Wr=P(2,(e,t)=>xn(e)?fe():ye(t(e.value))),Jo=P(2,(e,t)=>xn(e)?fe():t(e.value)),hM=P(2,(e,t)=>xn(e)?fe():Sd(t(e.value))),LW=Jo,mM=P(2,(e,t)=>LW(e,n=>t(n)?Uh(n):c_)),DW=e=>P(2,(t,n)=>xn(t)?!1:e(t.value,n)),$W=Nx(),MW=DW($W),jW=P(2,(e,t)=>xn(e)?!1:t(e.value)),FW=(...e)=>e,BW=P(2,(e,t)=>{let n=0;for(const r of e){const s=t(r,n);if(No(s)){if(s)return ye(r)}else if(ft(s))return s;n++}return fe()}),zW=()=>({}),UW=e=>pM(e).length===0,VW=P(2,(e,t)=>Object.prototype.hasOwnProperty.call(e,t)),bl=P(2,(e,t)=>{const n={...e};for(const r of pM(e))n[r]=t(e[r],r);return n}),pM=e=>Object.keys(e),HW=P(3,(e,t,n)=>({...e,[t]:n})),l_=e=>new Array(e),qW=P(2,(e,t)=>{const n=Math.max(1,Math.floor(e)),r=new Array(n);for(let s=0;s<n;s++)r[s]=t(s);return r}),Tt=e=>Array.isArray(e)?e:Array.from(e),GW=e=>Array.isArray(e)?e:[e],KW=P(2,(e,{onEmpty:t,onNonEmpty:n})=>Qt(e)?n(e):t()),WW=P(2,(e,{onEmpty:t,onNonEmpty:n})=>Qt(e)?n(Lr(e),ru(e)):t()),mb=P(2,(e,t)=>[t,...e]),JW=P(2,(e,t)=>[...e,t]),Vx=P(2,(e,t)=>Tt(e).concat(Tt(t))),YW=Array.isArray,QW=e=>e.length===0,XW=QW,Nl=uM,Qt=uM,gM=(e,t)=>e<0||e>=t.length,ZW=(e,t)=>Math.floor(Math.min(Math.max(0,e),t.length)),eJ=P(2,(e,t)=>{const n=Math.floor(t);return gM(n,e)?fe():ye(e[n])}),bM=P(2,(e,t)=>{const n=Math.floor(t);if(gM(n,e))throw new Error(`Index ${n} out of bounds`);return e[n]}),ah=eJ(0),Lr=bM(0),tJ=e=>Qt(e)?ye(yM(e)):fe(),yM=e=>e[e.length-1],ru=e=>e.slice(1),nJ=(e,t)=>{let n=0;for(const r of e){if(!t(r,n))break;n++}return n},rJ=P(2,(e,t)=>_M(e,nJ(e,t))),sJ=P(2,(e,t)=>{const n=Tt(e);return n.slice(ZW(t,n),n.length)}),iJ=BW,F2=e=>Array.from(e).reverse(),Vh=P(2,(e,t)=>{const n=Array.from(e);return n.sort(t),n}),B2=P(2,(e,t)=>aJ(e,t,FW)),aJ=P(3,(e,t,n)=>{const r=Tt(e),s=Tt(t);if(Qt(r)&&Qt(s)){const i=[n(Lr(r),Lr(s))],a=Math.min(r.length,s.length);for(let o=1;o<a;o++)i[o]=n(r[o],s[o]);return i}return[]}),oJ=Nx(),_M=P(2,(e,t)=>{const n=Array.from(e),r=Math.floor(t);return Qt(n)?r>=1?cJ(n,r):[[],n]:[n,[]]}),cJ=P(2,(e,t)=>{const n=Math.max(1,Math.floor(t));return n>=e.length?[jf(e),[]]:[mb(e.slice(1,n),Lr(e)),e.slice(n)]}),jf=e=>e.slice(),uJ=P(3,(e,t,n)=>{const r=Tt(e),s=Tt(t);return Qt(r)?Qt(s)?wM(n)(Vx(r,s)):r:s}),b0=P(2,(e,t)=>uJ(e,t,oJ)),Oo=()=>[],Qs=e=>[e],Hc=P(2,(e,t)=>e.map(t)),pb=P(2,(e,t)=>{if(XW(e))return[];const n=[];for(let r=0;r<e.length;r++){const s=t(e[r],r);for(let i=0;i<s.length;i++)n.push(s[i])}return n}),kM=pb(ze),EM=P(2,(e,t)=>{const n=Tt(e),r=[];for(let s=0;s<n.length;s++){const i=t(n[s],s);ft(i)&&r.push(i.value)}return r}),lJ=P(2,(e,t)=>{const n=Tt(e),r=[];for(let s=0;s<n.length;s++)t(n[s],s)&&r.push(n[s]);return r}),Hx=P(3,(e,t,n)=>Tt(e).reduce((r,s,i)=>n(r,s,i),t)),z2=(e,t)=>{const n=[];let r=e,s;for(;ft(s=t(r));){const[i,a]=s.value;n.push(i),r=a}return n},d_=pW,wM=P(2,(e,t)=>{const n=Tt(e);if(Qt(n)){const r=[Lr(n)],s=ru(n);for(const i of s)r.every(a=>!t(i,a))&&r.push(i);return r}return[]}),dJ=e=>wM(e,Nx()),vd=P(2,(e,t)=>Tt(e).join(t)),SM=Symbol.for("effect/Chunk");function fJ(e,t,n,r,s){for(let i=t;i<Math.min(e.length,t+s);i++)n[r+i-t]=e[i];return n}const vM=[],hJ=e=>Fx((t,n)=>t.length===n.length&&Fs(t).every((r,s)=>e(r,yo(n,s)))),mJ=hJ(je),pJ={[SM]:{_A:e=>e},toString(){return Dt(this.toJSON())},toJSON(){return{_id:"Chunk",values:Fs(this).map(Yt)}},[gt](){return this.toJSON()},[Ke](e){return qx(e)&&mJ(this,e)},[Ge](){return Ht(this,Cm(Fs(this)))},[Symbol.iterator](){switch(this.backing._tag){case"IArray":return this.backing.array[Symbol.iterator]();case"IEmpty":return vM[Symbol.iterator]();default:return Fs(this)[Symbol.iterator]()}},pipe(){return Se(this,arguments)}},en=e=>{const t=Object.create(pJ);switch(t.backing=e,e._tag){case"IEmpty":{t.length=0,t.depth=0,t.left=t,t.right=t;break}case"IConcat":{t.length=e.left.length+e.right.length,t.depth=1+Math.max(e.left.depth,e.right.depth),t.left=e.left,t.right=e.right;break}case"IArray":{t.length=e.array.length,t.depth=0,t.left=Zs,t.right=Zs;break}case"ISingleton":{t.length=1,t.depth=0,t.left=Zs,t.right=Zs;break}case"ISlice":{t.length=e.length,t.depth=e.chunk.depth+1,t.left=Zs,t.right=Zs;break}}return t},qx=e=>Ne(e,SM),Zs=en({_tag:"IEmpty"}),dr=()=>Zs,Ck=(...e)=>yJ(e),Tn=e=>en({_tag:"ISingleton",a:e}),Yl=e=>qx(e)?e:Ir(Tt(e)),Dw=(e,t,n)=>{switch(e.backing._tag){case"IArray":{fJ(e.backing.array,0,t,n,e.length);break}case"IConcat":{Dw(e.left,t,n),Dw(e.right,t,n+e.left.length);break}case"ISingleton":{t[n]=e.backing.a;break}case"ISlice":{let r=0,s=n;for(;r<e.length;)t[s]=yo(e,r),r+=1,s+=1;break}}},gJ=e=>{switch(e.backing._tag){case"IEmpty":return vM;case"IArray":return e.backing.array;default:{const t=new Array(e.length);return Dw(e,t,0),e.backing={_tag:"IArray",array:t},e.left=Zs,e.right=Zs,e.depth=0,t}}},Fs=gJ,bJ=e=>{switch(e.backing._tag){case"IEmpty":case"ISingleton":return e;case"IArray":return en({_tag:"IArray",array:F2(e.backing.array)});case"IConcat":return en({_tag:"IConcat",left:ja(e.backing.right),right:ja(e.backing.left)});case"ISlice":return Ir(F2(Fs(e)))}},ja=bJ,xM=P(2,(e,t)=>t<0||t>=e.length?fe():ye(yo(e,t))),Ir=e=>e.length===0?dr():e.length===1?Tn(e[0]):en({_tag:"IArray",array:e}),yJ=e=>Ir(e),yo=P(2,(e,t)=>{switch(e.backing._tag){case"IEmpty":throw new Error("Index out of bounds");case"ISingleton":{if(t!==0)throw new Error("Index out of bounds");return e.backing.a}case"IArray":{if(t>=e.length||t<0)throw new Error("Index out of bounds");return e.backing.array[t]}case"IConcat":return t<e.left.length?yo(e.left,t):yo(e.right,t-e.left.length);case"ISlice":return yo(e.backing.chunk,t+e.backing.offset)}}),$w=P(2,(e,t)=>wn(e,Tn(t))),wr=P(2,(e,t)=>wn(Tn(t),e)),gb=P(2,(e,t)=>{if(t<=0)return Zs;if(t>=e.length)return e;switch(e.backing._tag){case"ISlice":return en({_tag:"ISlice",chunk:e.backing.chunk,length:t,offset:e.backing.offset});case"IConcat":return t>e.left.length?en({_tag:"IConcat",left:e.left,right:gb(e.right,t-e.left.length)}):gb(e.left,t);default:return en({_tag:"ISlice",chunk:e,offset:0,length:t})}}),lo=P(2,(e,t)=>{if(t<=0)return e;if(t>=e.length)return Zs;switch(e.backing._tag){case"ISlice":return en({_tag:"ISlice",chunk:e.backing.chunk,offset:e.backing.offset+t,length:e.backing.length-t});case"IConcat":return t>e.left.length?lo(e.right,t-e.left.length):en({_tag:"IConcat",left:lo(e.left,t),right:e.right});default:return en({_tag:"ISlice",chunk:e,offset:t,length:e.length-t})}}),wn=P(2,(e,t)=>{if(e.backing._tag==="IEmpty")return t;if(t.backing._tag==="IEmpty")return e;const n=t.depth-e.depth;if(Math.abs(n)<=1)return en({_tag:"IConcat",left:e,right:t});if(n<-1)if(e.left.depth>=e.right.depth){const r=wn(e.right,t);return en({_tag:"IConcat",left:e.left,right:r})}else{const r=wn(e.right.right,t);if(r.depth===e.depth-3){const s=en({_tag:"IConcat",left:e.right.left,right:r});return en({_tag:"IConcat",left:e.left,right:s})}else{const s=en({_tag:"IConcat",left:e.left,right:e.right.left});return en({_tag:"IConcat",left:s,right:r})}}else if(t.right.depth>=t.left.depth){const r=wn(e,t.left);return en({_tag:"IConcat",left:r,right:t.right})}else{const r=wn(e,t.left.left);if(r.depth===t.depth-3){const s=en({_tag:"IConcat",left:r,right:t.left.right});return en({_tag:"IConcat",left:s,right:t.right})}else{const s=en({_tag:"IConcat",left:t.left.right,right:t.right});return en({_tag:"IConcat",left:r,right:s})}}}),Gx=P(2,(e,t)=>Ir(lJ(e,t))),Kx=e=>e.length===0,Fa=e=>e.length>0,Wx=xM(0),Jx=e=>yo(e,0),zi=Jx,_J=e=>xM(e,e.length-1),kJ=P(2,(e,t)=>e.backing._tag==="ISingleton"?Tn(t(e.backing.a,0)):Ir(F(Fs(e),Hc((n,r)=>t(n,r))))),Ca=e=>lo(e,1),EJ=P(2,(e,t)=>lo(e,e.length-t)),wJ=Hx,su=5,Yx=Math.pow(2,su),SJ=Yx-1,vJ=Yx/2,xJ=Yx/4;function TJ(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,e&127}function Ql(e,t){return t>>>e&SJ}function yl(e){return 1<<e}function TM(e,t){return TJ(e&t-1)}const IJ=(e,t)=>({value:e,previous:t});function Rl(e,t,n,r){let s=r;if(!e){const i=r.length;s=new Array(i);for(let a=0;a<i;++a)s[a]=r[a]}return s[t]=n,s}function IM(e,t,n){const r=n.length-1;let s=0,i=0,a=n;if(e)s=i=t;else for(a=new Array(r);s<t;)a[i++]=n[s++];for(++s;s<=r;)a[i++]=n[s++];return e&&(a.length=r),a}function AJ(e,t,n,r){const s=r.length;if(e){let c=s;for(;c>=t;)r[c--]=r[c];return r[t]=n,r}let i=0,a=0;const o=new Array(s+1);for(;i<t;)o[a++]=r[i++];for(o[t]=n;i<s;)o[++a]=r[i++];return o}class Lo{_tag="EmptyNode";modify(t,n,r,s,i,a){const o=r(fe());return xn(o)?new Lo:(++a.value,new qc(t,s,i,o))}}function ai(e){return R$(e,"EmptyNode")}function CJ(e){return ai(e)||e._tag==="LeafNode"||e._tag==="CollisionNode"}function f_(e,t){return ai(e)?!1:t===e.edit}class qc{edit;hash;key;value;_tag="LeafNode";constructor(t,n,r,s){this.edit=t,this.hash=n,this.key=r,this.value=s}modify(t,n,r,s,i,a){if(je(i,this.key)){const c=r(this.value);return c===this.value?this:xn(c)?(--a.value,new Lo):f_(this,t)?(this.value=c,this):new qc(t,s,i,c)}const o=r(fe());return xn(o)?this:(++a.value,AM(t,n,this.hash,this,s,new qc(t,s,i,o)))}}class Qx{edit;hash;children;_tag="CollisionNode";constructor(t,n,r){this.edit=t,this.hash=n,this.children=r}modify(t,n,r,s,i,a){if(s===this.hash){const c=f_(this,t),u=this.updateCollisionList(c,t,this.hash,this.children,r,i,a);return u===this.children?this:u.length>1?new Qx(t,this.hash,u):u[0]}const o=r(fe());return xn(o)?this:(++a.value,AM(t,n,this.hash,this,s,new qc(t,s,i,o)))}updateCollisionList(t,n,r,s,i,a,o){const c=s.length;for(let l=0;l<c;++l){const d=s[l];if("key"in d&&je(a,d.key)){const f=d.value,h=i(f);return h===f?s:xn(h)?(--o.value,IM(t,l,s)):Rl(t,l,new qc(n,r,a,h),s)}}const u=i(fe());return xn(u)?s:(++o.value,Rl(t,c,new qc(n,r,a,u),s))}}class Xl{edit;mask;children;_tag="IndexedNode";constructor(t,n,r){this.edit=t,this.mask=n,this.children=r}modify(t,n,r,s,i,a){const o=this.mask,c=this.children,u=Ql(n,s),l=yl(u),d=TM(o,l),f=o&l,h=f_(this,t);if(!f){const _=new Lo().modify(t,n+su,r,s,i,a);return _?c.length>=vJ?NJ(t,u,_,o,c):new Xl(t,o|l,AJ(h,d,_,c)):this}const m=c[d],y=m.modify(t,n+su,r,s,i,a);if(m===y)return this;let g=o,p;if(ai(y)){if(g&=~l,!g)return new Lo;if(c.length<=2&&CJ(c[d^1]))return c[d^1];p=IM(h,d,c)}else p=Rl(h,d,y,c);return h?(this.mask=g,this.children=p,this):new Xl(t,g,p)}}class Xx{edit;size;children;_tag="ArrayNode";constructor(t,n,r){this.edit=t,this.size=n,this.children=r}modify(t,n,r,s,i,a){let o=this.size;const c=this.children,u=Ql(n,s),l=c[u],d=(l||new Lo).modify(t,n+su,r,s,i,a);if(l===d)return this;const f=f_(this,t);let h;if(ai(l)&&!ai(d))++o,h=Rl(f,u,d,c);else if(!ai(l)&&ai(d)){if(--o,o<=xJ)return PJ(t,o,u,c);h=Rl(f,u,new Lo,c)}else h=Rl(f,u,d,c);return f?(this.size=o,this.children=h,this):new Xx(t,o,h)}}function PJ(e,t,n,r){const s=new Array(t-1);let i=0,a=0;for(let o=0,c=r.length;o<c;++o)if(o!==n){const u=r[o];u&&!ai(u)&&(s[i++]=u,a|=1<<o)}return new Xl(e,a,s)}function NJ(e,t,n,r,s){const i=[];let a=r,o=0;for(let c=0;a;++c)a&1&&(i[c]=s[o++]),a>>>=1;return i[t]=n,new Xx(e,o+1,i)}function RJ(e,t,n,r,s,i){if(n===s)return new Qx(e,n,[i,r]);const a=Ql(t,n),o=Ql(t,s);if(a===o)return c=>new Xl(e,yl(a)|yl(o),[c]);{const c=a<o?[r,i]:[i,r];return new Xl(e,yl(a)|yl(o),c)}}function AM(e,t,n,r,s,i){let a,o=t;for(;;){const c=RJ(e,o,n,r,s,i);if(typeof c=="function")a=IJ(c,a),o=o+su;else{let u=c;for(;a!=null;)u=a.value(u),a=a.previous;return u}}}const CM="effect/HashMap",Mw=Symbol.for(CM),OJ={[Mw]:Mw,[Symbol.iterator](){return new h_(this,(e,t)=>[e,t])},[Ge](){let e=Ce(CM);for(const t of this)e^=F(Ce(t[0]),ot(Ce(t[1])));return Ht(this,e)},[Ke](e){if($J(e)){if(e._size!==this._size)return!1;for(const t of this){const n=F(e,eT(t[0],Ce(t[0])));if(xn(n))return!1;if(!je(t[1],n.value))return!1}return!0}return!1},toString(){return Dt(this.toJSON())},toJSON(){return{_id:"HashMap",values:Array.from(this).map(Yt)}},[gt](){return this.toJSON()},pipe(){return Se(this,arguments)}},Zx=(e,t,n,r)=>{const s=Object.create(OJ);return s._editable=e,s._edit=t,s._root=n,s._size=r,s};class h_{map;f;v;constructor(t,n){this.map=t,this.f=n,this.v=PM(this.map._root,this.f,void 0)}next(){if(xn(this.v))return{done:!0,value:void 0};const t=this.v.value;return this.v=bb(t.cont),{done:!1,value:t.value}}[Symbol.iterator](){return new h_(this.map,this.f)}}const bb=e=>e?NM(e[0],e[1],e[2],e[3],e[4]):fe(),PM=(e,t,n=void 0)=>{switch(e._tag){case"LeafNode":return ft(e.value)?ye({value:t(e.key,e.value.value),cont:n}):bb(n);case"CollisionNode":case"ArrayNode":case"IndexedNode":{const r=e.children;return NM(r.length,r,0,t,n)}default:return bb(n)}},NM=(e,t,n,r,s)=>{for(;n<e;){const i=t[n++];if(i&&!ai(i))return PM(i,r,[e,t,n,r,s])}return bb(s)},LJ=Zx(!1,0,new Lo,0),m_=()=>LJ,DJ=e=>{const t=OM(m_());for(const n of e)Hh(t,n[0],n[1]);return zJ(t)},$J=e=>Ne(e,Mw),MJ=e=>e&&ai(e._root),jJ=P(2,(e,t)=>eT(e,t,Ce(t))),eT=P(3,(e,t,n)=>{let r=e._root,s=0;for(;;)switch(r._tag){case"LeafNode":return je(t,r.key)?r.value:fe();case"CollisionNode":{if(n===r.hash){const i=r.children;for(let a=0,o=i.length;a<o;++a){const c=i[a];if("key"in c&&je(t,c.key))return c.value}}return fe()}case"IndexedNode":{const i=Ql(s,n),a=yl(i);if(r.mask&a){r=r.children[TM(r.mask,a)],s+=su;break}return fe()}case"ArrayNode":{if(r=r.children[Ql(s,n)],r){s+=su;break}return fe()}default:return fe()}}),FJ=P(2,(e,t)=>ft(eT(e,t,Ce(t)))),Hh=P(3,(e,t,n)=>tT(e,t,()=>ye(n))),BJ=P(3,(e,t,n)=>e._editable?(e._root=t,e._size=n,e):t===e._root?e:Zx(e._editable,e._edit,t,n)),RM=e=>new h_(e,t=>t),jw=e=>e._size,OM=e=>Zx(!0,e._edit+1,e._root,e._size),zJ=e=>(e._editable=!1,e),tT=P(3,(e,t,n)=>UJ(e,t,Ce(t),n)),UJ=P(4,(e,t,n,r)=>{const s={value:e._size},i=e._root.modify(e._editable?e._edit:NaN,0,r,n,t,s);return F(e,BJ(i,s.value))}),U2=P(2,(e,t)=>tT(e,t,fe)),VJ=P(2,(e,t)=>p_(e,m_(),(n,r,s)=>Hh(n,s,t(r,s)))),LM=P(2,(e,t)=>p_(e,void 0,(n,r,s)=>t(r,s))),p_=P(3,(e,t,n)=>{const r=e._root;if(r._tag==="LeafNode")return ft(r.value)?n(t,r.value.value,r.key):t;if(r._tag==="EmptyNode")return t;const s=[r.children];let i;for(;i=s.pop();)for(let a=0,o=i.length;a<o;){const c=i[a++];c&&!ai(c)&&(c._tag==="LeafNode"?ft(c.value)&&(t=n(t,c.value.value,c.key)):s.push(c.children))}return t}),DM="effect/HashSet",Fw=Symbol.for(DM),HJ={[Fw]:Fw,[Symbol.iterator](){return RM(this._keyMap)},[Ge](){return Ht(this,ot(Ce(this._keyMap))(Ce(DM)))},[Ke](e){return qJ(e)?jw(this._keyMap)===jw(e._keyMap)&&je(this._keyMap,e._keyMap):!1},toString(){return Dt(this.toJSON())},toJSON(){return{_id:"HashSet",values:Array.from(this).map(Yt)}},[gt](){return this.toJSON()},pipe(){return Se(this,arguments)}},g_=e=>{const t=Object.create(HJ);return t._keyMap=e,t},qJ=e=>Ne(e,Fw),GJ=g_(m_()),b_=()=>GJ,KJ=e=>{const t=nT(b_());for(const n of e)qh(t,n);return rT(t)},WJ=(...e)=>{const t=nT(b_());for(const n of e)qh(t,n);return rT(t)},JJ=P(2,(e,t)=>FJ(e._keyMap,t)),YJ=e=>jw(e._keyMap),nT=e=>g_(OM(e._keyMap)),rT=e=>(e._keyMap._editable=!1,e),$M=P(2,(e,t)=>{const n=nT(e);return t(n),rT(n)}),qh=P(2,(e,t)=>e._keyMap._editable?(Hh(t,!0)(e._keyMap),e):g_(Hh(t,!0)(e._keyMap))),MM=P(2,(e,t)=>e._keyMap._editable?(U2(t)(e._keyMap),e):g_(U2(t)(e._keyMap))),QJ=P(2,(e,t)=>$M(e,n=>{for(const r of t)MM(n,r)})),XJ=P(2,(e,t)=>$M(b_(),n=>{ZJ(e,r=>qh(n,r));for(const r of t)qh(n,r)})),ZJ=P(2,(e,t)=>LM(e._keyMap,(n,r)=>t(r))),eY=P(3,(e,t,n)=>p_(e._keyMap,t,(r,s,i)=>n(r,i))),iu=b_,tY=KJ,sT=WJ,jM=JJ,iT=YJ,oh=qh,FM=MM,V2=QJ,Gh=XJ,Kh=eY,xd="Die",au="Empty",vu="Fail",Td="Interrupt",Zl="Parallel",ed="Sequential",BM="effect/Cause",zM=Symbol.for(BM),nY={_E:e=>e},Id={[zM]:nY,[Ge](){return F(Ce(BM),ot(Ce(hY(this))),Ht(this))},[Ke](e){return rY(e)&&fY(this,e)},pipe(){return Se(this,arguments)},toJSON(){switch(this._tag){case"Empty":return{_id:"Cause",_tag:this._tag};case"Die":return{_id:"Cause",_tag:this._tag,defect:Yt(this.defect)};case"Interrupt":return{_id:"Cause",_tag:this._tag,fiberId:this.fiberId.toJSON()};case"Fail":return{_id:"Cause",_tag:this._tag,failure:Yt(this.error)};case"Sequential":case"Parallel":return{_id:"Cause",_tag:this._tag,left:Yt(this.left),right:Yt(this.right)}}},toString(){return Ad(this)},[gt](){return this.toJSON()}},Do=(()=>{const e=Object.create(Id);return e._tag=au,e})(),ou=e=>{const t=Object.create(Id);return t._tag=vu,t.error=e,t},Bs=e=>{const t=Object.create(Id);return t._tag=xd,t.defect=e,t},ni=e=>{const t=Object.create(Id);return t._tag=Td,t.fiberId=e,t},$o=(e,t)=>{const n=Object.create(Id);return n._tag=Zl,n.left=e,n.right=t,n},br=(e,t)=>{const n=Object.create(Id);return n._tag=ed,n.left=e,n.right=t,n},rY=e=>Ne(e,zM),sY=e=>e._tag===au,iY=e=>e._tag===vu,UM=e=>e._tag===xd,aY=e=>e._tag===au?!0:td(e,!0,(t,n)=>{switch(n._tag){case au:return ye(t);case xd:case vu:case Td:return ye(!1);default:return fe()}}),VM=e=>ft(cY(e)),y_=e=>__(void 0,pY)(e),oY=e=>ja(td(e,dr(),(t,n)=>n._tag===vu?ye(F(t,wr(n.error))):fe())),HM=e=>ja(td(e,dr(),(t,n)=>n._tag===xd?ye(F(t,wr(n.defect))):fe())),aT=e=>td(e,iu(),(t,n)=>n._tag===Td?ye(F(t,oh(n.fiberId))):fe()),qM=e=>oT(e,t=>t._tag===vu?ye(t.error):fe()),GM=e=>{const t=qM(e);switch(t._tag){case"None":return Ue(e);case"Some":return Be(t.value)}},cY=e=>oT(e,t=>t._tag===Td?ye(t.fiberId):fe()),H2=e=>cT(e,{onEmpty:Do,onFail:()=>Do,onDie:Bs,onInterrupt:ni,onSequential:br,onParallel:$o}),uY=e=>cT(e,{onEmpty:Do,onFail:Bs,onDie:Bs,onInterrupt:ni,onSequential:br,onParallel:$o}),lY=P(2,(e,t)=>dY(e,n=>ou(t(n)))),dY=P(2,(e,t)=>cT(e,{onEmpty:Do,onFail:n=>t(n),onDie:n=>Bs(n),onInterrupt:n=>ni(n),onSequential:(n,r)=>br(n,r),onParallel:(n,r)=>$o(n,r)})),fY=(e,t)=>{let n=Tn(e),r=Tn(t);for(;Fa(n)&&Fa(r);){const[s,i]=F(zi(n),td([iu(),dr()],([c,u],l)=>{const[d,f]=Bw(l);return ye([F(c,Gh(d)),F(u,wn(f))])})),[a,o]=F(zi(r),td([iu(),dr()],([c,u],l)=>{const[d,f]=Bw(l);return ye([F(c,Gh(d)),F(u,wn(f))])}));if(!je(s,a))return!1;n=i,r=o}return!0},hY=e=>mY(Tn(e),dr()),mY=(e,t)=>{for(;;){const[n,r]=F(e,Hx([iu(),dr()],([i,a],o)=>{const[c,u]=Bw(o);return[F(i,Gh(c)),F(a,wn(u))]})),s=iT(n)>0?F(t,wr(n)):t;if(Kx(r))return ja(s);e=r,t=s}throw new Error(r_("Cause.flattenCauseLoop"))},oT=P(2,(e,t)=>{const n=[e];for(;n.length>0;){const r=n.pop(),s=t(r);switch(s._tag){case"None":{switch(r._tag){case ed:case Zl:{n.push(r.right),n.push(r.left);break}}break}case"Some":return s}}return fe()}),Bw=e=>{let t=e;const n=[];let r=iu(),s=dr();for(;t!==void 0;)switch(t._tag){case au:{if(n.length===0)return[r,s];t=n.pop();break}case vu:{if(r=oh(r,Ck(t._tag,t.error)),n.length===0)return[r,s];t=n.pop();break}case xd:{if(r=oh(r,Ck(t._tag,t.defect)),n.length===0)return[r,s];t=n.pop();break}case Td:{if(r=oh(r,Ck(t._tag,t.fiberId)),n.length===0)return[r,s];t=n.pop();break}case ed:{switch(t.left._tag){case au:{t=t.right;break}case ed:{t=br(t.left.left,br(t.left.right,t.right));break}case Zl:{t=$o(br(t.left.left,t.right),br(t.left.right,t.right));break}default:{s=wr(s,t.right),t=t.left;break}}break}case Zl:{n.push(t.right),t=t.left;break}}throw new Error(r_("Cause.evaluateCauseLoop"))},pY={emptyCase:$2,failCase:La,dieCase:La,interruptCase:$2,sequentialCase:(e,t,n)=>t&&n,parallelCase:(e,t,n)=>t&&n},q2="SequentialCase",G2="ParallelCase",cT=P(2,(e,{onDie:t,onEmpty:n,onFail:r,onInterrupt:s,onParallel:i,onSequential:a})=>__(e,void 0,{emptyCase:()=>n,failCase:(o,c)=>r(c),dieCase:(o,c)=>t(c),interruptCase:(o,c)=>s(c),sequentialCase:(o,c,u)=>a(c,u),parallelCase:(o,c,u)=>i(c,u)})),td=P(3,(e,t,n)=>{let r=t,s=e;const i=[];for(;s!==void 0;){const a=n(r,s);switch(r=ft(a)?a.value:r,s._tag){case ed:{i.push(s.right),s=s.left;break}case Zl:{i.push(s.right),s=s.left;break}default:{s=void 0;break}}s===void 0&&i.length>0&&(s=i.pop())}return r}),__=P(3,(e,t,n)=>{const r=[e],s=[];for(;r.length>0;){const a=r.pop();switch(a._tag){case au:{s.push(Ue(n.emptyCase(t)));break}case vu:{s.push(Ue(n.failCase(t,a.error)));break}case xd:{s.push(Ue(n.dieCase(t,a.defect)));break}case Td:{s.push(Ue(n.interruptCase(t,a.fiberId)));break}case ed:{r.push(a.right),r.push(a.left),s.push(Be({_tag:q2}));break}case Zl:{r.push(a.right),r.push(a.left),s.push(Be({_tag:G2}));break}}}const i=[];for(;s.length>0;){const a=s.pop();switch(a._tag){case"Left":{switch(a.left._tag){case q2:{const o=i.pop(),c=i.pop(),u=n.sequentialCase(t,o,c);i.push(u);break}case G2:{const o=i.pop(),c=i.pop(),u=n.parallelCase(t,o,c);i.push(u);break}}break}case"Right":{i.push(a.right);break}}}if(i.length===0)throw new Error("BUG: Cause.reduceWithContext - please report an issue at https://github.com/Effect-TS/effect/issues");return i.pop()}),Ad=(e,t)=>y_(e)?"All fibers interrupted without errors.":WM(e).map(function(n){return t?.renderErrorCause!==!0||n.cause===void 0?n.stack:`${n.stack} {
|
|
6
|
+
${KM(n.cause," ")}
|
|
7
|
+
}`}).join(`
|
|
8
|
+
`),KM=(e,t)=>{const n=e.stack.split(`
|
|
9
|
+
`);let r=`${t}[cause]: ${n[0]}`;for(let s=1,i=n.length;s<i;s++)r+=`
|
|
10
|
+
${t}${n[s]}`;return e.cause&&(r+=` {
|
|
11
|
+
${KM(e.cause,`${t} `)}
|
|
12
|
+
${t}}`),r};class yb extends globalThis.Error{span=void 0;constructor(t){const n=typeof t=="object"&&t!==null,r=Error.stackTraceLimit;Error.stackTraceLimit=1,super(gY(t),n&&"cause"in t&&typeof t.cause<"u"?{cause:new yb(t.cause)}:void 0),this.message===""&&(this.message="An error has occurred"),Error.stackTraceLimit=r,this.name=t instanceof Error?t.name:"Error",n&&(nd in t&&(this.span=t[nd]),Object.keys(t).forEach(s=>{s in this||(this[s]=t[s])})),this.stack=yY(`${this.name}: ${this.message}`,t instanceof Error&&t.stack?t.stack:"",this.span)}}const gY=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e!==null&&e instanceof Error)return e.message;try{if(Ne(e,"toString")&&Ed(e.toString)&&e.toString!==Object.prototype.toString&&e.toString!==globalThis.Array.prototype.toString)return e.toString()}catch{}return B$(e)},bY=/\((.*)\)/g,_b=$e("effect/Tracer/spanToTrace",()=>new WeakMap),yY=(e,t,n)=>{const r=[e],s=t.startsWith(e)?t.slice(e.length).split(`
|
|
13
|
+
`):t.split(`
|
|
14
|
+
`);for(let i=1;i<s.length;i++){if(s[i].includes(" at new BaseEffectError")||s[i].includes(" at new YieldableError")){i++;continue}if(s[i].includes("Generator.next")||s[i].includes("effect_internal_function"))break;r.push(s[i].replace(/at .*effect_instruction_i.*\((.*)\)/,"at $1").replace(/EffectPrimitive\.\w+/,"<anonymous>"))}if(n){let i=n,a=0;for(;i&&i._tag==="Span"&&a<10;){const o=_b.get(i);if(typeof o=="function"){const c=o();if(typeof c=="string"){const u=c.matchAll(bY);let l=!1;for(const[,d]of u)l=!0,r.push(` at ${i.name} (${d})`);l||r.push(` at ${i.name} (${c.replace(/^at /,"")})`)}else r.push(` at ${i.name}`)}else r.push(` at ${i.name}`);i=Pr(i.parent),a++}}return r.join(`
|
|
15
|
+
`)},nd=Symbol.for("effect/SpanAnnotation"),WM=e=>__(e,void 0,{emptyCase:()=>[],dieCase:(t,n)=>[new yb(n)],failCase:(t,n)=>[new yb(n)],interruptCase:()=>[],parallelCase:(t,n,r)=>[...n,...r],sequentialCase:(t,n,r)=>[...n,...r]}),zw=Symbol.for("effect/Duration"),JM=BigInt(0),K2=BigInt(24),Lp=BigInt(60),Uw=BigInt(1e3),W2=BigInt(1e6),J2=BigInt(1e9),_Y=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,bi=e=>{if(YM(e))return e;if(pi(e))return sd(e);if(n_(e))return Pk(e);if(Array.isArray(e)&&e.length===2&&e.every(pi))return e[0]===-1/0||e[1]===-1/0||Number.isNaN(e[0])||Number.isNaN(e[1])?rd:e[0]===1/0||e[1]===1/0?vY:Pk(BigInt(Math.round(e[0]*1e9))+BigInt(Math.round(e[1])));if(kn(e)){const t=_Y.exec(e);if(t){const[n,r,s]=t,i=Number(r);switch(s){case"nano":case"nanos":return Pk(BigInt(r));case"micro":case"micros":return xY(BigInt(r));case"milli":case"millis":return sd(i);case"second":case"seconds":return QM(i);case"minute":case"minutes":return TY(i);case"hour":case"hours":return IY(i);case"day":case"days":return AY(i);case"week":case"weeks":return CY(i)}}}throw new Error("Invalid DurationInput")},Y2={_tag:"Millis",millis:0},kY={_tag:"Infinity"},EY={[zw]:zw,[Ge](){return Ht(this,j$(this.value))},[Ke](e){return YM(e)&&$Y(this,e)},toString(){return`Duration(${jY(this)})`},toJSON(){switch(this.value._tag){case"Millis":return{_id:"Duration",_tag:"Millis",millis:this.value.millis};case"Nanos":return{_id:"Duration",_tag:"Nanos",hrtime:NY(this)};case"Infinity":return{_id:"Duration",_tag:"Infinity"}}},[gt](){return this.toJSON()},pipe(){return Se(this,arguments)}},ea=e=>{const t=Object.create(EY);return pi(e)?isNaN(e)||e<=0?t.value=Y2:Number.isFinite(e)?Number.isInteger(e)?t.value={_tag:"Millis",millis:e}:t.value={_tag:"Nanos",nanos:BigInt(Math.round(e*1e6))}:t.value=kY:e<=JM?t.value=Y2:t.value={_tag:"Nanos",nanos:e},t},YM=e=>Ne(e,zw),wY=e=>e.value._tag!=="Infinity",SY=e=>{switch(e.value._tag){case"Millis":return e.value.millis===0;case"Nanos":return e.value.nanos===JM;case"Infinity":return!1}},rd=ea(0),vY=ea(1/0),Pk=e=>ea(e),xY=e=>ea(e*Uw),sd=e=>ea(e),QM=e=>ea(e*1e3),TY=e=>ea(e*6e4),IY=e=>ea(e*36e5),AY=e=>ea(e*864e5),CY=e=>ea(e*6048e5),kb=e=>RY(e,{onMillis:t=>t,onNanos:t=>Number(t)/1e6}),PY=e=>{const t=bi(e);switch(t.value._tag){case"Infinity":throw new Error("Cannot convert infinite duration to nanos");case"Nanos":return t.value.nanos;case"Millis":return BigInt(Math.round(t.value.millis*1e6))}},NY=e=>{const t=bi(e);switch(t.value._tag){case"Infinity":return[1/0,0];case"Nanos":return[Number(t.value.nanos/J2),Number(t.value.nanos%J2)];case"Millis":return[Math.floor(t.value.millis/1e3),Math.round(t.value.millis%1e3*1e6)]}},RY=P(2,(e,t)=>{const n=bi(e);switch(n.value._tag){case"Nanos":return t.onNanos(n.value.nanos);case"Infinity":return t.onMillis(1/0);case"Millis":return t.onMillis(n.value.millis)}}),uT=P(3,(e,t,n)=>{const r=bi(e),s=bi(t);if(r.value._tag==="Infinity"||s.value._tag==="Infinity")return n.onMillis(kb(r),kb(s));if(r.value._tag==="Nanos"||s.value._tag==="Nanos"){const i=r.value._tag==="Nanos"?r.value.nanos:BigInt(Math.round(r.value.millis*1e6)),a=s.value._tag==="Nanos"?s.value.nanos:BigInt(Math.round(s.value.millis*1e6));return n.onNanos(i,a)}return n.onMillis(r.value.millis,s.value.millis)}),OY=(e,t)=>uT(e,t,{onMillis:(n,r)=>n===r,onNanos:(n,r)=>n===r}),LY=P(2,(e,t)=>uT(e,t,{onMillis:(n,r)=>n<=r,onNanos:(n,r)=>n<=r})),DY=P(2,(e,t)=>uT(e,t,{onMillis:(n,r)=>n>=r,onNanos:(n,r)=>n>=r})),$Y=P(2,(e,t)=>OY(bi(e),bi(t))),MY=e=>{const t=bi(e);if(t.value._tag==="Infinity")return{days:1/0,hours:1/0,minutes:1/0,seconds:1/0,millis:1/0,nanos:1/0};const n=PY(t),r=n/W2,s=r/Uw,i=s/Lp,a=i/Lp,o=a/K2;return{days:Number(o),hours:Number(a%K2),minutes:Number(i%Lp),seconds:Number(s%Lp),millis:Number(r%Uw),nanos:Number(n%W2)}},jY=e=>{const t=bi(e);if(t.value._tag==="Infinity")return"Infinity";if(SY(t))return"0";const n=MY(t),r=[];return n.days!==0&&r.push(`${n.days}d`),n.hours!==0&&r.push(`${n.hours}h`),n.minutes!==0&&r.push(`${n.minutes}m`),n.seconds!==0&&r.push(`${n.seconds}s`),n.millis!==0&&r.push(`${n.millis}ms`),n.nanos!==0&&r.push(`${n.nanos}ns`),r.join(" ")},Q2=Symbol.for("effect/MutableRef"),FY={[Q2]:Q2,toString(){return Dt(this.toJSON())},toJSON(){return{_id:"MutableRef",current:Yt(this.current)}},[gt](){return this.toJSON()},pipe(){return Se(this,arguments)}},Om=e=>{const t=Object.create(FY);return t.current=e,t},BY=P(3,(e,t,n)=>je(t,e.current)?(e.current=n,!0):!1),Cn=e=>e.current,Lm=P(2,(e,t)=>(e.current=t,e)),k_="effect/FiberId",cu=Symbol.for(k_),id="None",Vw="Runtime",Hw="Composite",zY=Xt(`${k_}-${id}`);let UY=class{[cu]=cu;_tag=id;id=-1;startTimeMillis=-1;[Ge](){return zY}[Ke](t){return lT(t)&&t._tag===id}toString(){return Dt(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag}}[gt](){return this.toJSON()}};class XM{id;startTimeMillis;[cu]=cu;_tag=Vw;constructor(t,n){this.id=t,this.startTimeMillis=n}[Ge](){return Ht(this,Xt(`${k_}-${this._tag}-${this.id}-${this.startTimeMillis}`))}[Ke](t){return lT(t)&&t._tag===Vw&&this.id===t.id&&this.startTimeMillis===t.startTimeMillis}toString(){return Dt(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,id:this.id,startTimeMillis:this.startTimeMillis}}[gt](){return this.toJSON()}}let VY=class{left;right;[cu]=cu;_tag=Hw;constructor(t,n){this.left=t,this.right=n}_hash;[Ge](){return F(Xt(`${k_}-${this._tag}`),ot(Ce(this.left)),ot(Ce(this.right)),Ht(this))}[Ke](t){return lT(t)&&t._tag===Hw&&je(this.left,t.left)&&je(this.right,t.right)}toString(){return Dt(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,left:Yt(this.left),right:Yt(this.right)}}[gt](){return this.toJSON()}};const ZM=new UY,lT=e=>Ne(e,cu),e6=P(2,(e,t)=>e._tag===id?t:t._tag===id?e:new VY(e,t)),HY=e=>F(e,Kh(ZM,(t,n)=>e6(n)(t))),Eb=e=>{switch(e._tag){case id:return iu();case Vw:return sT(e.id);case Hw:return F(Eb(e.left),Gh(Eb(e.right)))}},X2=$e(Symbol.for("effect/Fiber/Id/_fiberCounter"),()=>Om(0)),qY=(e,t)=>new XM(e,t),t6=e=>Array.from(Eb(e)).map(n=>`#${n}`).join(","),GY=()=>{const e=Cn(X2);return F(X2,Lm(e+1)),new XM(e,Date.now())},gs=ZM,ch=e6,KY=HY,n6=Eb,WY=qY,JY=t6,r6=GY,E_=m_,YY=DJ,QY=MJ,s6=jJ,i6=Hh,a6=RM,XY=tT,ZY=VJ,eQ=LM,o6=p_,Wh=Symbol.for("effect/List"),qw=e=>Tt(e),tQ=e=>nM(d_(e),qw),nQ=tQ(je),rQ={[Wh]:Wh,_tag:"Cons",toString(){return Dt(this.toJSON())},toJSON(){return{_id:"List",_tag:"Cons",values:qw(this).map(Yt)}},[gt](){return this.toJSON()},[Ke](e){return u6(e)&&this._tag===e._tag&&nQ(this,e)},[Ge](){return Ht(this,Cm(qw(this)))},[Symbol.iterator](){let e=!1,t=this;return{next(){if(e)return this.return();if(t._tag==="Nil")return e=!0,this.return();const n=t.head;return t=t.tail,{done:e,value:n}},return(n){return e||(e=!0),{done:!0,value:n}}}},pipe(){return Se(this,arguments)}},wb=(e,t)=>{const n=Object.create(rQ);return n.head=e,n.tail=t,n},sQ=Xt("Nil"),iQ={[Wh]:Wh,_tag:"Nil",toString(){return Dt(this.toJSON())},toJSON(){return{_id:"List",_tag:"Nil"}},[gt](){return this.toJSON()},[Ge](){return sQ},[Ke](e){return u6(e)&&this._tag===e._tag},[Symbol.iterator](){return{next(){return{done:!0,value:void 0}}}},pipe(){return Se(this,arguments)}},c6=Object.create(iQ),u6=e=>Ne(e,Wh),Da=e=>e._tag==="Nil",aQ=e=>e._tag==="Cons",oQ=()=>c6,uu=(e,t)=>wb(e,t),ad=oQ,dT=e=>wb(e,c6),cQ=P(2,(e,t)=>lQ(t,e)),uQ=P(2,(e,t)=>uu(t,e)),lQ=P(2,(e,t)=>{if(Da(e))return t;if(Da(t))return e;{const n=wb(t.head,e);let r=n,s=t.tail;for(;!Da(s);){const i=wb(s.head,e);r.tail=i,r=i,s=s.tail}return n}}),dQ=P(3,(e,t,n)=>{let r=t,s=e;for(;!Da(s);)r=n(r,s.head),s=s.tail;return r}),fQ=e=>{let t=ad(),n=e;for(;!Da(n);)t=uQ(t,n.head),n=n.tail;return t},fT=(function(){function e(t){t&&Object.assign(this,t)}return e.prototype=Dx,e})(),hQ=Symbol.for("effect/DifferContextPatch");function Z2(e){return e}const Dm={...fT.prototype,[hQ]:{_Value:Z2,_Patch:Z2}},mQ=Object.assign(Object.create(Dm),{_tag:"Empty"}),pQ=Object.create(mQ),l6=()=>pQ,gQ=Object.assign(Object.create(Dm),{_tag:"AndThen"}),bQ=(e,t)=>{const n=Object.create(gQ);return n.first=e,n.second=t,n},yQ=Object.assign(Object.create(Dm),{_tag:"AddService"}),_Q=(e,t)=>{const n=Object.create(yQ);return n.key=e,n.service=t,n},kQ=Object.assign(Object.create(Dm),{_tag:"RemoveService"}),EQ=e=>{const t=Object.create(kQ);return t.key=e,t},wQ=Object.assign(Object.create(Dm),{_tag:"UpdateService"}),SQ=(e,t)=>{const n=Object.create(wQ);return n.key=e,n.update=t,n},vQ=(e,t)=>{const n=new Map(e.unsafeMap);let r=l6();for(const[s,i]of t.unsafeMap.entries())if(n.has(s)){const a=n.get(s);n.delete(s),je(a,i)||(r=y0(SQ(s,()=>i))(r))}else n.delete(s),r=y0(_Q(s,i))(r);for(const[s]of n.entries())r=y0(EQ(s))(r);return r},y0=P(2,(e,t)=>bQ(e,t)),xQ=P(2,(e,t)=>{if(e._tag==="Empty")return t;let n=!1,r=Tn(e);const s=new Map(t.unsafeMap);for(;Fa(r);){const a=zi(r),o=Ca(r);switch(a._tag){case"Empty":{r=o;break}case"AddService":{s.set(a.key,a.service),r=o;break}case"AndThen":{r=wr(wr(o,a.second),a.first);break}case"RemoveService":{s.delete(a.key),r=o;break}case"UpdateService":{s.set(a.key,a.update(s.get(a.key))),n=!0,r=o;break}}}if(!n)return Ro(s);const i=new Map;for(const[a]of t.unsafeMap)s.has(a)&&(i.set(a,s.get(a)),s.delete(a));for(const[a,o]of s)i.set(a,o);return Ro(i)}),TQ=Symbol.for("effect/DifferHashSetPatch");function Nk(e){return e}const w_={...fT.prototype,[TQ]:{_Value:Nk,_Key:Nk,_Patch:Nk}},IQ=Object.assign(Object.create(w_),{_tag:"Empty"}),AQ=Object.create(IQ),d6=()=>AQ,CQ=Object.assign(Object.create(w_),{_tag:"AndThen"}),PQ=(e,t)=>{const n=Object.create(CQ);return n.first=e,n.second=t,n},NQ=Object.assign(Object.create(w_),{_tag:"Add"}),RQ=e=>{const t=Object.create(NQ);return t.value=e,t},OQ=Object.assign(Object.create(w_),{_tag:"Remove"}),LQ=e=>{const t=Object.create(OQ);return t.value=e,t},DQ=(e,t)=>{const[n,r]=Kh([e,d6()],([s,i],a)=>jM(a)(s)?[FM(a)(s),i]:[s,Gw(RQ(a))(i)])(t);return Kh(r,(s,i)=>Gw(LQ(i))(s))(n)},Gw=P(2,(e,t)=>PQ(e,t)),$Q=P(2,(e,t)=>{if(e._tag==="Empty")return t;let n=t,r=Tn(e);for(;Fa(r);){const s=zi(r),i=Ca(r);switch(s._tag){case"Empty":{r=i;break}case"AndThen":{r=wr(s.first)(wr(s.second)(i));break}case"Add":{n=oh(s.value)(n),r=i;break}case"Remove":n=FM(s.value)(n),r=i}}return n}),MQ=Symbol.for("effect/DifferReadonlyArrayPatch");function eP(e){return e}const $m={...fT.prototype,[MQ]:{_Value:eP,_Patch:eP}},jQ=Object.assign(Object.create($m),{_tag:"Empty"}),FQ=Object.create(jQ),f6=()=>FQ,BQ=Object.assign(Object.create($m),{_tag:"AndThen"}),zQ=(e,t)=>{const n=Object.create(BQ);return n.first=e,n.second=t,n},UQ=Object.assign(Object.create($m),{_tag:"Append"}),VQ=e=>{const t=Object.create(UQ);return t.values=e,t},HQ=Object.assign(Object.create($m),{_tag:"Slice"}),qQ=(e,t)=>{const n=Object.create(HQ);return n.from=e,n.until=t,n},GQ=Object.assign(Object.create($m),{_tag:"Update"}),KQ=(e,t)=>{const n=Object.create(GQ);return n.index=e,n.patch=t,n},WQ=e=>{let t=0,n=f6();for(;t<e.oldValue.length&&t<e.newValue.length;){const r=e.oldValue[t],s=e.newValue[t],i=e.differ.diff(r,s);je(i,e.differ.empty)||(n=_0(n,KQ(t,i))),t=t+1}return t<e.oldValue.length&&(n=_0(n,qQ(0,t))),t<e.newValue.length&&(n=_0(n,VQ(sJ(t)(e.newValue)))),n},_0=P(2,(e,t)=>zQ(e,t)),JQ=P(3,(e,t,n)=>{if(e._tag==="Empty")return t;let r=t.slice(),s=Qs(e);for(;Nl(s);){const i=Lr(s),a=ru(s);switch(i._tag){case"Empty":{s=a;break}case"AndThen":{a.unshift(i.first,i.second),s=a;break}case"Append":{for(const o of i.values)r.push(o);s=a;break}case"Slice":{r=r.slice(i.from,i.until),s=a;break}case"Update":{r[i.index]=n.patch(i.patch,r[i.index]),s=a;break}}}return r}),YQ=Symbol.for("effect/Differ"),QQ={[YQ]:{_P:ze,_V:ze},pipe(){return Se(this,arguments)}},Cd=e=>{const t=Object.create(QQ);return t.empty=e.empty,t.diff=e.diff,t.combine=e.combine,t.patch=e.patch,t},XQ=()=>Cd({empty:l6(),combine:(e,t)=>y0(t)(e),diff:(e,t)=>vQ(e,t),patch:(e,t)=>xQ(t)(e)}),ZQ=()=>Cd({empty:d6(),combine:(e,t)=>Gw(t)(e),diff:(e,t)=>DQ(e,t),patch:(e,t)=>$Q(t)(e)}),eX=e=>Cd({empty:f6(),combine:(t,n)=>_0(t,n),diff:(t,n)=>WQ({oldValue:t,newValue:n,differ:e}),patch:(t,n)=>JQ(t,n,e)}),h6=()=>tX((e,t)=>t),tX=e=>Cd({empty:ze,combine:(t,n)=>t===ze?n:n===ze?t:r=>n(t(r)),diff:(t,n)=>je(t,n)?ze:t_(n),patch:(t,n)=>e(n,t(n))}),Jh=255,m6=8,Kw=e=>e&Jh,Ww=e=>e>>m6&Jh,Mm=(e,t)=>(e&Jh)+((t&e&Jh)<<m6),nX=Mm(0,0),rX=e=>Mm(e,e),sX=e=>Mm(e,0),iX=P(2,(e,t)=>Mm(Kw(e)&~t,Ww(e))),aX=P(2,(e,t)=>e|t),oX=e=>~e>>>0&Jh,cX=0,xu=1,uX=2,p6=4,Jw=16,g6=32,lX=e=>S_(e,g6),dX=P(2,(e,t)=>e&~t),fX=P(2,(e,t)=>e|t),ao=e=>b6(e)&&!mX(e),b6=e=>S_(e,xu),S_=P(2,(e,t)=>(e&t)!==0),y6=(...e)=>e.reduce((t,n)=>t|n,0),hX=y6(cX),tP=e=>S_(e,p6),mX=e=>S_(e,Jw),_o=P(2,(e,t)=>Mm(e^t,t)),Ol=P(2,(e,t)=>e&(oX(Kw(t))|Ww(t))|Kw(t)&Ww(t)),nP=Cd({empty:nX,diff:(e,t)=>_o(e,t),combine:(e,t)=>aX(t)(e),patch:(e,t)=>Ol(t,e)}),pX=rX,_6=sX,rP=iX,k6=(e,t)=>({_tag:"Par",left:e,right:t}),Dp=(e,t)=>({_tag:"Seq",left:e,right:t}),gX=e=>{let t=dT(e),n=ad();for(;;){const[r,s]=dQ(t,[E6(),ad()],([i,a],o)=>{const[c,u]=bX(o);return[wX(i,c),cQ(a,u)]});if(n=yX(n,r),Da(s))return fQ(n);t=s}throw new Error("BUG: BlockedRequests.flatten - please report an issue at https://github.com/Effect-TS/effect/issues")},bX=e=>{let t=e,n=E6(),r=ad(),s=ad();for(;;)switch(t._tag){case"Empty":{if(Da(r))return[n,s];t=r.head,r=r.tail;break}case"Par":{r=uu(t.right,r),t=t.left;break}case"Seq":{const i=t.left,a=t.right;switch(i._tag){case"Empty":{t=a;break}case"Par":{const o=i.left,c=i.right;t=k6(Dp(o,a),Dp(c,a));break}case"Seq":{const o=i.left,c=i.right;t=Dp(o,Dp(c,a));break}case"Single":{t=i,s=uu(a,s);break}}break}case"Single":{if(n=EX(n,t),Da(r))return[n,s];t=r.head,r=r.tail;break}}throw new Error("BUG: BlockedRequests.step - please report an issue at https://github.com/Effect-TS/effect/issues")},yX=(e,t)=>{if(Da(e))return dT(Rk(t));if(SX(t))return e;const n=CX(e.head),r=vX(t);return n.length===1&&r.length===1&&je(n[0],r[0])?uu(AX(e.head,Rk(t)),e.tail):uu(Rk(t),e)},_X=Symbol.for("effect/RequestBlock/RequestBlockParallel"),kX={_R:e=>e};class hT{map;[_X]=kX;constructor(t){this.map=t}}const E6=()=>new hT(E_()),EX=(e,t)=>new hT(XY(e.map,t.dataSource,n=>NW(Wr(n,$w(t.blockedRequest)),()=>Tn(t.blockedRequest)))),wX=(e,t)=>new hT(o6(e.map,t.map,(n,r,s)=>i6(n,s,hn(s6(n,s),{onNone:()=>r,onSome:i=>wn(r,i)})))),SX=e=>QY(e.map),vX=e=>Array.from(a6(e.map)),Rk=e=>IX(ZY(e.map,t=>Tn(t))),xX=Symbol.for("effect/RequestBlock/RequestBlockSequential"),TX={_R:e=>e};class w6{map;[xX]=TX;constructor(t){this.map=t}}const IX=e=>new w6(e),AX=(e,t)=>new w6(o6(t.map,e.map,(n,r,s)=>i6(n,s,hn(s6(n,s),{onNone:()=>dr(),onSome:i=>wn(i,r)})))),CX=e=>Array.from(a6(e.map)),PX=e=>Array.from(e.map),jm="Pending",v_="Done",NX="effect/Deferred",RX=Symbol.for(NX),OX={_E:e=>e,_A:e=>e},LX=e=>({_tag:jm,joiners:e}),S6=e=>({_tag:v_,effect:e});class Fm{self;called=!1;constructor(t){this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new Fm(this.self)}}const v6=(e,t)=>{const n=new In("Blocked");return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n},DX=e=>{const t=new In("RunBlocked");return t.effect_instruction_i0=e,t},lu=Symbol.for("effect/Effect");class $X{patch;op;_op=Ox;constructor(t,n){this.patch=t,this.op=n}}class In{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[lu]=Jl;constructor(t){this._op=t}[Ke](t){return this===t}[Ge](){return Ht(this,Cx(this))}pipe(){return Se(this,arguments)}toJSON(){return{_id:"Effect",_op:this._op,effect_instruction_i0:Yt(this.effect_instruction_i0),effect_instruction_i1:Yt(this.effect_instruction_i1),effect_instruction_i2:Yt(this.effect_instruction_i2)}}toString(){return Dt(this.toJSON())}[gt](){return this.toJSON()}[Symbol.iterator](){return new Fm(new Am(this))}}class x6{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[lu]=Jl;constructor(t){this._op=t,this._tag=t}[Ke](t){return L_(t)&&t._op==="Failure"&&je(this.effect_instruction_i0,t.effect_instruction_i0)}[Ge](){return F(Xt(this._tag),ot(Ce(this.effect_instruction_i0)),Ht(this))}get cause(){return this.effect_instruction_i0}pipe(){return Se(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,cause:this.cause.toJSON()}}toString(){return Dt(this.toJSON())}[gt](){return this.toJSON()}[Symbol.iterator](){return new Fm(new Am(this))}}class T6{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[lu]=Jl;constructor(t){this._op=t,this._tag=t}[Ke](t){return L_(t)&&t._op==="Success"&&je(this.effect_instruction_i0,t.effect_instruction_i0)}[Ge](){return F(Xt(this._tag),ot(Ce(this.effect_instruction_i0)),Ht(this))}get value(){return this.effect_instruction_i0}pipe(){return Se(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,value:Yt(this.value)}}toString(){return Dt(this.toJSON())}[gt](){return this.toJSON()}[Symbol.iterator](){return new Fm(new Am(this))}}const Ua=e=>Ne(e,lu),yt=e=>{const t=new In(V$);return t.effect_instruction_i0=e,t},I6=P(3,(e,t,n)=>_i(r=>ue(e,s=>ue(ko(qe(()=>r(t(s)))),i=>qe(()=>n(s,i)).pipe(Us({onFailure:a=>{switch(i._tag){case Qn:return $n(br(i.effect_instruction_i0,a));case Xn:return $n(a)}},onSuccess:()=>i})))))),$r=P(2,(e,t)=>ue(e,()=>_e(t))),Vs=e=>$r(e,void 0),A6=function(){const e=new In(o_);switch(arguments.length){case 2:{e.effect_instruction_i0=arguments[0],e.commit=arguments[1];break}case 3:{e.effect_instruction_i0=arguments[0],e.effect_instruction_i1=arguments[1],e.commit=arguments[2];break}case 4:{e.effect_instruction_i0=arguments[0],e.effect_instruction_i1=arguments[1],e.effect_instruction_i2=arguments[2],e.commit=arguments[3];break}default:throw new Error(r_("you're not supposed to end up here"))}return e},Sb=(e,t=gs)=>{const n=new In(sh);let r;return n.effect_instruction_i0=s=>{r=e(s)},n.effect_instruction_i1=t,zm(n,s=>Ua(r)?r:Rt)},fo=(e,t=gs)=>qe(()=>Sb(e,t)),yi=(e,t=gs)=>A6(e,function(){let n,r;function s(c){n?n(c):r===void 0&&(r=c)}const i=new In(sh);i.effect_instruction_i0=c=>{n=c,r&&c(r)},i.effect_instruction_i1=t;let a,o;return this.effect_instruction_i0.length!==1?(o=new AbortController,a=or(()=>this.effect_instruction_i0(s,o.signal))):a=or(()=>this.effect_instruction_i0(s)),a||o?zm(i,c=>(o&&o.abort(),a??Rt)):i}),C6=P(2,(e,t)=>{const n=new In(p0);return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n}),Yh=P(2,(e,t)=>Ba(e,{onFailure:t,onSuccess:_e})),sP=Symbol.for("effect/OriginalAnnotation"),mT=(e,t)=>ft(t)?new Proxy(e,{has(n,r){return r===nd||r===sP||r in n},get(n,r){return r===nd?t.value:r===sP?e:n[r]}}):e,ho=e=>_s(e)&&!(nd in e)?yt(t=>$n(Bs(mT(e,CT(t))))):$n(Bs(e)),P6=e=>N6(()=>Bs(new pZ(e))),od=e=>Ba(e,{onFailure:t=>_e(Be(t)),onSuccess:t=>_e(Ue(t))}),ko=e=>R6(e,{onFailure:Pt,onSuccess:Nt}),un=e=>_s(e)&&!(nd in e)?yt(t=>$n(ou(mT(e,CT(t))))):$n(ou(e)),x_=e=>ue(pe(e),un),$n=e=>{const t=new x6(Qn);return t.effect_instruction_i0=e,t},N6=e=>ue(pe(e),$n),T_=yt(e=>_e(e.id())),Bm=e=>yt(t=>e(t.id())),ue=P(2,(e,t)=>{const n=new In(lb);return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n}),MX=e=>{const t=new In("OnStep");return t.effect_instruction_i0=e,t},I_=e=>ue(e,ze),R6=P(2,(e,t)=>Us(e,{onFailure:n=>_e(t.onFailure(n)),onSuccess:n=>_e(t.onSuccess(n))})),Us=P(2,(e,t)=>{const n=new In(db);return n.effect_instruction_i0=e,n.effect_instruction_i1=t.onFailure,n.effect_instruction_i2=t.onSuccess,n}),Ba=P(2,(e,t)=>Us(e,{onFailure:n=>{if(HM(n).length>0)return $n(uY(n));const s=oY(n);return s.length>0?t.onFailure(Jx(s)):$n(n)},onSuccess:t.onSuccess})),Pa=P(2,(e,t)=>qe(()=>{const n=Tt(e),r=l_(n.length);let s=0;return $r(yT({while:()=>s<n.length,body:()=>t(n[s],s),step:i=>{r[s++]=i}}),r)})),A_=P(2,(e,t)=>qe(()=>{const n=Tt(e);let r=0;return yT({while:()=>r<n.length,body:()=>t(n[r],r),step:()=>{r++}})})),Ea=ue(T_,e=>O6(e)),O6=e=>$n(ni(e)),pT=e=>{const t=new In(wd);return t.effect_instruction_i0=pX(xu),t.effect_instruction_i1=()=>e,t},L6=P(2,(e,t)=>_i(n=>ue(ko(n(e)),r=>Q6(t,r)))),Xe=P(2,(e,t)=>ue(e,n=>pe(()=>t(n)))),D6=P(2,(e,t)=>Ba(e,{onFailure:n=>x_(()=>t.onFailure(n)),onSuccess:n=>pe(()=>t.onSuccess(n))})),C_=P(2,(e,t)=>Us(e,{onFailure:n=>{const r=GM(n);switch(r._tag){case"Left":return x_(()=>t(r.left));case"Right":return $n(r.right)}},onSuccess:_e})),du=P(2,(e,t)=>_i(n=>Us(n(e),{onFailure:r=>{const s=Pt(r);return Us(t(s),{onFailure:i=>Pt(br(r,i)),onSuccess:()=>s})},onSuccess:r=>{const s=Nt(r);return rn(t(s),s)}}))),zm=P(2,(e,t)=>du(e,D_({onFailure:n=>y_(n)?Vs(t(aT(n))):Rt,onSuccess:()=>Rt}))),jX=e=>FX(e,ze),FX=P(2,(e,t)=>Ba(e,{onFailure:n=>ho(t(n)),onSuccess:_e})),BX=yt((e,t)=>_e(t.runtimeFlags)),_e=e=>{const t=new T6(Xn);return t.effect_instruction_i0=e,t},qe=e=>{const t=new In(o_);return t.commit=e,t},pe=e=>{const t=new In(U$);return t.effect_instruction_i0=e,t},gT=P(e=>e.length===3||e.length===2&&!(_s(e[1])&&"onlyEffect"in e[1]),(e,t)=>ue(e,n=>{const r=typeof t=="function"?t(n):t;return Ua(r)?$r(r,n):mK(r)?Sb(s=>{r.then(i=>s(_e(n)),i=>s(un(new vT(i,"An unknown error occurred in Effect.tap"))))}):_e(n)})),zX=e=>yt(t=>{const n=t.getFiberRef(Xw),r=F(n,Kt(()=>t.scope()));return e(Pd(Xw,ye(r)))}),Um=e=>{const t=new In(wd);return t.effect_instruction_i0=_6(xu),t.effect_instruction_i1=()=>e,t},_i=e=>A6(e,function(){const t=new In(wd);return t.effect_instruction_i0=_6(xu),t.effect_instruction_i1=n=>b6(n)?or(()=>this.effect_instruction_i0(pT)):or(()=>this.effect_instruction_i0(Um)),t}),Rt=_e(void 0),$6=e=>{const t=new In(wd);return t.effect_instruction_i0=e,t.effect_instruction_i1=void 0,t},bT=P(2,(e,t)=>ue(t,n=>n?F(e,Xe(ye)):_e(fe()))),yT=e=>{const t=new In(fb);return t.effect_instruction_i0=e.while,t.effect_instruction_i1=e.body,t.effect_instruction_i2=e.step,t},Yw=e=>qe(()=>{const t=new In(ih);return t.effect_instruction_i0=e(),t}),M6=function(){const e=arguments.length===1?arguments[0]:arguments[1].bind(arguments[0]);return Yw(()=>e(F))},j6=(e,...t)=>Object.defineProperty(t.length===0?function(...n){return Yw(()=>e.apply(this,n))}:function(...n){let r=Yw(()=>e.apply(this,n));for(const s of t)r=s(r,...n);return r},"length",{value:e.length,configurable:!0}),UX=P(2,(e,t)=>{const n=new In(wd);return n.effect_instruction_i0=t,n.effect_instruction_i1=()=>e,n}),_T=e=>{const t=new In(g0);return typeof e?.priority<"u"?aZ(t,e.priority):t},P_=P(2,(e,t)=>ue(e,n=>Xe(t,r=>[n,r]))),N_=P(2,(e,t)=>ue(e,n=>$r(t,n))),rn=P(2,(e,t)=>ue(e,()=>t)),F6=P(3,(e,t,n)=>ue(e,r=>Xe(t,s=>n(r,s)))),VX=fo(()=>{const e=setInterval(()=>{},2147483647);return pe(()=>clearInterval(e))}),kT=e=>ue(T_,t=>F(e,Qh(t))),Qh=P(2,(e,t)=>ue(e.interruptAsFork(t),()=>e.await)),HX={_tag:"All",syslog:0,label:"ALL",ordinal:Number.MIN_SAFE_INTEGER,pipe(){return Se(this,arguments)}},qX={_tag:"Fatal",syslog:2,label:"FATAL",ordinal:5e4,pipe(){return Se(this,arguments)}},GX={_tag:"Error",syslog:3,label:"ERROR",ordinal:4e4,pipe(){return Se(this,arguments)}},B6={_tag:"Warning",syslog:4,label:"WARN",ordinal:3e4,pipe(){return Se(this,arguments)}},z6={_tag:"Info",syslog:6,label:"INFO",ordinal:2e4,pipe(){return Se(this,arguments)}},U6={_tag:"Debug",syslog:7,label:"DEBUG",ordinal:1e4,pipe(){return Se(this,arguments)}},KX={_tag:"Trace",syslog:7,label:"TRACE",ordinal:0,pipe(){return Se(this,arguments)}},WX={_tag:"None",syslog:7,label:"OFF",ordinal:Number.MAX_SAFE_INTEGER,pipe(){return Se(this,arguments)}},JX="effect/FiberRef",YX=Symbol.for(JX),QX={_A:e=>e},ET=e=>yt(t=>Nt(t.getFiberRef(e))),R_=P(2,(e,t)=>ue(ET(e),t)),iP=P(2,(e,t)=>XX(e,()=>[void 0,t])),XX=P(2,(e,t)=>yt(n=>{const[r,s]=t(n.getFiberRef(e));return n.setFiberRef(e,s),_e(r)})),Pd=P(3,(e,t,n)=>I6(N_(ET(t),iP(t,n)),()=>e,r=>iP(t,r))),ZX=P(3,(e,t,n)=>R_(t,r=>Pd(e,t,n(r)))),jn=(e,t)=>Nd(e,{differ:h6(),fork:t?.fork??ze,join:t?.join}),eZ=e=>{const t=ZQ();return Nd(e,{differ:t,fork:t.empty})},tZ=e=>{const t=eX(h6());return Nd(e,{differ:t,fork:t.empty})},V6=e=>{const t=XQ();return Nd(e,{differ:t,fork:t.empty})},Nd=(e,t)=>({...Rm,[YX]:QX,initial:e,commit(){return ET(this)},diff:(r,s)=>t.differ.diff(r,s),combine:(r,s)=>t.differ.combine(r,s),patch:r=>s=>t.differ.patch(r,s),fork:t.fork,join:t.join??((r,s)=>s)}),nZ=e=>Nd(e,{differ:nP,fork:nP.empty}),ta=$e(Symbol.for("effect/FiberRef/currentContext"),()=>V6(gi())),Rd=$e(Symbol.for("effect/FiberRef/currentSchedulingPriority"),()=>jn(0)),H6=$e(Symbol.for("effect/FiberRef/currentMaxOpsBeforeYield"),()=>jn(2048)),rZ=$e(Symbol.for("effect/FiberRef/currentLogAnnotation"),()=>jn(E_())),sZ=$e(Symbol.for("effect/FiberRef/currentLogLevel"),()=>jn(z6)),iZ=$e(Symbol.for("effect/FiberRef/currentLogSpan"),()=>jn(ad())),aZ=P(2,(e,t)=>Pd(e,Rd,t)),oZ=$e(Symbol.for("effect/FiberRef/currentConcurrency"),()=>jn("unbounded")),cZ=$e(Symbol.for("effect/FiberRef/currentRequestBatching"),()=>jn(!0)),uZ=$e(Symbol.for("effect/FiberRef/currentUnhandledErrorLogLevel"),()=>jn(ye(U6))),lZ=$e(Symbol.for("effect/FiberRef/versionMismatchErrorLogLevel"),()=>jn(ye(B6))),Qw=$e(Symbol.for("effect/FiberRef/currentMetricLabels"),()=>tZ(Oo())),Xw=$e(Symbol.for("effect/FiberRef/currentForkScopeOverride"),()=>jn(fe(),{fork:()=>fe(),join:(e,t)=>e})),$p=$e(Symbol.for("effect/FiberRef/currentInterruptedCause"),()=>jn(Do,{fork:()=>Do,join:(e,t)=>e})),q6=$e(Symbol.for("effect/FiberRef/currentTracerEnabled"),()=>jn(!0)),G6=$e(Symbol.for("effect/FiberRef/currentTracerTiming"),()=>jn(!0)),dZ=$e(Symbol.for("effect/FiberRef/currentTracerSpanAnnotations"),()=>jn(E_())),fZ=$e(Symbol.for("effect/FiberRef/currentTracerSpanLinks"),()=>jn(dr())),aP=Symbol.for("effect/Scope"),oP=Symbol.for("effect/CloseableScope"),K6=(e,t)=>e.addFinalizer(()=>Vs(t)),vb=(e,t)=>e.addFinalizer(t),Zw=(e,t)=>e.close(t),Ia=(e,t)=>e.fork(t),hZ=e=>mZ(ze)(e),mZ=P(2,(e,t)=>{const n=F(e,qM,Wr(t));switch(n._tag){case"None":return F(HM(e),Wx,hn({onNone:()=>{const r=Tt(aT(e)).flatMap(s=>Tt(n6(s)).map(i=>`#${i}`));return new gZ(r?`Interrupted by fibers: ${r.join(", ")}`:void 0)},onSome:ze}));case"Some":return n.value}}),wT=(function(){class e extends globalThis.Error{commit(){return un(this)}toJSON(){const n={...this};return this.message&&(n.message=this.message),this.cause&&(n.cause=this.cause),n}[gt](){return this.toString!==globalThis.Error.prototype.toString?this.stack?`${this.toString()}
|
|
16
|
+
${this.stack.split(`
|
|
17
|
+
`).slice(1).join(`
|
|
18
|
+
`)}`:this.toString():"Bun"in globalThis?Ad(ou(this),{renderErrorCause:!0}):this}}return Object.assign(e.prototype,FK),e})(),ST=(e,t)=>{class n extends wT{_tag=t}return Object.assign(n.prototype,e),n.prototype.name=t,n},cP=Symbol.for("effect/Cause/errors/RuntimeException"),pZ=ST({[cP]:cP},"RuntimeException"),eS=Symbol.for("effect/Cause/errors/InterruptedException"),gZ=ST({[eS]:eS},"InterruptedException"),bZ=e=>Ne(e,eS),uP=Symbol.for("effect/Cause/errors/NoSuchElement"),O_=ST({[uP]:uP},"NoSuchElementException"),lP=Symbol.for("effect/Cause/errors/UnknownException"),vT=(function(){class e extends wT{_tag="UnknownException";error;constructor(n,r){super(r??"An unknown error occurred",{cause:n}),this.error=n}}return Object.assign(e.prototype,{[lP]:lP,name:"UnknownException"}),e})(),L_=e=>Ua(e)&&"_tag"in e&&(e._tag==="Success"||e._tag==="Failure"),W6=e=>e._tag==="Failure",yZ=e=>e._tag==="Success",k0=P(2,(e,t)=>{switch(e._tag){case Qn:return Pt(e.effect_instruction_i0);case Xn:return Nt(t)}}),Ok=e=>k0(e,void 0),Ll=(e,t)=>SZ(e,t?.parallel?$o:br),J6=e=>Pt(Bs(e)),Xh=e=>Pt(ou(e)),Pt=e=>{const t=new x6(Qn);return t.effect_instruction_i0=e,t},_Z=P(2,(e,t)=>{switch(e._tag){case Qn:return Pt(e.effect_instruction_i0);case Xn:return t(e.effect_instruction_i0)}}),kZ=e=>F(e,_Z(ze)),EZ=e=>Pt(ni(e)),E0=P(2,(e,t)=>{switch(e._tag){case Qn:return Pt(e.effect_instruction_i0);case Xn:return Nt(t(e.effect_instruction_i0))}}),D_=P(2,(e,{onFailure:t,onSuccess:n})=>{switch(e._tag){case Qn:return t(e.effect_instruction_i0);case Xn:return n(e.effect_instruction_i0)}}),tS=P(2,(e,{onFailure:t,onSuccess:n})=>{switch(e._tag){case Qn:return t(e.effect_instruction_i0);case Xn:return n(e.effect_instruction_i0)}}),Nt=e=>{const t=new T6(Xn);return t.effect_instruction_i0=e,t},yr=Nt(void 0),wZ=P(2,(e,t)=>xT(e,t,{onSuccess:(n,r)=>[n,r],onFailure:br})),Y6=P(2,(e,t)=>xT(e,t,{onSuccess:(n,r)=>r,onFailure:br})),xT=P(3,(e,t,{onFailure:n,onSuccess:r})=>{switch(e._tag){case Qn:switch(t._tag){case Xn:return Pt(e.effect_instruction_i0);case Qn:return Pt(n(e.effect_instruction_i0,t.effect_instruction_i0))}case Xn:switch(t._tag){case Xn:return Nt(r(e.effect_instruction_i0,t.effect_instruction_i0));case Qn:return Pt(t.effect_instruction_i0)}}}),SZ=(e,t)=>{const n=Yl(e);return Fa(n)?F(Ca(n),Hx(F(zi(n),E0(Tn)),(r,s)=>F(r,xT(s,{onSuccess:(i,a)=>F(i,wr(a)),onFailure:t}))),E0(ja),E0(r=>Fs(r)),ye):fe()},$_=e=>({...Rm,[RX]:OX,state:Om(LX([])),commit(){return Mo(this)},blockingOn:e}),M_=()=>ue(T_,e=>vZ(e)),vZ=e=>pe(()=>$_(e)),Mo=e=>fo(t=>{const n=Cn(e.state);switch(n._tag){case v_:return t(n.effect);case jm:return n.joiners.push(t),TZ(e,t)}},e.blockingOn),j_=P(2,(e,t)=>pe(()=>{const n=Cn(e.state);switch(n._tag){case v_:return!1;case jm:{Lm(e.state,S6(t));for(let r=0,s=n.joiners.length;r<s;r++)n.joiners[r](t);return!0}}})),Q6=P(2,(e,t)=>j_(e,t)),X6=P(2,(e,t)=>j_(e,$n(t))),Z6=P(2,(e,t)=>j_(e,O6(t))),xZ=e=>pe(()=>Cn(e.state)._tag===v_),TT=P(2,(e,t)=>j_(e,_e(t))),F_=(e,t)=>{const n=Cn(e.state);if(n._tag===jm){Lm(e.state,S6(t));for(let r=0,s=n.joiners.length;r<s;r++)n.joiners[r](t)}},TZ=(e,t)=>pe(()=>{const n=Cn(e.state);if(n._tag===jm){const r=n.joiners.indexOf(t);r>=0&&n.joiners.splice(r,1)}}),IZ=yt(e=>Nt(e.currentContext)),IT=()=>IZ,Tu=e=>ue(IT(),e),B_=P(2,(e,t)=>Pd(ta,t)(e)),AT=P(2,(e,t)=>ZX(ta,n=>Xr(n,t))(e)),ej=P(2,(e,t)=>Tu(n=>B_(e,t(n)))),CT=e=>{const t=e.currentSpan;return t!==void 0&&t._tag==="Span"?ye(t):fe()},AZ={_tag:"Span",spanId:"noop",traceId:"noop",sampled:!1,status:{_tag:"Ended",startTime:BigInt(0),endTime:BigInt(0),exit:yr},attributes:new Map,links:[],kind:"internal",attribute(){},event(){},end(){},addLinks(){}},CZ=e=>Object.assign(Object.create(AZ),e),PZ="effect/Clock",dP=Symbol.for(PZ),Od=Ko("effect/Clock"),NZ=2**31-1,fP={unsafeSchedule(e,t){const n=kb(t);if(n>NZ)return La;let r=!1;const s=setTimeout(()=>{r=!0,e()},n);return()=>(clearTimeout(s),!r)}},hP=(function(){const e=BigInt(1e6);if(typeof performance>"u"||typeof performance.now!="function")return()=>BigInt(Date.now())*e;let t;return()=>(t===void 0&&(t=BigInt(Date.now())*e-BigInt(Math.round(performance.now()*1e6))),t+BigInt(Math.round(performance.now()*1e6)))})(),RZ=(function(){const e=typeof process=="object"&&"hrtime"in process&&typeof process.hrtime.bigint=="function"?process.hrtime:void 0;if(!e)return hP;const t=hP()-e.bigint();return()=>t+e.bigint()})();class OZ{[dP]=dP;unsafeCurrentTimeMillis(){return Date.now()}unsafeCurrentTimeNanos(){return RZ()}currentTimeMillis=pe(()=>this.unsafeCurrentTimeMillis());currentTimeNanos=pe(()=>this.unsafeCurrentTimeNanos());scheduler(){return _e(fP)}sleep(t){return yi(n=>{const r=fP.unsafeSchedule(()=>n(Rt),t);return Vs(pe(r))})}}const LZ=()=>new OZ,cd=IW,xb=e=>e.replace(/[/\\^$*+?.()|[\]{}]/g,"\\$&"),tj="And",nj="Or",rj="InvalidData",sj="MissingData",ij="SourceUnavailable",aj="Unsupported",DZ="effect/ConfigError",mP=Symbol.for(DZ),Ld={_tag:"ConfigError",[mP]:mP},oj=(e,t)=>{const n=Object.create(Ld);return n._op=tj,n.left=e,n.right=t,Object.defineProperty(n,"toString",{enumerable:!1,value(){return`${this.left} and ${this.right}`}}),Object.defineProperty(n,"message",{enumerable:!1,get(){return this.toString()}}),n},cj=(e,t)=>{const n=Object.create(Ld);return n._op=nj,n.left=e,n.right=t,Object.defineProperty(n,"toString",{enumerable:!1,value(){return`${this.left} or ${this.right}`}}),Object.defineProperty(n,"message",{enumerable:!1,get(){return this.toString()}}),n},$Z=(e,t,n={pathDelim:"."})=>{const r=Object.create(Ld);return r._op=rj,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Invalid data at ${F(this.path,vd(n.pathDelim))}: "${this.message}")`}}),r},fu=(e,t,n={pathDelim:"."})=>{const r=Object.create(Ld);return r._op=sj,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Missing data at ${F(this.path,vd(n.pathDelim))}: "${this.message}")`}}),r},MZ=(e,t,n,r={pathDelim:"."})=>{const s=Object.create(Ld);return s._op=ij,s.path=e,s.message=t,s.cause=n,Object.defineProperty(s,"toString",{enumerable:!1,value(){return`(Source unavailable at ${F(this.path,vd(r.pathDelim))}: "${this.message}")`}}),s},jZ=(e,t,n={pathDelim:"."})=>{const r=Object.create(Ld);return r._op=aj,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Unsupported operation at ${F(this.path,vd(n.pathDelim))}: "${this.message}")`}}),r},Rc=P(2,(e,t)=>{switch(e._op){case tj:return oj(Rc(e.left,t),Rc(e.right,t));case nj:return cj(Rc(e.left,t),Rc(e.right,t));case rj:return $Z([...t,...e.path],e.message);case sj:return fu([...t,...e.path],e.message);case ij:return MZ([...t,...e.path],e.message,e.cause);case aj:return jZ([...t,...e.path],e.message)}}),FZ={_tag:"Empty"},Lk=P(2,(e,t)=>{let n=dT(t),r=e;for(;aQ(n);){const s=n.head;switch(s._tag){case"Empty":{n=n.tail;break}case"AndThen":{n=uu(s.first,uu(s.second,n.tail));break}case"MapName":{r=Hc(r,s.f),n=n.tail;break}case"Nested":{r=mb(r,s.name),n=n.tail;break}case"Unnested":{if(F(ah(r),MW(s.name)))r=ru(r),n=n.tail;else return Be(fu(r,`Expected ${s.name} to be in path in ConfigProvider#unnested`));break}}}return Ue(r)}),BZ="Constant",zZ="Fail",UZ="Fallback",VZ="Described",HZ="Lazy",qZ="MapOrFail",GZ="Nested",KZ="Primitive",WZ="Sequence",JZ="HashMap",YZ="ZipWith";var pP={};const Tb=(e,t)=>[...e,...t],QZ="effect/ConfigProvider",gP=Symbol.for(QZ),XZ=Ko("effect/ConfigProvider"),ZZ="effect/ConfigProviderFlat",bP=Symbol.for(ZZ),eee=e=>({[gP]:gP,pipe(){return Se(this,arguments)},...e}),tee=e=>({[bP]:bP,patch:e.patch,load:(t,n,r=!0)=>e.load(t,n,r),enumerateChildren:e.enumerateChildren}),nee=e=>eee({load:t=>ue(Is(e,Oo(),t,!1),n=>hn(ah(n),{onNone:()=>un(fu(Oo(),`Expected a single value having structure: ${t}`)),onSome:_e})),flattened:e}),ree=e=>{const{pathDelim:t,seqDelim:n}=Object.assign({},{pathDelim:"_",seqDelim:","},e),r=c=>F(c,vd(t)),s=c=>c.split(t),i=()=>typeof process<"u"&&"env"in process&&typeof pP=="object"?pP:{};return nee(tee({load:(c,u,l=!0)=>{const d=r(c),f=i(),h=d in f?ye(f[d]):fe();return F(h,C_(()=>fu(c,`Expected ${d} to exist in the process context`)),ue(m=>cee(m,c,u,n,l)))},enumerateChildren:c=>pe(()=>{const u=i(),f=Object.keys(u).map(h=>s(h.toUpperCase())).filter(h=>{for(let m=0;m<c.length;m++){const y=F(c,bM(m)),g=h[m];if(g===void 0||y!==g)return!1}return!0}).flatMap(h=>h.slice(c.length,c.length+1));return tY(f)}),patch:FZ}))},see=(e,t,n,r)=>{const s=z2(n.length,c=>c>=r.length?fe():ye([e(c),c+1])),i=z2(r.length,c=>c>=n.length?fe():ye([t(c),c+1])),a=Tb(n,s),o=Tb(r,i);return[a,o]},iee=(e,t)=>{let n=t;if(n._tag==="Nested"){const r=e.slice();for(;n._tag==="Nested";)r.push(n.name),n=n.config;return r}return e},Is=(e,t,n,r)=>{const s=n;switch(s._tag){case BZ:return _e(Qs(s.value));case VZ:return qe(()=>Is(e,t,s.config,r));case zZ:return un(fu(t,s.message));case UZ:return F(qe(()=>Is(e,t,s.first,r)),Yh(i=>s.condition(i)?F(Is(e,t,s.second,r),Yh(a=>un(cj(i,a)))):un(i)));case HZ:return qe(()=>Is(e,t,s.config(),r));case qZ:return qe(()=>F(Is(e,t,s.original,r),ue(Pa(i=>F(s.mapOrFail(i),C_(Rc(iee(t,s.original))))))));case GZ:return qe(()=>Is(e,Tb(t,Qs(s.name)),s.config,r));case KZ:return F(Lk(t,e.patch),ue(i=>F(e.load(i,s,r),ue(a=>{if(a.length===0){const o=F(tJ(i),Kt(()=>"<n/a>"));return un(fu([],`Expected ${s.description} with name ${o}`))}return _e(a)}))));case WZ:return F(Lk(t,e.patch),ue(i=>F(e.enumerateChildren(i),ue(lee),ue(a=>a.length===0?qe(()=>Xe(Is(e,t,s.config,!0),Qs)):F(Pa(a,o=>Is(e,JW(t,`[${o}]`),s.config,!0)),Xe(o=>{const c=kM(o);return c.length===0?Qs(Oo()):Qs(c)}))))));case JZ:return qe(()=>F(Lk(t,e.patch),ue(i=>F(e.enumerateChildren(i),ue(a=>F(a,Pa(o=>Is(e,Tb(i,Qs(o)),s.valueConfig,r)),Xe(o=>o.length===0?Qs(E_()):F(uee(o),Hc(c=>YY(B2(Tt(a),c)))))))))));case YZ:return qe(()=>F(Is(e,t,s.left,r),od,ue(i=>F(Is(e,t,s.right,r),od,ue(a=>{if(ir(i)&&ir(a))return un(oj(i.left,a.left));if(ir(i)&&Bi(a))return un(i.left);if(Bi(i)&&ir(a))return un(a.left);if(Bi(i)&&Bi(a)){const o=F(t,vd(".")),c=aee(t,o),[u,l]=see(c,c,F(i.right,Hc(Ue)),F(a.right,Hc(Ue)));return F(u,B2(l),Pa(([d,f])=>F(P_(d,f),Xe(([h,m])=>s.zip(h,m)))))}throw new Error("BUG: ConfigProvider.fromFlatLoop - please report an issue at https://github.com/Effect-TS/effect/issues")})))))}},aee=(e,t)=>n=>Be(fu(e,`The element at index ${n} in a sequence at path "${t}" was missing`)),oee=(e,t)=>e.split(new RegExp(`\\s*${xb(t)}\\s*`)),cee=(e,t,n,r,s)=>s?F(oee(e,r),Pa(i=>n.parse(i.trim())),C_(Rc(t))):F(n.parse(e),D6({onFailure:Rc(t),onSuccess:Qs})),uee=e=>Object.keys(e[0]).map(t=>e.map(n=>n[t])),lee=e=>F(Pa(e,fee),D6({onFailure:()=>Oo(),onSuccess:Vh(cd)}),od,Xe(TW)),dee=/^(\[(\d+)\])$/,fee=e=>{const t=e.match(dee);if(t!==null){const n=t[2];return F(n!==void 0&&n.length>0?ye(n):fe(),Jo(hee))}return fe()},hee=e=>{const t=Number.parseInt(e);return Number.isNaN(t)?fe():ye(t)},yP=Symbol.for("effect/Console"),uj=Ko("effect/Console"),mee={[yP]:yP,assert(e,...t){return pe(()=>{console.assert(e,...t)})},clear:pe(()=>{console.clear()}),count(e){return pe(()=>{console.count(e)})},countReset(e){return pe(()=>{console.countReset(e)})},debug(...e){return pe(()=>{console.debug(...e)})},dir(e,t){return pe(()=>{console.dir(e,t)})},dirxml(...e){return pe(()=>{console.dirxml(...e)})},error(...e){return pe(()=>{console.error(...e)})},group(e){return e?.collapsed?pe(()=>console.groupCollapsed(e?.label)):pe(()=>console.group(e?.label))},groupEnd:pe(()=>{console.groupEnd()}),info(...e){return pe(()=>{console.info(...e)})},log(...e){return pe(()=>{console.log(...e)})},table(e,t){return pe(()=>{console.table(e,t)})},time(e){return pe(()=>console.time(e))},timeEnd(e){return pe(()=>console.timeEnd(e))},timeLog(e,...t){return pe(()=>{console.timeLog(e,...t)})},trace(...e){return pe(()=>{console.trace(...e)})},warn(...e){return pe(()=>{console.warn(...e)})},unsafe:console},pee="effect/Random",_P=Symbol.for(pee),gee=Ko("effect/Random");class bee{seed;[_P]=_P;PRNG;constructor(t){this.seed=t,this.PRNG=new EK(t)}get next(){return pe(()=>this.PRNG.number())}get nextBoolean(){return Xe(this.next,t=>t>.5)}get nextInt(){return pe(()=>this.PRNG.integer(Number.MAX_SAFE_INTEGER))}nextRange(t,n){return Xe(this.next,r=>(n-t)*r+t)}nextIntBetween(t,n){return pe(()=>this.PRNG.integer(n-t)+t)}shuffle(t){return yee(t,n=>this.nextIntBetween(0,n))}}const yee=(e,t)=>qe(()=>F(pe(()=>Array.from(e)),ue(n=>{const r=[];for(let s=n.length;s>=2;s=s-1)r.push(s);return F(r,A_(s=>F(t(s),Xe(i=>_ee(n,s-1,i)))),$r(Yl(n)))}))),_ee=(e,t,n)=>{const r=e[t];return e[t]=e[n],e[n]=r,e},kee=e=>new bee(Ce(e)),kP=Symbol.for("effect/Tracer"),Eee=e=>({[kP]:kP,...e}),PT=Ko("effect/Tracer"),z_=Ko("effect/ParentSpan"),EP=(function(){const e="abcdef0123456789",t=e.length;return function(n){let r="";for(let s=0;s<n;s++)r+=e.charAt(Math.floor(Math.random()*t));return r}})();class wee{name;parent;context;startTime;kind;_tag="Span";spanId;traceId="native";sampled=!0;status;attributes;events=[];links;constructor(t,n,r,s,i,a){this.name=t,this.parent=n,this.context=r,this.startTime=i,this.kind=a,this.status={_tag:"Started",startTime:i},this.attributes=new Map,this.traceId=n._tag==="Some"?n.value.traceId:EP(32),this.spanId=EP(16),this.links=Array.from(s)}end(t,n){this.status={_tag:"Ended",endTime:t,exit:n,startTime:this.status.startTime}}attribute(t,n){this.attributes.set(t,n)}event(t,n,r){this.events.push([t,n,r??{}])}addLinks(t){this.links.push(...t)}}const See=Eee({span:(e,t,n,r,s,i)=>new wee(e,t,n,r,s,i),context:e=>e()}),vee=e=>{if(e?.captureStackTrace===!1)return e;if(e?.captureStackTrace!==void 0&&typeof e.captureStackTrace!="boolean")return e;const t=Error.stackTraceLimit;Error.stackTraceLimit=3;const n=new Error;Error.stackTraceLimit=t;let r=!1;return{...e,captureStackTrace:()=>{if(r!==!1)return r;if(n.stack!==void 0){const s=n.stack.split(`
|
|
19
|
+
`);if(s[3]!==void 0)return r=s[3].trim(),r}}}},nS=Su()("effect/Tracer/DisablePropagation",{defaultValue:La}),xee=F(gi(),ls(Od,LZ()),ls(uj,mee),ls(gee,kee(Math.random())),ls(XZ,ree()),ls(PT,See)),ud=$e(Symbol.for("effect/DefaultServices/currentServices"),()=>V6(xee)),Tee=e=>{const t=bi(e);return lj(n=>n.sleep(t))},Iee=e=>yt(t=>e(t.currentDefaultServices)),lj=e=>Iee(t=>e(t.unsafeMap.get(Od.key))),Aee=lj(e=>e.currentTimeMillis),Cee=Nm,Pee=BK;class Dd extends Pee{}const dj="Sequential",fj="Parallel",Nee="ParallelN",Gc={_tag:dj},rS={_tag:fj},Ree=e=>({_tag:Nee,parallelism:e}),Oee=e=>e._tag===dj,Lee=e=>e._tag===fj,Ib=Gc,sS=rS,iS=Ree;function Dee(e){return new jo(e)}function $ee(){return Dee(new Map)}const wP=Symbol.for("effect/FiberRefs");class jo{locals;[wP]=wP;constructor(t){this.locals=t}pipe(){return Se(this,arguments)}}const Mee=(e,t,n,r=!1)=>{const s=e;let i=t,a=n,o=r,c;for(;c===void 0;)if(Qt(i)&&Qt(a)){const u=Lr(i)[0],l=ru(i),d=Lr(a)[0],f=Lr(a)[1],h=ru(a);u.startTimeMillis<d.startTimeMillis?(a=h,o=!0):u.startTimeMillis>d.startTimeMillis?i=l:u.id<d.id?(a=h,o=!0):u.id>d.id?i=l:c=[f,o]}else c=[s.initial,!0];return c},jee=P(3,(e,t,n)=>{const r=new Map(e.locals);return n.locals.forEach((s,i)=>{const a=s[0][1];if(!s[0][0][Ke](t)){if(!r.has(i)){if(je(a,i.initial))return;r.set(i,[[t,i.join(i.initial,a)]]);return}const o=r.get(i),[c,u]=Mee(i,o,s);if(u){const l=i.diff(c,a),d=o[0][1],f=i.join(d,i.patch(l)(d));if(!je(d,f)){let h;const m=o[0][0];m[Ke](t)?h=[[m,f],...o.slice(1)]:h=[[t,f],...o],r.set(i,h)}}}}),new jo(r)}),Fee=P(2,(e,t)=>{const n=new Map;return hj(e,n,t),new jo(n)}),hj=(e,t,n)=>{e.locals.forEach((r,s)=>{const i=r[0][1],a=s.patch(s.fork)(i);je(i,a)?t.set(s,r):t.set(s,[[n,a],...r])})},mj=P(2,(e,t)=>{const n=new Map(e.locals);return n.delete(t),new jo(n)}),pj=P(2,(e,t)=>e.locals.has(t)?ye(Lr(e.locals.get(t))[1]):fe()),Zh=P(2,(e,t)=>F(pj(e,t),Kt(()=>t.initial))),aS=P(2,(e,{fiberId:t,fiberRef:n,value:r})=>{if(e.locals.size===0)return new jo(new Map([[n,[[t,r]]]]));const s=new Map(e.locals);return oS(s,t,n,r),new jo(s)}),oS=(e,t,n,r)=>{const s=e.get(n)??[];let i;if(Qt(s)){const[a,o]=Lr(s);if(a[Ke](t)){if(je(o,r))return;i=[[t,r],...s.slice(1)]}else i=[[t,r],...s]}else i=[[t,r]];e.set(n,i)},Bee=P(2,(e,{entries:t,forkAs:n})=>{if(e.locals.size===0)return new jo(new Map(t));const r=new Map(e.locals);return n!==void 0&&hj(e,r,n),t.forEach(([s,i])=>{i.length===1?oS(r,i[0][0],s,i[0][1]):i.forEach(([a,o])=>{oS(r,a,s,o)})}),new jo(r)}),SP=pj,gj=Zh,zee=Bee,Uee=$ee,bj="Empty",yj="Add",_j="Remove",kj="Update",Ej="AndThen",Vee={_tag:bj},NT=(e,t)=>{const n=new Map(e.locals);let r=Vee;for(const[s,i]of t.locals.entries()){const a=Lr(i)[1],o=n.get(s);if(o!==void 0){const c=Lr(o)[1];je(c,a)||(r=Dk({_tag:kj,fiberRef:s,patch:s.diff(c,a)})(r))}else r=Dk({_tag:yj,fiberRef:s,value:a})(r);n.delete(s)}for(const[s]of n.entries())r=Dk({_tag:_j,fiberRef:s})(r);return r},Dk=P(2,(e,t)=>({_tag:Ej,first:e,second:t})),wj=P(3,(e,t,n)=>{let r=n,s=Qs(e);for(;Qt(s);){const i=Lr(s),a=ru(s);switch(i._tag){case bj:{s=a;break}case yj:{r=aS(r,{fiberId:t,fiberRef:i.fiberRef,value:i.value}),s=a;break}case _j:{r=mj(r,i.fiberRef),s=a;break}case kj:{const o=Zh(r,i.fiberRef);r=aS(r,{fiberId:t,fiberRef:i.fiberRef,value:i.fiberRef.patch(i.patch)(o)}),s=a;break}case Ej:{s=mb(i.first)(mb(i.second)(a));break}}}return r}),em=NT,tm=wj,U_="effect/FiberStatus",hu=Symbol.for(U_),Ab="Done",vP="Running",xP="Suspended",Hee=Xt(`${U_}-${Ab}`);let qee=class{[hu]=hu;_tag=Ab;[Ge](){return Hee}[Ke](t){return RT(t)&&t._tag===Ab}};class Gee{runtimeFlags;[hu]=hu;_tag=vP;constructor(t){this.runtimeFlags=t}[Ge](){return F(Ce(U_),ot(Ce(this._tag)),ot(Ce(this.runtimeFlags)),Ht(this))}[Ke](t){return RT(t)&&t._tag===vP&&this.runtimeFlags===t.runtimeFlags}}class Kee{runtimeFlags;blockingOn;[hu]=hu;_tag=xP;constructor(t,n){this.runtimeFlags=t,this.blockingOn=n}[Ge](){return F(Ce(U_),ot(Ce(this._tag)),ot(Ce(this.runtimeFlags)),ot(Ce(this.blockingOn)),Ht(this))}[Ke](t){return RT(t)&&t._tag===xP&&this.runtimeFlags===t.runtimeFlags&&je(this.blockingOn,t.blockingOn)}}const Wee=new qee,Jee=e=>new Gee(e),Yee=(e,t)=>new Kee(e,t),RT=e=>Ne(e,hu),Qee=e=>e._tag===Ab,Xee=Wee,Sj=Jee,Zee=Yee,ete=Qee,tte=HX,nte=qX,rte=GX,ste=B6,ite=z6,ate=U6,ote=KX,cte=WX,ute=F(cd,dM(e=>e.ordinal)),lte=AW(ute),dte=e=>{switch(e){case"All":return tte;case"Debug":return ate;case"Error":return rte;case"Fatal":return nte;case"Info":return ite;case"Trace":return ote;case"None":return cte;case"Warning":return ste}},fte=Symbol.for("effect/Micro"),Cb=Symbol.for("effect/Micro/MicroExit"),TP=Symbol.for("effect/Micro/MicroCause"),hte={_E:ze};class vj extends globalThis.Error{_tag;traces;[TP];constructor(t,n,r){const s=`MicroCause.${t}`;let i,a,o;if(n instanceof globalThis.Error){i=`(${s}) ${n.name}`,a=n.message;const c=a.split(`
|
|
20
|
+
`).length;o=n.stack?`(${s}) ${n.stack.split(`
|
|
21
|
+
`).slice(0,c+3).join(`
|
|
22
|
+
`)}`:`${i}: ${a}`}else i=s,a=Wl(n,0),o=`${i}: ${a}`;r.length>0&&(o+=`
|
|
23
|
+
${r.join(`
|
|
24
|
+
`)}`),super(a),this._tag=t,this.traces=r,this[TP]=hte,this.name=i,this.stack=o}pipe(){return Se(this,arguments)}toString(){return this.stack}[gt](){return this.stack}}class mte extends vj{defect;constructor(t,n=[]){super("Die",t,n),this.defect=t}}const pte=(e,t=[])=>new mte(e,t);let gte=class extends vj{constructor(t=[]){super("Interrupt","interrupted",t)}};const bte=(e=[])=>new gte(e),yte=e=>e._tag==="Interrupt",IP=Symbol.for("effect/Micro/MicroFiber"),_te={_A:ze,_E:ze};class kte{context;interruptible;[IP];_stack=[];_observers=[];_exit;_children;currentOpCount=0;constructor(t,n=!0){this.context=t,this.interruptible=n,this[IP]=_te}getRef(t){return nW(this.context,t)}addObserver(t){return this._exit?(t(this._exit),Kl):(this._observers.push(t),()=>{const n=this._observers.indexOf(t);n>=0&&this._observers.splice(n,1)})}_interrupted=!1;unsafeInterrupt(){this._exit||(this._interrupted=!0,this.interruptible&&this.evaluate(MT))}unsafePoll(){return this._exit}evaluate(t){if(this._exit)return;if(this._yielded!==void 0){const s=this._yielded;this._yielded=void 0,s()}const n=this.runLoop(t);if(n===Mp)return;const r=AP.interruptChildren&&AP.interruptChildren(this);if(r!==void 0)return this.evaluate(Nb(r,()=>n));this._exit=n;for(let s=0;s<this._observers.length;s++)this._observers[s](n);this._observers.length=0}runLoop(t){let n=!1,r=t;this.currentOpCount=0;try{for(;;){if(this.currentOpCount++,!n&&this.getRef(jT).shouldYield(this)){n=!0;const s=r;r=Nb(xte,()=>s)}if(r=r[cS](this),r===Mp){const s=this._yielded;return Cb in s?(this._yielded=void 0,s):Mp}}}catch(s){return Ne(r,cS)?uS(s):uS(`MicroFiber.runLoop: Not a valid effect: ${String(r)}`)}}getCont(t){for(;;){const n=this._stack.pop();if(!n)return;const r=n[Pb]&&n[Pb](this);if(r)return{[t]:r};if(n[t])return n}}_yielded=void 0;yieldWith(t){return this._yielded=t,Mp}children(){return this._children??=new Set}}const AP=$e("effect/Micro/fiberMiddleware",()=>({interruptChildren:void 0})),xj=Symbol.for("effect/Micro/identifier"),On=Symbol.for("effect/Micro/args"),cS=Symbol.for("effect/Micro/evaluate"),ld=Symbol.for("effect/Micro/successCont"),Dl=Symbol.for("effect/Micro/failureCont"),Pb=Symbol.for("effect/Micro/ensureCont"),Mp=Symbol.for("effect/Micro/Yield"),Ete={_A:ze,_E:ze,_R:ze},wte={...Cee,_op:"Micro",[fte]:Ete,pipe(){return Se(this,arguments)},[Symbol.iterator](){return new D$(new Am(this))},toJSON(){return{_id:"Micro",op:this[xj],...On in this?{args:this[On]}:void 0}},toString(){return Dt(this)},[gt](){return Dt(this)}};function Ste(e){return uS("Micro.evaluate: Not implemented")}const V_=e=>({...wte,[xj]:e.op,[cS]:e.eval??Ste,[ld]:e.contA,[Dl]:e.contE,[Pb]:e.ensure}),OT=e=>{const t=V_(e);return function(){const n=Object.create(t);return n[On]=e.single===!1?arguments:arguments[0],n}},Tj=e=>{const t={...V_(e),[Cb]:Cb,_tag:e.op,get[e.prop](){return this[On]},toJSON(){return{_id:"MicroExit",_tag:e.op,[e.prop]:this[On]}},[Ke](n){return Ate(n)&&n._tag===e.op&&je(this[On],n[On])},[Ge](){return Ht(this,ot(Xt(e.op))(Ce(this[On])))}};return function(n){const r=Object.create(t);return r[On]=n,r[ld]=void 0,r[Dl]=void 0,r[Pb]=void 0,r}},LT=Tj({op:"Success",prop:"value",eval(e){const t=e.getCont(ld);return t?t[ld](this[On],e):e.yieldWith(this)}}),Ij=Tj({op:"Failure",prop:"cause",eval(e){let t=e.getCont(Dl);for(;yte(this[On])&&t&&e.interruptible;)t=e.getCont(Dl);return t?t[Dl](this[On],e):e.yieldWith(this)}}),vte=OT({op:"Yield",eval(e){let t=!1;return e.getRef(jT).scheduleTask(()=>{t||e.evaluate(Cte)},this[On]??0),e.yieldWith(()=>{t=!0})}}),xte=vte(0),Tte=LT(void 0),DT=OT({op:"WithMicroFiber",eval(e){return this[On](e)}}),Nb=P(2,(e,t)=>{const n=Object.create(Ite);return n[On]=e,n[ld]=t,n}),Ite=V_({op:"OnSuccess",eval(e){return e._stack.push(this),this[On]}}),Ate=e=>Ne(e,Cb),Aj=LT,$T=Ij,MT=$T(bte()),uS=e=>$T(pte(e)),Cte=Aj(void 0),Pte="setImmediate"in globalThis?globalThis.setImmediate:e=>setTimeout(e,0);class Cj{tasks=[];running=!1;scheduleTask(t,n){this.tasks.push(t),this.running||(this.running=!0,Pte(this.afterScheduled))}afterScheduled=()=>{this.running=!1,this.runTasks()};runTasks(){const t=this.tasks;this.tasks=[];for(let n=0,r=t.length;n<r;n++)t[n]()}shouldYield(t){return t.currentOpCount>=t.getRef(Ote)}flush(){for(;this.tasks.length>0;)this.runTasks()}}const Nte=P(2,(e,t)=>DT(n=>{const r=n.context;return n.context=t(r),$te(e,()=>(n.context=r,Tte))})),Rte=P(2,(e,t)=>Nte(e,Xr(t)));class Ote extends Su()("effect/Micro/currentMaxOpsBeforeYield",{defaultValue:()=>2048}){}class jT extends Su()("effect/Micro/currentScheduler",{defaultValue:()=>new Cj}){}const Lte=P(2,(e,t)=>{const n=Object.create(Dte);return n[On]=e,n[ld]=t.onSuccess,n[Dl]=t.onFailure,n}),Dte=V_({op:"OnSuccessAndFailure",eval(e){return e._stack.push(this),this[On]}}),$te=P(2,(e,t)=>jte(n=>Lte(n(e),{onFailure:r=>Nb(t($T(r)),()=>Ij(r)),onSuccess:r=>Nb(t(Aj(r)),()=>LT(r))}))),Pj=OT({op:"SetInterruptible",ensure(e){if(e.interruptible=this[On],e._interrupted&&e.interruptible)return()=>MT}}),Mte=e=>DT(t=>t.interruptible?e:(t.interruptible=!0,t._stack.push(Pj(!1)),t._interrupted?MT:e)),jte=e=>DT(t=>t.interruptible?(t.interruptible=!1,t._stack.push(Pj(!0)),e(Mte)):e(ze)),Fte=(e,t)=>{const n=new kte(jT.context(new Cj));return n.evaluate(e),n},Rb=Symbol.for("effect/Readable"),Nj=Symbol.for("effect/Ref"),Rj={_A:e=>e};class Bte extends Dd{ref;commit(){return this.get}[Nj]=Rj;[Rb]=Rb;constructor(t){super(),this.ref=t,this.get=pe(()=>Cn(this.ref))}get;modify(t){return pe(()=>{const n=Cn(this.ref),[r,s]=t(n);return n!==s&&Lm(s)(this.ref),r})}}const FT=e=>new Bte(Om(e)),Ob=e=>pe(()=>FT(e)),Ki=e=>e.get,$l=P(2,(e,t)=>e.modify(()=>[void 0,t])),zte=P(2,(e,t)=>e.modify(n=>[n,t])),Oj=P(2,(e,t)=>e.modify(t)),Lb=P(2,(e,t)=>e.modify(n=>[void 0,t(n)])),BT=Ob,Ute=Ki,Vte=zte,ff=Oj,Hte=$l,qte=Lb;class Lj{buckets=[];scheduleTask(t,n){const r=this.buckets.length;let s,i=0;for(;i<r&&this.buckets[i][0]<=n;i++)s=this.buckets[i];s&&s[0]===n?s[1].push(t):i===r?this.buckets.push([n,[t]]):this.buckets.splice(i,0,[n,[t]])}}class Gte{maxNextTickBeforeTimer;running=!1;tasks=new Lj;constructor(t){this.maxNextTickBeforeTimer=t}starveInternal(t){const n=this.tasks.buckets;this.tasks.buckets=[];for(const[r,s]of n)for(let i=0;i<s.length;i++)s[i]();this.tasks.buckets.length===0?this.running=!1:this.starve(t)}starve(t=0){t>=this.maxNextTickBeforeTimer?setTimeout(()=>this.starveInternal(0),0):Promise.resolve(void 0).then(()=>this.starveInternal(t+1))}shouldYield(t){return t.currentOpCount>t.getFiberRef(H6)?t.getFiberRef(Rd):!1}scheduleTask(t,n){this.tasks.scheduleTask(t,n),this.running||(this.running=!0,this.starve())}}const Dj=$e(Symbol.for("effect/Scheduler/defaultScheduler"),()=>new Gte(2048));class H_{tasks=new Lj;deferred=!1;scheduleTask(t,n){this.deferred?Dj.scheduleTask(t,n):this.tasks.scheduleTask(t,n)}shouldYield(t){return t.currentOpCount>t.getFiberRef(H6)?t.getFiberRef(Rd):!1}flush(){for(;this.tasks.buckets.length>0;){const t=this.tasks.buckets;this.tasks.buckets=[];for(const[n,r]of t)for(let s=0;s<r.length;s++)r[s]()}this.deferred=!0}}const zT=$e(Symbol.for("effect/FiberRef/currentScheduler"),()=>jn(Dj)),$j=$e(Symbol.for("effect/FiberRef/currentRequestMap"),()=>jn(new Map)),CP=(e,t,n,r)=>{switch(e){case void 0:return t();case"unbounded":return n();case"inherit":return R_(oZ,s=>s==="unbounded"?n():s>1?r(s):t());default:return e>1?r(e):t()}},Kte=Tee,Wte=Aee,Jte=Od,Mj=e=>e.replace(/[\s="]/g,"_"),Yte=e=>t=>`${Mj(t.label)}=${e-t.startTime}ms`,jj="effect/MetricLabel",lS=Symbol.for(jj);class Qte{key;value;[lS]=lS;_hash;constructor(t,n){this.key=t,this.value=n,this._hash=Xt(jj+this.key+this.value)}[Ge](){return this._hash}[Ke](t){return Zte(t)&&this.key===t.key&&this.value===t.value}pipe(){return Se(this,arguments)}}const Xte=(e,t)=>new Qte(e,t),Zte=e=>Ne(e,lS),ene=e=>Xe(e,ye),Fj=e=>{let t,n;return typeof e=="function"?t=e:(t=e.try,n=e.catch),qe(()=>{try{return _e(or(t))}catch(r){return un(n?or(()=>n(r)):new vT(r,"An unknown error occurred in Effect.try"))}})},tne=e=>Hj(e,zj,NT),nne=e=>Hj(e,P_(zj,BX),([t,n],[r,s])=>[NT(t,r),_o(n,s)]),Bj=P(2,(e,t)=>Ba(e,{onFailure:n=>_e(t.onFailure(n)),onSuccess:n=>_e(t.onSuccess(n))})),zj=yt(e=>_e(e.getFiberRefs())),rne=e=>Bj(e,{onFailure:Kl,onSuccess:Kl}),PP=P(2,(e,t)=>Us(e,{onFailure:n=>N6(()=>t(n)),onSuccess:_e})),sne=e=>F(M_(),ue(t=>F(nne(e),L6(t),ane,Xe(n=>rn(n,F(Mo(t),ue(([r,s])=>$r(P_(Uj(r[0]),$6(r[1])),s)))))))),ine=e=>Xe(e,t=>!t),ane=e=>Xe(BT(!0),t=>Vs(bT(e,Vte(t,!1)))),Uj=e=>hne((t,n)=>F(e,wj(t,n))),one=e=>e.length>=1?yi((t,n)=>{try{e(n).then(r=>t(_e(r)),r=>t(ho(r)))}catch(r){t(ho(r))}}):yi(t=>{try{e().then(n=>t(_e(n)),n=>t(ho(n)))}catch(n){t(ho(n))}}),Vj=P(3,(e,t,n)=>Tu(r=>B_(e,ls(r,t,n)))),NP=P(3,(e,t,n)=>Tu(r=>ue(n,s=>B_(e,F(r,ls(t,s)))))),cne=Kte,une=_e(fe()),Hj=P(3,(e,t,n)=>ue(t,r=>ue(e,s=>Xe(t,i=>[n(r,i),s])))),lne=P(2,(e,t)=>Us(e,{onFailure:n=>rn(t(n),$n(n)),onSuccess:_e})),dne=e=>{let t,n;typeof e=="function"?t=e:(t=e.try,n=e.catch);const r=s=>n?x_(()=>n(s)):un(new vT(s,"An unknown error occurred in Effect.tryPromise"));return t.length>=1?yi((s,i)=>{try{t(i).then(a=>s(_e(a)),a=>s(r(a)))}catch(a){s(r(a))}}):yi(s=>{try{t().then(i=>s(_e(i)),i=>s(r(i)))}catch(i){s(r(i))}})},fne=P(2,(e,t)=>ue(e,n=>Fj({try:()=>t.try(n),catch:t.catch}))),hne=e=>yt(t=>(t.setFiberRefs(e(t.id(),t.getFiberRefs())),Rt)),mne=P(2,(e,t)=>qe(()=>t()?Xe(e,ye):_e(fe()))),pne=e=>new Proxy({},{get(t,n,r){return(...s)=>ue(e,i=>i[n](...s))}}),qj=BigInt(0),Gj=Jo(e=>ci(e.context,nS)?e._tag==="Span"?Gj(e.parent):fe():ye(e)),gne=(e,t,n)=>{const r=!e.getFiberRef(q6)||n.context&&ci(n.context,nS),s=e.getFiberRef(ta),i=n.parent?ye(n.parent):n.root?fe():Gj(Wo(s,z_));let a;if(r)a=CZ({name:t,parent:i,context:ls(n.context??gi(),nS,!0)});else{const o=e.getFiberRef(ud),c=ci(o,PT),u=ci(o,Jte),l=e.getFiberRef(G6),d=e.getFiberRefs(),f=SP(d,dZ),h=SP(d,fZ),m=h._tag==="Some"?n.links!==void 0?[...Fs(h.value),...n.links??[]]:Fs(h.value):n.links??Oo();a=c.span(t,i,n.context??gi(),m,l?u.unsafeCurrentTimeNanos():qj,n.kind??"internal",n),f._tag==="Some"&&eQ(f.value,(y,g)=>a.attribute(g,y)),n.attributes!==void 0&&Object.entries(n.attributes).forEach(([y,g])=>a.attribute(y,g))}return typeof n.captureStackTrace=="function"&&_b.set(a,n.captureStackTrace),a},bne=(e,t,n,r)=>pe(()=>{e.status._tag!=="Ended"&&(W6(t)&&_b.has(e)&&e.attribute("code.stacktrace",_b.get(e)()),e.end(r?n.unsafeCurrentTimeNanos():qj,t))}),yne=(e,...t)=>{const n=vee(t.length===1?void 0:t[0]),r=t[t.length-1];return yt(s=>{const i=gne(s,e,n),a=s.getFiberRef(G6),o=ci(s.getFiberRef(ud),Od);return du(r(i),c=>bne(i,c,o,a))})},_ne=P(2,(e,t)=>Vj(e,z_,t)),UT=W6,Kj=yZ,kne=Ll,Ene=J6,Db=Xh,_r=Pt,wne=kZ,Sne=E0,Na=D_,ds=Nt,VT=yr,RP=wZ,nm=Y6,HT="InterruptSignal",qT="Stateful",GT="Resume",KT="YieldNow",$k=e=>({_tag:HT,cause:e}),w0=e=>({_tag:qT,onFiber:e}),qu=e=>({_tag:GT,effect:e}),vne=()=>({_tag:KT}),xne="effect/FiberScope",$b=Symbol.for(xne);class Tne{[$b]=$b;fiberId=gs;roots=new Set;add(t,n){this.roots.add(n),n.addObserver(()=>{this.roots.delete(n)})}}class Ine{fiberId;parent;[$b]=$b;constructor(t,n){this.fiberId=t,this.parent=n}add(t,n){this.parent.tell(w0(r=>{r.addChild(n),n.addObserver(()=>{r.removeChild(n)})}))}}const Ane=e=>new Ine(e.id(),e),q_=$e(Symbol.for("effect/FiberScope/Global"),()=>new Tne),Cne="effect/Fiber",Pne=Symbol.for(Cne),Nne={_E:e=>e,_A:e=>e},Rne="effect/Fiber",One=Symbol.for(Rne),Lne=e=>e.await,Dne=e=>e.inheritAll,rm=e=>N_(I_(e.await),e.inheritAll);({...Rm});const Za="effect/FiberCurrent",$ne=()=>Sd(globalThis[Za]),Mne="effect/Logger",jne=Symbol.for(Mne),Fne={_Message:e=>e,_Output:e=>e},WT=e=>({[jne]:Fne,log:e,pipe(){return Se(this,arguments)}}),Bne=/^[^\s"=]*$/,zne=(e,t)=>({annotations:n,cause:r,date:s,fiberId:i,logLevel:a,message:o,spans:c})=>{const u=m=>m.match(Bne)?m:e(m),l=(m,y)=>`${Mj(m)}=${u(y)}`,d=(m,y)=>" "+l(m,y);let f=l("timestamp",s.toISOString());f+=d("level",a.label),f+=d("fiber",t6(i));const h=GW(o);for(let m=0;m<h.length;m++)f+=d("message",Wl(h[m],t));sY(r)||(f+=d("cause",Ad(r,{renderErrorCause:!0})));for(const m of c)f+=" "+Yte(s.getTime())(m);for(const[m,y]of n)f+=d(m,Wl(y,t));return f},Une=e=>`"${e.replace(/\\([\s\S])|(")/g,"\\$1$2")}"`,Vne=WT(zne(Une)),Hne=typeof process=="object"&&process!==null&&typeof process.stdout=="object"&&process.stdout!==null;Hne&&process.stdout.isTTY;const Wj="effect/MetricBoundaries",dS=Symbol.for(Wj);class qne{values;[dS]=dS;constructor(t){this.values=t,this._hash=F(Xt(Wj),ot(Cm(this.values)))}_hash;[Ge](){return this._hash}[Ke](t){return Gne(t)&&je(this.values,t.values)}pipe(){return Se(this,arguments)}}const Gne=e=>Ne(e,dS),Kne=e=>{const t=F(e,Vx(Tn(Number.POSITIVE_INFINITY)),dJ);return new qne(t)},Wne=e=>F(qW(e.count-1,t=>e.start*Math.pow(e.factor,t)),Ir,Kne),Jne="effect/MetricKeyType",Jj=Symbol.for(Jne),Yj="effect/MetricKeyType/Counter",fS=Symbol.for(Yj),Yne="effect/MetricKeyType/Frequency",Qne=Symbol.for(Yne),Xne="effect/MetricKeyType/Gauge",Zne=Symbol.for(Xne),Qj="effect/MetricKeyType/Histogram",hS=Symbol.for(Qj),ere="effect/MetricKeyType/Summary",tre=Symbol.for(ere),Xj={_In:e=>e,_Out:e=>e};class nre{incremental;bigint;[Jj]=Xj;[fS]=fS;constructor(t,n){this.incremental=t,this.bigint=n,this._hash=Xt(Yj)}_hash;[Ge](){return this._hash}[Ke](t){return Zj(t)}pipe(){return Se(this,arguments)}}class rre{boundaries;[Jj]=Xj;[hS]=hS;constructor(t){this.boundaries=t,this._hash=F(Xt(Qj),ot(Ce(this.boundaries)))}_hash;[Ge](){return this._hash}[Ke](t){return e4(t)&&je(this.boundaries,t.boundaries)}pipe(){return Se(this,arguments)}}const sre=e=>new nre(e?.incremental??!1,e?.bigint??!1),ire=e=>new rre(e),Zj=e=>Ne(e,fS),are=e=>Ne(e,Qne),ore=e=>Ne(e,Zne),e4=e=>Ne(e,hS),cre=e=>Ne(e,tre),ure="effect/MetricKey",t4=Symbol.for(ure),lre={_Type:e=>e},dre=d_(je);class JT{name;keyType;description;tags;[t4]=lre;constructor(t,n,r,s=[]){this.name=t,this.keyType=n,this.description=r,this.tags=s,this._hash=F(Xt(this.name+this.description),ot(Ce(this.keyType)),ot(Cm(this.tags)))}_hash;[Ge](){return this._hash}[Ke](t){return fre(t)&&this.name===t.name&&je(this.keyType,t.keyType)&&je(this.description,t.description)&&dre(this.tags,t.tags)}pipe(){return Se(this,arguments)}}const fre=e=>Ne(e,t4),hre=(e,t)=>new JT(e,sre(t),Sd(t?.description)),mre=(e,t,n)=>new JT(e,ire(t),Sd(n)),pre=P(2,(e,t)=>t.length===0?e:new JT(e.name,e.keyType,e.description,b0(e.tags,t))),OP=Symbol.for("effect/MutableHashMap"),gre={[OP]:OP,[Symbol.iterator](){return new YT(this)},toString(){return Dt(this.toJSON())},toJSON(){return{_id:"MutableHashMap",values:Array.from(this).map(Yt)}},[gt](){return this.toJSON()},pipe(){return Se(this,arguments)}};class YT{self;referentialIterator;bucketIterator;constructor(t){this.self=t,this.referentialIterator=t.referential[Symbol.iterator]()}next(){if(this.bucketIterator!==void 0)return this.bucketIterator.next();const t=this.referentialIterator.next();return t.done?(this.bucketIterator=new bre(this.self.buckets.values()),this.next()):t}[Symbol.iterator](){return new YT(this.self)}}class bre{backing;constructor(t){this.backing=t}currentBucket;next(){if(this.currentBucket===void 0){const n=this.backing.next();if(n.done)return n;this.currentBucket=n.value[Symbol.iterator]()}const t=this.currentBucket.next();return t.done?(this.currentBucket=void 0,this.next()):t}}const mS=()=>{const e=Object.create(gre);return e.referential=new Map,e.buckets=new Map,e.bucketsSize=0,e},Sa=P(2,(e,t)=>{if(zh(t)===!1)return e.referential.has(t)?ye(e.referential.get(t)):fe();const n=t[Ge](),r=e.buckets.get(n);return r===void 0?fe():yre(e,r,t)}),yre=(e,t,n,r=!1)=>{for(let s=0,i=t.length;s<i;s++)if(n[Ke](t[s][0])){const a=t[s][1];return r&&(t.splice(s,1),e.bucketsSize--),ye(a)}return fe()},hf=P(2,(e,t)=>ft(Sa(e,t))),vc=P(3,(e,t,n)=>{if(zh(t)===!1)return e.referential.set(t,n),e;const r=t[Ge](),s=e.buckets.get(r);return s===void 0?(e.buckets.set(r,[[t,n]]),e.bucketsSize++,e):(n4(e,s,t),s.push([t,n]),e.bucketsSize++,e)}),n4=(e,t,n)=>{for(let r=0,s=t.length;r<s;r++)if(n[Ke](t[r][0])){t.splice(r,1),e.bucketsSize--;return}},_re=P(2,(e,t)=>{if(zh(t)===!1)return e.referential.delete(t),e;const n=t[Ge](),r=e.buckets.get(n);return r===void 0||(n4(e,r,t),r.length===0&&e.buckets.delete(n)),e}),kre="effect/MetricState",Vm=Symbol.for(kre),r4="effect/MetricState/Counter",pS=Symbol.for(r4),s4="effect/MetricState/Frequency",gS=Symbol.for(s4),i4="effect/MetricState/Gauge",bS=Symbol.for(i4),a4="effect/MetricState/Histogram",yS=Symbol.for(a4),o4="effect/MetricState/Summary",_S=Symbol.for(o4),Hm={_A:e=>e};class Ere{count;[Vm]=Hm;[pS]=pS;constructor(t){this.count=t}[Ge](){return F(Ce(r4),ot(Ce(this.count)),Ht(this))}[Ke](t){return Rre(t)&&this.count===t.count}pipe(){return Se(this,arguments)}}const wre=d_(je);class Sre{occurrences;[Vm]=Hm;[gS]=gS;constructor(t){this.occurrences=t}_hash;[Ge](){return F(Xt(s4),ot(Cm(Tt(this.occurrences.entries()))),Ht(this))}[Ke](t){return Ore(t)&&wre(Tt(this.occurrences.entries()),Tt(t.occurrences.entries()))}pipe(){return Se(this,arguments)}}class vre{value;[Vm]=Hm;[bS]=bS;constructor(t){this.value=t}[Ge](){return F(Ce(i4),ot(Ce(this.value)),Ht(this))}[Ke](t){return Lre(t)&&this.value===t.value}pipe(){return Se(this,arguments)}}class xre{buckets;count;min;max;sum;[Vm]=Hm;[yS]=yS;constructor(t,n,r,s,i){this.buckets=t,this.count=n,this.min=r,this.max=s,this.sum=i}[Ge](){return F(Ce(a4),ot(Ce(this.buckets)),ot(Ce(this.count)),ot(Ce(this.min)),ot(Ce(this.max)),ot(Ce(this.sum)),Ht(this))}[Ke](t){return Dre(t)&&je(this.buckets,t.buckets)&&this.count===t.count&&this.min===t.min&&this.max===t.max&&this.sum===t.sum}pipe(){return Se(this,arguments)}}class Tre{error;quantiles;count;min;max;sum;[Vm]=Hm;[_S]=_S;constructor(t,n,r,s,i,a){this.error=t,this.quantiles=n,this.count=r,this.min=s,this.max=i,this.sum=a}[Ge](){return F(Ce(o4),ot(Ce(this.error)),ot(Ce(this.quantiles)),ot(Ce(this.count)),ot(Ce(this.min)),ot(Ce(this.max)),ot(Ce(this.sum)),Ht(this))}[Ke](t){return $re(t)&&this.error===t.error&&je(this.quantiles,t.quantiles)&&this.count===t.count&&this.min===t.min&&this.max===t.max&&this.sum===t.sum}pipe(){return Se(this,arguments)}}const Ire=e=>new Ere(e),Are=e=>new Sre(e),Cre=e=>new vre(e),Pre=e=>new xre(e.buckets,e.count,e.min,e.max,e.sum),Nre=e=>new Tre(e.error,e.quantiles,e.count,e.min,e.max,e.sum),Rre=e=>Ne(e,pS),Ore=e=>Ne(e,gS),Lre=e=>Ne(e,bS),Dre=e=>Ne(e,yS),$re=e=>Ne(e,_S),Mre="effect/MetricHook",jre=Symbol.for(Mre),Fre={_In:e=>e,_Out:e=>e},qm=e=>({[jre]:Fre,pipe(){return Se(this,arguments)},...e}),LP=BigInt(0),Bre=e=>{let t=e.keyType.bigint?LP:0;const n=e.keyType.incremental?e.keyType.bigint?s=>s>=LP:s=>s>=0:s=>!0,r=s=>{n(s)&&(t=t+s)};return qm({get:()=>Ire(t),update:r,modify:r})},zre=e=>{const t=new Map;for(const r of e.keyType.preregisteredWords)t.set(r,0);const n=r=>{const s=t.get(r)??0;t.set(r,s+1)};return qm({get:()=>Are(t),update:n,modify:n})},Ure=(e,t)=>{let n=t;return qm({get:()=>Cre(n),update:r=>{n=r},modify:r=>{n=n+r}})},Vre=e=>{const t=e.keyType.boundaries.values,n=t.length,r=new Uint32Array(n+1),s=new Float64Array(n);let i=0,a=0,o=Number.MAX_VALUE,c=Number.MIN_VALUE;F(t,Vh(cd),Hc((d,f)=>{s[f]=d}));const u=d=>{let f=0,h=n;for(;f!==h;){const m=Math.floor(f+(h-f)/2),y=s[m];d<=y?h=m:f=m,h===f+1&&(d<=s[f]?h=f:f=h)}r[f]=r[f]+1,i=i+1,a=a+d,d<o&&(o=d),d>c&&(c=d)},l=()=>{const d=l_(n);let f=0;for(let h=0;h<n;h++){const m=s[h],y=r[h];f=f+y,d[h]=[m,f]}return d};return qm({get:()=>Pre({buckets:l(),count:i,min:o,max:c,sum:a}),update:u,modify:u})},Hre=e=>{const{error:t,maxAge:n,maxSize:r,quantiles:s}=e.keyType,i=F(s,Vh(cd)),a=l_(r);let o=0,c=0,u=0,l=0,d=0;const f=m=>{const y=[];let g=0;for(;g!==r-1;){const p=a[g];if(p!=null){const[_,k]=p,v=sd(m-_);DY(v,rd)&&LY(v,n)&&y.push(k)}g=g+1}return qre(t,i,Vh(y,cd))},h=(m,y)=>{if(r>0){o=o+1;const g=o%r;a[g]=[y,m]}l=c===0?m:Math.min(l,m),d=c===0?m:Math.max(d,m),c=c+1,u=u+m};return qm({get:()=>Nre({error:t,quantiles:f(Date.now()),count:c,min:l,max:d,sum:u}),update:([m,y])=>h(m,y),modify:([m,y])=>h(m,y)})},qre=(e,t,n)=>{const r=n.length;if(!Qt(t))return Oo();const s=t[0],i=t.slice(1),a=DP(e,r,fe(),0,s,n),o=Qs(a);return i.forEach(c=>{o.push(DP(e,r,a.value,a.consumed,c,a.rest))}),Hc(o,c=>[c.quantile,c.value])},DP=(e,t,n,r,s,i)=>{let a=e,o=t,c=n,u=r,l=s,d=i,f=e,h=t,m=n,y=r,g=s,p=i;for(;;){if(!Qt(d))return{quantile:l,value:fe(),consumed:u,rest:[]};if(l===1)return{quantile:l,value:ye(yM(d)),consumed:u+d.length,rest:[]};const _=Lr(d),k=rJ(d,I=>I===_),v=l*o,w=a/2*v,S=u+k[0].length,T=Math.abs(S-v);if(S<v-w){f=a,h=o,m=ah(d),y=S,g=l,p=k[1],a=f,o=h,c=m,u=y,l=g,d=p;continue}if(S>v+w){const I=xn(c)?ye(_):c;return{quantile:l,value:I,consumed:u,rest:d}}switch(c._tag){case"None":{f=a,h=o,m=ah(d),y=S,g=l,p=k[1],a=f,o=h,c=m,u=y,l=g,d=p;continue}case"Some":{const I=Math.abs(v-c.value);if(T<I){f=a,h=o,m=ah(d),y=S,g=l,p=k[1],a=f,o=h,c=m,u=y,l=g,d=p;continue}return{quantile:l,value:ye(c.value),consumed:u,rest:d}}}}throw new Error("BUG: MetricHook.resolveQuantiles - please report an issue at https://github.com/Effect-TS/effect/issues")},Gre="effect/MetricPair",Kre=Symbol.for(Gre),Wre={_Type:e=>e},Jre=(e,t)=>({[Kre]:Wre,metricKey:e,metricState:t,pipe(){return Se(this,arguments)}}),Yre="effect/MetricRegistry",$P=Symbol.for(Yre);class Qre{[$P]=$P;map=mS();snapshot(){const t=[];for(const[n,r]of this.map)t.push(Jre(n,r.get()));return t}get(t){const n=F(this.map,Sa(t),Pr);if(n==null){if(Zj(t.keyType))return this.getCounter(t);if(ore(t.keyType))return this.getGauge(t);if(are(t.keyType))return this.getFrequency(t);if(e4(t.keyType))return this.getHistogram(t);if(cre(t.keyType))return this.getSummary(t);throw new Error("BUG: MetricRegistry.get - unknown MetricKeyType - please report an issue at https://github.com/Effect-TS/effect/issues")}else return n}getCounter(t){let n=F(this.map,Sa(t),Pr);if(n==null){const r=Bre(t);F(this.map,hf(t))||F(this.map,vc(t,r)),n=r}return n}getFrequency(t){let n=F(this.map,Sa(t),Pr);if(n==null){const r=zre(t);F(this.map,hf(t))||F(this.map,vc(t,r)),n=r}return n}getGauge(t){let n=F(this.map,Sa(t),Pr);if(n==null){const r=Ure(t,t.keyType.bigint?BigInt(0):0);F(this.map,hf(t))||F(this.map,vc(t,r)),n=r}return n}getHistogram(t){let n=F(this.map,Sa(t),Pr);if(n==null){const r=Vre(t);F(this.map,hf(t))||F(this.map,vc(t,r)),n=r}return n}getSummary(t){let n=F(this.map,Sa(t),Pr);if(n==null){const r=Hre(t);F(this.map,hf(t))||F(this.map,vc(t,r)),n=r}return n}}const Xre=()=>new Qre,Zre="effect/Metric",ese=Symbol.for(Zre),tse={_Type:e=>e,_In:e=>e,_Out:e=>e},MP=$e(Symbol.for("effect/Metric/globalMetricRegistry"),()=>Xre()),c4=function(e,t,n,r){const s=Object.assign(i=>gT(i,a=>ise(s,a)),{[ese]:tse,keyType:e,unsafeUpdate:t,unsafeValue:n,unsafeModify:r,register(){return this.unsafeValue([]),this},pipe(){return Se(this,arguments)}});return s},G_=(e,t)=>u4(hre(e,t)),u4=e=>{let t;const n=new WeakMap,r=s=>{if(s.length===0)return t!==void 0||(t=MP.get(e)),t;let i=n.get(s);return i!==void 0||(i=MP.get(pre(e,s)),n.set(s,i)),i};return c4(e.keyType,(s,i)=>r(i).update(s),s=>r(s).get(),(s,i)=>r(i).modify(s))},nse=(e,t,n)=>u4(mre(e,t,n)),rse=P(3,(e,t,n)=>sse(e,[Xte(t,n)])),sse=P(2,(e,t)=>c4(e.keyType,(n,r)=>e.unsafeUpdate(n,b0(t,r)),n=>e.unsafeValue(b0(t,n)),(n,r)=>e.unsafeModify(n,b0(t,r)))),ise=P(2,(e,t)=>R_(Qw,n=>pe(()=>e.unsafeUpdate(t,n))));({...Dx});const ase=P(2,(e,t)=>R_($j,n=>pe(()=>{if(n.has(e)){const r=n.get(e);r.state.completed||(r.state.completed=!0,F_(r.result,t))}}))),ose="effect/Supervisor",K_=Symbol.for(ose),QT={_T:e=>e};class W_{underlying;value0;[K_]=QT;constructor(t,n){this.underlying=t,this.value0=n}get value(){return this.value0}onStart(t,n,r,s){this.underlying.onStart(t,n,r,s)}onEnd(t,n){this.underlying.onEnd(t,n)}onEffect(t,n){this.underlying.onEffect(t,n)}onSuspend(t){this.underlying.onSuspend(t)}onResume(t){this.underlying.onResume(t)}map(t){return new W_(this,F(this.value,Xe(t)))}zip(t){return new J_(this,t)}}class J_{left;right;_tag="Zip";[K_]=QT;constructor(t,n){this.left=t,this.right=n}get value(){return P_(this.left.value,this.right.value)}onStart(t,n,r,s){this.left.onStart(t,n,r,s),this.right.onStart(t,n,r,s)}onEnd(t,n){this.left.onEnd(t,n),this.right.onEnd(t,n)}onEffect(t,n){this.left.onEffect(t,n),this.right.onEffect(t,n)}onSuspend(t){this.left.onSuspend(t),this.right.onSuspend(t)}onResume(t){this.left.onResume(t),this.right.onResume(t)}map(t){return new W_(this,F(this.value,Xe(t)))}zip(t){return new J_(this,t)}}const l4=e=>Ne(e,K_)&&R$(e,"Zip");class cse{effect;[K_]=QT;constructor(t){this.effect=t}get value(){return this.effect}onStart(t,n,r,s){}onEnd(t,n){}onEffect(t,n){}onSuspend(t){}onResume(t){}map(t){return new W_(this,F(this.value,Xe(t)))}zip(t){return new J_(this,t)}onRun(t,n){return t()}}const use=e=>new cse(e),Y_=$e("effect/Supervisor/none",()=>use(Rt)),lse=Cd,d4="Empty",f4="AddSupervisor",h4="RemoveSupervisor",m4="AndThen",uh={_tag:d4},S0=(e,t)=>({_tag:m4,first:e,second:t}),dse=(e,t)=>fse(t,Tn(e)),fse=(e,t)=>{let n=e,r=t;for(;Fa(r);){const s=zi(r);switch(s._tag){case d4:{r=Ca(r);break}case f4:{n=n.zip(s.supervisor),r=Ca(r);break}case h4:{n=kS(n,s.supervisor),r=Ca(r);break}case m4:{r=wr(s.first)(wr(s.second)(Ca(r)));break}}}return n},kS=(e,t)=>je(e,t)?Y_:l4(e)?kS(e.left,t).zip(kS(e.right,t)):e,Mb=e=>je(e,Y_)?iu():l4(e)?F(Mb(e.left),Gh(Mb(e.right))):sT(e),hse=(e,t)=>{if(je(e,t))return uh;const n=Mb(e),r=Mb(t),s=F(r,V2(n),Kh(uh,(a,o)=>S0(a,{_tag:f4,supervisor:o}))),i=F(n,V2(r),Kh(uh,(a,o)=>S0(a,{_tag:h4,supervisor:o})));return S0(s,i)},mse=lse({empty:uh,patch:dse,combine:S0,diff:hse}),pse=G_("effect_fiber_started",{incremental:!0}),jP=G_("effect_fiber_active"),gse=G_("effect_fiber_successes",{incremental:!0}),bse=G_("effect_fiber_failures",{incremental:!0}),yse=rse(nse("effect_fiber_lifetimes",Wne({start:.5,factor:2,count:35})),"time_unit","milliseconds"),mf="Continue",_se="Done",FP="Yield",kse={_E:e=>e,_A:e=>e},jp=e=>{throw new Error(`BUG: FiberRuntime - ${Wl(e)} - please report an issue at https://github.com/Effect-TS/effect/issues`)},la=Symbol.for("effect/internal/fiberRuntime/YieldedOp"),da=$e("effect/internal/fiberRuntime/yieldedOpChannel",()=>({currentOp:null})),pf={[lb]:(e,t,n)=>or(()=>t.effect_instruction_i1(n)),OnStep:(e,t,n)=>Nt(Nt(n)),[db]:(e,t,n)=>or(()=>t.effect_instruction_i2(n)),[Ox]:(e,t,n)=>(e.patchRuntimeFlags(e.currentRuntimeFlags,t.patch),ao(e.currentRuntimeFlags)&&e.isInterrupted()?Pt(e.getInterruptedCause()):Nt(n)),[fb]:(e,t,n)=>(or(()=>t.effect_instruction_i2(n)),or(()=>t.effect_instruction_i0())?(e.pushStack(t),or(()=>t.effect_instruction_i1())):Rt),[ih]:(e,t,n)=>{for(;;){const r=or(()=>t.effect_instruction_i0.next(n));if(r.done)return Nt(r.value);const s=SK(r.value);if(L_(s)){if(s._tag==="Failure")return s}else return e.pushStack(t),s;n=s.value}}},Ese={[HT]:(e,t,n,r)=>(e.processNewInterruptSignal(r.cause),ao(t)?Pt(r.cause):n),[GT]:(e,t,n,r)=>{throw new Error("It is illegal to have multiple concurrent run loops in a single fiber")},[qT]:(e,t,n,r)=>(r.onFiber(e,Sj(t)),n),[KT]:(e,t,n,r)=>ue(_T(),()=>n)},wse=e=>A_(gX(e),t=>Wi(PX(t),([n,r])=>{const s=new Map,i=[];for(const o of r){i.push(Fs(o));for(const c of o)s.set(c.request,c)}const a=i.flat();return Pd(qse(n.runAll(i),a,()=>a.forEach(o=>{o.listeners.interrupted=!0})),$j,s)},!1,!1)),Sse=Lx();class p4 extends Dd{[Pne]=Nne;[One]=kse;_fiberRefs;_fiberId;_queue=new Array;_children=null;_observers=new Array;_running=!1;_stack=[];_asyncInterruptor=null;_asyncBlockingOn=null;_exitValue=null;_steps=[];_isYielding=!1;currentRuntimeFlags;currentOpCount=0;currentSupervisor;currentScheduler;currentTracer;currentSpan;currentContext;currentDefaultServices;constructor(t,n,r){if(super(),this.currentRuntimeFlags=r,this._fiberId=t,this._fiberRefs=n,tP(r)){const s=this.getFiberRef(Qw);pse.unsafeUpdate(1,s),jP.unsafeUpdate(1,s)}this.refreshRefCache()}commit(){return rm(this)}id(){return this._fiberId}resume(t){this.tell(qu(t))}get status(){return this.ask((t,n)=>n)}get runtimeFlags(){return this.ask((t,n)=>ete(n)?t.currentRuntimeFlags:n.runtimeFlags)}scope(){return Ane(this)}get children(){return this.ask(t=>Array.from(t.getChildren()))}getChildren(){return this._children===null&&(this._children=new Set),this._children}getInterruptedCause(){return this.getFiberRef($p)}fiberRefs(){return this.ask(t=>t.getFiberRefs())}ask(t){return qe(()=>{const n=$_(this._fiberId);return this.tell(w0((r,s)=>{F_(n,pe(()=>t(r,s)))})),Mo(n)})}tell(t){this._queue.push(t),this._running||(this._running=!0,this.drainQueueLaterOnExecutor())}get await(){return yi(t=>{const n=r=>t(_e(r));if(this._exitValue!==null){n(this._exitValue);return}return this.tell(w0((r,s)=>{r._exitValue!==null?n(this._exitValue):r.addObserver(n)})),pe(()=>this.tell(w0((r,s)=>{r.removeObserver(n)})))},this.id())}get inheritAll(){return yt((t,n)=>{const r=t.id(),s=t.getFiberRefs(),i=n.runtimeFlags,a=this.getFiberRefs(),o=jee(s,r,a);t.setFiberRefs(o);const c=t.getFiberRef(VP),u=F(_o(i,c),rP(xu),rP(Jw));return $6(u)})}get poll(){return pe(()=>Sd(this._exitValue))}unsafePoll(){return this._exitValue}interruptAsFork(t){return pe(()=>this.tell($k(ni(t))))}unsafeInterruptAsFork(t){this.tell($k(ni(t)))}addObserver(t){this._exitValue!==null?t(this._exitValue):this._observers.push(t)}removeObserver(t){this._observers=this._observers.filter(n=>n!==t)}getFiberRefs(){return this.setFiberRef(VP,this.currentRuntimeFlags),this._fiberRefs}unsafeDeleteFiberRef(t){this._fiberRefs=mj(this._fiberRefs,t)}getFiberRef(t){return this._fiberRefs.locals.has(t)?this._fiberRefs.locals.get(t)[0][1]:t.initial}setFiberRef(t,n){this._fiberRefs=aS(this._fiberRefs,{fiberId:this._fiberId,fiberRef:t,value:n}),this.refreshRefCache()}refreshRefCache(){this.currentDefaultServices=this.getFiberRef(ud),this.currentTracer=this.currentDefaultServices.unsafeMap.get(PT.key),this.currentSupervisor=this.getFiberRef(Use),this.currentScheduler=this.getFiberRef(zT),this.currentContext=this.getFiberRef(ta),this.currentSpan=this.currentContext.unsafeMap.get(z_.key)}setFiberRefs(t){this._fiberRefs=t,this.refreshRefCache()}addChild(t){this.getChildren().add(t)}removeChild(t){this.getChildren().delete(t)}transferChildren(t){const n=this._children;if(this._children=null,n!==null&&n.size>0)for(const r of n)r._exitValue===null&&t.add(this.currentRuntimeFlags,r)}drainQueueOnCurrentThread(){let t=!0;for(;t;){let n=mf;const r=globalThis[Za];globalThis[Za]=this;try{for(;n===mf;)n=this._queue.length===0?_se:this.evaluateMessageWhileSuspended(this._queue.splice(0,1)[0])}finally{this._running=!1,globalThis[Za]=r}this._queue.length>0&&!this._running?(this._running=!0,n===FP?(this.drainQueueLaterOnExecutor(),t=!1):t=!0):t=!1}}drainQueueLaterOnExecutor(){this.currentScheduler.scheduleTask(this.run,this.getFiberRef(Rd))}drainQueueWhileRunning(t,n){let r=n;for(;this._queue.length>0;){const s=this._queue.splice(0,1)[0];r=Ese[s._tag](this,t,r,s)}return r}isInterrupted(){return!aY(this.getFiberRef($p))}addInterruptedCause(t){const n=this.getFiberRef($p);this.setFiberRef($p,br(n,t))}processNewInterruptSignal(t){this.addInterruptedCause(t),this.sendInterruptSignalToAllChildren()}sendInterruptSignalToAllChildren(){if(this._children===null||this._children.size===0)return!1;let t=!1;for(const n of this._children)n.tell($k(ni(this.id()))),t=!0;return t}interruptAllChildren(){if(this.sendInterruptSignalToAllChildren()){const t=this._children.values();this._children=null;let n=!1;return yT({while:()=>!n,body:()=>{const s=t.next();return s.done?pe(()=>{n=!0}):Vs(s.value.await)},step:()=>{}})}return null}reportExitValue(t){if(tP(this.currentRuntimeFlags)){const n=this.getFiberRef(Qw),r=this.id().startTimeMillis,s=Date.now();switch(yse.unsafeUpdate(s-r,n),jP.unsafeUpdate(-1,n),t._tag){case Xn:{gse.unsafeUpdate(1,n);break}case Qn:{bse.unsafeUpdate(1,n);break}}}if(t._tag==="Failure"){const n=this.getFiberRef(uZ);!y_(t.cause)&&n._tag==="Some"&&this.log("Fiber terminated with an unhandled error",t.cause,n)}}setExitValue(t){this._exitValue=t,this.reportExitValue(t);for(let n=this._observers.length-1;n>=0;n--)this._observers[n](t);this._observers=[]}getLoggers(){return this.getFiberRef(Ase)}log(t,n,r){const s=ft(r)?r.value:this.getFiberRef(sZ),i=this.getFiberRef(vse);if(lte(i,s))return;const a=this.getFiberRef(iZ),o=this.getFiberRef(rZ),c=this.getLoggers(),u=this.getFiberRefs();if(iT(c)>0){const l=ci(this.getFiberRef(ud),Od),d=new Date(l.unsafeCurrentTimeMillis());PK(u,()=>{for(const f of c)f.log({fiberId:this.id(),logLevel:s,message:t,cause:n,context:u,spans:a,annotations:o,date:d})})}}evaluateMessageWhileSuspended(t){switch(t._tag){case KT:return FP;case HT:return this.processNewInterruptSignal(t.cause),this._asyncInterruptor!==null&&(this._asyncInterruptor(Pt(t.cause)),this._asyncInterruptor=null),mf;case GT:return this._asyncInterruptor=null,this._asyncBlockingOn=null,this.evaluateEffect(t.effect),mf;case qT:return t.onFiber(this,this._exitValue!==null?Xee:Zee(this.currentRuntimeFlags,this._asyncBlockingOn)),mf;default:return jp(t)}}evaluateEffect(t){this.currentSupervisor.onResume(this);try{let n=ao(this.currentRuntimeFlags)&&this.isInterrupted()?Pt(this.getInterruptedCause()):t;for(;n!==null;){const r=n,s=this.runLoop(r);if(s===la){const i=da.currentOp;da.currentOp=null,i._op===g0?lX(this.currentRuntimeFlags)?(this.tell(vne()),this.tell(qu(yr)),n=null):n=yr:i._op===sh&&(n=null)}else{this.currentRuntimeFlags=F(this.currentRuntimeFlags,fX(Jw));const i=this.interruptAllChildren();i!==null?n=ue(i,()=>s):(this._queue.length===0?this.setExitValue(s):this.tell(qu(s)),n=null)}}}finally{this.currentSupervisor.onSuspend(this)}}start(t){if(this._running)this.tell(qu(t));else{this._running=!0;const n=globalThis[Za];globalThis[Za]=this;try{this.evaluateEffect(t)}finally{this._running=!1,globalThis[Za]=n,this._queue.length>0&&this.drainQueueLaterOnExecutor()}}}startFork(t){this.tell(qu(t))}patchRuntimeFlags(t,n){const r=Ol(t,n);return globalThis[Za]=this,this.currentRuntimeFlags=r,r}initiateAsync(t,n){let r=!1;const s=i=>{r||(r=!0,this.tell(qu(i)))};ao(t)&&(this._asyncInterruptor=s);try{n(s)}catch(i){s($n(Bs(i)))}}pushStack(t){this._stack.push(t),t._op==="OnStep"&&this._steps.push({refs:this.getFiberRefs(),flags:this.currentRuntimeFlags})}popStack(){const t=this._stack.pop();if(t)return t._op==="OnStep"&&this._steps.pop(),t}getNextSuccessCont(){let t=this.popStack();for(;t;){if(t._op!==p0)return t;t=this.popStack()}}getNextFailCont(){let t=this.popStack();for(;t;){if(t._op!==lb&&t._op!==fb&&t._op!==ih)return t;t=this.popStack()}}[NK](t){return pe(()=>tM(this.currentContext,t))}Left(t){return un(t.left)}None(t){return un(new O_)}Right(t){return Nt(t.right)}Some(t){return Nt(t.value)}Micro(t){return Sb(n=>{let r=n;const s=Fte(Rte(t,this.currentContext));return s.addObserver(i=>{if(i._tag==="Success")return r(Nt(i.value));switch(i.cause._tag){case"Interrupt":return r(Pt(ni(gs)));case"Fail":return r(un(i.cause.error));case"Die":return r(ho(i.cause.defect))}}),Sb(i=>{r=a=>{i(Rt)},s.unsafeInterrupt()})})}[U$](t){const n=or(()=>t.effect_instruction_i0()),r=this.getNextSuccessCont();return r!==void 0?(r._op in pf||jp(r),pf[r._op](this,r,n)):(da.currentOp=Nt(n),la)}[Xn](t){const n=t,r=this.getNextSuccessCont();return r!==void 0?(r._op in pf||jp(r),pf[r._op](this,r,n.effect_instruction_i0)):(da.currentOp=n,la)}[Qn](t){const n=t.effect_instruction_i0,r=this.getNextFailCont();if(r!==void 0)switch(r._op){case p0:case db:return ao(this.currentRuntimeFlags)&&this.isInterrupted()?Pt(H2(n)):or(()=>r.effect_instruction_i1(n));case"OnStep":return ao(this.currentRuntimeFlags)&&this.isInterrupted()?Pt(H2(n)):Nt(Pt(n));case Ox:return this.patchRuntimeFlags(this.currentRuntimeFlags,r.patch),ao(this.currentRuntimeFlags)&&this.isInterrupted()?Pt(br(n,this.getInterruptedCause())):Pt(n);default:jp(r)}else return da.currentOp=Pt(n),la}[V$](t){return or(()=>t.effect_instruction_i0(this,Sj(this.currentRuntimeFlags)))}Blocked(t){const n=this.getFiberRefs(),r=this.currentRuntimeFlags;if(this._steps.length>0){const s=[],i=this._steps[this._steps.length-1];let a=this.popStack();for(;a&&a._op!=="OnStep";)s.push(a),a=this.popStack();this.setFiberRefs(i.refs),this.currentRuntimeFlags=i.flags;const o=em(i.refs,n),c=_o(i.flags,r);return Nt(v6(t.effect_instruction_i0,yt(u=>{for(;s.length>0;)u.pushStack(s.pop());return u.setFiberRefs(tm(u.id(),u.getFiberRefs())(o)),u.currentRuntimeFlags=Ol(c)(u.currentRuntimeFlags),t.effect_instruction_i1})))}return _i(s=>ue(XT(DX(t.effect_instruction_i0)),()=>s(t.effect_instruction_i1)))}RunBlocked(t){return wse(t.effect_instruction_i0)}[wd](t){const n=t.effect_instruction_i0,r=this.currentRuntimeFlags,s=Ol(r,n);if(ao(s)&&this.isInterrupted())return Pt(this.getInterruptedCause());if(this.patchRuntimeFlags(this.currentRuntimeFlags,n),t.effect_instruction_i1){const i=_o(s,r);return this.pushStack(new $X(i,t)),or(()=>t.effect_instruction_i1(r))}else return yr}[lb](t){return this.pushStack(t),t.effect_instruction_i0}OnStep(t){return this.pushStack(t),t.effect_instruction_i0}[p0](t){return this.pushStack(t),t.effect_instruction_i0}[db](t){return this.pushStack(t),t.effect_instruction_i0}[sh](t){return this._asyncBlockingOn=t.effect_instruction_i1,this.initiateAsync(this.currentRuntimeFlags,t.effect_instruction_i0),da.currentOp=t,la}[g0](t){return this._isYielding=!1,da.currentOp=t,la}[fb](t){const n=t.effect_instruction_i0,r=t.effect_instruction_i1;return n()?(this.pushStack(t),r()):yr}[ih](t){return pf[ih](this,t,void 0)}[o_](t){return or(()=>t.commit())}runLoop(t){let n=t;for(this.currentOpCount=0;;){if((this.currentRuntimeFlags&uX)!==0&&this.currentSupervisor.onEffect(this,n),this._queue.length>0&&(n=this.drainQueueWhileRunning(this.currentRuntimeFlags,n)),!this._isYielding){this.currentOpCount+=1;const r=this.currentScheduler.shouldYield(this);if(r!==!1){this._isYielding=!0,this.currentOpCount=0;const s=n;n=ue(_T({priority:r}),()=>s)}}try{if(n=this.currentTracer.context(()=>{if(Sse!==n[lu]._V){const r=this.getFiberRef(lZ);if(r._tag==="Some"){const s=n[lu]._V;this.log(`Executing an Effect versioned ${s} with a Runtime of version ${Lx()}, you may want to dedupe the effect dependencies, you can use the language service plugin to detect this at compile time: https://github.com/Effect-TS/language-service`,Do,r)}}return this[n._op](n)},this),n===la){const r=da.currentOp;return r._op===g0||r._op===sh?la:(da.currentOp=null,r._op===Xn||r._op===Qn?r:Pt(Bs(r)))}}catch(r){n!==la&&!Ne(n,"_op")||!(n._op in this)?n=P6(`Not a valid effect: ${Wl(n)}`):bZ(r)?n=Pt(br(Bs(r),ni(gs))):n=ho(r)}}}run=()=>{this.drainQueueOnCurrentThread()}}const vse=$e("effect/FiberRef/currentMinimumLogLevel",()=>jn(dte("Info"))),xse=e=>WT(t=>{const n=gj(t.context,ud);ci(n,uj).unsafe.log(e.log(t))}),Tse=$e(Symbol.for("effect/Logger/defaultLogger"),()=>xse(Vne)),Ise=$e(Symbol.for("effect/Logger/tracerLogger"),()=>WT(({annotations:e,cause:t,context:n,fiberId:r,logLevel:s,message:i})=>{const a=Wo(Zh(n,ta),z_);if(a._tag==="None"||a.value._tag==="ExternalSpan")return;const o=tM(Zh(n,ud),Od),c={};for(const[u,l]of e)c[u]=l;c["effect.fiberId"]=JY(r),c["effect.logLevel"]=s.label,t!==null&&t._tag!=="Empty"&&(c["effect.cause"]=Ad(t,{renderErrorCause:!0})),a.value.event(Wl(Array.isArray(i)&&i.length===1?i[0]:i),o.unsafeCurrentTimeNanos(),c)})),Ase=$e(Symbol.for("effect/FiberRef/currentLoggers"),()=>eZ(sT(Tse,Ise))),Cse=P(e=>Ua(e[0]),(e,t)=>Um(gT(e,n=>Pse(r=>t(n,r))))),Pse=e=>yt(t=>{const n=t.getFiberRefs(),r=dX(t.currentRuntimeFlags,xu);return ue(E4,s=>vb(s,i=>yt(a=>{const o=a.getFiberRefs(),c=a.currentRuntimeFlags,u=em(o,n),l=_o(c,r),d=em(n,o);return a.setFiberRefs(tm(u,a.id(),n)),sm(UX(e(i),l),pe(()=>{a.setFiberRefs(tm(d,a.id(),a.getFiberRefs()))}))})))}),Nse=e=>{if(Array.isArray(e)||L$(e))return[e,fe()];const t=Object.keys(e),n=t.length;return[t.map(r=>e[r]),ye(r=>{const s={};for(let i=0;i<n;i++)s[t[i]]=r[i];return s})]},Rse=(e,t,n)=>{const r=[];for(const s of e)r.push(od(s));return ue(dd(r,ze,{concurrency:n?.concurrency,batching:n?.batching,concurrentFinalizers:n?.concurrentFinalizers}),s=>{const i=fe(),a=s.length,o=new Array(a),c=new Array(a);let u=!1;for(let l=0;l<a;l++){const d=s[l];d._tag==="Left"?(o[l]=ye(d.left),u=!0):(c[l]=d.right,o[l]=i)}return u?t._tag==="Some"?un(t.value(o)):un(o):n?.discard?Rt:t._tag==="Some"?_e(t.value(c)):_e(c)})},Ose=(e,t,n)=>{const r=[];for(const s of e)r.push(od(s));return n?.discard?dd(r,ze,{concurrency:n?.concurrency,batching:n?.batching,discard:!0,concurrentFinalizers:n?.concurrentFinalizers}):Xe(dd(r,ze,{concurrency:n?.concurrency,batching:n?.batching,concurrentFinalizers:n?.concurrentFinalizers}),s=>t._tag==="Some"?t.value(s):s)},g4=(e,t)=>{const[n,r]=Nse(e);return t?.mode==="validate"?Rse(n,r,t):t?.mode==="either"?Ose(n,r,t):t?.discard!==!0&&r._tag==="Some"?Xe(dd(n,ze,t),r.value):dd(n,ze,t)},dd=P(e=>L$(e[0]),(e,t,n)=>yt(r=>{const s=n?.batching===!0||n?.batching==="inherit"&&r.getFiberRef(cZ);return n?.discard?CP(n.concurrency,()=>Gu(Ib,n?.concurrentFinalizers)(i=>s?Wi(e,(a,o)=>i(t(a,o)),!0,!1,1):A_(e,(a,o)=>i(t(a,o)))),()=>Gu(sS,n?.concurrentFinalizers)(i=>Wi(e,(a,o)=>i(t(a,o)),s,!1)),i=>Gu(iS(i),n?.concurrentFinalizers)(a=>Wi(e,(o,c)=>a(t(o,c)),s,!1,i))):CP(n?.concurrency,()=>Gu(Ib,n?.concurrentFinalizers)(i=>s?ES(e,1,(a,o)=>i(t(a,o)),!0):Pa(e,(a,o)=>i(t(a,o)))),()=>Gu(sS,n?.concurrentFinalizers)(i=>b4(e,(a,o)=>i(t(a,o)),s)),i=>Gu(iS(i),n?.concurrentFinalizers)(a=>ES(e,i,(o,c)=>a(t(o,c)),s)))})),b4=(e,t,n)=>qe(()=>{const r=Tt(e),s=new Array(r.length);return rn(Wi(r,(a,o)=>ue(t(a,o),c=>pe(()=>s[o]=c)),n,!1),_e(s))}),Wi=(e,t,n,r,s)=>_i(i=>zX(a=>yt(o=>{let c=Array.from(e).reverse(),u=c.length;if(u===0)return Rt;let l=0,d=!1;const f=s?Math.min(c.length,s):c.length,h=new Set,m=new Array,y=()=>h.forEach(I=>{I.currentScheduler.scheduleTask(()=>{I.unsafeInterruptAsFork(o.id())},0)}),g=new Array,p=new Array,_=new Array,k=()=>{const I=m.filter(({exit:D})=>D._tag==="Failure").sort((D,R)=>D.index<R.index?-1:D.index===R.index?0:1).map(({exit:D})=>D);return I.length===0&&I.push(yr),I},v=(I,D=!1)=>{const R=Um(a(I)),z=Lse(R,o,o.currentRuntimeFlags,q_);return o.currentScheduler.scheduleTask(()=>{D&&z.unsafeInterruptAsFork(o.id()),z.resume(R)},0),z},w=()=>{r||(u-=c.length,c=[]),d=!0,y()},S=n?MX:ko,T=v(yi(I=>{const D=(z,V)=>{z._op==="Blocked"?_.push(z):(m.push({index:V,exit:z}),z._op==="Failure"&&!d&&w())},R=()=>{if(c.length>0){const z=c.pop();let V=l++;const H=()=>{const me=c.pop();return V=l++,ue(_T(),()=>ue(S(i(t(me,V))),G))},G=me=>c.length>0&&(D(me,V),c.length>0)?H():_e(me),Q=ue(S(i(t(z,V))),G),ne=v(Q);g.push(ne),h.add(ne),d&&ne.currentScheduler.scheduleTask(()=>{ne.unsafeInterruptAsFork(o.id())},0),ne.addObserver(me=>{let ke;if(me._op==="Failure"?ke=me:ke=me.effect_instruction_i0,p.push(ne),h.delete(ne),D(ke,V),m.length===u)I(_e(Kt(Ll(k(),{parallel:!0}),()=>yr)));else if(_.length+m.length===u){const et=k(),C=_.map(M=>M.effect_instruction_i0).reduce(k6);I(_e(v6(C,Wi([Kt(Ll(et,{parallel:!0}),()=>yr),..._.map(M=>M.effect_instruction_i1)],M=>M,n,!0,s))))}else R()})}};for(let z=0;z<f;z++)R()}));return Vs(du(I_(i(rm(T))),D_({onFailure:I=>{w();const D=_.length+1,R=Math.min(typeof s=="number"?s:_.length,_.length),z=Array.from(_);return yi(V=>{let H=0,G=0;const Q=(me,ke)=>et=>{H++,H===D&&V(Nt(Pt(I))),z.length>0&&ke&&ne()},ne=()=>{v(z.pop(),!0).addObserver(Q(G,!0)),G++};T.addObserver(Q(G,!1)),G++;for(let me=0;me<R;me++)ne()})},onSuccess:()=>Pa(p,I=>I.inheritAll)})))}))),ES=(e,t,n,r)=>qe(()=>{const s=Tt(e),i=new Array(s.length);return rn(Wi(s,(o,c)=>Xe(n(o,c),u=>i[c]=u),r,!1,t),_e(i))}),XT=e=>Dse(e,q_),y4=(e,t,n,r=null)=>{const s=jb(e,t,n,r);return s.resume(e),s},Lse=(e,t,n,r=null)=>jb(e,t,n,r),jb=(e,t,n,r=null)=>{const s=r6(),i=t.getFiberRefs(),a=Fee(i,s),o=new p4(s,a,n),c=Zh(a,ta),u=o.currentSupervisor;return u.onStart(c,e,ye(t),o),o.addObserver(d=>u.onEnd(d,o)),(r!==null?r:F(t.getFiberRef(Xw),Kt(()=>t.scope()))).add(n,o),o},Dse=(e,t)=>yt((n,r)=>_e(y4(e,n,r.runtimeFlags,t))),BP=e=>Tu(t=>hn(Wo(t,Yo),{onNone:()=>e,onSome:n=>{switch(n.strategy._tag){case"Parallel":return e;case"Sequential":case"ParallelN":return ue(Ia(n,sS),r=>Km(e,r))}}})),zP=e=>t=>Tu(n=>hn(Wo(n,Yo),{onNone:()=>t,onSome:r=>r.strategy._tag==="ParallelN"&&r.strategy.parallelism===e?t:ue(Ia(r,iS(e)),s=>Km(t,s))})),Gu=(e,t)=>n=>Tu(r=>hn(Wo(r,Yo),{onNone:()=>n(ze),onSome:s=>{if(t===!0){const i=e._tag==="Parallel"?BP:e._tag==="Sequential"?UP:zP(e.parallelism);switch(s.strategy._tag){case"Parallel":return i(n(BP));case"Sequential":return i(n(UP));case"ParallelN":return i(n(zP(s.strategy.parallelism)))}}else return n(ze)}})),_4=e=>ue(Yo,e),k4=e=>ue(ZT(),t=>du(e(t),n=>t.close(n))),UP=e=>Tu(t=>hn(Wo(t,Yo),{onNone:()=>e,onSome:n=>{switch(n.strategy._tag){case"Sequential":return e;case"Parallel":case"ParallelN":return ue(Ia(n,Ib),r=>Km(e,r))}}})),$se=P(e=>Ua(e[1]),(e,t,n)=>Gm(e,t,(r,s)=>[r,s],n)),Mse=P(e=>Ua(e[1]),(e,t,n)=>n?.concurrent!==!0&&(n?.batching===void 0||n.batching===!1)?N_(e,t):Gm(e,t,(r,s)=>r,n)),jse=P(e=>Ua(e[1]),(e,t,n)=>n?.concurrent!==!0&&(n?.batching===void 0||n.batching===!1)?rn(e,t):Gm(e,t,(r,s)=>s,n)),Gm=P(e=>Ua(e[1]),(e,t,n,r)=>Xe(g4([e,t],{concurrency:r?.concurrent?2:1,batching:r?.batching,concurrentFinalizers:r?.concurrentFinalizers}),([s,i])=>n(s,i))),Yo=Ko("effect/Scope"),E4=Yo,Fse=(e,t)=>{e.state._tag==="Open"&&e.state.finalizers.set({},t)},Bse={[aP]:aP,[oP]:oP,pipe(){return Se(this,arguments)},fork(e){return pe(()=>{const t=w4(e);if(this.state._tag==="Closed")return t.state=this.state,t;const n={},r=s=>t.close(s);return this.state.finalizers.set(n,r),Fse(t,s=>pe(()=>{this.state._tag==="Open"&&this.state.finalizers.delete(n)})),t})},close(e){return qe(()=>{if(this.state._tag==="Closed")return Rt;const t=Array.from(this.state.finalizers.values()).reverse();return this.state={_tag:"Closed",exit:e},t.length===0?Rt:Oee(this.strategy)?F(Pa(t,n=>ko(n(e))),ue(n=>F(Ll(n),Wr(Ok),Kt(()=>yr)))):Lee(this.strategy)?F(b4(t,n=>ko(n(e)),!1),ue(n=>F(Ll(n,{parallel:!0}),Wr(Ok),Kt(()=>yr)))):F(ES(t,this.strategy.parallelism,n=>ko(n(e)),!1),ue(n=>F(Ll(n,{parallel:!0}),Wr(Ok),Kt(()=>yr))))})},addFinalizer(e){return qe(()=>this.state._tag==="Closed"?e(this.state.exit):(this.state.finalizers.set({},e),Rt))}},w4=(e=Gc)=>{const t=Object.create(Bse);return t.strategy=e,t.state={_tag:"Open",finalizers:new Map},t},ZT=(e=Gc)=>pe(()=>w4(e)),Km=P(2,(e,t)=>ej(e,Xr(jx(Yo,t)))),zse=e=>Nd(e,{differ:mse,fork:uh}),VP=nZ(hX),Use=zse(Y_),S4=P(3,(e,t,n)=>Hse(e,t,{onSelfWin:(r,s)=>ue(r.await,i=>{switch(i._tag){case Xn:return ue(r.inheritAll,()=>n.onSelfDone(i,s));case Qn:return n.onSelfDone(i,s)}}),onOtherWin:(r,s)=>ue(r.await,i=>{switch(i._tag){case Xn:return ue(r.inheritAll,()=>n.onOtherDone(i,s));case Qn:return n.onOtherDone(i,s)}})})),Vse=P(2,(e,t)=>Bm(n=>S4(e,t,{onSelfDone:(r,s)=>tS(r,{onFailure:i=>F(rm(s),PP(a=>$o(i,a))),onSuccess:i=>F(s,Qh(n),$r(i))}),onOtherDone:(r,s)=>tS(r,{onFailure:i=>F(rm(s),PP(a=>$o(a,i))),onSuccess:i=>F(s,Qh(n),$r(i))})}))),Hse=P(3,(e,t,n)=>yt((r,s)=>{const i=s.runtimeFlags,a=Om(!0),o=jb(e,r,i,n.selfScope),c=jb(t,r,i,n.otherScope);return yi(u=>{o.addObserver(()=>HP(o,c,n.onSelfWin,a,u)),c.addObserver(()=>HP(c,o,n.onOtherWin,a,u)),o.startFork(e),c.startFork(t)},ch(o.id(),c.id()))})),HP=(e,t,n,r,s)=>{BY(!0,!1)(r)&&s(n(e,t))},sm=P(2,(e,t)=>_i(n=>Us(n(e),{onFailure:r=>Us(t,{onFailure:s=>$n(br(r,s)),onSuccess:()=>$n(r)}),onSuccess:r=>$r(t,r)}))),qse=(e,t,n)=>Bm(r=>ue(ue(XT(pT(e)),s=>yi(i=>{const a=t.map(u=>u.listeners.count),o=()=>{a.every(u=>u===0)&&t.every(u=>u.result.state.current._tag==="Pending"?!0:!!(u.result.state.current._tag==="Done"&&L_(u.result.state.current.effect)&&u.result.state.current.effect._tag==="Failure"&&VM(u.result.state.current.effect.cause)))&&(c.forEach(u=>u()),n?.(),i(kT(s)))};s.addObserver(u=>{c.forEach(l=>l()),i(u)});const c=t.map((u,l)=>{const d=f=>{a[l]=f,o()};return u.listeners.addObserver(d),()=>u.listeners.removeObserver(d)});return o(),pe(()=>{c.forEach(u=>u())})})),()=>qe(()=>{const s=t.flatMap(i=>i.state.completed?[]:[i]);return A_(s,i=>ase(i.request,EZ(r)))}))),Gse=Do,v4=ou,wS=Bs,x4=ni,Kse=$o,Wse=iY,Jse=UM,Fb=VM,Yse=y_,Qse=aT,Xse=GM,Zse=lY,eie=hZ,tie=__,$d=O_,eI=Ad,nie="effect/ScheduleInterval",Bb=Symbol.for(nie),T4={[Bb]:Bb,startMillis:0,endMillis:0},I4=(e,t)=>e>t?T4:{[Bb]:Bb,startMillis:e,endMillis:t},rie=P(2,(e,t)=>sie(e,t)===e),sie=P(2,(e,t)=>e.endMillis<=t.startMillis?e:t.endMillis<=e.startMillis?t:e.startMillis<t.startMillis?e:t.startMillis<e.startMillis?t:e.endMillis<=t.endMillis?e:t),iie=e=>e.startMillis>=e.endMillis,aie=P(2,(e,t)=>{const n=Math.max(e.startMillis,t.startMillis),r=Math.min(e.endMillis,t.endMillis);return I4(n,r)}),oie=e=>I4(e,Number.POSITIVE_INFINITY),A4=T4,cie=rie,uie=iie,lie=aie,die=oie,fie="effect/ScheduleIntervals",qP=Symbol.for(fie),C4=e=>({[qP]:qP,intervals:e}),hie=P(2,(e,t)=>mie(e.intervals,t.intervals,dr())),mie=(e,t,n)=>{let r=e,s=t,i=n;for(;Fa(r)&&Fa(s);){const a=F(zi(r),lie(zi(s))),o=uie(a)?i:F(i,wr(a));F(zi(r),cie(zi(s)))?r=Ca(r):s=Ca(s),i=o}return C4(ja(i))},SS=e=>F(e.intervals,Wx,Kt(()=>A4)).startMillis,pie=e=>F(e.intervals,Wx,Kt(()=>A4)).endMillis,gie=P(2,(e,t)=>SS(e)<SS(t)),bie=e=>Fa(e.intervals),yie=C4,_ie=hie,kie=SS,GP=pie,Eie=gie,wie=bie,tI="Continue",P4="Done",Sie=e=>({_tag:tI,intervals:e}),vie=e=>({_tag:tI,intervals:yie(Tn(e))}),xie={_tag:P4},Tie=e=>e._tag===tI,Iie=e=>e._tag===P4,Aie=Sie,Cie=vie,im=xie,KP=Tie,zb=Iie,Pie=Yo,Ub=K6,Nie=vb,Vb=Zw,Rie=Km,N4=Ia,R4=ZT;class Oie{permits;waiters=new Set;taken=0;constructor(t){this.permits=t}get free(){return this.permits-this.taken}take=t=>fo(n=>{if(this.free<t){const r=()=>{this.free<t||(this.waiters.delete(r),n(qe(()=>this.free<t?this.take(t):(this.taken+=t,_e(t)))))};return this.waiters.add(r),pe(()=>{this.waiters.delete(r)})}n(qe(()=>this.free<t?this.take(t):(this.taken+=t,_e(t))))});updateTakenUnsafe(t,n){return this.taken=n(this.taken),this.waiters.size>0&&t.getFiberRef(zT).scheduleTask(()=>{const r=this.waiters.values();let s=r.next();for(;s.done===!1&&this.free>0;)s.value(),s=r.next()},t.getFiberRef(Rd)),_e(this.free)}updateTaken(t){return yt(n=>this.updateTakenUnsafe(n,t))}resize=t=>Vs(yt(n=>(this.permits=t,this.free<0?Rt:this.updateTakenUnsafe(n,r=>r))));release=t=>this.updateTaken(n=>n-t);releaseAll=this.updateTaken(t=>0);withPermits=t=>n=>_i(r=>ue(r(this.take(t)),s=>sm(r(n),this.release(s))));withPermitsIfAvailable=t=>n=>_i(r=>qe(()=>this.free<t?une:(this.taken+=t,sm(r(ene(n)),this.release(t)))))}const nI=e=>new Oie(e),Lie=e=>pe(()=>nI(e));class Die extends Dd{isOpen;waiters=[];scheduled=!1;constructor(t){super(),this.isOpen=t}commit(){return this.await}unsafeSchedule(t){return this.scheduled||this.waiters.length===0||(this.scheduled=!0,t.currentScheduler.scheduleTask(this.flushWaiters,t.getFiberRef(Rd))),Rt}flushWaiters=()=>{this.scheduled=!1;const t=this.waiters;this.waiters=[];for(let n=0;n<t.length;n++)t[n](yr)};open=yt(t=>this.isOpen?Rt:(this.isOpen=!0,this.unsafeSchedule(t)));unsafeOpen(){this.isOpen||(this.isOpen=!0,this.flushWaiters())}release=yt(t=>this.isOpen?Rt:this.unsafeSchedule(t));await=fo(t=>this.isOpen?t(Rt):(this.waiters.push(t),pe(()=>{const n=this.waiters.indexOf(t);n!==-1&&this.waiters.splice(n,1)})));unsafeClose(){this.isOpen=!1}close=pe(()=>{this.isOpen=!1});whenOpen=t=>rn(this.await,t)}const $ie=e=>new Die(e??!1),Mie=P(2,(e,t)=>yt((n,r)=>{const s=t,i=y4(e,n,r.runtimeFlags,q_);if(s.state._tag==="Open"){const a=()=>Bm(c=>je(c,i.id())?Rt:Vs(kT(i))),o={};s.state.finalizers.set(o,a),i.addObserver(()=>{s.state._tag!=="Closed"&&s.state.finalizers.delete(o)})}else i.unsafeInterruptAsFork(n.id());return _e(i)})),jie="effect/Ref/SynchronizedRef",Fie=Symbol.for(jie),Bie={_A:e=>e};class zie extends Dd{ref;withLock;[Fie]=Bie;[Nj]=Rj;[Rb]=Rb;constructor(t,n){super(),this.ref=t,this.withLock=n,this.get=Ki(this.ref)}get;commit(){return this.get}modify(t){return this.modifyEffect(n=>_e(t(n)))}modifyEffect(t){return this.withLock(F(ue(Ki(this.ref),t),ue(([n,r])=>$r($l(this.ref,r),n))))}}const Uie=e=>pe(()=>O4(e)),O4=e=>{const t=FT(e),n=nI(1);return new zie(t,n.withPermits(1))},Vie=Symbol.for("effect/ManagedRuntime"),Hie="Fresh",qie="FromEffect",Gie="Scoped",Kie="Suspend",Wie="Provide",L4="ProvideMerge",Jie="MergeAll",D4=Lne,Yie=$ne,WP=Dne,Eo=kT,rI=Qh,JP=rm,Md=e=>function(){if(arguments.length===1){const t=arguments[0];return(n,...r)=>e(t,n,...r)}return e.apply(this,arguments)},Wm=Md((e,t,n)=>{const r=r6(),s=[[ta,[[r,e.context]]]];n?.scheduler&&s.push([zT,[[r,n.scheduler]]]);let i=zee(e.fiberRefs,{entries:s,forkAs:r});n?.updateRefs&&(i=n.updateRefs(i,r));const a=new p4(r,i,e.runtimeFlags);let o=t;n?.scope&&(o=ue(N4(n.scope,Gc),u=>rn(K6(u,Bm(l=>je(l,a.id())?Rt:Qh(a,l))),du(t,l=>Vb(u,l)))));const c=a.currentSupervisor;return c!==Y_&&(c.onStart(e.context,o,fe(),a),a.addObserver(u=>c.onEnd(u,a))),q_.add(e.runtimeFlags,a),n?.immediate===!1?a.resume(o):a.start(o),a}),$4=Md((e,t,n={})=>{const r=Wm(e,t,n);return n.onExit&&r.addObserver(s=>{n.onExit(s)}),(s,i)=>$4(e)(F(r,rI(s??gs)),{...i,onExit:i?.onExit?a=>i.onExit(wne(a)):void 0})}),M4=Md((e,t)=>{const n=eae(e)(t);if(n._tag==="Failure")throw j4(n.effect_instruction_i0);return n.effect_instruction_i0});class Qie extends Error{fiber;_tag="AsyncFiberException";constructor(t){super(`Fiber #${t.id().id} cannot be resolved synchronously. This is caused by using runSync on an effect that performs async work`),this.fiber=t,this.name=this._tag,this.stack=this.message}}const Xie=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new Qie(e);return Error.stackTraceLimit=t,n},Mk=Symbol.for("effect/Runtime/FiberFailure"),Fp=Symbol.for("effect/Runtime/FiberFailure/Cause");class Zie extends Error{[Mk];[Fp];constructor(t){const n=WM(t)[0];super(n?.message||"An error has occurred"),this[Mk]=Mk,this[Fp]=t,this.name=n?`(FiberFailure) ${n.name}`:"FiberFailure",n?.stack&&(this.stack=n.stack)}toJSON(){return{_id:"FiberFailure",cause:this[Fp].toJSON()}}toString(){return"(FiberFailure) "+Ad(this[Fp],{renderErrorCause:!0})}[gt](){return this.toString()}}const j4=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new Zie(e);return Error.stackTraceLimit=t,n},F4=e=>{const t=e;switch(t._op){case"Failure":case"Success":return t;case"Left":return Xh(t.left);case"Right":return Nt(t.right);case"Some":return Nt(t.value);case"None":return Xh(new O_)}},eae=Md((e,t)=>{const n=F4(t);if(n)return n;const r=new H_,s=Wm(e)(t,{scheduler:r});r.flush();const i=s.unsafePoll();return i||J6(mT(Xie(s),CT(s)))}),tae=Md((e,t,n)=>nae(e,t,n).then(r=>{switch(r._tag){case Xn:return r.effect_instruction_i0;case Qn:throw j4(r.effect_instruction_i0)}})),nae=Md((e,t,n)=>new Promise(r=>{const s=F4(t);s&&r(s);const i=Wm(e)(t);i.addObserver(a=>{r(a)}),n?.signal!==void 0&&(n.signal.aborted?i.unsafeInterruptAsFork(i.id()):n.signal.addEventListener("abort",()=>{i.unsafeInterruptAsFork(i.id())},{once:!0}))}));class B4{context;runtimeFlags;fiberRefs;constructor(t,n,r){this.context=t,this.runtimeFlags=n,this.fiberRefs=r}pipe(){return Se(this,arguments)}}const z4=e=>new B4(e.context,e.runtimeFlags,e.fiberRefs),rae=()=>yt((e,t)=>_e(new B4(e.getFiberRef(ta),t.runtimeFlags,e.getFiberRefs()))),sae=y6(xu,g6,p6),fd=z4({context:gi(),runtimeFlags:sae,fiberRefs:Uee()}),iae=Wm(fd),aae=tae(fd),oae=M4(fd),cae=P(2,(e,t)=>e.modifyEffect(t)),uae="effect/Layer",U4=Symbol.for(uae),lae={_RIn:e=>e,_E:e=>e,_ROut:e=>e},mu={[U4]:lae,pipe(){return Se(this,arguments)}},dae="effect/Layer/MemoMap",jk=Symbol.for(dae),fae=Su()("effect/Layer/CurrentMemoMap",{defaultValue:()=>pae()}),hae=e=>Ne(e,U4),mae=e=>e._op_layer===Hie;class V4{ref;[jk];constructor(t){this.ref=t,this[jk]=jk}getOrElseMemoize(t,n){return F(cae(this.ref,r=>{const s=r.get(t);if(s!==void 0){const[i,a]=s,o=F(i,ue(([c,u])=>F(Uj(c),$r(u))),du(D_({onFailure:()=>Rt,onSuccess:()=>vb(n,a)})));return _e([o,r])}return F(Ob(0),ue(i=>F(M_(),ue(a=>F(Ob(()=>Rt),Xe(o=>{const c=_i(l=>F(ZT(),ue(d=>F(l(ue(K4(t,d,!0),f=>tne(f(this)))),ko,ue(f=>{switch(f._tag){case Qn:return F(X6(a,f.effect_instruction_i0),rn(Zw(d,f)),rn($n(f.effect_instruction_i0)));case Xn:return F($l(o,h=>F(Zw(d,h),bT(Oj(i,m=>[m===1,m-1])),Vs)),rn(Lb(i,h=>h+1)),rn(vb(n,h=>F(pe(()=>r.delete(t)),rn(Ki(o)),ue(m=>m(h))))),rn(TT(a,f.effect_instruction_i0)),$r(f.effect_instruction_i0[1]))}}))))),u=[F(Mo(a),du(tS({onFailure:()=>Rt,onSuccess:()=>Lb(i,l=>l+1)}))),l=>F(Ki(o),ue(d=>d(l)))];return[c,mae(t)?r:r.set(t,u)]}))))))}),I_)}}const H4=qe(()=>Xe(Uie(new Map),e=>new V4(e))),pae=()=>new V4(O4(new Map)),q4=P(2,(e,t)=>ue(H4,n=>G4(e,n,t))),G4=P(3,(e,t,n)=>ue(K4(e,n),r=>Vj(r(t),fae,t))),K4=(e,t,n=!1)=>{const r=e;switch(r._op_layer){case"Locally":return pe(()=>s=>r.f(s.getOrElseMemoize(r.self,t)));case"ExtendScope":return pe(()=>s=>_4(i=>s.getOrElseMemoize(r.layer,i)));case"Fold":return pe(()=>s=>F(s.getOrElseMemoize(r.layer,t),Us({onFailure:i=>s.getOrElseMemoize(r.failureK(i),t),onSuccess:i=>s.getOrElseMemoize(r.successK(i),t)})));case"Fresh":return pe(()=>s=>F(r.layer,q4(t)));case"FromEffect":return pe(n?()=>s=>r.effect:()=>s=>s.getOrElseMemoize(e,t));case"Provide":return pe(()=>s=>F(s.getOrElseMemoize(r.first,t),ue(i=>F(s.getOrElseMemoize(r.second,t),B_(i)))));case"Scoped":return pe(n?()=>s=>Km(r.effect,t):()=>s=>s.getOrElseMemoize(e,t));case"Suspend":return pe(()=>s=>s.getOrElseMemoize(r.evaluate(),t));case"ProvideMerge":return pe(()=>s=>F(s.getOrElseMemoize(r.first,t),F6(s.getOrElseMemoize(r.second,t),r.zipK)));case"ZipWith":return M6(function*(){const s=yield*Ia(t,rS),i=yield*Ia(s,Gc),a=yield*Ia(s,Gc);return o=>F(o.getOrElseMemoize(r.first,i),Gm(o.getOrElseMemoize(r.second,a),r.zipK,{concurrent:!0}))});case"MergeAll":{const s=r.layers;return Xe(Ia(t,rS),i=>a=>{const o=new Array(s.length);return Xe(Wi(s,j6(function*(c,u){const l=yield*Ia(i,Gc),d=yield*a.getOrElseMemoize(c,l);o[u]=d}),!1,!1),()=>lW(...o))})}}},gae=()=>W4(IT()),bae=P(2,(e,t)=>{const n=eM(e),r=n?e:t;return W4(Xe(n?t:e,i=>jx(r,i)))});function W4(e){const t=Object.create(mu);return t._op_layer=qie,t.effect=e,t}const J4=(...e)=>{const t=Object.create(mu);return t._op_layer=Jie,t.layers=e,t},yae=P(2,(e,t)=>{const n=eM(e),r=n?e:t;return _ae(Xe(n?t:e,i=>jx(r,i)))}),_ae=e=>{const t=Object.create(mu);return t._op_layer=Gie,t.effect=e,t},kae=e=>{const t=Object.create(mu);return t._op_layer=Kie,t.evaluate=e,t},Y4=P(2,(e,t)=>kae(()=>{const n=Object.create(mu);return n._op_layer=Wie,n.first=Object.create(mu,{_op_layer:{value:L4,enumerable:!0},first:{value:gae(),enumerable:!0},second:{value:Array.isArray(t)?J4(...t):t},zipK:{value:(r,s)=>F(r,Xr(s))}}),n.second=e,n})),Eae=P(2,(e,t)=>{const n=Object.create(mu);return n._op_layer=L4,n.first=t,n.second=Y4(e,t),n.zipK=(r,s)=>F(r,Xr(s)),n}),YP=P(2,(e,t)=>k4(n=>ue(q4(t,n),r=>AT(e,r)))),QP=P(2,(e,t)=>{const n=em(fd.fiberRefs,t.fiberRefs),r=_o(fd.runtimeFlags,t.runtimeFlags);return _i(s=>yt(i=>{const a=i.getFiberRef(ta),o=i.getFiberRefs(),c=tm(i.id(),o)(n),u=i.currentRuntimeFlags,l=Ol(r)(u),d=em(c,o),f=_o(l,u);return i.setFiberRefs(c),i.currentRuntimeFlags=l,sm(AT(s(e),Xr(a,t.context)),yt(h=>(h.setFiberRefs(tm(h.id(),h.getFiberRefs())(d)),h.currentRuntimeFlags=Ol(f)(h.currentRuntimeFlags),Rt)))}))}),wae=P(2,(e,t)=>Array.isArray(t)?YP(e,J4(...t)):hae(t)?YP(e,t):uW(t)?AT(e,t):Vie in t?ue(t.runtimeEffect,n=>QP(e,n)):QP(e,t)),sI=(function(){const e=Symbol.for("effect/Data/Error/plainArgs");return{BaseEffectError:class extends wT{constructor(n){super(n?.message,n?.cause?{cause:n.cause}:void 0),n&&(Object.assign(this,n),Object.defineProperty(this,e,{value:n,enumerable:!1}))}toJSON(){return{...this[e],...this}}}}.BaseEffectError})(),Jm=e=>{const t={BaseEffectError:class extends sI{_tag=e}};return t.BaseEffectError.prototype.name=e,t.BaseEffectError},Sae="effect/Schedule",Q4=Symbol.for(Sae),vae=e=>Ne(e,Q4),xae="effect/ScheduleDriver",Tae=Symbol.for(xae),vS={start:0,now:0,input:void 0,output:void 0,elapsed:rd,elapsedSincePrevious:rd,recurrence:0},XP=Su()("effect/Schedule/CurrentIterationMetadata",{defaultValue:()=>vS}),Iae={_Out:e=>e,_In:e=>e,_R:e=>e},Aae={_Out:e=>e,_In:e=>e,_R:e=>e};class Cae{initial;step;[Q4]=Iae;constructor(t,n){this.initial=t,this.step=n}pipe(){return Se(this,arguments)}}const ZP=(e,t,n,r)=>Lb(e,s=>s.recurrence===0?{now:t,input:n,output:r,recurrence:s.recurrence+1,elapsed:rd,elapsedSincePrevious:rd,start:t}:{now:t,input:n,output:r,recurrence:s.recurrence+1,elapsed:sd(t-s.start),elapsedSincePrevious:sd(t-s.now),start:s.start});class Pae{schedule;ref;[Tae]=Aae;constructor(t,n){this.schedule=t,this.ref=n}get state(){return Xe(Ki(this.ref),t=>t[1])}get last(){return ue(Ki(this.ref),([t,n])=>{switch(t._tag){case"None":return x_(()=>new O_);case"Some":return _e(t.value)}})}iterationMeta=FT(vS);get reset(){return $l(this.ref,[fe(),this.schedule.initial]).pipe(N_($l(this.iterationMeta,vS)))}next(t){return F(Xe(Ki(this.ref),n=>n[1]),ue(n=>F(Wte,ue(r=>F(qe(()=>this.schedule.step(r,t,n)),ue(([s,i,a])=>{const o=$l(this.ref,[ye(i),s]);if(zb(a))return o.pipe(rn(un(fe())));const c=kie(a.intervals)-r;if(c<=0)return o.pipe(rn(ZP(this.iterationMeta,r,t,i)),$r(i));const u=sd(c);return F(o,rn(ZP(this.iterationMeta,r,t,i)),rn(cne(u)),$r(i))}))))))}}const Ym=(e,t)=>new Cae(e,t),Nae=P(2,(e,t)=>iI(e,(n,r)=>pe(()=>t(n,r)))),iI=P(2,(e,t)=>Ym(e.initial,(n,r,s)=>ue(e.step(n,r,s),([i,a,o])=>zb(o)?_e([i,a,im]):Xe(t(r,a),c=>c?[i,a,o]:[i,a,im])))),Rae=e=>F(Ob([fe(),e.initial]),Xe(t=>new Pae(e,t))),Oae=P(2,(e,t)=>Lae(e,t,_ie)),Lae=P(3,(e,t,n)=>Ym([e.initial,t.initial],(r,s,i)=>F(F6(e.step(r,s,i[0]),t.step(r,s,i[1]),(a,o)=>[a,o]),ue(([[a,o,c],[u,l,d]])=>KP(c)&&KP(d)?xS(e,t,s,a,o,c.intervals,u,l,d.intervals,n):_e([[a,u],[o,l],im]))))),xS=(e,t,n,r,s,i,a,o,c,u)=>{const l=u(i,c);return wie(l)?_e([[r,a],[s,o],Aie(l)]):F(i,Eie(c))?ue(e.step(GP(i),n,r),([d,f,h])=>zb(h)?_e([[d,a],[f,o],im]):xS(e,t,n,d,f,h.intervals,a,o,c,u)):ue(t.step(GP(c),n,a),([d,f,h])=>zb(h)?_e([[r,d],[s,f],im]):xS(e,t,n,r,s,i,d,f,h.intervals,u))},Dae=P(2,(e,t)=>$ae(e,n=>pe(()=>t(n)))),$ae=P(2,(e,t)=>Ym(e.initial,(n,r,s)=>ue(e.step(n,r,s),([i,a,o])=>Xe(t(a),c=>[i,c,o])))),Mae=e=>Ym(e.initial,(t,n,r)=>F(e.step(t,n,r),Xe(([s,i,a])=>[s,n,a]))),jae=e=>Uae(Z4,t=>t<e),Fae=(e,t)=>Ym(e,(n,r,s)=>pe(()=>[t(s),s,Cie(die(n))])),Bae=P(2,(e,t)=>iI(e,(n,r)=>ine(t(n)))),zae=P(2,(e,t)=>iI(e,(n,r)=>t(n))),Uae=P(2,(e,t)=>Nae(e,(n,r)=>t(r))),v0=Symbol.for("effect/Schedule/ScheduleDefect");class Vae{error;[v0];constructor(t){this.error=t,this[v0]=v0}}const Hae=e=>Ne(e,v0),eN=e=>Yh(e,t=>ho(new Vae(t))),qae=e=>hn(oT(e,t=>UM(t)&&Hae(t.defect)?ye(t.defect):fe()),{onNone:()=>e,onSome:t=>ou(t.error)}),Gae=e=>C6(e,t=>$n(qae(t))),tN=P(2,(e,t)=>Wae(e,t,(n,r)=>un(n))),Kae=P(2,(e,t)=>{if(vae(t))return tN(e,t);const n=t.schedule??Mae(Z4),r=t.while?zae(n,a=>{const o=t.while(a);return typeof o=="boolean"?_e(o):eN(o)}):n,s=t.until?Bae(r,a=>{const o=t.until(a);return typeof o=="boolean"?_e(o):eN(o)}):r,i=t.times?Oae(s,jae(t.times)).pipe(Dae(a=>a[0])):s;return Gae(tN(e,i))}),Wae=P(3,(e,t,n)=>ue(Rae(t),r=>Ba(e,{onFailure:s=>n(s,fe()),onSuccess:s=>X4(NP(e,XP,Ki(r.iterationMeta)),r,(i,a)=>NP(n(i,a),XP,Ki(r.iterationMeta)),s)}))),X4=(e,t,n,r)=>Ba(t.next(r),{onFailure:()=>jX(t.last),onSuccess:s=>Ba(e,{onFailure:i=>n(i,ye(s)),onSuccess:i=>X4(e,t,n,i)})}),Z4=Fae(0,e=>e+1),Ui=M_,Nr=Mo,Jae=Q6,Yae=X6,TS=xZ,Ra=TT,Qae=F_,nN=Symbol.for("effect/MutableList"),Xae={[nN]:nN,[Symbol.iterator](){let e=!1,t=this.head;return{next(){if(e)return this.return();if(t==null)return e=!0,this.return();const n=t.value;return t=t.next,{done:e,value:n}},return(n){return e||(e=!0),{done:!0,value:n}}}},toString(){return Dt(this.toJSON())},toJSON(){return{_id:"MutableList",values:Array.from(this).map(Yt)}},[gt](){return this.toJSON()},pipe(){return Se(this,arguments)}},Zae=e=>({value:e,removed:!1,prev:void 0,next:void 0}),eoe=()=>{const e=Object.create(Xae);return e.head=void 0,e.tail=void 0,e._length=0,e},e5=e=>aI(e)===0,aI=e=>e._length,toe=P(2,(e,t)=>{const n=Zae(t);return e.head===void 0&&(e.head=n),e.tail===void 0||(e.tail.next=n,n.prev=e.tail),e.tail=n,e._length+=1,e}),noe=e=>{const t=e.head;if(t!==void 0)return roe(e,t),t.value},roe=(e,t)=>{t.removed||(t.removed=!0,t.prev!==void 0&&t.next!==void 0?(t.prev.next=t.next,t.next.prev=t.prev):t.prev!==void 0?(e.tail=t.prev,t.prev.next=void 0):t.next!==void 0?(e.head=t.next,t.next.prev=void 0):(e.tail=void 0,e.head=void 0),e._length>0&&(e._length-=1))},rN=Symbol.for("effect/MutableQueue"),qr=Symbol.for("effect/mutable/MutableQueue/Empty"),soe={[rN]:rN,[Symbol.iterator](){return Array.from(this.queue)[Symbol.iterator]()},toString(){return Dt(this.toJSON())},toJSON(){return{_id:"MutableQueue",values:Array.from(this).map(Yt)}},[gt](){return this.toJSON()},pipe(){return Se(this,arguments)}},t5=e=>{const t=Object.create(soe);return t.queue=eoe(),t.capacity=e,t},ioe=e=>t5(e),oI=()=>t5(void 0),cI=e=>aI(e.queue),IS=e=>e5(e.queue),aoe=e=>e.capacity===void 0?1/0:e.capacity,am=P(2,(e,t)=>{const n=aI(e.queue);return e.capacity!==void 0&&n===e.capacity?!1:(toe(t)(e.queue),!0)}),n5=P(2,(e,t)=>{const n=t[Symbol.iterator]();let r,s=dr(),i=!0;for(;i&&(r=n.next())&&!r.done;)i=am(r.value)(e);for(;r!=null&&!r.done;)s=wr(r.value)(s),r=n.next();return ja(s)}),wo=P(2,(e,t)=>e5(e.queue)?t:noe(e.queue)),uI=P(2,(e,t)=>{let n=dr(),r=0;for(;r<t;){const s=wo(qr)(e);if(s===qr)break;n=wr(s)(n),r+=1}return ja(n)}),AS=lu,Qo=Ua,Fk=sne,ooe=g4,Ji=dd,CS=yi,Hb=yt,na=un,ui=$n,coe=P6,Ml=M6,Kc=VX,uoe=one,Ot=_e,ln=qe,Mt=pe,pt=Rt,r5=Yh,lI=C6,loe=rne,doe=Fj,foe=fne,jl=dne,kc=Ea,ri=pT,hoe=zm,Ff=Um,qb=_i,Bk=$r,dI=Vs,It=Xe,fI=C_,Gb=Cse,moe=I6,_l=sm,Q_=E4,poe=_4,PS=k4,goe=Bm,boe=XT,Wc=Mie,s5=IT,i5=ej,om=wae,yoe=pne,Ku=od,ur=ko,a5=L6,_oe=mne,Oe=ue,ul=I_,zk=Vse,o5=S4,c5=gT,u5=lne,sN=Kae,koe=Pd,Eoe=Bj,NS=R6,si=Us,woe=Ba,Qm=rae,Soe=nI,voe=Lie,xoe=$ie,X_=iae,l5=aae,zs=oae,Kb=$se,hI=Mse,cr=jse,Z_=Gm,Toe=yne,Ioe=_ne,Aoe=j6,e1=Wm,Coe=M4,Poe=$4,t1=fd,mI=z4,RS=Symbol.for("effect/FiberHandle"),Noe=e=>Ne(e,RS),Roe={[RS]:RS,toString(){return Dt(this.toJSON())},toJSON(){return{_id:"FiberHandle",state:this.state}},[gt](){return this.toJSON()},pipe(){return Se(this,arguments)}},Ooe=e=>{const t=Object.create(Roe);return t.state={_tag:"Open",fiber:void 0},t.deferred=e,t},Loe=()=>Gb(It(Ui(),e=>Ooe(e)),e=>Hb(t=>{const n=e.state;return n._tag==="Closed"?pt:(e.state={_tag:"Closed"},n.fiber?a5(dI(rI(n.fiber,ch(t.id(),x0))),e.deferred):Jae(e.deferred,VT))})),Doe=()=>Oe(Loe(),e=>joe(e)()),d5=-1,x0=WY(d5,0),$oe=tie(void 0,{emptyCase:La,failCase:La,dieCase:La,interruptCase:(e,t)=>jM(n6(t),d5),sequentialCase:(e,t,n)=>t||n,parallelCase:(e,t,n)=>t||n}),Moe=P(e=>Noe(e[0]),(e,t,n)=>{if(e.state._tag==="Closed"){t.unsafeInterruptAsFork(ch(n?.interruptAs??gs,x0));return}else if(e.state.fiber!==void 0){if(n?.onlyIfMissing===!0){t.unsafeInterruptAsFork(ch(n?.interruptAs??gs,x0));return}else if(e.state.fiber===t)return;e.state.fiber.unsafeInterruptAsFork(ch(n?.interruptAs??gs,x0)),e.state.fiber=void 0}e.state.fiber=t,t.addObserver(r=>{e.state._tag==="Open"&&t===e.state.fiber&&(e.state.fiber=void 0),UT(r)&&(n?.propagateInterruption===!0?!$oe(r.cause):!Yse(r.cause))&&Qae(e.deferred,r)})}),iN=(function(){let e;return()=>(e===void 0&&(e=X_(kc)),e)})(),joe=e=>()=>It(Qm(),t=>{const n=e1(t);return(r,s)=>{if(e.state._tag==="Closed")return iN();if(e.state.fiber!==void 0&&s?.onlyIfMissing===!0)return iN();const i=n(r,s);return Moe(e,i,s),i}}),Foe=bae,Boe=yae,zoe=Y4,Uk=Eae,Uoe=H4,aN=G4,pI=jn,f5=ta,Voe=q6,Hoe="effect/QueueEnqueue",qoe=Symbol.for(Hoe),Goe="effect/QueueDequeue",Koe=Symbol.for(Goe),Woe="effect/QueueStrategy",h5=Symbol.for(Woe),Joe="effect/BackingQueue",Yoe=Symbol.for(Joe),m5={_A:e=>e},Qoe={_A:e=>e},Xoe={_In:e=>e},Zoe={_Out:e=>e};class ece extends Dd{queue;takers;shutdownHook;shutdownFlag;strategy;[qoe]=Xoe;[Koe]=Zoe;constructor(t,n,r,s,i){super(),this.queue=t,this.takers=n,this.shutdownHook=r,this.shutdownFlag=s,this.strategy=i}pipe(){return Se(this,arguments)}commit(){return this.take}capacity(){return this.queue.capacity()}get size(){return qe(()=>Yh(this.unsafeSize(),()=>Ea))}unsafeSize(){return Cn(this.shutdownFlag)?fe():ye(this.queue.length()-cI(this.takers)+this.strategy.surplusSize())}get isEmpty(){return Xe(this.size,t=>t<=0)}get isFull(){return Xe(this.size,t=>t>=this.capacity())}get shutdown(){return Um(yt(t=>(F(this.shutdownFlag,Lm(!0)),F(Wi(Fl(this.takers),n=>Z6(n,t.id()),!1,!1),rn(this.strategy.shutdown),bT(TT(this.shutdownHook,void 0)),Vs))))}get isShutdown(){return pe(()=>Cn(this.shutdownFlag))}get awaitShutdown(){return Mo(this.shutdownHook)}isActive(){return!Cn(this.shutdownFlag)}unsafeOffer(t){if(Cn(this.shutdownFlag))return!1;let n;if(this.queue.length()===0){const s=F(this.takers,wo(qr));s!==qr?(Jc(s,t),n=!0):n=!1}else n=!1;if(n)return!0;const r=this.queue.offer(t);return kl(this.strategy,this.queue,this.takers),r}offer(t){return qe(()=>{if(Cn(this.shutdownFlag))return Ea;let n;if(this.queue.length()===0){const s=F(this.takers,wo(qr));s!==qr?(Jc(s,t),n=!0):n=!1}else n=!1;if(n)return _e(!0);const r=this.queue.offer(t);return kl(this.strategy,this.queue,this.takers),r?_e(!0):this.strategy.handleSurplus([t],this.queue,this.takers,this.shutdownFlag)})}offerAll(t){return qe(()=>{if(Cn(this.shutdownFlag))return Ea;const n=Tt(t),r=this.queue.length()===0?Tt(gce(this.takers,n.length)):Oo,[s,i]=F(n,_M(r.length));for(let o=0;o<r.length;o++){const c=r[o],u=s[o];Jc(c,u)}if(i.length===0)return _e(!0);const a=this.queue.offerAll(i);return kl(this.strategy,this.queue,this.takers),Kx(a)?_e(!0):this.strategy.handleSurplus(a,this.queue,this.takers,this.shutdownFlag)})}get take(){return yt(t=>{if(Cn(this.shutdownFlag))return Ea;const n=this.queue.poll(qr);if(n!==qr)return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),_e(n);{const r=$_(t.id());return F(qe(()=>(F(this.takers,am(r)),kl(this.strategy,this.queue,this.takers),Cn(this.shutdownFlag)?Ea:Mo(r))),zm(()=>pe(()=>bce(this.takers,r))))}})}get takeAll(){return qe(()=>Cn(this.shutdownFlag)?Ea:pe(()=>{const t=this.queue.pollUpTo(Number.POSITIVE_INFINITY);return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),Yl(t)}))}takeUpTo(t){return qe(()=>Cn(this.shutdownFlag)?Ea:pe(()=>{const n=this.queue.pollUpTo(t);return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),Yl(n)}))}takeBetween(t,n){return qe(()=>p5(this,t,n,dr()))}}const p5=(e,t,n,r)=>n<t?_e(r):F(lce(e,n),ue(s=>{const i=t-s.length;return i===1?F(OS(e),Xe(a=>F(r,wn(s),$w(a)))):i>1?F(OS(e),ue(a=>p5(e,i-1,n-s.length-1,F(r,wn(s),$w(a))))):_e(F(r,wn(s)))})),tce=e=>F(pe(()=>ioe(e)),ue(t=>g5(b5(t),fce()))),nce=()=>F(pe(()=>oI()),ue(e=>g5(b5(e),hce()))),rce=(e,t,n,r,s)=>new ece(e,t,n,r,s),g5=(e,t)=>F(M_(),Xe(n=>rce(e,oI(),n,Om(!1),t)));class sce{mutable;[Yoe]=Qoe;constructor(t){this.mutable=t}poll(t){return wo(this.mutable,t)}pollUpTo(t){return uI(this.mutable,t)}offerAll(t){return n5(this.mutable,t)}offer(t){return am(this.mutable,t)}capacity(){return aoe(this.mutable)}length(){return cI(this.mutable)}}const b5=e=>new sce(e),ice=e=>e.size,ace=e=>e.isShutdown,oce=e=>e.shutdown,cce=P(2,(e,t)=>e.offer(t)),uce=P(2,(e,t)=>e.unsafeOffer(t)),OS=e=>e.take,lce=P(2,(e,t)=>e.takeUpTo(t)),dce=P(3,(e,t,n)=>e.takeBetween(t,n)),fce=()=>new mce,hce=()=>new pce;class mce{[h5]=m5;putters=oI();surplusSize(){return cI(this.putters)}onCompleteTakersWithEmptyQueue(t){for(;!IS(this.putters)&&!IS(t);){const n=wo(t,void 0),r=wo(this.putters,void 0);r[2]&&Jc(r[1],!0),Jc(n,r[0])}}get shutdown(){return F(T_,ue(t=>F(pe(()=>Fl(this.putters)),ue(n=>Wi(n,([r,s,i])=>i?F(Z6(s,t),Vs):Rt,!1,!1)))))}handleSurplus(t,n,r,s){return yt(i=>{const a=$_(i.id());return F(qe(()=>(this.unsafeOffer(t,a),this.unsafeOnQueueEmptySpace(n,r),kl(this,n,r),Cn(s)?Ea:Mo(a))),zm(()=>pe(()=>this.unsafeRemove(a))))})}unsafeOnQueueEmptySpace(t,n){let r=!0;for(;r&&(t.capacity()===Number.POSITIVE_INFINITY||t.length()<t.capacity());){const s=F(this.putters,wo(qr));if(s===qr)r=!1;else{const i=t.offer(s[0]);i&&s[2]?Jc(s[1],!0):i||Wb(this.putters,F(Fl(this.putters),wr(s))),kl(this,t,n)}}}unsafeOffer(t,n){const r=Tt(t);for(let s=0;s<r.length;s++){const i=r[s];s===r.length-1?F(this.putters,am([i,n,!0])):F(this.putters,am([i,n,!1]))}}unsafeRemove(t){Wb(this.putters,F(Fl(this.putters),Gx(([,n])=>n!==t)))}}class pce{[h5]=m5;surplusSize(){return 0}get shutdown(){return Rt}onCompleteTakersWithEmptyQueue(){}handleSurplus(t,n,r,s){return _e(!1)}unsafeOnQueueEmptySpace(t,n){}}const Jc=(e,t)=>F_(e,_e(t)),Wb=(e,t)=>F(e,n5(t)),Fl=e=>F(e,uI(Number.POSITIVE_INFINITY)),gce=(e,t)=>F(e,uI(t)),bce=(e,t)=>{Wb(e,F(Fl(e),Gx(n=>t!==n)))},kl=(e,t,n)=>{let r=!0;for(;r&&t.length()!==0;){const s=F(n,wo(qr));if(s!==qr){const i=t.poll(qr);i!==qr?(Jc(s,i),e.unsafeOnQueueEmptySpace(t,n)):Wb(n,F(Fl(n),wr(s))),r=!0}else r=!1}r&&t.length()===0&&!IS(n)&&e.onCompleteTakersWithEmptyQueue(n)},yce=P(2,(e,t)=>e.publish(t)),_ce=yce,y5=tce,kce=nce,Ece=ice,wce=ace,Jb=oce,Wu=cce,Sce=uce,oN=OS,vce=dce,_5="Continue",xce="Close",Tce="Yield",Ice="effect/ChannelChildExecutorDecision",cN=Symbol.for(Ice),Ace={[cN]:cN},k5=e=>{const t=Object.create(Ace);return t._tag=_5,t},T0="ContinuationK",Cce="ContinuationFinalizer",E5=Symbol.for("effect/ChannelContinuation"),w5={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutDone:e=>e,_OutErr2:e=>e,_OutElem:e=>e,_OutDone2:e=>e};class S5{onSuccess;onHalt;_tag=T0;[E5]=w5;constructor(t,n){this.onSuccess=t,this.onHalt=n}onExit(t){return UT(t)?this.onHalt(t.cause):this.onSuccess(t.value)}}class Pce{finalizer;_tag=Cce;[E5]=w5;constructor(t){this.finalizer=t}}const v5="PullAfterNext",Nce="PullAfterAllEnqueued",Rce="effect/ChannelUpstreamPullStrategy",Oce=Symbol.for(Rce),Lce={_A:e=>e},Dce={[Oce]:Lce},x5=e=>{const t=Object.create(Dce);return t._tag=v5,t.emitSeparator=e,t},T5="BracketOut",I5="Bridge",gI="ConcatAll",A5="Emit",C5="Ensuring",P5="Fail",N5="Fold",R5="FromEffect",O5="PipeTo",$ce="Provide",L5="Read",D5="Succeed",$5="SucceedNow",M5="Suspend",Mce="effect/Channel",j5=Symbol.for(Mce),jce={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutElem:e=>e,_OutDone:e=>e},ts={[j5]:jce,pipe(){return Se(this,arguments)}},F5=e=>Ne(e,j5)||Qo(e),Fce=P(2,(e,t)=>{const n=Object.create(ts);return n._tag=T5,n.acquire=()=>e,n.finalizer=t,n}),B5=(e,t,n)=>{const r=Object.create(ts);return r._tag=gI,r.combineInners=t,r.combineAll=n,r.onPull=()=>x5(fe()),r.onEmit=()=>k5,r.value=()=>e,r.k=ze,r},Bce=P(4,(e,t,n,r)=>{const s=Object.create(ts);return s._tag=gI,s.combineInners=n,s.combineAll=r,s.onPull=()=>x5(fe()),s.onEmit=()=>k5,s.value=()=>e,s.k=t,s}),z5=P(2,(e,t)=>{const n=Object.create(ts);return n._tag=I5,n.input=t,n.channel=e,n}),zce=P(2,(e,t)=>{const n=Object.create(ts);return n._tag=C5,n.channel=e,n.finalizer=t,n}),bI=e=>bs(v4(e)),bs=e=>Uce(()=>e),Uce=e=>{const t=Object.create(ts);return t._tag=P5,t.error=e,t},Sn=P(2,(e,t)=>{const n=Object.create(ts);return n._tag=N5,n.channel=e,n.k=new S5(t,bs),n}),Ar=e=>{const t=Object.create(ts);return t._tag=R5,t.effect=()=>e,t},li=P(2,(e,t)=>{const n=Object.create(ts);return n._tag=O5,n.left=()=>e,n.right=()=>t,n}),U5=e=>jd({onInput:e.onInput,onFailure:t=>Kr(Xse(t),{onLeft:e.onFailure,onRight:bs}),onDone:e.onDone}),jd=e=>{const t=Object.create(ts);return t._tag=L5,t.more=e.onInput,t.done=new S5(e.onDone,e.onFailure),t},V5=e=>_I(()=>e),cm=e=>{const t=Object.create(ts);return t._tag=$5,t.terminal=e,t},yI=e=>{const t=Object.create(ts);return t._tag=M5,t.channel=e,t},_I=e=>{const t=Object.create(ts);return t._tag=D5,t.evaluate=e,t},Va=cm(void 0),lr=e=>{const t=Object.create(ts);return t._tag=A5,t.out=e,t},Xm="Done",Zm="Emit",Fd="FromEffect",ep="Read",Vce=Symbol.for("effect/ChannelState"),Hce={_E:e=>e,_R:e=>e},n1={[Vce]:Hce},Ju=()=>{const e=Object.create(n1);return e._tag=Xm,e},Vk=()=>{const e=Object.create(n1);return e._tag=Zm,e},gf=e=>{const t=Object.create(n1);return t._tag=Fd,t.effect=e,t},Hk=(e,t,n,r)=>{const s=Object.create(n1);return s._tag=ep,s.upstream=e,s.onEffect=t,s.onEmit=n,s.onDone=r,s},Yb=e=>e._tag===Fd,qce=e=>Yb(e)?e.effect:pt,uN=e=>Yb(e)?loe(e.effect):void 0,H5="PullFromChild",LS="PullFromUpstream",DS="DrainChildExecutors",q5="Emit";class Bp{childExecutor;parentSubexecutor;onEmit;_tag=H5;constructor(t,n,r){this.childExecutor=t,this.parentSubexecutor=n,this.onEmit=r}close(t){const n=this.childExecutor.close(t),r=this.parentSubexecutor.close(t);return n!==void 0&&r!==void 0?Z_(ur(n),ur(r),(s,i)=>F(s,nm(i))):n!==void 0?n:r!==void 0?r:void 0}enqueuePullFromChild(t){return this}}class xc{upstreamExecutor;createChild;lastDone;activeChildExecutors;combineChildResults;combineWithChildResult;onPull;onEmit;_tag=LS;constructor(t,n,r,s,i,a,o,c){this.upstreamExecutor=t,this.createChild=n,this.lastDone=r,this.activeChildExecutors=s,this.combineChildResults=i,this.combineWithChildResult=a,this.onPull=o,this.onEmit=c}close(t){const n=this.upstreamExecutor.close(t),s=[...this.activeChildExecutors.map(i=>i!==void 0?i.childExecutor.close(t):void 0),n].reduce((i,a)=>i!==void 0&&a!==void 0?Z_(i,ur(a),(o,c)=>nm(o,c)):i!==void 0?i:a!==void 0?ur(a):void 0,void 0);return s}enqueuePullFromChild(t){return new xc(this.upstreamExecutor,this.createChild,this.lastDone,[...this.activeChildExecutors,t],this.combineChildResults,this.combineWithChildResult,this.onPull,this.onEmit)}}class El{upstreamExecutor;lastDone;activeChildExecutors;upstreamDone;combineChildResults;combineWithChildResult;onPull;_tag=DS;constructor(t,n,r,s,i,a,o){this.upstreamExecutor=t,this.lastDone=n,this.activeChildExecutors=r,this.upstreamDone=s,this.combineChildResults=i,this.combineWithChildResult=a,this.onPull=o}close(t){const n=this.upstreamExecutor.close(t),s=[...this.activeChildExecutors.map(i=>i!==void 0?i.childExecutor.close(t):void 0),n].reduce((i,a)=>i!==void 0&&a!==void 0?Z_(i,ur(a),(o,c)=>nm(o,c)):i!==void 0?i:a!==void 0?ur(a):void 0,void 0);return s}enqueuePullFromChild(t){return new El(this.upstreamExecutor,this.lastDone,[...this.activeChildExecutors,t],this.upstreamDone,this.combineChildResults,this.combineWithChildResult,this.onPull)}}class qk{value;next;_tag=q5;constructor(t,n){this.value=t,this.next=n}close(t){const n=this.next.close(t);return n}enqueuePullFromChild(t){return this}}const Gce="Pulled",Kce="NoUpstream",Wce="effect/ChannelUpstreamPullRequest",Jce=Symbol.for(Wce),Yce={_A:e=>e},G5={[Jce]:Yce},lN=e=>{const t=Object.create(G5);return t._tag=Gce,t.value=e,t},Qce=e=>{const t=Object.create(G5);return t._tag=Kce,t.activeDownstreamCount=e,t};class Oc{_activeSubexecutor=void 0;_cancelled=void 0;_closeLastSubstream=void 0;_currentChannel;_done=void 0;_doneStack=[];_emitted=void 0;_executeCloseLastSubstream;_input=void 0;_inProgressFinalizer=void 0;_providedEnv;constructor(t,n,r){this._currentChannel=t,this._executeCloseLastSubstream=r,this._providedEnv=n}run(){let t;for(;t===void 0;)if(this._cancelled!==void 0)t=this.processCancellation();else if(this._activeSubexecutor!==void 0)t=this.runSubexecutor();else try{if(this._currentChannel===void 0)t=Ju();else switch(Qo(this._currentChannel)&&(this._currentChannel=Ar(this._currentChannel)),this._currentChannel._tag){case T5:{t=this.runBracketOut(this._currentChannel);break}case I5:{const n=this._currentChannel.input;if(this._currentChannel=this._currentChannel.channel,this._input!==void 0){const r=this._input;this._input=void 0;const s=()=>Oe(n.awaitRead(),()=>ln(()=>{const i=r.run();switch(i._tag){case Xm:return Na(r.getDone(),{onFailure:a=>n.error(a),onSuccess:a=>n.done(a)});case Zm:return Oe(n.emit(r.getEmit()),()=>s());case Fd:return si(i.effect,{onFailure:a=>n.error(a),onSuccess:()=>s()});case ep:return kI(i,()=>s(),a=>n.error(a))}}));t=gf(Oe(boe(ri(s())),i=>Mt(()=>this.addFinalizer(a=>Oe(Eo(i),()=>ln(()=>{const o=this.restorePipe(a,r);return o!==void 0?o:pt}))))))}break}case gI:{const n=new Oc(this._currentChannel.value(),this._providedEnv,s=>Mt(()=>{const i=this._closeLastSubstream===void 0?pt:this._closeLastSubstream;this._closeLastSubstream=F(i,cr(s))}));n._input=this._input;const r=this._currentChannel;this._activeSubexecutor=new xc(n,s=>r.k(s),void 0,[],(s,i)=>r.combineInners(s,i),(s,i)=>r.combineAll(s,i),s=>r.onPull(s),s=>r.onEmit(s)),this._closeLastSubstream=void 0,this._currentChannel=void 0;break}case A5:{this._emitted=this._currentChannel.out,this._currentChannel=this._activeSubexecutor!==void 0?void 0:Va,t=Vk();break}case C5:{this.runEnsuring(this._currentChannel);break}case P5:{t=this.doneHalt(this._currentChannel.error());break}case N5:{this._doneStack.push(this._currentChannel.k),this._currentChannel=this._currentChannel.channel;break}case R5:{const n=this._providedEnv===void 0?this._currentChannel.effect():F(this._currentChannel.effect(),om(this._providedEnv));t=gf(si(n,{onFailure:r=>{const s=this.doneHalt(r);return s!==void 0&&Yb(s)?s.effect:pt},onSuccess:r=>{const s=this.doneSucceed(r);return s!==void 0&&Yb(s)?s.effect:pt}}));break}case O5:{const n=this._input,r=new Oc(this._currentChannel.left(),this._providedEnv,s=>this._executeCloseLastSubstream(s));r._input=n,this._input=r,this.addFinalizer(s=>{const i=this.restorePipe(s,n);return i!==void 0?i:pt}),this._currentChannel=this._currentChannel.right();break}case $ce:{const n=this._providedEnv;this._providedEnv=this._currentChannel.context(),this._currentChannel=this._currentChannel.inner,this.addFinalizer(()=>Mt(()=>{this._providedEnv=n}));break}case L5:{const n=this._currentChannel;t=Hk(this._input,ze,r=>{try{this._currentChannel=n.more(r)}catch(s){this._currentChannel=n.done.onExit(Ene(s))}},r=>{const s=i=>n.done.onExit(i);this._currentChannel=s(r)});break}case D5:{t=this.doneSucceed(this._currentChannel.evaluate());break}case $5:{t=this.doneSucceed(this._currentChannel.terminal);break}case M5:{this._currentChannel=this._currentChannel.channel();break}}}catch(n){this._currentChannel=bs(wS(n))}return t}getDone(){return this._done}getEmit(){return this._emitted}cancelWith(t){this._cancelled=t}clearInProgressFinalizer(){this._inProgressFinalizer=void 0}storeInProgressFinalizer(t){this._inProgressFinalizer=t}popAllFinalizers(t){const n=[];let r=this._doneStack.pop();for(;r;)r._tag==="ContinuationFinalizer"&&n.push(r.finalizer),r=this._doneStack.pop();const s=n.length===0?pt:Kk(n,t);return this.storeInProgressFinalizer(s),s}popNextFinalizers(){const t=[];for(;this._doneStack.length!==0;){const n=this._doneStack[this._doneStack.length-1];if(n._tag===T0)return t;t.push(n),this._doneStack.pop()}return t}restorePipe(t,n){const r=this._input;return this._input=n,r!==void 0?r.close(t):pt}close(t){let n;const r=this._inProgressFinalizer;r!==void 0&&(n=F(r,_l(Mt(()=>this.clearInProgressFinalizer()))));let s;const i=this.popAllFinalizers(t);i!==void 0&&(s=F(i,_l(Mt(()=>this.clearInProgressFinalizer()))));const a=this._activeSubexecutor===void 0?void 0:this._activeSubexecutor.close(t);if(!(a===void 0&&n===void 0&&s===void 0))return F(ur(Gk(a)),Kb(ur(Gk(n))),Kb(ur(Gk(s))),It(([[o,c],u])=>F(o,nm(c),nm(u))),Ff,Oe(o=>ln(()=>o)))}doneSucceed(t){if(this._doneStack.length===0)return this._done=ds(t),this._currentChannel=void 0,Ju();const n=this._doneStack[this._doneStack.length-1];if(n._tag===T0){this._doneStack.pop(),this._currentChannel=n.onSuccess(t);return}const r=this.popNextFinalizers();if(this._doneStack.length===0)return this._doneStack=r.reverse(),this._done=ds(t),this._currentChannel=void 0,Ju();const s=Kk(r.map(a=>a.finalizer),ds(t));this.storeInProgressFinalizer(s);const i=F(s,_l(Mt(()=>this.clearInProgressFinalizer())),Ff,Oe(()=>Mt(()=>this.doneSucceed(t))));return gf(i)}doneHalt(t){if(this._doneStack.length===0)return this._done=_r(t),this._currentChannel=void 0,Ju();const n=this._doneStack[this._doneStack.length-1];if(n._tag===T0){this._doneStack.pop();try{this._currentChannel=n.onHalt(t)}catch(a){this._currentChannel=bs(wS(a))}return}const r=this.popNextFinalizers();if(this._doneStack.length===0)return this._doneStack=r.reverse(),this._done=_r(t),this._currentChannel=void 0,Ju();const s=Kk(r.map(a=>a.finalizer),_r(t));this.storeInProgressFinalizer(s);const i=F(s,_l(Mt(()=>this.clearInProgressFinalizer())),Ff,Oe(()=>Mt(()=>this.doneHalt(t))));return gf(i)}processCancellation(){return this._currentChannel=void 0,this._done=this._cancelled,this._cancelled=void 0,Ju()}runBracketOut(t){const n=Ff(si(this.provide(t.acquire()),{onFailure:r=>Mt(()=>{this._currentChannel=bs(r)}),onSuccess:r=>Mt(()=>{this.addFinalizer(s=>this.provide(t.finalizer(r,s))),this._currentChannel=lr(r)})}));return gf(n)}provide(t){return this._providedEnv===void 0?t:F(t,om(this._providedEnv))}runEnsuring(t){this.addFinalizer(t.finalizer),this._currentChannel=t.channel}addFinalizer(t){this._doneStack.push(new Pce(t))}runSubexecutor(){const t=this._activeSubexecutor;switch(t._tag){case H5:return this.pullFromChild(t.childExecutor,t.parentSubexecutor,t.onEmit,t);case LS:return this.pullFromUpstream(t);case DS:return this.drainChildExecutors(t);case q5:return this._emitted=t.value,this._activeSubexecutor=t.next,Vk()}}replaceSubexecutor(t){this._currentChannel=void 0,this._activeSubexecutor=t}finishWithExit(t){const n=Na(t,{onFailure:r=>this.doneHalt(r),onSuccess:r=>this.doneSucceed(r)});return this._activeSubexecutor=void 0,n===void 0?pt:qce(n)}finishSubexecutorWithCloseEffect(t,...n){this.addFinalizer(()=>F(n,Ji(s=>F(Mt(()=>s(t)),Oe(i=>i!==void 0?i:pt)),{discard:!0})));const r=F(t,Na({onFailure:s=>this.doneHalt(s),onSuccess:s=>this.doneSucceed(s)}));return this._activeSubexecutor=void 0,r}applyUpstreamPullStrategy(t,n,r){switch(r._tag){case v5:{const s=!t||n.some(i=>i!==void 0);return[r.emitSeparator,s?[void 0,...n]:n]}case Nce:{const s=!t||n.some(i=>i!==void 0);return[r.emitSeparator,s?[...n,void 0]:n]}}}pullFromChild(t,n,r,s){return Hk(t,ze,i=>{const a=r(i);switch(a._tag){case _5:break;case xce:{this.finishWithDoneValue(t,n,a.value);break}case Tce:{const o=n.enqueuePullFromChild(s);this.replaceSubexecutor(o);break}}this._activeSubexecutor=new qk(i,this._activeSubexecutor)},Na({onFailure:i=>{const a=this.handleSubexecutorFailure(t,n,i);return a===void 0?void 0:uN(a)},onSuccess:i=>{this.finishWithDoneValue(t,n,i)}}))}finishWithDoneValue(t,n,r){const s=n;switch(s._tag){case LS:{const i=new xc(s.upstreamExecutor,s.createChild,s.lastDone!==void 0?s.combineChildResults(s.lastDone,r):r,s.activeChildExecutors,s.combineChildResults,s.combineWithChildResult,s.onPull,s.onEmit);this._closeLastSubstream=t.close(ds(r)),this.replaceSubexecutor(i);break}case DS:{const i=new El(s.upstreamExecutor,s.lastDone!==void 0?s.combineChildResults(s.lastDone,r):r,s.activeChildExecutors,s.upstreamDone,s.combineChildResults,s.combineWithChildResult,s.onPull);this._closeLastSubstream=t.close(ds(r)),this.replaceSubexecutor(i);break}}}handleSubexecutorFailure(t,n,r){return this.finishSubexecutorWithCloseEffect(_r(r),s=>n.close(s),s=>t.close(s))}pullFromUpstream(t){if(t.activeChildExecutors.length===0)return this.performPullFromUpstream(t);const n=t.activeChildExecutors[0],r=new xc(t.upstreamExecutor,t.createChild,t.lastDone,t.activeChildExecutors.slice(1),t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit);if(n===void 0)return this.performPullFromUpstream(r);this.replaceSubexecutor(new Bp(n.childExecutor,r,n.onEmit))}performPullFromUpstream(t){return Hk(t.upstreamExecutor,n=>{const r=this._closeLastSubstream===void 0?pt:this._closeLastSubstream;return this._closeLastSubstream=void 0,F(this._executeCloseLastSubstream(r),cr(n))},n=>{if(this._closeLastSubstream!==void 0){const a=this._closeLastSubstream;return this._closeLastSubstream=void 0,F(this._executeCloseLastSubstream(a),It(()=>{const o=new Oc(t.createChild(n),this._providedEnv,this._executeCloseLastSubstream);o._input=this._input;const[c,u]=this.applyUpstreamPullStrategy(!1,t.activeChildExecutors,t.onPull(lN(n)));this._activeSubexecutor=new Bp(o,new xc(t.upstreamExecutor,t.createChild,t.lastDone,u,t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit),t.onEmit),ft(c)&&(this._activeSubexecutor=new qk(c.value,this._activeSubexecutor))}))}const r=new Oc(t.createChild(n),this._providedEnv,this._executeCloseLastSubstream);r._input=this._input;const[s,i]=this.applyUpstreamPullStrategy(!1,t.activeChildExecutors,t.onPull(lN(n)));this._activeSubexecutor=new Bp(r,new xc(t.upstreamExecutor,t.createChild,t.lastDone,i,t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit),t.onEmit),ft(s)&&(this._activeSubexecutor=new qk(s.value,this._activeSubexecutor))},n=>{if(t.activeChildExecutors.some(i=>i!==void 0)){const i=new El(t.upstreamExecutor,t.lastDone,[void 0,...t.activeChildExecutors],t.upstreamExecutor.getDone(),t.combineChildResults,t.combineWithChildResult,t.onPull);if(this._closeLastSubstream!==void 0){const a=this._closeLastSubstream;return this._closeLastSubstream=void 0,F(this._executeCloseLastSubstream(a),It(()=>this.replaceSubexecutor(i)))}this.replaceSubexecutor(i);return}const r=this._closeLastSubstream,s=this.finishSubexecutorWithCloseEffect(F(n,Sne(i=>t.combineWithChildResult(t.lastDone,i))),()=>r,i=>t.upstreamExecutor.close(i));return s===void 0?void 0:uN(s)})}drainChildExecutors(t){if(t.activeChildExecutors.length===0){const i=this._closeLastSubstream;return i!==void 0&&this.addFinalizer(()=>Ot(i)),this.finishSubexecutorWithCloseEffect(t.upstreamDone,()=>i,a=>t.upstreamExecutor.close(a))}const n=t.activeChildExecutors[0],r=t.activeChildExecutors.slice(1);if(n===void 0){const[i,a]=this.applyUpstreamPullStrategy(!0,r,t.onPull(Qce(r.reduce((o,c)=>c!==void 0?o+1:o,0))));return this.replaceSubexecutor(new El(t.upstreamExecutor,t.lastDone,a,t.upstreamDone,t.combineChildResults,t.combineWithChildResult,t.onPull)),ft(i)?(this._emitted=i.value,Vk()):void 0}const s=new El(t.upstreamExecutor,t.lastDone,r,t.upstreamDone,t.combineChildResults,t.combineWithChildResult,t.onPull);this.replaceSubexecutor(new Bp(n.childExecutor,s,n.onEmit))}}const Gk=e=>e!==void 0?e:pt,Kk=(e,t)=>F(Ji(e,n=>ur(n(t))),It(n=>F(kne(n),Kt(()=>VT))),Oe(n=>ln(()=>n))),kI=(e,t,n)=>{const r=[e],s=()=>{const i=r.pop();if(i===void 0||i.upstream===void 0)return coe("Unexpected end of input for channel execution");const a=i.upstream.run();switch(a._tag){case Zm:{const o=i.onEmit(i.upstream.getEmit());return r.length===0?o===void 0?ln(t):F(o,si({onFailure:n,onSuccess:t})):o===void 0?ln(()=>s()):F(o,si({onFailure:n,onSuccess:()=>s()}))}case Xm:{const o=i.onDone(i.upstream.getDone());return r.length===0?o===void 0?ln(t):F(o,si({onFailure:n,onSuccess:t})):o===void 0?ln(()=>s()):F(o,si({onFailure:n,onSuccess:()=>s()}))}case Fd:return r.push(i),F(i.onEffect(a.effect),lI(o=>ln(()=>{const c=i.onDone(_r(o));return c===void 0?pt:c})),si({onFailure:n,onSuccess:()=>s()}));case ep:return r.push(i),r.push(a),ln(()=>s())}};return s()},Xce=P(2,(e,t)=>{const n=(r,s,i)=>moe(Mt(()=>new Oc(e,void 0,ze)),a=>ln(()=>I0(a.run(),a).pipe(a5(r),cr(Nr(r)),hI(Nr(s)))),(a,o)=>{const c=a.close(o);return c===void 0?pt:u5(c,u=>Ub(i,ui(u)))});return qb(r=>ooe([N4(t,Ib),Ui(),Ui()]).pipe(Oe(([s,i,a])=>r(n(i,a,s)).pipe(Wc(t),Oe(o=>t.addFinalizer(c=>{const u=UT(c)?Qse(c.cause):void 0;return TS(i).pipe(Oe(l=>l?Ra(a,void 0).pipe(cr(D4(o)),cr(WP(o))):Ra(a,void 0).pipe(cr(u&&iT(u)>0?rI(o,KY(u)):Eo(o)),cr(WP(o)))))}).pipe(cr(r(Nr(i)))))))))}),I0=(e,t)=>{const n=e;switch(n._tag){case Fd:return F(n.effect,Oe(()=>I0(t.run(),t)));case Zm:return I0(t.run(),t);case Xm:return ln(()=>t.getDone());case ep:return kI(n,()=>I0(t.run(),t),ui)}},Zce="Done",eue="Await",tue="effect/ChannelMergeDecision",nue=Symbol.for(tue),rue={[nue]:{_R:e=>e,_E0:e=>e,_Z0:e=>e,_E:e=>e,_Z:e=>e}},dN=e=>{const t=Object.create(rue);return t._tag=eue,t.f=e,t},K5="BothRunning",W5="LeftDone",J5="RightDone",sue="effect/ChannelMergeState",fN=Symbol.for(sue),EI={[fN]:fN},Wk=(e,t)=>{const n=Object.create(EI);return n._tag=K5,n.left=e,n.right=t,n},hN=e=>{const t=Object.create(EI);return t._tag=W5,t.f=e,t},mN=e=>{const t=Object.create(EI);return t._tag=J5,t.f=e,t},Y5="BackPressure",Q5="BufferSliding",iue="effect/ChannelMergeStrategy",pN=Symbol.for(iue),X5={[pN]:pN},aue=e=>{const t=Object.create(X5);return t._tag=Y5,t},oue=e=>{const t=Object.create(X5);return t._tag=Q5,t},cue=P(2,(e,{onBackPressure:t,onBufferSliding:n})=>{switch(e._tag){case Y5:return t();case Q5:return n()}}),ll="Empty",Bf="Emit",zf="Error",Uf="Done",Z5=e=>({_tag:ll,notifyProducer:e}),Jk=e=>({_tag:Bf,notifyConsumers:e}),uue=e=>({_tag:zf,cause:e}),lue=e=>({_tag:Uf,done:e});class due{ref;constructor(t){this.ref=t}awaitRead(){return ul(ff(this.ref,t=>t._tag===ll?[Nr(t.notifyProducer),t]:[pt,t]))}get close(){return goe(t=>this.error(x4(t)))}done(t){return ul(ff(this.ref,n=>{switch(n._tag){case ll:return[Nr(n.notifyProducer),n];case Bf:return[Ji(n.notifyConsumers,r=>Ra(r,Be(t)),{discard:!0}),lue(t)];case zf:return[kc,n];case Uf:return[kc,n]}}))}emit(t){return Oe(Ui(),n=>ul(ff(this.ref,r=>{switch(r._tag){case ll:return[Nr(r.notifyProducer),r];case Bf:{const s=r.notifyConsumers[0],i=r.notifyConsumers.slice(1);if(s!==void 0)return[Ra(s,Ue(t)),i.length===0?Z5(n):Jk(i)];throw new Error("Bug: Channel.SingleProducerAsyncInput.emit - Queue was empty! please report an issue at https://github.com/Effect-TS/effect/issues")}case zf:return[kc,r];case Uf:return[kc,r]}})))}error(t){return ul(ff(this.ref,n=>{switch(n._tag){case ll:return[Nr(n.notifyProducer),n];case Bf:return[Ji(n.notifyConsumers,r=>Yae(r,t),{discard:!0}),uue(t)];case zf:return[kc,n];case Uf:return[kc,n]}}))}get take(){return this.takeWith(t=>_r(Zse(t,Be)),t=>ds(t),t=>Db(Ue(t)))}takeWith(t,n,r){return Oe(Ui(),s=>ul(ff(this.ref,i=>{switch(i._tag){case ll:return[cr(Ra(i.notifyProducer,void 0),NS(Nr(s),{onFailure:t,onSuccess:Kr({onLeft:r,onRight:n})})),Jk([s])];case Bf:return[NS(Nr(s),{onFailure:t,onSuccess:Kr({onLeft:r,onRight:n})}),Jk([...i.notifyConsumers,s])];case zf:return[Ot(t(i.cause)),i];case Uf:return[Ot(r(i.done)),i]}})))}}const eF=()=>F(Ui(),Oe(e=>BT(Z5(e))),It(e=>new due(e))),$S=P(2,(e,t)=>Bce(e,t,()=>{},()=>{})),fue=e=>{const t=jd({onInput:()=>t,onFailure:bs,onDone:V5});return li(e,t)},tF=P(2,(e,t)=>zce(e,()=>t)),hue=e=>Sn(e,ze),wI=e=>So(e.takeWith(bs,t=>Sn(lr(t),()=>wI(e)),V5)),nF=P(2,(e,t)=>Sn(e,n=>_I(()=>t(n)))),rF=P(2,(e,t)=>{const n=U5({onInput:r=>Sn(lr(t(r)),()=>n),onFailure:bI,onDone:cm});return li(e,n)}),mue=e=>t=>pue(e)(t,Kl),pue=({bufferSize:e=16,concurrency:t,mergeStrategy:n=aue()})=>(r,s)=>oF(i=>Ml(function*(){const a=t==="unbounded"?Number.MAX_SAFE_INTEGER:t,o=yield*eF(),c=wI(o),u=yield*y5(e);yield*Ub(i,Jb(u));const l=yield*kce();yield*Ub(i,Jb(l));const d=yield*BT(fe()),f=yield*Ui(),h=(yield*voe(a)).withPermits,m=yield*Bl(li(c,r),i);function y(p){return p.pipe(Oe(Kr({onLeft:_=>Ot(ye(_)),onRight:_=>Bk(Wu(u,Ot(Ue(_))),fe())})),sN({until:_=>ft(_)}),Oe(_=>qte(d,hn({onNone:()=>ye(_.value),onSome:k=>ye(s(k,_.value))}))),lI(_=>Fb(_)?ui(_):Wu(u,ui(_)).pipe(cr(Ra(f,void 0)),dI)))}yield*m.pipe(si({onFailure:p=>Wu(u,ui(p)).pipe(cr(Ot(!1))),onSuccess:Kr({onLeft:p=>o5(ri(Nr(f)),ri(h(a)(pt)),{onSelfDone:(_,k)=>Bk(Eo(k),!1),onOtherDone:(_,k)=>cr(Eo(k),Ute(d).pipe(Oe(hn({onNone:()=>Wu(u,Ot(Be(p))),onSome:v=>Wu(u,Ot(Be(s(v,p))))})),Bk(!1)))}),onRight:p=>cue(n,{onBackPressure:()=>Ml(function*(){const _=yield*Ui(),k=PS(w=>Bl(li(c,p),w).pipe(Oe(S=>zk(ur(y(S)),ur(ri(Nr(f))))),Oe(ze)));return yield*Ra(_,void 0).pipe(cr(k),h(1),Wc(i)),yield*Nr(_),!(yield*TS(f))}),onBufferSliding:()=>Ml(function*(){const _=yield*Ui(),k=yield*Ui(),v=yield*Ece(l);yield*oN(l).pipe(Oe(T=>Ra(T,void 0)),_oe(()=>v>=a)),yield*Wu(l,_);const w=PS(T=>Bl(li(c,p),T).pipe(Oe(I=>ur(y(I)).pipe(zk(ur(ri(Nr(f)))),zk(ur(ri(Nr(_)))))),Oe(ze)));return yield*Ra(k,void 0).pipe(cr(w),h(1),Wc(i)),yield*Nr(k),!(yield*TS(f))})})})}),sN({while:p=>p}),Wc(i));const g=F(oN(u),ul,NS({onFailure:bs,onSuccess:Kr({onLeft:cm,onRight:p=>Sn(lr(p),()=>g)})}),So);return z5(g,o)})),sF=P(3,(e,t,n)=>mue(n)(rF(e,t))),gue=P(2,(e,t)=>{function n(r){return Ml(function*(){const s=yield*eF(),i=wI(s),a=yield*Bl(li(i,e),r),o=yield*Bl(li(i,t.other),r);function c(l,d,f){return(h,m,y)=>{function g(p){const _=p;return _._tag===Zce?Ot(Ar(cr(Eo(d),_.effect))):It(D4(d),Na({onFailure:k=>Ar(_.f(_r(k))),onSuccess:Kr({onLeft:k=>Ar(_.f(ds(k))),onRight:k=>SI(lr(k),u(y(_.f)))})}))}return Na(l,{onFailure:p=>g(h(_r(p))),onSuccess:Kr({onLeft:p=>g(h(ds(p))),onRight:p=>Ot(Sn(lr(p),()=>Sn(Ar(Wc(ri(f),r)),_=>u(m(_,d)))))})})}}function u(l){switch(l._tag){case K5:{const d=ri(JP(l.left)),f=ri(JP(l.right));return So(o5(d,f,{onSelfDone:(h,m)=>cr(Eo(m),c(h,l.right,a)(t.onSelfDone,Wk,y=>hN(y))),onOtherDone:(h,m)=>cr(Eo(m),c(h,l.left,o)(t.onOtherDone,(y,g)=>Wk(g,y),y=>mN(y)))}))}case W5:return So(It(ur(o),Na({onFailure:d=>Ar(l.f(_r(d))),onSuccess:Kr({onLeft:d=>Ar(l.f(ds(d))),onRight:d=>Sn(lr(d),()=>u(hN(l.f)))})})));case J5:return So(It(ur(a),Na({onFailure:d=>Ar(l.f(_r(d))),onSuccess:Kr({onLeft:d=>Ar(l.f(ds(d))),onRight:d=>Sn(lr(d),()=>u(mN(l.f)))})})))}}return Ar(Hb(l=>{const d=Hb(m=>(m.transferChildren(l.scope()),pt)),f=ri(a).pipe(_l(d),Wc(r)),h=ri(o).pipe(_l(d),Wc(r));return Z_(f,h,(m,y)=>Wk(m,y))})).pipe(Sn(u),z5(s))})}return oF(n)}),bue=P(2,(e,t)=>yI(()=>{let n;const r=U5({onInput:i=>Sn(lr(i),()=>r),onFailure:i=>(n=Sue(i),bs(wS(n))),onDone:cm}),s=jd({onInput:i=>F(lr(i),Sn(()=>s)),onFailure:i=>Jse(i)&&vue(i.defect)&&je(i.defect,n)?bI(i.defect.error):bs(i),onDone:cm});return li(li(li(e,r),t),s)})),yue=e=>PS(t=>Xce(e,t)),iF=e=>yue(fue(e)),aF=e=>So(qb(t=>It(R4(),n=>Fce(u5(t(Rie(e,n)),r=>Vb(n,_r(r))),(r,s)=>Vb(n,s))))),_ue=e=>Eue(It(Q_,t=>Sn(Ar(e(t)),lr))),kue=e=>Oe(Q_,t=>Bl(e,t)),Bl=P(2,(e,t)=>Kb(Mt(()=>new Oc(e,void 0,ze)),Qm()).pipe(c5(([n,r])=>Nie(t,s=>{const i=n.close(s);return i!==void 0?om(i,r):pt})),Ff,It(([n])=>ln(()=>MS(n.run(),n))))),MS=(e,t)=>{const n=e;switch(n._tag){case Xm:return Na(t.getDone(),{onFailure:ui,onSuccess:r=>Ot(Be(r))});case Zm:return Ot(Ue(t.getEmit()));case Fd:return F(n.effect,Oe(()=>MS(t.run(),t)));case ep:return kI(n,()=>MS(t.run(),t),r=>ui(r))}},So=e=>hue(Ar(e)),Eue=e=>B5(aF(e),(t,n)=>t,(t,n)=>t),oF=e=>B5(_ue(e),(t,n)=>t,(t,n)=>t),cF=e=>uF(0,e.length,e),uF=(e,t,n)=>e===t?Va:F(lr(F(n,yo(e))),Sn(()=>uF(e+1,t,n))),wue=P(e=>F5(e[1]),(e,t,n)=>n?.concurrent?gue(e,{other:t,onSelfDone:r=>dN(s=>ln(()=>RP(r,s))),onOtherDone:r=>dN(s=>ln(()=>RP(s,r)))}):Sn(e,r=>nF(t,s=>[r,s]))),SI=P(e=>F5(e[1]),(e,t,n)=>n?.concurrent?nF(wue(e,t,{concurrent:!0}),r=>r[1]):Sn(e,()=>t)),jS=Symbol.for("effect/Channel/ChannelException"),Sue=e=>({_tag:"ChannelException",[jS]:jS,error:e}),vue=e=>Ne(e,jS),xue=Symbol.for("effect/Sink"),Tue={_A:e=>e,_In:e=>e,_L:e=>e,_E:e=>e,_R:e=>e};class vI{channel;[xue]=Tue;constructor(t){this.channel=t}pipe(){return Se(this,arguments)}}const Iue=e=>{const t=jd({onInput:n=>F(Ar(Ji(n,r=>e(r),{discard:!0})),Sn(()=>t)),onFailure:bs,onDone:()=>Va});return new vI(t)},Aue=e=>{const t=jd({onInput:n=>F(Ar(e(n)),Sn(()=>t)),onFailure:bs,onDone:()=>Va});return new vI(t)},Cue=e=>new vI(Ar(e)),lF=e=>Qo(e)?lF(Cue(e)):e.channel,Pue=()=>na(fe()),Nue=e=>fI(ui(e),ye),Rue="effect/Stream",xI=Symbol.for(Rue),Oue={_R:e=>e,_E:e=>e,_A:e=>e};class ki{channel;[xI]=Oue;constructor(t){this.channel=t}pipe(){return Se(this,arguments)}}const r1=e=>Ne(e,xI)||Qo(e),Lue=4096,dF=P(2,(e,t)=>new ki(F($s(e),tF(t)))),Due=e=>mF(na(ye(e))),$ue=e=>hF(ui(e)),Mue=P(2,(e,t)=>Vue(e,Gx(t))),fF=P(e=>r1(e[0]),(e,t,n)=>{const r=n?.bufferSize??16;return n?.switch?gN(n?.concurrency,()=>bN(e,1,r,t),s=>bN(e,s,r,t)):gN(n?.concurrency,()=>new ki($S($s(e),s=>F(s,kJ(i=>$s(t(i))),wJ(Va,(i,a)=>F(i,SI(a)))))),s=>new ki(F($s(e),$S(cF),sF(i=>$s(t(i)),n))))}),gN=(e,t,n)=>{switch(e){case void 0:return t();case"unbounded":return n(Number.MAX_SAFE_INTEGER);default:return e>1?n(e):t()}},bN=P(4,(e,t,n,r)=>new ki(F($s(e),$S(cF),sF(s=>$s(r(s)),{concurrency:t,mergeStrategy:oue(),bufferSize:n})))),jue=P(e=>r1(e[0]),(e,t)=>fF(e,ze,t)),Fue=e=>new ki(e),$s=e=>{if("channel"in e)return e.channel;if(Qo(e))return $s(hF(e));throw new TypeError("Expected a Stream.")},Bue=e=>new ki(Kx(e)?Va:lr(e)),hF=e=>F(e,fI(ye),mF),mF=e=>new ki(So(Eoe(e,{onFailure:hn({onNone:()=>Va,onSome:bI}),onSuccess:t=>lr(Tn(t))}))),zue=(e,t)=>F(vce(e,1,t?.maxChunkSize??Lue),lI(n=>F(wce(e),Oe(r=>r&&Fb(n)?Pue():Nue(n)))),pF,t?.shutdown?dF(Jb(e)):ze),Uue=(...e)=>{const t=e.length===1?e[0].evaluate:e[0],n=e.length===1?e[0].onError:e[1],r=e.length===1?e[0].releaseLockOnEnd===!0:!1;return yF(It(Gb(Mt(()=>t().getReader()),s=>r?Mt(()=>s.releaseLock()):uoe(()=>s.cancel())),s=>Hue(Oe(jl({try:()=>s.read(),catch:i=>ye(n(i))}),({done:i,value:a})=>i?na(fe()):Ot(a)))))},Vue=P(2,(e,t)=>new ki(F($s(e),rF(t)))),pF=e=>Que(e,t=>F(It(t,n=>ye([n,t])),r5(hn({onNone:()=>Ot(fe()),onSome:na})))),Hue=e=>pF(F(e,It(Tn))),gF=P(2,(e,t)=>$s(e).pipe(bue(lF(t)),iF)),que=P(2,(e,t)=>gF(e,Iue(t))),Gue=P(2,(e,t)=>gF(e,Aue(t))),Kue=e=>new ki(tF(aF(F(e,It(Tn))),pt)),Wue=e=>Bue(Tn(e)),bF=e=>new ki(yI(()=>$s(e()))),Jue=P(e=>r1(e[0]),(e,t)=>It(Qm(),n=>Yue(e,n,t))),Yue=P(e=>r1(e[0]),(e,t,n)=>{const r=e1(t);let s,i;const a=xoe(!1);return new ReadableStream({start(o){i=r(Gue(e,c=>c.length===0?pt:a.whenOpen(Mt(()=>{a.unsafeClose();for(const u of c)o.enqueue(u);s(),s=void 0})))),i.addObserver(c=>{try{c._tag==="Failure"?o.error(eie(c.cause)):o.close()}catch{}})},pull(){return new Promise(o=>{s=o,zs(a.open)})},cancel(){if(i)return l5(dI(Eo(i)))}},n?.strategy)}),Que=(e,t)=>bF(()=>{const n=r=>So(It(t(r),hn({onNone:()=>Va,onSome:([s,i])=>Sn(lr(s),()=>n(i))})));return new ki(n(e))}),yF=e=>jue(Kue(e)),yN=Symbol.for("effect/Mailbox"),_N=Symbol.for("effect/Mailbox/ReadonlyMailbox"),Tc=dr(),kN=Nt(Tc),zp=Nt(!1),Up=Nt(!0),EN=[Tc,!0];class Xue extends Dd{scheduler;capacity;strategy;[yN]=yN;[_N]=_N;state={_tag:"Open",takers:new Set,offers:new Set,awaiters:new Set};messages=[];messagesChunk=dr();constructor(t,n,r){super(),this.scheduler=t,this.capacity=n,this.strategy=r}offer(t){return qe(()=>{if(this.state._tag!=="Open")return zp;if(this.messages.length+this.messagesChunk.length>=this.capacity)switch(this.strategy){case"dropping":return zp;case"suspend":return this.capacity<=0&&this.state.takers.size>0?(this.messages.push(t),this.releaseTaker(),Up):this.offerRemainingSingle(t);case"sliding":return this.unsafeTake(),this.messages.push(t),Up}return this.messages.push(t),this.scheduleReleaseTaker(),Up})}unsafeOffer(t){return this.state._tag!=="Open"?!1:this.messages.length+this.messagesChunk.length>=this.capacity?this.strategy==="sliding"?(this.unsafeTake(),this.messages.push(t),!0):this.capacity<=0&&this.state.takers.size>0?(this.messages.push(t),this.releaseTaker(),!0):!1:(this.messages.push(t),this.scheduleReleaseTaker(),!0)}offerAll(t){return qe(()=>{if(this.state._tag!=="Open")return _e(Yl(t));const n=this.unsafeOfferAllArray(t);return n.length===0?kN:this.strategy==="dropping"?_e(Ir(n)):this.offerRemainingArray(n)})}unsafeOfferAll(t){return Ir(this.unsafeOfferAllArray(t))}unsafeOfferAllArray(t){if(this.state._tag!=="Open")return Tt(t);if(this.capacity===Number.POSITIVE_INFINITY||this.strategy==="sliding")return this.messages.length>0&&(this.messagesChunk=wn(this.messagesChunk,Ir(this.messages))),this.strategy==="sliding"?this.messagesChunk=this.messagesChunk.pipe(wn(Yl(t)),EJ(this.capacity)):qx(t)?this.messagesChunk=wn(this.messagesChunk,t):this.messages=Tt(t),this.scheduleReleaseTaker(),[];const n=this.capacity<=0?this.state.takers.size:this.capacity-this.messages.length-this.messagesChunk.length;if(n===0)return Tt(t);const r=[];let s=0;for(const i of t)s<n?this.messages.push(i):r.push(i),s++;return this.scheduleReleaseTaker(),r}fail(t){return this.done(Xh(t))}failCause(t){return this.done(Pt(t))}unsafeDone(t){return this.state._tag!=="Open"?!1:this.state.offers.size===0&&this.messages.length===0&&this.messagesChunk.length===0?(this.finalize(t),!0):(this.state={...this.state,_tag:"Closing",exit:t},!0)}shutdown=pe(()=>{if(this.state._tag==="Done")return!0;this.messages=[],this.messagesChunk=Tc;const t=this.state.offers;if(this.finalize(this.state._tag==="Open"?yr:this.state.exit),t.size>0){for(const n of t)n._tag==="Single"?n.resume(zp):n.resume(Nt(Ir(n.remaining.slice(n.offset))));t.clear()}return!0});done(t){return pe(()=>this.unsafeDone(t))}end=this.done(yr);clear=qe(()=>{if(this.state._tag==="Done")return k0(this.state.exit,Tc);const t=this.unsafeTakeAll();return this.releaseCapacity(),_e(t)});takeAll=qe(()=>{if(this.state._tag==="Done")return k0(this.state.exit,EN);const t=this.unsafeTakeAll();return t.length===0?rn(this.awaitTake,this.takeAll):_e([t,this.releaseCapacity()])});takeN(t){return qe(()=>{if(this.state._tag==="Done")return k0(this.state.exit,EN);if(t<=0)return _e([Tc,!1]);t=Math.min(t,this.capacity);let n;if(t<=this.messagesChunk.length)n=gb(this.messagesChunk,t),this.messagesChunk=lo(this.messagesChunk,t);else if(t<=this.messages.length+this.messagesChunk.length)this.messagesChunk=wn(this.messagesChunk,Ir(this.messages)),this.messages=[],n=gb(this.messagesChunk,t),this.messagesChunk=lo(this.messagesChunk,t);else return rn(this.awaitTake,this.takeN(t));return _e([n,this.releaseCapacity()])})}unsafeTake(){if(this.state._tag==="Done")return Y6(this.state.exit,Xh(new $d));let t;if(this.messagesChunk.length>0)t=Jx(this.messagesChunk),this.messagesChunk=lo(this.messagesChunk,1);else if(this.messages.length>0)t=this.messages[0],this.messagesChunk=lo(Ir(this.messages),1),this.messages=[];else return this.capacity<=0&&this.state.offers.size>0?(this.capacity=1,this.releaseCapacity(),this.capacity=0,this.messages.length>0?Nt(this.messages.pop()):void 0):void 0;return this.releaseCapacity(),Nt(t)}take=qe(()=>this.unsafeTake()??rn(this.awaitTake,this.take));await=fo(t=>this.state._tag==="Done"?t(this.state.exit):(this.state.awaiters.add(t),pe(()=>{this.state._tag!=="Done"&&this.state.awaiters.delete(t)})));unsafeSize(){const t=this.messages.length+this.messagesChunk.length;return this.state._tag==="Done"?fe():ye(t)}size=pe(()=>this.unsafeSize());commit(){return this.takeAll}pipe(){return Se(this,arguments)}toJSON(){return{_id:"effect/Mailbox",state:this.state._tag,size:this.unsafeSize().toJSON()}}toString(){return Dt(this)}[gt](){return Dt(this)}offerRemainingSingle(t){return fo(n=>{if(this.state._tag!=="Open")return n(zp);const r={_tag:"Single",message:t,resume:n};return this.state.offers.add(r),pe(()=>{this.state._tag==="Open"&&this.state.offers.delete(r)})})}offerRemainingArray(t){return fo(n=>{if(this.state._tag!=="Open")return n(Nt(Ir(t)));const r={_tag:"Array",remaining:t,offset:0,resume:n};return this.state.offers.add(r),pe(()=>{this.state._tag==="Open"&&this.state.offers.delete(r)})})}releaseCapacity(){if(this.state._tag==="Done")return this.state.exit._tag==="Success";if(this.state.offers.size===0)return this.state._tag==="Closing"&&this.messages.length===0&&this.messagesChunk.length===0?(this.finalize(this.state.exit),this.state.exit._tag==="Success"):!1;let t=this.capacity-this.messages.length-this.messagesChunk.length;for(const n of this.state.offers){if(t===0)return!1;if(n._tag==="Single")this.messages.push(n.message),t--,n.resume(Up),this.state.offers.delete(n);else{for(;n.offset<n.remaining.length;n.offset++){if(t===0)return!1;this.messages.push(n.remaining[n.offset]),t--}n.resume(kN),this.state.offers.delete(n)}}return!1}awaitTake=fo(t=>this.state._tag==="Done"?t(this.state.exit):(this.state.takers.add(t),pe(()=>{this.state._tag!=="Done"&&this.state.takers.delete(t)})));scheduleRunning=!1;scheduleReleaseTaker(){this.scheduleRunning||(this.scheduleRunning=!0,this.scheduler.scheduleTask(this.releaseTaker,0))}releaseTaker=()=>{if(this.scheduleRunning=!1,this.state._tag!=="Done"&&this.state.takers.size!==0){for(const t of this.state.takers)if(this.state.takers.delete(t),t(yr),this.messages.length+this.messagesChunk.length===0)break}};unsafeTakeAll(){if(this.messagesChunk.length>0){const t=this.messages.length>0?wn(this.messagesChunk,Ir(this.messages)):this.messagesChunk;return this.messagesChunk=Tc,this.messages=[],t}else if(this.messages.length>0){const t=Ir(this.messages);return this.messages=[],t}else if(this.state._tag!=="Done"&&this.state.offers.size>0)return this.capacity=1,this.releaseCapacity(),this.capacity=0,Tn(this.messages.pop());return Tc}finalize(t){if(this.state._tag==="Done")return;const n=this.state;this.state={_tag:"Done",exit:t};for(const r of n.takers)r(t);n.takers.clear();for(const r of n.awaiters)r(t);n.awaiters.clear()}}const Zue=e=>yt(t=>_e(new Xue(t.currentScheduler,typeof e=="number"?e:e?.capacity??Number.POSITIVE_INFINITY,typeof e=="number"?"suspend":e?.strategy??"suspend"))),ele=e=>{const t=Sn(e.takeAll,([n,r])=>r?n.length===0?Va:lr(n):SI(lr(n),t));return t},tle=e=>Fue(ele(e)),nle=Zue,rle=tle,Yk=xI,_F=dF,sle=Due,ile=$ue,ale=Mue,ole=fF,kF=$s,cle=zue,ule=Uue,lle=que,dle=Wue,fle=bF,hle=Jue,EF=yF;class tp extends Fr("@effect/experimental/Reactivity")(){}const mle=Mt(()=>{const e=new Map,t=o=>{if(Array.isArray(o))for(let c=0;c<o.length;c++){const u=e.get(FS(o[c]));if(u!==void 0)for(const l of u)l()}else{const c=o;for(const u in c){const l=wF(u,c[u]);for(let f=0;f<l.length;f++){const h=e.get(l[f]);if(h!==void 0)for(const m of h)m()}const d=e.get(u);if(d!==void 0)for(const f of d)f()}}},n=o=>Mt(()=>t(o)),r=(o,c)=>hI(c,n(o)),s=(o,c)=>{const u=Array.isArray(o)?o.map(FS):ble(o);for(let l=0;l<u.length;l++){let d=e.get(u[l]);d===void 0&&(d=new Set,e.set(u[l],d)),d.add(c)}return()=>{for(let l=0;l<u.length;l++){const d=e.get(u[l]);d.delete(c),d.size===0&&e.delete(u[l])}}},i=(o,c)=>Ml(function*(){const u=yield*Q_,l=yield*nle(),d=yield*Doe();let f=!1,h=!1;const m=p=>{p._tag==="Failure"?l.unsafeDone(_r(p.cause)):l.unsafeOffer(p.value),h?(h=!1,d(c).addObserver(m)):f=!1};function y(){if(f){h=!0;return}f=!0,d(c).addObserver(m)}const g=s(o,y);return yield*Ub(u,Mt(g)),y(),l}),a=(o,c)=>i(o,c).pipe(It(rle),EF);return tp.of({mutation:r,query:i,stream:a,unsafeInvalidate:t,invalidate:n,unsafeRegister:s})}),ple=P(2,(e,t)=>Oe(tp,n=>n.mutation(t,e))),gle=e=>Oe(tp,t=>t.invalidate(e)),Qk=Boe(tp,mle);function FS(e){return typeof e=="string"?e:Ce(e)}const wF=(e,t)=>{const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=`${e}:${FS(t[r])}`;return n},ble=e=>{const t=[];for(const n in e){t.push(n);for(const r of wF(n,e[n]))t.push(r)}return t},yle=e=>{try{return e.trim()===""?fe():ye(BigInt(e))}catch{return fe()}},SF="effect/Redacted",A0=$e("effect/Redacted/redactedRegistry",()=>new WeakMap),vF=Symbol.for(SF),_le={[vF]:{_A:e=>e},pipe(){return Se(this,arguments)},toString(){return"<redacted>"},toJSON(){return"<redacted>"},[gt](){return"<redacted>"},[Ge](){return F(Ce(SF),ot(Ce(A0.get(this))),Ht(this))},[Ke](e){return kle(e)&&je(A0.get(this),A0.get(e))}},kle=e=>Ne(e,vF),Ele=e=>{const t=Object.create(_le);return A0.set(t,e),t},xF=(e,t)=>{switch(t._tag){case"StringKeyword":case"TemplateLiteral":return Object.keys(e);case"SymbolKeyword":return Object.getOwnPropertySymbols(e);case"Refinement":return xF(e,t.from)}},TF=e=>{let t=!1,n;return()=>(t||(n=e(),t=!0),n)},TI=e=>Array.isArray(e),wle=e=>!Array.isArray(e),wN=e=>`[${Pm(e)}]`,IF=e=>TI(e)?e.map(wN).join(""):wN(e),Ss=(e,t,n,r)=>{let s=e;return n&&Qt(n)&&(s+=`
|
|
25
|
+
at path: ${IF(n)}`),t!==void 0&&(s+=`
|
|
26
|
+
details: ${t}`),r&&(s+=`
|
|
27
|
+
schema (${r._tag}): ${r}`),s},Sle=e=>Ss("Invalid Argument",e),vle=(e,t,n)=>Ss("Unsupported schema",e,t,n),AF=(e,t,n)=>Ss("Missing annotation",e,t,n),SN=(e,t)=>AF('Generating a JSON Schema for this schema requires a "jsonSchema" annotation',e,t),xle=(e,t)=>AF('Generating a JSON Schema for this schema requires an "identifier" annotation',e,t),Tle=e=>Ss("Generating a JSON Schema for post-rest elements is not currently supported. You're welcome to contribute by submitting a Pull Request",void 0,e),Ile=(e,t)=>Ss("Unsupported key",`Cannot encode ${Pm(e)} key to JSON Schema`,t),CF=(e,t,n)=>Ss("Unsupported schema or overlapping types",`cannot extend ${e} with ${t}`,n),Qb=e=>vle(void 0,void 0,e),Ale=e=>Ss("Unsupported key schema",void 0,void 0,e),Cle=e=>Ss("Unsupported literal",`literal value: ${za(e)}`),vN=e=>Ss("Duplicate index signature",`${e} index signature`),Ple=Ss("Unsupported index signature parameter","An index signature parameter type must be `string`, `symbol`, a template literal type or a refinement of the previous types"),Nle=Ss("Invalid element","A required element cannot follow an optional element. ts(1257)"),xN=e=>Ss("Duplicate property signature transformation",`Duplicate key ${za(e)}`),PF=e=>Ss("Duplicate property signature",`Duplicate key ${za(e)}`),Rle=Symbol.for("effect/SchemaId/DateFromSelf"),Ole=Symbol.for("effect/SchemaId/GreaterThanOrEqualTo"),Lle=Symbol.for("effect/SchemaId/LessThanOrEqualTo"),NF=Symbol.for("effect/SchemaId/Int"),Dle=Symbol.for("effect/SchemaId/GreaterThanOrEqualToBigint"),$le=Symbol.for("effect/SchemaId/LessThanOrEqualToBigint"),Mle=Symbol.for("effect/SchemaId/MinLength"),jle=Symbol.for("effect/SchemaId/MaxLength"),Fle=Symbol.for("effect/SchemaId/Length"),Ble=Symbol.for("effect/SchemaId/ItemsCount"),zle=Symbol.for("effect/annotation/TypeConstructor"),RF=Symbol.for("effect/annotation/Brand"),II=Symbol.for("effect/annotation/SchemaId"),OF=Symbol.for("effect/annotation/Message"),AI=Symbol.for("effect/annotation/MissingMessage"),Bd=Symbol.for("effect/annotation/Identifier"),Br=Symbol.for("effect/annotation/Title"),zl=Symbol.for("effect/annotation/AutoTitle"),ra=Symbol.for("effect/annotation/Description"),CI=Symbol.for("effect/annotation/Examples"),PI=Symbol.for("effect/annotation/Default"),NI=Symbol.for("effect/annotation/JSONSchema"),LF=Symbol.for("effect/annotation/Arbitrary"),DF=Symbol.for("effect/annotation/Pretty"),$F=Symbol.for("effect/annotation/Equivalence"),Ule=Symbol.for("effect/annotation/Documentation"),MF=Symbol.for("effect/annotation/Concurrency"),jF=Symbol.for("effect/annotation/Batching"),FF=Symbol.for("effect/annotation/ParseIssueTitle"),BF=Symbol.for("effect/annotation/ParseOptions"),zF=Symbol.for("effect/annotation/DecodingFallback"),Xb=Symbol.for("effect/annotation/Surrogate"),UF=Symbol.for("effect/annotation/StableFilter"),Zn=P(2,(e,t)=>Object.prototype.hasOwnProperty.call(e.annotations,t)?ye(e.annotations[t]):fe()),VF=Zn(RF),Vle=Zn(OF),Hle=Zn(AI),RI=Zn(Br),HF=Zn(zl),np=Zn(Bd),OI=Zn(ra),qle=Zn(CI),Gle=Zn(PI),qF=Zn(NI),Kle=Zn(MF),Wle=Zn(jF),Jle=Zn(FF),Yle=Zn(BF),Qle=Zn(zF),zd=Zn(Xb),Xle=Zn(UF),Zle=e=>jW(Xle(e),t=>t===!0),GF=Symbol.for("effect/annotation/JSONIdentifier"),ede=Zn(GF),KF=e=>Gi(ede(e),()=>np(e)),WF=Symbol.for("effect/schema/ParseJson");class s1{typeParameters;decodeUnknown;encodeUnknown;annotations;_tag="Declaration";constructor(t,n,r,s={}){this.typeParameters=t,this.decodeUnknown=n,this.encodeUnknown=r,this.annotations=s}toString(){return Kt(Xi(this),()=>"<declaration schema>")}toJSON(){return{_tag:this._tag,typeParameters:this.typeParameters.map(t=>t.toJSON()),annotations:Zt(this.annotations)}}}const vs=e=>t=>t._tag===e,tde=vs("Declaration");let Zb=class{literal;annotations;_tag="Literal";constructor(t,n={}){this.literal=t,this.annotations=n}toString(){return Kt(Xi(this),()=>za(this.literal))}toJSON(){return{_tag:this._tag,literal:n_(this.literal)?String(this.literal):this.literal,annotations:Zt(this.annotations)}}};const lh=vs("Literal"),nde=new Zb(null);class rde{symbol;annotations;_tag="UniqueSymbol";constructor(t,n={}){this.symbol=t,this.annotations=n}toString(){return Kt(Xi(this),()=>za(this.symbol))}toJSON(){return{_tag:this._tag,symbol:String(this.symbol),annotations:Zt(this.annotations)}}}class sde{annotations;_tag="UndefinedKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:Zt(this.annotations)}}}const um=new sde({[Br]:"undefined"});class ide{annotations;_tag="VoidKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:Zt(this.annotations)}}}const ade=new ide({[Br]:"void"}),ode=vs("VoidKeyword");class cde{annotations;_tag="NeverKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:Zt(this.annotations)}}}const rp=new cde({[Br]:"never"}),JF=vs("NeverKeyword");class ude{annotations;_tag="UnknownKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:Zt(this.annotations)}}}const YF=new ude({[Br]:"unknown"});class lde{annotations;_tag="AnyKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:Zt(this.annotations)}}}const QF=new lde({[Br]:"any"});class dde{annotations;_tag="StringKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:Zt(this.annotations)}}}const ey=new dde({[Br]:"string",[ra]:"a string"}),BS=vs("StringKeyword");class fde{annotations;_tag="NumberKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:Zt(this.annotations)}}}const ty=new fde({[Br]:"number",[ra]:"a number"}),TN=vs("NumberKeyword");class hde{annotations;_tag="BooleanKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:Zt(this.annotations)}}}const ny=new hde({[Br]:"boolean",[ra]:"a boolean"}),IN=vs("BooleanKeyword");class mde{annotations;_tag="BigIntKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:Zt(this.annotations)}}}const pde=new mde({[Br]:"bigint",[ra]:"a bigint"});class gde{annotations;_tag="SymbolKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:Zt(this.annotations)}}}const bde=new gde({[Br]:"symbol",[ra]:"a symbol"}),XF=vs("SymbolKeyword");class yde{annotations;_tag="ObjectKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:Zt(this.annotations)}}}const _de=new yde({[Br]:"object",[ra]:"an object in the TypeScript meaning, i.e. the `object` type"});let sp=class{type;annotations;constructor(t,n={}){this.type=t,this.annotations=n}toJSON(){return{type:this.type.toJSON(),annotations:Zt(this.annotations)}}toString(){return String(this.type)}};class Iu extends sp{isOptional;constructor(t,n,r={}){super(t,r),this.isOptional=n}toJSON(){return{type:this.type.toJSON(),isOptional:this.isOptional,annotations:Zt(this.annotations)}}toString(){return String(this.type)+(this.isOptional?"?":"")}}const LI=e=>e.map(t=>t.type);class i1{elements;rest;isReadonly;annotations;_tag="TupleType";constructor(t,n,r,s={}){this.elements=t,this.rest=n,this.isReadonly=r,this.annotations=s;let i=!1,a=!1;for(const o of t)if(o.isOptional)i=!0;else if(i){a=!0;break}if(a||i&&n.length>1)throw new Error(Nle)}toString(){return Kt(Xi(this),()=>kde(this))}toJSON(){return{_tag:this._tag,elements:this.elements.map(t=>t.toJSON()),rest:this.rest.map(t=>t.toJSON()),isReadonly:this.isReadonly,annotations:Zt(this.annotations)}}}const kde=e=>{const t=e.elements.map(String).join(", ");return WW(e.rest,{onEmpty:()=>`readonly [${t}]`,onNonEmpty:(n,r)=>{const s=String(n),i=s.includes(" | ")?`(${s})`:s;if(r.length>0){const a=r.map(String).join(", ");return e.elements.length>0?`readonly [${t}, ...${i}[], ${a}]`:`readonly [...${i}[], ${a}]`}else return e.elements.length>0?`readonly [${t}, ...${i}[]]`:`ReadonlyArray<${s}>`}})};class tn extends Iu{name;isReadonly;constructor(t,n,r,s,i){super(n,r,i),this.name=t,this.isReadonly=s}toString(){return(this.isReadonly?"readonly ":"")+String(this.name)+(this.isOptional?"?":"")+": "+this.type}toJSON(){return{name:String(this.name),type:this.type.toJSON(),isOptional:this.isOptional,isReadonly:this.isReadonly,annotations:Zt(this.annotations)}}}const ZF=e=>{switch(e._tag){case"StringKeyword":case"SymbolKeyword":case"TemplateLiteral":return!0;case"Refinement":return ZF(e.from)}return!1};class ip{type;isReadonly;parameter;constructor(t,n,r){if(this.type=n,this.isReadonly=r,ZF(t))this.parameter=t;else throw new Error(Ple)}toString(){return(this.isReadonly?"readonly ":"")+`[x: ${this.parameter}]: ${this.type}`}toJSON(){return{parameter:this.parameter.toJSON(),type:this.type.toJSON(),isReadonly:this.isReadonly}}}class di{annotations;_tag="TypeLiteral";propertySignatures;indexSignatures;constructor(t,n,r={}){this.annotations=r;const s={};for(let a=0;a<t.length;a++){const o=t[a].name;if(Object.prototype.hasOwnProperty.call(s,o))throw new Error(PF(o));s[o]=null}const i={string:!1,symbol:!1};for(let a=0;a<n.length;a++){const o=ay(n[a].parameter);if(BS(o)){if(i.string)throw new Error(vN("string"));i.string=!0}else if(XF(o)){if(i.symbol)throw new Error(vN("symbol"));i.symbol=!0}}this.propertySignatures=t,this.indexSignatures=n}toString(){return Kt(Xi(this),()=>Ede(this))}toJSON(){return{_tag:this._tag,propertySignatures:this.propertySignatures.map(t=>t.toJSON()),indexSignatures:this.indexSignatures.map(t=>t.toJSON()),annotations:Zt(this.annotations)}}}const AN=e=>e.map(String).join("; "),Ede=e=>{if(e.propertySignatures.length>0){const t=e.propertySignatures.map(String).join("; ");return e.indexSignatures.length>0?`{ ${t}; ${AN(e.indexSignatures)} }`:`{ ${t} }`}else return e.indexSignatures.length>0?`{ ${AN(e.indexSignatures)} }`:"{}"},zS=vs("TypeLiteral"),wde=Vh(dM(cd,e=>{switch(e._tag){case"AnyKeyword":return 0;case"UnknownKeyword":return 1;case"ObjectKeyword":return 2;case"StringKeyword":case"NumberKeyword":case"BooleanKeyword":case"BigIntKeyword":case"SymbolKeyword":return 3}return 4})),Sde={string:"StringKeyword",number:"NumberKeyword",boolean:"BooleanKeyword",bigint:"BigIntKeyword"},eB=e=>pb(e,t=>a1(t)?eB(t.types):[t]),vde=e=>{const t=wde(e),n=[],r={},s=[];for(const i of t)switch(i._tag){case"NeverKeyword":break;case"AnyKeyword":return[QF];case"UnknownKeyword":return[YF];case"ObjectKeyword":case"UndefinedKeyword":case"VoidKeyword":case"StringKeyword":case"NumberKeyword":case"BooleanKeyword":case"BigIntKeyword":case"SymbolKeyword":{r[i._tag]||(r[i._tag]=i,n.push(i));break}case"Literal":{const a=typeof i.literal;switch(a){case"string":case"number":case"bigint":case"boolean":{const o=Sde[a];!r[o]&&!s.includes(i.literal)&&(s.push(i.literal),n.push(i));break}case"object":{s.includes(i.literal)||(s.push(i.literal),n.push(i));break}}break}case"UniqueSymbol":{!r.SymbolKeyword&&!s.includes(i.symbol)&&(s.push(i.symbol),n.push(i));break}case"TupleType":{r.ObjectKeyword||n.push(i);break}case"TypeLiteral":{i.propertySignatures.length===0&&i.indexSignatures.length===0?r["{}"]||(r["{}"]=i,n.push(i)):r.ObjectKeyword||n.push(i);break}default:n.push(i)}return n};let Gn=class US{types;annotations;static make=(t,n)=>DI(t)?new US(t,n):t.length===1?t[0]:rp;static unify=(t,n)=>US.make(vde(eB(t)),n);_tag="Union";constructor(t,n={}){this.types=t,this.annotations=n}toString(){return Kt(Xi(this),()=>this.types.map(String).join(" | "))}toJSON(){return{_tag:this._tag,types:this.types.map(t=>t.toJSON()),annotations:Zt(this.annotations)}}};const xde=(e,t)=>e.map(t),DI=e=>e.length>1,a1=vs("Union"),Xk=$e(Symbol.for("effect/Schema/AST/toJSONMemoMap"),()=>new WeakMap);class lm{f;annotations;_tag="Suspend";constructor(t,n={}){this.f=t,this.annotations=n,this.f=TF(t)}toString(){return Xi(this).pipe(Gi(()=>Jo(RW(this.f)(),t=>Xi(t))),Kt(()=>"<suspended schema>"))}toJSON(){const t=this.f();let n=Xk.get(t);return n||(Xk.set(t,{_tag:this._tag}),n={_tag:this._tag,ast:t.toJSON(),annotations:Zt(this.annotations)},Xk.set(t,n),n)}}const tB=vs("Suspend");let $I=class{from;filter;annotations;_tag="Refinement";constructor(t,n,r={}){this.from=t,this.filter=n,this.annotations=r}toString(){return np(this).pipe(Kt(()=>hn(cB(this),{onNone:()=>`{ ${this.from} | filter }`,onSome:t=>Yc(this.from)?String(this.from)+" & "+t:t})))}toJSON(){return{_tag:this._tag,from:this.from.toJSON(),annotations:Zt(this.annotations)}}};const Yc=vs("Refinement"),Zk={};let Vi=class{from;to;transformation;annotations;_tag="Transformation";constructor(t,n,r,s={}){this.from=t,this.to=n,this.transformation=r,this.annotations=s}toString(){return Kt(Xi(this),()=>`(${String(this.from)} <-> ${String(this.to)})`)}toJSON(){return{_tag:this._tag,from:this.from.toJSON(),to:this.to.toJSON(),annotations:Zt(this.annotations)}}};const nB=vs("Transformation");class rB{decode;encode;_tag="FinalTransformation";constructor(t,n){this.decode=t,this.encode=n}}const Tde=e=>t=>t._tag===e;class Ide{_tag="ComposeTransformation"}const MI=new Ide;let Ade=class{from;to;decode;encode;constructor(t,n,r,s){this.from=t,this.to=n,this.decode=r,this.encode=s}};const Cde=e=>e.decode===ze&&e.encode===ze;class ry{propertySignatureTransformations;_tag="TypeLiteralTransformation";constructor(t){this.propertySignatureTransformations=t;const n={},r={};for(const s of t){const i=s.from;if(n[i])throw new Error(xN(i));n[i]=!0;const a=s.to;if(r[a])throw new Error(xN(a));r[a]=!0}}}const VS=Tde("TypeLiteralTransformation"),Ud=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={...e.annotations};delete r[Bd];const s={...r,...t},i=zd(e);return ft(i)&&(s[Xb]=Ud(i.value,t)),n.annotations.value=s,Object.create(Object.getPrototypeOf(e),n)},Pde="[\\s\\S]*?",Nde="[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?",sB=(e,t)=>{switch(e._tag){case"Literal":return xb(String(e.literal));case"StringKeyword":return Pde;case"NumberKeyword":return Nde;case"TemplateLiteral":return iB(e);case"Union":return e.types.map(n=>sB(n)).join("|")}},Rde=(e,t,n,r)=>a1(e)?`(${t})`:t,iB=(e,t,n)=>{let r="";if(e.head!==""){const s=xb(e.head);r+=s}for(const s of e.spans){const i=sB(s.type);if(r+=Rde(s.type,i),s.literal!==""){const a=xb(s.literal);r+=a}}return r},sy=e=>new RegExp(`^${iB(e)}$`),aB=(e,t)=>{const n=iJ(e.propertySignatures,r=>r.name===t);if(ft(n))return n.value;if(kn(t)){let r;for(const s of e.indexSignatures){const i=ay(s.parameter);switch(i._tag){case"TemplateLiteral":{if(sy(i).test(t))return new tn(t,s.type,!1,!0);break}case"StringKeyword":r===void 0&&(r=new tn(t,s.type,!1,!0))}}if(r)return r}else if(cb(t))for(const r of e.indexSignatures){const s=ay(r.parameter);if(XF(s))return new tn(t,r.type,!1,!0)}},Vf=(e,t)=>{const n=zd(e);if(ft(n))return Vf(n.value,t);switch(e._tag){case"TypeLiteral":{const r=aB(e,t);if(r)return r;break}case"Union":return new tn(t,Gn.make(e.types.map(r=>Vf(r,t).type)),!1,!0);case"Suspend":return Vf(e.f(),t);case"Refinement":return Vf(e.from,t)}throw new Error(Qb(e))},CN=(e,t)=>{const n=[],r=[],s=i=>{switch(i._tag){case"NeverKeyword":break;case"StringKeyword":case"SymbolKeyword":case"TemplateLiteral":case"Refinement":r.push(new ip(i,t,!0));break;case"Literal":if(kn(i.literal)||pi(i.literal))n.push(new tn(i.literal,t,!1,!0));else throw new Error(Cle(i.literal));break;case"Enums":{for(const[a,o]of i.enums)n.push(new tn(o,t,!1,!0));break}case"UniqueSymbol":n.push(new tn(i.symbol,t,!1,!0));break;case"Union":i.types.forEach(s);break;default:throw new Error(Ale(i))}};return s(e),{propertySignatures:n,indexSignatures:r}},_a=(e,t)=>{const n=zd(e);if(ft(n))return _a(n.value,t);switch(e._tag){case"TypeLiteral":{const r=[],s={};for(const i of e.propertySignatures)s[i.name]=null,t.includes(i.name)&&r.push(i);for(const i of t)if(!(i in s)){const a=aB(e,i);a&&r.push(a)}return new di(r,[])}case"Union":return new di(t.map(r=>Vf(e,r)),[]);case"Suspend":return _a(e.f(),t);case"Refinement":return _a(e.from,t);case"Transformation":switch(e.transformation._tag){case"ComposeTransformation":return new Vi(_a(e.from,t),_a(e.to,t),MI);case"TypeLiteralTransformation":{const r=[],s=[];for(const i of t){const a=e.transformation.propertySignatureTransformations.find(o=>o.to===i);a?(r.push(a),s.push(a.from)):s.push(i)}return Qt(r)?new Vi(_a(e.from,s),_a(e.to,t),new ry(r)):_a(e.from,s)}}}throw new Error(Qb(e))},eE=e=>Gn.make([e,um]),Hf=(e,t)=>{const n=t?.exact===!0;switch(e._tag){case"TupleType":return new i1(e.elements.map(r=>new Iu(n?r.type:eE(r.type),!0)),KW(e.rest,{onEmpty:()=>e.rest,onNonEmpty:r=>[new sp(Gn.make([...LI(r),um]))]}),e.isReadonly);case"TypeLiteral":return new di(e.propertySignatures.map(r=>new tn(r.name,n?r.type:eE(r.type),!0,r.isReadonly,r.annotations)),e.indexSignatures.map(r=>new ip(r.parameter,eE(r.type),r.isReadonly)));case"Union":return Gn.make(e.types.map(r=>Hf(r,t)));case"Suspend":return new lm(()=>Hf(e.f(),t));case"Declaration":case"Refinement":throw new Error(Qb(e));case"Transformation":{if(VS(e.transformation)&&e.transformation.propertySignatureTransformations.every(Cde))return new Vi(Hf(e.from,t),Hf(e.to,t),e.transformation);throw new Error(Qb(e))}}return e},oB=e=>t=>{let n;for(const r of e)Object.prototype.hasOwnProperty.call(t.annotations,r)&&(n===void 0&&(n={}),n[r]=t.annotations[r]);return n},Ode=e=>t=>{const n={...t.annotations};for(const r of e)delete n[r];return n},Lde=oB([CI,PI,NI,LF,DF,$F]),_n=e=>{switch(e._tag){case"Declaration":{const t=Ns(e.typeParameters,_n);return t===e.typeParameters?e:new s1(t,e.decodeUnknown,e.encodeUnknown,e.annotations)}case"TupleType":{const t=Ns(e.elements,s=>{const i=_n(s.type);return i===s.type?s:new Iu(i,s.isOptional)}),n=LI(e.rest),r=Ns(n,_n);return t===e.elements&&r===n?e:new i1(t,r.map(s=>new sp(s)),e.isReadonly,e.annotations)}case"TypeLiteral":{const t=Ns(e.propertySignatures,r=>{const s=_n(r.type);return s===r.type?r:new tn(r.name,s,r.isOptional,r.isReadonly)}),n=Ns(e.indexSignatures,r=>{const s=_n(r.type);return s===r.type?r:new ip(r.parameter,s,r.isReadonly)});return t===e.propertySignatures&&n===e.indexSignatures?e:new di(t,n,e.annotations)}case"Union":{const t=Ns(e.types,_n);return t===e.types?e:Gn.make(t,e.annotations)}case"Suspend":return new lm(()=>_n(e.f()),e.annotations);case"Refinement":{const t=_n(e.from);return t===e.from?e:new $I(t,e.filter,e.annotations)}case"Transformation":{const t=Lde(e);return _n(t!==void 0?Ud(e.to,t):e.to)}}return e};function Ns(e,t){let n=!1;const r=l_(e.length);for(let s=0;s<e.length;s++){const i=e[s],a=t(i);a!==i&&(n=!0),r[s]=a}return n?r:e}const HS=e=>{switch(e._tag){case"Transformation":return e.from;case"Refinement":return HS(e.from);case"Suspend":return HS(e.f())}},Pi=(e,t)=>{switch(e._tag){case"Declaration":{const n=Ns(e.typeParameters,r=>Pi(r));return n===e.typeParameters?e:new s1(n,e.decodeUnknown,e.encodeUnknown)}case"TupleType":{const n=Ns(e.elements,i=>{const a=Pi(i.type);return a===i.type?i:new Iu(a,i.isOptional)}),r=LI(e.rest),s=Ns(r,i=>Pi(i));return n===e.elements&&s===r?e:new i1(n,s.map(i=>new sp(i)),e.isReadonly)}case"TypeLiteral":{const n=Ns(e.propertySignatures,s=>{const i=Pi(s.type);return i===s.type?s:new tn(s.name,i,s.isOptional,s.isReadonly)}),r=Ns(e.indexSignatures,s=>{const i=Pi(s.type);return i===s.type?s:new ip(s.parameter,i,s.isReadonly)});return n===e.propertySignatures&&r===e.indexSignatures?e:new di(n,r)}case"Union":{const n=Ns(e.types,r=>Pi(r));return n===e.types?e:Gn.make(n)}case"Suspend":{let n;const r=KF(e);return ft(r)&&(n={[GF]:`${r.value}Encoded`}),new lm(()=>Pi(e.f()),n)}case"Refinement":return Pi(e.from);case"Transformation":return Pi(e.from)}return e},iy=e=>Pi(e),Zt=e=>{const t={};for(const n of Object.getOwnPropertySymbols(e))t[String(n)]=e[n];return t},ay=e=>{switch(e._tag){case"StringKeyword":case"SymbolKeyword":case"TemplateLiteral":return e;case"Refinement":return ay(e.from)}},Dde=(e,t)=>new Vi(e,t,MI),Si=e=>Kt(Xi(e),()=>e._tag);function $de(e){return hn(VF(e),{onNone:()=>"",onSome:t=>t.map(n=>` & Brand<${za(n)}>`).join("")})}const cB=e=>RI(e).pipe(Gi(()=>OI(e)),Gi(()=>HF(e)),Wr(t=>t+$de(e))),Xi=e=>Gi(np(e),()=>cB(e)),Mde=(e,t,n)=>{switch(e._tag){case"UndefinedKeyword":return rp;case"Union":{const r=[];let s=!1;for(const i of e.types){const a=t(i);a?(s=!0,JF(a)||r.push(a)):r.push(i)}if(s)return Gn.make(r);break}case"Suspend":return t(e.f());case"Transformation":return n(e)}};class rr{path;actual;issue;_tag="Pointer";constructor(t,n,r){this.path=t,this.actual=n,this.issue=r}}class PN{actual;message;_tag="Unexpected";constructor(t,n){this.actual=t,this.message=n}}class bf{ast;message;_tag="Missing";actual=void 0;constructor(t,n){this.ast=t,this.message=n}}class an{ast;actual;issues;output;_tag="Composite";constructor(t,n,r,s){this.ast=t,this.actual=n,this.issues=r,this.output=s}}class tE{ast;actual;kind;issue;_tag="Refinement";constructor(t,n,r,s){this.ast=t,this.actual=n,this.kind=r,this.issue=s}}class nE{ast;actual;kind;issue;_tag="Transformation";constructor(t,n,r,s){this.ast=t,this.actual=n,this.kind=r,this.issue=s}}class vn{ast;actual;message;_tag="Type";constructor(t,n,r){this.ast=t,this.actual=n,this.message=r}}class qS{ast;actual;message;_tag="Forbidden";constructor(t,n,r){this.ast=t,this.actual=n,this.message=r}}const NN=Symbol.for("effect/Schema/ParseErrorTypeId");class jde extends Jm("ParseError"){[NN]=NN;get message(){return this.toString()}toString(){return fh.formatIssueSync(this.issue)}toJSON(){return{_id:"ParseError",message:this.toString()}}[gt](){return this.toJSON()}}const jI=e=>new jde({issue:e}),Jr=Ue,Lc=Be,oy=wW,Fde=EW,Cr=SW,oi=P(2,(e,t)=>Cr(e)?Kr(e,{onLeft:Be,onRight:t}):Oe(e,t)),ar=P(2,(e,t)=>Cr(e)?xW(e,t):It(e,t)),dh=P(2,(e,t)=>Cr(e)?vW(e,t):fI(e,t)),uB=P(2,(e,t)=>Cr(e)?Kr(e,{onLeft:t,onRight:Ue}):r5(e,t)),o1=(e,t)=>t===void 0||pi(t)?e:e===void 0?t:{...e,...t},lB=(e,t,n)=>{const r=Un(e,t);return(s,i)=>r(s,o1(n,i))},Bde=(e,t,n)=>{const r=lB(e,t,n);return(s,i)=>oM(r(s,i),jI)},dB=(e,t,n)=>{const r=lB(e,t,n);return(s,i)=>PW(r(s,i))},fB=(e,t,n)=>{const r=Un(e,t);return(s,i)=>r(s,{...o1(n,i),isEffectAllowed:!0})},hB=(e,t)=>fB(e.ast,!0,t),mB=(e,t)=>fB(e.ast,!1,t),c1=(e,t)=>Bde(_n(e.ast),!0,t),zde=(e,t)=>{const n=Un(_n(e.ast),!0);return(r,s)=>Bi(n(r,{exact:!0,...o1(t,s)}))},Ude=$e(Symbol.for("effect/ParseResult/decodeMemoMap"),()=>new WeakMap),Vde=$e(Symbol.for("effect/ParseResult/encodeMemoMap"),()=>new WeakMap),Un=(e,t)=>{const n=t?Ude:Vde,r=n.get(e);if(r)return r;const s=Hde(e,t),i=Yle(e),a=ft(i)?(u,l)=>s(u,o1(l,i.value)):s,o=Qle(e),c=t&&ft(o)?(u,l)=>Gf(uB(a(u,l),o.value),e,u,l):a;return n.set(e,c),c},rE=e=>Pr(Kle(e)),sE=e=>Pr(Wle(e)),Hde=(e,t)=>{switch(e._tag){case"Refinement":if(t){const n=Un(e.from,!0);return(r,s)=>{s=s??Zk;const i=s?.errors==="all",a=oi(uB(n(r,s),o=>{const c=new tE(e,r,"From",o);return i&&Zle(e)&&yB(o)?hn(e.filter(r,s,e),{onNone:()=>Be(c),onSome:u=>Be(new an(e,r,[c,new tE(e,r,"Predicate",u)]))}):Be(c)}),o=>hn(e.filter(o,s,e),{onNone:()=>Ue(o),onSome:c=>Be(new tE(e,r,"Predicate",c))}));return Gf(a,e,r,s)}}else{const n=Un(_n(e),!0),r=Un(pB(e.from),!1);return(s,i)=>Gf(oi(n(s,i),a=>r(a,i)),e,s,i)}case"Transformation":{const n=Kde(e.transformation,t),r=t?Un(e.from,!0):Un(e.to,!1),s=t?Un(e.to,!0):Un(e.from,!1);return(i,a)=>Gf(oi(dh(r(i,a),o=>new nE(e,i,t?"Encoded":"Type",o)),o=>oi(dh(n(o,a??Zk,e,i),c=>new nE(e,i,"Transformation",c)),c=>dh(s(c,a),u=>new nE(e,i,t?"Type":"Encoded",u)))),e,i,a)}case"Declaration":{const n=t?e.decodeUnknown(...e.typeParameters):e.encodeUnknown(...e.typeParameters);return(r,s)=>Gf(n(r,s??Zk,e),e,r,s)}case"Literal":return is(e,n=>n===e.literal);case"UniqueSymbol":return is(e,n=>n===e.symbol);case"UndefinedKeyword":return is(e,lK);case"NeverKeyword":return is(e,dK);case"UnknownKeyword":case"AnyKeyword":case"VoidKeyword":return Ue;case"StringKeyword":return is(e,kn);case"NumberKeyword":return is(e,pi);case"BooleanKeyword":return is(e,No);case"BigIntKeyword":return is(e,n_);case"SymbolKeyword":return is(e,cb);case"ObjectKeyword":return is(e,_s);case"Enums":return is(e,n=>e.enums.some(([r,s])=>s===n));case"TemplateLiteral":{const n=sy(e);return is(e,r=>kn(r)&&n.test(r))}case"TupleType":{const n=e.elements.map(u=>Un(u.type,t)),r=e.rest.map(u=>Un(u.type,t));let s=e.elements.filter(u=>!u.isOptional);e.rest.length>0&&(s=s.concat(e.rest.slice(1)));const i=s.length,a=e.elements.length>0?e.elements.map((u,l)=>l).join(" | "):"never",o=rE(e),c=sE(e);return(u,l)=>{if(!YW(u))return Be(new vn(e,u));const d=l?.errors==="all",f=[];let h=0;const m=[],y=u.length;for(let k=y;k<=i-1;k++){const v=new rr(k,u,new bf(s[k-y]));if(d){f.push([h++,v]);continue}else return Be(new an(e,u,v,m))}if(e.rest.length===0)for(let k=e.elements.length;k<=y-1;k++){const v=new rr(k,u,new PN(u[k],`is unexpected, expected: ${a}`));if(d){f.push([h++,v]);continue}else return Be(new an(e,u,v,m))}let g=0,p;for(;g<n.length;g++)if(y<g+1){if(e.elements[g].isOptional)continue}else{const k=n[g],v=k(u[g],l);if(Cr(v)){if(ir(v)){const w=new rr(g,u,v.left);if(d){f.push([h++,w]);continue}else return Be(new an(e,u,w,Ks(m)))}m.push([h++,v.right])}else{const w=h++,S=g;p||(p=[]),p.push(({es:T,output:I})=>Oe(Ku(v),D=>{if(ir(D)){const R=new rr(S,u,D.left);return d?(T.push([w,R]),pt):Be(new an(e,u,R,Ks(I)))}return I.push([w,D.right]),pt}))}}if(Qt(r)){const[k,...v]=r;for(;g<y-v.length;g++){const w=k(u[g],l);if(Cr(w))if(ir(w)){const S=new rr(g,u,w.left);if(d){f.push([h++,S]);continue}else return Be(new an(e,u,S,Ks(m)))}else m.push([h++,w.right]);else{const S=h++,T=g;p||(p=[]),p.push(({es:I,output:D})=>Oe(Ku(w),R=>{if(ir(R)){const z=new rr(T,u,R.left);return d?(I.push([S,z]),pt):Be(new an(e,u,z,Ks(D)))}else return D.push([S,R.right]),pt}))}}for(let w=0;w<v.length;w++)if(g+=w,!(y<g+1)){const S=v[w](u[g],l);if(Cr(S)){if(ir(S)){const T=new rr(g,u,S.left);if(d){f.push([h++,T]);continue}else return Be(new an(e,u,T,Ks(m)))}m.push([h++,S.right])}else{const T=h++,I=g;p||(p=[]),p.push(({es:D,output:R})=>Oe(Ku(S),z=>{if(ir(z)){const V=new rr(I,u,z.left);return d?(D.push([T,V]),pt):Be(new an(e,u,V,Ks(R)))}return R.push([T,z.right]),pt}))}}}const _=({es:k,output:v})=>Nl(k)?Be(new an(e,u,Ks(k),Ks(v))):Ue(Ks(v));if(p&&p.length>0){const k=p;return ln(()=>{const v={es:jf(f),output:jf(m)};return Oe(Ji(k,w=>w(v),{concurrency:o,batching:c,discard:!0}),()=>_(v))})}return _({output:m,es:f})}}case"TypeLiteral":{if(e.propertySignatures.length===0&&e.indexSignatures.length===0)return is(e,fK);const n=[],r={},s=[];for(const l of e.propertySignatures)n.push([Un(l.type,t),l]),r[l.name]=null,s.push(l.name);const i=e.indexSignatures.map(l=>[Un(l.parameter,t),Un(l.type,t),l.parameter]),a=Gn.make(e.indexSignatures.map(l=>l.parameter).concat(s.map(l=>cb(l)?new rde(l):new Zb(l)))),o=Un(a,t),c=rE(e),u=sE(e);return(l,d)=>{if(!Bh(l))return Be(new vn(e,l));const f=d?.errors==="all",h=[];let m=0;const y=d?.onExcessProperty==="error",g=d?.onExcessProperty==="preserve",p={};let _;if(y||g){_=Reflect.ownKeys(l);for(const S of _){const T=o(S,d);if(Cr(T)&&ir(T))if(y){const I=new rr(S,l,new PN(l[S],`is unexpected, expected: ${String(a)}`));if(f){h.push([m++,I]);continue}else return Be(new an(e,l,I,p))}else p[S]=l[S]}}let k;const v=d?.exact===!0;for(let S=0;S<n.length;S++){const T=n[S][1],I=T.name,D=Object.prototype.hasOwnProperty.call(l,I);if(!D){if(T.isOptional)continue;if(v){const V=new rr(I,l,new bf(T));if(f){h.push([m++,V]);continue}else return Be(new an(e,l,V,p))}}const R=n[S][0],z=R(l[I],d);if(Cr(z)){if(ir(z)){const V=new rr(I,l,D?z.left:new bf(T));if(f){h.push([m++,V]);continue}else return Be(new an(e,l,V,p))}p[I]=z.right}else{const V=m++,H=I;k||(k=[]),k.push(({es:G,output:Q})=>Oe(Ku(z),ne=>{if(ir(ne)){const me=new rr(H,l,D?ne.left:new bf(T));return f?(G.push([V,me]),pt):Be(new an(e,l,me,Q))}return Q[H]=ne.right,pt}))}}for(let S=0;S<i.length;S++){const T=i[S],I=T[0],D=T[1],R=xF(l,T[2]);for(const z of R){const V=I(z,d);if(Cr(V)&&Bi(V)){const H=D(l[z],d);if(Cr(H))if(ir(H)){const G=new rr(z,l,H.left);if(f){h.push([m++,G]);continue}else return Be(new an(e,l,G,p))}else Object.prototype.hasOwnProperty.call(r,z)||(p[z]=H.right);else{const G=m++,Q=z;k||(k=[]),k.push(({es:ne,output:me})=>Oe(Ku(H),ke=>{if(ir(ke)){const et=new rr(Q,l,ke.left);return f?(ne.push([G,et]),pt):Be(new an(e,l,et,me))}else return Object.prototype.hasOwnProperty.call(r,z)||(me[z]=ke.right),pt}))}}}}const w=({es:S,output:T})=>{if(Nl(S))return Be(new an(e,l,Ks(S),T));if(d?.propertyOrder==="original"){const I=_||Reflect.ownKeys(l);for(const R of s)I.indexOf(R)===-1&&I.push(R);const D={};for(const R of I)Object.prototype.hasOwnProperty.call(T,R)&&(D[R]=T[R]);return Ue(D)}return Ue(T)};if(k&&k.length>0){const S=k;return ln(()=>{const T={es:jf(h),output:Object.assign({},p)};return Oe(Ji(S,I=>I(T),{concurrency:c,batching:u,discard:!0}),()=>w(T))})}return w({es:h,output:p})}}case"Union":{const n=qde(e.types,t),r=Reflect.ownKeys(n.keys),s=r.length,i=e.types.length,a=new Map;for(let u=0;u<i;u++)a.set(e.types[u],Un(e.types[u],t));const o=rE(e)??1,c=sE(e);return(u,l)=>{const d=[];let f=0,h=[];if(s>0)if(Ax(u))for(let g=0;g<s;g++){const p=r[g],_=n.keys[p].buckets;if(Object.prototype.hasOwnProperty.call(u,p)){const k=String(u[p]);if(Object.prototype.hasOwnProperty.call(_,k))h=h.concat(_[k]);else{const{candidates:v,literals:w}=n.keys[p],S=Gn.make(w),T=v.length===i?new di([new tn(p,S,!1,!0)],[]):Gn.make(v);d.push([f++,new an(T,u,new rr(p,u,new vn(S,u[p])))])}}else{const{candidates:k,literals:v}=n.keys[p],w=new tn(p,Gn.make(v),!1,!0),S=k.length===i?new di([w],[]):Gn.make(k);d.push([f++,new an(S,u,new rr(p,u,new bf(w)))])}}else{const g=n.candidates.length===i?e:Gn.make(n.candidates);d.push([f++,new vn(g,u)])}n.otherwise.length>0&&(h=h.concat(n.otherwise));let m;for(let g=0;g<h.length;g++){const p=h[g],_=a.get(p)(u,l);if(Cr(_)&&(!m||m.length===0)){if(Bi(_))return _;d.push([f++,_.left])}else{const k=f++;m||(m=[]),m.push(v=>ln(()=>"finalResult"in v?pt:Oe(Ku(_),w=>(Bi(w)?v.finalResult=w:v.es.push([k,w.left]),pt))))}}const y=g=>Nl(g)?g.length===1&&g[0][1]._tag==="Type"?Be(g[0][1]):Be(new an(e,u,Ks(g))):Be(new vn(e,u));if(m&&m.length>0){const g=m;return ln(()=>{const p={es:jf(d)};return Oe(Ji(g,_=>_(p),{concurrency:o,batching:c,discard:!0}),()=>"finalResult"in p?p.finalResult:y(p.es))})}return y(d)}}case"Suspend":{const n=TF(()=>Un(e.f(),t));return(r,s)=>n()(r,s)}}},is=(e,t)=>n=>t(n)?Ue(n):Be(new vn(e,n)),qf=(e,t)=>{switch(e._tag){case"Declaration":{const n=zd(e);if(ft(n))return qf(n.value,t);break}case"TypeLiteral":{const n=[];for(let r=0;r<e.propertySignatures.length;r++){const s=e.propertySignatures[r],i=t?iy(s.type):_n(s.type);lh(i)&&!s.isOptional&&n.push([s.name,i])}return n}case"TupleType":{const n=[];for(let r=0;r<e.elements.length;r++){const s=e.elements[r],i=t?iy(s.type):_n(s.type);lh(i)&&!s.isOptional&&n.push([r,i])}return n}case"Refinement":return qf(e.from,t);case"Suspend":return qf(e.f(),t);case"Transformation":return qf(t?e.from:e.to,t)}return[]},qde=(e,t)=>{const n={},r=[],s=[];for(let i=0;i<e.length;i++){const a=e[i],o=qf(a,t);if(o.length>0){s.push(a);for(let c=0;c<o.length;c++){const[u,l]=o[c],d=String(l.literal);n[u]=n[u]||{buckets:{},literals:[],candidates:[]};const f=n[u].buckets;if(Object.prototype.hasOwnProperty.call(f,d)){if(c<o.length-1)continue;f[d].push(a),n[u].literals.push(l),n[u].candidates.push(a)}else{f[d]=[a],n[u].literals.push(l),n[u].candidates.push(a);break}}}else r.push(a)}return{keys:n,otherwise:r,candidates:s}},pB=e=>Yc(e)?pB(e.from):e,Gf=(e,t,n,r)=>{if(r?.isEffectAllowed===!0||Cr(e))return e;const s=new H_,i=X_(e,{scheduler:s});s.flush();const a=i.unsafePoll();if(a){if(Kj(a))return Ue(a.value);const o=a.cause;return Wse(o)?Be(o.error):Be(new qS(t,n,eI(o)))}return Be(new qS(t,n,"cannot be be resolved synchronously, this is caused by using runSync on an effect that performs async work"))},Gde=([e],[t])=>e>t?1:e<t?-1:0;function Ks(e){return e.sort(Gde).map(t=>t[1])}const Kde=(e,t)=>{switch(e._tag){case"FinalTransformation":return t?e.decode:e.encode;case"ComposeTransformation":return Ue;case"TypeLiteralTransformation":return n=>{let r=Ue(n);for(const s of e.propertySignatureTransformations){const[i,a]=t?[s.from,s.to]:[s.to,s.from],o=t?s.decode:s.encode;r=ar(r,u=>{const l=o(Object.prototype.hasOwnProperty.call(u,i)?ye(u[i]):fe());return delete u[i],ft(l)&&(u[a]=l.value),u})}return r}}},xr=(e,t=[])=>({value:e,forest:t}),fh={formatIssue:e=>ar(dl(e),Wde),formatIssueSync:e=>{const t=fh.formatIssue(e);return Cr(t)?cM(t):zs(t)},formatError:e=>fh.formatIssue(e.issue),formatErrorSync:e=>fh.formatIssueSync(e.issue)},Wde=e=>e.value+gB(`
|
|
28
|
+
`,e.forest),gB=(e,t)=>{let n="";const r=t.length;let s;for(let i=0;i<r;i++){s=t[i];const a=i===r-1;n+=e+(a?"└":"├")+"─ "+s.value,n+=gB(e+(r>1&&!a?"│ ":" "),s.forest)}return n},Jde=e=>{switch(e){case"Encoded":return"Encoded side transformation failure";case"Transformation":return"Transformation process failure";case"Type":return"Type side transformation failure"}},Yde=e=>{switch(e){case"From":return"From side refinement failure";case"Predicate":return"Predicate refinement failure"}},bB=e=>"ast"in e?ye(e.ast):fe(),GS=Ue(void 0),Qde=e=>bB(e).pipe(Jo(Vle),hn({onNone:()=>GS,onSome:t=>{const n=t(e);return kn(n)?Ue({message:n,override:!1}):Qo(n)?It(n,r=>({message:r,override:!1})):kn(n.message)?Ue({message:n.message,override:n.override}):It(n.message,r=>({message:r,override:n.override}))}})),FI=e=>t=>t._tag===e,yB=FI("Composite"),RN=FI("Refinement"),ON=FI("Transformation"),vo=e=>oi(Qde(e),t=>t!==void 0?!t.override&&(yB(e)||RN(e)&&e.kind==="From"||ON(e)&&e.kind!=="Transformation")?ON(e)||RN(e)?vo(e.issue):GS:Ue(t.message):GS),_B=e=>bB(e).pipe(Jo(Jle),hM(t=>t(e)),Pr);function Xde(e){return OI(e).pipe(Gi(()=>RI(e)),Gi(()=>HF(e)),Gi(()=>np(e)),Kt(()=>`{ ${e.from} | filter }`))}function Zde(e){return e.message!==void 0?e.message:`Expected ${Yc(e.ast)?Xde(e.ast):String(e.ast)}, actual ${za(e.actual)}`}const kB=e=>ar(vo(e),t=>t??_B(e)??Zde(e)),Vp=e=>_B(e)??String(e.ast),EB=e=>e.message??"is forbidden",wB=e=>e.message??"is unexpected",SB=e=>{const t=Hle(e.ast);if(ft(t)){const n=t.value();return kn(n)?Ue(n):n}return Ue(e.message??"is missing")},dl=e=>{switch(e._tag){case"Type":return ar(kB(e),xr);case"Forbidden":return Ue(xr(Vp(e),[xr(EB(e))]));case"Unexpected":return Ue(xr(wB(e)));case"Missing":return ar(SB(e),xr);case"Transformation":return oi(vo(e),t=>t!==void 0?Ue(xr(t)):ar(dl(e.issue),n=>xr(Vp(e),[xr(Jde(e.kind),[n])])));case"Refinement":return oi(vo(e),t=>t!==void 0?Ue(xr(t)):ar(dl(e.issue),n=>xr(Vp(e),[xr(Yde(e.kind),[n])])));case"Pointer":return ar(dl(e.issue),t=>xr(IF(e.path),[t]));case"Composite":return oi(vo(e),t=>{if(t!==void 0)return Ue(xr(t));const n=Vp(e);return TI(e.issues)?ar(Ji(e.issues,dl),r=>xr(n,r)):ar(dl(e.issues),r=>xr(n,[r]))})}},lc=(e,t,n)=>({_tag:e,path:t,message:n}),hh={formatIssue:e=>fl(e,void 0,[]),formatIssueSync:e=>{const t=hh.formatIssue(e);return Cr(t)?cM(t):zs(t)},formatError:e=>hh.formatIssue(e.issue),formatErrorSync:e=>hh.formatIssueSync(e.issue)},fl=(e,t,n)=>{const r=e._tag;switch(r){case"Type":return ar(kB(e),s=>[lc(t??r,n,s)]);case"Forbidden":return Ue([lc(r,n,EB(e))]);case"Unexpected":return Ue([lc(r,n,wB(e))]);case"Missing":return ar(SB(e),s=>[lc(r,n,s)]);case"Pointer":return fl(e.issue,void 0,n.concat(e.path));case"Composite":return oi(vo(e),s=>s!==void 0?Ue([lc(r,n,s)]):TI(e.issues)?ar(Ji(e.issues,i=>fl(i,void 0,n)),kM):fl(e.issues,void 0,n));case"Refinement":return oi(vo(e),s=>s!==void 0?Ue([lc(r,n,s)]):fl(e.issue,e.kind==="Predicate"?r:void 0,n));case"Transformation":return oi(vo(e),s=>s!==void 0?Ue([lc(r,n,s)]):fl(e.issue,e.kind==="Transformation"?r:void 0,n))}},LN=Ele,efe=P(e=>_s(e[0]),(e,...t)=>{const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}),vB=P(e=>_s(e[0]),(e,...t)=>{const n={...e};for(const r of t)delete n[r];return n}),hd=Symbol.for("effect/Schema");function St(e){return class{[hd]=KS;static ast=e;static annotations(n){return St(vi(this.ast,n))}static pipe(){return Se(this,arguments)}static toString(){return String(e)}static Type;static Encoded;static Context;static[hd]=KS}}const KS={_A:e=>e,_I:e=>e,_R:e=>e},DN=e=>Kj(e)?e.value:tfe(eI(e.cause)),tfe=e=>({issues:[{message:e}]}),nfe=e=>It(hh.formatIssue(e),t=>({issues:t.map(n=>({path:n.path,message:n.message}))})),Xo=(e,t)=>{const n=hB(e,{errors:"all"});return class extends St(e.ast){static"~standard"={version:1,vendor:"effect",validate(s){const i=new H_,a=X_(woe(n(s,t),{onFailure:nfe,onSuccess:c=>Ot({value:c})}),{scheduler:i});i.flush();const o=a.unsafePoll();return o?DN(o):new Promise(c=>{a.addObserver(u=>{c(DN(u))})})}}}},$N={typeConstructor:zle,schemaId:II,message:OF,missingMessage:AI,identifier:Bd,title:Br,description:ra,examples:CI,default:PI,documentation:Ule,jsonSchema:NI,arbitrary:LF,pretty:DF,equivalence:$F,concurrency:MF,batching:jF,parseIssueTitle:FF,parseOptions:BF,decodingFallback:zF},Au=e=>{if(!e)return{};const t={...e};for(const n in $N)if(n in e){const r=$N[n];t[r]=e[n],delete t[n]}return t},vi=(e,t)=>Ud(e,Au(t)),rfe=e=>St(iy(e.ast)),MN=e=>St(_n(e.ast)),yf=(e,t)=>{const n=mB(e,t);return(r,s)=>dh(n(r,s),jI)},xB=(e,t)=>{const n=hB(e,t);return(r,s)=>dh(n(r,s),jI)},sfe=xB,Mr=e=>Ne(e,hd)&&_s(e[hd]);function ife(e){return DI(e)?Gn.make(xde(e,t=>new Zb(t))):new Zb(e[0])}function TB(e,t=ife(e)){return class extends St(t){static annotations(r){return TB(this.literals,vi(this.ast,r))}static literals=[...e]}}function Le(...e){return Qt(e)?TB(e):dm}const afe=(e,t,n)=>BI(e,new s1(e.map(r=>r.ast),(...r)=>t.decode(...r.map(St)),(...r)=>t.encode(...r.map(St)),Au(n))),ofe=(e,t)=>{const n=()=>(s,i,a)=>e(s)?Jr(s):Lc(new vn(a,s)),r=n;return BI([],new s1([],n,r,Au(t)))};function BI(e,t){return class extends St(t){static annotations(r){return BI(this.typeParameters,vi(this.ast,r))}static typeParameters=[...e]}}const ap=function(){if(Array.isArray(arguments[0])){const n=arguments[0],r=arguments[1],s=arguments[2];return afe(n,r,s)}const e=arguments[0],t=arguments[1];return ofe(e,t)},jN=Symbol.for("effect/SchemaId/InstanceOf"),cfe=(e,t)=>ap(n=>n instanceof e,{title:e.name,description:`an instance of ${e.name}`,pretty:()=>String,schemaId:jN,[jN]:{constructor:e},...t});class ufe extends St(um){}class lfe extends St(ade){}class IB extends St(nde){}class dm extends St(rp){}class op extends St(YF){}class Fo extends St(QF){}class zI extends St(pde){}class dfe extends St(bde){}class $ extends St(ey){}class ct extends St(ty){}class qt extends St(ny){}class ffe extends St(_de){}const hfe=e=>Gn.make(e.map(t=>t.ast));function AB(e,t=hfe(e)){return class extends St(t){static annotations(r){return AB(this.members,vi(this.ast,r))}static members=[...e]}}function Hs(...e){return DI(e)?AB(e):Qt(e)?e[0]:dm}const ee=e=>Hs(e,IB),CB=e=>Hs(e,ufe),mfe=(e,t)=>new i1(e.map(n=>Mr(n)?new Iu(n.ast,!1):n.ast),t.map(n=>Mr(n)?new sp(n.ast):n.ast),!0);function cy(e,t,n=mfe(e,t)){return class extends St(n){static annotations(s){return cy(this.elements,this.rest,vi(this.ast,s))}static elements=[...e];static rest=[...t]}}function WS(...e){return Array.isArray(e[0])?cy(e[0],e.slice(1)):cy(e,[])}function PB(e,t){return class extends cy([],[e],t){static annotations(r){return PB(this.value,vi(this.ast,r))}static value=e}}const Qe=e=>PB(e),JS=e=>e?'"?:"':'":"';class u1 extends Iu{isReadonly;defaultValue;_tag="PropertySignatureDeclaration";constructor(t,n,r,s,i){super(t,n,s),this.isReadonly=r,this.defaultValue=i}toString(){const t=JS(this.isOptional),n=String(this.type);return`PropertySignature<${t}, ${n}, never, ${t}, ${n}>`}}class NB extends Iu{isReadonly;defaultValue;constructor(t,n,r,s,i){super(t,n,s),this.isReadonly=r,this.defaultValue=i}}const pfe=e=>e===void 0?"never":kn(e)?JSON.stringify(e):String(e);class RB{from;to;decode;encode;_tag="PropertySignatureTransformation";constructor(t,n,r,s){this.from=t,this.to=n,this.decode=r,this.encode=s}toString(){return`PropertySignature<${JS(this.to.isOptional)}, ${this.to.type}, ${pfe(this.from.fromKey)}, ${JS(this.from.isOptional)}, ${this.from.type}>`}}const OB=(e,t)=>{switch(e._tag){case"PropertySignatureDeclaration":return new u1(e.type,e.isOptional,e.isReadonly,{...e.annotations,...t},e.defaultValue);case"PropertySignatureTransformation":return new RB(e.from,new NB(e.to.type,e.to.isOptional,e.to.isReadonly,{...e.to.annotations,...t},e.to.defaultValue),e.decode,e.encode)}},LB=Symbol.for("effect/PropertySignature"),UI=e=>Ne(e,LB);class l1{ast;[hd];[LB]=null;_TypeToken;_Key;_EncodedToken;_HasDefault;constructor(t){this.ast=t}pipe(){return Se(this,arguments)}annotations(t){return new l1(OB(this.ast,Au(t)))}toString(){return String(this.ast)}}const FN=e=>new l1(e);class d1 extends l1{from;constructor(t,n){super(t),this.from=n}annotations(t){return new d1(OB(this.ast,Au(t)),this.from)}}const mh=e=>new d1(new u1(e.ast,!1,!0,{},void 0),e),DB=P(2,(e,t)=>{const n=e.ast;switch(n._tag){case"PropertySignatureDeclaration":return FN(new u1(n.type,n.isOptional,n.isReadonly,n.annotations,t));case"PropertySignatureTransformation":return FN(new RB(n.from,new NB(n.to.type,n.to.isOptional,n.to.isReadonly,n.to.annotations,t),n.decode,n.encode))}}),Z=e=>{const t=e.ast===um||e.ast===rp?um:CB(e).ast;return new d1(new u1(t,!0,!0,{},void 0),e)},gfe=oB([AI]),bfe=(e,t)=>{const n=Reflect.ownKeys(e),r=[];if(n.length>0){const i=[],a=[],o=[];for(let c=0;c<n.length;c++){const u=n[c],l=e[u];if(UI(l)){const d=l.ast;switch(d._tag){case"PropertySignatureDeclaration":{const f=d.type,h=d.isOptional,m=d.annotations;i.push(new tn(u,f,h,!0,gfe(d))),a.push(new tn(u,_n(f),h,!0,m)),r.push(new tn(u,f,h,!0,m));break}case"PropertySignatureTransformation":{const f=d.from.fromKey??u;i.push(new tn(f,d.from.type,d.from.isOptional,!0,d.from.annotations)),a.push(new tn(u,d.to.type,d.to.isOptional,!0,d.to.annotations)),o.push(new Ade(f,u,d.decode,d.encode));break}}}else i.push(new tn(u,l.ast,!1,!0)),a.push(new tn(u,_n(l.ast),!1,!0)),r.push(new tn(u,l.ast,!1,!0))}if(Qt(o)){const c=[],u=[];for(const l of t){const{indexSignatures:d,propertySignatures:f}=CN(l.key.ast,l.value.ast);f.forEach(h=>{i.push(h),a.push(new tn(h.name,_n(h.type),h.isOptional,h.isReadonly,h.annotations))}),d.forEach(h=>{c.push(h),u.push(new ip(h.parameter,_n(h.type),h.isReadonly))})}return new Vi(new di(i,c,{[zl]:"Struct (Encoded side)"}),new di(a,u,{[zl]:"Struct (Type side)"}),new ry(o))}}const s=[];for(const i of t){const{indexSignatures:a,propertySignatures:o}=CN(i.key.ast,i.value.ast);o.forEach(c=>r.push(c)),a.forEach(c=>s.push(c))}return new di(r,s)},$B=(e,t)=>{const n=Reflect.ownKeys(e);for(const r of n){const s=e[r];if(t[r]===void 0&&UI(s)){const i=s.ast,a=i._tag==="PropertySignatureDeclaration"?i.defaultValue:i.to.defaultValue;a!==void 0&&(t[r]=a())}}return t};function VI(e,t,n=bfe(e,t)){return class extends St(n){static annotations(s){return VI(this.fields,this.records,vi(this.ast,s))}static fields={...e};static records=[...t];static make=(s,i)=>{const a=$B(e,{...s});return g1(i)?a:c1(this)(a)};static pick(...s){return ce(efe(e,...s))}static omit(...s){return ce(vB(e,...s))}}}function ce(e,...t){return VI(e,t)}const yfe=e=>Le(e).pipe(mh,DB(()=>e)),_fe=(e,t)=>ce({_tag:yfe(e),...t});function MB(e,t,n){return class extends VI({},[{key:e,value:t}],n){static annotations(s){return MB(e,t,vi(this.ast,s))}static key=e;static value=t}}const f1=e=>MB(e.key,e.value),HI=(...e)=>t=>St(_a(t.ast,e));function jB(e,t){return class extends St(t){static annotations(r){return jB(this.from,vi(this.ast,r))}static make=(r,s)=>g1(s)?r:c1(this)(r);static from=e}}const qs=(e,t)=>n=>{const r=hn(VF(n.ast),{onNone:()=>[e],onSome:i=>[...i,e]}),s=Ud(n.ast,Au({[RF]:r,...t}));return jB(n,s)},FB=P(e=>Mr(e[0]),(e,t)=>St(Hf(e.ast,t))),_f=(e,t,n)=>{if(zS(e)&&zS(t)){const r=[...e.propertySignatures];for(const s of t.propertySignatures){const i=s.name,a=r.findIndex(o=>o.name===i);if(a===-1)r.push(s);else{const{isOptional:o,type:c}=r[a];r[a]=new tn(i,uy(c,s.type,n.concat(i)),o,!0)}}return new di(r,e.indexSignatures.concat(t.indexSignatures))}throw new Error(CF(e,t,n))},kfe=Ode([Bd]),kf=(e,t)=>t.map(n=>new $I(n,e.filter,kfe(e))),uy=(e,t,n)=>Gn.make(ka([e],[t],n)),dc=e=>a1(e)?e.types:[e],ka=(e,t,n)=>pb(e,r=>pb(t,s=>{switch(s._tag){case"Literal":{if(kn(s.literal)&&BS(r)||pi(s.literal)&&TN(r)||No(s.literal)&&IN(r))return[s];break}case"StringKeyword":{if(s===ey){if(BS(r)||lh(r)&&kn(r.literal))return[r];if(Yc(r))return kf(r,ka(dc(r.from),[s],n))}else if(r===ey)return[s];break}case"NumberKeyword":{if(s===ty){if(TN(r)||lh(r)&&pi(r.literal))return[r];if(Yc(r))return kf(r,ka(dc(r.from),[s],n))}else if(r===ty)return[s];break}case"BooleanKeyword":{if(s===ny){if(IN(r)||lh(r)&&No(r.literal))return[r];if(Yc(r))return kf(r,ka(dc(r.from),[s],n))}else if(r===ny)return[s];break}case"Union":return ka(dc(r),s.types,n);case"Suspend":return[new lm(()=>uy(r,s.f(),n))];case"Refinement":return kf(s,ka(dc(r),dc(s.from),n));case"TypeLiteral":{switch(r._tag){case"Union":return ka(r.types,[s],n);case"Suspend":return[new lm(()=>uy(r.f(),s,n))];case"Refinement":return kf(r,ka(dc(r.from),[s],n));case"TypeLiteral":return[_f(r,s,n)];case"Transformation":{const i=r.transformation,a=_f(r.from,s,n),o=_f(r.to,_n(s),n);switch(i._tag){case"TypeLiteralTransformation":return[new Vi(a,o,new ry(i.propertySignatureTransformations))];case"ComposeTransformation":return[new Vi(a,o,MI)];case"FinalTransformation":return[new Vi(a,o,new rB((c,u,l,d)=>ar(i.decode(c,u,l,d),f=>({...c,...f})),(c,u,l,d)=>ar(i.encode(c,u,l,d),f=>({...c,...f}))))]}}}break}case"Transformation":{if(nB(r)){if(VS(s.transformation)&&VS(r.transformation))return[new Vi(_f(r.from,s.from,n),_f(r.to,s.to,n),new ry(s.transformation.propertySignatureTransformations.concat(r.transformation.propertySignatureTransformations)))]}else return ka([s],[r],n);break}}throw new Error(CF(r,s,n))})),h1=P(2,(e,t)=>St(uy(e.ast,t.ast,[]))),Dc=P(e=>Mr(e[1]),(e,t)=>qI(e,t,Dde(e.ast,t.ast))),BB=Symbol.for("effect/SchemaId/Refine");function zB(e,t,n){return class extends St(n){static annotations(s){return zB(this.from,this.filter,vi(this.ast,s))}static[BB]=e;static from=e;static filter=t;static make=(s,i)=>g1(i)?s:c1(this)(s)}}const BN=(e,t,n)=>{if(No(e))return e?fe():ye(new vn(t,n));if(kn(e))return ye(new vn(t,n,e));if(e!==void 0){if("_tag"in e)return ye(e);const r=new vn(t,n,e.message);return ye(Qt(e.path)?new rr(e.path,n,r):r)}return fe()},Efe=(e,t,n)=>{if(wle(e))return BN(e,t,n);if(Qt(e)){const r=EM(e,s=>BN(s,t,n));if(Qt(r))return ye(r.length===1?r[0]:new an(t,n,r))}return fe()};function Zr(e,t){return n=>{function r(i,a,o){return Efe(e(i,a,o),o,i)}const s=new $I(n.ast,r,Au(t));return zB(n,r,s)}}function qI(e,t,n){return class extends St(n){static annotations(s){return qI(this.from,this.to,vi(this.ast,s))}static from=e;static to=t}}const Bo=P(e=>Mr(e[0])&&Mr(e[1]),(e,t,n)=>qI(e,t,new Vi(e.ast,t.ast,new rB(n.decode,n.encode)))),Ha=P(e=>Mr(e[0])&&Mr(e[1]),(e,t,n)=>Bo(e,t,{strict:!0,decode:(r,s,i,a)=>Jr(n.decode(r,a)),encode:(r,s,i,a)=>Jr(n.encode(r,a))})),wfe=Symbol.for("effect/SchemaId/Trimmed"),Sfe=e=>t=>t.pipe(Zr(n=>n===n.trim(),{schemaId:wfe,title:"trimmed",description:"a string with no leading or trailing whitespace",jsonSchema:{pattern:"^\\S[\\s\\S]*\\S$|^\\S$|^$"},...e})),vfe=jle,xfe=(e,t)=>n=>n.pipe(Zr(r=>r.length<=e,{schemaId:vfe,title:`maxLength(${e})`,description:`a string at most ${e} character(s) long`,jsonSchema:{maxLength:e},...t})),Tfe=Mle,Ife=(e,t)=>n=>n.pipe(Zr(r=>r.length>=e,{schemaId:Tfe,title:`minLength(${e})`,description:`a string at least ${e} character(s) long`,jsonSchema:{minLength:e},...t})),zN=Fle,Afe=(e,t)=>n=>{const r=_s(e)?Math.max(0,Math.floor(e.min)):Math.max(0,Math.floor(e)),s=_s(e)?Math.max(r,Math.floor(e.max)):r;return r!==s?n.pipe(Zr(i=>i.length>=r&&i.length<=s,{schemaId:zN,title:`length({ min: ${r}, max: ${s})`,description:`a string at least ${r} character(s) and at most ${s} character(s) long`,jsonSchema:{minLength:r,maxLength:s},...t})):n.pipe(Zr(i=>i.length===r,{schemaId:zN,title:`length(${r})`,description:r===1?"a single character":`a string ${r} character(s) long`,jsonSchema:{minLength:r,maxLength:r},...t}))},UN=Symbol.for("effect/SchemaId/Pattern"),UB=(e,t)=>n=>{const r=e.source;return n.pipe(Zr(s=>(e.lastIndex=0,e.test(s)),{schemaId:UN,[UN]:{regex:e},description:`a string matching the pattern ${r}`,jsonSchema:{pattern:r},...t}))},Cfe=e=>Ife(1,{title:"nonEmptyString",description:"a non empty string",...e});class Pfe extends $.pipe(Sfe({identifier:"Trimmed"})){}class Nfe extends Ha($.annotations({description:"a string that will be trimmed"}),Pfe,{strict:!0,decode:t=>t.trim(),encode:ze}).annotations({identifier:"Trim"}){}const VN=e=>e instanceof Error?e.message:String(e),Rfe=e=>Bo($.annotations({description:"a string to be decoded into JSON"}),op,{strict:!0,decode:(t,n,r)=>oy({try:()=>JSON.parse(t,e?.reviver),catch:s=>new vn(r,t,VN(s))}),encode:(t,n,r)=>oy({try:()=>JSON.stringify(t,e?.replacer,e?.space),catch:s=>new vn(r,t,VN(s))})}).annotations({title:"parseJson",schemaId:WF}),VB=(e,t)=>Mr(e)?Dc(VB(t),e):Rfe(e),Ofe=Symbol.for("effect/SchemaId/UUID"),HN=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;class Lfe extends $.pipe(UB(HN,{schemaId:Ofe,identifier:"UUID",jsonSchema:{format:"uuid",pattern:HN.source},description:"a Universally Unique Identifier",arbitrary:()=>t=>t.uuid()})){}const Dfe=Ole,$fe=(e,t)=>n=>n.pipe(Zr(r=>r>=e,{schemaId:Dfe,title:`greaterThanOrEqualTo(${e})`,description:e===0?"a non-negative number":`a number greater than or equal to ${e}`,jsonSchema:{minimum:e},...t})),Mfe=NF,jfe=e=>t=>t.pipe(Zr(n=>Number.isSafeInteger(n),{schemaId:Mfe,title:"int",description:"an integer",jsonSchema:{type:"integer"},...e})),Ffe=Lle,Bfe=(e,t)=>n=>n.pipe(Zr(r=>r<=e,{schemaId:Ffe,title:`lessThanOrEqualTo(${e})`,description:e===0?"a non-positive number":`a number less than or equal to ${e}`,jsonSchema:{maximum:e},...t}));class zfe extends ct.pipe(jfe({identifier:"Int"})){}const Ufe=(e,t)=>{const n=Symbol.keyFor(e);return n===void 0?Lc(new vn(t,e,`Unable to encode a unique symbol ${String(e)} into a string`)):Jr(n)},Vfe=e=>Jr(Symbol.for(e)),qN=Dle,m1=(e,t)=>n=>n.pipe(Zr(r=>r>=e,{schemaId:qN,[qN]:{min:e},title:`greaterThanOrEqualToBigInt(${e})`,description:e===0n?"a non-negative bigint":`a bigint greater than or equal to ${e}n`,...t})),GN=$le,p1=(e,t)=>n=>n.pipe(Zr(r=>r<=e,{schemaId:GN,[GN]:{max:e},title:`lessThanOrEqualToBigInt(${e})`,description:e===0n?"a non-positive bigint":`a bigint less than or equal to ${e}n`,...t}));class HB extends Bo($.annotations({description:"a string to be decoded into a bigint"}),zI,{strict:!0,decode:(t,n,r)=>Fde(yle(t),()=>new vn(r,t,`Unable to decode ${JSON.stringify(t)} into a bigint`)),encode:t=>Jr(String(t))}).annotations({identifier:"BigInt"}){}class Hfe extends ap(hK,{typeConstructor:{_tag:"Uint8Array"},identifier:"Uint8ArrayFromSelf",pretty:()=>t=>`new Uint8Array(${JSON.stringify(Array.from(t))})`,arbitrary:()=>t=>t.uint8Array(),equivalence:()=>d_(je)}){}const qfe=Ble,iE=(e,t)=>n=>{const r=Math.floor(e);if(r<0)throw new Error(Sle(`Expected an integer greater than or equal to 0, actual ${e}`));return n.pipe(Zr(s=>s.length===r,{schemaId:qfe,title:`itemsCount(${r})`,description:`an array of exactly ${r} item(s)`,jsonSchema:{minItems:r,maxItems:r},[UF]:!0,...t}))},KN=Symbol.for("effect/SchemaId/ValidDate"),Gfe=e=>t=>t.pipe(Zr(n=>!Number.isNaN(n.getTime()),{schemaId:KN,[KN]:{noInvalidDate:!0},title:"validDate",description:"a valid Date",...e})),WN=Rle;class Kfe extends ap(O$,{typeConstructor:{_tag:"Date"},identifier:"DateFromSelf",schemaId:WN,[WN]:{noInvalidDate:!1},description:"a potentially invalid Date instance",pretty:()=>t=>`new Date(${JSON.stringify(t)})`,arbitrary:()=>t=>t.date({noInvalidDate:!1}),equivalence:()=>mW}){}class Wfe extends Ha($.annotations({description:"a string to be decoded into a Date"}),Kfe,{strict:!0,decode:t=>new Date(t),encode:t=>F$(t)}).annotations({identifier:"DateFromString"}){}class Jfe extends Wfe.pipe(Gfe({identifier:"Date"})){}const Yfe=e=>Mr(e)||UI(e),qB=e=>Reflect.ownKeys(e).every(t=>Yfe(e[t])),GI=e=>"fields"in e?e.fields:GI(e[BB]),GB=e=>qB(e)?ce(e):Mr(e)?e:ce(GI(e)),KB=e=>qB(e)?e:GI(e),Qfe=e=>DB(mh(Le(e)),()=>e),Vd=e=>(t,n,r)=>{class s extends sI{}s.prototype.name=t;const i=KB(n),a=GB(n),o={_tag:Qfe(t)},c=C0(o,i),u="message"in c;class l extends P0({kind:"TaggedError",identifier:t,schema:h1(a,ce(o)),fields:c,Base:s,annotations:r,disableToString:!0}){static _tag=t}return u||Object.defineProperty(l.prototype,"message",{get(){return`{ ${Reflect.ownKeys(i).map(d=>`${Pm(d)}: ${za(this[d])}`).join(", ")} }`},enumerable:!1,configurable:!0}),l},C0=(e,t)=>{const n={...e};for(const r of Reflect.ownKeys(t)){if(r in e)throw new Error(PF(r));n[r]=t[r]}return n};function g1(e){return No(e)?e:e?.disableValidation??!1}const JN=$e("effect/Schema/astCache",()=>new WeakMap),Xfe=e=>e===void 0?[]:Array.isArray(e)?e:[e],P0=({Base:e,annotations:t,disableToString:n,fields:r,identifier:s,kind:i,schema:a})=>{const o=Symbol.for(`effect/Schema/${i}/${s}`),[c,u,l]=Xfe(t),d=MN(a),f=d.annotations({identifier:s,...c}),h=d.annotations({[zl]:`${s} (Type side)`,...c}),m=a.annotations({[zl]:`${s} (Constructor)`,...c}),y=a.annotations({[zl]:`${s} (Encoded side)`,...l}),g=a.annotations({...l,...c,...u}),p=k=>Ne(k,o)&&zde(h)(k),_=class extends e{constructor(k={},v=!1){k={...k},delete k._tag,k=$B(r,k),g1(v)||(k=c1(m)(k)),super(k,!0)}static[hd]=KS;static get ast(){let k=JN.get(this);if(k)return k;const v=ap([a],{decode:()=>(w,S,T)=>w instanceof this||p(w)?Jr(w):Lc(new vn(T,w)),encode:()=>(w,S)=>w instanceof this?Jr(w):ar(mB(h)(w,S),T=>new this(T,!0))},{identifier:s,pretty:w=>S=>`${s}(${w(S)})`,arbitrary:w=>S=>w(S).map(T=>new this(T)),equivalence:ze,[Xb]:f.ast,...c});return k=Ha(y,v,{strict:!0,decode:w=>new this(w,!0),encode:ze}).annotations({[Xb]:g.ast,...u}).ast,JN.set(this,k),k}static pipe(){return Se(this,arguments)}static annotations(k){return St(this.ast).annotations(k)}static toString(){return`(${String(y)} <-> ${s})`}static make(...k){return new this(...k)}static fields={...r};static identifier=s;static extend(k){return(v,w)=>{const S=KB(v),T=GB(v),I=C0(r,S);return P0({kind:i,identifier:k,schema:h1(a,T),fields:I,Base:this,annotations:w})}}static transformOrFail(k){return(v,w,S)=>{const T=C0(r,v);return P0({kind:i,identifier:k,schema:Bo(a,MN(ce(T)),w),fields:T,Base:this,annotations:S})}}static transformOrFailFrom(k){return(v,w,S)=>{const T=C0(r,v);return P0({kind:i,identifier:k,schema:Bo(rfe(a),ce(T),w),fields:T,Base:this,annotations:S})}}get[o](){return o}};return n!==!0&&Object.defineProperty(_.prototype,"toString",{value(){return`${s}({ ${Reflect.ownKeys(r).map(k=>`${Pm(k)}: ${za(this[k])}`).join(", ")} })`},configurable:!0,writable:!0}),_},YN=_fe("symbol",{key:$}).annotations({description:"an object to be decoded into a globally shared symbol"}),Zfe=Bo(YN,dfe,{strict:!0,decode:e=>Vfe(e.key),encode:(e,t,n)=>ar(Ufe(e,n),r=>YN.make({key:r}))});class ehe extends Hs($,ct,Zfe).annotations({identifier:"PropertyKey"}){}class the extends ce({_tag:mh(Le("Pointer","Unexpected","Missing","Composite","Refinement","Transformation","Type","Forbidden")).annotations({description:"The tag identifying the type of parse issue"}),path:mh(Qe(ehe)).annotations({description:"The path to the property where the issue occurred"}),message:mh($).annotations({description:"A descriptive message explaining the issue"})}).annotations({identifier:"ArrayFormatterIssue",description:"Represents an issue returned by the ArrayFormatter formatter"}){}const WB=(e,t)=>{class n extends sI{_tag=t}return n.prototype[e]=e,n.prototype.name=t,n},nhe=li,rhe=jd,she=iF,ihe=yI,QN=_I,ahe=kue,JB=Symbol.for("effect/Subscribable"),YB=e=>Ne(e,JB),ohe="effect/SubscriptionRef",che=Symbol.for(ohe),uhe=P(2,(e,t)=>F(Hte(e.ref,t),hI(_ce(e.pubsub,t)),e.semaphore.withPermits(1))),YS=che,XN=uhe,lhe="~effect-atom/atom/Result",b1={[lhe]:{E:ze,A:ze},pipe(){return Se(this,arguments)},[Ke](e){if(this._tag!==e._tag||this.waiting!==e.waiting)return!1;switch(this._tag){case"Initial":return!0;case"Success":return je(this.value,e.value);case"Failure":return je(this.cause,e.cause)}},[Ge](){const e=Xt(`${this._tag}:${this.waiting}`);return this._tag==="Initial"?Ht(this,e):Ht(this,ot(e)(this._tag==="Success"?Ce(this.value):Ce(this.cause)))}},QB=(e,t)=>e._tag==="Success"?zo(e.value):cp(e.cause,{previous:t}),KI=e=>e._tag==="None"?xo(!0):y1(e.value),dhe=e=>e._tag!=="Initial",xo=(e=!1)=>{const t=Object.create(b1);return t._tag="Initial",t.waiting=e,t},pu=e=>e._tag==="Success",zo=(e,t)=>{const n=Object.create(b1);return n._tag="Success",n.value=e,n.waiting=t?.waiting??!1,n.timestamp=t?.timestamp??Date.now(),n},XB=e=>e._tag==="Failure",fhe=(e,t)=>{const n=Object.create(b1);return n._tag="Failure",n.cause=e,n.previousSuccess=t?.previousSuccess??fe(),n.waiting=t?.waiting??!1,n},cp=(e,t)=>fhe(e,{previousSuccess:Jo(t.previous,n=>pu(n)?ye(n):XB(n)?n.previousSuccess:fe()),waiting:t.waiting}),hhe=(e,t)=>cp(v4(e),t),y1=(e,t)=>{if(e.waiting)return t?.touch?mhe(e):e;const n=Object.assign(Object.create(b1),e);return n.waiting=!0,n},mhe=e=>pu(e)?zo(e.value,{waiting:e.waiting}):e,Kf=(e,t)=>e._tag==="Failure"?cp(e.cause,{previous:t,waiting:e.waiting}):e,ZB=e=>e._tag==="Success"?ye(e.value):e._tag==="Failure"?Wr(e.previousSuccess,t=>t.value):fe(),QS=e=>fM(ZB(e),()=>new $d("Result.getOrThrow: no value found")),ZN=e=>{switch(e._tag){case"Success":return ds(e.value);case"Failure":return _r(e.cause);default:return Db(new $d)}},phe={immediate:!0},ghe=e=>{e()},aE="~effect-atom/atom/Registry",bhe=e=>new yhe(e?.initialValues,e?.scheduleTask,e?.timeoutResolution,e?.defaultIdleTTL),XS="~effect-atom/atom/Atom/Serializable",Ef=e=>XS in e?e[XS].key:e;class yhe{scheduleTask;defaultIdleTTL;[aE];timeoutResolution;constructor(t,n=i=>queueMicrotask(i),r,s){if(this.scheduleTask=n,this.defaultIdleTTL=s,this[aE]=aE,r===void 0&&s!==void 0?this.timeoutResolution=Math.round(s/2):this.timeoutResolution=r??1e3,t!==void 0)for(const[i,a]of t)this.ensureNode(i).setValue(a)}nodes=new Map;preloadedSerializable=new Map;timeoutBuckets=new Map;nodeTimeoutBucket=new Map;disposed=!1;getNodes(){return this.nodes}get(t){return this.ensureNode(t).value()}set(t,n){t.write(this.ensureNode(t).writeContext,n)}setSerializable(t,n){this.preloadedSerializable.set(t,n)}modify(t,n){const r=this.ensureNode(t),s=n(r.value());return t.write(r.writeContext,s[1]),s[0]}update(t,n){const r=this.ensureNode(t);t.write(r.writeContext,n(r.value()))}refresh=t=>{t.refresh!==void 0?t.refresh(this.refresh):this.invalidateAtom(t)};subscribe(t,n,r){const s=this.ensureNode(t);r?.immediate&&n(s.value());const i=s.subscribe(function(){n(s._value)});return()=>{i(),s.canBeRemoved&&this.scheduleNodeRemoval(s)}}mount(t){return this.subscribe(t,Kl,phe)}atomHasTtl(t){return!t.keepAlive&&t.idleTTL!==0&&(t.idleTTL!==void 0||this.defaultIdleTTL!==void 0)}ensureNode(t){const n=Ef(t);let r=this.nodes.get(n);if(r===void 0?(r=this.createNode(t),this.nodes.set(n,r)):this.atomHasTtl(t)&&this.removeNodeTimeout(r),typeof n=="string"&&this.preloadedSerializable.has(n)){const s=this.preloadedSerializable.get(n);this.preloadedSerializable.delete(n);const i=t[XS].decode(s);r.setValue(i)}return r}createNode(t){if(this.disposed)throw new Error(`Cannot access Atom ${t}: registry is disposed`);return t.keepAlive||this.scheduleAtomRemoval(t),new _he(this,t)}invalidateAtom=t=>{this.ensureNode(t).invalidate()};scheduleAtomRemoval(t){this.scheduleTask(()=>{const n=this.nodes.get(Ef(t));n!==void 0&&n.canBeRemoved&&this.removeNode(n)})}scheduleNodeRemoval(t){this.scheduleTask(()=>{t.canBeRemoved&&this.removeNode(t)})}removeNode(t){this.atomHasTtl(t.atom)?this.setNodeTimeout(t):(this.nodes.delete(Ef(t.atom)),t.remove())}setNodeTimeout(t){if(this.nodeTimeoutBucket.has(t))return;let n=t.atom.idleTTL??this.defaultIdleTTL;if(this.#e!==null&&(n-=this.#e,n<=0)){this.nodes.delete(Ef(t.atom)),t.remove();return}const r=Math.ceil(n/this.timeoutResolution)*this.timeoutResolution,s=Date.now()+r,i=s-s%this.timeoutResolution+this.timeoutResolution;let a=this.timeoutBuckets.get(i);a===void 0&&(a=[new Set,setTimeout(()=>this.sweepBucket(i),i-Date.now())],this.timeoutBuckets.set(i,a)),a[0].add(t),this.nodeTimeoutBucket.set(t,i)}removeNodeTimeout(t){const n=this.nodeTimeoutBucket.get(t);if(n===void 0)return;this.nodeTimeoutBucket.delete(t),this.scheduleNodeRemoval(t);const[r,s]=this.timeoutBuckets.get(n);r.delete(t),r.size===0&&(clearTimeout(s),this.timeoutBuckets.delete(n))}#e=null;sweepBucket(t){const n=this.timeoutBuckets.get(t)[0];this.timeoutBuckets.delete(t),n.forEach(r=>{this.nodeTimeoutBucket.delete(r),r.canBeRemoved&&(this.nodes.delete(Ef(r.atom)),this.#e=r.atom.idleTTL??this.defaultIdleTTL,r.remove(),this.#e=null)})}reset(){this.timeoutBuckets.forEach(([,t])=>clearTimeout(t)),this.timeoutBuckets.clear(),this.nodeTimeoutBucket.clear(),this.nodes.forEach(t=>t.remove()),this.nodes.clear()}dispose(){this.disposed=!0,this.reset()}}var wl;(function(e){e[e.alive=1]="alive",e[e.initialized=2]="initialized",e[e.waitingForValue=4]="waitingForValue"})(wl||(wl={}));var ei;(function(e){e[e.uninitialized=5]="uninitialized",e[e.stale=7]="stale",e[e.valid=3]="valid",e[e.removed=0]="removed"})(ei||(ei={}));class _he{registry;atom;constructor(t,n){this.registry=t,this.atom=n,this.writeContext=new She(t,this)}state=ei.uninitialized;lifetime;writeContext;parents=[];previousParents;children=[];listeners=new Set;skipInvalidation=!1;get canBeRemoved(){return!this.atom.keepAlive&&this.listeners.size===0&&this.children.length===0&&this.state!==0}_value=void 0;value(){if((this.state&wl.waitingForValue)!==0){this.lifetime=whe(this);const t=this.atom.read(this.lifetime);if((this.state&wl.waitingForValue)!==0&&this.setValue(t),this.previousParents){const n=this.previousParents;this.previousParents=void 0;for(let r=0;r<n.length;r++)n[r].removeChild(this),n[r].canBeRemoved&&this.registry.scheduleNodeRemoval(n[r])}}return this._value}valueOption(){return(this.state&wl.initialized)===0?fe():ye(this._value)}setValue(t){if((this.state&wl.initialized)===0){this.state=ei.valid,this._value=t,yn.phase===Hi.collect?yn.notify.add(this):this.notify();return}this.state=ei.valid,!je(this._value,t)&&(this._value=t,this.skipInvalidation?this.skipInvalidation=!1:this.invalidateChildren(),this.listeners.size>0&&(yn.phase===Hi.collect?yn.notify.add(this):this.notify()))}addParent(t){if(this.parents.push(t),this.previousParents!==void 0){const n=this.previousParents.indexOf(t);n!==-1&&(this.previousParents[n]=this.previousParents[this.previousParents.length-1],this.previousParents.pop()===void 0&&(this.previousParents=void 0))}t.children.indexOf(this)===-1&&(t.children.push(this),t.skipInvalidation&&(t.skipInvalidation=!1))}removeChild(t){const n=this.children.indexOf(t);n!==-1&&(this.children[n]=this.children[this.children.length-1],this.children.pop())}invalidate(){this.state===ei.valid&&(this.state=ei.stale,this.disposeLifetime()),yn.phase===Hi.collect?yn.stale.push(this):this.atom.lazy&&this.listeners.size===0&&!khe(this.children)?(this.invalidateChildren(),this.skipInvalidation=!0):this.value()}invalidateChildren(){if(this.children.length===0)return;const t=this.children;this.children=[];for(let n=0;n<t.length;n++)t[n].invalidate()}notify(){this.listeners.forEach(ghe),yn.phase===Hi.commit&&yn.notify.delete(this)}disposeLifetime(){this.lifetime!==void 0&&(this.lifetime.dispose(),this.lifetime=void 0),this.parents.length!==0&&(this.previousParents=this.parents,this.parents=[])}remove(){if(this.state=ei.removed,this.listeners.clear(),this.lifetime===void 0||(this.disposeLifetime(),this.previousParents===void 0))return;const t=this.previousParents;this.previousParents=void 0;for(let n=0;n<t.length;n++)t[n].removeChild(this),t[n].canBeRemoved&&this.registry.removeNode(t[n])}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}}function khe(e){if(e.length===0)return!1;let t=e,n,r=0;for(;t!==void 0;){for(let s=0,i=t.length;s<i;s++){const a=t[s];if(!a.atom.lazy||a.listeners.size>0)return!0;a.children.length>0&&(n===void 0?n=[a.children]:n.push(a.children))}t=n?.[r++]}return!1}const sr=e=>new Error(`Cannot use context of disposed Atom: ${e}`),Ehe={get registry(){return this.node.registry},addFinalizer(e){if(this.disposed)throw sr(this.node.atom);this.finalizers??=[],this.finalizers.push(e)},get(e){if(this.disposed)throw sr(this.node.atom);const t=this.node.registry.ensureNode(e);return this.node.addParent(t),t.value()},result(e,t){if(this.disposed)throw sr(this.node.atom);if(this.isFn)return this.resultOnce(e,t);const n=this.get(e);if(t?.suspendOnWaiting&&n.waiting)return Kc;switch(n._tag){case"Initial":return Kc;case"Failure":return _r(n.cause);case"Success":return Ot(n.value)}},resultOnce(e,t){if(this.disposed)throw sr(this.node.atom);return CS(n=>{const r=this.once(e);if(r._tag!=="Initial"&&!(t?.suspendOnWaiting&&r.waiting))return n(ZN(r));const s=this.node.registry.subscribe(e,i=>{i._tag==="Initial"||t?.suspendOnWaiting&&i.waiting||(s(),n(ZN(i)))},{immediate:!1});return Mt(s)})},setResult(e,t){if(this.disposed)throw sr(this.node.atom);return this.node.registry.set(e,t),this.resultOnce(e,{suspendOnWaiting:!0})},some(e){if(this.disposed)throw sr(this.node.atom);if(this.isFn)return this.someOnce(e);const t=this.get(e);return t._tag==="None"?Kc:Ot(t.value)},someOnce(e){if(this.disposed)throw sr(this.node.atom);return CS(t=>{const n=this.once(e);if(ft(n))return t(Ot(n.value));const r=this.node.registry.subscribe(e,s=>{xn(s)||(r(),t(Ot(s.value)))},{immediate:!1});return Mt(r)})},once(e){if(this.disposed)throw sr(this.node.atom);return this.node.registry.get(e)},self(){if(this.disposed)throw sr(this.node.atom);return this.node.valueOption()},refresh(e){if(this.disposed)throw sr(this.node.atom);this.node.registry.refresh(e)},refreshSelf(){if(this.disposed)throw sr(this.node.atom);this.node.invalidate()},mount(e){if(this.disposed)throw sr(this.node.atom);this.addFinalizer(this.node.registry.mount(e))},subscribe(e,t,n){if(this.disposed)throw sr(this.node.atom);this.addFinalizer(this.node.registry.subscribe(e,t,n))},setSelf(e){if(this.disposed)throw sr(this.node.atom);this.node.setValue(e)},set(e,t){if(this.disposed)throw sr(this.node.atom);this.node.registry.set(e,t)},stream(e,t){if(this.disposed)throw sr(this.node.atom);return F(Gb(y5(t?.bufferSize??16),Jb),c5(n=>Gb(Mt(()=>this.node.registry.subscribe(e,r=>{Sce(n,r)},{immediate:t?.withoutInitialValue!==!0})),r=>Mt(r))),It(n=>cle(n)),EF)},streamResult(e,t){return F(this.stream(e,t),ale(dhe),ole(n=>n._tag==="Success"?dle(n.value):ile(n.cause)))},dispose(){if(this.disposed=!0,this.finalizers===void 0)return;const e=this.finalizers;this.finalizers=void 0;for(let t=e.length-1;t>=0;t--)e[t]()}},whe=e=>{function t(n){if(t.disposed)throw sr(n);if(t.isFn)return e.registry.get(n);const r=e.registry.ensureNode(n),s=r.value();return e.addParent(r),s}return Object.setPrototypeOf(t,Ehe),t.isFn=!1,t.disposed=!1,t.finalizers=void 0,t.node=e,t};class She{registry;node;constructor(t,n){this.registry=t,this.node=n}get(t){return this.registry.get(t)}set(t,n){return this.registry.set(t,n)}setSelf(t){return this.node.setValue(t)}refreshSelf(){return this.node.invalidate()}}var Hi;(function(e){e[e.disabled=0]="disabled",e[e.collect=1]="collect",e[e.commit=2]="commit"})(Hi||(Hi={}));const yn=$e("@effect-atom/atom/Registry/batchState",()=>({phase:Hi.disabled,depth:0,stale:[],notify:new Set}));function vhe(e){yn.phase=Hi.collect,yn.depth++;try{if(e(),yn.depth===1){for(let t=0;t<yn.stale.length;t++)e8(yn.stale[t]);yn.phase=Hi.commit;for(const t of yn.notify)t.notify();yn.notify.clear()}}finally{yn.depth--,yn.depth===0&&(yn.phase=Hi.disabled,yn.stale=[])}}function e8(e){if(e.state!==ei.valid){for(let t=0;t<e.parents.length;t++){const n=e.parents[t];n.state!==ei.valid&&e8(n)}e.state!==ei.valid&&e.value()}}const xhe=e=>{const t=e;switch(t._tag){case"Failure":case"Success":return t;case"Left":return Db(t.left);case"Right":return ds(t.right);case"Some":return ds(t.value);case"None":return Db(new $d)}},WI=e=>{const t=e1(e);return(n,r,s=!1)=>{const i=xhe(n);if(i){r(i);return}const a=new H_,o=t(n,{scheduler:a});a.flush();const c=o.unsafePoll();if(c){r(c);return}o.addObserver(r);function u(){o.removeObserver(r),s||o.unsafeInterruptAsFork(gs)}return u}},t8=bhe;class n8 extends Fr("@effect/atom/Registry/CurrentRegistry")(){}const ZS="~effect-atom/atom/Atom",ev="~effect-atom/atom/Atom/Writable",The=P(2,(e,t)=>{const n=bi(t),r=wY(n);return Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!r,idleTTL:r?kb(n):void 0})}),fm=The(0),JI={[ZS]:ZS,pipe(){return Se(this,arguments)},toJSON(){return{_id:"Atom",keepAlive:this.keepAlive,lazy:this.lazy,label:this.label}},toString(){return Dt(this)},[gt](){return this.toJSON()}},Ihe={...JI,atom(e,t){const n=r8(e,t);return qi(r=>{const s=r.self(),i=r(this);return i._tag!=="Success"?Kf(i,s):n(r,i.value)})},fn(e,t){return arguments.length===0?(n,r)=>eR(this,n,r):eR(this,e,t)},pull(e,t){const n=fm(ly(0)),r=qi(s=>{const i=s.self(),a=s(this);return a._tag!=="Success"?Kf(a,i):ph(s,Fhe(s,n,e,t),xo(!0),a.value)});return Bhe(n,r)},subscriptionRef(e){return Lhe(fm(qi(t=>{const n=t.self(),r=t(this);if(r._tag!=="Success")return Kf(r,n);const s=typeof e=="function"?e(t):e;return YS in s?s:ph(t,s,xo(!0),r.value)})),(t,n)=>{const r=QS(t(this));return rR(t,n,r)})},subscribable(e){return Dhe(qi(t=>{const n=t.self(),r=t(this);if(r._tag!=="Success")return Kf(r,n);const s=typeof e=="function"?e(t):e;return YB(s)?s:ph(t,s,xo(!0),r.value)}),(t,n)=>{const r=QS(t(this));return rR(t,n,r)})}},eR=(e,t,n)=>{const[r,s,i]=Mhe(n?.reactivityKeys?(a,o)=>{const c=t(a,o);return Qo(c)?ple(c,n.reactivityKeys):_F(c,gle(n.reactivityKeys))}:t,n);return up(a=>{a.get(i);const o=a.self(),c=a.get(e);return c._tag!=="Success"?Kf(c,o):r(a,c.value)},s)},Ahe={...JI,[ev]:ev},Che=e=>ev in e,qi=(e,t)=>{const n=Object.create(JI);return n.keepAlive=!1,n.lazy=!0,n.read=e,n.refresh=t,n},up=(e,t,n)=>{const r=Object.create(Ahe);return r.keepAlive=!1,r.lazy=!0,r.read=e,r.write=t,r.refresh=n,r};function Phe(e,t){e.setSelf(t)}const qa=(e,t)=>{const n=r8(e,t);return ZS in n?n:qi(n)},tR=e=>CW in e||kW in e,r8=(e,t)=>{if(typeof e=="function"&&!Qo(e)&&!(Yk in e)){const n=e;return function(r,s){const i=n(r);if(_s(i)){if(tR(i))return i;if(AS in i)return tv(r,i,t,s);if(Yk in i)return nR(r,i,t,s)}return i}}else if(_s(e)){if(tR(e))return ly(e);if(AS in e)return function(n,r){return tv(n,e,t,r)};if(Yk in e)return function(n,r){return nR(n,e,t,r)}}return ly(e)},ly=e=>up(function(t){return e},Phe),tv=(e,t,n,r)=>{const s=n?.initialValue!==void 0?zo(n.initialValue):xo();return ph(e,t,s,r,n?.uninterruptible)};function ph(e,t,n,r=t1,s=!1){const i=e.self(),a=zs(R4());e.addFinalizer(()=>{X_(Vb(a,VT))});const o=new Map(r.context.unsafeMap);o.set(Pie.key,a),o.set(n8.key,e.registry);const c=mI({context:cW(o),fiberRefs:r.fiberRefs,runtimeFlags:r.runtimeFlags});let u,l=!1;const d=WI(c)(t,function(f){u=QB(f,i),l&&e.setSelf(u)},s);return l=!0,d!==void 0&&e.addFinalizer(d),u!==void 0?u:i._tag==="Some"?KI(i):y1(n)}const Nhe=e=>{let t=Qk;function n(s){const i=Object.create(Ihe);i.keepAlive=!1,i.lazy=!0,i.refresh=void 0,i.factory=n;const a=Ga(qi(typeof s=="function"?o=>Uk(s(o),t):()=>Uk(s,t)));return i.layer=a,i.read=function(c){const u=c(a),l=Oe(Oe(Q_,d=>aN(u,e.memoMap,d)),d=>om(Qm(),d));return tv(c,l,{uninterruptible:!0})},i}n.memoMap=e.memoMap,n.addGlobalLayer=s=>{t=Uk(t,zoe(s,Qk))};const r=fm(qa(poe(s=>aN(Qk,e.memoMap,s)).pipe(It(ci(tp)))));return n.withReactivity=s=>i=>zhe(i,a=>{const o=QS(a(r));return a.addFinalizer(o.unsafeRegister(s,()=>{a.refresh(i)})),a.subscribe(i,c=>a.setSelf(c)),a.once(i)}),n},Rhe=$e("@effect-atom/atom/Atom/defaultMemoMap",()=>zs(Uoe)),Ohe=$e("@effect-atom/atom/Atom/defaultContext",()=>Nhe({memoMap:Rhe}));Ohe.withReactivity;const nR=(e,t,n,r)=>{const s=n?.initialValue!==void 0?zo(n.initialValue):xo();return YI(e,t,s,r)};function YI(e,t,n,r=t1){const s=e.self(),i=rhe({onInput(c){return ihe(()=>{const u=_J(c);return u._tag==="Some"&&e.setSelf(zo(u.value,{waiting:!0})),i})},onFailure(c){return QN(()=>{e.setSelf(cp(c,{previous:e.self()}))})},onDone(c){return QN(()=>{F(e.self(),Jo(ZB),hn({onNone:()=>e.setSelf(hhe(new $d,{previous:e.self()})),onSome:u=>e.setSelf(zo(u))}))})}}),a=mI({context:ls(r.context,n8,e.registry),fiberRefs:r.fiberRefs,runtimeFlags:r.runtimeFlags}),o=WI(a)(she(nhe(kF(t),i)),Kl,!1);return o!==void 0&&e.addFinalizer(o),s._tag==="Some"?KI(s):y1(n)}const rR=(e,t,n=t1)=>JB in t?(e.addFinalizer(t.changes.pipe(lle(r=>(e.setSelf(r),pt)),Poe(n))),Coe(n)(t.get)):t._tag!=="Success"?t:YI(e,t.value.changes,xo(!0),n),Lhe=(e,t)=>{function n(r,s){const i=r.get(e);YS in i?zs(XN(i,s)):pu(i)&&zs(XN(i.value,s))}return up(r=>{const s=r(e);return YS in s||pu(s)?t(r,s):s},n)},Dhe=(e,t)=>qi(n=>{const r=n(e);return YB(r)||pu(r)?t(n,r):r}),$he=Symbol.for("@effect-atom/atom/Atom/Reset"),oE=Symbol.for("@effect-atom/atom/Atom/Interrupt");function Mhe(e,t){const n=fm(ly([0,void 0])),r=t?.initialValue!==void 0?zo(t.initialValue):xo(),s=t?.concurrent?fm(qi(o=>{const c=new Set;return o.addFinalizer(()=>c.forEach(u=>u.unsafeInterruptAsFork(gs))),c})):void 0;function i(o,c){const u=s?o(s):void 0;o.isFn=!0;const[l,d]=o.get(n);if(l===0)return r;if(d===oE)return cp(x4(gs),{previous:o.self()});let f=e(d,o);if(AS in f){if(u){const h=f;f=Oe(Qm(),m=>{const y=e1(m,h);u.add(y);const g=Array.from(u);return y.addObserver(()=>u.delete(y)),jhe(g)})}return ph(o,f,r,c,!1)}return YI(o,f,r,c)}function a(o,c){Uhe(()=>{c===$he?o.set(n,[0,void 0]):c===oE?o.set(n,[o.get(n)[0]+1,oE]):o.set(n,[o.get(n)[0]+1,c]),o.refreshSelf()})}return[i,a,n]}const jhe=e=>CS(t=>{let n=0,r,s;function i(o,c=!1){o._tag==="Failure"?r=r?Kse(o.cause,r):o.cause:r||(s=o),n++,c||a()}function a(){for(;n<e.length;){const o=e[n],c=o.unsafePoll();if(!c)return o.addObserver(i);i(c,!0)}t(r?_r(r):s||_r(Gse))}return a(),Mt(()=>{n<e.length&&e[n].removeObserver(i)})}),Fhe=(e,t,n,r)=>Oe(ahe(kF(typeof n=="function"?n(e):n)),s=>{const i=Soe(1),a=OW(Yie()),o=a.currentContext;let c=dr();const u=Oe(koe(ln(()=>s),f5,o),Kr({onLeft:()=>{const h=Fs(c);return Nl(h)?Ot({done:!0,items:h}):na(new $d("Atom.pull: no items"))},onRight(h){let m;r?.disableAccumulation?m=h:(m=wn(c,h),c=m);const y=Fs(m);return Nl(y)?Ot({done:!1,items:y}):u}})),l=i.withPermits(1)(u),d=WI(mI({context:o,fiberRefs:a.getFiberRefs(),runtimeFlags:t1.runtimeFlags})),f=new Set;return e.addFinalizer(()=>{for(const h of f)h()}),e.once(t),e.subscribe(t,()=>{e.setSelf(KI(e.self()));let h;h=d(l,m=>{h&&f.delete(h);const y=QB(m,e.self()),g=f.size>0;e.setSelf(g?y1(y):y)}),h&&f.add(h)}),u}),Bhe=(e,t)=>up(t.read,function(n,r){n.set(e,n.get(e)+1)}),lp=typeof WeakRef>"u"||typeof FinalizationRegistry>"u"?e=>{const t=mS();return function(n){const r=Sa(t,n);if(r._tag==="Some")return r.value;const s=e(n);return vc(t,n,s),s}}:e=>{const t=mS(),n=new FinalizationRegistry(r=>{_re(t,r)});return function(r){const s=Sa(t,r).pipe(hM(a=>a.deref()));if(s._tag==="Some")return s.value;const i=e(r);return vc(t,r,new WeakRef(i)),n.register(i,r),i}},Ga=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!0}),zhe=P(2,(e,t)=>Che(e)?up(t,function(n,r){n.set(e,r)},e.refresh??function(n){n(e)}):qi(t,e.refresh??function(n){n(e)})),Uhe=vhe,sR="~effect-atom/atom/Atom/ServerValue",Vhe=P(2,(e,t)=>sR in e?e[sR](n=>t.get(n)):t.get(e)),N0=Symbol.for("@effect/platform/HttpApiSchema/AnnotationMultipart"),R0=Symbol.for("@effect/platform/HttpApiSchema/AnnotationMultipartStream"),gh=Symbol.for("@effect/platform/HttpApiSchema/AnnotationStatus"),O0=Symbol.for("@effect/platform/HttpApiSchema/AnnotationEmptyDecodeable"),bh=Symbol.for("@effect/platform/HttpApiSchema/AnnotationEncoding"),yh=Symbol.for("@effect/platform/HttpApiSchema/AnnotationParam"),s8=e=>{const t={};return gh in e&&(t[gh]=e[gh]),O0 in e&&(t[O0]=e[O0]),bh in e&&(t[bh]=e[bh]),yh in e&&(t[yh]=e[yh]),N0 in e&&(t[N0]=e[N0]),R0 in e&&(t[R0]=e[R0]),t},Hhe=e=>e._tag==="Transformation"?{...e.to.annotations,...e.annotations}:e.annotations,dp=(e,t)=>Hhe(e)[t],i8=(e,t)=>dp(e,gh)??t,a8=e=>dp(e,O0)??!1,qhe=e=>dp(e,N0),Ghe=e=>dp(e,R0),Khe={kind:"Json",contentType:"application/json"},fp=(e,t=Khe)=>dp(e,bh)??t,Whe=e=>(e._tag==="PropertySignatureTransformation"?e.to.annotations:e.annotations)[yh]?.name,Ei=e=>{const t=vB(e,"status");return e.status!==void 0&&(t[gh]=e.status),t},nv=e=>{switch(e._tag){case"VoidKeyword":return!0;case"Transformation":return nv(e.from);case"Suspend":return nv(e.f());default:return!1}},Jhe=e=>i8(e,nv(e)?204:200),cE=e=>i8(e,500),rv=e=>{function t(r){if(a1(r))for(const s of r.types)t(s);else n.push(r)}const n=[];return t(e),n},o8=(e,t)=>Gn.make(Array.from(new Set([...rv(e),...rv(t)]))),To=(e,t)=>St(o8(e.ast,t.ast)),jr=P(2,(e,t)=>{const n={[yh]:{name:e,schema:t}};if(Mr(t)){const r=np(t.ast);ft(r)&&(n[Bd]=r.value)}return t.annotations(n)}),Yhe=e=>lfe.annotations(Ei({status:e})),sv=Yhe(204),Qhe=e=>{switch(e){case"Json":return"application/json";case"UrlParams":return"application/x-www-form-urlencoded";case"Uint8Array":return"application/octet-stream";case"Text":return"text/plain"}},Xhe=P(2,(e,t)=>e.annotations({[bh]:{kind:t.kind,contentType:t.contentType??Qhe(t.kind)},...t.kind==="Uint8Array"?{jsonSchema:{type:"string",format:"binary"}}:void 0})),c8=e=>Xhe($,{kind:"Text",...e});class Zhe extends the.annotations({identifier:"Issue",description:"Represents an error encountered while parsing a value to match the schema"}){}class dy extends Vd()("HttpApiDecodeError",{issues:Qe(Zhe),message:$},Ei({status:400,description:"The request did not match the expected schema"})){static fromParseError(t){return hh.formatError(t).pipe(Kb(fh.formatError(t)),It(([n,r])=>new dy({issues:n,message:r})))}static refailParseError(t){return Oe(dy.fromParseError(t),na)}}const iR=Symbol.for("@effect/platform/HttpApi"),eme={[iR]:iR,pipe(){return Se(this,arguments)},add(e){return eo({identifier:this.identifier,groups:HW(this.groups,e.identifier,e),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},addHttpApi(e){const t={...this.groups};for(const n in e.groups){const r=e.groups[n].annotateContext(gi());r.annotations=Xr(e.annotations,r.annotations),r.middlewares=new Set([...e.middlewares,...r.middlewares]),t[n]=r}return eo({identifier:this.identifier,groups:t,errorSchema:To(this.errorSchema,e.errorSchema),annotations:this.annotations,middlewares:this.middlewares})},addError(e,t){return eo({identifier:this.identifier,groups:this.groups,errorSchema:To(this.errorSchema,t?.status?e.annotations(Ei({status:t.status})):e),annotations:this.annotations,middlewares:this.middlewares})},prefix(e){return eo({identifier:this.identifier,groups:bl(this.groups,t=>t.prefix(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},middleware(e){return eo({identifier:this.identifier,groups:this.groups,errorSchema:To(this.errorSchema,e.failure),annotations:this.annotations,middlewares:new Set([...this.middlewares,e])})},annotate(e,t){return eo({identifier:this.identifier,groups:this.groups,errorSchema:this.errorSchema,annotations:ls(this.annotations,e,t),middlewares:this.middlewares})},annotateContext(e){return eo({identifier:this.identifier,groups:this.groups,errorSchema:this.errorSchema,annotations:Xr(this.annotations,e),middlewares:this.middlewares})}},eo=e=>{function t(){}return Object.setPrototypeOf(t,eme),t.groups=e.groups,t.errorSchema=e.errorSchema,t.annotations=e.annotations,t.middlewares=e.middlewares,t},tme=e=>eo({groups:new Map,errorSchema:dy,annotations:gi(),middlewares:new Set}),u8=(e,t)=>{const n=Hp(e.errorSchema.ast,new Map,cE),r=Object.values(e.groups);for(const s of r){const i=Hp(s.errorSchema.ast,n,cE),a=Xr(e.annotations,s.annotations);t.onGroup({group:s,mergedAnnotations:a});const o=Object.values(s.endpoints);for(const c of o){if(t.predicate&&!t.predicate({endpoint:c,group:s}))continue;const u=Hp(c.errorSchema.ast,i,cE);t.onEndpoint({group:s,endpoint:c,middleware:new Set([...s.middlewares,...c.middlewares]),mergedAnnotations:Xr(a,c.annotations),payloads:c.payloadSchema._tag==="Some"?rme(c.payloadSchema.value.ast):nme,successes:Hp(c.successSchema.ast,new Map,Jhe),errors:u})}}},nme=new Map,Hp=(e,t,n)=>{const r=new Map(t);function s(i){if(JF(i))return;const a=s8(e.annotations);UW(a)||(i=Ud(i,{...a,...i.annotations}));const o=n(i),c=a8(i),u=r.get(o);r.set(o,{description:(u?u.description:fe()).pipe(Gi(()=>sme(i))),ast:(u?u.ast:fe()).pipe(Wr(l=>o8(l,i)),Gi(()=>!c&&ode(iy(i))?fe():ye(i)))})}return rv(e).forEach(s),r},rme=e=>{const t=new Map;function n(r){if(r._tag==="NeverKeyword")return;r=Ud(r,{...s8(e.annotations),...r.annotations});const s=fp(r),i=qhe(r)||Ghe(r)?"multipart/form-data":s.contentType,a=t.get(i);a===void 0?t.set(i,{encoding:s,ast:r}):a.ast=Gn.make([a.ast,r])}if(e._tag==="Union")for(const r of e.types)n(r);else n(e);return t},sme=e=>{const t="to"in e?{...e.to.annotations,...e.annotations}:e.annotations;return Sd(t[ra]??t[Bd])};class ime extends Fr("@effect/platform/HttpApi/AdditionalSchemas")(){}const Cu=e=>{const t=l8(e),n=[];for(let r=0;r<t.length;r++)if(Array.isArray(t[r][0])){const[s,i]=t[r];n.push([`${s[0]}[${s.slice(1).join("][")}]`,i])}else n.push(t[r]);return n},l8=e=>{const t=Symbol.iterator in e?Tt(e):Object.entries(e),n=[];for(const[r,s]of t)if(Array.isArray(s))for(let i=0;i<s.length;i++)s[i]!==void 0&&n.push([r,String(s[i])]);else if(typeof s=="object"){const i=l8(s);for(const[a,o]of i)n.push([[r,...typeof a=="string"?[a]:a],o])}else s!==void 0&&n.push([r,String(s)]);return n},d8=Qe(WS($,$)).annotations({identifier:"UrlParams"}),ame=[],ome=P(2,(e,t)=>{const n=Cu(t),r=new Set;for(let s=0;s<n.length;s++)r.add(n[s][0]);for(let s=0;s<e.length;s++)r.has(e[s][0])||n.push(e[s]);return n}),cme=P(2,(e,t)=>Vx(e,Cu(t))),ume=(e,t,n)=>{try{const r=new URL(e,lme());for(let s=0;s<t.length;s++){const[i,a]=t[s];a!==void 0&&r.searchParams.append(i,a)}return n._tag==="Some"&&(r.hash=n.value),Ue(r)}catch(r){return Be(r)}},f8=e=>new URLSearchParams(e).toString(),lme=()=>{if("location"in globalThis&&globalThis.location!==void 0&&globalThis.location.origin!==void 0&&globalThis.location.pathname!==void 0)return location.origin+location.pathname},dme=e=>{const t=Object.create(null);for(const[n,r]of e){const s=t[n];s===void 0?t[n]=r:typeof s=="string"?t[n]=[s,r]:s.push(r)}return{...t}},fme=Ha($,d8,{decode(e){return Cu(new URLSearchParams(e))},encode(e){return f8(e)}}),hme=e=>Ha(d8,e,{decode(t){return dme(t)},encode(t){return Cu(t)}}),mme=e=>Dc(fme,hme(e)),L0=Symbol.for("@effect/platform/HttpBody");class QI{[L0];constructor(){this[L0]=L0}[gt](){return this.toJSON()}toString(){return Dt(this)}}class pme extends QI{_tag="Empty";toJSON(){return{_id:"@effect/platform/HttpBody",_tag:"Empty"}}}const gme=new pme;class bme extends QI{body;contentType;_tag="Uint8Array";constructor(t,n){super(),this.body=t,this.contentType=n}get contentLength(){return this.body.length}toJSON(){return{_id:"@effect/platform/HttpBody",_tag:"Uint8Array",body:this.contentType.startsWith("text/")||this.contentType.endsWith("json")?new TextDecoder().decode(this.body):`Uint8Array(${this.body.length})`,contentType:this.contentType,contentLength:this.contentLength}}}const h8=(e,t)=>new bme(e,t??"application/octet-stream"),yme=new TextEncoder,m8=(e,t)=>h8(yme.encode(e),t??"text/plain"),_me=(e,t)=>m8(f8(e),t??"application/x-www-form-urlencoded");class kme extends QI{formData;_tag="FormData";constructor(t){super(),this.formData=t}toJSON(){return{_id:"@effect/platform/HttpBody",_tag:"FormData",formData:this.formData}}}const Eme=e=>new kme(e),wme=L0,Sme=e=>Ne(e,wme),vme=h8,aR=m8,xme=_me,oR=Symbol.for("@effect/platform/Cookies"),cR=Symbol.for("@effect/platform/Cookies/Cookie"),Tme={[oR]:oR,...i_,toJSON(){return{_id:"@effect/platform/Cookies",cookies:bl(this.cookies,e=>e.toJSON())}},pipe(){return Se(this,arguments)}},Ime=e=>{const t=Object.create(Tme);return t.cookies=e,t},Ame=e=>{const t={};for(const n of e)t[n.name]=n;return Ime(t)},Cme=e=>{const t=typeof e=="string"?[e]:e,n=[];for(const r of t){const s=Pme(r.trim());ft(s)&&n.push(s.value)}return Ame(n)};function Pme(e){const t=e.split(";").map(o=>o.trim()).filter(o=>o!=="");if(t.length===0)return fe();const n=t[0].indexOf("=");if(n===-1)return fe();const r=t[0].slice(0,n);if(!Nme.test(r))return fe();const s=t[0].slice(n+1),i=Rme(s);if(t.length===1)return ye(Object.assign(Object.create(uR),{name:r,value:i,valueEncoded:s}));const a={};for(let o=1;o<t.length;o++){const c=t[o],u=c.indexOf("="),l=u===-1?c:c.slice(0,u).trim(),d=u===-1?void 0:c.slice(u+1).trim();switch(l.toLowerCase()){case"domain":{if(d===void 0)break;const f=d.trim().replace(/^\./,"");f&&(a.domain=f);break}case"expires":{if(d===void 0)break;const f=new Date(d);isNaN(f.getTime())||(a.expires=f);break}case"max-age":{if(d===void 0)break;const f=parseInt(d,10);isNaN(f)||(a.maxAge=QM(f));break}case"path":{if(d===void 0)break;d[0]==="/"&&(a.path=d);break}case"priority":{if(d===void 0)break;switch(d.toLowerCase()){case"low":a.priority="low";break;case"medium":a.priority="medium";break;case"high":a.priority="high";break}break}case"httponly":{a.httpOnly=!0;break}case"secure":{a.secure=!0;break}case"partitioned":{a.partitioned=!0;break}case"samesite":{if(d===void 0)break;switch(d.toLowerCase()){case"lax":a.sameSite="lax";break;case"strict":a.sameSite="strict";break;case"none":a.sameSite="none";break}break}}}return ye(Object.assign(Object.create(uR),{name:r,value:i,valueEncoded:s,options:Object.keys(a).length>0?a:void 0}))}const Nme=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,uR={[cR]:cR,...i_,toJSON(){return{_id:"@effect/platform/Cookies/Cookie",name:this.name,value:this.value,options:this.options}}},Rme=e=>{try{return decodeURIComponent(e)}catch{return e}},lR=Symbol.for("@effect/platform/Headers"),hm=Object.assign(Object.create(null),{[lR]:lR,[a_](e){return av(this,gj(e,g8))}}),_1=e=>Object.assign(Object.create(hm),e),p8=Object.create(hm),XI=e=>{if(e===void 0)return p8;if(Symbol.iterator in e){const n=Object.create(hm);for(const[r,s]of e)n[r.toLowerCase()]=s;return n}const t=Object.create(hm);for(const[n,r]of Object.entries(e))Array.isArray(r)?t[n.toLowerCase()]=r.join(", "):r!==void 0&&(t[n.toLowerCase()]=r);return t},Ome=e=>Object.setPrototypeOf(e,hm),iv=P(3,(e,t,n)=>{const r=_1(e);return r[t.toLowerCase()]=n,r}),Lme=P(2,(e,t)=>_1({...e,...XI(t)})),Dme=P(2,(e,t)=>{const n=_1(e);return Object.assign(n,t),n}),$me=P(2,(e,t)=>{const n=_1(e),r=s=>{if(typeof s=="string"){const i=s.toLowerCase();i in e&&delete n[i]}else for(const i in e)s.test(i)&&delete n[i]};if(Array.isArray(t))for(let s=0;s<t.length;s++)r(t[s]);else r(t);return n}),av=P(2,(e,t)=>{const n={...e},r=s=>{if(typeof s=="string"){const i=s.toLowerCase();i in e&&(n[i]=LN(e[i]))}else for(const i in e)s.test(i)&&(n[i]=LN(e[i]))};if(Array.isArray(t))for(let s=0;s<t.length;s++)r(t[s]);else r(t);return n}),g8=$e("@effect/platform/Headers/currentRedactedNames",()=>pI(["authorization","cookie","set-cookie","x-api-key"])),Mme=Symbol.for("@effect/platform/HttpClientError"),b8=Mme;class y8 extends WB(b8,"RequestError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return this.description?`${this.reason}: ${this.description} (${this.methodAndUrl})`:`${this.reason} error (${this.methodAndUrl})`}}class wa extends WB(b8,"ResponseError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){const t=`${this.response.status} ${this.methodAndUrl}`;return this.description?`${this.reason}: ${this.description} (${t})`:`${this.reason} error (${t})`}}const _h=Symbol.for("@effect/platform/HttpIncomingMessage"),jme=(e,t)=>{const n=e.headers["content-type"]??"";let r;if(n.includes("application/json"))try{r=zs(e.json)}catch{}else if(n.includes("text/")||n.includes("urlencoded"))try{r=zs(e.text)}catch{}const s={...t,headers:Rx(e.headers),remoteAddress:e.remoteAddress.toJSON()};return r!==void 0&&(s.body=r),s},Fme=e=>Ome({b3:`${e.traceId}-${e.spanId}-${e.sampled?"1":"0"}${e.parent._tag==="Some"?`-${e.parent.value.spanId}`:""}`,traceparent:`00-${e.traceId}-${e.spanId}-${e.sampled?"01":"00"}`}),dR=Symbol.for("@effect/platform/HttpClientRequest"),Bme={[dR]:dR,...i_,toJSON(){return{_id:"@effect/platform/HttpClientRequest",method:this.method,url:this.url,urlParams:this.urlParams,hash:this.hash,headers:Rx(this.headers),body:this.body.toJSON()}},pipe(){return Se(this,arguments)}};function wi(e,t,n,r,s,i){const a=Object.create(Bme);return a.method=e,a.url=t,a.urlParams=n,a.hash=r,a.headers=s,a.body=i,a}const zme=wi("GET","",ame,fe(),p8,gme),Zo=e=>(t,n)=>Jme(zme,{method:e,url:t,...n??void 0}),Ume=Zo("GET"),Vme=Zo("POST"),Hme=Zo("PUT"),qme=Zo("PATCH"),Gme=Zo("DELETE"),Kme=Zo("HEAD"),Wme=Zo("OPTIONS"),Jme=P(2,(e,t)=>{let n=e;return t.method&&(n=Qme(n,t.method)),t.url&&(n=E8(n,t.url)),t.headers&&(n=ZI(n,t.headers)),t.urlParams&&(n=w8(n,t.urlParams)),t.hash&&(n=epe(n,t.hash)),t.body&&(n=eA(n,t.body)),t.accept&&(n=k8(n,t.accept)),t.acceptJson&&(n=Yme(n)),n}),_8=P(3,(e,t,n)=>wi(e.method,e.url,e.urlParams,e.hash,iv(e.headers,t,n),e.body)),ZI=P(2,(e,t)=>wi(e.method,e.url,e.urlParams,e.hash,Lme(e.headers,t),e.body)),k8=P(2,(e,t)=>_8(e,"Accept",t)),Yme=k8("application/json"),Qme=P(2,(e,t)=>wi(t,e.url,e.urlParams,e.hash,e.headers,e.body)),E8=P(2,(e,t)=>{if(typeof t=="string")return wi(e.method,t,e.urlParams,e.hash,e.headers,e.body);const n=new URL(t.toString()),r=Cu(n.searchParams),s=n.hash?ye(n.hash.slice(1)):fe();return n.search="",n.hash="",wi(e.method,n.toString(),r,s,e.headers,e.body)}),Xme=P(2,(e,t)=>wi(e.method,t.endsWith("/")&&e.url.startsWith("/")?t+e.url.slice(1):t+e.url,e.urlParams,e.hash,e.headers,e.body)),Zme=P(2,(e,t)=>wi(e.method,e.url,cme(e.urlParams,t),e.hash,e.headers,e.body)),w8=P(2,(e,t)=>wi(e.method,e.url,ome(e.urlParams,t),e.hash,e.headers,e.body)),epe=P(2,(e,t)=>wi(e.method,e.url,e.urlParams,ye(t),e.headers,e.body)),eA=P(2,(e,t)=>{let n=e.headers;if(t._tag==="Empty"||t._tag==="FormData")n=$me(n,["Content-type","Content-length"]);else{const r=t.contentType;r&&(n=iv(n,"content-type",r));const s=t.contentLength;s&&(n=iv(n,"content-length",s.toString()))}return wi(e.method,e.url,e.urlParams,e.hash,n,t)}),tpe=P(2,(e,t)=>eA(e,Eme(t))),kh=Symbol.for("@effect/platform/HttpClientResponse"),npe=(e,t)=>new rpe(e,t);class rpe extends CK{request;source;[_h];[kh];constructor(t,n){super(),this.request=t,this.source=n,this[_h]=_h,this[kh]=kh}toJSON(){return jme(this,{_id:"@effect/platform/HttpClientResponse",request:this.request.toJSON(),status:this.status})}get status(){return this.source.status}get headers(){return XI(this.source.headers)}cachedCookies;get cookies(){return this.cachedCookies?this.cachedCookies:this.cachedCookies=Cme(this.source.headers.getSetCookie())}get remoteAddress(){return fe()}get stream(){return this.source.body?ule(()=>this.source.body,t=>new wa({request:this.request,response:this,reason:"Decode",cause:t})):sle(new wa({request:this.request,response:this,reason:"EmptyBody",description:"can not create stream from empty body"}))}get json(){return foe(this.text,{try:t=>t===""?null:JSON.parse(t),catch:t=>new wa({request:this.request,response:this,reason:"Decode",cause:t})})}textBody;get text(){return this.textBody??=jl({try:()=>this.source.text(),catch:t=>new wa({request:this.request,response:this,reason:"Decode",cause:t})}).pipe(Fk,zs)}get urlParamsBody(){return Oe(this.text,t=>doe({try:()=>Cu(new URLSearchParams(t)),catch:n=>new wa({request:this.request,response:this,reason:"Decode",cause:n})}))}formDataBody;get formData(){return this.formDataBody??=jl({try:()=>this.source.formData(),catch:t=>new wa({request:this.request,response:this,reason:"Decode",cause:t})}).pipe(Fk,zs)}arrayBufferBody;get arrayBuffer(){return this.arrayBufferBody??=jl({try:()=>this.source.arrayBuffer(),catch:t=>new wa({request:this.request,response:this,reason:"Decode",cause:t})}).pipe(Fk,zs)}}const spe=P(2,(e,t)=>{const n=e.status;return t[n]?t[n](e):n>=200&&n<300&&t["2xx"]?t["2xx"](e):n>=300&&n<400&&t["3xx"]?t["3xx"](e):n>=400&&n<500&&t["4xx"]?t["4xx"](e):n>=500&&n<600&&t["5xx"]?t["5xx"](e):t.orElse(e)}),ipe=e=>`http.request.header.${e}`,ape="http.request.method",ope=e=>`http.response.header.${e}`,cpe="http.response.status_code",upe="server.address",lpe="server.port",dpe="url.full",fpe="url.path",hpe="url.scheme",mpe="url.query",fR=Symbol.for("@effect/platform/HttpClient"),tA=Ko("@effect/platform/HttpClient"),ppe=$e(Symbol.for("@effect/platform/HttpClient/tracerDisabledWhen"),()=>pI(La)),gpe=$e(Symbol.for("@effect/platform/HttpClient/currentTracerPropagation"),()=>pI(!0)),bpe=Su()("@effect/platform/HttpClient/SpanNameGenerator",{defaultValue:()=>e=>`http.client ${e.method}`}),ype={[fR]:fR,pipe(){return Se(this,arguments)},...i_,toJSON(){return{_id:"@effect/platform/HttpClient"}},get(e,t){return this.execute(Ume(e,t))},head(e,t){return this.execute(Kme(e,t))},post(e,t){return this.execute(Vme(e,t))},put(e,t){return this.execute(Hme(e,t))},patch(e,t){return this.execute(qme(e,t))},del(e,t){return this.execute(Gme(e,t))},options(e,t){return this.execute(Wme(e,t))}},nA=(e,t)=>{const n=Object.create(ype);return n.preprocess=t,n.postprocess=e,n.execute=function(r){return e(t(r))},n},fy=$e("@effect/platform/HttpClient/responseRegistry",()=>{if("FinalizationRegistry"in globalThis&&globalThis.FinalizationRegistry){const t=new FinalizationRegistry(n=>{n.abort()});return{register(n,r){t.register(n,r,n)},unregister(n){t.unregister(n)}}}const e=new Map;return{register(t,n){e.set(t,setTimeout(()=>n.abort(),5e3))},unregister(t){const n=e.get(t);n!==void 0&&(clearTimeout(n),e.delete(t))}}}),_pe=$e("@effect/platform/HttpClient/scopedRequests",()=>new WeakMap),kpe=e=>nA(t=>Oe(t,n=>Hb(r=>{const s=_pe.get(n),i=s??new AbortController,a=ume(n.url,n.urlParams,n.hash);if(a._tag==="Left")return na(new y8({request:n,reason:"InvalidUrl",cause:a.left}));const o=a.right;if(!r.getFiberRef(Voe)||r.getFiberRef(ppe)(n)){const l=e(n,o,i.signal,r);return s?l:qb(d=>si(d(l),{onSuccess(f){return fy.register(f,i),Ot(new hR(f,i))},onFailure(f){return Fb(f)&&i.abort(),ui(f)}}))}const u=ci(r.currentContext,bpe);return Toe(u(n),{kind:"client",captureStackTrace:!1},l=>{l.attribute(ape,n.method),l.attribute(upe,o.origin),o.port!==""&&l.attribute(lpe,+o.port),l.attribute(dpe,o.toString()),l.attribute(fpe,o.pathname),l.attribute(hpe,o.protocol.slice(0,-1));const d=o.search.slice(1);d!==""&&l.attribute(mpe,d);const f=r.getFiberRef(g8),h=av(n.headers,f);for(const m in h)l.attribute(ipe(m),String(h[m]));return n=r.getFiberRef(gpe)?ZI(n,Fme(l)):n,qb(m=>m(e(n,o,i.signal,r)).pipe(Ioe(l),si({onSuccess:y=>{l.attribute(cpe,y.status);const g=av(y.headers,f);for(const p in g)l.attribute(ope(p),String(g[p]));return s?Ot(y):(fy.register(y,i),Ot(new hR(y,i)))},onFailure(y){return!s&&Fb(y)&&i.abort(),ui(y)}})))})})),Ot);class hR{original;controller;constructor(t,n){this.original=t,this.controller=n}[kh]=kh;[_h]=_h;applyInterrupt(t){return ln(()=>(fy.unregister(this.original),hoe(t,()=>Mt(()=>{this.controller.abort()}))))}get request(){return this.original.request}get status(){return this.original.status}get headers(){return this.original.headers}get cookies(){return this.original.cookies}get remoteAddress(){return this.original.remoteAddress}get formData(){return this.applyInterrupt(this.original.formData)}get text(){return this.applyInterrupt(this.original.text)}get json(){return this.applyInterrupt(this.original.json)}get urlParamsBody(){return this.applyInterrupt(this.original.urlParamsBody)}get arrayBuffer(){return this.applyInterrupt(this.original.arrayBuffer)}get stream(){return fle(()=>(fy.unregister(this.original),_F(this.original.stream,Mt(()=>{this.controller.abort()}))))}toJSON(){return this.original.toJSON()}[gt](){return this.original[gt]()}}const{del:JFe,execute:YFe,get:QFe,head:XFe,options:ZFe,patch:eBe,post:tBe,put:nBe}=yoe(tA),Epe=P(2,(e,t)=>{const n=e;return nA(r=>t(n.postprocess(r)),n.preprocess)}),wpe=P(2,(e,t)=>{const n=e;return nA(n.postprocess,r=>It(n.preprocess(r),t))}),Spe=e=>Foe(tA,Oe(s5(),t=>It(e,n=>Epe(n,i5(r=>Xr(t,r)))))),vpe=tA,S8=wpe,xpe=Zo,Tpe=_8,Ipe=ZI,Ape=E8,Cpe=Xme,Ppe=w8,Npe=Zme,Rpe=eA,Ope=tpe,Lpe=spe,ov=e=>e!=="GET"&&e!=="HEAD"&&e!=="OPTIONS",Dpe=(e,t)=>Ml(function*(){const n=yield*s5(),r=t.httpClient.pipe(t?.baseUrl===void 0?ze:S8(Cpe(t.baseUrl.toString())));u8(e,{predicate:t?.predicate,onGroup(s){t.onGroup?.(s)},onEndpoint(s){const{endpoint:i,errors:a,successes:o}=s,c=Fpe(i.path),u={orElse:Vpe},l=Lpe(u);a.forEach(({ast:g},p)=>{if(g._tag==="None"){u[p]=Hpe;return}const _=mR(g.value);u[p]=k=>Oe(_(k),na)}),o.forEach(({ast:g},p)=>{u[p]=g._tag==="None"?qpe:mR(g.value)});const d=i.pathSchema.pipe(Wr(yf)),f=i.payloadSchema.pipe(Wr(g=>ov(i.method)?yf(Kpe(g)):yf(g))),h=i.headersSchema.pipe(Wr(yf)),m=i.urlParamsSchema.pipe(Wr(yf)),y=Aoe(function*(g){let p=xpe(i.method)(i.path);if(g&&g.path){const v=d._tag==="Some"?yield*d.value(g.path):g.path;p=Ape(p,c(v))}if(g&&g.payload instanceof FormData)p=Ope(p,g.payload);else if(f._tag==="Some")if(ov(i.method)){const v=yield*f.value(g.payload);p=Rpe(p,v)}else{const v=yield*f.value(g.payload);p=Ppe(p,v)}h._tag==="Some"&&(p=Ipe(p,yield*h.value(g.headers))),m._tag==="Some"&&(p=Npe(p,yield*m.value(g.urlParams)));const _=yield*r.execute(p),k=yield*t.transformResponse===void 0?l(_):t.transformResponse(l(_));return g?.withResponse===!0?[k,_]:k},i5(g=>Xr(n,g)));t.onEndpoint({...s,endpointFn:y})}})}),$pe=(e,t)=>Oe(vpe,n=>Mpe(e,{...t,httpClient:t?.transformClient?t.transformClient(n):n})),Mpe=(e,t)=>{const n={};return Dpe(e,{...t,onGroup({group:r}){r.topLevel||(n[r.identifier]={})},onEndpoint({endpoint:r,endpointFn:s,group:i}){(i.topLevel?n:n[i.identifier])[r.name]=s}}).pipe(It(()=>n))},jpe=/:(\w+)\??/g,Fpe=e=>{const t=e.split(jpe),n=t.length;return n===1?r=>e:r=>{let s=t[0];for(let i=1;i<n;i++)i%2===0?s+=t[i]:s+=r[t[i]];return s}},mR=e=>{const t=fp(e),n=sfe(v8(e,t));return r=>Oe(r.arrayBuffer,n)},Bpe=Ha(op,Hfe,{decode(e){return new Uint8Array(e)},encode(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}}),cv=Ha(op,$,{decode(e){return new TextDecoder().decode(e)},encode(e){const t=new TextEncoder().encode(e);return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}}),zpe=Bo($,op,{strict:!0,decode:(e,t,n)=>e===""?Jr(void 0):oy({try:()=>JSON.parse(e),catch:()=>new vn(n,e,"Could not parse JSON")}),encode:(e,t,n)=>e===void 0?Jr(""):oy({try:()=>JSON.stringify(e),catch:()=>new vn(n,e,"Could not encode as JSON")})}),Upe=Dc(cv,zpe),v8=(e,t)=>{if(e._tag==="Union")return Hs(...e.types.map(r=>v8(r,fp(r,t))));const n=St(e);switch(t.kind){case"Json":return Dc(Upe,n);case"UrlParams":return Dc(cv,mme(n));case"Uint8Array":return Dc(Bpe,n);case"Text":return Dc(cv,n)}},Vpe=e=>na(new wa({reason:"Decode",request:e.request,response:e})),Hpe=e=>na(new wa({reason:"StatusCode",request:e.request,response:e})),qpe=e=>pt,Gpe=ap(Sme),Kpe=e=>{const t=e.ast._tag==="Union"?e.ast.types:[e.ast];return Hs(...t.map(Wpe))},uE=$e("@effect/platform/HttpApiClient/bodyFromPayloadCache",()=>new WeakMap),Wpe=e=>{if(uE.has(e))return uE.get(e);const t=St(e),n=fp(e),r=Bo(Gpe,t,{decode(s,i,a){return Lc(new qS(a,s,"encode only schema"))},encode(s,i,a){switch(n.kind){case"Json":try{return Jr(aR(JSON.stringify(s),n.contentType))}catch{return Lc(new vn(a,s,"Could not encode as JSON"))}case"Text":return typeof s!="string"?Lc(new vn(a,s,"Expected a string")):Jr(aR(s,n.contentType));case"UrlParams":return Jr(xme(Cu(s)));case"Uint8Array":return s instanceof Uint8Array?Jr(vme(s,n.contentType)):Lc(new vn(a,s,"Expected a Uint8Array"))}}});return uE.set(e,r),r},Jpe=(e,t)=>{const n=t.definitionPath??"#/$defs/",r=o=>n+o,s=t.target??"jsonSchema7",i=t.topLevelReferenceStrategy??"keep";return on(e,t.definitions,"handle-identifier",[],{getRef:r,target:s,topLevelReferenceStrategy:i,additionalPropertiesStrategy:"strict"},"handle-annotation","handle-errors")},Eh={$id:"/schemas/never",not:{}},Ec={$id:"/schemas/any"},x8={$id:"/schemas/unknown"},T8={$id:"/schemas/void"},Ype={$id:"/schemas/object",anyOf:[{type:"object"},{type:"array"}]},Qpe={$id:"/schemas/%7B%7D",anyOf:[{type:"object"},{type:"array"}]};function I8(e){if(e!==void 0)return Pr(OI(e))}function A8(e){if(e!==void 0)return Pr(RI(e))}function C8(e){return e!==void 0?Gle(e):fe()}function Xpe(e,t){return dB(e,!1)(t)}function P8(e){if(e!==void 0)return Pr(qle(e))}function Zpe(e,t){const n=dB(e,!1),r=EM(t,s=>n(s).pipe(mM(hy)));return r.length>0?r:void 0}function pR(e,t,n){if(t!==void 0)switch(e._tag){case"StringKeyword":return t!==ey.annotations[n]?t:void 0;case"NumberKeyword":return t!==ty.annotations[n]?t:void 0;case"BooleanKeyword":return t!==ny.annotations[n]?t:void 0}return t}function hy(e,t=new Set){if(e===null||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return!0;if(Array.isArray(e)||typeof e=="object"){if(t.has(e))return!1;t.add(e);try{if(Array.isArray(e))return e.every(r=>hy(r,t));const n=Object.getPrototypeOf(e);return n!==null&&n!==Object.prototype||Object.getOwnPropertySymbols(e).length>0?!1:Object.values(e).every(r=>hy(r,t))}finally{t.delete(e)}}return!1}function N8(e,t,n,r,s){const i={};if(t!==void 0&&(i.description=t),n!==void 0&&(i.title=n),ft(r)){const a=Xpe(e,r.value);ft(a)&&hy(a.value)&&(i.default=a.value)}if(s!==void 0){const a=Zpe(e,s);a!==void 0&&(i.examples=a)}if(Object.keys(i).length!==0)return i}function lE(e,t){return N8(e,I8(t),A8(t),C8(t),P8(t))}function R8(e){return N8(e,pR(e,I8(e),ra),pR(e,A8(e),Br),C8(e),P8(e))}function dE(e,t){return t?"$ref"in e?{allOf:[e],...t}:{...e,...t}:e}const my=e=>{if(xn(qF(e)))return Mde(e,my,t=>my(t.from))},ege=e=>e.annotations[II]===WF,tge=(e,t)=>Yc(e)&&e.annotations[II]===NF?"type"in t&&t.type!=="integer":"type"in t||"oneOf"in t||"anyOf"in t||"$ref"in t,nge=(e,t,n)=>{const r={...e,...R8(n),...t};r.allOf??=[];const s=(i,a)=>{i in t&&i in e&&(r.allOf.unshift({[i]:e[i]}),r.allOf=r.allOf.filter(a))};return s("minLength",i=>i.minLength>t.minLength),s("maxLength",i=>i.maxLength<t.maxLength),s("pattern",i=>i.pattern!==t.pattern),s("minItems",i=>i.minItems>t.minItems),s("maxItems",i=>i.maxItems<t.maxItems),s("minimum",i=>i.minimum>t.minimum),s("maximum",i=>i.maximum<t.maximum),s("exclusiveMinimum",i=>i.exclusiveMinimum>t.exclusiveMinimum),s("exclusiveMaximum",i=>i.exclusiveMaximum<t.exclusiveMaximum),s("multipleOf",i=>i.multipleOf!==t.multipleOf),r.allOf.length===0&&delete r.allOf,r};function rge(e){switch(e.target){case"jsonSchema7":return!1;case"jsonSchema2019-09":case"jsonSchema2020-12":case"openApi3.1":return!0}}function sge(e){switch(e.additionalPropertiesStrategy){case"allow":return!0;case"strict":return!1}}function $t(e,t){return O8(e,R8(t))}function O8(e,t){return t===void 0||Object.keys(t).length===0?e:"$ref"in e?{allOf:[e],...t}:{...e,...t}}function uv(e){const t=Pr(KF(e));if(t===void 0){if(tB(e))return uv(e.f());if(nB(e)&&zS(e.from)&&tde(e.to)){const n=e.to,r=zd(n);if(ft(r))return uv(n)}}return t}function on(e,t,n,r,s,i,a){if(n==="handle-identifier"&&(s.topLevelReferenceStrategy!=="skip"||tB(e))){const c=uv(e);if(c!==void 0){const u=c.replace(/~/ig,"~0").replace(/\//ig,"~1"),l={$ref:s.getRef(u)};return VW(t,c)||(t[c]=l,t[c]=on(e,t,"ignore-identifier",r,s,"handle-annotation",a)),l}}if(i==="handle-annotation"){const c=qF(e);if(ft(c)){const u=c.value;if(tge(e,u))return e._tag==="Declaration"?$t(u,e):u;if(e._tag==="Refinement"){const l=HS(e);return l===void 0?nge(on(e.from,t,n,r,s,"handle-annotation",a),u,e):on(l,t,n,r,s,"handle-annotation",a)}else return{...on(e,t,n,r,s,"ignore-annotation",a),...u}}}const o=zd(e);if(ft(o))return on(o.value,t,n,r,s,"handle-annotation",a);switch(e._tag){case"Declaration":case"UndefinedKeyword":case"BigIntKeyword":case"UniqueSymbol":case"SymbolKeyword":{if(a==="ignore-errors")return $t(Ec,e);throw new Error(SN(r,e))}case"Suspend":{if(n==="handle-identifier"){if(a==="ignore-errors")return $t(Ec,e);throw new Error(xle(r,e))}return on(e.f(),t,"ignore-identifier",r,s,"handle-annotation",a)}case"NeverKeyword":return $t(Eh,e);case"VoidKeyword":return $t(T8,e);case"UnknownKeyword":return $t(x8,e);case"AnyKeyword":return $t(Ec,e);case"ObjectKeyword":return $t(Ype,e);case"StringKeyword":return $t({type:"string"},e);case"NumberKeyword":return $t({type:"number"},e);case"BooleanKeyword":return $t({type:"boolean"},e);case"Literal":{const c=e.literal;if(c===null)return $t({type:"null"},e);if(kn(c))return $t({type:"string",enum:[c]},e);if(pi(c))return $t({type:"number",enum:[c]},e);if(No(c))return $t({type:"boolean",enum:[c]},e);if(a==="ignore-errors")return $t(Ec,e);throw new Error(SN(r,e))}case"Enums":{const c=e.enums.map(u=>({type:pi(u[1])?"number":"string",title:u[0],enum:[u[1]]}));return c.length>=1?$t({$comment:"/schemas/enums",anyOf:c},e):$t(Eh,e)}case"TupleType":{const c=e.elements.map((h,m)=>dE(on(h.type,t,"handle-identifier",r.concat(m),s,"handle-annotation",a),lE(h.type,h))),u=e.rest.map(h=>dE(on(h.type,t,"handle-identifier",r,s,"handle-annotation",a),lE(h.type,h))),l={type:"array"},d=e.elements.length;d>0&&(l.minItems=d-e.elements.filter(h=>h.isOptional).length,s.target==="jsonSchema7"?l.items=c:l.prefixItems=c);const f=u.length;if(f>0){const h=u[0];if(f===1&&e.elements.every(y=>y.type===e.rest[0].type)?s.target==="jsonSchema7"?l.items=h:(l.items=h,delete l.prefixItems):s.target==="jsonSchema7"?l.additionalItems=h:l.items=h,f>1){if(a==="ignore-errors")return $t(Ec,e);throw new Error(Tle(r))}}else d>0?s.target==="jsonSchema7"?l.additionalItems=!1:l.items=!1:l.maxItems=0;return $t(l,e)}case"TypeLiteral":{if(e.propertySignatures.length===0&&e.indexSignatures.length===0)return $t(Qpe,e);const c={type:"object",required:[],properties:{},additionalProperties:sge(s)};let u,l;for(const d of e.indexSignatures){const f=my(d.type)??d.type,h=d.parameter;switch(h._tag){case"StringKeyword":{c.additionalProperties=on(f,t,"handle-identifier",r,s,"handle-annotation",a);break}case"TemplateLiteral":{u=on(f,t,"handle-identifier",r,s,"handle-annotation",a),l={type:"string",pattern:sy(h).source};break}case"Refinement":{u=on(f,t,"handle-identifier",r,s,"handle-annotation",a),l=on(h,t,"handle-identifier",r,s,"handle-annotation",a);break}case"SymbolKeyword":{const m=r.concat("[symbol]");c.additionalProperties=on(f,t,"handle-identifier",m,s,"handle-annotation",a),l=on(h,t,"handle-identifier",m,s,"handle-annotation",a);break}}}for(let d=0;d<e.propertySignatures.length;d++){const f=e.propertySignatures[d],h=f.name;if(kn(h)){const m=my(f.type),y=m??f.type;c.properties[h]=dE(on(y,t,"handle-identifier",r.concat(f.name),s,"handle-annotation",a),lE(y,f)),!f.isOptional&&m===void 0&&c.required.push(h)}else{if(a==="ignore-errors")return $t(Ec,e);throw new Error(Ile(h,r))}}return u!==void 0&&(delete c.additionalProperties,c.patternProperties={"":u}),l!==void 0&&(c.propertyNames=l),$t(c,e)}case"Union":{const c=e.types.map(l=>on(l,t,"handle-identifier",r,s,"handle-annotation",a)),u=uge(c);switch(u.length){case 0:return Eh;case 1:return $t(u[0],e);default:return $t({anyOf:u},e)}}case"Refinement":return on(e.from,t,n,r,s,"handle-annotation",a);case"TemplateLiteral":{const c=sy(e);return $t({type:"string",title:String(e),description:"a template literal",pattern:c.source},e)}case"Transformation":{if(ege(e.from)){const u={type:"string",contentMediaType:"application/json"};return rge(s)&&(u.contentSchema=on(e.to,t,n,r,s,"handle-annotation",a)),u}const c=on(e.from,t,n,r,s,"handle-annotation",a);if(e.transformation._tag==="TypeLiteralTransformation"&&gR(c)){const u=on(e.to,{},"ignore-identifier",r,s,"handle-annotation","ignore-errors");if(gR(u))for(const l of e.transformation.propertySignatureTransformations){const d=l.to,f=l.from;if(kn(d)&&kn(f)){const h=u.properties[d];if(Bh(h)){const m=c.properties[f];if(Bh(m)){const y={};kn(h.title)&&(y.title=h.title),kn(h.description)&&(y.description=h.description),Array.isArray(h.examples)&&(y.examples=h.examples),Object.hasOwn(h,"default")&&h.default!==void 0&&(y.default=h.default),c.properties[f]=O8(m,y)}}}}}return $t(c,e)}}}function gR(e){return Bh(e)&&e.type==="object"&&Bh(e.properties)}function ige(e){return e===Eh||Ne(e,"$id")&&e.$id===Eh.$id&&Object.keys(e).length===3&&e.title===rp.annotations[Br]}function age(e){return"$id"in e&&e.$id===Ec.$id}function oge(e){return"$id"in e&&e.$id===x8.$id}function cge(e){return"$id"in e&&e.$id===T8.$id}function bR(e){return Ne(e,"enum")&&"type"in e&&Object.keys(e).length===2}function uge(e){const t=[];for(const n of e)if(!ige(n)){if(age(n)||oge(n)||cge(n))return[n];if(bR(n)&&t.length>0){const r=t[t.length-1];if(bR(r)&&r.type===n.type){t[t.length-1]={type:r.type,enum:[...r.enum,...n.enum]};continue}}t.push(n)}return t}var yR=cq();function L8(e){yR.unstable_scheduleCallback(yR.unstable_LowPriority,e)}const Hd=O.createContext(t8({scheduleTask:L8,defaultIdleTTL:400})),lge=e=>{const t=O.useRef(null);return t.current===null&&(t.current={registry:t8({scheduleTask:e.scheduleTask??L8,initialValues:e.initialValues,timeoutResolution:e.timeoutResolution,defaultIdleTTL:e.defaultIdleTTL})}),O.useEffect(()=>(t.current?.timeout!==void 0&&clearTimeout(t.current.timeout),()=>{t.current.timeout=setTimeout(()=>{t.current?.registry.dispose(),t.current=null},500)}),[t]),O.createElement(Hd.Provider,{value:t.current.registry},e?.children)},_R=$e("@effect-atom/atom-react/storeRegistry",()=>new WeakMap);function dge(e,t){let n=_R.get(e);n===void 0&&(n=new WeakMap,_R.set(e,n));const r=n.get(t);if(r!==void 0)return r;const s={subscribe(i){return e.subscribe(t,i)},snapshot(){return e.get(t)},getServerSnapshot(){return Vhe(t,e)}};return n.set(t,s),s}function fge(e,t){const n=dge(e,t);return O.useSyncExternalStore(n.subscribe,n.snapshot,n.getServerSnapshot)}const hge=(e,t)=>{const n=O.useContext(Hd);return fge(n,e)},mge="@effect/platform/FetchHttpClient/Fetch",pge="@effect/platform/FetchHttpClient/FetchOptions",gge=kpe((e,t,n,r)=>{const s=r.getFiberRef(f5),i=s.unsafeMap.get(mge)??globalThis.fetch,a=s.unsafeMap.get(pge)??{},o=a.headers?Dme(XI(a.headers),e.headers):e.headers,c=u=>It(jl({try:()=>i(t,{...a,method:e.method,headers:o,body:u,duplex:e.body._tag==="Stream"?"half":void 0,signal:n}),catch:l=>new y8({request:e,reason:"Transport",cause:l})}),l=>npe(e,l));switch(e.body._tag){case"Raw":case"Uint8Array":return c(e.body.body);case"FormData":return c(e.body.formData);case"Stream":return Oe(hle(e.body.stream),c)}return c(void 0)}),bge=Spe(Ot(gge)),yge=bge,_ge=Symbol.for("@effect/platform/HttpApiMiddleware/Security"),kR=e=>Ne(e,_ge),kge=e=>e.endsWith("/")?e.slice(0,-1):e,Ege=P(2,(e,t)=>(t=kge(t),e==="/"?t:t+e)),wge=Ege,Sge=(e,t)=>Jpe(e,{definitions:t.defs,definitionPath:t.defsPath??"#/components/schemas/",target:"openApi3.1",topLevelReferenceStrategy:t.topLevelReferenceStrategy});class D8 extends Fr("@effect/platform/OpenApi/Identifier")(){}class D0 extends Fr("@effect/platform/OpenApi/Title")(){}class $8 extends Fr("@effect/platform/OpenApi/Version")(){}class wh extends Fr("@effect/platform/OpenApi/Description")(){}class M8 extends Fr("@effect/platform/OpenApi/License")(){}class lv extends Fr("@effect/platform/OpenApi/ExternalDocs")(){}class j8 extends Fr("@effect/platform/OpenApi/Servers")(){}class F8 extends Fr("@effect/platform/OpenApi/Format")(){}class dv extends Fr("@effect/platform/OpenApi/Summary")(){}class B8 extends Fr("@effect/platform/OpenApi/Deprecated")(){}class $0 extends Fr("@effect/platform/OpenApi/Override")(){}class fv extends Su()("@effect/platform/OpenApi/Exclude",{defaultValue:La}){}class M0 extends Fr("@effect/platform/OpenApi/Transform")(){}const vge=e=>{const t=Object.entries(e);return n=>{let r=gi();for(const[s,i]of t)n[s]!==void 0&&(r=ls(r,i,n[s]));return r}},xge=vge({identifier:D8,title:D0,version:$8,description:wh,license:M8,summary:dv,deprecated:B8,externalDocs:lv,servers:j8,format:F8,override:$0,exclude:fv,transform:M0}),ER=$e("@effect/platform/OpenApi/apiCache",()=>new WeakMap);function Bn(e,t,n){const r=Wo(e,t);ft(r)&&n(r.value)}const Tge=(e,t)=>{const n=ER.get(e);if(n!==void 0)return n;const r={};let s={openapi:"3.1.0",info:{title:df(e.annotations,D0,()=>"Api"),version:df(e.annotations,$8,()=>"0.0.1")},paths:{},components:{schemas:r,securitySchemes:{}},security:[],tags:[]};function i(o){return Sge(o,{defs:r})}function a(o,c){s.components.securitySchemes[o]===void 0&&(s.components.securitySchemes[o]=Ige(c))}return Bn(e.annotations,ime,o=>{o.forEach(c=>i(c.ast))}),Bn(e.annotations,wh,o=>{s.info.description=o}),Bn(e.annotations,M8,o=>{s.info.license=o}),Bn(e.annotations,dv,o=>{s.info.summary=o}),Bn(e.annotations,j8,o=>{s.servers=[...o]}),e.middlewares.forEach(o=>{if(kR(o))for(const[c,u]of Object.entries(o.security))a(c,u),s.security.push({[c]:[]})}),u8(e,{onGroup({group:o}){if(ci(o.annotations,fv))return;let c={name:df(o.annotations,D0,()=>o.identifier)};Bn(o.annotations,wh,u=>{c.description=u}),Bn(o.annotations,lv,u=>{c.externalDocs=u}),Bn(o.annotations,$0,u=>{Object.assign(c,u)}),Bn(o.annotations,M0,u=>{c=u(c)}),s.tags.push(c)},onEndpoint({endpoint:o,errors:c,group:u,mergedAnnotations:l,middleware:d,payloads:f,successes:h}){if(ci(l,fv))return;let m={tags:[df(u.annotations,D0,()=>u.identifier)],operationId:df(o.annotations,D8,()=>u.topLevel?o.name:`${u.identifier}.${o.name}`),parameters:[],security:[],responses:{}};function y(v,w){for(const[S,{ast:T,description:I}]of v)m.responses[S]||(m.responses[S]={description:Kt(I,w)},T.pipe(mM(D=>!a8(D)),Wr(D=>{const R=fp(D);m.responses[S].content={[R.contentType]:{schema:i(D)}}})))}function g(v,w){if(ft(v)){const S=i(v.value.ast);"properties"in S&&Object.entries(S.properties).forEach(([T,I])=>{m.parameters.push({name:T,in:w,schema:I,required:S.required.includes(T),...I.description!==void 0?{description:I.description}:void 0})})}}Bn(o.annotations,wh,v=>{m.description=v}),Bn(o.annotations,dv,v=>{m.summary=v}),Bn(o.annotations,B8,v=>{m.deprecated=v}),Bn(o.annotations,lv,v=>{m.externalDocs=v}),d.forEach(v=>{if(kR(v))for(const[w,S]of Object.entries(v.security))a(w,S),m.security.push({[w]:[]})});const p=ov(o.method);if(p&&f.size>0){const v={};f.forEach(({ast:w},S)=>{v[S]={schema:i(w)}}),m.requestBody={content:v,required:!0}}g(o.pathSchema,"path"),p||g(o.payloadSchema,"query"),g(o.headersSchema,"header"),g(o.urlParamsSchema,"query"),y(h,()=>"Success"),y(c,()=>"Error");const _=o.path.replace(/:(\w+)\??/g,"{$1}"),k=o.method.toLowerCase();s.paths[_]||(s.paths[_]={}),Bn(o.annotations,$0,v=>{Object.assign(m,v)}),Bn(o.annotations,M0,v=>{m=v(m)}),s.paths[_][k]=m}}),Bn(e.annotations,$0,o=>{Object.assign(s,o)}),Bn(e.annotations,M0,o=>{s=o(s)}),ER.set(e,s),s},Ige=e=>{const t={};switch(Bn(e.annotations,wh,n=>{t.description=n}),e._tag){case"Basic":return{...t,type:"http",scheme:"basic"};case"Bearer":{const n=Wo(e.annotations,F8).pipe(Wr(r=>({bearerFormat:r})),Pr);return{...t,type:"http",scheme:"bearer",...n}}case"ApiKey":return{...t,type:"apiKey",name:e.key,in:e.in}}},wR=Symbol.for("@effect/platform/HttpApiEndpoint"),Age={[wR]:wR,pipe(){return Se(this,arguments)},addSuccess(e,t){return e=t?.status?e.annotations(Ei({status:t.status})):e,Cs({...this,successSchema:this.successSchema===sv?e:To(this.successSchema,e)})},addError(e,t){return Cs({...this,errorSchema:To(this.errorSchema,t?.status?e.annotations(Ei({status:t.status})):e)})},setPayload(e){return Cs({...this,payloadSchema:ye(e)})},setPath(e){return Cs({...this,pathSchema:ye(e)})},setUrlParams(e){return Cs({...this,urlParamsSchema:ye(e)})},setHeaders(e){return Cs({...this,headersSchema:ye(e)})},prefix(e){return Cs({...this,path:wge(this.path,e)})},middleware(e){return Cs({...this,errorSchema:To(this.errorSchema,e.failure),middlewares:new Set([...this.middlewares,e])})},annotate(e,t){return Cs({...this,annotations:ls(this.annotations,e,t)})},annotateContext(e){return Cs({...this,annotations:Xr(this.annotations,e)})}},Cs=e=>Object.assign(Object.create(Age),e),k1=e=>(t,...n)=>n.length===1?Cs({name:t,path:n[0],method:e,pathSchema:fe(),urlParamsSchema:fe(),payloadSchema:fe(),headersSchema:fe(),successSchema:sv,errorSchema:dm,annotations:gi(),middlewares:new Set}):(r,...s)=>{let i=r[0].replace(":","::"),a=fe();if(s.length>0){const o={};for(let c=0;c<s.length;c++){const u=s[c],l=Whe(u.ast)??String(c),d=u.ast._tag==="PropertySignatureTransformation"&&u.ast.from.isOptional||u.ast._tag==="PropertySignatureDeclaration"&&u.ast.isOptional;o[l]=u,i+=`:${l}${d?"?":""}${r[c+1].replace(":","::")}`}a=ye(ce(o))}return Cs({name:t,path:i,method:e,pathSchema:a,urlParamsSchema:fe(),payloadSchema:fe(),headersSchema:fe(),successSchema:sv,errorSchema:dm,annotations:gi(),middlewares:new Set})},Kn=k1("GET"),fs=k1("POST"),qd=k1("PATCH"),Gd=k1("DELETE"),SR=Symbol.for("@effect/platform/HttpApiGroup"),Cge={[SR]:SR,add(e){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:{...this.endpoints,[e.name]:e},errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},addError(e,t){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:To(this.errorSchema,t?.status?e.annotations(Ei({status:t.status})):e),annotations:this.annotations,middlewares:this.middlewares})},prefix(e){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:bl(this.endpoints,t=>t.prefix(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},middleware(e){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:To(this.errorSchema,e.failure),annotations:this.annotations,middlewares:new Set([...this.middlewares,e])})},middlewareEndpoints(e){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:bl(this.endpoints,t=>t.middleware(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},annotateContext(e){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:this.errorSchema,annotations:Xr(this.annotations,e),middlewares:this.middlewares})},annotate(e,t){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:this.errorSchema,annotations:ls(this.annotations,e,t),middlewares:this.middlewares})},annotateEndpointsContext(e){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:bl(this.endpoints,t=>t.annotateContext(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},annotateEndpoints(e,t){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:bl(this.endpoints,n=>n.annotate(e,t)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},pipe(){return Se(this,arguments)}},Ni=e=>{function t(){}return Object.setPrototypeOf(t,Cge),Object.assign(t,e)},ec=(e,t)=>Ni({identifier:e,topLevel:!1,endpoints:zW(),errorSchema:dm,annotations:gi(),middlewares:new Set}),nt=ct,ie=Symbol.for("drizzle:entityKind");function Gt(e,t){if(!e||typeof e!="object")return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,ie))throw new Error(`Class "${t.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let n=Object.getPrototypeOf(e).constructor;if(n)for(;n;){if(ie in n&&n[ie]===t[ie])return!0;n=Object.getPrototypeOf(n)}return!1}const Qc=Symbol.for("drizzle:Name"),j0=Symbol.for("drizzle:Schema"),hv=Symbol.for("drizzle:Columns"),vR=Symbol.for("drizzle:ExtraConfigColumns"),F0=Symbol.for("drizzle:OriginalName"),fE=Symbol.for("drizzle:BaseName"),mm=Symbol.for("drizzle:IsAlias"),xR=Symbol.for("drizzle:ExtraConfigBuilder"),z8=Symbol.for("drizzle:IsDrizzleTable");var qn=class{static[ie]="Table";static Symbol={Name:Qc,Schema:j0,OriginalName:F0,Columns:hv,ExtraConfigColumns:vR,BaseName:fE,IsAlias:mm,ExtraConfigBuilder:xR};[Qc];[F0];[j0];[hv];[vR];[fE];[mm]=!1;[z8]=!0;[xR]=void 0;constructor(e,t,n){this[Qc]=this[F0]=e,this[j0]=t,this[fE]=n}};function Pge(e){return typeof e=="object"&&e!==null&&z8 in e}function Nge(e){return e[Qc]}const Rge=Symbol.for("drizzle:OriginalColumn");var pm=class{static[ie]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;length;isLengthExact;isAlias;config;table;onInit(){}constructor(e,t){this.config=t,this.onInit(),this.table=e,this.name=t.name,this.isAlias=!1,this.keyAsName=t.keyAsName,this.notNull=t.notNull,this.default=t.default,this.defaultFn=t.defaultFn,this.onUpdateFn=t.onUpdateFn,this.hasDefault=t.hasDefault,this.primary=t.primaryKey,this.isUnique=t.isUnique,this.uniqueName=t.uniqueName,this.uniqueType=t.uniqueType,this.dataType=t.dataType,this.columnType=t.columnType,this.generated=t.generated,this.generatedIdentity=t.generatedIdentity,this.length=t.length,this.isLengthExact=t.isLengthExact}mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}[Rge](){return this}};function Oge(e){return e.table}var U8=class{static[ie]="Subquery";constructor(e,t,n,r=!1,s=[]){this._={brand:"Subquery",sql:e,selectedFields:t,alias:n,isWith:r,usedTables:s}}};function Lge(e,...t){return e(...t)}const Dge={startActiveSpan(e,t){return t()}},Xs=Symbol.for("drizzle:ViewBaseConfig");function $ge(e){return e!=null&&typeof e.getSQL=="function"}function Mge(e){const t={sql:"",params:[]};for(const n of e)t.sql+=n.sql,t.params.push(...n.params),n.typings?.length&&(t.typings||(t.typings=[]),t.typings.push(...n.typings));return t}var Ys=class{static[ie]="StringChunk";value;constructor(e){this.value=Array.isArray(e)?e:[e]}getSQL(){return new Yn([this])}},Yn=class Wf{static[ie]="SQL";decoder=V8;shouldInlineParams=!1;usedTables=[];constructor(t){this.queryChunks=t;for(const n of t)if(Gt(n,qn)){const r=n[qn.Symbol.Schema];this.usedTables.push(r===void 0?n[qn.Symbol.Name]:r+"."+n[qn.Symbol.Name])}}append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return Dge.startActiveSpan("drizzle.buildSQL",n=>{const r=this.buildQueryFromSourceParams(this.queryChunks,t);return n?.setAttributes({"drizzle.query.text":r.sql,"drizzle.query.params":JSON.stringify(r.params)}),r})}buildQueryFromSourceParams(t,n){const r=Object.assign({},n,{inlineParams:n.inlineParams||this.shouldInlineParams,paramStartIndex:n.paramStartIndex||{value:0}}),{casing:s,escapeName:i,escapeParam:a,prepareTyping:o,inlineParams:c,paramStartIndex:u,invokeSource:l}=r;return Mge(t.map(d=>{if(Gt(d,Ys))return{sql:d.value.join(""),params:[]};if(Gt(d,mv))return{sql:i(d.value),params:[]};if(d===void 0)return{sql:"",params:[]};if(Array.isArray(d)){const f=[new Ys("(")];for(const[h,m]of d.entries())f.push(m),h<d.length-1&&f.push(new Ys(", "));return f.push(new Ys(")")),this.buildQueryFromSourceParams(f,r)}if(Gt(d,Wf))return this.buildQueryFromSourceParams(d.queryChunks,{...r,inlineParams:c||d.shouldInlineParams});if(Gt(d,qn)){const f=d[qn.Symbol.Schema],h=d[qn.Symbol.Name];return l==="mssql-view-with-schemabinding"?{sql:i(f===void 0?"dbo":f)+"."+i(h),params:[]}:{sql:f===void 0||d[mm]?i(h):i(f)+"."+i(h),params:[]}}if(Gt(d,pm)){const f=s.getColumnCasing(d);if(n.invokeSource==="indexes")return{sql:i(f),params:[]};const h=l==="mssql-check"?void 0:d.table[qn.Symbol.Schema];return{sql:d.isAlias?i(d.name):d.table[mm]||h===void 0?i(d.table[qn.Symbol.Name])+"."+i(f):i(h)+"."+i(d.table[qn.Symbol.Name])+"."+i(f),params:[]}}if(Gt(d,K8)){const f=d[Xs].schema,h=d[Xs].name;return{sql:f===void 0||d[Xs].isAlias?i(h):i(f)+"."+i(h),params:[]}}if(Gt(d,q8)){if(Gt(d.value,pv))return{sql:a(u.value++,d),params:[d],typings:["none"]};const f=d.value===null?null:d.encoder.mapToDriverValue(d.value);if(Gt(f,Wf))return this.buildQueryFromSourceParams([f],r);if(c)return{sql:this.mapInlineParam(f,r),params:[]};let h=["none"];return o&&(h=[o(d.encoder)]),{sql:a(u.value++,f),params:[f],typings:h}}return Gt(d,pv)?{sql:a(u.value++,d),params:[d],typings:["none"]}:Gt(d,Wf.Aliased)&&d.fieldAlias!==void 0?{sql:(d.origin!==void 0?i(d.origin)+".":"")+i(d.fieldAlias),params:[]}:Gt(d,U8)?d._.isWith?{sql:i(d._.alias),params:[]}:this.buildQueryFromSourceParams([new Ys("("),d._.sql,new Ys(") "),new mv(d._.alias)],r):typeof d=="function"&&"enumName"in d?"schema"in d&&d.schema?{sql:i(d.schema)+"."+i(d.enumName),params:[]}:{sql:i(d.enumName),params:[]}:$ge(d)?d.shouldOmitSQLParens?.()?this.buildQueryFromSourceParams([d.getSQL()],r):this.buildQueryFromSourceParams([new Ys("("),d.getSQL(),new Ys(")")],r):c?{sql:this.mapInlineParam(d,r),params:[]}:{sql:a(u.value++,d),params:[d],typings:["none"]}}))}mapInlineParam(t,{escapeString:n}){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean"||typeof t=="bigint")return t.toString();if(typeof t=="string")return n(t);if(typeof t=="object"){const r=t.toString();return n(r==="[object Object]"?JSON.stringify(t):r)}throw new Error("Unexpected param value: "+t)}getSQL(){return this}as(t){return t===void 0?this:new Wf.Aliased(this,t)}mapWith(t){return this.decoder=typeof t=="function"?{mapFromDriverValue:t}:t,this}inlineParams(){return this.shouldInlineParams=!0,this}if(t){return t?this:void 0}},mv=class{static[ie]="Name";brand;constructor(e){this.value=e}getSQL(){return new Yn([this])}};const V8={mapFromDriverValue:e=>e},H8={mapToDriverValue:e=>e};({...V8,...H8});var q8=class{static[ie]="Param";brand;constructor(e,t=H8){this.value=e,this.encoder=t}getSQL(){return new Yn([this])}};function Vt(e,...t){const n=[];(t.length>0||e.length>0&&e[0]!=="")&&n.push(new Ys(e[0]));for(const[r,s]of t.entries())n.push(s,new Ys(e[r+1]));return new Yn(n)}(function(e){function t(){return new Yn([])}e.empty=t;function n(c){return new Yn(c)}e.fromList=n;function r(c){return new Yn([new Ys(c)])}e.raw=r;function s(c,u){const l=[];for(const[d,f]of c.entries())d>0&&u!==void 0&&l.push(u),l.push(f);return new Yn(l)}e.join=s;function i(c){return new mv(c)}e.identifier=i;function a(c){return new pv(c)}e.placeholder=a;function o(c,u){return new q8(c,u)}e.param=o})(Vt||(Vt={}));(function(e){class t{static[ie]="SQL.Aliased";isSelectionField=!1;origin;constructor(r,s){this.sql=r,this.fieldAlias=s}getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})(Yn||(Yn={}));var pv=class{static[ie]="Placeholder";constructor(e){this.name=e}getSQL(){return new Yn([this])}};const G8=Symbol.for("drizzle:IsDrizzleView");var K8=class{static[ie]="View";[Xs];[G8]=!0;get[Qc](){return this[Xs].name}get[j0](){return this[Xs].schema}get[mm](){return this[Xs].isAlias}get[F0](){return this[Xs].originalName}get[hv](){return this[Xs].selectedFields}constructor({name:e,schema:t,selectedFields:n,query:r}){this[Xs]={name:e,originalName:e,schema:t,selectedFields:n,query:r,isExisting:!r,isAlias:!1}}};function jge(e){return typeof e=="object"&&e!==null&&G8 in e}pm.prototype.getSQL=function(){return new Yn([this])};U8.prototype.getSQL=function(){return new Yn([this])};function E1(e){return Gt(e,qn)?e[qn.Symbol.Columns]:Gt(e,K8)?e[Xs].selectedFields:e._.selectedFields}function er(e,t){return{name:typeof e=="string"&&e.length>0?e:"",config:typeof e=="object"?e:t}}typeof TextDecoder>"u"||new TextDecoder;function Fge(e){return(typeof e=="object"&&e!==null||typeof e=="function")&&"enumValues"in e&&Array.isArray(e.enumValues)&&e.enumValues.length>0}const Ft={INT8_MIN:-128,INT8_MAX:127,INT8_UNSIGNED_MAX:255,INT16_MIN:-32768,INT16_MAX:32767,INT16_UNSIGNED_MAX:65535,INT24_MIN:-8388608,INT24_MAX:8388607,INT24_UNSIGNED_MAX:16777215,INT32_MIN:-2147483648,INT32_MAX:2147483647,INT32_UNSIGNED_MAX:4294967295,INT48_MIN:-0x800000000000,INT48_MAX:0x7fffffffffff,INT48_UNSIGNED_MAX:0xffffffffffff,INT64_MIN:-9223372036854775808n,INT64_MAX:9223372036854775807n,INT64_UNSIGNED_MAX:18446744073709551615n};function Bge(e){const[t,n]=e.dataType.split(" ");return{type:t,constraint:n}}const zge=Hs($,ct,qt,IB),Uge=Hs(zge,f1({key:$,value:Fo}),Qe(Fo)),Vge=cfe(Buffer);function W8(e){let t;const n=e.dimensions;if(typeof n=="number"&&n>0)return Gge(e,n);const{type:r,constraint:s}=Bge(e);switch(r){case"array":t=Q8(e,s);break;case"object":t=X8(e,s);break;case"number":t=J8(e,s);break;case"bigint":t=Y8(e,s);break;case"boolean":t=qt;break;case"string":t=Z8(e,s);break;case"custom":t=Fo;break;default:t=Fo}return t}function J8(e,t){let n,r,s=!1;switch(t){case"int8":n=Ft.INT8_MIN,r=Ft.INT8_MAX,s=!0;break;case"uint8":n=0,r=Ft.INT8_UNSIGNED_MAX,s=!0;break;case"int16":n=Ft.INT16_MIN,r=Ft.INT16_MAX,s=!0;break;case"uint16":n=0,r=Ft.INT16_UNSIGNED_MAX,s=!0;break;case"int24":n=Ft.INT24_MIN,r=Ft.INT24_MAX,s=!0;break;case"uint24":n=0,r=Ft.INT24_UNSIGNED_MAX,s=!0;break;case"int32":n=Ft.INT32_MIN,r=Ft.INT32_MAX,s=!0;break;case"uint32":n=0,r=Ft.INT32_UNSIGNED_MAX,s=!0;break;case"int53":n=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER,s=!0;break;case"uint53":n=0,r=Number.MAX_SAFE_INTEGER,s=!0;break;case"float":n=Ft.INT24_MIN,r=Ft.INT24_MAX;break;case"ufloat":n=0,r=Ft.INT24_UNSIGNED_MAX;break;case"double":n=Ft.INT48_MIN,r=Ft.INT48_MAX;break;case"udouble":n=0,r=Ft.INT48_UNSIGNED_MAX;break;case"year":n=1901,r=2155,s=!0;break;case"unsigned":n=0,r=Number.MAX_SAFE_INTEGER;break;default:n=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER;break}let i=s?zfe:ct;return i=i.pipe($fe(n),Bfe(r)),i}const Hge=HB.pipe(m1(Ft.INT64_MIN),p1(Ft.INT64_MAX)),qge=HB.pipe(m1(0n),p1(Ft.INT64_UNSIGNED_MAX));function Y8(e,t){let n,r;switch(t){case"int64":n=Ft.INT64_MIN,r=Ft.INT64_MAX;break;case"uint64":n=0n,r=Ft.INT64_UNSIGNED_MAX;break}let s=zI;return n!==void 0&&(s=s.pipe(m1(n))),r!==void 0&&(s=s.pipe(p1(r))),s}function Gge(e,t){const[n,r]=e.dataType.split(" ");let s;switch(n){case"number":s=J8(e,r);break;case"bigint":s=Y8(e,r);break;case"boolean":s=qt;break;case"string":s=Z8(e,r);break;case"object":s=X8(e,r);break;case"array":s=Q8(e,r);break;default:s=Fo}let i=Qe(s);for(let a=1;a<t;a++)i=Qe(i);return i}function Q8(e,t){switch(t){case"geometry":case"point":return WS(ct,ct);case"line":return WS(ct,ct,ct);case"vector":case"halfvector":{const n=e.length,r=Qe(ct);return n?r.pipe(iE(n)):r}case"int64vector":{const n=e.length,r=Qe(zI.pipe(m1(Ft.INT64_MIN),p1(Ft.INT64_MAX)));return n?r.pipe(iE(n)):r}case"basecolumn":{const n=e.baseColumn;if(n){const r=W8(n),s=e.length,i=Qe(r);return s?i.pipe(iE(s)):i}return Qe(Fo)}default:return Qe(Fo)}}function X8(e,t){switch(t){case"buffer":return Vge;case"date":return Jfe;case"geometry":case"point":return ce({x:ct,y:ct});case"json":return Uge;case"line":return ce({a:ct,b:ct,c:ct});default:return ffe}}function Z8(e,t){const{name:n,length:r,isLengthExact:s}=e;let i;if(t==="binary"&&(i=/^[01]*$/),t==="uuid")return Lfe;if(t==="enum"){const o=e.enumValues;if(!o)throw new Error(`Column "${Nge(Oge(e))}"."${n}" is of 'enum' type, but lacks enum values`);return Le(...o)}if(t==="int64")return Hge;if(t==="uint64")return qge;let a=$;return a=i?a.pipe(UB(i)):a,r&&s?a.pipe(Afe(r)):r?a.pipe(xfe(r)):a}function ez(e){return(typeof e!="object"||e===null)&&typeof e!="function"?!1:!Mr(e)&&"from"in e&&Mr(e.from)}function TR(e){return Mr(e)?!0:ez(e)}function w1(e,t,n){const r={};for(const[s,i]of Object.entries(e)){if(!Gt(i,pm)&&!Gt(i,Yn)&&!Gt(i,Yn.Aliased)&&typeof i=="object"){r[s]=w1(Pge(i)||jge(i)?E1(i):i,t[s]??{},n);continue}const a=t[s];if(a!==void 0&&!(typeof a=="function"&&!TR(a))){r[s]=a;continue}const o=Gt(i,pm)?i:void 0,c=o?W8(o):Fo,u=TR(a)||typeof a!="function"?c:a(c),l=ez(u)?u.from:u;n.never(o)||(r[s]=l,o&&(n.nullable(o)&&(r[s]=ee(r[s])),n.optional(o)&&(r[s]=Z(CB(r[s])))))}return ce(r)}function Kge(e){return Le(...e.enumValues)}const Wge={never:()=>!1,optional:()=>!1,nullable:e=>!e.notNull},Jge={never:e=>e?.generated?.type==="always"||e?.generatedIdentity?.type==="always"||"identity"in(e??{})&&typeof e?.identity<"u",optional:e=>!e.notNull||e.notNull&&e.hasDefault,nullable:e=>!e.notNull},Yge={never:e=>e?.generated?.type==="always"||e?.generatedIdentity?.type==="always"||"identity"in(e??{})&&typeof e?.identity<"u",optional:()=>!0,nullable:e=>!e.notNull},hr=(e,t)=>Fge(e)?Kge(e):w1(E1(e),t??{},Wge),tc=(e,t)=>w1(E1(e),t??{},Jge),nc=(e,t)=>w1(E1(e),t??{},Yge);function IR(e,t,n){for(let r=t;r<e.length;r++){const s=e[r];if(s==="\\"){r++;continue}if(s==='"')return[e.slice(t,r).replace(/\\/g,""),r+1];if(!n&&(s===","||s==="}"))return[e.slice(t,r).replace(/\\/g,""),r]}return[e.slice(t).replace(/\\/g,""),e.length]}function tz(e,t=0){const n=[];let r=t,s=!1;for(;r<e.length;){const i=e[r];if(i===","){(s||r===t)&&n.push(""),s=!0,r++;continue}if(s=!1,i==="\\"){r+=2;continue}if(i==='"'){const[c,u]=IR(e,r+1,!0);n.push(c),r=u;continue}if(i==="}")return[n,r+1];if(i==="{"){const[c,u]=tz(e,r+1);n.push(c),r=u;continue}const[a,o]=IR(e,r,!1);n.push(a),r=o}return[n,r]}function nz(e){const[t]=tz(e,1);return t}function rz(e){return`{${e.map(t=>Array.isArray(t)?rz(t):typeof t=="string"?`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${t}`).join(",")}}`}var Qge=class{static[ie]="PgForeignKeyBuilder";reference;_onUpdate="no action";_onDelete="no action";constructor(e,t){this.reference=()=>{const{name:n,columns:r,foreignColumns:s}=e();return{name:n,columns:r,foreignTable:s[0].table,foreignColumns:s}},t&&(this._onUpdate=t.onUpdate,this._onDelete=t.onDelete)}onUpdate(e){return this._onUpdate=e===void 0?"no action":e,this}onDelete(e){return this._onDelete=e===void 0?"no action":e,this}build(e){return new Xge(e,this)}},Xge=class{static[ie]="PgForeignKey";reference;onUpdate;onDelete;name;constructor(e,t){this.table=e,this.reference=t.reference,this.onUpdate=t._onUpdate,this.onDelete=t._onDelete}getName(){const{name:e,columns:t,foreignColumns:n}=this.reference(),r=t.map(a=>a.name),s=n.map(a=>a.name),i=[this.table[Qc],...r,n[0].table[Qc],...s];return e??`${i.join("_")}_fk`}isNameExplicit(){return!!this.reference().name}},kt=class{static[ie]="PgColumnBuilder";foreignKeyConfigs=[];config;constructor(e,t,n){this.config={name:e,keyAsName:e==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:t,columnType:n,generated:void 0,defaultFn:void 0,onUpdateFn:void 0,generatedIdentity:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(e){return this.config.default=e,this.config.hasDefault=!0,this}$defaultFn(e){return this.config.defaultFn=e,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(e){return this.config.onUpdateFn=e,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(e){this.config.name===""&&(this.config.name=e)}array(e){const t=e??"[]";return this.config.dimensions=t.length/2,this}references(e,t={}){return this.foreignKeyConfigs.push({ref:e,config:t}),this}unique(e,t){return this.config.isUnique=!0,this.config.uniqueName=e,this.config.uniqueType=t?.nulls,this}generatedAlwaysAs(e){return this.config.generated={as:e,type:"always",mode:"stored"},this}buildForeignKeys(e,t){return this.foreignKeyConfigs.map(({ref:n,config:r})=>Lge((s,i)=>{const a=new Qge(()=>{const o=s();return{name:i.name,columns:[e],foreignColumns:[o]}});return i.onUpdate&&a.onUpdate(i.onUpdate),i.onDelete&&a.onDelete(i.onDelete),a.build(t)},n,r))}buildExtraConfigColumn(e){return new B0(e,{...this.config,dimensions:this.config.dimensions??0})}},We=class extends pm{static[ie]="PgColumn";table;dimensions;constructor(e,t){if(super(e,t),this.table=e,this.dimensions=t.dimensions??0,this.dimensions){const n=this.mapFromDriverValue.bind(this),r=this.mapToDriverValue.bind(this);this.mapFromDriverValue=s=>{if(s===null)return s;const i=typeof s=="string"?nz(s):s;return this.mapArrayElements(i,n,this.dimensions)},this.mapToDriverValue=s=>s===null?s:rz(this.mapArrayElements(s,r,this.dimensions))}}mapArrayElements(e,t,n){return n>0&&Array.isArray(e)?e.map(r=>r===null?null:this.mapArrayElements(r,t,n-1)):t(e)}},B0=class extends We{static[ie]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op(e){return this.indexConfig.opClass=e,this}},Yu=class{static[ie]="IndexedColumn";constructor(e,t,n,r){this.name=e,this.keyAsName=t,this.type=n,this.indexConfig=r}name;keyAsName;type;indexConfig},hp=class extends kt{static[ie]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity(e){if(e){const{name:t,...n}=e;this.config.generatedIdentity={type:"always",sequenceName:t,sequenceOptions:n}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(e){if(e){const{name:t,...n}=e;this.config.generatedIdentity={type:"byDefault",sequenceName:t,sequenceOptions:n}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}},Zge=class extends hp{static[ie]="PgBigInt53Builder";constructor(e){super(e,"number int53","PgBigInt53")}build(e){return new e0e(e,this.config)}},e0e=class extends We{static[ie]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(e){return typeof e=="number"?e:Number(e)}},t0e=class extends hp{static[ie]="PgBigInt64Builder";constructor(e){super(e,"bigint int64","PgBigInt64")}build(e){return new n0e(e,this.config)}},n0e=class extends We{static[ie]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(e){return BigInt(e)}},r0e=class extends hp{static[ie]="PgBigIntStringBuilder";constructor(e){super(e,"string int64","PgBigIntString")}build(e){return new s0e(e,this.config)}},s0e=class extends We{static[ie]="PgBigIntString";getSQLType(){return"bigint"}mapFromDriverValue(e){return typeof e=="string"?e:String(e)}};function dt(e,t){const{name:n,config:r}=er(e,t);return r.mode==="number"?new Zge(n):r.mode==="string"?new r0e(n):new t0e(n)}var i0e=class extends kt{static[ie]="PgBigSerial53Builder";constructor(e){super(e,"number int53","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new a0e(e,this.config)}},a0e=class extends We{static[ie]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(e){return typeof e=="number"?e:Number(e)}},o0e=class extends kt{static[ie]="PgBigSerial64Builder";constructor(e){super(e,"bigint int64","PgBigSerial64"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new c0e(e,this.config)}},c0e=class extends We{static[ie]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(e){return BigInt(e)}};function u0e(e,t){const{name:n,config:r}=er(e,t);return r.mode==="number"?new i0e(n):new o0e(n)}var l0e=class extends kt{static[ie]="PgBooleanBuilder";constructor(e){super(e,"boolean","PgBoolean")}build(e){return new d0e(e,this.config)}},d0e=class extends We{static[ie]="PgBoolean";getSQLType(){return"boolean"}};function Kd(e){return new l0e(e??"")}var f0e=class extends kt{static[ie]="PgCharBuilder";constructor(e,t){super(e,t.enum?.length?"string enum":"string","PgChar"),this.config.length=t.length??1,this.config.setLength=t.length!==void 0,this.config.enumValues=t.enum}build(e){return new h0e(e,this.config)}},h0e=class extends We{static[ie]="PgChar";enumValues;setLength;constructor(e,t){super(e,t),this.enumValues=t.enumValues,this.setLength=t.setLength}getSQLType(){return this.setLength?`char(${this.length})`:"char"}};function m0e(e,t={}){const{name:n,config:r}=er(e,t);return new f0e(n,r)}var p0e=class extends kt{static[ie]="PgCidrBuilder";constructor(e){super(e,"string cidr","PgCidr")}build(e){return new g0e(e,this.config)}},g0e=class extends We{static[ie]="PgCidr";getSQLType(){return"cidr"}};function b0e(e){return new p0e(e??"")}var y0e=class extends kt{static[ie]="PgCustomColumnBuilder";constructor(e,t,n){super(e,"custom","PgCustomColumn"),this.config.fieldConfig=t,this.config.customTypeParams=n}build(e){return new _0e(e,this.config)}},_0e=class extends We{static[ie]="PgCustomColumn";sqlName;mapTo;mapFrom;mapJson;forJsonSelect;constructor(e,t){if(super(e,t),this.sqlName=t.customTypeParams.dataType(t.fieldConfig),this.mapTo=t.customTypeParams.toDriver,this.mapFrom=t.customTypeParams.fromDriver,this.mapJson=t.customTypeParams.fromJson,this.forJsonSelect=t.customTypeParams.forJsonSelect,this.dimensions){const n=r=>typeof this.mapJson=="function"?this.mapJson(r):typeof this.mapFrom=="function"?this.mapFrom(r):r;this.mapFromJsonValue=r=>{if(r===null)return r;const s=typeof r=="string"?nz(r):r;return this.mapJsonArrayElements(s,n,this.dimensions)}}}mapJsonArrayElements(e,t,n){return n>0&&Array.isArray(e)?e.map(r=>r===null?null:this.mapJsonArrayElements(r,t,n-1)):t(e)}getSQLType(){return this.sqlName}mapFromDriverValue(e){return typeof this.mapFrom=="function"?this.mapFrom(e):e}mapFromJsonValue(e){return typeof this.mapJson=="function"?this.mapJson(e):this.mapFromDriverValue(e)}jsonSelectIdentifier(e,t,n){if(typeof this.forJsonSelect=="function")return this.forJsonSelect(e,t,n);const r=this.getSQLType().toLowerCase(),s=r.indexOf("(");switch(s+1?r.slice(0,s):r){case"bytea":case"geometry":case"timestamp":case"numeric":case"bigint":{const i="[]".repeat(n??0);return t`${e}::text${t.raw(i).if(n)}`}default:return e}}mapToDriverValue(e){return typeof this.mapTo=="function"?this.mapTo(e):e}};function k0e(e){return(t,n)=>{const{name:r,config:s}=er(t,n);return new y0e(r,s,e)}}var mp=class extends kt{static[ie]="PgDateColumnBaseBuilder";defaultNow(){return this.default(Vt`now()`)}},E0e=class extends mp{static[ie]="PgDateBuilder";constructor(e){super(e,"object date","PgDate")}build(e){return new w0e(e,this.config)}},w0e=class extends We{static[ie]="PgDate";getSQLType(){return"date"}mapFromDriverValue(e){return typeof e=="string"?new Date(e):e}mapToDriverValue(e){return typeof e=="string"?e:e.toISOString()}},S0e=class extends mp{static[ie]="PgDateStringBuilder";constructor(e){super(e,"string date","PgDateString")}build(e){return new v0e(e,this.config)}},v0e=class extends We{static[ie]="PgDateString";getSQLType(){return"date"}mapFromDriverValue(e){return typeof e=="string"?e:e.toISOString().slice(0,-14)}mapToDriverValue(e){return typeof e=="string"?e:e.toISOString()}};function x0e(e,t){const{name:n,config:r}=er(e,t);return r?.mode==="date"?new E0e(n):new S0e(n)}var T0e=class extends kt{static[ie]="PgDoublePrecisionBuilder";constructor(e){super(e,"number double","PgDoublePrecision")}build(e){return new I0e(e,this.config)}},I0e=class extends We{static[ie]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(e){return typeof e=="string"?Number.parseFloat(e):e}};function A0e(e){return new T0e(e??"")}var C0e=class extends kt{static[ie]="PgInetBuilder";constructor(e){super(e,"string inet","PgInet")}build(e){return new P0e(e,this.config)}},P0e=class extends We{static[ie]="PgInet";getSQLType(){return"inet"}};function N0e(e){return new C0e(e??"")}var R0e=class extends hp{static[ie]="PgIntegerBuilder";constructor(e){super(e,"number int32","PgInteger")}build(e){return new O0e(e,this.config)}},O0e=class extends We{static[ie]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(e){return typeof e=="string"?Number.parseInt(e):e}};function L0e(e){return new R0e(e??"")}var D0e=class extends kt{static[ie]="PgIntervalBuilder";constructor(e,t){super(e,"string interval","PgInterval"),this.config.intervalConfig=t}build(e){return new $0e(e,this.config)}},$0e=class extends We{static[ie]="PgInterval";fields;precision;constructor(e,t){super(e,t),this.fields=t.intervalConfig.fields,this.precision=t.intervalConfig.precision}getSQLType(){return`interval${this.fields?` ${this.fields}`:""}${this.precision?`(${this.precision})`:""}`}};function M0e(e,t={}){const{name:n,config:r}=er(e,t);return new D0e(n,r)}var j0e=class extends kt{static[ie]="PgJsonBuilder";constructor(e){super(e,"object json","PgJson")}build(e){return new F0e(e,this.config)}},F0e=class extends We{static[ie]="PgJson";constructor(e,t){super(e,t)}getSQLType(){return"json"}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e}};function B0e(e){return new j0e(e??"")}var z0e=class extends kt{static[ie]="PgJsonbBuilder";constructor(e){super(e,"object json","PgJsonb")}build(e){return new U0e(e,this.config)}},U0e=class extends We{static[ie]="PgJsonb";constructor(e,t){super(e,t)}getSQLType(){return"jsonb"}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e}};function V0e(e){return new z0e(e??"")}var H0e=class extends kt{static[ie]="PgLineBuilder";constructor(e){super(e,"array line","PgLine")}build(e){return new q0e(e,this.config)}},q0e=class extends We{static[ie]="PgLine";mode="tuple";getSQLType(){return"line"}mapFromDriverValue(e){const[t,n,r]=e.slice(1,-1).split(",");return[Number.parseFloat(t),Number.parseFloat(n),Number.parseFloat(r)]}mapToDriverValue(e){return`{${e[0]},${e[1]},${e[2]}}`}},G0e=class extends kt{static[ie]="PgLineABCBuilder";constructor(e){super(e,"object line","PgLineABC")}build(e){return new K0e(e,this.config)}},K0e=class extends We{static[ie]="PgLineABC";mode="abc";getSQLType(){return"line"}mapFromDriverValue(e){const[t,n,r]=e.slice(1,-1).split(",");return{a:Number.parseFloat(t),b:Number.parseFloat(n),c:Number.parseFloat(r)}}mapToDriverValue(e){return`{${e.a},${e.b},${e.c}}`}};function W0e(e,t){const{name:n,config:r}=er(e,t);return!r?.mode||r.mode==="tuple"?new H0e(n):new G0e(n)}var J0e=class extends kt{static[ie]="PgMacaddrBuilder";constructor(e){super(e,"string macaddr","PgMacaddr")}build(e){return new Y0e(e,this.config)}},Y0e=class extends We{static[ie]="PgMacaddr";getSQLType(){return"macaddr"}};function Q0e(e){return new J0e(e??"")}var X0e=class extends kt{static[ie]="PgMacaddr8Builder";constructor(e){super(e,"string macaddr8","PgMacaddr8")}build(e){return new Z0e(e,this.config)}},Z0e=class extends We{static[ie]="PgMacaddr8";getSQLType(){return"macaddr8"}};function ebe(e){return new X0e(e??"")}var tbe=class extends kt{static[ie]="PgNumericBuilder";constructor(e,t,n){super(e,"string numeric","PgNumeric"),this.config.precision=t,this.config.scale=n}build(e){return new nbe(e,this.config)}},nbe=class extends We{static[ie]="PgNumeric";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return typeof e=="string"?e:String(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},rbe=class extends kt{static[ie]="PgNumericNumberBuilder";constructor(e,t,n){super(e,"number","PgNumericNumber"),this.config.precision=t,this.config.scale=n}build(e){return new sbe(e,this.config)}},sbe=class extends We{static[ie]="PgNumericNumber";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return typeof e=="number"?e:Number(e)}mapToDriverValue(e){return String(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},ibe=class extends kt{static[ie]="PgNumericBigIntBuilder";constructor(e,t,n){super(e,"bigint int64","PgNumericBigInt"),this.config.precision=t,this.config.scale=n}build(e){return new abe(e,this.config)}},abe=class extends We{static[ie]="PgNumericBigInt";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return BigInt(e)}mapToDriverValue(e){return String(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}};function obe(e,t){const{name:n,config:r}=er(e,t),s=r?.mode;return s==="number"?new rbe(n,r?.precision,r?.scale):s==="bigint"?new ibe(n,r?.precision,r?.scale):new tbe(n,r?.precision,r?.scale)}var cbe=class extends kt{static[ie]="PgPointTupleBuilder";constructor(e){super(e,"array point","PgPointTuple")}build(e){return new ube(e,this.config)}},ube=class extends We{static[ie]="PgPointTuple";mode="tuple";getSQLType(){return"point"}mapFromDriverValue(e){if(typeof e=="string"){const[t,n]=e.slice(1,-1).split(",");return[Number.parseFloat(t),Number.parseFloat(n)]}return[e.x,e.y]}mapToDriverValue(e){return`(${e[0]},${e[1]})`}},lbe=class extends kt{static[ie]="PgPointObjectBuilder";constructor(e){super(e,"object point","PgPointObject")}build(e){return new dbe(e,this.config)}},dbe=class extends We{static[ie]="PgPointObject";mode="xy";getSQLType(){return"point"}mapFromDriverValue(e){if(typeof e=="string"){const[t,n]=e.slice(1,-1).split(",");return{x:Number.parseFloat(t),y:Number.parseFloat(n)}}return e}mapToDriverValue(e){return`(${e.x},${e.y})`}};function fbe(e,t){const{name:n,config:r}=er(e,t);return!r?.mode||r.mode==="tuple"?new cbe(n):new lbe(n)}function hbe(e){const t=[];for(let n=0;n<e.length;n+=2)t.push(Number.parseInt(e.slice(n,n+2),16));return new Uint8Array(t)}function AR(e,t){const n=new ArrayBuffer(8),r=new DataView(n);for(let s=0;s<8;s++)r.setUint8(s,e[t+s]);return r.getFloat64(0,!0)}function sz(e){const t=hbe(e);let n=0;const r=t[n];n+=1;const s=new DataView(t.buffer),i=s.getUint32(n,r===1);n+=4;let a;if(i&536870912&&(a=s.getUint32(n,r===1),n+=4),(i&65535)===1){const o=AR(t,n);n+=8;const c=AR(t,n);return n+=8,{srid:a,point:[o,c]}}throw new Error("Unsupported geometry type")}var mbe=class extends kt{static[ie]="PgGeometryBuilder";constructor(e,t){super(e,"array geometry","PgGeometry"),this.config.srid=t}build(e){return new pbe(e,this.config)}},pbe=class extends We{static[ie]="PgGeometry";srid=this.config.srid;mode="tuple";getSQLType(){return`geometry(point${this.srid===void 0?"":`,${this.srid}`})`}mapFromDriverValue(e){return typeof e!="string"?e:sz(e).point}mapToDriverValue(e){return`point(${e[0]} ${e[1]})`}},gbe=class extends kt{static[ie]="PgGeometryObjectBuilder";constructor(e,t){super(e,"object geometry","PgGeometryObject"),this.config.srid=t}build(e){return new bbe(e,this.config)}},bbe=class extends We{static[ie]="PgGeometryObject";srid=this.config.srid;mode="object";getSQLType(){return`geometry(point${this.srid===void 0?"":`,${this.srid}`})`}mapFromDriverValue(e){const t=sz(e);return{x:t.point[0],y:t.point[1]}}mapToDriverValue(e){return`point(${e.x} ${e.y})`}};function ybe(e,t){const{name:n,config:r}=er(e,t);return!r?.mode||r.mode==="tuple"?new mbe(n,r?.srid):new gbe(n,r?.srid)}var _be=class extends kt{static[ie]="PgRealBuilder";constructor(e,t){super(e,"number float","PgReal"),this.config.length=t}build(e){return new kbe(e,this.config)}},kbe=class extends We{static[ie]="PgReal";constructor(e,t){super(e,t)}getSQLType(){return"real"}mapFromDriverValue(e){return typeof e=="string"?Number.parseFloat(e):e}};function Ebe(e){return new _be(e??"")}var wbe=class extends kt{static[ie]="PgSerialBuilder";constructor(e){super(e,"number int32","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new Sbe(e,this.config)}},Sbe=class extends We{static[ie]="PgSerial";getSQLType(){return"serial"}};function vbe(e){return new wbe(e??"")}var xbe=class extends hp{static[ie]="PgSmallIntBuilder";constructor(e){super(e,"number int16","PgSmallInt")}build(e){return new Tbe(e,this.config)}},Tbe=class extends We{static[ie]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue(e){return typeof e=="string"?Number(e):e}};function Ibe(e){return new xbe(e??"")}var Abe=class extends kt{static[ie]="PgSmallSerialBuilder";constructor(e){super(e,"number int16","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new Cbe(e,this.config)}},Cbe=class extends We{static[ie]="PgSmallSerial";getSQLType(){return"smallserial"}};function Pbe(e){return new Abe(e??"")}var Nbe=class extends kt{static[ie]="PgTextBuilder";constructor(e,t){super(e,t.enum?.length?"string enum":"string","PgText"),this.config.enumValues=t.enum}build(e){return new Rbe(e,this.config,this.config.enumValues)}},Rbe=class extends We{static[ie]="PgText";enumValues;constructor(e,t,n){super(e,t),this.enumValues=n}getSQLType(){return"text"}};function re(e,t={}){const{name:n,config:r}=er(e,t);return new Nbe(n,r)}var Obe=class extends mp{static[ie]="PgTimeBuilder";constructor(e,t,n){super(e,"string time","PgTime"),this.withTimezone=t,this.precision=n,this.config.withTimezone=t,this.config.precision=n}build(e){return new Lbe(e,this.config)}},Lbe=class extends We{static[ie]="PgTime";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}};function Dbe(e,t={}){const{name:n,config:r}=er(e,t);return new Obe(n,r.withTimezone??!1,r.precision)}var $be=class extends mp{static[ie]="PgTimestampBuilder";constructor(e,t,n){super(e,"object date","PgTimestamp"),this.config.withTimezone=t,this.config.precision=n}build(e){return new Mbe(e,this.config)}},Mbe=class extends We{static[ie]="PgTimestamp";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(e){return typeof e=="string"?new Date(this.withTimezone?e:e+"+0000"):e}mapToDriverValue(e){return typeof e=="string"?e:e.toISOString()}},jbe=class extends mp{static[ie]="PgTimestampStringBuilder";constructor(e,t,n){super(e,"string timestamp","PgTimestampString"),this.config.withTimezone=t,this.config.precision=n}build(e){return new Fbe(e,this.config)}},Fbe=class extends We{static[ie]="PgTimestampString";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(e){if(typeof e=="string")return e;const t=e.toISOString().slice(0,-1).replace("T"," ");return this.withTimezone?`${t}+00`:t}mapToDriverValue(e){return typeof e=="string"?e:e.toISOString()}};function Bbe(e,t={}){const{name:n,config:r}=er(e,t);return r?.mode==="string"?new jbe(n,r.withTimezone??!1,r.precision):new $be(n,r?.withTimezone??!1,r?.precision)}var zbe=class extends kt{static[ie]="PgUUIDBuilder";constructor(e){super(e,"string uuid","PgUUID")}defaultRandom(){return this.default(Vt`gen_random_uuid()`)}build(e){return new Ube(e,this.config)}},Ube=class extends We{static[ie]="PgUUID";getSQLType(){return"uuid"}};function Vbe(e){return new zbe(e??"")}var Hbe=class extends kt{static[ie]="PgVarcharBuilder";constructor(e,t){super(e,t.enum?.length?"string enum":"string","PgVarchar"),this.config.length=t.length,this.config.enumValues=t.enum}build(e){return new qbe(e,this.config)}},qbe=class extends We{static[ie]="PgVarchar";enumValues;constructor(e,t){super(e,t),this.enumValues=t.enumValues}getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}};function Gbe(e,t={}){const{name:n,config:r}=er(e,t);return new Hbe(n,r)}var Kbe=class extends kt{static[ie]="PgBinaryVectorBuilder";constructor(e,t){super(e,"string binary","PgBinaryVector"),this.config.length=t.dimensions,this.config.isLengthExact=!0}build(e){return new Wbe(e,this.config)}},Wbe=class extends We{static[ie]="PgBinaryVector";getSQLType(){return`bit(${this.length})`}};function Jbe(e,t){const{name:n,config:r}=er(e,t);return new Kbe(n,r)}var Ybe=class extends kt{static[ie]="PgHalfVectorBuilder";constructor(e,t){super(e,"array halfvector","PgHalfVector"),this.config.length=t.dimensions,this.config.isLengthExact=!0}build(e){return new Qbe(e,this.config)}},Qbe=class extends We{static[ie]="PgHalfVector";getSQLType(){return`halfvec(${this.length})`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){return e.slice(1,-1).split(",").map(t=>Number.parseFloat(t))}};function Xbe(e,t){const{name:n,config:r}=er(e,t);return new Ybe(n,r)}var Zbe=class extends kt{static[ie]="PgSparseVectorBuilder";constructor(e,t){super(e,"string sparsevec","PgSparseVector"),this.config.vectorDimensions=t.dimensions}build(e){return new eye(e,this.config)}},eye=class extends We{static[ie]="PgSparseVector";vectorDimensions=this.config.vectorDimensions;getSQLType(){return`sparsevec(${this.vectorDimensions})`}};function tye(e,t){const{name:n,config:r}=er(e,t);return new Zbe(n,r)}var nye=class extends kt{static[ie]="PgVectorBuilder";constructor(e,t){super(e,"array vector","PgVector"),this.config.length=t.dimensions,this.config.isLengthExact=!0}build(e){return new rye(e,this.config)}},rye=class extends We{static[ie]="PgVector";getSQLType(){return`vector(${this.length})`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){return e.slice(1,-1).split(",").map(t=>Number.parseFloat(t))}};function sye(e,t){const{name:n,config:r}=er(e,t);return new nye(n,r)}function iye(){return{bigint:dt,bigserial:u0e,boolean:Kd,char:m0e,cidr:b0e,customType:k0e,date:x0e,doublePrecision:A0e,inet:N0e,integer:L0e,interval:M0e,json:B0e,jsonb:V0e,line:W0e,macaddr:Q0e,macaddr8:ebe,numeric:obe,point:fbe,geometry:ybe,real:Ebe,serial:vbe,smallint:Ibe,smallserial:Pbe,text:re,time:Dbe,timestamp:Bbe,uuid:Vbe,varchar:Gbe,bit:Jbe,halfvec:Xbe,sparsevec:tye,vector:sye}}const gv=Symbol.for("drizzle:PgInlineForeignKeys"),bv=Symbol.for("drizzle:EnableRLS");var z0=class extends qn{static[ie]="PgTable";static Symbol=Object.assign({},qn.Symbol,{InlineForeignKeys:gv,EnableRLS:bv});[gv]=[];[bv]=!1;[qn.Symbol.ExtraConfigBuilder]=void 0;[qn.Symbol.ExtraConfigColumns]={}};function iz(e,t,n,r,s=e){const i=new z0(e,r,s),a=typeof t=="function"?t(iye()):t,o=Object.fromEntries(Object.entries(a).map(([l,d])=>{const f=d;f.setName(l);const h=f.build(i);return i[gv].push(...f.buildForeignKeys(h,i)),[l,h]})),c=Object.fromEntries(Object.entries(a).map(([l,d])=>{const f=d;return f.setName(l),[l,f.buildExtraConfigColumn(i)]})),u=Object.assign(i,o);return u[qn.Symbol.Columns]=o,u[qn.Symbol.ExtraConfigColumns]=c,n&&(u[z0.Symbol.ExtraConfigBuilder]=n),Object.assign(u,{enableRLS:()=>(u[z0.Symbol.EnableRLS]=!0,u)})}const aye=(e,t,n)=>iz(e,t,n,void 0),oye=(e,t,n)=>{const r=iz(e,t,n,void 0);return r[bv]=!0,r},mr=Object.assign(aye,{withRLS:oye});function pp(...e){return e[0].columns?new CR(e[0].columns,e[0].name):new CR(e)}var CR=class{static[ie]="PgPrimaryKeyBuilder";columns;name;constructor(e,t){this.columns=e,this.name=t}build(e){return new cye(e,this.columns,this.name)}},cye=class{static[ie]="PgPrimaryKey";columns;name;isNameExplicit;constructor(e,t,n){this.table=e,this.columns=t,this.name=n,this.isNameExplicit=!!n}getName(){return this.name??`${this.table[z0.Symbol.Name]}_${this.columns.map(e=>e.name).join("_")}_pk`}},uye=class{static[ie]="PgCheckBuilder";brand;constructor(e,t){this.name=e,this.value=t}build(e){return new lye(e,this)}},lye=class{static[ie]="PgCheck";name;value;constructor(e,t){this.table=e,this.name=t.name,this.value=t.value}};function fn(e,t){return new uye(e,t)}var az=class{static[ie]="PgIndexBuilderOn";constructor(e,t){this.unique=e,this.name=t}on(...e){return new hE(e.map(t=>{if(Gt(t,Yn))return t;if(Gt(t,B0)){const n=new Yu(t.name,!!t.keyAsName,t.columnType,t.indexConfig);return t.indexConfig=JSON.parse(JSON.stringify(t.defaultConfig)),n}return t=t,new Yu(t.name,!!t.keyAsName,t.columnType,{})}),this.unique,!1,this.name)}onOnly(...e){return new hE(e.map(t=>{if(Gt(t,Yn))return t;if(Gt(t,B0)){const n=new Yu(t.name,!!t.keyAsName,t.columnType,t.indexConfig);return t.indexConfig=JSON.parse(JSON.stringify(t.defaultConfig)),n}return t=t,new Yu(t.name,!!t.keyAsName,t.columnType,{})}),this.unique,!0,this.name)}using(e,...t){return new hE(t.map(n=>{if(Gt(n,Yn))return n;if(Gt(n,B0)){const r=new Yu(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=JSON.parse(JSON.stringify(n.defaultConfig)),r}return n=n,new Yu(n.name,!!n.keyAsName,n.columnType,{})}),this.unique,!0,this.name,e)}},hE=class{static[ie]="PgIndexBuilder";config;constructor(e,t,n,r,s="btree"){this.config={name:r,columns:e,unique:t,only:n,method:s}}concurrently(){return this.config.concurrently=!0,this}with(e){return this.config.with=e,this}where(e){return this.config.where=e,this}build(e){return new dye(this.config,e)}},dye=class{static[ie]="PgIndex";config;isNameExplicit;constructor(e,t){this.config={...e,table:t},this.isNameExplicit=!!e.name}};function Dn(e){return new az(!1,e)}function Pu(e){return new az(!0,e)}const pr={accounts:"accounts",organizations:"organizations",organizationMemberships:"organization_memberships",workspaces:"workspaces",sources:"sources",toolArtifacts:"tool_artifacts",toolArtifactParameters:"tool_artifact_parameters",toolArtifactRequestBodyContentTypes:"tool_artifact_request_body_content_types",toolArtifactRefHintKeys:"tool_artifact_ref_hint_keys",credentials:"credentials",sourceCredentialBindings:"source_credential_bindings",secretMaterials:"secret_materials",sourceAuthSessions:"source_auth_sessions",policies:"policies",localInstallations:"local_installations",executions:"executions",executionInteractions:"execution_interactions"},rA=mr(pr.accounts,{id:re("id").notNull().primaryKey(),provider:re("provider").notNull(),subject:re("subject").notNull(),email:re("email"),displayName:re("display_name"),createdAt:dt("created_at",{mode:"number"}).notNull(),updatedAt:dt("updated_at",{mode:"number"}).notNull()},e=>[Pu("accounts_provider_subject_idx").on(e.provider,e.subject),Dn("accounts_updated_idx").on(e.updatedAt,e.id),fn("accounts_provider_check",Vt`${e.provider} in ('local', 'workos', 'service')`)]),sA=mr(pr.organizations,{id:re("id").notNull().primaryKey(),slug:re("slug").notNull(),name:re("name").notNull(),status:re("status").notNull(),createdByAccountId:re("created_by_account_id"),createdAt:dt("created_at",{mode:"number"}).notNull(),updatedAt:dt("updated_at",{mode:"number"}).notNull()},e=>[Pu("organizations_slug_idx").on(e.slug),Dn("organizations_updated_idx").on(e.updatedAt,e.id),fn("organizations_status_check",Vt`${e.status} in ('active', 'suspended', 'archived')`)]),iA=mr(pr.organizationMemberships,{id:re("id").notNull().primaryKey(),organizationId:re("organization_id").notNull(),accountId:re("account_id").notNull(),role:re("role").notNull(),status:re("status").notNull(),billable:Kd("billable").notNull(),invitedByAccountId:re("invited_by_account_id"),joinedAt:dt("joined_at",{mode:"number"}),createdAt:dt("created_at",{mode:"number"}).notNull(),updatedAt:dt("updated_at",{mode:"number"}).notNull()},e=>[Dn("organization_memberships_org_updated_idx").on(e.organizationId,e.updatedAt,e.id),Dn("organization_memberships_account_updated_idx").on(e.accountId,e.updatedAt,e.id),Pu("organization_memberships_org_account_idx").on(e.organizationId,e.accountId),fn("organization_memberships_role_check",Vt`${e.role} in ('viewer', 'editor', 'admin', 'owner')`),fn("organization_memberships_status_check",Vt`${e.status} in ('invited', 'active', 'suspended', 'removed')`)]),aA=mr(pr.workspaces,{id:re("id").notNull().primaryKey(),organizationId:re("organization_id").notNull(),name:re("name").notNull(),createdByAccountId:re("created_by_account_id"),createdAt:dt("created_at",{mode:"number"}).notNull(),updatedAt:dt("updated_at",{mode:"number"}).notNull()},e=>[Dn("workspaces_org_updated_idx").on(e.organizationId,e.updatedAt,e.id),Pu("workspaces_org_name_idx").on(e.organizationId,e.name)]),fye=mr(pr.sources,{workspaceId:re("workspace_id").notNull(),sourceId:re("source_id").notNull(),name:re("name").notNull(),kind:re("kind").notNull(),endpoint:re("endpoint").notNull(),status:re("status").notNull(),enabled:Kd("enabled").notNull(),namespace:re("namespace"),transport:re("transport"),queryParamsJson:re("query_params_json"),headersJson:re("headers_json"),specUrl:re("spec_url"),defaultHeadersJson:re("default_headers_json"),sourceHash:re("source_hash"),sourceDocumentText:re("source_document_text"),lastError:re("last_error"),createdAt:dt("created_at",{mode:"number"}).notNull(),updatedAt:dt("updated_at",{mode:"number"}).notNull()},e=>[pp({columns:[e.workspaceId,e.sourceId]}),Dn("sources_workspace_updated_idx").on(e.workspaceId,e.updatedAt,e.sourceId),Pu("sources_workspace_name_idx").on(e.workspaceId,e.name),fn("sources_kind_check",Vt`${e.kind} in ('mcp', 'openapi', 'graphql', 'internal')`),fn("sources_status_check",Vt`${e.status} in ('draft', 'probing', 'auth_required', 'connected', 'error')`),fn("sources_transport_check",Vt`${e.transport} is null or ${e.transport} in ('auto', 'streamable-http', 'sse')`)]),hye=mr(pr.credentials,{id:re("id").notNull().primaryKey(),workspaceId:re("workspace_id").notNull(),authKind:re("auth_kind").notNull(),authHeaderName:re("auth_header_name").notNull(),authPrefix:re("auth_prefix").notNull(),tokenProviderId:re("token_provider_id").notNull(),tokenHandle:re("token_handle").notNull(),refreshTokenProviderId:re("refresh_token_provider_id"),refreshTokenHandle:re("refresh_token_handle"),createdAt:dt("created_at",{mode:"number"}).notNull(),updatedAt:dt("updated_at",{mode:"number"}).notNull()},e=>[Dn("credentials_workspace_idx").on(e.workspaceId,e.updatedAt,e.id),fn("credentials_auth_kind_check",Vt`${e.authKind} in ('bearer', 'oauth2')`)]),mye=mr(pr.sourceCredentialBindings,{id:re("id").notNull().primaryKey(),workspaceId:re("workspace_id").notNull(),sourceId:re("source_id").notNull(),credentialId:re("credential_id").notNull(),createdAt:dt("created_at",{mode:"number"}).notNull(),updatedAt:dt("updated_at",{mode:"number"}).notNull()},e=>[Pu("source_credential_bindings_workspace_source_idx").on(e.workspaceId,e.sourceId),Dn("source_credential_bindings_workspace_idx").on(e.workspaceId,e.updatedAt,e.sourceId)]),pye=mr(pr.toolArtifacts,{workspaceId:re("workspace_id").notNull(),path:re("path").notNull(),toolId:re("tool_id").notNull(),sourceId:re("source_id").notNull(),title:re("title"),description:re("description"),searchNamespace:re("search_namespace").notNull(),searchText:re("search_text").notNull(),inputSchemaJson:re("input_schema_json"),outputSchemaJson:re("output_schema_json"),providerKind:re("provider_kind").notNull(),mcpToolName:re("mcp_tool_name"),openApiMethod:re("openapi_method"),openApiPathTemplate:re("openapi_path_template"),openApiOperationHash:re("openapi_operation_hash"),openApiRawToolId:re("openapi_raw_tool_id"),openApiOperationId:re("openapi_operation_id"),openApiTagsJson:re("openapi_tags_json"),openApiRequestBodyRequired:Kd("openapi_request_body_required"),createdAt:dt("created_at",{mode:"number"}).notNull(),updatedAt:dt("updated_at",{mode:"number"}).notNull()},e=>[pp({columns:[e.workspaceId,e.path]}),Dn("tool_artifacts_workspace_source_idx").on(e.workspaceId,e.sourceId,e.updatedAt,e.path),Dn("tool_artifacts_workspace_namespace_idx").on(e.workspaceId,e.searchNamespace,e.path),Dn("tool_artifacts_search_text_idx").using("gin",Vt`to_tsvector('simple', ${e.searchText})`),fn("tool_artifacts_provider_kind_check",Vt`${e.providerKind} in ('mcp', 'openapi')`),fn("tool_artifacts_mcp_shape_check",Vt`${e.providerKind} <> 'mcp'
|
|
29
|
+
or (
|
|
30
|
+
${e.mcpToolName} is not null
|
|
31
|
+
and ${e.openApiMethod} is null
|
|
32
|
+
and ${e.openApiPathTemplate} is null
|
|
33
|
+
and ${e.openApiOperationHash} is null
|
|
34
|
+
and ${e.openApiRawToolId} is null
|
|
35
|
+
and ${e.openApiOperationId} is null
|
|
36
|
+
and ${e.openApiTagsJson} is null
|
|
37
|
+
and ${e.openApiRequestBodyRequired} is null
|
|
38
|
+
)`),fn("tool_artifacts_openapi_shape_check",Vt`${e.providerKind} <> 'openapi'
|
|
39
|
+
or (
|
|
40
|
+
${e.mcpToolName} is null
|
|
41
|
+
and ${e.openApiMethod} in ('get', 'put', 'post', 'delete', 'patch', 'head', 'options', 'trace')
|
|
42
|
+
and ${e.openApiPathTemplate} is not null
|
|
43
|
+
and ${e.openApiOperationHash} is not null
|
|
44
|
+
and ${e.openApiRawToolId} is not null
|
|
45
|
+
and ${e.openApiTagsJson} is not null
|
|
46
|
+
)`)]),gye=mr(pr.toolArtifactParameters,{workspaceId:re("workspace_id").notNull(),path:re("path").notNull(),position:dt("position",{mode:"number"}).notNull(),name:re("name").notNull(),location:re("location").notNull(),required:Kd("required").notNull()},e=>[pp({columns:[e.workspaceId,e.path,e.position]}),fn("tool_artifact_parameters_location_check",Vt`${e.location} in ('path', 'query', 'header', 'cookie')`)]),bye=mr(pr.toolArtifactRequestBodyContentTypes,{workspaceId:re("workspace_id").notNull(),path:re("path").notNull(),position:dt("position",{mode:"number"}).notNull(),contentType:re("content_type").notNull()},e=>[pp({columns:[e.workspaceId,e.path,e.position]})]),yye=mr(pr.toolArtifactRefHintKeys,{workspaceId:re("workspace_id").notNull(),path:re("path").notNull(),position:dt("position",{mode:"number"}).notNull(),refHintKey:re("ref_hint_key").notNull()},e=>[pp({columns:[e.workspaceId,e.path,e.position]})]),_ye=mr(pr.secretMaterials,{id:re("id").notNull().primaryKey(),name:re("name"),purpose:re("purpose").notNull(),value:re("value").notNull(),createdAt:dt("created_at",{mode:"number"}).notNull(),updatedAt:dt("updated_at",{mode:"number"}).notNull()},e=>[Dn("secret_materials_updated_idx").on(e.updatedAt,e.id),fn("secret_materials_purpose_check",Vt`${e.purpose} in ('auth_material', 'oauth_access_token', 'oauth_refresh_token', 'oauth_client_info')`)]),kye=mr(pr.sourceAuthSessions,{id:re("id").notNull().primaryKey(),workspaceId:re("workspace_id").notNull(),sourceId:re("source_id").notNull(),executionId:re("execution_id"),interactionId:re("interaction_id"),strategy:re("strategy").notNull(),status:re("status").notNull(),endpoint:re("endpoint").notNull(),state:re("state").notNull(),redirectUri:re("redirect_uri").notNull(),scope:re("scope"),resourceMetadataUrl:re("resource_metadata_url"),authorizationServerUrl:re("authorization_server_url"),resourceMetadataJson:re("resource_metadata_json"),authorizationServerMetadataJson:re("authorization_server_metadata_json"),clientInformationJson:re("client_information_json"),codeVerifier:re("code_verifier"),authorizationUrl:re("authorization_url"),errorText:re("error_text"),completedAt:dt("completed_at",{mode:"number"}),createdAt:dt("created_at",{mode:"number"}).notNull(),updatedAt:dt("updated_at",{mode:"number"}).notNull()},e=>[Dn("source_auth_sessions_workspace_idx").on(e.workspaceId,e.updatedAt,e.id),Dn("source_auth_sessions_pending_idx").on(e.workspaceId,e.sourceId,e.status,e.updatedAt,e.id),Pu("source_auth_sessions_state_idx").on(e.state),fn("source_auth_sessions_strategy_check",Vt`${e.strategy} in ('oauth2_authorization_code')`),fn("source_auth_sessions_status_check",Vt`${e.status} in ('pending', 'completed', 'failed', 'cancelled')`)]),oA=mr(pr.policies,{id:re("id").notNull().primaryKey(),workspaceId:re("workspace_id").notNull(),targetAccountId:re("target_account_id"),clientId:re("client_id"),resourceType:re("resource_type").notNull(),resourcePattern:re("resource_pattern").notNull(),matchType:re("match_type").notNull(),effect:re("effect").notNull(),approvalMode:re("approval_mode").notNull(),argumentConditionsJson:re("argument_conditions_json"),priority:dt("priority",{mode:"number"}).notNull(),enabled:Kd("enabled").notNull(),createdAt:dt("created_at",{mode:"number"}).notNull(),updatedAt:dt("updated_at",{mode:"number"}).notNull()},e=>[Dn("policies_workspace_priority_idx").on(e.workspaceId,e.priority.desc(),e.updatedAt,e.id),fn("policies_resource_type_check",Vt`${e.resourceType} in ('all_tools', 'source', 'namespace', 'tool_path')`),fn("policies_match_type_check",Vt`${e.matchType} in ('glob', 'exact')`),fn("policies_effect_check",Vt`${e.effect} in ('allow', 'deny')`),fn("policies_approval_mode_check",Vt`${e.approvalMode} in ('auto', 'required')`)]),cA=mr(pr.localInstallations,{id:re("id").notNull().primaryKey(),accountId:re("account_id").notNull(),organizationId:re("organization_id").notNull(),workspaceId:re("workspace_id").notNull(),createdAt:dt("created_at",{mode:"number"}).notNull(),updatedAt:dt("updated_at",{mode:"number"}).notNull()},e=>[Dn("local_installations_organization_idx").on(e.organizationId),Dn("local_installations_workspace_idx").on(e.workspaceId)]),uA=mr(pr.executions,{id:re("id").notNull().primaryKey(),workspaceId:re("workspace_id").notNull(),createdByAccountId:re("created_by_account_id").notNull(),status:re("status").notNull(),code:re("code").notNull(),resultJson:re("result_json"),errorText:re("error_text"),logsJson:re("logs_json"),startedAt:dt("started_at",{mode:"number"}),completedAt:dt("completed_at",{mode:"number"}),createdAt:dt("created_at",{mode:"number"}).notNull(),updatedAt:dt("updated_at",{mode:"number"}).notNull()},e=>[Dn("executions_workspace_idx").on(e.workspaceId,e.updatedAt,e.id),fn("executions_status_check",Vt`${e.status} in ('pending', 'running', 'waiting_for_interaction', 'completed', 'failed', 'cancelled')`)]),lA=mr(pr.executionInteractions,{id:re("id").notNull().primaryKey(),executionId:re("execution_id").notNull(),status:re("status").notNull(),kind:re("kind").notNull(),payloadJson:re("payload_json").notNull(),responseJson:re("response_json"),createdAt:dt("created_at",{mode:"number"}).notNull(),updatedAt:dt("updated_at",{mode:"number"}).notNull()},e=>[Dn("execution_interactions_execution_idx").on(e.executionId,e.updatedAt,e.id),fn("execution_interactions_status_check",Vt`${e.status} in ('pending', 'resolved', 'cancelled')`)]),ks=$.pipe(qs("AccountId")),Nu=$.pipe(qs("OrganizationId")),Eye=$.pipe(qs("OrganizationMemberId")),mn=$.pipe(qs("WorkspaceId")),rc=$.pipe(qs("SourceId")),S1=$.pipe(qs("SourceAuthSessionId")),oz=$.pipe(qs("CredentialId")),wye=$.pipe(qs("SecretMaterialId")),cz=$.pipe(qs("PolicyId")),Sye=$.pipe(qs("InstallationId")),v1=$.pipe(qs("ExecutionId")),dA=$.pipe(qs("ExecutionInteractionId")),uz=Le("active","suspended","archived"),fA={id:Nu,status:uz,createdByAccountId:ee(ks),createdAt:nt,updatedAt:nt},qp=hr(sA,fA);tc(sA,fA);nc(sA,fA);const hA=Le("viewer","editor","admin","owner"),vye=Le("invited","active","suspended","removed"),mA={id:Eye,organizationId:Nu,accountId:ks,role:hA,status:vye,billable:qt,invitedByAccountId:ee(ks),joinedAt:ee(nt),createdAt:nt,updatedAt:nt},mE=hr(iA,mA),lz=tc(iA,mA),xye=nc(iA,mA),gp=Le("mcp","openapi","graphql","internal"),bp=Le("draft","probing","auth_required","connected","error"),sc=Le("auto","streamable-http","sse"),Io=ce({providerId:$,handle:$}),pA=Hs(ce({kind:Le("none")}),ce({kind:Le("bearer"),headerName:$,prefix:$,token:Io}),ce({kind:Le("oauth2"),headerName:$,prefix:$,accessToken:Io,refreshToken:ee(Io)})),Qr=f1({key:$,value:$}),Tye={workspaceId:mn,sourceId:rc,kind:gp,status:bp,transport:ee(sc),createdAt:nt,updatedAt:nt},Iye=hr(fye,Tye);Ha(Iye,ce({id:rc,workspaceId:mn,name:$,kind:gp,endpoint:$,status:bp,enabled:qt,namespace:ee($),transport:ee(sc),queryParamsJson:ee($),headersJson:ee($),specUrl:ee($),defaultHeadersJson:ee($),sourceHash:ee($),sourceDocumentText:ee($),lastError:ee($),createdAt:nt,updatedAt:nt}),{strict:!1,decode:(e,t)=>({id:e.sourceId,workspaceId:e.workspaceId,name:e.name,kind:e.kind,endpoint:e.endpoint,status:e.status,enabled:e.enabled,namespace:e.namespace,transport:e.transport,queryParamsJson:e.queryParamsJson,headersJson:e.headersJson,specUrl:e.specUrl,defaultHeadersJson:e.defaultHeadersJson,sourceHash:e.sourceHash,sourceDocumentText:e.sourceDocumentText,lastError:e.lastError,createdAt:e.createdAt,updatedAt:e.updatedAt}),encode:(e,t)=>({workspaceId:e.workspaceId,sourceId:e.id,name:e.name,kind:e.kind,endpoint:e.endpoint,status:e.status,enabled:e.enabled,namespace:e.namespace,transport:e.transport,queryParamsJson:e.queryParamsJson,headersJson:e.headersJson,specUrl:e.specUrl,defaultHeadersJson:e.defaultHeadersJson,sourceHash:e.sourceHash,sourceDocumentText:e.sourceDocumentText,lastError:e.lastError,createdAt:e.createdAt,updatedAt:e.updatedAt})});const mo=ce({id:rc,workspaceId:mn,name:$,kind:gp,endpoint:$,status:bp,enabled:qt,namespace:ee($),transport:ee(sc),queryParams:ee(Qr),headers:ee(Qr),specUrl:ee($),defaultHeaders:ee(Qr),auth:pA,sourceHash:ee($),lastError:ee($),createdAt:nt,updatedAt:nt}),Aye=Le("mcp","openapi","graphql","unknown"),dz=Le("low","medium","high"),Cye=Le("none","bearer","oauth2","apiKey","basic","unknown"),Pye=Le("header","query","cookie"),Nye=Hs(ce({kind:Le("none")}),ce({kind:Le("bearer"),headerName:Z(ee($)),prefix:Z(ee($)),token:$}),ce({kind:Le("basic"),username:$,password:$}),ce({kind:Le("headers"),headers:Qr})),Rye=ce({suggestedKind:Cye,confidence:dz,supported:qt,reason:$,headerName:ee($),prefix:ee($),parameterName:ee($),parameterLocation:ee(Pye),oauthAuthorizationUrl:ee($),oauthTokenUrl:ee($),oauthScopes:Qe($)}),Oye=ce({detectedKind:Aye,confidence:dz,endpoint:$,specUrl:ee($),name:ee($),namespace:ee($),transport:ee(sc),authInference:Rye,toolCount:ee(ct),warnings:Qe($)}),Lye=Le("bearer","oauth2"),Dye={id:oz,workspaceId:mn,authKind:Lye,authHeaderName:$,authPrefix:$,tokenProviderId:$,tokenHandle:$,refreshTokenProviderId:ee($),refreshTokenHandle:ee($),createdAt:nt,updatedAt:nt},$ye={id:$,workspaceId:mn,sourceId:rc,credentialId:oz,createdAt:nt,updatedAt:nt};hr(hye,Dye);hr(mye,$ye);const gA=Le("all_tools","source","namespace","tool_path"),bA=Le("glob","exact"),yA=Le("allow","deny"),_A=Le("auto","required"),Mye=Le("equals","contains","starts_with","not_equals");ce({key:$,operator:Mye,value:$});const kA={id:cz,workspaceId:mn,targetAccountId:ee(ks),clientId:ee($),resourceType:gA,matchType:bA,effect:yA,approvalMode:_A,argumentConditionsJson:ee($),createdAt:nt,updatedAt:nt},Gp=hr(oA,kA);tc(oA,kA);nc(oA,kA);const fz=Le("local","workos","service");ce({accountId:ks,provider:fz,subject:$,email:ee($),displayName:ee($)});const EA={id:ks,provider:fz,email:ee($),displayName:ee($),createdAt:nt,updatedAt:nt};hr(rA,EA);tc(rA,EA);nc(rA,EA);const jye=Le("active","suspended","revoked");ce({accountId:ks,workspaceId:mn,role:hA,status:jye,grantedAt:nt,updatedAt:nt});const Fye={organizations:["read","manage"],memberships:["read","write","manage"],workspace:["read","manage"],sources:["read","write","manage"],policies:["read","write","manage"]},wA=Object.entries(Fye).flatMap(([e,t])=>t.map(n=>`${e}:${n}`)),Bye=new Set(wA),zye=e=>Bye.has(e),Uye=$.pipe(Zr(zye,{message:()=>"Invalid permission"})),Vye=wA.filter(e=>e.endsWith(":read")),Hye=wA.filter(e=>e.endsWith(":write"));[...Vye,...Hye];f1({key:hA,value:Qe(Uye)});const SA={id:mn,organizationId:Nu,createdByAccountId:ee(ks),createdAt:nt,updatedAt:nt},Kp=hr(aA,SA);tc(aA,SA);nc(aA,SA);const hz=Le("mcp","openapi"),qye=Le("path","query","header","cookie"),Gye={workspaceId:mn,sourceId:rc,providerKind:hz,openApiMethod:ee(Le("get","put","post","delete","patch","head","options","trace")),createdAt:nt,updatedAt:nt},Kye=hr(pye,Gye),Wye=ce({workspaceId:mn,path:$,toolId:$,sourceId:rc,title:ee($),description:ee($),searchNamespace:$,searchText:$,inputSchemaJson:ee($),outputSchemaJson:ee($),providerKind:hz,mcpToolName:ee($),openApiMethod:ee(Le("get","put","post","delete","patch","head","options","trace")),openApiPathTemplate:ee($),openApiOperationHash:ee($),openApiRawToolId:ee($),openApiOperationId:ee($),openApiTagsJson:ee($),openApiRequestBodyRequired:ee(qt),createdAt:nt,updatedAt:nt}).annotations({identifier:"StoredToolArtifactRecord"});Ha(Kye,Wye,{strict:!1,decode:e=>({workspaceId:e.workspaceId,path:e.path,toolId:e.toolId,sourceId:e.sourceId,title:e.title,description:e.description,searchNamespace:e.searchNamespace,searchText:e.searchText,inputSchemaJson:e.inputSchemaJson,outputSchemaJson:e.outputSchemaJson,providerKind:e.providerKind,mcpToolName:e.mcpToolName,openApiMethod:e.openApiMethod,openApiPathTemplate:e.openApiPathTemplate,openApiOperationHash:e.openApiOperationHash,openApiRawToolId:e.openApiRawToolId,openApiOperationId:e.openApiOperationId,openApiTagsJson:e.openApiTagsJson,openApiRequestBodyRequired:e.openApiRequestBodyRequired,createdAt:e.createdAt,updatedAt:e.updatedAt}),encode:e=>({workspaceId:e.workspaceId,path:e.path,toolId:e.toolId,sourceId:e.sourceId,title:e.title,description:e.description,searchNamespace:e.searchNamespace,searchText:e.searchText,inputSchemaJson:e.inputSchemaJson,outputSchemaJson:e.outputSchemaJson,providerKind:e.providerKind,mcpToolName:e.mcpToolName,openApiMethod:e.openApiMethod,openApiPathTemplate:e.openApiPathTemplate,openApiOperationHash:e.openApiOperationHash,openApiRawToolId:e.openApiRawToolId,openApiOperationId:e.openApiOperationId,openApiTagsJson:e.openApiTagsJson,openApiRequestBodyRequired:e.openApiRequestBodyRequired,createdAt:e.createdAt,updatedAt:e.updatedAt})});const Jye={workspaceId:mn,location:qye,position:ct};hr(gye,Jye).annotations({identifier:"StoredToolArtifactParameterRecord"});const Yye={workspaceId:mn,position:ct};hr(bye,Yye).annotations({identifier:"StoredToolArtifactRequestBodyContentTypeRecord"});const Qye={workspaceId:mn,position:ct};hr(yye,Qye).annotations({identifier:"StoredToolArtifactRefHintKeyRecord"});const mz=Le("auth_material","oauth_access_token","oauth_refresh_token","oauth_client_info"),Xye={id:wye,name:ee($),purpose:mz,createdAt:nt,updatedAt:nt};hr(_ye,Xye);const Zye=Le("oauth2_authorization_code"),e_e=Le("pending","completed","failed","cancelled"),t_e={id:S1,workspaceId:mn,sourceId:rc,executionId:ee(v1),interactionId:ee(dA),strategy:Zye,status:e_e,completedAt:ee(nt),createdAt:nt,updatedAt:nt};hr(kye,t_e);const vA={id:Sye,accountId:ks,organizationId:Nu,workspaceId:mn,createdAt:nt,updatedAt:nt},n_e=hr(cA,vA);tc(cA,vA);nc(cA,vA);const r_e=Le("pending","running","waiting_for_interaction","completed","failed","cancelled"),xA={id:v1,workspaceId:mn,createdByAccountId:ks,status:r_e,resultJson:ee($),errorText:ee($),logsJson:ee($),startedAt:ee(nt),completedAt:ee(nt),createdAt:nt,updatedAt:nt},s_e=hr(uA,xA);tc(uA,xA);nc(uA,xA);const i_e=Le("pending","resolved","cancelled"),TA={id:dA,executionId:v1,status:i_e,responseJson:ee($),createdAt:nt,updatedAt:nt},a_e=hr(lA,TA);tc(lA,TA);nc(lA,TA);const pE=ce({execution:s_e,pendingInteraction:ee(a_e)}),IA=Symbol.for("yaml.alias"),o_e=Symbol.for("yaml.document"),Xc=Symbol.for("yaml.map"),pz=Symbol.for("yaml.pair"),AA=Symbol.for("yaml.scalar"),yp=Symbol.for("yaml.seq"),sa=Symbol.for("yaml.node.type"),Ru=e=>!!e&&typeof e=="object"&&e[sa]===IA,x1=e=>!!e&&typeof e=="object"&&e[sa]===o_e,gz=e=>!!e&&typeof e=="object"&&e[sa]===Xc,fr=e=>!!e&&typeof e=="object"&&e[sa]===pz,Mn=e=>!!e&&typeof e=="object"&&e[sa]===AA,CA=e=>!!e&&typeof e=="object"&&e[sa]===yp;function hs(e){if(e&&typeof e=="object")switch(e[sa]){case Xc:case yp:return!0}return!1}function Er(e){if(e&&typeof e=="object")switch(e[sa]){case IA:case Xc:case AA:case yp:return!0}return!1}const bz=e=>(Mn(e)||hs(e))&&!!e.anchor,wc=Symbol("break visit"),c_e=Symbol("skip children"),Sh=Symbol("remove node");function T1(e,t){const n=u_e(t);x1(e)?Sl(null,e.contents,n,Object.freeze([e]))===Sh&&(e.contents=null):Sl(null,e,n,Object.freeze([]))}T1.BREAK=wc;T1.SKIP=c_e;T1.REMOVE=Sh;function Sl(e,t,n,r){const s=l_e(e,t,n,r);if(Er(s)||fr(s))return d_e(e,r,s),Sl(e,s,n,r);if(typeof s!="symbol"){if(hs(t)){r=Object.freeze(r.concat(t));for(let i=0;i<t.items.length;++i){const a=Sl(i,t.items[i],n,r);if(typeof a=="number")i=a-1;else{if(a===wc)return wc;a===Sh&&(t.items.splice(i,1),i-=1)}}}else if(fr(t)){r=Object.freeze(r.concat(t));const i=Sl("key",t.key,n,r);if(i===wc)return wc;i===Sh&&(t.key=null);const a=Sl("value",t.value,n,r);if(a===wc)return wc;a===Sh&&(t.value=null)}}return s}function u_e(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function l_e(e,t,n,r){if(typeof n=="function")return n(e,t,r);if(gz(t))return n.Map?.(e,t,r);if(CA(t))return n.Seq?.(e,t,r);if(fr(t))return n.Pair?.(e,t,r);if(Mn(t))return n.Scalar?.(e,t,r);if(Ru(t))return n.Alias?.(e,t,r)}function d_e(e,t,n){const r=t[t.length-1];if(hs(r))r.items[e]=n;else if(fr(r))e==="key"?r.key=n:r.value=n;else if(x1(r))r.contents=n;else{const s=Ru(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}function yz(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function Jf(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let s=0,i=r.length;s<i;++s){const a=r[s],o=Jf(e,r,String(s),a);o===void 0?delete r[s]:o!==a&&(r[s]=o)}else if(r instanceof Map)for(const s of Array.from(r.keys())){const i=r.get(s),a=Jf(e,r,s,i);a===void 0?r.delete(s):a!==i&&r.set(s,a)}else if(r instanceof Set)for(const s of Array.from(r)){const i=Jf(e,r,s,s);i===void 0?r.delete(s):i!==s&&(r.delete(s),r.add(i))}else for(const[s,i]of Object.entries(r)){const a=Jf(e,r,s,i);a===void 0?delete r[s]:a!==i&&(r[s]=a)}return e.call(t,n,r)}function fi(e,t,n){if(Array.isArray(e))return e.map((r,s)=>fi(r,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!bz(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=i=>{r.res=i,delete n.onCreate};const s=e.toJSON(t,n);return n.onCreate&&n.onCreate(s),s}return typeof e=="bigint"&&!n?.keep?Number(e):e}class PA{constructor(t){Object.defineProperty(this,sa,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:s,reviver:i}={}){if(!x1(t))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},o=fi(this,"",a);if(typeof s=="function")for(const{count:c,res:u}of a.anchors.values())s(u,c);return typeof i=="function"?Jf(i,{"":o},"",o):o}}class f_e extends PA{constructor(t){super(IA),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],T1(t,{Node:(i,a)=>{(Ru(a)||bz(a))&&r.push(a)}}),n&&(n.aliasResolveCache=r));let s;for(const i of r){if(i===this)break;i.anchor===this.source&&(s=i)}return s}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:s,maxAliasCount:i}=n,a=this.resolve(s,n);if(!a){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let o=r.get(a);if(o||(fi(a,null,n),o=r.get(a)),o?.res===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=U0(s,a,r)),o.count*o.aliasCount>i)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return o.res}toString(t,n,r){const s=`*${this.source}`;if(t){if(yz(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(t.implicitKey)return`${s} `}return s}}function U0(e,t,n){if(Ru(t)){const r=t.resolve(e),s=n&&r&&n.get(r);return s?s.count*s.aliasCount:0}else if(hs(t)){let r=0;for(const s of t.items){const i=U0(e,s,n);i>r&&(r=i)}return r}else if(fr(t)){const r=U0(e,t.key,n),s=U0(e,t.value,n);return Math.max(r,s)}return 1}const _z=e=>!e||typeof e!="function"&&typeof e!="object";class nn extends PA{constructor(t){super(AA),this.value=t}toJSON(t,n){return n?.keep?this.value:fi(this.value,t,n)}toString(){return String(this.value)}}nn.BLOCK_FOLDED="BLOCK_FOLDED";nn.BLOCK_LITERAL="BLOCK_LITERAL";nn.PLAIN="PLAIN";nn.QUOTE_DOUBLE="QUOTE_DOUBLE";nn.QUOTE_SINGLE="QUOTE_SINGLE";function h_e(e,t,n){return n.find(r=>r.identify?.(e)&&!r.format)}function py(e,t,n){if(x1(e)&&(e=e.contents),Er(e))return e;if(fr(e)){const d=n.schema[Xc].createNode?.(n.schema,null,n);return d.items.push(e),d}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:s,onTagObj:i,schema:a,sourceObjects:o}=n;let c;if(r&&e&&typeof e=="object"){if(c=o.get(e),c)return c.anchor??(c.anchor=s(e)),new f_e(c.anchor);c={anchor:null,node:null},o.set(e,c)}let u=h_e(e,t,a.tags);if(!u){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const d=new nn(e);return c&&(c.node=d),d}u=e instanceof Map?a[Xc]:Symbol.iterator in Object(e)?a[yp]:a[Xc]}i&&(i(u),delete n.onTagObj);const l=u?.createNode?u.createNode(n.schema,e,n):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(n.schema,e,n):new nn(e);return u.default||(l.tag=u.tag),c&&(c.node=l),l}function PR(e,t,n){let r=n;for(let s=t.length-1;s>=0;--s){const i=t[s];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){const a=[];a[i]=r,r=a}else r=new Map([[i,r]])}return py(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const m_e=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class kz extends PA{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>Er(r)||fr(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(m_e(t))this.add(n);else{const[r,...s]=t,i=this.get(r,!0);if(hs(i))i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,PR(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const s=this.get(n,!0);if(hs(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...s]=t,i=this.get(r,!0);return s.length===0?!n&&Mn(i)?i.value:i:hs(i)?i.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!fr(n))return!1;const r=n.value;return r==null||t&&Mn(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const s=this.get(n,!0);return hs(s)?s.hasIn(r):!1}setIn(t,n){const[r,...s]=t;if(s.length===0)this.set(r,n);else{const i=this.get(r,!0);if(hs(i))i.setIn(s,n);else if(i===void 0&&this.schema)this.set(r,PR(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}}const p_e=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function gm(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const vl=(e,t,n)=>e.endsWith(`
|
|
47
|
+
`)?gm(n,t):n.includes(`
|
|
48
|
+
`)?`
|
|
49
|
+
`+gm(n,t):(e.endsWith(" ")?"":" ")+n,Ez="flow",yv="block",V0="quoted";function I1(e,t,n="flow",{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:a,onOverflow:o}={}){if(!s||s<0)return e;s<i&&(i=0);const c=Math.max(1+i,1+s-t.length);if(e.length<=c)return e;const u=[],l={};let d=s-t.length;typeof r=="number"&&(r>s-Math.max(2,i)?u.push(0):d=s-r);let f,h,m=!1,y=-1,g=-1,p=-1;n===yv&&(y=NR(e,y,t.length),y!==-1&&(d=y+c));for(let k;k=e[y+=1];){if(n===V0&&k==="\\"){switch(g=y,e[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}p=y}if(k===`
|
|
50
|
+
`)n===yv&&(y=NR(e,y,t.length)),d=y+t.length+c,f=void 0;else{if(k===" "&&h&&h!==" "&&h!==`
|
|
51
|
+
`&&h!==" "){const v=e[y+1];v&&v!==" "&&v!==`
|
|
52
|
+
`&&v!==" "&&(f=y)}if(y>=d)if(f)u.push(f),d=f+c,f=void 0;else if(n===V0){for(;h===" "||h===" ";)h=k,k=e[y+=1],m=!0;const v=y>p+1?y-2:g-1;if(l[v])return e;u.push(v),l[v]=!0,d=v+c,f=void 0}else m=!0}h=k}if(m&&o&&o(),u.length===0)return e;a&&a();let _=e.slice(0,u[0]);for(let k=0;k<u.length;++k){const v=u[k],w=u[k+1]||e.length;v===0?_=`
|
|
53
|
+
${t}${e.slice(0,w)}`:(n===V0&&l[v]&&(_+=`${e[v]}\\`),_+=`
|
|
54
|
+
${t}${e.slice(v+1,w)}`)}return _}function NR(e,t,n){let r=t,s=t+1,i=e[s];for(;i===" "||i===" ";)if(t<s+n)i=e[++t];else{do i=e[++t];while(i&&i!==`
|
|
55
|
+
`);r=t,s=t+1,i=e[s]}return r}const A1=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),C1=e=>/^(%|---|\.\.\.)/m.test(e);function g_e(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let i=0,a=0;i<s;++i)if(e[i]===`
|
|
56
|
+
`){if(i-a>r)return!0;if(a=i+1,s-a<=r)return!1}return!0}function vh(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t,s=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(C1(e)?" ":"");let a="",o=0;for(let c=0,u=n[c];u;u=n[++c])if(u===" "&&n[c+1]==="\\"&&n[c+2]==="n"&&(a+=n.slice(o,c)+"\\ ",c+=1,o=c,u="\\"),u==="\\")switch(n[c+1]){case"u":{a+=n.slice(o,c);const l=n.substr(c+2,4);switch(l){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:l.substr(0,2)==="00"?a+="\\x"+l.substr(2):a+=n.substr(c,6)}c+=5,o=c+1}break;case"n":if(r||n[c+2]==='"'||n.length<s)c+=1;else{for(a+=n.slice(o,c)+`
|
|
57
|
+
|
|
58
|
+
`;n[c+2]==="\\"&&n[c+3]==="n"&&n[c+4]!=='"';)a+=`
|
|
59
|
+
`,c+=2;a+=i,n[c+2]===" "&&(a+="\\"),c+=1,o=c+1}break;default:c+=1}return a=o?a+n.slice(o):n,r?a:I1(a,i,V0,A1(t,!1))}function _v(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
60
|
+
`)||/[ \t]\n|\n[ \t]/.test(e))return vh(e,t);const n=t.indent||(C1(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
61
|
+
${n}`)+"'";return t.implicitKey?r:I1(r,n,Ez,A1(t,!1))}function xl(e,t){const{singleQuote:n}=t.options;let r;if(n===!1)r=vh;else{const s=e.includes('"'),i=e.includes("'");s&&!i?r=_v:i&&!s?r=vh:r=n?_v:vh}return r(e,t)}let kv;try{kv=new RegExp(`(^|(?<!
|
|
62
|
+
))
|
|
63
|
+
+(?!
|
|
64
|
+
|$)`,"g")}catch{kv=/\n+(?!\n|$)/g}function H0({comment:e,type:t,value:n},r,s,i){const{blockQuote:a,commentString:o,lineWidth:c}=r.options;if(!a||/\n[\t ]+$/.test(n))return xl(n,r);const u=r.indent||(r.forceBlockIndent||C1(n)?" ":""),l=a==="literal"?!0:a==="folded"||t===nn.BLOCK_FOLDED?!1:t===nn.BLOCK_LITERAL?!0:!g_e(n,c,u.length);if(!n)return l?`|
|
|
65
|
+
`:`>
|
|
66
|
+
`;let d,f;for(f=n.length;f>0;--f){const w=n[f-1];if(w!==`
|
|
67
|
+
`&&w!==" "&&w!==" ")break}let h=n.substring(f);const m=h.indexOf(`
|
|
68
|
+
`);m===-1?d="-":n===h||m!==h.length-1?(d="+",i&&i()):d="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
|
|
69
|
+
`&&(h=h.slice(0,-1)),h=h.replace(kv,`$&${u}`));let y=!1,g,p=-1;for(g=0;g<n.length;++g){const w=n[g];if(w===" ")y=!0;else if(w===`
|
|
70
|
+
`)p=g;else break}let _=n.substring(0,p<g?p+1:g);_&&(n=n.substring(_.length),_=_.replace(/\n+/g,`$&${u}`));let v=(y?u?"2":"1":"")+d;if(e&&(v+=" "+o(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!l){const w=n.replace(/\n+/g,`
|
|
71
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`);let S=!1;const T=A1(r,!0);a!=="folded"&&t!==nn.BLOCK_FOLDED&&(T.onOverflow=()=>{S=!0});const I=I1(`${_}${w}${h}`,u,yv,T);if(!S)return`>${v}
|
|
72
|
+
${u}${I}`}return n=n.replace(/\n+/g,`$&${u}`),`|${v}
|
|
73
|
+
${u}${_}${n}${h}`}function b_e(e,t,n,r){const{type:s,value:i}=e,{actualString:a,implicitKey:o,indent:c,indentStep:u,inFlow:l}=t;if(o&&i.includes(`
|
|
74
|
+
`)||l&&/[[\]{},]/.test(i))return xl(i,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return o||l||!i.includes(`
|
|
75
|
+
`)?xl(i,t):H0(e,t,n,r);if(!o&&!l&&s!==nn.PLAIN&&i.includes(`
|
|
76
|
+
`))return H0(e,t,n,r);if(C1(i)){if(c==="")return t.forceBlockIndent=!0,H0(e,t,n,r);if(o&&c===u)return xl(i,t)}const d=i.replace(/\n+/g,`$&
|
|
77
|
+
${c}`);if(a){const f=y=>y.default&&y.tag!=="tag:yaml.org,2002:str"&&y.test?.test(d),{compat:h,tags:m}=t.doc.schema;if(m.some(f)||h?.some(f))return xl(i,t)}return o?d:I1(d,c,Ez,A1(t,!1))}function y_e(e,t,n,r){const{implicitKey:s,inFlow:i}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==nn.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(o=nn.QUOTE_DOUBLE);const c=l=>{switch(l){case nn.BLOCK_FOLDED:case nn.BLOCK_LITERAL:return s||i?xl(a.value,t):H0(a,t,n,r);case nn.QUOTE_DOUBLE:return vh(a.value,t);case nn.QUOTE_SINGLE:return _v(a.value,t);case nn.PLAIN:return b_e(a,t,n,r);default:return null}};let u=c(o);if(u===null){const{defaultKeyType:l,defaultStringType:d}=t.options,f=s&&l||d;if(u=c(f),u===null)throw new Error(`Unsupported default string type ${f}`)}return u}function __e(e,t){const n=Object.assign({blockQuote:!0,commentString:p_e,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function k_e(e,t){if(t.tag){const s=e.filter(i=>i.tag===t.tag);if(s.length>0)return s.find(i=>i.format===t.format)??s[0]}let n,r;if(Mn(t)){r=t.value;let s=e.filter(i=>i.identify?.(r));if(s.length>1){const i=s.filter(a=>a.test);i.length>0&&(s=i)}n=s.find(i=>i.format===t.format)??s.find(i=>!i.format)}else r=t,n=e.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){const s=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${s} value`)}return n}function E_e(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const s=[],i=(Mn(e)||hs(e))&&e.anchor;i&&yz(i)&&(n.add(i),s.push(`&${i}`));const a=e.tag??(t.default?null:t.tag);return a&&s.push(r.directives.tagString(a)),s.join(" ")}function gy(e,t,n,r){if(fr(e))return e.toString(t,n,r);if(Ru(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s;const i=Er(e)?e:t.doc.createNode(e,{onTagObj:c=>s=c});s??(s=k_e(t.doc.schema.tags,i));const a=E_e(i,s,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);const o=typeof s.stringify=="function"?s.stringify(i,t,n,r):Mn(i)?y_e(i,t,n,r):i.toString(t,n,r);return a?Mn(i)||o[0]==="{"||o[0]==="["?`${a} ${o}`:`${a}
|
|
78
|
+
${t.indent}${o}`:o}function w_e({key:e,value:t},n,r,s){const{allNullValues:i,doc:a,indent:o,indentStep:c,options:{commentString:u,indentSeq:l,simpleKeys:d}}=n;let f=Er(e)&&e.comment||null;if(d){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(hs(e)||!Er(e)&&typeof e=="object"){const T="With simple keys, collection cannot be used as a key value";throw new Error(T)}}let h=!d&&(!e||f&&t==null&&!n.inFlow||hs(e)||(Mn(e)?e.type===nn.BLOCK_FOLDED||e.type===nn.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(d||!i),indent:o+c});let m=!1,y=!1,g=gy(e,n,()=>m=!0,()=>y=!0);if(!h&&!n.inFlow&&g.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(i||t==null)return m&&r&&r(),g===""?"?":h?`? ${g}`:g}else if(i&&!d||t==null&&h)return g=`? ${g}`,f&&!m?g+=vl(g,n.indent,u(f)):y&&s&&s(),g;m&&(f=null),h?(f&&(g+=vl(g,n.indent,u(f))),g=`? ${g}
|
|
79
|
+
${o}:`):(g=`${g}:`,f&&(g+=vl(g,n.indent,u(f))));let p,_,k;Er(t)?(p=!!t.spaceBefore,_=t.commentBefore,k=t.comment):(p=!1,_=null,k=null,t&&typeof t=="object"&&(t=a.createNode(t))),n.implicitKey=!1,!h&&!f&&Mn(t)&&(n.indentAtStart=g.length+1),y=!1,!l&&c.length>=2&&!n.inFlow&&!h&&CA(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let v=!1;const w=gy(t,n,()=>v=!0,()=>y=!0);let S=" ";if(f||p||_){if(S=p?`
|
|
80
|
+
`:"",_){const T=u(_);S+=`
|
|
81
|
+
${gm(T,n.indent)}`}w===""&&!n.inFlow?S===`
|
|
82
|
+
`&&k&&(S=`
|
|
83
|
+
|
|
84
|
+
`):S+=`
|
|
85
|
+
${n.indent}`}else if(!h&&hs(t)){const T=w[0],I=w.indexOf(`
|
|
86
|
+
`),D=I!==-1,R=n.inFlow??t.flow??t.items.length===0;if(D||!R){let z=!1;if(D&&(T==="&"||T==="!")){let V=w.indexOf(" ");T==="&"&&V!==-1&&V<I&&w[V+1]==="!"&&(V=w.indexOf(" ",V+1)),(V===-1||I<V)&&(z=!0)}z||(S=`
|
|
87
|
+
${n.indent}`)}}else(w===""||w[0]===`
|
|
88
|
+
`)&&(S="");return g+=S+w,n.inFlow?v&&r&&r():k&&!v?g+=vl(g,n.indent,u(k)):y&&s&&s(),g}function S_e(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Wp="<<",gE={identify:e=>e===Wp||typeof e=="symbol"&&e.description===Wp,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new nn(Symbol(Wp)),{addToJSMap:wz}),stringify:()=>Wp},v_e=(e,t)=>(gE.identify(t)||Mn(t)&&(!t.type||t.type===nn.PLAIN)&&gE.identify(t.value))&&e?.doc.schema.tags.some(n=>n.tag===gE.tag&&n.default);function wz(e,t,n){if(n=e&&Ru(n)?n.resolve(e.doc):n,CA(n))for(const r of n.items)bE(e,t,r);else if(Array.isArray(n))for(const r of n)bE(e,t,r);else bE(e,t,n)}function bE(e,t,n){const r=e&&Ru(n)?n.resolve(e.doc):n;if(!gz(r))throw new Error("Merge sources must be maps or map aliases");const s=r.toJSON(null,e,Map);for(const[i,a]of s)t instanceof Map?t.has(i)||t.set(i,a):t instanceof Set?t.add(i):Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}function Sz(e,t,{key:n,value:r}){if(Er(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(v_e(e,n))wz(e,t,r);else{const s=fi(n,"",e);if(t instanceof Map)t.set(s,fi(r,s,e));else if(t instanceof Set)t.add(s);else{const i=x_e(n,s,e),a=fi(r,i,e);i in t?Object.defineProperty(t,i,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[i]=a}}return t}function x_e(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(Er(e)&&n?.doc){const r=__e(n.doc,{});r.anchors=new Set;for(const i of n.anchors.keys())r.anchors.add(i.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=e.toString(r);if(!n.mapKeyWarned){let i=JSON.stringify(s);i.length>40&&(i=i.substring(0,36)+'..."'),S_e(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(t)}function NA(e,t,n){const r=py(e,void 0,n),s=py(t,void 0,n);return new $a(r,s)}class $a{constructor(t,n=null){Object.defineProperty(this,sa,{value:pz}),this.key=t,this.value=n}clone(t){let{key:n,value:r}=this;return Er(n)&&(n=n.clone(t)),Er(r)&&(r=r.clone(t)),new $a(n,r)}toJSON(t,n){const r=n?.mapAsMap?new Map:{};return Sz(n,r,this)}toString(t,n,r){return t?.doc?w_e(this,t,n,r):JSON.stringify(this)}}function vz(e,t,n){return(t.inFlow??e.flow?I_e:T_e)(e,t,n)}function T_e({comment:e,items:t},n,{blockItemPrefix:r,flowChars:s,itemIndent:i,onChompKeep:a,onComment:o}){const{indent:c,options:{commentString:u}}=n,l=Object.assign({},n,{indent:i,type:null});let d=!1;const f=[];for(let m=0;m<t.length;++m){const y=t[m];let g=null;if(Er(y))!d&&y.spaceBefore&&f.push(""),by(n,f,y.commentBefore,d),y.comment&&(g=y.comment);else if(fr(y)){const _=Er(y.key)?y.key:null;_&&(!d&&_.spaceBefore&&f.push(""),by(n,f,_.commentBefore,d))}d=!1;let p=gy(y,l,()=>g=null,()=>d=!0);g&&(p+=vl(p,i,u(g))),d&&g&&(d=!1),f.push(r+p)}let h;if(f.length===0)h=s.start+s.end;else{h=f[0];for(let m=1;m<f.length;++m){const y=f[m];h+=y?`
|
|
89
|
+
${c}${y}`:`
|
|
90
|
+
`}}return e?(h+=`
|
|
91
|
+
`+gm(u(e),c),o&&o()):d&&a&&a(),h}function I_e({items:e},t,{flowChars:n,itemIndent:r}){const{indent:s,indentStep:i,flowCollectionPadding:a,options:{commentString:o}}=t;r+=i;const c=Object.assign({},t,{indent:r,inFlow:!0,type:null});let u=!1,l=0;const d=[];for(let m=0;m<e.length;++m){const y=e[m];let g=null;if(Er(y))y.spaceBefore&&d.push(""),by(t,d,y.commentBefore,!1),y.comment&&(g=y.comment);else if(fr(y)){const _=Er(y.key)?y.key:null;_&&(_.spaceBefore&&d.push(""),by(t,d,_.commentBefore,!1),_.comment&&(u=!0));const k=Er(y.value)?y.value:null;k?(k.comment&&(g=k.comment),k.commentBefore&&(u=!0)):y.value==null&&_?.comment&&(g=_.comment)}g&&(u=!0);let p=gy(y,c,()=>g=null);m<e.length-1&&(p+=","),g&&(p+=vl(p,r,o(g))),!u&&(d.length>l||p.includes(`
|
|
92
|
+
`))&&(u=!0),d.push(p),l=d.length}const{start:f,end:h}=n;if(d.length===0)return f+h;if(!u){const m=d.reduce((y,g)=>y+g.length+2,2);u=t.options.lineWidth>0&&m>t.options.lineWidth}if(u){let m=f;for(const y of d)m+=y?`
|
|
93
|
+
${i}${s}${y}`:`
|
|
94
|
+
`;return`${m}
|
|
95
|
+
${s}${h}`}else return`${f}${a}${d.join(" ")}${a}${h}`}function by({indent:e,options:{commentString:t}},n,r,s){if(r&&s&&(r=r.replace(/^\n+/,"")),r){const i=gm(t(r),e);n.push(i.trimStart())}}function $c(e,t){const n=Mn(t)?t.value:t;for(const r of e)if(fr(r)&&(r.key===t||r.key===n||Mn(r.key)&&r.key.value===n))return r}class hl extends kz{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Xc,t),this.items=[]}static from(t,n,r){const{keepUndefined:s,replacer:i}=r,a=new this(t),o=(c,u)=>{if(typeof i=="function")u=i.call(n,c,u);else if(Array.isArray(i)&&!i.includes(c))return;(u!==void 0||s)&&a.items.push(NA(c,u,r))};if(n instanceof Map)for(const[c,u]of n)o(c,u);else if(n&&typeof n=="object")for(const c of Object.keys(n))o(c,n[c]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,n){let r;fr(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new $a(t,t?.value):r=new $a(t.key,t.value);const s=$c(this.items,r.key),i=this.schema?.sortMapEntries;if(s){if(!n)throw new Error(`Key ${r.key} already set`);Mn(s.value)&&_z(r.value)?s.value.value=r.value:s.value=r.value}else if(i){const a=this.items.findIndex(o=>i(r,o)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(t){const n=$c(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const s=$c(this.items,t)?.value;return(!n&&Mn(s)?s.value:s)??void 0}has(t){return!!$c(this.items,t)}set(t,n){this.add(new $a(t,n),!0)}toJSON(t,n,r){const s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(const i of this.items)Sz(n,s,i);return s}toString(t,n,r){if(!t)return JSON.stringify(this);for(const s of this.items)if(!fr(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),vz(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}class xz extends kz{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(yp,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Jp(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=Jp(t);if(typeof r!="number")return;const s=this.items[r];return!n&&Mn(s)?s.value:s}has(t){const n=Jp(t);return typeof n=="number"&&n<this.items.length}set(t,n){const r=Jp(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[r];Mn(s)&&_z(n)?s.value=n:this.items[r]=n}toJSON(t,n){const r=[];n?.onCreate&&n.onCreate(r);let s=0;for(const i of this.items)r.push(fi(i,String(s++),n));return r}toString(t,n,r){return t?vz(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:s}=r,i=new this(t);if(n&&Symbol.iterator in Object(n)){let a=0;for(let o of n){if(typeof s=="function"){const c=n instanceof Set?o:String(a++);o=s.call(n,c,o)}i.items.push(py(o,void 0,r))}}return i}}function Jp(e){let t=Mn(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}function A_e(e,t,n){const{replacer:r}=n,s=new xz(e);s.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof r=="function"&&(a=r.call(t,String(i++),a));let o,c;if(Array.isArray(a))if(a.length===2)o=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const u=Object.keys(a);if(u.length===1)o=u[0],c=a[o];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else o=a;s.items.push(NA(o,c,n))}return s}class RA extends xz{constructor(){super(),this.add=hl.prototype.add.bind(this),this.delete=hl.prototype.delete.bind(this),this.get=hl.prototype.get.bind(this),this.has=hl.prototype.has.bind(this),this.set=hl.prototype.set.bind(this),this.tag=RA.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n?.onCreate&&n.onCreate(r);for(const s of this.items){let i,a;if(fr(s)?(i=fi(s.key,"",n),a=fi(s.value,i,n)):i=fi(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,a)}return r}static from(t,n,r){const s=A_e(t,n,r),i=new this;return i.items=s.items,i}}RA.tag="tag:yaml.org,2002:omap";class OA extends hl{constructor(t){super(t),this.tag=OA.tag}add(t){let n;fr(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new $a(t.key,null):n=new $a(t,null),$c(this.items,n.key)||this.items.push(n)}get(t,n){const r=$c(this.items,t);return!n&&fr(r)?Mn(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=$c(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new $a(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(t,n,r){const{replacer:s}=r,i=new this(t);if(n&&Symbol.iterator in Object(n))for(let a of n)typeof s=="function"&&(a=s.call(n,a,a)),i.items.push(NA(a,null,r));return i}}OA.tag="tag:yaml.org,2002:set";new Set("0123456789ABCDEFabcdef");new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");new Set(",[]{}");new Set(` ,[]{}
|
|
96
|
+
\r `);let C_e=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});C_e.decode();const yE=new TextEncoder;"encodeInto"in yE||(yE.encodeInto=function(e,t){const n=yE.encode(e);return t.set(n),{read:e.length,written:n.length}});new URL("/assets/openapi_extractor_bg-DZrbVm4x.wasm",import.meta.url);const P_e=["get","put","post","delete","patch","head","options","trace"],N_e=["path","query","header","cookie"],P1=Le(...P_e),Tz=Le(...N_e),R_e=ce({name:$,location:Tz,required:qt}),O_e=ce({required:qt,contentTypes:Qe($)}),Iz=ce({method:P1,pathTemplate:$,parameters:Qe(R_e),requestBody:ee(O_e)}),Az=ce({inputSchemaJson:Z($),outputSchemaJson:Z($),refHintKeys:Z(Qe($))}),LA=ce({valueJson:$,mediaType:Z($),label:Z($)}),L_e=ce({name:$,location:Tz,required:qt,description:Z($),examples:Z(Qe(LA))}),D_e=ce({description:Z($),examples:Z(Qe(LA))}),$_e=ce({statusCode:$,description:Z($),contentTypes:Qe($),examples:Z(Qe(LA))}),Cz=ce({summary:Z($),deprecated:Z(qt),parameters:Qe(L_e),requestBody:Z(D_e),response:Z($_e)}),M_e=ce({toolId:$,operationId:Z($),tags:Qe($),name:$,description:ee($),method:P1,path:$,invocation:Iz,operationHash:$,typing:Z(Az),documentation:Z(Cz)}),j_e=ce({version:Le(2),sourceHash:$,tools:Qe(M_e),refHintTable:Z(f1({key:$,value:$}))});class rBe extends Jm("OpenApiExtractionError"){}const F_e=VB(j_e);xB(F_e);ce({toolId:$,rawToolId:$,operationId:Z($),name:$,description:$,group:$,leaf:$,tags:Qe($),versionSegment:Z($),method:P1,path:$,invocation:Iz,operationHash:$,typing:Z(Az),documentation:Z(Cz)});var Yp={exports:{}},_E={},fa={},fc={},kE={},EE={},wE={},RR;function yy(){return RR||(RR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(_){if(super(),!e.IDENTIFIER.test(_))throw new Error("CodeGen: name must be a valid identifier");this.str=_}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(_){super(),this._items=typeof _=="string"?[_]:_}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const _=this._items[0];return _===""||_==='""'}get str(){var _;return(_=this._str)!==null&&_!==void 0?_:this._str=this._items.reduce((k,v)=>`${k}${v}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((k,v)=>(v instanceof n&&(k[v.str]=(k[v.str]||0)+1),k),{})}}e._Code=r,e.nil=new r("");function s(p,..._){const k=[p[0]];let v=0;for(;v<_.length;)o(k,_[v]),k.push(p[++v]);return new r(k)}e._=s;const i=new r("+");function a(p,..._){const k=[h(p[0])];let v=0;for(;v<_.length;)k.push(i),o(k,_[v]),k.push(i,h(p[++v]));return c(k),new r(k)}e.str=a;function o(p,_){_ instanceof r?p.push(..._._items):_ instanceof n?p.push(_):p.push(d(_))}e.addCodeArg=o;function c(p){let _=1;for(;_<p.length-1;){if(p[_]===i){const k=u(p[_-1],p[_+1]);if(k!==void 0){p.splice(_-1,3,k);continue}p[_++]="+"}_++}}function u(p,_){if(_==='""')return p;if(p==='""')return _;if(typeof p=="string")return _ instanceof n||p[p.length-1]!=='"'?void 0:typeof _!="string"?`${p.slice(0,-1)}${_}"`:_[0]==='"'?p.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(p instanceof n))return`"${p}${_.slice(1)}`}function l(p,_){return _.emptyStr()?p:p.emptyStr()?_:a`${p}${_}`}e.strConcat=l;function d(p){return typeof p=="number"||typeof p=="boolean"||p===null?p:h(Array.isArray(p)?p.join(","):p)}function f(p){return new r(h(p))}e.stringify=f;function h(p){return JSON.stringify(p).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=h;function m(p){return typeof p=="string"&&e.IDENTIFIER.test(p)?new r(`.${p}`):s`[${p}]`}e.getProperty=m;function y(p){if(typeof p=="string"&&e.IDENTIFIER.test(p))return new r(`${p}`);throw new Error(`CodeGen: invalid export name: ${p}, use explicit $id name mapping`)}e.getEsmExportName=y;function g(p){return new r(p.toString())}e.regexpCode=g})(wE)),wE}var SE={},OR;function LR(){return OR||(OR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=yy();class n extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var r;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:u,parent:l}={}){this._names={},this._prefixes=u,this._parent=l}toName(u){return u instanceof t.Name?u:this.name(u)}name(u){return new t.Name(this._newName(u))}_newName(u){const l=this._names[u]||this._nameGroup(u);return`${u}${l.index++}`}_nameGroup(u){var l,d;if(!((d=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||d===void 0)&&d.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}e.Scope=s;class i extends t.Name{constructor(u,l){super(l),this.prefix=u}setValue(u,{property:l,itemIndex:d}){this.value=u,this.scopePath=(0,t._)`.${new t.Name(l)}[${d}]`}}e.ValueScopeName=i;const a=(0,t._)`\n`;class o extends s{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?a:t.nil}}get(){return this._scope}name(u){return new i(u,this._newName(u))}value(u,l){var d;if(l.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const f=this.toName(u),{prefix:h}=f,m=(d=l.key)!==null&&d!==void 0?d:l.ref;let y=this._values[h];if(y){const _=y.get(m);if(_)return _}else y=this._values[h]=new Map;y.set(m,f);const g=this._scope[h]||(this._scope[h]=[]),p=g.length;return g[p]=l.ref,f.setValue(l,{property:h,itemIndex:p}),f}getValue(u,l){const d=this._values[u];if(d)return d.get(l)}scopeRefs(u,l=this._values){return this._reduceValues(l,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${u}${d.scopePath}`})}scopeCode(u=this._values,l,d){return this._reduceValues(u,f=>{if(f.value===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return f.value.code},l,d)}_reduceValues(u,l,d={},f){let h=t.nil;for(const m in u){const y=u[m];if(!y)continue;const g=d[m]=d[m]||new Map;y.forEach(p=>{if(g.has(p))return;g.set(p,r.Started);let _=l(p);if(_){const k=this.opts.es5?e.varKinds.var:e.varKinds.const;h=(0,t._)`${h}${k} ${p} = ${_};${this.opts._n}`}else if(_=f?.(p))h=(0,t._)`${h}${_}${this.opts._n}`;else throw new n(p);g.set(p,r.Completed)})}return h}}e.ValueScope=o})(SE)),SE}var DR;function Ze(){return DR||(DR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=yy(),n=LR();var r=yy();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var s=LR();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class i{optimizeNodes(){return this}optimizeNames(N,B){return this}}class a extends i{constructor(N,B,J){super(),this.varKind=N,this.name=B,this.rhs=J}render({es5:N,_n:B}){const J=N?n.varKinds.var:this.varKind,be=this.rhs===void 0?"":` = ${this.rhs}`;return`${J} ${this.name}${be};`+B}optimizeNames(N,B){if(N[this.name.str])return this.rhs&&(this.rhs=G(this.rhs,N,B)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class o extends i{constructor(N,B,J){super(),this.lhs=N,this.rhs=B,this.sideEffects=J}render({_n:N}){return`${this.lhs} = ${this.rhs};`+N}optimizeNames(N,B){if(!(this.lhs instanceof t.Name&&!N[this.lhs.str]&&!this.sideEffects))return this.rhs=G(this.rhs,N,B),this}get names(){const N=this.lhs instanceof t.Name?{}:{...this.lhs.names};return H(N,this.rhs)}}class c extends o{constructor(N,B,J,be){super(N,J,be),this.op=B}render({_n:N}){return`${this.lhs} ${this.op}= ${this.rhs};`+N}}class u extends i{constructor(N){super(),this.label=N,this.names={}}render({_n:N}){return`${this.label}:`+N}}class l extends i{constructor(N){super(),this.label=N,this.names={}}render({_n:N}){return`break${this.label?` ${this.label}`:""};`+N}}class d extends i{constructor(N){super(),this.error=N}render({_n:N}){return`throw ${this.error};`+N}get names(){return this.error.names}}class f extends i{constructor(N){super(),this.code=N}render({_n:N}){return`${this.code};`+N}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(N,B){return this.code=G(this.code,N,B),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class h extends i{constructor(N=[]){super(),this.nodes=N}render(N){return this.nodes.reduce((B,J)=>B+J.render(N),"")}optimizeNodes(){const{nodes:N}=this;let B=N.length;for(;B--;){const J=N[B].optimizeNodes();Array.isArray(J)?N.splice(B,1,...J):J?N[B]=J:N.splice(B,1)}return N.length>0?this:void 0}optimizeNames(N,B){const{nodes:J}=this;let be=J.length;for(;be--;){const ge=J[be];ge.optimizeNames(N,B)||(Q(N,ge.names),J.splice(be,1))}return J.length>0?this:void 0}get names(){return this.nodes.reduce((N,B)=>V(N,B.names),{})}}class m extends h{render(N){return"{"+N._n+super.render(N)+"}"+N._n}}class y extends h{}class g extends m{}g.kind="else";class p extends m{constructor(N,B){super(B),this.condition=N}render(N){let B=`if(${this.condition})`+super.render(N);return this.else&&(B+="else "+this.else.render(N)),B}optimizeNodes(){super.optimizeNodes();const N=this.condition;if(N===!0)return this.nodes;let B=this.else;if(B){const J=B.optimizeNodes();B=this.else=Array.isArray(J)?new g(J):J}if(B)return N===!1?B instanceof p?B:B.nodes:this.nodes.length?this:new p(ne(N),B instanceof p?[B]:B.nodes);if(!(N===!1||!this.nodes.length))return this}optimizeNames(N,B){var J;if(this.else=(J=this.else)===null||J===void 0?void 0:J.optimizeNames(N,B),!!(super.optimizeNames(N,B)||this.else))return this.condition=G(this.condition,N,B),this}get names(){const N=super.names;return H(N,this.condition),this.else&&V(N,this.else.names),N}}p.kind="if";class _ extends m{}_.kind="for";class k extends _{constructor(N){super(),this.iteration=N}render(N){return`for(${this.iteration})`+super.render(N)}optimizeNames(N,B){if(super.optimizeNames(N,B))return this.iteration=G(this.iteration,N,B),this}get names(){return V(super.names,this.iteration.names)}}class v extends _{constructor(N,B,J,be){super(),this.varKind=N,this.name=B,this.from=J,this.to=be}render(N){const B=N.es5?n.varKinds.var:this.varKind,{name:J,from:be,to:ge}=this;return`for(${B} ${J}=${be}; ${J}<${ge}; ${J}++)`+super.render(N)}get names(){const N=H(super.names,this.from);return H(N,this.to)}}class w extends _{constructor(N,B,J,be){super(),this.loop=N,this.varKind=B,this.name=J,this.iterable=be}render(N){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(N)}optimizeNames(N,B){if(super.optimizeNames(N,B))return this.iterable=G(this.iterable,N,B),this}get names(){return V(super.names,this.iterable.names)}}class S extends m{constructor(N,B,J){super(),this.name=N,this.args=B,this.async=J}render(N){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(N)}}S.kind="func";class T extends h{render(N){return"return "+super.render(N)}}T.kind="return";class I extends m{render(N){let B="try"+super.render(N);return this.catch&&(B+=this.catch.render(N)),this.finally&&(B+=this.finally.render(N)),B}optimizeNodes(){var N,B;return super.optimizeNodes(),(N=this.catch)===null||N===void 0||N.optimizeNodes(),(B=this.finally)===null||B===void 0||B.optimizeNodes(),this}optimizeNames(N,B){var J,be;return super.optimizeNames(N,B),(J=this.catch)===null||J===void 0||J.optimizeNames(N,B),(be=this.finally)===null||be===void 0||be.optimizeNames(N,B),this}get names(){const N=super.names;return this.catch&&V(N,this.catch.names),this.finally&&V(N,this.finally.names),N}}class D extends m{constructor(N){super(),this.error=N}render(N){return`catch(${this.error})`+super.render(N)}}D.kind="catch";class R extends m{render(N){return"finally"+super.render(N)}}R.kind="finally";class z{constructor(N,B={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...B,_n:B.lines?`
|
|
97
|
+
`:""},this._extScope=N,this._scope=new n.Scope({parent:N}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(N){return this._scope.name(N)}scopeName(N){return this._extScope.name(N)}scopeValue(N,B){const J=this._extScope.value(N,B);return(this._values[J.prefix]||(this._values[J.prefix]=new Set)).add(J),J}getScopeValue(N,B){return this._extScope.getValue(N,B)}scopeRefs(N){return this._extScope.scopeRefs(N,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(N,B,J,be){const ge=this._scope.toName(B);return J!==void 0&&be&&(this._constants[ge.str]=J),this._leafNode(new a(N,ge,J)),ge}const(N,B,J){return this._def(n.varKinds.const,N,B,J)}let(N,B,J){return this._def(n.varKinds.let,N,B,J)}var(N,B,J){return this._def(n.varKinds.var,N,B,J)}assign(N,B,J){return this._leafNode(new o(N,B,J))}add(N,B){return this._leafNode(new c(N,e.operators.ADD,B))}code(N){return typeof N=="function"?N():N!==t.nil&&this._leafNode(new f(N)),this}object(...N){const B=["{"];for(const[J,be]of N)B.length>1&&B.push(","),B.push(J),(J!==be||this.opts.es5)&&(B.push(":"),(0,t.addCodeArg)(B,be));return B.push("}"),new t._Code(B)}if(N,B,J){if(this._blockNode(new p(N)),B&&J)this.code(B).else().code(J).endIf();else if(B)this.code(B).endIf();else if(J)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(N){return this._elseNode(new p(N))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(p,g)}_for(N,B){return this._blockNode(N),B&&this.code(B).endFor(),this}for(N,B){return this._for(new k(N),B)}forRange(N,B,J,be,ge=this.opts.es5?n.varKinds.var:n.varKinds.let){const Ee=this._scope.toName(N);return this._for(new v(ge,Ee,B,J),()=>be(Ee))}forOf(N,B,J,be=n.varKinds.const){const ge=this._scope.toName(N);if(this.opts.es5){const Ee=B instanceof t.Name?B:this.var("_arr",B);return this.forRange("_i",0,(0,t._)`${Ee}.length`,Re=>{this.var(ge,(0,t._)`${Ee}[${Re}]`),J(ge)})}return this._for(new w("of",be,ge,B),()=>J(ge))}forIn(N,B,J,be=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(N,(0,t._)`Object.keys(${B})`,J);const ge=this._scope.toName(N);return this._for(new w("in",be,ge,B),()=>J(ge))}endFor(){return this._endBlockNode(_)}label(N){return this._leafNode(new u(N))}break(N){return this._leafNode(new l(N))}return(N){const B=new T;if(this._blockNode(B),this.code(N),B.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(T)}try(N,B,J){if(!B&&!J)throw new Error('CodeGen: "try" without "catch" and "finally"');const be=new I;if(this._blockNode(be),this.code(N),B){const ge=this.name("e");this._currNode=be.catch=new D(ge),B(ge)}return J&&(this._currNode=be.finally=new R,this.code(J)),this._endBlockNode(D,R)}throw(N){return this._leafNode(new d(N))}block(N,B){return this._blockStarts.push(this._nodes.length),N&&this.code(N).endBlock(B),this}endBlock(N){const B=this._blockStarts.pop();if(B===void 0)throw new Error("CodeGen: not in self-balancing block");const J=this._nodes.length-B;if(J<0||N!==void 0&&J!==N)throw new Error(`CodeGen: wrong number of nodes: ${J} vs ${N} expected`);return this._nodes.length=B,this}func(N,B=t.nil,J,be){return this._blockNode(new S(N,B,J)),be&&this.code(be).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(N=1){for(;N-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(N){return this._currNode.nodes.push(N),this}_blockNode(N){this._currNode.nodes.push(N),this._nodes.push(N)}_endBlockNode(N,B){const J=this._currNode;if(J instanceof N||B&&J instanceof B)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${B?`${N.kind}/${B.kind}`:N.kind}"`)}_elseNode(N){const B=this._currNode;if(!(B instanceof p))throw new Error('CodeGen: "else" without "if"');return this._currNode=B.else=N,this}get _root(){return this._nodes[0]}get _currNode(){const N=this._nodes;return N[N.length-1]}set _currNode(N){const B=this._nodes;B[B.length-1]=N}}e.CodeGen=z;function V(A,N){for(const B in N)A[B]=(A[B]||0)+(N[B]||0);return A}function H(A,N){return N instanceof t._CodeOrName?V(A,N.names):A}function G(A,N,B){if(A instanceof t.Name)return J(A);if(!be(A))return A;return new t._Code(A._items.reduce((ge,Ee)=>(Ee instanceof t.Name&&(Ee=J(Ee)),Ee instanceof t._Code?ge.push(...Ee._items):ge.push(Ee),ge),[]));function J(ge){const Ee=B[ge.str];return Ee===void 0||N[ge.str]!==1?ge:(delete N[ge.str],Ee)}function be(ge){return ge instanceof t._Code&&ge._items.some(Ee=>Ee instanceof t.Name&&N[Ee.str]===1&&B[Ee.str]!==void 0)}}function Q(A,N){for(const B in N)A[B]=(A[B]||0)-(N[B]||0)}function ne(A){return typeof A=="boolean"||typeof A=="number"||A===null?!A:(0,t._)`!${K(A)}`}e.not=ne;const me=M(e.operators.AND);function ke(...A){return A.reduce(me)}e.and=ke;const et=M(e.operators.OR);function C(...A){return A.reduce(et)}e.or=C;function M(A){return(N,B)=>N===t.nil?B:B===t.nil?N:(0,t._)`${K(N)} ${A} ${K(B)}`}function K(A){return A instanceof t.Name?A:(0,t._)`(${A})`}})(EE)),EE}var rt={},$R;function ht(){if($R)return rt;$R=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.checkStrictMode=rt.getErrorPath=rt.Type=rt.useFunc=rt.setEvaluated=rt.evaluatedPropsToName=rt.mergeEvaluated=rt.eachItem=rt.unescapeJsonPointer=rt.escapeJsonPointer=rt.escapeFragment=rt.unescapeFragment=rt.schemaRefOrVal=rt.schemaHasRulesButRef=rt.schemaHasRules=rt.checkUnknownRules=rt.alwaysValidSchema=rt.toHash=void 0;const e=Ze(),t=yy();function n(w){const S={};for(const T of w)S[T]=!0;return S}rt.toHash=n;function r(w,S){return typeof S=="boolean"?S:Object.keys(S).length===0?!0:(s(w,S),!i(S,w.self.RULES.all))}rt.alwaysValidSchema=r;function s(w,S=w.schema){const{opts:T,self:I}=w;if(!T.strictSchema||typeof S=="boolean")return;const D=I.RULES.keywords;for(const R in S)D[R]||v(w,`unknown keyword: "${R}"`)}rt.checkUnknownRules=s;function i(w,S){if(typeof w=="boolean")return!w;for(const T in w)if(S[T])return!0;return!1}rt.schemaHasRules=i;function a(w,S){if(typeof w=="boolean")return!w;for(const T in w)if(T!=="$ref"&&S.all[T])return!0;return!1}rt.schemaHasRulesButRef=a;function o({topSchemaRef:w,schemaPath:S},T,I,D){if(!D){if(typeof T=="number"||typeof T=="boolean")return T;if(typeof T=="string")return(0,e._)`${T}`}return(0,e._)`${w}${S}${(0,e.getProperty)(I)}`}rt.schemaRefOrVal=o;function c(w){return d(decodeURIComponent(w))}rt.unescapeFragment=c;function u(w){return encodeURIComponent(l(w))}rt.escapeFragment=u;function l(w){return typeof w=="number"?`${w}`:w.replace(/~/g,"~0").replace(/\//g,"~1")}rt.escapeJsonPointer=l;function d(w){return w.replace(/~1/g,"/").replace(/~0/g,"~")}rt.unescapeJsonPointer=d;function f(w,S){if(Array.isArray(w))for(const T of w)S(T);else S(w)}rt.eachItem=f;function h({mergeNames:w,mergeToName:S,mergeValues:T,resultToName:I}){return(D,R,z,V)=>{const H=z===void 0?R:z instanceof e.Name?(R instanceof e.Name?w(D,R,z):S(D,R,z),z):R instanceof e.Name?(S(D,z,R),R):T(R,z);return V===e.Name&&!(H instanceof e.Name)?I(D,H):H}}rt.mergeEvaluated={props:h({mergeNames:(w,S,T)=>w.if((0,e._)`${T} !== true && ${S} !== undefined`,()=>{w.if((0,e._)`${S} === true`,()=>w.assign(T,!0),()=>w.assign(T,(0,e._)`${T} || {}`).code((0,e._)`Object.assign(${T}, ${S})`))}),mergeToName:(w,S,T)=>w.if((0,e._)`${T} !== true`,()=>{S===!0?w.assign(T,!0):(w.assign(T,(0,e._)`${T} || {}`),y(w,T,S))}),mergeValues:(w,S)=>w===!0?!0:{...w,...S},resultToName:m}),items:h({mergeNames:(w,S,T)=>w.if((0,e._)`${T} !== true && ${S} !== undefined`,()=>w.assign(T,(0,e._)`${S} === true ? true : ${T} > ${S} ? ${T} : ${S}`)),mergeToName:(w,S,T)=>w.if((0,e._)`${T} !== true`,()=>w.assign(T,S===!0?!0:(0,e._)`${T} > ${S} ? ${T} : ${S}`)),mergeValues:(w,S)=>w===!0?!0:Math.max(w,S),resultToName:(w,S)=>w.var("items",S)})};function m(w,S){if(S===!0)return w.var("props",!0);const T=w.var("props",(0,e._)`{}`);return S!==void 0&&y(w,T,S),T}rt.evaluatedPropsToName=m;function y(w,S,T){Object.keys(T).forEach(I=>w.assign((0,e._)`${S}${(0,e.getProperty)(I)}`,!0))}rt.setEvaluated=y;const g={};function p(w,S){return w.scopeValue("func",{ref:S,code:g[S.code]||(g[S.code]=new t._Code(S.code))})}rt.useFunc=p;var _;(function(w){w[w.Num=0]="Num",w[w.Str=1]="Str"})(_||(rt.Type=_={}));function k(w,S,T){if(w instanceof e.Name){const I=S===_.Num;return T?I?(0,e._)`"[" + ${w} + "]"`:(0,e._)`"['" + ${w} + "']"`:I?(0,e._)`"/" + ${w}`:(0,e._)`"/" + ${w}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return T?(0,e.getProperty)(w).toString():"/"+l(w)}rt.getErrorPath=k;function v(w,S,T=w.opts.strictSchema){if(T){if(S=`strict mode: ${S}`,T===!0)throw new Error(S);w.self.logger.warn(S)}}return rt.checkStrictMode=v,rt}var Qp={},MR;function xi(){if(MR)return Qp;MR=1,Object.defineProperty(Qp,"__esModule",{value:!0});const e=Ze(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Qp.default=t,Qp}var jR;function N1(){return jR||(jR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=Ze(),n=ht(),r=xi();e.keywordError={message:({keyword:g})=>(0,t.str)`must pass "${g}" keyword validation`},e.keyword$DataError={message:({keyword:g,schemaType:p})=>p?(0,t.str)`"${g}" keyword must be ${p} ($data)`:(0,t.str)`"${g}" keyword is invalid ($data)`};function s(g,p=e.keywordError,_,k){const{it:v}=g,{gen:w,compositeRule:S,allErrors:T}=v,I=d(g,p,_);k??(S||T)?c(w,I):u(v,(0,t._)`[${I}]`)}e.reportError=s;function i(g,p=e.keywordError,_){const{it:k}=g,{gen:v,compositeRule:w,allErrors:S}=k,T=d(g,p,_);c(v,T),w||S||u(k,r.default.vErrors)}e.reportExtraError=i;function a(g,p){g.assign(r.default.errors,p),g.if((0,t._)`${r.default.vErrors} !== null`,()=>g.if(p,()=>g.assign((0,t._)`${r.default.vErrors}.length`,p),()=>g.assign(r.default.vErrors,null)))}e.resetErrorsCount=a;function o({gen:g,keyword:p,schemaValue:_,data:k,errsCount:v,it:w}){if(v===void 0)throw new Error("ajv implementation error");const S=g.name("err");g.forRange("i",v,r.default.errors,T=>{g.const(S,(0,t._)`${r.default.vErrors}[${T}]`),g.if((0,t._)`${S}.instancePath === undefined`,()=>g.assign((0,t._)`${S}.instancePath`,(0,t.strConcat)(r.default.instancePath,w.errorPath))),g.assign((0,t._)`${S}.schemaPath`,(0,t.str)`${w.errSchemaPath}/${p}`),w.opts.verbose&&(g.assign((0,t._)`${S}.schema`,_),g.assign((0,t._)`${S}.data`,k))})}e.extendErrors=o;function c(g,p){const _=g.const("err",p);g.if((0,t._)`${r.default.vErrors} === null`,()=>g.assign(r.default.vErrors,(0,t._)`[${_}]`),(0,t._)`${r.default.vErrors}.push(${_})`),g.code((0,t._)`${r.default.errors}++`)}function u(g,p){const{gen:_,validateName:k,schemaEnv:v}=g;v.$async?_.throw((0,t._)`new ${g.ValidationError}(${p})`):(_.assign((0,t._)`${k}.errors`,p),_.return(!1))}const l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function d(g,p,_){const{createErrors:k}=g.it;return k===!1?(0,t._)`{}`:f(g,p,_)}function f(g,p,_={}){const{gen:k,it:v}=g,w=[h(v,_),m(g,_)];return y(g,p,w),k.object(...w)}function h({errorPath:g},{instancePath:p}){const _=p?(0,t.str)`${g}${(0,n.getErrorPath)(p,n.Type.Str)}`:g;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,_)]}function m({keyword:g,it:{errSchemaPath:p}},{schemaPath:_,parentSchema:k}){let v=k?p:(0,t.str)`${p}/${g}`;return _&&(v=(0,t.str)`${v}${(0,n.getErrorPath)(_,n.Type.Str)}`),[l.schemaPath,v]}function y(g,{params:p,message:_},k){const{keyword:v,data:w,schemaValue:S,it:T}=g,{opts:I,propertyName:D,topSchemaRef:R,schemaPath:z}=T;k.push([l.keyword,v],[l.params,typeof p=="function"?p(g):p||(0,t._)`{}`]),I.messages&&k.push([l.message,typeof _=="function"?_(g):_]),I.verbose&&k.push([l.schema,S],[l.parentSchema,(0,t._)`${R}${z}`],[r.default.data,w]),D&&k.push([l.propertyName,D])}})(kE)),kE}var FR;function B_e(){if(FR)return fc;FR=1,Object.defineProperty(fc,"__esModule",{value:!0}),fc.boolOrEmptySchema=fc.topBoolOrEmptySchema=void 0;const e=N1(),t=Ze(),n=xi(),r={message:"boolean schema is false"};function s(o){const{gen:c,schema:u,validateName:l}=o;u===!1?a(o,!1):typeof u=="object"&&u.$async===!0?c.return(n.default.data):(c.assign((0,t._)`${l}.errors`,null),c.return(!0))}fc.topBoolOrEmptySchema=s;function i(o,c){const{gen:u,schema:l}=o;l===!1?(u.var(c,!1),a(o)):u.var(c,!0)}fc.boolOrEmptySchema=i;function a(o,c){const{gen:u,data:l}=o,d={gen:u,keyword:"false schema",data:l,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,e.reportError)(d,r,void 0,c)}return fc}var tr={},hc={},BR;function Pz(){if(BR)return hc;BR=1,Object.defineProperty(hc,"__esModule",{value:!0}),hc.getRules=hc.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(s){return typeof s=="string"&&t.has(s)}hc.isJSONType=n;function r(){const s={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...s,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},s.number,s.string,s.array,s.object],post:{rules:[]},all:{},keywords:{}}}return hc.getRules=r,hc}var ha={},zR;function Nz(){if(zR)return ha;zR=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.shouldUseRule=ha.shouldUseGroup=ha.schemaHasRulesForType=void 0;function e({schema:r,self:s},i){const a=s.RULES.types[i];return a&&a!==!0&&t(r,a)}ha.schemaHasRulesForType=e;function t(r,s){return s.rules.some(i=>n(r,i))}ha.shouldUseGroup=t;function n(r,s){var i;return r[s.keyword]!==void 0||((i=s.definition.implements)===null||i===void 0?void 0:i.some(a=>r[a]!==void 0))}return ha.shouldUseRule=n,ha}var UR;function _y(){if(UR)return tr;UR=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.reportTypeError=tr.checkDataTypes=tr.checkDataType=tr.coerceAndCheckDataType=tr.getJSONTypes=tr.getSchemaTypes=tr.DataType=void 0;const e=Pz(),t=Nz(),n=N1(),r=Ze(),s=ht();var i;(function(_){_[_.Correct=0]="Correct",_[_.Wrong=1]="Wrong"})(i||(tr.DataType=i={}));function a(_){const k=o(_.type);if(k.includes("null")){if(_.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!k.length&&_.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');_.nullable===!0&&k.push("null")}return k}tr.getSchemaTypes=a;function o(_){const k=Array.isArray(_)?_:_?[_]:[];if(k.every(e.isJSONType))return k;throw new Error("type must be JSONType or JSONType[]: "+k.join(","))}tr.getJSONTypes=o;function c(_,k){const{gen:v,data:w,opts:S}=_,T=l(k,S.coerceTypes),I=k.length>0&&!(T.length===0&&k.length===1&&(0,t.schemaHasRulesForType)(_,k[0]));if(I){const D=m(k,w,S.strictNumbers,i.Wrong);v.if(D,()=>{T.length?d(_,k,T):g(_)})}return I}tr.coerceAndCheckDataType=c;const u=new Set(["string","number","integer","boolean","null"]);function l(_,k){return k?_.filter(v=>u.has(v)||k==="array"&&v==="array"):[]}function d(_,k,v){const{gen:w,data:S,opts:T}=_,I=w.let("dataType",(0,r._)`typeof ${S}`),D=w.let("coerced",(0,r._)`undefined`);T.coerceTypes==="array"&&w.if((0,r._)`${I} == 'object' && Array.isArray(${S}) && ${S}.length == 1`,()=>w.assign(S,(0,r._)`${S}[0]`).assign(I,(0,r._)`typeof ${S}`).if(m(k,S,T.strictNumbers),()=>w.assign(D,S))),w.if((0,r._)`${D} !== undefined`);for(const z of v)(u.has(z)||z==="array"&&T.coerceTypes==="array")&&R(z);w.else(),g(_),w.endIf(),w.if((0,r._)`${D} !== undefined`,()=>{w.assign(S,D),f(_,D)});function R(z){switch(z){case"string":w.elseIf((0,r._)`${I} == "number" || ${I} == "boolean"`).assign(D,(0,r._)`"" + ${S}`).elseIf((0,r._)`${S} === null`).assign(D,(0,r._)`""`);return;case"number":w.elseIf((0,r._)`${I} == "boolean" || ${S} === null
|
|
98
|
+
|| (${I} == "string" && ${S} && ${S} == +${S})`).assign(D,(0,r._)`+${S}`);return;case"integer":w.elseIf((0,r._)`${I} === "boolean" || ${S} === null
|
|
99
|
+
|| (${I} === "string" && ${S} && ${S} == +${S} && !(${S} % 1))`).assign(D,(0,r._)`+${S}`);return;case"boolean":w.elseIf((0,r._)`${S} === "false" || ${S} === 0 || ${S} === null`).assign(D,!1).elseIf((0,r._)`${S} === "true" || ${S} === 1`).assign(D,!0);return;case"null":w.elseIf((0,r._)`${S} === "" || ${S} === 0 || ${S} === false`),w.assign(D,null);return;case"array":w.elseIf((0,r._)`${I} === "string" || ${I} === "number"
|
|
100
|
+
|| ${I} === "boolean" || ${S} === null`).assign(D,(0,r._)`[${S}]`)}}}function f({gen:_,parentData:k,parentDataProperty:v},w){_.if((0,r._)`${k} !== undefined`,()=>_.assign((0,r._)`${k}[${v}]`,w))}function h(_,k,v,w=i.Correct){const S=w===i.Correct?r.operators.EQ:r.operators.NEQ;let T;switch(_){case"null":return(0,r._)`${k} ${S} null`;case"array":T=(0,r._)`Array.isArray(${k})`;break;case"object":T=(0,r._)`${k} && typeof ${k} == "object" && !Array.isArray(${k})`;break;case"integer":T=I((0,r._)`!(${k} % 1) && !isNaN(${k})`);break;case"number":T=I();break;default:return(0,r._)`typeof ${k} ${S} ${_}`}return w===i.Correct?T:(0,r.not)(T);function I(D=r.nil){return(0,r.and)((0,r._)`typeof ${k} == "number"`,D,v?(0,r._)`isFinite(${k})`:r.nil)}}tr.checkDataType=h;function m(_,k,v,w){if(_.length===1)return h(_[0],k,v,w);let S;const T=(0,s.toHash)(_);if(T.array&&T.object){const I=(0,r._)`typeof ${k} != "object"`;S=T.null?I:(0,r._)`!${k} || ${I}`,delete T.null,delete T.array,delete T.object}else S=r.nil;T.number&&delete T.integer;for(const I in T)S=(0,r.and)(S,h(I,k,v,w));return S}tr.checkDataTypes=m;const y={message:({schema:_})=>`must be ${_}`,params:({schema:_,schemaValue:k})=>typeof _=="string"?(0,r._)`{type: ${_}}`:(0,r._)`{type: ${k}}`};function g(_){const k=p(_);(0,n.reportError)(k,y)}tr.reportTypeError=g;function p(_){const{gen:k,data:v,schema:w}=_,S=(0,s.schemaRefOrVal)(_,w,"type");return{gen:k,keyword:"type",data:v,schema:w.type,schemaCode:S,schemaValue:S,parentSchema:w,params:{},it:_}}return tr}var wf={},VR;function z_e(){if(VR)return wf;VR=1,Object.defineProperty(wf,"__esModule",{value:!0}),wf.assignDefaults=void 0;const e=Ze(),t=ht();function n(s,i){const{properties:a,items:o}=s.schema;if(i==="object"&&a)for(const c in a)r(s,c,a[c].default);else i==="array"&&Array.isArray(o)&&o.forEach((c,u)=>r(s,u,c.default))}wf.assignDefaults=n;function r(s,i,a){const{gen:o,compositeRule:c,data:u,opts:l}=s;if(a===void 0)return;const d=(0,e._)`${u}${(0,e.getProperty)(i)}`;if(c){(0,t.checkStrictMode)(s,`default is ignored for: ${d}`);return}let f=(0,e._)`${d} === undefined`;l.useDefaults==="empty"&&(f=(0,e._)`${f} || ${d} === null || ${d} === ""`),o.if(f,(0,e._)`${d} = ${(0,e.stringify)(a)}`)}return wf}var Ws={},Ct={},HR;function Ti(){if(HR)return Ct;HR=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.validateUnion=Ct.validateArray=Ct.usePattern=Ct.callValidateCode=Ct.schemaProperties=Ct.allSchemaProperties=Ct.noPropertyInData=Ct.propertyInData=Ct.isOwnProperty=Ct.hasPropFunc=Ct.reportMissingProp=Ct.checkMissingProp=Ct.checkReportMissingProp=void 0;const e=Ze(),t=ht(),n=xi(),r=ht();function s(_,k){const{gen:v,data:w,it:S}=_;v.if(l(v,w,k,S.opts.ownProperties),()=>{_.setParams({missingProperty:(0,e._)`${k}`},!0),_.error()})}Ct.checkReportMissingProp=s;function i({gen:_,data:k,it:{opts:v}},w,S){return(0,e.or)(...w.map(T=>(0,e.and)(l(_,k,T,v.ownProperties),(0,e._)`${S} = ${T}`)))}Ct.checkMissingProp=i;function a(_,k){_.setParams({missingProperty:k},!0),_.error()}Ct.reportMissingProp=a;function o(_){return _.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Ct.hasPropFunc=o;function c(_,k,v){return(0,e._)`${o(_)}.call(${k}, ${v})`}Ct.isOwnProperty=c;function u(_,k,v,w){const S=(0,e._)`${k}${(0,e.getProperty)(v)} !== undefined`;return w?(0,e._)`${S} && ${c(_,k,v)}`:S}Ct.propertyInData=u;function l(_,k,v,w){const S=(0,e._)`${k}${(0,e.getProperty)(v)} === undefined`;return w?(0,e.or)(S,(0,e.not)(c(_,k,v))):S}Ct.noPropertyInData=l;function d(_){return _?Object.keys(_).filter(k=>k!=="__proto__"):[]}Ct.allSchemaProperties=d;function f(_,k){return d(k).filter(v=>!(0,t.alwaysValidSchema)(_,k[v]))}Ct.schemaProperties=f;function h({schemaCode:_,data:k,it:{gen:v,topSchemaRef:w,schemaPath:S,errorPath:T},it:I},D,R,z){const V=z?(0,e._)`${_}, ${k}, ${w}${S}`:k,H=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,T)],[n.default.parentData,I.parentData],[n.default.parentDataProperty,I.parentDataProperty],[n.default.rootData,n.default.rootData]];I.opts.dynamicRef&&H.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const G=(0,e._)`${V}, ${v.object(...H)}`;return R!==e.nil?(0,e._)`${D}.call(${R}, ${G})`:(0,e._)`${D}(${G})`}Ct.callValidateCode=h;const m=(0,e._)`new RegExp`;function y({gen:_,it:{opts:k}},v){const w=k.unicodeRegExp?"u":"",{regExp:S}=k.code,T=S(v,w);return _.scopeValue("pattern",{key:T.toString(),ref:T,code:(0,e._)`${S.code==="new RegExp"?m:(0,r.useFunc)(_,S)}(${v}, ${w})`})}Ct.usePattern=y;function g(_){const{gen:k,data:v,keyword:w,it:S}=_,T=k.name("valid");if(S.allErrors){const D=k.let("valid",!0);return I(()=>k.assign(D,!1)),D}return k.var(T,!0),I(()=>k.break()),T;function I(D){const R=k.const("len",(0,e._)`${v}.length`);k.forRange("i",0,R,z=>{_.subschema({keyword:w,dataProp:z,dataPropType:t.Type.Num},T),k.if((0,e.not)(T),D)})}}Ct.validateArray=g;function p(_){const{gen:k,schema:v,keyword:w,it:S}=_;if(!Array.isArray(v))throw new Error("ajv implementation error");if(v.some(R=>(0,t.alwaysValidSchema)(S,R))&&!S.opts.unevaluated)return;const I=k.let("valid",!1),D=k.name("_valid");k.block(()=>v.forEach((R,z)=>{const V=_.subschema({keyword:w,schemaProp:z,compositeRule:!0},D);k.assign(I,(0,e._)`${I} || ${D}`),_.mergeValidEvaluated(V,D)||k.if((0,e.not)(I))})),_.result(I,()=>_.reset(),()=>_.error(!0))}return Ct.validateUnion=p,Ct}var qR;function U_e(){if(qR)return Ws;qR=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.validateKeywordUsage=Ws.validSchemaType=Ws.funcKeywordCode=Ws.macroKeywordCode=void 0;const e=Ze(),t=xi(),n=Ti(),r=N1();function s(f,h){const{gen:m,keyword:y,schema:g,parentSchema:p,it:_}=f,k=h.macro.call(_.self,g,p,_),v=u(m,y,k);_.opts.validateSchema!==!1&&_.self.validateSchema(k,!0);const w=m.name("valid");f.subschema({schema:k,schemaPath:e.nil,errSchemaPath:`${_.errSchemaPath}/${y}`,topSchemaRef:v,compositeRule:!0},w),f.pass(w,()=>f.error(!0))}Ws.macroKeywordCode=s;function i(f,h){var m;const{gen:y,keyword:g,schema:p,parentSchema:_,$data:k,it:v}=f;c(v,h);const w=!k&&h.compile?h.compile.call(v.self,p,_,v):h.validate,S=u(y,g,w),T=y.let("valid");f.block$data(T,I),f.ok((m=h.valid)!==null&&m!==void 0?m:T);function I(){if(h.errors===!1)z(),h.modifying&&a(f),V(()=>f.error());else{const H=h.async?D():R();h.modifying&&a(f),V(()=>o(f,H))}}function D(){const H=y.let("ruleErrs",null);return y.try(()=>z((0,e._)`await `),G=>y.assign(T,!1).if((0,e._)`${G} instanceof ${v.ValidationError}`,()=>y.assign(H,(0,e._)`${G}.errors`),()=>y.throw(G))),H}function R(){const H=(0,e._)`${S}.errors`;return y.assign(H,null),z(e.nil),H}function z(H=h.async?(0,e._)`await `:e.nil){const G=v.opts.passContext?t.default.this:t.default.self,Q=!("compile"in h&&!k||h.schema===!1);y.assign(T,(0,e._)`${H}${(0,n.callValidateCode)(f,S,G,Q)}`,h.modifying)}function V(H){var G;y.if((0,e.not)((G=h.valid)!==null&&G!==void 0?G:T),H)}}Ws.funcKeywordCode=i;function a(f){const{gen:h,data:m,it:y}=f;h.if(y.parentData,()=>h.assign(m,(0,e._)`${y.parentData}[${y.parentDataProperty}]`))}function o(f,h){const{gen:m}=f;m.if((0,e._)`Array.isArray(${h})`,()=>{m.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${h} : ${t.default.vErrors}.concat(${h})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(f)},()=>f.error())}function c({schemaEnv:f},h){if(h.async&&!f.$async)throw new Error("async keyword in sync schema")}function u(f,h,m){if(m===void 0)throw new Error(`keyword "${h}" failed to compile`);return f.scopeValue("keyword",typeof m=="function"?{ref:m}:{ref:m,code:(0,e.stringify)(m)})}function l(f,h,m=!1){return!h.length||h.some(y=>y==="array"?Array.isArray(f):y==="object"?f&&typeof f=="object"&&!Array.isArray(f):typeof f==y||m&&typeof f>"u")}Ws.validSchemaType=l;function d({schema:f,opts:h,self:m,errSchemaPath:y},g,p){if(Array.isArray(g.keyword)?!g.keyword.includes(p):g.keyword!==p)throw new Error("ajv implementation error");const _=g.dependencies;if(_?.some(k=>!Object.prototype.hasOwnProperty.call(f,k)))throw new Error(`parent schema must have dependencies of ${p}: ${_.join(",")}`);if(g.validateSchema&&!g.validateSchema(f[p])){const v=`keyword "${p}" value is invalid at path "${y}": `+m.errorsText(g.validateSchema.errors);if(h.validateSchema==="log")m.logger.error(v);else throw new Error(v)}}return Ws.validateKeywordUsage=d,Ws}var ma={},GR;function V_e(){if(GR)return ma;GR=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.extendSubschemaMode=ma.extendSubschemaData=ma.getSubschema=void 0;const e=Ze(),t=ht();function n(i,{keyword:a,schemaProp:o,schema:c,schemaPath:u,errSchemaPath:l,topSchemaRef:d}){if(a!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const f=i.schema[a];return o===void 0?{schema:f,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${a}`}:{schema:f[o],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(o)}`,errSchemaPath:`${i.errSchemaPath}/${a}/${(0,t.escapeFragment)(o)}`}}if(c!==void 0){if(u===void 0||l===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:u,topSchemaRef:d,errSchemaPath:l}}throw new Error('either "keyword" or "schema" must be passed')}ma.getSubschema=n;function r(i,a,{dataProp:o,dataPropType:c,data:u,dataTypes:l,propertyName:d}){if(u!==void 0&&o!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:f}=a;if(o!==void 0){const{errorPath:m,dataPathArr:y,opts:g}=a,p=f.let("data",(0,e._)`${a.data}${(0,e.getProperty)(o)}`,!0);h(p),i.errorPath=(0,e.str)`${m}${(0,t.getErrorPath)(o,c,g.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${o}`,i.dataPathArr=[...y,i.parentDataProperty]}if(u!==void 0){const m=u instanceof e.Name?u:f.let("data",u,!0);h(m),d!==void 0&&(i.propertyName=d)}l&&(i.dataTypes=l);function h(m){i.data=m,i.dataLevel=a.dataLevel+1,i.dataTypes=[],a.definedProperties=new Set,i.parentData=a.data,i.dataNames=[...a.dataNames,m]}}ma.extendSubschemaData=r;function s(i,{jtdDiscriminator:a,jtdMetadata:o,compositeRule:c,createErrors:u,allErrors:l}){c!==void 0&&(i.compositeRule=c),u!==void 0&&(i.createErrors=u),l!==void 0&&(i.allErrors=l),i.jtdDiscriminator=a,i.jtdMetadata=o}return ma.extendSubschemaMode=s,ma}var Tr={},vE,KR;function Rz(){return KR||(KR=1,vE=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,s,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!e(t[s],n[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=r;s--!==0;){var a=i[s];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}),vE}var xE={exports:{}},WR;function H_e(){if(WR)return xE.exports;WR=1;var e=xE.exports=function(r,s,i){typeof s=="function"&&(i=s,s={}),i=s.cb||i;var a=typeof i=="function"?i:i.pre||function(){},o=i.post||function(){};t(s,a,o,r,"",r)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(r,s,i,a,o,c,u,l,d,f){if(a&&typeof a=="object"&&!Array.isArray(a)){s(a,o,c,u,l,d,f);for(var h in a){var m=a[h];if(Array.isArray(m)){if(h in e.arrayKeywords)for(var y=0;y<m.length;y++)t(r,s,i,m[y],o+"/"+h+"/"+y,c,o,h,a,y)}else if(h in e.propsKeywords){if(m&&typeof m=="object")for(var g in m)t(r,s,i,m[g],o+"/"+h+"/"+n(g),c,o,h,a,g)}else(h in e.keywords||r.allKeys&&!(h in e.skipKeywords))&&t(r,s,i,m,o+"/"+h,c,o,h,a)}i(a,o,c,u,l,d,f)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return xE.exports}var JR;function R1(){if(JR)return Tr;JR=1,Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.getSchemaRefs=Tr.resolveUrl=Tr.normalizeId=Tr._getFullPath=Tr.getFullPath=Tr.inlineRef=void 0;const e=ht(),t=Rz(),n=H_e(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(y,g=!0){return typeof y=="boolean"?!0:g===!0?!a(y):g?o(y)<=g:!1}Tr.inlineRef=s;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(y){for(const g in y){if(i.has(g))return!0;const p=y[g];if(Array.isArray(p)&&p.some(a)||typeof p=="object"&&a(p))return!0}return!1}function o(y){let g=0;for(const p in y){if(p==="$ref")return 1/0;if(g++,!r.has(p)&&(typeof y[p]=="object"&&(0,e.eachItem)(y[p],_=>g+=o(_)),g===1/0))return 1/0}return g}function c(y,g="",p){p!==!1&&(g=d(g));const _=y.parse(g);return u(y,_)}Tr.getFullPath=c;function u(y,g){return y.serialize(g).split("#")[0]+"#"}Tr._getFullPath=u;const l=/#\/?$/;function d(y){return y?y.replace(l,""):""}Tr.normalizeId=d;function f(y,g,p){return p=d(p),y.resolve(g,p)}Tr.resolveUrl=f;const h=/^[a-z_][-a-z0-9._]*$/i;function m(y,g){if(typeof y=="boolean")return{};const{schemaId:p,uriResolver:_}=this.opts,k=d(y[p]||g),v={"":k},w=c(_,k,!1),S={},T=new Set;return n(y,{allKeys:!0},(R,z,V,H)=>{if(H===void 0)return;const G=w+z;let Q=v[H];typeof R[p]=="string"&&(Q=ne.call(this,R[p])),me.call(this,R.$anchor),me.call(this,R.$dynamicAnchor),v[z]=Q;function ne(ke){const et=this.opts.uriResolver.resolve;if(ke=d(Q?et(Q,ke):ke),T.has(ke))throw D(ke);T.add(ke);let C=this.refs[ke];return typeof C=="string"&&(C=this.refs[C]),typeof C=="object"?I(R,C.schema,ke):ke!==d(G)&&(ke[0]==="#"?(I(R,S[ke],ke),S[ke]=R):this.refs[ke]=G),ke}function me(ke){if(typeof ke=="string"){if(!h.test(ke))throw new Error(`invalid anchor "${ke}"`);ne.call(this,`#${ke}`)}}}),S;function I(R,z,V){if(z!==void 0&&!t(R,z))throw D(V)}function D(R){return new Error(`reference "${R}" resolves to more than one schema`)}}return Tr.getSchemaRefs=m,Tr}var YR;function O1(){if(YR)return fa;YR=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.getData=fa.KeywordCxt=fa.validateFunctionCode=void 0;const e=B_e(),t=_y(),n=Nz(),r=_y(),s=z_e(),i=U_e(),a=V_e(),o=Ze(),c=xi(),u=R1(),l=ht(),d=N1();function f(q){if(w(q)&&(T(q),v(q))){g(q);return}h(q,()=>(0,e.topBoolOrEmptySchema)(q))}fa.validateFunctionCode=f;function h({gen:q,validateName:W,schema:se,schemaEnv:le,opts:we},Fe){we.code.es5?q.func(W,(0,o._)`${c.default.data}, ${c.default.valCxt}`,le.$async,()=>{q.code((0,o._)`"use strict"; ${_(se,we)}`),y(q,we),q.code(Fe)}):q.func(W,(0,o._)`${c.default.data}, ${m(we)}`,le.$async,()=>q.code(_(se,we)).code(Fe))}function m(q){return(0,o._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${q.dynamicRef?(0,o._)`, ${c.default.dynamicAnchors}={}`:o.nil}}={}`}function y(q,W){q.if(c.default.valCxt,()=>{q.var(c.default.instancePath,(0,o._)`${c.default.valCxt}.${c.default.instancePath}`),q.var(c.default.parentData,(0,o._)`${c.default.valCxt}.${c.default.parentData}`),q.var(c.default.parentDataProperty,(0,o._)`${c.default.valCxt}.${c.default.parentDataProperty}`),q.var(c.default.rootData,(0,o._)`${c.default.valCxt}.${c.default.rootData}`),W.dynamicRef&&q.var(c.default.dynamicAnchors,(0,o._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{q.var(c.default.instancePath,(0,o._)`""`),q.var(c.default.parentData,(0,o._)`undefined`),q.var(c.default.parentDataProperty,(0,o._)`undefined`),q.var(c.default.rootData,c.default.data),W.dynamicRef&&q.var(c.default.dynamicAnchors,(0,o._)`{}`)})}function g(q){const{schema:W,opts:se,gen:le}=q;h(q,()=>{se.$comment&&W.$comment&&H(q),R(q),le.let(c.default.vErrors,null),le.let(c.default.errors,0),se.unevaluated&&p(q),I(q),G(q)})}function p(q){const{gen:W,validateName:se}=q;q.evaluated=W.const("evaluated",(0,o._)`${se}.evaluated`),W.if((0,o._)`${q.evaluated}.dynamicProps`,()=>W.assign((0,o._)`${q.evaluated}.props`,(0,o._)`undefined`)),W.if((0,o._)`${q.evaluated}.dynamicItems`,()=>W.assign((0,o._)`${q.evaluated}.items`,(0,o._)`undefined`))}function _(q,W){const se=typeof q=="object"&&q[W.schemaId];return se&&(W.code.source||W.code.process)?(0,o._)`/*# sourceURL=${se} */`:o.nil}function k(q,W){if(w(q)&&(T(q),v(q))){S(q,W);return}(0,e.boolOrEmptySchema)(q,W)}function v({schema:q,self:W}){if(typeof q=="boolean")return!q;for(const se in q)if(W.RULES.all[se])return!0;return!1}function w(q){return typeof q.schema!="boolean"}function S(q,W){const{schema:se,gen:le,opts:we}=q;we.$comment&&se.$comment&&H(q),z(q),V(q);const Fe=le.const("_errs",c.default.errors);I(q,Fe),le.var(W,(0,o._)`${Fe} === ${c.default.errors}`)}function T(q){(0,l.checkUnknownRules)(q),D(q)}function I(q,W){if(q.opts.jtd)return ne(q,[],!1,W);const se=(0,t.getSchemaTypes)(q.schema),le=(0,t.coerceAndCheckDataType)(q,se);ne(q,se,!le,W)}function D(q){const{schema:W,errSchemaPath:se,opts:le,self:we}=q;W.$ref&&le.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(W,we.RULES)&&we.logger.warn(`$ref: keywords ignored in schema at path "${se}"`)}function R(q){const{schema:W,opts:se}=q;W.default!==void 0&&se.useDefaults&&se.strictSchema&&(0,l.checkStrictMode)(q,"default is ignored in the schema root")}function z(q){const W=q.schema[q.opts.schemaId];W&&(q.baseId=(0,u.resolveUrl)(q.opts.uriResolver,q.baseId,W))}function V(q){if(q.schema.$async&&!q.schemaEnv.$async)throw new Error("async schema in sync schema")}function H({gen:q,schemaEnv:W,schema:se,errSchemaPath:le,opts:we}){const Fe=se.$comment;if(we.$comment===!0)q.code((0,o._)`${c.default.self}.logger.log(${Fe})`);else if(typeof we.$comment=="function"){const Ie=(0,o.str)`${le}/$comment`,Me=q.scopeValue("root",{ref:W.root});q.code((0,o._)`${c.default.self}.opts.$comment(${Fe}, ${Ie}, ${Me}.schema)`)}}function G(q){const{gen:W,schemaEnv:se,validateName:le,ValidationError:we,opts:Fe}=q;se.$async?W.if((0,o._)`${c.default.errors} === 0`,()=>W.return(c.default.data),()=>W.throw((0,o._)`new ${we}(${c.default.vErrors})`)):(W.assign((0,o._)`${le}.errors`,c.default.vErrors),Fe.unevaluated&&Q(q),W.return((0,o._)`${c.default.errors} === 0`))}function Q({gen:q,evaluated:W,props:se,items:le}){se instanceof o.Name&&q.assign((0,o._)`${W}.props`,se),le instanceof o.Name&&q.assign((0,o._)`${W}.items`,le)}function ne(q,W,se,le){const{gen:we,schema:Fe,data:Ie,allErrors:Me,opts:mt,self:it}=q,{RULES:At}=it;if(Fe.$ref&&(mt.ignoreKeywordsWithRef||!(0,l.schemaHasRulesButRef)(Fe,At))){we.block(()=>be(q,"$ref",At.all.$ref.definition));return}mt.jtd||ke(q,W),we.block(()=>{for(const pn of At.rules)zr(pn);zr(At.post)});function zr(pn){(0,n.shouldUseGroup)(Fe,pn)&&(pn.type?(we.if((0,r.checkDataType)(pn.type,Ie,mt.strictNumbers)),me(q,pn),W.length===1&&W[0]===pn.type&&se&&(we.else(),(0,r.reportTypeError)(q)),we.endIf()):me(q,pn),Me||we.if((0,o._)`${c.default.errors} === ${le||0}`))}}function me(q,W){const{gen:se,schema:le,opts:{useDefaults:we}}=q;we&&(0,s.assignDefaults)(q,W.type),se.block(()=>{for(const Fe of W.rules)(0,n.shouldUseRule)(le,Fe)&&be(q,Fe.keyword,Fe.definition,W.type)})}function ke(q,W){q.schemaEnv.meta||!q.opts.strictTypes||(et(q,W),q.opts.allowUnionTypes||C(q,W),M(q,q.dataTypes))}function et(q,W){if(W.length){if(!q.dataTypes.length){q.dataTypes=W;return}W.forEach(se=>{A(q.dataTypes,se)||B(q,`type "${se}" not allowed by context "${q.dataTypes.join(",")}"`)}),N(q,W)}}function C(q,W){W.length>1&&!(W.length===2&&W.includes("null"))&&B(q,"use allowUnionTypes to allow union type keyword")}function M(q,W){const se=q.self.RULES.all;for(const le in se){const we=se[le];if(typeof we=="object"&&(0,n.shouldUseRule)(q.schema,we)){const{type:Fe}=we.definition;Fe.length&&!Fe.some(Ie=>K(W,Ie))&&B(q,`missing type "${Fe.join(",")}" for keyword "${le}"`)}}}function K(q,W){return q.includes(W)||W==="number"&&q.includes("integer")}function A(q,W){return q.includes(W)||W==="integer"&&q.includes("number")}function N(q,W){const se=[];for(const le of q.dataTypes)A(W,le)?se.push(le):W.includes("integer")&&le==="number"&&se.push("integer");q.dataTypes=se}function B(q,W){const se=q.schemaEnv.baseId+q.errSchemaPath;W+=` at "${se}" (strictTypes)`,(0,l.checkStrictMode)(q,W,q.opts.strictTypes)}class J{constructor(W,se,le){if((0,i.validateKeywordUsage)(W,se,le),this.gen=W.gen,this.allErrors=W.allErrors,this.keyword=le,this.data=W.data,this.schema=W.schema[le],this.$data=se.$data&&W.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(W,this.schema,le,this.$data),this.schemaType=se.schemaType,this.parentSchema=W.schema,this.params={},this.it=W,this.def=se,this.$data)this.schemaCode=W.gen.const("vSchema",Re(this.$data,W));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,se.schemaType,se.allowUndefined))throw new Error(`${le} value must be ${JSON.stringify(se.schemaType)}`);("code"in se?se.trackErrors:se.errors!==!1)&&(this.errsCount=W.gen.const("_errs",c.default.errors))}result(W,se,le){this.failResult((0,o.not)(W),se,le)}failResult(W,se,le){this.gen.if(W),le?le():this.error(),se?(this.gen.else(),se(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(W,se){this.failResult((0,o.not)(W),void 0,se)}fail(W){if(W===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(W),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(W){if(!this.$data)return this.fail(W);const{schemaCode:se}=this;this.fail((0,o._)`${se} !== undefined && (${(0,o.or)(this.invalid$data(),W)})`)}error(W,se,le){if(se){this.setParams(se),this._error(W,le),this.setParams({});return}this._error(W,le)}_error(W,se){(W?d.reportExtraError:d.reportError)(this,this.def.error,se)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(W){this.allErrors||this.gen.if(W)}setParams(W,se){se?Object.assign(this.params,W):this.params=W}block$data(W,se,le=o.nil){this.gen.block(()=>{this.check$data(W,le),se()})}check$data(W=o.nil,se=o.nil){if(!this.$data)return;const{gen:le,schemaCode:we,schemaType:Fe,def:Ie}=this;le.if((0,o.or)((0,o._)`${we} === undefined`,se)),W!==o.nil&&le.assign(W,!0),(Fe.length||Ie.validateSchema)&&(le.elseIf(this.invalid$data()),this.$dataError(),W!==o.nil&&le.assign(W,!1)),le.else()}invalid$data(){const{gen:W,schemaCode:se,schemaType:le,def:we,it:Fe}=this;return(0,o.or)(Ie(),Me());function Ie(){if(le.length){if(!(se instanceof o.Name))throw new Error("ajv implementation error");const mt=Array.isArray(le)?le:[le];return(0,o._)`${(0,r.checkDataTypes)(mt,se,Fe.opts.strictNumbers,r.DataType.Wrong)}`}return o.nil}function Me(){if(we.validateSchema){const mt=W.scopeValue("validate$data",{ref:we.validateSchema});return(0,o._)`!${mt}(${se})`}return o.nil}}subschema(W,se){const le=(0,a.getSubschema)(this.it,W);(0,a.extendSubschemaData)(le,this.it,W),(0,a.extendSubschemaMode)(le,W);const we={...this.it,...le,items:void 0,props:void 0};return k(we,se),we}mergeEvaluated(W,se){const{it:le,gen:we}=this;le.opts.unevaluated&&(le.props!==!0&&W.props!==void 0&&(le.props=l.mergeEvaluated.props(we,W.props,le.props,se)),le.items!==!0&&W.items!==void 0&&(le.items=l.mergeEvaluated.items(we,W.items,le.items,se)))}mergeValidEvaluated(W,se){const{it:le,gen:we}=this;if(le.opts.unevaluated&&(le.props!==!0||le.items!==!0))return we.if(se,()=>this.mergeEvaluated(W,o.Name)),!0}}fa.KeywordCxt=J;function be(q,W,se,le){const we=new J(q,se,W);"code"in se?se.code(we,le):we.$data&&se.validate?(0,i.funcKeywordCode)(we,se):"macro"in se?(0,i.macroKeywordCode)(we,se):(se.compile||se.validate)&&(0,i.funcKeywordCode)(we,se)}const ge=/^\/(?:[^~]|~0|~1)*$/,Ee=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Re(q,{dataLevel:W,dataNames:se,dataPathArr:le}){let we,Fe;if(q==="")return c.default.rootData;if(q[0]==="/"){if(!ge.test(q))throw new Error(`Invalid JSON-pointer: ${q}`);we=q,Fe=c.default.rootData}else{const it=Ee.exec(q);if(!it)throw new Error(`Invalid JSON-pointer: ${q}`);const At=+it[1];if(we=it[2],we==="#"){if(At>=W)throw new Error(mt("property/index",At));return le[W-At]}if(At>W)throw new Error(mt("data",At));if(Fe=se[W-At],!we)return Fe}let Ie=Fe;const Me=we.split("/");for(const it of Me)it&&(Fe=(0,o._)`${Fe}${(0,o.getProperty)((0,l.unescapeJsonPointer)(it))}`,Ie=(0,o._)`${Ie} && ${Fe}`);return Ie;function mt(it,At){return`Cannot access ${it} ${At} levels up, current level is ${W}`}}return fa.getData=Re,fa}var Xp={},QR;function DA(){if(QR)return Xp;QR=1,Object.defineProperty(Xp,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return Xp.default=e,Xp}var Zp={},XR;function L1(){if(XR)return Zp;XR=1,Object.defineProperty(Zp,"__esModule",{value:!0});const e=R1();class t extends Error{constructor(r,s,i,a){super(a||`can't resolve reference ${i} from id ${s}`),this.missingRef=(0,e.resolveUrl)(r,s,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return Zp.default=t,Zp}var as={},ZR;function D1(){if(ZR)return as;ZR=1,Object.defineProperty(as,"__esModule",{value:!0}),as.resolveSchema=as.getCompilingSchema=as.resolveRef=as.compileSchema=as.SchemaEnv=void 0;const e=Ze(),t=DA(),n=xi(),r=R1(),s=ht(),i=O1();class a{constructor(p){var _;this.refs={},this.dynamicAnchors={};let k;typeof p.schema=="object"&&(k=p.schema),this.schema=p.schema,this.schemaId=p.schemaId,this.root=p.root||this,this.baseId=(_=p.baseId)!==null&&_!==void 0?_:(0,r.normalizeId)(k?.[p.schemaId||"$id"]),this.schemaPath=p.schemaPath,this.localRefs=p.localRefs,this.meta=p.meta,this.$async=k?.$async,this.refs={}}}as.SchemaEnv=a;function o(g){const p=l.call(this,g);if(p)return p;const _=(0,r.getFullPath)(this.opts.uriResolver,g.root.baseId),{es5:k,lines:v}=this.opts.code,{ownProperties:w}=this.opts,S=new e.CodeGen(this.scope,{es5:k,lines:v,ownProperties:w});let T;g.$async&&(T=S.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const I=S.scopeName("validate");g.validateName=I;const D={gen:S,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:S.scopeValue("schema",this.opts.code.source===!0?{ref:g.schema,code:(0,e.stringify)(g.schema)}:{ref:g.schema}),validateName:I,ValidationError:T,schema:g.schema,schemaEnv:g,rootId:_,baseId:g.baseId||_,schemaPath:e.nil,errSchemaPath:g.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let R;try{this._compilations.add(g),(0,i.validateFunctionCode)(D),S.optimize(this.opts.code.optimize);const z=S.toString();R=`${S.scopeRefs(n.default.scope)}return ${z}`,this.opts.code.process&&(R=this.opts.code.process(R,g));const H=new Function(`${n.default.self}`,`${n.default.scope}`,R)(this,this.scope.get());if(this.scope.value(I,{ref:H}),H.errors=null,H.schema=g.schema,H.schemaEnv=g,g.$async&&(H.$async=!0),this.opts.code.source===!0&&(H.source={validateName:I,validateCode:z,scopeValues:S._values}),this.opts.unevaluated){const{props:G,items:Q}=D;H.evaluated={props:G instanceof e.Name?void 0:G,items:Q instanceof e.Name?void 0:Q,dynamicProps:G instanceof e.Name,dynamicItems:Q instanceof e.Name},H.source&&(H.source.evaluated=(0,e.stringify)(H.evaluated))}return g.validate=H,g}catch(z){throw delete g.validate,delete g.validateName,R&&this.logger.error("Error compiling schema, function code:",R),z}finally{this._compilations.delete(g)}}as.compileSchema=o;function c(g,p,_){var k;_=(0,r.resolveUrl)(this.opts.uriResolver,p,_);const v=g.refs[_];if(v)return v;let w=f.call(this,g,_);if(w===void 0){const S=(k=g.localRefs)===null||k===void 0?void 0:k[_],{schemaId:T}=this.opts;S&&(w=new a({schema:S,schemaId:T,root:g,baseId:p}))}if(w!==void 0)return g.refs[_]=u.call(this,w)}as.resolveRef=c;function u(g){return(0,r.inlineRef)(g.schema,this.opts.inlineRefs)?g.schema:g.validate?g:o.call(this,g)}function l(g){for(const p of this._compilations)if(d(p,g))return p}as.getCompilingSchema=l;function d(g,p){return g.schema===p.schema&&g.root===p.root&&g.baseId===p.baseId}function f(g,p){let _;for(;typeof(_=this.refs[p])=="string";)p=_;return _||this.schemas[p]||h.call(this,g,p)}function h(g,p){const _=this.opts.uriResolver.parse(p),k=(0,r._getFullPath)(this.opts.uriResolver,_);let v=(0,r.getFullPath)(this.opts.uriResolver,g.baseId,void 0);if(Object.keys(g.schema).length>0&&k===v)return y.call(this,_,g);const w=(0,r.normalizeId)(k),S=this.refs[w]||this.schemas[w];if(typeof S=="string"){const T=h.call(this,g,S);return typeof T?.schema!="object"?void 0:y.call(this,_,T)}if(typeof S?.schema=="object"){if(S.validate||o.call(this,S),w===(0,r.normalizeId)(p)){const{schema:T}=S,{schemaId:I}=this.opts,D=T[I];return D&&(v=(0,r.resolveUrl)(this.opts.uriResolver,v,D)),new a({schema:T,schemaId:I,root:g,baseId:v})}return y.call(this,_,S)}}as.resolveSchema=h;const m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(g,{baseId:p,schema:_,root:k}){var v;if(((v=g.fragment)===null||v===void 0?void 0:v[0])!=="/")return;for(const T of g.fragment.slice(1).split("/")){if(typeof _=="boolean")return;const I=_[(0,s.unescapeFragment)(T)];if(I===void 0)return;_=I;const D=typeof _=="object"&&_[this.opts.schemaId];!m.has(T)&&D&&(p=(0,r.resolveUrl)(this.opts.uriResolver,p,D))}let w;if(typeof _!="boolean"&&_.$ref&&!(0,s.schemaHasRulesButRef)(_,this.RULES)){const T=(0,r.resolveUrl)(this.opts.uriResolver,p,_.$ref);w=h.call(this,k,T)}const{schemaId:S}=this.opts;if(w=w||new a({schema:_,schemaId:S,root:k,baseId:p}),w.schema!==w.root.schema)return w}return as}const q_e="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",G_e="Meta-schema for $data reference (JSON AnySchema extension proposal)",K_e="object",W_e=["$data"],J_e={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Y_e=!1,Q_e={$id:q_e,description:G_e,type:K_e,required:W_e,properties:J_e,additionalProperties:Y_e};var eg={},Sf={exports:{}},TE,eO;function Oz(){if(eO)return TE;eO=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function n(f){let h="",m=0,y=0;for(y=0;y<f.length;y++)if(m=f[y].charCodeAt(0),m!==48){if(!(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102))return"";h+=f[y];break}for(y+=1;y<f.length;y++){if(m=f[y].charCodeAt(0),!(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102))return"";h+=f[y]}return h}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(f){return f.length=0,!0}function i(f,h,m){if(f.length){const y=n(f);if(y!=="")h.push(y);else return m.error=!0,!1;f.length=0}return!0}function a(f){let h=0;const m={error:!1,address:"",zone:""},y=[],g=[];let p=!1,_=!1,k=i;for(let v=0;v<f.length;v++){const w=f[v];if(!(w==="["||w==="]"))if(w===":"){if(p===!0&&(_=!0),!k(g,y,m))break;if(++h>7){m.error=!0;break}v>0&&f[v-1]===":"&&(p=!0),y.push(":");continue}else if(w==="%"){if(!k(g,y,m))break;k=s}else{g.push(w);continue}}return g.length&&(k===s?m.zone=g.join(""):_?y.push(g.join("")):y.push(n(g))),m.address=y.join(""),m}function o(f){if(c(f,":")<2)return{host:f,isIPV6:!1};const h=a(f);if(h.error)return{host:f,isIPV6:!1};{let m=h.address,y=h.address;return h.zone&&(m+="%"+h.zone,y+="%25"+h.zone),{host:m,isIPV6:!0,escapedHost:y}}}function c(f,h){let m=0;for(let y=0;y<f.length;y++)f[y]===h&&m++;return m}function u(f){let h=f;const m=[];let y=-1,g=0;for(;g=h.length;){if(g===1){if(h===".")break;if(h==="/"){m.push("/");break}else{m.push(h);break}}else if(g===2){if(h[0]==="."){if(h[1]===".")break;if(h[1]==="/"){h=h.slice(2);continue}}else if(h[0]==="/"&&(h[1]==="."||h[1]==="/")){m.push("/");break}}else if(g===3&&h==="/.."){m.length!==0&&m.pop(),m.push("/");break}if(h[0]==="."){if(h[1]==="."){if(h[2]==="/"){h=h.slice(3);continue}}else if(h[1]==="/"){h=h.slice(2);continue}}else if(h[0]==="/"&&h[1]==="."){if(h[2]==="/"){h=h.slice(2);continue}else if(h[2]==="."&&h[3]==="/"){h=h.slice(3),m.length!==0&&m.pop();continue}}if((y=h.indexOf("/",1))===-1){m.push(h);break}else m.push(h.slice(0,y)),h=h.slice(y)}return m.join("")}function l(f,h){const m=h!==!0?escape:unescape;return f.scheme!==void 0&&(f.scheme=m(f.scheme)),f.userinfo!==void 0&&(f.userinfo=m(f.userinfo)),f.host!==void 0&&(f.host=m(f.host)),f.path!==void 0&&(f.path=m(f.path)),f.query!==void 0&&(f.query=m(f.query)),f.fragment!==void 0&&(f.fragment=m(f.fragment)),f}function d(f){const h=[];if(f.userinfo!==void 0&&(h.push(f.userinfo),h.push("@")),f.host!==void 0){let m=unescape(f.host);if(!t(m)){const y=o(m);y.isIPV6===!0?m=`[${y.escapedHost}]`:m=f.host}h.push(m)}return(typeof f.port=="number"||typeof f.port=="string")&&(h.push(":"),h.push(String(f.port))),h.length?h.join(""):void 0}return TE={nonSimpleDomain:r,recomposeAuthority:d,normalizeComponentEncoding:l,removeDotSegments:u,isIPv4:t,isUUID:e,normalizeIPv6:o,stringArrayToHexStripped:n},TE}var IE,tO;function X_e(){if(tO)return IE;tO=1;const{isUUID:e}=Oz(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(w){return n.indexOf(w)!==-1}function s(w){return w.secure===!0?!0:w.secure===!1?!1:w.scheme?w.scheme.length===3&&(w.scheme[0]==="w"||w.scheme[0]==="W")&&(w.scheme[1]==="s"||w.scheme[1]==="S")&&(w.scheme[2]==="s"||w.scheme[2]==="S"):!1}function i(w){return w.host||(w.error=w.error||"HTTP URIs must have a host."),w}function a(w){const S=String(w.scheme).toLowerCase()==="https";return(w.port===(S?443:80)||w.port==="")&&(w.port=void 0),w.path||(w.path="/"),w}function o(w){return w.secure=s(w),w.resourceName=(w.path||"/")+(w.query?"?"+w.query:""),w.path=void 0,w.query=void 0,w}function c(w){if((w.port===(s(w)?443:80)||w.port==="")&&(w.port=void 0),typeof w.secure=="boolean"&&(w.scheme=w.secure?"wss":"ws",w.secure=void 0),w.resourceName){const[S,T]=w.resourceName.split("?");w.path=S&&S!=="/"?S:void 0,w.query=T,w.resourceName=void 0}return w.fragment=void 0,w}function u(w,S){if(!w.path)return w.error="URN can not be parsed",w;const T=w.path.match(t);if(T){const I=S.scheme||w.scheme||"urn";w.nid=T[1].toLowerCase(),w.nss=T[2];const D=`${I}:${S.nid||w.nid}`,R=v(D);w.path=void 0,R&&(w=R.parse(w,S))}else w.error=w.error||"URN can not be parsed.";return w}function l(w,S){if(w.nid===void 0)throw new Error("URN without nid cannot be serialized");const T=S.scheme||w.scheme||"urn",I=w.nid.toLowerCase(),D=`${T}:${S.nid||I}`,R=v(D);R&&(w=R.serialize(w,S));const z=w,V=w.nss;return z.path=`${I||S.nid}:${V}`,S.skipEscape=!0,z}function d(w,S){const T=w;return T.uuid=T.nss,T.nss=void 0,!S.tolerant&&(!T.uuid||!e(T.uuid))&&(T.error=T.error||"UUID is not valid."),T}function f(w){const S=w;return S.nss=(w.uuid||"").toLowerCase(),S}const h={scheme:"http",domainHost:!0,parse:i,serialize:a},m={scheme:"https",domainHost:h.domainHost,parse:i,serialize:a},y={scheme:"ws",domainHost:!0,parse:o,serialize:c},g={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize},k={http:h,https:m,ws:y,wss:g,urn:{scheme:"urn",parse:u,serialize:l,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:f,skipNormalize:!0}};Object.setPrototypeOf(k,null);function v(w){return w&&(k[w]||k[w.toLowerCase()])||void 0}return IE={wsIsSecure:s,SCHEMES:k,isValidSchemeName:r,getSchemeHandler:v},IE}var nO;function Z_e(){if(nO)return Sf.exports;nO=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:s,nonSimpleDomain:i}=Oz(),{SCHEMES:a,getSchemeHandler:o}=X_e();function c(g,p){return typeof g=="string"?g=f(m(g,p),p):typeof g=="object"&&(g=m(f(g,p),p)),g}function u(g,p,_){const k=_?Object.assign({scheme:"null"},_):{scheme:"null"},v=l(m(g,k),m(p,k),k,!0);return k.skipEscape=!0,f(v,k)}function l(g,p,_,k){const v={};return k||(g=m(f(g,_),_),p=m(f(p,_),_)),_=_||{},!_.tolerant&&p.scheme?(v.scheme=p.scheme,v.userinfo=p.userinfo,v.host=p.host,v.port=p.port,v.path=t(p.path||""),v.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(v.userinfo=p.userinfo,v.host=p.host,v.port=p.port,v.path=t(p.path||""),v.query=p.query):(p.path?(p.path[0]==="/"?v.path=t(p.path):((g.userinfo!==void 0||g.host!==void 0||g.port!==void 0)&&!g.path?v.path="/"+p.path:g.path?v.path=g.path.slice(0,g.path.lastIndexOf("/")+1)+p.path:v.path=p.path,v.path=t(v.path)),v.query=p.query):(v.path=g.path,p.query!==void 0?v.query=p.query:v.query=g.query),v.userinfo=g.userinfo,v.host=g.host,v.port=g.port),v.scheme=g.scheme),v.fragment=p.fragment,v}function d(g,p,_){return typeof g=="string"?(g=unescape(g),g=f(r(m(g,_),!0),{..._,skipEscape:!0})):typeof g=="object"&&(g=f(r(g,!0),{..._,skipEscape:!0})),typeof p=="string"?(p=unescape(p),p=f(r(m(p,_),!0),{..._,skipEscape:!0})):typeof p=="object"&&(p=f(r(p,!0),{..._,skipEscape:!0})),g.toLowerCase()===p.toLowerCase()}function f(g,p){const _={host:g.host,scheme:g.scheme,userinfo:g.userinfo,port:g.port,path:g.path,query:g.query,nid:g.nid,nss:g.nss,uuid:g.uuid,fragment:g.fragment,reference:g.reference,resourceName:g.resourceName,secure:g.secure,error:""},k=Object.assign({},p),v=[],w=o(k.scheme||_.scheme);w&&w.serialize&&w.serialize(_,k),_.path!==void 0&&(k.skipEscape?_.path=unescape(_.path):(_.path=escape(_.path),_.scheme!==void 0&&(_.path=_.path.split("%3A").join(":")))),k.reference!=="suffix"&&_.scheme&&v.push(_.scheme,":");const S=n(_);if(S!==void 0&&(k.reference!=="suffix"&&v.push("//"),v.push(S),_.path&&_.path[0]!=="/"&&v.push("/")),_.path!==void 0){let T=_.path;!k.absolutePath&&(!w||!w.absolutePath)&&(T=t(T)),S===void 0&&T[0]==="/"&&T[1]==="/"&&(T="/%2F"+T.slice(2)),v.push(T)}return _.query!==void 0&&v.push("?",_.query),_.fragment!==void 0&&v.push("#",_.fragment),v.join("")}const h=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(g,p){const _=Object.assign({},p),k={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let v=!1;_.reference==="suffix"&&(_.scheme?g=_.scheme+":"+g:g="//"+g);const w=g.match(h);if(w){if(k.scheme=w[1],k.userinfo=w[3],k.host=w[4],k.port=parseInt(w[5],10),k.path=w[6]||"",k.query=w[7],k.fragment=w[8],isNaN(k.port)&&(k.port=w[5]),k.host)if(s(k.host)===!1){const I=e(k.host);k.host=I.host.toLowerCase(),v=I.isIPV6}else v=!0;k.scheme===void 0&&k.userinfo===void 0&&k.host===void 0&&k.port===void 0&&k.query===void 0&&!k.path?k.reference="same-document":k.scheme===void 0?k.reference="relative":k.fragment===void 0?k.reference="absolute":k.reference="uri",_.reference&&_.reference!=="suffix"&&_.reference!==k.reference&&(k.error=k.error||"URI is not a "+_.reference+" reference.");const S=o(_.scheme||k.scheme);if(!_.unicodeSupport&&(!S||!S.unicodeSupport)&&k.host&&(_.domainHost||S&&S.domainHost)&&v===!1&&i(k.host))try{k.host=URL.domainToASCII(k.host.toLowerCase())}catch(T){k.error=k.error||"Host's domain name can not be converted to ASCII: "+T}(!S||S&&!S.skipNormalize)&&(g.indexOf("%")!==-1&&(k.scheme!==void 0&&(k.scheme=unescape(k.scheme)),k.host!==void 0&&(k.host=unescape(k.host))),k.path&&(k.path=escape(unescape(k.path))),k.fragment&&(k.fragment=encodeURI(decodeURIComponent(k.fragment)))),S&&S.parse&&S.parse(k,_)}else k.error=k.error||"URI can not be parsed.";return k}const y={SCHEMES:a,normalize:c,resolve:u,resolveComponent:l,equal:d,serialize:f,parse:m};return Sf.exports=y,Sf.exports.default=y,Sf.exports.fastUri=y,Sf.exports}var rO;function e1e(){if(rO)return eg;rO=1,Object.defineProperty(eg,"__esModule",{value:!0});const e=Z_e();return e.code='require("ajv/dist/runtime/uri").default',eg.default=e,eg}var sO;function t1e(){return sO||(sO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=O1();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=Ze();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=DA(),s=L1(),i=Pz(),a=D1(),o=Ze(),c=R1(),u=_y(),l=ht(),d=Q_e,f=e1e(),h=(C,M)=>new RegExp(C,M);h.code="new RegExp";const m=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},p={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function k(C){var M,K,A,N,B,J,be,ge,Ee,Re,q,W,se,le,we,Fe,Ie,Me,mt,it,At,zr,pn,Gs,rs;const X=C.strict,ae=(M=C.code)===null||M===void 0?void 0:M.optimize,Ae=ae===!0||ae===void 0?1:ae||0,xe=(A=(K=C.code)===null||K===void 0?void 0:K.regExp)!==null&&A!==void 0?A:h,vt=(N=C.uriResolver)!==null&&N!==void 0?N:f.default;return{strictSchema:(J=(B=C.strictSchema)!==null&&B!==void 0?B:X)!==null&&J!==void 0?J:!0,strictNumbers:(ge=(be=C.strictNumbers)!==null&&be!==void 0?be:X)!==null&&ge!==void 0?ge:!0,strictTypes:(Re=(Ee=C.strictTypes)!==null&&Ee!==void 0?Ee:X)!==null&&Re!==void 0?Re:"log",strictTuples:(W=(q=C.strictTuples)!==null&&q!==void 0?q:X)!==null&&W!==void 0?W:"log",strictRequired:(le=(se=C.strictRequired)!==null&&se!==void 0?se:X)!==null&&le!==void 0?le:!1,code:C.code?{...C.code,optimize:Ae,regExp:xe}:{optimize:Ae,regExp:xe},loopRequired:(we=C.loopRequired)!==null&&we!==void 0?we:_,loopEnum:(Fe=C.loopEnum)!==null&&Fe!==void 0?Fe:_,meta:(Ie=C.meta)!==null&&Ie!==void 0?Ie:!0,messages:(Me=C.messages)!==null&&Me!==void 0?Me:!0,inlineRefs:(mt=C.inlineRefs)!==null&&mt!==void 0?mt:!0,schemaId:(it=C.schemaId)!==null&&it!==void 0?it:"$id",addUsedSchema:(At=C.addUsedSchema)!==null&&At!==void 0?At:!0,validateSchema:(zr=C.validateSchema)!==null&&zr!==void 0?zr:!0,validateFormats:(pn=C.validateFormats)!==null&&pn!==void 0?pn:!0,unicodeRegExp:(Gs=C.unicodeRegExp)!==null&&Gs!==void 0?Gs:!0,int32range:(rs=C.int32range)!==null&&rs!==void 0?rs:!0,uriResolver:vt}}class v{constructor(M={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,M=this.opts={...M,...k(M)};const{es5:K,lines:A}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:y,es5:K,lines:A}),this.logger=V(M.logger);const N=M.validateFormats;M.validateFormats=!1,this.RULES=(0,i.getRules)(),w.call(this,g,M,"NOT SUPPORTED"),w.call(this,p,M,"DEPRECATED","warn"),this._metaOpts=R.call(this),M.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),M.keywords&&D.call(this,M.keywords),typeof M.meta=="object"&&this.addMetaSchema(M.meta),T.call(this),M.validateFormats=N}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:M,meta:K,schemaId:A}=this.opts;let N=d;A==="id"&&(N={...d},N.id=N.$id,delete N.$id),K&&M&&this.addMetaSchema(N,N[A],!1)}defaultMeta(){const{meta:M,schemaId:K}=this.opts;return this.opts.defaultMeta=typeof M=="object"?M[K]||M:void 0}validate(M,K){let A;if(typeof M=="string"){if(A=this.getSchema(M),!A)throw new Error(`no schema with key or ref "${M}"`)}else A=this.compile(M);const N=A(K);return"$async"in A||(this.errors=A.errors),N}compile(M,K){const A=this._addSchema(M,K);return A.validate||this._compileSchemaEnv(A)}compileAsync(M,K){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:A}=this.opts;return N.call(this,M,K);async function N(Re,q){await B.call(this,Re.$schema);const W=this._addSchema(Re,q);return W.validate||J.call(this,W)}async function B(Re){Re&&!this.getSchema(Re)&&await N.call(this,{$ref:Re},!0)}async function J(Re){try{return this._compileSchemaEnv(Re)}catch(q){if(!(q instanceof s.default))throw q;return be.call(this,q),await ge.call(this,q.missingSchema),J.call(this,Re)}}function be({missingSchema:Re,missingRef:q}){if(this.refs[Re])throw new Error(`AnySchema ${Re} is loaded but ${q} cannot be resolved`)}async function ge(Re){const q=await Ee.call(this,Re);this.refs[Re]||await B.call(this,q.$schema),this.refs[Re]||this.addSchema(q,Re,K)}async function Ee(Re){const q=this._loading[Re];if(q)return q;try{return await(this._loading[Re]=A(Re))}finally{delete this._loading[Re]}}}addSchema(M,K,A,N=this.opts.validateSchema){if(Array.isArray(M)){for(const J of M)this.addSchema(J,void 0,A,N);return this}let B;if(typeof M=="object"){const{schemaId:J}=this.opts;if(B=M[J],B!==void 0&&typeof B!="string")throw new Error(`schema ${J} must be string`)}return K=(0,c.normalizeId)(K||B),this._checkUnique(K),this.schemas[K]=this._addSchema(M,A,K,N,!0),this}addMetaSchema(M,K,A=this.opts.validateSchema){return this.addSchema(M,K,!0,A),this}validateSchema(M,K){if(typeof M=="boolean")return!0;let A;if(A=M.$schema,A!==void 0&&typeof A!="string")throw new Error("$schema must be a string");if(A=A||this.opts.defaultMeta||this.defaultMeta(),!A)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const N=this.validate(A,M);if(!N&&K){const B="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(B);else throw new Error(B)}return N}getSchema(M){let K;for(;typeof(K=S.call(this,M))=="string";)M=K;if(K===void 0){const{schemaId:A}=this.opts,N=new a.SchemaEnv({schema:{},schemaId:A});if(K=a.resolveSchema.call(this,N,M),!K)return;this.refs[M]=K}return K.validate||this._compileSchemaEnv(K)}removeSchema(M){if(M instanceof RegExp)return this._removeAllSchemas(this.schemas,M),this._removeAllSchemas(this.refs,M),this;switch(typeof M){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const K=S.call(this,M);return typeof K=="object"&&this._cache.delete(K.schema),delete this.schemas[M],delete this.refs[M],this}case"object":{const K=M;this._cache.delete(K);let A=M[this.opts.schemaId];return A&&(A=(0,c.normalizeId)(A),delete this.schemas[A],delete this.refs[A]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(M){for(const K of M)this.addKeyword(K);return this}addKeyword(M,K){let A;if(typeof M=="string")A=M,typeof K=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),K.keyword=A);else if(typeof M=="object"&&K===void 0){if(K=M,A=K.keyword,Array.isArray(A)&&!A.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(G.call(this,A,K),!K)return(0,l.eachItem)(A,B=>Q.call(this,B)),this;me.call(this,K);const N={...K,type:(0,u.getJSONTypes)(K.type),schemaType:(0,u.getJSONTypes)(K.schemaType)};return(0,l.eachItem)(A,N.type.length===0?B=>Q.call(this,B,N):B=>N.type.forEach(J=>Q.call(this,B,N,J))),this}getKeyword(M){const K=this.RULES.all[M];return typeof K=="object"?K.definition:!!K}removeKeyword(M){const{RULES:K}=this;delete K.keywords[M],delete K.all[M];for(const A of K.rules){const N=A.rules.findIndex(B=>B.keyword===M);N>=0&&A.rules.splice(N,1)}return this}addFormat(M,K){return typeof K=="string"&&(K=new RegExp(K)),this.formats[M]=K,this}errorsText(M=this.errors,{separator:K=", ",dataVar:A="data"}={}){return!M||M.length===0?"No errors":M.map(N=>`${A}${N.instancePath} ${N.message}`).reduce((N,B)=>N+K+B)}$dataMetaSchema(M,K){const A=this.RULES.all;M=JSON.parse(JSON.stringify(M));for(const N of K){const B=N.split("/").slice(1);let J=M;for(const be of B)J=J[be];for(const be in A){const ge=A[be];if(typeof ge!="object")continue;const{$data:Ee}=ge.definition,Re=J[be];Ee&&Re&&(J[be]=et(Re))}}return M}_removeAllSchemas(M,K){for(const A in M){const N=M[A];(!K||K.test(A))&&(typeof N=="string"?delete M[A]:N&&!N.meta&&(this._cache.delete(N.schema),delete M[A]))}}_addSchema(M,K,A,N=this.opts.validateSchema,B=this.opts.addUsedSchema){let J;const{schemaId:be}=this.opts;if(typeof M=="object")J=M[be];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof M!="boolean")throw new Error("schema must be object or boolean")}let ge=this._cache.get(M);if(ge!==void 0)return ge;A=(0,c.normalizeId)(J||A);const Ee=c.getSchemaRefs.call(this,M,A);return ge=new a.SchemaEnv({schema:M,schemaId:be,meta:K,baseId:A,localRefs:Ee}),this._cache.set(ge.schema,ge),B&&!A.startsWith("#")&&(A&&this._checkUnique(A),this.refs[A]=ge),N&&this.validateSchema(M,!0),ge}_checkUnique(M){if(this.schemas[M]||this.refs[M])throw new Error(`schema with key or id "${M}" already exists`)}_compileSchemaEnv(M){if(M.meta?this._compileMetaSchema(M):a.compileSchema.call(this,M),!M.validate)throw new Error("ajv implementation error");return M.validate}_compileMetaSchema(M){const K=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,M)}finally{this.opts=K}}}v.ValidationError=r.default,v.MissingRefError=s.default,e.default=v;function w(C,M,K,A="error"){for(const N in C){const B=N;B in M&&this.logger[A](`${K}: option ${N}. ${C[B]}`)}}function S(C){return C=(0,c.normalizeId)(C),this.schemas[C]||this.refs[C]}function T(){const C=this.opts.schemas;if(C)if(Array.isArray(C))this.addSchema(C);else for(const M in C)this.addSchema(C[M],M)}function I(){for(const C in this.opts.formats){const M=this.opts.formats[C];M&&this.addFormat(C,M)}}function D(C){if(Array.isArray(C)){this.addVocabulary(C);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const M in C){const K=C[M];K.keyword||(K.keyword=M),this.addKeyword(K)}}function R(){const C={...this.opts};for(const M of m)delete C[M];return C}const z={log(){},warn(){},error(){}};function V(C){if(C===!1)return z;if(C===void 0)return console;if(C.log&&C.warn&&C.error)return C;throw new Error("logger must implement log, warn and error methods")}const H=/^[a-z_$][a-z0-9_$:-]*$/i;function G(C,M){const{RULES:K}=this;if((0,l.eachItem)(C,A=>{if(K.keywords[A])throw new Error(`Keyword ${A} is already defined`);if(!H.test(A))throw new Error(`Keyword ${A} has invalid name`)}),!!M&&M.$data&&!("code"in M||"validate"in M))throw new Error('$data keyword must have "code" or "validate" function')}function Q(C,M,K){var A;const N=M?.post;if(K&&N)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:B}=this;let J=N?B.post:B.rules.find(({type:ge})=>ge===K);if(J||(J={type:K,rules:[]},B.rules.push(J)),B.keywords[C]=!0,!M)return;const be={keyword:C,definition:{...M,type:(0,u.getJSONTypes)(M.type),schemaType:(0,u.getJSONTypes)(M.schemaType)}};M.before?ne.call(this,J,be,M.before):J.rules.push(be),B.all[C]=be,(A=M.implements)===null||A===void 0||A.forEach(ge=>this.addKeyword(ge))}function ne(C,M,K){const A=C.rules.findIndex(N=>N.keyword===K);A>=0?C.rules.splice(A,0,M):(C.rules.push(M),this.logger.warn(`rule ${K} is not defined`))}function me(C){let{metaSchema:M}=C;M!==void 0&&(C.$data&&this.opts.$data&&(M=et(M)),C.validateSchema=this.compile(M,!0))}const ke={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function et(C){return{anyOf:[C,ke]}}})(_E)),_E}var tg={},ng={},rg={},iO;function n1e(){if(iO)return rg;iO=1,Object.defineProperty(rg,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return rg.default=e,rg}var Ja={},aO;function $A(){if(aO)return Ja;aO=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.callRef=Ja.getValidate=void 0;const e=L1(),t=Ti(),n=Ze(),r=xi(),s=D1(),i=ht(),a={keyword:"$ref",schemaType:"string",code(u){const{gen:l,schema:d,it:f}=u,{baseId:h,schemaEnv:m,validateName:y,opts:g,self:p}=f,{root:_}=m;if((d==="#"||d==="#/")&&h===_.baseId)return v();const k=s.resolveRef.call(p,_,h,d);if(k===void 0)throw new e.default(f.opts.uriResolver,h,d);if(k instanceof s.SchemaEnv)return w(k);return S(k);function v(){if(m===_)return c(u,y,m,m.$async);const T=l.scopeValue("root",{ref:_});return c(u,(0,n._)`${T}.validate`,_,_.$async)}function w(T){const I=o(u,T);c(u,I,T,T.$async)}function S(T){const I=l.scopeValue("schema",g.code.source===!0?{ref:T,code:(0,n.stringify)(T)}:{ref:T}),D=l.name("valid"),R=u.subschema({schema:T,dataTypes:[],schemaPath:n.nil,topSchemaRef:I,errSchemaPath:d},D);u.mergeEvaluated(R),u.ok(D)}}};function o(u,l){const{gen:d}=u;return l.validate?d.scopeValue("validate",{ref:l.validate}):(0,n._)`${d.scopeValue("wrapper",{ref:l})}.validate`}Ja.getValidate=o;function c(u,l,d,f){const{gen:h,it:m}=u,{allErrors:y,schemaEnv:g,opts:p}=m,_=p.passContext?r.default.this:n.nil;f?k():v();function k(){if(!g.$async)throw new Error("async schema referenced by sync schema");const T=h.let("valid");h.try(()=>{h.code((0,n._)`await ${(0,t.callValidateCode)(u,l,_)}`),S(l),y||h.assign(T,!0)},I=>{h.if((0,n._)`!(${I} instanceof ${m.ValidationError})`,()=>h.throw(I)),w(I),y||h.assign(T,!1)}),u.ok(T)}function v(){u.result((0,t.callValidateCode)(u,l,_),()=>S(l),()=>w(l))}function w(T){const I=(0,n._)`${T}.errors`;h.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${I} : ${r.default.vErrors}.concat(${I})`),h.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function S(T){var I;if(!m.opts.unevaluated)return;const D=(I=d?.validate)===null||I===void 0?void 0:I.evaluated;if(m.props!==!0)if(D&&!D.dynamicProps)D.props!==void 0&&(m.props=i.mergeEvaluated.props(h,D.props,m.props));else{const R=h.var("props",(0,n._)`${T}.evaluated.props`);m.props=i.mergeEvaluated.props(h,R,m.props,n.Name)}if(m.items!==!0)if(D&&!D.dynamicItems)D.items!==void 0&&(m.items=i.mergeEvaluated.items(h,D.items,m.items));else{const R=h.var("items",(0,n._)`${T}.evaluated.items`);m.items=i.mergeEvaluated.items(h,R,m.items,n.Name)}}}return Ja.callRef=c,Ja.default=a,Ja}var oO;function r1e(){if(oO)return ng;oO=1,Object.defineProperty(ng,"__esModule",{value:!0});const e=n1e(),t=$A(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return ng.default=n,ng}var sg={},ig={},cO;function s1e(){if(cO)return ig;cO=1,Object.defineProperty(ig,"__esModule",{value:!0});const e=Ze(),t=e.operators,n={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},r={message:({keyword:i,schemaCode:a})=>(0,e.str)`must be ${n[i].okStr} ${a}`,params:({keyword:i,schemaCode:a})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${a}}`},s={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(i){const{keyword:a,data:o,schemaCode:c}=i;i.fail$data((0,e._)`${o} ${n[a].fail} ${c} || isNaN(${o})`)}};return ig.default=s,ig}var ag={},uO;function i1e(){if(uO)return ag;uO=1,Object.defineProperty(ag,"__esModule",{value:!0});const e=Ze(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,e._)`{multipleOf: ${r}}`},code(r){const{gen:s,data:i,schemaCode:a,it:o}=r,c=o.opts.multipleOfPrecision,u=s.let("res"),l=c?(0,e._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${c}`:(0,e._)`${u} !== parseInt(${u})`;r.fail$data((0,e._)`(${a} === 0 || (${u} = ${i}/${a}, ${l}))`)}};return ag.default=n,ag}var og={},cg={},lO;function a1e(){if(lO)return cg;lO=1,Object.defineProperty(cg,"__esModule",{value:!0});function e(t){const n=t.length;let r=0,s=0,i;for(;s<n;)r++,i=t.charCodeAt(s++),i>=55296&&i<=56319&&s<n&&(i=t.charCodeAt(s),(i&64512)===56320&&s++);return r}return cg.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',cg}var dO;function o1e(){if(dO)return og;dO=1,Object.defineProperty(og,"__esModule",{value:!0});const e=Ze(),t=ht(),n=a1e(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:a}){const o=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${a} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:a,data:o,schemaCode:c,it:u}=i,l=a==="maxLength"?e.operators.GT:e.operators.LT,d=u.opts.unicode===!1?(0,e._)`${o}.length`:(0,e._)`${(0,t.useFunc)(i.gen,n.default)}(${o})`;i.fail$data((0,e._)`${d} ${l} ${c}`)}};return og.default=s,og}var ug={},fO;function c1e(){if(fO)return ug;fO=1,Object.defineProperty(ug,"__esModule",{value:!0});const e=Ti(),t=ht(),n=Ze(),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,n.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,n._)`{pattern: ${i}}`},code(i){const{gen:a,data:o,$data:c,schema:u,schemaCode:l,it:d}=i,f=d.opts.unicodeRegExp?"u":"";if(c){const{regExp:h}=d.opts.code,m=h.code==="new RegExp"?(0,n._)`new RegExp`:(0,t.useFunc)(a,h),y=a.let("valid");a.try(()=>a.assign(y,(0,n._)`${m}(${l}, ${f}).test(${o})`),()=>a.assign(y,!1)),i.fail$data((0,n._)`!${y}`)}else{const h=(0,e.usePattern)(i,u);i.fail$data((0,n._)`!${h}.test(${o})`)}}};return ug.default=s,ug}var lg={},hO;function u1e(){if(hO)return lg;hO=1,Object.defineProperty(lg,"__esModule",{value:!0});const e=Ze(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:s}){const i=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${s} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:s,data:i,schemaCode:a}=r,o=s==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${i}).length ${o} ${a}`)}};return lg.default=n,lg}var dg={},mO;function l1e(){if(mO)return dg;mO=1,Object.defineProperty(dg,"__esModule",{value:!0});const e=Ti(),t=Ze(),n=ht(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,t.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,t._)`{missingProperty: ${i}}`},code(i){const{gen:a,schema:o,schemaCode:c,data:u,$data:l,it:d}=i,{opts:f}=d;if(!l&&o.length===0)return;const h=o.length>=f.loopRequired;if(d.allErrors?m():y(),f.strictRequired){const _=i.parentSchema.properties,{definedProperties:k}=i.it;for(const v of o)if(_?.[v]===void 0&&!k.has(v)){const w=d.schemaEnv.baseId+d.errSchemaPath,S=`required property "${v}" is not defined at "${w}" (strictRequired)`;(0,n.checkStrictMode)(d,S,d.opts.strictRequired)}}function m(){if(h||l)i.block$data(t.nil,g);else for(const _ of o)(0,e.checkReportMissingProp)(i,_)}function y(){const _=a.let("missing");if(h||l){const k=a.let("valid",!0);i.block$data(k,()=>p(_,k)),i.ok(k)}else a.if((0,e.checkMissingProp)(i,o,_)),(0,e.reportMissingProp)(i,_),a.else()}function g(){a.forOf("prop",c,_=>{i.setParams({missingProperty:_}),a.if((0,e.noPropertyInData)(a,u,_,f.ownProperties),()=>i.error())})}function p(_,k){i.setParams({missingProperty:_}),a.forOf(_,c,()=>{a.assign(k,(0,e.propertyInData)(a,u,_,f.ownProperties)),a.if((0,t.not)(k),()=>{i.error(),a.break()})},t.nil)}}};return dg.default=s,dg}var fg={},pO;function d1e(){if(pO)return fg;pO=1,Object.defineProperty(fg,"__esModule",{value:!0});const e=Ze(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:s}){const i=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${s} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:s,data:i,schemaCode:a}=r,o=s==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${i}.length ${o} ${a}`)}};return fg.default=n,fg}var hg={},mg={},gO;function MA(){if(gO)return mg;gO=1,Object.defineProperty(mg,"__esModule",{value:!0});const e=Rz();return e.code='require("ajv/dist/runtime/equal").default',mg.default=e,mg}var bO;function f1e(){if(bO)return hg;bO=1,Object.defineProperty(hg,"__esModule",{value:!0});const e=_y(),t=Ze(),n=ht(),r=MA(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:o}})=>(0,t.str)`must NOT have duplicate items (items ## ${o} and ${a} are identical)`,params:({params:{i:a,j:o}})=>(0,t._)`{i: ${a}, j: ${o}}`},code(a){const{gen:o,data:c,$data:u,schema:l,parentSchema:d,schemaCode:f,it:h}=a;if(!u&&!l)return;const m=o.let("valid"),y=d.items?(0,e.getSchemaTypes)(d.items):[];a.block$data(m,g,(0,t._)`${f} === false`),a.ok(m);function g(){const v=o.let("i",(0,t._)`${c}.length`),w=o.let("j");a.setParams({i:v,j:w}),o.assign(m,!0),o.if((0,t._)`${v} > 1`,()=>(p()?_:k)(v,w))}function p(){return y.length>0&&!y.some(v=>v==="object"||v==="array")}function _(v,w){const S=o.name("item"),T=(0,e.checkDataTypes)(y,S,h.opts.strictNumbers,e.DataType.Wrong),I=o.const("indices",(0,t._)`{}`);o.for((0,t._)`;${v}--;`,()=>{o.let(S,(0,t._)`${c}[${v}]`),o.if(T,(0,t._)`continue`),y.length>1&&o.if((0,t._)`typeof ${S} == "string"`,(0,t._)`${S} += "_"`),o.if((0,t._)`typeof ${I}[${S}] == "number"`,()=>{o.assign(w,(0,t._)`${I}[${S}]`),a.error(),o.assign(m,!1).break()}).code((0,t._)`${I}[${S}] = ${v}`)})}function k(v,w){const S=(0,n.useFunc)(o,r.default),T=o.name("outer");o.label(T).for((0,t._)`;${v}--;`,()=>o.for((0,t._)`${w} = ${v}; ${w}--;`,()=>o.if((0,t._)`${S}(${c}[${v}], ${c}[${w}])`,()=>{a.error(),o.assign(m,!1).break(T)})))}}};return hg.default=i,hg}var pg={},yO;function h1e(){if(yO)return pg;yO=1,Object.defineProperty(pg,"__esModule",{value:!0});const e=Ze(),t=ht(),n=MA(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},code(i){const{gen:a,data:o,$data:c,schemaCode:u,schema:l}=i;c||l&&typeof l=="object"?i.fail$data((0,e._)`!${(0,t.useFunc)(a,n.default)}(${o}, ${u})`):i.fail((0,e._)`${l} !== ${o}`)}};return pg.default=s,pg}var gg={},_O;function m1e(){if(_O)return gg;_O=1,Object.defineProperty(gg,"__esModule",{value:!0});const e=Ze(),t=ht(),n=MA(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},code(i){const{gen:a,data:o,$data:c,schema:u,schemaCode:l,it:d}=i;if(!c&&u.length===0)throw new Error("enum must have non-empty array");const f=u.length>=d.opts.loopEnum;let h;const m=()=>h??(h=(0,t.useFunc)(a,n.default));let y;if(f||c)y=a.let("valid"),i.block$data(y,g);else{if(!Array.isArray(u))throw new Error("ajv implementation error");const _=a.const("vSchema",l);y=(0,e.or)(...u.map((k,v)=>p(_,v)))}i.pass(y);function g(){a.assign(y,!1),a.forOf("v",l,_=>a.if((0,e._)`${m()}(${o}, ${_})`,()=>a.assign(y,!0).break()))}function p(_,k){const v=u[k];return typeof v=="object"&&v!==null?(0,e._)`${m()}(${o}, ${_}[${k}])`:(0,e._)`${o} === ${v}`}}};return gg.default=s,gg}var kO;function p1e(){if(kO)return sg;kO=1,Object.defineProperty(sg,"__esModule",{value:!0});const e=s1e(),t=i1e(),n=o1e(),r=c1e(),s=u1e(),i=l1e(),a=d1e(),o=f1e(),c=h1e(),u=m1e(),l=[e.default,t.default,n.default,r.default,s.default,i.default,a.default,o.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,u.default];return sg.default=l,sg}var bg={},Qu={},EO;function Lz(){if(EO)return Qu;EO=1,Object.defineProperty(Qu,"__esModule",{value:!0}),Qu.validateAdditionalItems=void 0;const e=Ze(),t=ht(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{parentSchema:a,it:o}=i,{items:c}=a;if(!Array.isArray(c)){(0,t.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(i,c)}};function s(i,a){const{gen:o,schema:c,data:u,keyword:l,it:d}=i;d.items=!0;const f=o.const("len",(0,e._)`${u}.length`);if(c===!1)i.setParams({len:a.length}),i.pass((0,e._)`${f} <= ${a.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(d,c)){const m=o.var("valid",(0,e._)`${f} <= ${a.length}`);o.if((0,e.not)(m),()=>h(m)),i.ok(m)}function h(m){o.forRange("i",a.length,f,y=>{i.subschema({keyword:l,dataProp:y,dataPropType:t.Type.Num},m),d.allErrors||o.if((0,e.not)(m),()=>o.break())})}}return Qu.validateAdditionalItems=s,Qu.default=r,Qu}var yg={},Xu={},wO;function Dz(){if(wO)return Xu;wO=1,Object.defineProperty(Xu,"__esModule",{value:!0}),Xu.validateTuple=void 0;const e=Ze(),t=ht(),n=Ti(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:a,it:o}=i;if(Array.isArray(a))return s(i,"additionalItems",a);o.items=!0,!(0,t.alwaysValidSchema)(o,a)&&i.ok((0,n.validateArray)(i))}};function s(i,a,o=i.schema){const{gen:c,parentSchema:u,data:l,keyword:d,it:f}=i;y(u),f.opts.unevaluated&&o.length&&f.items!==!0&&(f.items=t.mergeEvaluated.items(c,o.length,f.items));const h=c.name("valid"),m=c.const("len",(0,e._)`${l}.length`);o.forEach((g,p)=>{(0,t.alwaysValidSchema)(f,g)||(c.if((0,e._)`${m} > ${p}`,()=>i.subschema({keyword:d,schemaProp:p,dataProp:p},h)),i.ok(h))});function y(g){const{opts:p,errSchemaPath:_}=f,k=o.length,v=k===g.minItems&&(k===g.maxItems||g[a]===!1);if(p.strictTuples&&!v){const w=`"${d}" is ${k}-tuple, but minItems or maxItems/${a} are not specified or different at path "${_}"`;(0,t.checkStrictMode)(f,w,p.strictTuples)}}}return Xu.validateTuple=s,Xu.default=r,Xu}var SO;function g1e(){if(SO)return yg;SO=1,Object.defineProperty(yg,"__esModule",{value:!0});const e=Dz(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return yg.default=t,yg}var _g={},vO;function b1e(){if(vO)return _g;vO=1,Object.defineProperty(_g,"__esModule",{value:!0});const e=Ze(),t=ht(),n=Ti(),r=Lz(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{schema:o,parentSchema:c,it:u}=a,{prefixItems:l}=c;u.items=!0,!(0,t.alwaysValidSchema)(u,o)&&(l?(0,r.validateAdditionalItems)(a,l):a.ok((0,n.validateArray)(a)))}};return _g.default=i,_g}var kg={},xO;function y1e(){if(xO)return kg;xO=1,Object.defineProperty(kg,"__esModule",{value:!0});const e=Ze(),t=ht(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:i}})=>i===void 0?(0,e.str)`must contain at least ${s} valid item(s)`:(0,e.str)`must contain at least ${s} and no more than ${i} valid item(s)`,params:({params:{min:s,max:i}})=>i===void 0?(0,e._)`{minContains: ${s}}`:(0,e._)`{minContains: ${s}, maxContains: ${i}}`},code(s){const{gen:i,schema:a,parentSchema:o,data:c,it:u}=s;let l,d;const{minContains:f,maxContains:h}=o;u.opts.next?(l=f===void 0?1:f,d=h):l=1;const m=i.const("len",(0,e._)`${c}.length`);if(s.setParams({min:l,max:d}),d===void 0&&l===0){(0,t.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(d!==void 0&&l>d){(0,t.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,t.alwaysValidSchema)(u,a)){let k=(0,e._)`${m} >= ${l}`;d!==void 0&&(k=(0,e._)`${k} && ${m} <= ${d}`),s.pass(k);return}u.items=!0;const y=i.name("valid");d===void 0&&l===1?p(y,()=>i.if(y,()=>i.break())):l===0?(i.let(y,!0),d!==void 0&&i.if((0,e._)`${c}.length > 0`,g)):(i.let(y,!1),g()),s.result(y,()=>s.reset());function g(){const k=i.name("_valid"),v=i.let("count",0);p(k,()=>i.if(k,()=>_(v)))}function p(k,v){i.forRange("i",0,m,w=>{s.subschema({keyword:"contains",dataProp:w,dataPropType:t.Type.Num,compositeRule:!0},k),v()})}function _(k){i.code((0,e._)`${k}++`),d===void 0?i.if((0,e._)`${k} >= ${l}`,()=>i.assign(y,!0).break()):(i.if((0,e._)`${k} > ${d}`,()=>i.assign(y,!1).break()),l===1?i.assign(y,!0):i.if((0,e._)`${k} >= ${l}`,()=>i.assign(y,!0)))}}};return kg.default=r,kg}var AE={},TO;function jA(){return TO||(TO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=Ze(),n=ht(),r=Ti();e.error={message:({params:{property:c,depsCount:u,deps:l}})=>{const d=u===1?"property":"properties";return(0,t.str)`must have ${d} ${l} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:l,missingProperty:d}})=>(0,t._)`{property: ${c},
|
|
101
|
+
missingProperty: ${d},
|
|
102
|
+
depsCount: ${u},
|
|
103
|
+
deps: ${l}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[u,l]=i(c);a(c,u),o(c,l)}};function i({schema:c}){const u={},l={};for(const d in c){if(d==="__proto__")continue;const f=Array.isArray(c[d])?u:l;f[d]=c[d]}return[u,l]}function a(c,u=c.schema){const{gen:l,data:d,it:f}=c;if(Object.keys(u).length===0)return;const h=l.let("missing");for(const m in u){const y=u[m];if(y.length===0)continue;const g=(0,r.propertyInData)(l,d,m,f.opts.ownProperties);c.setParams({property:m,depsCount:y.length,deps:y.join(", ")}),f.allErrors?l.if(g,()=>{for(const p of y)(0,r.checkReportMissingProp)(c,p)}):(l.if((0,t._)`${g} && (${(0,r.checkMissingProp)(c,y,h)})`),(0,r.reportMissingProp)(c,h),l.else())}}e.validatePropertyDeps=a;function o(c,u=c.schema){const{gen:l,data:d,keyword:f,it:h}=c,m=l.name("valid");for(const y in u)(0,n.alwaysValidSchema)(h,u[y])||(l.if((0,r.propertyInData)(l,d,y,h.opts.ownProperties),()=>{const g=c.subschema({keyword:f,schemaProp:y},m);c.mergeValidEvaluated(g,m)},()=>l.var(m,!0)),c.ok(m))}e.validateSchemaDeps=o,e.default=s})(AE)),AE}var Eg={},IO;function _1e(){if(IO)return Eg;IO=1,Object.defineProperty(Eg,"__esModule",{value:!0});const e=Ze(),t=ht(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,e._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:i,schema:a,data:o,it:c}=s;if((0,t.alwaysValidSchema)(c,a))return;const u=i.name("valid");i.forIn("key",o,l=>{s.setParams({propertyName:l}),s.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:!0},u),i.if((0,e.not)(u),()=>{s.error(!0),c.allErrors||i.break()})}),s.ok(u)}};return Eg.default=r,Eg}var wg={},AO;function $z(){if(AO)return wg;AO=1,Object.defineProperty(wg,"__esModule",{value:!0});const e=Ti(),t=Ze(),n=xi(),r=ht(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,t._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:o,schema:c,parentSchema:u,data:l,errsCount:d,it:f}=a;if(!d)throw new Error("ajv implementation error");const{allErrors:h,opts:m}=f;if(f.props=!0,m.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(f,c))return;const y=(0,e.allSchemaProperties)(u.properties),g=(0,e.allSchemaProperties)(u.patternProperties);p(),a.ok((0,t._)`${d} === ${n.default.errors}`);function p(){o.forIn("key",l,S=>{!y.length&&!g.length?v(S):o.if(_(S),()=>v(S))})}function _(S){let T;if(y.length>8){const I=(0,r.schemaRefOrVal)(f,u.properties,"properties");T=(0,e.isOwnProperty)(o,I,S)}else y.length?T=(0,t.or)(...y.map(I=>(0,t._)`${S} === ${I}`)):T=t.nil;return g.length&&(T=(0,t.or)(T,...g.map(I=>(0,t._)`${(0,e.usePattern)(a,I)}.test(${S})`))),(0,t.not)(T)}function k(S){o.code((0,t._)`delete ${l}[${S}]`)}function v(S){if(m.removeAdditional==="all"||m.removeAdditional&&c===!1){k(S);return}if(c===!1){a.setParams({additionalProperty:S}),a.error(),h||o.break();return}if(typeof c=="object"&&!(0,r.alwaysValidSchema)(f,c)){const T=o.name("valid");m.removeAdditional==="failing"?(w(S,T,!1),o.if((0,t.not)(T),()=>{a.reset(),k(S)})):(w(S,T),h||o.if((0,t.not)(T),()=>o.break()))}}function w(S,T,I){const D={keyword:"additionalProperties",dataProp:S,dataPropType:r.Type.Str};I===!1&&Object.assign(D,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(D,T)}}};return wg.default=i,wg}var Sg={},CO;function k1e(){if(CO)return Sg;CO=1,Object.defineProperty(Sg,"__esModule",{value:!0});const e=O1(),t=Ti(),n=ht(),r=$z(),s={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:a,schema:o,parentSchema:c,data:u,it:l}=i;l.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(l,r.default,"additionalProperties"));const d=(0,t.allSchemaProperties)(o);for(const g of d)l.definedProperties.add(g);l.opts.unevaluated&&d.length&&l.props!==!0&&(l.props=n.mergeEvaluated.props(a,(0,n.toHash)(d),l.props));const f=d.filter(g=>!(0,n.alwaysValidSchema)(l,o[g]));if(f.length===0)return;const h=a.name("valid");for(const g of f)m(g)?y(g):(a.if((0,t.propertyInData)(a,u,g,l.opts.ownProperties)),y(g),l.allErrors||a.else().var(h,!0),a.endIf()),i.it.definedProperties.add(g),i.ok(h);function m(g){return l.opts.useDefaults&&!l.compositeRule&&o[g].default!==void 0}function y(g){i.subschema({keyword:"properties",schemaProp:g,dataProp:g},h)}}};return Sg.default=s,Sg}var vg={},PO;function E1e(){if(PO)return vg;PO=1,Object.defineProperty(vg,"__esModule",{value:!0});const e=Ti(),t=Ze(),n=ht(),r=ht(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:a,schema:o,data:c,parentSchema:u,it:l}=i,{opts:d}=l,f=(0,e.allSchemaProperties)(o),h=f.filter(v=>(0,n.alwaysValidSchema)(l,o[v]));if(f.length===0||h.length===f.length&&(!l.opts.unevaluated||l.props===!0))return;const m=d.strictSchema&&!d.allowMatchingProperties&&u.properties,y=a.name("valid");l.props!==!0&&!(l.props instanceof t.Name)&&(l.props=(0,r.evaluatedPropsToName)(a,l.props));const{props:g}=l;p();function p(){for(const v of f)m&&_(v),l.allErrors?k(v):(a.var(y,!0),k(v),a.if(y))}function _(v){for(const w in m)new RegExp(v).test(w)&&(0,n.checkStrictMode)(l,`property ${w} matches pattern ${v} (use allowMatchingProperties)`)}function k(v){a.forIn("key",c,w=>{a.if((0,t._)`${(0,e.usePattern)(i,v)}.test(${w})`,()=>{const S=h.includes(v);S||i.subschema({keyword:"patternProperties",schemaProp:v,dataProp:w,dataPropType:r.Type.Str},y),l.opts.unevaluated&&g!==!0?a.assign((0,t._)`${g}[${w}]`,!0):!S&&!l.allErrors&&a.if((0,t.not)(y),()=>a.break())})})}}};return vg.default=s,vg}var xg={},NO;function w1e(){if(NO)return xg;NO=1,Object.defineProperty(xg,"__esModule",{value:!0});const e=ht(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:s,it:i}=n;if((0,e.alwaysValidSchema)(i,s)){n.fail();return}const a=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),n.failResult(a,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return xg.default=t,xg}var Tg={},RO;function S1e(){if(RO)return Tg;RO=1,Object.defineProperty(Tg,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ti().validateUnion,error:{message:"must match a schema in anyOf"}};return Tg.default=t,Tg}var Ig={},OO;function v1e(){if(OO)return Ig;OO=1,Object.defineProperty(Ig,"__esModule",{value:!0});const e=Ze(),t=ht(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>(0,e._)`{passingSchemas: ${s.passing}}`},code(s){const{gen:i,schema:a,parentSchema:o,it:c}=s;if(!Array.isArray(a))throw new Error("ajv implementation error");if(c.opts.discriminator&&o.discriminator)return;const u=a,l=i.let("valid",!1),d=i.let("passing",null),f=i.name("_valid");s.setParams({passing:d}),i.block(h),s.result(l,()=>s.reset(),()=>s.error(!0));function h(){u.forEach((m,y)=>{let g;(0,t.alwaysValidSchema)(c,m)?i.var(f,!0):g=s.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},f),y>0&&i.if((0,e._)`${f} && ${l}`).assign(l,!1).assign(d,(0,e._)`[${d}, ${y}]`).else(),i.if(f,()=>{i.assign(l,!0),i.assign(d,y),g&&s.mergeEvaluated(g,e.Name)})})}}};return Ig.default=r,Ig}var Ag={},LO;function x1e(){if(LO)return Ag;LO=1,Object.defineProperty(Ag,"__esModule",{value:!0});const e=ht(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:s,it:i}=n;if(!Array.isArray(s))throw new Error("ajv implementation error");const a=r.name("valid");s.forEach((o,c)=>{if((0,e.alwaysValidSchema)(i,o))return;const u=n.subschema({keyword:"allOf",schemaProp:c},a);n.ok(a),n.mergeEvaluated(u)})}};return Ag.default=t,Ag}var Cg={},DO;function T1e(){if(DO)return Cg;DO=1,Object.defineProperty(Cg,"__esModule",{value:!0});const e=Ze(),t=ht(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:a,parentSchema:o,it:c}=i;o.then===void 0&&o.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const u=s(c,"then"),l=s(c,"else");if(!u&&!l)return;const d=a.let("valid",!0),f=a.name("_valid");if(h(),i.reset(),u&&l){const y=a.let("ifClause");i.setParams({ifClause:y}),a.if(f,m("then",y),m("else",y))}else u?a.if(f,m("then")):a.if((0,e.not)(f),m("else"));i.pass(d,()=>i.error(!0));function h(){const y=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);i.mergeEvaluated(y)}function m(y,g){return()=>{const p=i.subschema({keyword:y},f);a.assign(d,f),i.mergeValidEvaluated(p,d),g?a.assign(g,(0,e._)`${y}`):i.setParams({ifClause:y})}}}};function s(i,a){const o=i.schema[a];return o!==void 0&&!(0,t.alwaysValidSchema)(i,o)}return Cg.default=r,Cg}var Pg={},$O;function I1e(){if($O)return Pg;$O=1,Object.defineProperty(Pg,"__esModule",{value:!0});const e=ht(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:s}){r.if===void 0&&(0,e.checkStrictMode)(s,`"${n}" without "if" is ignored`)}};return Pg.default=t,Pg}var MO;function A1e(){if(MO)return bg;MO=1,Object.defineProperty(bg,"__esModule",{value:!0});const e=Lz(),t=g1e(),n=Dz(),r=b1e(),s=y1e(),i=jA(),a=_1e(),o=$z(),c=k1e(),u=E1e(),l=w1e(),d=S1e(),f=v1e(),h=x1e(),m=T1e(),y=I1e();function g(p=!1){const _=[l.default,d.default,f.default,h.default,m.default,y.default,a.default,o.default,i.default,c.default,u.default];return p?_.push(t.default,r.default):_.push(e.default,n.default),_.push(s.default),_}return bg.default=g,bg}var Ng={},Zu={},jO;function Mz(){if(jO)return Zu;jO=1,Object.defineProperty(Zu,"__esModule",{value:!0}),Zu.dynamicAnchor=void 0;const e=Ze(),t=xi(),n=D1(),r=$A(),s={keyword:"$dynamicAnchor",schemaType:"string",code:o=>i(o,o.schema)};function i(o,c){const{gen:u,it:l}=o;l.schemaEnv.root.dynamicAnchors[c]=!0;const d=(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(c)}`,f=l.errSchemaPath==="#"?l.validateName:a(o);u.if((0,e._)`!${d}`,()=>u.assign(d,f))}Zu.dynamicAnchor=i;function a(o){const{schemaEnv:c,schema:u,self:l}=o.it,{root:d,baseId:f,localRefs:h,meta:m}=c.root,{schemaId:y}=l.opts,g=new n.SchemaEnv({schema:u,schemaId:y,root:d,baseId:f,localRefs:h,meta:m});return n.compileSchema.call(l,g),(0,r.getValidate)(o,g)}return Zu.default=s,Zu}var el={},FO;function jz(){if(FO)return el;FO=1,Object.defineProperty(el,"__esModule",{value:!0}),el.dynamicRef=void 0;const e=Ze(),t=xi(),n=$A(),r={keyword:"$dynamicRef",schemaType:"string",code:i=>s(i,i.schema)};function s(i,a){const{gen:o,keyword:c,it:u}=i;if(a[0]!=="#")throw new Error(`"${c}" only supports hash fragment reference`);const l=a.slice(1);if(u.allErrors)d();else{const h=o.let("valid",!1);d(h),i.ok(h)}function d(h){if(u.schemaEnv.root.dynamicAnchors[l]){const m=o.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(l)}`);o.if(m,f(m,h),f(u.validateName,h))}else f(u.validateName,h)()}function f(h,m){return m?()=>o.block(()=>{(0,n.callRef)(i,h),o.let(m,!0)}):()=>(0,n.callRef)(i,h)}}return el.dynamicRef=s,el.default=r,el}var Rg={},BO;function C1e(){if(BO)return Rg;BO=1,Object.defineProperty(Rg,"__esModule",{value:!0});const e=Mz(),t=ht(),n={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,e.dynamicAnchor)(r,""):(0,t.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};return Rg.default=n,Rg}var Og={},zO;function P1e(){if(zO)return Og;zO=1,Object.defineProperty(Og,"__esModule",{value:!0});const e=jz(),t={keyword:"$recursiveRef",schemaType:"string",code:n=>(0,e.dynamicRef)(n,n.schema)};return Og.default=t,Og}var UO;function N1e(){if(UO)return Ng;UO=1,Object.defineProperty(Ng,"__esModule",{value:!0});const e=Mz(),t=jz(),n=C1e(),r=P1e(),s=[e.default,t.default,n.default,r.default];return Ng.default=s,Ng}var Lg={},Dg={},VO;function R1e(){if(VO)return Dg;VO=1,Object.defineProperty(Dg,"__esModule",{value:!0});const e=jA(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:n=>(0,e.validatePropertyDeps)(n)};return Dg.default=t,Dg}var $g={},HO;function O1e(){if(HO)return $g;HO=1,Object.defineProperty($g,"__esModule",{value:!0});const e=jA(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:n=>(0,e.validateSchemaDeps)(n)};return $g.default=t,$g}var Mg={},qO;function L1e(){if(qO)return Mg;qO=1,Object.defineProperty(Mg,"__esModule",{value:!0});const e=ht(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:n,parentSchema:r,it:s}){r.contains===void 0&&(0,e.checkStrictMode)(s,`"${n}" without "contains" is ignored`)}};return Mg.default=t,Mg}var GO;function D1e(){if(GO)return Lg;GO=1,Object.defineProperty(Lg,"__esModule",{value:!0});const e=R1e(),t=O1e(),n=L1e(),r=[e.default,t.default,n.default];return Lg.default=r,Lg}var jg={},Fg={},KO;function $1e(){if(KO)return Fg;KO=1,Object.defineProperty(Fg,"__esModule",{value:!0});const e=Ze(),t=ht(),n=xi(),s={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:i})=>(0,e._)`{unevaluatedProperty: ${i.unevaluatedProperty}}`},code(i){const{gen:a,schema:o,data:c,errsCount:u,it:l}=i;if(!u)throw new Error("ajv implementation error");const{allErrors:d,props:f}=l;f instanceof e.Name?a.if((0,e._)`${f} !== true`,()=>a.forIn("key",c,g=>a.if(m(f,g),()=>h(g)))):f!==!0&&a.forIn("key",c,g=>f===void 0?h(g):a.if(y(f,g),()=>h(g))),l.props=!0,i.ok((0,e._)`${u} === ${n.default.errors}`);function h(g){if(o===!1){i.setParams({unevaluatedProperty:g}),i.error(),d||a.break();return}if(!(0,t.alwaysValidSchema)(l,o)){const p=a.name("valid");i.subschema({keyword:"unevaluatedProperties",dataProp:g,dataPropType:t.Type.Str},p),d||a.if((0,e.not)(p),()=>a.break())}}function m(g,p){return(0,e._)`!${g} || !${g}[${p}]`}function y(g,p){const _=[];for(const k in g)g[k]===!0&&_.push((0,e._)`${p} !== ${k}`);return(0,e.and)(..._)}}};return Fg.default=s,Fg}var Bg={},WO;function M1e(){if(WO)return Bg;WO=1,Object.defineProperty(Bg,"__esModule",{value:!0});const e=Ze(),t=ht(),r={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{gen:i,schema:a,data:o,it:c}=s,u=c.items||0;if(u===!0)return;const l=i.const("len",(0,e._)`${o}.length`);if(a===!1)s.setParams({len:u}),s.fail((0,e._)`${l} > ${u}`);else if(typeof a=="object"&&!(0,t.alwaysValidSchema)(c,a)){const f=i.var("valid",(0,e._)`${l} <= ${u}`);i.if((0,e.not)(f),()=>d(f,u)),s.ok(f)}c.items=!0;function d(f,h){i.forRange("i",h,l,m=>{s.subschema({keyword:"unevaluatedItems",dataProp:m,dataPropType:t.Type.Num},f),c.allErrors||i.if((0,e.not)(f),()=>i.break())})}}};return Bg.default=r,Bg}var JO;function j1e(){if(JO)return jg;JO=1,Object.defineProperty(jg,"__esModule",{value:!0});const e=$1e(),t=M1e(),n=[e.default,t.default];return jg.default=n,jg}var zg={},Ug={},YO;function F1e(){if(YO)return Ug;YO=1,Object.defineProperty(Ug,"__esModule",{value:!0});const e=Ze(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,s){const{gen:i,data:a,$data:o,schema:c,schemaCode:u,it:l}=r,{opts:d,errSchemaPath:f,schemaEnv:h,self:m}=l;if(!d.validateFormats)return;o?y():g();function y(){const p=i.scopeValue("formats",{ref:m.formats,code:d.code.formats}),_=i.const("fDef",(0,e._)`${p}[${u}]`),k=i.let("fType"),v=i.let("format");i.if((0,e._)`typeof ${_} == "object" && !(${_} instanceof RegExp)`,()=>i.assign(k,(0,e._)`${_}.type || "string"`).assign(v,(0,e._)`${_}.validate`),()=>i.assign(k,(0,e._)`"string"`).assign(v,_)),r.fail$data((0,e.or)(w(),S()));function w(){return d.strictSchema===!1?e.nil:(0,e._)`${u} && !${v}`}function S(){const T=h.$async?(0,e._)`(${_}.async ? await ${v}(${a}) : ${v}(${a}))`:(0,e._)`${v}(${a})`,I=(0,e._)`(typeof ${v} == "function" ? ${T} : ${v}.test(${a}))`;return(0,e._)`${v} && ${v} !== true && ${k} === ${s} && !${I}`}}function g(){const p=m.formats[c];if(!p){w();return}if(p===!0)return;const[_,k,v]=S(p);_===s&&r.pass(T());function w(){if(d.strictSchema===!1){m.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${c}" ignored in schema at path "${f}"`}}function S(I){const D=I instanceof RegExp?(0,e.regexpCode)(I):d.code.formats?(0,e._)`${d.code.formats}${(0,e.getProperty)(c)}`:void 0,R=i.scopeValue("formats",{key:c,ref:I,code:D});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,e._)`${R}.validate`]:["string",I,R]}function T(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!h.$async)throw new Error("async format in sync schema");return(0,e._)`await ${v}(${a})`}return typeof k=="function"?(0,e._)`${v}(${a})`:(0,e._)`${v}.test(${a})`}}}};return Ug.default=n,Ug}var QO;function B1e(){if(QO)return zg;QO=1,Object.defineProperty(zg,"__esModule",{value:!0});const t=[F1e().default];return zg.default=t,zg}var mc={},XO;function z1e(){return XO||(XO=1,Object.defineProperty(mc,"__esModule",{value:!0}),mc.contentVocabulary=mc.metadataVocabulary=void 0,mc.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],mc.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),mc}var ZO;function U1e(){if(ZO)return tg;ZO=1,Object.defineProperty(tg,"__esModule",{value:!0});const e=r1e(),t=p1e(),n=A1e(),r=N1e(),s=D1e(),i=j1e(),a=B1e(),o=z1e(),c=[r.default,e.default,t.default,(0,n.default)(!0),a.default,o.metadataVocabulary,o.contentVocabulary,s.default,i.default];return tg.default=c,tg}var Vg={},vf={},eL;function V1e(){if(eL)return vf;eL=1,Object.defineProperty(vf,"__esModule",{value:!0}),vf.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(vf.DiscrError=e={})),vf}var tL;function H1e(){if(tL)return Vg;tL=1,Object.defineProperty(Vg,"__esModule",{value:!0});const e=Ze(),t=V1e(),n=D1(),r=L1(),s=ht(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:o,tagName:c}})=>o===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:o,tag:c,tagName:u}})=>(0,e._)`{error: ${o}, tag: ${u}, tagValue: ${c}}`},code(o){const{gen:c,data:u,schema:l,parentSchema:d,it:f}=o,{oneOf:h}=d;if(!f.opts.discriminator)throw new Error("discriminator: requires discriminator option");const m=l.propertyName;if(typeof m!="string")throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!h)throw new Error("discriminator: requires oneOf keyword");const y=c.let("valid",!1),g=c.const("tag",(0,e._)`${u}${(0,e.getProperty)(m)}`);c.if((0,e._)`typeof ${g} == "string"`,()=>p(),()=>o.error(!1,{discrError:t.DiscrError.Tag,tag:g,tagName:m})),o.ok(y);function p(){const v=k();c.if(!1);for(const w in v)c.elseIf((0,e._)`${g} === ${w}`),c.assign(y,_(v[w]));c.else(),o.error(!1,{discrError:t.DiscrError.Mapping,tag:g,tagName:m}),c.endIf()}function _(v){const w=c.name("valid"),S=o.subschema({keyword:"oneOf",schemaProp:v},w);return o.mergeEvaluated(S,e.Name),w}function k(){var v;const w={},S=I(d);let T=!0;for(let z=0;z<h.length;z++){let V=h[z];if(V?.$ref&&!(0,s.schemaHasRulesButRef)(V,f.self.RULES)){const G=V.$ref;if(V=n.resolveRef.call(f.self,f.schemaEnv.root,f.baseId,G),V instanceof n.SchemaEnv&&(V=V.schema),V===void 0)throw new r.default(f.opts.uriResolver,f.baseId,G)}const H=(v=V?.properties)===null||v===void 0?void 0:v[m];if(typeof H!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${m}"`);T=T&&(S||I(V)),D(H,z)}if(!T)throw new Error(`discriminator: "${m}" must be required`);return w;function I({required:z}){return Array.isArray(z)&&z.includes(m)}function D(z,V){if(z.const)R(z.const,V);else if(z.enum)for(const H of z.enum)R(H,V);else throw new Error(`discriminator: "properties/${m}" must have "const" or "enum"`)}function R(z,V){if(typeof z!="string"||z in w)throw new Error(`discriminator: "${m}" values must be unique strings`);w[z]=V}}}};return Vg.default=a,Vg}var Hg={};const q1e="https://json-schema.org/draft/2020-12/schema",G1e="https://json-schema.org/draft/2020-12/schema",K1e={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},W1e="meta",J1e="Core and Validation specifications meta-schema",Y1e=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],Q1e=["object","boolean"],X1e="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",Z1e={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},eke={$schema:q1e,$id:G1e,$vocabulary:K1e,$dynamicAnchor:W1e,title:J1e,allOf:Y1e,type:Q1e,$comment:X1e,properties:Z1e},tke="https://json-schema.org/draft/2020-12/schema",nke="https://json-schema.org/draft/2020-12/meta/applicator",rke={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},ske="meta",ike="Applicator vocabulary meta-schema",ake=["object","boolean"],oke={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},cke={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},uke={$schema:tke,$id:nke,$vocabulary:rke,$dynamicAnchor:ske,title:ike,type:ake,properties:oke,$defs:cke},lke="https://json-schema.org/draft/2020-12/schema",dke="https://json-schema.org/draft/2020-12/meta/unevaluated",fke={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},hke="meta",mke="Unevaluated applicator vocabulary meta-schema",pke=["object","boolean"],gke={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},bke={$schema:lke,$id:dke,$vocabulary:fke,$dynamicAnchor:hke,title:mke,type:pke,properties:gke},yke="https://json-schema.org/draft/2020-12/schema",_ke="https://json-schema.org/draft/2020-12/meta/content",kke={"https://json-schema.org/draft/2020-12/vocab/content":!0},Eke="meta",wke="Content vocabulary meta-schema",Ske=["object","boolean"],vke={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},xke={$schema:yke,$id:_ke,$vocabulary:kke,$dynamicAnchor:Eke,title:wke,type:Ske,properties:vke},Tke="https://json-schema.org/draft/2020-12/schema",Ike="https://json-schema.org/draft/2020-12/meta/core",Ake={"https://json-schema.org/draft/2020-12/vocab/core":!0},Cke="meta",Pke="Core vocabulary meta-schema",Nke=["object","boolean"],Rke={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},Oke={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},Lke={$schema:Tke,$id:Ike,$vocabulary:Ake,$dynamicAnchor:Cke,title:Pke,type:Nke,properties:Rke,$defs:Oke},Dke="https://json-schema.org/draft/2020-12/schema",$ke="https://json-schema.org/draft/2020-12/meta/format-annotation",Mke={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},jke="meta",Fke="Format vocabulary meta-schema for annotation results",Bke=["object","boolean"],zke={format:{type:"string"}},Uke={$schema:Dke,$id:$ke,$vocabulary:Mke,$dynamicAnchor:jke,title:Fke,type:Bke,properties:zke},Vke="https://json-schema.org/draft/2020-12/schema",Hke="https://json-schema.org/draft/2020-12/meta/meta-data",qke={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},Gke="meta",Kke="Meta-data vocabulary meta-schema",Wke=["object","boolean"],Jke={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},Yke={$schema:Vke,$id:Hke,$vocabulary:qke,$dynamicAnchor:Gke,title:Kke,type:Wke,properties:Jke},Qke="https://json-schema.org/draft/2020-12/schema",Xke="https://json-schema.org/draft/2020-12/meta/validation",Zke={"https://json-schema.org/draft/2020-12/vocab/validation":!0},eEe="meta",tEe="Validation vocabulary meta-schema",nEe=["object","boolean"],rEe={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},sEe={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},iEe={$schema:Qke,$id:Xke,$vocabulary:Zke,$dynamicAnchor:eEe,title:tEe,type:nEe,properties:rEe,$defs:sEe};var nL;function aEe(){if(nL)return Hg;nL=1,Object.defineProperty(Hg,"__esModule",{value:!0});const e=eke,t=uke,n=bke,r=xke,s=Lke,i=Uke,a=Yke,o=iEe,c=["/properties"];function u(l){return[e,t,n,r,s,d(this,i),a,d(this,o)].forEach(f=>this.addMetaSchema(f,void 0,!1)),this;function d(f,h){return l?f.$dataMetaSchema(h,c):h}}return Hg.default=u,Hg}var rL;function oEe(){return rL||(rL=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const n=t1e(),r=U1e(),s=H1e(),i=aEe(),a="https://json-schema.org/draft/2020-12/schema";class o extends n.default{constructor(h={}){super({...h,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),r.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:h,meta:m}=this.opts;m&&(i.default.call(this,h),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=o,e.exports=t=o,e.exports.Ajv2020=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var c=O1();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=Ze();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var l=DA();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var d=L1();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})})(Yp,Yp.exports)),Yp.exports}var cEe=oEe();const uEe=Yy(cEe);new uEe({allErrors:!0,strict:!1,validateSchema:!1,allowUnionTypes:!0});class sBe extends Jm("ToolInteractionPendingError"){}class iBe extends Jm("ToolInteractionDeniedError"){}Xo(ce({limit:Z(ct)}));Xo(ce({namespaces:Qe(ce({namespace:$,displayName:Z($),toolCount:Z(ct)}))}));Xo(ce({namespace:Z($),query:Z($),limit:Z(ct),includeSchemas:Z(qt)}));Xo(ce({results:Qe(ce({path:$,sourceKey:$,description:Z($),interaction:Z($),inputType:Z($),outputType:Z($),inputSchemaJson:Z($),outputSchemaJson:Z($),exampleInputJson:Z($),exampleOutputJson:Z($),providerKind:Z($),providerDataJson:Z($)}))}));Xo(ce({path:$,includeSchemas:Z(qt)}));Xo(ee(op));Xo(ce({query:$,limit:Z(ct),includeSchemas:Z(qt)}));const lEe=ce({path:$,score:ct,description:Z($),interaction:Z($),inputType:Z($),outputType:Z($),inputSchemaJson:Z($),outputSchemaJson:Z($)});Xo(ce({bestPath:ee($),results:Qe(lEe),total:ct}));class aBe extends Jm("OpenApiToolInvocationError"){}const dEe=Le("openapi","graphql","persisted"),Fz=ce({path:$,sourceKey:$,title:Z($),description:Z($),providerKind:$,toolId:$,rawToolId:ee($),operationId:ee($),group:ee($),leaf:ee($),tags:Qe($),method:ee(P1),pathTemplate:ee($),inputType:Z($),outputType:Z($)}),fEe=ce({source:mo,namespace:$,pipelineKind:dEe,toolCount:ct,rawDocumentText:ee($),manifestJson:ee($),definitionsJson:ee($),tools:Qe(Fz)}),hEe=ce({summary:Fz,definitionJson:ee($),documentationJson:ee($),providerDataJson:ee($),inputSchemaJson:ee($),outputSchemaJson:ee($),exampleInputJson:ee($),exampleOutputJson:ee($)}),mEe=ce({query:$,limit:Z(ct)}),pEe=ce({path:$,score:ct,description:Z($),inputType:Z($),outputType:Z($),reasons:Qe($)}),gEe=ce({query:$,queryTokens:Qe($),bestPath:ee($),total:ct,results:Qe(pEe)});class tt extends Vd()("ControlPlaneBadRequestError",{operation:$,message:$,details:$},Ei({status:400})){}class Et extends Vd()("ControlPlaneUnauthorizedError",{operation:$,message:$,details:$},Ei({status:401})){}class wt extends Vd()("ControlPlaneForbiddenError",{operation:$,message:$,details:$},Ei({status:403})){}class zt extends Vd()("ControlPlaneNotFoundError",{operation:$,message:$,details:$},Ei({status:404})){}class Ye extends Vd()("ControlPlaneStorageError",{operation:$,message:$,details:$},Ei({status:500})){}const Ms=Nfe.pipe(Cfe()),gu=Z(Ms),bEe=ce({code:Ms}),yEe=ce({responseJson:Z($)}),CE=jr("workspaceId",mn),sL=jr("executionId",v1);class _Ee extends ec("executions").add(fs("create")`/workspaces/${CE}/executions`.setPayload(bEe).addSuccess(pE).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(Kn("get")`/workspaces/${CE}/executions/${sL}`.addSuccess(pE).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(fs("resume")`/workspaces/${CE}/executions/${sL}/resume`.setPayload(yEe).addSuccess(pE).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).prefix("/v1"){}const kEe=ce({id:$,name:$,canStore:qt}),EEe=ce({platform:$,secretProviders:Qe(kEe),defaultSecretStoreProvider:$}),wEe=ce({sourceId:$,sourceName:$}),SEe=ce({id:$,name:ee($),purpose:$,createdAt:ct,updatedAt:ct,linkedSources:Qe(wEe)}),vEe=ce({name:$,value:$,purpose:Z(mz)}),xEe=ce({id:$,name:ee($),providerId:$,purpose:$,createdAt:ct,updatedAt:ct}),TEe=ce({name:Z($),value:Z($)}),IEe=ce({id:$,name:ee($),purpose:$,createdAt:ct,updatedAt:ct}),AEe=ce({removed:qt});class CEe extends ec("local").add(Kn("installation")`/local/installation`.addSuccess(n_e).addError(tt).addError(zt).addError(Ye)).add(Kn("config")`/local/config`.addSuccess(EEe)).add(Kn("listSecrets")`/local/secrets`.addSuccess(Qe(SEe)).addError(Ye)).add(fs("createSecret")`/local/secrets`.setPayload(vEe).addSuccess(xEe).addError(tt).addError(Ye)).add(qd("updateSecret")`/local/secrets/${jr("secretId",$)}`.setPayload(TEe).addSuccess(IEe).addError(tt).addError(zt).addError(Ye)).add(Gd("deleteSecret")`/local/secrets/${jr("secretId",$)}`.addSuccess(AEe).addError(zt).addError(Ye)).prefix("/v1"){}const PEe=lz.pipe(HI("accountId","role")),NEe=lz.pipe(HI("status","billable","invitedByAccountId"),FB({exact:!0})),REe=h1(PEe,NEe),OEe=xye.pipe(HI("role","status","billable"),FB({exact:!0})),qg=jr("organizationId",Nu),iL=jr("accountId",ks);class LEe extends ec("memberships").add(Kn("list")`/organizations/${qg}/memberships`.addSuccess(Qe(mE)).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(fs("create")`/organizations/${qg}/memberships`.setPayload(REe).addSuccess(mE).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(qd("update")`/organizations/${qg}/memberships/${iL}`.setPayload(OEe).addSuccess(mE).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(Gd("remove")`/organizations/${qg}/memberships/${iL}`.addSuccess(ce({removed:qt})).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).prefix("/v1"){}const DEe=jr("workspaceId",mn),$Ee=c8({contentType:"text/html"}),MEe=ce({provider:Le("mcp"),name:Z(ee($)),endpoint:Ms,transport:Z(sc),queryParams:Z(ee(Qr)),headers:Z(ee(Qr))}),jEe=ce({sessionId:S1,authorizationUrl:$});ce({sessionId:S1,auth:ce({kind:Le("oauth2"),headerName:$,prefix:$,accessToken:Io,refreshToken:ee(Io)})});const FEe=ce({state:$,code:Z($),error:Z($),error_description:Z($)});class BEe extends ec("oauth").add(fs("startSourceAuth")`/workspaces/${DEe}/oauth/source-auth/start`.setPayload(MEe).addSuccess(jEe).addError(tt).addError(Et).addError(wt).addError(Ye)).add(Kn("sourceAuthCallback")`/oauth/source-auth/callback`.setUrlParams(FEe).addSuccess($Ee).addError(tt).addError(Ye)).prefix("/v1"){}const zEe=ce({name:Ms,slug:gu}),UEe=ce({name:gu,status:Z(uz)}),PE=jr("organizationId",Nu);class VEe extends ec("organizations").add(Kn("list")`/organizations`.addSuccess(Qe(qp)).addError(tt).addError(Et).addError(wt).addError(Ye)).add(fs("create")`/organizations`.setPayload(zEe).addSuccess(qp).addError(tt).addError(Et).addError(wt).addError(Ye)).add(Kn("get")`/organizations/${PE}`.addSuccess(qp).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(qd("update")`/organizations/${PE}`.setPayload(UEe).addSuccess(qp).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(Gd("remove")`/organizations/${PE}`.addSuccess(ce({removed:qt})).addError(tt).addError(Et).addError(wt).addError(Ye)).prefix("/v1"){}const HEe=ce({resourceType:Z(gA),resourcePattern:gu,matchType:Z(bA),effect:Z(yA),approvalMode:Z(_A),argumentConditionsJson:Z(ee($)),priority:Z(ct),enabled:Z(qt),targetAccountId:Z(ee(ks)),clientId:Z(ee($))}),qEe=ce({resourceType:Z(gA),resourcePattern:gu,matchType:Z(bA),effect:Z(yA),approvalMode:Z(_A),argumentConditionsJson:Z(ee($)),priority:Z(ct),enabled:Z(qt),targetAccountId:Z(ee(ks)),clientId:Z(ee($))}),xf=jr("workspaceId",mn),NE=jr("policyId",cz);class GEe extends ec("policies").add(Kn("list")`/workspaces/${xf}/policies`.addSuccess(Qe(Gp)).addError(tt).addError(Et).addError(wt).addError(Ye)).add(fs("create")`/workspaces/${xf}/policies`.setPayload(HEe).addSuccess(Gp).addError(tt).addError(Et).addError(wt).addError(Ye)).add(Kn("get")`/workspaces/${xf}/policies/${NE}`.addSuccess(Gp).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(qd("update")`/workspaces/${xf}/policies/${NE}`.setPayload(qEe).addSuccess(Gp).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(Gd("remove")`/workspaces/${xf}/policies/${NE}`.addSuccess(ce({removed:qt})).addError(tt).addError(Et).addError(wt).addError(Ye)).prefix("/v1"){}const KEe=ce({name:Ms,kind:gp,endpoint:Ms}),WEe=ce({status:Z(bp),enabled:Z(qt),namespace:Z(ee($)),transport:Z(ee(sc)),queryParams:Z(ee(Qr)),headers:Z(ee(Qr)),specUrl:Z(ee($)),defaultHeaders:Z(ee(Qr)),auth:Z(pA),sourceHash:Z(ee($)),lastError:Z(ee($))}),JEe=h1(KEe,WEe),YEe=ce({name:gu,kind:Z(gp),endpoint:gu,status:Z(bp),enabled:Z(qt),namespace:Z(ee($)),transport:Z(ee(sc)),queryParams:Z(ee(Qr)),headers:Z(ee(Qr)),specUrl:Z(ee($)),defaultHeaders:Z(ee(Qr)),auth:Z(pA),sourceHash:Z(ee($)),lastError:Z(ee($))}),xs=jr("workspaceId",mn),pa=jr("sourceId",rc),QEe=jr("toolPath",$),aL=ce({interactionId:dA}),XEe=ce({action:Z(Le("submit","continue","cancel")),token:Z($)}),ZEe=ce({state:$,code:Z($),error:Z($),error_description:Z($)}),ewe=ce({url:Ms,probeAuth:Z(Nye)}),twe=ce({kind:Le("bearer"),headerName:Z(ee($)),prefix:Z(ee($)),token:Z(ee($)),tokenRef:Z(ee(Io))}),nwe=ce({kind:Le("oauth2"),headerName:Z(ee($)),prefix:Z(ee($)),accessToken:Z(ee($)),accessTokenRef:Z(ee(Io)),refreshToken:Z(ee($)),refreshTokenRef:Z(ee(Io))}),oL=Hs(ce({kind:Le("none")}),twe,nwe),rwe=Hs(ce({kind:Le("openapi"),endpoint:Ms,specUrl:Ms,name:Z(ee($)),namespace:Z(ee($)),auth:Z(oL)}),ce({kind:Le("graphql"),endpoint:Ms,name:Z(ee($)),namespace:Z(ee($)),auth:Z(oL)}),ce({kind:Le("mcp"),endpoint:Ms,name:Z(ee($)),namespace:Z(ee($)),transport:Z(ee(sc)),queryParams:Z(ee(Qr)),headers:Z(ee(Qr))})),swe=Hs(ce({kind:Le("connected"),source:mo}),ce({kind:Le("credential_required"),source:mo}),ce({kind:Le("oauth_required"),source:mo,sessionId:S1,authorizationUrl:$})),RE=c8({contentType:"text/html"});class iwe extends ec("sources").add(fs("discover")`/sources/discover`.setPayload(ewe).addSuccess(Oye).addError(tt).addError(Et).addError(wt)).add(fs("connect")`/workspaces/${xs}/sources/connect`.setPayload(rwe).addSuccess(swe).addError(tt).addError(Et).addError(wt).addError(Ye)).add(Kn("list")`/workspaces/${xs}/sources`.addSuccess(Qe(mo)).addError(tt).addError(Et).addError(wt).addError(Ye)).add(fs("create")`/workspaces/${xs}/sources`.setPayload(JEe).addSuccess(mo).addError(tt).addError(Et).addError(wt).addError(Ye)).add(Kn("get")`/workspaces/${xs}/sources/${pa}`.addSuccess(mo).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(qd("update")`/workspaces/${xs}/sources/${pa}`.setPayload(YEe).addSuccess(mo).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(Gd("remove")`/workspaces/${xs}/sources/${pa}`.addSuccess(ce({removed:qt})).addError(tt).addError(Et).addError(wt).addError(Ye)).add(Kn("credentialPage")`/workspaces/${xs}/sources/${pa}/credentials`.setUrlParams(aL).addSuccess(RE).addError(tt).addError(zt).addError(Ye)).add(fs("credentialSubmit")`/workspaces/${xs}/sources/${pa}/credentials`.setUrlParams(aL).setPayload(XEe).addSuccess(RE).addError(tt).addError(zt).addError(Ye)).add(Kn("credentialComplete")`/workspaces/${xs}/sources/${pa}/credentials/oauth/complete`.setUrlParams(ZEe).addSuccess(RE).addError(tt).addError(zt).addError(Ye)).add(Kn("inspection")`/workspaces/${xs}/sources/${pa}/inspection`.addSuccess(fEe).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(Kn("inspectionTool")`/workspaces/${xs}/sources/${pa}/tools/${QEe}/inspection`.addSuccess(hEe).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(fs("inspectionDiscover")`/workspaces/${xs}/sources/${pa}/inspection/discover`.setPayload(mEe).addSuccess(gEe).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).prefix("/v1"){}const awe=ce({name:Ms}),owe=ce({name:gu}),cL=jr("organizationId",Nu),OE=jr("workspaceId",mn);class cwe extends ec("workspaces").add(Kn("list")`/organizations/${cL}/workspaces`.addSuccess(Qe(Kp)).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(fs("create")`/organizations/${cL}/workspaces`.setPayload(awe).addSuccess(Kp).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(Kn("get")`/workspaces/${OE}`.addSuccess(Kp).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(qd("update")`/workspaces/${OE}`.setPayload(owe).addSuccess(Kp).addError(tt).addError(Et).addError(wt).addError(zt).addError(Ye)).add(Gd("remove")`/workspaces/${OE}`.addSuccess(ce({removed:qt})).addError(tt).addError(Et).addError(wt).addError(Ye)).prefix("/v1"){}class Bz extends tme().add(CEe).add(BEe).add(VEe).add(LEe).add(cwe).add(iwe).add(GEe).add(_Ee).annotateContext(xge({title:"Executor v3 Control Plane API",description:"CRUD control plane for organizations, workspaces, sources, and policies"})){}Tge(Bz);const uwe={accountId:"x-executor-account-id"},lwe=e=>{const t=e.accountId;return $pe(Bz,{baseUrl:e.baseUrl,transformClient:t?n=>n.pipe(S8(Tpe(uwe.accountId,t))):void 0}).pipe(om(yge))},dwe="http://127.0.0.1:8788",fwe="ws_placeholder",hwe="acc_placeholder",$1="src_placeholder";let uL=typeof window<"u"&&typeof window.location?.origin=="string"?window.location.origin:dwe;const zz=O.createContext(null),M1=e=>JSON.stringify(e),Fi=e=>JSON.parse(e),bu=(e,t,n)=>M1([e,t,n]),md=(e,t,n,r)=>M1([e,t,n,r]),Uz=(e,t,n,r,s)=>M1([e,t,n,r,s]),mwe=(e,t,n,r,s,i)=>M1([e,t,n,r,s,i]),pwe=e=>new Error(eI(e)),gwe=e=>e instanceof Error?e:new Error(String(e)),bwe=()=>{if(typeof window>"u")return!1;const e=window.location.hostname;return e==="localhost"||e==="127.0.0.1"},Vz=e=>e instanceof Error?{name:e.name,message:e.message,stack:e.stack}:{message:String(e)},Hz=(e,t)=>{bwe()&&console.error(`[executor react] ${e}`,t)},ia=e=>{const t=e.accountId;return l5(lwe({baseUrl:uL,...t!==void 0?{accountId:t}:{}}).pipe(Oe(e.execute))).catch(n=>{throw Hz("control-plane request failed",{baseUrl:uL,accountId:t,error:Vz(n),cause:n}),n})},ic=e=>jl({try:()=>ia(e),catch:gwe}),ywe=qa(ic({execute:e=>e.local.installation({})})).pipe(Ga),_we=qa(ic({execute:e=>e.local.config({})})).pipe(Ga),FA=qa(ic({execute:e=>e.local.listSecrets({})})).pipe(Ga),Uo=lp(e=>{const[t,n,r]=Fi(e);return qa(t?ic({accountId:r,execute:s=>s.sources.list({path:{workspaceId:n}})}):Kc).pipe(Ga)}),pd=lp(e=>{const[t,n,r,s]=Fi(e);return qa(t?ic({accountId:r,execute:i=>i.sources.get({path:{workspaceId:n,sourceId:s}})}):Kc).pipe(Ga)}),qz=lp(e=>{const[t,n,r,s]=Fi(e);return qa(t?ic({accountId:r,execute:i=>i.sources.inspection({path:{workspaceId:n,sourceId:s}})}):Kc).pipe(Ga)}),BA=lp(e=>{const[t,n,r,s,i]=Fi(e);return qa(t&&i?ic({accountId:r,execute:a=>a.sources.inspectionTool({path:{workspaceId:n,sourceId:s,toolPath:i}})}):Ot(null)).pipe(Ga)}),Gz=lp(e=>{const[t,n,r,s,i,a]=Fi(e);return qa(t?i.trim().length===0?Ot({query:"",queryTokens:[],bestPath:null,total:0,results:[]}):ic({accountId:r,execute:o=>o.sources.inspectionDiscover({path:{workspaceId:n,sourceId:s},payload:{query:i,...a!==null?{limit:a}:{}}})}):Kc).pipe(Ga)}),kwe=e=>pu(e)?{status:"ready",data:e.value}:XB(e)?{status:"error",error:pwe(e.cause)}:{status:"loading"},_p=e=>{if(e.status==="loading")return{status:"loading"};if(e.status==="error")return{status:"error",error:e.error};throw new Error("Expected workspace loadable to be pending or errored")},ac=e=>{const t=hge(e);return O.useMemo(()=>kwe(t),[t])},Ewe=()=>{const e=ac(ywe);return O.useMemo(()=>e.status!=="ready"?e:{status:"ready",data:{installation:e.data,workspaceId:e.data.workspaceId,accountId:e.data.accountId}},[e])},Ou=()=>{const e=Ewe(),t=e.status==="ready",n=t?e.data.workspaceId:fwe,r=t?e.data.accountId:hwe;return O.useMemo(()=>({workspace:e,enabled:t,workspaceId:n,accountId:r}),[r,t,e,n])},Zc=(e,t)=>{const n=e.getNodes().get(t)??null;if(n===null||typeof n.valueOption!="function")return;const r=n.valueOption();if(r._tag!=="Some")return;const s=r;if(pu(s.value))return s.value.value},Gr=(e,t,n)=>{const r=e.ensureNode;typeof r=="function"&&r.call(e,t).setValue(zo(n))},wwe=()=>({sourceLists:new Set,sources:new Set,inspections:new Set,toolDetails:new Set,discoveries:new Set}),Tf=(e,t,n,r)=>!(e?.workspaceId!==void 0&&e.workspaceId!==t||e?.accountId!==void 0&&e.accountId!==n||e?.sourceId!==void 0&&e.sourceId!==r),Swe=(e,t,n)=>{t.sourceLists.forEach(r=>{const[s,i,a]=Fi(r);s&&Tf(n,i,a)&&e.refresh(Uo(r))}),t.sources.forEach(r=>{const[s,i,a,o]=Fi(r);s&&Tf(n,i,a,o)&&e.refresh(pd(r))}),t.inspections.forEach(r=>{const[s,i,a,o]=Fi(r);s&&Tf(n,i,a,o)&&e.refresh(qz(r))}),t.toolDetails.forEach(r=>{const[s,i,a,o]=Fi(r);s&&Tf(n,i,a,o)&&e.refresh(BA(r))}),t.discoveries.forEach(r=>{const[s,i,a,o]=Fi(r);s&&Tf(n,i,a,o)&&e.refresh(Gz(r))})},Kz=()=>{const e=O.useContext(zz);if(e===null)throw new Error("ExecutorReactProvider is missing from the React tree");return e},kp=(e,t,n)=>{const{activeQueries:r}=Kz();O.useEffect(()=>{if(!n)return;const s=r[e];return s.add(t),()=>{s.delete(t)}},[r,e,n,t])},ky=(e,t)=>{const n=e.findIndex(s=>s.id===t.id);if(n===-1)return[t,...e];const r=e.slice();return r[n]=t,r},vwe=(e,t)=>e.filter(n=>n.id!==t),xwe=e=>{const t=Date.now();return{id:`src_optimistic_${crypto.randomUUID()}`,workspaceId:e.workspaceId,name:e.payload.name,kind:e.payload.kind,endpoint:e.payload.endpoint,status:e.payload.status??"draft",enabled:e.payload.enabled??!0,namespace:e.payload.namespace??null,transport:e.payload.transport??null,queryParams:e.payload.queryParams??null,headers:e.payload.headers??null,specUrl:e.payload.specUrl??null,defaultHeaders:e.payload.defaultHeaders??null,auth:e.payload.auth??{kind:"none"},sourceHash:e.payload.sourceHash??null,lastError:e.payload.lastError??null,createdAt:t,updatedAt:t}},Twe=(e,t)=>({...e,name:t.name??e.name,kind:t.kind??e.kind,endpoint:t.endpoint??e.endpoint,status:t.status??e.status,enabled:t.enabled??e.enabled,namespace:t.namespace!==void 0?t.namespace:e.namespace,transport:t.transport!==void 0?t.transport:e.transport,queryParams:t.queryParams!==void 0?t.queryParams:e.queryParams,headers:t.headers!==void 0?t.headers:e.headers,specUrl:t.specUrl!==void 0?t.specUrl:e.specUrl,defaultHeaders:t.defaultHeaders!==void 0?t.defaultHeaders:e.defaultHeaders,auth:t.auth!==void 0?t.auth:e.auth,sourceHash:t.sourceHash!==void 0?t.sourceHash:e.sourceHash,lastError:t.lastError!==void 0?t.lastError:e.lastError,updatedAt:Date.now()}),Wd=(e,t)=>{const n=Ou(),{registry:r,invalidateQueries:s}=Kz(),[i,a]=O.useState({status:"idle",data:null,error:null}),o=O.useCallback(async u=>{if(!n.enabled){const m=new Error("Executor workspace context is not ready");throw a({status:"error",data:null,error:m}),m}const l={workspaceId:n.workspaceId,accountId:n.accountId,registry:r,invalidateQueries:s};a(m=>({status:"pending",data:m.data,error:null}));const d=t?.optimisticUpdate?.(l,u),f=typeof d=="function"?d:d?.rollback,h=typeof d=="function"?void 0:d?.value;try{const m=await e({workspaceId:n.workspaceId,accountId:n.accountId,payload:u});return t?.onSuccess?.(l,u,m,h),a({status:"success",data:m,error:null}),m}catch(m){f?.(),Hz("source mutation failed",{workspaceId:n.workspaceId,accountId:n.accountId,payload:u,error:Vz(m),cause:m});const y=m instanceof Error?m:new Error(String(m));throw a({status:"error",data:null,error:y}),y}},[e,s,t,r,n.accountId,n.enabled,n.workspaceId]),c=O.useCallback(()=>{a({status:"idle",data:null,error:null})},[]);return O.useMemo(()=>({...i,mutateAsync:o,reset:c}),[o,c,i])},Iwe=e=>{const t=O.useContext(Hd),n=O.useMemo(wwe,[]),r=O.useCallback(i=>{Swe(t,n,i)},[n,t]),s=O.useMemo(()=>({registry:t,activeQueries:n,invalidateQueries:r}),[n,r,t]);return O.createElement(zz.Provider,{value:s},e.children)},Awe=e=>O.createElement(lge,null,O.createElement(Iwe,null,e.children)),Cwe=()=>ac(_we),zA=()=>ac(FA),Wz=()=>{const e=O.useContext(Hd);return O.useCallback(()=>{e.refresh(FA)},[e])},UA=e=>{const t=O.useContext(Hd),[n,r]=O.useState({status:"idle",data:null,error:null}),s=O.useCallback(async a=>{r(o=>({status:"pending",data:o.data,error:null}));try{const o=await e(a);return t.refresh(FA),r({status:"success",data:o,error:null}),o}catch(o){const c=o instanceof Error?o:new Error(String(o));throw r({status:"error",data:null,error:c}),c}},[e,t]),i=O.useCallback(()=>{r({status:"idle",data:null,error:null})},[]);return O.useMemo(()=>({...n,mutateAsync:s,reset:i}),[s,i,n])},VA=()=>UA(O.useCallback(e=>ia({execute:t=>t.local.createSecret({payload:e})}),[])),Pwe=()=>UA(O.useCallback(e=>ia({execute:t=>t.local.updateSecret({path:{secretId:e.secretId},payload:e.payload})}),[])),Nwe=()=>UA(O.useCallback(e=>ia({execute:t=>t.local.deleteSecret({path:{secretId:e}})}),[])),Jz=()=>{const e=Ou(),t=bu(e.enabled,e.workspaceId,e.accountId);kp("sourceLists",t,e.enabled);const n=ac(Uo(t));return e.enabled?n:_p(e.workspace)},Rwe=e=>{const t=Ou(),n=t.enabled?e:$1,r=md(t.enabled,t.workspaceId,t.accountId,n);kp("sources",r,t.enabled);const s=ac(pd(r));return t.enabled?s:_p(t.workspace)},Owe=e=>{const t=Ou(),n=t.enabled?e:$1,r=md(t.enabled,t.workspaceId,t.accountId,n);kp("inspections",r,t.enabled);const s=ac(qz(r));return t.enabled?s:_p(t.workspace)},Lwe=(e,t)=>{const n=Ou(),r=n.enabled?e:$1,s=Uz(n.enabled,n.workspaceId,n.accountId,r,t);kp("toolDetails",s,n.enabled&&t!==null);const i=ac(BA(s));return n.enabled?i:_p(n.workspace)},Dwe=e=>{const t=Ou(),n=t.enabled?e.sourceId:$1,r=mwe(t.enabled,t.workspaceId,t.accountId,n,e.query,e.limit??null);kp("discoveries",r,t.enabled);const s=ac(Gz(r));return t.enabled?s:_p(t.workspace)},$we=()=>{const e=O.useContext(Hd),t=Ou();return O.useCallback((n,r)=>{if(!t.enabled)return()=>{};const s=n,i=BA(Uz(t.enabled,t.workspaceId,t.accountId,s,r));return e.mount(i)},[e,t.accountId,t.enabled,t.workspaceId])},Mwe=()=>Wd(O.useCallback(({workspaceId:e,accountId:t,payload:n})=>ia({accountId:t,execute:r=>r.sources.create({path:{workspaceId:e},payload:n})}),[]),{optimisticUpdate:(e,t)=>{const n=Uo(bu(!0,e.workspaceId,e.accountId)),r=Zc(e.registry,n);if(r===void 0)return;const s=xwe({workspaceId:e.workspaceId,payload:t});return Gr(e.registry,n,[s,...r]),{value:s,rollback:()=>{Gr(e.registry,n,r)}}},onSuccess:(e,t,n,r)=>{const s=Uo(bu(!0,e.workspaceId,e.accountId)),i=Zc(e.registry,s);if(i!==void 0){const a=r?i.filter(o=>o.id!==r.id):i;Gr(e.registry,s,ky(a,n))}Gr(e.registry,pd(md(!0,e.workspaceId,e.accountId,n.id)),n),e.invalidateQueries({workspaceId:e.workspaceId,accountId:e.accountId})}}),jwe=()=>Wd(O.useCallback(({workspaceId:e,accountId:t,payload:n})=>ia({accountId:t,execute:r=>r.sources.update({path:{workspaceId:e,sourceId:n.sourceId},payload:n.payload})}),[]),{optimisticUpdate:(e,t)=>{const n=Uo(bu(!0,e.workspaceId,e.accountId)),r=pd(md(!0,e.workspaceId,e.accountId,t.sourceId)),s=Zc(e.registry,n),i=Zc(e.registry,r)??s?.find(o=>o.id===t.sourceId);if(i===void 0)return;const a=Twe(i,t.payload);return s!==void 0&&Gr(e.registry,n,ky(s,a)),Gr(e.registry,r,a),()=>{s!==void 0&&Gr(e.registry,n,s),Gr(e.registry,r,i)}},onSuccess:(e,t,n)=>{const r=Uo(bu(!0,e.workspaceId,e.accountId)),s=pd(md(!0,e.workspaceId,e.accountId,t.sourceId)),i=Zc(e.registry,r);i!==void 0&&Gr(e.registry,r,ky(i,n)),Gr(e.registry,s,n),e.invalidateQueries({workspaceId:e.workspaceId,accountId:e.accountId,sourceId:t.sourceId})}}),Yz=()=>Wd(O.useCallback(({workspaceId:e,accountId:t,payload:n})=>ia({accountId:t,execute:r=>r.oauth.startSourceAuth({path:{workspaceId:e},payload:n})}),[])),Fwe=()=>Wd(O.useCallback(({workspaceId:e,accountId:t,payload:n})=>ia({accountId:t,execute:r=>r.sources.remove({path:{workspaceId:e,sourceId:n}})}),[]),{optimisticUpdate:(e,t)=>{const n=Uo(bu(!0,e.workspaceId,e.accountId)),r=Zc(e.registry,n);if(r!==void 0)return Gr(e.registry,n,vwe(r,t)),()=>{Gr(e.registry,n,r)}},onSuccess:(e,t)=>{e.invalidateQueries({workspaceId:e.workspaceId,accountId:e.accountId,sourceId:t})}}),Bwe=()=>Wd(O.useCallback(({accountId:e,payload:t})=>ia({accountId:e,execute:n=>n.sources.discover({payload:t})}),[])),zwe=()=>Wd(O.useCallback(({workspaceId:e,accountId:t,payload:n})=>ia({accountId:t,execute:r=>r.sources.connect({path:{workspaceId:e},payload:n})}),[]),{onSuccess:(e,t,n)=>{const r=Uo(bu(!0,e.workspaceId,e.accountId)),s=Zc(e.registry,r);s!==void 0&&Gr(e.registry,r,ky(s,n.source)),Gr(e.registry,pd(md(!0,e.workspaceId,e.accountId,n.source.id)),n.source),e.invalidateQueries({workspaceId:e.workspaceId,accountId:e.accountId})}});function Qz(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Qz(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function j1(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Qz(e))&&(r&&(r+=" "),r+=t);return r}const Uwe=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Vwe=(e,t)=>({classGroupId:e,validator:t}),Xz=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Ey="-",lL=[],Hwe="arbitrary..",qwe=e=>{const t=Kwe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return Gwe(a);const o=a.split(Ey),c=o[0]===""&&o.length>1?1:0;return Zz(o,c,t)},getConflictingClassGroupIds:(a,o)=>{if(o){const c=r[a],u=n[a];return c?u?Uwe(u,c):c:u||lL}return n[a]||lL}}},Zz=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],i=n.nextPart.get(s);if(i){const u=Zz(e,t+1,i);if(u)return u}const a=n.validators;if(a===null)return;const o=t===0?e.join(Ey):e.slice(t).join(Ey),c=a.length;for(let u=0;u<c;u++){const l=a[u];if(l.validator(o))return l.classGroupId}},Gwe=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Hwe+r:void 0})(),Kwe=e=>{const{theme:t,classGroups:n}=e;return Wwe(n,t)},Wwe=(e,t)=>{const n=Xz();for(const r in e){const s=e[r];HA(s,n,r,t)}return n},HA=(e,t,n,r)=>{const s=e.length;for(let i=0;i<s;i++){const a=e[i];Jwe(a,t,n,r)}},Jwe=(e,t,n,r)=>{if(typeof e=="string"){Ywe(e,t,n);return}if(typeof e=="function"){Qwe(e,t,n,r);return}Xwe(e,t,n,r)},Ywe=(e,t,n)=>{const r=e===""?t:eU(t,e);r.classGroupId=n},Qwe=(e,t,n,r)=>{if(Zwe(e)){HA(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Vwe(n,e))},Xwe=(e,t,n,r)=>{const s=Object.entries(e),i=s.length;for(let a=0;a<i;a++){const[o,c]=s[a];HA(c,eU(t,o),n,r)}},eU=(e,t)=>{let n=e;const r=t.split(Ey),s=r.length;for(let i=0;i<s;i++){const a=r[i];let o=n.nextPart.get(a);o||(o=Xz(),n.nextPart.set(a,o)),n=o}return n},Zwe=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,eSe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const s=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return s(i,a),a},set(i,a){i in n?n[i]=a:s(i,a)}}},Ev="!",dL=":",tSe=[],fL=(e,t,n,r,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),nSe=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const i=[];let a=0,o=0,c=0,u;const l=s.length;for(let y=0;y<l;y++){const g=s[y];if(a===0&&o===0){if(g===dL){i.push(s.slice(c,y)),c=y+1;continue}if(g==="/"){u=y;continue}}g==="["?a++:g==="]"?a--:g==="("?o++:g===")"&&o--}const d=i.length===0?s:s.slice(c);let f=d,h=!1;d.endsWith(Ev)?(f=d.slice(0,-1),h=!0):d.startsWith(Ev)&&(f=d.slice(1),h=!0);const m=u&&u>c?u-c:void 0;return fL(i,h,f,m)};if(t){const s=t+dL,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):fL(tSe,!1,a,void 0,!0)}if(n){const s=r;r=i=>n({className:i,parseClassName:s})}return r},rSe=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let s=[];for(let i=0;i<n.length;i++){const a=n[i],o=a[0]==="[",c=t.has(a);o||c?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(a)):s.push(a)}return s.length>0&&(s.sort(),r.push(...s)),r}},sSe=e=>({cache:eSe(e.cacheSize),parseClassName:nSe(e),sortModifiers:rSe(e),...qwe(e)}),iSe=/\s+/,aSe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i}=t,a=[],o=e.trim().split(iSe);let c="";for(let u=o.length-1;u>=0;u-=1){const l=o[u],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:y}=n(l);if(d){c=l+(c.length>0?" "+c:c);continue}let g=!!y,p=r(g?m.substring(0,y):m);if(!p){if(!g){c=l+(c.length>0?" "+c:c);continue}if(p=r(m),!p){c=l+(c.length>0?" "+c:c);continue}g=!1}const _=f.length===0?"":f.length===1?f[0]:i(f).join(":"),k=h?_+Ev:_,v=k+p;if(a.indexOf(v)>-1)continue;a.push(v);const w=s(p,g);for(let S=0;S<w.length;++S){const T=w[S];a.push(k+T)}c=l+(c.length>0?" "+c:c)}return c},oSe=(...e)=>{let t=0,n,r,s="";for(;t<e.length;)(n=e[t++])&&(r=tU(n))&&(s&&(s+=" "),s+=r);return s},tU=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=tU(e[r]))&&(n&&(n+=" "),n+=t);return n},cSe=(e,...t)=>{let n,r,s,i;const a=c=>{const u=t.reduce((l,d)=>d(l),e());return n=sSe(u),r=n.cache.get,s=n.cache.set,i=o,o(c)},o=c=>{const u=r(c);if(u)return u;const l=aSe(c,n);return s(c,l),l};return i=a,(...c)=>i(oSe(...c))},uSe=[],An=e=>{const t=n=>n[e]||uSe;return t.isThemeGetter=!0,t},nU=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,rU=/^\((?:(\w[\w-]*):)?(.+)\)$/i,lSe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,dSe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fSe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,hSe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mSe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pSe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ya=e=>lSe.test(e),st=e=>!!e&&!Number.isNaN(Number(e)),Qa=e=>!!e&&Number.isInteger(Number(e)),LE=e=>e.endsWith("%")&&st(e.slice(0,-1)),ga=e=>dSe.test(e),sU=()=>!0,gSe=e=>fSe.test(e)&&!hSe.test(e),qA=()=>!1,bSe=e=>mSe.test(e),ySe=e=>pSe.test(e),_Se=e=>!ve(e)&&!Te(e),kSe=e=>oc(e,oU,qA),ve=e=>nU.test(e),pc=e=>oc(e,cU,gSe),hL=e=>oc(e,ASe,st),ESe=e=>oc(e,lU,sU),wSe=e=>oc(e,uU,qA),mL=e=>oc(e,iU,qA),SSe=e=>oc(e,aU,ySe),Gg=e=>oc(e,dU,bSe),Te=e=>rU.test(e),If=e=>Lu(e,cU),vSe=e=>Lu(e,uU),pL=e=>Lu(e,iU),xSe=e=>Lu(e,oU),TSe=e=>Lu(e,aU),Kg=e=>Lu(e,dU,!0),ISe=e=>Lu(e,lU,!0),oc=(e,t,n)=>{const r=nU.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Lu=(e,t,n=!1)=>{const r=rU.exec(e);return r?r[1]?t(r[1]):n:!1},iU=e=>e==="position"||e==="percentage",aU=e=>e==="image"||e==="url",oU=e=>e==="length"||e==="size"||e==="bg-size",cU=e=>e==="length",ASe=e=>e==="number",uU=e=>e==="family-name",lU=e=>e==="number"||e==="weight",dU=e=>e==="shadow",CSe=()=>{const e=An("color"),t=An("font"),n=An("text"),r=An("font-weight"),s=An("tracking"),i=An("leading"),a=An("breakpoint"),o=An("container"),c=An("spacing"),u=An("radius"),l=An("shadow"),d=An("inset-shadow"),f=An("text-shadow"),h=An("drop-shadow"),m=An("blur"),y=An("perspective"),g=An("aspect"),p=An("ease"),_=An("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...v(),Te,ve],S=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],I=()=>[Te,ve,c],D=()=>[Ya,"full","auto",...I()],R=()=>[Qa,"none","subgrid",Te,ve],z=()=>["auto",{span:["full",Qa,Te,ve]},Qa,Te,ve],V=()=>[Qa,"auto",Te,ve],H=()=>["auto","min","max","fr",Te,ve],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],ne=()=>["auto",...I()],me=()=>[Ya,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],ke=()=>[Ya,"screen","full","dvw","lvw","svw","min","max","fit",...I()],et=()=>[Ya,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],C=()=>[e,Te,ve],M=()=>[...v(),pL,mL,{position:[Te,ve]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",xSe,kSe,{size:[Te,ve]}],N=()=>[LE,If,pc],B=()=>["","none","full",u,Te,ve],J=()=>["",st,If,pc],be=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ee=()=>[st,LE,pL,mL],Re=()=>["","none",m,Te,ve],q=()=>["none",st,Te,ve],W=()=>["none",st,Te,ve],se=()=>[st,Te,ve],le=()=>[Ya,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ga],breakpoint:[ga],color:[sU],container:[ga],"drop-shadow":[ga],ease:["in","out","in-out"],font:[_Se],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ga],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ga],shadow:[ga],spacing:["px",st],text:[ga],"text-shadow":[ga],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ya,ve,Te,g]}],container:["container"],columns:[{columns:[st,ve,Te,o]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{"inset-s":D(),start:D()}],end:[{"inset-e":D(),end:D()}],"inset-bs":[{"inset-bs":D()}],"inset-be":[{"inset-be":D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Qa,"auto",Te,ve]}],basis:[{basis:[Ya,"full","auto",o,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[st,Ya,"auto","initial","none",ve]}],grow:[{grow:["",st,Te,ve]}],shrink:[{shrink:["",st,Te,ve]}],order:[{order:[Qa,"first","last","none",Te,ve]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:ne()}],mx:[{mx:ne()}],my:[{my:ne()}],ms:[{ms:ne()}],me:[{me:ne()}],mbs:[{mbs:ne()}],mbe:[{mbe:ne()}],mt:[{mt:ne()}],mr:[{mr:ne()}],mb:[{mb:ne()}],ml:[{ml:ne()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:me()}],"inline-size":[{inline:["auto",...ke()]}],"min-inline-size":[{"min-inline":["auto",...ke()]}],"max-inline-size":[{"max-inline":["none",...ke()]}],"block-size":[{block:["auto",...et()]}],"min-block-size":[{"min-block":["auto",...et()]}],"max-block-size":[{"max-block":["none",...et()]}],w:[{w:[o,"screen",...me()]}],"min-w":[{"min-w":[o,"screen","none",...me()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...me()]}],h:[{h:["screen","lh",...me()]}],"min-h":[{"min-h":["screen","lh","none",...me()]}],"max-h":[{"max-h":["screen","lh",...me()]}],"font-size":[{text:["base",n,If,pc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ISe,ESe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",LE,ve]}],"font-family":[{font:[vSe,wSe,t]}],"font-features":[{"font-features":[ve]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Te,ve]}],"line-clamp":[{"line-clamp":[st,"none",Te,hL]}],leading:[{leading:[i,...I()]}],"list-image":[{"list-image":["none",Te,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[st,"from-font","auto",Te,pc]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[st,"auto",Te,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Te,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qa,Te,ve],radial:["",Te,ve],conic:[Qa,Te,ve]},TSe,SSe]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-bs":[{"border-bs":C()}],"border-color-be":[{"border-be":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[st,Te,ve]}],"outline-w":[{outline:["",st,If,pc]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",l,Kg,Gg]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,Kg,Gg]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[st,pc]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,Kg,Gg]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[st,Te,ve]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[st]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ee()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":Ee()}],"mask-image-t-to-pos":[{"mask-t-to":Ee()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":Ee()}],"mask-image-r-to-pos":[{"mask-r-to":Ee()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":Ee()}],"mask-image-b-to-pos":[{"mask-b-to":Ee()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":Ee()}],"mask-image-l-to-pos":[{"mask-l-to":Ee()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":Ee()}],"mask-image-x-to-pos":[{"mask-x-to":Ee()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":Ee()}],"mask-image-y-to-pos":[{"mask-y-to":Ee()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Te,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ee()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":v()}],"mask-image-conic-pos":[{"mask-conic":[st]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ee()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,ve]}],filter:[{filter:["","none",Te,ve]}],blur:[{blur:Re()}],brightness:[{brightness:[st,Te,ve]}],contrast:[{contrast:[st,Te,ve]}],"drop-shadow":[{"drop-shadow":["","none",h,Kg,Gg]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",st,Te,ve]}],"hue-rotate":[{"hue-rotate":[st,Te,ve]}],invert:[{invert:["",st,Te,ve]}],saturate:[{saturate:[st,Te,ve]}],sepia:[{sepia:["",st,Te,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,ve]}],"backdrop-blur":[{"backdrop-blur":Re()}],"backdrop-brightness":[{"backdrop-brightness":[st,Te,ve]}],"backdrop-contrast":[{"backdrop-contrast":[st,Te,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",st,Te,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[st,Te,ve]}],"backdrop-invert":[{"backdrop-invert":["",st,Te,ve]}],"backdrop-opacity":[{"backdrop-opacity":[st,Te,ve]}],"backdrop-saturate":[{"backdrop-saturate":[st,Te,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",st,Te,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[st,"initial",Te,ve]}],ease:[{ease:["linear","initial",p,Te,ve]}],delay:[{delay:[st,Te,ve]}],animate:[{animate:["none",_,Te,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Te,ve]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:W()}],"scale-x":[{"scale-x":W()}],"scale-y":[{"scale-y":W()}],"scale-z":[{"scale-z":W()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[Te,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Te,ve]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te,ve]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[st,If,pc,hL]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},GA=cSe(CSe);function Ve(...e){return GA(j1(e))}function PSe({className:e,...t}){return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-4",e),...t,children:[b.jsx("rect",{x:"2",y:"2",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.3"}),b.jsx("rect",{x:"9",y:"2",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.3"}),b.jsx("rect",{x:"2",y:"9",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.3"}),b.jsx("rect",{x:"9",y:"9",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.3"})]})}function fU({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-4",e),...t,children:b.jsx("path",{d:"M4 8h8M8 4v8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})})}function hU({className:e,...t}){return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-4",e),...t,children:[b.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.3"}),b.jsx("path",{d:"M10.5 10.5L14 14",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})}function gL({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-3",e),...t,children:b.jsx("path",{d:"M6 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function NSe({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-3",e),...t,children:b.jsx("path",{d:"M2 4h5l2 2h5v7H2V4z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})})}function RSe({className:e,...t}){return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-4",e),...t,children:[b.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.3"}),b.jsx("path",{d:"M6.5 5.5l4.5 2-2 4.5-4.5-2z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})]})}function mU({className:e,...t}){return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-3.5",e),...t,children:[b.jsx("rect",{x:"5",y:"5",width:"8",height:"8",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("path",{d:"M11 3H4a1 1 0 00-1 1v7",stroke:"currentColor",strokeWidth:"1.2"})]})}function KA({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-3.5",e),...t,children:b.jsx("path",{d:"M4 8.5l3 3 5-6",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function OSe({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-3",e),...t,children:b.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}function LSe({className:e,...t}){return b.jsxs("svg",{viewBox:"0 0 48 48",fill:"none",className:Ve("size-12",e),...t,children:[b.jsx("rect",{x:"6",y:"6",width:"36",height:"36",rx:"4",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M16 18h16M16 24h12M16 30h8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function Yi({className:e,...t}){return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-4 animate-spin",e),...t,children:[b.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.2"}),b.jsx("path",{d:"M14 8a6 6 0 00-6-6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function Vo({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-4",e),...t,children:b.jsx("path",{d:"M8 3.25v9.5M3.25 8h9.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function WA({className:e,...t}){return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-4",e),...t,children:[b.jsx("path",{d:"M3 11.75L11.6 3.15a1.2 1.2 0 011.7 0l.55.55a1.2 1.2 0 010 1.7L5.25 14H3v-2.25z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),b.jsx("path",{d:"M9.75 5l1.25 1.25",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function pU({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-4",e),...t,children:b.jsx("path",{d:"M3.5 4.5h9M6 2.75h4M5 4.5v7.25m3-7.25v7.25m3-7.25v7.25M4.5 4.5l.4 8.1c.03.52.46.9.98.9h4.24c.52 0 .95-.38.98-.9l.4-8.1",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})})}function gU({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-4",e),...t,children:b.jsx("path",{d:"M12.75 8H3.25M6.75 4.5L3.25 8l3.5 3.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function Du(e){return e.loadable.status==="loading"?b.jsx("div",{className:"flex h-full min-h-48 items-center justify-center",children:b.jsxs("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[b.jsx(Yi,{}),b.jsx("span",{children:e.loading??"Loading..."})]})}):e.loadable.status==="error"?b.jsx("div",{className:"flex h-full min-h-48 items-center justify-center",children:b.jsx("div",{className:"rounded-lg border border-destructive/25 bg-destructive/5 px-4 py-3 text-sm text-destructive",children:e.loadable.error.message})}):b.jsx(b.Fragment,{children:e.children(e.loadable.data)})}function wv(e){return b.jsx("div",{className:`flex h-full items-center justify-center ${e.className??""}`,children:b.jsxs("div",{className:"text-center",children:[b.jsx(LSe,{className:"mx-auto mb-3 text-muted-foreground/20"}),b.jsx("p",{className:"text-[13px] text-muted-foreground/60",children:e.title}),e.description&&b.jsx("p",{className:"mt-1 text-[11px] text-muted-foreground/40",children:e.description})]})})}function DSe(e,t){return e.endsWith(t)?e.length===t.length||e[e.length-t.length-1]===".":!1}function $Se(e,t){const n=e.length-t.length-2,r=e.lastIndexOf(".",n);return r===-1?e:e.slice(r+1)}function MSe(e,t,n){if(n.validHosts!==null){const s=n.validHosts;for(const i of s)if(DSe(t,i))return i}let r=0;if(t.startsWith("."))for(;r<t.length&&t[r]===".";)r+=1;return e.length===t.length-r?null:$Se(t,e)}function jSe(e,t){return e.slice(0,-t.length-1)}function bL(e,t){let n=0,r=e.length,s=!1;if(!t){if(e.startsWith("data:"))return null;for(;n<e.length&&e.charCodeAt(n)<=32;)n+=1;for(;r>n+1&&e.charCodeAt(r-1)<=32;)r-=1;if(e.charCodeAt(n)===47&&e.charCodeAt(n+1)===47)n+=2;else{const u=e.indexOf(":/",n);if(u!==-1){const l=u-n,d=e.charCodeAt(n),f=e.charCodeAt(n+1),h=e.charCodeAt(n+2),m=e.charCodeAt(n+3),y=e.charCodeAt(n+4);if(!(l===5&&d===104&&f===116&&h===116&&m===112&&y===115)){if(!(l===4&&d===104&&f===116&&h===116&&m===112)){if(!(l===3&&d===119&&f===115&&h===115)){if(!(l===2&&d===119&&f===115))for(let g=n;g<u;g+=1){const p=e.charCodeAt(g)|32;if(!(p>=97&&p<=122||p>=48&&p<=57||p===46||p===45||p===43))return null}}}}for(n=u+2;e.charCodeAt(n)===47;)n+=1}}let a=-1,o=-1,c=-1;for(let u=n;u<r;u+=1){const l=e.charCodeAt(u);if(l===35||l===47||l===63){r=u;break}else l===64?a=u:l===93?o=u:l===58?c=u:l>=65&&l<=90&&(s=!0)}if(a!==-1&&a>n&&a<r&&(n=a+1),e.charCodeAt(n)===91)return o!==-1?e.slice(n+1,o).toLowerCase():null;c!==-1&&c>n&&c<r&&(r=c)}for(;r>n+1&&e.charCodeAt(r-1)===46;)r-=1;const i=n!==0||r!==e.length?e.slice(n,r):e;return s?i.toLowerCase():i}function FSe(e){if(e.length<7||e.length>15)return!1;let t=0;for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n);if(r===46)t+=1;else if(r<48||r>57)return!1}return t===3&&e.charCodeAt(0)!==46&&e.charCodeAt(e.length-1)!==46}function BSe(e){if(e.length<3)return!1;let t=e.startsWith("[")?1:0,n=e.length;if(e[n-1]==="]"&&(n-=1),n-t>39)return!1;let r=!1;for(;t<n;t+=1){const s=e.charCodeAt(t);if(s===58)r=!0;else if(!(s>=48&&s<=57||s>=97&&s<=102||s>=65&&s<=90))return!1}return r}function zSe(e){return BSe(e)||FSe(e)}function yL(e){return e>=97&&e<=122||e>=48&&e<=57||e>127}function _L(e){if(e.length>255||e.length===0||!yL(e.charCodeAt(0))&&e.charCodeAt(0)!==46&&e.charCodeAt(0)!==95)return!1;let t=-1,n=-1;const r=e.length;for(let s=0;s<r;s+=1){const i=e.charCodeAt(s);if(i===46){if(s-t>64||n===46||n===45||n===95)return!1;t=s}else if(!(yL(i)||i===45||i===95))return!1;n=i}return r-t-1<=63&&n!==45}function bU({allowIcannDomains:e=!0,allowPrivateDomains:t=!1,detectIp:n=!0,extractHostname:r=!0,mixedInputs:s=!0,validHosts:i=null,validateHostname:a=!0}){return{allowIcannDomains:e,allowPrivateDomains:t,detectIp:n,extractHostname:r,mixedInputs:s,validHosts:i,validateHostname:a}}const USe=bU({});function VSe(e){return e===void 0?USe:bU(e)}function HSe(e,t){return t.length===e.length?"":e.slice(0,-t.length-1)}function yU(){return{domain:null,domainWithoutSuffix:null,hostname:null,isIcann:null,isIp:null,isPrivate:null,publicSuffix:null,subdomain:null}}function qSe(e){e.domain=null,e.domainWithoutSuffix=null,e.hostname=null,e.isIcann=null,e.isIp=null,e.isPrivate=null,e.publicSuffix=null,e.subdomain=null}function _U(e,t,n,r,s){const i=VSe(r);return typeof e!="string"||(i.extractHostname?i.mixedInputs?s.hostname=bL(e,_L(e)):s.hostname=bL(e,!1):s.hostname=e,i.detectIp&&s.hostname!==null&&(s.isIp=zSe(s.hostname),s.isIp))?s:i.validateHostname&&i.extractHostname&&s.hostname!==null&&!_L(s.hostname)?(s.hostname=null,s):(t===0||s.hostname===null||(n(s.hostname,i,s),t===2||s.publicSuffix===null)||(s.domain=MSe(s.publicSuffix,s.hostname,i),t===3||s.domain===null)||(s.subdomain=HSe(s.hostname,s.domain),t===4)||(s.domainWithoutSuffix=jSe(s.domain,s.publicSuffix)),s)}function GSe(e,t,n){if(!t.allowPrivateDomains&&e.length>3){const r=e.length-1,s=e.charCodeAt(r),i=e.charCodeAt(r-1),a=e.charCodeAt(r-2),o=e.charCodeAt(r-3);if(s===109&&i===111&&a===99&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="com",!0;if(s===103&&i===114&&a===111&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="org",!0;if(s===117&&i===100&&a===101&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="edu",!0;if(s===118&&i===111&&a===103&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="gov",!0;if(s===116&&i===101&&a===110&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="net",!0;if(s===101&&i===100&&a===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="de",!0}return!1}const KSe=(function(){const e=[1,{}],t=[0,{city:e}];return[0,{ck:[0,{www:e}],jp:[0,{kawasaki:t,kitakyushu:t,kobe:t,nagoya:t,sapporo:t,sendai:t,yokohama:t}]}]})(),WSe=(function(){const e=[1,{}],t=[2,{}],n=[1,{com:e,edu:e,gov:e,net:e,org:e}],r=[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e}],s=[0,{"*":t}],i=[2,{s}],a=[0,{relay:t}],o=[2,{id:t}],c=[1,{gov:e}],u=[0,{airflow:s,"lambda-url":t,"transfer-webapp":t}],l=[0,{airflow:s,"transfer-webapp":t}],d=[0,{"transfer-webapp":t}],f=[0,{"transfer-webapp":t,"transfer-webapp-fips":t}],h=[0,{notebook:t,studio:t}],m=[0,{labeling:t,notebook:t,studio:t}],y=[0,{notebook:t}],g=[0,{labeling:t,notebook:t,"notebook-fips":t,studio:t}],p=[0,{notebook:t,"notebook-fips":t,studio:t,"studio-fips":t}],_=[0,{shop:t}],k=[0,{"*":e}],v=[1,{co:t}],w=[0,{objects:t}],S=[2,{"eu-west-1":t,"us-east-1":t}],T=[2,{nodes:t}],I=[0,{my:t}],D=[0,{s3:t,"s3-accesspoint":t,"s3-website":t}],R=[0,{s3:t,"s3-accesspoint":t}],z=[0,{direct:t}],V=[0,{"webview-assets":t}],H=[0,{vfs:t,"webview-assets":t}],G=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:D,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t,"aws-cloud9":V,cloud9:H}],Q=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:R,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t,"aws-cloud9":V,cloud9:H}],ne=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:D,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t,"analytics-gateway":t,"aws-cloud9":V,cloud9:H}],me=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:D,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t}],ke=[0,{s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-fips":t,"s3-website":t}],et=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:ke,s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-fips":t,"s3-object-lambda":t,"s3-website":t,"aws-cloud9":V,cloud9:H}],C=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:ke,s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-fips":t,"s3-object-lambda":t,"s3-website":t}],M=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:ke,s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-deprecated":t,"s3-fips":t,"s3-object-lambda":t,"s3-website":t,"analytics-gateway":t,"aws-cloud9":V,cloud9:H}],K=[0,{auth:t}],A=[0,{auth:t,"auth-fips":t}],N=[0,{"auth-fips":t}],B=[0,{apps:t}],J=[0,{paas:t}],be=[2,{eu:t}],ge=[0,{app:t}],Ee=[0,{site:t}],Re=[1,{com:e,edu:e,net:e,org:e}],q=[0,{j:t}],W=[0,{dyn:t}],se=[2,{web:t}],le=[1,{co:e,com:e,edu:e,gov:e,net:e,org:e}],we=[0,{p:t}],Fe=[0,{user:t}],Ie=[1,{ms:t}],Me=[0,{cdn:t}],mt=[2,{raw:s}],it=[0,{cust:t,reservd:t}],At=[0,{cust:t}],zr=[0,{s3:t}],pn=[1,{biz:e,com:e,edu:e,gov:e,info:e,net:e,org:e}],Gs=[0,{ipfs:t}],rs=[1,{framer:t}],X=[0,{forgot:t}],ae=[0,{blob:t,file:t,web:t}],Ae=[0,{core:ae,servicebus:t}],xe=[1,{gs:e}],vt=[0,{nes:e}],Pe=[1,{k12:e,cc:e,lib:e}],Ci=[1,{cc:e}],Ur=[1,{cc:e,lib:e}];return[0,{ac:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,drr:t,feedback:t,forms:t}],ad:e,ae:[1,{ac:e,co:e,gov:e,mil:e,net:e,org:e,sch:e}],aero:[1,{airline:e,airport:e,"accident-investigation":e,"accident-prevention":e,aerobatic:e,aeroclub:e,aerodrome:e,agents:e,"air-surveillance":e,"air-traffic-control":e,aircraft:e,airtraffic:e,ambulance:e,association:e,author:e,ballooning:e,broker:e,caa:e,cargo:e,catering:e,certification:e,championship:e,charter:e,civilaviation:e,club:e,conference:e,consultant:e,consulting:e,control:e,council:e,crew:e,design:e,dgca:e,educator:e,emergency:e,engine:e,engineer:e,entertainment:e,equipment:e,exchange:e,express:e,federation:e,flight:e,freight:e,fuel:e,gliding:e,government:e,groundhandling:e,group:e,hanggliding:e,homebuilt:e,insurance:e,journal:e,journalist:e,leasing:e,logistics:e,magazine:e,maintenance:e,marketplace:e,media:e,microlight:e,modelling:e,navigation:e,parachuting:e,paragliding:e,"passenger-association":e,pilot:e,press:e,production:e,recreation:e,repbody:e,res:e,research:e,rotorcraft:e,safety:e,scientist:e,services:e,show:e,skydiving:e,software:e,student:e,taxi:e,trader:e,trading:e,trainer:e,union:e,workinggroup:e,works:e}],af:n,ag:[1,{co:e,com:e,net:e,nom:e,org:e,obj:t}],ai:[1,{com:e,net:e,off:e,org:e,uwu:t,framer:t,kiloapps:t}],al:r,am:[1,{co:e,com:e,commune:e,net:e,org:e,radio:t}],ao:[1,{co:e,ed:e,edu:e,gov:e,gv:e,it:e,og:e,org:e,pb:e}],aq:e,ar:[1,{bet:e,com:e,coop:e,edu:e,gob:e,gov:e,int:e,mil:e,musica:e,mutual:e,net:e,org:e,seg:e,senasa:e,tur:e}],arpa:[1,{e164:e,home:e,"in-addr":e,ip6:e,iris:e,uri:e,urn:e}],as:c,asia:[1,{cloudns:t,daemon:t,dix:t}],at:[1,{4:t,ac:[1,{sth:e}],co:e,gv:e,or:e,funkfeuer:[0,{wien:t}],futurecms:[0,{"*":t,ex:s,in:s}],futurehosting:t,futuremailing:t,ortsinfo:[0,{ex:s,kunden:s}],biz:t,info:t,"123webseite":t,priv:t,my:t,myspreadshop:t,"12hp":t,"2ix":t,"4lima":t,"lima-city":t}],au:[1,{asn:e,com:[1,{cloudlets:[0,{mel:t}],myspreadshop:t}],edu:[1,{act:e,catholic:e,nsw:e,nt:e,qld:e,sa:e,tas:e,vic:e,wa:e}],gov:[1,{qld:e,sa:e,tas:e,vic:e,wa:e}],id:e,net:e,org:e,conf:e,oz:e,act:e,nsw:e,nt:e,qld:e,sa:e,tas:e,vic:e,wa:e,hrsn:[0,{vps:t}]}],aw:[1,{com:e}],ax:e,az:[1,{biz:e,co:e,com:e,edu:e,gov:e,info:e,int:e,mil:e,name:e,net:e,org:e,pp:e,pro:e}],ba:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,brendly:_,rs:t}],bb:[1,{biz:e,co:e,com:e,edu:e,gov:e,info:e,net:e,org:e,store:e,tv:e}],bd:[1,{ac:e,ai:e,co:e,com:e,edu:e,gov:e,id:e,info:e,it:e,mil:e,net:e,org:e,sch:e,tv:e}],be:[1,{ac:e,cloudns:t,webhosting:t,interhostsolutions:[0,{cloud:t}],kuleuven:[0,{ezproxy:t}],my:t,"123website":t,myspreadshop:t,transurl:s}],bf:c,bg:[1,{0:e,1:e,2:e,3:e,4:e,5:e,6:e,7:e,8:e,9:e,a:e,b:e,c:e,d:e,e,f:e,g:e,h:e,i:e,j:e,k:e,l:e,m:e,n:e,o:e,p:e,q:e,r:e,s:e,t:e,u:e,v:e,w:e,x:e,y:e,z:e,barsy:t}],bh:n,bi:[1,{co:e,com:e,edu:e,or:e,org:e}],biz:[1,{activetrail:t,"cloud-ip":t,cloudns:t,jozi:t,dyndns:t,"for-better":t,"for-more":t,"for-some":t,"for-the":t,selfip:t,webhop:t,orx:t,mmafan:t,myftp:t,"no-ip":t,dscloud:t}],bj:[1,{africa:e,agro:e,architectes:e,assur:e,avocats:e,co:e,com:e,eco:e,econo:e,edu:e,info:e,loisirs:e,money:e,net:e,org:e,ote:e,restaurant:e,resto:e,tourism:e,univ:e}],bm:n,bn:[1,{com:e,edu:e,gov:e,net:e,org:e,co:t}],bo:[1,{com:e,edu:e,gob:e,int:e,mil:e,net:e,org:e,tv:e,web:e,academia:e,agro:e,arte:e,blog:e,bolivia:e,ciencia:e,cooperativa:e,democracia:e,deporte:e,ecologia:e,economia:e,empresa:e,indigena:e,industria:e,info:e,medicina:e,movimiento:e,musica:e,natural:e,nombre:e,noticias:e,patria:e,plurinacional:e,politica:e,profesional:e,pueblo:e,revista:e,salud:e,tecnologia:e,tksat:e,transporte:e,wiki:e}],br:[1,{"9guacu":e,abc:e,adm:e,adv:e,agr:e,aju:e,am:e,anani:e,aparecida:e,api:e,app:e,arq:e,art:e,ato:e,b:e,barueri:e,belem:e,bet:e,bhz:e,bib:e,bio:e,blog:e,bmd:e,boavista:e,bsb:e,campinagrande:e,campinas:e,caxias:e,cim:e,cng:e,cnt:e,com:[1,{simplesite:t}],contagem:e,coop:e,coz:e,cri:e,cuiaba:e,curitiba:e,def:e,des:e,det:e,dev:e,ecn:e,eco:e,edu:e,emp:e,enf:e,eng:e,esp:e,etc:e,eti:e,far:e,feira:e,flog:e,floripa:e,fm:e,fnd:e,fortal:e,fot:e,foz:e,fst:e,g12:e,geo:e,ggf:e,goiania:e,gov:[1,{ac:e,al:e,am:e,ap:e,ba:e,ce:e,df:e,es:e,go:e,ma:e,mg:e,ms:e,mt:e,pa:e,pb:e,pe:e,pi:e,pr:e,rj:e,rn:e,ro:e,rr:e,rs:e,sc:e,se:e,sp:e,to:e}],gru:e,ia:e,imb:e,ind:e,inf:e,jab:e,jampa:e,jdf:e,joinville:e,jor:e,jus:e,leg:[1,{ac:t,al:t,am:t,ap:t,ba:t,ce:t,df:t,es:t,go:t,ma:t,mg:t,ms:t,mt:t,pa:t,pb:t,pe:t,pi:t,pr:t,rj:t,rn:t,ro:t,rr:t,rs:t,sc:t,se:t,sp:t,to:t}],leilao:e,lel:e,log:e,londrina:e,macapa:e,maceio:e,manaus:e,maringa:e,mat:e,med:e,mil:e,morena:e,mp:e,mus:e,natal:e,net:e,niteroi:e,nom:k,not:e,ntr:e,odo:e,ong:e,org:e,osasco:e,palmas:e,poa:e,ppg:e,pro:e,psc:e,psi:e,pvh:e,qsl:e,radio:e,rec:e,recife:e,rep:e,ribeirao:e,rio:e,riobranco:e,riopreto:e,salvador:e,sampa:e,santamaria:e,santoandre:e,saobernardo:e,saogonca:e,seg:e,sjc:e,slg:e,slz:e,social:e,sorocaba:e,srv:e,taxi:e,tc:e,tec:e,teo:e,the:e,tmp:e,trd:e,tur:e,tv:e,udi:e,vet:e,vix:e,vlog:e,wiki:e,xyz:e,zlg:e,tche:t}],bs:[1,{com:e,edu:e,gov:e,net:e,org:e,we:t}],bt:n,bv:e,bw:[1,{ac:e,co:e,gov:e,net:e,org:e}],by:[1,{gov:e,mil:e,com:e,of:e,mediatech:t}],bz:[1,{co:e,com:e,edu:e,gov:e,net:e,org:e,za:t,mydns:t,gsj:t}],ca:[1,{ab:e,bc:e,mb:e,nb:e,nf:e,nl:e,ns:e,nt:e,nu:e,on:e,pe:e,qc:e,sk:e,yk:e,gc:e,barsy:t,awdev:s,co:t,"no-ip":t,onid:t,myspreadshop:t,box:t}],cat:e,cc:[1,{cleverapps:t,"cloud-ip":t,cloudns:t,ccwu:t,ftpaccess:t,"game-server":t,myphotos:t,scrapping:t,twmail:t,csx:t,fantasyleague:t,spawn:[0,{instances:t}],ec:t,eu:t,gu:t,uk:t,us:t}],cd:[1,{gov:e,cc:t}],cf:e,cg:e,ch:[1,{square7:t,cloudns:t,cloudscale:[0,{cust:t,lpg:w,rma:w}],objectstorage:[0,{lpg:t,rma:t}],flow:[0,{ae:[0,{alp1:t}],appengine:t}],"linkyard-cloud":t,gotdns:t,dnsking:t,"123website":t,myspreadshop:t,firenet:[0,{"*":t,svc:s}],"12hp":t,"2ix":t,"4lima":t,"lima-city":t}],ci:[1,{ac:e,"xn--aroport-bya":e,aéroport:e,asso:e,co:e,com:e,ed:e,edu:e,go:e,gouv:e,int:e,net:e,or:e,org:e,us:t}],ck:k,cl:[1,{co:e,gob:e,gov:e,mil:e,cloudns:t}],cm:[1,{co:e,com:e,gov:e,net:e}],cn:[1,{ac:e,com:[1,{amazonaws:[0,{"cn-north-1":[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,rds:s,dualstack:D,s3:t,"s3-accesspoint":t,"s3-deprecated":t,"s3-object-lambda":t,"s3-website":t}],"cn-northwest-1":[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,rds:s,dualstack:R,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t}],compute:s,airflow:[0,{"cn-north-1":s,"cn-northwest-1":s}],eb:[0,{"cn-north-1":t,"cn-northwest-1":t}],elb:s}],amazonwebservices:[0,{on:[0,{"cn-north-1":l,"cn-northwest-1":l}]}],sagemaker:[0,{"cn-north-1":h,"cn-northwest-1":h}]}],edu:e,gov:e,mil:e,net:e,org:e,"xn--55qx5d":e,公司:e,"xn--od0alg":e,網絡:e,"xn--io0a7i":e,网络:e,ah:e,bj:e,cq:e,fj:e,gd:e,gs:e,gx:e,gz:e,ha:e,hb:e,he:e,hi:e,hk:e,hl:e,hn:e,jl:e,js:e,jx:e,ln:e,mo:e,nm:e,nx:e,qh:e,sc:e,sd:e,sh:[1,{as:t}],sn:e,sx:e,tj:e,tw:e,xj:e,xz:e,yn:e,zj:e,"canva-apps":t,canvasite:I,myqnapcloud:t,quickconnect:z}],co:[1,{com:e,edu:e,gov:e,mil:e,net:e,nom:e,org:e,carrd:t,crd:t,otap:s,hidns:t,leadpages:t,lpages:t,mypi:t,xmit:s,rdpa:[0,{clusters:s,srvrless:s}],firewalledreplit:o,repl:o,supabase:[2,{realtime:t,storage:t}],umso:t}],com:[1,{a2hosted:t,cpserver:t,adobeaemcloud:[2,{dev:s}],africa:t,auiusercontent:s,aivencloud:t,alibabacloudcs:t,kasserver:t,amazonaws:[0,{"af-south-1":G,"ap-east-1":Q,"ap-northeast-1":ne,"ap-northeast-2":ne,"ap-northeast-3":G,"ap-south-1":ne,"ap-south-2":me,"ap-southeast-1":ne,"ap-southeast-2":ne,"ap-southeast-3":me,"ap-southeast-4":me,"ap-southeast-5":[0,{"execute-api":t,dualstack:D,s3:t,"s3-accesspoint":t,"s3-deprecated":t,"s3-object-lambda":t,"s3-website":t}],"ca-central-1":et,"ca-west-1":C,"eu-central-1":ne,"eu-central-2":me,"eu-north-1":Q,"eu-south-1":G,"eu-south-2":me,"eu-west-1":[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:D,s3:t,"s3-accesspoint":t,"s3-deprecated":t,"s3-object-lambda":t,"s3-website":t,"analytics-gateway":t,"aws-cloud9":V,cloud9:H}],"eu-west-2":Q,"eu-west-3":G,"il-central-1":[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:D,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t,"aws-cloud9":V,cloud9:[0,{vfs:t}]}],"me-central-1":me,"me-south-1":Q,"sa-east-1":G,"us-east-1":[2,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:ke,s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-deprecated":t,"s3-fips":t,"s3-object-lambda":t,"s3-website":t,"analytics-gateway":t,"aws-cloud9":V,cloud9:H}],"us-east-2":M,"us-gov-east-1":C,"us-gov-west-1":C,"us-west-1":et,"us-west-2":M,compute:s,"compute-1":s,airflow:[0,{"af-south-1":s,"ap-east-1":s,"ap-northeast-1":s,"ap-northeast-2":s,"ap-northeast-3":s,"ap-south-1":s,"ap-south-2":s,"ap-southeast-1":s,"ap-southeast-2":s,"ap-southeast-3":s,"ap-southeast-4":s,"ap-southeast-5":s,"ap-southeast-7":s,"ca-central-1":s,"ca-west-1":s,"eu-central-1":s,"eu-central-2":s,"eu-north-1":s,"eu-south-1":s,"eu-south-2":s,"eu-west-1":s,"eu-west-2":s,"eu-west-3":s,"il-central-1":s,"me-central-1":s,"me-south-1":s,"sa-east-1":s,"us-east-1":s,"us-east-2":s,"us-west-1":s,"us-west-2":s}],rds:[0,{"af-south-1":s,"ap-east-1":s,"ap-east-2":s,"ap-northeast-1":s,"ap-northeast-2":s,"ap-northeast-3":s,"ap-south-1":s,"ap-south-2":s,"ap-southeast-1":s,"ap-southeast-2":s,"ap-southeast-3":s,"ap-southeast-4":s,"ap-southeast-5":s,"ap-southeast-6":s,"ap-southeast-7":s,"ca-central-1":s,"ca-west-1":s,"eu-central-1":s,"eu-central-2":s,"eu-west-1":s,"eu-west-2":s,"eu-west-3":s,"il-central-1":s,"me-central-1":s,"me-south-1":s,"mx-central-1":s,"sa-east-1":s,"us-east-1":s,"us-east-2":s,"us-gov-east-1":s,"us-gov-west-1":s,"us-northeast-1":s,"us-west-1":s,"us-west-2":s}],s3:t,"s3-1":t,"s3-ap-east-1":t,"s3-ap-northeast-1":t,"s3-ap-northeast-2":t,"s3-ap-northeast-3":t,"s3-ap-south-1":t,"s3-ap-southeast-1":t,"s3-ap-southeast-2":t,"s3-ca-central-1":t,"s3-eu-central-1":t,"s3-eu-north-1":t,"s3-eu-west-1":t,"s3-eu-west-2":t,"s3-eu-west-3":t,"s3-external-1":t,"s3-fips-us-gov-east-1":t,"s3-fips-us-gov-west-1":t,"s3-global":[0,{accesspoint:[0,{mrap:t}]}],"s3-me-south-1":t,"s3-sa-east-1":t,"s3-us-east-2":t,"s3-us-gov-east-1":t,"s3-us-gov-west-1":t,"s3-us-west-1":t,"s3-us-west-2":t,"s3-website-ap-northeast-1":t,"s3-website-ap-southeast-1":t,"s3-website-ap-southeast-2":t,"s3-website-eu-west-1":t,"s3-website-sa-east-1":t,"s3-website-us-east-1":t,"s3-website-us-gov-west-1":t,"s3-website-us-west-1":t,"s3-website-us-west-2":t,elb:s}],amazoncognito:[0,{"af-south-1":K,"ap-east-1":K,"ap-northeast-1":K,"ap-northeast-2":K,"ap-northeast-3":K,"ap-south-1":K,"ap-south-2":K,"ap-southeast-1":K,"ap-southeast-2":K,"ap-southeast-3":K,"ap-southeast-4":K,"ap-southeast-5":K,"ap-southeast-7":K,"ca-central-1":K,"ca-west-1":K,"eu-central-1":K,"eu-central-2":K,"eu-north-1":K,"eu-south-1":K,"eu-south-2":K,"eu-west-1":K,"eu-west-2":K,"eu-west-3":K,"il-central-1":K,"me-central-1":K,"me-south-1":K,"mx-central-1":K,"sa-east-1":K,"us-east-1":A,"us-east-2":A,"us-gov-east-1":N,"us-gov-west-1":N,"us-west-1":A,"us-west-2":A}],amplifyapp:t,awsapprunner:s,awsapps:t,elasticbeanstalk:[2,{"af-south-1":t,"ap-east-1":t,"ap-northeast-1":t,"ap-northeast-2":t,"ap-northeast-3":t,"ap-south-1":t,"ap-southeast-1":t,"ap-southeast-2":t,"ap-southeast-3":t,"ap-southeast-5":t,"ap-southeast-7":t,"ca-central-1":t,"eu-central-1":t,"eu-north-1":t,"eu-south-1":t,"eu-south-2":t,"eu-west-1":t,"eu-west-2":t,"eu-west-3":t,"il-central-1":t,"me-central-1":t,"me-south-1":t,"sa-east-1":t,"us-east-1":t,"us-east-2":t,"us-gov-east-1":t,"us-gov-west-1":t,"us-west-1":t,"us-west-2":t}],awsglobalaccelerator:t,siiites:t,appspacehosted:t,appspaceusercontent:t,"on-aptible":t,myasustor:t,"balena-devices":t,boutir:t,bplaced:t,cafjs:t,"canva-apps":t,"canva-hosted-embed":t,canvacode:t,"rice-labs":t,"cdn77-storage":t,br:t,cn:t,de:t,eu:t,jpn:t,mex:t,ru:t,sa:t,uk:t,us:t,za:t,"clever-cloud":[0,{services:s}],abrdns:t,dnsabr:t,"ip-ddns":t,jdevcloud:t,wpdevcloud:t,"cf-ipfs":t,"cloudflare-ipfs":t,trycloudflare:t,co:t,devinapps:s,builtwithdark:t,datadetect:[0,{demo:t,instance:t}],dattolocal:t,dattorelay:t,dattoweb:t,mydatto:t,digitaloceanspaces:s,discordsays:t,discordsez:t,drayddns:t,dreamhosters:t,durumis:t,blogdns:t,cechire:t,dnsalias:t,dnsdojo:t,doesntexist:t,dontexist:t,doomdns:t,"dyn-o-saur":t,dynalias:t,"dyndns-at-home":t,"dyndns-at-work":t,"dyndns-blog":t,"dyndns-free":t,"dyndns-home":t,"dyndns-ip":t,"dyndns-mail":t,"dyndns-office":t,"dyndns-pics":t,"dyndns-remote":t,"dyndns-server":t,"dyndns-web":t,"dyndns-wiki":t,"dyndns-work":t,"est-a-la-maison":t,"est-a-la-masion":t,"est-le-patron":t,"est-mon-blogueur":t,"from-ak":t,"from-al":t,"from-ar":t,"from-ca":t,"from-ct":t,"from-dc":t,"from-de":t,"from-fl":t,"from-ga":t,"from-hi":t,"from-ia":t,"from-id":t,"from-il":t,"from-in":t,"from-ks":t,"from-ky":t,"from-ma":t,"from-md":t,"from-mi":t,"from-mn":t,"from-mo":t,"from-ms":t,"from-mt":t,"from-nc":t,"from-nd":t,"from-ne":t,"from-nh":t,"from-nj":t,"from-nm":t,"from-nv":t,"from-oh":t,"from-ok":t,"from-or":t,"from-pa":t,"from-pr":t,"from-ri":t,"from-sc":t,"from-sd":t,"from-tn":t,"from-tx":t,"from-ut":t,"from-va":t,"from-vt":t,"from-wa":t,"from-wi":t,"from-wv":t,"from-wy":t,getmyip:t,gotdns:t,"hobby-site":t,homelinux:t,homeunix:t,iamallama:t,"is-a-anarchist":t,"is-a-blogger":t,"is-a-bookkeeper":t,"is-a-bulls-fan":t,"is-a-caterer":t,"is-a-chef":t,"is-a-conservative":t,"is-a-cpa":t,"is-a-cubicle-slave":t,"is-a-democrat":t,"is-a-designer":t,"is-a-doctor":t,"is-a-financialadvisor":t,"is-a-geek":t,"is-a-green":t,"is-a-guru":t,"is-a-hard-worker":t,"is-a-hunter":t,"is-a-landscaper":t,"is-a-lawyer":t,"is-a-liberal":t,"is-a-libertarian":t,"is-a-llama":t,"is-a-musician":t,"is-a-nascarfan":t,"is-a-nurse":t,"is-a-painter":t,"is-a-personaltrainer":t,"is-a-photographer":t,"is-a-player":t,"is-a-republican":t,"is-a-rockstar":t,"is-a-socialist":t,"is-a-student":t,"is-a-teacher":t,"is-a-techie":t,"is-a-therapist":t,"is-an-accountant":t,"is-an-actor":t,"is-an-actress":t,"is-an-anarchist":t,"is-an-artist":t,"is-an-engineer":t,"is-an-entertainer":t,"is-certified":t,"is-gone":t,"is-into-anime":t,"is-into-cars":t,"is-into-cartoons":t,"is-into-games":t,"is-leet":t,"is-not-certified":t,"is-slick":t,"is-uberleet":t,"is-with-theband":t,"isa-geek":t,"isa-hockeynut":t,issmarterthanyou:t,"likes-pie":t,likescandy:t,"neat-url":t,"saves-the-whales":t,selfip:t,"sells-for-less":t,"sells-for-u":t,servebbs:t,"simple-url":t,"space-to-rent":t,"teaches-yoga":t,writesthisblog:t,"1cooldns":t,bumbleshrimp:t,ddnsfree:t,ddnsgeek:t,ddnsguru:t,dynuddns:t,dynuhosting:t,giize:t,gleeze:t,kozow:t,loseyourip:t,ooguy:t,pivohosting:t,theworkpc:t,wiredbladehosting:t,emergentagent:[0,{preview:t}],mytuleap:t,"tuleap-partners":t,encoreapi:t,evennode:[0,{"eu-1":t,"eu-2":t,"eu-3":t,"eu-4":t,"us-1":t,"us-2":t,"us-3":t,"us-4":t}],onfabrica:t,"fastly-edge":t,"fastly-terrarium":t,"fastvps-server":t,mydobiss:t,firebaseapp:t,fldrv:t,framercanvas:t,"freebox-os":t,freeboxos:t,freemyip:t,aliases121:t,gentapps:t,gentlentapis:t,githubusercontent:t,"0emm":s,appspot:[2,{r:s}],blogspot:t,codespot:t,googleapis:t,googlecode:t,pagespeedmobilizer:t,withgoogle:t,withyoutube:t,grayjayleagues:t,hatenablog:t,hatenadiary:t,"hercules-app":t,"hercules-dev":t,herokuapp:t,gr:t,smushcdn:t,wphostedmail:t,wpmucdn:t,pixolino:t,"apps-1and1":t,"live-website":t,"webspace-host":t,dopaas:t,"hosted-by-previder":J,hosteur:[0,{"rag-cloud":t,"rag-cloud-ch":t}],"ik-server":[0,{jcloud:t,"jcloud-ver-jpc":t}],jelastic:[0,{demo:t}],massivegrid:J,wafaicloud:[0,{jed:t,ryd:t}],"eu1-plenit":t,"la1-plenit":t,"us1-plenit":t,webadorsite:t,"on-forge":t,"on-vapor":t,lpusercontent:t,linode:[0,{members:t,nodebalancer:s}],linodeobjects:s,linodeusercontent:[0,{ip:t}],localtonet:t,lovableproject:t,barsycenter:t,barsyonline:t,lutrausercontent:s,magicpatternsapp:t,modelscape:t,mwcloudnonprod:t,polyspace:t,mazeplay:t,miniserver:t,atmeta:t,fbsbx:B,meteorapp:be,routingthecloud:t,"same-app":t,"same-preview":t,mydbserver:t,mochausercontent:t,hostedpi:t,"mythic-beasts":[0,{caracal:t,customer:t,fentiger:t,lynx:t,ocelot:t,oncilla:t,onza:t,sphinx:t,vs:t,x:t,yali:t}],nospamproxy:[0,{cloud:[2,{o365:t}]}],"4u":t,nfshost:t,"3utilities":t,blogsyte:t,ciscofreak:t,damnserver:t,ddnsking:t,ditchyourip:t,dnsiskinky:t,dynns:t,geekgalaxy:t,"health-carereform":t,homesecuritymac:t,homesecuritypc:t,myactivedirectory:t,mysecuritycamera:t,myvnc:t,"net-freaks":t,onthewifi:t,point2this:t,quicksytes:t,securitytactics:t,servebeer:t,servecounterstrike:t,serveexchange:t,serveftp:t,servegame:t,servehalflife:t,servehttp:t,servehumour:t,serveirc:t,servemp3:t,servep2p:t,servepics:t,servequake:t,servesarcasm:t,stufftoread:t,unusualperson:t,workisboring:t,myiphost:t,observableusercontent:[0,{static:t}],simplesite:t,oaiusercontent:s,orsites:t,operaunite:t,"customer-oci":[0,{"*":t,oci:s,ocp:s,ocs:s}],oraclecloudapps:s,oraclegovcloudapps:s,"authgear-staging":t,authgearapps:t,outsystemscloud:t,ownprovider:t,pgfog:t,pagexl:t,gotpantheon:t,paywhirl:s,forgeblocks:t,upsunapp:t,"postman-echo":t,prgmr:[0,{xen:t}],"project-study":[0,{dev:t}],pythonanywhere:be,qa2:t,"alpha-myqnapcloud":t,"dev-myqnapcloud":t,mycloudnas:t,mynascloud:t,myqnapcloud:t,qualifioapp:t,ladesk:t,qualyhqpartner:s,qualyhqportal:s,qbuser:t,quipelements:s,rackmaze:t,"readthedocs-hosted":t,rhcloud:t,onrender:t,render:ge,"subsc-pay":t,"180r":t,dojin:t,sakuratan:t,sakuraweb:t,x0:t,code:[0,{builder:s,"dev-builder":s,"stg-builder":s}],salesforce:[0,{platform:[0,{"code-builder-stg":[0,{test:[0,{"001":s}]}]}]}],logoip:t,scrysec:t,"firewall-gateway":t,myshopblocks:t,myshopify:t,shopitsite:t,"1kapp":t,appchizi:t,applinzi:t,sinaapp:t,vipsinaapp:t,streamlitapp:t,"try-snowplow":t,"playstation-cloud":t,myspreadshop:t,"w-corp-staticblitz":t,"w-credentialless-staticblitz":t,"w-staticblitz":t,"stackhero-network":t,stdlib:[0,{api:t}],strapiapp:[2,{media:t}],"streak-link":t,streaklinks:t,streakusercontent:t,"temp-dns":t,dsmynas:t,familyds:t,mytabit:t,taveusercontent:t,"tb-hosting":Ee,reservd:t,thingdustdata:t,"townnews-staging":t,typeform:[0,{pro:t}],hk:t,it:t,"deus-canvas":t,vultrobjects:s,wafflecell:t,hotelwithflight:t,"reserve-online":t,cprapid:t,pleskns:t,remotewd:t,wiardweb:[0,{pages:t}],"drive-platform":t,"base44-sandbox":t,wixsite:t,wixstudio:t,messwithdns:t,"woltlab-demo":t,wpenginepowered:[2,{js:t}],xnbay:[2,{u2:t,"u2-local":t}],xtooldevice:t,yolasite:t}],coop:e,cr:[1,{ac:e,co:e,ed:e,fi:e,go:e,or:e,sa:e}],cu:[1,{com:e,edu:e,gob:e,inf:e,nat:e,net:e,org:e}],cv:[1,{com:e,edu:e,id:e,int:e,net:e,nome:e,org:e,publ:e}],cw:Re,cx:[1,{gov:e,cloudns:t,ath:t,info:t,assessments:t,calculators:t,funnels:t,paynow:t,quizzes:t,researched:t,tests:t}],cy:[1,{ac:e,biz:e,com:[1,{scaleforce:q}],ekloges:e,gov:e,ltd:e,mil:e,net:e,org:e,press:e,pro:e,tm:e}],cz:[1,{gov:e,contentproxy9:[0,{rsc:t}],realm:t,e4:t,co:t,metacentrum:[0,{cloud:s,custom:t}],muni:[0,{cloud:[0,{flt:t,usr:t}]}]}],de:[1,{bplaced:t,square7:t,"bwcloud-os-instance":s,com:t,cosidns:W,dnsupdater:t,"dynamisches-dns":t,"internet-dns":t,"l-o-g-i-n":t,ddnss:[2,{dyn:t,dyndns:t}],"dyn-ip24":t,dyndns1:t,"home-webserver":[2,{dyn:t}],"myhome-server":t,dnshome:t,fuettertdasnetz:t,isteingeek:t,istmein:t,lebtimnetz:t,leitungsen:t,traeumtgerade:t,frusky:s,goip:t,"xn--gnstigbestellen-zvb":t,günstigbestellen:t,"xn--gnstigliefern-wob":t,günstigliefern:t,"hs-heilbronn":[0,{it:[0,{pages:t,"pages-research":t}]}],"dyn-berlin":t,"in-berlin":t,"in-brb":t,"in-butter":t,"in-dsl":t,"in-vpn":t,iservschule:t,"mein-iserv":t,schuldock:t,schulplattform:t,schulserver:t,"test-iserv":t,keymachine:t,co:t,"git-repos":t,"lcube-server":t,"svn-repos":t,barsy:t,webspaceconfig:t,"123webseite":t,rub:t,"ruhr-uni-bochum":[2,{noc:[0,{io:t}]}],logoip:t,"firewall-gateway":t,"my-gateway":t,"my-router":t,spdns:t,my:t,speedpartner:[0,{customer:t}],myspreadshop:t,"taifun-dns":t,"12hp":t,"2ix":t,"4lima":t,"lima-city":t,"virtual-user":t,virtualuser:t,"community-pro":t,diskussionsbereich:t,xenonconnect:s}],dj:e,dk:[1,{biz:t,co:t,firm:t,reg:t,store:t,"123hjemmeside":t,myspreadshop:t}],dm:le,do:[1,{art:e,com:e,edu:e,gob:e,gov:e,mil:e,net:e,org:e,sld:e,web:e}],dz:[1,{art:e,asso:e,com:e,edu:e,gov:e,net:e,org:e,pol:e,soc:e,tm:e}],ec:[1,{abg:e,adm:e,agron:e,arqt:e,art:e,bar:e,chef:e,com:e,cont:e,cpa:e,cue:e,dent:e,dgn:e,disco:e,doc:e,edu:e,eng:e,esm:e,fin:e,fot:e,gal:e,gob:e,gov:e,gye:e,ibr:e,info:e,k12:e,lat:e,loj:e,med:e,mil:e,mktg:e,mon:e,net:e,ntr:e,odont:e,org:e,pro:e,prof:e,psic:e,psiq:e,pub:e,rio:e,rrpp:e,sal:e,tech:e,tul:e,tur:e,uio:e,vet:e,xxx:e,base:t,official:t}],edu:[1,{rit:[0,{"git-pages":t}]}],ee:[1,{aip:e,com:e,edu:e,fie:e,gov:e,lib:e,med:e,org:e,pri:e,riik:e}],eg:[1,{ac:e,com:e,edu:e,eun:e,gov:e,info:e,me:e,mil:e,name:e,net:e,org:e,sci:e,sport:e,tv:e}],er:k,es:[1,{com:e,edu:e,gob:e,nom:e,org:e,"123miweb":t,myspreadshop:t}],et:[1,{biz:e,com:e,edu:e,gov:e,info:e,name:e,net:e,org:e}],eu:[1,{amazonwebservices:[0,{on:[0,{"eusc-de-east-1":[0,{"cognito-idp":K}]}]}],cloudns:t,prvw:t,deuxfleurs:t,dogado:[0,{jelastic:t}],barsy:t,spdns:t,nxa:s,directwp:t,transurl:s}],fi:[1,{aland:e,dy:t,"xn--hkkinen-5wa":t,häkkinen:t,iki:t,cloudplatform:[0,{fi:t}],datacenter:[0,{demo:t,paas:t}],kapsi:t,"123kotisivu":t,myspreadshop:t}],fj:[1,{ac:e,biz:e,com:e,edu:e,gov:e,id:e,info:e,mil:e,name:e,net:e,org:e,pro:e}],fk:k,fm:[1,{com:e,edu:e,net:e,org:e,radio:t,user:s}],fo:e,fr:[1,{asso:e,com:e,gouv:e,nom:e,prd:e,tm:e,avoues:e,cci:e,greta:e,"huissier-justice":e,"fbx-os":t,fbxos:t,"freebox-os":t,freeboxos:t,goupile:t,kdns:t,"123siteweb":t,"on-web":t,"chirurgiens-dentistes-en-france":t,dedibox:t,aeroport:t,avocat:t,chambagri:t,"chirurgiens-dentistes":t,"experts-comptables":t,medecin:t,notaires:t,pharmacien:t,port:t,veterinaire:t,myspreadshop:t,ynh:t}],ga:e,gb:e,gd:[1,{edu:e,gov:e}],ge:[1,{com:e,edu:e,gov:e,net:e,org:e,pvt:e,school:e}],gf:e,gg:[1,{co:e,net:e,org:e,ply:[0,{at:s,d6:t}],botdash:t,kaas:t,stackit:t,panel:[2,{daemon:t}]}],gh:[1,{biz:e,com:e,edu:e,gov:e,mil:e,net:e,org:e}],gi:[1,{com:e,edu:e,gov:e,ltd:e,mod:e,org:e}],gl:[1,{co:e,com:e,edu:e,net:e,org:e}],gm:e,gn:[1,{ac:e,com:e,edu:e,gov:e,net:e,org:e}],gov:e,gp:[1,{asso:e,com:e,edu:e,mobi:e,net:e,org:e}],gq:e,gr:[1,{com:e,edu:e,gov:e,net:e,org:e,barsy:t,simplesite:t}],gs:e,gt:[1,{com:e,edu:e,gob:e,ind:e,mil:e,net:e,org:e}],gu:[1,{com:e,edu:e,gov:e,guam:e,info:e,net:e,org:e,web:e}],gw:[1,{nx:t}],gy:le,hk:[1,{com:e,edu:e,gov:e,idv:e,net:e,org:e,"xn--ciqpn":e,个人:e,"xn--gmqw5a":e,個人:e,"xn--55qx5d":e,公司:e,"xn--mxtq1m":e,政府:e,"xn--lcvr32d":e,敎育:e,"xn--wcvs22d":e,教育:e,"xn--gmq050i":e,箇人:e,"xn--uc0atv":e,組織:e,"xn--uc0ay4a":e,組织:e,"xn--od0alg":e,網絡:e,"xn--zf0avx":e,網络:e,"xn--mk0axi":e,组織:e,"xn--tn0ag":e,组织:e,"xn--od0aq3b":e,网絡:e,"xn--io0a7i":e,网络:e,inc:t,ltd:t}],hm:e,hn:[1,{com:e,edu:e,gob:e,mil:e,net:e,org:e}],hr:[1,{com:e,from:e,iz:e,name:e,brendly:_}],ht:[1,{adult:e,art:e,asso:e,com:e,coop:e,edu:e,firm:e,gouv:e,info:e,med:e,net:e,org:e,perso:e,pol:e,pro:e,rel:e,shop:e,rt:t}],hu:[1,{2e3:e,agrar:e,bolt:e,casino:e,city:e,co:e,erotica:e,erotika:e,film:e,forum:e,games:e,hotel:e,info:e,ingatlan:e,jogasz:e,konyvelo:e,lakas:e,media:e,news:e,org:e,priv:e,reklam:e,sex:e,shop:e,sport:e,suli:e,szex:e,tm:e,tozsde:e,utazas:e,video:e}],id:[1,{ac:e,biz:e,co:e,desa:e,go:e,kop:e,mil:e,my:e,net:e,or:e,ponpes:e,sch:e,web:e,"xn--9tfky":e,"ᬩᬮᬶ":e,e:t,zone:t}],ie:[1,{gov:e,myspreadshop:t}],il:[1,{ac:e,co:[1,{ravpage:t,mytabit:t,tabitorder:t}],gov:e,idf:e,k12:e,muni:e,net:e,org:e}],"xn--4dbrk0ce":[1,{"xn--4dbgdty6c":e,"xn--5dbhl8d":e,"xn--8dbq2a":e,"xn--hebda8b":e}],ישראל:[1,{אקדמיה:e,ישוב:e,צהל:e,ממשל:e}],im:[1,{ac:e,co:[1,{ltd:e,plc:e}],com:e,net:e,org:e,tt:e,tv:e}],in:[1,{"5g":e,"6g":e,ac:e,ai:e,am:e,bank:e,bihar:e,biz:e,business:e,ca:e,cn:e,co:e,com:e,coop:e,cs:e,delhi:e,dr:e,edu:e,er:e,fin:e,firm:e,gen:e,gov:e,gujarat:e,ind:e,info:e,int:e,internet:e,io:e,me:e,mil:e,net:e,nic:e,org:e,pg:e,post:e,pro:e,res:e,travel:e,tv:e,uk:e,up:e,us:e,cloudns:t,barsy:t,web:t,indevs:t,supabase:t}],info:[1,{cloudns:t,"dynamic-dns":t,"barrel-of-knowledge":t,"barrell-of-knowledge":t,dyndns:t,"for-our":t,"groks-the":t,"groks-this":t,"here-for-more":t,knowsitall:t,selfip:t,webhop:t,barsy:t,mayfirst:t,mittwald:t,mittwaldserver:t,typo3server:t,dvrcam:t,ilovecollege:t,"no-ip":t,forumz:t,nsupdate:t,dnsupdate:t,"v-info":t}],int:[1,{eu:e}],io:[1,{2038:t,co:e,com:e,edu:e,gov:e,mil:e,net:e,nom:e,org:e,"on-acorn":s,myaddr:t,apigee:t,"b-data":t,beagleboard:t,bitbucket:t,bluebite:t,boxfuse:t,brave:i,browsersafetymark:t,bubble:Me,bubbleapps:t,bigv:[0,{uk0:t}],cleverapps:t,cloudbeesusercontent:t,dappnode:[0,{dyndns:t}],darklang:t,definima:t,dedyn:t,icp0:mt,icp1:mt,qzz:t,"fh-muenster":t,gitbook:t,github:t,gitlab:t,lolipop:t,"hasura-app":t,hostyhosting:t,hypernode:t,moonscale:s,beebyte:J,beebyteapp:[0,{sekd1:t}],jele:t,keenetic:t,kiloapps:t,webthings:t,loginline:t,barsy:t,azurecontainer:s,ngrok:[2,{ap:t,au:t,eu:t,in:t,jp:t,sa:t,us:t}],nodeart:[0,{stage:t}],pantheonsite:t,forgerock:[0,{id:t}],pstmn:[2,{mock:t}],protonet:t,qcx:[2,{sys:s}],qoto:t,vaporcloud:t,myrdbx:t,"rb-hosting":Ee,"on-k3s":s,"on-rio":s,readthedocs:t,resindevice:t,resinstaging:[0,{devices:t}],hzc:t,sandcats:t,scrypted:[0,{client:t}],"mo-siemens":t,lair:B,stolos:s,musician:t,utwente:t,edugit:t,telebit:t,thingdust:[0,{dev:it,disrec:it,prod:At,testing:it}],tickets:t,webflow:t,webflowtest:t,"drive-platform":t,editorx:t,wixstudio:t,basicserver:t,virtualserver:t}],iq:r,ir:[1,{ac:e,co:e,gov:e,id:e,net:e,org:e,sch:e,"xn--mgba3a4f16a":e,ایران:e,"xn--mgba3a4fra":e,ايران:e,arvanedge:t,vistablog:t}],is:e,it:[1,{edu:e,gov:e,abr:e,abruzzo:e,"aosta-valley":e,aostavalley:e,bas:e,basilicata:e,cal:e,calabria:e,cam:e,campania:e,"emilia-romagna":e,emiliaromagna:e,emr:e,"friuli-v-giulia":e,"friuli-ve-giulia":e,"friuli-vegiulia":e,"friuli-venezia-giulia":e,"friuli-veneziagiulia":e,"friuli-vgiulia":e,"friuliv-giulia":e,"friulive-giulia":e,friulivegiulia:e,"friulivenezia-giulia":e,friuliveneziagiulia:e,friulivgiulia:e,fvg:e,laz:e,lazio:e,lig:e,liguria:e,lom:e,lombardia:e,lombardy:e,lucania:e,mar:e,marche:e,mol:e,molise:e,piedmont:e,piemonte:e,pmn:e,pug:e,puglia:e,sar:e,sardegna:e,sardinia:e,sic:e,sicilia:e,sicily:e,taa:e,tos:e,toscana:e,"trentin-sud-tirol":e,"xn--trentin-sd-tirol-rzb":e,"trentin-süd-tirol":e,"trentin-sudtirol":e,"xn--trentin-sdtirol-7vb":e,"trentin-südtirol":e,"trentin-sued-tirol":e,"trentin-suedtirol":e,trentino:e,"trentino-a-adige":e,"trentino-aadige":e,"trentino-alto-adige":e,"trentino-altoadige":e,"trentino-s-tirol":e,"trentino-stirol":e,"trentino-sud-tirol":e,"xn--trentino-sd-tirol-c3b":e,"trentino-süd-tirol":e,"trentino-sudtirol":e,"xn--trentino-sdtirol-szb":e,"trentino-südtirol":e,"trentino-sued-tirol":e,"trentino-suedtirol":e,"trentinoa-adige":e,trentinoaadige:e,"trentinoalto-adige":e,trentinoaltoadige:e,"trentinos-tirol":e,trentinostirol:e,"trentinosud-tirol":e,"xn--trentinosd-tirol-rzb":e,"trentinosüd-tirol":e,trentinosudtirol:e,"xn--trentinosdtirol-7vb":e,trentinosüdtirol:e,"trentinosued-tirol":e,trentinosuedtirol:e,"trentinsud-tirol":e,"xn--trentinsd-tirol-6vb":e,"trentinsüd-tirol":e,trentinsudtirol:e,"xn--trentinsdtirol-nsb":e,trentinsüdtirol:e,"trentinsued-tirol":e,trentinsuedtirol:e,tuscany:e,umb:e,umbria:e,"val-d-aosta":e,"val-daosta":e,"vald-aosta":e,valdaosta:e,"valle-aosta":e,"valle-d-aosta":e,"valle-daosta":e,valleaosta:e,"valled-aosta":e,valledaosta:e,"vallee-aoste":e,"xn--valle-aoste-ebb":e,"vallée-aoste":e,"vallee-d-aoste":e,"xn--valle-d-aoste-ehb":e,"vallée-d-aoste":e,valleeaoste:e,"xn--valleaoste-e7a":e,valléeaoste:e,valleedaoste:e,"xn--valledaoste-ebb":e,valléedaoste:e,vao:e,vda:e,ven:e,veneto:e,ag:e,agrigento:e,al:e,alessandria:e,"alto-adige":e,altoadige:e,an:e,ancona:e,"andria-barletta-trani":e,"andria-trani-barletta":e,andriabarlettatrani:e,andriatranibarletta:e,ao:e,aosta:e,aoste:e,ap:e,aq:e,aquila:e,ar:e,arezzo:e,"ascoli-piceno":e,ascolipiceno:e,asti:e,at:e,av:e,avellino:e,ba:e,balsan:e,"balsan-sudtirol":e,"xn--balsan-sdtirol-nsb":e,"balsan-südtirol":e,"balsan-suedtirol":e,bari:e,"barletta-trani-andria":e,barlettatraniandria:e,belluno:e,benevento:e,bergamo:e,bg:e,bi:e,biella:e,bl:e,bn:e,bo:e,bologna:e,bolzano:e,"bolzano-altoadige":e,bozen:e,"bozen-sudtirol":e,"xn--bozen-sdtirol-2ob":e,"bozen-südtirol":e,"bozen-suedtirol":e,br:e,brescia:e,brindisi:e,bs:e,bt:e,bulsan:e,"bulsan-sudtirol":e,"xn--bulsan-sdtirol-nsb":e,"bulsan-südtirol":e,"bulsan-suedtirol":e,bz:e,ca:e,cagliari:e,caltanissetta:e,"campidano-medio":e,campidanomedio:e,campobasso:e,"carbonia-iglesias":e,carboniaiglesias:e,"carrara-massa":e,carraramassa:e,caserta:e,catania:e,catanzaro:e,cb:e,ce:e,"cesena-forli":e,"xn--cesena-forl-mcb":e,"cesena-forlì":e,cesenaforli:e,"xn--cesenaforl-i8a":e,cesenaforlì:e,ch:e,chieti:e,ci:e,cl:e,cn:e,co:e,como:e,cosenza:e,cr:e,cremona:e,crotone:e,cs:e,ct:e,cuneo:e,cz:e,"dell-ogliastra":e,dellogliastra:e,en:e,enna:e,fc:e,fe:e,fermo:e,ferrara:e,fg:e,fi:e,firenze:e,florence:e,fm:e,foggia:e,"forli-cesena":e,"xn--forl-cesena-fcb":e,"forlì-cesena":e,forlicesena:e,"xn--forlcesena-c8a":e,forlìcesena:e,fr:e,frosinone:e,ge:e,genoa:e,genova:e,go:e,gorizia:e,gr:e,grosseto:e,"iglesias-carbonia":e,iglesiascarbonia:e,im:e,imperia:e,is:e,isernia:e,kr:e,"la-spezia":e,laquila:e,laspezia:e,latina:e,lc:e,le:e,lecce:e,lecco:e,li:e,livorno:e,lo:e,lodi:e,lt:e,lu:e,lucca:e,macerata:e,mantova:e,"massa-carrara":e,massacarrara:e,matera:e,mb:e,mc:e,me:e,"medio-campidano":e,mediocampidano:e,messina:e,mi:e,milan:e,milano:e,mn:e,mo:e,modena:e,monza:e,"monza-brianza":e,"monza-e-della-brianza":e,monzabrianza:e,monzaebrianza:e,monzaedellabrianza:e,ms:e,mt:e,na:e,naples:e,napoli:e,no:e,novara:e,nu:e,nuoro:e,og:e,ogliastra:e,"olbia-tempio":e,olbiatempio:e,or:e,oristano:e,ot:e,pa:e,padova:e,padua:e,palermo:e,parma:e,pavia:e,pc:e,pd:e,pe:e,perugia:e,"pesaro-urbino":e,pesarourbino:e,pescara:e,pg:e,pi:e,piacenza:e,pisa:e,pistoia:e,pn:e,po:e,pordenone:e,potenza:e,pr:e,prato:e,pt:e,pu:e,pv:e,pz:e,ra:e,ragusa:e,ravenna:e,rc:e,re:e,"reggio-calabria":e,"reggio-emilia":e,reggiocalabria:e,reggioemilia:e,rg:e,ri:e,rieti:e,rimini:e,rm:e,rn:e,ro:e,roma:e,rome:e,rovigo:e,sa:e,salerno:e,sassari:e,savona:e,si:e,siena:e,siracusa:e,so:e,sondrio:e,sp:e,sr:e,ss:e,"xn--sdtirol-n2a":e,südtirol:e,suedtirol:e,sv:e,ta:e,taranto:e,te:e,"tempio-olbia":e,tempioolbia:e,teramo:e,terni:e,tn:e,to:e,torino:e,tp:e,tr:e,"trani-andria-barletta":e,"trani-barletta-andria":e,traniandriabarletta:e,tranibarlettaandria:e,trapani:e,trento:e,treviso:e,trieste:e,ts:e,turin:e,tv:e,ud:e,udine:e,"urbino-pesaro":e,urbinopesaro:e,va:e,varese:e,vb:e,vc:e,ve:e,venezia:e,venice:e,verbania:e,vercelli:e,verona:e,vi:e,"vibo-valentia":e,vibovalentia:e,vicenza:e,viterbo:e,vr:e,vs:e,vt:e,vv:e,ibxos:t,iliadboxos:t,neen:[0,{jc:t}],"123homepage":t,"16-b":t,"32-b":t,"64-b":t,myspreadshop:t,syncloud:t}],je:[1,{co:e,net:e,org:e,of:t}],jm:k,jo:[1,{agri:e,ai:e,com:e,edu:e,eng:e,fm:e,gov:e,mil:e,net:e,org:e,per:e,phd:e,sch:e,tv:e}],jobs:e,jp:[1,{ac:e,ad:e,co:e,ed:e,go:e,gr:e,lg:e,ne:[1,{aseinet:Fe,gehirn:t,ivory:t,"mail-box":t,mints:t,mokuren:t,opal:t,sakura:t,sumomo:t,topaz:t}],or:e,aichi:[1,{aisai:e,ama:e,anjo:e,asuke:e,chiryu:e,chita:e,fuso:e,gamagori:e,handa:e,hazu:e,hekinan:e,higashiura:e,ichinomiya:e,inazawa:e,inuyama:e,isshiki:e,iwakura:e,kanie:e,kariya:e,kasugai:e,kira:e,kiyosu:e,komaki:e,konan:e,kota:e,mihama:e,miyoshi:e,nishio:e,nisshin:e,obu:e,oguchi:e,oharu:e,okazaki:e,owariasahi:e,seto:e,shikatsu:e,shinshiro:e,shitara:e,tahara:e,takahama:e,tobishima:e,toei:e,togo:e,tokai:e,tokoname:e,toyoake:e,toyohashi:e,toyokawa:e,toyone:e,toyota:e,tsushima:e,yatomi:e}],akita:[1,{akita:e,daisen:e,fujisato:e,gojome:e,hachirogata:e,happou:e,higashinaruse:e,honjo:e,honjyo:e,ikawa:e,kamikoani:e,kamioka:e,katagami:e,kazuno:e,kitaakita:e,kosaka:e,kyowa:e,misato:e,mitane:e,moriyoshi:e,nikaho:e,noshiro:e,odate:e,oga:e,ogata:e,semboku:e,yokote:e,yurihonjo:e}],aomori:[1,{aomori:e,gonohe:e,hachinohe:e,hashikami:e,hiranai:e,hirosaki:e,itayanagi:e,kuroishi:e,misawa:e,mutsu:e,nakadomari:e,noheji:e,oirase:e,owani:e,rokunohe:e,sannohe:e,shichinohe:e,shingo:e,takko:e,towada:e,tsugaru:e,tsuruta:e}],chiba:[1,{abiko:e,asahi:e,chonan:e,chosei:e,choshi:e,chuo:e,funabashi:e,futtsu:e,hanamigawa:e,ichihara:e,ichikawa:e,ichinomiya:e,inzai:e,isumi:e,kamagaya:e,kamogawa:e,kashiwa:e,katori:e,katsuura:e,kimitsu:e,kisarazu:e,kozaki:e,kujukuri:e,kyonan:e,matsudo:e,midori:e,mihama:e,minamiboso:e,mobara:e,mutsuzawa:e,nagara:e,nagareyama:e,narashino:e,narita:e,noda:e,oamishirasato:e,omigawa:e,onjuku:e,otaki:e,sakae:e,sakura:e,shimofusa:e,shirako:e,shiroi:e,shisui:e,sodegaura:e,sosa:e,tako:e,tateyama:e,togane:e,tohnosho:e,tomisato:e,urayasu:e,yachimata:e,yachiyo:e,yokaichiba:e,yokoshibahikari:e,yotsukaido:e}],ehime:[1,{ainan:e,honai:e,ikata:e,imabari:e,iyo:e,kamijima:e,kihoku:e,kumakogen:e,masaki:e,matsuno:e,matsuyama:e,namikata:e,niihama:e,ozu:e,saijo:e,seiyo:e,shikokuchuo:e,tobe:e,toon:e,uchiko:e,uwajima:e,yawatahama:e}],fukui:[1,{echizen:e,eiheiji:e,fukui:e,ikeda:e,katsuyama:e,mihama:e,minamiechizen:e,obama:e,ohi:e,ono:e,sabae:e,sakai:e,takahama:e,tsuruga:e,wakasa:e}],fukuoka:[1,{ashiya:e,buzen:e,chikugo:e,chikuho:e,chikujo:e,chikushino:e,chikuzen:e,chuo:e,dazaifu:e,fukuchi:e,hakata:e,higashi:e,hirokawa:e,hisayama:e,iizuka:e,inatsuki:e,kaho:e,kasuga:e,kasuya:e,kawara:e,keisen:e,koga:e,kurate:e,kurogi:e,kurume:e,minami:e,miyako:e,miyama:e,miyawaka:e,mizumaki:e,munakata:e,nakagawa:e,nakama:e,nishi:e,nogata:e,ogori:e,okagaki:e,okawa:e,oki:e,omuta:e,onga:e,onojo:e,oto:e,saigawa:e,sasaguri:e,shingu:e,shinyoshitomi:e,shonai:e,soeda:e,sue:e,tachiarai:e,tagawa:e,takata:e,toho:e,toyotsu:e,tsuiki:e,ukiha:e,umi:e,usui:e,yamada:e,yame:e,yanagawa:e,yukuhashi:e}],fukushima:[1,{aizubange:e,aizumisato:e,aizuwakamatsu:e,asakawa:e,bandai:e,date:e,fukushima:e,furudono:e,futaba:e,hanawa:e,higashi:e,hirata:e,hirono:e,iitate:e,inawashiro:e,ishikawa:e,iwaki:e,izumizaki:e,kagamiishi:e,kaneyama:e,kawamata:e,kitakata:e,kitashiobara:e,koori:e,koriyama:e,kunimi:e,miharu:e,mishima:e,namie:e,nango:e,nishiaizu:e,nishigo:e,okuma:e,omotego:e,ono:e,otama:e,samegawa:e,shimogo:e,shirakawa:e,showa:e,soma:e,sukagawa:e,taishin:e,tamakawa:e,tanagura:e,tenei:e,yabuki:e,yamato:e,yamatsuri:e,yanaizu:e,yugawa:e}],gifu:[1,{anpachi:e,ena:e,gifu:e,ginan:e,godo:e,gujo:e,hashima:e,hichiso:e,hida:e,higashishirakawa:e,ibigawa:e,ikeda:e,kakamigahara:e,kani:e,kasahara:e,kasamatsu:e,kawaue:e,kitagata:e,mino:e,minokamo:e,mitake:e,mizunami:e,motosu:e,nakatsugawa:e,ogaki:e,sakahogi:e,seki:e,sekigahara:e,shirakawa:e,tajimi:e,takayama:e,tarui:e,toki:e,tomika:e,wanouchi:e,yamagata:e,yaotsu:e,yoro:e}],gunma:[1,{annaka:e,chiyoda:e,fujioka:e,higashiagatsuma:e,isesaki:e,itakura:e,kanna:e,kanra:e,katashina:e,kawaba:e,kiryu:e,kusatsu:e,maebashi:e,meiwa:e,midori:e,minakami:e,naganohara:e,nakanojo:e,nanmoku:e,numata:e,oizumi:e,ora:e,ota:e,shibukawa:e,shimonita:e,shinto:e,showa:e,takasaki:e,takayama:e,tamamura:e,tatebayashi:e,tomioka:e,tsukiyono:e,tsumagoi:e,ueno:e,yoshioka:e}],hiroshima:[1,{asaminami:e,daiwa:e,etajima:e,fuchu:e,fukuyama:e,hatsukaichi:e,higashihiroshima:e,hongo:e,jinsekikogen:e,kaita:e,kui:e,kumano:e,kure:e,mihara:e,miyoshi:e,naka:e,onomichi:e,osakikamijima:e,otake:e,saka:e,sera:e,seranishi:e,shinichi:e,shobara:e,takehara:e}],hokkaido:[1,{abashiri:e,abira:e,aibetsu:e,akabira:e,akkeshi:e,asahikawa:e,ashibetsu:e,ashoro:e,assabu:e,atsuma:e,bibai:e,biei:e,bifuka:e,bihoro:e,biratori:e,chippubetsu:e,chitose:e,date:e,ebetsu:e,embetsu:e,eniwa:e,erimo:e,esan:e,esashi:e,fukagawa:e,fukushima:e,furano:e,furubira:e,haboro:e,hakodate:e,hamatonbetsu:e,hidaka:e,higashikagura:e,higashikawa:e,hiroo:e,hokuryu:e,hokuto:e,honbetsu:e,horokanai:e,horonobe:e,ikeda:e,imakane:e,ishikari:e,iwamizawa:e,iwanai:e,kamifurano:e,kamikawa:e,kamishihoro:e,kamisunagawa:e,kamoenai:e,kayabe:e,kembuchi:e,kikonai:e,kimobetsu:e,kitahiroshima:e,kitami:e,kiyosato:e,koshimizu:e,kunneppu:e,kuriyama:e,kuromatsunai:e,kushiro:e,kutchan:e,kyowa:e,mashike:e,matsumae:e,mikasa:e,minamifurano:e,mombetsu:e,moseushi:e,mukawa:e,muroran:e,naie:e,nakagawa:e,nakasatsunai:e,nakatombetsu:e,nanae:e,nanporo:e,nayoro:e,nemuro:e,niikappu:e,niki:e,nishiokoppe:e,noboribetsu:e,numata:e,obihiro:e,obira:e,oketo:e,okoppe:e,otaru:e,otobe:e,otofuke:e,otoineppu:e,oumu:e,ozora:e,pippu:e,rankoshi:e,rebun:e,rikubetsu:e,rishiri:e,rishirifuji:e,saroma:e,sarufutsu:e,shakotan:e,shari:e,shibecha:e,shibetsu:e,shikabe:e,shikaoi:e,shimamaki:e,shimizu:e,shimokawa:e,shinshinotsu:e,shintoku:e,shiranuka:e,shiraoi:e,shiriuchi:e,sobetsu:e,sunagawa:e,taiki:e,takasu:e,takikawa:e,takinoue:e,teshikaga:e,tobetsu:e,tohma:e,tomakomai:e,tomari:e,toya:e,toyako:e,toyotomi:e,toyoura:e,tsubetsu:e,tsukigata:e,urakawa:e,urausu:e,uryu:e,utashinai:e,wakkanai:e,wassamu:e,yakumo:e,yoichi:e}],hyogo:[1,{aioi:e,akashi:e,ako:e,amagasaki:e,aogaki:e,asago:e,ashiya:e,awaji:e,fukusaki:e,goshiki:e,harima:e,himeji:e,ichikawa:e,inagawa:e,itami:e,kakogawa:e,kamigori:e,kamikawa:e,kasai:e,kasuga:e,kawanishi:e,miki:e,minamiawaji:e,nishinomiya:e,nishiwaki:e,ono:e,sanda:e,sannan:e,sasayama:e,sayo:e,shingu:e,shinonsen:e,shiso:e,sumoto:e,taishi:e,taka:e,takarazuka:e,takasago:e,takino:e,tamba:e,tatsuno:e,toyooka:e,yabu:e,yashiro:e,yoka:e,yokawa:e}],ibaraki:[1,{ami:e,asahi:e,bando:e,chikusei:e,daigo:e,fujishiro:e,hitachi:e,hitachinaka:e,hitachiomiya:e,hitachiota:e,ibaraki:e,ina:e,inashiki:e,itako:e,iwama:e,joso:e,kamisu:e,kasama:e,kashima:e,kasumigaura:e,koga:e,miho:e,mito:e,moriya:e,naka:e,namegata:e,oarai:e,ogawa:e,omitama:e,ryugasaki:e,sakai:e,sakuragawa:e,shimodate:e,shimotsuma:e,shirosato:e,sowa:e,suifu:e,takahagi:e,tamatsukuri:e,tokai:e,tomobe:e,tone:e,toride:e,tsuchiura:e,tsukuba:e,uchihara:e,ushiku:e,yachiyo:e,yamagata:e,yawara:e,yuki:e}],ishikawa:[1,{anamizu:e,hakui:e,hakusan:e,kaga:e,kahoku:e,kanazawa:e,kawakita:e,komatsu:e,nakanoto:e,nanao:e,nomi:e,nonoichi:e,noto:e,shika:e,suzu:e,tsubata:e,tsurugi:e,uchinada:e,wajima:e}],iwate:[1,{fudai:e,fujisawa:e,hanamaki:e,hiraizumi:e,hirono:e,ichinohe:e,ichinoseki:e,iwaizumi:e,iwate:e,joboji:e,kamaishi:e,kanegasaki:e,karumai:e,kawai:e,kitakami:e,kuji:e,kunohe:e,kuzumaki:e,miyako:e,mizusawa:e,morioka:e,ninohe:e,noda:e,ofunato:e,oshu:e,otsuchi:e,rikuzentakata:e,shiwa:e,shizukuishi:e,sumita:e,tanohata:e,tono:e,yahaba:e,yamada:e}],kagawa:[1,{ayagawa:e,higashikagawa:e,kanonji:e,kotohira:e,manno:e,marugame:e,mitoyo:e,naoshima:e,sanuki:e,tadotsu:e,takamatsu:e,tonosho:e,uchinomi:e,utazu:e,zentsuji:e}],kagoshima:[1,{akune:e,amami:e,hioki:e,isa:e,isen:e,izumi:e,kagoshima:e,kanoya:e,kawanabe:e,kinko:e,kouyama:e,makurazaki:e,matsumoto:e,minamitane:e,nakatane:e,nishinoomote:e,satsumasendai:e,soo:e,tarumizu:e,yusui:e}],kanagawa:[1,{aikawa:e,atsugi:e,ayase:e,chigasaki:e,ebina:e,fujisawa:e,hadano:e,hakone:e,hiratsuka:e,isehara:e,kaisei:e,kamakura:e,kiyokawa:e,matsuda:e,minamiashigara:e,miura:e,nakai:e,ninomiya:e,odawara:e,oi:e,oiso:e,sagamihara:e,samukawa:e,tsukui:e,yamakita:e,yamato:e,yokosuka:e,yugawara:e,zama:e,zushi:e}],kochi:[1,{aki:e,geisei:e,hidaka:e,higashitsuno:e,ino:e,kagami:e,kami:e,kitagawa:e,kochi:e,mihara:e,motoyama:e,muroto:e,nahari:e,nakamura:e,nankoku:e,nishitosa:e,niyodogawa:e,ochi:e,okawa:e,otoyo:e,otsuki:e,sakawa:e,sukumo:e,susaki:e,tosa:e,tosashimizu:e,toyo:e,tsuno:e,umaji:e,yasuda:e,yusuhara:e}],kumamoto:[1,{amakusa:e,arao:e,aso:e,choyo:e,gyokuto:e,kamiamakusa:e,kikuchi:e,kumamoto:e,mashiki:e,mifune:e,minamata:e,minamioguni:e,nagasu:e,nishihara:e,oguni:e,ozu:e,sumoto:e,takamori:e,uki:e,uto:e,yamaga:e,yamato:e,yatsushiro:e}],kyoto:[1,{ayabe:e,fukuchiyama:e,higashiyama:e,ide:e,ine:e,joyo:e,kameoka:e,kamo:e,kita:e,kizu:e,kumiyama:e,kyotamba:e,kyotanabe:e,kyotango:e,maizuru:e,minami:e,minamiyamashiro:e,miyazu:e,muko:e,nagaokakyo:e,nakagyo:e,nantan:e,oyamazaki:e,sakyo:e,seika:e,tanabe:e,uji:e,ujitawara:e,wazuka:e,yamashina:e,yawata:e}],mie:[1,{asahi:e,inabe:e,ise:e,kameyama:e,kawagoe:e,kiho:e,kisosaki:e,kiwa:e,komono:e,kumano:e,kuwana:e,matsusaka:e,meiwa:e,mihama:e,minamiise:e,misugi:e,miyama:e,nabari:e,shima:e,suzuka:e,tado:e,taiki:e,taki:e,tamaki:e,toba:e,tsu:e,udono:e,ureshino:e,watarai:e,yokkaichi:e}],miyagi:[1,{furukawa:e,higashimatsushima:e,ishinomaki:e,iwanuma:e,kakuda:e,kami:e,kawasaki:e,marumori:e,matsushima:e,minamisanriku:e,misato:e,murata:e,natori:e,ogawara:e,ohira:e,onagawa:e,osaki:e,rifu:e,semine:e,shibata:e,shichikashuku:e,shikama:e,shiogama:e,shiroishi:e,tagajo:e,taiwa:e,tome:e,tomiya:e,wakuya:e,watari:e,yamamoto:e,zao:e}],miyazaki:[1,{aya:e,ebino:e,gokase:e,hyuga:e,kadogawa:e,kawaminami:e,kijo:e,kitagawa:e,kitakata:e,kitaura:e,kobayashi:e,kunitomi:e,kushima:e,mimata:e,miyakonojo:e,miyazaki:e,morotsuka:e,nichinan:e,nishimera:e,nobeoka:e,saito:e,shiiba:e,shintomi:e,takaharu:e,takanabe:e,takazaki:e,tsuno:e}],nagano:[1,{achi:e,agematsu:e,anan:e,aoki:e,asahi:e,azumino:e,chikuhoku:e,chikuma:e,chino:e,fujimi:e,hakuba:e,hara:e,hiraya:e,iida:e,iijima:e,iiyama:e,iizuna:e,ikeda:e,ikusaka:e,ina:e,karuizawa:e,kawakami:e,kiso:e,kisofukushima:e,kitaaiki:e,komagane:e,komoro:e,matsukawa:e,matsumoto:e,miasa:e,minamiaiki:e,minamimaki:e,minamiminowa:e,minowa:e,miyada:e,miyota:e,mochizuki:e,nagano:e,nagawa:e,nagiso:e,nakagawa:e,nakano:e,nozawaonsen:e,obuse:e,ogawa:e,okaya:e,omachi:e,omi:e,ookuwa:e,ooshika:e,otaki:e,otari:e,sakae:e,sakaki:e,saku:e,sakuho:e,shimosuwa:e,shinanomachi:e,shiojiri:e,suwa:e,suzaka:e,takagi:e,takamori:e,takayama:e,tateshina:e,tatsuno:e,togakushi:e,togura:e,tomi:e,ueda:e,wada:e,yamagata:e,yamanouchi:e,yasaka:e,yasuoka:e}],nagasaki:[1,{chijiwa:e,futsu:e,goto:e,hasami:e,hirado:e,iki:e,isahaya:e,kawatana:e,kuchinotsu:e,matsuura:e,nagasaki:e,obama:e,omura:e,oseto:e,saikai:e,sasebo:e,seihi:e,shimabara:e,shinkamigoto:e,togitsu:e,tsushima:e,unzen:e}],nara:[1,{ando:e,gose:e,heguri:e,higashiyoshino:e,ikaruga:e,ikoma:e,kamikitayama:e,kanmaki:e,kashiba:e,kashihara:e,katsuragi:e,kawai:e,kawakami:e,kawanishi:e,koryo:e,kurotaki:e,mitsue:e,miyake:e,nara:e,nosegawa:e,oji:e,ouda:e,oyodo:e,sakurai:e,sango:e,shimoichi:e,shimokitayama:e,shinjo:e,soni:e,takatori:e,tawaramoto:e,tenkawa:e,tenri:e,uda:e,yamatokoriyama:e,yamatotakada:e,yamazoe:e,yoshino:e}],niigata:[1,{aga:e,agano:e,gosen:e,itoigawa:e,izumozaki:e,joetsu:e,kamo:e,kariwa:e,kashiwazaki:e,minamiuonuma:e,mitsuke:e,muika:e,murakami:e,myoko:e,nagaoka:e,niigata:e,ojiya:e,omi:e,sado:e,sanjo:e,seiro:e,seirou:e,sekikawa:e,shibata:e,tagami:e,tainai:e,tochio:e,tokamachi:e,tsubame:e,tsunan:e,uonuma:e,yahiko:e,yoita:e,yuzawa:e}],oita:[1,{beppu:e,bungoono:e,bungotakada:e,hasama:e,hiji:e,himeshima:e,hita:e,kamitsue:e,kokonoe:e,kuju:e,kunisaki:e,kusu:e,oita:e,saiki:e,taketa:e,tsukumi:e,usa:e,usuki:e,yufu:e}],okayama:[1,{akaiwa:e,asakuchi:e,bizen:e,hayashima:e,ibara:e,kagamino:e,kasaoka:e,kibichuo:e,kumenan:e,kurashiki:e,maniwa:e,misaki:e,nagi:e,niimi:e,nishiawakura:e,okayama:e,satosho:e,setouchi:e,shinjo:e,shoo:e,soja:e,takahashi:e,tamano:e,tsuyama:e,wake:e,yakage:e}],okinawa:[1,{aguni:e,ginowan:e,ginoza:e,gushikami:e,haebaru:e,higashi:e,hirara:e,iheya:e,ishigaki:e,ishikawa:e,itoman:e,izena:e,kadena:e,kin:e,kitadaito:e,kitanakagusuku:e,kumejima:e,kunigami:e,minamidaito:e,motobu:e,nago:e,naha:e,nakagusuku:e,nakijin:e,nanjo:e,nishihara:e,ogimi:e,okinawa:e,onna:e,shimoji:e,taketomi:e,tarama:e,tokashiki:e,tomigusuku:e,tonaki:e,urasoe:e,uruma:e,yaese:e,yomitan:e,yonabaru:e,yonaguni:e,zamami:e}],osaka:[1,{abeno:e,chihayaakasaka:e,chuo:e,daito:e,fujiidera:e,habikino:e,hannan:e,higashiosaka:e,higashisumiyoshi:e,higashiyodogawa:e,hirakata:e,ibaraki:e,ikeda:e,izumi:e,izumiotsu:e,izumisano:e,kadoma:e,kaizuka:e,kanan:e,kashiwara:e,katano:e,kawachinagano:e,kishiwada:e,kita:e,kumatori:e,matsubara:e,minato:e,minoh:e,misaki:e,moriguchi:e,neyagawa:e,nishi:e,nose:e,osakasayama:e,sakai:e,sayama:e,sennan:e,settsu:e,shijonawate:e,shimamoto:e,suita:e,tadaoka:e,taishi:e,tajiri:e,takaishi:e,takatsuki:e,tondabayashi:e,toyonaka:e,toyono:e,yao:e}],saga:[1,{ariake:e,arita:e,fukudomi:e,genkai:e,hamatama:e,hizen:e,imari:e,kamimine:e,kanzaki:e,karatsu:e,kashima:e,kitagata:e,kitahata:e,kiyama:e,kouhoku:e,kyuragi:e,nishiarita:e,ogi:e,omachi:e,ouchi:e,saga:e,shiroishi:e,taku:e,tara:e,tosu:e,yoshinogari:e}],saitama:[1,{arakawa:e,asaka:e,chichibu:e,fujimi:e,fujimino:e,fukaya:e,hanno:e,hanyu:e,hasuda:e,hatogaya:e,hatoyama:e,hidaka:e,higashichichibu:e,higashimatsuyama:e,honjo:e,ina:e,iruma:e,iwatsuki:e,kamiizumi:e,kamikawa:e,kamisato:e,kasukabe:e,kawagoe:e,kawaguchi:e,kawajima:e,kazo:e,kitamoto:e,koshigaya:e,kounosu:e,kuki:e,kumagaya:e,matsubushi:e,minano:e,misato:e,miyashiro:e,miyoshi:e,moroyama:e,nagatoro:e,namegawa:e,niiza:e,ogano:e,ogawa:e,ogose:e,okegawa:e,omiya:e,otaki:e,ranzan:e,ryokami:e,saitama:e,sakado:e,satte:e,sayama:e,shiki:e,shiraoka:e,soka:e,sugito:e,toda:e,tokigawa:e,tokorozawa:e,tsurugashima:e,urawa:e,warabi:e,yashio:e,yokoze:e,yono:e,yorii:e,yoshida:e,yoshikawa:e,yoshimi:e}],shiga:[1,{aisho:e,gamo:e,higashiomi:e,hikone:e,koka:e,konan:e,kosei:e,koto:e,kusatsu:e,maibara:e,moriyama:e,nagahama:e,nishiazai:e,notogawa:e,omihachiman:e,otsu:e,ritto:e,ryuoh:e,takashima:e,takatsuki:e,torahime:e,toyosato:e,yasu:e}],shimane:[1,{akagi:e,ama:e,gotsu:e,hamada:e,higashiizumo:e,hikawa:e,hikimi:e,izumo:e,kakinoki:e,masuda:e,matsue:e,misato:e,nishinoshima:e,ohda:e,okinoshima:e,okuizumo:e,shimane:e,tamayu:e,tsuwano:e,unnan:e,yakumo:e,yasugi:e,yatsuka:e}],shizuoka:[1,{arai:e,atami:e,fuji:e,fujieda:e,fujikawa:e,fujinomiya:e,fukuroi:e,gotemba:e,haibara:e,hamamatsu:e,higashiizu:e,ito:e,iwata:e,izu:e,izunokuni:e,kakegawa:e,kannami:e,kawanehon:e,kawazu:e,kikugawa:e,kosai:e,makinohara:e,matsuzaki:e,minamiizu:e,mishima:e,morimachi:e,nishiizu:e,numazu:e,omaezaki:e,shimada:e,shimizu:e,shimoda:e,shizuoka:e,susono:e,yaizu:e,yoshida:e}],tochigi:[1,{ashikaga:e,bato:e,haga:e,ichikai:e,iwafune:e,kaminokawa:e,kanuma:e,karasuyama:e,kuroiso:e,mashiko:e,mibu:e,moka:e,motegi:e,nasu:e,nasushiobara:e,nikko:e,nishikata:e,nogi:e,ohira:e,ohtawara:e,oyama:e,sakura:e,sano:e,shimotsuke:e,shioya:e,takanezawa:e,tochigi:e,tsuga:e,ujiie:e,utsunomiya:e,yaita:e}],tokushima:[1,{aizumi:e,anan:e,ichiba:e,itano:e,kainan:e,komatsushima:e,matsushige:e,mima:e,minami:e,miyoshi:e,mugi:e,nakagawa:e,naruto:e,sanagochi:e,shishikui:e,tokushima:e,wajiki:e}],tokyo:[1,{adachi:e,akiruno:e,akishima:e,aogashima:e,arakawa:e,bunkyo:e,chiyoda:e,chofu:e,chuo:e,edogawa:e,fuchu:e,fussa:e,hachijo:e,hachioji:e,hamura:e,higashikurume:e,higashimurayama:e,higashiyamato:e,hino:e,hinode:e,hinohara:e,inagi:e,itabashi:e,katsushika:e,kita:e,kiyose:e,kodaira:e,koganei:e,kokubunji:e,komae:e,koto:e,kouzushima:e,kunitachi:e,machida:e,meguro:e,minato:e,mitaka:e,mizuho:e,musashimurayama:e,musashino:e,nakano:e,nerima:e,ogasawara:e,okutama:e,ome:e,oshima:e,ota:e,setagaya:e,shibuya:e,shinagawa:e,shinjuku:e,suginami:e,sumida:e,tachikawa:e,taito:e,tama:e,toshima:e}],tottori:[1,{chizu:e,hino:e,kawahara:e,koge:e,kotoura:e,misasa:e,nanbu:e,nichinan:e,sakaiminato:e,tottori:e,wakasa:e,yazu:e,yonago:e}],toyama:[1,{asahi:e,fuchu:e,fukumitsu:e,funahashi:e,himi:e,imizu:e,inami:e,johana:e,kamiichi:e,kurobe:e,nakaniikawa:e,namerikawa:e,nanto:e,nyuzen:e,oyabe:e,taira:e,takaoka:e,tateyama:e,toga:e,tonami:e,toyama:e,unazuki:e,uozu:e,yamada:e}],wakayama:[1,{arida:e,aridagawa:e,gobo:e,hashimoto:e,hidaka:e,hirogawa:e,inami:e,iwade:e,kainan:e,kamitonda:e,katsuragi:e,kimino:e,kinokawa:e,kitayama:e,koya:e,koza:e,kozagawa:e,kudoyama:e,kushimoto:e,mihama:e,misato:e,nachikatsuura:e,shingu:e,shirahama:e,taiji:e,tanabe:e,wakayama:e,yuasa:e,yura:e}],yamagata:[1,{asahi:e,funagata:e,higashine:e,iide:e,kahoku:e,kaminoyama:e,kaneyama:e,kawanishi:e,mamurogawa:e,mikawa:e,murayama:e,nagai:e,nakayama:e,nanyo:e,nishikawa:e,obanazawa:e,oe:e,oguni:e,ohkura:e,oishida:e,sagae:e,sakata:e,sakegawa:e,shinjo:e,shirataka:e,shonai:e,takahata:e,tendo:e,tozawa:e,tsuruoka:e,yamagata:e,yamanobe:e,yonezawa:e,yuza:e}],yamaguchi:[1,{abu:e,hagi:e,hikari:e,hofu:e,iwakuni:e,kudamatsu:e,mitou:e,nagato:e,oshima:e,shimonoseki:e,shunan:e,tabuse:e,tokuyama:e,toyota:e,ube:e,yuu:e}],yamanashi:[1,{chuo:e,doshi:e,fuefuki:e,fujikawa:e,fujikawaguchiko:e,fujiyoshida:e,hayakawa:e,hokuto:e,ichikawamisato:e,kai:e,kofu:e,koshu:e,kosuge:e,"minami-alps":e,minobu:e,nakamichi:e,nanbu:e,narusawa:e,nirasaki:e,nishikatsura:e,oshino:e,otsuki:e,showa:e,tabayama:e,tsuru:e,uenohara:e,yamanakako:e,yamanashi:e}],"xn--ehqz56n":e,三重:e,"xn--1lqs03n":e,京都:e,"xn--qqqt11m":e,佐賀:e,"xn--f6qx53a":e,兵庫:e,"xn--djrs72d6uy":e,北海道:e,"xn--mkru45i":e,千葉:e,"xn--0trq7p7nn":e,和歌山:e,"xn--5js045d":e,埼玉:e,"xn--kbrq7o":e,大分:e,"xn--pssu33l":e,大阪:e,"xn--ntsq17g":e,奈良:e,"xn--uisz3g":e,宮城:e,"xn--6btw5a":e,宮崎:e,"xn--1ctwo":e,富山:e,"xn--6orx2r":e,山口:e,"xn--rht61e":e,山形:e,"xn--rht27z":e,山梨:e,"xn--nit225k":e,岐阜:e,"xn--rht3d":e,岡山:e,"xn--djty4k":e,岩手:e,"xn--klty5x":e,島根:e,"xn--kltx9a":e,広島:e,"xn--kltp7d":e,徳島:e,"xn--c3s14m":e,愛媛:e,"xn--vgu402c":e,愛知:e,"xn--efvn9s":e,新潟:e,"xn--1lqs71d":e,東京:e,"xn--4pvxs":e,栃木:e,"xn--uuwu58a":e,沖縄:e,"xn--zbx025d":e,滋賀:e,"xn--8pvr4u":e,熊本:e,"xn--5rtp49c":e,石川:e,"xn--ntso0iqx3a":e,神奈川:e,"xn--elqq16h":e,福井:e,"xn--4it168d":e,福岡:e,"xn--klt787d":e,福島:e,"xn--rny31h":e,秋田:e,"xn--7t0a264c":e,群馬:e,"xn--uist22h":e,茨城:e,"xn--8ltr62k":e,長崎:e,"xn--2m4a15e":e,長野:e,"xn--32vp30h":e,青森:e,"xn--4it797k":e,静岡:e,"xn--5rtq34k":e,香川:e,"xn--k7yn95e":e,高知:e,"xn--tor131o":e,鳥取:e,"xn--d5qv7z876c":e,鹿児島:e,kawasaki:k,kitakyushu:k,kobe:k,nagoya:k,sapporo:k,sendai:k,yokohama:k,buyshop:t,fashionstore:t,handcrafted:t,kawaiishop:t,supersale:t,theshop:t,"0am":t,"0g0":t,"0j0":t,"0t0":t,mydns:t,pgw:t,wjg:t,usercontent:t,angry:t,babyblue:t,babymilk:t,backdrop:t,bambina:t,bitter:t,blush:t,boo:t,boy:t,boyfriend:t,but:t,candypop:t,capoo:t,catfood:t,cheap:t,chicappa:t,chillout:t,chips:t,chowder:t,chu:t,ciao:t,cocotte:t,coolblog:t,cranky:t,cutegirl:t,daa:t,deca:t,deci:t,digick:t,egoism:t,fakefur:t,fem:t,flier:t,floppy:t,fool:t,frenchkiss:t,girlfriend:t,girly:t,gloomy:t,gonna:t,greater:t,hacca:t,heavy:t,her:t,hiho:t,hippy:t,holy:t,hungry:t,icurus:t,itigo:t,jellybean:t,kikirara:t,kill:t,kilo:t,kuron:t,littlestar:t,lolipopmc:t,lolitapunk:t,lomo:t,lovepop:t,lovesick:t,main:t,mods:t,mond:t,mongolian:t,moo:t,namaste:t,nikita:t,nobushi:t,noor:t,oops:t,parallel:t,parasite:t,pecori:t,peewee:t,penne:t,pepper:t,perma:t,pigboat:t,pinoko:t,punyu:t,pupu:t,pussycat:t,pya:t,raindrop:t,readymade:t,sadist:t,schoolbus:t,secret:t,staba:t,stripper:t,sub:t,sunnyday:t,thick:t,tonkotsu:t,under:t,upper:t,velvet:t,verse:t,versus:t,vivian:t,watson:t,weblike:t,whitesnow:t,zombie:t,hateblo:t,hatenablog:t,hatenadiary:t,"2-d":t,bona:t,crap:t,daynight:t,eek:t,flop:t,halfmoon:t,jeez:t,matrix:t,mimoza:t,netgamers:t,nyanta:t,o0o0:t,rdy:t,rgr:t,rulez:t,sakurastorage:[0,{isk01:zr,isk02:zr}],saloon:t,sblo:t,skr:t,tank:t,"uh-oh":t,undo:t,webaccel:[0,{rs:t,user:t}],websozai:t,xii:t}],ke:[1,{ac:e,co:e,go:e,info:e,me:e,mobi:e,ne:e,or:e,sc:e}],kg:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,us:t,xx:t,ae:t}],kh:n,ki:pn,km:[1,{ass:e,com:e,edu:e,gov:e,mil:e,nom:e,org:e,prd:e,tm:e,asso:e,coop:e,gouv:e,medecin:e,notaires:e,pharmaciens:e,presse:e,veterinaire:e}],kn:[1,{edu:e,gov:e,net:e,org:e}],kp:[1,{com:e,edu:e,gov:e,org:e,rep:e,tra:e}],kr:[1,{ac:e,ai:e,co:e,es:e,go:e,hs:e,io:e,it:e,kg:e,me:e,mil:e,ms:e,ne:e,or:e,pe:e,re:e,sc:e,busan:e,chungbuk:e,chungnam:e,daegu:e,daejeon:e,gangwon:e,gwangju:e,gyeongbuk:e,gyeonggi:e,gyeongnam:e,incheon:e,jeju:e,jeonbuk:e,jeonnam:e,seoul:e,ulsan:e,c01:t,"eliv-api":t,"eliv-cdn":t,"eliv-dns":t,mmv:t,vki:t}],kw:[1,{com:e,edu:e,emb:e,gov:e,ind:e,net:e,org:e}],ky:Re,kz:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,jcloud:t}],la:[1,{com:e,edu:e,gov:e,info:e,int:e,net:e,org:e,per:e,bnr:t}],lb:n,lc:[1,{co:e,com:e,edu:e,gov:e,net:e,org:e,oy:t}],li:e,lk:[1,{ac:e,assn:e,com:e,edu:e,gov:e,grp:e,hotel:e,int:e,ltd:e,net:e,ngo:e,org:e,sch:e,soc:e,web:e}],lr:n,ls:[1,{ac:e,biz:e,co:e,edu:e,gov:e,info:e,net:e,org:e,sc:e}],lt:c,lu:[1,{"123website":t}],lv:[1,{asn:e,com:e,conf:e,edu:e,gov:e,id:e,mil:e,net:e,org:e}],ly:[1,{com:e,edu:e,gov:e,id:e,med:e,net:e,org:e,plc:e,sch:e}],ma:[1,{ac:e,co:e,gov:e,net:e,org:e,press:e}],mc:[1,{asso:e,tm:e}],md:[1,{ir:t}],me:[1,{ac:e,co:e,edu:e,gov:e,its:e,net:e,org:e,priv:e,c66:t,craft:t,edgestack:t,mybox:t,filegear:t,"filegear-sg":t,lohmus:t,barsy:t,mcdir:t,brasilia:t,ddns:t,dnsfor:t,hopto:t,loginto:t,noip:t,webhop:t,soundcast:t,tcp4:t,vp4:t,diskstation:t,dscloud:t,i234:t,myds:t,synology:t,transip:Ee,nohost:t}],mg:[1,{co:e,com:e,edu:e,gov:e,mil:e,nom:e,org:e,prd:e}],mh:e,mil:e,mk:[1,{com:e,edu:e,gov:e,inf:e,name:e,net:e,org:e}],ml:[1,{ac:e,art:e,asso:e,com:e,edu:e,gouv:e,gov:e,info:e,inst:e,net:e,org:e,pr:e,presse:e}],mm:k,mn:[1,{edu:e,gov:e,org:e,nyc:t}],mo:n,mobi:[1,{barsy:t,dscloud:t}],mp:[1,{ju:t}],mq:e,mr:c,ms:[1,{com:e,edu:e,gov:e,net:e,org:e,minisite:t}],mt:Re,mu:[1,{ac:e,co:e,com:e,gov:e,net:e,or:e,org:e}],museum:e,mv:[1,{aero:e,biz:e,com:e,coop:e,edu:e,gov:e,info:e,int:e,mil:e,museum:e,name:e,net:e,org:e,pro:e}],mw:[1,{ac:e,biz:e,co:e,com:e,coop:e,edu:e,gov:e,int:e,net:e,org:e}],mx:[1,{com:e,edu:e,gob:e,net:e,org:e}],my:[1,{biz:e,com:e,edu:e,gov:e,mil:e,name:e,net:e,org:e}],mz:[1,{ac:e,adv:e,co:e,edu:e,gov:e,mil:e,net:e,org:e}],na:[1,{alt:e,co:e,com:e,gov:e,net:e,org:e}],name:[1,{her:X,his:X,ispmanager:t,keenetic:t}],nc:[1,{asso:e,nom:e}],ne:e,net:[1,{adobeaemcloud:t,"adobeio-static":t,adobeioruntime:t,akadns:t,akamai:t,"akamai-staging":t,akamaiedge:t,"akamaiedge-staging":t,akamaihd:t,"akamaihd-staging":t,akamaiorigin:t,"akamaiorigin-staging":t,akamaized:t,"akamaized-staging":t,edgekey:t,"edgekey-staging":t,edgesuite:t,"edgesuite-staging":t,alwaysdata:t,myamaze:t,cloudfront:t,appudo:t,"atlassian-dev":[0,{prod:Me}],myfritz:t,shopselect:t,blackbaudcdn:t,boomla:t,bplaced:t,square7:t,cdn77:[0,{r:t}],"cdn77-ssl":t,gb:t,hu:t,jp:t,se:t,uk:t,clickrising:t,"ddns-ip":t,"dns-cloud":t,"dns-dynamic":t,cloudaccess:t,cloudflare:[2,{cdn:t}],cloudflareanycast:Me,cloudflarecn:Me,cloudflareglobal:Me,ctfcloud:t,"feste-ip":t,"knx-server":t,"static-access":t,cryptonomic:s,dattolocal:t,mydatto:t,debian:t,definima:t,deno:[2,{sandbox:t}],icp:s,de5:t,"at-band-camp":t,blogdns:t,"broke-it":t,buyshouses:t,dnsalias:t,dnsdojo:t,"does-it":t,dontexist:t,dynalias:t,dynathome:t,endofinternet:t,"from-az":t,"from-co":t,"from-la":t,"from-ny":t,"gets-it":t,"ham-radio-op":t,homeftp:t,homeip:t,homelinux:t,homeunix:t,"in-the-band":t,"is-a-chef":t,"is-a-geek":t,"isa-geek":t,"kicks-ass":t,"office-on-the":t,podzone:t,"scrapper-site":t,selfip:t,"sells-it":t,servebbs:t,serveftp:t,thruhere:t,webhop:t,casacam:t,dynu:t,dynuddns:t,mysynology:t,opik:t,spryt:t,dynv6:t,twmail:t,ru:t,channelsdvr:[2,{u:t}],fastly:[0,{freetls:t,map:t,prod:[0,{a:t,global:t}],ssl:[0,{a:t,b:t,global:t}]}],fastlylb:[2,{map:t}],"keyword-on":t,"live-on":t,"server-on":t,"cdn-edges":t,heteml:t,cloudfunctions:t,"grafana-dev":t,iobb:t,moonscale:t,"in-dsl":t,"in-vpn":t,oninferno:t,botdash:t,"apps-1and1":t,ipifony:t,cloudjiffy:[2,{"fra1-de":t,"west1-us":t}],elastx:[0,{"jls-sto1":t,"jls-sto2":t,"jls-sto3":t}],massivegrid:[0,{paas:[0,{"fr-1":t,"lon-1":t,"lon-2":t,"ny-1":t,"ny-2":t,"sg-1":t}]}],saveincloud:[0,{jelastic:t,"nordeste-idc":t}],scaleforce:q,kinghost:t,uni5:t,krellian:t,ggff:t,localto:s,barsy:t,luyani:t,memset:t,"azure-api":t,"azure-mobile":t,azureedge:t,azurefd:t,azurestaticapps:[2,{1:t,2:t,3:t,4:t,5:t,6:t,7:t,centralus:t,eastasia:t,eastus2:t,westeurope:t,westus2:t}],azurewebsites:t,cloudapp:t,trafficmanager:t,usgovcloudapi:Ae,usgovcloudapp:t,usgovtrafficmanager:t,windows:Ae,mynetname:[0,{sn:t}],routingthecloud:t,bounceme:t,ddns:t,"eating-organic":t,mydissent:t,myeffect:t,mymediapc:t,mypsx:t,mysecuritycamera:t,nhlfan:t,"no-ip":t,pgafan:t,privatizehealthinsurance:t,redirectme:t,serveblog:t,serveminecraft:t,sytes:t,dnsup:t,hicam:t,"now-dns":t,ownip:t,vpndns:t,cloudycluster:t,ovh:[0,{hosting:s,webpaas:s}],rackmaze:t,myradweb:t,in:t,"subsc-pay":t,squares:t,schokokeks:t,"firewall-gateway":t,seidat:t,senseering:t,siteleaf:t,mafelo:t,myspreadshop:t,"vps-host":[2,{jelastic:[0,{atl:t,njs:t,ric:t}]}],srcf:[0,{soc:t,user:t}],supabase:t,dsmynas:t,familyds:t,ts:[2,{c:s}],torproject:[2,{pages:t}],tunnelmole:t,vusercontent:t,"reserve-online":t,localcert:t,"community-pro":t,meinforum:t,yandexcloud:[2,{storage:t,website:t}],za:t,zabc:t}],nf:[1,{arts:e,com:e,firm:e,info:e,net:e,other:e,per:e,rec:e,store:e,web:e}],ng:[1,{com:e,edu:e,gov:e,i:e,mil:e,mobi:e,name:e,net:e,org:e,sch:e,biz:[2,{co:t,dl:t,go:t,lg:t,on:t}],col:t,firm:t,gen:t,ltd:t,ngo:t,plc:t}],ni:[1,{ac:e,biz:e,co:e,com:e,edu:e,gob:e,in:e,info:e,int:e,mil:e,net:e,nom:e,org:e,web:e}],nl:[1,{co:t,"hosting-cluster":t,gov:t,khplay:t,"123website":t,myspreadshop:t,transurl:s,cistron:t,demon:t}],no:[1,{fhs:e,folkebibl:e,fylkesbibl:e,idrett:e,museum:e,priv:e,vgs:e,dep:e,herad:e,kommune:e,mil:e,stat:e,aa:xe,ah:xe,bu:xe,fm:xe,hl:xe,hm:xe,"jan-mayen":xe,mr:xe,nl:xe,nt:xe,of:xe,ol:xe,oslo:xe,rl:xe,sf:xe,st:xe,svalbard:xe,tm:xe,tr:xe,va:xe,vf:xe,akrehamn:e,"xn--krehamn-dxa":e,åkrehamn:e,algard:e,"xn--lgrd-poac":e,ålgård:e,arna:e,bronnoysund:e,"xn--brnnysund-m8ac":e,brønnøysund:e,brumunddal:e,bryne:e,drobak:e,"xn--drbak-wua":e,drøbak:e,egersund:e,fetsund:e,floro:e,"xn--flor-jra":e,florø:e,fredrikstad:e,hokksund:e,honefoss:e,"xn--hnefoss-q1a":e,hønefoss:e,jessheim:e,jorpeland:e,"xn--jrpeland-54a":e,jørpeland:e,kirkenes:e,kopervik:e,krokstadelva:e,langevag:e,"xn--langevg-jxa":e,langevåg:e,leirvik:e,mjondalen:e,"xn--mjndalen-64a":e,mjøndalen:e,"mo-i-rana":e,mosjoen:e,"xn--mosjen-eya":e,mosjøen:e,nesoddtangen:e,orkanger:e,osoyro:e,"xn--osyro-wua":e,osøyro:e,raholt:e,"xn--rholt-mra":e,råholt:e,sandnessjoen:e,"xn--sandnessjen-ogb":e,sandnessjøen:e,skedsmokorset:e,slattum:e,spjelkavik:e,stathelle:e,stavern:e,stjordalshalsen:e,"xn--stjrdalshalsen-sqb":e,stjørdalshalsen:e,tananger:e,tranby:e,vossevangen:e,aarborte:e,aejrie:e,afjord:e,"xn--fjord-lra":e,åfjord:e,agdenes:e,akershus:vt,aknoluokta:e,"xn--koluokta-7ya57h":e,ákŋoluokta:e,al:e,"xn--l-1fa":e,ål:e,alaheadju:e,"xn--laheadju-7ya":e,álaheadju:e,alesund:e,"xn--lesund-hua":e,ålesund:e,alstahaug:e,alta:e,"xn--lt-liac":e,áltá:e,alvdal:e,amli:e,"xn--mli-tla":e,åmli:e,amot:e,"xn--mot-tla":e,åmot:e,andasuolo:e,andebu:e,andoy:e,"xn--andy-ira":e,andøy:e,ardal:e,"xn--rdal-poa":e,årdal:e,aremark:e,arendal:e,"xn--s-1fa":e,ås:e,aseral:e,"xn--seral-lra":e,åseral:e,asker:e,askim:e,askoy:e,"xn--asky-ira":e,askøy:e,askvoll:e,asnes:e,"xn--snes-poa":e,åsnes:e,audnedaln:e,aukra:e,aure:e,aurland:e,"aurskog-holand":e,"xn--aurskog-hland-jnb":e,"aurskog-høland":e,austevoll:e,austrheim:e,averoy:e,"xn--avery-yua":e,averøy:e,badaddja:e,"xn--bdddj-mrabd":e,bådåddjå:e,"xn--brum-voa":e,bærum:e,bahcavuotna:e,"xn--bhcavuotna-s4a":e,báhcavuotna:e,bahccavuotna:e,"xn--bhccavuotna-k7a":e,báhccavuotna:e,baidar:e,"xn--bidr-5nac":e,báidár:e,bajddar:e,"xn--bjddar-pta":e,bájddar:e,balat:e,"xn--blt-elab":e,bálát:e,balestrand:e,ballangen:e,balsfjord:e,bamble:e,bardu:e,barum:e,batsfjord:e,"xn--btsfjord-9za":e,båtsfjord:e,bearalvahki:e,"xn--bearalvhki-y4a":e,bearalváhki:e,beardu:e,beiarn:e,berg:e,bergen:e,berlevag:e,"xn--berlevg-jxa":e,berlevåg:e,bievat:e,"xn--bievt-0qa":e,bievát:e,bindal:e,birkenes:e,bjerkreim:e,bjugn:e,bodo:e,"xn--bod-2na":e,bodø:e,bokn:e,bomlo:e,"xn--bmlo-gra":e,bømlo:e,bremanger:e,bronnoy:e,"xn--brnny-wuac":e,brønnøy:e,budejju:e,buskerud:vt,bygland:e,bykle:e,cahcesuolo:e,"xn--hcesuolo-7ya35b":e,čáhcesuolo:e,davvenjarga:e,"xn--davvenjrga-y4a":e,davvenjárga:e,davvesiida:e,deatnu:e,dielddanuorri:e,divtasvuodna:e,divttasvuotna:e,donna:e,"xn--dnna-gra":e,dønna:e,dovre:e,drammen:e,drangedal:e,dyroy:e,"xn--dyry-ira":e,dyrøy:e,eid:e,eidfjord:e,eidsberg:e,eidskog:e,eidsvoll:e,eigersund:e,elverum:e,enebakk:e,engerdal:e,etne:e,etnedal:e,evenassi:e,"xn--eveni-0qa01ga":e,evenášši:e,evenes:e,"evje-og-hornnes":e,farsund:e,fauske:e,fedje:e,fet:e,finnoy:e,"xn--finny-yua":e,finnøy:e,fitjar:e,fjaler:e,fjell:e,fla:e,"xn--fl-zia":e,flå:e,flakstad:e,flatanger:e,flekkefjord:e,flesberg:e,flora:e,folldal:e,forde:e,"xn--frde-gra":e,førde:e,forsand:e,fosnes:e,"xn--frna-woa":e,fræna:e,frana:e,frei:e,frogn:e,froland:e,frosta:e,froya:e,"xn--frya-hra":e,frøya:e,fuoisku:e,fuossko:e,fusa:e,fyresdal:e,gaivuotna:e,"xn--givuotna-8ya":e,gáivuotna:e,galsa:e,"xn--gls-elac":e,gálsá:e,gamvik:e,gangaviika:e,"xn--ggaviika-8ya47h":e,gáŋgaviika:e,gaular:e,gausdal:e,giehtavuoatna:e,gildeskal:e,"xn--gildeskl-g0a":e,gildeskål:e,giske:e,gjemnes:e,gjerdrum:e,gjerstad:e,gjesdal:e,gjovik:e,"xn--gjvik-wua":e,gjøvik:e,gloppen:e,gol:e,gran:e,grane:e,granvin:e,gratangen:e,grimstad:e,grong:e,grue:e,gulen:e,guovdageaidnu:e,ha:e,"xn--h-2fa":e,hå:e,habmer:e,"xn--hbmer-xqa":e,hábmer:e,hadsel:e,"xn--hgebostad-g3a":e,hægebostad:e,hagebostad:e,halden:e,halsa:e,hamar:e,hamaroy:e,hammarfeasta:e,"xn--hmmrfeasta-s4ac":e,hámmárfeasta:e,hammerfest:e,hapmir:e,"xn--hpmir-xqa":e,hápmir:e,haram:e,hareid:e,harstad:e,hasvik:e,hattfjelldal:e,haugesund:e,hedmark:[0,{os:e,valer:e,"xn--vler-qoa":e,våler:e}],hemne:e,hemnes:e,hemsedal:e,hitra:e,hjartdal:e,hjelmeland:e,hobol:e,"xn--hobl-ira":e,hobøl:e,hof:e,hol:e,hole:e,holmestrand:e,holtalen:e,"xn--holtlen-hxa":e,holtålen:e,hordaland:[0,{os:e}],hornindal:e,horten:e,hoyanger:e,"xn--hyanger-q1a":e,høyanger:e,hoylandet:e,"xn--hylandet-54a":e,høylandet:e,hurdal:e,hurum:e,hvaler:e,hyllestad:e,ibestad:e,inderoy:e,"xn--indery-fya":e,inderøy:e,iveland:e,ivgu:e,jevnaker:e,jolster:e,"xn--jlster-bya":e,jølster:e,jondal:e,kafjord:e,"xn--kfjord-iua":e,kåfjord:e,karasjohka:e,"xn--krjohka-hwab49j":e,kárášjohka:e,karasjok:e,karlsoy:e,karmoy:e,"xn--karmy-yua":e,karmøy:e,kautokeino:e,klabu:e,"xn--klbu-woa":e,klæbu:e,klepp:e,kongsberg:e,kongsvinger:e,kraanghke:e,"xn--kranghke-b0a":e,kråanghke:e,kragero:e,"xn--krager-gya":e,kragerø:e,kristiansand:e,kristiansund:e,krodsherad:e,"xn--krdsherad-m8a":e,krødsherad:e,"xn--kvfjord-nxa":e,kvæfjord:e,"xn--kvnangen-k0a":e,kvænangen:e,kvafjord:e,kvalsund:e,kvam:e,kvanangen:e,kvinesdal:e,kvinnherad:e,kviteseid:e,kvitsoy:e,"xn--kvitsy-fya":e,kvitsøy:e,laakesvuemie:e,"xn--lrdal-sra":e,lærdal:e,lahppi:e,"xn--lhppi-xqa":e,láhppi:e,lardal:e,larvik:e,lavagis:e,lavangen:e,leangaviika:e,"xn--leagaviika-52b":e,leaŋgaviika:e,lebesby:e,leikanger:e,leirfjord:e,leka:e,leksvik:e,lenvik:e,lerdal:e,lesja:e,levanger:e,lier:e,lierne:e,lillehammer:e,lillesand:e,lindas:e,"xn--linds-pra":e,lindås:e,lindesnes:e,loabat:e,"xn--loabt-0qa":e,loabát:e,lodingen:e,"xn--ldingen-q1a":e,lødingen:e,lom:e,loppa:e,lorenskog:e,"xn--lrenskog-54a":e,lørenskog:e,loten:e,"xn--lten-gra":e,løten:e,lund:e,lunner:e,luroy:e,"xn--lury-ira":e,lurøy:e,luster:e,lyngdal:e,lyngen:e,malatvuopmi:e,"xn--mlatvuopmi-s4a":e,málatvuopmi:e,malselv:e,"xn--mlselv-iua":e,målselv:e,malvik:e,mandal:e,marker:e,marnardal:e,masfjorden:e,masoy:e,"xn--msy-ula0h":e,måsøy:e,"matta-varjjat":e,"xn--mtta-vrjjat-k7af":e,"mátta-várjjat":e,meland:e,meldal:e,melhus:e,meloy:e,"xn--mely-ira":e,meløy:e,meraker:e,"xn--merker-kua":e,meråker:e,midsund:e,"midtre-gauldal":e,moareke:e,"xn--moreke-jua":e,moåreke:e,modalen:e,modum:e,molde:e,"more-og-romsdal":[0,{heroy:e,sande:e}],"xn--mre-og-romsdal-qqb":[0,{"xn--hery-ira":e,sande:e}],"møre-og-romsdal":[0,{herøy:e,sande:e}],moskenes:e,moss:e,muosat:e,"xn--muost-0qa":e,muosát:e,naamesjevuemie:e,"xn--nmesjevuemie-tcba":e,nååmesjevuemie:e,"xn--nry-yla5g":e,nærøy:e,namdalseid:e,namsos:e,namsskogan:e,nannestad:e,naroy:e,narviika:e,narvik:e,naustdal:e,navuotna:e,"xn--nvuotna-hwa":e,návuotna:e,"nedre-eiker":e,nesna:e,nesodden:e,nesseby:e,nesset:e,nissedal:e,nittedal:e,"nord-aurdal":e,"nord-fron":e,"nord-odal":e,norddal:e,nordkapp:e,nordland:[0,{bo:e,"xn--b-5ga":e,bø:e,heroy:e,"xn--hery-ira":e,herøy:e}],"nordre-land":e,nordreisa:e,"nore-og-uvdal":e,notodden:e,notteroy:e,"xn--nttery-byae":e,nøtterøy:e,odda:e,oksnes:e,"xn--ksnes-uua":e,øksnes:e,omasvuotna:e,oppdal:e,oppegard:e,"xn--oppegrd-ixa":e,oppegård:e,orkdal:e,orland:e,"xn--rland-uua":e,ørland:e,orskog:e,"xn--rskog-uua":e,ørskog:e,orsta:e,"xn--rsta-fra":e,ørsta:e,osen:e,osteroy:e,"xn--ostery-fya":e,osterøy:e,ostfold:[0,{valer:e}],"xn--stfold-9xa":[0,{"xn--vler-qoa":e}],østfold:[0,{våler:e}],"ostre-toten":e,"xn--stre-toten-zcb":e,"østre-toten":e,overhalla:e,"ovre-eiker":e,"xn--vre-eiker-k8a":e,"øvre-eiker":e,oyer:e,"xn--yer-zna":e,øyer:e,oygarden:e,"xn--ygarden-p1a":e,øygarden:e,"oystre-slidre":e,"xn--ystre-slidre-ujb":e,"øystre-slidre":e,porsanger:e,porsangu:e,"xn--porsgu-sta26f":e,porsáŋgu:e,porsgrunn:e,rade:e,"xn--rde-ula":e,råde:e,radoy:e,"xn--rady-ira":e,radøy:e,"xn--rlingen-mxa":e,rælingen:e,rahkkeravju:e,"xn--rhkkervju-01af":e,ráhkkerávju:e,raisa:e,"xn--risa-5na":e,ráisa:e,rakkestad:e,ralingen:e,rana:e,randaberg:e,rauma:e,rendalen:e,rennebu:e,rennesoy:e,"xn--rennesy-v1a":e,rennesøy:e,rindal:e,ringebu:e,ringerike:e,ringsaker:e,risor:e,"xn--risr-ira":e,risør:e,rissa:e,roan:e,rodoy:e,"xn--rdy-0nab":e,rødøy:e,rollag:e,romsa:e,romskog:e,"xn--rmskog-bya":e,rømskog:e,roros:e,"xn--rros-gra":e,røros:e,rost:e,"xn--rst-0na":e,røst:e,royken:e,"xn--ryken-vua":e,røyken:e,royrvik:e,"xn--ryrvik-bya":e,røyrvik:e,ruovat:e,rygge:e,salangen:e,salat:e,"xn--slat-5na":e,sálat:e,"xn--slt-elab":e,sálát:e,saltdal:e,samnanger:e,sandefjord:e,sandnes:e,sandoy:e,"xn--sandy-yua":e,sandøy:e,sarpsborg:e,sauda:e,sauherad:e,sel:e,selbu:e,selje:e,seljord:e,siellak:e,sigdal:e,siljan:e,sirdal:e,skanit:e,"xn--sknit-yqa":e,skánit:e,skanland:e,"xn--sknland-fxa":e,skånland:e,skaun:e,skedsmo:e,ski:e,skien:e,skierva:e,"xn--skierv-uta":e,skiervá:e,skiptvet:e,skjak:e,"xn--skjk-soa":e,skjåk:e,skjervoy:e,"xn--skjervy-v1a":e,skjervøy:e,skodje:e,smola:e,"xn--smla-hra":e,smøla:e,snaase:e,"xn--snase-nra":e,snåase:e,snasa:e,"xn--snsa-roa":e,snåsa:e,snillfjord:e,snoasa:e,sogndal:e,sogne:e,"xn--sgne-gra":e,søgne:e,sokndal:e,sola:e,solund:e,somna:e,"xn--smna-gra":e,sømna:e,"sondre-land":e,"xn--sndre-land-0cb":e,"søndre-land":e,songdalen:e,"sor-aurdal":e,"xn--sr-aurdal-l8a":e,"sør-aurdal":e,"sor-fron":e,"xn--sr-fron-q1a":e,"sør-fron":e,"sor-odal":e,"xn--sr-odal-q1a":e,"sør-odal":e,"sor-varanger":e,"xn--sr-varanger-ggb":e,"sør-varanger":e,sorfold:e,"xn--srfold-bya":e,sørfold:e,sorreisa:e,"xn--srreisa-q1a":e,sørreisa:e,sortland:e,sorum:e,"xn--srum-gra":e,sørum:e,spydeberg:e,stange:e,stavanger:e,steigen:e,steinkjer:e,stjordal:e,"xn--stjrdal-s1a":e,stjørdal:e,stokke:e,"stor-elvdal":e,stord:e,stordal:e,storfjord:e,strand:e,stranda:e,stryn:e,sula:e,suldal:e,sund:e,sunndal:e,surnadal:e,sveio:e,svelvik:e,sykkylven:e,tana:e,telemark:[0,{bo:e,"xn--b-5ga":e,bø:e}],time:e,tingvoll:e,tinn:e,tjeldsund:e,tjome:e,"xn--tjme-hra":e,tjøme:e,tokke:e,tolga:e,tonsberg:e,"xn--tnsberg-q1a":e,tønsberg:e,torsken:e,"xn--trna-woa":e,træna:e,trana:e,tranoy:e,"xn--trany-yua":e,tranøy:e,troandin:e,trogstad:e,"xn--trgstad-r1a":e,trøgstad:e,tromsa:e,tromso:e,"xn--troms-zua":e,tromsø:e,trondheim:e,trysil:e,tvedestrand:e,tydal:e,tynset:e,tysfjord:e,tysnes:e,"xn--tysvr-vra":e,tysvær:e,tysvar:e,ullensaker:e,ullensvang:e,ulvik:e,unjarga:e,"xn--unjrga-rta":e,unjárga:e,utsira:e,vaapste:e,vadso:e,"xn--vads-jra":e,vadsø:e,"xn--vry-yla5g":e,værøy:e,vaga:e,"xn--vg-yiab":e,vågå:e,vagan:e,"xn--vgan-qoa":e,vågan:e,vagsoy:e,"xn--vgsy-qoa0j":e,vågsøy:e,vaksdal:e,valle:e,vang:e,vanylven:e,vardo:e,"xn--vard-jra":e,vardø:e,varggat:e,"xn--vrggt-xqad":e,várggát:e,varoy:e,vefsn:e,vega:e,vegarshei:e,"xn--vegrshei-c0a":e,vegårshei:e,vennesla:e,verdal:e,verran:e,vestby:e,vestfold:[0,{sande:e}],vestnes:e,"vestre-slidre":e,"vestre-toten":e,vestvagoy:e,"xn--vestvgy-ixa6o":e,vestvågøy:e,vevelstad:e,vik:e,vikna:e,vindafjord:e,voagat:e,volda:e,voss:e,co:t,"123hjemmeside":t,myspreadshop:t}],np:k,nr:pn,nu:[1,{merseine:t,mine:t,shacknet:t,enterprisecloud:t}],nz:[1,{ac:e,co:e,cri:e,geek:e,gen:e,govt:e,health:e,iwi:e,kiwi:e,maori:e,"xn--mori-qsa":e,māori:e,mil:e,net:e,org:e,parliament:e,school:e,cloudns:t}],om:[1,{co:e,com:e,edu:e,gov:e,med:e,museum:e,net:e,org:e,pro:e}],onion:e,org:[1,{altervista:t,pimienta:t,poivron:t,potager:t,sweetpepper:t,cdn77:[0,{c:t,rsc:t}],"cdn77-secure":[0,{origin:[0,{ssl:t}]}],ae:t,cloudns:t,"ip-dynamic":t,ddnss:t,dpdns:t,duckdns:t,tunk:t,blogdns:t,blogsite:t,boldlygoingnowhere:t,dnsalias:t,dnsdojo:t,doesntexist:t,dontexist:t,doomdns:t,dvrdns:t,dynalias:t,dyndns:[2,{go:t,home:t}],endofinternet:t,endoftheinternet:t,"from-me":t,"game-host":t,gotdns:t,"hobby-site":t,homedns:t,homeftp:t,homelinux:t,homeunix:t,"is-a-bruinsfan":t,"is-a-candidate":t,"is-a-celticsfan":t,"is-a-chef":t,"is-a-geek":t,"is-a-knight":t,"is-a-linux-user":t,"is-a-patsfan":t,"is-a-soxfan":t,"is-found":t,"is-lost":t,"is-saved":t,"is-very-bad":t,"is-very-evil":t,"is-very-good":t,"is-very-nice":t,"is-very-sweet":t,"isa-geek":t,"kicks-ass":t,misconfused:t,podzone:t,readmyblog:t,selfip:t,sellsyourhome:t,servebbs:t,serveftp:t,servegame:t,"stuff-4-sale":t,webhop:t,accesscam:t,camdvr:t,freeddns:t,mywire:t,roxa:t,webredirect:t,twmail:t,eu:[2,{al:t,asso:t,at:t,au:t,be:t,bg:t,ca:t,cd:t,ch:t,cn:t,cy:t,cz:t,de:t,dk:t,edu:t,ee:t,es:t,fi:t,fr:t,gr:t,hr:t,hu:t,ie:t,il:t,in:t,int:t,is:t,it:t,jp:t,kr:t,lt:t,lu:t,lv:t,me:t,mk:t,mt:t,my:t,net:t,ng:t,nl:t,no:t,nz:t,pl:t,pt:t,ro:t,ru:t,se:t,si:t,sk:t,tr:t,uk:t,us:t}],fedorainfracloud:t,fedorapeople:t,fedoraproject:[0,{cloud:t,os:ge,stg:[0,{os:ge}]}],freedesktop:t,hatenadiary:t,hepforge:t,"in-dsl":t,"in-vpn":t,js:t,barsy:t,mayfirst:t,routingthecloud:t,bmoattachments:t,"cable-modem":t,collegefan:t,couchpotatofries:t,hopto:t,mlbfan:t,myftp:t,mysecuritycamera:t,nflfan:t,"no-ip":t,"read-books":t,ufcfan:t,zapto:t,dynserv:t,"now-dns":t,"is-local":t,httpbin:t,pubtls:t,jpn:t,"my-firewall":t,myfirewall:t,spdns:t,"small-web":t,dsmynas:t,familyds:t,teckids:zr,tuxfamily:t,hk:t,us:t,toolforge:t,wmcloud:[2,{beta:t}],wmflabs:t,za:t}],pa:[1,{abo:e,ac:e,com:e,edu:e,gob:e,ing:e,med:e,net:e,nom:e,org:e,sld:e}],pe:[1,{com:e,edu:e,gob:e,mil:e,net:e,nom:e,org:e}],pf:[1,{com:e,edu:e,org:e}],pg:k,ph:[1,{com:e,edu:e,gov:e,i:e,mil:e,net:e,ngo:e,org:e,cloudns:t}],pk:[1,{ac:e,biz:e,com:e,edu:e,fam:e,gkp:e,gob:e,gog:e,gok:e,gop:e,gos:e,gov:e,net:e,org:e,web:e}],pl:[1,{com:e,net:e,org:e,agro:e,aid:e,atm:e,auto:e,biz:e,edu:e,gmina:e,gsm:e,info:e,mail:e,media:e,miasta:e,mil:e,nieruchomosci:e,nom:e,pc:e,powiat:e,priv:e,realestate:e,rel:e,sex:e,shop:e,sklep:e,sos:e,szkola:e,targi:e,tm:e,tourism:e,travel:e,turystyka:e,gov:[1,{ap:e,griw:e,ic:e,is:e,kmpsp:e,konsulat:e,kppsp:e,kwp:e,kwpsp:e,mup:e,mw:e,oia:e,oirm:e,oke:e,oow:e,oschr:e,oum:e,pa:e,pinb:e,piw:e,po:e,pr:e,psp:e,psse:e,pup:e,rzgw:e,sa:e,sdn:e,sko:e,so:e,sr:e,starostwo:e,ug:e,ugim:e,um:e,umig:e,upow:e,uppo:e,us:e,uw:e,uzs:e,wif:e,wiih:e,winb:e,wios:e,witd:e,wiw:e,wkz:e,wsa:e,wskr:e,wsse:e,wuoz:e,wzmiuw:e,zp:e,zpisdn:e}],augustow:e,"babia-gora":e,bedzin:e,beskidy:e,bialowieza:e,bialystok:e,bielawa:e,bieszczady:e,boleslawiec:e,bydgoszcz:e,bytom:e,cieszyn:e,czeladz:e,czest:e,dlugoleka:e,elblag:e,elk:e,glogow:e,gniezno:e,gorlice:e,grajewo:e,ilawa:e,jaworzno:e,"jelenia-gora":e,jgora:e,kalisz:e,karpacz:e,kartuzy:e,kaszuby:e,katowice:e,"kazimierz-dolny":e,kepno:e,ketrzyn:e,klodzko:e,kobierzyce:e,kolobrzeg:e,konin:e,konskowola:e,kutno:e,lapy:e,lebork:e,legnica:e,lezajsk:e,limanowa:e,lomza:e,lowicz:e,lubin:e,lukow:e,malbork:e,malopolska:e,mazowsze:e,mazury:e,mielec:e,mielno:e,mragowo:e,naklo:e,nowaruda:e,nysa:e,olawa:e,olecko:e,olkusz:e,olsztyn:e,opoczno:e,opole:e,ostroda:e,ostroleka:e,ostrowiec:e,ostrowwlkp:e,pila:e,pisz:e,podhale:e,podlasie:e,polkowice:e,pomorskie:e,pomorze:e,prochowice:e,pruszkow:e,przeworsk:e,pulawy:e,radom:e,"rawa-maz":e,rybnik:e,rzeszow:e,sanok:e,sejny:e,skoczow:e,slask:e,slupsk:e,sosnowiec:e,"stalowa-wola":e,starachowice:e,stargard:e,suwalki:e,swidnica:e,swiebodzin:e,swinoujscie:e,szczecin:e,szczytno:e,tarnobrzeg:e,tgory:e,turek:e,tychy:e,ustka:e,walbrzych:e,warmia:e,warszawa:e,waw:e,wegrow:e,wielun:e,wlocl:e,wloclawek:e,wodzislaw:e,wolomin:e,wroclaw:e,zachpomor:e,zagan:e,zarow:e,zgora:e,zgorzelec:e,art:t,gliwice:t,krakow:t,poznan:t,wroc:t,zakopane:t,beep:t,"ecommerce-shop":t,cfolks:t,dfirma:t,dkonto:t,you2:t,shoparena:t,homesklep:t,sdscloud:t,unicloud:t,lodz:t,pabianice:t,plock:t,sieradz:t,skierniewice:t,zgierz:t,krasnik:t,leczna:t,lubartow:t,lublin:t,poniatowa:t,swidnik:t,co:t,torun:t,simplesite:t,myspreadshop:t,gda:t,gdansk:t,gdynia:t,med:t,sopot:t,bielsko:t}],pm:[1,{own:t,name:t}],pn:[1,{co:e,edu:e,gov:e,net:e,org:e}],post:e,pr:[1,{biz:e,com:e,edu:e,gov:e,info:e,isla:e,name:e,net:e,org:e,pro:e,ac:e,est:e,prof:e}],pro:[1,{aaa:e,aca:e,acct:e,avocat:e,bar:e,cpa:e,eng:e,jur:e,law:e,med:e,recht:e,cloudns:t,keenetic:t,barsy:t,ngrok:t}],ps:[1,{com:e,edu:e,gov:e,net:e,org:e,plo:e,sec:e}],pt:[1,{com:e,edu:e,gov:e,int:e,net:e,nome:e,org:e,publ:e,"123paginaweb":t}],pw:[1,{gov:e,cloudns:t,x443:t}],py:[1,{com:e,coop:e,edu:e,gov:e,mil:e,net:e,org:e}],qa:[1,{com:e,edu:e,gov:e,mil:e,name:e,net:e,org:e,sch:e}],re:[1,{asso:e,com:e,netlib:t,can:t}],ro:[1,{arts:e,com:e,firm:e,info:e,nom:e,nt:e,org:e,rec:e,store:e,tm:e,www:e,co:t,shop:t,barsy:t}],rs:[1,{ac:e,co:e,edu:e,gov:e,in:e,org:e,brendly:_,barsy:t,ox:t}],ru:[1,{ac:t,edu:t,gov:t,int:t,mil:t,eurodir:t,adygeya:t,bashkiria:t,bir:t,cbg:t,com:t,dagestan:t,grozny:t,kalmykia:t,kustanai:t,marine:t,mordovia:t,msk:t,mytis:t,nalchik:t,nov:t,pyatigorsk:t,spb:t,vladikavkaz:t,vladimir:t,na4u:t,mircloud:t,myjino:[2,{hosting:s,landing:s,spectrum:s,vps:s}],cldmail:[0,{hb:t}],mcdir:[2,{vps:t}],mcpre:t,net:t,org:t,pp:t,ras:t}],rw:[1,{ac:e,co:e,coop:e,gov:e,mil:e,net:e,org:e}],sa:[1,{com:e,edu:e,gov:e,med:e,net:e,org:e,pub:e,sch:e}],sb:n,sc:n,sd:[1,{com:e,edu:e,gov:e,info:e,med:e,net:e,org:e,tv:e}],se:[1,{a:e,ac:e,b:e,bd:e,brand:e,c:e,d:e,e,f:e,fh:e,fhsk:e,fhv:e,g:e,h:e,i:e,k:e,komforb:e,kommunalforbund:e,komvux:e,l:e,lanbib:e,m:e,n:e,naturbruksgymn:e,o:e,org:e,p:e,parti:e,pp:e,press:e,r:e,s:e,t:e,tm:e,u:e,w:e,x:e,y:e,z:e,com:t,iopsys:t,"123minsida":t,itcouldbewor:t,myspreadshop:t}],sg:[1,{com:e,edu:e,gov:e,net:e,org:e,enscaled:t}],sh:[1,{com:e,gov:e,mil:e,net:e,org:e,hashbang:t,botda:t,lovable:t,platform:[0,{ent:t,eu:t,us:t}],teleport:t,now:t}],si:[1,{f5:t,gitapp:t,gitpage:t}],sj:e,sk:[1,{org:e}],sl:n,sm:e,sn:[1,{art:e,com:e,edu:e,gouv:e,org:e,univ:e}],so:[1,{com:e,edu:e,gov:e,me:e,net:e,org:e,surveys:t}],sr:e,ss:[1,{biz:e,co:e,com:e,edu:e,gov:e,me:e,net:e,org:e,sch:e}],st:[1,{co:e,com:e,consulado:e,edu:e,embaixada:e,mil:e,net:e,org:e,principe:e,saotome:e,store:e,helioho:t,cn:s,kirara:t,noho:t}],su:[1,{abkhazia:t,adygeya:t,aktyubinsk:t,arkhangelsk:t,armenia:t,ashgabad:t,azerbaijan:t,balashov:t,bashkiria:t,bryansk:t,bukhara:t,chimkent:t,dagestan:t,"east-kazakhstan":t,exnet:t,georgia:t,grozny:t,ivanovo:t,jambyl:t,kalmykia:t,kaluga:t,karacol:t,karaganda:t,karelia:t,khakassia:t,krasnodar:t,kurgan:t,kustanai:t,lenug:t,mangyshlak:t,mordovia:t,msk:t,murmansk:t,nalchik:t,navoi:t,"north-kazakhstan":t,nov:t,obninsk:t,penza:t,pokrovsk:t,sochi:t,spb:t,tashkent:t,termez:t,togliatti:t,troitsk:t,tselinograd:t,tula:t,tuva:t,vladikavkaz:t,vladimir:t,vologda:t}],sv:[1,{com:e,edu:e,gob:e,org:e,red:e}],sx:c,sy:r,sz:[1,{ac:e,co:e,org:e}],tc:e,td:e,tel:e,tf:[1,{sch:t}],tg:e,th:[1,{ac:e,co:e,go:e,in:e,mi:e,net:e,or:e,online:t,shop:t}],tj:[1,{ac:e,biz:e,co:e,com:e,edu:e,go:e,gov:e,int:e,mil:e,name:e,net:e,nic:e,org:e,test:e,web:e}],tk:e,tl:c,tm:[1,{co:e,com:e,edu:e,gov:e,mil:e,net:e,nom:e,org:e}],tn:[1,{com:e,ens:e,fin:e,gov:e,ind:e,info:e,intl:e,mincom:e,nat:e,net:e,org:e,perso:e,tourism:e,orangecloud:t}],to:[1,{611:t,com:e,edu:e,gov:e,mil:e,net:e,org:e,oya:t,x0:t,quickconnect:z,vpnplus:t,nett:t}],tr:[1,{av:e,bbs:e,bel:e,biz:e,com:e,dr:e,edu:e,gen:e,gov:e,info:e,k12:e,kep:e,mil:e,name:e,net:e,org:e,pol:e,tel:e,tsk:e,tv:e,web:e,nc:c}],tt:[1,{biz:e,co:e,com:e,edu:e,gov:e,info:e,mil:e,name:e,net:e,org:e,pro:e}],tv:[1,{"better-than":t,dyndns:t,"on-the-web":t,"worse-than":t,from:t,sakura:t}],tw:[1,{club:e,com:[1,{mymailer:t}],ebiz:e,edu:e,game:e,gov:e,idv:e,mil:e,net:e,org:e,url:t,mydns:t}],tz:[1,{ac:e,co:e,go:e,hotel:e,info:e,me:e,mil:e,mobi:e,ne:e,or:e,sc:e,tv:e}],ua:[1,{com:e,edu:e,gov:e,in:e,net:e,org:e,cherkassy:e,cherkasy:e,chernigov:e,chernihiv:e,chernivtsi:e,chernovtsy:e,ck:e,cn:e,cr:e,crimea:e,cv:e,dn:e,dnepropetrovsk:e,dnipropetrovsk:e,donetsk:e,dp:e,if:e,"ivano-frankivsk":e,kh:e,kharkiv:e,kharkov:e,kherson:e,khmelnitskiy:e,khmelnytskyi:e,kiev:e,kirovograd:e,km:e,kr:e,kropyvnytskyi:e,krym:e,ks:e,kv:e,kyiv:e,lg:e,lt:e,lugansk:e,luhansk:e,lutsk:e,lv:e,lviv:e,mk:e,mykolaiv:e,nikolaev:e,od:e,odesa:e,odessa:e,pl:e,poltava:e,rivne:e,rovno:e,rv:e,sb:e,sebastopol:e,sevastopol:e,sm:e,sumy:e,te:e,ternopil:e,uz:e,uzhgorod:e,uzhhorod:e,vinnica:e,vinnytsia:e,vn:e,volyn:e,yalta:e,zakarpattia:e,zaporizhzhe:e,zaporizhzhia:e,zhitomir:e,zhytomyr:e,zp:e,zt:e,cc:t,inf:t,ltd:t,cx:t,biz:t,co:t,pp:t,v:t}],ug:[1,{ac:e,co:e,com:e,edu:e,go:e,gov:e,mil:e,ne:e,or:e,org:e,sc:e,us:e}],uk:[1,{ac:e,co:[1,{bytemark:[0,{dh:t,vm:t}],layershift:q,barsy:t,barsyonline:t,retrosnub:At,"nh-serv":t,"no-ip":t,adimo:t,myspreadshop:t}],gov:[1,{api:t,campaign:t,service:t}],ltd:e,me:e,net:e,nhs:e,org:[1,{glug:t,lug:t,lugs:t,affinitylottery:t,raffleentry:t,weeklylottery:t}],plc:e,police:e,sch:k,conn:t,copro:t,hosp:t,"independent-commission":t,"independent-inquest":t,"independent-inquiry":t,"independent-panel":t,"independent-review":t,"public-inquiry":t,"royal-commission":t,pymnt:t,barsy:t,nimsite:t,oraclegovcloudapps:s}],us:[1,{dni:e,isa:e,nsn:e,ak:Pe,al:Pe,ar:Pe,as:Pe,az:Pe,ca:Pe,co:Pe,ct:Pe,dc:Pe,de:Ci,fl:Pe,ga:Pe,gu:Pe,hi:Ur,ia:Pe,id:Pe,il:Pe,in:Pe,ks:Pe,ky:Pe,la:Pe,ma:[1,{k12:[1,{chtr:e,paroch:e,pvt:e}],cc:e,lib:e}],md:Pe,me:Pe,mi:[1,{k12:e,cc:e,lib:e,"ann-arbor":e,cog:e,dst:e,eaton:e,gen:e,mus:e,tec:e,washtenaw:e}],mn:Pe,mo:Pe,ms:[1,{k12:e,cc:e}],mt:Pe,nc:Pe,nd:Ur,ne:Pe,nh:Pe,nj:Pe,nm:Pe,nv:Pe,ny:Pe,oh:Pe,ok:Pe,or:Pe,pa:Pe,pr:Pe,ri:Ur,sc:Pe,sd:Ur,tn:Pe,tx:Pe,ut:Pe,va:Pe,vi:Pe,vt:Pe,wa:Pe,wi:Pe,wv:Ci,wy:Pe,cloudns:t,"is-by":t,"land-4-sale":t,"stuff-4-sale":t,heliohost:t,enscaled:[0,{phx:t}],mircloud:t,"azure-api":t,azurewebsites:t,ngo:t,golffan:t,noip:t,pointto:t,freeddns:t,srv:[2,{gh:t,gl:t}],servername:t}],uy:[1,{com:e,edu:e,gub:e,mil:e,net:e,org:e,gv:t}],uz:[1,{co:e,com:e,net:e,org:e}],va:e,vc:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,gv:[2,{d:t}],"0e":s,mydns:t}],ve:[1,{arts:e,bib:e,co:e,com:e,e12:e,edu:e,emprende:e,firm:e,gob:e,gov:e,ia:e,info:e,int:e,mil:e,net:e,nom:e,org:e,rar:e,rec:e,store:e,tec:e,web:e}],vg:[1,{edu:e}],vi:[1,{co:e,com:e,k12:e,net:e,org:e}],vn:[1,{ac:e,ai:e,biz:e,com:e,edu:e,gov:e,health:e,id:e,info:e,int:e,io:e,name:e,net:e,org:e,pro:e,angiang:e,bacgiang:e,backan:e,baclieu:e,bacninh:e,"baria-vungtau":e,bentre:e,binhdinh:e,binhduong:e,binhphuoc:e,binhthuan:e,camau:e,cantho:e,caobang:e,daklak:e,daknong:e,danang:e,dienbien:e,dongnai:e,dongthap:e,gialai:e,hagiang:e,haiduong:e,haiphong:e,hanam:e,hanoi:e,hatinh:e,haugiang:e,hoabinh:e,hue:e,hungyen:e,khanhhoa:e,kiengiang:e,kontum:e,laichau:e,lamdong:e,langson:e,laocai:e,longan:e,namdinh:e,nghean:e,ninhbinh:e,ninhthuan:e,phutho:e,phuyen:e,quangbinh:e,quangnam:e,quangngai:e,quangninh:e,quangtri:e,soctrang:e,sonla:e,tayninh:e,thaibinh:e,thainguyen:e,thanhhoa:e,thanhphohochiminh:e,thuathienhue:e,tiengiang:e,travinh:e,tuyenquang:e,vinhlong:e,vinhphuc:e,yenbai:e}],vu:Re,wf:[1,{biz:t,sch:t}],ws:[1,{com:e,edu:e,gov:e,net:e,org:e,advisor:s,cloud66:t,dyndns:t,mypets:t}],yt:[1,{org:t}],"xn--mgbaam7a8h":e,امارات:e,"xn--y9a3aq":e,հայ:e,"xn--54b7fta0cc":e,বাংলা:e,"xn--90ae":e,бг:e,"xn--mgbcpq6gpa1a":e,البحرين:e,"xn--90ais":e,бел:e,"xn--fiqs8s":e,中国:e,"xn--fiqz9s":e,中國:e,"xn--lgbbat1ad8j":e,الجزائر:e,"xn--wgbh1c":e,مصر:e,"xn--e1a4c":e,ею:e,"xn--qxa6a":e,ευ:e,"xn--mgbah1a3hjkrd":e,موريتانيا:e,"xn--node":e,გე:e,"xn--qxam":e,ελ:e,"xn--j6w193g":[1,{"xn--gmqw5a":e,"xn--55qx5d":e,"xn--mxtq1m":e,"xn--wcvs22d":e,"xn--uc0atv":e,"xn--od0alg":e}],香港:[1,{個人:e,公司:e,政府:e,教育:e,組織:e,網絡:e}],"xn--2scrj9c":e,ಭಾರತ:e,"xn--3hcrj9c":e,ଭାରତ:e,"xn--45br5cyl":e,ভাৰত:e,"xn--h2breg3eve":e,भारतम्:e,"xn--h2brj9c8c":e,भारोत:e,"xn--mgbgu82a":e,ڀارت:e,"xn--rvc1e0am3e":e,ഭാരതം:e,"xn--h2brj9c":e,भारत:e,"xn--mgbbh1a":e,بارت:e,"xn--mgbbh1a71e":e,بھارت:e,"xn--fpcrj9c3d":e,భారత్:e,"xn--gecrj9c":e,ભારત:e,"xn--s9brj9c":e,ਭਾਰਤ:e,"xn--45brj9c":e,ভারত:e,"xn--xkc2dl3a5ee0h":e,இந்தியா:e,"xn--mgba3a4f16a":e,ایران:e,"xn--mgba3a4fra":e,ايران:e,"xn--mgbtx2b":e,عراق:e,"xn--mgbayh7gpa":e,الاردن:e,"xn--3e0b707e":e,한국:e,"xn--80ao21a":e,қаз:e,"xn--q7ce6a":e,ລາວ:e,"xn--fzc2c9e2c":e,ලංකා:e,"xn--xkc2al3hye2a":e,இலங்கை:e,"xn--mgbc0a9azcg":e,المغرب:e,"xn--d1alf":e,мкд:e,"xn--l1acc":e,мон:e,"xn--mix891f":e,澳門:e,"xn--mix082f":e,澳门:e,"xn--mgbx4cd0ab":e,مليسيا:e,"xn--mgb9awbf":e,عمان:e,"xn--mgbai9azgqp6j":e,پاکستان:e,"xn--mgbai9a5eva00b":e,پاكستان:e,"xn--ygbi2ammx":e,فلسطين:e,"xn--90a3ac":[1,{"xn--80au":e,"xn--90azh":e,"xn--d1at":e,"xn--c1avg":e,"xn--o1ac":e,"xn--o1ach":e}],срб:[1,{ак:e,обр:e,од:e,орг:e,пр:e,упр:e}],"xn--p1ai":e,рф:e,"xn--wgbl6a":e,قطر:e,"xn--mgberp4a5d4ar":e,السعودية:e,"xn--mgberp4a5d4a87g":e,السعودیة:e,"xn--mgbqly7c0a67fbc":e,السعودیۃ:e,"xn--mgbqly7cvafr":e,السعوديه:e,"xn--mgbpl2fh":e,سودان:e,"xn--yfro4i67o":e,新加坡:e,"xn--clchc0ea0b2g2a9gcd":e,சிங்கப்பூர்:e,"xn--ogbpf8fl":e,سورية:e,"xn--mgbtf8fl":e,سوريا:e,"xn--o3cw4h":[1,{"xn--o3cyx2a":e,"xn--12co0c3b4eva":e,"xn--m3ch0j3a":e,"xn--h3cuzk1di":e,"xn--12c1fe0br":e,"xn--12cfi8ixb8l":e}],ไทย:[1,{ทหาร:e,ธุรกิจ:e,เน็ต:e,รัฐบาล:e,ศึกษา:e,องค์กร:e}],"xn--pgbs0dh":e,تونس:e,"xn--kpry57d":e,台灣:e,"xn--kprw13d":e,台湾:e,"xn--nnx388a":e,臺灣:e,"xn--j1amh":e,укр:e,"xn--mgb2ddes":e,اليمن:e,xxx:e,ye:r,za:[0,{ac:e,agric:e,alt:e,co:e,edu:e,gov:e,grondar:e,law:e,mil:e,net:e,ngo:e,nic:e,nis:e,nom:e,org:e,school:e,tm:e,web:e}],zm:[1,{ac:e,biz:e,co:e,com:e,edu:e,gov:e,info:e,mil:e,net:e,org:e,sch:e}],zw:[1,{ac:e,co:e,gov:e,mil:e,org:e}],aaa:e,aarp:e,abb:e,abbott:e,abbvie:e,abc:e,able:e,abogado:e,abudhabi:e,academy:[1,{official:t}],accenture:e,accountant:e,accountants:e,aco:e,actor:e,ads:e,adult:e,aeg:e,aetna:e,afl:e,africa:e,agakhan:e,agency:e,aig:e,airbus:e,airforce:e,airtel:e,akdn:e,alibaba:e,alipay:e,allfinanz:e,allstate:e,ally:e,alsace:e,alstom:e,amazon:e,americanexpress:e,americanfamily:e,amex:e,amfam:e,amica:e,amsterdam:e,analytics:e,android:e,anquan:e,anz:e,aol:e,apartments:e,app:[1,{adaptable:t,aiven:t,beget:s,brave:i,clerk:t,clerkstage:t,cloudflare:t,wnext:t,csb:[2,{preview:t}],convex:t,corespeed:t,deta:t,ondigitalocean:t,easypanel:t,encr:[2,{frontend:t}],evervault:a,expo:[2,{staging:t}],edgecompute:t,"on-fleek":t,flutterflow:t,sprites:t,e2b:t,framer:t,gadget:t,github:t,hosted:s,run:[0,{"*":t,mtls:s}],web:t,hackclub:t,hasura:t,onhercules:t,botdash:t,shiptoday:t,leapcell:t,loginline:t,lovable:t,luyani:t,magicpatterns:t,medusajs:t,messerli:t,miren:t,mocha:t,netlify:t,ngrok:t,"ngrok-free":t,developer:s,noop:t,northflank:s,upsun:s,railway:[0,{up:t}],replit:o,nyat:t,snowflake:[0,{"*":t,privatelink:s}],streamlit:t,spawnbase:t,telebit:t,typedream:t,vercel:t,wal:t,wasmer:t,bookonline:t,windsurf:t,base44:t,zeabur:t,zerops:s}],apple:[1,{int:[2,{cloud:[0,{"*":t,r:[0,{"*":t,"ap-north-1":s,"ap-south-1":s,"ap-south-2":s,"eu-central-1":s,"eu-north-1":s,"us-central-1":s,"us-central-2":s,"us-east-1":s,"us-east-2":s,"us-west-1":s,"us-west-2":s,"us-west-3":s}]}]}]}],aquarelle:e,arab:e,aramco:e,archi:e,army:e,art:e,arte:e,asda:e,associates:e,athleta:e,attorney:e,auction:e,audi:e,audible:e,audio:e,auspost:e,author:e,auto:e,autos:e,aws:[1,{on:[0,{"af-south-1":u,"ap-east-1":u,"ap-northeast-1":u,"ap-northeast-2":u,"ap-northeast-3":u,"ap-south-1":u,"ap-south-2":l,"ap-southeast-1":u,"ap-southeast-2":u,"ap-southeast-3":u,"ap-southeast-4":l,"ap-southeast-5":l,"ca-central-1":u,"ca-west-1":l,"eu-central-1":u,"eu-central-2":l,"eu-north-1":u,"eu-south-1":u,"eu-south-2":l,"eu-west-1":u,"eu-west-2":u,"eu-west-3":u,"il-central-1":l,"me-central-1":l,"me-south-1":u,"sa-east-1":u,"us-east-1":u,"us-east-2":u,"us-west-1":u,"us-west-2":u,"ap-southeast-7":d,"mx-central-1":d,"us-gov-east-1":f,"us-gov-west-1":f}],sagemaker:[0,{"ap-northeast-1":m,"ap-northeast-2":m,"ap-south-1":m,"ap-southeast-1":m,"ap-southeast-2":m,"ca-central-1":g,"eu-central-1":m,"eu-west-1":m,"eu-west-2":m,"us-east-1":g,"us-east-2":g,"us-west-2":g,"af-south-1":h,"ap-east-1":h,"ap-northeast-3":h,"ap-south-2":y,"ap-southeast-3":h,"ap-southeast-4":y,"ca-west-1":[0,{notebook:t,"notebook-fips":t}],"eu-central-2":h,"eu-north-1":h,"eu-south-1":h,"eu-south-2":h,"eu-west-3":h,"il-central-1":h,"me-central-1":h,"me-south-1":h,"sa-east-1":h,"us-gov-east-1":p,"us-gov-west-1":p,"us-west-1":[0,{notebook:t,"notebook-fips":t,studio:t}],experiments:s}],repost:[0,{private:s}]}],axa:e,azure:e,baby:e,baidu:e,banamex:e,band:e,bank:e,bar:e,barcelona:e,barclaycard:e,barclays:e,barefoot:e,bargains:e,baseball:e,basketball:[1,{aus:t,nz:t}],bauhaus:e,bayern:e,bbc:e,bbt:e,bbva:e,bcg:e,bcn:e,beats:e,beauty:e,beer:e,berlin:e,best:e,bestbuy:e,bet:e,bharti:e,bible:e,bid:e,bike:e,bing:e,bingo:e,bio:e,black:e,blackfriday:e,blockbuster:e,blog:e,bloomberg:e,blue:e,bms:e,bmw:e,bnpparibas:e,boats:e,boehringer:e,bofa:e,bom:e,bond:e,boo:e,book:e,booking:e,bosch:e,bostik:e,boston:e,bot:e,boutique:e,box:e,bradesco:e,bridgestone:e,broadway:e,broker:e,brother:e,brussels:e,build:[1,{shiptoday:t,v0:t,windsurf:t}],builders:[1,{cloudsite:t}],business:v,buy:e,buzz:e,bzh:e,cab:e,cafe:e,cal:e,call:e,calvinklein:e,cam:e,camera:e,camp:[1,{emf:[0,{at:t}]}],canon:e,capetown:e,capital:e,capitalone:e,car:e,caravan:e,cards:e,care:e,career:e,careers:e,cars:e,casa:[1,{nabu:[0,{ui:t}]}],case:[1,{sav:t}],cash:e,casino:e,catering:e,catholic:e,cba:e,cbn:e,cbre:e,center:e,ceo:e,cern:e,cfa:e,cfd:e,chanel:e,channel:e,charity:e,chase:e,chat:e,cheap:e,chintai:e,christmas:e,chrome:e,church:e,cipriani:e,circle:e,cisco:e,citadel:e,citi:e,citic:e,city:e,claims:e,cleaning:e,click:e,clinic:e,clinique:e,clothing:e,cloud:[1,{antagonist:t,begetcdn:s,convex:S,elementor:t,emergent:t,encoway:[0,{eu:t}],statics:s,ravendb:t,axarnet:[0,{"es-1":t}],diadem:t,jelastic:[0,{vip:t}],jele:t,"jenv-aruba":[0,{aruba:[0,{eur:[0,{it1:t}]}],it1:t}],keliweb:[2,{cs:t}],oxa:[2,{tn:t,uk:t}],primetel:[2,{uk:t}],reclaim:[0,{ca:t,uk:t,us:t}],trendhosting:[0,{ch:t,de:t}],jote:t,jotelulu:t,kuleuven:t,laravel:t,linkyard:t,magentosite:s,matlab:t,observablehq:t,perspecta:t,vapor:t,"on-rancher":s,scw:[0,{baremetal:[0,{"fr-par-1":t,"fr-par-2":t,"nl-ams-1":t}],"fr-par":[0,{cockpit:t,ddl:t,dtwh:t,fnc:[2,{functions:t}],ifr:t,k8s:T,kafk:t,mgdb:t,rdb:t,s3:t,"s3-website":t,scbl:t,whm:t}],instances:[0,{priv:t,pub:t}],k8s:t,"nl-ams":[0,{cockpit:t,ddl:t,dtwh:t,ifr:t,k8s:T,kafk:t,mgdb:t,rdb:t,s3:t,"s3-website":t,scbl:t,whm:t}],"pl-waw":[0,{cockpit:t,ddl:t,dtwh:t,ifr:t,k8s:T,kafk:t,mgdb:t,rdb:t,s3:t,"s3-website":t,scbl:t}],scalebook:t,smartlabeling:t}],servebolt:t,onstackit:[0,{runs:t}],trafficplex:t,"unison-services":t,urown:t,voorloper:t,zap:t}],club:[1,{cloudns:t,jele:t,barsy:t}],clubmed:e,coach:e,codes:[1,{owo:s}],coffee:e,college:e,cologne:e,commbank:e,community:[1,{nog:t,ravendb:t,myforum:t}],company:[1,{mybox:t}],compare:e,computer:e,comsec:e,condos:e,construction:e,consulting:e,contact:e,contractors:e,cooking:e,cool:[1,{elementor:t,de:t}],corsica:e,country:e,coupon:e,coupons:e,courses:e,cpa:e,credit:e,creditcard:e,creditunion:e,cricket:e,crown:e,crs:e,cruise:e,cruises:e,cuisinella:e,cymru:e,cyou:e,dad:e,dance:e,data:e,date:e,dating:e,datsun:e,day:e,dclk:e,dds:e,deal:e,dealer:e,deals:e,degree:e,delivery:e,dell:e,deloitte:e,delta:e,democrat:e,dental:e,dentist:e,desi:e,design:[1,{graphic:t,bss:t}],dev:[1,{myaddr:t,panel:t,bearblog:t,brave:i,lcl:s,lclstage:s,stg:s,stgstage:s,pages:t,r2:t,workers:t,deno:t,"deno-staging":t,deta:t,lp:[2,{api:t,objects:t}],evervault:a,fly:t,githubpreview:t,gateway:s,grebedoc:t,botdash:t,inbrowser:s,"is-a-good":t,iserv:t,leapcell:t,runcontainers:t,localcert:[0,{user:s}],loginline:t,barsy:t,mediatech:t,"mocha-sandbox":t,modx:t,ngrok:t,"ngrok-free":t,"is-a-fullstack":t,"is-cool":t,"is-not-a":t,localplayer:t,xmit:t,"platter-app":t,replit:[2,{archer:t,bones:t,canary:t,global:t,hacker:t,id:t,janeway:t,kim:t,kira:t,kirk:t,odo:t,paris:t,picard:t,pike:t,prerelease:t,reed:t,riker:t,sisko:t,spock:t,staging:t,sulu:t,tarpit:t,teams:t,tucker:t,wesley:t,worf:t}],crm:[0,{aa:s,ab:s,ac:s,ad:s,ae:s,af:s,ci:s,d:s,pa:s,pb:s,pc:s,pd:s,pe:s,pf:s,w:s,wa:s,wb:s,wc:s,wd:s,we:s,wf:s}],erp:se,vercel:t,webhare:s,hrsn:t,"is-a":t}],dhl:e,diamonds:e,diet:e,digital:[1,{cloudapps:[2,{london:t}]}],direct:[1,{libp2p:t}],directory:e,discount:e,discover:e,dish:e,diy:[1,{discourse:t,imagine:t}],dnp:e,docs:e,doctor:e,dog:e,domains:e,dot:e,download:e,drive:e,dtv:e,dubai:e,dupont:e,durban:e,dvag:e,dvr:e,earth:e,eat:e,eco:e,edeka:e,education:v,email:[1,{crisp:[0,{on:t}],intouch:t,tawk:we,tawkto:we}],emerck:e,energy:e,engineer:e,engineering:e,enterprises:e,epson:e,equipment:e,ericsson:e,erni:e,esq:e,estate:[1,{compute:s}],eurovision:e,eus:[1,{party:Fe}],events:[1,{koobin:t,co:t}],exchange:e,expert:e,exposed:e,express:e,extraspace:e,fage:e,fail:e,fairwinds:e,faith:e,family:e,fan:e,fans:e,farm:[1,{storj:t}],farmers:e,fashion:e,fast:e,fedex:e,feedback:e,ferrari:e,ferrero:e,fidelity:e,fido:e,film:e,final:e,finance:e,financial:v,fire:e,firestone:e,firmdale:e,fish:e,fishing:e,fit:e,fitness:e,flickr:e,flights:e,flir:e,florist:e,flowers:e,fly:e,foo:e,food:e,football:e,ford:e,forex:e,forsale:e,forum:e,foundation:e,fox:e,free:e,fresenius:e,frl:e,frogans:e,frontier:e,ftr:e,fujitsu:e,fun:Ie,fund:e,furniture:e,futbol:e,fyi:e,gal:e,gallery:e,gallo:e,gallup:e,game:e,games:[1,{pley:t,sheezy:t}],gap:e,garden:e,gay:[1,{pages:t}],gbiz:e,gdn:[1,{cnpy:t}],gea:e,gent:e,genting:e,george:e,ggee:e,gift:e,gifts:e,gives:e,giving:e,glass:e,gle:e,global:[1,{appwrite:t}],globo:e,gmail:e,gmbh:e,gmo:e,gmx:e,godaddy:e,gold:e,goldpoint:e,golf:e,goodyear:e,goog:[1,{cloud:t,translate:t,usercontent:s}],google:e,gop:e,got:e,grainger:e,graphics:e,gratis:e,green:e,gripe:e,grocery:e,group:[1,{discourse:t}],gucci:e,guge:e,guide:e,guitars:e,guru:e,hair:e,hamburg:e,hangout:e,haus:e,hbo:e,hdfc:e,hdfcbank:e,health:[1,{hra:t}],healthcare:e,help:e,helsinki:e,here:e,hermes:e,hiphop:e,hisamitsu:e,hitachi:e,hiv:e,hkt:e,hockey:e,holdings:e,holiday:e,homedepot:e,homegoods:e,homes:e,homesense:e,honda:e,horse:e,hospital:e,host:[1,{cloudaccess:t,freesite:t,easypanel:t,emergent:t,fastvps:t,myfast:t,gadget:t,tempurl:t,wpmudev:t,iserv:t,jele:t,mircloud:t,bolt:t,wp2:t,half:t}],hosting:[1,{opencraft:t}],hot:e,hotel:e,hotels:e,hotmail:e,house:e,how:e,hsbc:e,hughes:e,hyatt:e,hyundai:e,ibm:e,icbc:e,ice:e,icu:e,ieee:e,ifm:e,ikano:e,imamat:e,imdb:e,immo:e,immobilien:e,inc:e,industries:e,infiniti:e,ing:e,ink:e,institute:e,insurance:e,insure:e,international:e,intuit:e,investments:e,ipiranga:e,irish:e,ismaili:e,ist:e,istanbul:e,itau:e,itv:e,jaguar:e,java:e,jcb:e,jeep:e,jetzt:e,jewelry:e,jio:e,jll:e,jmp:e,jnj:e,joburg:e,jot:e,joy:e,jpmorgan:e,jprs:e,juegos:e,juniper:e,kaufen:e,kddi:e,kerryhotels:e,kerryproperties:e,kfh:e,kia:e,kids:e,kim:e,kindle:e,kitchen:e,kiwi:e,koeln:e,komatsu:e,kosher:e,kpmg:e,kpn:e,krd:[1,{co:t,edu:t}],kred:e,kuokgroup:e,kyoto:e,lacaixa:e,lamborghini:e,lamer:e,land:e,landrover:e,lanxess:e,lasalle:e,lat:e,latino:e,latrobe:e,law:e,lawyer:e,lds:e,lease:e,leclerc:e,lefrak:e,legal:e,lego:e,lexus:e,lgbt:e,lidl:e,life:e,lifeinsurance:e,lifestyle:e,lighting:e,like:e,lilly:e,limited:e,limo:e,lincoln:e,link:[1,{myfritz:t,cyon:t,joinmc:t,dweb:s,inbrowser:s,keenetic:t,nftstorage:Gs,mypep:t,storacha:Gs,w3s:Gs}],live:[1,{aem:t,hlx:t,ewp:s}],living:e,llc:e,llp:e,loan:e,loans:e,locker:e,locus:e,lol:[1,{omg:t}],london:e,lotte:e,lotto:e,love:e,lpl:e,lplfinancial:e,ltd:e,ltda:e,lundbeck:e,luxe:e,luxury:e,madrid:e,maif:e,maison:e,makeup:e,man:e,management:e,mango:e,map:e,market:e,marketing:e,markets:e,marriott:e,marshalls:e,mattel:e,mba:e,mckinsey:e,med:e,media:rs,meet:e,melbourne:e,meme:e,memorial:e,men:e,menu:[1,{barsy:t,barsyonline:t}],merck:e,merckmsd:e,miami:e,microsoft:e,mini:e,mint:e,mit:e,mitsubishi:e,mlb:e,mls:e,mma:e,mobile:e,moda:e,moe:e,moi:e,mom:e,monash:e,money:e,monster:e,mormon:e,mortgage:e,moscow:e,moto:e,motorcycles:e,mov:e,movie:e,msd:e,mtn:e,mtr:e,music:e,nab:e,nagoya:e,navy:e,nba:e,nec:e,netbank:e,netflix:e,network:[1,{aem:t,alces:s,appwrite:t,co:t,arvo:t,azimuth:t,tlon:t}],neustar:e,new:e,news:[1,{noticeable:t}],next:e,nextdirect:e,nexus:e,nfl:e,ngo:e,nhk:e,nico:e,nike:e,nikon:e,ninja:e,nissan:e,nissay:e,nokia:e,norton:e,now:e,nowruz:e,nowtv:e,nra:e,nrw:e,ntt:e,nyc:e,obi:e,observer:e,office:e,okinawa:e,olayan:e,olayangroup:e,ollo:e,omega:e,one:[1,{kin:s,service:t,website:t}],ong:e,onl:e,online:[1,{eero:t,"eero-stage":t,websitebuilder:t,leapcell:t,barsy:t}],ooo:e,open:e,oracle:e,orange:[1,{tech:t}],organic:e,origins:e,osaka:e,otsuka:e,ott:e,ovh:[1,{nerdpol:t}],page:[1,{aem:t,hlx:t,codeberg:t,deuxfleurs:t,mybox:t,heyflow:t,prvcy:t,rocky:t,statichost:t,pdns:t,plesk:t}],panasonic:e,paris:e,pars:e,partners:e,parts:e,party:e,pay:e,pccw:e,pet:e,pfizer:e,pharmacy:e,phd:e,philips:e,phone:e,photo:e,photography:e,photos:rs,physio:e,pics:e,pictet:e,pictures:[1,{1337:t}],pid:e,pin:e,ping:e,pink:e,pioneer:e,pizza:[1,{ngrok:t}],place:v,play:e,playstation:e,plumbing:e,plus:[1,{playit:[2,{at:s,with:t}]}],pnc:e,pohl:e,poker:e,politie:e,porn:e,praxi:e,press:e,prime:e,prod:e,productions:e,prof:e,progressive:e,promo:e,properties:e,property:e,protection:e,pru:e,prudential:e,pub:[1,{id:s,kin:s,barsy:t}],pwc:e,qpon:e,quebec:e,quest:e,racing:e,radio:e,read:e,realestate:e,realtor:e,realty:e,recipes:e,red:e,redumbrella:e,rehab:e,reise:e,reisen:e,reit:e,reliance:e,ren:e,rent:e,rentals:e,repair:e,report:e,republican:e,rest:e,restaurant:e,review:e,reviews:[1,{aem:t}],rexroth:e,rich:e,richardli:e,ricoh:e,ril:e,rio:e,rip:[1,{clan:t}],rocks:[1,{myddns:t,stackit:t,"lima-city":t,webspace:t}],rodeo:e,rogers:e,room:e,rsvp:e,rugby:e,ruhr:e,run:[1,{appwrite:s,canva:t,development:t,ravendb:t,liara:[2,{iran:t}],lovable:t,needle:t,build:s,code:s,database:s,migration:s,onporter:t,repl:t,stackit:t,val:se,vercel:t,wix:t}],rwe:e,ryukyu:e,saarland:e,safe:e,safety:e,sakura:e,sale:e,salon:e,samsclub:e,samsung:e,sandvik:e,sandvikcoromant:e,sanofi:e,sap:e,sarl:e,sas:e,save:e,saxo:e,sbi:e,sbs:e,scb:e,schaeffler:e,schmidt:e,scholarships:e,school:e,schule:e,schwarz:e,science:e,scot:[1,{co:t,me:t,org:t,gov:[2,{service:t}]}],search:e,seat:e,secure:e,security:e,seek:e,select:e,sener:e,services:[1,{loginline:t}],seven:e,sew:e,sex:e,sexy:e,sfr:e,shangrila:e,sharp:e,shell:e,shia:e,shiksha:e,shoes:e,shop:[1,{base:t,hoplix:t,barsy:t,barsyonline:t,shopware:t}],shopping:e,shouji:e,show:Ie,silk:e,sina:e,singles:e,site:[1,{square:t,canva:I,cloudera:s,convex:S,cyon:t,caffeine:t,fastvps:t,figma:t,"figma-gov":t,preview:t,heyflow:t,jele:t,jouwweb:t,loginline:t,barsy:t,co:t,notion:t,omniwe:t,opensocial:t,madethis:t,support:t,platformsh:s,tst:s,byen:t,sol:t,srht:t,novecore:t,cpanel:t,wpsquared:t,sourcecraft:t}],ski:e,skin:e,sky:e,skype:e,sling:e,smart:e,smile:e,sncf:e,soccer:e,social:e,softbank:e,software:e,sohu:e,solar:e,solutions:e,song:e,sony:e,soy:e,spa:e,space:[1,{myfast:t,heiyu:t,hf:[2,{static:t}],"app-ionos":t,project:t,uber:t,xs4all:t}],sport:e,spot:e,srl:e,stada:e,staples:e,star:e,statebank:e,statefarm:e,stc:e,stcgroup:e,stockholm:e,storage:e,store:[1,{barsy:t,sellfy:t,shopware:t,storebase:t}],stream:e,studio:e,study:e,style:e,sucks:e,supplies:e,supply:e,support:[1,{barsy:t}],surf:e,surgery:e,suzuki:e,swatch:e,swiss:e,sydney:e,systems:[1,{knightpoint:t,miren:t}],tab:e,taipei:e,talk:e,taobao:e,target:e,tatamotors:e,tatar:e,tattoo:e,tax:e,taxi:e,tci:e,tdk:e,team:[1,{discourse:t,jelastic:t}],tech:[1,{cleverapps:t}],technology:v,temasek:e,tennis:e,teva:e,thd:e,theater:e,theatre:e,tiaa:e,tickets:e,tienda:e,tips:e,tires:e,tirol:e,tjmaxx:e,tjx:e,tkmaxx:e,tmall:e,today:[1,{prequalifyme:t}],tokyo:e,tools:[1,{addr:W,myaddr:t}],top:[1,{ntdll:t,wadl:s}],toray:e,toshiba:e,total:e,tours:e,town:e,toyota:e,toys:e,trade:e,trading:e,training:e,travel:e,travelers:e,travelersinsurance:e,trust:e,trv:e,tube:e,tui:e,tunes:e,tushu:e,tvs:e,ubank:e,ubs:e,unicom:e,university:e,uno:e,uol:e,ups:e,vacations:e,vana:e,vanguard:e,vegas:e,ventures:e,verisign:e,versicherung:e,vet:e,viajes:e,video:e,vig:e,viking:e,villas:e,vin:e,vip:[1,{hidns:t}],virgin:e,visa:e,vision:e,viva:e,vivo:e,vlaanderen:e,vodka:e,volvo:e,vote:e,voting:e,voto:e,voyage:e,wales:e,walmart:e,walter:e,wang:e,wanggou:e,watch:e,watches:e,weather:e,weatherchannel:e,webcam:e,weber:e,website:rs,wed:e,wedding:e,weibo:e,weir:e,whoswho:e,wien:e,wiki:rs,williamhill:e,win:e,windows:e,wine:e,winners:e,wme:e,woodside:e,work:[1,{"imagine-proxy":t}],works:e,world:e,wow:e,wtc:e,wtf:e,xbox:e,xerox:e,xihuan:e,xin:e,"xn--11b4c3d":e,कॉम:e,"xn--1ck2e1b":e,セール:e,"xn--1qqw23a":e,佛山:e,"xn--30rr7y":e,慈善:e,"xn--3bst00m":e,集团:e,"xn--3ds443g":e,在线:e,"xn--3pxu8k":e,点看:e,"xn--42c2d9a":e,คอม:e,"xn--45q11c":e,八卦:e,"xn--4gbrim":e,موقع:e,"xn--55qw42g":e,公益:e,"xn--55qx5d":e,公司:e,"xn--5su34j936bgsg":e,香格里拉:e,"xn--5tzm5g":e,网站:e,"xn--6frz82g":e,移动:e,"xn--6qq986b3xl":e,我爱你:e,"xn--80adxhks":e,москва:e,"xn--80aqecdr1a":e,католик:e,"xn--80asehdb":e,онлайн:e,"xn--80aswg":e,сайт:e,"xn--8y0a063a":e,联通:e,"xn--9dbq2a":e,קום:e,"xn--9et52u":e,时尚:e,"xn--9krt00a":e,微博:e,"xn--b4w605ferd":e,淡马锡:e,"xn--bck1b9a5dre4c":e,ファッション:e,"xn--c1avg":e,орг:e,"xn--c2br7g":e,नेट:e,"xn--cck2b3b":e,ストア:e,"xn--cckwcxetd":e,アマゾン:e,"xn--cg4bki":e,삼성:e,"xn--czr694b":e,商标:e,"xn--czrs0t":e,商店:e,"xn--czru2d":e,商城:e,"xn--d1acj3b":e,дети:e,"xn--eckvdtc9d":e,ポイント:e,"xn--efvy88h":e,新闻:e,"xn--fct429k":e,家電:e,"xn--fhbei":e,كوم:e,"xn--fiq228c5hs":e,中文网:e,"xn--fiq64b":e,中信:e,"xn--fjq720a":e,娱乐:e,"xn--flw351e":e,谷歌:e,"xn--fzys8d69uvgm":e,電訊盈科:e,"xn--g2xx48c":e,购物:e,"xn--gckr3f0f":e,クラウド:e,"xn--gk3at1e":e,通販:e,"xn--hxt814e":e,网店:e,"xn--i1b6b1a6a2e":e,संगठन:e,"xn--imr513n":e,餐厅:e,"xn--io0a7i":e,网络:e,"xn--j1aef":e,ком:e,"xn--jlq480n2rg":e,亚马逊:e,"xn--jvr189m":e,食品:e,"xn--kcrx77d1x4a":e,飞利浦:e,"xn--kput3i":e,手机:e,"xn--mgba3a3ejt":e,ارامكو:e,"xn--mgba7c0bbn0a":e,العليان:e,"xn--mgbab2bd":e,بازار:e,"xn--mgbca7dzdo":e,ابوظبي:e,"xn--mgbi4ecexp":e,كاثوليك:e,"xn--mgbt3dhd":e,همراه:e,"xn--mk1bu44c":e,닷컴:e,"xn--mxtq1m":e,政府:e,"xn--ngbc5azd":e,شبكة:e,"xn--ngbe9e0a":e,بيتك:e,"xn--ngbrx":e,عرب:e,"xn--nqv7f":e,机构:e,"xn--nqv7fs00ema":e,组织机构:e,"xn--nyqy26a":e,健康:e,"xn--otu796d":e,招聘:e,"xn--p1acf":[1,{"xn--90amc":t,"xn--j1aef":t,"xn--j1ael8b":t,"xn--h1ahn":t,"xn--j1adp":t,"xn--c1avg":t,"xn--80aaa0cvac":t,"xn--h1aliz":t,"xn--90a1af":t,"xn--41a":t}],рус:[1,{биз:t,ком:t,крым:t,мир:t,мск:t,орг:t,самара:t,сочи:t,спб:t,я:t}],"xn--pssy2u":e,大拿:e,"xn--q9jyb4c":e,みんな:e,"xn--qcka1pmc":e,グーグル:e,"xn--rhqv96g":e,世界:e,"xn--rovu88b":e,書籍:e,"xn--ses554g":e,网址:e,"xn--t60b56a":e,닷넷:e,"xn--tckwe":e,コム:e,"xn--tiq49xqyj":e,天主教:e,"xn--unup4y":e,游戏:e,"xn--vermgensberater-ctb":e,vermögensberater:e,"xn--vermgensberatung-pwb":e,vermögensberatung:e,"xn--vhquv":e,企业:e,"xn--vuq861b":e,信息:e,"xn--w4r85el8fhu5dnra":e,嘉里大酒店:e,"xn--w4rs40l":e,嘉里:e,"xn--xhq521b":e,广东:e,"xn--zfr164b":e,政务:e,xyz:[1,{caffeine:t,botdash:t,telebit:s}],yachts:e,yahoo:e,yamaxun:e,yandex:e,yodobashi:e,yoga:e,yokohama:e,you:e,youtube:e,yun:e,zappos:e,zara:e,zero:e,zip:e,zone:[1,{triton:s,stackit:t,lima:t}],zuerich:e}]})();function kL(e,t,n,r){let s=null,i=t;for(;i!==void 0&&((i[0]&r)!==0&&(s={index:n+1,isIcann:(i[0]&1)!==0,isPrivate:(i[0]&2)!==0}),n!==-1);){const a=i[1];i=Object.prototype.hasOwnProperty.call(a,e[n])?a[e[n]]:a["*"],n-=1}return s}function kU(e,t,n){var r;if(GSe(e,t,n))return;const s=e.split("."),i=(t.allowPrivateDomains?2:0)|(t.allowIcannDomains?1:0),a=kL(s,KSe,s.length-1,i);if(a!==null){n.isIcann=a.isIcann,n.isPrivate=a.isPrivate,n.publicSuffix=s.slice(a.index+1).join(".");return}const o=kL(s,WSe,s.length-1,i);if(o!==null){n.isIcann=o.isIcann,n.isPrivate=o.isPrivate,n.publicSuffix=s.slice(o.index).join(".");return}n.isIcann=!1,n.isPrivate=!1,n.publicSuffix=(r=s[s.length-1])!==null&&r!==void 0?r:null}const EL=yU();function JSe(e,t={}){return _U(e,5,kU,t,yU())}function EU(e,t={}){return qSe(EL),_U(e,3,kU,t,EL).domain}const YSe=new Set(["raw.githubusercontent.com","cdn.jsdelivr.net","unpkg.com","raw.github.com"]),QSe=e=>{if(!e)return null;try{return new URL(e)}catch{return null}},XSe=e=>{const t=QSe(e);if(!t)return null;if(!YSe.has(t.hostname))return t.origin;const n=t.pathname.split("/").map(r=>r.trim()).filter(r=>r.length>0);for(const r of n){const s=r.replace(/\.(ya?ml|json)$/i,"");if(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/i.test(s))return`https://${s}`}return t.origin},ZSe=e=>{const t=XSe(e);if(!t)return null;try{const n=new URL(t).hostname,s=JSe(n).domain??n;return`https://www.google.com/s2/favicons?domain=${encodeURIComponent(s)}&sz=32`}catch{return null}};function F1({endpoint:e,kind:t,className:n,size:r=16}){const s=O.useMemo(()=>ZSe(e),[e]),[i,a]=O.useState(null);return!s||!!(s&&i===s)?b.jsx(eve,{kind:t,className:n}):b.jsx("img",{src:s,alt:"",width:r,height:r,className:Ve("size-full rounded-full object-cover",n),loading:"lazy",referrerPolicy:"no-referrer",onError:()=>a(s)},s)}function eve({kind:e,className:t}){const n=Ve("shrink-0",t);switch(e){case"mcp":return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:n,children:[b.jsx("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("path",{d:"M5 7h1M5 9h4",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]});case"graphql":return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:n,children:[b.jsx("path",{d:"M8 2L14 5.5V10.5L8 14L2 10.5V5.5L8 2Z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),b.jsx("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor",opacity:"0.5"})]});case"openapi":return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:n,children:[b.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("path",{d:"M5 6h6M5 8h4M5 10h5",stroke:"currentColor",strokeWidth:"1.1",strokeLinecap:"round"})]});default:return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:n,children:[b.jsx("rect",{x:"2.5",y:"2.5",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("path",{d:"M5 6h6M5 8h4M5 10h3",stroke:"currentColor",strokeWidth:"1.1",strokeLinecap:"round"})]})}}const tve={connected:"bg-primary",probing:"bg-amber-400",draft:"bg-muted-foreground/30",auth_required:"bg-amber-500",error:"bg-destructive"};function nve(){const e=Jz(),t=sK(),n=t({to:"/"}),r=t({to:"/secrets"});return b.jsxs("div",{className:"flex h-screen overflow-hidden",children:[b.jsxs("aside",{className:"flex w-52 shrink-0 flex-col border-r border-sidebar-border bg-sidebar lg:w-56",children:[b.jsx("div",{className:"flex h-12 shrink-0 items-center border-b border-sidebar-border px-4",children:b.jsxs(Dr,{to:"/",className:"flex items-center gap-1.5",children:[b.jsx("span",{className:"font-display text-base tracking-tight text-foreground",children:"executor"}),b.jsx("span",{className:"rounded bg-primary/15 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"v3"})]})}),b.jsxs("nav",{className:"flex flex-1 flex-col p-2 overflow-y-auto",children:[b.jsx(wL,{to:"/",label:"Dashboard",active:!!n}),b.jsx(wL,{to:"/secrets",label:"Secrets",active:!!r}),b.jsx("div",{className:"mt-5 mb-1 px-2.5 text-[10px] font-medium uppercase tracking-widest text-muted-foreground/50",children:b.jsxs("div",{className:"flex items-center justify-between gap-2",children:[b.jsx("span",{children:"Sources"}),b.jsxs(Dr,{to:"/sources/add",className:"inline-flex items-center gap-1 rounded-md px-1.5 py-1 text-[10px] font-medium normal-case tracking-normal text-primary transition-colors hover:bg-sidebar-active hover:text-foreground",children:[b.jsx(Vo,{className:"size-3"}),"Add"]})]})}),b.jsx(Du,{loadable:e,loading:"Loading...",children:s=>s.length===0?b.jsx("div",{className:"px-2.5 py-2 text-[11px] leading-relaxed text-muted-foreground/40",children:"No sources yet"}):b.jsx("div",{className:"flex flex-col gap-px",children:s.map(i=>b.jsx(rve,{source:i,matchRoute:t},i.id))})})]}),b.jsx("div",{className:"shrink-0 border-t border-sidebar-border px-4 py-2.5",children:b.jsx("div",{className:"text-[10px] text-muted-foreground/30",children:"executor v3"})})]}),b.jsx("main",{className:"flex flex-1 flex-col min-w-0 overflow-hidden",children:b.jsx(P$,{})})]})}function rve(e){const{source:t,matchRoute:n}=e,r=n({to:"/sources/$sourceId",params:{sourceId:t.id},fuzzy:!0});return b.jsxs(Dr,{to:"/sources/$sourceId",params:{sourceId:t.id},search:{tab:"model"},className:Ve("group flex items-center gap-2 rounded-md px-2.5 py-1.5 text-[13px] transition-colors",r?"bg-sidebar-active text-foreground font-medium":"text-sidebar-foreground hover:bg-sidebar-active/60 hover:text-foreground"),children:[b.jsx("div",{className:"flex size-3 shrink-0 items-center justify-center text-muted-foreground/50",children:b.jsx(F1,{endpoint:t.endpoint,kind:t.kind,className:"size-3"})}),b.jsx("span",{className:"flex-1 truncate",children:t.name}),b.jsx("span",{className:Ve("size-1.5 shrink-0 rounded-full",tve[t.status]??"bg-muted-foreground/30"),title:t.status})]})}function wL(e){return b.jsx(Dr,{to:e.to,className:Ve("flex items-center gap-2.5 rounded-md px-2.5 py-1.5 text-[13px] transition-colors",e.active?"bg-sidebar-active text-foreground font-medium":"text-sidebar-foreground hover:bg-sidebar-active/60 hover:text-foreground"),children:e.label})}const SL=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,vL=j1,wU=(e,t)=>n=>{var r;if(t?.variants==null)return vL(e,n?.class,n?.className);const{variants:s,defaultVariants:i}=t,a=Object.keys(s).map(u=>{const l=n?.[u],d=i?.[u];if(l===null)return null;const f=SL(l)||SL(d);return s[u][f]}),o=n&&Object.entries(n).reduce((u,l)=>{let[d,f]=l;return f===void 0||(u[d]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,l)=>{let{class:d,className:f,...h}=l;return Object.entries(h).every(m=>{let[y,g]=m;return Array.isArray(g)?g.includes({...i,...o}[y]):{...i,...o}[y]===g})?[...u,d,f]:u},[]);return vL(e,a,c,n?.class,n?.className)},sve=wU("inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium tracking-wide uppercase",{variants:{variant:{default:"border-transparent bg-primary/15 text-primary",secondary:"border-transparent bg-secondary text-secondary-foreground",outline:"border-border text-muted-foreground",muted:"border-transparent bg-muted text-muted-foreground",get:"border-[var(--method-get)]/20 bg-[var(--method-get)]/10 text-[var(--method-get)]",post:"border-[var(--method-post)]/20 bg-[var(--method-post)]/10 text-[var(--method-post)]",put:"border-[var(--method-put)]/20 bg-[var(--method-put)]/10 text-[var(--method-put)]",delete:"border-[var(--method-delete)]/20 bg-[var(--method-delete)]/10 text-[var(--method-delete)]",destructive:"border-destructive/20 bg-destructive/10 text-destructive"}},defaultVariants:{variant:"default"}});function hi({className:e,variant:t,...n}){return b.jsx("span",{className:Ve(sve({variant:t}),e),...n})}function SU({method:e}){const t={GET:"get",POST:"post",PUT:"put",PATCH:"put",DELETE:"delete"}[e.toUpperCase()]??"outline";return b.jsx(hi,{variant:t,children:e})}const ive=wU("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",destructive:"bg-destructive text-white hover:bg-destructive/90"},size:{default:"h-9 px-4 py-2",sm:"h-7 rounded-md px-2.5 text-xs",lg:"h-10 rounded-md px-6",icon:"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}});function Ln({className:e,variant:t,size:n,...r}){return b.jsx("button",{className:Ve(ive({variant:t,size:n}),e),...r})}function ave(){const e=Jz();return b.jsx("div",{className:"flex-1 overflow-y-auto",children:b.jsxs("div",{className:"mx-auto max-w-4xl px-6 py-10 lg:px-10 lg:py-14",children:[b.jsxs("div",{className:"flex items-end justify-between mb-8",children:[b.jsxs("div",{children:[b.jsx("h1",{className:"font-display text-3xl tracking-tight text-foreground lg:text-4xl",children:"Sources"}),b.jsx("p",{className:"mt-1.5 text-[14px] text-muted-foreground",children:"Connected tool providers in this workspace."})]}),b.jsx(Dr,{to:"/sources/add",children:b.jsxs(Ln,{size:"sm",children:[b.jsx(Vo,{className:"size-3.5"}),"Add source"]})})]}),b.jsx(Du,{loadable:e,loading:"Loading sources...",children:t=>t.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center rounded-2xl border border-dashed border-border py-20",children:[b.jsx("div",{className:"flex size-12 items-center justify-center rounded-2xl bg-muted text-muted-foreground mb-4",children:b.jsx(PSe,{className:"size-5"})}),b.jsx("p",{className:"text-[14px] font-medium text-foreground/70 mb-1",children:"No sources yet"}),b.jsx("p",{className:"text-[13px] text-muted-foreground/60 mb-5",children:"Add a source to get started."}),b.jsx(Dr,{to:"/sources/add",children:b.jsxs(Ln,{size:"sm",children:[b.jsx(Vo,{className:"size-3.5"}),"Add source"]})})]}):b.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:t.map(n=>b.jsx(ove,{source:n},n.id))})})]})})}function ove({source:e}){return b.jsxs(Dr,{to:"/sources/$sourceId",params:{sourceId:e.id},search:{tab:"model"},className:"group flex flex-col rounded-xl border border-border bg-card p-4 transition-all hover:border-primary/30 hover:shadow-[0_2px_12px_-4px_rgba(0,0,0,0.12)]",children:[b.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[b.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary/8 text-primary",children:b.jsx(F1,{endpoint:e.endpoint,kind:e.kind,className:"size-4.5"})}),b.jsx(hi,{variant:e.status==="connected"?"default":e.status==="error"?"destructive":"muted",className:"shrink-0",children:e.status})]}),b.jsx("h3",{className:"text-[14px] font-semibold text-foreground group-hover:text-primary transition-colors mb-0.5",children:e.name}),b.jsx("div",{className:"flex items-center gap-2 mt-auto pt-2",children:b.jsx(hi,{variant:"outline",className:"text-[9px]",children:e.kind})})]})}const vU=[{id:"deepwiki-mcp",name:"DeepWiki MCP",summary:"Repository docs and knowledge graphs via MCP.",kind:"mcp",endpoint:"https://mcp.deepwiki.com/mcp"},{id:"axiom-mcp",name:"Axiom MCP",summary:"Query, stream, and analyze logs, traces, and event data.",kind:"mcp",endpoint:"https://mcp.axiom.co/mcp"},{id:"github-rest",name:"GitHub REST API",summary:"Repos, issues, pull requests, actions, and org settings.",kind:"openapi",endpoint:"https://api.github.com"},{id:"github-graphql",name:"GitHub GraphQL",summary:"Issues, pull requests, discussions, and repository objects via GraphQL.",kind:"graphql",endpoint:"https://api.github.com/graphql"},{id:"gitlab-graphql",name:"GitLab GraphQL",summary:"Projects, merge requests, issues, CI pipelines, and users.",kind:"graphql",endpoint:"https://gitlab.com/api/graphql"},{id:"openai-api",name:"OpenAI API",summary:"Models, files, responses, and fine-tuning.",kind:"openapi",endpoint:"https://api.openai.com/v1"},{id:"vercel-api",name:"Vercel API",summary:"Deployments, projects, domains, and environments.",kind:"openapi",endpoint:"https://api.vercel.com"},{id:"stripe-api",name:"Stripe API",summary:"Payments, billing, subscriptions, and invoices.",kind:"openapi",endpoint:"https://api.stripe.com"},{id:"linear-graphql",name:"Linear GraphQL",summary:"Issues, teams, cycles, and projects.",kind:"graphql",endpoint:"https://api.linear.app/graphql"},{id:"monday-graphql",name:"Monday GraphQL",summary:"Boards, items, updates, users, and workspace metadata.",kind:"graphql",endpoint:"https://api.monday.com/v2"},{id:"anilist-graphql",name:"AniList GraphQL",summary:"Anime, manga, characters, media lists, and recommendations.",kind:"graphql",endpoint:"https://graphql.anilist.co"}],cve=2*6e4,xU="executor-v3:oauth-result:",uve=["mcp","openapi","graphql","internal"],lve=["auto","streamable-http","sse"],dve=["none","bearer","oauth2"],wy=e=>{const t=e.trim();return t.length>0?t:null},fve=e=>{try{const t=EU(e);if(!t)return"";const n=t.indexOf(".");return n>0?t.slice(0,n):t}catch{return""}},xL=e=>{if(typeof window>"u")return null;const t=window.localStorage.getItem(`${xU}${e}`);if(!t)return null;try{return JSON.parse(t)}catch{return null}},TL=e=>{typeof window>"u"||window.localStorage.removeItem(`${xU}${e}`)},hve=async e=>{if(typeof window>"u")throw new Error("OAuth popup is only available in a browser context");TL(e.sessionId);const t=window.open(e.authorizationUrl,"executor-v3-source-oauth","popup=yes,width=520,height=720");if(!t)throw new Error("Popup blocked. Allow popups and try again.");return t.focus(),await new Promise((n,r)=>{let s=!1,i=0,a=0;const o=()=>{window.removeEventListener("message",l),i&&window.clearInterval(i),a&&window.clearTimeout(a),t.closed||t.close(),TL(e.sessionId)},c=d=>{s||(s=!0,o(),r(new Error(d)))},u=d=>{if(!d.ok){c(d.error||"OAuth failed");return}s||(s=!0,o(),n(d.auth))},l=d=>{if(d.origin!==window.location.origin)return;const f=d.data;!f||f.type!=="executor-v3:oauth-result"||f.ok&&f.sessionId!==e.sessionId||!f.ok&&f.sessionId!==null&&f.sessionId!==e.sessionId||u(f)};window.addEventListener("message",l),a=window.setTimeout(()=>{c("OAuth popup timed out before completion. Please try again.")},cve),i=window.setInterval(()=>{const d=xL(e.sessionId);if(d){u(d);return}t.closed&&window.setTimeout(()=>{const f=xL(e.sessionId);if(f){u(f);return}c("OAuth popup was closed before completion.")},400)},300)})},DE=e=>e===null?"":JSON.stringify(e,null,2),IL=e=>({name:e?.name??"",kind:e?.kind??"openapi",endpoint:e?.endpoint??"",namespace:e?fve(e.endpoint):"",enabled:!0,transport:e?.kind==="mcp"?"auto":"",queryParamsText:"",headersText:"",specUrl:"",defaultHeadersText:"",authKind:"none",authHeaderName:"Authorization",authPrefix:"Bearer ",bearerProviderId:"",bearerHandle:"",oauthAccessProviderId:"",oauthAccessHandle:"",oauthRefreshProviderId:"",oauthRefreshHandle:""}),mve=e=>({name:e.name,kind:e.kind,endpoint:e.endpoint,namespace:e.namespace??"",enabled:e.enabled,transport:e.kind==="mcp"?e.transport??"auto":"",queryParamsText:DE(e.queryParams),headersText:DE(e.headers),specUrl:e.specUrl??"",defaultHeadersText:DE(e.defaultHeaders),authKind:e.auth.kind,authHeaderName:e.auth.kind==="none"?"Authorization":e.auth.headerName,authPrefix:e.auth.kind==="none"?"Bearer ":e.auth.prefix,bearerProviderId:e.auth.kind==="bearer"?e.auth.token.providerId:"",bearerHandle:e.auth.kind==="bearer"?e.auth.token.handle:"",oauthAccessProviderId:e.auth.kind==="oauth2"?e.auth.accessToken.providerId:"",oauthAccessHandle:e.auth.kind==="oauth2"?e.auth.accessToken.handle:"",oauthRefreshProviderId:e.auth.kind==="oauth2"&&e.auth.refreshToken!==null?e.auth.refreshToken.providerId:"",oauthRefreshHandle:e.auth.kind==="oauth2"&&e.auth.refreshToken!==null?e.auth.refreshToken.handle:""}),Tl=(e,t)=>{const n=t.trim();if(n.length===0)return null;let r;try{r=JSON.parse(n)}catch{throw new Error(`${e} must be valid JSON.`)}if(r===null||Array.isArray(r)||typeof r!="object")throw new Error(`${e} must be a JSON object with string values.`);const s=Object.entries(r),i={};for(const[a,o]of s){if(typeof o!="string")throw new Error(`${e} must only contain string values.`);i[a]=o}return Object.keys(i).length===0?null:i},pve=e=>{if(e.authKind==="none")return{kind:"none"};const t=e.authHeaderName.trim()||"Authorization",n=e.authPrefix;if(e.authKind==="bearer"){const o=e.bearerProviderId.trim(),c=e.bearerHandle.trim();if(!o||!c)throw new Error("Bearer auth requires a token. Select or create a secret.");return{kind:"bearer",headerName:t,prefix:n,token:{providerId:o,handle:c}}}const r=e.oauthAccessProviderId.trim(),s=e.oauthAccessHandle.trim();if(!r||!s)throw new Error("OAuth2 auth requires an access token. Select or create a secret.");const i=wy(e.oauthRefreshProviderId),a=wy(e.oauthRefreshHandle);if(i===null!=(a===null))throw new Error("OAuth2 refresh token provider ID and handle must be set together.");return{kind:"oauth2",headerName:t,prefix:n,accessToken:{providerId:r,handle:s},refreshToken:i===null||a===null?null:{providerId:i,handle:a}}},gve=e=>{if(!(e.kind!=="mcp"&&e.kind!=="openapi"&&e.kind!=="graphql"))return e.enabled?"connected":"draft"},TU=e=>{const t=e.name.trim(),n=e.endpoint.trim();if(!t)throw new Error("Source name is required.");if(!n)throw new Error("Source endpoint is required.");const r={name:t,kind:e.kind,endpoint:n,status:gve(e),enabled:e.enabled,namespace:wy(e.namespace),auth:pve(e)};if(e.kind==="mcp")return{...r,transport:e.transport===""?"auto":e.transport,queryParams:Tl("Query params",e.queryParamsText),headers:Tl("Request headers",e.headersText),specUrl:null,defaultHeaders:null};if(e.kind==="openapi"){const s=e.specUrl.trim();if(!s)throw new Error("OpenAPI sources require a spec URL.");return{...r,transport:null,queryParams:null,headers:null,specUrl:s,defaultHeaders:Tl("Default headers",e.defaultHeadersText)}}return e.kind==="graphql"?{...r,transport:null,queryParams:null,headers:null,specUrl:null,defaultHeaders:Tl("Default headers",e.defaultHeadersText)}:{...r,transport:null,queryParams:null,headers:null,specUrl:null,defaultHeaders:null}},bve=e=>({...TU(e)}),yve=e=>{if(e.kind!=="mcp")throw new Error("OAuth sign-in is only available for MCP sources.");const t=e.endpoint.trim();if(!t)throw new Error("Source endpoint is required before starting OAuth.");return{provider:"mcp",name:wy(e.name),endpoint:t,transport:e.transport===""?"auto":e.transport,queryParams:Tl("Query params",e.queryParamsText),headers:Tl("Request headers",e.headersText)}};function _ve(){return b.jsx(IU,{mode:"create"},"create")}function kve(e){const t=Rwe(e.sourceId);return b.jsx(Du,{loadable:t,loading:"Loading source...",children:n=>b.jsx(IU,{mode:"edit",source:n},`${n.id}:${n.updatedAt}`)})}function IU(e){const t=kd(),n=Mwe(),r=Yz(),s=jwe(),i=Fwe();Cwe();const a=zA(),o=Wz(),[c,u]=O.useState(()=>e.source?mve(e.source):IL()),[l,d]=O.useState(null),[f,h]=O.useState(null),[m,y]=O.useState(!1),[g,p]=O.useState(null),_=n.status==="pending"||s.status==="pending",k=i.status==="pending",v=r.status==="pending"||m,w=c.authKind==="oauth2"&&c.oauthAccessHandle.trim().length>0?`${c.oauthAccessProviderId}:${c.oauthAccessHandle}:${c.oauthRefreshProviderId}:${c.oauthRefreshHandle}`:null,S=w!==null&&g===w,T=(H,G)=>{u(Q=>({...Q,[H]:G}))},I=H=>{h(H.id),u(G=>({...IL(H),name:G.name.trim().length>0?G.name:H.name,enabled:G.enabled})),d({tone:"info",text:`${H.name} loaded. Add auth if needed, then save.`})},D=async()=>{d(null);try{if(e.mode==="create"){const G=await n.mutateAsync(TU(c));t({to:"/sources/$sourceId",params:{sourceId:G.id},search:{tab:"model"}});return}if(!e.source)throw new Error("Cannot update a source before it has loaded.");const H=await s.mutateAsync({sourceId:e.source.id,payload:bve(c)});t({to:"/sources/$sourceId",params:{sourceId:H.id},search:{tab:"model"}})}catch(H){d({tone:"error",text:H instanceof Error?H.message:"Failed saving source."})}},R=async()=>{d(null);try{const H=await r.mutateAsync(yve(c));d({tone:"info",text:"Finish OAuth in the popup. Saving will create the source and connect its tools."}),y(!0);const G=await hve({authorizationUrl:H.authorizationUrl,sessionId:H.sessionId});y(!1),o(),p(null),u(Q=>({...Q,authKind:"oauth2",authHeaderName:G.headerName,authPrefix:G.prefix,oauthAccessProviderId:G.accessToken.providerId,oauthAccessHandle:G.accessToken.handle,oauthRefreshProviderId:G.refreshToken?.providerId??"",oauthRefreshHandle:G.refreshToken?.handle??""})),d({tone:"success",text:"OAuth credentials are ready. Save the source to connect and index tools."})}catch(H){y(!1),d({tone:"error",text:H instanceof Error?H.message:"Failed starting OAuth."})}},z=async()=>{if(!(!e.source||k||!window.confirm(`Remove "${e.source.name}" and its indexed tools?`))){d(null);try{if(!(await i.mutateAsync(e.source.id)).removed)throw new Error("Source was not removed.");t({to:"/"})}catch(G){d({tone:"error",text:G instanceof Error?G.message:"Failed removing source."})}}},V=e.mode==="edit"&&e.source?{to:"/sources/$sourceId",params:{sourceId:e.source.id},search:{tab:"model"}}:{to:"/"};return b.jsx("div",{className:"flex-1 overflow-y-auto",children:b.jsxs("div",{className:"mx-auto max-w-3xl px-6 py-8 lg:px-10 lg:py-12",children:[b.jsxs(Dr,{...V,className:"inline-flex items-center gap-1.5 text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground mb-6",children:[b.jsx(gU,{className:"size-3.5"}),e.mode==="edit"?"Back to source":"Back"]}),b.jsxs("div",{className:"flex items-center justify-between gap-4 mb-6",children:[b.jsx("h1",{className:"font-display text-2xl tracking-tight text-foreground lg:text-3xl",children:e.mode==="edit"?"Edit source":"New source"}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(hi,{variant:"outline",children:c.kind}),b.jsx(hi,{variant:c.enabled?"default":"muted",children:c.enabled?"enabled":"disabled"})]})]}),l&&b.jsx(wve,{state:l,className:"mb-6"}),e.mode==="create"&&b.jsx(gc,{title:"Templates",className:"mb-6",children:b.jsx("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:vU.map(H=>b.jsxs("button",{type:"button",onClick:()=>I(H),className:Ve("rounded-xl border px-4 py-3 text-left transition-colors",f===H.id?"border-primary/40 bg-primary/8":"border-border bg-card/70 hover:bg-accent/50"),children:[b.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2",children:[b.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[b.jsx("div",{className:"flex size-4 shrink-0 items-center justify-center text-muted-foreground",children:b.jsx(F1,{endpoint:H.endpoint,kind:H.kind,className:"size-4"})}),b.jsx("span",{className:"truncate text-[13px] font-medium text-foreground",children:H.name})]}),b.jsx(hi,{variant:"outline",className:"text-[9px]",children:H.kind})]}),b.jsx("span",{className:"text-[11px] text-muted-foreground line-clamp-1",children:H.summary})]},H.id))})}),b.jsxs("div",{className:"space-y-6",children:[b.jsx(gc,{title:"Basics",children:b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[b.jsx(nr,{label:"Name",children:b.jsx(tl,{value:c.name,onChange:H=>T("name",H),placeholder:"GitHub REST"})}),b.jsx(nr,{label:"Kind",children:b.jsx($E,{value:c.kind,onChange:H=>T("kind",H),options:uve.map(H=>({value:H,label:H}))})}),b.jsx(nr,{label:"Endpoint",className:"sm:col-span-2",children:b.jsx(tl,{value:c.endpoint,onChange:H=>T("endpoint",H),placeholder:c.kind==="openapi"?"https://api.github.com":c.kind==="graphql"?"https://api.linear.app/graphql":"https://mcp.deepwiki.com/mcp",mono:!0})}),b.jsx(nr,{label:"Namespace",children:b.jsx(tl,{value:c.namespace,onChange:H=>T("namespace",H),placeholder:"github"})}),b.jsx(nr,{label:"Status",children:b.jsx(Eve,{checked:c.enabled,onChange:H=>T("enabled",H)})})]})}),c.kind==="mcp"&&b.jsx(gc,{title:"Transport",children:b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[b.jsx(nr,{label:"Transport mode",children:b.jsx($E,{value:c.transport||"auto",onChange:H=>T("transport",H),options:lve.map(H=>({value:H,label:H}))})}),b.jsxs("div",{className:"sm:col-span-2 grid gap-4 sm:grid-cols-2",children:[b.jsx(nr,{label:"Query params (JSON)",children:b.jsx(Wg,{value:c.queryParamsText,onChange:H=>T("queryParamsText",H),placeholder:`{
|
|
104
|
+
"workspace": "demo"
|
|
105
|
+
}`})}),b.jsx(nr,{label:"Headers (JSON)",children:b.jsx(Wg,{value:c.headersText,onChange:H=>T("headersText",H),placeholder:`{
|
|
106
|
+
"x-api-key": "..."
|
|
107
|
+
}`})})]})]})}),c.kind==="openapi"&&b.jsx(gc,{title:"OpenAPI",children:b.jsxs("div",{className:"grid gap-4",children:[b.jsx(nr,{label:"Spec URL",children:b.jsx(tl,{value:c.specUrl,onChange:H=>T("specUrl",H),placeholder:"https://raw.githubusercontent.com/.../openapi.yaml",mono:!0})}),b.jsx(nr,{label:"Default headers (JSON)",children:b.jsx(Wg,{value:c.defaultHeadersText,onChange:H=>T("defaultHeadersText",H),placeholder:`{
|
|
108
|
+
"x-api-version": "2026-03-01"
|
|
109
|
+
}`})})]})}),c.kind==="graphql"&&b.jsx(gc,{title:"GraphQL",children:b.jsx("div",{className:"grid gap-4",children:b.jsx(nr,{label:"Default headers (JSON)",children:b.jsx(Wg,{value:c.defaultHeadersText,onChange:H=>T("defaultHeadersText",H),placeholder:`{
|
|
110
|
+
"x-api-version": "2026-03-01"
|
|
111
|
+
}`})})})}),b.jsx(gc,{title:"Authentication",children:b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[c.kind==="mcp"&&b.jsxs("div",{className:"sm:col-span-2 rounded-lg border border-border bg-card/70 px-4 py-3",children:[b.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[b.jsxs("div",{className:"space-y-1",children:[b.jsx("p",{className:"text-[13px] font-medium text-foreground",children:"Sign in with OAuth"}),b.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Starts the same MCP connection flow used by `executor.sources.add`."})]}),b.jsxs(Ln,{type:"button",variant:"outline",onClick:R,disabled:_||k||v,children:[v?b.jsx(Yi,{className:"size-3.5"}):null,c.authKind==="oauth2"&&c.oauthAccessHandle.trim().length>0?"Reconnect with OAuth":"Sign in with OAuth"]})]}),c.authKind==="oauth2"&&c.oauthAccessHandle.trim().length>0&&b.jsxs("div",{className:"mt-3 flex items-center justify-between gap-3 border-t border-border pt-3",children:[b.jsx("p",{className:"text-[12px] text-muted-foreground",children:"OAuth tokens are attached to this draft and stay hidden unless you need the raw refs."}),b.jsx("button",{type:"button",className:"text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground",onClick:()=>p(H=>H===w?null:w),children:S?"Hide token refs":"Show token refs"})]})]}),b.jsx(nr,{label:"Auth mode",children:b.jsx($E,{value:c.authKind,onChange:H=>T("authKind",H),options:dve.map(H=>({value:H,label:H}))})}),c.authKind!=="none"&&b.jsxs(b.Fragment,{children:[b.jsx(nr,{label:"Header name",children:b.jsx(tl,{value:c.authHeaderName,onChange:H=>T("authHeaderName",H),placeholder:"Authorization"})}),b.jsx(nr,{label:"Prefix",children:b.jsx(tl,{value:c.authPrefix,onChange:H=>T("authPrefix",H),placeholder:"Bearer "})})]}),c.authKind==="bearer"&&b.jsx(nr,{label:"Token",className:"sm:col-span-2",children:b.jsx(jE,{secrets:a,providerId:c.bearerProviderId,handle:c.bearerHandle,onSelect:(H,G)=>{T("bearerProviderId",H),T("bearerHandle",G)}})}),c.authKind==="oauth2"&&(c.kind!=="mcp"||c.oauthAccessHandle.trim().length===0||S)&&b.jsxs(b.Fragment,{children:[b.jsx(nr,{label:"Access token",className:"sm:col-span-2",children:b.jsx(jE,{secrets:a,providerId:c.oauthAccessProviderId,handle:c.oauthAccessHandle,onSelect:(H,G)=>{T("oauthAccessProviderId",H),T("oauthAccessHandle",G)}})}),b.jsx(nr,{label:"Refresh token (optional)",className:"sm:col-span-2",children:b.jsx(jE,{secrets:a,providerId:c.oauthRefreshProviderId,handle:c.oauthRefreshHandle,onSelect:(H,G)=>{T("oauthRefreshProviderId",H),T("oauthRefreshHandle",G)},allowEmpty:!0})})]})]})}),e.mode==="edit"&&e.source&&b.jsx(gc,{title:"Danger zone",children:b.jsxs(Ln,{variant:"outline",className:"border-destructive/30 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:z,disabled:k,children:[b.jsx(pU,{className:"size-3.5"}),k?"Removing…":"Remove source"]})}),b.jsxs("div",{className:"flex items-center justify-end gap-3 border-t border-border pt-5",children:[b.jsx(Dr,{...V,className:"inline-flex",children:b.jsx(Ln,{variant:"ghost",type:"button",children:"Cancel"})}),b.jsxs(Ln,{onClick:D,disabled:_,children:[e.mode==="edit"?b.jsx(WA,{className:"size-3.5"}):b.jsx(Vo,{className:"size-3.5"}),_?e.mode==="edit"?"Saving…":"Creating…":e.mode==="edit"?"Save":"Create source"]})]})]})]})})}function gc(e){return b.jsxs("section",{className:Ve("rounded-xl border border-border bg-card/80",e.className),children:[b.jsx("div",{className:"border-b border-border px-5 py-3",children:b.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e.title})}),b.jsx("div",{className:"p-5",children:e.children})]})}function nr(e){return b.jsxs("label",{className:Ve("block space-y-1.5",e.className),children:[b.jsx("span",{className:"text-[12px] font-medium text-foreground",children:e.label}),e.children]})}function tl(e){return b.jsx("input",{value:e.value,onChange:t=>e.onChange(t.target.value),placeholder:e.placeholder,className:Ve("h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25",e.mono&&"font-mono text-[12px]")})}function $E(e){return b.jsx("select",{value:e.value,onChange:t=>e.onChange(t.target.value),className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring/25",children:e.options.map(t=>b.jsx("option",{value:t.value,children:t.label},t.value))})}function Wg(e){return b.jsx("textarea",{value:e.value,onChange:t=>e.onChange(t.target.value),placeholder:e.placeholder,spellCheck:!1,className:"min-h-28 w-full rounded-lg border border-input bg-background px-3 py-2.5 font-mono text-[12px] leading-relaxed text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25"})}function Eve(e){return b.jsxs("button",{type:"button",onClick:()=>e.onChange(!e.checked),className:Ve("flex h-9 w-full items-center justify-between rounded-lg border px-3 text-[13px] transition-colors",e.checked?"border-primary/40 bg-primary/8 text-foreground":"border-input bg-background text-muted-foreground hover:text-foreground"),children:[b.jsx("span",{children:e.checked?"Enabled":"Disabled"}),b.jsx("span",{className:Ve("size-2 rounded-full",e.checked?"bg-primary":"bg-muted-foreground/30")})]})}function wve(e){return b.jsx("div",{className:Ve("rounded-lg border px-4 py-3 text-[13px]",e.state.tone==="success"&&"border-primary/30 bg-primary/8 text-foreground",e.state.tone==="info"&&"border-border bg-card text-muted-foreground",e.state.tone==="error"&&"border-destructive/30 bg-destructive/8 text-destructive",e.className),children:e.state.text})}const ME="__create_new__";function jE(e){const{secrets:t,providerId:n,handle:r,onSelect:s,allowEmpty:i}=e,a=VA(),[o,c]=O.useState(!1),[u,l]=O.useState(""),[d,f]=O.useState(""),[h,m]=O.useState(null),y=r||"",g=w=>{if(w===ME){c(!0),l(""),f(""),m(null);return}if(w===""){s("","");return}s("postgres",w)},p=async()=>{m(null);const w=u.trim();if(!w){m("Name is required.");return}if(!d){m("Value is required.");return}try{const S=await a.mutateAsync({name:w,value:d});s(S.providerId,S.id),c(!1)}catch(S){m(S instanceof Error?S.message:"Failed creating secret.")}};if(t.status!=="ready")return b.jsx("select",{disabled:!0,className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-muted-foreground outline-none opacity-60",children:b.jsx("option",{children:"Loading…"})});const _=t.data,k=_.find(w=>w.id===r),v=r&&!k&&n!=="postgres";return b.jsxs("div",{className:"space-y-2",children:[b.jsxs("select",{value:o?ME:y,onChange:w=>g(w.target.value),className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring/25",children:[i&&b.jsx("option",{value:"",children:"None"}),!i&&!y&&b.jsx("option",{value:"",children:"Select a secret…"}),_.map(w=>b.jsx("option",{value:w.id,children:w.name||w.id},w.id)),v&&b.jsxs("option",{value:r,children:[n,":",r]}),b.jsx("option",{value:ME,children:"+ Create new secret"})]}),o&&b.jsxs("div",{className:"rounded-lg border border-primary/20 bg-card/80 p-3 space-y-3",children:[h&&b.jsx("div",{className:"rounded-md border border-destructive/30 bg-destructive/8 px-3 py-2 text-[12px] text-destructive",children:h}),b.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[b.jsxs("label",{className:"block space-y-1",children:[b.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:"Name"}),b.jsx("input",{value:u,onChange:w=>l(w.target.value),placeholder:"GitHub PAT",className:"h-8 w-full rounded-lg border border-input bg-background px-3 text-[12px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25",autoFocus:!0})]}),b.jsxs("label",{className:"block space-y-1",children:[b.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:"Value"}),b.jsx("input",{type:"password",value:d,onChange:w=>f(w.target.value),placeholder:"ghp_...",className:"h-8 w-full rounded-lg border border-input bg-background px-3 font-mono text-[11px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25"})]})]}),b.jsxs("div",{className:"flex items-center justify-end gap-2",children:[b.jsx("button",{type:"button",onClick:()=>c(!1),className:"rounded-md px-2.5 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Cancel"}),b.jsxs(Ln,{size:"sm",onClick:p,disabled:a.status==="pending",children:[a.status==="pending"&&b.jsx(Yi,{className:"size-3"}),"Store & use"]})]})]})]})}var Sv=Object.defineProperty,Sve=Object.getOwnPropertyDescriptor,vve=Object.getOwnPropertyNames,xve=Object.prototype.hasOwnProperty,JA=(e,t)=>{let n={};for(var r in e)Sv(n,r,{get:e[r],enumerable:!0});return Sv(n,Symbol.toStringTag,{value:"Module"}),n},Tve=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=vve(t),i=0,a=s.length,o;i<a;i++)o=s[i],!xve.call(e,o)&&o!==n&&Sv(e,o,{get:(c=>t[c]).bind(null,o),enumerable:!(r=Sve(t,o))||r.enumerable});return e},AU=(e,t,n)=>(Tve(e,t,"default"),n);const B1=[{id:"abap",name:"ABAP",import:(()=>x(()=>import("./abap-BXYWi5l2.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>x(()=>import("./actionscript-3-CRLSHa9e.js"),[]))},{id:"ada",name:"Ada",import:(()=>x(()=>import("./ada-DeReRNhg.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>x(()=>import("./angular-html-6NEUuZou.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>x(()=>import("./angular-ts-BfBSdvnY.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>x(()=>import("./apache-CCUDgqAf.js"),[]))},{id:"apex",name:"Apex",import:(()=>x(()=>import("./apex-Bh6oOW3o.js"),[]))},{id:"apl",name:"APL",import:(()=>x(()=>import("./apl-C-KxP0FL.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>x(()=>import("./applescript-Dd26Nb5t.js"),[]))},{id:"ara",name:"Ara",import:(()=>x(()=>import("./ara-D6vCOKVX.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>x(()=>import("./asciidoc-DSG2rbEP.js"),[]))},{id:"asm",name:"Assembly",import:(()=>x(()=>import("./asm-CbVMAfFB.js"),[]))},{id:"astro",name:"Astro",import:(()=>x(()=>import("./astro-OEl6i-aI.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>x(()=>import("./awk-UmR4Ublb.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>x(()=>import("./ballerina-BMbY-1wP.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>x(()=>import("./bat-Dcnh2ot_.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>x(()=>import("./beancount-B92nBv9q.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>x(()=>import("./berry-C9fz7p0n.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>x(()=>import("./bibtex-DELXwv0g.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>x(()=>import("./bicep-D2njIRU5.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>x(()=>import("./bird2-D-8n_ahI.js"),[]))},{id:"blade",name:"Blade",import:(()=>x(()=>import("./blade-DrbQMUV-.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>x(()=>import("./bsl-C4qeDxuX.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>x(()=>import("./c-CyUOlKFr.js"),[]))},{id:"c3",name:"C3",import:(()=>x(()=>import("./c3-B1fh2zee.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>x(()=>import("./cadence-bIHbUj02.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>x(()=>import("./cairo-C_mOTUpN.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>x(()=>import("./clarity-A4x-rz24.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>x(()=>import("./clojure-Bb2-3A0I.js"),[]))},{id:"cmake",name:"CMake",import:(()=>x(()=>import("./cmake-Cv5ljclQ.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>x(()=>import("./cobol-CELfDnG_.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>x(()=>import("./codeowners-CKT8dJip.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>x(()=>import("./codeql-DXd8ggn3.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>x(()=>import("./coffee-CSg58a7P.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>x(()=>import("./common-lisp-v102bg8X.js"),[]))},{id:"coq",name:"Coq",import:(()=>x(()=>import("./coq-CxCehFeR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>x(()=>import("./cpp-C28rag7_.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>x(()=>import("./crystal-kLfOnxTY.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>x(()=>import("./csharp-DieIJxYJ.js"),[]))},{id:"css",name:"CSS",import:(()=>x(()=>import("./css-BSK200cd.js"),[]))},{id:"csv",name:"CSV",import:(()=>x(()=>import("./csv-AZNL9t8Q.js"),[]))},{id:"cue",name:"CUE",import:(()=>x(()=>import("./cue-nzsbQn5T.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>x(()=>import("./cypher-BM7Pwunj.js"),[]))},{id:"d",name:"D",import:(()=>x(()=>import("./d-TG9YRPoI.js"),[]))},{id:"dart",name:"Dart",import:(()=>x(()=>import("./dart-DArdxSyj.js"),[]))},{id:"dax",name:"DAX",import:(()=>x(()=>import("./dax-B28Cho4e.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>x(()=>import("./desktop-Z9LhWKWr.js"),[]))},{id:"diff",name:"Diff",import:(()=>x(()=>import("./diff-BlzBhZx2.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>x(()=>import("./docker-DIG_IqVK.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>x(()=>import("./dotenv-Bf0GLMGc.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>x(()=>import("./dream-maker-DBhfoDN-.js"),[]))},{id:"edge",name:"Edge",import:(()=>x(()=>import("./edge-C9mkmEUa.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>x(()=>import("./elixir-B1OcFvXE.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>x(()=>import("./elm-BX_9EnK8.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>x(()=>import("./emacs-lisp-fXIB3QbG.js"),[]))},{id:"erb",name:"ERB",import:(()=>x(()=>import("./erb-C0Gc-WV-.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>x(()=>import("./erlang-Dh270pQQ.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>x(()=>import("./fennel-CKW7gc4E.js"),[]))},{id:"fish",name:"Fish",import:(()=>x(()=>import("./fish-BiaFC76h.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>x(()=>import("./fluent-C1VbA1FI.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>x(()=>import("./fortran-fixed-form-B5hFr6Yn.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>x(()=>import("./fortran-free-form-BuX3zftO.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>x(()=>import("./fsharp-B6CigNpP.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>x(()=>import("./gdresource-ChoLB09i.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>x(()=>import("./gdscript-BajwJ0jS.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>x(()=>import("./gdshader-MbeiIFWW.js"),[]))},{id:"genie",name:"Genie",import:(()=>x(()=>import("./genie-CTXGoN_z.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>x(()=>import("./gherkin-DQeIZrj7.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>x(()=>import("./git-commit-BicZTByO.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>x(()=>import("./git-rebase-Bzlpfr7M.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>x(()=>import("./gleam-B-IqXlZK.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>x(()=>import("./glimmer-js-cZi37nA1.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>x(()=>import("./glimmer-ts-BY3QTAW9.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>x(()=>import("./glsl-Bk7TyU8J.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>x(()=>import("./gn-deNdZ1en.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>x(()=>import("./gnuplot-BBjkHhdK.js"),[]))},{id:"go",name:"Go",import:(()=>x(()=>import("./go-Dn4lI1Tv.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>x(()=>import("./graphql-By4-2MiP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>x(()=>import("./groovy-DjMbfbx0.js"),[]))},{id:"hack",name:"Hack",import:(()=>x(()=>import("./hack-Ce3HFLQu.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>x(()=>import("./haml-C-C08OMF.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>x(()=>import("./handlebars-BFxKmXBZ.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>x(()=>import("./haskell-DtebQ3Kv.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>x(()=>import("./haxe-n0Q_eay_.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>x(()=>import("./hcl-shhv74hy.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>x(()=>import("./hjson-BEMFYqr7.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>x(()=>import("./hlsl-Pefxhtaj.js"),[]))},{id:"html",name:"HTML",import:(()=>x(()=>import("./html-DBrZJmtb.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>x(()=>import("./html-derivative-DgyNW28a.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>x(()=>import("./http-D0p2QOuJ.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>x(()=>import("./hurl-CeF7EoTQ.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>x(()=>import("./hxml-B_SuSTPP.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>x(()=>import("./hy-CTpXmg0M.js"),[]))},{id:"imba",name:"Imba",import:(()=>x(()=>import("./imba-z_cUhu9e.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>x(()=>import("./ini-DOGW4-0C.js"),[]))},{id:"java",name:"Java",import:(()=>x(()=>import("./java-B2AjWfgk.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>x(()=>import("./javascript-XPxc2APE.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>x(()=>import("./jinja-DlBE7Xgz.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>x(()=>import("./jison-DRGa8fbr.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>x(()=>import("./json-CjLXzM_z.js"),[]))},{id:"json5",name:"JSON5",import:(()=>x(()=>import("./json5-DE06a0U2.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>x(()=>import("./jsonc-BYi4HS05.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>x(()=>import("./jsonl-CuhIcKDk.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>x(()=>import("./jsonnet-DtQdHwK-.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>x(()=>import("./jssm-BlhucWo7.js"),[]))},{id:"jsx",name:"JSX",import:(()=>x(()=>import("./jsx-BGEKFWBk.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>x(()=>import("./julia-BxjEHQ54.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>x(()=>import("./just-Abn-AdSa.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>x(()=>import("./kdl-DJsF4U57.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>x(()=>import("./kotlin-DwKqsDKK.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>x(()=>import("./kusto-C0JqhYMw.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>x(()=>import("./latex-C-qBiGC3.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>x(()=>import("./lean-QIsVZaRF.js"),[]))},{id:"less",name:"Less",import:(()=>x(()=>import("./less-C76OjOdF.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>x(()=>import("./liquid-DdraCjph.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>x(()=>import("./llvm-ByOMZdUC.js"),[]))},{id:"log",name:"Log file",import:(()=>x(()=>import("./log-CbW7hOWU.js"),[]))},{id:"logo",name:"Logo",import:(()=>x(()=>import("./logo-BbooMuDm.js"),[]))},{id:"lua",name:"Lua",import:(()=>x(()=>import("./lua-JmSlR1pZ.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>x(()=>import("./luau-lY4yXJyn.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>x(()=>import("./make-s9FKP0VE.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>x(()=>import("./markdown-CKXSK5AY.js"),[]))},{id:"marko",name:"Marko",import:(()=>x(()=>import("./marko-CQjc_OQE.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>x(()=>import("./matlab-BQKM-LA_.js"),[]))},{id:"mdc",name:"MDC",import:(()=>x(()=>import("./mdc-CqpcwBMx.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>x(()=>import("./mdx-BWRhHdFl.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>x(()=>import("./mermaid-COhksqSL.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>x(()=>import("./mipsasm-BElnB_7Q.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>x(()=>import("./mojo-CsmCHy7A.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>x(()=>import("./moonbit-B8hphrHK.js"),[]))},{id:"move",name:"Move",import:(()=>x(()=>import("./move-Ccg_HAOv.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>x(()=>import("./narrat-Cy2k80UN.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>x(()=>import("./nextflow-DCuLxrAx.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>x(()=>import("./nextflow-groovy-COOIDLZf.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>x(()=>import("./nginx-bBKbG2uI.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>x(()=>import("./nim-Cm6-Nayq.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>x(()=>import("./nix-DFZZLjuC.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>x(()=>import("./nushell-BaAZo4zx.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>x(()=>import("./objective-c-sgtl-PdD.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>x(()=>import("./objective-cpp-BTQ37cYs.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>x(()=>import("./ocaml-BvBP9Lm0.js"),[]))},{id:"odin",name:"Odin",import:(()=>x(()=>import("./odin-BTnrxC4P.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>x(()=>import("./openscad-Dmi2c_42.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>x(()=>import("./pascal-DYjw0AuS.js"),[]))},{id:"perl",name:"Perl",import:(()=>x(()=>import("./perl-Djxv1YJ9.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>x(()=>import("./php-DczsLzXi.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>x(()=>import("./pkl-Cij4Vm9z.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>x(()=>import("./plsql-Bd6NdBJI.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>x(()=>import("./po-CUhVi7la.js"),[]))},{id:"polar",name:"Polar",import:(()=>x(()=>import("./polar-B-qJ3AIy.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>x(()=>import("./postcss-BSGhOJ4k.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>x(()=>import("./powerquery-CC1XieQO.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>x(()=>import("./powershell-DdRAnR4Z.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>x(()=>import("./prisma-C0hJlfqX.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>x(()=>import("./prolog-bSi0SE3D.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>x(()=>import("./proto-BZ_yZy5q.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>x(()=>import("./pug-ClQUpJlV.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>x(()=>import("./puppet-ja2MI9-b.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>x(()=>import("./purescript-CxgsQa43.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>x(()=>import("./python-DgE28U1V.js"),[]))},{id:"qml",name:"QML",import:(()=>x(()=>import("./qml-BEkX6VoX.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>x(()=>import("./qmldir-DNYHzgow.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>x(()=>import("./qss-BZsEMKxJ.js"),[]))},{id:"r",name:"R",import:(()=>x(()=>import("./r-BcofxrH1.js"),[]))},{id:"racket",name:"Racket",import:(()=>x(()=>import("./racket-CzHBKLyy.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>x(()=>import("./raku-CPccoUN1.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>x(()=>import("./razor-DnCvuKPj.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>x(()=>import("./reg-DkqHJyC0.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>x(()=>import("./regexp-BW_zLBm-.js"),[]))},{id:"rel",name:"Rel",import:(()=>x(()=>import("./rel-BIqKdwke.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>x(()=>import("./riscv-s6spwTFp.js"),[]))},{id:"ron",name:"RON",import:(()=>x(()=>import("./ron-CloI94uS.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>x(()=>import("./rosmsg-TcL_zzr8.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>x(()=>import("./rst-BQ8kJ8ZW.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>x(()=>import("./ruby-DsIP2xqq.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>x(()=>import("./rust-DJErdhjk.js"),[]))},{id:"sas",name:"SAS",import:(()=>x(()=>import("./sas-BZeeyq_z.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>x(()=>import("./sass-CIfQ9yqV.js"),[]))},{id:"scala",name:"Scala",import:(()=>x(()=>import("./scala-CWwlNtab.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>x(()=>import("./scheme-ByM66cy_.js"),[]))},{id:"scss",name:"SCSS",import:(()=>x(()=>import("./scss-Dk05w39G.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>x(()=>import("./sdbl-C5Q1usnU.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>x(()=>import("./shaderlab-DNkMdb2B.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>x(()=>import("./shellscript-CE-5zpiL.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>x(()=>import("./shellsession-BhddCRKA.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>x(()=>import("./smalltalk-GKfhTxrk.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>x(()=>import("./solidity-DanOLEvk.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>x(()=>import("./soy-C6ERzLIv.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>x(()=>import("./sparql-CHK3vDkL.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>x(()=>import("./splunk-YU1HCmJX.js"),[]))},{id:"sql",name:"SQL",import:(()=>x(()=>import("./sql-CKXjX23X.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>x(()=>import("./ssh-config-Cpnw3KEt.js"),[]))},{id:"stata",name:"Stata",import:(()=>x(()=>import("./stata-BJqnY-gO.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>x(()=>import("./stylus-CHekGIgu.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>x(()=>import("./surrealql-CYeReaNr.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>x(()=>import("./svelte-xWy8v8x_.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>x(()=>import("./swift-DjrYMa62.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>x(()=>import("./system-verilog-rKNYENrf.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>x(()=>import("./systemd-C1FfcI00.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>x(()=>import("./talonscript-bksoRmW6.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>x(()=>import("./tasl-Bl4tsGRM.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>x(()=>import("./tcl-B2_VAYrd.js"),[]))},{id:"templ",name:"Templ",import:(()=>x(()=>import("./templ-Bod2PxCB.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>x(()=>import("./terraform-Ba94thAr.js"),[]))},{id:"tex",name:"TeX",import:(()=>x(()=>import("./tex-BLPnQt1V.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>x(()=>import("./toml-Btlk-g9G.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>x(()=>import("./ts-tags-eLBrqaVN.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>x(()=>import("./tsv-DYfmKMIW.js"),[]))},{id:"tsx",name:"TSX",import:(()=>x(()=>import("./tsx-Dio8iE-N.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>x(()=>import("./turtle-whXsfw69.js"),[]))},{id:"twig",name:"Twig",import:(()=>x(()=>import("./twig-LEyH1z5E.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>x(()=>import("./typescript-DttGkNCf.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>x(()=>import("./typespec-C_z-8Pri.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>x(()=>import("./typst-D2RORpaG.js"),[]))},{id:"v",name:"V",import:(()=>x(()=>import("./v-CvM42WIw.js"),[]))},{id:"vala",name:"Vala",import:(()=>x(()=>import("./vala-B_5xOBNr.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>x(()=>import("./vb-BVDm3zBt.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>x(()=>import("./verilog-D5iownw6.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>x(()=>import("./vhdl-Bmgbkl_-.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>x(()=>import("./viml-3ZODU9FQ.js"),[]))},{id:"vue",name:"Vue",import:(()=>x(()=>import("./vue-DiyPqOwP.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>x(()=>import("./vue-html-BM4TQ0nH.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>x(()=>import("./vue-vine-CcuWFpUQ.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>x(()=>import("./vyper-B6NKdirK.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>x(()=>import("./wasm-LUzQYg3H.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>x(()=>import("./wenyan-8fXatRyt.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>x(()=>import("./wgsl-CECC3vJ5.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>x(()=>import("./wikitext-BaRWL9sq.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>x(()=>import("./wit-MEd50GYB.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>x(()=>import("./wolfram-CmMaIVaG.js"),[]))},{id:"xml",name:"XML",import:(()=>x(()=>import("./xml-DtyAt_xK.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>x(()=>import("./xsl-Btrj9DhN.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>x(()=>import("./yaml-B92AUxDB.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>x(()=>import("./zenscript-Dja4fBOE.js"),[]))},{id:"zig",name:"Zig",import:(()=>x(()=>import("./zig-LhWa2ADv.js"),[]))}],YA=Object.fromEntries(B1.map(e=>[e.id,e.import])),QA=Object.fromEntries(B1.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),XA={...YA,...QA},ZA=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>x(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>x(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>x(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>x(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>x(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>x(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>x(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>x(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>x(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>x(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>x(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>x(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>x(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>x(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>x(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>x(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>x(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>x(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>x(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>x(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>x(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>x(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>x(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>x(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>x(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>x(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>x(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>x(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>x(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>x(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>x(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>x(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>x(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>x(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>x(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>x(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>x(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>x(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>x(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>x(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>x(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>x(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>x(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>x(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>x(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>x(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>x(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>x(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>x(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>x(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>x(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>x(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>x(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>x(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>x(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>x(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>x(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>x(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>x(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>x(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>x(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>x(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],eC=Object.fromEntries(ZA.map(e=>[e.id,e.import]));var tC=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Ive(){return 2147483648}function Ave(){return typeof performance<"u"?performance.now():Date.now()}const Cve=(e,t)=>e+(t-e%t)%t;async function Pve(e){let t,n;const r={};function s(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function i(h,m,y){r.HEAPU8.copyWithin(h,m,m+y)}function a(h){try{return t.grow(h-n.byteLength+65535>>>16),s(t.buffer),1}catch{}}function o(h){const m=r.HEAPU8.length;h=h>>>0;const y=Ive();if(h>y)return!1;for(let g=1;g<=4;g*=2){let p=m*(1+.2/g);p=Math.min(p,h+100663296);const _=Math.min(y,Cve(Math.max(h,p),65536));if(a(_))return!0}return!1}const c=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,y=1024){const g=m+y;let p=m;for(;h[p]&&!(p>=g);)++p;if(p-m>16&&h.buffer&&c)return c.decode(h.subarray(m,p));let _="";for(;m<p;){let k=h[m++];if(!(k&128)){_+=String.fromCharCode(k);continue}const v=h[m++]&63;if((k&224)===192){_+=String.fromCharCode((k&31)<<6|v);continue}const w=h[m++]&63;if((k&240)===224?k=(k&15)<<12|v<<6|w:k=(k&7)<<18|v<<12|w<<6|h[m++]&63,k<65536)_+=String.fromCharCode(k);else{const S=k-65536;_+=String.fromCharCode(55296|S>>10,56320|S&1023)}}return _}function l(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:Ave,emscripten_memcpy_big:i,emscripten_resize_heap:o,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,s(t.buffer),Object.assign(r,m),r.UTF8ToString=l}return await f(),r}var Nve=Object.defineProperty,Rve=(e,t,n)=>t in e?Nve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pn=(e,t,n)=>Rve(e,typeof t!="symbol"?t+"":t,n);let Vn=null;function Ove(e){throw new tC(e.UTF8ToString(e.getLastOnigError()))}let CU=class PU{constructor(t){Pn(this,"utf16Length"),Pn(this,"utf8Length"),Pn(this,"utf16Value"),Pn(this,"utf8Value"),Pn(this,"utf16OffsetToUtf8"),Pn(this,"utf8OffsetToUtf16");const n=t.length,r=PU._utf8ByteLength(t),s=r!==n,i=s?new Uint32Array(n+1):null;s&&(i[n]=r);const a=s?new Uint32Array(r+1):null;s&&(a[r]=n);const o=new Uint8Array(r);let c=0;for(let u=0;u<n;u++){const l=t.charCodeAt(u);let d=l,f=!1;if(l>=55296&&l<=56319&&u+1<n){const h=t.charCodeAt(u+1);h>=56320&&h<=57343&&(d=(l-55296<<10)+65536|h-56320,f=!0)}s&&(i[u]=c,f&&(i[u+1]=c),d<=127?a[c+0]=u:d<=2047?(a[c+0]=u,a[c+1]=u):d<=65535?(a[c+0]=u,a[c+1]=u,a[c+2]=u):(a[c+0]=u,a[c+1]=u,a[c+2]=u,a[c+3]=u)),d<=127?o[c++]=d:d<=2047?(o[c++]=192|(d&1984)>>>6,o[c++]=128|(d&63)>>>0):d<=65535?(o[c++]=224|(d&61440)>>>12,o[c++]=128|(d&4032)>>>6,o[c++]=128|(d&63)>>>0):(o[c++]=240|(d&1835008)>>>18,o[c++]=128|(d&258048)>>>12,o[c++]=128|(d&4032)>>>6,o[c++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let n=0;for(let r=0,s=t.length;r<s;r++){const i=t.charCodeAt(r);let a=i,o=!1;if(i>=55296&&i<=56319&&r+1<s){const c=t.charCodeAt(r+1);c>=56320&&c<=57343&&(a=(i-55296<<10)+65536|c-56320,o=!0)}a<=127?n+=1:a<=2047?n+=2:a<=65535?n+=3:n+=4,o&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}};const z1=class Ri{constructor(t){if(Pn(this,"id",++Ri.LAST_ID),Pn(this,"_onigBinding"),Pn(this,"content"),Pn(this,"utf16Length"),Pn(this,"utf8Length"),Pn(this,"utf16OffsetToUtf8"),Pn(this,"utf8OffsetToUtf16"),Pn(this,"ptr"),!Vn)throw new tC("Must invoke loadWasm first.");this._onigBinding=Vn,this.content=t;const n=new CU(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Ri._sharedPtrInUse?(Ri._sharedPtr||(Ri._sharedPtr=Vn.omalloc(1e4)),Ri._sharedPtrInUse=!0,Vn.HEAPU8.set(n.utf8Value,Ri._sharedPtr),this.ptr=Ri._sharedPtr):this.ptr=n.createString(Vn)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Ri._sharedPtr?Ri._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Pn(z1,"LAST_ID",0);Pn(z1,"_sharedPtr",0);Pn(z1,"_sharedPtrInUse",!1);let NU=z1,Lve=class{constructor(t){if(Pn(this,"_onigBinding"),Pn(this,"_ptr"),!Vn)throw new tC("Must invoke loadWasm first.");const n=[],r=[];for(let o=0,c=t.length;o<c;o++){const u=new CU(t[o]);n[o]=u.createString(Vn),r[o]=u.utf8Length}const s=Vn.omalloc(4*t.length);Vn.HEAPU32.set(n,s/4);const i=Vn.omalloc(4*t.length);Vn.HEAPU32.set(r,i/4);const a=Vn.createOnigScanner(s,i,t.length);for(let o=0,c=t.length;o<c;o++)Vn.ofree(n[o]);Vn.ofree(i),Vn.ofree(s),a===0&&Ove(Vn),this._onigBinding=Vn,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let s=0;if(typeof r=="number"&&(s=r),typeof t=="string"){t=new NU(t);const i=this._findNextMatchSync(t,n,!1,s);return t.dispose(),i}return this._findNextMatchSync(t,n,!1,s)}_findNextMatchSync(t,n,r,s){const i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),s);if(a===0)return null;const o=i.HEAPU32;let c=a/4;const u=o[c++],l=o[c++],d=[];for(let f=0;f<l;f++){const h=t.convertUtf8OffsetToUtf16(o[c++]),m=t.convertUtf8OffsetToUtf16(o[c++]);d[f]={start:h,end:m,length:m-h}}return{index:u,captureIndices:d}}};function Dve(e){return typeof e.instantiator=="function"}function $ve(e){return typeof e.default=="function"}function Mve(e){return typeof e.data<"u"}function jve(e){return typeof Response<"u"&&e instanceof Response}function Fve(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let Jg;function nC(e){if(Jg)return Jg;async function t(){Vn=await Pve(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),Dve(r)?r=await r.instantiator(n):$ve(r)?r=await r.default(n):(Mve(r)&&(r=r.data),jve(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await Bve(r)(n):r=await zve(r)(n):Fve(r)?r=await FE(r)(n):r instanceof WebAssembly.Module?r=await FE(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await FE(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Jg=t(),Jg}function FE(e){return t=>WebAssembly.instantiate(e,t)}function Bve(e){return t=>WebAssembly.instantiateStreaming(e,t)}function zve(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let RU;function Uve(e){RU=e}function Vve(){return RU}async function OU(e){return e&&await nC(e),{createScanner(t){return new Lve(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new NU(t)}}}const Hve=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:OU,getDefaultWasmLoader:Vve,loadWasm:nC,setDefaultWasmLoader:Uve},Symbol.toStringTag,{value:"Module"}));var LU=JA({});AU(LU,Hve);var Ut=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function qve(e){return rC(e)}function rC(e){return Array.isArray(e)?Gve(e):e instanceof RegExp?e:typeof e=="object"?Kve(e):e}function Gve(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=rC(e[n]);return t}function Kve(e){let t={};for(let n in e)t[n]=rC(e[n]);return t}function DU(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function $U(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?$U(e.substring(0,e.length-1)):e.substr(~t+1)}var BE=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Yg=class{static hasCaptures(e){return e===null?!1:(BE.lastIndex=0,BE.test(e))}static replaceCaptures(e,t,n){return e.replace(BE,(r,s,i,a)=>{let o=n[parseInt(s||i,10)];if(o){let c=t.substring(o.start,o.end);for(;c[0]===".";)c=c.substring(1);switch(a){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function MU(e,t){return e<t?-1:e>t?1:0}function jU(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let s=0;s<n;s++){let i=MU(e[s],t[s]);if(i!==0)return i}return 0}return n-r}function AL(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function FU(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var BU=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},bm=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Yve(e),t)}static createFromParsedTheme(e,t){return Xve(e,t)}_cachedMatchRoot=new BU(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(s=>Wve(e.parent,s.parentScopes));return r?new zU(r.fontStyle,r.foreground,r.background):null}},zE=class q0{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new q0(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new q0(n,t[r]);return n}push(t){return new q0(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function Wve(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],s=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],s=!0}for(;e&&!Jve(e.scopeName,r);){if(s)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Jve(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var zU=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Yve(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let s=0,i=t.length;s<i;s++){let a=t[s];if(!a.settings)continue;let o;if(typeof a.scope=="string"){let d=a.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),o=d.split(",")}else Array.isArray(a.scope)?o=a.scope:o=[""];let c=-1;if(typeof a.settings.fontStyle=="string"){c=0;let d=a.settings.fontStyle.split(" ");for(let f=0,h=d.length;f<h;f++)switch(d[f]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let u=null;typeof a.settings.foreground=="string"&&AL(a.settings.foreground)&&(u=a.settings.foreground);let l=null;typeof a.settings.background=="string"&&AL(a.settings.background)&&(l=a.settings.background);for(let d=0,f=o.length;d<f;d++){let m=o[d].trim().split(" "),y=m[m.length-1],g=null;m.length>1&&(g=m.slice(0,m.length-1),g.reverse()),n[r++]=new Qve(y,g,s,c,u,l)}}return n}var Qve=class{constructor(e,t,n,r,s,i){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=s,this.background=i}},xt=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(xt||{});function Xve(e,t){e.sort((c,u)=>{let l=MU(c.scope,u.scope);return l!==0||(l=jU(c.parentScopes,u.parentScopes),l!==0)?l:c.index-u.index});let n=0,r="#000000",s="#ffffff";for(;e.length>=1&&e[0].scope==="";){let c=e.shift();c.fontStyle!==-1&&(n=c.fontStyle),c.foreground!==null&&(r=c.foreground),c.background!==null&&(s=c.background)}let i=new Zve(t),a=new zU(n,i.getId(r),i.getId(s)),o=new txe(new vv(0,null,-1,0,0),[]);for(let c=0,u=e.length;c<u;c++){let l=e[c];o.insert(0,l.scope,l.parentScopes,l.fontStyle,i.getId(l.foreground),i.getId(l.background))}return new bm(i,a,o)}var Zve=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},exe=Object.freeze([]),vv=class UU{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,s,i){this.scopeDepth=t,this.parentScopes=n||exe,this.fontStyle=r,this.foreground=s,this.background=i}clone(){return new UU(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,s=t.length;r<s;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,s){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},txe=class xv{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,s=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=t.parentScopes.length||s>=n.parentScopes.length);){const i=n.parentScopes[s].length-t.parentScopes[r].length;if(i!==0)return i;r++,s++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),s,i;if(r===-1?(s=t,i=""):(s=t.substring(0,r),i=t.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(xv._cmpBySpecificity),n}insert(t,n,r,s,i,a){if(n===""){this._doInsertHere(t,r,s,i,a);return}let o=n.indexOf("."),c,u;o===-1?(c=n,u=""):(c=n.substring(0,o),u=n.substring(o+1));let l;this._children.hasOwnProperty(c)?l=this._children[c]:(l=new xv(this._mainRule.clone(),vv.cloneArr(this._rulesWithParentScopes)),this._children[c]=l),l.insert(t+1,u,r,s,i,a)}_doInsertHere(t,n,r,s,i){if(n===null){this._mainRule.acceptOverwrite(t,r,s,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let c=this._rulesWithParentScopes[a];if(jU(c.parentScopes,n)===0){c.acceptOverwrite(t,r,s,i);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new vv(t,n,r,s,i))}},Ho=class As{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=As.getLanguageId(t),r=As.getTokenType(t),s=As.getFontStyle(t),i=As.getForeground(t),a=As.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:i,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,s,i,a,o){let c=As.getLanguageId(t),u=As.getTokenType(t),l=As.containsBalancedBrackets(t)?1:0,d=As.getFontStyle(t),f=As.getForeground(t),h=As.getBackground(t);return n!==0&&(c=n),r!==8&&(u=r),s!==null&&(l=s?1:0),i!==-1&&(d=i),a!==0&&(f=a),o!==0&&(h=o),(c<<0|u<<8|l<<10|d<<11|f<<15|h<<24)>>>0}};function Sy(e,t){const n=[],r=nxe(e);let s=r.next();for(;s!==null;){let c=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let u=a();if(n.push({matcher:u,priority:c}),s!==",")break;s=r.next()}return n;function i(){if(s==="-"){s=r.next();const c=i();return u=>!!c&&!c(u)}if(s==="("){s=r.next();const c=o();return s===")"&&(s=r.next()),c}if(CL(s)){const c=[];do c.push(s),s=r.next();while(CL(s));return u=>t(c,u)}return null}function a(){const c=[];let u=i();for(;u;)c.push(u),u=i();return l=>c.every(d=>d(l))}function o(){const c=[];let u=a();for(;u&&(c.push(u),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");u=a()}return l=>c.some(d=>d(l))}}function CL(e){return!!e&&!!e.match(/[\w\.:]+/)}function nxe(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function VU(e){typeof e.dispose=="function"&&e.dispose()}var ym=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},rxe=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},sxe=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},ixe=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ym(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new sxe;for(const n of e)axe(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof ym){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function axe(e,t,n,r){const s=n.lookup(e.scopeName);if(!s){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const i=n.lookup(t);e instanceof ym?G0({baseGrammar:i,selfGrammar:s},r):Tv(e.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);const a=n.injections(e.scopeName);if(a)for(const o of a)r.add(new ym(o))}function Tv(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];vy([r],t,n)}}function G0(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&vy(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&vy(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function vy(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const s=r.repository?DU({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&vy(r.patterns,{...t,repository:s},n);const i=r.include;if(!i)continue;const a=HU(i);switch(a.kind){case 0:G0({...t,selfGrammar:t.baseGrammar},n);break;case 1:G0(t,n);break;case 2:Tv(a.ruleName,{...t,repository:s},n);break;case 3:case 4:const o=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){const c={baseGrammar:t.baseGrammar,selfGrammar:o,repository:s};a.kind===4?Tv(a.ruleName,c,n):G0(c,n)}else a.kind===4?n.add(new rxe(a.scopeName,a.ruleName)):n.add(new ym(a.scopeName));break}}}var oxe=class{kind=0},cxe=class{kind=1},uxe=class{constructor(e){this.ruleName=e}kind=2},lxe=class{constructor(e){this.scopeName=e}kind=3},dxe=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function HU(e){if(e==="$base")return new oxe;if(e==="$self")return new cxe;const t=e.indexOf("#");if(t===-1)return new lxe(e);if(t===0)return new uxe(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new dxe(n,r)}}var fxe=/\\(\d+)/,PL=/\\(\d+)/g,hxe=-1,qU=-2;var Ep=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Yg.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Yg.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${$U(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Yg.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Yg.replaceCaptures(this._contentName,e,t)}},mxe=class extends Ep{retokenizeCapturedWithRuleId;constructor(e,t,n,r,s){super(e,t,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},pxe=class extends Ep{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,s){super(e,t,n,null),this._match=new _m(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new km,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},NL=class extends Ep{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,s){super(e,t,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new km,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Iv=class extends Ep{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,s,i,a,o,c,u){super(e,t,n,r),this._begin=new _m(s,this.id),this.beginCaptures=i,this._end=new _m(a||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=o,this.applyEndPatternLast=c||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new km;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},xy=class extends Ep{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,s,i,a,o,c){super(e,t,n,r),this._begin=new _m(s,this.id),this.beginCaptures=i,this.whileCaptures=o,this._while=new _m(a,qU),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new km;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new km,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},GU=class gr{static createCaptureRule(t,n,r,s,i){return t.registerRule(a=>new mxe(n,a,r,s,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(s=>{if(t.id=s,t.match)return new pxe(t.$vscodeTextmateLocation,t.id,t.name,t.match,gr._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=DU({},r,t.repository));let i=t.patterns;return typeof i>"u"&&t.include&&(i=[{include:t.include}]),new NL(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,gr._compilePatterns(i,n,r))}return t.while?new xy(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,gr._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,gr._compileCaptures(t.whileCaptures||t.captures,n,r),gr._compilePatterns(t.patterns,n,r)):new Iv(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,gr._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,gr._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,gr._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let s=[];if(t){let i=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);o>i&&(i=o)}for(let a=0;a<=i;a++)s[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);let c=0;t[a].patterns&&(c=gr.getCompiledRuleId(t[a],n,r)),s[o]=gr.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,c)}}return s}static _compilePatterns(t,n,r){let s=[];if(t)for(let i=0,a=t.length;i<a;i++){const o=t[i];let c=-1;if(o.include){const u=HU(o.include);switch(u.kind){case 0:case 1:c=gr.getCompiledRuleId(r[o.include],n,r);break;case 2:let l=r[u.ruleName];l&&(c=gr.getCompiledRuleId(l,n,r));break;case 3:case 4:const d=u.scopeName,f=u.kind===4?u.ruleName:null,h=n.getExternalGrammar(d,r);if(h)if(f){let m=h.repository[f];m&&(c=gr.getCompiledRuleId(m,n,h.repository))}else c=gr.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else c=gr.getCompiledRuleId(o,n,r);if(c!==-1){const u=n.getRule(c);let l=!1;if((u instanceof NL||u instanceof Iv||u instanceof xy)&&u.hasMissingPatterns&&u.patterns.length===0&&(l=!0),l)continue;s.push(c)}}return{patterns:s,hasMissingPatterns:(t?t.length:0)!==s.length}}},_m=class KU{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let s=0,i=[],a=!1;for(let o=0;o<r;o++)if(t.charAt(o)==="\\"&&o+1<r){const u=t.charAt(o+1);u==="z"?(i.push(t.substring(s,o)),i.push("$(?!\\n)(?<!\\n)"),s=o+2):(u==="A"||u==="G")&&(a=!0),o++}this.hasAnchor=a,s===0?this.source=t:(i.push(t.substring(s,r)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=fxe.test(this.source):this.hasBackReferences=!1}clone(){return new KU(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(s=>t.substring(s.start,s.end));return PL.lastIndex=0,this.source.replace(PL,(s,i)=>FU(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],s=[],i,a,o,c;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),t[i]=o,n[i]=o,r[i]=o,s[i]=o,o==="\\"&&i+1<a&&(c=this.source.charAt(i+1),c==="A"?(t[i+1]="",n[i+1]="",r[i+1]="A",s[i+1]="A"):c==="G"?(t[i+1]="",n[i+1]="G",r[i+1]="",s[i+1]="G"):(t[i+1]=c,n[i+1]=c,r[i+1]=c,s[i+1]=c),i++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},km=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new RL(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(s=>s.resolveAnchors(t,n));return new RL(e,r,this._items.map(s=>s.ruleId))}},RL=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
112
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},UE=class{constructor(e,t){this.languageId=e,this.tokenType=t}},gxe=class Av{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new UE(t,8),this._embeddedLanguagesMatcher=new bxe(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Av._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new UE(0,0);_getBasicScopeAttributes=new BU(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new UE(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Av.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},bxe=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>FU(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},OL=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function WU(e,t,n,r,s,i,a,o){const c=t.content.length;let u=!1,l=-1;if(a){const h=yxe(e,t,n,r,s,i);s=h.stack,r=h.linePos,n=h.isFirstLine,l=h.anchorPosition}const d=Date.now();for(;!u;){if(o!==0&&Date.now()-d>o)return new OL(s,!0);f()}return new OL(s,!1);function f(){const h=_xe(e,t,n,r,s,l);if(!h){i.produce(s,c),u=!0;return}const m=h.captureIndices,y=h.matchedRuleId,g=m&&m.length>0?m[0].end>r:!1;if(y===hxe){const p=s.getRule(e);i.produce(s,m[0].start),s=s.withContentNameScopesList(s.nameScopesList),Yf(e,t,n,s,i,p.endCaptures,m),i.produce(s,m[0].end);const _=s;if(s=s.parent,l=_.getAnchorPos(),!g&&_.getEnterPos()===r){s=_,i.produce(s,c),u=!0;return}}else{const p=e.getRule(y);i.produce(s,m[0].start);const _=s,k=p.getName(t.content,m),v=s.contentNameScopesList.pushAttributed(k,e);if(s=s.push(y,r,l,m[0].end===c,null,v,v),p instanceof Iv){const w=p;Yf(e,t,n,s,i,w.beginCaptures,m),i.produce(s,m[0].end),l=m[0].end;const S=w.getContentName(t.content,m),T=v.pushAttributed(S,e);if(s=s.withContentNameScopesList(T),w.endHasBackReferences&&(s=s.withEndRule(w.getEndWithResolvedBackReferences(t.content,m))),!g&&_.hasSameRuleAs(s)){s=s.pop(),i.produce(s,c),u=!0;return}}else if(p instanceof xy){const w=p;Yf(e,t,n,s,i,w.beginCaptures,m),i.produce(s,m[0].end),l=m[0].end;const S=w.getContentName(t.content,m),T=v.pushAttributed(S,e);if(s=s.withContentNameScopesList(T),w.whileHasBackReferences&&(s=s.withEndRule(w.getWhileWithResolvedBackReferences(t.content,m))),!g&&_.hasSameRuleAs(s)){s=s.pop(),i.produce(s,c),u=!0;return}}else if(Yf(e,t,n,s,i,p.captures,m),i.produce(s,m[0].end),s=s.pop(),!g){s=s.safePop(),i.produce(s,c),u=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function yxe(e,t,n,r,s,i){let a=s.beginRuleCapturedEOL?0:-1;const o=[];for(let c=s;c;c=c.pop()){const u=c.getRule(e);u instanceof xy&&o.push({rule:u,stack:c})}for(let c=o.pop();c;c=o.pop()){const{ruleScanner:u,findOptions:l}=wxe(c.rule,e,c.stack.endRule,n,r===a),d=u.findNextMatchSync(t,r,l);if(d){if(d.ruleId!==qU){s=c.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(i.produce(c.stack,d.captureIndices[0].start),Yf(e,t,n,c.stack,i,c.rule.whileCaptures,d.captureIndices),i.produce(c.stack,d.captureIndices[0].end),a=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{s=c.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:a,isFirstLine:n}}function _xe(e,t,n,r,s,i){const a=kxe(e,t,n,r,s,i),o=e.getInjections();if(o.length===0)return a;const c=Exe(o,e,t,n,r,s,i);if(!c)return a;if(!a)return c;const u=a.captureIndices[0].start,l=c.captureIndices[0].start;return l<u||c.priorityMatch&&l===u?c:a}function kxe(e,t,n,r,s,i){const a=s.getRule(e),{ruleScanner:o,findOptions:c}=JU(a,e,s.endRule,n,r===i),u=o.findNextMatchSync(t,r,c);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function Exe(e,t,n,r,s,i,a){let o=Number.MAX_VALUE,c=null,u,l=0;const d=i.contentNameScopesList.getScopeNames();for(let f=0,h=e.length;f<h;f++){const m=e[f];if(!m.matcher(d))continue;const y=t.getRule(m.ruleId),{ruleScanner:g,findOptions:p}=JU(y,t,null,r,s===a),_=g.findNextMatchSync(n,s,p);if(!_)continue;const k=_.captureIndices[0].start;if(!(k>=o)&&(o=k,c=_.captureIndices,u=_.ruleId,l=m.priority,o===s))break}return c?{priorityMatch:l===-1,captureIndices:c,matchedRuleId:u}:null}function JU(e,t,n,r,s){return{ruleScanner:e.compileAG(t,n,r,s),findOptions:0}}function wxe(e,t,n,r,s){return{ruleScanner:e.compileWhileAG(t,n,r,s),findOptions:0}}function Yf(e,t,n,r,s,i,a){if(i.length===0)return;const o=t.content,c=Math.min(i.length,a.length),u=[],l=a[0].end;for(let d=0;d<c;d++){const f=i[d];if(f===null)continue;const h=a[d];if(h.length===0)continue;if(h.start>l)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)s.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?s.produceFromScopes(u[u.length-1].scopes,h.start):s.produce(r,h.start),f.retokenizeCapturedWithRuleId){const y=f.getName(o,a),g=r.contentNameScopesList.pushAttributed(y,e),p=f.getContentName(o,a),_=g.pushAttributed(p,e),k=r.push(f.retokenizeCapturedWithRuleId,h.start,-1,!1,null,g,_),v=e.createOnigString(o.substring(0,h.end));WU(e,v,n&&h.start===0,h.start,k,s,!1,0),VU(v);continue}const m=f.getName(o,a);if(m!==null){const g=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);u.push(new Sxe(g,h.end))}}for(;u.length>0;)s.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var Sxe=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function vxe(e,t,n,r,s,i,a,o){return new Txe(e,t,n,r,s,i,a,o)}function LL(e,t,n,r,s){const i=Sy(t,Ty),a=GU.getCompiledRuleId(n,r,s.repository);for(const o of i)e.push({debugSelector:t,matcher:o.matcher,ruleId:a,grammar:s,priority:o.priority})}function Ty(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let s=n;s<t.length;s++)if(xxe(t[s],r))return n=s+1,!0;return!1})}function xxe(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var Txe=class{constructor(e,t,n,r,s,i,a,o){if(this._rootScopeName=e,this.balancedBracketSelectors=i,this._onigLib=o,this._basicScopeAttributesProvider=new gxe(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=DL(t,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const c of Object.keys(s)){const u=Sy(c,Ty);for(const l of u)this._tokenTypeMatchers.push({matcher:l.matcher,type:s[c]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const s=r.injections;if(s)for(let a in s)LL(t,a,s[a],this,r);const i=this._grammarRepository.injections(n);i&&i.forEach(a=>{const o=this.getExternalGrammar(a);if(o){const c=o.injectionSelector;c&&LL(t,c,o,this,o)}})}return t.sort((s,i)=>s.priority-i.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=DL(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=GU.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!t||t===Cv.NULL){s=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),l=this.themeProvider.getDefaults(),d=Ho.set(0,u.languageId,u.tokenType,null,l.fontStyle,l.foregroundId,l.backgroundId),f=this.getRule(this._rootId).getName(null,null);let h;f?h=xh.createRootAndLookUpScopeName(f,d,this):h=xh.createRoot("unknown",d),t=new Cv(null,this._rootId,-1,-1,!1,null,h,h)}else s=!1,t.reset();e=e+`
|
|
113
|
+
`;const i=this.createOnigString(e),a=i.content.length,o=new Axe(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=WU(this,i,s,0,t,o,!0,r);return VU(i),{lineLength:a,lineTokens:o,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function DL(e,t){return e=qve(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var xh=class Oi{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,s=t?.scopePath??null;for(const i of n)s=zE.push(s,i.scopeNames),r=new Oi(r,s,i.encodedTokenAttributes);return r}static createRoot(t,n){return new Oi(null,new zE(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const s=r.getMetadataForScope(t),i=new zE(null,t),a=r.themeProvider.themeMatch(i),o=Oi.mergeAttributes(n,s,a);return new Oi(null,i,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Oi.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let s=-1,i=0,a=0;return r!==null&&(s=r.fontStyle,i=r.foregroundId,a=r.backgroundId),Ho.set(t,n.languageId,n.tokenType,null,s,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Oi._pushAttributed(this,t,n);const r=t.split(/ /g);let s=this;for(const i of r)s=Oi._pushAttributed(s,i,n);return s}static _pushAttributed(t,n,r){const s=r.getMetadataForScope(n),i=t.scopePath.push(n),a=r.themeProvider.themeMatch(i),o=Oi.mergeAttributes(t.tokenAttributes,s,a);return new Oi(t,i,o)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},Cv=class Sc{constructor(t,n,r,s,i,a,o,c){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new Sc(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Sc._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?xh.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Sc._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,s,i,a,o){return new Sc(this,t,n,r,s,i,a,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Sc(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=xh.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Sc(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,xh.fromExtension(r,n.contentNameScopesList))}},Ixe=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Sy(n,Ty).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Sy(n,Ty).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Axe=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=e?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(i)&&(r=Ho.set(r,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(i))}if(s&&(r=Ho.set(r,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},Cxe=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,s){if(!this._grammars.has(e)){let i=this._rawGrammars.get(e);if(!i)return null;this._grammars.set(e,vxe(e,i,t,n,r,s,this,this._onigLib))}return this._grammars.get(e)}},YU=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new Cxe(bm.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(bm.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new Ixe(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,s,i){const a=new ixe(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(o=>this._loadSingleGrammar(o.scopeName)),a.processQueue();return this._grammarForScopeName(t,n,r,s,i)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,s=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,s)}_grammarForScopeName(t,n=0,r=null,s=null,i=null){return this._syncRegistry.grammarForScopeName(t,n,r,s,i)}},gd=Cv.NULL;function Iy(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[s,i]of Object.entries(t?.colorReplacements||{}))typeof i=="string"?n[s]=i:s===r&&Object.assign(n,i);return n}function Ao(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Pxe(e){return Array.isArray(e)?e:[e]}async function QU(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function U1(e){return!e||["plaintext","txt","text","plain"].includes(e)}function XU(e){return e==="ansi"||U1(e)}function V1(e){return e==="none"}function ZU(e){return V1(e)}function H1(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const s=[];for(let i=0;i<n.length;i+=2){const a=t?n[i]+(n[i+1]||""):n[i];s.push([a,r]),r+=n[i].length,r+=n[i+1]?.length||0}return s}const $L={light:"#333333",dark:"#bbbbbb"},ML={light:"#fffffe",dark:"#1e1e1e"},jL="__shiki_resolved";function sC(e){if(e?.[jL])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const o=t.settings?t.settings.find(c=>!c.name&&!c.scope):void 0;o?.settings?.foreground&&(r=o.settings.foreground),o?.settings?.background&&(n=o.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?$L.light:$L.dark),n||(n=t.type==="light"?ML.light:ML.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let s=0;const i=new Map;function a(o){if(i.has(o))return i.get(o);s+=1;const c=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${c}`]?a(o):(i.set(o,c),c)}t.settings=t.settings.map(o=>{const c=o.settings?.foreground&&!o.settings.foreground.startsWith("#"),u=o.settings?.background&&!o.settings.background.startsWith("#");if(!c&&!u)return o;const l={...o,settings:{...o.settings}};if(c){const d=a(o.settings.foreground);t.colorReplacements[d]=o.settings.foreground,l.settings.foreground=d}if(u){const d=a(o.settings.background);t.colorReplacements[d]=o.settings.background,l.settings.background=d}return l});for(const o of Object.keys(t.colors||{}))if((o==="editor.foreground"||o==="editor.background"||o.startsWith("terminal.ansi"))&&!t.colors[o]?.startsWith("#")){const c=a(t.colors[o]);t.colorReplacements[c]=t.colors[o],t.colors[o]=c}return Object.defineProperty(t,jL,{enumerable:!1,writable:!1,value:!0}),t}async function e9(e){return Array.from(new Set((await Promise.all(e.filter(t=>!XU(t)).map(async t=>await QU(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function t9(e){return(await Promise.all(e.map(async t=>ZU(t)?null:sC(await QU(t))))).filter(t=>!!t)}function n9(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Ut(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}var Nxe=class extends YU{_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,n,r,s={}){super(t),this._resolver=t,this._themes=n,this._langs=r,this._alias=s,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=sC(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=bm.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=n9(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const s=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(s.name=t.name,this._resolvedGrammars.set(t.name,s),t.aliases&&t.aliases.forEach(i=>{this._alias[i]=t.name}),this._loadedLanguagesCache=null,n.size)for(const i of n)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const s of t)this.resolveEmbeddedLanguages(s);const n=Array.from(this._langGraph.entries()),r=n.filter(([s,i])=>!i);if(r.length){const s=n.filter(([i,a])=>a?(a.embeddedLanguages||a.embeddedLangs)?.some(o=>r.map(([c])=>c).includes(o)):!1).filter(i=>!r.includes(i));throw new Ut(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${s.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[s,i]of n)this._resolver.addLanguage(i);for(const[s,i]of n)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const r of n)this._langGraph.set(r,this._langMap.get(r))}},Rxe=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let s=1;s<=n.length;s++){const i=n.slice(0,s).join(".");r=[...r,...this._injections.get(i)||[]]}return r}};let Af=0;function Oxe(e){Af+=1,e.warnings!==!1&&Af>=10&&Af%10===0&&console.warn(`[Shiki] ${Af} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Ut("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(sC),s=new Nxe(new Rxe(e.engine,n),r,n,e.langAlias);let i;function a(_){return n9(_,e.langAlias)}function o(_){g();const k=s.getGrammar(typeof _=="string"?_:_.name);if(!k)throw new Ut(`Language \`${_}\` not found, you may need to load it first`);return k}function c(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};g();const k=s.getTheme(_);if(!k)throw new Ut(`Theme \`${_}\` not found, you may need to load it first`);return k}function u(_){g();const k=c(_);return i!==_&&(s.setTheme(k),i=_),{theme:k,colorMap:s.getColorMap()}}function l(){return g(),s.getLoadedThemes()}function d(){return g(),s.getLoadedLanguages()}function f(..._){g(),s.loadLanguages(_.flat(1))}async function h(..._){return f(await e9(_))}function m(..._){g();for(const k of _.flat(1))s.loadTheme(k)}async function y(..._){return g(),m(await t9(_))}function g(){if(t)throw new Ut("Shiki instance has been disposed")}function p(){t||(t=!0,s.dispose(),Af-=1)}return{setTheme:u,getTheme:c,getLanguage:o,getLoadedThemes:l,getLoadedLanguages:d,resolveLangAlias:a,loadLanguage:h,loadLanguageSync:f,loadTheme:y,loadThemeSync:m,dispose:p,[Symbol.dispose]:p}}async function Lxe(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([t9(e.themes||[]),e9(e.langs||[]),e.engine]);return Oxe({...e,themes:t,langs:n,engine:r})}const r9=new WeakMap;function q1(e,t){r9.set(e,t)}function Em(e){return r9.get(e)}var G1=class s9{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new s9(Object.fromEntries(Pxe(n).map(r=>[r,gd])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,s]=t;this.lang=r,this._stacks={[s]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Dxe(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Dxe(e){const t=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);const i=s?.nameScopesList?.scopeName;i&&t.push(i),s.parent&&r(s.parent)}return r(e),t}function $xe(e,t){if(!(e instanceof G1))throw new Ut("Invalid grammar state");return e.getInternalStack(t)}function i9(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(U1(e.resolveLangAlias(n.lang||"text"))||V1(r))return H1(t).map(o=>[{content:o[0],offset:o[1]}]);const{theme:s,colorMap:i}=e.setTheme(r),a=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==a.name)throw new Ut(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${a.name}"`);if(!n.grammarState.themes.includes(s.name))throw new Ut(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return jxe(t,a,s,i,n)}function Mxe(...e){if(e.length===2)return Em(e[1]);const[t,n,r={}]=e,{lang:s="text",theme:i=t.getLoadedThemes()[0]}=r;if(U1(s)||V1(i))throw new Ut("Plain language does not have grammar state");if(s==="ansi")throw new Ut("ANSI language does not have grammar state");const{theme:a,colorMap:o}=t.setTheme(i),c=t.getLanguage(s);return new G1(iC(n,c,a,o,r).stateStack,c.name,a.name)}function jxe(e,t,n,r,s){const i=iC(e,t,n,r,s),a=new G1(i.stateStack,t.name,n.name);return q1(i.tokens,a),i.tokens}function iC(e,t,n,r,s){const i=Iy(n,s),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:o=500}=s,c=H1(e);let u=s.grammarState?$xe(s.grammarState,n.name)??gd:s.grammarContextCode!=null?iC(s.grammarContextCode,t,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:gd,l=[];const d=[];for(let f=0,h=c.length;f<h;f++){const[m,y]=c[f];if(m===""){l=[],d.push([]);continue}if(a>0&&m.length>=a){l=[],d.push([{content:m,offset:y,color:"",fontStyle:0}]);continue}let g,p,_;s.includeExplanation&&(g=t.tokenizeLine(m,u,o),p=g.tokens,_=0);const k=t.tokenizeLine2(m,u,o),v=k.tokens.length/2;for(let w=0;w<v;w++){const S=k.tokens[2*w],T=w+1<v?k.tokens[2*w+2]:m.length;if(S===T)continue;const I=k.tokens[2*w+1],D=Ao(r[Ho.getForeground(I)],i),R=Ho.getFontStyle(I),z={content:m.substring(S,T),offset:y+S,color:D,fontStyle:R};if(s.includeExplanation){const V=[];if(s.includeExplanation!=="scopeName")for(const G of n.settings){let Q;switch(typeof G.scope){case"string":Q=G.scope.split(/,/).map(ne=>ne.trim());break;case"object":Q=G.scope;break;default:continue}V.push({settings:G,selectors:Q.map(ne=>ne.split(/ /))})}z.explanation=[];let H=0;for(;S+H<T;){const G=p[_],Q=m.substring(G.startIndex,G.endIndex);H+=Q.length,z.explanation.push({content:Q,scopes:s.includeExplanation==="scopeName"?Fxe(G.scopes):Bxe(V,G.scopes)}),_+=1}}l.push(z)}d.push(l),l=[],u=k.ruleStack}return{tokens:d,stateStack:u}}function Fxe(e){return e.map(t=>({scopeName:t}))}function Bxe(e,t){const n=[];for(let r=0,s=t.length;r<s;r++){const i=t[r];n[r]={scopeName:i,themeMatches:Uxe(e,i,t.slice(0,r))}}return n}function FL(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function zxe(e,t,n){if(!FL(e[e.length-1],t))return!1;let r=e.length-2,s=n.length-1;for(;r>=0&&s>=0;)FL(e[r],n[s])&&(r-=1),s-=1;return r===-1}function Uxe(e,t,n){const r=[];for(const{selectors:s,settings:i}of e)for(const a of s)if(zxe(a,t,n)){r.push(i);break}return r}function a9(e,t,n){const r=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),s=r.map(c=>{const u=i9(e,t,{...n,theme:c.theme});return{tokens:u,state:Em(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),i=Vxe(...s.map(c=>c.tokens)),a=i[0].map((c,u)=>c.map((l,d)=>{const f={content:l.content,variants:{},offset:l.offset};return"includeExplanation"in n&&n.includeExplanation&&(f.explanation=l.explanation),i.forEach((h,m)=>{const{content:y,explanation:g,offset:p,..._}=h[u][d];f.variants[r[m].color]=_}),f})),o=s[0].state?new G1(Object.fromEntries(s.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),s[0].state.lang):void 0;return o&&q1(a,o),a}function Vxe(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const s=e.map(c=>c[r]),i=t.map(()=>[]);t.forEach((c,u)=>c.push(i[u]));const a=s.map(()=>0),o=s.map(c=>c[0]);for(;o.every(c=>c);){const c=Math.min(...o.map(u=>u.content.length));for(let u=0;u<n;u++){const l=o[u];l.content.length===c?(i[u].push(l),a[u]+=1,o[u]=s[u][a[u]]):(i[u].push({...l,content:l.content.slice(0,c)}),o[u]={...l,content:l.content.slice(c),offset:l.offset+c})}}}return t}const o9=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class wp{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}wp.prototype.normal={};wp.prototype.property={};wp.prototype.space=void 0;function c9(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new wp(n,r,t)}function wm(e){return e.toLowerCase()}class ns{constructor(t,n){this.attribute=n,this.property=t}}ns.prototype.attribute="";ns.prototype.booleanish=!1;ns.prototype.boolean=!1;ns.prototype.commaOrSpaceSeparated=!1;ns.prototype.commaSeparated=!1;ns.prototype.defined=!1;ns.prototype.mustUseProperty=!1;ns.prototype.number=!1;ns.prototype.overloadedBoolean=!1;ns.prototype.property="";ns.prototype.spaceSeparated=!1;ns.prototype.space=void 0;let Hxe=0;const Je=$u(),bn=$u(),Pv=$u(),he=$u(),Bt=$u(),Ul=$u(),os=$u();function $u(){return 2**++Hxe}const Nv=Object.freeze(Object.defineProperty({__proto__:null,boolean:Je,booleanish:bn,commaOrSpaceSeparated:os,commaSeparated:Ul,number:he,overloadedBoolean:Pv,spaceSeparated:Bt},Symbol.toStringTag,{value:"Module"})),VE=Object.keys(Nv);class aC extends ns{constructor(t,n,r,s){let i=-1;if(super(t,n),BL(this,"space",s),typeof r=="number")for(;++i<VE.length;){const a=VE[i];BL(this,VE[i],(r&Nv[a])===Nv[a])}}}aC.prototype.defined=!0;function BL(e,t,n){n&&(e[t]=n)}function Jd(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const i=new aC(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[wm(r)]=r,n[wm(i.attribute)]=r}return new wp(t,n,e.space)}const u9=Jd({properties:{ariaActiveDescendant:null,ariaAtomic:bn,ariaAutoComplete:null,ariaBusy:bn,ariaChecked:bn,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:Bt,ariaCurrent:null,ariaDescribedBy:Bt,ariaDetails:null,ariaDisabled:bn,ariaDropEffect:Bt,ariaErrorMessage:null,ariaExpanded:bn,ariaFlowTo:Bt,ariaGrabbed:bn,ariaHasPopup:null,ariaHidden:bn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Bt,ariaLevel:he,ariaLive:null,ariaModal:bn,ariaMultiLine:bn,ariaMultiSelectable:bn,ariaOrientation:null,ariaOwns:Bt,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:bn,ariaReadOnly:bn,ariaRelevant:null,ariaRequired:bn,ariaRoleDescription:Bt,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:bn,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function l9(e,t){return t in e?e[t]:t}function d9(e,t){return l9(e,t.toLowerCase())}const qxe=Jd({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ul,acceptCharset:Bt,accessKey:Bt,action:null,allow:null,allowFullScreen:Je,allowPaymentRequest:Je,allowUserMedia:Je,alt:null,as:null,async:Je,autoCapitalize:null,autoComplete:Bt,autoFocus:Je,autoPlay:Je,blocking:Bt,capture:null,charSet:null,checked:Je,cite:null,className:Bt,cols:he,colSpan:null,content:null,contentEditable:bn,controls:Je,controlsList:Bt,coords:he|Ul,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Je,defer:Je,dir:null,dirName:null,disabled:Je,download:Pv,draggable:bn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Je,formTarget:null,headers:Bt,height:he,hidden:Pv,high:he,href:null,hrefLang:null,htmlFor:Bt,httpEquiv:Bt,id:null,imageSizes:null,imageSrcSet:null,inert:Je,inputMode:null,integrity:null,is:null,isMap:Je,itemId:null,itemProp:Bt,itemRef:Bt,itemScope:Je,itemType:Bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Je,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Je,muted:Je,name:null,nonce:null,noModule:Je,noValidate:Je,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Je,optimum:he,pattern:null,ping:Bt,placeholder:null,playsInline:Je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Je,referrerPolicy:null,rel:Bt,required:Je,reversed:Je,rows:he,rowSpan:he,sandbox:Bt,scope:null,scoped:Je,seamless:Je,selected:Je,shadowRootClonable:Je,shadowRootDelegatesFocus:Je,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:bn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:Je,useMap:null,value:bn,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Bt,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Je,declare:Je,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Je,noHref:Je,noShade:Je,noWrap:Je,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:bn,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Je,disableRemotePlayback:Je,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:d9}),Gxe=Jd({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:os,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:Bt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:Je,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ul,g2:Ul,glyphName:Ul,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:os,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:os,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:os,rev:os,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:os,requiredFeatures:os,requiredFonts:os,requiredFormats:os,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:os,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:os,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:os,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:l9}),f9=Jd({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),h9=Jd({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:d9}),m9=Jd({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Kxe={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Wxe=/[A-Z]/g,zL=/-[a-z]/g,Jxe=/^data[-\w.:]+$/i;function Sp(e,t){const n=wm(t);let r=t,s=ns;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Jxe.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(zL,Qxe);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!zL.test(i)){let a=i.replace(Wxe,Yxe);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}s=aC}return new s(r,t)}function Yxe(e){return"-"+e.toLowerCase()}function Qxe(e){return e.charAt(1).toUpperCase()}const Yd=c9([u9,qxe,f9,h9,m9],"html"),aa=c9([u9,Gxe,f9,h9,m9],"svg"),UL={}.hasOwnProperty;function oC(e,t){const n=t||{};function r(s,...i){let a=r.invalid;const o=r.handlers;if(s&&UL.call(s,e)){const c=String(s[e]);a=UL.call(o,c)?o[c]:r.unknown}if(a)return a.call(this,s,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Xxe=/["&'<>`]/g,Zxe=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,eTe=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,tTe=/[|\\{}()[\]^$+*?.]/g,VL=new WeakMap;function nTe(e,t){if(e=e.replace(t.subset?rTe(t.subset):Xxe,r),t.subset||t.escapeOnly)return e;return e.replace(Zxe,n).replace(eTe,r);function n(s,i,a){return t.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,a.charCodeAt(i+2),t)}function r(s,i,a){return t.format(s.charCodeAt(0),a.charCodeAt(i+1),t)}}function rTe(e){let t=VL.get(e);return t||(t=sTe(e),VL.set(e,t)),t}function sTe(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(tTe,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const iTe=/[\dA-Fa-f]/;function aTe(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!iTe.test(String.fromCharCode(t))?r:r+";"}const oTe=/\d/;function cTe(e,t,n){const r="&#"+String(e);return n&&t&&!oTe.test(String.fromCharCode(t))?r:r+";"}const uTe=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],HE={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},lTe=["cent","copy","divide","gt","lt","not","para","times"],p9={}.hasOwnProperty,Rv={};let Qg;for(Qg in HE)p9.call(HE,Qg)&&(Rv[HE[Qg]]=Qg);const dTe=/[^\dA-Za-z]/;function fTe(e,t,n,r){const s=String.fromCharCode(e);if(p9.call(Rv,s)){const i=Rv[s],a="&"+i;return n&&uTe.includes(i)&&!lTe.includes(i)&&(!r||t&&t!==61&&dTe.test(String.fromCharCode(t)))?a:a+";"}return""}function hTe(e,t,n){let r=aTe(e,t,n.omitOptionalSemicolons),s;if((n.useNamedReferences||n.useShortestReferences)&&(s=fTe(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){const i=cTe(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function Vl(e,t){return nTe(e,Object.assign({format:hTe},t))}const mTe=/^>|^->|<!--|-->|--!>|<!-$/g,pTe=[">"],gTe=["<",">"];function bTe(e,t,n,r){return r.settings.bogusComments?"<?"+Vl(e.value,Object.assign({},r.settings.characterReferences,{subset:pTe}))+">":"<!--"+e.value.replace(mTe,s)+"-->";function s(i){return Vl(i,Object.assign({},r.settings.characterReferences,{subset:gTe}))}}function yTe(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Ay(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function HL(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const a=n.slice(s,r).trim();(a||!i)&&t.push(a),s=r+1,r=n.indexOf(",",s)}return t}function cC(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function qL(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function uC(e){return e.join(" ").trim()}const _Te=/[ \t\n\f\r]/g;function K1(e){return typeof e=="object"?e.type==="text"?GL(e.value):!1:GL(e)}function GL(e){return e.replace(_Te,"")===""}const Fn=b9(1),g9=b9(-1),kTe=[];function b9(e){return t;function t(n,r,s){const i=n?n.children:kTe;let a=(r||0)+e,o=i[a];if(!s)for(;o&&K1(o);)a+=e,o=i[a];return o}}const ETe={}.hasOwnProperty;function y9(e){return t;function t(n,r,s){return ETe.call(e,n.tagName)&&e[n.tagName](n,r,s)}}const lC=y9({body:STe,caption:qE,colgroup:qE,dd:ITe,dt:TTe,head:qE,html:wTe,li:xTe,optgroup:ATe,option:CTe,p:vTe,rp:KL,rt:KL,tbody:NTe,td:WL,tfoot:RTe,th:WL,thead:PTe,tr:OTe});function qE(e,t,n){const r=Fn(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&K1(r.value.charAt(0)))}function wTe(e,t,n){const r=Fn(n,t);return!r||r.type!=="comment"}function STe(e,t,n){const r=Fn(n,t);return!r||r.type!=="comment"}function vTe(e,t,n){const r=Fn(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function xTe(e,t,n){const r=Fn(n,t);return!r||r.type==="element"&&r.tagName==="li"}function TTe(e,t,n){const r=Fn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function ITe(e,t,n){const r=Fn(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function KL(e,t,n){const r=Fn(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function ATe(e,t,n){const r=Fn(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function CTe(e,t,n){const r=Fn(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function PTe(e,t,n){const r=Fn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function NTe(e,t,n){const r=Fn(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function RTe(e,t,n){return!Fn(n,t)}function OTe(e,t,n){const r=Fn(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function WL(e,t,n){const r=Fn(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const LTe=y9({body:MTe,colgroup:jTe,head:$Te,html:DTe,tbody:FTe});function DTe(e){const t=Fn(e,-1);return!t||t.type!=="comment"}function $Te(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function MTe(e){const t=Fn(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&K1(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function jTe(e,t,n){const r=g9(n,t),s=Fn(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&lC(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function FTe(e,t,n){const r=g9(n,t),s=Fn(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&lC(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const Xg={name:[[`
|
|
114
|
+
\f\r &/=>`.split(""),`
|
|
115
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
116
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
117
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
118
|
+
\f\r &>`.split(""),`\0
|
|
119
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
120
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
121
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function BTe(e,t,n,r){const s=r.schema,i=s.space==="svg"?!1:r.settings.omitOptionalTags;let a=s.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const o=[];let c;s.space==="html"&&e.tagName==="svg"&&(r.schema=aa);const u=zTe(r,e.properties),l=r.all(s.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=s,l&&(a=!1),(u||!i||!LTe(e,t,n))&&(o.push("<",e.tagName,u?" "+u:""),a&&(s.space==="svg"||r.settings.closeSelfClosing)&&(c=u.charAt(u.length-1),(!r.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(l),!a&&(!i||!lC(e,t,n))&&o.push("</"+e.tagName+">"),o.join("")}function zTe(e,t){const n=[];let r=-1,s;if(t){for(s in t)if(t[s]!==null&&t[s]!==void 0){const i=UTe(e,s,t[s]);i&&n.push(i)}}for(;++r<n.length;){const i=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&i!=='"'&&i!=="'"&&(n[r]+=" ")}return n.join("")}function UTe(e,t,n){const r=Sp(e.schema,t),s=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,i=e.settings.allowDangerousCharacters?0:1;let a=e.quote,o;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const c=Vl(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Xg.name[s][i]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?cC:uC)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(o=Vl(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Xg.unquoted[s][i]}))),o!==n&&(e.settings.quoteSmart&&Ay(n,a)>Ay(n,e.alternative)&&(a=e.alternative),o=a+Vl(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?Xg.single:Xg.double)[s][i],attribute:!0}))+a),c+(o&&"="+o))}const VTe=["<","&"];function _9(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Vl(e.value,Object.assign({},r.settings.characterReferences,{subset:VTe}))}function HTe(e,t,n,r){return r.settings.allowDangerousHtml?e.value:_9(e,t,n,r)}function qTe(e,t,n,r){return r.all(e)}const GTe=oC("type",{invalid:KTe,unknown:WTe,handlers:{comment:bTe,doctype:yTe,element:BTe,raw:HTe,root:qTe,text:_9}});function KTe(e){throw new Error("Expected node, not `"+e+"`")}function WTe(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const JTe={},YTe={},QTe=[];function k9(e,t){const n=t||JTe,r=n.quote||'"',s=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:XTe,all:ZTe,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||o9,characterReferences:n.characterReferences||YTe,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?aa:Yd,quote:r,alternative:s}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function XTe(e,t,n){return GTe(e,t,n,this)}function ZTe(e){const t=[],n=e&&e.children||QTe;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function E9(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function eIe(e){const t=H1(e,!0).map(([s])=>s);function n(s){if(s===e.length)return{line:t.length-1,character:t[t.length-1].length};let i=s,a=0;for(const o of t){if(i<o.length)break;i-=o.length,a++}return{line:a,character:i}}function r(s,i){let a=0;for(let o=0;o<s;o++)a+=t[o].length;return a+=i,a}return{lines:t,indexToPos:n,posToIndex:r}}function tIe(e,t,n){const r=new Set;for(const i of e.matchAll(/:?lang=["']([^"']+)["']/g)){const a=i[1].toLowerCase().trim();a&&r.add(a)}for(const i of e.matchAll(/(?:```|~~~)([\w-]+)/g)){const a=i[1].toLowerCase().trim();a&&r.add(a)}for(const i of e.matchAll(/\\begin\{([\w-]+)\}/g)){const a=i[1].toLowerCase().trim();a&&r.add(a)}for(const i of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const a=i[1].toLowerCase().trim(),o=a.includes("/")?a.split("/").pop():a;o&&r.add(o)}if(!n)return Array.from(r);const s=n.getBundledLanguages();return Array.from(r).filter(i=>i&&s[i])}const dC="light-dark()",nIe=["color","background-color"];function rIe(e,t){let n=0;const r=[];for(const s of t)s>n&&r.push({...e,content:e.content.slice(n,s),offset:e.offset+n}),n=s;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function sIe(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,s)=>r-s);return n.length?e.map(r=>r.flatMap(s=>{const i=n.filter(a=>s.offset<a&&a<s.offset+s.content.length).map(a=>a-s.offset).sort((a,o)=>a-o);return i.length?rIe(s,i):s})):e}function iIe(e,t,n,r,s="css-vars"){const i={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(l=>Cy(e.variants[l])),o=new Set(a.flatMap(l=>Object.keys(l))),c={},u=(l,d)=>{const f=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return n+t[l]+(d==="color"?"":f)};return a.forEach((l,d)=>{for(const f of o){const h=l[f]||"inherit";if(d===0&&r&&nIe.includes(f))if(r===dC&&a.length>1){const m=t.findIndex(g=>g==="light"),y=t.findIndex(g=>g==="dark");if(m===-1||y===-1)throw new Ut('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[f]=`light-dark(${a[m][f]||"inherit"}, ${a[y][f]||"inherit"})`,s==="css-vars"&&(c[u(d,f)]=h)}else c[f]=h;else s==="css-vars"&&(c[u(d,f)]=h)}}),i.htmlStyle=c,i}function Cy(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&xt.Italic&&(t["font-style"]="italic"),e.fontStyle&xt.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&xt.Underline&&n.push("underline"),e.fontStyle&xt.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Ov(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function aIe(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let s=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new Ut(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...r.indexToPos(a),offset:a}}else{const o=r.lines[a.line];if(o===void 0)throw new Ut(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${r.lines.length}`);let c=a.character;if(c<0&&(c=o.length+c),c<0||c>o.length)throw new Ut(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${o.length}`);return{...a,character:c,offset:r.posToIndex(a.line,c)}}};const r=eIe(n.source),i=(n.options.decorations||[]).map(a=>({...a,start:s(a.start),end:s(a.end)}));oIe(i),e.set(n.meta,{decorations:i,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return sIe(n,t(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;const r=t(this),s=Array.from(n.children).filter(l=>l.type==="element"&&l.tagName==="span");if(s.length!==r.converter.lines.length)throw new Ut(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(l,d,f,h){const m=s[l];let y="",g=-1,p=-1;if(d===0&&(g=0),f===0&&(p=0),f===Number.POSITIVE_INFINITY&&(p=m.children.length),g===-1||p===-1)for(let k=0;k<m.children.length;k++)y+=w9(m.children[k]),g===-1&&y.length===d&&(g=k+1),p===-1&&y.length===f&&(p=k+1);if(g===-1)throw new Ut(`Failed to find start index for decoration ${JSON.stringify(h.start)}`);if(p===-1)throw new Ut(`Failed to find end index for decoration ${JSON.stringify(h.end)}`);const _=m.children.slice(g,p);if(!h.alwaysWrap&&_.length===m.children.length)o(m,h,"line");else if(!h.alwaysWrap&&_.length===1&&_[0].type==="element")o(_[0],h,"token");else{const k={type:"element",tagName:"span",properties:{},children:_};o(k,h,"wrapper"),m.children.splice(g,_.length,k)}}function a(l,d){s[l]=o(s[l],d,"line")}function o(l,d,f){const h=d.properties||{},m=d.transform||(y=>y);return l.tagName=d.tagName||"span",l.properties={...l.properties,...h,class:l.properties.class},d.properties?.class&&E9(l,d.properties.class),l=m(l,f)||l,l}const c=[],u=r.decorations.sort((l,d)=>d.start.offset-l.start.offset||l.end.offset-d.end.offset);for(const l of u){const{start:d,end:f}=l;if(d.line===f.line)i(d.line,d.character,f.character,l);else if(d.line<f.line){i(d.line,d.character,Number.POSITIVE_INFINITY,l);for(let h=d.line+1;h<f.line;h++)c.unshift(()=>a(h,l));i(f.line,0,f.character,l)}}c.forEach(l=>l())}}}function oIe(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Ut(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const s=e[r],i=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,a=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset,o=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,c=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset;if(i||a||o||c){if(i&&a||o&&c||o&&n.start.offset===n.end.offset||a&&s.start.offset===s.end.offset)continue;throw new Ut(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function w9(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(w9).join(""):""}const cIe=[aIe()];function Py(e){const t=uIe(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...cIe]}function uIe(e){const t=[],n=[],r=[];for(const s of e)switch(s.enforce){case"pre":t.push(s);break;case"post":n.push(s);break;default:r.push(s)}return{pre:t,post:n,normal:r}}var Mc=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],GE={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function lIe(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function JL(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function dIe(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)GE[r]&&t.push({type:"setDecoration",value:GE[r]});else if(r<=29){const s=GE[r-20];s&&(t.push({type:"resetDecoration",value:s}),s==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Mc[r-30]}});else if(r===38){const s=JL(e);s&&t.push({type:"setForegroundColor",value:s})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Mc[r-40]}});else if(r===48){const s=JL(e);s&&t.push({type:"setBackgroundColor",value:s})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Mc[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Mc[r-100+8]}})}return t}function fIe(){let e=null,t=null,n=new Set;return{parse(r){const s=[];let i=0;do{const a=lIe(r,i),o=a.sequence?r.substring(i,a.startPosition):r.substring(i);if(o.length>0&&s.push({value:o,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const c=dIe(a.sequence);for(const u of c)u.type==="resetAll"?(e=null,t=null,n.clear()):u.type==="resetForegroundColor"?e=null:u.type==="resetBackgroundColor"?t=null:u.type==="resetDecoration"&&n.delete(u.value);for(const u of c)u.type==="setForegroundColor"?e=u.value:u.type==="setBackgroundColor"?t=u.value:u.type==="setDecoration"&&n.add(u.value)}i=a.position}while(i<r.length);return s}}}var hIe={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function mIe(e=hIe){function t(o){return e[o]}function n(o){return`#${o.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let u=0;u<Mc.length;u++)r.push(t(Mc[u]));let o=[0,95,135,175,215,255];for(let u=0;u<6;u++)for(let l=0;l<6;l++)for(let d=0;d<6;d++)r.push(n([o[u],o[l],o[d]]));let c=8;for(let u=0;u<24;u++,c+=10)r.push(n([c,c,c]));return r}function i(o){return s()[o]}function a(o){switch(o.type){case"named":return t(o.name);case"rgb":return n(o.rgb);case"table":return i(o.index)}}return{value:a}}const pIe={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function gIe(e,t,n){const r=Iy(e,n),s=H1(t),i=mIe(Object.fromEntries(Mc.map(o=>{const c=`terminal.ansi${o[0].toUpperCase()}${o.substring(1)}`;return[o,e.colors?.[c]||pIe[o]]}))),a=fIe();return s.map(o=>a.parse(o[0]).map(c=>{let u,l;c.decorations.has("reverse")?(u=c.background?i.value(c.background):e.bg,l=c.foreground?i.value(c.foreground):e.fg):(u=c.foreground?i.value(c.foreground):e.fg,l=c.background?i.value(c.background):void 0),u=Ao(u,r),l=Ao(l,r),c.decorations.has("dim")&&(u=bIe(u));let d=xt.None;return c.decorations.has("bold")&&(d|=xt.Bold),c.decorations.has("italic")&&(d|=xt.Italic),c.decorations.has("underline")&&(d|=xt.Underline),c.decorations.has("strikethrough")&&(d|=xt.Strikethrough),{content:c.value,offset:o[1],color:u,bgColor:l,fontStyle:d}}))}function bIe(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const r=t[1];if(r.length===8){const s=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${s}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const s=r[0],i=r[1],a=r[2],o=r[3];return`#${s}${s}${i}${i}${a}${a}${Math.round(Number.parseInt(`${o}${o}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const s=r[0],i=r[1],a=r[2];return`#${s}${s}${i}${i}${a}${a}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function S9(e,t,n={}){const r=e.resolveLangAlias(n.lang||"text"),{theme:s=e.getLoadedThemes()[0]}=n;if(!U1(r)&&!V1(s)&&r==="ansi"){const{theme:i}=e.setTheme(s);return gIe(i,t,n)}return i9(e,t,n)}function Ny(e,t,n){let r,s,i,a,o,c;if("themes"in n){const{defaultColor:u="light",cssVariablePrefix:l="--shiki-",colorsRendering:d="css-vars"}=n,f=Object.entries(n.themes).filter(p=>p[1]).map(p=>({color:p[0],theme:p[1]})).sort((p,_)=>p.color===u?-1:_.color===u?1:0);if(f.length===0)throw new Ut("`themes` option must not be empty");const h=a9(e,t,n);if(c=Em(h),u&&dC!==u&&!f.find(p=>p.color===u))throw new Ut(`\`themes\` option must contain the defaultColor key \`${u}\``);const m=f.map(p=>e.getTheme(p.theme)),y=f.map(p=>p.color);i=h.map(p=>p.map(_=>iIe(_,y,l,u,d))),c&&q1(i,c);const g=f.map(p=>Iy(p.theme,n));s=YL(f,m,g,l,u,"fg",d),r=YL(f,m,g,l,u,"bg",d),a=`shiki-themes ${m.map(p=>p.name).join(" ")}`,o=u?void 0:[s,r].join(";")}else if("theme"in n){const u=Iy(n.theme,n);i=S9(e,t,n);const l=e.getTheme(n.theme);r=Ao(l.bg,u),s=Ao(l.fg,u),a=l.name,c=Em(i)}else throw new Ut("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:s,bg:r,themeName:a,rootStyle:o,grammarState:c}}function YL(e,t,n,r,s,i,a){return e.map((o,c)=>{const u=Ao(t[c][i],n[c])||"inherit",l=`${r+o.color}${i==="bg"?"-bg":""}:${u}`;if(c===0&&s){if(s===dC&&e.length>1){const d=e.findIndex(h=>h.color==="light"),f=e.findIndex(h=>h.color==="dark");if(d===-1||f===-1)throw new Ut('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Ao(t[d][i],n[d])||"inherit"}, ${Ao(t[f][i],n[f])||"inherit"});${l}`}return u}return a==="css-vars"?l:null}).filter(o=>!!o).join(";")}function Ry(e,t,n,r={meta:{},options:n,codeToHast:(s,i)=>Ry(e,s,i),codeToTokens:(s,i)=>Ny(e,s,i)}){let s=t;for(const m of Py(n))s=m.preprocess?.call(r,s,n)||s;let{tokens:i,fg:a,bg:o,themeName:c,rootStyle:u,grammarState:l}=Ny(e,s,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?i=_Ie(i):d==="never"&&(i=kIe(i)),f&&(i=EIe(i));const h={...r,get source(){return s}};for(const m of Py(n))i=m.tokens?.call(h,i)||i;return yIe(i,{...n,fg:a,bg:o,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??u},h,l)}function yIe(e,t,n,r=Em(e)){const s=Py(t),i=[],a={type:"root",children:[]},{structure:o="classic",tabindex:c="0"}=t,u={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?u.style=t.rootStyle:u.style=`background-color:${t.bg};color:${t.fg}`),c!==!1&&c!=null&&(u.tabindex=c.toString());for(const[y,g]of Object.entries(t.meta||{}))y.startsWith("_")||(u[y]=g);let l={type:"element",tagName:"pre",properties:u,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:i};const f=[],h={...n,structure:o,addClassToHast:E9,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return l},get code(){return d},get lines(){return f}};if(e.forEach((y,g)=>{g&&(o==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):o==="classic"&&i.push({type:"text",value:`
|
|
122
|
+
`}));let p={type:"element",tagName:"span",properties:{class:"line"},children:[]},_=0;for(const k of y){let v={type:"element",tagName:"span",properties:{...k.htmlAttrs},children:[{type:"text",value:k.content}]};const w=Ov(k.htmlStyle||Cy(k));w&&(v.properties.style=w);for(const S of s)v=S?.span?.call(h,v,g+1,_,p,k)||v;o==="inline"?a.children.push(v):o==="classic"&&p.children.push(v),_+=k.content.length}if(o==="classic"){for(const k of s)p=k?.line?.call(h,p,g+1)||p;f.push(p),i.push(p)}else o==="inline"&&f.push(p)}),o==="classic"){for(const y of s)d=y?.code?.call(h,d)||d;l.children.push(d);for(const y of s)l=y?.pre?.call(h,l)||l;a.children.push(l)}else if(o==="inline"){const y=[];let g={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const _ of a.children)_.type==="element"&&_.tagName==="br"?(y.push(g),g={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(_.type==="element"||_.type==="text")&&g.children.push(_);y.push(g);let p={type:"element",tagName:"code",properties:{},children:y};for(const _ of s)p=_?.code?.call(h,p)||p;a.children=[];for(let _=0;_<p.children.length;_++){_>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const k=p.children[_];k.type==="element"&&a.children.push(...k.children)}}let m=a;for(const y of s)m=y?.root?.call(h,m)||m;return r&&q1(m,r),m}function _Ie(e){return e.map(t=>{const n=[];let r="",s;return t.forEach((i,a)=>{const o=!(i.fontStyle&&(i.fontStyle&xt.Underline||i.fontStyle&xt.Strikethrough));o&&i.content.match(/^\s+$/)&&t[a+1]?(s===void 0&&(s=i.offset),r+=i.content):r?(o?n.push({...i,offset:s,content:r+i.content}):n.push({content:r,offset:s},i),s=void 0,r=""):n.push(i)}),n})}function kIe(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,s,i,a]=r;if(!s&&!a)return n;const o=[{...n,offset:n.offset+s.length,content:i}];return s&&o.unshift({content:s,offset:n.offset}),a&&o.push({content:a,offset:n.offset+s.length+i.length}),o}))}function EIe(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const s=n[n.length-1],i=Ov(s.htmlStyle||Cy(s)),a=Ov(r.htmlStyle||Cy(r)),o=s.fontStyle&&(s.fontStyle&xt.Underline||s.fontStyle&xt.Strikethrough),c=r.fontStyle&&(r.fontStyle&xt.Underline||r.fontStyle&xt.Strikethrough);!o&&!c&&i===a?s.content+=r.content:n.push({...r})}return n})}const wIe=k9;function SIe(e,t,n){const r={meta:{},options:n,codeToHast:(i,a)=>Ry(e,i,a),codeToTokens:(i,a)=>Ny(e,i,a)};let s=wIe(Ry(e,t,n,r));for(const i of Py(n))s=i.postprocess?.call(r,s,n)||s;return s}async function vIe(e){const t=await Lxe(e);return{getLastGrammarState:(...n)=>Mxe(t,...n),codeToTokensBase:(n,r)=>S9(t,n,r),codeToTokensWithThemes:(n,r)=>a9(t,n,r),codeToTokens:(n,r)=>Ny(t,n,r),codeToHast:(n,r)=>Ry(t,n,r),codeToHtml:(n,r)=>SIe(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function xIe(e){const t=e.langs,n=e.themes,r=e.engine;async function s(i){function a(d){if(typeof d=="string"){if(d=i.langAlias?.[d]||d,XU(d))return[];const f=t[d];if(!f)throw new Ut(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}function o(d){if(ZU(d))return"none";if(typeof d=="string"){const f=n[d];if(!f)throw new Ut(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}const c=(i.themes??[]).map(d=>o(d)),u=(i.langs??[]).map(d=>a(d)),l=await vIe({engine:i.engine??r(),...i,themes:c,langs:u});return{...l,loadLanguage(...d){return l.loadLanguage(...d.map(a))},loadTheme(...d){return l.loadTheme(...d.map(o))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return s}function TIe(e){let t;async function n(r={}){if(t){const s=await t;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}else{t=e({...r,themes:[],langs:[]});const s=await t;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}}return n}function IIe(e,t){const n=TIe(e);async function r(s,i){const a=await n({langs:[i.lang],themes:"theme"in i?[i.theme]:Object.values(i.themes)}),o=await t?.guessEmbeddedLanguages?.(s,i.lang,a);return o&&await a.loadLanguage(...o),a}return{getSingletonHighlighter(s){return n(s)},async codeToHtml(s,i){return(await r(s,i)).codeToHtml(s,i)},async codeToHast(s,i){return(await r(s,i)).codeToHast(s,i)},async codeToTokens(s,i){return(await r(s,i)).codeToTokens(s,i)},async codeToTokensBase(s,i){return(await r(s,i)).codeToTokensBase(s,i)},async codeToTokensWithThemes(s,i){return(await r(s,i)).codeToTokensWithThemes(s,i)},async getLastGrammarState(s,i){return(await n({langs:[i.lang],themes:[i.theme]})).getLastGrammarState(s,i)}}}var AIe=JA({bundledLanguages:()=>XA,bundledLanguagesAlias:()=>QA,bundledLanguagesBase:()=>YA,bundledLanguagesInfo:()=>B1,bundledThemes:()=>eC,bundledThemesInfo:()=>ZA,codeToHast:()=>v9,codeToHtml:()=>hC,codeToTokens:()=>x9,codeToTokensBase:()=>T9,codeToTokensWithThemes:()=>I9,createHighlighter:()=>fC,getLastGrammarState:()=>C9,getSingletonHighlighter:()=>A9});const fC=xIe({langs:XA,themes:eC,engine:()=>(0,LU.createOnigurumaEngine)(x(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:hC,codeToHast:v9,codeToTokens:x9,codeToTokensBase:T9,codeToTokensWithThemes:I9,getSingletonHighlighter:A9,getLastGrammarState:C9}=IIe(fC,{guessEmbeddedLanguages:tIe}),QL=4294967295;var CIe=class{regexps;constructor(t,n={}){this.patterns=t,this.options=n;const{forgiving:r=!1,cache:s,regexConstructor:i}=n;if(!i)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(a=>{if(typeof a!="string")return a;const o=s?.get(a);if(o){if(o instanceof RegExp)return o;if(r)return null;throw o}try{const c=i(a);return s?.set(a,c),c}catch(c){if(s?.set(a,c),r)return null;throw c}})}findNextMatchSync(t,n,r){const s=typeof t=="string"?t:t.content,i=[];function a(o,c,u=0){return{index:o,captureIndices:c.indices.map(l=>l==null?{start:QL,end:QL,length:0}:{start:l[0]+u,end:l[1]+u,length:l[1]-l[0]})}}for(let o=0;o<this.regexps.length;o++){const c=this.regexps[o];if(c)try{c.lastIndex=n;const u=c.exec(s);if(!u)continue;if(u.index===n)return a(o,u,0);i.push([o,u,0])}catch(u){if(this.options.forgiving)continue;throw u}}if(i.length){const o=Math.min(...i.map(c=>c[1].index));for(const[c,u,l]of i)if(u.index===o)return a(c,u,l)}return null}};function Qd(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function PIe(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const mC=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Wn=String.raw;function Xd(e,t){if(e==null)throw new Error(t??"Value expected");return e}const P9=Wn`\[\^?`,N9=`c.? | C(?:-.?)?|${Wn`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Wn`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Wn`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Wn`o\{[^\}]*\}?`}|${Wn`\d{1,3}`}`,pC=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Zg=new RegExp(Wn`
|
|
123
|
+
\\ (?:
|
|
124
|
+
${N9}
|
|
125
|
+
| [gk]<[^>]*>?
|
|
126
|
+
| [gk]'[^']*'?
|
|
127
|
+
| .
|
|
128
|
+
)
|
|
129
|
+
| \( (?:
|
|
130
|
+
\? (?:
|
|
131
|
+
[:=!>({]
|
|
132
|
+
| <[=!]
|
|
133
|
+
| <[^>]*>
|
|
134
|
+
| '[^']*'
|
|
135
|
+
| ~\|?
|
|
136
|
+
| #(?:[^)\\]|\\.?)*
|
|
137
|
+
| [^:)]*[:)]
|
|
138
|
+
)?
|
|
139
|
+
| \*[^\)]*\)?
|
|
140
|
+
)?
|
|
141
|
+
| (?:${pC.source})+
|
|
142
|
+
| ${P9}
|
|
143
|
+
| .
|
|
144
|
+
`.replace(/\s+/g,""),"gsu"),KE=new RegExp(Wn`
|
|
145
|
+
\\ (?:
|
|
146
|
+
${N9}
|
|
147
|
+
| .
|
|
148
|
+
)
|
|
149
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
150
|
+
| ${P9}
|
|
151
|
+
| &&
|
|
152
|
+
| .
|
|
153
|
+
`.replace(/\s+/g,""),"gsu");function NIe(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=YIe(n.flags),s=[r.extended],i={captureGroup:n.rules.captureGroup,getCurrentModX(){return s.at(-1)},numOpenGroups:0,popModX(){s.pop()},pushModX(d){s.push(d)},replaceCurrentModX(d){s[s.length-1]=d},singleline:n.rules.singleline};let a=[],o;for(Zg.lastIndex=0;o=Zg.exec(e);){const d=RIe(i,e,o[0],Zg.lastIndex);d.tokens?a.push(...d.tokens):d.token&&a.push(d.token),d.lastIndex!==void 0&&(Zg.lastIndex=d.lastIndex)}const c=[];let u=0;a.filter(d=>d.type==="GroupOpen").forEach(d=>{d.kind==="capturing"?d.number=++u:d.raw==="("&&c.push(d)}),u||c.forEach((d,f)=>{d.kind="capturing",d.number=f+1});const l=u||c.length;return{tokens:a.map(d=>d.type==="EscapedNumber"?XIe(d,l):d).flat(),flags:r}}function RIe(e,t,n,r){const[s,i]=n;if(n==="["||n==="[^"){const a=OIe(t,n,r);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(s==="\\"){if("AbBGyYzZ".includes(i))return{token:XL(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:VIe(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:O9(n)}}if(i==="K")return{token:L9("keep",n)};if(i==="N"||i==="R")return{token:jc("newline",n,{negate:i==="N"})};if(i==="O")return{token:jc("any",n)};if(i==="X")return{token:jc("text_segment",n)};const a=R9(n,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(s==="("){if(i==="*")return{token:KIe(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:GIe(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:ml("group",n)};if(n==="(?>")return{token:ml("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:ml(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:ml("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:ml("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:BIe(n)}}if(e.getCurrentModX()){if(n==="#"){const a=t.indexOf(`
|
|
154
|
+
`,r);return{lastIndex:a===-1?t.length:a}}if(/^\s$/.test(n)){const a=/\s+/y;return a.lastIndex=r,{lastIndex:a.exec(t)?a.lastIndex:r}}}if(n===".")return{token:jc("dot",n)};if(n==="^"||n==="$"){const a=e.singleline?{"^":Wn`\A`,$:Wn`\Z`}[n]:n;return{token:XL(a,n)}}return n==="|"?{token:DIe(n)}:pC.test(n)?{tokens:ZIe(n)}:{token:Oa(Qd(n),n)}}function OIe(e,t,n){const r=[ZL(t[1]==="^",t)];let s=1,i;for(KE.lastIndex=n;i=KE.exec(e);){const a=i[0];if(a[0]==="["&&a[1]!==":")s++,r.push(ZL(a[1]==="^",a));else if(a==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Oa(93,a));else if(s--,r.push($Ie(a)),!s)break}else{const o=LIe(a);Array.isArray(o)?r.push(...o):r.push(o)}}return{tokens:r,lastIndex:KE.lastIndex||e.length}}function LIe(e){if(e[0]==="\\")return R9(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!mC.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return jc("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?MIe(e):e==="&&"?jIe(e):Oa(Qd(e),e)}function R9(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return qIe(e);if("dDhHsSwW".includes(n))return WIe(e);if(e.startsWith(Wn`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return JIe(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(a=>parseInt(a,16)),s=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),i=new TextEncoder;return[...s].map(a=>{const o=[...i.encode(a)].map(c=>`\\x${c.toString(16)}`).join("");return Oa(Qd(a),o)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Oa(QIe(e),e);if(e3.has(n))return Oa(e3.get(n),e);if(/\d/.test(n))return FIe(t,e);if(e==="\\")throw new Error(Wn`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Oa(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function DIe(e){return{type:"Alternator",raw:e}}function XL(e,t){return{type:"Assertion",kind:e,raw:t}}function O9(e){return{type:"Backreference",raw:e}}function Oa(e,t){return{type:"Character",value:e,raw:t}}function $Ie(e){return{type:"CharacterClassClose",raw:e}}function MIe(e){return{type:"CharacterClassHyphen",raw:e}}function jIe(e){return{type:"CharacterClassIntersector",raw:e}}function ZL(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function jc(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function L9(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Xd(n.flags),raw:t}}function FIe(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function BIe(e){return{type:"GroupClose",raw:e}}function ml(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function zIe(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function UIe(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function VIe(e){return{type:"Subroutine",raw:e}}const HIe=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),e3=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function qIe(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Oa(Qd(t.toUpperCase())-64,e)}function GIe(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??="";const s=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),i=n3(n),a=n3(r),o={};if(i&&(o.enable=i),a&&(o.disable=a),e.endsWith(")"))return t.replaceCurrentModX(s),L9("flags",e,{flags:o});if(e.endsWith(":"))return t.pushModX(s),t.numOpenGroups++,ml("group",e,{...(i||a)&&{flags:o}});throw new Error(`Unexpected flag modifier "${e}"`)}function KIe(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:s}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const i=s?s.split(",").filter(l=>l!=="").map(l=>/^[+-]?\d+$/.test(l)?+l:l):[],[a,o,c]=i,u=HIe.has(n)?n.toLowerCase():"custom";switch(u){case"fail":case"mismatch":case"skip":if(i.length>0)throw new Error(`Named callout arguments not allowed "${i}"`);break;case"error":if(i.length>1)throw new Error(`Named callout allows only one argument "${i}"`);if(typeof a=="string")throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!i.length||i.length>2)throw new Error(`Named callout must have one or two arguments "${i}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(i.length===2&&(typeof o=="number"||!/^[<>X]$/.test(o)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${o}"`);break;case"count":case"total_count":if(i.length>1)throw new Error(`Named callout allows only one argument "${i}"`);if(i.length===1&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(i.length!==3)throw new Error(`Named callout must have three arguments "${i}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(typeof o=="number"||!/^(?:[<>!=]=|[<>])$/.test(o))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${o}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument three must be a tag or number "${c}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${u}"`)}return zIe(u,r??null,s?.split(",")??null,e)}function t3(e){let t=null,n,r;if(e[0]==="{"){const{minStr:s,maxStr:i}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+s>a||i&&+i>a)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+s,r=i===void 0?+s:i===""?1/0:+i,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return UIe(t,n,r,e)}function WIe(e){const t=e[1].toLowerCase();return jc({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function JIe(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return jc("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function n3(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function YIe(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function QIe(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function XIe(e,t){const{raw:n,inCharClass:r}=e,s=n.slice(1);if(!r&&(s!=="0"&&s.length===1||s[0]!=="0"&&+s<=t))return[O9(n)];const i=[],a=s.match(/^[0-7]+|\d/g);for(let o=0;o<a.length;o++){const c=a[o];let u;if(o===0&&c!=="8"&&c!=="9"){if(u=parseInt(c,8),u>127)throw new Error(Wn`Octal encoded byte above 177 unsupported "${n}"`)}else u=Qd(c);i.push(Oa(u,(o===0?"\\":"")+c))}return i}function ZIe(e){const t=[],n=new RegExp(pC,"gy");let r;for(;r=n.exec(e);){const s=r[0];if(s[0]==="{"){const i=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(s);if(i){const{min:a,max:o}=i.groups;if(+a>+o&&s.endsWith("?")){n.lastIndex--,t.push(t3(s.slice(0,-1)));continue}}}t.push(t3(s))}return t}function D9(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function eAe(e){return tAe.has(e.type)}const tAe=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function $9(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=NIe(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),s=(f,h)=>{const m=r.tokens[i.nextIndex];switch(i.parent=f,i.nextIndex++,m.type){case"Alternator":return yu();case"Assertion":return nAe(m);case"Backreference":return rAe(m,i);case"Character":return W1(m.value,{useLastValid:!!h.isCheckingRangeEnd});case"CharacterClassHyphen":return sAe(m,i,h);case"CharacterClassOpen":return iAe(m,i,h);case"CharacterSet":return aAe(m,i);case"Directive":return fAe(m.kind,{flags:m.flags});case"GroupOpen":return oAe(m,i,h);case"NamedCallout":return mAe(m.kind,m.tag,m.arguments);case"Quantifier":return cAe(m,i);case"Subroutine":return uAe(m,i);default:throw new Error(`Unexpected token type "${m.type}"`)}},i={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:s},a=gAe(hAe(r.flags));let o=a.body[0];for(;i.nextIndex<r.tokens.length;){const f=s(o,{});f.type==="Alternative"?(a.body.push(f),o=f):o.body.push(f)}const{capturingGroups:c,hasNumberedRef:u,namedGroupsByName:l,subroutines:d}=i;if(u&&l.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:f}of d)if(typeof f=="number"){if(f>c.length)throw new Error("Subroutine uses a group number that's not defined");f&&(c[f-1].isSubroutined=!0)}else if(l.has(f)){if(l.get(f).length>1)throw new Error(Wn`Subroutine uses a duplicate group name "\g<${f}>"`);l.get(f)[0].isSubroutined=!0}else throw new Error(Wn`Subroutine uses a group name that's not defined "\g<${f}>"`);return a}function nAe({kind:e}){return Lv(Xd({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===Wn`\B`||e===Wn`\Y`})}function rAe({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),s=(i,a=!1)=>{const o=t.capturingGroups.length;let c=!1;if(i>o)if(t.skipBackrefValidation)c=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,Dv(a?o+1-i:i,{orphan:c})};if(n){const i=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(i)return s(+i.groups.num,!!i.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return Dv(r)}return s(+r)}function sAe(e,t,n){const{tokens:r,walk:s}=t,i=t.parent,a=i.body.at(-1),o=r[t.nextIndex];if(!n.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&o&&o.type!=="CharacterClassOpen"&&o.type!=="CharacterClassClose"&&o.type!=="CharacterClassIntersector"){const c=s(i,{...n,isCheckingRangeEnd:!0});if(a.type==="Character"&&c.type==="Character")return i.body.pop(),dAe(a,c);throw new Error("Invalid character class range")}return W1(Qd("-"))}function iAe({negate:e},t,n){const{tokens:r,walk:s}=t,i=r[t.nextIndex],a=[K0()];let o=i3(i);for(;o.type!=="CharacterClassClose";){if(o.type==="CharacterClassIntersector")a.push(K0()),t.nextIndex++;else{const u=a.at(-1);u.body.push(s(u,n))}o=i3(r[t.nextIndex],i)}const c=K0({negate:e});return a.length===1?c.body=a[0].body:(c.kind="intersection",c.body=a.map(u=>u.body.length===1?u.body[0]:u)),t.nextIndex++,c}function aAe({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:s,skipPropertyNameValidation:i,unicodePropertyMap:a}=r;if(e==="property"){const o=J1(n);if(mC.has(o)&&!a?.has(o))e="posix",n=o;else return pl(n,{negate:t,normalizeUnknownPropertyNames:s,skipPropertyNameValidation:i,unicodePropertyMap:a})}return e==="posix"?pAe(n,{negate:t}):$v(e,{negate:t})}function oAe(e,t,n){const{tokens:r,capturingGroups:s,namedGroupsByName:i,skipLookbehindValidation:a,walk:o}=t,c=bAe(e),u=c.type==="AbsenceFunction",l=s3(c),d=l&&c.negate;if(c.type==="CapturingGroup"&&(s.push(c),c.name&&PIe(i,c.name,[]).push(c)),u&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let f=a3(r[t.nextIndex]);for(;f.type!=="GroupClose";){if(f.type==="Alternator")c.body.push(yu()),t.nextIndex++;else{const h=c.body.at(-1),m=o(h,{...n,isInAbsenceFunction:n.isInAbsenceFunction||u,isInLookbehind:n.isInLookbehind||l,isInNegLookbehind:n.isInNegLookbehind||d});if(h.body.push(m),(l||n.isInLookbehind)&&!a){const y="Lookbehind includes a pattern not allowed by Oniguruma";if(d||n.isInNegLookbehind){if(r3(m)||m.type==="CapturingGroup")throw new Error(y)}else if(r3(m)||s3(m)&&m.negate)throw new Error(y)}}f=a3(r[t.nextIndex])}return t.nextIndex++,c}function cAe({kind:e,min:t,max:n},r){const s=r.parent,i=s.body.at(-1);if(!i||!eAe(i))throw new Error("Quantifier requires a repeatable token");const a=j9(e,t,n,i);return s.body.pop(),a}function uAe({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let s=e.slice(3,-1);const i=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(s);if(i){const o=+i.groups.num,c=n.length;if(t.hasNumberedRef=!0,s={"":o,"+":c+o,"-":c+1-o}[i.groups.sign],s<1)throw new Error("Invalid subroutine number")}else s==="0"&&(s=0);const a=F9(s);return r.push(a),a}function lAe(e,t){return{type:"AbsenceFunction",kind:e,body:vp(t?.body)}}function yu(e){return{type:"Alternative",body:B9(e?.body)}}function Lv(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function Dv(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function M9(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!yAe(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:vp(t?.body)}}function W1(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function K0(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:B9(e?.body)}}function dAe(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function $v(e,t){const n=!!t?.negate,r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function fAe(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Xd(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function hAe(e){return{type:"Flags",...e}}function ii(e){const t=e?.atomic,n=e?.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:vp(e?.body)}}function Ic(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:vp(e?.body)}}function mAe(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function pAe(e,t){const n=!!t?.negate;if(!mC.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function j9(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function gAe(e,t){return{type:"Regex",body:vp(t?.body),flags:e}}function F9(e){return{type:"Subroutine",ref:e}}function pl(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=n.unicodePropertyMap?.get(J1(e));if(!r){if(n.normalizeUnknownPropertyNames)r=_Ae(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Wn`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function bAe({flags:e,kind:t,name:n,negate:r,number:s}){switch(t){case"absence_repeater":return lAe("repeater");case"atomic":return ii({atomic:!0});case"capturing":return M9(s,{name:n});case"group":return ii({flags:e});case"lookahead":case"lookbehind":return Ic({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function vp(e){if(e===void 0)e=[yu()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function B9(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function r3(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function s3(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function yAe(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function _Ae(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function J1(e){return e.replace(/[- _]+/g,"").toLowerCase()}function i3(e,t){return Xd(e,`${t?.type==="Character"&&t.value===93?"Empty":"Unclosed"} character class`)}function a3(e){return Xd(e,"Unclosed group")}function Th(e,t,n=null){function r(i,a){for(let o=0;o<i.length;o++){const c=s(i[o],a,o,i);o=Math.max(-1,o+c)}}function s(i,a=null,o=null,c=null){let u=0,l=!1;const d={node:i,parent:a,key:o,container:c,root:e,remove(){e0(c).splice(Math.max(0,nl(o)+u),1),u--,l=!0},removeAllNextSiblings(){return e0(c).splice(nl(o)+1)},removeAllPrevSiblings(){const p=nl(o)+u;return u-=p,e0(c).splice(0,Math.max(0,p))},replaceWith(p,_={}){const k=!!_.traverse;c?c[Math.max(0,nl(o)+u)]=p:Xd(a,"Can't replace root node")[o]=p,k&&s(p,a,o,c),l=!0},replaceWithMultiple(p,_={}){const k=!!_.traverse;if(e0(c).splice(Math.max(0,nl(o)+u),1,...p),u+=p.length-1,k){let v=0;for(let w=0;w<p.length;w++)v+=s(p[w],a,nl(o)+w+v,c)}l=!0},skip(){l=!0}},{type:f}=i,h=t["*"],m=t[f],y=typeof h=="function"?h:h?.enter,g=typeof m=="function"?m:m?.enter;if(y?.(d,n),g?.(d,n),!l)switch(f){case"AbsenceFunction":case"CapturingGroup":case"Group":r(i.body,i);break;case"Alternative":case"CharacterClass":r(i.body,i);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":s(i.min,i,"min"),s(i.max,i,"max");break;case"LookaroundAssertion":r(i.body,i);break;case"Quantifier":s(i.body,i,"body");break;case"Regex":r(i.body,i),s(i.flags,i,"flags");break;default:throw new Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),h?.exit?.(d,n),u}return s(e),e}function e0(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function nl(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const kAe=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function EAe(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function wAe(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const js=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function gC(e,t,n,r){const s=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),i=[!1];let a=0,o="";for(const c of e.matchAll(s)){const{0:u,groups:{$skip:l}}=c;if(!l&&(!r||r===js.DEFAULT==!a)){n instanceof Function?o+=n(c,{context:a?js.CHAR_CLASS:js.DEFAULT,negated:i[i.length-1]}):o+=n;continue}u[0]==="["?(a++,i.push(u[1]==="^")):u==="]"&&a&&(a--,i.pop()),o+=u}return o}function z9(e,t,n,r){gC(e,t,n,r)}function SAe(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const s=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=n;let i=0,a;for(;a=s.exec(e);){const{0:o,groups:{$skip:c}}=a;if(!c&&(!r||r===js.DEFAULT==!i))return a;o==="["?i++:o==="]"&&i&&i--,s.lastIndex==a.index&&s.lastIndex++}return null}function t0(e,t,n){return!!SAe(e,t,0,n)}function vAe(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,s=0,i=1,a;for(;a=n.exec(e);){const[o]=a;if(o==="[")s++;else if(s)o==="]"&&s--;else if(o==="(")i++;else if(o===")"&&(i--,!i)){r=a.index;break}}return e.slice(t,r)}const o3=new RegExp(String.raw`(?<noncapturingStart>${kAe})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function xAe(e,t){const n=t?.hiddenCaptures??[];let r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const s="(?>",i="(?:(?=(",a=[0],o=[];let c=0,u=0,l=NaN,d;do{d=!1;let f=0,h=0,m=!1,y;for(o3.lastIndex=Number.isNaN(l)?0:l+i.length;y=o3.exec(e);){const{0:g,index:p,groups:{capturingStart:_,noncapturingStart:k}}=y;if(g==="[")f++;else if(f)g==="]"&&f--;else if(g===s&&!m)l=p,m=!0;else if(m&&k)h++;else if(_)m?h++:(c++,a.push(c+u));else if(g===")"&&m){if(!h){u++;const v=c+u;if(e=`${e.slice(0,l)}${i}${e.slice(l+s.length,p)}))<$$${v}>)${e.slice(p+1)}`,d=!0,o.push(v),EAe(n,v),r.size){const w=new Map;r.forEach((S,T)=>{w.set(T>=v?T+1:T,S.map(I=>I>=v?I+1:I))}),r=w}break}h--}}}while(d);return n.push(...o),e=gC(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:f,groups:{backrefNum:h,wrappedBackrefNum:m}})=>{if(h){const y=+h;if(y>a.length-1)throw new Error(`Backref "${f}" greater than number of captures`);return`\\${a[y]}`}return`\\${m}`},js.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const U9=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,WE=new RegExp(String.raw`
|
|
155
|
+
\\(?: \d+
|
|
156
|
+
| c[A-Za-z]
|
|
157
|
+
| [gk]<[^>]+>
|
|
158
|
+
| [pPu]\{[^\}]+\}
|
|
159
|
+
| u[A-Fa-f\d]{4}
|
|
160
|
+
| x[A-Fa-f\d]{2}
|
|
161
|
+
)
|
|
162
|
+
| \((?: \? (?: [:=!>]
|
|
163
|
+
| <(?:[=!]|[^>]+>)
|
|
164
|
+
| [A-Za-z\-]+:
|
|
165
|
+
| \(DEFINE\)
|
|
166
|
+
))?
|
|
167
|
+
| (?<qBase>${U9})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
168
|
+
| \\?.
|
|
169
|
+
`.replace(/\s+/g,""),"gsu");function TAe(e){if(!new RegExp(`${U9}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,s="",i=0,a;for(WE.lastIndex=0;a=WE.exec(e);){const{0:o,index:c,groups:{qBase:u,qMod:l,invalidQ:d}}=a;if(o==="[")i||(r=c),i++;else if(o==="]")i?i--:r=null;else if(!i)if(l==="+"&&s&&!s.startsWith("(")){if(d)throw new Error(`Invalid quantifier "${o}"`);let f=-1;if(/^\{\d+\}$/.test(u))e=wAe(e,c+u.length,l,"");else{if(s===")"||s==="]"){const h=s===")"?n:r;if(h===null)throw new Error(`Invalid unmatched "${s}"`);e=`${e.slice(0,h)}(?>${e.slice(h,c)}${u})${e.slice(c+o.length)}`}else e=`${e.slice(0,c-s.length)}(?>${s}${u})${e.slice(c+o.length)}`;f+=4}WE.lastIndex+=f}else o[0]==="("?t.push(c):o===")"&&(n=t.length?t.pop():null);s=o}return{pattern:e}}const Ds=String.raw,IAe=Ds`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Mv=Ds`\(\?R=(?<rDepth>[^\)]+)\)|${IAe}`,Y1=Ds`\(\?<(?![=!])(?<captureName>[^>]+)>`,V9=Ds`${Y1}|(?<unnamed>\()(?!\?)`,bc=new RegExp(Ds`${Y1}|${Mv}|\(\?|\\?.`,"gsu"),JE="Cannot use multiple overlapping recursions";function AAe(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let s=t?.captureTransfers??new Map;if(!new RegExp(Mv,"su").test(e))return{pattern:e,captureTransfers:s,hiddenCaptures:n};if(r==="plugin"&&t0(e,Ds`\(\?\(DEFINE\)`,js.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const i=[],a=t0(e,Ds`\\[1-9]`,js.DEFAULT),o=new Map,c=[];let u=!1,l=0,d=0,f;for(bc.lastIndex=0;f=bc.exec(e);){const{0:h,groups:{captureName:m,rDepth:y,gRNameOrNum:g,gRDepth:p}}=f;if(h==="[")l++;else if(l)h==="]"&&l--;else if(y){if(c3(y),u)throw new Error(JE);if(a)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const _=e.slice(0,f.index),k=e.slice(bc.lastIndex);if(t0(k,Mv,js.DEFAULT))throw new Error(JE);const v=+y-1;e=u3(_,k,v,!1,n,i,d),s=d3(s,_,v,i.length,0,d);break}else if(g){c3(p);let _=!1;for(const V of c)if(V.name===g||V.num===+g){if(_=!0,V.hasRecursedWithin)throw new Error(JE);break}if(!_)throw new Error(Ds`Recursive \g cannot be used outside the referenced group "${r==="external"?g:Ds`\g<${g}&R=${p}>`}"`);const k=o.get(g),v=vAe(e,k);if(a&&t0(v,Ds`${Y1}|\((?!\?)`,js.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const w=e.slice(k,f.index),S=v.slice(w.length+h.length),T=i.length,I=+p-1,D=u3(w,S,I,!0,n,i,d);s=d3(s,w,I,i.length-T,T,d);const R=e.slice(0,k),z=e.slice(k+v.length);e=`${R}${D}${z}`,bc.lastIndex+=D.length-h.length-w.length-S.length,c.forEach(V=>V.hasRecursedWithin=!0),u=!0}else if(m)d++,o.set(String(d),bc.lastIndex),o.set(m,bc.lastIndex),c.push({num:d,name:m});else if(h[0]==="("){const _=h==="(";_&&(d++,o.set(String(d),bc.lastIndex)),c.push(_?{num:d}:{})}else h===")"&&c.pop()}return n.push(...i),{pattern:e,captureTransfers:s,hiddenCaptures:n}}function c3(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function u3(e,t,n,r,s,i,a){const o=new Set;r&&z9(e+t,Y1,({groups:{captureName:u}})=>{o.add(u)},js.DEFAULT);const c=[n,r?o:null,s,i,a];return`${e}${l3(`(?:${e}`,"forward",...c)}(?:)${l3(`${t})`,"backward",...c)}${t}`}function l3(e,t,n,r,s,i,a){const c=l=>t==="forward"?l+2:n-l+2-1;let u="";for(let l=0;l<n;l++){const d=c(l);u+=gC(e,Ds`${V9}|\\k<(?<backref>[^>]+)>`,({0:f,groups:{captureName:h,unnamed:m,backref:y}})=>{if(y&&r&&!r.has(y))return f;const g=`_$${d}`;if(m||h){const p=a+i.length+1;return i.push(p),CAe(s,p),m?f:`(?<${h}${g}>`}return Ds`\k<${y}${g}>`},js.DEFAULT)}return u}function CAe(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function d3(e,t,n,r,s,i){if(e.size&&r){let a=0;z9(t,V9,()=>a++,js.DEFAULT);const o=i-a+s,c=new Map;return e.forEach((u,l)=>{const d=(r-a*n)/n,f=a*n,h=l>o+a?l+r:l,m=[];for(const y of u)if(y<=o)m.push(y);else if(y>o+a+d)m.push(y+r);else if(y<=o+a)for(let g=0;g<=n;g++)m.push(y+a*g);else for(let g=0;g<=n;g++)m.push(y+f+d*g);c.set(h,m)}),c}return e}var Nn=String.fromCodePoint,He=String.raw,Ma={flagGroups:(()=>{try{new RegExp("(?i:)")}catch{return!1}return!0})(),unicodeSets:(()=>{try{new RegExp("[[]]","v")}catch{return!1}return!0})()};Ma.bugFlagVLiteralHyphenIsRange=Ma.unicodeSets?(()=>{try{new RegExp(He`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Ma.bugNestedClassIgnoresNegation=Ma.unicodeSets&&new RegExp("[[^a]]","v").test("a");function Oy(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Sm(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function jv(e,t){return f3[e]>=f3[t]}function PAe(e,t){if(e==null)throw new Error(t??"Value expected");return e}var f3={ES2025:2025,ES2024:2024,ES2018:2018},NAe={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function H9(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!NAe[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=Ma.flagGroups?"ES2025":Ma.unicodeSets?"ES2024":"ES2018"),t}var RAe="[ -\r ]",OAe=new Set([Nn(304),Nn(305)]),ba=He`[\p{L}\p{M}\p{N}\p{Pc}]`;function q9(e){if(OAe.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),s=$Ae.get(n),i=LAe.get(n),a=DAe.get(n);return[...r].length===1&&t.add(r),a&&t.add(a),s&&t.add(s),t.add(n),i&&t.add(i),[...t]}var bC=new Map(`C Other
|
|
170
|
+
Cc Control cntrl
|
|
171
|
+
Cf Format
|
|
172
|
+
Cn Unassigned
|
|
173
|
+
Co Private_Use
|
|
174
|
+
Cs Surrogate
|
|
175
|
+
L Letter
|
|
176
|
+
LC Cased_Letter
|
|
177
|
+
Ll Lowercase_Letter
|
|
178
|
+
Lm Modifier_Letter
|
|
179
|
+
Lo Other_Letter
|
|
180
|
+
Lt Titlecase_Letter
|
|
181
|
+
Lu Uppercase_Letter
|
|
182
|
+
M Mark Combining_Mark
|
|
183
|
+
Mc Spacing_Mark
|
|
184
|
+
Me Enclosing_Mark
|
|
185
|
+
Mn Nonspacing_Mark
|
|
186
|
+
N Number
|
|
187
|
+
Nd Decimal_Number digit
|
|
188
|
+
Nl Letter_Number
|
|
189
|
+
No Other_Number
|
|
190
|
+
P Punctuation punct
|
|
191
|
+
Pc Connector_Punctuation
|
|
192
|
+
Pd Dash_Punctuation
|
|
193
|
+
Pe Close_Punctuation
|
|
194
|
+
Pf Final_Punctuation
|
|
195
|
+
Pi Initial_Punctuation
|
|
196
|
+
Po Other_Punctuation
|
|
197
|
+
Ps Open_Punctuation
|
|
198
|
+
S Symbol
|
|
199
|
+
Sc Currency_Symbol
|
|
200
|
+
Sk Modifier_Symbol
|
|
201
|
+
Sm Math_Symbol
|
|
202
|
+
So Other_Symbol
|
|
203
|
+
Z Separator
|
|
204
|
+
Zl Line_Separator
|
|
205
|
+
Zp Paragraph_Separator
|
|
206
|
+
Zs Space_Separator
|
|
207
|
+
ASCII
|
|
208
|
+
ASCII_Hex_Digit AHex
|
|
209
|
+
Alphabetic Alpha
|
|
210
|
+
Any
|
|
211
|
+
Assigned
|
|
212
|
+
Bidi_Control Bidi_C
|
|
213
|
+
Bidi_Mirrored Bidi_M
|
|
214
|
+
Case_Ignorable CI
|
|
215
|
+
Cased
|
|
216
|
+
Changes_When_Casefolded CWCF
|
|
217
|
+
Changes_When_Casemapped CWCM
|
|
218
|
+
Changes_When_Lowercased CWL
|
|
219
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
220
|
+
Changes_When_Titlecased CWT
|
|
221
|
+
Changes_When_Uppercased CWU
|
|
222
|
+
Dash
|
|
223
|
+
Default_Ignorable_Code_Point DI
|
|
224
|
+
Deprecated Dep
|
|
225
|
+
Diacritic Dia
|
|
226
|
+
Emoji
|
|
227
|
+
Emoji_Component EComp
|
|
228
|
+
Emoji_Modifier EMod
|
|
229
|
+
Emoji_Modifier_Base EBase
|
|
230
|
+
Emoji_Presentation EPres
|
|
231
|
+
Extended_Pictographic ExtPict
|
|
232
|
+
Extender Ext
|
|
233
|
+
Grapheme_Base Gr_Base
|
|
234
|
+
Grapheme_Extend Gr_Ext
|
|
235
|
+
Hex_Digit Hex
|
|
236
|
+
IDS_Binary_Operator IDSB
|
|
237
|
+
IDS_Trinary_Operator IDST
|
|
238
|
+
ID_Continue IDC
|
|
239
|
+
ID_Start IDS
|
|
240
|
+
Ideographic Ideo
|
|
241
|
+
Join_Control Join_C
|
|
242
|
+
Logical_Order_Exception LOE
|
|
243
|
+
Lowercase Lower
|
|
244
|
+
Math
|
|
245
|
+
Noncharacter_Code_Point NChar
|
|
246
|
+
Pattern_Syntax Pat_Syn
|
|
247
|
+
Pattern_White_Space Pat_WS
|
|
248
|
+
Quotation_Mark QMark
|
|
249
|
+
Radical
|
|
250
|
+
Regional_Indicator RI
|
|
251
|
+
Sentence_Terminal STerm
|
|
252
|
+
Soft_Dotted SD
|
|
253
|
+
Terminal_Punctuation Term
|
|
254
|
+
Unified_Ideograph UIdeo
|
|
255
|
+
Uppercase Upper
|
|
256
|
+
Variation_Selector VS
|
|
257
|
+
White_Space space
|
|
258
|
+
XID_Continue XIDC
|
|
259
|
+
XID_Start XIDS`.split(/\s/).map(e=>[J1(e),e])),LAe=new Map([["s",Nn(383)],[Nn(383),"s"]]),DAe=new Map([[Nn(223),Nn(7838)],[Nn(107),Nn(8490)],[Nn(229),Nn(8491)],[Nn(969),Nn(8486)]]),$Ae=new Map([to(453),to(456),to(459),to(498),...YE(8072,8079),...YE(8088,8095),...YE(8104,8111),to(8124),to(8140),to(8188)]),MAe=new Map([["alnum",He`[\p{Alpha}\p{Nd}]`],["alpha",He`\p{Alpha}`],["ascii",He`\p{ASCII}`],["blank",He`[\p{Zs}\t]`],["cntrl",He`\p{Cc}`],["digit",He`\p{Nd}`],["graph",He`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",He`\p{Lower}`],["print",He`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",He`[\p{P}\p{S}]`],["space",He`\p{space}`],["upper",He`\p{Upper}`],["word",He`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",He`\p{AHex}`]]);function jAe(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function to(e){const t=Nn(e);return[t.toLowerCase(),t]}function YE(e,t){return jAe(e,t).map(n=>to(n))}var G9=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function FAe(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};K9(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:jv(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Th(e,BAe,r);const s={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},i={currentFlags:s,prevFlags:null,globalFlags:s,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Th(e,zAe,i);const a={groupsByName:i.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:i.reffedNodesByReferencer};return Th(e,UAe,a),e._originMap=i.groupOriginByCopy,e._strategy=r.strategy,e}var BAe={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:s}=e;if(s==="repeater"){const i=ii();i.body[0].body.push(Ic({negate:!0,body:r}),pl("Any"));const a=ii();a.body[0].body.push(j9("greedy",0,1/0,i)),n(cn(a,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const s=e.body.filter(i=>i.kind==="flags");for(let i=n+1;i<t.body.length;i++){const a=t.body[i];Sm(r,a,[]).push(...s)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const n=J9(t.get(e));if(n){const r=ii({flags:n});r.body[0].body=e.body,e.body=[cn(r,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:s,remove:i,replaceWith:a},o){const{kind:c,negate:u}=e,{asciiWordBoundaries:l,avoidSubclass:d,supportedGNodes:f,wordIsAscii:h}=o;if(c==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${u?"Y":"y"}"`);if(c==="line_end")a(cn(Ic({body:[yu({body:[Lv("string_end")]}),yu({body:[W1(10)]})]}),t));else if(c==="line_start")a(cn(ya(He`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c==="search_start")if(f.has(e))s.flags.sticky=!0,i();else{const m=r[n-1];if(m&&WAe(m))a(cn(Ic({negate:!0}),t));else{if(d)throw new Error(He`Uses "\G" in a way that requires a subclass`);a(no(Lv("string_start"),t)),o.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")a(cn(ya(He`(?=\n?\z)`),t));else if(c==="word_boundary"){if(!h&&!l){const m=`(?:(?<=${ba})(?!${ba})|(?<!${ba})(?=${ba}))`,y=`(?:(?<=${ba})(?=${ba})|(?<!${ba})(?!${ba}))`;a(cn(ya(u?y:m),t))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!XE(n)&&(n=QE(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!XE(r)&&(r=QE(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=K0({body:[e]});n(cn(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:s,digitIsAscii:i,spaceIsAscii:a,wordIsAscii:o}){const{kind:c,negate:u,value:l}=e;if(i&&(c==="digit"||l==="digit")){n(no($v("digit",{negate:u}),t));return}if(a&&(c==="space"||l==="space")){n(cn(ZE(ya(RAe),u),t));return}if(o&&(c==="word"||l==="word")){n(no($v("word",{negate:u}),t));return}if(c==="any")n(no(pl("Any"),t));else if(c==="digit")n(no(pl("Nd",{negate:u}),t));else if(c!=="dot")if(c==="text_segment"){if(r==="strict")throw new Error(He`Use of "\X" requires non-strict accuracy`);const d="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",f=He`\p{RI}{2}|${d}(?:\u200D${d})*`;n(cn(ya(He`(?>\r\n|${s?He`\p{RGI_Emoji}`:f}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c==="hex")n(no(pl("AHex",{negate:u}),t));else if(c==="newline")n(cn(ya(u?`[^
|
|
260
|
+
]`:`(?>\r
|
|
261
|
+
?|[
|
|
262
|
+
\v\f
\u2028\u2029])`),t));else if(c==="posix")if(!s&&(l==="graph"||l==="print")){if(r==="strict")throw new Error(`POSIX class "${l}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[l];u&&(d=`\0-${Nn(d.codePointAt(0)-1)}${Nn(d.codePointAt(2)+1)}-`),n(cn(ya(`[${d}]`),t))}else n(cn(ZE(ya(MAe.get(l)),u),t));else if(c==="property")bC.has(J1(l))||(e.key="sc");else if(c==="space")n(no(pl("space",{negate:u}),t));else if(c==="word")n(cn(ZE(ya(ba),u),t));else throw new Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:s,removeAllPrevSiblings:i,removeAllNextSiblings:a}){const{kind:o,flags:c}=e;if(o==="flags")if(!c.enable&&!c.disable)r();else{const u=ii({flags:c});u.body[0].body=a(),s(cn(u,t),{traverse:!0})}else if(o==="keep"){const u=n.body[0],d=n.body.length===1&&D9(u,{type:"Group"})&&u.body[0].body.length===1?u.body[0]:n;if(t.parent!==d||d.body.length>1)throw new Error(He`Uses "\K" in a way that's unsupported`);const f=Ic({behind:!0});f.body[0].body=i(),s(cn(f,t))}else throw new Error(`Unexpected directive kind "${o}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(cn(Ic({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=ii();t.body[0].body.push(e.body),e.body=cn(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,s=!1;for(const i of e.body)if(i.body.length===1&&i.body[0].kind==="search_start")i.body.pop();else{const a=Q9(i.body);a?(r=!0,Array.isArray(a)?n.push(...a):n.push(a)):s=!0}r&&!s&&n.forEach(i=>t.add(i))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(He`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!XE(n)&&(n=QE(n,t),e.ref=n)}},zAe={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:s}=e;r||n.set(e,[...t.get(s).map(({node:i})=>i)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:s,groupsByName:i,multiplexCapturesToLeftByRef:a,openRefs:o,reffedNodesByReferencer:c}){const u=s.get(e);if(u&&o.has(e.number)){const d=no(h3(e.number),t);c.set(d,o.get(e.number)),n(d);return}o.set(e.number,e),a.set(e.number,[]),e.name&&Sm(a,e.name,[]);const l=a.get(e.name??e.number);for(let d=0;d<l.length;d++){const f=l[d];if(u===f.node||u&&u===f.origin||e===f.origin){l.splice(d,1);break}}if(a.get(e.number).push({node:e,origin:u}),e.name&&a.get(e.name).push({node:e,origin:u}),e.name){const d=Sm(i,e.name,new Map);let f=!1;if(u)f=!0;else for(const h of d.values())if(!h.hasDuplicateNameToRemove){f=!0;break}i.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:f})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Oy(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:s,ref:i}=e;if(s){let l=t;for(;(l=l.parent)&&!(l.type==="CapturingGroup"&&(l.name===i||l.number===i)););r.reffedNodesByReferencer.set(e,l);return}const a=r.subroutineRefMap.get(i),o=i===0,c=o?h3(0):W9(a,r.groupOriginByCopy,null);let u=c;if(!o){const l=J9(qAe(a,f=>f.type==="Group"&&!!f.flags)),d=l?Oy(r.globalFlags,l):r.globalFlags;VAe(d,r.currentFlags)||(u=ii({flags:GAe(d)}),u.body[0].body.push(c))}n(cn(u,t),{traverse:!o})}},UAe={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const i=r.reffedNodesByReferencer.get(e).filter(a=>HAe(a,e));if(!i.length)n(cn(Ic({negate:!0}),t));else if(i.length>1){const a=ii({atomic:!0,body:i.reverse().map(o=>yu({body:[Dv(o.number)]}))});n(cn(a,t))}else e.ref=i[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const s=M9();e.body.at(-1).body.push(s)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function K9(e){Th(e,{"*"({node:t,parent:n}){t.parent=n}})}function VAe(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function HAe(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=Y9(n.parent);for(const s of r){if(s===n)break;if(s===e||X9(s,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function W9(e,t,n,r){const s=Array.isArray(e)?[]:{};for(const[i,a]of Object.entries(e))i==="parent"?s.parent=Array.isArray(n)?r:n:a&&typeof a=="object"?s[i]=W9(a,t,s,n):(i==="type"&&a==="CapturingGroup"&&t.set(s,t.get(e)??e),s[i]=a);return s}function h3(e){const t=F9(e);return t.isRecursive=!0,t}function qAe(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function QE(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function J9(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(s=>{r.enable?.[s]&&(delete n.disable[s],n.enable[s]=!0),r.disable?.[s]&&(n.disable[s]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function GAe({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function Y9(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Q9(e){const t=e.find(n=>n.kind==="search_start"||JAe(n,{negate:!1})||!KAe(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const s=Q9(r.body);if(!s)return null;Array.isArray(s)?n.push(...s):n.push(s)}return n}return null}function X9(e,t){const n=Y9(e)??[];for(const r of n)if(r===t||X9(r,t))return!0;return!1}function KAe({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function WAe(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function JAe(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&D9(e.body[0],{type:"Assertion",kind:"search_start"})}function XE(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function ya(e,t){const r=$9(e,{...t,unicodePropertyMap:bC}).body;return r.length>1||r[0].body.length>1?ii({body:r}):r[0].body[0]}function ZE(e,t){return e.negate=t,e}function no(e,t){return e.parent=t,e}function cn(e,t){return K9(e),e.parent=t,e}function YAe(e,t){const n=H9(t),r=jv(n.target,"ES2024"),s=jv(n.target,"ES2025"),i=n.rules.recursionLimit;if(!Number.isInteger(i)||i<2||i>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,o=null;if(!s){const h=[e.flags.ignoreCase];Th(e,QAe,{getCurrentModI:()=>h.at(-1),popModI(){h.pop()},pushModI(m){h.push(m)},setHasCasedChar(){h.at(-1)?a=!0:o=!0}})}const c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!o)};let u=e;const l={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:u,originMap:e._originMap,recursionLimit:i,useAppliedIgnoreCase:!!(!s&&a&&o),useFlagMods:s,useFlagV:r,verbose:n.verbose};function d(h){return l.lastNode=u,u=h,PAe(XAe[h.type],`Unexpected node type "${h.type}"`)(h,l,d)}const f={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],l.captureMap.forEach((h,m)=>{h.hidden&&f._hiddenCaptures.push(m),h.transferTo&&Sm(f._captureTransfers,h.transferTo,[]).push(m)}),f}var QAe={"*":{enter({node:e},t){if(p3(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Oy({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){p3(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){yC(Nn(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),Z9(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&G9.has(e.value)&&t.setHasCasedChar()}},XAe={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?He`\B`:He`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:s,number:i}=e,a={ignoreCase:t.currentFlags.ignoreCase},o=t.originMap.get(e);return o&&(a.hidden=!0,i>o.number&&(a.transferTo=o.number)),t.captureMap.set(i,a),`(${s?`?<${s}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=Nn(e),r=rl(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&yC(n)){const s=q9(n);return t.inCharClass?s.join(""):s.length>1?`[${s.join("")}]`:s[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:s,parent:i}=e;let{body:a}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Ma.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(g3)&&(a=[W1(45),...a.filter(u=>!g3(u))]);const o=()=>`[${s?"^":""}${a.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Ma.bugNestedClassIgnoresNegation)&&!s){const l=a.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(l.length){const d=ii(),f=d.body[0];return d.parent=i,f.parent=d,a=a.filter(h=>!l.includes(h)),e.body=a,a.length?(e.parent=f,f.body.push(e)):d.body.pop(),l.forEach(h=>{const m=yu({body:[h]});h.parent=m,m.parent=d,d.body.push(m)}),n(d)}}t.inCharClass=!0;const u=o();return t.inCharClass=!1,u}const c=a[0];if(r==="union"&&!s&&c&&((!t.useFlagV||!t.verbose)&&i.kind==="union"&&!(Ma.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&i.kind==="intersection"&&a.length===1&&c.type!=="CharacterClassRange"))return a.map(n).join("");if(!t.useFlagV&&i.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return o()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,s={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},i=rl(n,s),a=rl(r,s),o=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const c=Z9(e);rCe(c).forEach(l=>{o.add(Array.isArray(l)?`${rl(l[0],s)}-${rl(l[1],s)}`:rl(l,s))})}return`${i}-${a}${[...o].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},s){if(e==="dot")return s.currentFlags.dotAll?s.appliedGlobalFlags.dotAll||s.useFlagMods?".":"[^]":He`[^\n]`;if(e==="digit")return t?He`\D`:He`\d`;if(e==="property"){if(s.useAppliedIgnoreCase&&s.currentFlags.ignoreCase&&G9.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?He`\P`:He`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?He`\W`:He`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},s,i){const a=s.currentFlags;n&&(s.currentFlags=Oy(a,n));const o=t.map(i).join("|"),c=!s.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!s.useFlagMods||!n)?o:`(?${sCe(e,n,s.useFlagMods)}${o})`;return s.currentFlags=a,c},LookaroundAssertion({body:e,kind:t,negate:n},r,s){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(s).join("|")})`},Quantifier(e,t,n){return n(e.body)+iCe(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:He`\g<${t}&R=${r}>`}},ZAe=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),eCe=new Set(["-","\\","]","^","["]),tCe=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),m3=new Map([[9,He`\t`],[10,He`\n`],[11,He`\v`],[12,He`\f`],[13,He`\r`],[8232,He`\u2028`],[8233,He`\u2029`],[65279,He`\uFEFF`]]),nCe=new RegExp("^\\p{Cased}$","u");function yC(e){return nCe.test(e)}function Z9(e,t){const n=!!t?.firstOnly,r=e.min.value,s=e.max.value,i=[];if(r<65&&(s===65535||s>=131071)||r===65536&&s>=131071)return i;for(let a=r;a<=s;a++){const o=Nn(a);if(!yC(o))continue;const c=q9(o).filter(u=>{const l=u.codePointAt(0);return l<r||l>s});if(c.length&&(i.push(...c),n))break}return i}function rl(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(m3.has(e))return m3.get(e);if(e<32||e>126&&e<160||e>262143||t&&aCe(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const s=n?r?tCe:eCe:ZAe,i=Nn(e);return(s.has(i)?"\\":"")+i}function rCe(e){const t=e.map(s=>s.codePointAt(0)).sort((s,i)=>s-i),n=[];let r=null;for(let s=0;s<t.length;s++)t[s+1]===t[s]+1?r??=t[s]:r===null?n.push(t[s]):(n.push([r,t[s]]),r=null);return n}function sCe(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:s,disable:i}=t;r=(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")+(i?"-":"")+(i?.ignoreCase?"i":"")+(i?.dotAll?"s":"")}return`${r}:`}function iCe({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function p3({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function aCe(e){return e>47&&e<58}function g3({type:e,value:t}){return e==="Character"&&t===45}var oCe=class Fv extends RegExp{#e=new Map;#t=null;#r;#n=null;#s=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(t,n,r){const s=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");const i=t;super(i,n),this.#r=i.source,i instanceof Fv&&(this.#e=i.#e,this.#n=i.#n,this.#s=i.#s,this.rawOptions=i.rawOptions)}else{const i={hiddenCaptures:[],strategy:null,transfers:[],...r};super(s?"":t,n),this.#r=t,this.#e=uCe(i.hiddenCaptures,i.transfers),this.#s=i.strategy,this.rawOptions=r??{}}s||(this.#t=this)}exec(t){if(!this.#t){const{lazyCompile:s,...i}=this.rawOptions;this.#t=new Fv(this.#r,this.flags,i)}const n=this.global||this.sticky,r=this.lastIndex;if(this.#s==="clip_search"&&n&&r){this.lastIndex=0;const s=this.#i(t.slice(r));return s&&(cCe(s,r,t,this.hasIndices),this.lastIndex+=r),s}return this.#i(t)}#i(t){this.#t.lastIndex=this.lastIndex;const n=super.exec.call(this.#t,t);if(this.lastIndex=this.#t.lastIndex,!n||!this.#e.size)return n;const r=[...n];n.length=1;let s;this.hasIndices&&(s=[...n.indices],n.indices.length=1);const i=[0];for(let a=1;a<r.length;a++){const{hidden:o,transferTo:c}=this.#e.get(a)??{};if(o?i.push(null):(i.push(n.length),n.push(r[a]),this.hasIndices&&n.indices.push(s[a])),c&&r[a]!==void 0){const u=i[c];if(!u)throw new Error(`Invalid capture transfer to "${u}"`);if(n[u]=r[a],this.hasIndices&&(n.indices[u]=s[a]),n.groups){this.#n||(this.#n=lCe(this.source));const l=this.#n.get(c);l&&(n.groups[l]=r[a],this.hasIndices&&(n.indices.groups[l]=s[a]))}}}return n}};function cCe(e,t,n,r){if(e.index+=t,e.input=n,r){const s=e.indices;for(let a=0;a<s.length;a++){const o=s[a];o&&(s[a]=[o[0]+t,o[1]+t])}const i=s.groups;i&&Object.keys(i).forEach(a=>{const o=i[a];o&&(i[a]=[o[0]+t,o[1]+t])})}}function uCe(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,s]of t)for(const i of s)Sm(n,i,{}).transferTo=r;return n}function lCe(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,s=0,i;for(;i=t.exec(e);){const{0:a,groups:{capture:o,name:c}}=i;a==="["?r++:r?a==="]"&&r--:o&&(s++,c&&n.set(s,c))}return n}function eV(e,t){const n=dCe(e,t);return n.options?new oCe(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function dCe(e,t){const n=H9(t),r=$9(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:bC}),s=FAe(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=YAe(s,n),a=AAe(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:"external"}),o=TAe(a.pattern),c=xAe(o.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),u={pattern:c.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${i.flags}${i.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const l=c.hiddenCaptures.sort((m,y)=>m-y),d=Array.from(c.captureTransfers),f=s._strategy,h=u.pattern.length>=n.lazyCompileLength;(l.length||d.length||f||h)&&(u.options={...l.length&&{hiddenCaptures:l},...d.length&&{transfers:d},...f&&{strategy:f},...h&&{lazyCompile:h}})}return u}function tV(e,t){return eV(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function fCe(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=n=>tV(n,{target:t.target}),{createScanner(n){return new CIe(n,t)},createString(n){return{content:n}}}}var hCe=JA({bundledLanguages:()=>XA,bundledLanguagesAlias:()=>QA,bundledLanguagesBase:()=>YA,bundledLanguagesInfo:()=>B1,bundledThemes:()=>eC,bundledThemesInfo:()=>ZA,codeToHast:()=>v9,codeToHtml:()=>hC,codeToTokens:()=>x9,codeToTokensBase:()=>T9,codeToTokensWithThemes:()=>I9,createHighlighter:()=>fC,createJavaScriptRegexEngine:()=>fCe,createOnigurumaEngine:()=>OU,defaultJavaScriptRegexConstructor:()=>tV,getLastGrammarState:()=>C9,getSingletonHighlighter:()=>A9,loadWasm:()=>nC});AU(hCe,AIe);const b3=new Map;function mCe(e,t){return`${t}::${e.length}::${e.slice(0,64)}`}function pCe(e,t){if(t)return t;const n=e.trimStart();return n.startsWith("{")||n.startsWith("[")?"json":n.startsWith("<")?"xml":n.startsWith("---")?"yaml":"json"}function gCe(e){const{code:t,lang:n,className:r}=e,[s,i]=O.useState(null),[a,o]=O.useState(!1),c=O.useRef(!0),u=pCe(t,n),l=mCe(t,u);O.useEffect(()=>(c.current=!0,()=>{c.current=!1}),[]),O.useEffect(()=>{const f=b3.get(l);if(f){i(f);return}let h=!1;return hC(t,{lang:u,theme:"vitesse-dark"}).then(m=>{h||(b3.set(l,m),c.current&&i(m))}),()=>{h=!0}},[t,l,u]);const d=O.useCallback(()=>{navigator.clipboard.writeText(t).then(()=>{o(!0),setTimeout(()=>o(!1),1500)})},[t]);return b.jsxs("div",{className:Ve("group relative overflow-auto",r),children:[b.jsx("button",{type:"button",onClick:d,className:"absolute right-2 top-2 z-10 rounded-md border border-border bg-card/90 p-1.5 text-muted-foreground/40 opacity-0 backdrop-blur-sm transition-all hover:text-foreground group-hover:opacity-100",title:"Copy to clipboard",children:a?b.jsx(KA,{className:"size-3"}):b.jsx(mU,{className:"size-3"})}),s?b.jsx("div",{className:"shiki-container text-[12px] leading-relaxed [&_pre]:!bg-transparent [&_pre]:p-3 [&_code]:font-mono",dangerouslySetInnerHTML:{__html:s}}):b.jsx("pre",{className:"p-3 font-mono text-[12px] leading-relaxed text-foreground/60",children:t})]})}function va(e){return b.jsxs("section",{className:Ve("overflow-hidden rounded-lg border border-border bg-card/60",e.compact&&"min-h-48"),children:[b.jsx("div",{className:"border-b border-border px-3 py-2 text-[11px] font-medium uppercase tracking-wider text-muted-foreground/70",children:e.title}),e.body?b.jsx(gCe,{code:e.body,lang:e.lang,className:"max-h-[32rem]"}):b.jsx("div",{className:"flex items-center justify-center p-6 text-[13px] text-muted-foreground/40",children:e.empty})]})}const Q1=(function(e){if(e==null)return kCe;if(typeof e=="function")return X1(e);if(typeof e=="object")return Array.isArray(e)?bCe(e):yCe(e);if(typeof e=="string")return _Ce(e);throw new Error("Expected function, string, or object as test")});function bCe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Q1(e[n]);return X1(r);function r(...s){let i=-1;for(;++i<t.length;)if(t[i].apply(this,s))return!0;return!1}}function yCe(e){const t=e;return X1(n);function n(r){const s=r;let i;for(i in e)if(s[i]!==t[i])return!1;return!0}}function _Ce(e){return X1(t);function t(n){return n&&n.type===e}}function X1(e){return t;function t(n,r,s){return!!(ECe(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function kCe(){return!0}function ECe(e){return e!==null&&typeof e=="object"&&"type"in e}const nV=[],Qf=!0,Bv=!1,Il="skip";function _C(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const i=Q1(s),a=r?-1:1;o(e,void 0,[])();function o(c,u,l){const d=c&&typeof c=="object"?c:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(c.type+(h?"<"+h+">":""))+")"})}return f;function f(){let h=nV,m,y,g;if((!t||i(c,u,l[l.length-1]||void 0))&&(h=wCe(n(c,l)),h[0]===Bv))return h;if("children"in c&&c.children){const p=c;if(p.children&&h[0]!==Il)for(y=(r?p.children.length:-1)+a,g=l.concat(p);y>-1&&y<p.children.length;){const _=p.children[y];if(m=o(_,y,g)(),m[0]===Bv)return m;y=typeof m[1]=="number"?m[1]:y+a}}return h}}}function wCe(e){return Array.isArray(e)?e:typeof e=="number"?[Qf,e]:e==null?nV:[e]}function Zi(e,t,n,r){let s,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,s=n):(i=t,a=n,s=r),_C(e,i,o,s);function o(c,u){const l=u[u.length-1],d=l?l.children.indexOf(c):void 0;return a(c,d,l)}}const bd={indicator:"indicator",textOnly:"text-only",remove:"remove"};function SCe({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:s=[],blockedImageClass:i="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:a="text-gray-500",linkBlockPolicy:o=bd.indicator,imageBlockPolicy:c=bd.indicator}){const u=t.length&&!t.every(d=>d==="*"),l=n.length&&!n.every(d=>d==="*");if(!e&&(u||l))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const f=CCe(e,t,n,r,s,i,a,o,c);rV(d),Zi(d,f)}}function y3(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function vCe(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const xCe=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),TCe=new Set(["javascript:","data:","file:","vbscript:"]);function _3(e,t,n,r=!1,s=!1,i=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!s)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return s&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const l=e.substring(5);if(l&&l.length>0&&l!=="invalid")return e}}catch{return null}return null}const a=y3(e,n);if(!a||TCe.has(a.protocol)||!(xCe.has(a.protocol)||i.includes(a.protocol)||i.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const c=vCe(e);return a&&t.some(u=>{const l=y3(u,n);return!l||l.origin!==a.origin?!1:a.href.startsWith(l.href)})?c?a.pathname+a.search+a.hash:a.href:t.includes("*")?a.protocol!=="https:"&&a.protocol!=="http:"?null:c?a.pathname+a.search+a.hash:a.href:null}function rV(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)rV(t)}}const ew=Symbol("node-seen");function ICe(e,t,n){return t===bd.remove?{type:"remove"}:t===bd.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function ACe(e,t,n){if(t===bd.remove)return{type:"remove"};if(t===bd.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const CCe=(e,t,n,r,s,i,a,o,c)=>{const u=(l,d,f)=>{if(l.type!=="element"||l[ew])return Qf;if(l.tagName==="a"){const h=_3(l.properties.href,t,e,!1,!1,s);if(h===null){if(l[ew]=!0,Zi(l,u),f&&typeof d=="number"){const m=ICe(l,o,a);if(m.type==="remove")return f.children.splice(d,1),[Il,d];f.children[d]=m.element}return Il}else return l.properties.href=h,l.properties.target="_blank",l.properties.rel="noopener noreferrer",Qf}if(l.tagName==="img"){const h=_3(l.properties.src,n,e,r,!0,s);if(h===null){if(l[ew]=!0,Zi(l,u),f&&typeof d=="number"){const m=ACe(l,c,i);if(m.type==="remove")return f.children.splice(d,1),[Il,d];f.children[d]=m.element}return Il}else return l.properties.src=h,Qf}return Qf};return u},sV=-1,Z1=0,Ih=1,Ly=2,kC=3,EC=4,wC=5,SC=6,iV=7,aV=8,k3=typeof self=="object"?self:globalThis,PCe=(e,t)=>{const n=(s,i)=>(e.set(i,s),s),r=s=>{if(e.has(s))return e.get(s);const[i,a]=t[s];switch(i){case Z1:case sV:return n(a,s);case Ih:{const o=n([],s);for(const c of a)o.push(r(c));return o}case Ly:{const o=n({},s);for(const[c,u]of a)o[r(c)]=r(u);return o}case kC:return n(new Date(a),s);case EC:{const{source:o,flags:c}=a;return n(new RegExp(o,c),s)}case wC:{const o=n(new Map,s);for(const[c,u]of a)o.set(r(c),r(u));return o}case SC:{const o=n(new Set,s);for(const c of a)o.add(r(c));return o}case iV:{const{name:o,message:c}=a;return n(new k3[o](c),s)}case aV:return n(BigInt(a),s);case"BigInt":return n(Object(BigInt(a)),s);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new k3[i](a),s)};return r},E3=e=>PCe(new Map,e)(0),sl="",{toString:NCe}={},{keys:RCe}=Object,Cf=e=>{const t=typeof e;if(t!=="object"||!e)return[Z1,t];const n=NCe.call(e).slice(8,-1);switch(n){case"Array":return[Ih,sl];case"Object":return[Ly,sl];case"Date":return[kC,sl];case"RegExp":return[EC,sl];case"Map":return[wC,sl];case"Set":return[SC,sl];case"DataView":return[Ih,n]}return n.includes("Array")?[Ih,n]:n.includes("Error")?[iV,n]:[Ly,n]},n0=([e,t])=>e===Z1&&(t==="function"||t==="symbol"),OCe=(e,t,n,r)=>{const s=(a,o)=>{const c=r.push(a)-1;return n.set(o,c),c},i=a=>{if(n.has(a))return n.get(a);let[o,c]=Cf(a);switch(o){case Z1:{let l=a;switch(c){case"bigint":o=aV,l=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);l=null;break;case"undefined":return s([sV],a)}return s([o,l],a)}case Ih:{if(c){let f=a;return c==="DataView"?f=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(f=new Uint8Array(a)),s([c,[...f]],a)}const l=[],d=s([o,l],a);for(const f of a)l.push(i(f));return d}case Ly:{if(c)switch(c){case"BigInt":return s([c,a.toString()],a);case"Boolean":case"Number":case"String":return s([c,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const l=[],d=s([o,l],a);for(const f of RCe(a))(e||!n0(Cf(a[f])))&&l.push([i(f),i(a[f])]);return d}case kC:return s([o,a.toISOString()],a);case EC:{const{source:l,flags:d}=a;return s([o,{source:l,flags:d}],a)}case wC:{const l=[],d=s([o,l],a);for(const[f,h]of a)(e||!(n0(Cf(f))||n0(Cf(h))))&&l.push([i(f),i(h)]);return d}case SC:{const l=[],d=s([o,l],a);for(const f of a)(e||!n0(Cf(f)))&&l.push(i(f));return d}}const{message:u}=a;return s([o,{name:c,message:u}],a)};return i},w3=(e,{json:t,lossy:n}={})=>{const r=[];return OCe(!(t||n),!!t,new Map,r)(e),r},_u=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?E3(w3(e,t)):structuredClone(e):(e,t)=>E3(w3(e,t));const S3=/[#.]/g;function LCe(e,t){const n=e||"",r={};let s=0,i,a;for(;s<n.length;){S3.lastIndex=s;const o=S3.exec(n),c=n.slice(s,o?o.index:n.length);c&&(i?i==="#"?r.id=c:Array.isArray(r.className)?r.className.push(c):r.className=[c]:a=c,s+=c.length),o&&(i=o[0],s++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function oV(e,t,n){const r=n?jCe(n):void 0;function s(i,a,...o){let c;if(i==null){c={type:"root",children:[]};const u=a;o.unshift(u)}else{c=LCe(i,t);const u=c.tagName.toLowerCase(),l=r?r.get(u):void 0;if(c.tagName=l||u,DCe(a))o.unshift(a);else for(const[d,f]of Object.entries(a))$Ce(e,c.properties,d,f)}for(const u of o)zv(c.children,u);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return s}function DCe(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const i=s;for(const a of i)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function $Ce(e,t,n,r){const s=Sp(e,n);let i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?s.spaceSeparated?i=qL(r):s.commaSeparated?i=HL(r):s.commaOrSpaceSeparated?i=qL(HL(r).join(" ")):i=v3(s,s.property,r):Array.isArray(r)?i=[...r]:i=s.property==="style"?MCe(r):String(r);if(Array.isArray(i)){const a=[];for(const o of i)a.push(v3(s,s.property,o));i=a}s.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[s.property]=i}}function zv(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)zv(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?zv(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function v3(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||wm(n)===wm(t)))return!0}return n}function MCe(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function jCe(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const FCe=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],BCe=oV(Yd,"div"),zCe=oV(aa,"g",FCe);function UCe(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(i){if(typeof i=="number"&&i>-1&&i<=t.length){let a=0;for(;;){let o=n[a];if(o===void 0){const c=x3(t,n[a-1]);o=c===-1?t.length+1:c+1,n[a]=o}if(o>i)return{line:a+1,column:i-(a>0?n[a-1]:0)+1,offset:i};a++}}}function s(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const o=n[n.length-1],c=x3(t,o),u=c===-1?t.length+1:c+1;if(o===u)break;n.push(u)}const a=(i.line>1?n[i.line-2]:0)+i.column-1;if(a<n[i.line-1])return a}}}function x3(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
263
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Fc={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},cV={}.hasOwnProperty,VCe=Object.prototype;function HCe(e,t){const n=t||{};return vC({file:n.file||void 0,location:!1,schema:n.space==="svg"?aa:Yd,verbose:n.verbose||!1},e)}function vC(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},W0(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:uV(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const i=String(e.file),a=UCe(i),o=a.toPoint(0),c=a.toPoint(i.length);n.position={start:o,end:c}}return n}case"#documentType":{const r=t;return n={type:"doctype"},W0(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},W0(e,r,n),n}default:return n=qCe(e,t),n}}function uV(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=vC(e,t[n]);r.push(s)}return r}function qCe(e,t){const n=e.schema;e.schema=t.namespaceURI===Fc.svg?aa:Yd;let r=-1;const s={};for(;++r<t.attrs.length;){const o=t.attrs[r],c=(o.prefix?o.prefix+":":"")+o.name;cV.call(VCe,c)||(s[c]=o.value)}const a=(e.schema.space==="svg"?zCe:BCe)(t.tagName,s,uV(e,t.childNodes));if(W0(e,t,a),a.tagName==="template"){const o=t,c=o.sourceCodeLocation,u=c&&c.startTag&&Al(c.startTag),l=c&&c.endTag&&Al(c.endTag),d=vC(e,o.content);u&&l&&e.file&&(d.position={start:u.end,end:l.start}),a.content=d}return e.schema=n,a}function W0(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=GCe(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function GCe(e,t,n){const r=Al(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const i={};let a;if(n.attrs)for(a in n.attrs)cV.call(n.attrs,a)&&(i[Sp(e.schema,a).property]=Al(n.attrs[a]));n.startTag;const o=Al(n.startTag),c=n.endTag?Al(n.endTag):void 0,u={opening:o};c&&(u.closing=c),u.properties=i,t.data={position:u}}}return r}function Al(e){const t=T3({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=T3({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function T3(e){return e.line&&e.column?e:void 0}const KCe={},WCe={}.hasOwnProperty,lV=oC("type",{handlers:{root:YCe,element:t2e,text:ZCe,comment:e2e,doctype:XCe}});function JCe(e,t){const r=(t||KCe).space;return lV(e,r==="svg"?aa:Yd)}function YCe(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=xC(e.children,n,t),Zd(e,n),n}function QCe(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=xC(e.children,n,t),Zd(e,n),n}function XCe(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Zd(e,t),t}function ZCe(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Zd(e,t),t}function e2e(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Zd(e,t),t}function t2e(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=aa);const s=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&WCe.call(e.properties,i)){const c=n2e(r,i,e.properties[i]);c&&s.push(c)}}const a=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Fc[a],childNodes:[],parentNode:null};return o.childNodes=xC(e.children,o,r),Zd(e,o),e.tagName==="template"&&e.content&&(o.content=QCe(e.content,r)),o}function n2e(e,t,n){const r=Sp(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?cC(n):uC(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const i=s.name.indexOf(":");i<0?s.prefix="":(s.name=s.name.slice(i+1),s.prefix=r.attribute.slice(0,i)),s.namespace=Fc[r.space]}return s}function xC(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const i=lV(e[r],n);i.parentNode=t,s.push(i)}return s}function Zd(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const r2e=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Wt="�";var L;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(L||(L={}));const Vr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function dV(e){return e>=55296&&e<=57343}function s2e(e){return e>=56320&&e<=57343}function i2e(e,t){return(e-55296)*1024+9216+t}function fV(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function hV(e){return e>=64976&&e<=65007||r2e.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const a2e=65536;class o2e{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=a2e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:i}=this,a=s+n,o=i+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(s2e(n))return this.pos++,this._addGap(),i2e(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,L.EOF;return this._err(te.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,L.EOF;const r=this.html.charCodeAt(n);return r===L.CARRIAGE_RETURN?L.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,L.EOF;let t=this.html.charCodeAt(this.pos);return t===L.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,L.LINE_FEED):t===L.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,dV(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===L.LINE_FEED||t===L.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){fV(t)?this._err(te.controlCharacterInInputStream):hV(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var at;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(at||(at={}));function mV(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const c2e=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),u2e=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function l2e(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=u2e.get(e))!==null&&t!==void 0?t:e}var Jn;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Jn||(Jn={}));const d2e=32;var po;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(po||(po={}));function Uv(e){return e>=Jn.ZERO&&e<=Jn.NINE}function f2e(e){return e>=Jn.UPPER_A&&e<=Jn.UPPER_F||e>=Jn.LOWER_A&&e<=Jn.LOWER_F}function h2e(e){return e>=Jn.UPPER_A&&e<=Jn.UPPER_Z||e>=Jn.LOWER_A&&e<=Jn.LOWER_Z||Uv(e)}function m2e(e){return e===Jn.EQUALS||h2e(e)}var zn;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(zn||(zn={}));var Aa;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Aa||(Aa={}));class p2e{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=zn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Aa.Strict}startEntity(t){this.decodeMode=t,this.state=zn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case zn.EntityStart:return t.charCodeAt(n)===Jn.NUM?(this.state=zn.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=zn.NamedEntity,this.stateNamedEntity(t,n));case zn.NumericStart:return this.stateNumericStart(t,n);case zn.NumericDecimal:return this.stateNumericDecimal(t,n);case zn.NumericHex:return this.stateNumericHex(t,n);case zn.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|d2e)===Jn.LOWER_X?(this.state=zn.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=zn.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const i=r-n;this.result=this.result*Math.pow(s,i)+Number.parseInt(t.substr(n,i),s),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Uv(s)||f2e(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Uv(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Jn.SEMI)this.consumed+=1;else if(this.decodeMode===Aa.Strict)return 0;return this.emitCodePoint(l2e(this.result),this.consumed),this.errors&&(t!==Jn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],i=(s&po.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=g2e(r,s,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Aa.Attribute&&(i===0||m2e(a))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],i=(s&po.VALUE_LENGTH)>>14,i!==0){if(a===Jn.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Aa.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&po.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~po.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case zn.NamedEntity:return this.result!==0&&(this.decodeMode!==Aa.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case zn.NumericDecimal:return this.emitNumericEntity(0,2);case zn.NumericHex:return this.emitNumericEntity(0,3);case zn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case zn.EntityStart:return 0}}}function g2e(e,t,n,r){const s=(t&po.BRANCH_LENGTH)>>7,i=t&po.JUMP_TABLE;if(s===0)return i!==0&&r===i?n:-1;if(i){const c=r-i;return c<0||c>=s?-1:e[n+c]-1}let a=n,o=a+s-1;for(;a<=o;){const c=a+o>>>1,u=e[c];if(u<r)a=c+1;else if(u>r)o=c-1;else return e[c+s]}return-1}var oe;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(oe||(oe={}));var eu;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(eu||(eu={}));var Rs;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Rs||(Rs={}));var Y;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(Y||(Y={}));var E;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(E||(E={}));const b2e=new Map([[Y.A,E.A],[Y.ADDRESS,E.ADDRESS],[Y.ANNOTATION_XML,E.ANNOTATION_XML],[Y.APPLET,E.APPLET],[Y.AREA,E.AREA],[Y.ARTICLE,E.ARTICLE],[Y.ASIDE,E.ASIDE],[Y.B,E.B],[Y.BASE,E.BASE],[Y.BASEFONT,E.BASEFONT],[Y.BGSOUND,E.BGSOUND],[Y.BIG,E.BIG],[Y.BLOCKQUOTE,E.BLOCKQUOTE],[Y.BODY,E.BODY],[Y.BR,E.BR],[Y.BUTTON,E.BUTTON],[Y.CAPTION,E.CAPTION],[Y.CENTER,E.CENTER],[Y.CODE,E.CODE],[Y.COL,E.COL],[Y.COLGROUP,E.COLGROUP],[Y.DD,E.DD],[Y.DESC,E.DESC],[Y.DETAILS,E.DETAILS],[Y.DIALOG,E.DIALOG],[Y.DIR,E.DIR],[Y.DIV,E.DIV],[Y.DL,E.DL],[Y.DT,E.DT],[Y.EM,E.EM],[Y.EMBED,E.EMBED],[Y.FIELDSET,E.FIELDSET],[Y.FIGCAPTION,E.FIGCAPTION],[Y.FIGURE,E.FIGURE],[Y.FONT,E.FONT],[Y.FOOTER,E.FOOTER],[Y.FOREIGN_OBJECT,E.FOREIGN_OBJECT],[Y.FORM,E.FORM],[Y.FRAME,E.FRAME],[Y.FRAMESET,E.FRAMESET],[Y.H1,E.H1],[Y.H2,E.H2],[Y.H3,E.H3],[Y.H4,E.H4],[Y.H5,E.H5],[Y.H6,E.H6],[Y.HEAD,E.HEAD],[Y.HEADER,E.HEADER],[Y.HGROUP,E.HGROUP],[Y.HR,E.HR],[Y.HTML,E.HTML],[Y.I,E.I],[Y.IMG,E.IMG],[Y.IMAGE,E.IMAGE],[Y.INPUT,E.INPUT],[Y.IFRAME,E.IFRAME],[Y.KEYGEN,E.KEYGEN],[Y.LABEL,E.LABEL],[Y.LI,E.LI],[Y.LINK,E.LINK],[Y.LISTING,E.LISTING],[Y.MAIN,E.MAIN],[Y.MALIGNMARK,E.MALIGNMARK],[Y.MARQUEE,E.MARQUEE],[Y.MATH,E.MATH],[Y.MENU,E.MENU],[Y.META,E.META],[Y.MGLYPH,E.MGLYPH],[Y.MI,E.MI],[Y.MO,E.MO],[Y.MN,E.MN],[Y.MS,E.MS],[Y.MTEXT,E.MTEXT],[Y.NAV,E.NAV],[Y.NOBR,E.NOBR],[Y.NOFRAMES,E.NOFRAMES],[Y.NOEMBED,E.NOEMBED],[Y.NOSCRIPT,E.NOSCRIPT],[Y.OBJECT,E.OBJECT],[Y.OL,E.OL],[Y.OPTGROUP,E.OPTGROUP],[Y.OPTION,E.OPTION],[Y.P,E.P],[Y.PARAM,E.PARAM],[Y.PLAINTEXT,E.PLAINTEXT],[Y.PRE,E.PRE],[Y.RB,E.RB],[Y.RP,E.RP],[Y.RT,E.RT],[Y.RTC,E.RTC],[Y.RUBY,E.RUBY],[Y.S,E.S],[Y.SCRIPT,E.SCRIPT],[Y.SEARCH,E.SEARCH],[Y.SECTION,E.SECTION],[Y.SELECT,E.SELECT],[Y.SOURCE,E.SOURCE],[Y.SMALL,E.SMALL],[Y.SPAN,E.SPAN],[Y.STRIKE,E.STRIKE],[Y.STRONG,E.STRONG],[Y.STYLE,E.STYLE],[Y.SUB,E.SUB],[Y.SUMMARY,E.SUMMARY],[Y.SUP,E.SUP],[Y.TABLE,E.TABLE],[Y.TBODY,E.TBODY],[Y.TEMPLATE,E.TEMPLATE],[Y.TEXTAREA,E.TEXTAREA],[Y.TFOOT,E.TFOOT],[Y.TD,E.TD],[Y.TH,E.TH],[Y.THEAD,E.THEAD],[Y.TITLE,E.TITLE],[Y.TR,E.TR],[Y.TRACK,E.TRACK],[Y.TT,E.TT],[Y.U,E.U],[Y.UL,E.UL],[Y.SVG,E.SVG],[Y.VAR,E.VAR],[Y.WBR,E.WBR],[Y.XMP,E.XMP]]);function ef(e){var t;return(t=b2e.get(e))!==null&&t!==void 0?t:E.UNKNOWN}const de=E,y2e={[oe.HTML]:new Set([de.ADDRESS,de.APPLET,de.AREA,de.ARTICLE,de.ASIDE,de.BASE,de.BASEFONT,de.BGSOUND,de.BLOCKQUOTE,de.BODY,de.BR,de.BUTTON,de.CAPTION,de.CENTER,de.COL,de.COLGROUP,de.DD,de.DETAILS,de.DIR,de.DIV,de.DL,de.DT,de.EMBED,de.FIELDSET,de.FIGCAPTION,de.FIGURE,de.FOOTER,de.FORM,de.FRAME,de.FRAMESET,de.H1,de.H2,de.H3,de.H4,de.H5,de.H6,de.HEAD,de.HEADER,de.HGROUP,de.HR,de.HTML,de.IFRAME,de.IMG,de.INPUT,de.LI,de.LINK,de.LISTING,de.MAIN,de.MARQUEE,de.MENU,de.META,de.NAV,de.NOEMBED,de.NOFRAMES,de.NOSCRIPT,de.OBJECT,de.OL,de.P,de.PARAM,de.PLAINTEXT,de.PRE,de.SCRIPT,de.SECTION,de.SELECT,de.SOURCE,de.STYLE,de.SUMMARY,de.TABLE,de.TBODY,de.TD,de.TEMPLATE,de.TEXTAREA,de.TFOOT,de.TH,de.THEAD,de.TITLE,de.TR,de.TRACK,de.UL,de.WBR,de.XMP]),[oe.MATHML]:new Set([de.MI,de.MO,de.MN,de.MS,de.MTEXT,de.ANNOTATION_XML]),[oe.SVG]:new Set([de.TITLE,de.FOREIGN_OBJECT,de.DESC]),[oe.XLINK]:new Set,[oe.XML]:new Set,[oe.XMLNS]:new Set},Vv=new Set([de.H1,de.H2,de.H3,de.H4,de.H5,de.H6]);Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT;var j;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(j||(j={}));const dn={DATA:j.DATA,RCDATA:j.RCDATA,RAWTEXT:j.RAWTEXT,SCRIPT_DATA:j.SCRIPT_DATA,PLAINTEXT:j.PLAINTEXT,CDATA_SECTION:j.CDATA_SECTION};function _2e(e){return e>=L.DIGIT_0&&e<=L.DIGIT_9}function Xf(e){return e>=L.LATIN_CAPITAL_A&&e<=L.LATIN_CAPITAL_Z}function k2e(e){return e>=L.LATIN_SMALL_A&&e<=L.LATIN_SMALL_Z}function ro(e){return k2e(e)||Xf(e)}function I3(e){return ro(e)||_2e(e)}function r0(e){return e+32}function pV(e){return e===L.SPACE||e===L.LINE_FEED||e===L.TABULATION||e===L.FORM_FEED}function A3(e){return pV(e)||e===L.SOLIDUS||e===L.GREATER_THAN_SIGN}function E2e(e){return e===L.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:dV(e)?te.surrogateCharacterReference:hV(e)?te.noncharacterCharacterReference:fV(e)||e===L.CARRIAGE_RETURN?te.controlCharacterReference:null}class w2e{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=j.DATA,this.returnState=j.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new o2e(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new p2e(c2e,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=E2e(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:at.START_TAG,tagName:"",tagID:E.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:at.END_TAG,tagName:"",tagID:E.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:at.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:at.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(mV(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=ef(t.tagName),t.type===at.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case at.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case at.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case at.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:at.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=pV(t)?at.WHITESPACE_CHARACTER:t===L.NULL?at.NULL_CHARACTER:at.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(at.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=j.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Aa.Attribute:Aa.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===j.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case j.DATA:{this._stateData(t);break}case j.RCDATA:{this._stateRcdata(t);break}case j.RAWTEXT:{this._stateRawtext(t);break}case j.SCRIPT_DATA:{this._stateScriptData(t);break}case j.PLAINTEXT:{this._statePlaintext(t);break}case j.TAG_OPEN:{this._stateTagOpen(t);break}case j.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case j.TAG_NAME:{this._stateTagName(t);break}case j.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case j.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case j.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case j.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case j.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case j.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case j.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case j.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case j.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case j.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case j.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case j.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case j.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case j.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case j.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case j.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case j.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case j.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case j.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case j.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case j.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case j.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case j.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case j.BOGUS_COMMENT:{this._stateBogusComment(t);break}case j.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case j.COMMENT_START:{this._stateCommentStart(t);break}case j.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case j.COMMENT:{this._stateComment(t);break}case j.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case j.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case j.COMMENT_END:{this._stateCommentEnd(t);break}case j.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case j.DOCTYPE:{this._stateDoctype(t);break}case j.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case j.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case j.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case j.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case j.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case j.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case j.CDATA_SECTION:{this._stateCdataSection(t);break}case j.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case j.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case j.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case j.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case L.LESS_THAN_SIGN:{this.state=j.TAG_OPEN;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case L.AMPERSAND:{this._startCharacterReference();break}case L.LESS_THAN_SIGN:{this.state=j.RCDATA_LESS_THAN_SIGN;break}case L.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Wt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case L.LESS_THAN_SIGN:{this.state=j.RAWTEXT_LESS_THAN_SIGN;break}case L.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Wt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case L.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_LESS_THAN_SIGN;break}case L.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Wt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case L.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Wt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ro(t))this._createStartTagToken(),this.state=j.TAG_NAME,this._stateTagName(t);else switch(t){case L.EXCLAMATION_MARK:{this.state=j.MARKUP_DECLARATION_OPEN;break}case L.SOLIDUS:{this.state=j.END_TAG_OPEN;break}case L.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t);break}case L.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=j.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ro(t))this._createEndTagToken(),this.state=j.TAG_NAME,this._stateTagName(t);else switch(t){case L.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=j.DATA;break}case L.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=j.BEFORE_ATTRIBUTE_NAME;break}case L.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case L.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=Wt;break}case L.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Xf(t)?r0(t):t)}}_stateRcdataLessThanSign(t){t===L.SOLIDUS?this.state=j.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ro(t)?(this.state=j.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=j.BEFORE_ATTRIBUTE_NAME,!1;case L.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=j.SELF_CLOSING_START_TAG,!1;case L.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=j.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===L.SOLIDUS?this.state=j.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ro(t)?(this.state=j.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case L.SOLIDUS:{this.state=j.SCRIPT_DATA_END_TAG_OPEN;break}case L.EXCLAMATION_MARK:{this.state=j.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=j.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ro(t)?(this.state=j.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===L.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===L.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case L.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Wt);break}case L.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case L.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(Wt);break}case L.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case L.HYPHEN_MINUS:{this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(Wt);break}case L.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===L.SOLIDUS?this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ro(t)?(this._emitChars("<"),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ro(t)?(this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Vr.SCRIPT,!1)&&A3(this.preprocessor.peek(Vr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Vr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case L.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Wt);break}case L.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case L.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Wt);break}case L.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case L.HYPHEN_MINUS:{this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Wt);break}case L.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===L.SOLIDUS?(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Vr.SCRIPT,!1)&&A3(this.preprocessor.peek(Vr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Vr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.SOLIDUS:case L.GREATER_THAN_SIGN:case L.EOF:{this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case L.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=j.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:case L.SOLIDUS:case L.GREATER_THAN_SIGN:case L.EOF:{this._leaveAttrName(),this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case L.EQUALS_SIGN:{this._leaveAttrName(),this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case L.QUOTATION_MARK:case L.APOSTROPHE:case L.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=Wt;break}default:this.currentAttr.name+=String.fromCodePoint(Xf(t)?r0(t):t)}}_stateAfterAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case L.EQUALS_SIGN:{this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case L.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{this.state=j.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this.state=j.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=j.DATA,this.emitCurrentTagToken();break}default:this.state=j.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case L.QUOTATION_MARK:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=Wt;break}case L.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case L.APOSTROPHE:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=Wt;break}case L.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=Wt;break}case L.QUOTATION_MARK:case L.APOSTROPHE:case L.LESS_THAN_SIGN:case L.EQUALS_SIGN:case L.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case L.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case L.SOLIDUS:{this._leaveAttrValue(),this.state=j.SELF_CLOSING_START_TAG;break}case L.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case L.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=j.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(n);break}case L.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.data+=Wt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Vr.DASH_DASH,!0)?(this._createCommentToken(Vr.DASH_DASH.length+1),this.state=j.COMMENT_START):this._consumeSequenceIfMatch(Vr.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Vr.DOCTYPE.length+1),this.state=j.DOCTYPE):this._consumeSequenceIfMatch(Vr.CDATA_START,!0)?this.inForeignNode?this.state=j.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Vr.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=j.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case L.HYPHEN_MINUS:{this.state=j.COMMENT_START_DASH;break}case L.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=j.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=j.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case L.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=j.DATA,this.emitCurrentComment(n);break}case L.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=j.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=j.COMMENT_END_DASH;break}case L.LESS_THAN_SIGN:{n.data+="<",this.state=j.COMMENT_LESS_THAN_SIGN;break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.data+=Wt;break}case L.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case L.EXCLAMATION_MARK:{n.data+="!",this.state=j.COMMENT_LESS_THAN_SIGN_BANG;break}case L.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=j.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===L.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=j.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===L.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=j.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==L.GREATER_THAN_SIGN&&t!==L.EOF&&this._err(te.nestedComment),this.state=j.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case L.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=j.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(n);break}case L.EXCLAMATION_MARK:{this.state=j.COMMENT_END_BANG;break}case L.HYPHEN_MINUS:{n.data+="-";break}case L.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=j.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{n.data+="--!",this.state=j.COMMENT_END_DASH;break}case L.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=j.DATA,this.emitCurrentComment(n);break}case L.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=j.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case L.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Xf(t))this._createDoctypeToken(String.fromCharCode(r0(t))),this.state=j.DOCTYPE_NAME;else switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(Wt),this.state=j.DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=j.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=j.AFTER_DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.name+=Wt;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Xf(t)?r0(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Vr.PUBLIC,!1)?this.state=j.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Vr.SYSTEM,!1)?this.state=j.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case L.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=Wt;break}case L.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case L.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=Wt;break}case L.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case L.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case L.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.QUOTATION_MARK:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case L.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=Wt;break}case L.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case L.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=Wt;break}case L.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.NULL:{this._err(te.unexpectedNullCharacter);break}case L.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case L.RIGHT_SQUARE_BRACKET:{this.state=j.CDATA_SECTION_BRACKET;break}case L.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===L.RIGHT_SQUARE_BRACKET?this.state=j.CDATA_SECTION_END:(this._emitChars("]"),this.state=j.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case L.GREATER_THAN_SIGN:{this.state=j.DATA;break}case L.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=j.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(L.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&I3(this.preprocessor.peek(1))?j.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){I3(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===L.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const gV=new Set([E.DD,E.DT,E.LI,E.OPTGROUP,E.OPTION,E.P,E.RB,E.RP,E.RT,E.RTC]),C3=new Set([...gV,E.CAPTION,E.COLGROUP,E.TBODY,E.TD,E.TFOOT,E.TH,E.THEAD,E.TR]),Dy=new Set([E.APPLET,E.CAPTION,E.HTML,E.MARQUEE,E.OBJECT,E.TABLE,E.TD,E.TEMPLATE,E.TH]),S2e=new Set([...Dy,E.OL,E.UL]),v2e=new Set([...Dy,E.BUTTON]),P3=new Set([E.ANNOTATION_XML,E.MI,E.MN,E.MO,E.MS,E.MTEXT]),N3=new Set([E.DESC,E.FOREIGN_OBJECT,E.TITLE]),x2e=new Set([E.TR,E.TEMPLATE,E.HTML]),T2e=new Set([E.TBODY,E.TFOOT,E.THEAD,E.TEMPLATE,E.HTML]),I2e=new Set([E.TABLE,E.TEMPLATE,E.HTML]),A2e=new Set([E.TD,E.TH]);class C2e{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=E.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===E.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===oe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==oe.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Vv,oe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(A2e,oe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(I2e,oe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(T2e,oe.HTML)}clearBackToTableRowContext(){this.clearBackTo(x2e,oe.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===E.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===E.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case oe.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case oe.SVG:{if(N3.has(s))return!1;break}case oe.MATHML:{if(P3.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Dy)}hasInListItemScope(t){return this.hasInDynamicScope(t,S2e)}hasInButtonScope(t){return this.hasInDynamicScope(t,v2e)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case oe.HTML:{if(Vv.has(n))return!0;if(Dy.has(n))return!1;break}case oe.SVG:{if(N3.has(n))return!1;break}case oe.MATHML:{if(P3.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===oe.HTML)switch(this.tagIDs[n]){case t:return!0;case E.TABLE:case E.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===oe.HTML)switch(this.tagIDs[t]){case E.TBODY:case E.THEAD:case E.TFOOT:return!0;case E.TABLE:case E.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===oe.HTML)switch(this.tagIDs[n]){case t:return!0;case E.OPTION:case E.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&gV.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&C3.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&C3.has(this.currentTagId);)this.pop()}}const tw=3;var ji;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ji||(ji={}));const R3={type:ji.Marker};class P2e{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,i=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const c=this.entries[o];if(c.type===ji.Marker)break;const{element:u}=c;if(this.treeAdapter.getTagName(u)===i&&this.treeAdapter.getNamespaceURI(u)===a){const l=this.treeAdapter.getAttrList(u);l.length===s&&r.push({idx:o,attrs:l})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<tw)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<tw)return;const s=new Map(n.map(a=>[a.name,a.value]));let i=0;for(let a=0;a<r.length;a++){const o=r[a];o.attrs.every(c=>s.get(c.name)===c.value)&&(i+=1,i>=tw&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(R3)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:ji.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:ji.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(R3);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===ji.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===ji.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===ji.Element&&n.element===t)}}const so={createDocument(){return{nodeName:"#document",mode:Rs.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(i=>i.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};so.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(so.isTextNode(n)){n.value+=t;return}}so.appendChild(e,so.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&so.isTextNode(r)?r.value+=t:so.insertBefore(e,so.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},bV="html",N2e="about:legacy-compat",R2e="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",yV=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],O2e=[...yV,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],L2e=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),_V=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],D2e=[..._V,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function O3(e,t){return t.some(n=>e.startsWith(n))}function $2e(e){return e.name===bV&&e.publicId===null&&(e.systemId===null||e.systemId===N2e)}function M2e(e){if(e.name!==bV)return Rs.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===R2e)return Rs.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),L2e.has(n))return Rs.QUIRKS;let r=t===null?O2e:yV;if(O3(n,r))return Rs.QUIRKS;if(r=t===null?_V:D2e,O3(n,r))return Rs.LIMITED_QUIRKS}return Rs.NO_QUIRKS}const L3={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},j2e="definitionurl",F2e="definitionURL",B2e=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),z2e=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:oe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:oe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:oe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:oe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:oe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:oe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:oe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:oe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:oe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:oe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:oe.XMLNS}]]),U2e=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),V2e=new Set([E.B,E.BIG,E.BLOCKQUOTE,E.BODY,E.BR,E.CENTER,E.CODE,E.DD,E.DIV,E.DL,E.DT,E.EM,E.EMBED,E.H1,E.H2,E.H3,E.H4,E.H5,E.H6,E.HEAD,E.HR,E.I,E.IMG,E.LI,E.LISTING,E.MENU,E.META,E.NOBR,E.OL,E.P,E.PRE,E.RUBY,E.S,E.SMALL,E.SPAN,E.STRONG,E.STRIKE,E.SUB,E.SUP,E.TABLE,E.TT,E.U,E.UL,E.VAR]);function H2e(e){const t=e.tagID;return t===E.FONT&&e.attrs.some(({name:r})=>r===eu.COLOR||r===eu.SIZE||r===eu.FACE)||V2e.has(t)}function kV(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===j2e){e.attrs[t].name=F2e;break}}function EV(e){for(let t=0;t<e.attrs.length;t++){const n=B2e.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function TC(e){for(let t=0;t<e.attrs.length;t++){const n=z2e.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function q2e(e){const t=U2e.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ef(e.tagName))}function G2e(e,t){return t===oe.MATHML&&(e===E.MI||e===E.MO||e===E.MN||e===E.MS||e===E.MTEXT)}function K2e(e,t,n){if(t===oe.MATHML&&e===E.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===eu.ENCODING){const s=n[r].value.toLowerCase();return s===L3.TEXT_HTML||s===L3.APPLICATION_XML}}return t===oe.SVG&&(e===E.FOREIGN_OBJECT||e===E.DESC||e===E.TITLE)}function W2e(e,t,n,r){return(!r||r===oe.HTML)&&K2e(e,t,n)||(!r||r===oe.MATHML)&&G2e(e,t)}const J2e="hidden",Y2e=8,Q2e=3;var U;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(U||(U={}));const X2e={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},wV=new Set([E.TABLE,E.TBODY,E.TFOOT,E.THEAD,E.TR]),D3={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:so,onParseError:null};class $3{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=U.INITIAL,this.originalInsertionMode=U.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...D3,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new w2e(this.options,this),this.activeFormattingElements=new P2e(this.treeAdapter),this.fragmentContextID=r?ef(this.treeAdapter.getTagName(r)):E.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new C2e(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...D3,...n};t??(t=r.treeAdapter.createElement(Y.TEMPLATE,oe.HTML,[]));const s=r.treeAdapter.createElement("documentmock",oe.HTML,[]),i=new this(r,s,t);return i.fragmentContextID===E.TEMPLATE&&i.tmplInsertionModeStack.unshift(U.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const i=(s=t.location)!==null&&s!==void 0?s:X2e,a={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(a)}onItemPush(t,n,r){var s,i;(i=(s=this.treeAdapter).onItemPush)===null||i===void 0||i.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let i,a;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,a=this.fragmentContextID):{current:i,currentTagId:a}=this.openElements,this._setContextModes(i,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===oe.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,oe.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=U.TEXT}switchToPlaintextParsing(){this.insertionMode=U.TEXT,this.originalInsertionMode=U.IN_BODY,this.tokenizer.state=dn.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===Y.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==oe.HTML))switch(this.fragmentContextID){case E.TITLE:case E.TEXTAREA:{this.tokenizer.state=dn.RCDATA;break}case E.STYLE:case E.XMP:case E.IFRAME:case E.NOEMBED:case E.NOFRAMES:case E.NOSCRIPT:{this.tokenizer.state=dn.RAWTEXT;break}case E.SCRIPT:{this.tokenizer.state=dn.SCRIPT_DATA;break}case E.PLAINTEXT:{this.tokenizer.state=dn.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,oe.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,oe.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(Y.HTML,oe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,E.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),i=r?s.lastIndexOf(r):s.length,a=s[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:c,endCol:u,endOffset:l}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:c,endCol:u,endOffset:l})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),i=n.type===at.END_TAG&&s===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===E.SVG&&this.treeAdapter.getTagName(n)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===oe.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===E.MGLYPH||t.tagID===E.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,oe.HTML)}_processToken(t){switch(t.type){case at.CHARACTER:{this.onCharacter(t);break}case at.NULL_CHARACTER:{this.onNullCharacter(t);break}case at.COMMENT:{this.onComment(t);break}case at.DOCTYPE:{this.onDoctype(t);break}case at.START_TAG:{this._processStartTag(t);break}case at.END_TAG:{this.onEndTag(t);break}case at.EOF:{this.onEof(t);break}case at.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return W2e(t,s,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===ji.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const i=this.activeFormattingElements.entries[s];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=U.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(E.P),this.openElements.popUntilTagNamePopped(E.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case E.TR:{this.insertionMode=U.IN_ROW;return}case E.TBODY:case E.THEAD:case E.TFOOT:{this.insertionMode=U.IN_TABLE_BODY;return}case E.CAPTION:{this.insertionMode=U.IN_CAPTION;return}case E.COLGROUP:{this.insertionMode=U.IN_COLUMN_GROUP;return}case E.TABLE:{this.insertionMode=U.IN_TABLE;return}case E.BODY:{this.insertionMode=U.IN_BODY;return}case E.FRAMESET:{this.insertionMode=U.IN_FRAMESET;return}case E.SELECT:{this._resetInsertionModeForSelect(t);return}case E.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case E.HTML:{this.insertionMode=this.headElement?U.AFTER_HEAD:U.BEFORE_HEAD;return}case E.TD:case E.TH:{if(t>0){this.insertionMode=U.IN_CELL;return}break}case E.HEAD:{if(t>0){this.insertionMode=U.IN_HEAD;return}break}}this.insertionMode=U.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===E.TEMPLATE)break;if(r===E.TABLE){this.insertionMode=U.IN_SELECT_IN_TABLE;return}}this.insertionMode=U.IN_SELECT}_isElementCausesFosterParenting(t){return wV.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case E.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===oe.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case E.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return y2e[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ANe(this,t);return}switch(this.insertionMode){case U.INITIAL:{Pf(this,t);break}case U.BEFORE_HTML:{Ah(this,t);break}case U.BEFORE_HEAD:{Ch(this,t);break}case U.IN_HEAD:{Ph(this,t);break}case U.IN_HEAD_NO_SCRIPT:{Nh(this,t);break}case U.AFTER_HEAD:{Rh(this,t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:{vV(this,t);break}case U.TEXT:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{nw(this,t);break}case U.IN_TABLE_TEXT:{PV(this,t);break}case U.IN_COLUMN_GROUP:{$y(this,t);break}case U.AFTER_BODY:{My(this,t);break}case U.AFTER_AFTER_BODY:{J0(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){INe(this,t);return}switch(this.insertionMode){case U.INITIAL:{Pf(this,t);break}case U.BEFORE_HTML:{Ah(this,t);break}case U.BEFORE_HEAD:{Ch(this,t);break}case U.IN_HEAD:{Ph(this,t);break}case U.IN_HEAD_NO_SCRIPT:{Nh(this,t);break}case U.AFTER_HEAD:{Rh(this,t);break}case U.TEXT:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{nw(this,t);break}case U.IN_COLUMN_GROUP:{$y(this,t);break}case U.AFTER_BODY:{My(this,t);break}case U.AFTER_AFTER_BODY:{J0(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Hv(this,t);return}switch(this.insertionMode){case U.INITIAL:case U.BEFORE_HTML:case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_TEMPLATE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{Hv(this,t);break}case U.IN_TABLE_TEXT:{Nf(this,t);break}case U.AFTER_BODY:{iPe(this,t);break}case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{aPe(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case U.INITIAL:{oPe(this,t);break}case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case U.IN_TABLE_TEXT:{Nf(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?CNe(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{Pf(this,t);break}case U.BEFORE_HTML:{cPe(this,t);break}case U.BEFORE_HEAD:{lPe(this,t);break}case U.IN_HEAD:{Ii(this,t);break}case U.IN_HEAD_NO_SCRIPT:{hPe(this,t);break}case U.AFTER_HEAD:{pPe(this,t);break}case U.IN_BODY:{Sr(this,t);break}case U.IN_TABLE:{yd(this,t);break}case U.IN_TABLE_TEXT:{Nf(this,t);break}case U.IN_CAPTION:{dNe(this,t);break}case U.IN_COLUMN_GROUP:{CC(this,t);break}case U.IN_TABLE_BODY:{nk(this,t);break}case U.IN_ROW:{rk(this,t);break}case U.IN_CELL:{mNe(this,t);break}case U.IN_SELECT:{OV(this,t);break}case U.IN_SELECT_IN_TABLE:{gNe(this,t);break}case U.IN_TEMPLATE:{yNe(this,t);break}case U.AFTER_BODY:{kNe(this,t);break}case U.IN_FRAMESET:{ENe(this,t);break}case U.AFTER_FRAMESET:{SNe(this,t);break}case U.AFTER_AFTER_BODY:{xNe(this,t);break}case U.AFTER_AFTER_FRAMESET:{TNe(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?PNe(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{Pf(this,t);break}case U.BEFORE_HTML:{uPe(this,t);break}case U.BEFORE_HEAD:{dPe(this,t);break}case U.IN_HEAD:{fPe(this,t);break}case U.IN_HEAD_NO_SCRIPT:{mPe(this,t);break}case U.AFTER_HEAD:{gPe(this,t);break}case U.IN_BODY:{tk(this,t);break}case U.TEXT:{tNe(this,t);break}case U.IN_TABLE:{vm(this,t);break}case U.IN_TABLE_TEXT:{Nf(this,t);break}case U.IN_CAPTION:{fNe(this,t);break}case U.IN_COLUMN_GROUP:{hNe(this,t);break}case U.IN_TABLE_BODY:{qv(this,t);break}case U.IN_ROW:{RV(this,t);break}case U.IN_CELL:{pNe(this,t);break}case U.IN_SELECT:{LV(this,t);break}case U.IN_SELECT_IN_TABLE:{bNe(this,t);break}case U.IN_TEMPLATE:{_Ne(this,t);break}case U.AFTER_BODY:{$V(this,t);break}case U.IN_FRAMESET:{wNe(this,t);break}case U.AFTER_FRAMESET:{vNe(this,t);break}case U.AFTER_AFTER_BODY:{J0(this,t);break}}}onEof(t){switch(this.insertionMode){case U.INITIAL:{Pf(this,t);break}case U.BEFORE_HTML:{Ah(this,t);break}case U.BEFORE_HEAD:{Ch(this,t);break}case U.IN_HEAD:{Ph(this,t);break}case U.IN_HEAD_NO_SCRIPT:{Nh(this,t);break}case U.AFTER_HEAD:{Rh(this,t);break}case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{AV(this,t);break}case U.TEXT:{nNe(this,t);break}case U.IN_TABLE_TEXT:{Nf(this,t);break}case U.IN_TEMPLATE:{DV(this,t);break}case U.AFTER_BODY:case U.IN_FRAMESET:case U.AFTER_FRAMESET:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{AC(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===L.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.TEXT:case U.IN_COLUMN_GROUP:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{this._insertCharacters(t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:case U.AFTER_BODY:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{SV(this,t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{nw(this,t);break}case U.IN_TABLE_TEXT:{CV(this,t);break}}}}function Z2e(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):IV(e,t),n}function ePe(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function tPe(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let i=0,a=s;a!==n;i++,a=s){s=e.openElements.getCommonAncestor(a);const o=e.activeFormattingElements.getElementEntry(a),c=o&&i>=Q2e;!o||c?(c&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=nPe(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function nPe(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function rPe(e,t,n){const r=e.treeAdapter.getTagName(t),s=ef(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);s===E.TEMPLATE&&i===oe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function sPe(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,i=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,s.tagID)}function IC(e,t){for(let n=0;n<Y2e;n++){const r=Z2e(e,t);if(!r)break;const s=ePe(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const i=tPe(e,s,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),a&&rPe(e,a,i),sPe(e,s,r)}}function Hv(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function iPe(e,t){e._appendCommentNode(t,e.openElements.items[0])}function aPe(e,t){e._appendCommentNode(t,e.document)}function AC(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const i=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(i);a&&!a.endTag&&e._setEndLocation(i,t)}}}}function oPe(e,t){e._setDocumentType(t);const n=t.forceQuirks?Rs.QUIRKS:M2e(t);$2e(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=U.BEFORE_HTML}function Pf(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Rs.QUIRKS),e.insertionMode=U.BEFORE_HTML,e._processToken(t)}function cPe(e,t){t.tagID===E.HTML?(e._insertElement(t,oe.HTML),e.insertionMode=U.BEFORE_HEAD):Ah(e,t)}function uPe(e,t){const n=t.tagID;(n===E.HTML||n===E.HEAD||n===E.BODY||n===E.BR)&&Ah(e,t)}function Ah(e,t){e._insertFakeRootElement(),e.insertionMode=U.BEFORE_HEAD,e._processToken(t)}function lPe(e,t){switch(t.tagID){case E.HTML:{Sr(e,t);break}case E.HEAD:{e._insertElement(t,oe.HTML),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD;break}default:Ch(e,t)}}function dPe(e,t){const n=t.tagID;n===E.HEAD||n===E.BODY||n===E.HTML||n===E.BR?Ch(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ch(e,t){e._insertFakeElement(Y.HEAD,E.HEAD),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD,e._processToken(t)}function Ii(e,t){switch(t.tagID){case E.HTML:{Sr(e,t);break}case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:{e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case E.TITLE:{e._switchToTextParsing(t,dn.RCDATA);break}case E.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,dn.RAWTEXT):(e._insertElement(t,oe.HTML),e.insertionMode=U.IN_HEAD_NO_SCRIPT);break}case E.NOFRAMES:case E.STYLE:{e._switchToTextParsing(t,dn.RAWTEXT);break}case E.SCRIPT:{e._switchToTextParsing(t,dn.SCRIPT_DATA);break}case E.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=U.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(U.IN_TEMPLATE);break}case E.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Ph(e,t)}}function fPe(e,t){switch(t.tagID){case E.HEAD:{e.openElements.pop(),e.insertionMode=U.AFTER_HEAD;break}case E.BODY:case E.BR:case E.HTML:{Ph(e,t);break}case E.TEMPLATE:{Mu(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Mu(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==E.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(E.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ph(e,t){e.openElements.pop(),e.insertionMode=U.AFTER_HEAD,e._processToken(t)}function hPe(e,t){switch(t.tagID){case E.HTML:{Sr(e,t);break}case E.BASEFONT:case E.BGSOUND:case E.HEAD:case E.LINK:case E.META:case E.NOFRAMES:case E.STYLE:{Ii(e,t);break}case E.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:Nh(e,t)}}function mPe(e,t){switch(t.tagID){case E.NOSCRIPT:{e.openElements.pop(),e.insertionMode=U.IN_HEAD;break}case E.BR:{Nh(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Nh(e,t){const n=t.type===at.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=U.IN_HEAD,e._processToken(t)}function pPe(e,t){switch(t.tagID){case E.HTML:{Sr(e,t);break}case E.BODY:{e._insertElement(t,oe.HTML),e.framesetOk=!1,e.insertionMode=U.IN_BODY;break}case E.FRAMESET:{e._insertElement(t,oe.HTML),e.insertionMode=U.IN_FRAMESET;break}case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:case E.NOFRAMES:case E.SCRIPT:case E.STYLE:case E.TEMPLATE:case E.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,E.HEAD),Ii(e,t),e.openElements.remove(e.headElement);break}case E.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Rh(e,t)}}function gPe(e,t){switch(t.tagID){case E.BODY:case E.HTML:case E.BR:{Rh(e,t);break}case E.TEMPLATE:{Mu(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Rh(e,t){e._insertFakeElement(Y.BODY,E.BODY),e.insertionMode=U.IN_BODY,ek(e,t)}function ek(e,t){switch(t.type){case at.CHARACTER:{vV(e,t);break}case at.WHITESPACE_CHARACTER:{SV(e,t);break}case at.COMMENT:{Hv(e,t);break}case at.START_TAG:{Sr(e,t);break}case at.END_TAG:{tk(e,t);break}case at.EOF:{AV(e,t);break}}}function SV(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function vV(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function bPe(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function yPe(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function _Pe(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,oe.HTML),e.insertionMode=U.IN_FRAMESET)}function kPe(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,oe.HTML)}function EPe(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Vv.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,oe.HTML)}function wPe(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,oe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function SPe(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,oe.HTML),n||(e.formElement=e.openElements.current))}function vPe(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===E.LI&&s===E.LI||(n===E.DD||n===E.DT)&&(s===E.DD||s===E.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==E.ADDRESS&&s!==E.DIV&&s!==E.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,oe.HTML)}function xPe(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,oe.HTML),e.tokenizer.state=dn.PLAINTEXT}function TPe(e,t){e.openElements.hasInScope(E.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.framesetOk=!1}function IPe(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(IC(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function APe(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function CPe(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(E.NOBR)&&(IC(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function PPe(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function NPe(e,t){e.treeAdapter.getDocumentMode(e.document)!==Rs.QUIRKS&&e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,oe.HTML),e.framesetOk=!1,e.insertionMode=U.IN_TABLE}function xV(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,oe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function TV(e){const t=mV(e,eu.TYPE);return t!=null&&t.toLowerCase()===J2e}function RPe(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,oe.HTML),TV(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function OPe(e,t){e._appendElement(t,oe.HTML),t.ackSelfClosing=!0}function LPe(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._appendElement(t,oe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function DPe(e,t){t.tagName=Y.IMG,t.tagID=E.IMG,xV(e,t)}function $Pe(e,t){e._insertElement(t,oe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=dn.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=U.TEXT}function MPe(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,dn.RAWTEXT)}function jPe(e,t){e.framesetOk=!1,e._switchToTextParsing(t,dn.RAWTEXT)}function M3(e,t){e._switchToTextParsing(t,dn.RAWTEXT)}function FPe(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===U.IN_TABLE||e.insertionMode===U.IN_CAPTION||e.insertionMode===U.IN_TABLE_BODY||e.insertionMode===U.IN_ROW||e.insertionMode===U.IN_CELL?U.IN_SELECT_IN_TABLE:U.IN_SELECT}function BPe(e,t){e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML)}function zPe(e,t){e.openElements.hasInScope(E.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,oe.HTML)}function UPe(e,t){e.openElements.hasInScope(E.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(E.RTC),e._insertElement(t,oe.HTML)}function VPe(e,t){e._reconstructActiveFormattingElements(),kV(t),TC(t),t.selfClosing?e._appendElement(t,oe.MATHML):e._insertElement(t,oe.MATHML),t.ackSelfClosing=!0}function HPe(e,t){e._reconstructActiveFormattingElements(),EV(t),TC(t),t.selfClosing?e._appendElement(t,oe.SVG):e._insertElement(t,oe.SVG),t.ackSelfClosing=!0}function j3(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML)}function Sr(e,t){switch(t.tagID){case E.I:case E.S:case E.B:case E.U:case E.EM:case E.TT:case E.BIG:case E.CODE:case E.FONT:case E.SMALL:case E.STRIKE:case E.STRONG:{APe(e,t);break}case E.A:{IPe(e,t);break}case E.H1:case E.H2:case E.H3:case E.H4:case E.H5:case E.H6:{EPe(e,t);break}case E.P:case E.DL:case E.OL:case E.UL:case E.DIV:case E.DIR:case E.NAV:case E.MAIN:case E.MENU:case E.ASIDE:case E.CENTER:case E.FIGURE:case E.FOOTER:case E.HEADER:case E.HGROUP:case E.DIALOG:case E.DETAILS:case E.ADDRESS:case E.ARTICLE:case E.SEARCH:case E.SECTION:case E.SUMMARY:case E.FIELDSET:case E.BLOCKQUOTE:case E.FIGCAPTION:{kPe(e,t);break}case E.LI:case E.DD:case E.DT:{vPe(e,t);break}case E.BR:case E.IMG:case E.WBR:case E.AREA:case E.EMBED:case E.KEYGEN:{xV(e,t);break}case E.HR:{LPe(e,t);break}case E.RB:case E.RTC:{zPe(e,t);break}case E.RT:case E.RP:{UPe(e,t);break}case E.PRE:case E.LISTING:{wPe(e,t);break}case E.XMP:{MPe(e,t);break}case E.SVG:{HPe(e,t);break}case E.HTML:{bPe(e,t);break}case E.BASE:case E.LINK:case E.META:case E.STYLE:case E.TITLE:case E.SCRIPT:case E.BGSOUND:case E.BASEFONT:case E.TEMPLATE:{Ii(e,t);break}case E.BODY:{yPe(e,t);break}case E.FORM:{SPe(e,t);break}case E.NOBR:{CPe(e,t);break}case E.MATH:{VPe(e,t);break}case E.TABLE:{NPe(e,t);break}case E.INPUT:{RPe(e,t);break}case E.PARAM:case E.TRACK:case E.SOURCE:{OPe(e,t);break}case E.IMAGE:{DPe(e,t);break}case E.BUTTON:{TPe(e,t);break}case E.APPLET:case E.OBJECT:case E.MARQUEE:{PPe(e,t);break}case E.IFRAME:{jPe(e,t);break}case E.SELECT:{FPe(e,t);break}case E.OPTION:case E.OPTGROUP:{BPe(e,t);break}case E.NOEMBED:case E.NOFRAMES:{M3(e,t);break}case E.FRAMESET:{_Pe(e,t);break}case E.TEXTAREA:{$Pe(e,t);break}case E.NOSCRIPT:{e.options.scriptingEnabled?M3(e,t):j3(e,t);break}case E.PLAINTEXT:{xPe(e,t);break}case E.COL:case E.TH:case E.TD:case E.TR:case E.HEAD:case E.FRAME:case E.TBODY:case E.TFOOT:case E.THEAD:case E.CAPTION:case E.COLGROUP:break;default:j3(e,t)}}function qPe(e,t){if(e.openElements.hasInScope(E.BODY)&&(e.insertionMode=U.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function GPe(e,t){e.openElements.hasInScope(E.BODY)&&(e.insertionMode=U.AFTER_BODY,$V(e,t))}function KPe(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function WPe(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(E.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(E.FORM):n&&e.openElements.remove(n))}function JPe(e){e.openElements.hasInButtonScope(E.P)||e._insertFakeElement(Y.P,E.P),e._closePElement()}function YPe(e){e.openElements.hasInListItemScope(E.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(E.LI),e.openElements.popUntilTagNamePopped(E.LI))}function QPe(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function XPe(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function ZPe(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function eNe(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,E.BR),e.openElements.pop(),e.framesetOk=!1}function IV(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const i=e.openElements.items[s],a=e.openElements.tagIDs[s];if(r===a&&(r!==E.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(i,a))break}}function tk(e,t){switch(t.tagID){case E.A:case E.B:case E.I:case E.S:case E.U:case E.EM:case E.TT:case E.BIG:case E.CODE:case E.FONT:case E.NOBR:case E.SMALL:case E.STRIKE:case E.STRONG:{IC(e,t);break}case E.P:{JPe(e);break}case E.DL:case E.UL:case E.OL:case E.DIR:case E.DIV:case E.NAV:case E.PRE:case E.MAIN:case E.MENU:case E.ASIDE:case E.BUTTON:case E.CENTER:case E.FIGURE:case E.FOOTER:case E.HEADER:case E.HGROUP:case E.DIALOG:case E.ADDRESS:case E.ARTICLE:case E.DETAILS:case E.SEARCH:case E.SECTION:case E.SUMMARY:case E.LISTING:case E.FIELDSET:case E.BLOCKQUOTE:case E.FIGCAPTION:{KPe(e,t);break}case E.LI:{YPe(e);break}case E.DD:case E.DT:{QPe(e,t);break}case E.H1:case E.H2:case E.H3:case E.H4:case E.H5:case E.H6:{XPe(e);break}case E.BR:{eNe(e);break}case E.BODY:{qPe(e,t);break}case E.HTML:{GPe(e,t);break}case E.FORM:{WPe(e);break}case E.APPLET:case E.OBJECT:case E.MARQUEE:{ZPe(e,t);break}case E.TEMPLATE:{Mu(e,t);break}default:IV(e,t)}}function AV(e,t){e.tmplInsertionModeStack.length>0?DV(e,t):AC(e,t)}function tNe(e,t){var n;t.tagID===E.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function nNe(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function nw(e,t){if(e.openElements.currentTagId!==void 0&&wV.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=U.IN_TABLE_TEXT,t.type){case at.CHARACTER:{PV(e,t);break}case at.WHITESPACE_CHARACTER:{CV(e,t);break}}else xp(e,t)}function rNe(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,oe.HTML),e.insertionMode=U.IN_CAPTION}function sNe(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,oe.HTML),e.insertionMode=U.IN_COLUMN_GROUP}function iNe(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,E.COLGROUP),e.insertionMode=U.IN_COLUMN_GROUP,CC(e,t)}function aNe(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,oe.HTML),e.insertionMode=U.IN_TABLE_BODY}function oNe(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,E.TBODY),e.insertionMode=U.IN_TABLE_BODY,nk(e,t)}function cNe(e,t){e.openElements.hasInTableScope(E.TABLE)&&(e.openElements.popUntilTagNamePopped(E.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function uNe(e,t){TV(t)?e._appendElement(t,oe.HTML):xp(e,t),t.ackSelfClosing=!0}function lNe(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,oe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function yd(e,t){switch(t.tagID){case E.TD:case E.TH:case E.TR:{oNe(e,t);break}case E.STYLE:case E.SCRIPT:case E.TEMPLATE:{Ii(e,t);break}case E.COL:{iNe(e,t);break}case E.FORM:{lNe(e,t);break}case E.TABLE:{cNe(e,t);break}case E.TBODY:case E.TFOOT:case E.THEAD:{aNe(e,t);break}case E.INPUT:{uNe(e,t);break}case E.CAPTION:{rNe(e,t);break}case E.COLGROUP:{sNe(e,t);break}default:xp(e,t)}}function vm(e,t){switch(t.tagID){case E.TABLE:{e.openElements.hasInTableScope(E.TABLE)&&(e.openElements.popUntilTagNamePopped(E.TABLE),e._resetInsertionMode());break}case E.TEMPLATE:{Mu(e,t);break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TBODY:case E.TD:case E.TFOOT:case E.TH:case E.THEAD:case E.TR:break;default:xp(e,t)}}function xp(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ek(e,t),e.fosterParentingEnabled=n}function CV(e,t){e.pendingCharacterTokens.push(t)}function PV(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Nf(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)xp(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const NV=new Set([E.CAPTION,E.COL,E.COLGROUP,E.TBODY,E.TD,E.TFOOT,E.TH,E.THEAD,E.TR]);function dNe(e,t){const n=t.tagID;NV.has(n)?e.openElements.hasInTableScope(E.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,yd(e,t)):Sr(e,t)}function fNe(e,t){const n=t.tagID;switch(n){case E.CAPTION:case E.TABLE:{e.openElements.hasInTableScope(E.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,n===E.TABLE&&vm(e,t));break}case E.BODY:case E.COL:case E.COLGROUP:case E.HTML:case E.TBODY:case E.TD:case E.TFOOT:case E.TH:case E.THEAD:case E.TR:break;default:tk(e,t)}}function CC(e,t){switch(t.tagID){case E.HTML:{Sr(e,t);break}case E.COL:{e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case E.TEMPLATE:{Ii(e,t);break}default:$y(e,t)}}function hNe(e,t){switch(t.tagID){case E.COLGROUP:{e.openElements.currentTagId===E.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case E.TEMPLATE:{Mu(e,t);break}case E.COL:break;default:$y(e,t)}}function $y(e,t){e.openElements.currentTagId===E.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE,e._processToken(t))}function nk(e,t){switch(t.tagID){case E.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,oe.HTML),e.insertionMode=U.IN_ROW;break}case E.TH:case E.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,E.TR),e.insertionMode=U.IN_ROW,rk(e,t);break}case E.CAPTION:case E.COL:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,yd(e,t));break}default:yd(e,t)}}function qv(e,t){const n=t.tagID;switch(t.tagID){case E.TBODY:case E.TFOOT:case E.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case E.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,vm(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TD:case E.TH:case E.TR:break;default:vm(e,t)}}function rk(e,t){switch(t.tagID){case E.TH:case E.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,oe.HTML),e.insertionMode=U.IN_CELL,e.activeFormattingElements.insertMarker();break}case E.CAPTION:case E.COL:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:case E.TR:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,nk(e,t));break}default:yd(e,t)}}function RV(e,t){switch(t.tagID){case E.TR:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY);break}case E.TABLE:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,qv(e,t));break}case E.TBODY:case E.TFOOT:case E.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(E.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,qv(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TD:case E.TH:break;default:vm(e,t)}}function mNe(e,t){const n=t.tagID;NV.has(n)?(e.openElements.hasInTableScope(E.TD)||e.openElements.hasInTableScope(E.TH))&&(e._closeTableCell(),rk(e,t)):Sr(e,t)}function pNe(e,t){const n=t.tagID;switch(n){case E.TD:case E.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_ROW);break}case E.TABLE:case E.TBODY:case E.TFOOT:case E.THEAD:case E.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),RV(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:break;default:tk(e,t)}}function OV(e,t){switch(t.tagID){case E.HTML:{Sr(e,t);break}case E.OPTION:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e._insertElement(t,oe.HTML);break}case E.OPTGROUP:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop(),e._insertElement(t,oe.HTML);break}case E.HR:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop(),e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case E.INPUT:case E.KEYGEN:case E.TEXTAREA:case E.SELECT:{e.openElements.hasInSelectScope(E.SELECT)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),t.tagID!==E.SELECT&&e._processStartTag(t));break}case E.SCRIPT:case E.TEMPLATE:{Ii(e,t);break}}}function LV(e,t){switch(t.tagID){case E.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===E.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===E.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop();break}case E.OPTION:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop();break}case E.SELECT:{e.openElements.hasInSelectScope(E.SELECT)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode());break}case E.TEMPLATE:{Mu(e,t);break}}}function gNe(e,t){const n=t.tagID;n===E.CAPTION||n===E.TABLE||n===E.TBODY||n===E.TFOOT||n===E.THEAD||n===E.TR||n===E.TD||n===E.TH?(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),e._processStartTag(t)):OV(e,t)}function bNe(e,t){const n=t.tagID;n===E.CAPTION||n===E.TABLE||n===E.TBODY||n===E.TFOOT||n===E.THEAD||n===E.TR||n===E.TD||n===E.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),e.onEndTag(t)):LV(e,t)}function yNe(e,t){switch(t.tagID){case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:case E.NOFRAMES:case E.SCRIPT:case E.STYLE:case E.TEMPLATE:case E.TITLE:{Ii(e,t);break}case E.CAPTION:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:{e.tmplInsertionModeStack[0]=U.IN_TABLE,e.insertionMode=U.IN_TABLE,yd(e,t);break}case E.COL:{e.tmplInsertionModeStack[0]=U.IN_COLUMN_GROUP,e.insertionMode=U.IN_COLUMN_GROUP,CC(e,t);break}case E.TR:{e.tmplInsertionModeStack[0]=U.IN_TABLE_BODY,e.insertionMode=U.IN_TABLE_BODY,nk(e,t);break}case E.TD:case E.TH:{e.tmplInsertionModeStack[0]=U.IN_ROW,e.insertionMode=U.IN_ROW,rk(e,t);break}default:e.tmplInsertionModeStack[0]=U.IN_BODY,e.insertionMode=U.IN_BODY,Sr(e,t)}}function _Ne(e,t){t.tagID===E.TEMPLATE&&Mu(e,t)}function DV(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(E.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):AC(e,t)}function kNe(e,t){t.tagID===E.HTML?Sr(e,t):My(e,t)}function $V(e,t){var n;if(t.tagID===E.HTML){if(e.fragmentContext||(e.insertionMode=U.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===E.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else My(e,t)}function My(e,t){e.insertionMode=U.IN_BODY,ek(e,t)}function ENe(e,t){switch(t.tagID){case E.HTML:{Sr(e,t);break}case E.FRAMESET:{e._insertElement(t,oe.HTML);break}case E.FRAME:{e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case E.NOFRAMES:{Ii(e,t);break}}}function wNe(e,t){t.tagID===E.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==E.FRAMESET&&(e.insertionMode=U.AFTER_FRAMESET))}function SNe(e,t){switch(t.tagID){case E.HTML:{Sr(e,t);break}case E.NOFRAMES:{Ii(e,t);break}}}function vNe(e,t){t.tagID===E.HTML&&(e.insertionMode=U.AFTER_AFTER_FRAMESET)}function xNe(e,t){t.tagID===E.HTML?Sr(e,t):J0(e,t)}function J0(e,t){e.insertionMode=U.IN_BODY,ek(e,t)}function TNe(e,t){switch(t.tagID){case E.HTML:{Sr(e,t);break}case E.NOFRAMES:{Ii(e,t);break}}}function INe(e,t){t.chars=Wt,e._insertCharacters(t)}function ANe(e,t){e._insertCharacters(t),e.framesetOk=!1}function MV(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==oe.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function CNe(e,t){if(H2e(t))MV(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===oe.MATHML?kV(t):r===oe.SVG&&(q2e(t),EV(t)),TC(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function PNe(e,t){if(t.tagID===E.P||t.tagID===E.BR){MV(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===oe.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR;const sk=jV("end"),oa=jV("start");function jV(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function FV(e){const t=oa(e),n=sk(e);if(t&&n)return{start:t,end:n}}const NNe=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,RNe=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),F3={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function BV(e,t){const n=UNe(e),r=oC("type",{handlers:{root:ONe,element:LNe,text:DNe,comment:UV,doctype:$Ne,raw:jNe},unknown:FNe}),s={parser:n?new $3(F3):$3.getFragmentParser(void 0,F3),handle(o){r(o,s)},stitches:!1,options:t||{}};r(e,s),tf(s,oa());const i=n?s.parser.document:s.parser.getFragment(),a=HCe(i,{file:s.options.file});return s.stitches&&Zi(a,"comment",function(o,c,u){const l=o;if(l.value.stitch&&u&&c!==void 0){const d=u.children;return d[c]=l.value.stitch,c}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function zV(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function ONe(e,t){zV(e.children,t)}function LNe(e,t){BNe(e,t),zV(e.children,t),zNe(e,t)}function DNe(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:at.CHARACTER,chars:e.value,location:Tp(e)};tf(t,oa(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function $Ne(e,t){const n={type:at.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Tp(e)};tf(t,oa(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function MNe(e,t){t.stitches=!0;const n=VNe(e);if("children"in e&&"children"in n){const r=BV({type:"root",children:e.children},t.options);n.children=r.children}UV({type:"comment",value:{stitch:n}},t)}function UV(e,t){const n=e.value,r={type:at.COMMENT,data:n,location:Tp(e)};tf(t,oa(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function jNe(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,VV(t,oa(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(NNe,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function FNe(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))MNe(n,t);else{let r="";throw RNe.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function tf(e,t){VV(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=dn.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function VV(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function BNe(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===dn.PLAINTEXT)return;tf(t,oa(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:Fc.html;s===Fc.html&&n==="svg"&&(s=Fc.svg);const i=JCe({...e,children:[]},{space:s===Fc.svg?"svg":"html"}),a={type:at.START_TAG,tagName:n,tagID:ef(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:Tp(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function zNe(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&o9.includes(n)||t.parser.tokenizer.state===dn.PLAINTEXT)return;tf(t,sk(e));const r={type:at.END_TAG,tagName:n,tagID:ef(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Tp(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===dn.RCDATA||t.parser.tokenizer.state===dn.RAWTEXT||t.parser.tokenizer.state===dn.SCRIPT_DATA)&&(t.parser.tokenizer.state=dn.DATA)}function UNe(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Tp(e){const t=oa(e)||{line:void 0,column:void 0,offset:void 0},n=sk(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function VNe(e){return"children"in e?_u({...e,children:[]}):_u(e)}function Gv(e){return function(t,n){return BV(t,{...e,file:n})}}const yc=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ac={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...yc,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...yc],h2:[["className","sr-only"]],img:[...yc,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...yc,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...yc],table:[...yc],ul:[...yc,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},oo={}.hasOwnProperty;function HNe(e,t){let n={type:"root",children:[]};const r={schema:t?{...Ac,...t}:Ac,stack:[]},s=HV(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function HV(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return qNe(e,n);case"doctype":return GNe(e,n);case"element":return KNe(e,n);case"root":return WNe(e,n);case"text":return JNe(e,n)}}}function qNe(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),i={type:"comment",value:r<0?n:n.slice(0,r)};return Ip(i,t),i}}function GNe(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ip(n,t),n}}function KNe(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=qV(e,t.children),s=YNe(e,t.properties);e.stack.pop();let i=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(i=!0,e.schema.ancestors&&oo.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let c=-1;for(i=!1;++c<o.length;)e.stack.includes(o[c])&&(i=!0)}if(!i)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const a={type:"element",tagName:n,properties:s,children:r};return Ip(a,t),a}function WNe(e,t){const r={type:"root",children:qV(e,t.children)};return Ip(r,t),r}function JNe(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ip(r,t),r}function qV(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const i=HV(e,r[s]);i&&(Array.isArray(i)?n.push(...i):n.push(i))}}return n}function YNe(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,i=r&&oo.call(r,n)?r[n]:void 0,a=r&&oo.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},c={};let u;for(u in o)if(oo.call(o,u)){const l=o[u];let d=B3(e,z3(i,u),u,l);d==null&&(d=B3(e,z3(a,u),u,l)),d!=null&&(c[u]=d)}if(s&&oo.call(s,n)){const l=s[n];for(u in l)oo.call(l,u)&&!oo.call(c,u)&&(c[u]=l[u])}return c}function B3(e,t,n,r){return t?Array.isArray(r)?QNe(e,t,n,r):GV(e,t,n,r):void 0}function QNe(e,t,n,r){let s=-1;const i=[];for(;++s<r.length;){const a=GV(e,t,n,r[s]);(typeof a=="number"||typeof a=="string")&&i.push(a)}return i}function GV(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&XNe(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,i=0;for(;++i<t.length;){const a=t[i];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(r))){s=!0;break}}else if(a===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function XNe(e,t,n){const r=e.schema.protocols&&oo.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),i=s.indexOf(":"),a=s.indexOf("?"),o=s.indexOf("#"),c=s.indexOf("/");if(i<0||c>-1&&i>c||a>-1&&i>a||o>-1&&i>o)return!0;let u=-1;for(;++u<r.length;){const l=r[u];if(i===l.length&&s.slice(0,l.length)===l)return!0}return!1}function Ip(e,t){const n=FV(t);t.data&&(e.data=_u(t.data)),n&&(e.position=n)}function z3(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],i=typeof s=="string"?s:s[0];if(i===t)return s;i==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function KV(e){return function(t){return HNe(t,e)}}const Rr=cc(/[A-Za-z]/),kr=cc(/[\dA-Za-z]/),ZNe=cc(/[#-'*+\--9=?A-Z^-~]/);function jy(e){return e!==null&&(e<32||e===127)}const Kv=cc(/\d/),eRe=cc(/[\dA-Fa-f]/),tRe=cc(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function jt(e){return e!==null&&(e<0||e===32)}function lt(e){return e===-2||e===-1||e===32}const ik=cc(new RegExp("\\p{P}|\\p{S}","u")),ku=cc(/\s/);function cc(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function nRe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function rRe(e,t,n){const s=Q1((n||{}).ignore||[]),i=sRe(t);let a=-1;for(;++a<i.length;)_C(e,"text",o);function o(u,l){let d=-1,f;for(;++d<l.length;){const h=l[d],m=f?f.children:void 0;if(s(h,m?m.indexOf(h):void 0,f))return;f=h}if(f)return c(u,l)}function c(u,l){const d=l[l.length-1],f=i[a][0],h=i[a][1];let m=0;const g=d.children.indexOf(u);let p=!1,_=[];f.lastIndex=0;let k=f.exec(u.value);for(;k;){const v=k.index,w={index:k.index,input:k.input,stack:[...l,u]};let S=h(...k,w);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?f.lastIndex=v+1:(m!==v&&_.push({type:"text",value:u.value.slice(m,v)}),Array.isArray(S)?_.push(...S):S&&_.push(S),m=v+k[0].length,p=!0),!f.global)break;k=f.exec(u.value)}return p?(m<u.value.length&&_.push({type:"text",value:u.value.slice(m)}),d.children.splice(g,1,..._)):_=[u],g+_.length}}function sRe(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([iRe(s[0]),aRe(s[1])])}return t}function iRe(e){return typeof e=="string"?new RegExp(nRe(e),"g"):e}function aRe(e){return typeof e=="function"?e:function(){return e}}const rw="phrasing",sw=["autolink","link","image","label"];function oRe(){return{transforms:[mRe],enter:{literalAutolink:uRe,literalAutolinkEmail:iw,literalAutolinkHttp:iw,literalAutolinkWww:iw},exit:{literalAutolink:hRe,literalAutolinkEmail:fRe,literalAutolinkHttp:lRe,literalAutolinkWww:dRe}}}function cRe(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:rw,notInConstruct:sw},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:rw,notInConstruct:sw},{character:":",before:"[ps]",after:"\\/",inConstruct:rw,notInConstruct:sw}]}}function uRe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function iw(e){this.config.enter.autolinkProtocol.call(this,e)}function lRe(e){this.config.exit.autolinkProtocol.call(this,e)}function dRe(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function fRe(e){this.config.exit.autolinkEmail.call(this,e)}function hRe(e){this.exit(e)}function mRe(e){rRe(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,pRe],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),gRe]],{ignore:["link","linkReference"]})}function pRe(e,t,n,r,s){let i="";if(!WV(s)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!bRe(n)))return!1;const a=yRe(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function gRe(e,t,n,r){return!WV(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function bRe(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function yRe(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=Ay(e,"(");let i=Ay(e,")");for(;r!==-1&&s>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function WV(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ku(n)||ik(n))&&(!t||n!==47)}function mi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}JV.peek=IRe;function _Re(){this.buffer()}function kRe(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ERe(){this.buffer()}function wRe(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function SRe(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vRe(e){this.exit(e)}function xRe(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function TRe(e){this.exit(e)}function IRe(){return"["}function JV(e,t,n,r){const s=n.createTracker(r);let i=s.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return i+=s.move(n.safe(n.associationId(e),{after:"]",before:i})),o(),a(),i+=s.move("]"),i}function ARe(){return{enter:{gfmFootnoteCallString:_Re,gfmFootnoteCall:kRe,gfmFootnoteDefinitionLabelString:ERe,gfmFootnoteDefinition:wRe},exit:{gfmFootnoteCallString:SRe,gfmFootnoteCall:vRe,gfmFootnoteDefinitionLabelString:xRe,gfmFootnoteDefinition:TRe}}}function CRe(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:JV},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,i,a){const o=i.createTracker(a);let c=o.move("[^");const u=i.enter("footnoteDefinition"),l=i.enter("label");return c+=o.move(i.safe(i.associationId(r),{before:c,after:"]"})),l(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((t?`
|
|
264
|
+
`:" ")+i.indentLines(i.containerFlow(r,o.current()),t?YV:PRe))),u(),c}}function PRe(e,t,n){return t===0?e:YV(e,t,n)}function YV(e,t,n){return(n?"":" ")+e}const NRe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];QV.peek=$Re;function RRe(){return{canContainEols:["delete"],enter:{strikethrough:LRe},exit:{strikethrough:DRe}}}function ORe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:NRe}],handlers:{delete:QV}}}function LRe(e){this.enter({type:"delete",children:[]},e)}function DRe(e){this.exit(e)}function QV(e,t,n,r){const s=n.createTracker(r),i=n.enter("strikethrough");let a=s.move("~~");return a+=n.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),i(),a}function $Re(){return"~"}function MRe(e){return e.length}function jRe(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||MRe,i=[],a=[],o=[],c=[];let u=0,l=-1;for(;++l<e.length;){const y=[],g=[];let p=-1;for(e[l].length>u&&(u=e[l].length);++p<e[l].length;){const _=FRe(e[l][p]);if(n.alignDelimiters!==!1){const k=s(_);g[p]=k,(c[p]===void 0||k>c[p])&&(c[p]=k)}y.push(_)}a[l]=y,o[l]=g}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)i[d]=U3(r[d]);else{const y=U3(r);for(;++d<u;)i[d]=y}d=-1;const f=[],h=[];for(;++d<u;){const y=i[d];let g="",p="";y===99?(g=":",p=":"):y===108?g=":":y===114&&(p=":");let _=n.alignDelimiters===!1?1:Math.max(1,c[d]-g.length-p.length);const k=g+"-".repeat(_)+p;n.alignDelimiters!==!1&&(_=g.length+_+p.length,_>c[d]&&(c[d]=_),h[d]=_),f[d]=k}a.splice(1,0,f),o.splice(1,0,h),l=-1;const m=[];for(;++l<a.length;){const y=a[l],g=o[l];d=-1;const p=[];for(;++d<u;){const _=y[d]||"";let k="",v="";if(n.alignDelimiters!==!1){const w=c[d]-(g[d]||0),S=i[d];S===114?k=" ".repeat(w):S===99?w%2?(k=" ".repeat(w/2+.5),v=" ".repeat(w/2-.5)):(k=" ".repeat(w/2),v=k):v=" ".repeat(w)}n.delimiterStart!==!1&&!d&&p.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||d)&&p.push(" "),n.alignDelimiters!==!1&&p.push(k),p.push(_),n.alignDelimiters!==!1&&p.push(v),n.padding!==!1&&p.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&p.push("|")}m.push(n.delimiterEnd===!1?p.join("").replace(/ +$/,""):p.join(""))}return m.join(`
|
|
265
|
+
`)}function FRe(e){return e==null?"":String(e)}function U3(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function BRe(e,t,n,r){const s=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),zRe);return s(),a}function zRe(e,t,n){return">"+(n?"":" ")+e}function URe(e,t){return V3(e,t.inConstruct,!0)&&!V3(e,t.notInConstruct,!1)}function V3(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function H3(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
266
|
+
`&&URe(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
267
|
+
`}function VRe(e,t){const n=String(e);let r=n.indexOf(t),s=r,i=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++i>a&&(a=i):i=1,s=r+t.length,r=n.indexOf(t,s);return a}function HRe(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function qRe(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function GRe(e,t,n,r){const s=qRe(n),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(HRe(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(i,KRe);return d(),f}const o=n.createTracker(r),c=s.repeat(Math.max(VRe(i,s)+1,3)),u=n.enter("codeFenced");let l=o.move(c);if(e.lang){const d=n.enter(`codeFencedLang${a}`);l+=o.move(n.safe(e.lang,{before:l,after:" ",encode:["`"],...o.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);l+=o.move(" "),l+=o.move(n.safe(e.meta,{before:l,after:`
|
|
268
|
+
`,encode:["`"],...o.current()})),d()}return l+=o.move(`
|
|
269
|
+
`),i&&(l+=o.move(i+`
|
|
270
|
+
`)),l+=o.move(c),u(),l}function KRe(e,t,n){return(n?"":" ")+e}function PC(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function WRe(e,t,n,r){const s=PC(n),i=s==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":`
|
|
271
|
+
`,...c.current()}))),o(),e.title&&(o=n.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(n.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),o()),a(),u}function JRe(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function xm(e){return"&#x"+e.toString(16).toUpperCase()+";"}function _d(e){if(e===null||jt(e)||ku(e))return 1;if(ik(e))return 2}function Fy(e,t,n){const r=_d(e),s=_d(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}XV.peek=YRe;function XV(e,t,n,r){const s=JRe(n),i=n.enter("emphasis"),a=n.createTracker(r),o=a.move(s);let c=a.move(n.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=c.charCodeAt(0),l=Fy(r.before.charCodeAt(r.before.length-1),u,s);l.inside&&(c=xm(u)+c.slice(1));const d=c.charCodeAt(c.length-1),f=Fy(r.after.charCodeAt(0),d,s);f.inside&&(c=c.slice(0,-1)+xm(d));const h=a.move(s);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:l.outside},o+c+h}function YRe(e,t,n){return n.options.emphasis||"*"}const QRe={};function NC(e,t){const n=QRe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ZV(e,r,s)}function ZV(e,t,n){if(XRe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return q3(e.children,t,n)}return Array.isArray(e)?q3(e,t,n):""}function q3(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=ZV(e[s],t,n);return r.join("")}function XRe(e){return!!(e&&typeof e=="object")}function ZRe(e,t){let n=!1;return Zi(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Bv}),!!((!e.depth||e.depth<3)&&NC(e)&&(t.options.setext||n))}function eOe(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(ZRe(e,n)){const l=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...i.current(),before:`
|
|
272
|
+
`,after:`
|
|
273
|
+
`});return d(),l(),f+`
|
|
274
|
+
`+(s===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
|
|
275
|
+
`))+1))}const a="#".repeat(s),o=n.enter("headingAtx"),c=n.enter("phrasing");i.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
|
|
276
|
+
`,...i.current()});return/^[\t ]/.test(u)&&(u=xm(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),c(),o(),u}eH.peek=tOe;function eH(e){return e.value||""}function tOe(){return"<"}tH.peek=nOe;function tH(e,t,n,r){const s=PC(n),i=s==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=n.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(n.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),o()),u+=c.move(")"),a(),u}function nOe(){return"!"}nH.peek=rOe;function nH(e,t,n,r){const s=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let c=o.move("![");const u=n.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const l=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return a(),n.stack=l,i(),s==="full"||!u||u!==d?c+=o.move(d+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function rOe(){return"!"}rH.peek=sOe;function rH(e,t,n){let r=e.value||"",s="`",i=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],o=n.compilePattern(a);let c;if(a.atBreak)for(;c=o.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return s+r+s}function sOe(){return"`"}function sH(e,t){const n=NC(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}iH.peek=iOe;function iH(e,t,n,r){const s=PC(n),i=s==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,c;if(sH(e,n)){const l=n.stack;n.stack=[],o=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),o(),n.stack=l,d}o=n.enter("link"),c=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=a.move(" "+s),u+=a.move(n.safe(e.title,{before:u,after:s,...a.current()})),u+=a.move(s),c()),u+=a.move(")"),o(),u}function iOe(e,t,n){return sH(e,n)?"<":"["}aH.peek=aOe;function aH(e,t,n,r){const s=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let c=o.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const l=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return a(),n.stack=l,i(),s==="full"||!u||u!==d?c+=o.move(d+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function aOe(){return"["}function RC(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function oOe(e){const t=RC(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function cOe(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function oH(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function uOe(e,t,n,r){const s=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?cOe(n):RC(n);const o=e.ordered?a==="."?")":".":oOe(n);let c=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const l=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&l&&(!l.children||!l.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),oH(n)===a&&l){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=o),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,s(),u}function lOe(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function dOe(e,t,n,r){const s=lOe(n);let i=n.bulletCurrent||RC(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(i+" ".repeat(a-i.length)),o.shift(a);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,o.current()),l);return c(),u;function l(d,f,h){return f?(h?"":" ".repeat(a))+d:(h?i:i+" ".repeat(a-i.length))+d}}function fOe(e,t,n,r){const s=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),s(),a}const hOe=Q1(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function mOe(e,t,n,r){return(e.children.some(function(a){return hOe(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function pOe(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}cH.peek=gOe;function cH(e,t,n,r){const s=pOe(n),i=n.enter("strong"),a=n.createTracker(r),o=a.move(s+s);let c=a.move(n.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=c.charCodeAt(0),l=Fy(r.before.charCodeAt(r.before.length-1),u,s);l.inside&&(c=xm(u)+c.slice(1));const d=c.charCodeAt(c.length-1),f=Fy(r.after.charCodeAt(0),d,s);f.inside&&(c=c.slice(0,-1)+xm(d));const h=a.move(s+s);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:l.outside},o+c+h}function gOe(e,t,n){return n.options.strong||"*"}function bOe(e,t,n,r){return n.safe(e.value,r)}function yOe(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function _Oe(e,t,n){const r=(oH(n)+(n.options.ruleSpaces?" ":"")).repeat(yOe(n));return n.options.ruleSpaces?r.slice(0,-1):r}const uH={blockquote:BRe,break:H3,code:GRe,definition:WRe,emphasis:XV,hardBreak:H3,heading:eOe,html:eH,image:tH,imageReference:nH,inlineCode:rH,link:iH,linkReference:aH,list:uOe,listItem:dOe,paragraph:fOe,root:mOe,strong:cH,text:bOe,thematicBreak:_Oe},G3=document.createElement("i");function OC(e){const t="&"+e+";";G3.innerHTML=t;const n=G3.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function lH(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const kOe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function EOe(e){return e.replace(kOe,wOe)}function wOe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),i=s===120||s===88;return lH(n.slice(i?2:1),i?16:10)}return OC(n)||e}function SOe(){return{enter:{table:vOe,tableData:K3,tableHeader:K3,tableRow:TOe},exit:{codeText:IOe,table:xOe,tableData:aw,tableHeader:aw,tableRow:aw}}}function vOe(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function xOe(e){this.exit(e),this.data.inTable=void 0}function TOe(e){this.enter({type:"tableRow",children:[]},e)}function aw(e){this.exit(e)}function K3(e){this.enter({type:"tableCell",children:[]},e)}function IOe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,AOe));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function AOe(e,t){return t==="|"?t:e}function COe(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
277
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:c,tableRow:o}};function a(h,m,y,g){return u(l(h,y,g),h.align)}function o(h,m,y,g){const p=d(h,y,g),_=u([p]);return _.slice(0,_.indexOf(`
|
|
278
|
+
`))}function c(h,m,y,g){const p=y.enter("tableCell"),_=y.enter("phrasing"),k=y.containerPhrasing(h,{...g,before:i,after:i});return _(),p(),k}function u(h,m){return jRe(h,{align:m,alignDelimiters:r,padding:n,stringLength:s})}function l(h,m,y){const g=h.children;let p=-1;const _=[],k=m.enter("table");for(;++p<g.length;)_[p]=d(g[p],m,y);return k(),_}function d(h,m,y){const g=h.children;let p=-1;const _=[],k=m.enter("tableRow");for(;++p<g.length;)_[p]=c(g[p],h,m,y);return k(),_}function f(h,m,y){let g=uH.inlineCode(h,m,y);return y.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function POe(){return{exit:{taskListCheckValueChecked:W3,taskListCheckValueUnchecked:W3,paragraph:ROe}}}function NOe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:OOe}}}function W3(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ROe(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let i=-1,a;for(;++i<s.length;){const o=s[i];if(o.type==="paragraph"){a=o;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function OOe(e,t,n,r){const s=e.children[0],i=typeof e.checked=="boolean"&&s&&s.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);i&&o.move(a);let c=uH.listItem(e,t,n,{...r,...o.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(l){return l+a}}function LOe(){return[oRe(),ARe(),RRe(),SOe(),POe()]}function DOe(e){return{extensions:[cRe(),CRe(e),ORe(),COe(e),NOe()]}}function ys(e,t,n,r){const s=e.length;let i=0,a;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Os(e,t){return e.length>0?(ys(e,e.length,0,t),e):t}const J3={}.hasOwnProperty;function dH(e){const t={};let n=-1;for(;++n<e.length;)$Oe(t,e[n]);return t}function $Oe(e,t){let n;for(n in t){const s=(J3.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){J3.call(s,a)||(s[a]=[]);const o=i[a];MOe(s[a],Array.isArray(o)?o:o?[o]:[])}}}function MOe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ys(e,0,0,r)}const jOe={tokenize:HOe,partial:!0},fH={tokenize:qOe,partial:!0},hH={tokenize:GOe,partial:!0},mH={tokenize:KOe,partial:!0},FOe={tokenize:WOe,partial:!0},pH={name:"wwwAutolink",tokenize:UOe,previous:bH},gH={name:"protocolAutolink",tokenize:VOe,previous:yH},Ka={name:"emailAutolink",tokenize:zOe,previous:_H},ca={};function BOe(){return{text:ca}}let _c=48;for(;_c<123;)ca[_c]=Ka,_c++,_c===58?_c=65:_c===91&&(_c=97);ca[43]=Ka;ca[45]=Ka;ca[46]=Ka;ca[95]=Ka;ca[72]=[Ka,gH];ca[104]=[Ka,gH];ca[87]=[Ka,pH];ca[119]=[Ka,pH];function zOe(e,t,n){const r=this;let s,i;return a;function a(d){return!Wv(d)||!_H.call(r,r.previous)||LC(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(d))}function o(d){return Wv(d)?(e.consume(d),o):d===64?(e.consume(d),c):n(d)}function c(d){return d===46?e.check(FOe,l,u)(d):d===45||d===95||kr(d)?(i=!0,e.consume(d),c):l(d)}function u(d){return e.consume(d),s=!0,c}function l(d){return i&&s&&Rr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function UOe(e,t,n){const r=this;return s;function s(a){return a!==87&&a!==119||!bH.call(r,r.previous)||LC(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(jOe,e.attempt(fH,e.attempt(hH,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function VOe(e,t,n){const r=this;let s="",i=!1;return a;function a(d){return(d===72||d===104)&&yH.call(r,r.previous)&&!LC(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(d),e.consume(d),o):n(d)}function o(d){if(Rr(d)&&s.length<5)return s+=String.fromCodePoint(d),e.consume(d),o;if(d===58){const f=s.toLowerCase();if(f==="http"||f==="https")return e.consume(d),c}return n(d)}function c(d){return d===47?(e.consume(d),i?u:(i=!0,c)):n(d)}function u(d){return d===null||jy(d)||jt(d)||ku(d)||ik(d)?n(d):e.attempt(fH,e.attempt(hH,l),n)(d)}function l(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function HOe(e,t,n){let r=0;return s;function s(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),s):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function qOe(e,t,n){let r,s,i;return a;function a(u){return u===46||u===95?e.check(mH,c,o)(u):u===null||jt(u)||ku(u)||u!==45&&ik(u)?c(u):(i=!0,e.consume(u),a)}function o(u){return u===95?r=!0:(s=r,r=void 0),e.consume(u),a}function c(u){return s||r||!i?n(u):t(u)}}function GOe(e,t){let n=0,r=0;return s;function s(a){return a===40?(n++,e.consume(a),s):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(mH,t,i)(a):a===null||jt(a)||ku(a)?t(a):(e.consume(a),s)}function i(a){return a===41&&r++,e.consume(a),s}}function KOe(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),i):o===93?(e.consume(o),s):o===60||o===null||jt(o)||ku(o)?t(o):n(o)}function s(o){return o===null||o===40||o===91||jt(o)||ku(o)?t(o):r(o)}function i(o){return Rr(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):Rr(o)?(e.consume(o),a):n(o)}}function WOe(e,t,n){return r;function r(i){return e.consume(i),s}function s(i){return kr(i)?n(i):t(i)}}function bH(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||jt(e)}function yH(e){return!Rr(e)}function _H(e){return!(e===47||Wv(e))}function Wv(e){return e===43||e===45||e===46||e===95||kr(e)}function LC(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function nf(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&kr(e.charCodeAt(n+1))&&kr(e.charCodeAt(n+2)))s=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const o=e.charCodeAt(n+1);i<56320&&o>56319&&o<57344?(a=String.fromCharCode(i,o),s=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+s+1,a=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function ak(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const i=e[s].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Jv={name:"attention",resolveAll:JOe,tokenize:YOe};function JOe(e,t){let n=-1,r,s,i,a,o,c,u,l;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};Y3(d,-c),Y3(f,c),a={type:c>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},i={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:c>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Os(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Os(u,[["enter",s,t],["enter",a,t],["exit",a,t],["enter",i,t]]),u=Os(u,ak(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Os(u,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(l=2,u=Os(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):l=0,ys(e,r-1,n-r+3,u),n=r+u.length-l-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function YOe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=_d(r);let i;return a;function a(c){return i=c,e.enter("attentionSequence"),o(c)}function o(c){if(c===i)return e.consume(c),o;const u=e.exit("attentionSequence"),l=_d(c),d=!l||l===2&&s||n.includes(c),f=!s||s===2&&l||n.includes(r);return u._open=!!(i===42?d:d&&(s||!f)),u._close=!!(i===42?f:f&&(l||!d)),t(c)}}function Y3(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const QOe={name:"autolink",tokenize:XOe};function XOe(e,t,n){let r=0;return s;function s(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(h){return Rr(h)?(e.consume(h),a):h===64?n(h):u(h)}function a(h){return h===43||h===45||h===46||kr(h)?(r=1,o(h)):u(h)}function o(h){return h===58?(e.consume(h),r=0,c):(h===43||h===45||h===46||kr(h))&&r++<32?(e.consume(h),o):(r=0,u(h))}function c(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||jy(h)?n(h):(e.consume(h),c)}function u(h){return h===64?(e.consume(h),l):ZNe(h)?(e.consume(h),u):n(h)}function l(h){return kr(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,l):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):f(h)}function f(h){if((h===45||kr(h))&&r++<63){const m=h===45?f:d;return e.consume(h),m}return n(h)}}function bt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return lt(c)?(e.enter(n),o(c)):t(c)}function o(c){return lt(c)&&i++<s?(e.consume(c),o):(e.exit(n),t(c))}}const Ap={partial:!0,tokenize:ZOe};function ZOe(e,t,n){return r;function r(i){return lt(i)?bt(e,s,"linePrefix")(i):s(i)}function s(i){return i===null||De(i)?t(i):n(i)}}const kH={continuation:{tokenize:tLe},exit:nLe,name:"blockQuote",tokenize:eLe};function eLe(e,t,n){const r=this;return s;function s(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return lt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function tLe(e,t,n){const r=this;return s;function s(a){return lt(a)?bt(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(kH,t,n)(a)}}function nLe(e){e.exit("blockQuote")}const EH={name:"characterEscape",tokenize:rLe};function rLe(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),s}function s(i){return tRe(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const wH={name:"characterReference",tokenize:sLe};function sLe(e,t,n){const r=this;let s=0,i,a;return o;function o(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),c}function c(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,a=kr,l(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=eRe,l):(e.enter("characterReferenceValue"),i=7,a=Kv,l(d))}function l(d){if(d===59&&s){const f=e.exit("characterReferenceValue");return a===kr&&!OC(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&s++<i?(e.consume(d),l):n(d)}}const Q3={partial:!0,tokenize:aLe},X3={concrete:!0,name:"codeFenced",tokenize:iLe};function iLe(e,t,n){const r=this,s={partial:!0,tokenize:w};let i=0,a=0,o;return c;function c(S){return u(S)}function u(S){const T=r.events[r.events.length-1];return i=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,o=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(S)}function l(S){return S===o?(a++,e.consume(S),l):a<3?n(S):(e.exit("codeFencedFenceSequence"),lt(S)?bt(e,d,"whitespace")(S):d(S))}function d(S){return S===null||De(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(Q3,y,v)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(S))}function f(S){return S===null||De(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):lt(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),bt(e,h,"whitespace")(S)):S===96&&S===o?n(S):(e.consume(S),f)}function h(S){return S===null||De(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||De(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===o?n(S):(e.consume(S),m)}function y(S){return e.attempt(s,v,g)(S)}function g(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),p}function p(S){return i>0&<(S)?bt(e,_,"linePrefix",i+1)(S):_(S)}function _(S){return S===null||De(S)?e.check(Q3,y,v)(S):(e.enter("codeFlowValue"),k(S))}function k(S){return S===null||De(S)?(e.exit("codeFlowValue"),_(S)):(e.consume(S),k)}function v(S){return e.exit("codeFenced"),t(S)}function w(S,T,I){let D=0;return R;function R(Q){return S.enter("lineEnding"),S.consume(Q),S.exit("lineEnding"),z}function z(Q){return S.enter("codeFencedFence"),lt(Q)?bt(S,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):V(Q)}function V(Q){return Q===o?(S.enter("codeFencedFenceSequence"),H(Q)):I(Q)}function H(Q){return Q===o?(D++,S.consume(Q),H):D>=a?(S.exit("codeFencedFenceSequence"),lt(Q)?bt(S,G,"whitespace")(Q):G(Q)):I(Q)}function G(Q){return Q===null||De(Q)?(S.exit("codeFencedFence"),T(Q)):I(Q)}}}function aLe(e,t,n){const r=this;return s;function s(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const ow={name:"codeIndented",tokenize:cLe},oLe={partial:!0,tokenize:uLe};function cLe(e,t,n){const r=this;return s;function s(u){return e.enter("codeIndented"),bt(e,i,"linePrefix",5)(u)}function i(u){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?c(u):De(u)?e.attempt(oLe,a,c)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||De(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function c(u){return e.exit("codeIndented"),t(u)}}function uLe(e,t,n){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?n(a):De(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):bt(e,i,"linePrefix",5)(a)}function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):De(a)?s(a):n(a)}}const lLe={name:"codeText",previous:fLe,resolve:dLe,tokenize:hLe};function dLe(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function fLe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function hLe(e,t,n){let r=0,s,i;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),r++,o):(e.exit("codeTextSequence"),c(d))}function c(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),c):d===96?(i=e.enter("codeTextSequence"),s=0,l(d)):De(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||De(d)?(e.exit("codeTextData"),c(d)):(e.consume(d),u)}function l(d){return d===96?(e.consume(d),s++,l):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",u(d))}}class mLe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Rf(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Rf(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Rf(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Rf(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Rf(this.left,n.reverse())}}}function Rf(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function SH(e){const t={};let n=-1,r,s,i,a,o,c,u;const l=new mLe(e);for(;++n<l.length;){for(;n in t;)n=t[n];if(r=l.get(n),n&&r[1].type==="chunkFlow"&&l.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,pLe(l,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,s=void 0;i--;)if(a=l.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(s&&(l.get(s)[1].type="lineEndingBlank"),a[1].type="lineEnding",s=i);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;s&&(r[1].end={...l.get(s)[1].start},o=l.slice(s,n),o.unshift(r),l.splice(s,n-s+1,o))}}return ys(e,0,Number.POSITIVE_INFINITY,l.slice(0)),!u}function pLe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,c=[],u={};let l,d,f=-1,h=n,m=0,y=0;const g=[y];for(;h;){for(;e.get(++s)[1]!==h;);i.push(s),h._tokenizer||(l=r.sliceStream(h),h.next||l.push(null),d&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(l),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++f<o.length;)o[f][0]==="exit"&&o[f-1][0]==="enter"&&o[f][1].type===o[f-1][1].type&&o[f][1].start.line!==o[f][1].end.line&&(y=f+1,g.push(y),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):g.pop(),f=g.length;f--;){const p=o.slice(g[f],g[f+1]),_=i.pop();c.push([_,_+p.length-1]),e.splice(_,2,p)}for(c.reverse(),f=-1;++f<c.length;)u[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return u}const gLe={resolve:yLe,tokenize:_Le},bLe={partial:!0,tokenize:kLe};function yLe(e){return SH(e),e}function _Le(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(o)}function s(o){return o===null?i(o):De(o)?e.check(bLe,a,i)(o):(e.consume(o),s)}function i(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function kLe(e,t,n){const r=this;return s;function s(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),bt(e,i,"linePrefix")}function i(a){if(a===null||De(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function vH(e,t,n,r,s,i,a,o,c){const u=c||Number.POSITIVE_INFINITY;let l=0;return d;function d(p){return p===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(p),e.exit(i),f):p===null||p===32||p===41||jy(p)?n(p):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),y(p))}function f(p){return p===62?(e.enter(i),e.consume(p),e.exit(i),e.exit(s),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===62?(e.exit("chunkString"),e.exit(o),f(p)):p===null||p===60||De(p)?n(p):(e.consume(p),p===92?m:h)}function m(p){return p===60||p===62||p===92?(e.consume(p),h):h(p)}function y(p){return!l&&(p===null||p===41||jt(p))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(p)):l<u&&p===40?(e.consume(p),l++,y):p===41?(e.consume(p),l--,y):p===null||p===32||p===40||jy(p)?n(p):(e.consume(p),p===92?g:y)}function g(p){return p===40||p===41||p===92?(e.consume(p),y):y(p)}}function xH(e,t,n,r,s,i){const a=this;let o=0,c;return u;function u(h){return e.enter(r),e.enter(s),e.consume(h),e.exit(s),e.enter(i),l}function l(h){return o>999||h===null||h===91||h===93&&!c||h===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(e.exit(i),e.enter(s),e.consume(h),e.exit(s),e.exit(r),t):De(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||De(h)||o++>999?(e.exit("chunkString"),l(h)):(e.consume(h),c||(c=!lt(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,d):d(h)}}function TH(e,t,n,r,s,i){let a;return o;function o(f){return f===34||f===39||f===40?(e.enter(r),e.enter(s),e.consume(f),e.exit(s),a=f===40?41:f,c):n(f)}function c(f){return f===a?(e.enter(s),e.consume(f),e.exit(s),e.exit(r),t):(e.enter(i),u(f))}function u(f){return f===a?(e.exit(i),c(a)):f===null?n(f):De(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),bt(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(f))}function l(f){return f===a||f===null||De(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:l)}function d(f){return f===a||f===92?(e.consume(f),l):l(f)}}function Oh(e,t){let n;return r;function r(s){return De(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):lt(s)?bt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const ELe={name:"definition",tokenize:SLe},wLe={partial:!0,tokenize:vLe};function SLe(e,t,n){const r=this;let s;return i;function i(h){return e.enter("definition"),a(h)}function a(h){return xH.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return s=mi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),c):n(h)}function c(h){return jt(h)?Oh(e,u)(h):u(h)}function u(h){return vH(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function l(h){return e.attempt(wLe,d,d)(h)}function d(h){return lt(h)?bt(e,f,"whitespace")(h):f(h)}function f(h){return h===null||De(h)?(e.exit("definition"),r.parser.defined.push(s),t(h)):n(h)}}function vLe(e,t,n){return r;function r(o){return jt(o)?Oh(e,s)(o):n(o)}function s(o){return TH(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return lt(o)?bt(e,a,"whitespace")(o):a(o)}function a(o){return o===null||De(o)?t(o):n(o)}}const xLe={name:"hardBreakEscape",tokenize:TLe};function TLe(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return De(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const ILe={name:"headingAtx",resolve:ALe,tokenize:CLe};function ALe(e,t){let n=e.length-2,r=3,s,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ys(e,r,n-r+1,[["enter",s,t],["enter",i,t],["exit",i,t],["exit",s,t]])),e}function CLe(e,t,n){let r=0;return s;function s(l){return e.enter("atxHeading"),i(l)}function i(l){return e.enter("atxHeadingSequence"),a(l)}function a(l){return l===35&&r++<6?(e.consume(l),a):l===null||jt(l)?(e.exit("atxHeadingSequence"),o(l)):n(l)}function o(l){return l===35?(e.enter("atxHeadingSequence"),c(l)):l===null||De(l)?(e.exit("atxHeading"),t(l)):lt(l)?bt(e,o,"whitespace")(l):(e.enter("atxHeadingText"),u(l))}function c(l){return l===35?(e.consume(l),c):(e.exit("atxHeadingSequence"),o(l))}function u(l){return l===null||l===35||jt(l)?(e.exit("atxHeadingText"),o(l)):(e.consume(l),u)}}const PLe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Z3=["pre","script","style","textarea"],NLe={concrete:!0,name:"htmlFlow",resolveTo:LLe,tokenize:DLe},RLe={partial:!0,tokenize:MLe},OLe={partial:!0,tokenize:$Le};function LLe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function DLe(e,t,n){const r=this;let s,i,a,o,c;return u;function u(A){return l(A)}function l(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),d}function d(A){return A===33?(e.consume(A),f):A===47?(e.consume(A),i=!0,y):A===63?(e.consume(A),s=3,r.interrupt?t:C):Rr(A)?(e.consume(A),a=String.fromCharCode(A),g):n(A)}function f(A){return A===45?(e.consume(A),s=2,h):A===91?(e.consume(A),s=5,o=0,m):Rr(A)?(e.consume(A),s=4,r.interrupt?t:C):n(A)}function h(A){return A===45?(e.consume(A),r.interrupt?t:C):n(A)}function m(A){const N="CDATA[";return A===N.charCodeAt(o++)?(e.consume(A),o===N.length?r.interrupt?t:V:m):n(A)}function y(A){return Rr(A)?(e.consume(A),a=String.fromCharCode(A),g):n(A)}function g(A){if(A===null||A===47||A===62||jt(A)){const N=A===47,B=a.toLowerCase();return!N&&!i&&Z3.includes(B)?(s=1,r.interrupt?t(A):V(A)):PLe.includes(a.toLowerCase())?(s=6,N?(e.consume(A),p):r.interrupt?t(A):V(A)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(A):i?_(A):k(A))}return A===45||kr(A)?(e.consume(A),a+=String.fromCharCode(A),g):n(A)}function p(A){return A===62?(e.consume(A),r.interrupt?t:V):n(A)}function _(A){return lt(A)?(e.consume(A),_):R(A)}function k(A){return A===47?(e.consume(A),R):A===58||A===95||Rr(A)?(e.consume(A),v):lt(A)?(e.consume(A),k):R(A)}function v(A){return A===45||A===46||A===58||A===95||kr(A)?(e.consume(A),v):w(A)}function w(A){return A===61?(e.consume(A),S):lt(A)?(e.consume(A),w):k(A)}function S(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),c=A,T):lt(A)?(e.consume(A),S):I(A)}function T(A){return A===c?(e.consume(A),c=null,D):A===null||De(A)?n(A):(e.consume(A),T)}function I(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||jt(A)?w(A):(e.consume(A),I)}function D(A){return A===47||A===62||lt(A)?k(A):n(A)}function R(A){return A===62?(e.consume(A),z):n(A)}function z(A){return A===null||De(A)?V(A):lt(A)?(e.consume(A),z):n(A)}function V(A){return A===45&&s===2?(e.consume(A),ne):A===60&&s===1?(e.consume(A),me):A===62&&s===4?(e.consume(A),M):A===63&&s===3?(e.consume(A),C):A===93&&s===5?(e.consume(A),et):De(A)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(RLe,K,H)(A)):A===null||De(A)?(e.exit("htmlFlowData"),H(A)):(e.consume(A),V)}function H(A){return e.check(OLe,G,K)(A)}function G(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),Q}function Q(A){return A===null||De(A)?H(A):(e.enter("htmlFlowData"),V(A))}function ne(A){return A===45?(e.consume(A),C):V(A)}function me(A){return A===47?(e.consume(A),a="",ke):V(A)}function ke(A){if(A===62){const N=a.toLowerCase();return Z3.includes(N)?(e.consume(A),M):V(A)}return Rr(A)&&a.length<8?(e.consume(A),a+=String.fromCharCode(A),ke):V(A)}function et(A){return A===93?(e.consume(A),C):V(A)}function C(A){return A===62?(e.consume(A),M):A===45&&s===2?(e.consume(A),C):V(A)}function M(A){return A===null||De(A)?(e.exit("htmlFlowData"),K(A)):(e.consume(A),M)}function K(A){return e.exit("htmlFlow"),t(A)}}function $Le(e,t,n){const r=this;return s;function s(a){return De(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function MLe(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Ap,t,n)}}const jLe={name:"htmlText",tokenize:FLe};function FLe(e,t,n){const r=this;let s,i,a;return o;function o(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),c}function c(C){return C===33?(e.consume(C),u):C===47?(e.consume(C),w):C===63?(e.consume(C),k):Rr(C)?(e.consume(C),I):n(C)}function u(C){return C===45?(e.consume(C),l):C===91?(e.consume(C),i=0,m):Rr(C)?(e.consume(C),_):n(C)}function l(C){return C===45?(e.consume(C),h):n(C)}function d(C){return C===null?n(C):C===45?(e.consume(C),f):De(C)?(a=d,me(C)):(e.consume(C),d)}function f(C){return C===45?(e.consume(C),h):d(C)}function h(C){return C===62?ne(C):C===45?f(C):d(C)}function m(C){const M="CDATA[";return C===M.charCodeAt(i++)?(e.consume(C),i===M.length?y:m):n(C)}function y(C){return C===null?n(C):C===93?(e.consume(C),g):De(C)?(a=y,me(C)):(e.consume(C),y)}function g(C){return C===93?(e.consume(C),p):y(C)}function p(C){return C===62?ne(C):C===93?(e.consume(C),p):y(C)}function _(C){return C===null||C===62?ne(C):De(C)?(a=_,me(C)):(e.consume(C),_)}function k(C){return C===null?n(C):C===63?(e.consume(C),v):De(C)?(a=k,me(C)):(e.consume(C),k)}function v(C){return C===62?ne(C):k(C)}function w(C){return Rr(C)?(e.consume(C),S):n(C)}function S(C){return C===45||kr(C)?(e.consume(C),S):T(C)}function T(C){return De(C)?(a=T,me(C)):lt(C)?(e.consume(C),T):ne(C)}function I(C){return C===45||kr(C)?(e.consume(C),I):C===47||C===62||jt(C)?D(C):n(C)}function D(C){return C===47?(e.consume(C),ne):C===58||C===95||Rr(C)?(e.consume(C),R):De(C)?(a=D,me(C)):lt(C)?(e.consume(C),D):ne(C)}function R(C){return C===45||C===46||C===58||C===95||kr(C)?(e.consume(C),R):z(C)}function z(C){return C===61?(e.consume(C),V):De(C)?(a=z,me(C)):lt(C)?(e.consume(C),z):D(C)}function V(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,H):De(C)?(a=V,me(C)):lt(C)?(e.consume(C),V):(e.consume(C),G)}function H(C){return C===s?(e.consume(C),s=void 0,Q):C===null?n(C):De(C)?(a=H,me(C)):(e.consume(C),H)}function G(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||jt(C)?D(C):(e.consume(C),G)}function Q(C){return C===47||C===62||jt(C)?D(C):n(C)}function ne(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function me(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),ke}function ke(C){return lt(C)?bt(e,et,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):et(C)}function et(C){return e.enter("htmlTextData"),a(C)}}const DC={name:"labelEnd",resolveAll:VLe,resolveTo:HLe,tokenize:qLe},BLe={tokenize:GLe},zLe={tokenize:KLe},ULe={tokenize:WLe};function VLe(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&ys(e,0,e.length,n),e}function HLe(e,t){let n=e.length,r=0,s,i,a,o;for(;n--;)if(s=e[n][1],i){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(i=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(a=n);const c={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},l={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",c,t],["enter",u,t]],o=Os(o,e.slice(i+1,i+r+3)),o=Os(o,[["enter",l,t]]),o=Os(o,ak(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=Os(o,[["exit",l,t],e[a-2],e[a-1],["exit",u,t]]),o=Os(o,e.slice(a+1)),o=Os(o,[["exit",c,t]]),ys(e,i,e.length,o),e}function qLe(e,t,n){const r=this;let s=r.events.length,i,a;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){i=r.events[s][1];break}return o;function o(f){return i?i._inactive?d(f):(a=r.parser.defined.includes(mi(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),c):n(f)}function c(f){return f===40?e.attempt(BLe,l,a?l:d)(f):f===91?e.attempt(zLe,l,a?u:d)(f):a?l(f):d(f)}function u(f){return e.attempt(ULe,l,d)(f)}function l(f){return t(f)}function d(f){return i._balanced=!0,n(f)}}function GLe(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),s}function s(d){return jt(d)?Oh(e,i)(d):i(d)}function i(d){return d===41?l(d):vH(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return jt(d)?Oh(e,c)(d):l(d)}function o(d){return n(d)}function c(d){return d===34||d===39||d===40?TH(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):l(d)}function u(d){return jt(d)?Oh(e,l)(d):l(d)}function l(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function KLe(e,t,n){const r=this;return s;function s(o){return xH.call(r,e,i,a,"reference","referenceMarker","referenceString")(o)}function i(o){return r.parser.defined.includes(mi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function WLe(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),s}function s(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const JLe={name:"labelStartImage",resolveAll:DC.resolveAll,tokenize:YLe};function YLe(e,t,n){const r=this;return s;function s(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),i}function i(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const QLe={name:"labelStartLink",resolveAll:DC.resolveAll,tokenize:XLe};function XLe(e,t,n){const r=this;return s;function s(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const cw={name:"lineEnding",tokenize:ZLe};function ZLe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),bt(e,t,"linePrefix")}}const Y0={name:"thematicBreak",tokenize:e3e};function e3e(e,t,n){let r=0,s;return i;function i(u){return e.enter("thematicBreak"),a(u)}function a(u){return s=u,o(u)}function o(u){return u===s?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||De(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),lt(u)?bt(e,o,"whitespace")(u):o(u))}}const Hr={continuation:{tokenize:s3e},exit:a3e,name:"list",tokenize:r3e},t3e={partial:!0,tokenize:o3e},n3e={partial:!0,tokenize:i3e};function r3e(e,t,n){const r=this,s=r.events[r.events.length-1];let i=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return o;function o(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Kv(h)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Y0,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(h)}return n(h)}function c(h){return Kv(h)&&++a<10?(e.consume(h),c):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Ap,r.interrupt?n:l,e.attempt(t3e,f,d))}function l(h){return r.containerState.initialBlankLine=!0,i++,f(h)}function d(h){return lt(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function s3e(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ap,s,i);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,bt(e,t,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!lt(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(n3e,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,bt(e,e.attempt(Hr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function i3e(e,t,n){const r=this;return bt(e,s,"listItemIndent",r.containerState.size+1);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function a3e(e){e.exit(this.containerState.type)}function o3e(e,t,n){const r=this;return bt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(i){const a=r.events[r.events.length-1];return!lt(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const eD={name:"setextUnderline",resolveTo:c3e,tokenize:u3e};function c3e(e,t){let n=e.length,r,s,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",i?(e.splice(s,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function u3e(e,t,n){const r=this;let s;return i;function i(u){let l=r.events.length,d;for(;l--;)if(r.events[l][1].type!=="lineEnding"&&r.events[l][1].type!=="linePrefix"&&r.events[l][1].type!=="content"){d=r.events[l][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),s=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===s?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),lt(u)?bt(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||De(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const l3e={tokenize:y3e,partial:!0};function d3e(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:p3e,continuation:{tokenize:g3e},exit:b3e}},text:{91:{name:"gfmFootnoteCall",tokenize:m3e},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:f3e,resolveTo:h3e}}}}function f3e(e,t,n){const r=this;let s=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return o;function o(c){if(!a||!a._balanced)return n(c);const u=mi(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function h3e(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function m3e(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return o;function o(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(i>999||d===93&&!a||d===null||d===91||jt(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return s.includes(mi(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return jt(d)||(a=!0),i++,e.consume(d),d===92?l:u}function l(d){return d===91||d===92||d===93?(e.consume(d),i++,u):u(d)}}function p3e(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,o;return c;function c(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",l):n(m)}function l(m){if(a>999||m===93&&!o||m===null||m===91||jt(m))return n(m);if(m===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return i=mi(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return jt(m)||(o=!0),a++,e.consume(m),m===92?d:l}function d(m){return m===91||m===92||m===93?(e.consume(m),a++,l):l(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),s.includes(i)||s.push(i),bt(e,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return t(m)}}function g3e(e,t,n){return e.check(Ap,t,e.attempt(l3e,t,n))}function b3e(e){e.exit("gfmFootnoteDefinition")}function y3e(e,t,n){const r=this;return bt(e,s,"gfmFootnoteDefinitionIndent",5);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function _3e(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(a,o){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let u=c;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[c][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const l={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[c][1].end)},d={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[c][1].start)},f=[["enter",l,o],["enter",a[u][1],o],["exit",a[u][1],o],["enter",d,o]],h=o.parser.constructs.insideSpan.null;h&&ys(f,f.length,0,ak(h,a.slice(u+1,c),o)),ys(f,f.length,0,[["exit",d,o],["enter",a[c][1],o],["exit",a[c][1],o],["exit",l,o]]),ys(a,u-1,c-u+3,f),c=u+f.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function i(a,o,c){const u=this.previous,l=this.events;let d=0;return f;function f(m){return u===126&&l[l.length-1][1].type!=="characterEscape"?c(m):(a.enter("strikethroughSequenceTemporary"),h(m))}function h(m){const y=_d(u);if(m===126)return d>1?c(m):(a.consume(m),d++,h);if(d<2&&!n)return c(m);const g=a.exit("strikethroughSequenceTemporary"),p=_d(m);return g._open=!p||p===2&&!!y,g._close=!y||y===2&&!!p,o(m)}}}class k3e{constructor(){this.map=[]}add(t,n,r){E3e(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const i of s)t.push(i);s=r.pop()}this.map.length=0}}function E3e(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function w3e(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function S3e(){return{flow:{null:{name:"table",tokenize:v3e,resolveAll:x3e}}}}function v3e(e,t,n){const r=this;let s=0,i=0,a;return o;function o(R){let z=r.events.length-1;for(;z>-1;){const G=r.events[z][1].type;if(G==="lineEnding"||G==="linePrefix")z--;else break}const V=z>-1?r.events[z][1].type:null,H=V==="tableHead"||V==="tableRow"?S:c;return H===S&&r.parser.lazy[r.now().line]?n(R):H(R)}function c(R){return e.enter("tableHead"),e.enter("tableRow"),u(R)}function u(R){return R===124||(a=!0,i+=1),l(R)}function l(R){return R===null?n(R):De(R)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),h):n(R):lt(R)?bt(e,l,"whitespace")(R):(i+=1,a&&(a=!1,s+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),a=!0,l):(e.enter("data"),d(R)))}function d(R){return R===null||R===124||jt(R)?(e.exit("data"),l(R)):(e.consume(R),R===92?f:d)}function f(R){return R===92||R===124?(e.consume(R),d):d(R)}function h(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(R):(e.enter("tableDelimiterRow"),a=!1,lt(R)?bt(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):m(R))}function m(R){return R===45||R===58?g(R):R===124?(a=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),y):w(R)}function y(R){return lt(R)?bt(e,g,"whitespace")(R):g(R)}function g(R){return R===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),p):R===45?(i+=1,p(R)):R===null||De(R)?v(R):w(R)}function p(R){return R===45?(e.enter("tableDelimiterFiller"),_(R)):w(R)}function _(R){return R===45?(e.consume(R),_):R===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(R))}function k(R){return lt(R)?bt(e,v,"whitespace")(R):v(R)}function v(R){return R===124?m(R):R===null||De(R)?!a||s!==i?w(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):w(R)}function w(R){return n(R)}function S(R){return e.enter("tableRow"),T(R)}function T(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),T):R===null||De(R)?(e.exit("tableRow"),t(R)):lt(R)?bt(e,T,"whitespace")(R):(e.enter("data"),I(R))}function I(R){return R===null||R===124||jt(R)?(e.exit("data"),T(R)):(e.consume(R),R===92?D:I)}function D(R){return R===92||R===124?(e.consume(R),I):I(R)}}function x3e(e,t){let n=-1,r=!0,s=0,i=[0,0,0,0],a=[0,0,0,0],o=!1,c=0,u,l,d;const f=new k3e;for(;++n<e.length;){const h=e[n],m=h[1];h[0]==="enter"?m.type==="tableHead"?(o=!1,c!==0&&(tD(f,t,c,u,l),l=void 0,c=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,i=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,l={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",l,t]])),s=m.type==="tableDelimiterRow"?2:l?3:1):s&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],d=s0(f,t,i,s,void 0,d),i=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],d=s0(f,t,i,s,void 0,d)),i=a,a=[i[1],n,0,0])):m.type==="tableHead"?(o=!0,c=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(c=n,i[1]!==0?(a[0]=a[1],d=s0(f,t,i,s,n,d)):a[1]!==0&&(d=s0(f,t,a,s,n,d)),s=0):s&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&tD(f,t,c,u,l),f.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=w3e(t.events,n))}return e}function s0(e,t,n,r,s,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(i.end=Object.assign({},gl(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const c=gl(t.events,n[1]);if(i={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const u=gl(t.events,n[2]),l=gl(t.events,n[3]),d={type:o,start:Object.assign({},u),end:Object.assign({},l)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],h=t.events[n[3]];if(f[1].end=Object.assign({},h[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,y=n[3]-n[2]-1;e.add(m,y,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return s!==void 0&&(i.end=Object.assign({},gl(t.events,s)),e.add(s,0,[["exit",i,t]]),i=void 0),i}function tD(e,t,n,r,s){const i=[],a=gl(t.events,n);s&&(s.end=Object.assign({},a),i.push(["exit",s,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function gl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const T3e={name:"tasklistCheck",tokenize:A3e};function I3e(){return{text:{91:T3e}}}function A3e(e,t,n){const r=this;return s;function s(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return jt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(c)}function o(c){return De(c)?t(c):lt(c)?e.check({tokenize:C3e},t,n)(c):n(c)}}function C3e(e,t,n){return bt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function P3e(e){return dH([BOe(),d3e(),_3e(e),S3e(),I3e()])}const N3e={};function R3e(e){const t=this,n=e||N3e,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(P3e(n)),i.push(LOe()),a.push(DOe(n))}var O3e=Object.defineProperty,L3e=Object.defineProperties,D3e=Object.getOwnPropertyDescriptors,nD=Object.getOwnPropertySymbols,$3e=Object.prototype.hasOwnProperty,M3e=Object.prototype.propertyIsEnumerable,rD=(e,t,n)=>t in e?O3e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,IH=(e,t)=>{for(var n in t||(t={}))$3e.call(t,n)&&rD(e,n,t[n]);if(nD)for(var n of nD(t))M3e.call(t,n)&&rD(e,n,t[n]);return e},AH=(e,t)=>L3e(e,D3e(t)),es=(e,t)=>{let n=!1,r=!1;for(let s=0;s<t;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){r=!r,s+=2;continue}!r&&e[s]==="`"&&(n=!n)}return n||r},j3e=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",s=t>1&&e.substring(t-2,t+1)==="```";return n||r||s},F3e=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!j3e(e,n)&&(t+=1)}return t},qo=(e,t)=>{let n=!1,r=!1,s=-1;for(let i=0;i<e.length;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}if(!r&&e[i]==="`")if(n){if(s<t&&t<i)return!0;n=!1,s=-1}else n=!0,s=i}return!1},B3e=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,z3e=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(B3e,(t,n,r,s)=>es(e,s)?t:`${n}\\>${r}`),U3e=/(\*\*)([^*]*\*?)$/,V3e=/(__)([^_]*?)$/,H3e=/(\*\*\*)([^*]*?)$/,q3e=/(\*)([^*]*?)$/,G3e=/(_)([^_]*?)$/,K3e=/(`)([^`]*?)$/,W3e=/(~~)([^~]*?)$/,ju=/^[\s_~*`]*$/,CH=/^[\s]*[-*+][\s]+$/,J3e=/[\p{L}\p{N}_]/u,Y3e=/^```[^`\n]*```?$/,Q3e=/^\*{4,}$/,X3e=/(__)([^_]+)_$/,Z3e=/(~~)([^~]+)~$/,sD=/~~/g,Go=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:J3e.test(e)},eDe=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},PH=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},ok=(e,t)=>{let n=!1,r=!1;for(let s=0;s<e.length&&s<t;s+=1){if(e[s]==="\\"&&e[s+1]==="$"){s+=1;continue}e[s]==="$"&&(e[s+1]==="$"?(r=!r,s+=1,n=!1):r||(n=!n))}return n||r},tDe=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
279
|
+
`)return!1}return!1},NH=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?tDe(e,t):!1;if(e[n]===`
|
|
280
|
+
`)return!1}return!1},nDe=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
|
|
281
|
+
`)return!1}return!1},$C=(e,t,n)=>{let r=0;for(let c=t-1;c>=0;c-=1)if(e[c]===`
|
|
282
|
+
`){r=c+1;break}let s=e.length;for(let c=t;c<e.length;c+=1)if(e[c]===`
|
|
283
|
+
`){s=c;break}let i=e.substring(r,s),a=0,o=!1;for(let c of i)if(c===n)a+=1;else if(c!==" "&&c!==" "){o=!0;break}return a>=3&&!o},rDe=(e,t,n,r)=>n==="\\"||e.includes("$")&&ok(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&Go(n)&&Go(r)||(!n||n===" "||n===" "||n===`
|
|
284
|
+
`)&&(!r||r===" "||r===" "||r===`
|
|
285
|
+
`)),RH=e=>{let t=0,n=!1,r=e.length;for(let s=0;s<r;s+=1){if(e[s]==="`"&&s+2<r&&e[s+1]==="`"&&e[s+2]==="`"){n=!n,s+=2;continue}if(n||e[s]!=="*")continue;let i=s>0?e[s-1]:"",a=s<r-1?e[s+1]:"";rDe(e,s,i,a)||(t+=1)}return t},sDe=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&ok(e,t)||NH(e,t)||nDe(e,t)||n==="_"||r==="_"||n&&r&&Go(n)&&Go(r)),iDe=e=>{let t=0,n=!1,r=e.length;for(let s=0;s<r;s+=1){if(e[s]==="`"&&s+2<r&&e[s+1]==="`"&&e[s+2]==="`"){n=!n,s+=2;continue}if(n||e[s]!=="_")continue;let i=s>0?e[s-1]:"",a=s<r-1?e[s+1]:"";sDe(e,s,i,a)||(t+=1)}return t},aDe=e=>{let t=0,n=0,r=!1;for(let s=0;s<e.length;s+=1){if(e[s]==="`"&&s+2<e.length&&e[s+1]==="`"&&e[s+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,s+=2;continue}r||(e[s]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},MC=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},iD=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},oDe=(e,t,n)=>{if(!t||ju.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
286
|
+
`),s=r===-1?0:r+1,i=e.substring(s,n);return CH.test(i)&&t.includes(`
|
|
287
|
+
`)?!0:$C(e,n,"*")},cDe=e=>{let t=e.match(U3e);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return es(e,r)||qo(e,r)||oDe(e,n,r)?e:MC(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},uDe=(e,t,n)=>{if(!t||ju.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
288
|
+
`),s=r===-1?0:r+1,i=e.substring(s,n);return CH.test(i)&&t.includes(`
|
|
289
|
+
`)?!0:$C(e,n,"_")},lDe=e=>{let t=e.match(V3e);if(!t){let s=e.match(X3e);if(s){let i=e.lastIndexOf(s[1]);if(!(es(e,i)||qo(e,i))&&iD(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return es(e,r)||qo(e,r)||uDe(e,n,r)?e:iD(e)%2===1?`${e}__`:e},dDe=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!ok(e,n)){let r=n>0?e[n-1]:"",s=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
|
|
290
|
+
`)&&(!s||s===" "||s===" "||s===`
|
|
291
|
+
`)||r&&s&&Go(r)&&Go(s))continue;return n}}return-1},fDe=e=>{if(!e.match(q3e))return e;let t=dDe(e);if(t===-1||es(e,t)||qo(e,t))return e;let n=e.substring(t+1);return!n||ju.test(n)?e:RH(e)%2===1?`${e}*`:e},OH=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!ok(e,n)&&!NH(e,n)){let r=n>0?e[n-1]:"",s=n<e.length-1?e[n+1]:"";if(r&&s&&Go(r)&&Go(s))continue;return n}}return-1},hDe=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
292
|
+
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},mDe=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(MC(t)%2!==1)return null;let n=t.indexOf("**"),r=OH(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},pDe=e=>{if(!e.match(G3e))return e;let t=OH(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||ju.test(n)||es(e,t)||qo(e,t))return e;if(iDe(e)%2===1){let r=mDe(e);return r!==null?r:hDe(e)}return e},gDe=e=>{let t=MC(e),n=RH(e);return t%2===0&&n%2===0},bDe=(e,t,n)=>!t||ju.test(t)||es(e,n)||qo(e,n)?!0:$C(e,n,"*"),yDe=e=>{if(Q3e.test(e))return e;let t=e.match(H3e);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return bDe(e,n,r)?e:aDe(e)%2===1?gDe(e)?e:`${e}***`:e},_De=/<[a-zA-Z/][^>]*$/,kDe=e=>{let t=e.match(_De);return!t||t.index===void 0||es(e,t.index)?e:e.substring(0,t.index).trimEnd()},EDe=e=>!e.match(Y3e)||e.includes(`
|
|
293
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,wDe=e=>(e.match(/```/g)||[]).length%2===1,SDe=e=>{let t=EDe(e);if(t!==null)return t;let n=e.match(K3e);if(n&&!wDe(e)){let r=n[2];if(!r||ju.test(r))return e;if(F3e(e)%2===1)return`${e}\``}return e},vDe=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",xDe=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!vDe(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},TDe=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
294
|
+
`,t)!==-1&&!e.endsWith(`
|
|
295
|
+
`)?`${e}
|
|
296
|
+
$$`:`${e}$$`},IDe=e=>xDe(e)%2===0?e:TDe(e),ADe=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=eDe(e,t);if(r===-1||es(e,r))return null;let s=r>0&&e[r-1]==="!",i=s?r-1:r,a=e.substring(0,i);if(s)return a;let o=e.substring(r+1,t);return n==="text-only"?`${a}${o}`:`${a}[${o}](streamdown:incomplete-link)`},aD=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!es(e,n)){if(n>0&&e[n-1]==="!")continue;let r=PH(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let s=e.indexOf(")",r+2);s!==-1&&(n=s)}}return t},CDe=(e,t,n)=>{let r=t>0&&e[t-1]==="!",s=r?t-1:t;if(!e.substring(t+1).includes("]")){let i=e.substring(0,s);if(r)return i;if(n==="text-only"){let a=aD(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(PH(e,t)===-1){let i=e.substring(0,s);if(r)return i;if(n==="text-only"){let a=aD(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},LH=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!es(e,n)){let r=ADe(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!es(e,r)){let s=CDe(e,r,t);if(s!==null)return s}return e},PDe=/^-{1,2}$/,NDe=/^[\s]*-{1,2}[\s]+$/,RDe=/^={1,2}$/,ODe=/^[\s]*={1,2}[\s]+$/,LDe=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
297
|
+
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),s=n.trim();if(PDe.test(s)&&!n.match(NDe)){let i=r.split(`
|
|
298
|
+
`).at(-1);if(i&&i.trim().length>0)return`${e}`}if(RDe.test(s)&&!n.match(ODe)){let i=r.split(`
|
|
299
|
+
`).at(-1);if(i&&i.trim().length>0)return`${e}`}return e},DDe=e=>{var t,n;let r=e.match(W3e);if(r){let s=r[2];if(!s||ju.test(s))return e;let i=e.lastIndexOf(r[1]);if(es(e,i)||qo(e,i))return e;if(((t=e.match(sD))==null?void 0:t.length)%2===1)return`${e}~~`}else{let s=e.match(Z3e);if(s){let i=e.lastIndexOf(s[0].slice(0,2));if(es(e,i)||qo(e,i))return e;if(((n=e.match(sD))==null?void 0:n.length)%2===1)return`${e}~`}}return e},uw=e=>e!==!1,cs={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},$De=[{handler:{name:"comparisonOperators",handle:z3e,priority:cs.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:kDe,priority:cs.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:LDe,priority:cs.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:LH,priority:cs.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:yDe,priority:cs.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:cDe,priority:cs.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:lDe,priority:cs.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:fDe,priority:cs.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:pDe,priority:cs.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:SDe,priority:cs.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:DDe,priority:cs.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:IDe,priority:cs.KATEX},optionKey:"katex"}],MDe=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return $De.filter(({handler:r,optionKey:s})=>r.name==="links"?uw(e?.links)||uw(e?.images):uw(e?.[s])).map(({handler:r,earlyReturn:s})=>r.name==="links"?{handler:AH(IH({},r),{handle:i=>LH(i,n)}),earlyReturn:n==="protocol"?s:void 0}:{handler:r,earlyReturn:s})},jDe=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,s=MDe(t),i=((n=t?.handlers)!=null?n:[]).map(o=>{var c;return{handler:AH(IH({},o),{priority:(c=o.priority)!=null?c:cs.DEFAULT}),earlyReturn:void 0}}),a=[...s,...i].sort((o,c)=>{var u,l;return((u=o.handler.priority)!=null?u:0)-((l=c.handler.priority)!=null?l:0)});for(let{handler:o,earlyReturn:c}of a)if(r=o.handle(r),c!=null&&c(r))return r;return r},FDe=jDe;const BDe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zDe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,UDe={};function oD(e,t){return(UDe.jsx?zDe:BDe).test(e)}var il={},lw,cD;function VDe(){if(cD)return lw;cD=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,c=`
|
|
300
|
+
`,u="/",l="*",d="",f="comment",h="declaration";function m(g,p){if(typeof g!="string")throw new TypeError("First argument must be a string");if(!g)return[];p=p||{};var _=1,k=1;function v(G){var Q=G.match(t);Q&&(_+=Q.length);var ne=G.lastIndexOf(c);k=~ne?G.length-ne:k+G.length}function w(){var G={line:_,column:k};return function(Q){return Q.position=new S(G),D(),Q}}function S(G){this.start=G,this.end={line:_,column:k},this.source=p.source}S.prototype.content=g;function T(G){var Q=new Error(p.source+":"+_+":"+k+": "+G);if(Q.reason=G,Q.filename=p.source,Q.line=_,Q.column=k,Q.source=g,!p.silent)throw Q}function I(G){var Q=G.exec(g);if(Q){var ne=Q[0];return v(ne),g=g.slice(ne.length),Q}}function D(){I(n)}function R(G){var Q;for(G=G||[];Q=z();)Q!==!1&&G.push(Q);return G}function z(){var G=w();if(!(u!=g.charAt(0)||l!=g.charAt(1))){for(var Q=2;d!=g.charAt(Q)&&(l!=g.charAt(Q)||u!=g.charAt(Q+1));)++Q;if(Q+=2,d===g.charAt(Q-1))return T("End of comment missing");var ne=g.slice(2,Q-2);return k+=2,v(ne),g=g.slice(Q),k+=2,G({type:f,comment:ne})}}function V(){var G=w(),Q=I(r);if(Q){if(z(),!I(s))return T("property missing ':'");var ne=I(i),me=G({type:h,property:y(Q[0].replace(e,d)),value:ne?y(ne[0].replace(e,d)):d});return I(a),me}}function H(){var G=[];R(G);for(var Q;Q=V();)Q!==!1&&(G.push(Q),R(G));return G}return D(),H()}function y(g){return g?g.replace(o,d):d}return lw=m,lw}var uD;function HDe(){if(uD)return il;uD=1;var e=il&&il.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(il,"__esModule",{value:!0}),il.default=n;const t=e(VDe());function n(r,s){let i=null;if(!r||typeof r!="string")return i;const a=(0,t.default)(r),o=typeof s=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:l}=c;o?s(u,l,c):l&&(i=i||{},i[u]=l)}),i}return il}var Of={},lD;function qDe(){if(lD)return Of;lD=1,Object.defineProperty(Of,"__esModule",{value:!0}),Of.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,i=function(u){return!u||n.test(u)||e.test(u)},a=function(u,l){return l.toUpperCase()},o=function(u,l){return"".concat(l,"-")},c=function(u,l){return l===void 0&&(l={}),i(u)?u:(u=u.toLowerCase(),l.reactCompat?u=u.replace(s,o):u=u.replace(r,o),u.replace(t,a))};return Of.camelCase=c,Of}var Lf,dD;function GDe(){if(dD)return Lf;dD=1;var e=Lf&&Lf.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(HDe()),n=qDe();function r(s,i){var a={};return!s||typeof s!="string"||(0,t.default)(s,function(o,c){o&&c&&(a[(0,n.camelCase)(o,i)]=c)}),a}return r.default=r,Lf=r,Lf}var KDe=GDe();const WDe=Yy(KDe);function Lh(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fD(e.position):"start"in e||"end"in e?fD(e):"line"in e||"column"in e?Yv(e):""}function Yv(e){return hD(e&&e.line)+":"+hD(e&&e.column)}function fD(e){return Yv(e&&e.start)+"-"+Yv(e&&e.end)}function hD(e){return e&&typeof e=="number"?e:1}class vr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?s=t:!i.cause&&t&&(a=!0,s=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=o?o.line:void 0,this.name=Lh(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}vr.prototype.file="";vr.prototype.name="";vr.prototype.reason="";vr.prototype.message="";vr.prototype.stack="";vr.prototype.column=void 0;vr.prototype.line=void 0;vr.prototype.ancestors=void 0;vr.prototype.cause=void 0;vr.prototype.fatal=void 0;vr.prototype.place=void 0;vr.prototype.ruleId=void 0;vr.prototype.source=void 0;const jC={}.hasOwnProperty,JDe=new Map,YDe=/[A-Z]/g,QDe=new Set(["table","tbody","thead","tfoot","tr"]),XDe=new Set(["td","th"]),DH="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function ZDe(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=o$e(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=a$e(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?aa:Yd,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=$H(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function $H(e,t,n){if(t.type==="element")return e$e(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return t$e(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return r$e(e,t,n);if(t.type==="mdxjsEsm")return n$e(e,t);if(t.type==="root")return s$e(e,t,n);if(t.type==="text")return i$e(e,t)}function e$e(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=aa,e.schema=s),e.ancestors.push(t);const i=jH(e,t.tagName,!1),a=c$e(e,t);let o=BC(e,t);return QDe.has(t.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!K1(c):!0})),MH(e,a,i,t),FC(a,o),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function t$e(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Tm(e,t.position)}function n$e(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Tm(e,t.position)}function r$e(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=aa,e.schema=s),e.ancestors.push(t);const i=t.name===null?e.Fragment:jH(e,t.name,!0),a=u$e(e,t),o=BC(e,t);return MH(e,a,i,t),FC(a,o),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function s$e(e,t,n){const r={};return FC(r,BC(e,t)),e.create(t,e.Fragment,r,n)}function i$e(e,t){return t.value}function MH(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function FC(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function a$e(e,t,n){return r;function r(s,i,a,o){const u=Array.isArray(a.children)?n:t;return o?u(i,a,o):u(i,a)}}function o$e(e,t){return n;function n(r,s,i,a){const o=Array.isArray(i.children),c=oa(r);return t(s,i,a,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function c$e(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&jC.call(t.properties,s)){const i=l$e(e,s,t.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&XDe.has(t.tagName)?r=o:n[a]=o}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function u$e(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Tm(e,t.position);else{const s=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,i=e.evaluater.evaluateExpression(o.expression)}else Tm(e,t.position);else i=r.value===null?!0:r.value;n[s]=i}return n}function BC(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:JDe;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const u=s.get(c)||0;a=c+"-"+u,s.set(c,u+1)}}const o=$H(e,i,a);o!==void 0&&n.push(o)}return n}function l$e(e,t,n){const r=Sp(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?cC(n):uC(n)),r.property==="style"){let s=typeof n=="object"?n:d$e(e,String(n));return e.stylePropertyNameCase==="css"&&(s=f$e(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?Kxe[r.property]||r.property:r.attribute,n]}}function d$e(e,t){try{return WDe(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new vr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=DH+"#cannot-parse-style-attribute",s}}function jH(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let i=-1,a;for(;++i<s.length;){const o=oD(s[i])?{type:"Identifier",name:s[i]}:{type:"Literal",value:s[i]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(i&&o.type==="Literal"),optional:!1}:o}r=a}else r=oD(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return jC.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Tm(e)}function Tm(e,t){const n=new vr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=DH+"#cannot-handle-mdx-estrees-without-createevaluater",n}function f$e(e){const t={};let n;for(n in e)jC.call(e,n)&&(t[h$e(n)]=e[n]);return t}function h$e(e){let t=e.replace(YDe,m$e);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function m$e(e){return"-"+e.toLowerCase()}const dw={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},p$e={tokenize:g$e};function g$e(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),bt(e,t,"linePrefix")}function s(o){return e.enter("paragraph"),i(o)}function i(o){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return De(o)?(e.consume(o),e.exit("chunkText"),i):(e.consume(o),a)}}const b$e={tokenize:y$e},mD={tokenize:_$e};function y$e(e){const t=this,n=[];let r=0,s,i,a;return o;function o(k){if(r<n.length){const v=n[r];return t.containerState=v[1],e.attempt(v[0].continuation,c,u)(k)}return u(k)}function c(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&_();const v=t.events.length;let w=v,S;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){S=t.events[w][1].end;break}p(r);let T=v;for(;T<t.events.length;)t.events[T][1].end={...S},T++;return ys(t.events,w+1,0,t.events.slice(v)),t.events.length=T,u(k)}return o(k)}function u(k){if(r===n.length){if(!s)return f(k);if(s.currentConstruct&&s.currentConstruct.concrete)return m(k);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(mD,l,d)(k)}function l(k){return s&&_(),p(r),f(k)}function d(k){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(k)}function f(k){return t.containerState={},e.attempt(mD,h,m)(k)}function h(k){return r++,n.push([t.currentConstruct,t.containerState]),f(k)}function m(k){if(k===null){s&&_(),p(0),e.consume(k);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:i}),y(k)}function y(k){if(k===null){g(e.exit("chunkFlow"),!0),p(0),e.consume(k);return}return De(k)?(e.consume(k),g(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(k),y)}function g(k,v){const w=t.sliceStream(k);if(v&&w.push(null),k.previous=i,i&&(i.next=k),i=k,s.defineSkip(k.start),s.write(w),t.parser.lazy[k.start.line]){let S=s.events.length;for(;S--;)if(s.events[S][1].start.offset<a&&(!s.events[S][1].end||s.events[S][1].end.offset>a))return;const T=t.events.length;let I=T,D,R;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(D){R=t.events[I][1].end;break}D=!0}for(p(r),S=T;S<t.events.length;)t.events[S][1].end={...R},S++;ys(t.events,I+1,0,t.events.slice(T)),t.events.length=S}}function p(k){let v=n.length;for(;v-- >k;){const w=n[v];t.containerState=w[1],w[0].exit.call(t,e)}n.length=k}function _(){s.write([null]),i=void 0,s=void 0,t.containerState._closeFlow=void 0}}function _$e(e,t,n){return bt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const k$e={tokenize:E$e};function E$e(e){const t=this,n=e.attempt(Ap,r,e.attempt(this.parser.constructs.flowInitial,s,bt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(gLe,s)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const w$e={resolveAll:BH()},S$e=FH("string"),v$e=FH("text");function FH(e){return{resolveAll:BH(e==="text"?x$e:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],i=n.attempt(s,a,o);return a;function a(l){return u(l)?i(l):o(l)}function o(l){if(l===null){n.consume(l);return}return n.enter("data"),n.consume(l),c}function c(l){return u(l)?(n.exit("data"),i(l)):(n.consume(l),c)}function u(l){if(l===null)return!0;const d=s[l];let f=-1;if(d)for(;++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function BH(e){return t;function t(n,r){let s=-1,i;for(;++s<=n.length;)i===void 0?n[s]&&n[s][1].type==="data"&&(i=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==i+2&&(n[i][1].end=n[s-1][1].end,n.splice(i+2,s-i-2),s=i+2),i=void 0);return e?e(n,r):n}}function x$e(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let i=s.length,a=-1,o=0,c;for(;i--;){const u=s[i];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)c=!0,o++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const u={type:n===e.length||c||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const T$e={42:Hr,43:Hr,45:Hr,48:Hr,49:Hr,50:Hr,51:Hr,52:Hr,53:Hr,54:Hr,55:Hr,56:Hr,57:Hr,62:kH},I$e={91:ELe},A$e={[-2]:ow,[-1]:ow,32:ow},C$e={35:ILe,42:Y0,45:[eD,Y0],60:NLe,61:eD,95:Y0,96:X3,126:X3},P$e={38:wH,92:EH},N$e={[-5]:cw,[-4]:cw,[-3]:cw,33:JLe,38:wH,42:Jv,60:[QOe,jLe],91:QLe,92:[xLe,EH],93:DC,95:Jv,96:lLe},R$e={null:[Jv,w$e]},O$e={null:[42,95]},L$e={null:[]},D$e=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:O$e,contentInitial:I$e,disable:L$e,document:T$e,flow:C$e,flowInitial:A$e,insideSpan:R$e,string:P$e,text:N$e},Symbol.toStringTag,{value:"Module"}));function $$e(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},i=[];let a=[],o=[];const c={attempt:T(w),check:T(S),consume:_,enter:k,exit:v,interrupt:T(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:h,write:d};let l=t.tokenize.call(u,c);return t.resolveAll&&i.push(t),u;function d(z){return a=Os(a,z),g(),a[a.length-1]!==null?[]:(I(t,0),u.events=ak(i,u.events,u),u.events)}function f(z,V){return j$e(h(z),V)}function h(z){return M$e(a,z)}function m(){const{_bufferIndex:z,_index:V,line:H,column:G,offset:Q}=r;return{_bufferIndex:z,_index:V,line:H,column:G,offset:Q}}function y(z){s[z.line]=z.column,R()}function g(){let z;for(;r._index<a.length;){const V=a[r._index];if(typeof V=="string")for(z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===z&&r._bufferIndex<V.length;)p(V.charCodeAt(r._bufferIndex));else p(V)}}function p(z){l=l(z)}function _(z){De(z)?(r.line++,r.column=1,r.offset+=z===-3?2:1,R()):z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=z}function k(z,V){const H=V||{};return H.type=z,H.start=m(),u.events.push(["enter",H,u]),o.push(H),H}function v(z){const V=o.pop();return V.end=m(),u.events.push(["exit",V,u]),V}function w(z,V){I(z,V.from)}function S(z,V){V.restore()}function T(z,V){return H;function H(G,Q,ne){let me,ke,et,C;return Array.isArray(G)?K(G):"tokenize"in G?K([G]):M(G);function M(J){return be;function be(ge){const Ee=ge!==null&&J[ge],Re=ge!==null&&J.null,q=[...Array.isArray(Ee)?Ee:Ee?[Ee]:[],...Array.isArray(Re)?Re:Re?[Re]:[]];return K(q)(ge)}}function K(J){return me=J,ke=0,J.length===0?ne:A(J[ke])}function A(J){return be;function be(ge){return C=D(),et=J,J.partial||(u.currentConstruct=J),J.name&&u.parser.constructs.disable.null.includes(J.name)?B():J.tokenize.call(V?Object.assign(Object.create(u),V):u,c,N,B)(ge)}}function N(J){return z(et,C),Q}function B(J){return C.restore(),++ke<me.length?A(me[ke]):ne}}}function I(z,V){z.resolveAll&&!i.includes(z)&&i.push(z),z.resolve&&ys(u.events,V,u.events.length-V,z.resolve(u.events.slice(V),u)),z.resolveTo&&(u.events=z.resolveTo(u.events,u))}function D(){const z=m(),V=u.previous,H=u.currentConstruct,G=u.events.length,Q=Array.from(o);return{from:G,restore:ne};function ne(){r=z,u.previous=V,u.currentConstruct=H,u.events.length=G,o=Q,R()}}function R(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function M$e(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,i=t.end._bufferIndex;let a;if(n===s)a=[e[n].slice(r,i)];else{if(a=e.slice(n,s),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}i>0&&a.push(e[s].slice(0,i))}return a}function j$e(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
|
|
301
|
+
`;break}case-3:{a=`\r
|
|
302
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&s)continue;a=" ";break}default:a=String.fromCharCode(i)}s=i===-2,r.push(a)}return r.join("")}function F$e(e){const r={constructs:dH([D$e,...(e||{}).extensions||[]]),content:s(p$e),defined:[],document:s(b$e),flow:s(k$e),lazy:{},string:s(S$e),text:s(v$e)};return r;function s(i){return a;function a(o){return $$e(r,i,o)}}}function B$e(e){for(;!SH(e););return e}const pD=/[\0\t\n\r]/g;function z$e(){let e=1,t="",n=!0,r;return s;function s(i,a,o){const c=[];let u,l,d,f,h;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),d=0,t="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(pD.lastIndex=d,u=pD.exec(i),f=u&&u.index!==void 0?u.index:i.length,h=i.charCodeAt(f),!u){t=i.slice(d);break}if(h===10&&d===f&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),d<f&&(c.push(i.slice(d,f)),e+=f-d),h){case 0:{c.push(65533),e++;break}case 9:{for(l=Math.ceil(e/4)*4,c.push(-2);e++<l;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return o&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const zH={}.hasOwnProperty;function U$e(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),V$e(n)(B$e(F$e(n).document().write(z$e()(e,t,!0))))}function V$e(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(mt),autolinkProtocol:D,autolinkEmail:D,atxHeading:i(we),blockQuote:i(Re),characterEscape:D,characterReference:D,codeFenced:i(q),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(q,a),codeText:i(W,a),codeTextData:D,data:D,codeFlowValue:D,definition:i(se),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(le),hardBreakEscape:i(Fe),hardBreakTrailing:i(Fe),htmlFlow:i(Ie,a),htmlFlowData:D,htmlText:i(Ie,a),htmlTextData:D,image:i(Me),label:a,link:i(mt),listItem:i(At),listItemValue:f,listOrdered:i(it,d),listUnordered:i(it),paragraph:i(zr),reference:A,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(we),strong:i(pn),thematicBreak:i(rs)},exit:{atxHeading:c(),atxHeadingSequence:w,autolink:c(),autolinkEmail:Ee,autolinkProtocol:ge,blockQuote:c(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:B,characterReferenceMarkerNumeric:B,characterReferenceValue:J,characterReference:be,codeFenced:c(g),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:m,codeFlowValue:R,codeIndented:c(p),codeText:c(Q),codeTextData:R,data:R,definition:c(),definitionDestinationString:v,definitionLabelString:_,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(V),hardBreakTrailing:c(V),htmlFlow:c(H),htmlFlowData:R,htmlText:c(G),htmlTextData:R,image:c(me),label:et,labelText:ke,lineEnding:z,link:c(ne),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:N,resourceDestinationString:C,resourceTitleString:M,resource:K,setextHeading:c(I),setextHeadingLineSequence:T,setextHeadingText:S,strong:c(),thematicBreak:c()}};UH(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(X){let ae={type:"root",children:[]};const Ae={stack:[ae],tokenStack:[],config:t,enter:o,exit:u,buffer:a,resume:l,data:n},xe=[];let vt=-1;for(;++vt<X.length;)if(X[vt][1].type==="listOrdered"||X[vt][1].type==="listUnordered")if(X[vt][0]==="enter")xe.push(vt);else{const Pe=xe.pop();vt=s(X,Pe,vt)}for(vt=-1;++vt<X.length;){const Pe=t[X[vt][0]];zH.call(Pe,X[vt][1].type)&&Pe[X[vt][1].type].call(Object.assign({sliceSerialize:X[vt][2].sliceSerialize},Ae),X[vt][1])}if(Ae.tokenStack.length>0){const Pe=Ae.tokenStack[Ae.tokenStack.length-1];(Pe[1]||gD).call(Ae,void 0,Pe[0])}for(ae.position={start:Xa(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:Xa(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},vt=-1;++vt<t.transforms.length;)ae=t.transforms[vt](ae)||ae;return ae}function s(X,ae,Ae){let xe=ae-1,vt=-1,Pe=!1,Ci,Ur,zu,sf;for(;++xe<=Ae;){const ss=X[xe];switch(ss[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ss[0]==="enter"?vt++:vt--,sf=void 0;break}case"lineEndingBlank":{ss[0]==="enter"&&(Ci&&!sf&&!vt&&!zu&&(zu=xe),sf=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:sf=void 0}if(!vt&&ss[0]==="enter"&&ss[1].type==="listItemPrefix"||vt===-1&&ss[0]==="exit"&&(ss[1].type==="listUnordered"||ss[1].type==="listOrdered")){if(Ci){let Uu=xe;for(Ur=void 0;Uu--;){const ua=X[Uu];if(ua[1].type==="lineEnding"||ua[1].type==="lineEndingBlank"){if(ua[0]==="exit")continue;Ur&&(X[Ur][1].type="lineEndingBlank",Pe=!0),ua[1].type="lineEnding",Ur=Uu}else if(!(ua[1].type==="linePrefix"||ua[1].type==="blockQuotePrefix"||ua[1].type==="blockQuotePrefixWhitespace"||ua[1].type==="blockQuoteMarker"||ua[1].type==="listItemIndent"))break}zu&&(!Ur||zu<Ur)&&(Ci._spread=!0),Ci.end=Object.assign({},Ur?X[Ur][1].start:ss[1].end),X.splice(Ur||xe,0,["exit",Ci,ss[2]]),xe++,Ae++}if(ss[1].type==="listItemPrefix"){const Uu={type:"listItem",_spread:!1,start:Object.assign({},ss[1].start),end:void 0};Ci=Uu,X.splice(xe,0,["enter",Uu,ss[2]]),xe++,Ae++,zu=void 0,sf=!0}}}return X[ae][1]._spread=Pe,Ae}function i(X,ae){return Ae;function Ae(xe){o.call(this,X(xe),xe),ae&&ae.call(this,xe)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(X,ae,Ae){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([ae,Ae||void 0]),X.position={start:Xa(ae.start),end:void 0}}function c(X){return ae;function ae(Ae){X&&X.call(this,Ae),u.call(this,Ae)}}function u(X,ae){const Ae=this.stack.pop(),xe=this.tokenStack.pop();if(xe)xe[0].type!==X.type&&(ae?ae.call(this,X,xe[0]):(xe[1]||gD).call(this,X,xe[0]));else throw new Error("Cannot close `"+X.type+"` ("+Lh({start:X.start,end:X.end})+"): it’s not open");Ae.position.end=Xa(X.end)}function l(){return NC(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(X){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function h(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=X}function m(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=X}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function p(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X.replace(/(\r?\n|\r)$/g,"")}function _(X){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=ae,Ae.identifier=mi(this.sliceSerialize(X)).toLowerCase()}function k(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.title=X}function v(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.url=X}function w(X){const ae=this.stack[this.stack.length-1];if(!ae.depth){const Ae=this.sliceSerialize(X).length;ae.depth=Ae}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function T(X){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function D(X){const Ae=this.stack[this.stack.length-1].children;let xe=Ae[Ae.length-1];(!xe||xe.type!=="text")&&(xe=Gs(),xe.position={start:Xa(X.start),end:void 0},Ae.push(xe)),this.stack.push(xe)}function R(X){const ae=this.stack.pop();ae.value+=this.sliceSerialize(X),ae.position.end=Xa(X.end)}function z(X){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ae=ae.children[ae.children.length-1];Ae.position.end=Xa(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&(D.call(this,X),R.call(this,X))}function V(){this.data.atHardBreak=!0}function H(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X}function G(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X}function Q(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X}function ne(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=ae,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function me(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=ae,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function ke(X){const ae=this.sliceSerialize(X),Ae=this.stack[this.stack.length-2];Ae.label=EOe(ae),Ae.identifier=mi(ae).toLowerCase()}function et(){const X=this.stack[this.stack.length-1],ae=this.resume(),Ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ae.type==="link"){const xe=X.children;Ae.children=xe}else Ae.alt=ae}function C(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.url=X}function M(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.title=X}function K(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function N(X){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=ae,Ae.identifier=mi(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function B(X){this.data.characterReferenceType=X.type}function J(X){const ae=this.sliceSerialize(X),Ae=this.data.characterReferenceType;let xe;Ae?(xe=lH(ae,Ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):xe=OC(ae);const vt=this.stack[this.stack.length-1];vt.value+=xe}function be(X){const ae=this.stack.pop();ae.position.end=Xa(X.end)}function ge(X){R.call(this,X);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(X)}function Ee(X){R.call(this,X);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(X)}function Re(){return{type:"blockquote",children:[]}}function q(){return{type:"code",lang:null,meta:null,value:""}}function W(){return{type:"inlineCode",value:""}}function se(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function le(){return{type:"emphasis",children:[]}}function we(){return{type:"heading",depth:0,children:[]}}function Fe(){return{type:"break"}}function Ie(){return{type:"html",value:""}}function Me(){return{type:"image",title:null,url:"",alt:null}}function mt(){return{type:"link",title:null,url:"",children:[]}}function it(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function At(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function zr(){return{type:"paragraph",children:[]}}function pn(){return{type:"strong",children:[]}}function Gs(){return{type:"text",value:""}}function rs(){return{type:"thematicBreak"}}}function Xa(e){return{line:e.line,column:e.column,offset:e.offset}}function UH(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?UH(e,r):H$e(e,r)}}function H$e(e,t){let n;for(n in t)if(zH.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function gD(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Lh({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Lh({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Lh({start:t.start,end:t.end})+") is still open")}function q$e(e){const t=this;t.parser=n;function n(r){return U$e(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function G$e(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function K$e(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
303
|
+
`}]}function W$e(e,t){const n=t.value?t.value+`
|
|
304
|
+
`:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function J$e(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Y$e(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Q$e(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=nf(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,o+=1,e.footnoteCounts.set(r,o);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function X$e(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Z$e(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function VH(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),i=s[0];i&&i.type==="text"?i.value="["+i.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=r:s.push({type:"text",value:r}),s}function eMe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return VH(e,t);const s={src:nf(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,i),e.applyData(t,i)}function tMe(e,t){const n={src:nf(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function nMe(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function rMe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return VH(e,t);const s={href:nf(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function sMe(e,t){const n={href:nf(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function iMe(e,t,n){const r=e.all(t),s=n?aMe(n):HH(t),i={},a=[];if(typeof t.checked=="boolean"){const l=r[0];let d;l&&l.type==="element"&&l.tagName==="p"?d=l:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const l=r[o];(s||o!==0||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
305
|
+
`}),l.type==="element"&&l.tagName==="p"&&!s?a.push(...l.children):a.push(l)}const c=r[r.length-1];c&&(s||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
|
|
306
|
+
`});const u={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,u),e.applyData(t,u)}function aMe(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=HH(n[r])}return t}function HH(e){const t=e.spread;return t??e.children.length>1}function oMe(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const a=r[s];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function cMe(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uMe(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function lMe(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dMe(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),s.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=oa(t.children[1]),c=sk(t.children[t.children.length-1]);o&&c&&(a.position={start:o,end:c}),s.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,i),e.applyData(t,i)}function fMe(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let c=-1;const u=[];for(;++c<o;){const d=t.children[c],f={},h=a?a[c]:void 0;h&&(f.align=h);let m={type:"element",tagName:i,properties:f,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),u.push(m)}const l={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,l),e.applyData(t,l)}function hMe(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const bD=9,yD=32;function mMe(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const i=[];for(;r;)i.push(_D(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return i.push(_D(t.slice(s),s>0,!1)),i.join("")}function _D(e,t,n){let r=0,s=e.length;if(t){let i=e.codePointAt(r);for(;i===bD||i===yD;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(s-1);for(;i===bD||i===yD;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function pMe(e,t){const n={type:"text",value:mMe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function gMe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const bMe={blockquote:G$e,break:K$e,code:W$e,delete:J$e,emphasis:Y$e,footnoteReference:Q$e,heading:X$e,html:Z$e,imageReference:eMe,image:tMe,inlineCode:nMe,linkReference:rMe,link:sMe,listItem:iMe,list:oMe,paragraph:cMe,root:uMe,strong:lMe,table:dMe,tableCell:hMe,tableRow:fMe,text:pMe,thematicBreak:gMe,toml:i0,yaml:i0,definition:i0,footnoteDefinition:i0};function i0(){}function yMe(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function _Me(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function kMe(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||yMe,r=e.options.footnoteBackLabel||_Me,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const l=e.all(u),d=String(u.identifier).toUpperCase(),f=nf(d.toLowerCase());let h=0;const m=[],y=e.footnoteCounts.get(d);for(;y!==void 0&&++h<=y;){m.length>0&&m.push({type:"text",value:" "});let _=typeof n=="string"?n:n(c,h);typeof _=="string"&&(_={type:"text",value:_}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,h),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const g=l[l.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const _=g.children[g.children.length-1];_&&_.type==="text"?_.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...m)}else l.push(...m);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(l,!0)};e.patch(u,p),o.push(p)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{..._u(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
307
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
308
|
+
`}]}}const Qv={}.hasOwnProperty,EMe={};function wMe(e,t){const n=t||EMe,r=new Map,s=new Map,i=new Map,a={...bMe,...n.handlers},o={all:u,applyData:vMe,definitionById:r,footnoteById:s,footnoteCounts:i,footnoteOrder:[],handlers:a,one:c,options:n,patch:SMe,wrap:TMe};return Zi(e,function(l){if(l.type==="definition"||l.type==="footnoteDefinition"){const d=l.type==="definition"?r:s,f=String(l.identifier).toUpperCase();d.has(f)||d.set(f,l)}}),o;function c(l,d){const f=l.type,h=o.handlers[f];if(Qv.call(o.handlers,f)&&h)return h(o,l,d);if(o.options.passThrough&&o.options.passThrough.includes(f)){if("children"in l){const{children:y,...g}=l,p=_u(g);return p.children=o.all(l),p}return _u(l)}return(o.options.unknownHandler||xMe)(o,l,d)}function u(l){const d=[];if("children"in l){const f=l.children;let h=-1;for(;++h<f.length;){const m=o.one(f[h],l);if(m){if(h&&f[h-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=kD(m.value)),!Array.isArray(m)&&m.type==="element")){const y=m.children[0];y&&y.type==="text"&&(y.value=kD(y.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function SMe(e,t){e.position&&(t.position=FV(e))}function vMe(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&i&&Object.assign(n.properties,_u(i)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function xMe(e,t){const n=t.data||{},r="value"in t&&!(Qv.call(n,"hProperties")||Qv.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function TMe(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
309
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
310
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
311
|
+
`}),n}function kD(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ED(e,t){const n=wMe(e,t),r=n.one(e,void 0),s=kMe(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:`
|
|
312
|
+
`},s),i}function IMe(e,t){return e&&"run"in e?async function(n,r){const s=ED(n,{file:r,...t});await e.run(s,r)}:function(n,r){return ED(n,{file:r,...e||t})}}function wD(e){if(e)throw e}var fw,SD;function AMe(){if(SD)return fw;SD=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},i=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var l=e.call(u,"constructor"),d=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!l&&!d)return!1;var f;for(f in u);return typeof f>"u"||e.call(u,f)},a=function(u,l){n&&l.name==="__proto__"?n(u,l.name,{enumerable:!0,configurable:!0,value:l.newValue,writable:!0}):u[l.name]=l.newValue},o=function(u,l){if(l==="__proto__")if(e.call(u,l)){if(r)return r(u,l).value}else return;return u[l]};return fw=function c(){var u,l,d,f,h,m,y=arguments[0],g=1,p=arguments.length,_=!1;for(typeof y=="boolean"&&(_=y,y=arguments[1]||{},g=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});g<p;++g)if(u=arguments[g],u!=null)for(l in u)d=o(y,l),f=o(u,l),y!==f&&(_&&f&&(i(f)||(h=s(f)))?(h?(h=!1,m=d&&s(d)?d:[]):m=d&&i(d)?d:{},a(y,{name:l,newValue:c(_,m,f)})):typeof f<"u"&&a(y,{name:l,newValue:f}));return y},fw}var CMe=AMe();const hw=Yy(CMe);function Xv(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function PMe(){const e=[],t={run:n,use:r};return t;function n(...s){let i=-1;const a=s.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...s);function o(c,...u){const l=e[++i];let d=-1;if(c){a(c);return}for(;++d<s.length;)(u[d]===null||u[d]===void 0)&&(u[d]=s[d]);s=u,l?NMe(l,o)(...u):a(null,...u)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function NMe(e,t){let n;return r;function r(...a){const o=e.length>a.length;let c;o&&a.push(s);try{c=e.apply(this,a)}catch(u){const l=u;if(o&&n)throw l;return s(l)}o||(c&&c.then&&typeof c.then=="function"?c.then(i,s):c instanceof Error?s(c):i(c))}function s(a,...o){n||(n=!0,t(a,...o))}function i(a){s(null,a)}}const $i={basename:RMe,dirname:OMe,extname:LMe,join:DMe,sep:"/"};function RMe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Cp(e);let n=0,r=-1,s=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(i){n=s+1;break}}else r<0&&(i=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(i){n=s+1;break}}else a<0&&(i=!0,a=s+1),o>-1&&(e.codePointAt(s)===t.codePointAt(o--)?o<0&&(r=s):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function OMe(e){if(Cp(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function LMe(e){Cp(e);let t=e.length,n=-1,r=0,s=-1,i=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?s<0?s=t:i!==1&&(i=1):s>-1&&(i=-1)}return s<0||n<0||i===0||i===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function DMe(...e){let t=-1,n;for(;++t<e.length;)Cp(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":$Me(n)}function $Me(e){Cp(e);const t=e.codePointAt(0)===47;let n=MMe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function MMe(e,t){let n="",r=0,s=-1,i=0,a=-1,o,c;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(s===a-1||i===1))if(s!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),s=a,i=0;continue}}else if(n.length>0){n="",r=0,s=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,a):n=e.slice(s+1,a),r=a-s-1;s=a,i=0}else o===46&&i>-1?i++:i=-1}return n}function Cp(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const jMe={cwd:FMe};function FMe(){return"/"}function Zv(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function BMe(e){if(typeof e=="string")e=new URL(e);else if(!Zv(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return zMe(e)}function zMe(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const mw=["history","path","basename","stem","extname","dirname"];class UMe{constructor(t){let n;t?Zv(t)?n={path:t}:typeof t=="string"||VMe(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":jMe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<mw.length;){const i=mw[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let s;for(s in n)mw.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?$i.basename(this.path):void 0}set basename(t){gw(t,"basename"),pw(t,"basename"),this.path=$i.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?$i.dirname(this.path):void 0}set dirname(t){vD(this.basename,"dirname"),this.path=$i.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?$i.extname(this.path):void 0}set extname(t){if(pw(t,"extname"),vD(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=$i.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Zv(t)&&(t=BMe(t)),gw(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?$i.basename(this.path,this.extname):void 0}set stem(t){gw(t,"stem"),pw(t,"stem"),this.path=$i.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new vr(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function pw(e,t){if(e&&e.includes($i.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+$i.sep+"`")}function gw(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function vD(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function VMe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const HMe=(function(e){const r=this.constructor.prototype,s=r[e],i=function(){return s.apply(i,arguments)};return Object.setPrototypeOf(i,r),i}),qMe={}.hasOwnProperty;class zC extends HMe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=PMe()}copy(){const t=new zC;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(hw(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(_w("data",this.frozen),this.namespace[t]=n,this):qMe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(_w("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=a0(t),r=this.parser||this.Parser;return bw("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),bw("process",this.parser||this.Parser),yw("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(i,a){const o=a0(t),c=r.parse(o);r.run(c,o,function(l,d,f){if(l||!d||!f)return u(l);const h=d,m=r.stringify(h,f);WMe(m)?f.value=m:f.result=m,u(l,f)});function u(l,d){l||!d?a(l):i?i(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),bw("processSync",this.parser||this.Parser),yw("processSync",this.compiler||this.Compiler),this.process(t,s),TD("processSync","process",n),r;function s(i,a){n=!0,wD(i),r=a}}run(t,n,r){xD(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,o){const c=a0(n);s.run(t,c,u);function u(l,d,f){const h=d||t;l?o(l):a?a(h):r(void 0,h,f)}}}runSync(t,n){let r=!1,s;return this.run(t,n,i),TD("runSync","run",r),s;function i(a,o){wD(a),s=o,r=!0}}stringify(t,n){this.freeze();const r=a0(n),s=this.compiler||this.Compiler;return yw("stringify",s),xD(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(_w("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[l,...d]=u;c(l,d)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(u.plugins),u.settings&&(s.settings=hw(!0,s.settings,u.settings))}function o(u){let l=-1;if(u!=null)if(Array.isArray(u))for(;++l<u.length;){const d=u[l];i(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,l){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===u){f=d;break}if(f===-1)r.push([u,...l]);else if(l.length>0){let[h,...m]=l;const y=r[f][1];Xv(y)&&Xv(h)&&(h=hw(!0,y,h)),r[f]=[u,h,...m]}}}}const GMe=new zC().freeze();function bw(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function yw(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _w(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xD(e){if(!Xv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function TD(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function a0(e){return KMe(e)?e:new UMe(e)}function KMe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function WMe(e){return typeof e=="string"||JMe(e)}function JMe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function UC(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Fu=UC();function qH(e){Fu=e}var Cc={exec:()=>null};function _t(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(Or.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,t)};return r}var YMe=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Or={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},QMe=/^(?:[ \t]*(?:\n|$))+/,XMe=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ZMe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Pp=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,e6e=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,VC=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,GH=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,KH=_t(GH).replace(/bull/g,VC).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),t6e=_t(GH).replace(/bull/g,VC).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),HC=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,n6e=/^[^\n]+/,qC=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,r6e=_t(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",qC).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),s6e=_t(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,VC).getRegex(),ck="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",GC=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,i6e=_t("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",GC).replace("tag",ck).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),WH=_t(HC).replace("hr",Pp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ck).getRegex(),a6e=_t(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",WH).getRegex(),KC={blockquote:a6e,code:XMe,def:r6e,fences:ZMe,heading:e6e,hr:Pp,html:i6e,lheading:KH,list:s6e,newline:QMe,paragraph:WH,table:Cc,text:n6e},ID=_t("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Pp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ck).getRegex(),o6e={...KC,lheading:t6e,table:ID,paragraph:_t(HC).replace("hr",Pp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ID).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ck).getRegex()},c6e={...KC,html:_t(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",GC).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Cc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:_t(HC).replace("hr",Pp).replace("heading",` *#{1,6} *[^
|
|
313
|
+
]`).replace("lheading",KH).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},u6e=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,l6e=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,JH=/^( {2,}|\\)\n(?!\s*$)/,d6e=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,uk=/[\p{P}\p{S}]/u,WC=/[\s\p{P}\p{S}]/u,YH=/[^\s\p{P}\p{S}]/u,f6e=_t(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,WC).getRegex(),QH=/(?!~)[\p{P}\p{S}]/u,h6e=/(?!~)[\s\p{P}\p{S}]/u,m6e=/(?:[^\s\p{P}\p{S}]|~)/u,XH=/(?![*_])[\p{P}\p{S}]/u,p6e=/(?![*_])[\s\p{P}\p{S}]/u,g6e=/(?:[^\s\p{P}\p{S}]|[*_])/u,b6e=_t(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",YMe?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ZH=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,y6e=_t(ZH,"u").replace(/punct/g,uk).getRegex(),_6e=_t(ZH,"u").replace(/punct/g,QH).getRegex(),e7="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",k6e=_t(e7,"gu").replace(/notPunctSpace/g,YH).replace(/punctSpace/g,WC).replace(/punct/g,uk).getRegex(),E6e=_t(e7,"gu").replace(/notPunctSpace/g,m6e).replace(/punctSpace/g,h6e).replace(/punct/g,QH).getRegex(),w6e=_t("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,YH).replace(/punctSpace/g,WC).replace(/punct/g,uk).getRegex(),S6e=_t(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,XH).getRegex(),v6e="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",x6e=_t(v6e,"gu").replace(/notPunctSpace/g,g6e).replace(/punctSpace/g,p6e).replace(/punct/g,XH).getRegex(),T6e=_t(/\\(punct)/,"gu").replace(/punct/g,uk).getRegex(),I6e=_t(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),A6e=_t(GC).replace("(?:-->|$)","-->").getRegex(),C6e=_t("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",A6e).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),By=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,P6e=_t(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",By).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),t7=_t(/^!?\[(label)\]\[(ref)\]/).replace("label",By).replace("ref",qC).getRegex(),n7=_t(/^!?\[(ref)\](?:\[\])?/).replace("ref",qC).getRegex(),N6e=_t("reflink|nolink(?!\\()","g").replace("reflink",t7).replace("nolink",n7).getRegex(),AD=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,JC={_backpedal:Cc,anyPunctuation:T6e,autolink:I6e,blockSkip:b6e,br:JH,code:l6e,del:Cc,delLDelim:Cc,delRDelim:Cc,emStrongLDelim:y6e,emStrongRDelimAst:k6e,emStrongRDelimUnd:w6e,escape:u6e,link:P6e,nolink:n7,punctuation:f6e,reflink:t7,reflinkSearch:N6e,tag:C6e,text:d6e,url:Cc},R6e={...JC,link:_t(/^!?\[(label)\]\((.*?)\)/).replace("label",By).getRegex(),reflink:_t(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",By).getRegex()},ex={...JC,emStrongRDelimAst:E6e,emStrongLDelim:_6e,delLDelim:S6e,delRDelim:x6e,url:_t(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",AD).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:_t(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",AD).getRegex()},O6e={...ex,br:_t(JH).replace("{2,}","*").getRegex(),text:_t(ex.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},o0={normal:KC,gfm:o6e,pedantic:c6e},Df={normal:JC,gfm:ex,breaks:O6e,pedantic:R6e},L6e={"&":"&","<":"<",">":">",'"':""","'":"'"},CD=e=>L6e[e];function Li(e,t){if(t){if(Or.escapeTest.test(e))return e.replace(Or.escapeReplace,CD)}else if(Or.escapeTestNoEncode.test(e))return e.replace(Or.escapeReplaceNoEncode,CD);return e}function PD(e){try{e=encodeURI(e).replace(Or.percentDecode,"%")}catch{return null}return e}function ND(e,t){let n=e.replace(Or.findPipe,(i,a,o)=>{let c=!1,u=a;for(;--u>=0&&o[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(Or.splitPipe),s=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(Or.slashPipe,"|");return r}function $f(e,t,n){let r=e.length;if(r===0)return"";let s=0;for(;s<r&&e.charAt(r-s-1)===t;)s++;return e.slice(0,r-s)}function D6e(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function $6e(e,t=0){let n=t,r="";for(let s of e)if(s===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=s,n++;return r}function RD(e,t,n,r,s){let i=t.href,a=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,c}function M6e(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let s=r[1];return t.split(`
|
|
314
|
+
`).map(i=>{let a=i.match(n.other.beginningSpace);if(a===null)return i;let[o]=a;return o.length>=s.length?i.slice(s.length):i}).join(`
|
|
315
|
+
`)}var zy=class{options;rules;lexer;constructor(e){this.options=e||Fu}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:$f(n,`
|
|
316
|
+
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=M6e(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=$f(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:$f(t[0],`
|
|
317
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=$f(t[0],`
|
|
318
|
+
`).split(`
|
|
319
|
+
`),r="",s="",i=[];for(;n.length>0;){let a=!1,o=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))o.push(n[c]),a=!0;else if(!a)o.push(n[c]);else break;n=n.slice(c);let u=o.join(`
|
|
320
|
+
`),l=u.replace(this.rules.other.blockquoteSetextReplace,`
|
|
321
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
322
|
+
${u}`:u,s=s?`${s}
|
|
323
|
+
${l}`:l;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=d,n.length===0)break;let f=i.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let h=f,m=h.raw+`
|
|
324
|
+
`+n.join(`
|
|
325
|
+
`),y=this.blockquote(m);i[i.length-1]=y,r=r.substring(0,r.length-h.raw.length)+y.raw,s=s.substring(0,s.length-h.text.length)+y.text;break}else if(f?.type==="list"){let h=f,m=h.raw+`
|
|
326
|
+
`+n.join(`
|
|
327
|
+
`),y=this.list(m);i[i.length-1]=y,r=r.substring(0,r.length-f.raw.length)+y.raw,s=s.substring(0,s.length-h.raw.length)+y.raw,n=m.substring(i.at(-1).raw.length).split(`
|
|
328
|
+
`);continue}}return{type:"blockquote",raw:r,tokens:i,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,s={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let i=this.rules.other.listItemRegex(n),a=!1;for(;e;){let c=!1,u="",l="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let d=$6e(t[2].split(`
|
|
329
|
+
`,1)[0],t[1].length),f=e.split(`
|
|
330
|
+
`,1)[0],h=!d.trim(),m=0;if(this.options.pedantic?(m=2,l=d.trimStart()):h?m=t[1].length+1:(m=d.search(this.rules.other.nonSpaceChar),m=m>4?1:m,l=d.slice(m),m+=t[1].length),h&&this.rules.other.blankLine.test(f)&&(u+=f+`
|
|
331
|
+
`,e=e.substring(f.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(m),g=this.rules.other.hrRegex(m),p=this.rules.other.fencesBeginRegex(m),_=this.rules.other.headingBeginRegex(m),k=this.rules.other.htmlBeginRegex(m),v=this.rules.other.blockquoteBeginRegex(m);for(;e;){let w=e.split(`
|
|
332
|
+
`,1)[0],S;if(f=w,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),S=f):S=f.replace(this.rules.other.tabCharGlobal," "),p.test(f)||_.test(f)||k.test(f)||v.test(f)||y.test(f)||g.test(f))break;if(S.search(this.rules.other.nonSpaceChar)>=m||!f.trim())l+=`
|
|
333
|
+
`+S.slice(m);else{if(h||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||p.test(d)||_.test(d)||g.test(d))break;l+=`
|
|
334
|
+
`+f}h=!f.trim(),u+=w+`
|
|
335
|
+
`,e=e.substring(w.length+1),d=S.slice(m)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0)),s.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(l),loose:!1,text:l,tokens:[]}),s.raw+=u}let o=s.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c of s.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),c.tokens[0]?.type==="text"||c.tokens[0]?.type==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let l=this.lexer.inlineQueue.length-1;l>=0;l--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[l].src)){this.lexer.inlineQueue[l].src=this.lexer.inlineQueue[l].src.replace(this.rules.other.listReplaceTask,"");break}}let u=this.rules.other.listTaskCheckbox.exec(c.raw);if(u){let l={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};c.checked=l.checked,s.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=l.raw+c.tokens[0].raw,c.tokens[0].text=l.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(l)):c.tokens.unshift({type:"paragraph",raw:l.raw,text:l.raw,tokens:[l]}):c.tokens.unshift(l)}}if(!s.loose){let u=c.tokens.filter(d=>d.type==="space"),l=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw));s.loose=l}}if(s.loose)for(let c of s.items){c.loose=!0;for(let u of c.tokens)u.type==="text"&&(u.type="paragraph")}return s}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:s}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ND(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
336
|
+
`):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<n.length;a++)i.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:i.align[a]});for(let a of s)i.rows.push(ND(a,i.header.length).map((o,c)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:i.align[c]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
337
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=$f(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=D6e(t[2],"()");if(i===-2)return;if(i>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(r);i&&(r=i[1],s=i[3])}else s=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),RD(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=t[r.toLowerCase()];if(!s){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return RD(n,s,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let s=[...r[0]].length-1,i,a,o=s,c=0,u=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+s);(r=u.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&s%3&&!((s+a)%3)){c+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+c);let l=[...r[0]][0].length,d=e.slice(0,s+r.index+l+a);if(Math.min(s,a)%2){let h=d.slice(1,-1);return{type:"em",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let s=[...r[0]].length-1,i,a,o=s,c=this.rules.inline.delRDelim;for(c.lastIndex=0,t=t.slice(-1*e.length+s);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==s))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let u=[...r[0]][0].length,l=e.slice(0,s+r.index+u+a),d=l.slice(s,-s);return{type:"del",raw:l,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Ls=class tx{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Fu,this.options.tokenizer=this.options.tokenizer||new zy,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Or,block:o0.normal,inline:Df.normal};this.options.pedantic?(n.block=o0.pedantic,n.inline=Df.pedantic):this.options.gfm&&(n.block=o0.gfm,this.options.breaks?n.inline=Df.breaks:n.inline=Df.gfm),this.tokenizer.rules=n}static get rules(){return{block:o0,inline:Df}}static lex(t,n){return new tx(n).lex(t)}static lexInline(t,n){return new tx(n).inlineTokens(t)}lex(t){t=t.replace(Or.carriageReturn,`
|
|
338
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.options.pedantic&&(t=t.replace(Or.tabCharGlobal," ").replace(Or.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(a=>(s=a.call({lexer:this},t,n))?(t=t.substring(s.raw.length),n.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let a=n.at(-1);s.raw.length===1&&a!==void 0?a.raw+=`
|
|
339
|
+
`:n.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
340
|
+
`)?"":`
|
|
341
|
+
`)+s.raw,a.text+=`
|
|
342
|
+
`+s.text,this.inlineQueue.at(-1).src=a.text):n.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
343
|
+
`)?"":`
|
|
344
|
+
`)+s.raw,a.text+=`
|
|
345
|
+
`+s.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},n.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),n.push(s);continue}let i=t;if(this.options.extensions?.startBlock){let a=1/0,o=t.slice(1),c;this.options.extensions.startBlock.forEach(u=>{c=u.call({lexer:this},o),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(i=t.substring(0,a+1))}if(this.state.top&&(s=this.tokenizer.paragraph(i))){let a=n.at(-1);r&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
|
|
346
|
+
`)?"":`
|
|
347
|
+
`)+s.raw,a.text+=`
|
|
348
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(s),r=i.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let a=n.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
|
|
349
|
+
`)?"":`
|
|
350
|
+
`)+s.raw,a.text+=`
|
|
351
|
+
`+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(s);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r=t,s=null;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,s.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)i=s[2]?s[2].length:0,r=r.slice(0,s.index+i)+"["+"a".repeat(s[0].length-i-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,o="";for(;t;){a||(o=""),a=!1;let c;if(this.options.extensions?.inline?.some(l=>(c=l.call({lexer:this},t,n))?(t=t.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.escape(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.tag(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.link(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(c.raw.length);let l=n.at(-1);c.type==="text"&&l?.type==="text"?(l.raw+=c.raw,l.text+=c.text):n.push(c);continue}if(c=this.tokenizer.emStrong(t,r,o)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.codespan(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.br(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.del(t,r,o)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.autolink(t)){t=t.substring(c.raw.length),n.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(t))){t=t.substring(c.raw.length),n.push(c);continue}let u=t;if(this.options.extensions?.startInline){let l=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(h=>{f=h.call({lexer:this},d),typeof f=="number"&&f>=0&&(l=Math.min(l,f))}),l<1/0&&l>=0&&(u=t.substring(0,l+1))}if(c=this.tokenizer.inlineText(u)){t=t.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(o=c.raw.slice(-1)),a=!0;let l=n.at(-1);l?.type==="text"?(l.raw+=c.raw,l.text+=c.text):n.push(c);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return n}},Uy=class{options;parser;constructor(t){this.options=t||Fu}space(t){return""}code({text:t,lang:n,escaped:r}){let s=(n||"").match(Or.notSpaceStart)?.[0],i=t.replace(Or.endingNewline,"")+`
|
|
352
|
+
`;return s?'<pre><code class="language-'+Li(s)+'">'+(r?i:Li(i,!0))+`</code></pre>
|
|
353
|
+
`:"<pre><code>"+(r?i:Li(i,!0))+`</code></pre>
|
|
354
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
355
|
+
${this.parser.parse(t)}</blockquote>
|
|
356
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
357
|
+
`}hr(t){return`<hr>
|
|
358
|
+
`}list(t){let n=t.ordered,r=t.start,s="";for(let o=0;o<t.items.length;o++){let c=t.items[o];s+=this.listitem(c)}let i=n?"ol":"ul",a=n&&r!==1?' start="'+r+'"':"";return"<"+i+a+`>
|
|
359
|
+
`+s+"</"+i+`>
|
|
360
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
361
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
362
|
+
`}table(t){let n="",r="";for(let i=0;i<t.header.length;i++)r+=this.tablecell(t.header[i]);n+=this.tablerow({text:r});let s="";for(let i=0;i<t.rows.length;i++){let a=t.rows[i];r="";for(let o=0;o<a.length;o++)r+=this.tablecell(a[o]);s+=this.tablerow({text:r})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
363
|
+
<thead>
|
|
364
|
+
`+n+`</thead>
|
|
365
|
+
`+s+`</table>
|
|
366
|
+
`}tablerow({text:t}){return`<tr>
|
|
367
|
+
${t}</tr>
|
|
368
|
+
`}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`</${r}>
|
|
369
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Li(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let s=this.parser.parseInline(r),i=PD(t);if(i===null)return s;t=i;let a='<a href="'+t+'"';return n&&(a+=' title="'+Li(n)+'"'),a+=">"+s+"</a>",a}image({href:t,title:n,text:r,tokens:s}){s&&(r=this.parser.parseInline(s,this.parser.textRenderer));let i=PD(t);if(i===null)return Li(r);t=i;let a=`<img src="${t}" alt="${Li(r)}"`;return n&&(a+=` title="${Li(n)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Li(t.text)}},YC=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},ti=class nx{options;renderer;textRenderer;constructor(t){this.options=t||Fu,this.options.renderer=this.options.renderer||new Uy,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new YC}static parse(t,n){return new nx(n).parse(t)}static parseInline(t,n){return new nx(n).parseInline(t)}parse(t){let n="";for(let r=0;r<t.length;r++){let s=t[r];if(this.options.extensions?.renderers?.[s.type]){let a=s,o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=o||"";continue}}let i=s;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=this.renderer.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(t,n=this.renderer){let r="";for(let s=0;s<t.length;s++){let i=t[s];if(this.options.extensions?.renderers?.[i.type]){let o=this.options.extensions.renderers[i.type].call({parser:this},i);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=o||"";continue}}let a=i;switch(a.type){case"escape":{r+=n.text(a);break}case"html":{r+=n.html(a);break}case"link":{r+=n.link(a);break}case"image":{r+=n.image(a);break}case"checkbox":{r+=n.checkbox(a);break}case"strong":{r+=n.strong(a);break}case"em":{r+=n.em(a);break}case"codespan":{r+=n.codespan(a);break}case"br":{r+=n.br(a);break}case"del":{r+=n.del(a);break}case"text":{r+=n.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}},Zf=class{options;block;constructor(t){this.options=t||Fu}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ls.lex:Ls.lexInline}provideParser(){return this.block?ti.parse:ti.parseInline}},j6e=class{defaults=UC();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ti;Renderer=Uy;TextRenderer=YC;Lexer=Ls;Tokenizer=zy;Hooks=Zf;constructor(...t){this.use(...t)}walkTokens(t,n){let r=[];for(let s of t)switch(r=r.concat(n.call(this,s)),s.type){case"table":{let i=s;for(let a of i.header)r=r.concat(this.walkTokens(a.tokens,n));for(let a of i.rows)for(let o of a)r=r.concat(this.walkTokens(o.tokens,n));break}case"list":{let i=s;r=r.concat(this.walkTokens(i.items,n));break}default:{let i=s;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(a=>{let o=i[a].flat(1/0);r=r.concat(this.walkTokens(o,n))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=n.renderers[i.name];a?n.renderers[i.name]=function(...o){let c=i.renderer.apply(this,o);return c===!1&&(c=a.apply(this,o)),c}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=n[i.level];a?a.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),s.extensions=n),r.renderer){let i=this.defaults.renderer||new Uy(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,c=r.renderer[o],u=i[o];i[o]=(...l)=>{let d=c.apply(i,l);return d===!1&&(d=u.apply(i,l)),d||""}}s.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new zy(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,c=r.tokenizer[o],u=i[o];i[o]=(...l)=>{let d=c.apply(i,l);return d===!1&&(d=u.apply(i,l)),d}}s.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new Zf;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,c=r.hooks[o],u=i[o];Zf.passThroughHooks.has(a)?i[o]=l=>{if(this.defaults.async&&Zf.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await c.call(i,l);return u.call(i,f)})();let d=c.call(i,l);return u.call(i,d)}:i[o]=(...l)=>{if(this.defaults.async)return(async()=>{let f=await c.apply(i,l);return f===!1&&(f=await u.apply(i,l)),f})();let d=c.apply(i,l);return d===!1&&(d=u.apply(i,l)),d}}s.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;s.walkTokens=function(o){let c=[];return c.push(a.call(this,o)),i&&(c=c.concat(i.call(this,o))),c}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Ls.lex(t,n??this.defaults)}parser(t,n){return ti.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let s={...r},i={...this.defaults,...s},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let o=i.hooks?await i.hooks.preprocess(n):n,c=await(i.hooks?await i.hooks.provideLexer():t?Ls.lex:Ls.lexInline)(o,i),u=i.hooks?await i.hooks.processAllTokens(c):c;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let l=await(i.hooks?await i.hooks.provideParser():t?ti.parse:ti.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(l):l})().catch(a);try{i.hooks&&(n=i.hooks.preprocess(n));let o=(i.hooks?i.hooks.provideLexer():t?Ls.lex:Ls.lexInline)(n,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let c=(i.hooks?i.hooks.provideParser():t?ti.parse:ti.parseInline)(o,i);return i.hooks&&(c=i.hooks.postprocess(c)),c}catch(o){return a(o)}}}onError(t,n){return r=>{if(r.message+=`
|
|
370
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Li(r.message+"",!0)+"</pre>";return n?Promise.resolve(s):s}if(n)return Promise.reject(r);throw r}}},Eu=new j6e;function Lt(e,t){return Eu.parse(e,t)}Lt.options=Lt.setOptions=function(e){return Eu.setOptions(e),Lt.defaults=Eu.defaults,qH(Lt.defaults),Lt};Lt.getDefaults=UC;Lt.defaults=Fu;Lt.use=function(...e){return Eu.use(...e),Lt.defaults=Eu.defaults,qH(Lt.defaults),Lt};Lt.walkTokens=function(e,t){return Eu.walkTokens(e,t)};Lt.parseInline=Eu.parseInline;Lt.Parser=ti;Lt.parser=ti.parse;Lt.Renderer=Uy;Lt.TextRenderer=YC;Lt.Lexer=Ls;Lt.lexer=Ls.lex;Lt.Tokenizer=zy;Lt.Hooks=Zf;Lt.parse=Lt;Lt.options;Lt.setOptions;Lt.use;Lt.walkTokens;Lt.parseInline;ti.parse;Ls.lex;var F6e=300,B6e="300px",z6e=500;function U6e(e={}){let{immediate:t=!1,debounceDelay:n=F6e,rootMargin:r=B6e,idleTimeout:s=z6e}=e,[i,a]=O.useState(!1),o=O.useRef(null),c=O.useRef(null),u=O.useRef(null),l=O.useMemo(()=>h=>{let m=Date.now();return window.setTimeout(()=>{h({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-m))})},1)},[]),d=O.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(h,m)=>window.requestIdleCallback(h,m):l,[l]),f=O.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?h=>window.cancelIdleCallback(h):h=>{clearTimeout(h)},[]);return O.useEffect(()=>{if(t){a(!0);return}let h=o.current;if(!h)return;c.current&&(clearTimeout(c.current),c.current=null),u.current&&(f(u.current),u.current=null);let m=()=>{c.current&&(clearTimeout(c.current),c.current=null),u.current&&(f(u.current),u.current=null)},y=k=>{u.current=d(v=>{v.timeRemaining()>0||v.didTimeout?(a(!0),k.disconnect()):u.current=d(()=>{a(!0),k.disconnect()},{timeout:s/2})},{timeout:s})},g=k=>{m(),c.current=window.setTimeout(()=>{var v,w;let S=k.takeRecords();(S.length===0||(w=(v=S.at(-1))==null?void 0:v.isIntersecting)!=null&&w)&&y(k)},n)},p=(k,v)=>{k.isIntersecting?g(v):m()},_=new IntersectionObserver(k=>{for(let v of k)p(v,_)},{rootMargin:r,threshold:0});return _.observe(h),()=>{c.current&&clearTimeout(c.current),u.current&&f(u.current),_.disconnect()}},[t,n,r,s,f,d]),{shouldRender:i,containerRef:o}}var r7=/\s/,V6e=/^\s+$/,H6e=new Set(["code","pre","svg","math","annotation"]),q6e=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",G6e=e=>e.some(t=>q6e(t)&&H6e.has(t.tagName)),K6e=e=>{let t=[],n="",r=!1;for(let s of e){let i=r7.test(s);i!==r&&n&&(t.push(n),n=""),n+=s,r=i}return n&&t.push(n),t},W6e=e=>{let t=[],n="";for(let r of e)r7.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},J6e=(e,t,n,r,s)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:s?`--sd-animation:sd-${t};--sd-duration:0ms;--sd-easing:${r}`:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),Y6e=(e,t,n,r,s)=>{let i=t.at(-1);if(!(i&&"children"in i))return;if(G6e(t))return Il;let a=i,o=a.children.indexOf(e);if(o===-1)return;let c=e.value;if(!c.trim()){s.count+=c.length;return}let u=n.sep==="char"?W6e(c):K6e(c),l=r.prevContentLength,d=u.map(f=>{let h=s.count;if(s.count+=f.length,V6e.test(f))return{type:"text",value:f};let m=l>0&&h<l;return J6e(f,n.animation,n.duration,n.easing,m)});return a.children.splice(o,1,...d),o+d.length},Q6e=0;function rx(e){var t,n,r,s;let i={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(s=e?.sep)!=null?s:"word"},a={prevContentLength:0,lastRenderCharCount:0},o=Q6e++,c=()=>u=>{let l={count:0};_C(u,"text",(d,f)=>Y6e(d,f,i,a,l)),a.lastRenderCharCount=l.count,a.prevContentLength=0};return Object.defineProperty(c,"name",{value:`rehypeAnimate$${o}`}),{name:"animate",type:"animate",rehypePlugin:c,setPrevContentLength(u){a.prevContentLength=u},getLastRenderCharCount(){let u=a.lastRenderCharCount;return a.lastRenderCharCount=0,u}}}rx();var s7=O.createContext(!1),X6e=()=>O.useContext(s7),QC=(...e)=>GA(j1(e)),Z6e=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},eje=e=>e?(...t)=>Z6e(e,GA(j1(t))):QC,Hl=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,s=URL.createObjectURL(r),i=document.createElement("a");i.href=s,i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(s)},sx=O.createContext(QC),ut=()=>O.useContext(sx),tje=QC("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),nje=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let s=n.slice(0,r).trim(),i=n.slice(r+1).trim();s&&i&&(t[s]=i)}}return t},rje=O.memo(({children:e,result:t,language:n,className:r,startLine:s,...i})=>{let a=ut(),o=O.useMemo(()=>a(tje),[a]),c=O.useMemo(()=>{let u={};return t.bg&&(u["--sdm-bg"]=t.bg),t.fg&&(u["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(u,nje(t.rootStyle)),u},[t.bg,t.fg,t.rootStyle]);return b.jsx("div",{className:a(r,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...i,children:b.jsx("pre",{className:a(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:c,children:b.jsx("code",{className:a("[counter-increment:line_0] [counter-reset:line]"),style:s&&s>1?{counterReset:`line ${s-1}`}:void 0,children:t.tokens.map((u,l)=>b.jsx("span",{className:o,children:u.length===0||u.length===1&&u[0].content===""?`
|
|
371
|
+
`:u.map((d,f)=>{let h={},m=!!d.bgColor;if(d.color&&(h["--sdm-c"]=d.color),d.bgColor&&(h["--sdm-tbg"]=d.bgColor),d.htmlStyle)for(let[y,g]of Object.entries(d.htmlStyle))y==="color"?h["--sdm-c"]=g:y==="background-color"?(h["--sdm-tbg"]=g,m=!0):h[y]=g;return b.jsx("span",{className:a("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",m&&"bg-[var(--sdm-tbg)]",m&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:h,...d.htmlAttrs,children:d.content},f)})},l))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine),sje=({className:e,language:t,style:n,isIncomplete:r,...s})=>{let i=ut();return b.jsx("div",{className:i("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...s})},i7=O.createContext({code:""}),a7=()=>O.useContext(i7),ije=({language:e})=>{let t=ut();return b.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:b.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},aje=/\n+$/,oje=O.lazy(()=>x(()=>import("./highlighted-body-TPN3WLV5-DBK2Kin6.js"),__vite__mapDeps([101,102])).then(e=>({default:e.HighlightedCodeBlockBody}))),cje=({code:e,language:t,className:n,children:r,isIncomplete:s=!1,startLine:i,...a})=>{let o=ut(),c=O.useMemo(()=>e.replace(aje,""),[e]),u=O.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:c.split(`
|
|
372
|
+
`).map(l=>[{content:l,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[c]);return b.jsx(i7.Provider,{value:{code:e},children:b.jsxs(sje,{isIncomplete:s,language:t,children:[b.jsx(ije,{language:t}),r?b.jsx("div",{className:o("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:b.jsx("div",{className:o("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,b.jsx(O.Suspense,{fallback:b.jsx(rje,{className:n,language:t,result:u,startLine:i,...a}),children:b.jsx(oje,{className:n,code:c,language:t,raw:u,startLine:i,...a})})]})})},uje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),lje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),dje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),fje=e=>b.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[b.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),hje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),mje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),pje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),gje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),bje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),yje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),eh={CheckIcon:uje,CopyIcon:lje,DownloadIcon:dje,ExternalLinkIcon:gje,Loader2Icon:fje,Maximize2Icon:hje,RotateCcwIcon:mje,XIcon:pje,ZoomInIcon:bje,ZoomOutIcon:yje},o7=O.createContext(eh),_je=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(s=>e[s]===t[s])},OD=({icons:e,children:t})=>{let n=O.useRef(e),r=O.useRef(e?{...eh,...e}:eh);_je(n.current,e)||(n.current=e,r.current=e?{...eh,...e}:eh);let s=r.current;return b.jsx(o7.Provider,{value:s,children:t})},Ai=()=>O.useContext(o7),c7={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},ix=O.createContext(c7),Wa=()=>O.useContext(ix),LD=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:s,code:i,...a})=>{let o=ut(),[c,u]=O.useState(!1),l=O.useRef(0),{code:d}=a7(),{isAnimating:f}=O.useContext(Es),h=Wa(),m=i??d,y=async()=>{var _;if(typeof window>"u"||!((_=navigator?.clipboard)!=null&&_.writeText)){t?.(new Error("Clipboard API not available"));return}try{c||(await navigator.clipboard.writeText(m),u(!0),e?.(),l.current=window.setTimeout(()=>u(!1),n))}catch(k){t?.(k)}};O.useEffect(()=>()=>{window.clearTimeout(l.current)},[]);let g=Ai(),p=c?g.CheckIcon:g.CopyIcon;return b.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-copy-button",disabled:f,onClick:y,title:h.copyCode,type:"button",...a,children:r??b.jsx(p,{size:14})})},DD={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},kje=({onDownload:e,onError:t,language:n,children:r,className:s,code:i,...a})=>{let o=ut(),{code:c}=a7(),{isAnimating:u}=O.useContext(Es),l=Wa(),d=Ai(),f=i??c,h=`file.${n&&n in DD?DD[n]:"txt"}`,m="text/plain",y=()=>{try{Hl(h,f,m),e?.()}catch(g){t?.(g)}};return b.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-download-button",disabled:u,onClick:y,title:l.downloadFile,type:"button",...a,children:r??b.jsx(d.DownloadIcon,{size:14})})},$D=()=>{let{Loader2Icon:e}=Ai(),t=ut();return b.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[b.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),b.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:b.jsx(e,{className:t("size-4 animate-spin")})})]})},Eje=/\.[^/.]+$/,wje=({node:e,className:t,src:n,alt:r,onLoad:s,onError:i,...a})=>{let{DownloadIcon:o}=Ai(),c=ut(),u=O.useRef(null),[l,d]=O.useState(!1),[f,h]=O.useState(!1),m=Wa(),y=a.width!=null||a.height!=null,g=(l||y)&&!f,p=f&&!y;O.useEffect(()=>{let w=u.current;if(w!=null&&w.complete){let S=w.naturalWidth>0;d(S),h(!S)}},[]);let _=O.useCallback(w=>{d(!0),h(!1),s?.(w)},[s]),k=O.useCallback(w=>{d(!1),h(!0),i?.(w)},[i]),v=async()=>{if(n)try{let w=await(await fetch(n)).blob(),S=new URL(n,window.location.origin).pathname.split("/").pop()||"",T=S.split(".").pop(),I=S.includes(".")&&T!==void 0&&T.length<=4,D="";if(I)D=S;else{let R=w.type,z="png";R.includes("jpeg")||R.includes("jpg")?z="jpg":R.includes("png")?z="png":R.includes("svg")?z="svg":R.includes("gif")?z="gif":R.includes("webp")&&(z="webp"),D=`${(r||S||"image").replace(Eje,"")}.${z}`}Hl(D,w,w.type)}catch{window.open(n,"_blank")}};return n?b.jsxs("div",{className:c("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[b.jsx("img",{alt:r,className:c("max-w-full rounded-lg",p&&"hidden",t),"data-streamdown":"image",onError:k,onLoad:_,ref:u,src:n,...a}),p&&b.jsx("span",{className:c("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:m.imageNotAvailable}),b.jsx("div",{className:c("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),g&&b.jsx("button",{className:c("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:v,title:m.downloadImage,type:"button",children:b.jsx(o,{size:14})})]}):null},Dh=0,XC=()=>{Dh+=1,Dh===1&&(document.body.style.overflow="hidden")},ZC=()=>{Dh=Math.max(0,Dh-1),Dh===0&&(document.body.style.overflow="")},Sje=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:s,CopyIcon:i,ExternalLinkIcon:a,XIcon:o}=Ai(),c=ut(),[u,l]=O.useState(!1),d=Wa(),f=O.useCallback(async()=>{try{await navigator.clipboard.writeText(e),l(!0),setTimeout(()=>l(!1),2e3)}catch{}},[e]),h=O.useCallback(()=>{r(),n()},[r,n]);return O.useEffect(()=>{if(t){XC();let m=y=>{y.key==="Escape"&&n()};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m),ZC()}}},[t,n]),t?b.jsx("div",{className:c("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:m=>{m.key==="Escape"&&n()},role:"button",tabIndex:0,children:b.jsxs("div",{className:c("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:m=>m.stopPropagation(),onKeyDown:m=>m.stopPropagation(),role:"presentation",children:[b.jsx("button",{className:c("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:d.close,type:"button",children:b.jsx(o,{size:16})}),b.jsxs("div",{className:c("flex flex-col gap-2"),children:[b.jsxs("div",{className:c("flex items-center gap-2 font-semibold text-lg"),children:[b.jsx(a,{size:20}),b.jsx("span",{children:d.openExternalLink})]}),b.jsx("p",{className:c("text-muted-foreground text-sm"),children:d.externalLinkWarning})]}),b.jsx("div",{className:c("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),b.jsxs("div",{className:c("flex gap-2"),children:[b.jsx("button",{className:c("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:f,type:"button",children:u?b.jsxs(b.Fragment,{children:[b.jsx(s,{size:14}),b.jsx("span",{children:d.copied})]}):b.jsxs(b.Fragment,{children:[b.jsx(i,{size:14}),b.jsx("span",{children:d.copyLink})]})}),b.jsxs("button",{className:c("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:h,type:"button",children:[b.jsx(a,{size:14}),b.jsx("span",{children:d.openLink})]})]})]})}):null},ax=O.createContext(null),e2=()=>O.useContext(ax),bBe=()=>{var e;let t=e2();return(e=t?.code)!=null?e:null},t2=()=>{var e;let t=e2();return(e=t?.mermaid)!=null?e:null},vje=e=>{var t;let n=e2();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},xje=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((s,i)=>{let a="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let c=document.createElement("canvas"),u=o.width*r,l=o.height*r;c.width=u,c.height=l;let d=c.getContext("2d");if(!d){i(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(o,0,0,u,l),c.toBlob(f=>{if(!f){i(new Error("Failed to create PNG blob"));return}s(f)},"image/png")},o.onerror=()=>i(new Error("Failed to load SVG image")),o.src=a})},Tje=({chart:e,children:t,className:n,onDownload:r,config:s,onError:i})=>{let a=ut(),[o,c]=O.useState(!1),u=O.useRef(null),{isAnimating:l}=O.useContext(Es),d=Ai(),f=t2(),h=Wa(),m=async y=>{try{if(y==="mmd"){Hl("diagram.mmd",e,"text/plain"),c(!1),r?.(y);return}if(!f){i?.(new Error("Mermaid plugin not available"));return}let g=f.getMermaid(s),p=e.split("").reduce((v,w)=>(v<<5)-v+w.charCodeAt(0)|0,0),_=`mermaid-${Math.abs(p)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:k}=await g.render(_,e);if(!k){i?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(y==="svg"){Hl("diagram.svg",k,"image/svg+xml"),c(!1),r?.(y);return}if(y==="png"){let v=await xje(k);Hl("diagram.png",v,"image/png"),r?.(y),c(!1);return}}catch(g){i?.(g)}};return O.useEffect(()=>{let y=g=>{let p=g.composedPath();u.current&&!p.includes(u.current)&&c(!1)};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),b.jsxs("div",{className:a("relative"),ref:u,children:[b.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:l,onClick:()=>c(!o),title:h.downloadDiagram,type:"button",children:t??b.jsx(d.DownloadIcon,{size:14})}),o?b.jsxs("div",{className:a("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[b.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("svg"),title:h.downloadDiagramAsSvg,type:"button",children:h.mermaidFormatSvg}),b.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("png"),title:h.downloadDiagramAsPng,type:"button",children:h.mermaidFormatPng}),b.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("mmd"),title:h.downloadDiagramAsMmd,type:"button",children:h.mermaidFormatMmd})]}):null]})},Ije=({chart:e,config:t,onFullscreen:n,onExit:r,className:s,...i})=>{let{Maximize2Icon:a,XIcon:o}=Ai(),c=ut(),[u,l]=O.useState(!1),{isAnimating:d,controls:f}=O.useContext(Es),h=Wa(),m=(()=>{if(typeof f=="boolean")return f;let g=f.mermaid;return g===!1?!1:g===!0||g===void 0?!0:g.panZoom!==!1})(),y=()=>{l(!u)};return O.useEffect(()=>{if(u){XC();let g=p=>{p.key==="Escape"&&l(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),ZC()}}},[u]),O.useEffect(()=>{u?n?.():r&&r()},[u,n,r]),b.jsxs(b.Fragment,{children:[b.jsx("button",{className:c("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),disabled:d,onClick:y,title:h.viewFullscreen,type:"button",...i,children:b.jsx(a,{size:14})}),u?Ix.createPortal(b.jsxs("div",{className:c("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:y,onKeyDown:g=>{g.key==="Escape"&&y()},role:"button",tabIndex:0,children:[b.jsx("button",{className:c("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:y,title:h.exitFullscreen,type:"button",children:b.jsx(o,{size:20})}),b.jsx("div",{className:c("flex size-full items-center justify-center p-4"),onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:b.jsx(z7,{chart:e,className:c("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:m})})]}),document.body):null]})},u7=e=>{var t,n;let r=[],s=[],i=e.querySelectorAll("thead th");for(let o of i)r.push(((t=o.textContent)==null?void 0:t.trim())||"");let a=e.querySelectorAll("tbody tr");for(let o of a){let c=[],u=o.querySelectorAll("td");for(let l of u)c.push(((n=l.textContent)==null?void 0:n.trim())||"");s.push(c)}return{headers:r,rows:s}},l7=e=>{let{headers:t,rows:n}=e,r=o=>{let c=!1,u=!1;for(let l of o){if(l==='"'){c=!0,u=!0;break}(l===","||l===`
|
|
373
|
+
`)&&(c=!0)}return c?u?`"${o.replace(/"/g,'""')}"`:`"${o}"`:o},s=t.length>0?n.length+1:n.length,i=new Array(s),a=0;t.length>0&&(i[a]=t.map(r).join(","),a+=1);for(let o of n)i[a]=o.map(r).join(","),a+=1;return i.join(`
|
|
374
|
+
`)},Aje=e=>{let{headers:t,rows:n}=e,r=o=>{let c=!1;for(let l of o)if(l===" "||l===`
|
|
375
|
+
`||l==="\r"){c=!0;break}if(!c)return o;let u=[];for(let l of o)l===" "?u.push("\\t"):l===`
|
|
376
|
+
`?u.push("\\n"):l==="\r"?u.push("\\r"):u.push(l);return u.join("")},s=t.length>0?n.length+1:n.length,i=new Array(s),a=0;t.length>0&&(i[a]=t.map(r).join(" "),a+=1);for(let o of n)i[a]=o.map(r).join(" "),a+=1;return i.join(`
|
|
377
|
+
`)},kw=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},ox=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),s=0,i=t.map(o=>kw(o));r[s]=`| ${i.join(" | ")} |`,s+=1;let a=new Array(t.length);for(let o=0;o<t.length;o+=1)a[o]="---";r[s]=`| ${a.join(" | ")} |`,s+=1;for(let o of n)if(o.length<t.length){let c=new Array(t.length);for(let u=0;u<t.length;u+=1)c[u]=u<o.length?kw(o[u]):"";r[s]=`| ${c.join(" | ")} |`,s+=1}else{let c=o.map(u=>kw(u));r[s]=`| ${c.join(" | ")} |`,s+=1}return r.join(`
|
|
378
|
+
`)},d7=({children:e,className:t,onCopy:n,onError:r,timeout:s=2e3})=>{let i=ut(),[a,o]=O.useState(!1),[c,u]=O.useState(!1),l=O.useRef(null),d=O.useRef(0),{isAnimating:f}=O.useContext(Es),h=Wa(),m=async p=>{var _,k;if(typeof window>"u"||!((_=navigator?.clipboard)!=null&&_.write)){r?.(new Error("Clipboard API not available"));return}try{let v=(k=l.current)==null?void 0:k.closest('[data-streamdown="table-wrapper"]'),w=v?.querySelector("table");if(!w){r?.(new Error("Table not found"));return}let S=u7(w),T=({csv:l7,tsv:Aje,md:ox}[p]||ox)(S),I=new ClipboardItem({"text/plain":new Blob([T],{type:"text/plain"}),"text/html":new Blob([w.outerHTML],{type:"text/html"})});await navigator.clipboard.write([I]),u(!0),o(!1),n?.(p),d.current=window.setTimeout(()=>u(!1),s)}catch(v){r?.(v)}};O.useEffect(()=>{let p=_=>{let k=_.composedPath();l.current&&!k.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p),window.clearTimeout(d.current)}},[]);let y=Ai(),g=c?y.CheckIcon:y.CopyIcon;return b.jsxs("div",{className:i("relative"),ref:l,children:[b.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:f,onClick:()=>o(!a),title:h.copyTable,type:"button",children:e??b.jsx(g,{height:14,width:14})}),a?b.jsxs("div",{className:i("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[b.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("md"),title:h.copyTableAsMarkdown,type:"button",children:h.tableFormatMarkdown}),b.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("csv"),title:h.copyTableAsCsv,type:"button",children:h.tableFormatCsv}),b.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("tsv"),title:h.copyTableAsTsv,type:"button",children:h.tableFormatTsv})]}):null]})},f7=({children:e,className:t,onDownload:n,onError:r})=>{let s=ut(),[i,a]=O.useState(!1),o=O.useRef(null),{isAnimating:c}=O.useContext(Es),u=Wa(),l=Ai(),d=f=>{var h;try{let m=(h=o.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),y=m?.querySelector("table");if(!y){r?.(new Error("Table not found"));return}let g=u7(y),p=f==="csv"?l7(g):ox(g);Hl(`table.${f==="csv"?"csv":"md"}`,p,f==="csv"?"text/csv":"text/markdown"),a(!1),n?.(f)}catch(m){r?.(m)}};return O.useEffect(()=>{let f=h=>{let m=h.composedPath();o.current&&!m.includes(o.current)&&a(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),b.jsxs("div",{className:s("relative"),ref:o,children:[b.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:()=>a(!i),title:u.downloadTable,type:"button",children:e??b.jsx(l.DownloadIcon,{size:14})}),i?b.jsxs("div",{className:s("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[b.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("csv"),title:u.downloadTableAsCsv,type:"button",children:u.tableFormatCsv}),b.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("markdown"),title:u.downloadTableAsMarkdown,type:"button",children:u.tableFormatMarkdown})]}):null]})},Cje=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:s,XIcon:i}=Ai(),a=ut(),[o,c]=O.useState(!1),{isAnimating:u}=O.useContext(Es),l=Wa(),d=()=>{c(!0)},f=()=>{c(!1)};return O.useEffect(()=>{if(o){XC();let h=m=>{m.key==="Escape"&&c(!1)};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),ZC()}}},[o]),b.jsxs(b.Fragment,{children:[b.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:d,title:l.viewFullscreen,type:"button",children:b.jsx(s,{size:14})}),o?Ix.createPortal(b.jsx("div",{"aria-label":l.viewFullscreen,"aria-modal":"true",className:a("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:f,onKeyDown:h=>{h.key==="Escape"&&f()},role:"dialog",children:b.jsxs("div",{className:a("flex h-full flex-col"),onClick:h=>h.stopPropagation(),onKeyDown:h=>h.stopPropagation(),role:"presentation",children:[b.jsxs("div",{className:a("flex items-center justify-end gap-1 p-4"),children:[n?b.jsx(d7,{}):null,r?b.jsx(f7,{}):null,b.jsx("button",{className:a("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:f,title:l.exitFullscreen,type:"button",children:b.jsx(i,{size:20})})]}),b.jsx("div",{className:a("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:b.jsx("table",{className:a("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},Pje=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:s=!0,showFullscreen:i=!0,...a})=>{let o=ut(),c=n&&r,u=n&&s,l=n&&i,d=c||u||l;return b.jsxs("div",{className:o("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[d?b.jsxs("div",{className:o("flex items-center justify-end gap-1"),children:[c?b.jsx(d7,{}):null,u?b.jsx(f7,{}):null,l?b.jsx(Cje,{showCopy:c,showDownload:u,children:e}):null]}):null,b.jsx("div",{className:o("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:b.jsx("table",{className:o("w-full divide-y divide-border",t),"data-streamdown":"table",...a,children:e})})]})},Nje=/startLine=(\d+)/,Rje=O.lazy(()=>x(()=>Promise.resolve().then(()=>wFe),void 0).then(e=>({default:e.Mermaid}))),Oje=/language-([^\s]+)/;function lk(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,s=e.position.end,i=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&s?.line===i?.line&&s?.column===i?.column}function sn(e,t){return e.className===t.className&&lk(e.node,t.node)}var cx=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Ew=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},MD=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},c0=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},n2=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("ol",{className:s("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>sn(e,t));n2.displayName="MarkdownOl";var h7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("li",{className:s("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&lk(e.node,t.node));h7.displayName="MarkdownLi";var m7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("ul",{className:s("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>sn(e,t));m7.displayName="MarkdownUl";var p7=O.memo(({className:e,node:t,...n})=>{let r=ut();return b.jsx("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>sn(e,t));p7.displayName="MarkdownHr";var g7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("span",{className:s("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>sn(e,t));g7.displayName="MarkdownStrong";var Lje=({children:e,className:t,href:n,node:r,...s})=>{let i=ut(),{linkSafety:a}=O.useContext(Es),[o,c]=O.useState(!1),u=n==="streamdown:incomplete-link",l=O.useCallback(async m=>{if(!(!(a!=null&&a.enabled&&n)||u)){if(m.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}c(!0)}},[a,n,u]),d=O.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),f=O.useCallback(()=>{c(!1)},[]),h={url:n??"",isOpen:o,onClose:f,onConfirm:d};return a!=null&&a.enabled&&n?b.jsxs(b.Fragment,{children:[b.jsx("button",{className:i("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:l,type:"button",children:e}),a.renderModal?a.renderModal(h):b.jsx(Sje,{...h})]}):b.jsx("a",{className:i("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...s,children:e})},b7=O.memo(Lje,(e,t)=>sn(e,t)&&e.href===t.href);b7.displayName="MarkdownA";var y7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("h1",{className:s("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>sn(e,t));y7.displayName="MarkdownH1";var _7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("h2",{className:s("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>sn(e,t));_7.displayName="MarkdownH2";var k7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("h3",{className:s("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>sn(e,t));k7.displayName="MarkdownH3";var E7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("h4",{className:s("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>sn(e,t));E7.displayName="MarkdownH4";var w7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("h5",{className:s("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>sn(e,t));w7.displayName="MarkdownH5";var S7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("h6",{className:s("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>sn(e,t));S7.displayName="MarkdownH6";var v7=O.memo(({children:e,className:t,node:n,...r})=>{let{controls:s}=O.useContext(Es),i=cx(s,"table"),a=Ew(s,"copy"),o=Ew(s,"download"),c=Ew(s,"fullscreen");return b.jsx(Pje,{className:t,showControls:i,showCopy:a,showDownload:o,showFullscreen:c,...r,children:e})},(e,t)=>sn(e,t));v7.displayName="MarkdownTable";var x7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("thead",{className:s("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>sn(e,t));x7.displayName="MarkdownThead";var T7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("tbody",{className:s("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>sn(e,t));T7.displayName="MarkdownTbody";var I7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("tr",{className:s("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>sn(e,t));I7.displayName="MarkdownTr";var A7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("th",{className:s("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>sn(e,t));A7.displayName="MarkdownTh";var C7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("td",{className:s("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>sn(e,t));C7.displayName="MarkdownTd";var P7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("blockquote",{className:s("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>sn(e,t));P7.displayName="MarkdownBlockquote";var N7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("sup",{className:s("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>sn(e,t));N7.displayName="MarkdownSup";var R7=O.memo(({children:e,className:t,node:n,...r})=>{let s=ut();return b.jsx("sub",{className:s("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>sn(e,t));R7.displayName="MarkdownSub";var O7=O.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let s=a=>{var o,c;if(!O.isValidElement(a))return!1;let u=Array.isArray(a.props.children)?a.props.children:[a.props.children],l=!1,d=!1;for(let f of u)if(f){if(typeof f=="string")f.trim()!==""&&(l=!0);else if(O.isValidElement(f))if(((o=f.props)==null?void 0:o["data-footnote-backref"])!==void 0)d=!0;else{let h=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let m of h){if(typeof m=="string"&&m.trim()!==""){l=!0;break}if(O.isValidElement(m)&&((c=m.props)==null?void 0:c["data-footnote-backref"])===void 0){l=!0;break}}}}return d&&!l},i=Array.isArray(e)?e.map(a=>{if(!O.isValidElement(a))return a;if(a.type===n2){let o=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(c=>!s(c));return o.length===0?null:{...a,props:{...a.props,children:o}}}return a}):e;return(Array.isArray(i)?i.some(a=>a!==null):i!==null)?b.jsx("section",{className:t,...r,children:i}):null}return b.jsx("section",{className:t,...r,children:e})},(e,t)=>sn(e,t));O7.displayName="MarkdownSection";var Dje=({node:e,className:t,children:n,...r})=>{var s,i;let a=ut(),o=!("data-block"in r),{mermaid:c,controls:u}=O.useContext(Es),l=t2(),d=X6e(),f=t?.match(Oje),h=(s=f?.at(1))!=null?s:"",m=vje(h);if(o)return b.jsx("code",{className:a("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let y=(i=e?.properties)==null?void 0:i.metastring,g=y?.match(Nje),p=g?Number.parseInt(g[1],10):void 0,_=p!==void 0&&p>=1?p:void 0,k="";if(O.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?k=n.props.children:typeof n=="string"&&(k=n),m){let T=m.component;return b.jsx(O.Suspense,{fallback:b.jsx($D,{}),children:b.jsx(T,{code:k,isIncomplete:d,language:h})})}if(h==="mermaid"&&l){let T=cx(u,"mermaid"),I=c0(u,"download"),D=c0(u,"copy"),R=c0(u,"fullscreen"),z=c0(u,"panZoom"),V=T&&(I||D||R);return b.jsx(O.Suspense,{fallback:b.jsx($D,{}),children:b.jsxs("div",{className:a("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[b.jsx("div",{className:a("flex h-8 items-center text-muted-foreground text-xs"),children:b.jsx("span",{className:a("ml-1 font-mono lowercase"),children:"mermaid"})}),V?b.jsx("div",{className:a("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:b.jsxs("div",{className:a("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[I?b.jsx(Tje,{chart:k,config:c?.config}):null,D?b.jsx(LD,{code:k}):null,R?b.jsx(Ije,{chart:k,config:c?.config}):null]})}):null,b.jsx("div",{className:a("rounded-md border border-border bg-background"),children:b.jsx(Rje,{chart:k,config:c?.config,showControls:z})})]})})}let v=cx(u,"code"),w=MD(u,"download"),S=MD(u,"copy");return b.jsx(cje,{className:t,code:k,isIncomplete:d,language:h,startLine:_,children:v?b.jsxs(b.Fragment,{children:[w?b.jsx(kje,{code:k,language:h}):null,S?b.jsx(LD,{}):null]}):null})},L7=O.memo(Dje,(e,t)=>e.className===t.className&&lk(e.node,t.node));L7.displayName="MarkdownCode";var D7=O.memo(wje,(e,t)=>e.className===t.className&&lk(e.node,t.node));D7.displayName="MarkdownImg";var $7=O.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(s=>s!=null&&s!=="");if(r.length===1&&O.isValidElement(r[0])){let s=r[0].props.node,i=s?.tagName;if(i==="img")return b.jsx(b.Fragment,{children:e});if(i==="code"&&"data-block"in r[0].props)return b.jsx(b.Fragment,{children:e})}return b.jsx("p",{...n,children:e})},(e,t)=>sn(e,t));$7.displayName="MarkdownParagraph";var $je={ol:n2,li:h7,ul:m7,hr:p7,strong:g7,a:b7,h1:y7,h2:_7,h3:k7,h4:E7,h5:w7,h6:S7,table:v7,thead:x7,tbody:T7,tr:I7,th:A7,td:C7,blockquote:P7,code:L7,img:D7,pre:({children:e})=>O.isValidElement(e)?O.cloneElement(e,{"data-block":"true"}):e,sup:N7,sub:R7,p:$7,section:O7},Mje=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,jje=new RegExp("\\p{L}","u");function jD(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(Mje.test(n))return"rtl";if(jje.test(n))return"ltr"}return"ltr"}var Fje=/^[ \t]{0,3}(`{3,}|~{3,})/,Bje=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,FD=e=>{let t=e.split(`
|
|
379
|
+
`),n=null,r=0;for(let s of t){let i=Fje.exec(s);if(n===null){if(i){let a=i[1];n=a[0],r=a.length}}else if(i){let a=i[1],o=a[0],c=a.length;o===n&&c>=r&&(n=null,r=0)}}return n!==null},zje=e=>{let t=e.split(`
|
|
380
|
+
`);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&Bje.test(r))return!0}return!1},Uje=()=>e=>{Zi(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},BD=[],zD={allowDangerousHtml:!0},u0=new WeakMap,Vje=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,s=e.remarkRehypeOptions;if(!(n||r||s)){let l="default";return this.keyCache.set(e,l),l}let i=l=>{if(!l||l.length===0)return"";let d="";for(let f=0;f<l.length;f+=1){let h=l[f];if(f>0&&(d+=","),Array.isArray(h)){let[m,y]=h;if(typeof m=="function"){let g=u0.get(m);g||(g=m.name,u0.set(m,g)),d+=g}else d+=String(m);d+=":",d+=JSON.stringify(y)}else if(typeof h=="function"){let m=u0.get(h);m||(m=h.name,u0.set(h,m)),d+=m}else d+=String(h)}return d},a=i(n),o=i(r),c=s?JSON.stringify(s):"",u=`${o}::${a}::${c}`;return this.keyCache.set(e,u),u}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},UD=new Vje,M7=e=>{let t=Hje(e),n=e.children||"",r=t.runSync(t.parse(n),n);return Qje(r,e)},Hje=e=>{let t=UD.get(e);if(t)return t;let n=Gje(e);return UD.set(e,n),n},qje=e=>e.some(t=>Array.isArray(t)?t[0]===Gv:t===Gv),Gje=e=>{let t=e.rehypePlugins||BD,n=e.remarkPlugins||BD,r=qje(t)?n:[...n,Uje],s=e.remarkRehypeOptions?{...zD,...e.remarkRehypeOptions}:zD;return GMe().use(q$e).use(r).use(IMe,s).use(t)},Kje=e=>e,Wje=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},Jje=(e,t)=>{var n;for(let r in dw)if(Object.hasOwn(dw,r)&&Object.hasOwn(e.properties,r)){let s=e.properties[r],i=dw[r];(i===null||i.includes(e.tagName))&&(e.properties[r]=(n=t(String(s||""),r,e))!=null?n:void 0)}},Yje=(e,t,n,r,s,i)=>{let a=!1;return r?a=!r.includes(e.tagName):s&&(a=s.includes(e.tagName)),!a&&i&&typeof t=="number"&&(a=!i(e,t,n)),a},Qje=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:s,skipHtml:i,unwrapDisallowed:a,urlTransform:o}=t;if(n||r||s||i||o){let c=o||Kje;Zi(e,(u,l,d)=>{if(u.type==="raw"&&d&&typeof l=="number")return Wje(d,l,i,u.value),l;if(u.type==="element"&&(Jje(u,c),Yje(u,l,d,r,s,n)&&d&&typeof l=="number"))return a&&u.children?d.children.splice(l,1,...u.children):d.children.splice(l,1),l})}return ZDe(e,{Fragment:b.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0})},Xje=/\[\^[\w-]{1,200}\](?!:)/,Zje=/\[\^[\w-]{1,200}\]:/,e4e=/<(\w+)[\s>]/,t4e=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),VD=new Map,HD=new Map,n4e=e=>{let t=e.toLowerCase(),n=VD.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return VD.set(t,r),r},r4e=e=>{let t=e.toLowerCase(),n=HD.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return HD.set(t,r),r},qD=(e,t)=>{if(t4e.has(t.toLowerCase()))return 0;let n=e.match(n4e(t));if(!n)return 0;let r=0;for(let s of n)s.trimEnd().endsWith("/>")||(r+=1);return r},GD=(e,t)=>{let n=e.match(r4e(t));return n?n.length:0},s4e=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},i4e=e=>{let t=Xje.test(e),n=Zje.test(e);if(t||n)return[e];let r=Ls.lex(e,{gfm:!0}),s=[],i=[],a=!1;for(let o of r){let c=o.raw,u=s.length;if(i.length>0){s[u-1]+=c;let l=i.at(-1),d=qD(c,l),f=GD(c,l);for(let h=0;h<d;h+=1)i.push(l);for(let h=0;h<f;h+=1)i.length>0&&i.at(-1)===l&&i.pop();continue}if(o.type==="html"&&o.block){let l=c.match(e4e);if(l){let d=l[1],f=qD(c,d),h=GD(c,d);f>h&&i.push(d)}}if(u>0&&!a){let l=s[u-1];if(s4e(l)%2===1){s[u-1]=l+c;continue}}s.push(c),o.type!=="space"&&(a=o.type==="code")}return s},a4e=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let s=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(s,(i,a,o,c)=>{let u=o.replace(/\n\n/g,`
|
|
381
|
+
<!---->
|
|
382
|
+
`);return a+u+c})}return n},o4e=/([\\`*_~[\]|])/g,c4e=e=>e.replace(o4e,"\\$1"),u4e=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let s=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(s,(i,a,o,c)=>a+c4e(o)+c)}return n},j7=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(j7).join(""):"",l4e=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));Zi(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let s=j7(r);r.children=s?[{type:"text",value:s}]:[]}})},d4e=()=>e=>{Zi(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},f4e=/^[ \t]*<[\w!/?-]/,h4e=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,m4e=e=>typeof e!="string"||e.length===0||!f4e.test(e)?e:e.replace(h4e,"$1"),KD,WD,JD,YD,Q0={...Ac,protocols:{...Ac.protocols,href:[...(WD=(KD=Ac.protocols)==null?void 0:KD.href)!=null?WD:[],"tel"]},attributes:{...Ac.attributes,code:[...(YD=(JD=Ac.attributes)==null?void 0:JD.code)!=null?YD:[],"metastring"]}},ux={raw:Gv,sanitize:[KV,Q0],harden:[SCe,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},p4e={gfm:[R3e,{}],codeMeta:d4e},QD=Object.values(ux),g4e=Object.values(p4e),b4e={block:" ▋",circle:" ●"},y4e={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Es=O.createContext(y4e),F7=O.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:s,dir:i,animatePlugin:a,...o})=>{if(a){let l=a.getLastRenderCharCount();a.setPrevContentLength(l)}let c=typeof e=="string"&&n?m4e(e):e,u=b.jsx(M7,{...o,children:c});return b.jsx(s7.Provider,{value:s,children:i?b.jsx("div",{dir:i,style:{display:"contents"},children:u}):u})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(s=>{var i,a;return((i=e.components)==null?void 0:i[s])!==((a=t.components)==null?void 0:a[s])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});F7.displayName="Block";var _4e=["github-light","github-dark"],B7=O.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:s=!1,components:i,rehypePlugins:a=QD,remarkPlugins:o=g4e,className:c,shikiTheme:u=_4e,mermaid:l,controls:d=!0,isAnimating:f=!1,animated:h,BlockComponent:m=F7,parseMarkdownIntoBlocksFn:y=i4e,caret:g,plugins:p,remend:_,linkSafety:k={enabled:!0},allowedTags:v,literalTagContent:w,translations:S,icons:T,prefix:I,onAnimationStart:D,onAnimationEnd:R,...z})=>{let V=O.useId(),[H,G]=O.useTransition(),Q=O.useMemo(()=>eje(I),[I]),ne=O.useRef(null),me=O.useRef(D),ke=O.useRef(R);me.current=D,ke.current=R,O.useEffect(()=>{var Ie,Me,mt;if(t==="static")return;let it=ne.current;if(ne.current=f,it===null){f&&((Ie=me.current)==null||Ie.call(me));return}f&&!it?(Me=me.current)==null||Me.call(me):!f&&it&&((mt=ke.current)==null||mt.call(ke))},[f,t]);let et=O.useMemo(()=>v?Object.keys(v):[],[v]),C=O.useMemo(()=>{if(typeof e!="string")return"";let Ie=t==="streaming"&&r?FDe(e,_):e;return w&&w.length>0&&(Ie=u4e(Ie,w)),et.length>0&&(Ie=a4e(Ie,et)),Ie},[e,t,r,_,et,w]),M=O.useMemo(()=>y(C),[C,y]),[K,A]=O.useState(M);O.useEffect(()=>{t==="streaming"&&!ge?G(()=>{A(M)}):A(M)},[M,t]);let N=t==="streaming"?K:M,B=O.useMemo(()=>n==="auto"?N.map(jD):void 0,[N,n]),J=O.useMemo(()=>N.map((Ie,Me)=>`${V}-${Me}`),[N.length,V]),be=O.useMemo(()=>h===!0?"true":h?JSON.stringify(h):"",[h]),ge=O.useMemo(()=>be?be==="true"?rx():rx(h):null,[be]),Ee=O.useMemo(()=>{var Ie,Me;return{shikiTheme:(Me=(Ie=p?.code)==null?void 0:Ie.getThemes())!=null?Me:u,controls:d,isAnimating:f,mode:t,mermaid:l,linkSafety:k}},[u,d,f,t,l,k,p?.code]),Re=O.useMemo(()=>S?JSON.stringify(S):"",[S]),q=O.useMemo(()=>({...c7,...S}),[Re]),W=O.useMemo(()=>{let{inlineCode:Ie,...Me}=i??{},mt={...$je,...Me};if(Ie){let it=mt.code;mt.code=At=>"data-block"in At?it?O.createElement(it,At):null:O.createElement(Ie,At)}return mt},[i]),se=O.useMemo(()=>{let Ie=[];return p!=null&&p.cjk&&(Ie=[...Ie,...p.cjk.remarkPluginsBefore]),Ie=[...Ie,...o],p!=null&&p.cjk&&(Ie=[...Ie,...p.cjk.remarkPluginsAfter]),p!=null&&p.math&&(Ie=[...Ie,p.math.remarkPlugin]),Ie},[o,p?.math,p?.cjk]),le=O.useMemo(()=>{var Ie;let Me=a;if(v&&Object.keys(v).length>0&&a===QD){let mt={...Q0,tagNames:[...(Ie=Q0.tagNames)!=null?Ie:[],...Object.keys(v)],attributes:{...Q0.attributes,...v}};Me=[ux.raw,[KV,mt],ux.harden]}return w&&w.length>0&&(Me=[...Me,[l4e,w]]),p!=null&&p.math&&(Me=[...Me,p.math.rehypePlugin]),ge&&f&&(Me=[...Me,ge.rehypePlugin]),Me},[a,p?.math,ge,f,v,w]),we=O.useMemo(()=>{if(!f||N.length===0)return!1;let Ie=N.at(-1);return FD(Ie)||zje(Ie)},[f,N]),Fe=O.useMemo(()=>g&&f&&!we?{"--streamdown-caret":`"${b4e[g]}"`}:void 0,[g,f,we]);return t==="static"?b.jsx(ix.Provider,{value:q,children:b.jsx(ax.Provider,{value:p??null,children:b.jsx(Es.Provider,{value:Ee,children:b.jsx(OD,{icons:T,children:b.jsx(sx.Provider,{value:Q,children:b.jsx("div",{className:Q("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",c),dir:n==="auto"?jD(C):n,children:b.jsx(M7,{components:W,rehypePlugins:le,remarkPlugins:se,...z,children:C})})})})})})}):b.jsx(ix.Provider,{value:q,children:b.jsx(ax.Provider,{value:p??null,children:b.jsx(Es.Provider,{value:Ee,children:b.jsx(OD,{icons:T,children:b.jsx(sx.Provider,{value:Q,children:b.jsxs("div",{className:Q("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",g&&!we?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,c),style:Fe,children:[N.length===0&&g&&f&&b.jsx("span",{}),N.map((Ie,Me)=>{var mt;let it=Me===N.length-1,At=f&&it&&FD(Ie);return b.jsx(m,{animatePlugin:ge,components:W,content:Ie,dir:(mt=B?.[Me])!=null?mt:n!=="auto"?n:void 0,index:Me,isIncomplete:At,rehypePlugins:le,remarkPlugins:se,shouldNormalizeHtmlIndentation:s,shouldParseIncompleteMarkdown:r,...z},J[Me])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);B7.displayName="Streamdown";var k4e=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:s=.1,showControls:i=!0,initialZoom:a=1,fullscreen:o=!1})=>{let{RotateCcwIcon:c,ZoomInIcon:u,ZoomOutIcon:l}=Ai(),d=ut(),f=O.useRef(null),h=O.useRef(null),[m,y]=O.useState(a),[g,p]=O.useState({x:0,y:0}),[_,k]=O.useState(!1),[v,w]=O.useState({x:0,y:0}),[S,T]=O.useState({x:0,y:0}),I=O.useCallback(ne=>{y(me=>Math.max(n,Math.min(r,me+ne)))},[n,r]),D=O.useCallback(()=>{I(s)},[I,s]),R=O.useCallback(()=>{I(-s)},[I,s]),z=O.useCallback(()=>{y(a),p({x:0,y:0})},[a]),V=O.useCallback(ne=>{ne.preventDefault();let me=ne.deltaY>0?-s:s;I(me)},[I,s]),H=O.useCallback(ne=>{if(ne.button!==0||ne.isPrimary===!1)return;k(!0),w({x:ne.clientX,y:ne.clientY}),T(g);let me=ne.currentTarget;me instanceof HTMLElement&&me.setPointerCapture(ne.pointerId)},[g]),G=O.useCallback(ne=>{if(!_)return;ne.preventDefault();let me=ne.clientX-v.x,ke=ne.clientY-v.y;p({x:S.x+me,y:S.y+ke})},[_,v,S]),Q=O.useCallback(ne=>{k(!1);let me=ne.currentTarget;me instanceof HTMLElement&&me.releasePointerCapture(ne.pointerId)},[]);return O.useEffect(()=>{let ne=f.current;if(ne)return ne.addEventListener("wheel",V,{passive:!1}),()=>{ne.removeEventListener("wheel",V)}},[V]),O.useEffect(()=>{let ne=h.current;if(ne&&_)return document.body.style.userSelect="none",ne.addEventListener("pointermove",G,{passive:!1}),ne.addEventListener("pointerup",Q),ne.addEventListener("pointercancel",Q),()=>{document.body.style.userSelect="",ne.removeEventListener("pointermove",G),ne.removeEventListener("pointerup",Q),ne.removeEventListener("pointercancel",Q)}},[_,G,Q]),b.jsxs("div",{className:d("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:f,style:{cursor:_?"grabbing":"grab"},children:[i?b.jsxs("div",{className:d("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[b.jsx("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:m>=r,onClick:D,title:"Zoom in",type:"button",children:b.jsx(u,{size:16})}),b.jsx("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:m<=n,onClick:R,title:"Zoom out",type:"button",children:b.jsx(l,{size:16})}),b.jsx("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:z,title:"Reset zoom and pan",type:"button",children:b.jsx(c,{size:16})})]}):null,b.jsx("div",{className:d("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:H,ref:h,role:"application",style:{transform:`translate(${g.x}px, ${g.y}px) scale(${m})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},z7=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:s=!0})=>{let i=ut(),[a,o]=O.useState(null),[c,u]=O.useState(!1),[l,d]=O.useState(""),[f,h]=O.useState(""),[m,y]=O.useState(0),{mermaid:g}=O.useContext(Es),p=t2(),_=g?.errorComponent,{shouldRender:k,containerRef:v}=U6e({immediate:r});if(O.useEffect(()=>{if(k){if(!p){o("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{o(null),u(!0);let S=p.getMermaid(n),T=e.split("").reduce((R,z)=>(R<<5)-R+z.charCodeAt(0)|0,0),I=`mermaid-${Math.abs(T)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:D}=await S.render(I,e);d(D),h(D)}catch(S){if(!(f||l)){let T=S instanceof Error?S.message:"Failed to render Mermaid chart";o(T)}}finally{u(!1)}})()}},[e,n,m,k,p]),!(k||l||f))return b.jsx("div",{className:i("my-4 min-h-[200px]",t),ref:v});if(c&&!l&&!f)return b.jsx("div",{className:i("my-4 flex justify-center p-4",t),ref:v,children:b.jsxs("div",{className:i("flex items-center space-x-2 text-muted-foreground"),children:[b.jsx("div",{className:i("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),b.jsx("span",{className:i("text-sm"),children:"Loading diagram..."})]})});if(a&&!l&&!f){let S=()=>y(T=>T+1);return _?b.jsx("div",{ref:v,children:b.jsx(_,{chart:e,error:a,retry:S})}):b.jsxs("div",{className:i("rounded-md bg-red-50 p-4",t),ref:v,children:[b.jsxs("p",{className:i("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",a]}),b.jsxs("details",{className:i("mt-2"),children:[b.jsx("summary",{className:i("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),b.jsx("pre",{className:i("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let w=l||f;return b.jsx("div",{className:i("size-full",t),"data-streamdown":"mermaid",ref:v,children:b.jsx(k4e,{className:i(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:s,zoomStep:.1,children:b.jsx("div",{"aria-label":"Mermaid chart",className:i("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:w},role:"img"})})})};let En=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Vy(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[s,i]of Object.entries(t?.colorReplacements||{}))typeof i=="string"?n[s]=i:s===r&&Object.assign(n,i);return n}function Co(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function E4e(e){return Array.isArray(e)?e:[e]}async function U7(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function r2(e){return!e||["plaintext","txt","text","plain"].includes(e)}function V7(e){return e==="ansi"||r2(e)}function s2(e){return e==="none"}function H7(e){return s2(e)}function q7(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function dk(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const s=[];for(let i=0;i<n.length;i+=2){const a=t?n[i]+(n[i+1]||""):n[i];s.push([a,r]),r+=n[i].length,r+=n[i+1]?.length||0}return s}function w4e(e){const t=dk(e,!0).map(([s])=>s);function n(s){if(s===e.length)return{line:t.length-1,character:t[t.length-1].length};let i=s,a=0;for(const o of t){if(i<o.length)break;i-=o.length,a++}return{line:a,character:i}}function r(s,i){let a=0;for(let o=0;o<s;o++)a+=t[o].length;return a+=i,a}return{lines:t,indexToPos:n,posToIndex:r}}const i2="light-dark()",S4e=["color","background-color"];function v4e(e,t){let n=0;const r=[];for(const s of t)s>n&&r.push({...e,content:e.content.slice(n,s),offset:e.offset+n}),n=s;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function x4e(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,s)=>r-s);return n.length?e.map(r=>r.flatMap(s=>{const i=n.filter(a=>s.offset<a&&a<s.offset+s.content.length).map(a=>a-s.offset).sort((a,o)=>a-o);return i.length?v4e(s,i):s})):e}function T4e(e,t,n,r,s="css-vars"){const i={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(l=>Hy(e.variants[l])),o=new Set(a.flatMap(l=>Object.keys(l))),c={},u=(l,d)=>{const f=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return n+t[l]+(d==="color"?"":f)};return a.forEach((l,d)=>{for(const f of o){const h=l[f]||"inherit";if(d===0&&r&&S4e.includes(f))if(r===i2&&a.length>1){const m=t.findIndex(_=>_==="light"),y=t.findIndex(_=>_==="dark");if(m===-1||y===-1)throw new En('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const g=a[m][f]||"inherit",p=a[y][f]||"inherit";c[f]=`light-dark(${g}, ${p})`,s==="css-vars"&&(c[u(d,f)]=h)}else c[f]=h;else s==="css-vars"&&(c[u(d,f)]=h)}}),i.htmlStyle=c,i}function Hy(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&xt.Italic&&(t["font-style"]="italic"),e.fontStyle&xt.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&xt.Underline&&n.push("underline"),e.fontStyle&xt.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function lx(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const G7=new WeakMap;function fk(e,t){G7.set(e,t)}function Im(e){return G7.get(e)}class rf{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new rf(Object.fromEntries(E4e(n).map(r=>[r,gd])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,s]=t;this.lang=r,this._stacks={[s]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return I4e(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function I4e(e){const t=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);const i=s?.nameScopesList?.scopeName;i&&t.push(i),s.parent&&r(s.parent)}return r(e),t}function A4e(e,t){if(!(e instanceof rf))throw new En("Invalid grammar state");return e.getInternalStack(t)}function C4e(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new En(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...s.indexToPos(a),offset:a}}else{const o=s.lines[a.line];if(o===void 0)throw new En(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${s.lines.length}`);let c=a.character;if(c<0&&(c=o.length+c),c<0||c>o.length)throw new En(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${o.length}`);return{...a,character:c,offset:s.posToIndex(a.line,c)}}};const s=w4e(n.source),i=(n.options.decorations||[]).map(a=>({...a,start:r(a.start),end:r(a.end)}));P4e(i),e.set(n.meta,{decorations:i,converter:s,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const s=t(this).decorations.flatMap(a=>[a.start.offset,a.end.offset]);return x4e(n,s)},code(n){if(!this.options.decorations?.length)return;const r=t(this),s=Array.from(n.children).filter(l=>l.type==="element"&&l.tagName==="span");if(s.length!==r.converter.lines.length)throw new En(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(l,d,f,h){const m=s[l];let y="",g=-1,p=-1;if(d===0&&(g=0),f===0&&(p=0),f===Number.POSITIVE_INFINITY&&(p=m.children.length),g===-1||p===-1)for(let k=0;k<m.children.length;k++)y+=K7(m.children[k]),g===-1&&y.length===d&&(g=k+1),p===-1&&y.length===f&&(p=k+1);if(g===-1)throw new En(`Failed to find start index for decoration ${JSON.stringify(h.start)}`);if(p===-1)throw new En(`Failed to find end index for decoration ${JSON.stringify(h.end)}`);const _=m.children.slice(g,p);if(!h.alwaysWrap&&_.length===m.children.length)o(m,h,"line");else if(!h.alwaysWrap&&_.length===1&&_[0].type==="element")o(_[0],h,"token");else{const k={type:"element",tagName:"span",properties:{},children:_};o(k,h,"wrapper"),m.children.splice(g,_.length,k)}}function a(l,d){s[l]=o(s[l],d,"line")}function o(l,d,f){const h=d.properties||{},m=d.transform||(y=>y);return l.tagName=d.tagName||"span",l.properties={...l.properties,...h,class:l.properties.class},d.properties?.class&&q7(l,d.properties.class),l=m(l,f)||l,l}const c=[],u=r.decorations.sort((l,d)=>d.start.offset-l.start.offset||l.end.offset-d.end.offset);for(const l of u){const{start:d,end:f}=l;if(d.line===f.line)i(d.line,d.character,f.character,l);else if(d.line<f.line){i(d.line,d.character,Number.POSITIVE_INFINITY,l);for(let h=d.line+1;h<f.line;h++)c.unshift(()=>a(h,l));i(f.line,0,f.character,l)}}c.forEach(l=>l())}}}function P4e(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new En(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const s=e[r],i=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,a=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset,o=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,c=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset;if(i||a||o||c){if(i&&a||o&&c||o&&n.start.offset===n.end.offset||a&&s.start.offset===s.end.offset)continue;throw new En(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function K7(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(K7).join(""):""}const N4e=[C4e()];function qy(e){const t=R4e(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...N4e]}function R4e(e){const t=[],n=[],r=[];for(const s of e)switch(s.enforce){case"pre":t.push(s);break;case"post":n.push(s);break;default:r.push(s)}return{pre:t,post:n,normal:r}}var Bc=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ww={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function O4e(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function XD(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function L4e(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)ww[r]&&t.push({type:"setDecoration",value:ww[r]});else if(r<=29){const s=ww[r-20];s&&(t.push({type:"resetDecoration",value:s}),s==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Bc[r-30]}});else if(r===38){const s=XD(e);s&&t.push({type:"setForegroundColor",value:s})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Bc[r-40]}});else if(r===48){const s=XD(e);s&&t.push({type:"setBackgroundColor",value:s})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Bc[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Bc[r-100+8]}})}return t}function D4e(){let e=null,t=null,n=new Set;return{parse(r){const s=[];let i=0;do{const a=O4e(r,i),o=a.sequence?r.substring(i,a.startPosition):r.substring(i);if(o.length>0&&s.push({value:o,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const c=L4e(a.sequence);for(const u of c)u.type==="resetAll"?(e=null,t=null,n.clear()):u.type==="resetForegroundColor"?e=null:u.type==="resetBackgroundColor"?t=null:u.type==="resetDecoration"&&n.delete(u.value);for(const u of c)u.type==="setForegroundColor"?e=u.value:u.type==="setBackgroundColor"?t=u.value:u.type==="setDecoration"&&n.add(u.value)}i=a.position}while(i<r.length);return s}}}var $4e={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function M4e(e=$4e){function t(o){return e[o]}function n(o){return`#${o.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let u=0;u<Bc.length;u++)r.push(t(Bc[u]));let o=[0,95,135,175,215,255];for(let u=0;u<6;u++)for(let l=0;l<6;l++)for(let d=0;d<6;d++)r.push(n([o[u],o[l],o[d]]));let c=8;for(let u=0;u<24;u++,c+=10)r.push(n([c,c,c]));return r}function i(o){return s()[o]}function a(o){switch(o.type){case"named":return t(o.name);case"rgb":return n(o.rgb);case"table":return i(o.index)}}return{value:a}}const j4e={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function F4e(e,t,n){const r=Vy(e,n),s=dk(t),i=Object.fromEntries(Bc.map(c=>{const u=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`,l=e.colors?.[u];return[c,l||j4e[c]]})),a=M4e(i),o=D4e();return s.map(c=>o.parse(c[0]).map(u=>{let l,d;u.decorations.has("reverse")?(l=u.background?a.value(u.background):e.bg,d=u.foreground?a.value(u.foreground):e.fg):(l=u.foreground?a.value(u.foreground):e.fg,d=u.background?a.value(u.background):void 0),l=Co(l,r),d=Co(d,r),u.decorations.has("dim")&&(l=B4e(l));let f=xt.None;return u.decorations.has("bold")&&(f|=xt.Bold),u.decorations.has("italic")&&(f|=xt.Italic),u.decorations.has("underline")&&(f|=xt.Underline),u.decorations.has("strikethrough")&&(f|=xt.Strikethrough),{content:u.value,offset:c[1],color:l,bgColor:d,fontStyle:f}}))}function B4e(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const r=t[1];if(r.length===8){const s=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${s}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const s=r[0],i=r[1],a=r[2],o=r[3],c=Math.round(Number.parseInt(`${o}${o}`,16)/2).toString(16).padStart(2,"0");return`#${s}${s}${i}${i}${a}${a}${c}`}else if(r.length===3){const s=r[0],i=r[1],a=r[2];return`#${s}${s}${i}${i}${a}${a}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function a2(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,s=e.resolveLangAlias(n.lang||"text");if(r2(s)||s2(r))return dk(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:i,colorMap:a}=e.setTheme(r);if(s==="ansi")return F4e(i,t,n);const o=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new En(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new En(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return U4e(t,o,i,a,n)}function z4e(...e){if(e.length===2)return Im(e[1]);const[t,n,r={}]=e,{lang:s="text",theme:i=t.getLoadedThemes()[0]}=r;if(r2(s)||s2(i))throw new En("Plain language does not have grammar state");if(s==="ansi")throw new En("ANSI language does not have grammar state");const{theme:a,colorMap:o}=t.setTheme(i),c=t.getLanguage(s);return new rf(o2(n,c,a,o,r).stateStack,c.name,a.name)}function U4e(e,t,n,r,s){const i=o2(e,t,n,r,s),a=new rf(i.stateStack,t.name,n.name);return fk(i.tokens,a),i.tokens}function o2(e,t,n,r,s){const i=Vy(n,s),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:o=500}=s,c=dk(e);let u=s.grammarState?A4e(s.grammarState,n.name)??gd:s.grammarContextCode!=null?o2(s.grammarContextCode,t,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:gd,l=[];const d=[];for(let f=0,h=c.length;f<h;f++){const[m,y]=c[f];if(m===""){l=[],d.push([]);continue}if(a>0&&m.length>=a){l=[],d.push([{content:m,offset:y,color:"",fontStyle:0}]);continue}let g,p,_;s.includeExplanation&&(g=t.tokenizeLine(m,u,o),p=g.tokens,_=0);const k=t.tokenizeLine2(m,u,o),v=k.tokens.length/2;for(let w=0;w<v;w++){const S=k.tokens[2*w],T=w+1<v?k.tokens[2*w+2]:m.length;if(S===T)continue;const I=k.tokens[2*w+1],D=Co(r[Ho.getForeground(I)],i),R=Ho.getFontStyle(I),z={content:m.substring(S,T),offset:y+S,color:D,fontStyle:R};if(s.includeExplanation){const V=[];if(s.includeExplanation!=="scopeName")for(const G of n.settings){let Q;switch(typeof G.scope){case"string":Q=G.scope.split(/,/).map(ne=>ne.trim());break;case"object":Q=G.scope;break;default:continue}V.push({settings:G,selectors:Q.map(ne=>ne.split(/ /))})}z.explanation=[];let H=0;for(;S+H<T;){const G=p[_],Q=m.substring(G.startIndex,G.endIndex);H+=Q.length,z.explanation.push({content:Q,scopes:s.includeExplanation==="scopeName"?V4e(G.scopes):H4e(V,G.scopes)}),_+=1}}l.push(z)}d.push(l),l=[],u=k.ruleStack}return{tokens:d,stateStack:u}}function V4e(e){return e.map(t=>({scopeName:t}))}function H4e(e,t){const n=[];for(let r=0,s=t.length;r<s;r++){const i=t[r];n[r]={scopeName:i,themeMatches:G4e(e,i,t.slice(0,r))}}return n}function ZD(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function q4e(e,t,n){if(!ZD(e[e.length-1],t))return!1;let r=e.length-2,s=n.length-1;for(;r>=0&&s>=0;)ZD(e[r],n[s])&&(r-=1),s-=1;return r===-1}function G4e(e,t,n){const r=[];for(const{selectors:s,settings:i}of e)for(const a of s)if(q4e(a,t,n)){r.push(i);break}return r}function W7(e,t,n){const r=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),s=r.map(c=>{const u=a2(e,t,{...n,theme:c.theme}),l=Im(u),d=typeof c.theme=="string"?c.theme:c.theme.name;return{tokens:u,state:l,theme:d}}),i=K4e(...s.map(c=>c.tokens)),a=i[0].map((c,u)=>c.map((l,d)=>{const f={content:l.content,variants:{},offset:l.offset};return"includeExplanation"in n&&n.includeExplanation&&(f.explanation=l.explanation),i.forEach((h,m)=>{const{content:y,explanation:g,offset:p,..._}=h[u][d];f.variants[r[m].color]=_}),f})),o=s[0].state?new rf(Object.fromEntries(s.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),s[0].state.lang):void 0;return o&&fk(a,o),a}function K4e(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const s=e.map(c=>c[r]),i=t.map(()=>[]);t.forEach((c,u)=>c.push(i[u]));const a=s.map(()=>0),o=s.map(c=>c[0]);for(;o.every(c=>c);){const c=Math.min(...o.map(u=>u.content.length));for(let u=0;u<n;u++){const l=o[u];l.content.length===c?(i[u].push(l),a[u]+=1,o[u]=s[u][a[u]]):(i[u].push({...l,content:l.content.slice(0,c)}),o[u]={...l,content:l.content.slice(c),offset:l.offset+c})}}}return t}function Gy(e,t,n){let r,s,i,a,o,c;if("themes"in n){const{defaultColor:u="light",cssVariablePrefix:l="--shiki-",colorsRendering:d="css-vars"}=n,f=Object.entries(n.themes).filter(p=>p[1]).map(p=>({color:p[0],theme:p[1]})).sort((p,_)=>p.color===u?-1:_.color===u?1:0);if(f.length===0)throw new En("`themes` option must not be empty");const h=W7(e,t,n);if(c=Im(h),u&&i2!==u&&!f.find(p=>p.color===u))throw new En(`\`themes\` option must contain the defaultColor key \`${u}\``);const m=f.map(p=>e.getTheme(p.theme)),y=f.map(p=>p.color);i=h.map(p=>p.map(_=>T4e(_,y,l,u,d))),c&&fk(i,c);const g=f.map(p=>Vy(p.theme,n));s=e$(f,m,g,l,u,"fg",d),r=e$(f,m,g,l,u,"bg",d),a=`shiki-themes ${m.map(p=>p.name).join(" ")}`,o=u?void 0:[s,r].join(";")}else if("theme"in n){const u=Vy(n.theme,n);i=a2(e,t,n);const l=e.getTheme(n.theme);r=Co(l.bg,u),s=Co(l.fg,u),a=l.name,c=Im(i)}else throw new En("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:s,bg:r,themeName:a,rootStyle:o,grammarState:c}}function e$(e,t,n,r,s,i,a){return e.map((o,c)=>{const u=Co(t[c][i],n[c])||"inherit",l=`${r+o.color}${i==="bg"?"-bg":""}:${u}`;if(c===0&&s){if(s===i2&&e.length>1){const d=e.findIndex(y=>y.color==="light"),f=e.findIndex(y=>y.color==="dark");if(d===-1||f===-1)throw new En('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const h=Co(t[d][i],n[d])||"inherit",m=Co(t[f][i],n[f])||"inherit";return`light-dark(${h}, ${m});${l}`}return u}return a==="css-vars"?l:null}).filter(o=>!!o).join(";")}function Ky(e,t,n,r={meta:{},options:n,codeToHast:(s,i)=>Ky(e,s,i),codeToTokens:(s,i)=>Gy(e,s,i)}){let s=t;for(const m of qy(n))s=m.preprocess?.call(r,s,n)||s;let{tokens:i,fg:a,bg:o,themeName:c,rootStyle:u,grammarState:l}=Gy(e,s,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?i=J4e(i):d==="never"&&(i=Y4e(i)),f&&(i=Q4e(i));const h={...r,get source(){return s}};for(const m of qy(n))i=m.tokens?.call(h,i)||i;return W4e(i,{...n,fg:a,bg:o,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??u},h,l)}function W4e(e,t,n,r=Im(e)){const s=qy(t),i=[],a={type:"root",children:[]},{structure:o="classic",tabindex:c="0"}=t,u={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?u.style=t.rootStyle:u.style=`background-color:${t.bg};color:${t.fg}`),c!==!1&&c!=null&&(u.tabindex=c.toString());for(const[y,g]of Object.entries(t.meta||{}))y.startsWith("_")||(u[y]=g);let l={type:"element",tagName:"pre",properties:u,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:i};const f=[],h={...n,structure:o,addClassToHast:q7,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return l},get code(){return d},get lines(){return f}};if(e.forEach((y,g)=>{g&&(o==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):o==="classic"&&i.push({type:"text",value:`
|
|
383
|
+
`}));let p={type:"element",tagName:"span",properties:{class:"line"},children:[]},_=0;for(const k of y){let v={type:"element",tagName:"span",properties:{...k.htmlAttrs},children:[{type:"text",value:k.content}]};const w=lx(k.htmlStyle||Hy(k));w&&(v.properties.style=w);for(const S of s)v=S?.span?.call(h,v,g+1,_,p,k)||v;o==="inline"?a.children.push(v):o==="classic"&&p.children.push(v),_+=k.content.length}if(o==="classic"){for(const k of s)p=k?.line?.call(h,p,g+1)||p;f.push(p),i.push(p)}else o==="inline"&&f.push(p)}),o==="classic"){for(const y of s)d=y?.code?.call(h,d)||d;l.children.push(d);for(const y of s)l=y?.pre?.call(h,l)||l;a.children.push(l)}else if(o==="inline"){const y=[];let g={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const k of a.children)k.type==="element"&&k.tagName==="br"?(y.push(g),g={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(k.type==="element"||k.type==="text")&&g.children.push(k);y.push(g);let _={type:"element",tagName:"code",properties:{},children:y};for(const k of s)_=k?.code?.call(h,_)||_;a.children=[];for(let k=0;k<_.children.length;k++){k>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const v=_.children[k];v.type==="element"&&a.children.push(...v.children)}}let m=a;for(const y of s)m=y?.root?.call(h,m)||m;return r&&fk(m,r),m}function J4e(e){return e.map(t=>{const n=[];let r="",s;return t.forEach((i,a)=>{const c=!(i.fontStyle&&(i.fontStyle&xt.Underline||i.fontStyle&xt.Strikethrough));c&&i.content.match(/^\s+$/)&&t[a+1]?(s===void 0&&(s=i.offset),r+=i.content):r?(c?n.push({...i,offset:s,content:r+i.content}):n.push({content:r,offset:s},i),s=void 0,r=""):n.push(i)}),n})}function Y4e(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,s,i,a]=r;if(!s&&!a)return n;const o=[{...n,offset:n.offset+s.length,content:i}];return s&&o.unshift({content:s,offset:n.offset}),a&&o.push({content:a,offset:n.offset+s.length+i.length}),o}))}function Q4e(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const s=n[n.length-1],i=lx(s.htmlStyle||Hy(s)),a=lx(r.htmlStyle||Hy(r)),o=s.fontStyle&&(s.fontStyle&xt.Underline||s.fontStyle&xt.Strikethrough),c=r.fontStyle&&(r.fontStyle&xt.Underline||r.fontStyle&xt.Strikethrough);!o&&!c&&i===a?s.content+=r.content:n.push({...r})}return n})}const X4e=k9;function Z4e(e,t,n){const r={meta:{},options:n,codeToHast:(i,a)=>Ky(e,i,a),codeToTokens:(i,a)=>Gy(e,i,a)};let s=X4e(Ky(e,t,n,r));for(const i of qy(n))s=i.postprocess?.call(r,s,n)||s;return s}const t$={light:"#333333",dark:"#bbbbbb"},n$={light:"#fffffe",dark:"#1e1e1e"},r$="__shiki_resolved";function c2(e){if(e?.[r$])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const o=t.settings?t.settings.find(c=>!c.name&&!c.scope):void 0;o?.settings?.foreground&&(r=o.settings.foreground),o?.settings?.background&&(n=o.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?t$.light:t$.dark),n||(n=t.type==="light"?n$.light:n$.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let s=0;const i=new Map;function a(o){if(i.has(o))return i.get(o);s+=1;const c=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${c}`]?a(o):(i.set(o,c),c)}t.settings=t.settings.map(o=>{const c=o.settings?.foreground&&!o.settings.foreground.startsWith("#"),u=o.settings?.background&&!o.settings.background.startsWith("#");if(!c&&!u)return o;const l={...o,settings:{...o.settings}};if(c){const d=a(o.settings.foreground);t.colorReplacements[d]=o.settings.foreground,l.settings.foreground=d}if(u){const d=a(o.settings.background);t.colorReplacements[d]=o.settings.background,l.settings.background=d}return l});for(const o of Object.keys(t.colors||{}))if((o==="editor.foreground"||o==="editor.background"||o.startsWith("terminal.ansi"))&&!t.colors[o]?.startsWith("#")){const c=a(t.colors[o]);t.colorReplacements[c]=t.colors[o],t.colors[o]=c}return Object.defineProperty(t,r$,{enumerable:!1,writable:!1,value:!0}),t}async function J7(e){return Array.from(new Set((await Promise.all(e.filter(t=>!V7(t)).map(async t=>await U7(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function Y7(e){return(await Promise.all(e.map(async n=>H7(n)?null:c2(await U7(n))))).filter(n=>!!n)}let e5e=3;function t5e(e,t=3){t>e5e||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Cl=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Q7(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Cl(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class n5e extends YU{constructor(t,n,r,s={}){super(t),this._resolver=t,this._themes=n,this._langs=r,this._alias=s,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=c2(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=bm.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=Q7(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const s=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(s.name=t.name,this._resolvedGrammars.set(t.name,s),t.aliases&&t.aliases.forEach(i=>{this._alias[i]=t.name}),this._loadedLanguagesCache=null,n.size)for(const i of n)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const s of t)this.resolveEmbeddedLanguages(s);const n=Array.from(this._langGraph.entries()),r=n.filter(([s,i])=>!i);if(r.length){const s=n.filter(([i,a])=>a?(a.embeddedLanguages||a.embeddedLangs)?.some(c=>r.map(([u])=>u).includes(c)):!1).filter(i=>!r.includes(i));throw new Cl(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${s.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[s,i]of n)this._resolver.addLanguage(i);for(const[s,i]of n)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const r of n)this._langGraph.set(r,this._langMap.get(r))}}class r5e{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let s=1;s<=n.length;s++){const i=n.slice(0,s).join(".");r=[...r,...this._injections.get(i)||[]]}return r}}let Mf=0;function s5e(e){Mf+=1,e.warnings!==!1&&Mf>=10&&Mf%10===0&&console.warn(`[Shiki] ${Mf} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Cl("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(c2),s=new r5e(e.engine,n),i=new n5e(s,r,n,e.langAlias);let a;function o(k){return Q7(k,e.langAlias)}function c(k){p();const v=i.getGrammar(typeof k=="string"?k:k.name);if(!v)throw new Cl(`Language \`${k}\` not found, you may need to load it first`);return v}function u(k){if(k==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};p();const v=i.getTheme(k);if(!v)throw new Cl(`Theme \`${k}\` not found, you may need to load it first`);return v}function l(k){p();const v=u(k);a!==k&&(i.setTheme(v),a=k);const w=i.getColorMap();return{theme:v,colorMap:w}}function d(){return p(),i.getLoadedThemes()}function f(){return p(),i.getLoadedLanguages()}function h(...k){p(),i.loadLanguages(k.flat(1))}async function m(...k){return h(await J7(k))}function y(...k){p();for(const v of k.flat(1))i.loadTheme(v)}async function g(...k){return p(),y(await Y7(k))}function p(){if(t)throw new Cl("Shiki instance has been disposed")}function _(){t||(t=!0,i.dispose(),Mf-=1)}return{setTheme:l,getTheme:u,getLanguage:c,getLoadedThemes:d,getLoadedLanguages:f,resolveLangAlias:o,loadLanguage:m,loadLanguageSync:h,loadTheme:g,loadThemeSync:y,dispose:_,[Symbol.dispose]:_}}async function i5e(e){e.engine||t5e("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([Y7(e.themes||[]),J7(e.langs||[]),e.engine]);return s5e({...e,themes:t,langs:n,engine:r})}async function a5e(e){const t=await i5e(e);return{getLastGrammarState:(...n)=>z4e(t,...n),codeToTokensBase:(n,r)=>a2(t,n,r),codeToTokensWithThemes:(n,r)=>W7(t,n,r),codeToTokens:(n,r)=>Gy(t,n,r),codeToHast:(n,r)=>Ky(t,n,r),codeToHtml:(n,r)=>Z4e(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function o5e(e){const t=e.langs,n=e.themes,r=e.engine;async function s(i){function a(d){if(typeof d=="string"){if(d=i.langAlias?.[d]||d,V7(d))return[];const f=t[d];if(!f)throw new En(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}function o(d){if(H7(d))return"none";if(typeof d=="string"){const f=n[d];if(!f)throw new En(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}const c=(i.themes??[]).map(d=>o(d)),u=(i.langs??[]).map(d=>a(d)),l=await a5e({engine:i.engine??r(),...i,themes:c,langs:u});return{...l,loadLanguage(...d){return l.loadLanguage(...d.map(a))},loadTheme(...d){return l.loadTheme(...d.map(o))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return s}const u2=[{id:"abap",name:"ABAP",import:(()=>x(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>x(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>x(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>x(()=>import("./angular-html-CU67Zn6k.js").then(e=>e.f),__vite__mapDeps([103,104,105,106])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>x(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([107,103,104,105,106,108])))},{id:"apache",name:"Apache Conf",import:(()=>x(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>x(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>x(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([109,104,105,106,110,111,112])))},{id:"applescript",name:"AppleScript",import:(()=>x(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>x(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>x(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>x(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>x(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([113,112,105,114,106,115,116])))},{id:"awk",name:"AWK",import:(()=>x(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>x(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>x(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>x(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>x(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>x(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>x(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>x(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>x(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([117,118,104,105,106,110,111,119,112])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>x(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([120,121])))},{id:"c",name:"C",import:(()=>x(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>x(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>x(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>x(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([122,123])))},{id:"clarity",name:"Clarity",import:(()=>x(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>x(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>x(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>x(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([124,104,105,106,111])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>x(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>x(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>x(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([125,105])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>x(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>x(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>x(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([126,127,128,129,119])))},{id:"crystal",name:"Crystal",import:(()=>x(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([130,104,105,106,119,129,131])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>x(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>x(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>x(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>x(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>x(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>x(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>x(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>x(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>x(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>x(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>x(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>x(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>x(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>x(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([132,114,104,105,106,118])))},{id:"elixir",name:"Elixir",import:(()=>x(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([133,104,105,106])))},{id:"elm",name:"Elm",import:(()=>x(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([134,128,129])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>x(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>x(()=>import("./erb-B12qg9BL.js"),__vite__mapDeps([135,104,105,106,136,137,110,111,119,138,114,139,116,126,127,128,129,131,140,141])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>x(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([142,143])))},{id:"fennel",name:"Fennel",import:(()=>x(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>x(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>x(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>x(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([144,145])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>x(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>x(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([146,143])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>x(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([147,148,149])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>x(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>x(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>x(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>x(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>x(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([150,151])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>x(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([152,131])))},{id:"gleam",name:"Gleam",import:(()=>x(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>x(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([153,105,114,106,104])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>x(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([154,114,106,105,104])))},{id:"glsl",name:"GLSL",import:(()=>x(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([128,129])))},{id:"gn",name:"GN",import:(()=>x(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>x(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>x(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>x(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([138,105,114,139,116])))},{id:"groovy",name:"Groovy",import:(()=>x(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>x(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([155,104,105,106,119])))},{id:"haml",name:"Ruby Haml",import:(()=>x(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([137,105,106])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>x(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([156,104,105,106,141])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>x(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>x(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>x(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>x(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>x(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>x(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([104,105,106])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>x(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([118,104,105,106])))},{id:"http",name:"HTTP",import:(()=>x(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([157,131,112,110,111,138,105,114,139,116])))},{id:"hurl",name:"Hurl",import:(()=>x(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([158,138,105,114,139,116,110,111,159])))},{id:"hxml",name:"HXML",import:(()=>x(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([160,161])))},{id:"hy",name:"Hy",import:(()=>x(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>x(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>x(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>x(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>x(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>x(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([162,104,105,106])))},{id:"jison",name:"Jison",import:(()=>x(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([163,105])))},{id:"json",name:"JSON",import:(()=>x(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>x(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>x(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>x(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>x(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>x(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>x(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>x(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([164,126,127,128,129,119,123,105,165])))},{id:"just",name:"Just",import:(()=>x(()=>import("./just-Cw27pwNe.js"),__vite__mapDeps([166,131,105,114,167,104,106,110,111,119,123,136,137,138,139,116,126,127,128,129,140,141])))},{id:"kdl",name:"KDL",import:(()=>x(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>x(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>x(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>x(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([168,169,165])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>x(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>x(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>x(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([170,104,105,106,112])))},{id:"llvm",name:"LLVM IR",import:(()=>x(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>x(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>x(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>x(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([140,129])))},{id:"luau",name:"Luau",import:(()=>x(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>x(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>x(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>x(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([171,106,172,108,114])))},{id:"matlab",name:"MATLAB",import:(()=>x(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>x(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([173,143,141,118,104,105,106])))},{id:"mdx",name:"MDX",import:(()=>x(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>x(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>x(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>x(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>x(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>x(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>x(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>x(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([174,175])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>x(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>x(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([176,140,129])))},{id:"nim",name:"Nim",import:(()=>x(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([177,129,104,105,106,110,111,128,143])))},{id:"nix",name:"Nix",import:(()=>x(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>x(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>x(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>x(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>x(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>x(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>x(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>x(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>x(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([167,104,105,106,110,111,119])))},{id:"php",name:"PHP",import:(()=>x(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([178,104,105,106,110,111,119,112])))},{id:"pkl",name:"Pkl",import:(()=>x(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>x(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>x(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>x(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>x(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>x(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>x(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>x(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>x(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>x(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>x(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([179,105,106,104])))},{id:"puppet",name:"Puppet",import:(()=>x(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>x(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>x(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>x(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([180,105])))},{id:"qmldir",name:"QML Directory",import:(()=>x(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>x(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>x(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>x(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>x(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>x(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([181,104,105,106,182])))},{id:"reg",name:"Windows Registry Script",import:(()=>x(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>x(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>x(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>x(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>x(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>x(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>x(()=>import("./rst-BrH8l1NY.js"),__vite__mapDeps([183,118,104,105,106,126,127,128,129,119,123,131,141,184,136,137,110,111,138,114,139,116,140])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>x(()=>import("./ruby-Dw2BHqvy.js"),__vite__mapDeps([136,104,105,106,137,110,111,119,138,114,139,116,126,127,128,129,131,140,141])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>x(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>x(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([185,119])))},{id:"sass",name:"Sass",import:(()=>x(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>x(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>x(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>x(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([108,106])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>x(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>x(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([186,187])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>x(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>x(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([188,131])))},{id:"smalltalk",name:"Smalltalk",import:(()=>x(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>x(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>x(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([189,104,105,106])))},{id:"sparql",name:"SPARQL",import:(()=>x(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([190,191])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>x(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>x(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>x(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>x(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([192,119])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>x(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>x(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([193,105])))},{id:"svelte",name:"Svelte",import:(()=>x(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([194,105,114,106,115])))},{id:"swift",name:"Swift",import:(()=>x(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>x(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>x(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>x(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>x(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>x(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>x(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([195,196,105,106])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>x(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>x(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([169,165])))},{id:"toml",name:"TOML",import:(()=>x(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>x(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([197,114,106,105,128,129,104,119,110,111])))},{id:"tsv",name:"TSV",import:(()=>x(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>x(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>x(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>x(()=>import("./twig-DNn4PbVi.js"),__vite__mapDeps([198,106,105,108,178,104,110,111,119,112,123,136,137,138,114,139,116,126,127,128,129,131,140,141])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>x(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>x(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>x(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>x(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>x(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>x(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>x(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>x(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>x(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>x(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([199,106,105,114,112,104,118])))},{id:"vue-html",name:"Vue HTML",import:(()=>x(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([200,105])))},{id:"vue-vine",name:"Vue Vine",import:(()=>x(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([201,106,108,172,202,115,105])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>x(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>x(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>x(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>x(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>x(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>x(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>x(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>x(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([110,111])))},{id:"xsl",name:"XSL",import:(()=>x(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([203,110,111])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>x(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>x(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>x(()=>import("./zig-VOosw3JB.js"),[]))}],c5e=Object.fromEntries(u2.map(e=>[e.id,e.import])),u5e=Object.fromEntries(u2.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),X7={...c5e,...u5e},l5e=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>x(()=>import("./andromeeda-CF6_y_Qj.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>x(()=>import("./aurora-x-DOuLBLNn.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>x(()=>import("./ayu-dark-BXQCOcka.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>x(()=>import("./ayu-light-McBaoK3Y.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>x(()=>import("./ayu-mirage-urwrJgdN.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>x(()=>import("./catppuccin-frappe-BCqV45_h.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>x(()=>import("./catppuccin-latte-BWlfbWlw.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>x(()=>import("./catppuccin-macchiato-L0ooYkqX.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>x(()=>import("./catppuccin-mocha-CPxVXonm.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>x(()=>import("./dark-plus-DNUujdjh.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>x(()=>import("./dracula-Dl-8puSV.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>x(()=>import("./dracula-soft-CSMZw4vz.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>x(()=>import("./everforest-dark-BxQkAq-6.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>x(()=>import("./everforest-light-CcLVmqFl.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>x(()=>import("./github-dark-vbPMK5nw.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>x(()=>import("./github-dark-default-BuB7GGZr.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>x(()=>import("./github-dark-dimmed-CQQ2kH1a.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>x(()=>import("./github-dark-high-contrast-fZoHxlg3.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>x(()=>import("./github-light-CBO01_j6.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>x(()=>import("./github-light-default-DNniaknl.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>x(()=>import("./github-light-high-contrast-Kh_Z1r_U.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-hard-B-lrt2RD.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-medium-DqRMfHwY.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-soft-0cd3aJ5k.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>x(()=>import("./gruvbox-light-hard-CdMyBl7-.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>x(()=>import("./gruvbox-light-medium-k_NbMmjL.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>x(()=>import("./gruvbox-light-soft-B_wmbOPu.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>x(()=>import("./horizon-Dr-pOaOB.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>x(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>x(()=>import("./houston-D7pTNItX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>x(()=>import("./kanagawa-dragon-9xlKYyML.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>x(()=>import("./kanagawa-lotus-D7R2-rgR.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>x(()=>import("./kanagawa-wave-DXzwPY55.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>x(()=>import("./laserwave-Crdg5MSq.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>x(()=>import("./light-plus-Keeg-hmX.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>x(()=>import("./material-theme-BjSij5jK.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>x(()=>import("./material-theme-darker-Ci314V8G.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>x(()=>import("./material-theme-lighter-BsHhGFQr.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>x(()=>import("./material-theme-ocean-DcalBkIS.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>x(()=>import("./material-theme-palenight-GGCMgrXw.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>x(()=>import("./min-dark-CDSXMz5a.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>x(()=>import("./min-light-CM5JNFAA.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>x(()=>import("./monokai-O2TR9gDo.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>x(()=>import("./night-owl-NZdGqbHT.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>x(()=>import("./night-owl-light-Dx-BWqtN.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>x(()=>import("./nord-BNMOv-tL.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>x(()=>import("./one-dark-pro-DnMjqbdW.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>x(()=>import("./one-light-dsKzgxTn.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>x(()=>import("./plastic-Ckcm5hoS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>x(()=>import("./poimandres-BbcZclLp.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>x(()=>import("./red-BQzOET_I.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>x(()=>import("./rose-pine-B3EY3h2-.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>x(()=>import("./rose-pine-dawn-6WQi5eS6.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>x(()=>import("./rose-pine-moon-BTPbmVvF.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>x(()=>import("./slack-dark-DBfAPHjY.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>x(()=>import("./slack-ochin-szRk-9hG.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>x(()=>import("./snazzy-light-CBYPMa6b.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>x(()=>import("./solarized-dark-Tf4Pofl7.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>x(()=>import("./solarized-light-n46tpZ2s.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>x(()=>import("./synthwave-84-CNQ9Fj-_.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>x(()=>import("./tokyo-night-J9jDJp4U.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>x(()=>import("./vesper-C5GDOJD3.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>x(()=>import("./vitesse-black-BeJXV_f5.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>x(()=>import("./vitesse-dark-mzFqOv-V.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>x(()=>import("./vitesse-light-BoFwUIac.js"),[]))}],d5e=Object.fromEntries(l5e.map(e=>[e.id,e.import]));class l2 extends Error{constructor(t){super(t),this.name="ShikiError"}}function f5e(){return 2147483648}function h5e(){return typeof performance<"u"?performance.now():Date.now()}const m5e=(e,t)=>e+(t-e%t)%t;async function p5e(e){let t,n;const r={};function s(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function i(h,m,y){r.HEAPU8.copyWithin(h,m,m+y)}function a(h){try{return t.grow(h-n.byteLength+65535>>>16),s(t.buffer),1}catch{}}function o(h){const m=r.HEAPU8.length;h=h>>>0;const y=f5e();if(h>y)return!1;for(let g=1;g<=4;g*=2){let p=m*(1+.2/g);p=Math.min(p,h+100663296);const _=Math.min(y,m5e(Math.max(h,p),65536));if(a(_))return!0}return!1}const c=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,y=1024){const g=m+y;let p=m;for(;h[p]&&!(p>=g);)++p;if(p-m>16&&h.buffer&&c)return c.decode(h.subarray(m,p));let _="";for(;m<p;){let k=h[m++];if(!(k&128)){_+=String.fromCharCode(k);continue}const v=h[m++]&63;if((k&224)===192){_+=String.fromCharCode((k&31)<<6|v);continue}const w=h[m++]&63;if((k&240)===224?k=(k&15)<<12|v<<6|w:k=(k&7)<<18|v<<12|w<<6|h[m++]&63,k<65536)_+=String.fromCharCode(k);else{const S=k-65536;_+=String.fromCharCode(55296|S>>10,56320|S&1023)}}return _}function l(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:h5e,emscripten_memcpy_big:i,emscripten_resize_heap:o,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,s(t.buffer),Object.assign(r,m),r.UTF8ToString=l}return await f(),r}var g5e=Object.defineProperty,b5e=(e,t,n)=>t in e?g5e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rn=(e,t,n)=>b5e(e,typeof t!="symbol"?t+"":t,n);let Hn=null;function y5e(e){throw new l2(e.UTF8ToString(e.getLastOnigError()))}class hk{constructor(t){Rn(this,"utf16Length"),Rn(this,"utf8Length"),Rn(this,"utf16Value"),Rn(this,"utf8Value"),Rn(this,"utf16OffsetToUtf8"),Rn(this,"utf8OffsetToUtf16");const n=t.length,r=hk._utf8ByteLength(t),s=r!==n,i=s?new Uint32Array(n+1):null;s&&(i[n]=r);const a=s?new Uint32Array(r+1):null;s&&(a[r]=n);const o=new Uint8Array(r);let c=0;for(let u=0;u<n;u++){const l=t.charCodeAt(u);let d=l,f=!1;if(l>=55296&&l<=56319&&u+1<n){const h=t.charCodeAt(u+1);h>=56320&&h<=57343&&(d=(l-55296<<10)+65536|h-56320,f=!0)}s&&(i[u]=c,f&&(i[u+1]=c),d<=127?a[c+0]=u:d<=2047?(a[c+0]=u,a[c+1]=u):d<=65535?(a[c+0]=u,a[c+1]=u,a[c+2]=u):(a[c+0]=u,a[c+1]=u,a[c+2]=u,a[c+3]=u)),d<=127?o[c++]=d:d<=2047?(o[c++]=192|(d&1984)>>>6,o[c++]=128|(d&63)>>>0):d<=65535?(o[c++]=224|(d&61440)>>>12,o[c++]=128|(d&4032)>>>6,o[c++]=128|(d&63)>>>0):(o[c++]=240|(d&1835008)>>>18,o[c++]=128|(d&258048)>>>12,o[c++]=128|(d&4032)>>>6,o[c++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let n=0;for(let r=0,s=t.length;r<s;r++){const i=t.charCodeAt(r);let a=i,o=!1;if(i>=55296&&i<=56319&&r+1<s){const c=t.charCodeAt(r+1);c>=56320&&c<=57343&&(a=(i-55296<<10)+65536|c-56320,o=!0)}a<=127?n+=1:a<=2047?n+=2:a<=65535?n+=3:n+=4,o&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const mk=class Di{constructor(t){if(Rn(this,"id",++Di.LAST_ID),Rn(this,"_onigBinding"),Rn(this,"content"),Rn(this,"utf16Length"),Rn(this,"utf8Length"),Rn(this,"utf16OffsetToUtf8"),Rn(this,"utf8OffsetToUtf16"),Rn(this,"ptr"),!Hn)throw new l2("Must invoke loadWasm first.");this._onigBinding=Hn,this.content=t;const n=new hk(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Di._sharedPtrInUse?(Di._sharedPtr||(Di._sharedPtr=Hn.omalloc(1e4)),Di._sharedPtrInUse=!0,Hn.HEAPU8.set(n.utf8Value,Di._sharedPtr),this.ptr=Di._sharedPtr):this.ptr=n.createString(Hn)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Di._sharedPtr?Di._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Rn(mk,"LAST_ID",0);Rn(mk,"_sharedPtr",0);Rn(mk,"_sharedPtrInUse",!1);let Z7=mk;class _5e{constructor(t){if(Rn(this,"_onigBinding"),Rn(this,"_ptr"),!Hn)throw new l2("Must invoke loadWasm first.");const n=[],r=[];for(let o=0,c=t.length;o<c;o++){const u=new hk(t[o]);n[o]=u.createString(Hn),r[o]=u.utf8Length}const s=Hn.omalloc(4*t.length);Hn.HEAPU32.set(n,s/4);const i=Hn.omalloc(4*t.length);Hn.HEAPU32.set(r,i/4);const a=Hn.createOnigScanner(s,i,t.length);for(let o=0,c=t.length;o<c;o++)Hn.ofree(n[o]);Hn.ofree(i),Hn.ofree(s),a===0&&y5e(Hn),this._onigBinding=Hn,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let s=0;if(typeof r=="number"&&(s=r),typeof t=="string"){t=new Z7(t);const i=this._findNextMatchSync(t,n,!1,s);return t.dispose(),i}return this._findNextMatchSync(t,n,!1,s)}_findNextMatchSync(t,n,r,s){const i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),s);if(a===0)return null;const o=i.HEAPU32;let c=a/4;const u=o[c++],l=o[c++],d=[];for(let f=0;f<l;f++){const h=t.convertUtf8OffsetToUtf16(o[c++]),m=t.convertUtf8OffsetToUtf16(o[c++]);d[f]={start:h,end:m,length:m-h}}return{index:u,captureIndices:d}}}function k5e(e){return typeof e.instantiator=="function"}function E5e(e){return typeof e.default=="function"}function w5e(e){return typeof e.data<"u"}function S5e(e){return typeof Response<"u"&&e instanceof Response}function v5e(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let l0;function x5e(e){if(l0)return l0;async function t(){Hn=await p5e(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),k5e(r)?r=await r.instantiator(n):E5e(r)?r=await r.default(n):(w5e(r)&&(r=r.data),S5e(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await T5e(r)(n):r=await I5e(r)(n):v5e(r)?r=await Sw(r)(n):r instanceof WebAssembly.Module?r=await Sw(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Sw(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return l0=t(),l0}function Sw(e){return t=>WebAssembly.instantiate(e,t)}function T5e(e){return t=>WebAssembly.instantiateStreaming(e,t)}function I5e(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function A5e(e){return e&&await x5e(e),{createScanner(t){return new _5e(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new Z7(t)}}}const C5e=o5e({langs:X7,themes:d5e,engine:()=>A5e(x(()=>import("./wasm-Ck_ssClF.js"),[]))}),s$=4294967295;class P5e{constructor(t,n={}){this.patterns=t,this.options=n;const{forgiving:r=!1,cache:s,regexConstructor:i}=n;if(!i)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(a=>{if(typeof a!="string")return a;const o=s?.get(a);if(o){if(o instanceof RegExp)return o;if(r)return null;throw o}try{const c=i(a);return s?.set(a,c),c}catch(c){if(s?.set(a,c),r)return null;throw c}})}regexps;findNextMatchSync(t,n,r){const s=typeof t=="string"?t:t.content,i=[];function a(o,c,u=0){return{index:o,captureIndices:c.indices.map(l=>l==null?{start:s$,end:s$,length:0}:{start:l[0]+u,end:l[1]+u,length:l[1]-l[0]})}}for(let o=0;o<this.regexps.length;o++){const c=this.regexps[o];if(c)try{c.lastIndex=n;const u=c.exec(s);if(!u)continue;if(u.index===n)return a(o,u,0);i.push([o,u,0])}catch(u){if(this.options.forgiving)continue;throw u}}if(i.length){const o=Math.min(...i.map(c=>c[1].index));for(const[c,u,l]of i)if(u.index===o)return a(c,u,l)}return null}}function N5e(e,t){return eV(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function R5e(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=n=>N5e(n,{target:t.target}),{createScanner(n){return new P5e(n,t)},createString(n){return{content:n}}}}var O5e=R5e({forgiving:!0}),L5e=Object.fromEntries(u2.flatMap(e=>{var t;return((t=e.aliases)!=null?t:[]).map(n=>[n,e.id])})),dx=new Set(Object.keys(X7)),i$=e=>{let t=e.trim().toLowerCase();return L5e[t]||(dx.has(t),t)},vw=new Map,xw=new Map,al=new Map,Wy=e=>{var t;return typeof e=="string"?e:(t=e.name)!=null?t:"custom"},D5e=(e,t)=>`${e}-${Wy(t[0])}-${Wy(t[1])}`,$5e=(e,t,n)=>{let r=e.slice(0,100),s=e.length>100?e.slice(-100):"";return`${t}:${n[0]}:${n[1]}:${e.length}:${r}:${s}`},M5e=(e,t)=>{let n=D5e(e,t);if(vw.has(n))return vw.get(n);let r=C5e({themes:t,langs:[e],engine:O5e});return vw.set(n,r),r};function eq(e={}){var t;let n=(t=e.themes)!=null?t:["github-light","github-dark"];return{name:"shiki",type:"code-highlighter",supportsLanguage(r){let s=i$(r);return dx.has(s)},getSupportedLanguages(){return Array.from(dx)},getThemes(){return n},highlight({code:r,language:s,themes:i},a){let o=i$(s),c=[Wy(i[0]),Wy(i[1])],u=$5e(r,o,c);return xw.has(u)?xw.get(u):(a&&(al.has(u)||al.set(u,new Set),al.get(u).add(a)),M5e(o,i).then(l=>{let d=l.getLoadedLanguages().includes(o)?o:"text",f=l.codeToTokens(r,{lang:d,themes:{light:c[0],dark:c[1]}});xw.set(u,f);let h=al.get(u);if(h){for(let m of h)m(f);al.delete(u)}}).catch(l=>{console.error("[Streamdown Code] Failed to highlight code:",l),al.delete(u)}),null)}}}eq();const j5e=eq({themes:["vitesse-dark","vitesse-dark"]}),a$=["text-[13px] leading-relaxed text-muted-foreground","[&_p]:mb-[0.4em] [&_p:last-child]:mb-0","[&_strong]:text-foreground [&_strong]:font-semibold","[&_b]:text-foreground [&_b]:font-semibold","[&_code]:font-mono [&_code]:text-xs [&_code]:bg-muted [&_code]:border [&_code]:border-border","[&_code]:rounded-sm [&_code]:px-1.5 [&_code]:py-px [&_code]:text-primary","[&_pre]:bg-muted [&_pre]:border [&_pre]:border-border [&_pre]:rounded-md","[&_pre]:px-3 [&_pre]:py-2 [&_pre]:overflow-x-auto [&_pre]:my-2 [&_pre]:text-xs [&_pre]:leading-relaxed","[&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:p-0 [&_pre_code]:text-inherit","[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2","[&_a]:decoration-primary/30 hover:[&_a]:decoration-primary/80","[&_ul]:pl-5 [&_ul]:my-1.5 [&_ol]:pl-5 [&_ol]:my-1.5","[&_li]:mb-0.5 [&_li_::marker]:text-muted-foreground","[&_table]:w-full [&_table]:border-collapse [&_table]:text-xs [&_table]:my-2","[&_th]:border [&_th]:border-border [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:bg-muted [&_th]:font-semibold [&_th]:text-foreground","[&_td]:border [&_td]:border-border [&_td]:px-2 [&_td]:py-1 [&_td]:text-left [&_td]:bg-background","[&_h1]:font-semibold [&_h1]:text-foreground [&_h1]:mt-2 [&_h1]:mb-1 [&_h1]:text-[15px]","[&_h2]:font-semibold [&_h2]:text-foreground [&_h2]:mt-2 [&_h2]:mb-1 [&_h2]:text-sm","[&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mt-2 [&_h3]:mb-1 [&_h3]:text-[13px]","[&_h4]:font-semibold [&_h4]:text-foreground [&_h4]:mt-2 [&_h4]:mb-1 [&_h4]:text-[13px]","[&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:my-1.5 [&_blockquote]:text-muted-foreground","[&_hr]:border-0 [&_hr]:border-t [&_hr]:border-border [&_hr]:my-2","[&_img]:max-w-full [&_img]:rounded"].join(" ");function F5e(e){return b.jsx("div",{className:e.className?`${a$} ${e.className}`:a$,children:b.jsx(B7,{plugins:{code:j5e},controls:{code:!0},linkSafety:{enabled:!1},children:e.children})})}const B5e=[{id:"model",label:"Tools"},{id:"discover",label:"Search"}];function z5e(e){const{sourceId:t,search:n,navigate:r}=e,s=Owe(t),i=n.tool??(s.status==="ready"?s.data.tools[0]?.path:void 0),a=Lwe(t,n.tab==="model"?i??null:null),o=Dwe({sourceId:t,query:n.query??"",limit:12});return O.useEffect(()=>{if(n.tab!=="model"||n.tool||s.status!=="ready")return;const c=s.data.tools[0]?.path;c&&r({search:u=>({...u,tool:c}),replace:!0})},[s,r,n.tab,n.tool]),b.jsx(Du,{loadable:s,loading:"Loading source...",children:c=>{const u=c.tools.find(l=>l.path===i)??c.tools[0]??null;return b.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[b.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border bg-background/95 backdrop-blur-sm px-4 h-12",children:[b.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[b.jsx("h2",{className:"truncate text-sm font-semibold text-foreground",children:c.source.name}),b.jsx(hi,{variant:"outline",children:c.source.kind}),b.jsxs("span",{className:"hidden text-[11px] tabular-nums text-muted-foreground/50 sm:block",children:[c.toolCount," ",c.toolCount===1?"tool":"tools"]})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex items-center gap-0.5 rounded-lg bg-muted/50 p-0.5",children:B5e.map(l=>b.jsx("button",{type:"button",onClick:()=>{r({search:d=>({...d,tab:l.id})})},className:Ve("rounded-md px-3 py-1 text-[12px] font-medium transition-colors",l.id===n.tab?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:l.label},l.id))}),b.jsxs(Dr,{to:"/sources/$sourceId/edit",params:{sourceId:t},className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-card px-2.5 py-1 text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground hover:bg-accent/50",children:[b.jsx(WA,{className:"size-3"}),"Edit"]})]})]}),b.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[n.tab==="model"&&b.jsx(U5e,{bundle:c,detail:a,selectedToolPath:u?.path??null,onSelectTool:l=>{r({search:d=>({...d,tool:l,tab:"model"})})},sourceId:t}),n.tab==="discover"&&b.jsx(G5e,{bundle:c,discovery:o,initialQuery:n.query??"",onSubmitQuery:l=>{r({search:d=>({...d,query:l,tab:"discover"})})},onOpenTool:l=>{r({search:d=>({...d,tab:"model",tool:l})})}}),n.tab==="manifest"&&b.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:b.jsx(va,{title:"Manifest",body:c.manifestJson,empty:"No manifest available."})}),n.tab==="definitions"&&b.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:b.jsx(va,{title:"Definitions",body:c.definitionsJson,empty:"No definitions available."})}),n.tab==="raw"&&b.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:b.jsx(va,{title:"Raw document",body:c.rawDocumentText,empty:"No raw document."})})]})]})}})}function U5e(e){const[t,n]=O.useState(""),r=O.useRef(null),s=t.trim().toLowerCase().split(/\s+/).filter(Boolean),i=e.bundle.tools.filter(a=>{if(s.length===0)return!0;const o=[a.path,a.description??"",a.title??"",a.method??""].join(" ").toLowerCase();return s.every(c=>o.includes(c))});return O.useEffect(()=>{const a=o=>{o.key==="/"&&document.activeElement?.tagName!=="INPUT"&&(o.preventDefault(),r.current?.focus()),o.key==="Escape"&&(r.current?.blur(),t.length>0&&n(""))};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[t]),b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex w-72 shrink-0 flex-col border-r border-border bg-card/30 lg:w-80 xl:w-[22rem]",children:[b.jsx("div",{className:"shrink-0 border-b border-border px-3 py-2",children:b.jsxs("div",{className:"relative",children:[b.jsx(hU,{className:"absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground/40"}),b.jsx("input",{ref:r,value:t,onChange:a=>n(a.target.value),placeholder:`Filter ${e.bundle.toolCount} tools…`,className:"h-8 w-full rounded-md border border-input bg-background pl-8 pr-8 text-[13px] outline-none transition-colors placeholder:text-muted-foreground/40 focus:border-ring focus:ring-1 focus:ring-ring/30"}),t.length>0?b.jsx("button",{type:"button",onClick:()=>n(""),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded p-0.5 text-muted-foreground/40 hover:text-foreground",children:b.jsx(OSe,{})}):b.jsx("kbd",{className:"absolute right-2.5 top-1/2 -translate-y-1/2 rounded border border-border bg-muted px-1 py-px text-[10px] text-muted-foreground/50",children:"/"})]})}),b.jsx("div",{className:"flex-1 overflow-y-auto",children:i.length===0?b.jsx("div",{className:"p-4 text-center text-[13px] text-muted-foreground/50",children:s.length>0?"No tools match your filter":"No tools available"}):b.jsx("div",{className:"p-1.5",children:b.jsx(H5e,{tools:i,selectedToolPath:e.selectedToolPath,onSelectTool:e.onSelectTool,search:t,isFiltered:s.length>0,sourceId:e.sourceId})})})]}),b.jsx("div",{className:"flex flex-1 flex-col min-w-0 overflow-hidden",children:b.jsx(Du,{loadable:e.detail,loading:"Loading tool...",children:a=>a?b.jsx(q5e,{detail:a}):b.jsx(wv,{title:e.bundle.toolCount>0?"Select a tool":"No tools available",description:e.bundle.toolCount>0?"Choose from the list or press / to search":void 0})})})]})}function V5e(e){const t={segment:"",children:new Map};for(const n of e){const r=n.path.split(".");let s=t;for(const i of r)s.children.has(i)||s.children.set(i,{segment:i,children:new Map}),s=s.children.get(i);s.tool=n}return t}function H5e(e){const t=O.useMemo(()=>V5e(e.tools),[e.tools]),n=$we(),r=[...t.children.values()].sort((s,i)=>s.segment.localeCompare(i.segment));return b.jsx("div",{className:"flex flex-col gap-px",children:r.map(s=>b.jsx(tq,{node:s,depth:0,selectedToolPath:e.selectedToolPath,onSelectTool:e.onSelectTool,search:e.search,defaultOpen:e.isFiltered,sourceId:e.sourceId,prefetch:n},s.segment))})}function tq(e){const{node:t,depth:n,selectedToolPath:r,onSelectTool:s,search:i,defaultOpen:a,sourceId:o,prefetch:c}=e,u=t.children.size>0,l=!!t.tool&&!u,d=O.useMemo(()=>{if(!r)return!1;function p(_){if(_.tool?.path===r)return!0;for(const k of _.children.values())if(p(k))return!0;return!1}return p(t)},[t,r]),[f,h]=O.useState(a||d);if(O.useEffect(()=>{(a||d)&&h(!0)},[a,d]),l)return b.jsx(o$,{tool:t.tool,active:t.tool.path===r,onSelect:()=>s(t.tool.path),search:i,depth:n,sourceId:o,prefetch:c});const m=8+n*16,y=[...t.children.values()].sort((p,_)=>p.segment.localeCompare(_.segment)),g=nq(t);return b.jsxs("div",{children:[t.tool?b.jsxs("div",{className:"flex items-center",children:[b.jsx("button",{type:"button",onClick:()=>h(p=>!p),className:"shrink-0 rounded p-0.5 text-muted-foreground/30 hover:text-muted-foreground",style:{marginLeft:m},children:b.jsx(gL,{className:Ve("size-2.5 transition-transform duration-150",f&&"rotate-90")})}),b.jsx(o$,{tool:t.tool,active:t.tool.path===r,onSelect:()=>s(t.tool.path),search:i,depth:-1,className:"flex-1 pl-1",sourceId:o,prefetch:c})]}):b.jsxs("button",{type:"button",onClick:()=>h(p=>!p),className:Ve("group flex w-full items-center gap-1.5 rounded-md py-1 pr-2.5 text-[12px] transition-colors hover:bg-accent/40",f?"text-foreground/80":"text-muted-foreground/60"),style:{paddingLeft:m},children:[b.jsx(gL,{className:Ve("size-2.5 shrink-0 text-muted-foreground/30 transition-transform duration-150",f&&"rotate-90")}),b.jsx(NSe,{className:Ve("size-3 shrink-0",f?"text-primary/60":"text-muted-foreground/30")}),b.jsx("span",{className:"flex-1 truncate text-left font-mono",children:rq(t.segment,i)}),b.jsx("span",{className:"shrink-0 tabular-nums text-[10px] text-muted-foreground/25",children:g})]}),f&&u&&b.jsxs("div",{className:"relative flex flex-col gap-px",children:[b.jsx("span",{className:"absolute top-0 bottom-1 w-px bg-border/40",style:{left:m+5},"aria-hidden":!0}),y.map(p=>b.jsx(tq,{node:p,depth:n+1,selectedToolPath:r,onSelectTool:s,search:i,defaultOpen:a,sourceId:o,prefetch:c},p.segment))]})]})}function nq(e){let t=e.tool?1:0;for(const n of e.children.values())t+=nq(n);return t}function o$(e){const t=O.useRef(null),n=e.depth>=0?8+e.depth*16+8:void 0,r=O.useRef(!1);O.useEffect(()=>{e.active&&t.current&&t.current.scrollIntoView({block:"nearest"})},[e.active]),O.useEffect(()=>{const i=t.current;if(!i||r.current)return;const a=new IntersectionObserver(o=>{o[0]?.isIntersecting&&!r.current&&(r.current=!0,e.prefetch(e.sourceId,e.tool.path),a.disconnect())},{threshold:0});return a.observe(i),()=>a.disconnect()},[e.prefetch,e.sourceId,e.tool.path]);const s=e.depth>=0?e.tool.path.split(".").pop()??e.tool.path:e.tool.path;return b.jsxs("button",{ref:t,type:"button",onClick:e.onSelect,className:Ve("group flex w-full items-center gap-2 rounded-md py-1.5 pr-2.5 text-left transition-colors",e.active?"bg-primary/10 text-foreground border-l-2 border-l-primary":"hover:bg-accent/50 text-foreground/70 hover:text-foreground",e.className),style:n!=null?{paddingLeft:n}:void 0,children:[b.jsx(fU,{className:"size-3 shrink-0 text-muted-foreground/40"}),b.jsx("span",{className:"flex-1 truncate font-mono text-[12px]",children:rq(s,e.search)}),e.tool.method&&b.jsx(SU,{method:e.tool.method})]})}function q5e(e){const{detail:t}=e,[n,r]=O.useState(null),s=O.useCallback((i,a)=>{navigator.clipboard.writeText(i).then(()=>{r(a),setTimeout(()=>r(null),1500)})},[]);return b.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[b.jsx("div",{className:"shrink-0 border-b border-border bg-background/95 backdrop-blur-sm",children:b.jsxs("div",{className:"flex items-start gap-3 px-5 py-3.5",children:[b.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:b.jsx(fU,{className:"size-4"})}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("h3",{className:"truncate text-sm font-semibold text-foreground",children:t.summary.path}),b.jsx(K5e,{text:t.summary.path,field:"path",copiedField:n,onCopy:s})]}),b.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-1.5",children:[t.summary.method&&b.jsx(SU,{method:t.summary.method}),t.summary.pathTemplate&&b.jsx("span",{className:"font-mono text-[11px] text-muted-foreground/60",children:t.summary.pathTemplate})]})]})]})}),b.jsx("div",{className:"flex-1 overflow-y-auto",children:b.jsxs("div",{className:"px-5 py-4 space-y-4",children:[t.summary.description&&b.jsx(F5e,{children:t.summary.description}),b.jsxs("div",{className:"grid grid-cols-1 gap-3 xl:grid-cols-2",children:[b.jsx(va,{title:"Input",body:t.summary.inputType??null,lang:"typescript",empty:"No input."}),b.jsx(va,{title:"Output",body:t.summary.outputType??null,lang:"typescript",empty:"No output."})]}),b.jsxs("div",{className:"grid grid-cols-1 gap-2 xl:grid-cols-2",children:[b.jsx(va,{title:"Input schema",body:t.inputSchemaJson,empty:"No input schema.",compact:!0}),b.jsx(va,{title:"Output schema",body:t.outputSchemaJson,empty:"No output schema.",compact:!0}),t.exampleInputJson&&b.jsx(va,{title:"Example request",body:t.exampleInputJson,empty:"",compact:!0}),t.exampleOutputJson&&b.jsx(va,{title:"Example response",body:t.exampleOutputJson,empty:"",compact:!0})]})]})})]})}function G5e(e){const[t,n]=O.useState(e.initialQuery);return O.useEffect(()=>{n(e.initialQuery)},[e.initialQuery]),b.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[b.jsx("div",{className:"shrink-0 border-b border-border px-4 py-3",children:b.jsxs("form",{className:"flex items-center gap-2 max-w-2xl",onSubmit:r=>{r.preventDefault(),e.onSubmitQuery(t.trim())},children:[b.jsxs("div",{className:"relative flex-1",children:[b.jsx(hU,{className:"absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground/40"}),b.jsx("input",{value:t,onChange:r=>n(r.target.value),placeholder:"Search tools\\u2026",className:"h-9 w-full rounded-md border border-input bg-background pl-9 pr-3 text-sm outline-none transition-colors placeholder:text-muted-foreground/40 focus:border-ring focus:ring-1 focus:ring-ring/30"})]}),b.jsx(Ln,{type:"submit",size:"sm",children:"Search"})]})}),b.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:b.jsx(Du,{loadable:e.discovery,loading:"Searching\\u2026",children:r=>r.query.length===0?b.jsx(wv,{title:"Search your tools",description:"Type a query to find matching tools across this source."}):r.results.length===0?b.jsx(wv,{title:"No results",description:"Try different search terms."}):b.jsx("div",{className:"max-w-3xl space-y-2",children:r.results.map((s,i)=>b.jsxs("button",{type:"button",onClick:()=>e.onOpenTool(s.path),className:"group w-full rounded-lg border border-border bg-card/60 p-3.5 text-left transition-all hover:border-primary/30 hover:shadow-sm",children:[b.jsxs("div",{className:"flex items-center justify-between gap-3 mb-1.5",children:[b.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[b.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center rounded-md bg-muted text-[10px] font-mono tabular-nums text-muted-foreground/60",children:i+1}),b.jsx("h4",{className:"truncate font-mono text-[13px] font-medium text-foreground group-hover:text-primary transition-colors",children:s.path})]}),b.jsx("span",{className:"shrink-0 font-mono text-xs tabular-nums text-muted-foreground/50",children:s.score.toFixed(2)})]}),s.description&&b.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed line-clamp-2",children:s.description})]},s.path))})})})]})}function K5e(e){return b.jsx("button",{type:"button",onClick:()=>e.onCopy(e.text,e.field),className:"shrink-0 rounded p-1 text-muted-foreground/30 transition-colors hover:text-muted-foreground",title:`Copy ${e.field}`,children:e.copiedField===e.field?b.jsx(KA,{}):b.jsx(mU,{})})}function rq(e,t){if(!t.trim())return e;const n=t.trim().toLowerCase().split(/\s+/),r=e.toLowerCase(),s=[];for(const c of n){let u=0;for(;u<r.length;){const l=r.indexOf(c,u);if(l===-1)break;s.push([l,l+c.length]),u=l+1}}if(s.length===0)return e;s.sort((c,u)=>c[0]-u[0]);const i=[s[0]];for(let c=1;c<s.length;c++){const u=i[i.length-1],l=s[c];l[0]<=u[1]?u[1]=Math.max(u[1],l[1]):i.push(l)}const a=[];let o=0;for(const[c,u]of i)o<c&&a.push({text:e.slice(o,c),hl:!1}),a.push({text:e.slice(c,u),hl:!0}),o=u;return o<e.length&&a.push({text:e.slice(o),hl:!1}),b.jsx(b.Fragment,{children:a.map((c,u)=>c.hl?b.jsx("mark",{className:"rounded-sm bg-primary/20 text-foreground px-px",children:c.text},u):b.jsx("span",{children:c.text},u))})}function W5e(){const e=zA(),[t,n]=O.useState(!1),[r,s]=O.useState(null);return b.jsx("div",{className:"flex-1 overflow-y-auto",children:b.jsxs("div",{className:"mx-auto max-w-3xl px-6 py-10 lg:px-10 lg:py-14",children:[b.jsxs("div",{className:"flex items-end justify-between mb-8",children:[b.jsxs("div",{children:[b.jsx("h1",{className:"font-display text-3xl tracking-tight text-foreground lg:text-4xl",children:"Secrets"}),b.jsx("p",{className:"mt-1.5 text-[14px] text-muted-foreground",children:"Tokens and credentials stored in this instance."})]}),b.jsxs(Ln,{size:"sm",onClick:()=>{n(!0),s(null)},children:[b.jsx(Vo,{className:"size-3.5"}),"Add secret"]})]}),t&&b.jsx(Y5e,{onClose:()=>n(!1),className:"mb-6"}),b.jsx(Du,{loadable:e,loading:"Loading secrets...",children:i=>i.length===0&&!t?b.jsx(J5e,{onAdd:()=>n(!0)}):b.jsxs("div",{className:"rounded-xl border border-border bg-card/80 divide-y divide-border overflow-hidden",children:[i.map(a=>b.jsx(Q5e,{secret:a,isEditing:r===a.id,onEdit:()=>s(r===a.id?null:a.id),onCancelEdit:()=>s(null)},a.id)),i.length===0&&b.jsx("div",{className:"px-5 py-8 text-center text-[13px] text-muted-foreground/60",children:"No secrets yet. Add one above."})]})})]})})}function J5e(e){return b.jsxs("div",{className:"flex flex-col items-center justify-center rounded-2xl border border-dashed border-border py-20",children:[b.jsx("div",{className:"flex size-12 items-center justify-center rounded-2xl bg-muted text-muted-foreground mb-4",children:b.jsx(sq,{className:"size-5"})}),b.jsx("p",{className:"text-[14px] font-medium text-foreground/70 mb-1",children:"No secrets stored"}),b.jsx("p",{className:"text-[13px] text-muted-foreground/60 mb-5",children:"Secrets let you securely provide tokens for source authentication."}),b.jsxs(Ln,{size:"sm",onClick:e.onAdd,children:[b.jsx(Vo,{className:"size-3.5"}),"Add secret"]})]})}function Y5e(e){const t=VA(),[n,r]=O.useState(""),[s,i]=O.useState(""),[a,o]=O.useState(null),c=async()=>{o(null);const u=n.trim();if(!u){o("Name is required.");return}if(!s){o("Value is required.");return}try{await t.mutateAsync({name:u,value:s}),e.onClose()}catch(l){o(l instanceof Error?l.message:"Failed creating secret.")}};return b.jsxs("div",{className:Ve("rounded-xl border border-primary/20 bg-card/80",e.className),children:[b.jsxs("div",{className:"border-b border-border px-5 py-3 flex items-center justify-between",children:[b.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"New secret"}),b.jsx("button",{type:"button",onClick:e.onClose,className:"text-[12px] text-muted-foreground hover:text-foreground transition-colors",children:"Cancel"})]}),b.jsxs("div",{className:"p-5 space-y-4",children:[a&&b.jsx("div",{className:"rounded-lg border border-destructive/30 bg-destructive/8 px-4 py-2.5 text-[13px] text-destructive",children:a}),b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[b.jsx(Jy,{label:"Name",children:b.jsx("input",{value:n,onChange:u=>r(u.target.value),placeholder:"GitHub PAT",className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25",autoFocus:!0})}),b.jsx(Jy,{label:"Value",children:b.jsx("input",{type:"password",value:s,onChange:u=>i(u.target.value),placeholder:"ghp_...",className:"h-9 w-full rounded-lg border border-input bg-background px-3 font-mono text-[12px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25"})})]}),b.jsx("div",{className:"flex justify-end",children:b.jsxs(Ln,{size:"sm",onClick:c,disabled:t.status==="pending",children:[t.status==="pending"?b.jsx(Yi,{className:"size-3.5"}):b.jsx(Vo,{className:"size-3.5"}),"Store secret"]})})]})]})}function Q5e(e){const{secret:t,isEditing:n}=e,r=Nwe(),[s,i]=O.useState(!1),a=async()=>{if(window.confirm(`Delete "${t.name||t.id}"? This cannot be undone. Sources using this secret will lose access.`)){i(!0);try{await r.mutateAsync(t.id)}catch{}finally{i(!1)}}},o=new Date(t.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"});return b.jsxs("div",{className:"px-5 py-3.5",children:[b.jsxs("div",{className:"flex items-center justify-between gap-4",children:[b.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[b.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/8 text-primary",children:b.jsx(sq,{className:"size-3.5"})}),b.jsxs("div",{className:"min-w-0",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{className:"text-[13px] font-medium text-foreground truncate",children:t.name||"Unnamed secret"}),b.jsx(hi,{variant:"outline",className:"text-[9px] shrink-0",children:t.purpose.replace(/_/g," ")})]}),b.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[b.jsx("span",{className:"text-[11px] font-mono text-muted-foreground/50 truncate",children:t.id}),b.jsx("span",{className:"text-[11px] text-muted-foreground/40",children:o})]}),t.linkedSources.length>0&&b.jsxs("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[b.jsx("span",{className:"text-[10px] text-muted-foreground/50",children:"Used by"}),t.linkedSources.map(c=>b.jsx(Dr,{to:"/sources/$sourceId",params:{sourceId:c.sourceId},search:{tab:"model"},className:"inline-flex items-center gap-1 rounded-md bg-accent/60 px-1.5 py-0.5 text-[10px] font-medium text-foreground/70 transition-colors hover:bg-accent hover:text-foreground",children:c.sourceName},c.sourceId))]})]})]}),b.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[b.jsxs("button",{type:"button",onClick:e.onEdit,className:Ve("inline-flex items-center gap-1 rounded-md px-2 py-1.5 text-[11px] font-medium transition-colors",n?"bg-primary/10 text-primary":"text-muted-foreground hover:text-foreground hover:bg-accent/50"),children:[b.jsx(WA,{className:"size-3"}),"Edit"]}),b.jsxs("button",{type:"button",onClick:a,disabled:s,className:"inline-flex items-center gap-1 rounded-md px-2 py-1.5 text-[11px] font-medium text-muted-foreground transition-colors hover:text-destructive hover:bg-destructive/8 disabled:opacity-50",children:[s?b.jsx(Yi,{className:"size-3"}):b.jsx(pU,{className:"size-3"}),"Delete"]})]})]}),n&&b.jsx(X5e,{secret:t,onClose:e.onCancelEdit})]})}function X5e(e){const t=Pwe(),[n,r]=O.useState(e.secret.name??""),[s,i]=O.useState(""),[a,o]=O.useState(null),c=async()=>{o(null);const u={},l=n.trim();if(l&&l!==(e.secret.name??"")&&(u.name=l),s.length>0&&(u.value=s),Object.keys(u).length===0){e.onClose();return}try{await t.mutateAsync({secretId:e.secret.id,payload:u}),e.onClose()}catch(d){o(d instanceof Error?d.message:"Failed updating secret.")}};return b.jsxs("div",{className:"mt-3 pt-3 border-t border-border/50",children:[a&&b.jsx("div",{className:"rounded-lg border border-destructive/30 bg-destructive/8 px-4 py-2.5 text-[13px] text-destructive mb-3",children:a}),b.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[b.jsx(Jy,{label:"Name",children:b.jsx("input",{value:n,onChange:u=>r(u.target.value),placeholder:"Secret name",className:"h-8 w-full rounded-lg border border-input bg-background px-3 text-[12px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25",autoFocus:!0})}),b.jsx(Jy,{label:"New value (leave empty to keep current)",children:b.jsx("input",{type:"password",value:s,onChange:u=>i(u.target.value),placeholder:"Leave empty to keep existing",className:"h-8 w-full rounded-lg border border-input bg-background px-3 font-mono text-[11px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25"})})]}),b.jsxs("div",{className:"flex items-center justify-end gap-2 mt-3",children:[b.jsx("button",{type:"button",onClick:e.onClose,className:"rounded-md px-3 py-1.5 text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Cancel"}),b.jsxs(Ln,{size:"sm",onClick:c,disabled:t.status==="pending",children:[t.status==="pending"&&b.jsx(Yi,{className:"size-3"}),"Save"]})]})]})}function Jy(e){return b.jsxs("label",{className:"block space-y-1",children:[b.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:e.label}),e.children]})}function sq(e){return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:Ve("size-4",e.className),children:[b.jsx("path",{d:"M10 6a4 4 0 10-4.9 3.9L2 13v1.5h2V13h1.5v-1.5H7l.6-.6A4 4 0 0010 6z",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"}),b.jsx("circle",{cx:"10.5",cy:"5.5",r:"1",fill:"currentColor"})]})}const Z5e=["mcp","openapi","graphql"],eFe=["auto","streamable-http","sse"],tFe=["none","bearer","oauth2"],nFe=["none","bearer","basic","headers"],rFe=2*6e4,iq="executor-v3:oauth-result:",xa=e=>{const t=e.trim();return t.length>0?t:null},fx=e=>{try{const t=EU(e);if(!t)return"";const n=t.indexOf(".");return n>0?t.slice(0,n):t}catch{return""}},hx=(e,t)=>{const n=t.trim();if(n.length===0)return null;let r;try{r=JSON.parse(n)}catch{throw new Error(`${e} must be valid JSON.`)}if(r===null||Array.isArray(r)||typeof r!="object")throw new Error(`${e} must be a JSON object with string values.`);const s=Object.entries(r),i={};for(const[a,o]of s){if(typeof o!="string")throw new Error(`${e} must only contain string values.`);i[a]=o}return Object.keys(i).length===0?null:i},th=e=>{if(!e||e.detectedKind==="unknown")return{kind:"openapi",endpoint:e?.endpoint??"",specUrl:e?.specUrl??"",name:e?.name??"",namespace:e?.namespace||fx(e?.endpoint??""),transport:"",authKind:"none",authHeaderName:"Authorization",authPrefix:"Bearer ",bearerToken:"",bearerProviderId:"",bearerHandle:"",queryParamsText:"",headersText:""};const t=e.detectedKind,n=e.authInference;let r="none",s="Authorization",i="Bearer ";return n.supported&&(n.suggestedKind==="bearer"||n.suggestedKind==="apiKey"?(r="bearer",s=n.headerName??"Authorization",i=n.prefix??"Bearer "):n.suggestedKind==="oauth2"?(r="oauth2",s=n.headerName??"Authorization",i=n.prefix??"Bearer "):n.suggestedKind==="basic"&&(r="bearer",s="Authorization",i="Basic ")),{kind:t,endpoint:e.endpoint,specUrl:e.specUrl??"",name:e.name??"",namespace:e.namespace||fx(e.endpoint),transport:t==="mcp"?e.transport??"auto":"",authKind:r,authHeaderName:s,authPrefix:i,bearerToken:"",bearerProviderId:"",bearerHandle:"",queryParamsText:"",headersText:""}},sFe=e=>({...th(),kind:e.kind==="internal"?"openapi":e.kind,endpoint:e.endpoint,name:e.name,namespace:fx(e.endpoint),transport:e.kind==="mcp"?"auto":""}),iFe=e=>{if(e.kind==="none")return{kind:"none"};if(e.kind==="bearer"){if(!e.token.trim())throw new Error("Token is required for bearer probe auth.");return{kind:"bearer",headerName:xa(e.headerName),prefix:xa(e.prefix),token:e.token.trim()}}if(e.kind==="basic"){if(!e.username.trim())throw new Error("Username is required for basic probe auth.");return{kind:"basic",username:e.username.trim(),password:e.password}}const t=hx("Probe headers",e.headersText);if(!t)throw new Error("At least one header is required for headers probe auth.");return{kind:"headers",headers:t}},aFe=e=>{const t=e.endpoint.trim();if(!t)throw new Error("Endpoint is required.");if(e.kind==="mcp")return{kind:"mcp",endpoint:t,name:xa(e.name),namespace:xa(e.namespace),transport:e.transport===""?"auto":e.transport,queryParams:hx("Query params",e.queryParamsText),headers:hx("Request headers",e.headersText)};const n=oFe(e);if(e.kind==="openapi"){const r=e.specUrl.trim();if(!r)throw new Error("OpenAPI sources require a spec URL.");return{kind:"openapi",endpoint:t,specUrl:r,name:xa(e.name),namespace:xa(e.namespace),auth:n}}return{kind:"graphql",endpoint:t,name:xa(e.name),namespace:xa(e.namespace),auth:n}},oFe=e=>{if(e.authKind==="none")return{kind:"none"};if(e.authKind==="bearer"){const t=xa(e.authHeaderName),n=e.authPrefix.length===0?null:e.authPrefix;if(e.bearerProviderId.trim()&&e.bearerHandle.trim())return{kind:"bearer",headerName:t,prefix:n,tokenRef:{providerId:e.bearerProviderId.trim(),handle:e.bearerHandle.trim()}};if(e.bearerToken.trim())return{kind:"bearer",headerName:t,prefix:n,token:e.bearerToken.trim()};throw new Error("Bearer auth requires a token. Select or create a secret, or enter a token directly.")}},c$=e=>{if(typeof window>"u")return null;const t=window.localStorage.getItem(`${iq}${e}`);if(!t)return null;try{return JSON.parse(t)}catch{return null}},u$=e=>{typeof window>"u"||window.localStorage.removeItem(`${iq}${e}`)},cFe=async e=>{if(typeof window>"u")throw new Error("OAuth popup is only available in a browser context");u$(e.sessionId);const t=window.open(e.authorizationUrl,"executor-v3-source-oauth","popup=yes,width=520,height=720");if(!t)throw new Error("Popup blocked. Allow popups and try again.");return t.focus(),await new Promise((n,r)=>{let s=!1,i=0,a=0;const o=()=>{window.removeEventListener("message",l),i&&window.clearInterval(i),a&&window.clearTimeout(a),t.closed||t.close(),u$(e.sessionId)},c=d=>{s||(s=!0,o(),r(new Error(d)))},u=d=>{if(!d.ok){c(d.error||"OAuth failed");return}s||(s=!0,o(),n(d.auth))},l=d=>{if(d.origin!==window.location.origin)return;const f=d.data;!f||f.type!=="executor-v3:oauth-result"||f.ok&&f.sessionId!==e.sessionId||!f.ok&&f.sessionId!==null&&f.sessionId!==e.sessionId||u(f)};window.addEventListener("message",l),a=window.setTimeout(()=>{c("OAuth popup timed out before completion. Please try again.")},rFe),i=window.setInterval(()=>{const d=c$(e.sessionId);if(d){u(d);return}t.closed&&window.setTimeout(()=>{const f=c$(e.sessionId);if(f){u(f);return}c("OAuth popup was closed before completion.")},400)},300)})};function uFe(){const e=kd(),t=Bwe(),n=zwe(),r=zA(),s=Wz();Yz();const[i,a]=O.useState(""),[o,c]=O.useState(!1),[u,l]=O.useState({kind:"none",token:"",headerName:"Authorization",prefix:"Bearer ",username:"",password:"",headersText:""}),[d,f]=O.useState("idle"),[h,m]=O.useState(null),[y,g]=O.useState(th()),[p,_]=O.useState(null),[k,v]=O.useState(null),[w,S]=O.useState(!1),[T,I]=O.useState(null),D=(M,K)=>{g(A=>({...A,[M]:K}))},R=(M,K)=>{l(A=>({...A,[M]:K}))},z=async()=>{I(null);const M=i.trim();if(!M){I({tone:"error",text:"Please enter a URL to discover."});return}f("discovering");try{const K={url:M,...o&&u.kind!=="none"?{probeAuth:iFe(u)}:{}},A=await t.mutateAsync(K);m(A),g(th(A)),f("editing"),A.detectedKind==="unknown"?I({tone:"info",text:"Could not auto-detect the source type. Please configure manually."}):A.warnings.length>0&&I({tone:"info",text:A.warnings.join(" ")})}catch(K){f("idle"),I({tone:"error",text:K instanceof Error?K.message:"Discovery failed."})}},V=()=>{m(null),g(th()),f("editing"),I(null)},H=async M=>{a(M.endpoint),I(null),f("discovering");try{const K=await t.mutateAsync({url:M.endpoint});m(K);const A=th(K);A.name=M.name,g(A),f("editing"),K.warnings.length>0&&I({tone:"info",text:K.warnings.join(" ")})}catch(K){m(null),g(sFe(M)),f("editing"),I({tone:"error",text:`Discovery failed for ${M.name}: ${K instanceof Error?K.message:"unknown error"}. Configure manually.`})}},G=async()=>{I(null);try{const M=aFe(y);f("connecting");const K=await n.mutateAsync(M);_(K),K.kind==="connected"?(f("connected"),I({tone:"success",text:`"${K.source.name}" connected successfully.`}),setTimeout(()=>{e({to:"/sources/$sourceId",params:{sourceId:K.source.id},search:{tab:"model"}})},1200)):K.kind==="credential_required"?(f("credential_required"),I({tone:"info",text:"This source requires credentials. Configure auth below, then connect again."}),y.authKind==="none"&&D("authKind","bearer")):K.kind==="oauth_required"&&(f("oauth_required"),v({source:K.source,sessionId:K.sessionId,authorizationUrl:K.authorizationUrl}),I({tone:"info",text:"This source requires OAuth authentication. Click the button below to sign in."}))}catch(M){f("editing"),I({tone:"error",text:M instanceof Error?M.message:"Connection failed."})}},Q=async()=>{if(k){I(null),S(!0);try{await cFe({authorizationUrl:k.authorizationUrl,sessionId:k.sessionId}),s(),f("connected"),I({tone:"success",text:`"${k.source.name}" connected via OAuth.`}),setTimeout(()=>{e({to:"/sources/$sourceId",params:{sourceId:k.source.id},search:{tab:"model"}})},1200)}catch(M){I({tone:"error",text:M instanceof Error?M.message:"OAuth flow failed."})}finally{S(!1)}}},ne=async()=>{await G()},me=()=>{f("editing"),I(null),_(null),v(null)},ke=d==="discovering",et=d==="connecting",C=ke||et||w;return b.jsx("div",{className:"flex-1 overflow-y-auto",children:b.jsxs("div",{className:"mx-auto max-w-3xl px-6 py-8 lg:px-10 lg:py-12",children:[b.jsxs(Dr,{to:"/",className:"inline-flex items-center gap-1.5 text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground mb-6",children:[b.jsx(gU,{className:"size-3.5"}),"Back"]}),b.jsxs("div",{className:"flex items-center justify-between gap-4 mb-6",children:[b.jsx("h1",{className:"font-display text-2xl tracking-tight text-foreground lg:text-3xl",children:"Add source"}),d==="editing"&&b.jsx(hi,{variant:"outline",children:y.kind}),d==="connected"&&b.jsx(hi,{variant:"default",children:"connected"})]}),T&&b.jsx(lFe,{state:T,className:"mb-6"}),(d==="idle"||d==="discovering")&&b.jsx("div",{className:"space-y-6",children:b.jsx(ol,{title:"Discover",children:b.jsxs("div",{className:"space-y-4",children:[b.jsx("p",{className:"text-[13px] text-muted-foreground",children:"Enter a URL and we'll auto-detect the source type, endpoint, auth requirements, and more."}),b.jsx(gn,{label:"URL",children:b.jsxs("div",{className:"flex gap-2",children:[b.jsx("input",{value:i,onChange:M=>a(M.target.value),placeholder:"https://api.example.com or https://mcp.example.com/mcp",onKeyDown:M=>{M.key==="Enter"&&!ke&&z()},className:"h-9 flex-1 rounded-lg border border-input bg-background px-3 font-mono text-[12px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25"}),b.jsxs(Ln,{onClick:z,disabled:C,children:[ke?b.jsx(Yi,{className:"size-3.5"}):b.jsx(RSe,{className:"size-3.5"}),ke?"Discovering…":"Discover"]})]})}),b.jsx("div",{children:b.jsx("button",{type:"button",onClick:()=>c(!o),className:"text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground",children:o?"Hide probe auth":"Need auth to discover?"})}),o&&b.jsxs("div",{className:"rounded-lg border border-border bg-card/70 p-4 space-y-3",children:[b.jsx(gn,{label:"Auth type",children:b.jsx(d0,{value:u.kind,onChange:M=>R("kind",M),options:nFe.map(M=>({value:M,label:M}))})}),u.kind==="bearer"&&b.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[b.jsx(gn,{label:"Header name",children:b.jsx(Js,{value:u.headerName,onChange:M=>R("headerName",M),placeholder:"Authorization"})}),b.jsx(gn,{label:"Prefix",children:b.jsx(Js,{value:u.prefix,onChange:M=>R("prefix",M),placeholder:"Bearer "})}),b.jsx(gn,{label:"Token",className:"sm:col-span-2",children:b.jsx(Js,{value:u.token,onChange:M=>R("token",M),placeholder:"sk-...",mono:!0})})]}),u.kind==="basic"&&b.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[b.jsx(gn,{label:"Username",children:b.jsx(Js,{value:u.username,onChange:M=>R("username",M),placeholder:"user"})}),b.jsx(gn,{label:"Password",children:b.jsx(Js,{value:u.password,onChange:M=>R("password",M),placeholder:"pass"})})]}),u.kind==="headers"&&b.jsx(gn,{label:"Headers (JSON)",children:b.jsx(Tw,{value:u.headersText,onChange:M=>R("headersText",M),placeholder:`{
|
|
384
|
+
"x-api-key": "..."
|
|
385
|
+
}`})})]}),b.jsx("div",{className:"flex items-center justify-end border-t border-border pt-4",children:b.jsx("button",{type:"button",onClick:V,disabled:C,className:"text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Skip discovery and configure manually"})}),b.jsxs("div",{className:"space-y-3 border-t border-border pt-4",children:[b.jsxs("div",{children:[b.jsx("p",{className:"text-[12px] font-medium text-foreground",children:"Start from a known source"}),b.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Load a real MCP, OpenAPI, or GraphQL template without running discovery first."})]}),b.jsx("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:vU.map(M=>b.jsxs("button",{type:"button",onClick:()=>H(M),disabled:C,className:"rounded-xl border border-border bg-card/70 px-4 py-3 text-left transition-colors hover:bg-accent/50 disabled:opacity-60",children:[b.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2",children:[b.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[b.jsx("div",{className:"flex size-4 shrink-0 items-center justify-center text-muted-foreground",children:b.jsx(F1,{endpoint:M.endpoint,kind:M.kind,className:"size-4"})}),b.jsx("span",{className:"truncate text-[13px] font-medium text-foreground",children:M.name})]}),b.jsx(hi,{variant:"outline",className:"text-[9px]",children:M.kind})]}),b.jsx("span",{className:"line-clamp-2 text-[11px] text-muted-foreground",children:M.summary})]},M.id))})]})]})})}),(d==="editing"||d==="connecting"||d==="credential_required")&&b.jsxs("div",{className:"space-y-6",children:[b.jsx(ol,{title:"Configuration",children:b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[b.jsx(gn,{label:"Name",children:b.jsx(Js,{value:y.name,onChange:M=>D("name",M),placeholder:"My API"})}),b.jsx(gn,{label:"Kind",children:b.jsx(d0,{value:y.kind,onChange:M=>D("kind",M),options:Z5e.map(M=>({value:M,label:M}))})}),b.jsx(gn,{label:"Endpoint",className:"sm:col-span-2",children:b.jsx(Js,{value:y.endpoint,onChange:M=>D("endpoint",M),placeholder:"https://api.example.com",mono:!0})}),b.jsx(gn,{label:"Namespace",children:b.jsx(Js,{value:y.namespace,onChange:M=>D("namespace",M),placeholder:"example"})}),y.kind==="openapi"&&b.jsx(gn,{label:"Spec URL",className:"sm:col-span-2",children:b.jsx(Js,{value:y.specUrl,onChange:M=>D("specUrl",M),placeholder:"https://example.com/openapi.yaml",mono:!0})})]})}),y.kind==="mcp"&&b.jsx(ol,{title:"Transport",children:b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[b.jsx(gn,{label:"Transport mode",children:b.jsx(d0,{value:y.transport||"auto",onChange:M=>D("transport",M),options:eFe.map(M=>({value:M,label:M}))})}),b.jsxs("div",{className:"sm:col-span-2 grid gap-4 sm:grid-cols-2",children:[b.jsx(gn,{label:"Query params (JSON)",children:b.jsx(Tw,{value:y.queryParamsText,onChange:M=>D("queryParamsText",M),placeholder:`{
|
|
386
|
+
"workspace": "demo"
|
|
387
|
+
}`})}),b.jsx(gn,{label:"Headers (JSON)",children:b.jsx(Tw,{value:y.headersText,onChange:M=>D("headersText",M),placeholder:`{
|
|
388
|
+
"x-api-key": "..."
|
|
389
|
+
}`})})]})]})}),y.kind!=="mcp"&&b.jsx(ol,{title:"Authentication",children:b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[b.jsx(gn,{label:"Auth mode",children:b.jsx(d0,{value:y.authKind,onChange:M=>D("authKind",M),options:tFe.map(M=>({value:M,label:M}))})}),y.authKind!=="none"&&b.jsxs(b.Fragment,{children:[b.jsx(gn,{label:"Header name",children:b.jsx(Js,{value:y.authHeaderName,onChange:M=>D("authHeaderName",M),placeholder:"Authorization"})}),b.jsx(gn,{label:"Prefix",children:b.jsx(Js,{value:y.authPrefix,onChange:M=>D("authPrefix",M),placeholder:"Bearer "})})]}),y.authKind==="bearer"&&b.jsx(gn,{label:"Token",className:"sm:col-span-2",children:b.jsx(dFe,{secrets:r,providerId:y.bearerProviderId,handle:y.bearerHandle,inlineToken:y.bearerToken,onSelectSecret:(M,K)=>{D("bearerProviderId",M),D("bearerHandle",K),D("bearerToken","")},onChangeToken:M=>{D("bearerToken",M),D("bearerProviderId",""),D("bearerHandle","")}})})]})}),b.jsxs("div",{className:"flex items-center justify-end gap-3 border-t border-border pt-5",children:[d==="credential_required"&&b.jsx(Ln,{variant:"ghost",type:"button",onClick:me,children:"Back to edit"}),b.jsx(Dr,{to:"/",className:"inline-flex",children:b.jsx(Ln,{variant:"ghost",type:"button",children:"Cancel"})}),b.jsxs(Ln,{onClick:d==="credential_required"?ne:G,disabled:C,children:[et?b.jsx(Yi,{className:"size-3.5"}):b.jsx(Vo,{className:"size-3.5"}),et?"Connecting…":"Connect"]})]})]}),d==="oauth_required"&&k&&b.jsx("div",{className:"space-y-6",children:b.jsx(ol,{title:"OAuth Authentication Required",children:b.jsxs("div",{className:"space-y-4",children:[b.jsxs("p",{className:"text-[13px] text-muted-foreground",children:["The source ",b.jsx("strong",{className:"text-foreground",children:k.source.name})," requires OAuth. Click the button below to open a popup and complete authentication."]}),b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsxs(Ln,{onClick:Q,disabled:w,children:[w?b.jsx(Yi,{className:"size-3.5"}):null,w?"Authenticating…":"Sign in with OAuth"]}),b.jsx(Ln,{variant:"ghost",onClick:me,children:"Back to edit"})]})]})})}),d==="connected"&&p&&b.jsx(ol,{title:"Connected",children:b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-primary/10 text-primary",children:b.jsx(KA,{className:"size-5"})}),b.jsxs("div",{children:[b.jsx("p",{className:"text-[14px] font-medium text-foreground",children:p.source.name}),b.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Source connected. Redirecting..."})]})]})})]})})}function ol(e){return b.jsxs("section",{className:Ve("rounded-xl border border-border bg-card/80",e.className),children:[b.jsx("div",{className:"border-b border-border px-5 py-3",children:b.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e.title})}),b.jsx("div",{className:"p-5",children:e.children})]})}function gn(e){return b.jsxs("label",{className:Ve("block space-y-1.5",e.className),children:[b.jsx("span",{className:"text-[12px] font-medium text-foreground",children:e.label}),e.children]})}function Js(e){return b.jsx("input",{value:e.value,onChange:t=>e.onChange(t.target.value),placeholder:e.placeholder,className:Ve("h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25",e.mono&&"font-mono text-[12px]")})}function d0(e){return b.jsx("select",{value:e.value,onChange:t=>e.onChange(t.target.value),className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring/25",children:e.options.map(t=>b.jsx("option",{value:t.value,children:t.label},t.value))})}function Tw(e){return b.jsx("textarea",{value:e.value,onChange:t=>e.onChange(t.target.value),placeholder:e.placeholder,spellCheck:!1,className:"min-h-28 w-full rounded-lg border border-input bg-background px-3 py-2.5 font-mono text-[12px] leading-relaxed text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25"})}function lFe(e){return b.jsx("div",{className:Ve("rounded-lg border px-4 py-3 text-[13px]",e.state.tone==="success"&&"border-primary/30 bg-primary/8 text-foreground",e.state.tone==="info"&&"border-border bg-card text-muted-foreground",e.state.tone==="error"&&"border-destructive/30 bg-destructive/8 text-destructive",e.className),children:e.state.text})}const Iw="__create_new__",Aw="__inline_token__";function dFe(e){const{secrets:t,providerId:n,handle:r,inlineToken:s,onSelectSecret:i,onChangeToken:a}=e,o=VA(),[c,u]=O.useState(!1),[l,d]=O.useState(!1),[f,h]=O.useState(""),[m,y]=O.useState(""),[g,p]=O.useState(null),_=c?Iw:l?Aw:r||"",k=S=>{if(S===Iw){u(!0),d(!1),h(""),y(""),p(null);return}if(S===Aw){d(!0),u(!1),i("","");return}if(S===""){d(!1),u(!1),i("","");return}d(!1),u(!1),i("postgres",S)},v=async()=>{p(null);const S=f.trim();if(!S){p("Name is required.");return}if(!m){p("Value is required.");return}try{const T=await o.mutateAsync({name:S,value:m});i(T.providerId,T.id),u(!1)}catch(T){p(T instanceof Error?T.message:"Failed creating secret.")}};if(t.status!=="ready")return b.jsx("select",{disabled:!0,className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-muted-foreground outline-none opacity-60",children:b.jsx("option",{children:"Loading..."})});const w=t.data;return b.jsxs("div",{className:"space-y-2",children:[b.jsxs("select",{value:_,onChange:S=>k(S.target.value),className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring/25",children:[b.jsx("option",{value:"",children:"Select a secret..."}),w.map(S=>b.jsx("option",{value:S.id,children:S.name||S.id},S.id)),b.jsx("option",{value:Aw,children:"Paste token directly"}),b.jsx("option",{value:Iw,children:"+ Create new secret"})]}),l&&b.jsx("input",{type:"password",value:s,onChange:S=>a(S.target.value),placeholder:"sk-... or ghp_...",className:"h-9 w-full rounded-lg border border-input bg-background px-3 font-mono text-[12px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25",autoFocus:!0}),c&&b.jsxs("div",{className:"rounded-lg border border-primary/20 bg-card/80 p-3 space-y-3",children:[g&&b.jsx("div",{className:"rounded-md border border-destructive/30 bg-destructive/8 px-3 py-2 text-[12px] text-destructive",children:g}),b.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[b.jsxs("label",{className:"block space-y-1",children:[b.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:"Name"}),b.jsx("input",{value:f,onChange:S=>h(S.target.value),placeholder:"API Key",className:"h-8 w-full rounded-lg border border-input bg-background px-3 text-[12px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25",autoFocus:!0})]}),b.jsxs("label",{className:"block space-y-1",children:[b.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:"Value"}),b.jsx("input",{type:"password",value:m,onChange:S=>y(S.target.value),placeholder:"sk-...",className:"h-8 w-full rounded-lg border border-input bg-background px-3 font-mono text-[11px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25"})]})]}),b.jsxs("div",{className:"flex items-center justify-end gap-2",children:[b.jsx("button",{type:"button",onClick:()=>u(!1),className:"rounded-md px-2.5 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Cancel"}),b.jsxs(Ln,{size:"sm",onClick:v,disabled:o.status==="pending",children:[o.status==="pending"&&b.jsx(Yi,{className:"size-3"}),"Store & use"]})]})]})]})}const fFe=["model","discover","manifest","definitions","raw"],Bu=YG({component:nve}),hFe=wu({getParentRoute:()=>Bu,path:"/",component:ave}),mFe=wu({getParentRoute:()=>Bu,path:"/sources/new",component:_ve}),pFe=wu({getParentRoute:()=>Bu,path:"/sources/add",component:uFe}),X0=wu({getParentRoute:()=>Bu,path:"/sources/$sourceId",validateSearch:e=>({tab:typeof e.tab=="string"&&fFe.includes(e.tab)?e.tab:"model",tool:typeof e.tool=="string"&&e.tool.length>0?e.tool:void 0,query:typeof e.query=="string"?e.query:void 0}),component:bFe}),aq=wu({getParentRoute:()=>Bu,path:"/sources/$sourceId/edit",component:yFe}),gFe=wu({getParentRoute:()=>Bu,path:"/secrets",component:W5e});function bFe(){const{sourceId:e}=X0.useParams(),t=X0.useSearch(),n=kd({from:X0.fullPath});return b.jsx(z5e,{sourceId:e,search:t,navigate:n})}function yFe(){const{sourceId:e}=aq.useParams();return b.jsx(kve,{sourceId:e})}const _Fe=Bu.addChildren([hFe,mFe,pFe,X0,aq,gFe]),kFe=iK({routeTree:_Fe,defaultPreload:"intent"});function EFe(){return b.jsx(O.StrictMode,{children:b.jsx(Awe,{children:b.jsx(cK,{router:kFe})})})}const kBe=Object.freeze(Object.defineProperty({__proto__:null,App:EFe},Symbol.toStringTag,{value:"Module"})),wFe=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:z7},Symbol.toStringTag,{value:"Module"}));export{rje as B,bBe as M,Es as R,kBe as m,O as r};
|