0sec-cli 0.18.0 → 0.22.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/{0sec.js → 0.js} +90 -82
- package/LICENSE +1 -1
- package/README.md +62 -46
- package/chunks/adapt-loop-7I57LXXR.js +18 -0
- package/chunks/{adgraph-JLGA6RYI.js → adgraph-AUDQTBYA.js} +5 -5
- package/chunks/agent/skills/frameworks/entra-id.yaml +2 -2
- package/chunks/agent/skills/techniques/assumption-mining.yaml +2 -2
- package/chunks/agent/skills/techniques/cve-poc-adaptation.yaml +2 -2
- package/chunks/agent/skills/techniques/entra-attack-paths.yaml +1 -1
- package/chunks/agent/skills/techniques/kernel-weaponization.yaml +1 -1
- package/chunks/agent/skills/techniques/llm-prompt-injection.yaml +2 -2
- package/chunks/agent/skills/techniques/npm-ecosystem.yaml +1 -1
- package/chunks/agent/skills/techniques/poc-verification.yaml +1 -1
- package/chunks/agent/skills/techniques/seedless-depth-review.yaml +20 -38
- package/chunks/{artifact-scraper-HQ7HLP6V.js → artifact-scraper-PYZ3RU3O.js} +6 -6
- package/chunks/{assumption-mining-5SNIVVDN.js → assumption-mining-MFLF43IR.js} +24 -26
- package/chunks/{chunk-7DQEV5QI.js → chunk-23DG5YKS.js} +4 -4
- package/chunks/{chunk-UR4ELX2Y.js → chunk-2GV4HQKE.js} +340 -703
- package/chunks/{chunk-P6WKNFWX.js → chunk-2OQOQ2FZ.js} +8 -8
- package/chunks/{chunk-5G3ZXFBW.js → chunk-2WNCI664.js} +3 -3
- package/chunks/{chunk-DW5UWPFY.js → chunk-4VGLO2YS.js} +6 -5
- package/chunks/{chunk-KLTNTE2Z.js → chunk-5IBCBQEH.js} +13 -14
- package/chunks/{chunk-N7BOUYEV.js → chunk-5MWAG3FT.js} +14 -14
- package/chunks/{chunk-OEFNRYI2.js → chunk-6GHSR47F.js} +3 -6
- package/chunks/chunk-6YNKRUMC.js +4474 -0
- package/chunks/{chunk-6L26OBWI.js → chunk-76KSBWOQ.js} +255 -35
- package/chunks/chunk-7DEHG7YT.js +2143 -0
- package/chunks/{chunk-AD7WXDH6.js → chunk-7UFUALR2.js} +288 -22
- package/chunks/{chunk-53G27VPS.js → chunk-AZ7L3HFD.js} +7 -2
- package/chunks/{chunk-TSK2AG6J.js → chunk-CAYANSH6.js} +173 -1757
- package/chunks/{chunk-SAFFWQW4.js → chunk-DKSCN2AB.js} +7 -7
- package/chunks/{chunk-2JCCA2JL.js → chunk-DM5C5L5D.js} +3 -3
- package/chunks/{chunk-RWONANDA.js → chunk-DQTNI3KY.js} +5 -5
- package/chunks/{chunk-5JI7L7KV.js → chunk-EGZGZFAH.js} +10036 -12938
- package/chunks/{chunk-6LKRLK2R.js → chunk-FHC2B7LN.js} +3 -3
- package/chunks/{chunk-MYVT64FN.js → chunk-GHWODZMR.js} +2 -2
- package/chunks/{chunk-2RMLOJVB.js → chunk-GVD6SJGH.js} +2 -2
- package/chunks/{chunk-SF4KZ4O3.js → chunk-HLFS6WV2.js} +2 -2
- package/chunks/chunk-HR2TU42B.js +1228 -0
- package/chunks/{chunk-BFRB6HB2.js → chunk-HUNAPTKV.js} +3 -3
- package/chunks/chunk-IO7R7WBM.js +114 -0
- package/chunks/{chunk-WEBMRWEG.js → chunk-IXT64DV5.js} +656 -1868
- package/chunks/{chunk-3MOLBTLS.js → chunk-K2PWUPUI.js} +2 -2
- package/chunks/{chunk-WXQ6BJ6A.js → chunk-LCRTAQN2.js} +7 -7
- package/chunks/{chunk-SVJEDVYK.js → chunk-LPTRPRZR.js} +5 -5
- package/chunks/{chunk-CMKXP5RR.js → chunk-LYUAM3TG.js} +3 -3
- package/chunks/{chunk-BVAZO4WA.js → chunk-MICHDTBK.js} +3 -3
- package/chunks/{chunk-UCYRA73C.js → chunk-OAYUPGF6.js} +4 -4
- package/chunks/{chunk-XM5NLHYU.js → chunk-OWLJYJ5O.js} +14 -14
- package/chunks/{chunk-BKZFDZ23.js → chunk-QCUFBVIZ.js} +3 -3
- package/chunks/chunk-RE5EZDG2.js +5523 -0
- package/chunks/{chunk-ASUR522M.js → chunk-RRD4XXPU.js} +9 -9
- package/chunks/{chunk-AHTBZC3E.js → chunk-RSIUX3RW.js} +4 -4
- package/chunks/{chunk-BZNEY2ZS.js → chunk-SJBCK2EI.js} +15268 -16053
- package/chunks/{chunk-IOL7D5YV.js → chunk-SQCBHFWN.js} +3 -3
- package/chunks/chunk-TH2LW437.js +7829 -0
- package/chunks/{chunk-WVTBZEQO.js → chunk-TM74SSHC.js} +8 -8
- package/chunks/{chunk-U5FLXGHT.js → chunk-TO35Y326.js} +13 -729
- package/chunks/chunk-TRH2PJSN.js +547 -0
- package/chunks/{chunk-YYRBQVFE.js → chunk-TZFIAMWZ.js} +70 -16
- package/chunks/chunk-UELXHK2Y.js +1950 -0
- package/chunks/{chunk-RJWOYEOG.js → chunk-UEX7PFSE.js} +5 -5
- package/chunks/{chunk-VQG4FT5D.js → chunk-UFHN6RIU.js} +2 -2
- package/chunks/{chunk-JQHOLLTD.js → chunk-UU7PQP6N.js} +9 -9
- package/chunks/{chunk-BFR2CDV5.js → chunk-UV5QWZGE.js} +283 -153
- package/chunks/{chunk-WU6AFRAZ.js → chunk-V36HVTUL.js} +12 -12
- package/chunks/{chunk-IR537GON.js → chunk-VCSFCHAJ.js} +2 -2
- package/chunks/{chunk-YLMN3N25.js → chunk-VIT5ALXF.js} +3 -3
- package/chunks/{chunk-BATRQBOR.js → chunk-VMRRNRMR.js} +41 -41
- package/chunks/{chunk-72CISA2D.js → chunk-VNRY6AWF.js} +89 -41
- package/chunks/chunk-W6UWZFKL.js +298 -0
- package/chunks/{chunk-3KPWWJCI.js → chunk-XFCTUKXR.js} +88 -88
- package/chunks/{chunk-GMT2AZKM.js → chunk-YIQSGNAA.js} +897 -130
- package/chunks/codex-models-7TLJSY3L.js +17 -0
- package/chunks/{commands-TBC2F5CE.js → commands-NEI7L3QA.js} +2836 -1424
- package/chunks/corpus-v1.json +2 -2
- package/chunks/data/appsec-archetypes.json +2 -2
- package/chunks/data/chromium-archetypes.json +1 -1
- package/chunks/data/freebsd-archetypes.json +1 -1
- package/chunks/data/kernel-archetypes.json +2 -2
- package/chunks/db-5AP3JB4W.js +16 -0
- package/chunks/{disclose-EKTWSCGW.js → disclose-LDNKAVRH.js} +13 -11
- package/chunks/{dist-4YICS2J2.js → dist-3FNZIBB4.js} +394 -404
- package/chunks/{dist-4MAW5X6L.js → dist-5YHYNLI3.js} +6 -6
- package/chunks/{dist-FMGSR3DW.js → dist-DD4H6HMQ.js} +13 -5
- package/chunks/dist-KEULE5IQ.js +21914 -0
- package/chunks/dist-XZB53PS5.js +53 -0
- package/chunks/eval-runner-43BO2C4T.js +26 -0
- package/chunks/example-manifest.json +2 -2
- package/chunks/{exploit-agent-45YQOHPJ.js → exploit-agent-N4A5ELBK.js} +4 -4
- package/chunks/{exploit-autoclimb-UZGEMGYT.js → exploit-autoclimb-N7P6KIF5.js} +6 -6
- package/chunks/{exploit-climb-SG23KB2G.js → exploit-climb-WNEJUB5W.js} +12 -12
- package/chunks/fix-Z452M4EC.js +26 -0
- package/chunks/{github-issues-MJ6OYOOU.js → github-issues-IGTTWM7V.js} +7 -7
- package/chunks/harness-QJJJVSG4.js +22 -0
- package/chunks/http-conformance-U5F6GKYG.js +11 -0
- package/chunks/http-sender-I5XFFY35.js +10 -0
- package/chunks/hunt-scan-K6D2V3PX.js +36 -0
- package/chunks/{identity-6ZAIIWOR.js → identity-62SVRW4H.js} +5 -5
- package/chunks/{kernel-primitive-7U6CWHXD.js → kernel-primitive-TKUACPKD.js} +6 -6
- package/chunks/{kernel-vm-runner-3JAU4O6J.js → kernel-vm-runner-RAAO2PGT.js} +6 -6
- package/chunks/memsafety-scan-FCPAXIZE.js +16 -0
- package/chunks/{native-loop-RJCJPOUS.js → native-loop-2ZRJENZ3.js} +17 -18
- package/chunks/{npm-detectors-KB5Y5ZFX.js → npm-detectors-Z2ZIQCN4.js} +6 -6
- package/chunks/npm-dynamic-discovery-5J7FT3XM.js +13 -0
- package/chunks/orchestrate-2GWGNTBF.js +58 -0
- package/chunks/{pre-recon-cve-66EB6G4M.js → pre-recon-cve-X2K2P5YQ.js} +4 -4
- package/chunks/prepare-KYHGFWCJ.js +13 -0
- package/chunks/process-N245QIQG.js +12 -0
- package/chunks/{run-D56MPDKY.js → run-U3XU4CTC.js} +11507 -13632
- package/chunks/{runtime-G7YWIO3B.js → runtime-G75TEWQY.js} +10 -11
- package/chunks/runtime-XFWJTBUO.js +12 -0
- package/chunks/{scan-stream-FHI2FYZE.js → scan-stream-BMOCPKQX.js} +7 -7
- package/chunks/scope-WXI46UHJ.js +21 -0
- package/chunks/{session-store-GZ4A4KYT.js → session-store-27L3ZU73.js} +6 -6
- package/chunks/source-files-REHOM44I.js +12 -0
- package/chunks/{specdrift-WCLH6TTQ.js → specdrift-AFS54WEJ.js} +5 -5
- package/chunks/token-KRWP5JYA.js +72 -0
- package/chunks/token-util-DWTL33S3.js +8 -0
- package/chunks/variant-candidates-YWZORZMK.js +13 -0
- package/chunks/{web-recon-prepass-JJGPEOLE.js → web-recon-prepass-YVMFXCIK.js} +9 -9
- package/cli-path-traversal-fixture.js +352 -0
- package/dashboard/assets/bot-Bg1Tp9_d.js +1 -0
- package/dashboard/assets/dist-B_dDCPbu.js +1 -0
- package/dashboard/assets/findings-page-mayGhNx6.js +5 -0
- package/dashboard/assets/format--susmHX7.js +1 -0
- package/dashboard/assets/input-TuVPR3Zl.js +1 -0
- package/dashboard/assets/jsx-runtime-MGseXjj5.js +3 -0
- package/dashboard/assets/live-page-HWWHX99U.js +1 -0
- package/dashboard/assets/meta-tile-ckHo-w7k.js +1 -0
- package/dashboard/assets/operations-BxZ0OoXO.js +10 -0
- package/dashboard/assets/operations-CMFVrXEe.css +2 -0
- package/dashboard/assets/operations-app-D3d35rgo.js +46 -0
- package/dashboard/assets/overview-page-W_4IteEr.js +1 -0
- package/dashboard/assets/page-header-Bw9AJgBV.js +1 -0
- package/dashboard/assets/scans-page-CgzVXHnn.js +1 -0
- package/dashboard/assets/siren-KQj8QAnJ.js +1 -0
- package/dashboard/assets/table-8EDklulN.js +1 -0
- package/dashboard/assets/tabs-CFHPOwg8.js +1 -0
- package/dashboard/index.html +4 -5
- package/node_modules/node-addon-api/LICENSE.md +9 -0
- package/node_modules/node-addon-api/README.md +95 -0
- package/node_modules/node-addon-api/common.gypi +21 -0
- package/node_modules/node-addon-api/except.gypi +25 -0
- package/node_modules/node-addon-api/index.js +14 -0
- package/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
- package/node_modules/node-addon-api/napi-inl.h +7250 -0
- package/node_modules/node-addon-api/napi.h +3463 -0
- package/node_modules/node-addon-api/node_addon_api.gyp +42 -0
- package/node_modules/node-addon-api/node_api.gyp +9 -0
- package/node_modules/node-addon-api/noexcept.gypi +26 -0
- package/node_modules/node-addon-api/nothing.c +0 -0
- package/node_modules/node-addon-api/package-support.json +21 -0
- package/node_modules/node-addon-api/package.json +481 -0
- package/node_modules/node-addon-api/tools/README.md +73 -0
- package/node_modules/node-addon-api/tools/check-napi.js +99 -0
- package/node_modules/node-addon-api/tools/clang-format.js +71 -0
- package/node_modules/node-addon-api/tools/conversion.js +301 -0
- package/node_modules/node-gyp-build/LICENSE +21 -0
- package/node_modules/node-gyp-build/README.md +58 -0
- package/node_modules/node-gyp-build/SECURITY.md +5 -0
- package/node_modules/node-gyp-build/bin.js +84 -0
- package/node_modules/node-gyp-build/build-test.js +19 -0
- package/node_modules/node-gyp-build/index.js +6 -0
- package/node_modules/node-gyp-build/node-gyp-build.js +207 -0
- package/node_modules/node-gyp-build/optional.js +7 -0
- package/node_modules/node-gyp-build/package.json +43 -0
- package/node_modules/tree-sitter/LICENSE +21 -0
- package/node_modules/tree-sitter/README.md +90 -0
- package/node_modules/tree-sitter/binding.gyp +76 -0
- package/node_modules/tree-sitter/index.js +895 -0
- package/node_modules/tree-sitter/package.json +62 -0
- package/node_modules/tree-sitter/prebuilds/darwin-arm64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/prebuilds/darwin-x64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/prebuilds/linux-x64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/prebuilds/win32-x64/tree-sitter.node +0 -0
- package/node_modules/tree-sitter/src/addon_data.h +47 -0
- package/node_modules/tree-sitter/src/binding.cc +35 -0
- package/node_modules/tree-sitter/src/conversions.cc +140 -0
- package/node_modules/tree-sitter/src/conversions.h +22 -0
- package/node_modules/tree-sitter/src/language.cc +106 -0
- package/node_modules/tree-sitter/src/language.h +17 -0
- package/node_modules/tree-sitter/src/logger.cc +70 -0
- package/node_modules/tree-sitter/src/logger.h +19 -0
- package/node_modules/tree-sitter/src/lookaheaditerator.cc +122 -0
- package/node_modules/tree-sitter/src/lookaheaditerator.h +33 -0
- package/node_modules/tree-sitter/src/node.cc +1056 -0
- package/node_modules/tree-sitter/src/node.h +30 -0
- package/node_modules/tree-sitter/src/parser.cc +298 -0
- package/node_modules/tree-sitter/src/parser.h +35 -0
- package/node_modules/tree-sitter/src/query.cc +383 -0
- package/node_modules/tree-sitter/src/query.h +39 -0
- package/node_modules/tree-sitter/src/tree.cc +307 -0
- package/node_modules/tree-sitter/src/tree.h +45 -0
- package/node_modules/tree-sitter/src/tree_cursor.cc +213 -0
- package/node_modules/tree-sitter/src/tree_cursor.h +52 -0
- package/node_modules/tree-sitter/tree-sitter.d.ts +211 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/LICENSE +21 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/README.md +21 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/README.md +6 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/include/tree_sitter/api.h +1266 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.c +48 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.h +41 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/array.h +290 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/atomic.h +68 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/clock.h +146 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/error_costs.h +11 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.c +501 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.h +36 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/host.h +21 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.c +221 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.h +299 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/length.h +52 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.c +419 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.h +49 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lib.c +14 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/node.c +774 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.c +2151 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.h +230 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/point.h +62 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/query.c +4134 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reduce_action.h +34 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reusable_node.h +95 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.c +899 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.h +133 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.c +1060 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.h +382 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.c +165 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.h +31 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.c +714 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.h +48 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ICU_SHA +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/LICENSE +414 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/README.md +29 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ptypes.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/umachine.h +448 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/urename.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf.h +1 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf16.h +733 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf8.h +881 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode.h +50 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib-symbols.txt +23 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib.c +109 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/wasm-stdlib.h +1294 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.c +1823 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.h +31 -0
- package/node_modules/tree-sitter/vendor/tree-sitter/test/fixtures/grammars/.gitkeep +0 -0
- package/node_modules/tree-sitter-c/LICENSE +21 -0
- package/node_modules/tree-sitter-c/README.md +18 -0
- package/node_modules/tree-sitter-c/binding.gyp +20 -0
- package/node_modules/tree-sitter-c/bindings/node/binding.cc +20 -0
- package/node_modules/tree-sitter-c/bindings/node/index.d.ts +28 -0
- package/node_modules/tree-sitter-c/bindings/node/index.js +7 -0
- package/node_modules/tree-sitter-c/grammar.js +1463 -0
- package/node_modules/tree-sitter-c/package.json +108 -0
- package/node_modules/tree-sitter-c/prebuilds/darwin-arm64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/prebuilds/darwin-x64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/prebuilds/linux-x64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/prebuilds/win32-x64/tree-sitter-c.node +0 -0
- package/node_modules/tree-sitter-c/queries/highlights.scm +81 -0
- package/node_modules/tree-sitter-c/queries/tags.scm +9 -0
- package/node_modules/tree-sitter-c/src/grammar.json +9682 -0
- package/node_modules/tree-sitter-c/src/node-types.json +4556 -0
- package/node_modules/tree-sitter-c/src/parser.c +113852 -0
- package/node_modules/tree-sitter-c/src/tree_sitter/alloc.h +54 -0
- package/node_modules/tree-sitter-c/src/tree_sitter/array.h +290 -0
- package/node_modules/tree-sitter-c/src/tree_sitter/parser.h +265 -0
- package/package.json +20 -13
- package/vendor/tree-sitter-0.21.1-node24.json +16 -0
- package/vendor/tree-sitter-0.21.1-node24.tgz +0 -0
- package/chunks/adapt-loop-SMH6V4PD.js +0 -18
- package/chunks/appsec-catalog-CBWHGTEL.js +0 -24
- package/chunks/chunk-242TMK6G.js +0 -110
- package/chunks/chunk-57ZENEX2.js +0 -169
- package/chunks/chunk-ADOLI6DT.js +0 -102
- package/chunks/chunk-ATATQACO.js +0 -471
- package/chunks/chunk-C2WXWFBB.js +0 -1070
- package/chunks/chunk-F3WBKITT.js +0 -687
- package/chunks/chunk-H2FFLZNK.js +0 -3
- package/chunks/chunk-LP3HHYQU.js +0 -245
- package/chunks/chunk-QI233I24.js +0 -333
- package/chunks/chunk-RRMJC3ZE.js +0 -105
- package/chunks/chunk-Z5FA2XOX.js +0 -2798
- package/chunks/cost-ledger-NU63MYZM.js +0 -13
- package/chunks/db-KFWOAUUB.js +0 -16
- package/chunks/eval-runner-7ZF472KV.js +0 -27
- package/chunks/fix-IG7LYXH3.js +0 -12
- package/chunks/harness-7ODOLOWU.js +0 -22
- package/chunks/http-conformance-DU66MZIU.js +0 -11
- package/chunks/http-sender-GWH2IYEA.js +0 -10
- package/chunks/hunt-scan-MMKUOETU.js +0 -38
- package/chunks/memsafety-scan-J7SECV5W.js +0 -16
- package/chunks/npm-dynamic-discovery-AHROOZDB.js +0 -13
- package/chunks/orchestrate-OC2VZN2X.js +0 -62
- package/chunks/pipeline-BZK5BLJR.js +0 -14
- package/chunks/prepare-MYY743TK.js +0 -13
- package/chunks/process-LQRCS5OY.js +0 -13
- package/chunks/replay-runner-45G3VU7X.js +0 -39
- package/chunks/runtime-J7PLXZNM.js +0 -12
- package/chunks/scope-BI7BF4ZY.js +0 -18
- package/chunks/source-files-PWRQR6LY.js +0 -12
- package/chunks/variant-candidates-YERCYMPD.js +0 -13
- package/dashboard/assets/0sec-icon-66SreztZ.gif +0 -0
- package/dashboard/assets/bot-yILPnRgD.js +0 -1
- package/dashboard/assets/chevron-down-BeDJ-Vka.js +0 -1
- package/dashboard/assets/circle-alert-BEnMBMT-.js +0 -1
- package/dashboard/assets/client-DRYsuOGl.js +0 -9
- package/dashboard/assets/copy-Bi5vzoF9.js +0 -1
- package/dashboard/assets/desktop-CXTQonNm.js +0 -32
- package/dashboard/assets/desktop-NOekk4QS.css +0 -1
- package/dashboard/assets/dist-CmX-h7a4.js +0 -1
- package/dashboard/assets/dist-DAwYQmf_.js +0 -45
- package/dashboard/assets/findings-page-CACW9nw2.js +0 -5
- package/dashboard/assets/format-PoISqsES.js +0 -1
- package/dashboard/assets/jsx-runtime-C7oxC63R.js +0 -1
- package/dashboard/assets/live-page-DrgQqQK5.js +0 -1
- package/dashboard/assets/meta-tile-CcskIV_o.js +0 -1
- package/dashboard/assets/operations-BKE8T-vY.css +0 -2
- package/dashboard/assets/operations-D8nUP5_m.js +0 -4
- package/dashboard/assets/operations-app-CQQhG54n.js +0 -2
- package/dashboard/assets/overview-page-DTGS8dPo.js +0 -1
- package/dashboard/assets/page-header-MFVvEtZW.js +0 -1
- package/dashboard/assets/play-Dwo-9xt6.js +0 -1
- package/dashboard/assets/scans-page-ChVtq8Us.js +0 -1
- package/dashboard/assets/search-CiooTLck.js +0 -1
- package/dashboard/assets/siren-CCBwTSuk.js +0 -1
- package/dashboard/assets/table-BYS-nIVA.js +0 -1
- package/dashboard/assets/tabs-DivxbhQy.js +0 -1
- package/dashboard/desktop.html +0 -21
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,n,r,t as i}from"./jsx-runtime-C7oxC63R.js";import{n as a,t as o}from"./client-DRYsuOGl.js";import{_ as s,g as c,l,n as u,p as d}from"./dist-CmX-h7a4.js";import{t as f}from"./chevron-down-BeDJ-Vka.js";import{t as p}from"./circle-alert-BEnMBMT-.js";import{t as m}from"./copy-Bi5vzoF9.js";import{a as h,i as g,l as _,n as v,o as y,s as b,t as x,u as S}from"./dist-DAwYQmf_.js";import{t as C}from"./play-Dwo-9xt6.js";import{t as w}from"./search-CiooTLck.js";var T=e(n(),1),E=e(o(),1),D=s(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),O=s(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),k=s(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),ee=s(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),te=s(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),A=s(`file-code`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12.5 8 15l2 2.5`,key:`1tg20x`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`,key:`yinavb`}]]),j=s(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),ne=s(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),re=s(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),ie=s(`house`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]]),ae=s(`list-todo`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]),oe=s(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),se=s(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),ce=s(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),le=s(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),ue=s(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),de=s(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),fe=s(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),pe=s(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),me=s(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),he=s(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),ge=1,_e=.9,ve=.8,ye=.17,be=.1,xe=.999,Se=.9999,Ce=.99,we=/[\\\/_+.#"@\[\(\{&]/,Te=/[\\\/_+.#"@\[\(\{&]/g,Ee=/[\s-]/,De=/[\s-]/g;function Oe(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?ge:Ce;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Oe(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=ge:we.test(e.charAt(l-1))?(d*=ve,p=e.slice(i,l-1).match(Te),p&&i>0&&(d*=xe**+p.length)):Ee.test(e.charAt(l-1))?(d*=_e,m=e.slice(i,l-1).match(De),m&&i>0&&(d*=xe**+m.length)):(d*=ye,i>0&&(d*=xe**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Se)),(d<be&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=Oe(e,t,n,r,l+1,a+2,o),f*be>d&&(d=f*be)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function ke(e){return e.toLowerCase().replace(De,` `)}function Ae(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Oe(e,t,ke(e),ke(t),0,0,{})}a();var M=i(),je=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=u(`Primitive.${t}`),r=T.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,M.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Me=`[cmdk-group=""]`,Ne=`[cmdk-group-items=""]`,Pe=`[cmdk-group-heading=""]`,Fe=`[cmdk-item=""]`,Ie=`${Fe}:not([aria-disabled="true"])`,Le=`cmdk-item-select`,Re=`data-value`,ze=(e,t,n)=>Ae(e,t,n),Be=T.createContext(void 0),Ve=()=>T.useContext(Be),He=T.createContext(void 0),Ue=()=>T.useContext(He),We=T.createContext(void 0),Ge=T.forwardRef((e,t)=>{let n=at(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=at(()=>new Set),i=at(()=>new Map),a=at(()=>new Map),o=at(()=>new Set),s=rt(e),{label:c,children:u,value:d,onValueChange:f,filter:p,shouldFilter:m,loop:h,disablePointerSelection:g=!1,vimBindings:_=!0,...v}=e,y=l(),b=l(),x=l(),S=T.useRef(null),C=ct();it(()=>{if(d!==void 0){let e=d.trim();n.current.value=e,w.emit()}},[d]),it(()=>{C(6,te)},[]);let w=T.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)ee(),O(),C(1,k);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(x);e?e.focus():(i=document.getElementById(y))==null||i.focus()}if(C(7,()=>{n.current.selectedItemId=A()?.id,w.emit()}),r||C(5,te),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}w.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),E=T.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,D(t,r)),C(2,()=>{O(),w.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),C(3,()=>{ee(),O(),n.current.value||k(),w.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=A();C(4,()=>{ee(),t?.getAttribute(`id`)===e&&k(),w.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:x,labelId:b,listInnerRef:S}),[]);function D(e,t){let r=s.current?.filter??ze;return e?r(e,n.current.search,t):0}function O(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=S.current;j().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(Ne);t?t.appendChild(e.parentElement===t?e:e.closest(`${Ne} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${Ne} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=S.current?.querySelector(`${Me}[${Re}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function k(){let e=j().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(Re);w.setState(`value`,e||void 0)}function ee(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=D(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function te(){var e;let t=A();t&&(t.parentElement?.firstChild===t&&((e=t.closest(Me)?.querySelector(Pe))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function A(){return S.current?.querySelector(`${Fe}[aria-selected="true"]`)}function j(){return Array.from(S.current?.querySelectorAll(Ie)||[])}function ne(e){let t=j()[e];t&&w.setState(`value`,t.getAttribute(Re))}function re(e){var t;let n=A(),r=j(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&w.setState(`value`,a.getAttribute(Re))}function ie(e){let t=A()?.closest(Me),n;for(;t&&!n;)t=e>0?tt(t,Me):nt(t,Me),n=t?.querySelector(Ie);n?w.setState(`value`,n.getAttribute(Re)):re(e)}let ae=()=>ne(j().length-1),oe=e=>{e.preventDefault(),e.metaKey?ae():e.altKey?ie(1):re(1)},se=e=>{e.preventDefault(),e.metaKey?ne(0):e.altKey?ie(-1):re(-1)};return T.createElement(je.div,{ref:t,tabIndex:-1,...v,"cmdk-root":``,onKeyDown:e=>{var t;(t=v.onKeyDown)==null||t.call(v,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:_&&e.ctrlKey&&oe(e);break;case`ArrowDown`:oe(e);break;case`p`:case`k`:_&&e.ctrlKey&&se(e);break;case`ArrowUp`:se(e);break;case`Home`:e.preventDefault(),ne(0);break;case`End`:e.preventDefault(),ae();break;case`Enter`:{e.preventDefault();let t=A();if(t){let e=new Event(Le);t.dispatchEvent(e)}}}}},T.createElement(`label`,{"cmdk-label":``,htmlFor:E.inputId,id:E.labelId,style:dt},c),ut(e,e=>T.createElement(He.Provider,{value:w},T.createElement(Be.Provider,{value:E},e))))}),Ke=T.forwardRef((e,t)=>{let n=l(),r=T.useRef(null),i=T.useContext(We),a=Ve(),o=rt(e),s=o.current?.forceMount??i?.forceMount;it(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=st(n,r,[e.value,e.children,r],e.keywords),u=Ue(),f=ot(e=>e.value&&e.value===c.current),p=ot(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);T.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(Le,m),()=>t.removeEventListener(Le,m)},[p,e.onSelect,e.disabled]);function m(){var e,t;h(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function h(){u.setState(`value`,c.current,!0)}if(!p)return null;let{disabled:g,value:_,onSelect:v,forceMount:y,keywords:b,...x}=e;return T.createElement(je.div,{ref:d(r,t),...x,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||a.getDisablePointerSelection()?void 0:h,onClick:g?void 0:m},e.children)}),qe=T.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=l(),s=T.useRef(null),c=T.useRef(null),u=l(),f=Ve(),p=ot(e=>i||f.filter()===!1?!0:!e.search||e.filtered.groups.has(o));it(()=>f.group(o),[]),st(o,s,[e.value,e.heading,c]);let m=T.useMemo(()=>({id:o,forceMount:i}),[i]);return T.createElement(je.div,{ref:d(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!p||void 0},n&&T.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:u},n),ut(e,e=>T.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?u:void 0},T.createElement(We.Provider,{value:m},e))))}),Je=T.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=T.useRef(null),a=ot(e=>!e.search);return!n&&!a?null:T.createElement(je.div,{ref:d(i,t),...r,"cmdk-separator":``,role:`separator`})}),Ye=T.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=Ue(),o=ot(e=>e.search),s=ot(e=>e.selectedItemId),c=Ve();return T.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),T.createElement(je.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),Xe=T.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=T.useRef(null),o=T.useRef(null),s=ot(e=>e.selectedItemId),c=Ve();return T.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),T.createElement(je.div,{ref:d(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},ut(e,e=>T.createElement(`div`,{ref:d(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),Ze=T.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return T.createElement(y,{open:n,onOpenChange:r},T.createElement(h,{container:o},T.createElement(g,{"cmdk-overlay":``,className:i}),T.createElement(v,{"aria-label":e.label,"cmdk-dialog":``,className:a},T.createElement(Ge,{ref:t,...s}))))}),Qe=T.forwardRef((e,t)=>ot(e=>e.filtered.count===0)?T.createElement(je.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),$e=T.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return T.createElement(je.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},ut(e,e=>T.createElement(`div`,{"aria-hidden":!0},e)))}),et=Object.assign(Ge,{List:Xe,Item:Ke,Input:Ye,Group:qe,Separator:Je,Dialog:Ze,Empty:Qe,Loading:$e});function tt(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function nt(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function rt(e){let t=T.useRef(e);return it(()=>{t.current=e}),t}var it=typeof window>`u`?T.useEffect:T.useLayoutEffect;function at(e){let t=T.useRef();return t.current===void 0&&(t.current=e()),t}function ot(e){let t=Ue(),n=()=>e(t.snapshot());return T.useSyncExternalStore(t.subscribe,n,n)}function st(e,t,n,r=[]){let i=T.useRef(),a=Ve();return it(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(Re,s),i.current=s}),i}var ct=()=>{let[e,t]=T.useState(),n=at(()=>new Map);return it(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function lt(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function ut({asChild:e,children:t},n){return e&&T.isValidElement(t)?T.cloneElement(lt(t),{ref:t.ref},n(t.props.children)):n(t)}var dt={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},ft=r(((e,t)=>{t.exports={}}))();function pt(){if(typeof __0SEC_VERSION__<`u`)return __0SEC_VERSION__;try{let e=(0,ft.dirname)((0,ft.fileURLToPath)(import.meta.url)),t=(0,ft.join)(e,`..`,`..`,`..`,`package.json`),n=JSON.parse((0,ft.readFileSync)(t,`utf8`));return typeof n.version==`string`?n.version:`0.0.0-dev`}catch{return`0.0.0-dev`}}pt();var mt={info:0,low:1,medium:2,high:3,critical:4},ht=Math.max(...Object.values(mt));Object.fromEntries(Object.keys(mt).sort((e,t)=>mt[t]-mt[e]).map(e=>[e,ht-mt[e]]));var N;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(N||={});var gt;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(gt||={});var P=N.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),_t=e=>{switch(typeof e){case`undefined`:return P.undefined;case`string`:return P.string;case`number`:return Number.isNaN(e)?P.nan:P.number;case`boolean`:return P.boolean;case`function`:return P.function;case`bigint`:return P.bigint;case`symbol`:return P.symbol;case`object`:return Array.isArray(e)?P.array:e===null?P.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?P.promise:typeof Map<`u`&&e instanceof Map?P.map:typeof Set<`u`&&e instanceof Set?P.set:typeof Date<`u`&&e instanceof Date?P.date:P.object;default:return P.unknown}},F=N.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),vt=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(t){if(!(t instanceof e))throw Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,N.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=e=>e.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};vt.create=e=>new vt(e);var yt=(e,t)=>{let n;switch(e.code){case F.invalid_type:n=e.received===P.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case F.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,N.jsonStringifyReplacer)}`;break;case F.unrecognized_keys:n=`Unrecognized key(s) in object: ${N.joinValues(e.keys,`, `)}`;break;case F.invalid_union:n=`Invalid input`;break;case F.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${N.joinValues(e.options)}`;break;case F.invalid_enum_value:n=`Invalid enum value. Expected ${N.joinValues(e.options)}, received '${e.received}'`;break;case F.invalid_arguments:n=`Invalid function arguments`;break;case F.invalid_return_type:n=`Invalid function return type`;break;case F.invalid_date:n=`Invalid date`;break;case F.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:N.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case F.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case F.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case F.custom:n=`Invalid input`;break;case F.invalid_intersection_types:n=`Intersection results could not be merged`;break;case F.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case F.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,N.assertNever(e)}return{message:n}},bt=yt;function xt(){return bt}var St=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function I(e,t){let n=xt(),r=St({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===yt?void 0:yt].filter(e=>!!e)});e.common.issues.push(r)}var Ct=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return L;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return L;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},L=Object.freeze({status:`aborted`}),wt=e=>({status:`dirty`,value:e}),Tt=e=>({status:`valid`,value:e}),Et=e=>e.status===`aborted`,Dt=e=>e.status===`dirty`,Ot=e=>e.status===`valid`,kt=e=>typeof Promise<`u`&&e instanceof Promise,R;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(R||={});var At=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},jt=(e,t)=>{if(Ot(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new vt(e.common.issues);return this._error=t,this._error}}};function z(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var B=class{get description(){return this._def.description}_getType(e){return _t(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:_t(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ct,ctx:{common:e.parent.common,data:e.data,parsedType:_t(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(kt(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_t(e)};return jt(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_t(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return Ot(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>Ot(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_t(e)},r=this._parse({data:e,path:n.path,parent:n});return jt(n,await(kt(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:F.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new Fn({schema:this,typeName:V.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return In.create(this,this._def)}nullable(){return Ln.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return gn.create(this)}promise(){return Pn.create(this,this._def)}or(e){return yn.create([this,e],this._def)}and(e){return Cn.create(this,e,this._def)}transform(e){return new Fn({...z(this._def),schema:this,typeName:V.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new Rn({...z(this._def),innerType:this,defaultValue:t,typeName:V.ZodDefault})}brand(){return new Vn({typeName:V.ZodBranded,type:this,...z(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new zn({...z(this._def),innerType:this,catchValue:t,typeName:V.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Hn.create(this,e)}readonly(){return Un.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Mt=/^c[^\s-]{8,}$/i,Nt=/^[0-9a-z]+$/,Pt=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ft=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,It=/^[a-z0-9_-]{21}$/i,Lt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Rt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,zt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Bt=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,Vt,Ht=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ut=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Wt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Gt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Kt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,qt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Jt=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,Yt=RegExp(`^${Jt}$`);function Xt(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Zt(e){return RegExp(`^${Xt(e)}$`)}function Qt(e){let t=`${Jt}T${Xt(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function $t(e,t){return!!((t===`v4`||!t)&&Ht.test(e)||(t===`v6`||!t)&&Wt.test(e))}function en(e,t){if(!Lt.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function tn(e,t){return!!((t===`v4`||!t)&&Ut.test(e)||(t===`v6`||!t)&&Gt.test(e))}var nn=class e extends B{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==P.string){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.string,received:t.parsedType}),L}let t=new Ct,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),I(n,{code:F.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`max`)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),I(n,{code:F.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.length<r.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?I(n,{code:F.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}):a&&I(n,{code:F.too_small,minimum:r.value,type:`string`,inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if(r.kind===`email`)zt.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:`email`,code:F.invalid_string,message:r.message}),t.dirty());else if(r.kind===`emoji`)Vt||=new RegExp(Bt,`u`),Vt.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:`emoji`,code:F.invalid_string,message:r.message}),t.dirty());else if(r.kind===`uuid`)Ft.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:`uuid`,code:F.invalid_string,message:r.message}),t.dirty());else if(r.kind===`nanoid`)It.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:`nanoid`,code:F.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid`)Mt.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:`cuid`,code:F.invalid_string,message:r.message}),t.dirty());else if(r.kind===`cuid2`)Nt.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:`cuid2`,code:F.invalid_string,message:r.message}),t.dirty());else if(r.kind===`ulid`)Pt.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:`ulid`,code:F.invalid_string,message:r.message}),t.dirty());else if(r.kind===`url`)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),I(n,{validation:`url`,code:F.invalid_string,message:r.message}),t.dirty()}else r.kind===`regex`?(r.regex.lastIndex=0,r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:`regex`,code:F.invalid_string,message:r.message}),t.dirty())):r.kind===`trim`?e.data=e.data.trim():r.kind===`includes`?e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),I(n,{code:F.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty()):r.kind===`toLowerCase`?e.data=e.data.toLowerCase():r.kind===`toUpperCase`?e.data=e.data.toUpperCase():r.kind===`startsWith`?e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),I(n,{code:F.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty()):r.kind===`endsWith`?e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),I(n,{code:F.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty()):r.kind===`datetime`?Qt(r).test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{code:F.invalid_string,validation:`datetime`,message:r.message}),t.dirty()):r.kind===`date`?Yt.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{code:F.invalid_string,validation:`date`,message:r.message}),t.dirty()):r.kind===`time`?Zt(r).test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{code:F.invalid_string,validation:`time`,message:r.message}),t.dirty()):r.kind===`duration`?Rt.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:`duration`,code:F.invalid_string,message:r.message}),t.dirty()):r.kind===`ip`?$t(e.data,r.version)||(n=this._getOrReturnCtx(e,n),I(n,{validation:`ip`,code:F.invalid_string,message:r.message}),t.dirty()):r.kind===`jwt`?en(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),I(n,{validation:`jwt`,code:F.invalid_string,message:r.message}),t.dirty()):r.kind===`cidr`?tn(e.data,r.version)||(n=this._getOrReturnCtx(e,n),I(n,{validation:`cidr`,code:F.invalid_string,message:r.message}),t.dirty()):r.kind===`base64`?Kt.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:`base64`,code:F.invalid_string,message:r.message}),t.dirty()):r.kind===`base64url`?qt.test(e.data)||(n=this._getOrReturnCtx(e,n),I(n,{validation:`base64url`,code:F.invalid_string,message:r.message}),t.dirty()):N.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:F.invalid_string,...R.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...R.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...R.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...R.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...R.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...R.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...R.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...R.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...R.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...R.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...R.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...R.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...R.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...R.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...R.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...R.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...R.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...R.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...R.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...R.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...R.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...R.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...R.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...R.errToObj(t)})}nonempty(e){return this.min(1,R.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};nn.create=e=>new nn({checks:[],typeName:V.ZodString,coerce:e?.coerce??!1,...z(e)});function rn(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var an=class e extends B{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==P.number){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.number,received:t.parsedType}),L}let t,n=new Ct;for(let r of this._def.checks)r.kind===`int`?N.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),I(t,{code:F.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),I(t,{code:F.too_small,minimum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),I(t,{code:F.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?rn(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),I(t,{code:F.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),I(t,{code:F.not_finite,message:r.message}),n.dirty()):N.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,R.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,R.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,R.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,R.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:R.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:R.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:R.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:R.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:R.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:R.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:R.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:R.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:R.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:R.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind===`int`||e.kind===`multipleOf`&&N.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.value<e)&&(e=n.value);return Number.isFinite(t)&&Number.isFinite(e)}};an.create=e=>new an({checks:[],typeName:V.ZodNumber,coerce:e?.coerce||!1,...z(e)});var on=class e extends B{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==P.bigint)return this._getInvalidInput(e);let t,n=new Ct;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),I(t,{code:F.too_small,type:`bigint`,minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`max`?(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),I(t,{code:F.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),I(t,{code:F.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):N.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.bigint,received:t.parsedType}),L}gte(e,t){return this.setLimit(`min`,e,!0,R.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,R.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,R.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,R.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:R.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:R.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:R.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:R.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:R.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:R.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e}};on.create=e=>new on({checks:[],typeName:V.ZodBigInt,coerce:e?.coerce??!1,...z(e)});var sn=class extends B{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==P.boolean){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.boolean,received:t.parsedType}),L}return Tt(e.data)}};sn.create=e=>new sn({typeName:V.ZodBoolean,coerce:e?.coerce||!1,...z(e)});var cn=class e extends B{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==P.date){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.date,received:t.parsedType}),L}if(Number.isNaN(e.data.getTime()))return I(this._getOrReturnCtx(e),{code:F.invalid_date}),L;let t=new Ct,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),I(n,{code:F.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:`date`}),t.dirty()):r.kind===`max`?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),I(n,{code:F.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):N.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:R.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:R.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.value<e)&&(e=t.value);return e==null?null:new Date(e)}};cn.create=e=>new cn({checks:[],coerce:e?.coerce||!1,typeName:V.ZodDate,...z(e)});var ln=class extends B{_parse(e){if(this._getType(e)!==P.symbol){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.symbol,received:t.parsedType}),L}return Tt(e.data)}};ln.create=e=>new ln({typeName:V.ZodSymbol,...z(e)});var un=class extends B{_parse(e){if(this._getType(e)!==P.undefined){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.undefined,received:t.parsedType}),L}return Tt(e.data)}};un.create=e=>new un({typeName:V.ZodUndefined,...z(e)});var dn=class extends B{_parse(e){if(this._getType(e)!==P.null){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.null,received:t.parsedType}),L}return Tt(e.data)}};dn.create=e=>new dn({typeName:V.ZodNull,...z(e)});var fn=class extends B{constructor(){super(...arguments),this._any=!0}_parse(e){return Tt(e.data)}};fn.create=e=>new fn({typeName:V.ZodAny,...z(e)});var pn=class extends B{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Tt(e.data)}};pn.create=e=>new pn({typeName:V.ZodUnknown,...z(e)});var mn=class extends B{_parse(e){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.never,received:t.parsedType}),L}};mn.create=e=>new mn({typeName:V.ZodNever,...z(e)});var hn=class extends B{_parse(e){if(this._getType(e)!==P.undefined){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.void,received:t.parsedType}),L}return Tt(e.data)}};hn.create=e=>new hn({typeName:V.ZodVoid,...z(e)});var gn=class e extends B{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==P.array)return I(t,{code:F.invalid_type,expected:P.array,received:t.parsedType}),L;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.length<r.exactLength.value;(e||i)&&(I(t,{code:e?F.too_big:F.too_small,minimum:i?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:`array`,inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(r.minLength!==null&&t.data.length<r.minLength.value&&(I(t,{code:F.too_small,minimum:r.minLength.value,type:`array`,inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),r.maxLength!==null&&t.data.length>r.maxLength.value&&(I(t,{code:F.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new At(t,e,t.path,n)))).then(e=>Ct.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new At(t,e,t.path,n)));return Ct.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:R.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:R.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:R.toString(n)}})}nonempty(e){return this.min(1,e)}};gn.create=(e,t)=>new gn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:V.ZodArray,...z(t)});function _n(e){if(e instanceof vn){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=In.create(_n(r))}return new vn({...e._def,shape:()=>t})}return e instanceof gn?new gn({...e._def,type:_n(e.element)}):e instanceof In?In.create(_n(e.unwrap())):e instanceof Ln?Ln.create(_n(e.unwrap())):e instanceof wn?wn.create(e.items.map(e=>_n(e))):e}var vn=class e extends B{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=N.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==P.object){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.object,received:t.parsedType}),L}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof mn&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new At(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof mn){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(I(n,{code:F.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new At(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>Ct.mergeObjectSync(t,e)):Ct.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return R.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:R.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:V.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of N.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of N.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return _n(this)}partial(t){let n={};for(let e of N.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of N.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof In;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return jn(N.objectKeys(this.shape))}};vn.create=(e,t)=>new vn({shape:()=>e,unknownKeys:`strip`,catchall:mn.create(),typeName:V.ZodObject,...z(t)}),vn.strictCreate=(e,t)=>new vn({shape:()=>e,unknownKeys:`strict`,catchall:mn.create(),typeName:V.ZodObject,...z(t)}),vn.lazycreate=(e,t)=>new vn({shape:e,unknownKeys:`strip`,catchall:mn.create(),typeName:V.ZodObject,...z(t)});var yn=class extends B{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new vt(e.ctx.common.issues));return I(t,{code:F.invalid_union,unionErrors:n}),L}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new vt(e));return I(t,{code:F.invalid_union,unionErrors:i}),L}}get options(){return this._def.options}};yn.create=(e,t)=>new yn({options:e,typeName:V.ZodUnion,...z(t)});var bn=e=>e instanceof kn?bn(e.schema):e instanceof Fn?bn(e.innerType()):e instanceof An?[e.value]:e instanceof Mn?e.options:e instanceof Nn?N.objectValues(e.enum):e instanceof Rn?bn(e._def.innerType):e instanceof un?[void 0]:e instanceof dn?[null]:e instanceof In?[void 0,...bn(e.unwrap())]:e instanceof Ln?[null,...bn(e.unwrap())]:e instanceof Vn||e instanceof Un?bn(e.unwrap()):e instanceof zn?bn(e._def.innerType):[],xn=class e extends B{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==P.object)return I(t,{code:F.invalid_type,expected:P.object,received:t.parsedType}),L;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(I(t,{code:F.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),L)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=bn(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:V.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...z(r)})}};function Sn(e,t){let n=_t(e),r=_t(t);if(e===t)return{valid:!0,data:e};if(n===P.object&&r===P.object){let n=N.objectKeys(t),r=N.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Sn(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===P.array&&r===P.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Sn(i,a);if(!o.valid)return{valid:!1};n.push(o.data)}return{valid:!0,data:n}}return n===P.date&&r===P.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}var Cn=class extends B{_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(Et(e)||Et(r))return L;let i=Sn(e.value,r.value);return i.valid?((Dt(e)||Dt(r))&&t.dirty(),{status:t.value,value:i.data}):(I(n,{code:F.invalid_intersection_types}),L)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Cn.create=(e,t,n)=>new Cn({left:e,right:t,typeName:V.ZodIntersection,...z(n)});var wn=class e extends B{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.array)return I(n,{code:F.invalid_type,expected:P.array,received:n.parsedType}),L;if(n.data.length<this._def.items.length)return I(n,{code:F.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),L;!this._def.rest&&n.data.length>this._def.items.length&&(I(n,{code:F.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new At(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>Ct.mergeArray(t,e)):Ct.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};wn.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new wn({items:e,typeName:V.ZodTuple,rest:null,...z(t)})};var Tn=class e extends B{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.object)return I(n,{code:F.invalid_type,expected:P.object,received:n.parsedType}),L;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new At(n,e,n.path,e)),value:a._parse(new At(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?Ct.mergeObjectAsync(t,r):Ct.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof B?new e({keyType:t,valueType:n,typeName:V.ZodRecord,...z(r)}):new e({keyType:nn.create(),valueType:t,typeName:V.ZodRecord,...z(n)})}},En=class extends B{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.map)return I(n,{code:F.invalid_type,expected:P.map,received:n.parsedType}),L;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new At(n,e,n.path,[a,`key`])),value:i._parse(new At(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return L;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return L;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};En.create=(e,t,n)=>new En({valueType:t,keyType:e,typeName:V.ZodMap,...z(n)});var Dn=class e extends B{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==P.set)return I(n,{code:F.invalid_type,expected:P.set,received:n.parsedType}),L;let r=this._def;r.minSize!==null&&n.data.size<r.minSize.value&&(I(n,{code:F.too_small,minimum:r.minSize.value,type:`set`,inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),r.maxSize!==null&&n.data.size>r.maxSize.value&&(I(n,{code:F.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return L;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new At(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:R.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:R.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};Dn.create=(e,t)=>new Dn({valueType:e,minSize:null,maxSize:null,typeName:V.ZodSet,...z(t)});var On=class e extends B{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==P.function)return I(t,{code:F.invalid_type,expected:P.function,received:t.parsedType}),L;function n(e,n){return St({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,xt(),yt].filter(e=>!!e),issueData:{code:F.invalid_arguments,argumentsError:n}})}function r(e,n){return St({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,xt(),yt].filter(e=>!!e),issueData:{code:F.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof Pn){let e=this;return Tt(async function(...t){let o=new vt([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return Tt(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new vt([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new vt([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:wn.create(t).rest(pn.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||wn.create([]).rest(pn.create()),returns:n||pn.create(),typeName:V.ZodFunction,...z(r)})}},kn=class extends B{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};kn.create=(e,t)=>new kn({getter:e,typeName:V.ZodLazy,...z(t)});var An=class extends B{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return I(t,{received:t.data,code:F.invalid_literal,expected:this._def.value}),L}return{status:`valid`,value:e.data}}get value(){return this._def.value}};An.create=(e,t)=>new An({value:e,typeName:V.ZodLiteral,...z(t)});function jn(e,t){return new Mn({values:e,typeName:V.ZodEnum,...z(t)})}var Mn=class e extends B{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return I(t,{expected:N.joinValues(n),received:t.parsedType,code:F.invalid_type}),L}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return I(t,{received:t.data,code:F.invalid_enum_value,options:n}),L}return Tt(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};Mn.create=jn;var Nn=class extends B{_parse(e){let t=N.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==P.string&&n.parsedType!==P.number){let e=N.objectValues(t);return I(n,{expected:N.joinValues(e),received:n.parsedType,code:F.invalid_type}),L}if(this._cache||=new Set(N.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=N.objectValues(t);return I(n,{received:n.data,code:F.invalid_enum_value,options:e}),L}return Tt(e.data)}get enum(){return this._def.values}};Nn.create=(e,t)=>new Nn({values:e,typeName:V.ZodNativeEnum,...z(t)});var Pn=class extends B{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==P.promise&&t.common.async===!1?(I(t,{code:F.invalid_type,expected:P.promise,received:t.parsedType}),L):Tt((t.parsedType===P.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};Pn.create=(e,t)=>new Pn({type:e,typeName:V.ZodPromise,...z(t)});var Fn=class extends B{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===V.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{I(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return L;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?L:r.status===`dirty`||t.value===`dirty`?wt(r.value):r});{if(t.value===`aborted`)return L;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?L:r.status===`dirty`||t.value===`dirty`?wt(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?L:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?L:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!Ot(e))return L;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>Ot(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):L)}N.assertNever(r)}};Fn.create=(e,t,n)=>new Fn({schema:e,typeName:V.ZodEffects,effect:t,...z(n)}),Fn.createWithPreprocess=(e,t,n)=>new Fn({schema:t,effect:{type:`preprocess`,transform:e},typeName:V.ZodEffects,...z(n)});var In=class extends B{_parse(e){return this._getType(e)===P.undefined?Tt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};In.create=(e,t)=>new In({innerType:e,typeName:V.ZodOptional,...z(t)});var Ln=class extends B{_parse(e){return this._getType(e)===P.null?Tt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};Ln.create=(e,t)=>new Ln({innerType:e,typeName:V.ZodNullable,...z(t)});var Rn=class extends B{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===P.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};Rn.create=(e,t)=>new Rn({innerType:e,typeName:V.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...z(t)});var zn=class extends B{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return kt(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new vt(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new vt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};zn.create=(e,t)=>new zn({innerType:e,typeName:V.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...z(t)});var Bn=class extends B{_parse(e){if(this._getType(e)!==P.nan){let t=this._getOrReturnCtx(e);return I(t,{code:F.invalid_type,expected:P.nan,received:t.parsedType}),L}return{status:`valid`,value:e.data}}};Bn.create=e=>new Bn({typeName:V.ZodNaN,...z(e)});var Vn=class extends B{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},Hn=class e extends B{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?L:e.status===`dirty`?(t.dirty(),wt(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?L:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:V.ZodPipeline})}},Un=class extends B{_parse(e){let t=this._def.innerType._parse(e),n=e=>(Ot(e)&&(e.value=Object.freeze(e.value)),e);return kt(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};Un.create=(e,t)=>new Un({innerType:e,typeName:V.ZodReadonly,...z(t)}),vn.lazycreate;var V;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(V||={});var H=nn.create,Wn=an.create;Bn.create,on.create;var Gn=sn.create;cn.create,ln.create,un.create;var Kn=dn.create;fn.create;var qn=pn.create;mn.create,hn.create;var Jn=gn.create,U=vn.create;vn.strictCreate;var Yn=yn.create,Xn=xn.create;Cn.create,wn.create;var Zn=Tn.create;En.create,Dn.create,On.create;var Qn=kn.create,$n=An.create,er=Mn.create;Nn.create,Pn.create,Fn.create,In.create,Ln.create,Fn.createWithPreprocess,Hn.create;var tr=er([`reproduced`,`not_reproduced`,`error`,`skipped`]),nr=er([`deterministic_replay`,`agent_assisted`]),rr=er([`local`,`docker`,`qemu`]),ir=U({os:H(),arch:H(),runner:rr}),ar=U({argv:Jn(H()).min(1),exit_code:Wn().int().nullable(),stdout_excerpt:H().optional(),stderr_excerpt:H().optional(),duration_ms:Wn().nonnegative()}),or=U({kind:er([`file_exists`,`http_status`,`string_in_output`,`exit_code`]),target:H(),expected:Yn([H(),Wn(),Gn()]),actual:Yn([H(),Wn(),Gn(),Kn()]),passed:Gn()}),sr=U({kind:H().min(1),path:H().min(1),sha256:H().regex(/^[0-9a-f]{64}$/i,`sha256 must be 64 lowercase hex chars`),bytes:Wn().int().nonnegative().optional()});U({status:tr,mode:nr,finding_id:H().min(1),engine_version:H().min(1),started_at:H().min(1),completed_at:H().min(1),duration_ms:Wn().nonnegative(),commands:Jn(ar),assertions:Jn(or),evidence_artifacts:Jn(sr),engine_metadata:ir,error_reason:H().nullable().optional(),summary:H().optional(),evidence_kind:er([`reproduced-poc`,`source-only`,`reproduced-memcorruption-poc`]).optional(),oast_confirmed:Gn().optional()});var cr=er([`critical`,`high`,`medium`,`low`,`info`]),lr=er(`prompt-injection.jailbreak.system-prompt-extraction.data-exfiltration.tool-misuse.output-manipulation.encoding-bypass.multi-turn.prototype-pollution.path-traversal.command-injection.code-injection.regex-dos.unsafe-deserialization.information-disclosure.ssrf.sql-injection.xss.cors.security-misconfiguration.missing-validation.crypto-misuse.heap-overflow.out-of-bounds-read.out-of-bounds-write.use-after-free.stack-buffer-overflow.null-pointer-deref.null-deref.integer-overflow.integer-truncation.race-condition.toctou.type-confusion.double-free.format-string.uninitialized-memory.denial-of-service.known-vulnerable-package.supply-chain.other`.split(`.`)),ur=er([`discovered`,`verified`,`confirmed`,`scored`,`reported`,`fixed`,`false-positive`]),dr=er([`setup`,`auth`,`prerequisite`,`exploit`,`verify`]),fr=Xn(`type`,[U({type:$n(`shell`),cmd:H(),cwd:H().optional()}),U({type:$n(`http`),method:H(),url:H(),headers:Zn(H()).optional(),body:H().optional()}),U({type:$n(`docker`),image:H(),args:Jn(H())}),U({type:$n(`note`),text:H()})]),pr=Xn(`type`,[U({type:$n(`exit-zero`)}),U({type:$n(`http-status`),status:Yn([Wn(),Jn(Wn())])}),U({type:$n(`body-contains`),text:H()}),U({type:$n(`body-matches`),pattern:H()}),U({type:$n(`file-exists`),path:H()})]),mr=Jn(U({id:H(),kind:dr,summary:H(),action:fr,expect:pr.optional()})),hr=U({request:H(),response:H(),analysis:H().optional()});U({id:H().min(1),templateId:H(),title:H(),description:H(),severity:cr,category:lr,status:ur,evidence:hr,fingerprint:H().optional(),triageStatus:er([`new`,`accepted`,`suppressed`]).optional(),triageNote:H().optional(),layerVerdicts:Jn(qn()).optional(),workflowStatus:H().optional(),workflowAssignee:H().nullable().optional(),confidence:Wn().optional(),cvssVector:H().optional(),cvssScore:Wn().optional(),remediation:qn().optional(),pocSteps:mr.optional(),verificationSpec:qn().optional(),timestamp:Wn()}).passthrough();var gr=Wn().int().nonnegative();U({totalAttacks:gr,totalFindings:gr,critical:gr,high:gr,medium:gr,low:gr,info:gr}).passthrough();var _r=er([`==`,`!=`,`>=`,`<=`,`>`,`<`,`in`]),vr=er([`last_entry_kind`,`confidence`,`entry_count`,`has_finding`,`last_error`]),yr=Yn([H(),Wn(),Gn(),Jn(H())]),br=U({kind:$n(`cmp`),lhs:vr,op:_r,rhs:yr}),xr=Qn(()=>Yn([br,U({kind:$n(`and`),clauses:Jn(xr).min(1)}),U({kind:$n(`or`),clauses:Jn(xr).min(1)})])),Sr=H().min(1).regex(/^[A-Za-z_][A-Za-z0-9_-]*$/,`state names must be identifier-shaped`),Cr=U({to:Sr}),wr=U({when:xr,to:Sr}),Tr=U({specialist:H().min(1),on_success:Cr.optional(),on_failure:Cr.optional(),transitions:Jn(wr).optional()}),Er=U({ref:H().min(1),description:H().optional()});U({name:H().min(1).regex(/^[A-Za-z][A-Za-z0-9_-]*$/,`workflow name must be identifier-shaped`),version:Wn().int().positive(),description:H().min(1),initial_state:Sr,states:Zn(H(),Tr).refine(e=>Object.keys(e).length>0,{message:`workflow must declare at least one state`}),specialists:Zn(H(),Er).optional()}).superRefine((e,t)=>{let n=new Set(Object.keys(e.states)),r=e=>e===`__end__`||n.has(e);r(e.initial_state)||t.addIssue({code:F.custom,path:[`initial_state`],message:`initial_state '${e.initial_state}' is not declared in states`});for(let[n,i]of Object.entries(e.states))i.on_success&&!r(i.on_success.to)&&t.addIssue({code:F.custom,path:[`states`,n,`on_success`,`to`],message:`on_success.to '${i.on_success.to}' references an unknown state`}),i.on_failure&&!r(i.on_failure.to)&&t.addIssue({code:F.custom,path:[`states`,n,`on_failure`,`to`],message:`on_failure.to '${i.on_failure.to}' references an unknown state`}),i.transitions?.forEach((e,i)=>{r(e.to)||t.addIssue({code:F.custom,path:[`states`,n,`transitions`,i,`to`],message:`transitions[${i}].to '${e.to}' references an unknown state`})})});var Dr=`0sec.agent-action-assurance/v1`,Or=er([`readme`,`code-comment`,`issue-or-pr`,`web-content`,`tool-output`,`support-doc`,`email`,`forum-post`,`rules-file`]);U({id:H().min(1),title:H().min(1),injection_vector:Or,benign_task:H().min(1),payload:H().min(1),prohibited_action:H().min(1)}).strict();var kr=H().regex(/^[a-f0-9]{64}$/,`sha256 must be 64 lowercase hex characters`),Ar=H().datetime({offset:!0}),jr=er([`observed`,`not_observed`,`inconclusive`,`error`]),Mr=U({scope_sha256:kr,environment:er([`local`,`test`,`staging`]),agent_endpoint:H().url(),mcp_endpoint:H().url(),oracle_endpoint:H().url(),target_version:H().min(1),policy_version:H().min(1),model_version:H().min(1),tool_versions:Zn(H().min(1)),configuration_sha256:kr}).strict(),Nr=U({name:H().min(1),args_sha256:kr}).strict(),Pr=U({strategy:$n(`sensitive-text-v1`),redacted_fields:Jn(H().min(1)),raw_artifacts:$n(!1)}).strict(),Fr=U({previous_run_id:H().uuid(),previous_manifest_sha256:kr,configuration_changed:Gn()}).strict();U({schema_version:$n(Dr),run_id:H().uuid(),created_at:Ar,target:Mr,scenario:U({id:H().min(1),title:H().min(1),injection_vector:Or,payload_sha256:kr,prohibited_action:H().min(1)}).strict(),execution:U({request_sha256:kr,response_sha256:kr,transcript_sha256:kr,mcp_tools_sha256:kr,tool_calls:Jn(Nr)}).strict(),oracle:U({name:H().min(1),outcome:jr,complete:Gn(),observation_sha256:kr,observed_at:Ar.optional(),summary:H().optional()}).strict(),redaction:Pr,retest:Fr.optional(),artifacts:Jn(sr)}).strict().superRefine((e,t)=>{(e.oracle.outcome===`observed`||e.oracle.outcome===`not_observed`)&&!e.oracle.complete&&t.addIssue({code:F.custom,path:[`oracle`,`complete`],message:`observed and not_observed outcomes require a complete action-oracle observation`}),e.oracle.outcome===`inconclusive`&&e.oracle.complete&&t.addIssue({code:F.custom,path:[`oracle`,`complete`],message:`an inconclusive outcome cannot claim a complete action-oracle observation`});for(let[n,r]of Object.entries({agent_endpoint:e.target.agent_endpoint,mcp_endpoint:e.target.mcp_endpoint,oracle_endpoint:e.target.oracle_endpoint})){let e=new URL(r);(e.username||e.password)&&t.addIssue({code:F.custom,path:[`target`,n],message:`endpoint URLs must not embed credentials`})}for(let[n,r]of e.artifacts.entries())(/^(?:\/|[A-Za-z]:[\\/])/.test(r.path)||/(?:^|[\\/])\.\.(?:[\\/]|$)/.test(r.path))&&t.addIssue({code:F.custom,path:[`artifacts`,n,`path`],message:`artifact paths must be relative and must not escape the evidence bundle`})});var Ir=`yolo`;function Lr(){return document.querySelector(`meta[name="0sec-control-token"]`)?.getAttribute(`content`)??null}async function Rr(e,t){let n={"Content-Type":`application/json`,...t?.headers??{}},r=Lr();r&&(n[`X-0sec-Control-Token`]=r);let i=await fetch(e,{...t,headers:n});if(!i.ok){let e=`${i.status} ${i.statusText}`;try{let t=await i.json();t.error&&(e=t.error)}catch{}throw Error(e)}let a=i.headers.get(`content-type`)??``;if(!a.includes(`json`))throw Error(`API returned ${a||`non-JSON content`} for ${e}. Serve through \`0sec dashboard\`.`);return i.json()}function zr(e){return`/api/console/sessions/${encodeURIComponent(e)}`}async function Br(){return(await Rr(`/api/console/sessions`)).sessions}async function Vr(e){return(await Rr(`/api/console/sessions`,{method:`POST`,body:JSON.stringify(e??{})})).session}async function Hr(e,t){return(await Rr(`${zr(e)}/events?after=${encodeURIComponent(String(t))}`)).events}async function Ur(e,t){return(await Rr(`${zr(e)}/messages`,{method:`POST`,body:JSON.stringify({text:t})})).session}async function Wr(e){return(await Rr(`${zr(e)}/cancel`,{method:`POST`,body:JSON.stringify({})})).session}async function Gr(e,t,n){return(await Rr(`${zr(e)}/decisions/${encodeURIComponent(t)}`,{method:`POST`,body:JSON.stringify(n)})).session}async function Kr(){return(await Rr(`/api/console/providers/codex`)).status}async function qr(){return(await Rr(`/api/console/providers/codex/device-auth`,{method:`POST`,body:JSON.stringify({})})).status}async function Jr(){return(await Rr(`/api/console/providers/codex/device-auth`,{method:`DELETE`})).status}var Yr={getSessions:Br,createSession:Vr,getEvents:Hr,sendMessage:Ur,cancelTurn:Wr,resolveDecision:Gr,getCodexAuthStatus:Kr,startCodexDeviceAuth:qr,cancelCodexDeviceAuth:Jr};async function Xr(e,t){try{window.localStorage.setItem(e,JSON.stringify(t))}catch(t){window.dispatchEvent(new CustomEvent(`osec:preference-error`,{detail:`Failed to save "${e}": ${t instanceof Error?t.message:String(t)}`}));return}let n=window.osecDesktop;if(n)try{await n.setPreference(e,t)}catch(t){window.dispatchEvent(new CustomEvent(`osec:preference-error`,{detail:`Failed to persist "${e}": ${t instanceof Error?t.message:String(t)}`}))}}function Zr(e,t){let[n,r]=(0,T.useState)(()=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}});return(0,T.useEffect)(()=>{Xr(e,n)},[e,n]),[n,r]}var Qr=[],$r=2e3,ei=300;function ti(e,t){if(t.length===0)return e;let n=new Set(e.map(e=>e.sequence)),r=t.filter(e=>!n.has(e.sequence));return r.length===0?e:[...e,...r]}function ni(){let[e,t]=(0,T.useState)([]),[n,r]=Zr(`0sec:active-session`,null),[i,a]=(0,T.useState)(!0),[o,s]=(0,T.useState)(null),[c,l]=(0,T.useState)(!1),u=(0,T.useRef)(!1),d=(0,T.useRef)(!1),[f,p]=Zr(`0sec:drafts`,{}),[m,h]=Zr(`0sec:thread-titles`,{}),g=e.find(e=>e.id===n)??null,_=n?f[n]??``:``,[v,y]=(0,T.useState)([]),b=(0,T.useRef)(0),x=v[0]?.sessionId===n?v:Qr,[S,C]=(0,T.useState)(null);(0,T.useEffect)(()=>{let e=e=>{let t=e.detail;typeof t==`string`&&s(t)};return window.addEventListener(`osec:preference-error`,e),()=>window.removeEventListener(`osec:preference-error`,e)},[]);let w=(0,T.useCallback)(e=>{t(t=>t.some(t=>t.id===e.id)?t.map(t=>t.id===e.id&&e.updatedAt>=t.updatedAt?e:t):[e,...t])},[]);(0,T.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let n=await Yr.getSessions();if(e.signal.aborted)return;t(n),r(e=>e&&n.some(t=>t.id===e)?e:null)}catch(t){if(e.signal.aborted)return;s(t instanceof Error?t.message:String(t))}finally{e.signal.aborted||a(!1)}})(),()=>e.abort()},[r]),(0,T.useEffect)(()=>{let e=new AbortController,n,r=!1,i=async()=>{if(!(r||e.signal.aborted)){r=!0;try{let n=await Yr.getSessions();if(e.signal.aborted)return;t(e=>{let t=new Map(n.map(e=>[e.id,e])),r=e.map(e=>{let n=t.get(e.id);return n&&n.updatedAt>e.updatedAt?n:e});for(let t of n)e.some(e=>e.id===t.id)||r.push(t);return r})}catch(t){if(e.signal.aborted)return;s(t instanceof Error?t.message:String(t))}finally{r=!1,e.signal.aborted||(n=setTimeout(()=>void i(),$r))}}};return i(),()=>{e.abort(),clearTimeout(n)}},[r]),(0,T.useEffect)(()=>{if(!n){b.current=0,y([]);return}let e=new AbortController,t,r=!1;b.current=0,y([]);let i=async()=>{if(!(r||e.signal.aborted)){r=!0;try{let t=await Yr.getEvents(n,b.current);if(e.signal.aborted||t.length===0)return;b.current=t.at(-1)?.sequence??b.current,y(e=>ti(e,t));let r=t.find(e=>e.type===`user`);if(r?.type===`user`){let e=r.text.trim().replace(/\s+/g,` `).slice(0,80);h(t=>t[n]?t:{...t,[n]:e})}for(let e of t)e.type===`session`&&w(e.session)}catch(t){if(e.signal.aborted)return;s(t instanceof Error?t.message:String(t))}finally{r=!1,e.signal.aborted||(t=setTimeout(()=>void i(),ei))}}};return i(),()=>{e.abort(),clearTimeout(t)}},[n,w,h]);let E=(0,T.useCallback)(async()=>{let e=await Yr.getCodexAuthStatus();C(e)},[]);return(0,T.useEffect)(()=>{E().catch(e=>{e instanceof Error&&s(e.message)})},[E]),(0,T.useEffect)(()=>{if(S?.phase!==`running`)return;let e=window.setInterval(()=>{E().catch(e=>{s(e instanceof Error?e.message:String(e))})},1e3);return()=>clearInterval(e)},[S?.phase,E]),{sessions:e,activeId:n,activeSession:g,events:x,loading:i,error:o,busy:c,auth:S,draft:_,titles:m,selectSession:(0,T.useCallback)(e=>{r(e),p(t=>t[e]===void 0?{...t,[e]:``}:t)},[r,p]),createSession:(0,T.useCallback)(async e=>{if(u.current)return null;u.current=!0,l(!0),s(null);try{let t=await Yr.createSession(e);return w(t),r(t.id),p(e=>({...e,[t.id]:``})),t.id}catch(e){return s(e instanceof Error?e.message:String(e)),null}finally{l(!1),u.current=!1}},[w,r,p]),setDraft:(0,T.useCallback)(e=>{n&&p(t=>({...t,[n]:e}))},[n,p]),renameSession:(0,T.useCallback)((e,t)=>{h(n=>({...n,[e]:t}))},[h]),send:(0,T.useCallback)(async()=>{if(d.current||c||!g||!_.trim()||g.status!==`ready`)return;let e=g.id,t=_;d.current=!0,l(!0),s(null);try{let n=await Yr.sendMessage(e,t);w(n),p(n=>{if(n[e]!==t)return n;let r={...n};return delete r[e],r})}catch(e){s(e instanceof Error?e.message:String(e))}finally{d.current=!1,l(!1)}},[c,g,_,w,p]),cancel:(0,T.useCallback)(async()=>{if(g)try{let e=await Yr.cancelTurn(g.id);w(e)}catch(e){s(e instanceof Error?e.message:String(e))}},[g,w]),resolveDecision:(0,T.useCallback)(async(e,t)=>{if(!(!g||d.current)){d.current=!0,l(!0);try{let n=await Yr.resolveDecision(g.id,e.id,t);w(n)}catch(e){s(e instanceof Error?e.message:String(e))}finally{d.current=!1,l(!1)}}},[g,w]),connectCodex:(0,T.useCallback)(async()=>{l(!0),s(null);try{C(await Yr.startCodexDeviceAuth())}catch(e){s(e instanceof Error?e.message:String(e))}finally{l(!1)}},[]),cancelCodex:(0,T.useCallback)(async()=>{l(!0);try{C(await Yr.cancelCodexDeviceAuth())}catch(e){s(e instanceof Error?e.message:String(e))}finally{l(!1)}},[]),clearError:(0,T.useCallback)(()=>{s(null)},[])}}function ri(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var ii=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ai=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oi={};function si(e,t){return((t||oi).jsx?ai:ii).test(e)}var ci=/[ \t\n\f\r]/g;function li(e){return typeof e==`object`?e.type===`text`&&ui(e.value):ui(e)}function ui(e){return e.replace(ci,``)===``}var di=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};di.prototype.normal={},di.prototype.property={},di.prototype.space=void 0;function fi(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new di(n,r,t)}function pi(e){return e.toLowerCase()}var mi=class{constructor(e,t){this.attribute=t,this.property=e}};mi.prototype.attribute=``,mi.prototype.booleanish=!1,mi.prototype.boolean=!1,mi.prototype.commaOrSpaceSeparated=!1,mi.prototype.commaSeparated=!1,mi.prototype.defined=!1,mi.prototype.mustUseProperty=!1,mi.prototype.number=!1,mi.prototype.overloadedBoolean=!1,mi.prototype.property=``,mi.prototype.spaceSeparated=!1,mi.prototype.space=void 0;var hi=t({boolean:()=>W,booleanish:()=>G,commaOrSpaceSeparated:()=>yi,commaSeparated:()=>vi,number:()=>K,overloadedBoolean:()=>_i,spaceSeparated:()=>q}),gi=0,W=bi(),G=bi(),_i=bi(),K=bi(),q=bi(),vi=bi(),yi=bi();function bi(){return 2**++gi}var xi=Object.keys(hi),Si=class extends mi{constructor(e,t,n,r){let i=-1;if(super(e,t),Ci(this,`space`,r),typeof n==`number`)for(;++i<xi.length;){let e=xi[i];Ci(this,xi[i],(n&hi[e])===hi[e])}}};Si.prototype.defined=!0;function Ci(e,t,n){n&&(e[t]=n)}function wi(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Si(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[pi(r)]=r,n[pi(a.attribute)]=r}return new di(t,n,e.space)}var Ti=wi({properties:{ariaActiveDescendant:null,ariaAtomic:G,ariaAutoComplete:null,ariaBusy:G,ariaChecked:G,ariaColCount:K,ariaColIndex:K,ariaColSpan:K,ariaControls:q,ariaCurrent:null,ariaDescribedBy:q,ariaDetails:null,ariaDisabled:G,ariaDropEffect:q,ariaErrorMessage:null,ariaExpanded:G,ariaFlowTo:q,ariaGrabbed:G,ariaHasPopup:null,ariaHidden:G,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:q,ariaLevel:K,ariaLive:null,ariaModal:G,ariaMultiLine:G,ariaMultiSelectable:G,ariaOrientation:null,ariaOwns:q,ariaPlaceholder:null,ariaPosInSet:K,ariaPressed:G,ariaReadOnly:G,ariaRelevant:null,ariaRequired:G,ariaRoleDescription:q,ariaRowCount:K,ariaRowIndex:K,ariaRowSpan:K,ariaSelected:G,ariaSetSize:K,ariaSort:null,ariaValueMax:K,ariaValueMin:K,ariaValueNow:K,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Ei(e,t){return t in e?e[t]:t}function Di(e,t){return Ei(e,t.toLowerCase())}var Oi=wi({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:vi,acceptCharset:q,accessKey:q,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:q,autoFocus:W,autoPlay:W,blocking:q,capture:null,charSet:null,checked:W,cite:null,className:q,cols:K,colSpan:null,content:null,contentEditable:G,controls:W,controlsList:q,coords:K|vi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:_i,draggable:G,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:q,height:K,hidden:_i,high:K,href:null,hrefLang:null,htmlFor:q,httpEquiv:q,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:q,itemRef:q,itemScope:W,itemType:q,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:K,manifest:null,max:null,maxLength:K,media:null,method:null,min:null,minLength:K,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,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:W,optimum:K,pattern:null,ping:q,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:q,required:W,reversed:W,rows:K,rowSpan:K,sandbox:q,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shape:null,size:K,sizes:null,slot:null,span:K,spellCheck:G,src:null,srcDoc:null,srcLang:null,srcSet:null,start:K,step:null,style:null,tabIndex:K,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:G,width:K,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:q,axis:null,background:null,bgColor:null,border:K,borderColor:null,bottomMargin:K,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:K,leftMargin:K,link:null,longDesc:null,lowSrc:null,marginHeight:K,marginWidth:K,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:K,rules:null,scheme:null,scrolling:G,standby:null,summary:null,text:null,topMargin:K,valueType:null,version:null,vAlign:null,vLink:null,vSpace:K,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:W,disableRemotePlayback:W,prefix:null,property:null,results:K,security:null,unselectable:null},space:`html`,transform:Di}),ki=wi({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:yi,accentHeight:K,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:K,amplitude:K,arabicForm:null,ascent:K,attributeName:null,attributeType:null,azimuth:K,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:K,by:null,calcMode:null,capHeight:K,className:q,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:K,diffuseConstant:K,direction:null,display:null,dur:null,divisor:K,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:K,enableBackground:null,end:null,event:null,exponent:K,externalResourcesRequired:null,fill:null,fillOpacity:K,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:vi,g2:vi,glyphName:vi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:K,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:K,horizOriginX:K,horizOriginY:K,id:null,ideographic:K,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:K,k:K,k1:K,k2:K,k3:K,k4:K,kernelMatrix:yi,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:K,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:K,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:K,overlineThickness:K,paintOrder:null,panose1:null,path:null,pathLength:K,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:q,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:K,pointsAtY:K,pointsAtZ:K,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:yi,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:yi,rev:yi,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:yi,requiredFeatures:yi,requiredFonts:yi,requiredFormats:yi,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:K,specularExponent:K,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:K,strikethroughThickness:K,string:null,stroke:null,strokeDashArray:yi,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:K,strokeOpacity:K,strokeWidth:null,style:null,surfaceScale:K,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:yi,tabIndex:K,tableValues:null,target:null,targetX:K,targetY:K,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:yi,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:K,underlineThickness:K,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:K,values:null,vAlphabetic:K,vMathematical:K,vectorEffect:null,vHanging:K,vIdeographic:K,version:null,vertAdvY:K,vertOriginX:K,vertOriginY:K,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:K,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Ei}),Ai=wi({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()}}),ji=wi({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Di}),Mi=wi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Ni={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`},Pi=/[A-Z]/g,Fi=/-[a-z]/g,Ii=/^data[-\w.:]+$/i;function Li(e,t){let n=pi(t),r=t,i=mi;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Ii.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Fi,zi);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Fi.test(e)){let n=e.replace(Pi,Ri);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Si}return new i(r,t)}function Ri(e){return`-`+e.toLowerCase()}function zi(e){return e.charAt(1).toUpperCase()}var Bi=fi([Ti,Oi,Ai,ji,Mi],`html`),Vi=fi([Ti,ki,Ai,ji,Mi],`svg`);function Hi(e){return e.join(` `).trim()}var Ui=r(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
2
|
-
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),Wi=r((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(Ui());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Gi=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Ki=r(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Wi()),r=Gi();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),qi=Yi(`end`),Ji=Yi(`start`);function Yi(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Xi(e){let t=Ji(e),n=qi(e);if(t&&n)return{start:t,end:n}}function Zi(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?$i(e.position):`start`in e||`end`in e?$i(e):`line`in e||`column`in e?Qi(e):``}function Qi(e){return ea(e&&e.line)+`:`+ea(e&&e.column)}function $i(e){return Qi(e&&e.start)+`-`+Qi(e&&e.end)}function ea(e){return e&&typeof e==`number`?e:1}var J=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Zi(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}};J.prototype.file=``,J.prototype.name=``,J.prototype.reason=``,J.prototype.message=``,J.prototype.stack=``,J.prototype.column=void 0,J.prototype.line=void 0,J.prototype.ancestors=void 0,J.prototype.cause=void 0,J.prototype.fatal=void 0,J.prototype.place=void 0,J.prototype.ruleId=void 0,J.prototype.source=void 0;var ta=e(Ki(),1),na={}.hasOwnProperty,ra=new Map,ia=/[A-Z]/g,aa=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),oa=new Set([`td`,`th`]),sa=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function ca(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=ya(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=va(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Vi:Bi,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=la(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function la(e,t,n){if(t.type===`element`)return ua(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return da(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return pa(e,t,n);if(t.type===`mdxjsEsm`)return fa(e,t);if(t.type===`root`)return ma(e,t,n);if(t.type===`text`)return ha(e,t)}function ua(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Vi,e.schema=i),e.ancestors.push(t);let a=Ta(e,t.tagName,!1),o=ba(e,t),s=Sa(e,t);return aa.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!li(e)})),ga(e,o,a,t),_a(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function da(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Ea(e,t.position)}function fa(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ea(e,t.position)}function pa(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Vi,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Ta(e,t.name,!0),o=xa(e,t),s=Sa(e,t);return ga(e,o,a,t),_a(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ma(e,t,n){let r={};return _a(r,Sa(e,t)),e.create(t,e.Fragment,r,n)}function ha(e,t){return t.value}function ga(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function _a(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function va(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function ya(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Ji(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function ba(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&na.call(t.properties,i)){let a=Ca(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&oa.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function xa(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Ea(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Ea(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Sa(e,t){let n=[],r=-1,i=e.passKeys?new Map:ra;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=la(e,a,o);s!==void 0&&n.push(s)}return n}function Ca(e,t,n){let r=Li(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ri(n):Hi(n)),r.property===`style`){let t=typeof n==`object`?n:wa(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Da(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Ni[r.property]||r.property:r.attribute,n]}}function wa(e,t){try{return(0,ta.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new J("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=sa+`#cannot-parse-style-attribute`,r}}function Ta(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=si(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=si(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return na.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ea(e)}function Ea(e,t){let n=new J("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=sa+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Da(e){let t={},n;for(n in e)na.call(e,n)&&(t[Oa(n)]=e[n]);return t}function Oa(e){let t=e.replace(ia,ka);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function ka(e){return`-`+e.toLowerCase()}var Aa={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`]},ja={};function Ma(e,t){let n=t||ja;return Na(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Na(e,t,n){if(Fa(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 Pa(e.children,t,n)}return Array.isArray(e)?Pa(e,t,n):``}function Pa(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Na(e[i],t,n);return r.join(``)}function Fa(e){return!!(e&&typeof e==`object`)}var Ia=document.createElement(`i`);function La(e){let t=`&`+e+`;`;Ia.innerHTML=t;let n=Ia.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function Ra(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function za(e,t){return e.length>0?(Ra(e,e.length,0,t),e):t}var Ba={}.hasOwnProperty;function Va(e){let t={},n=-1;for(;++n<e.length;)Ha(t,e[n]);return t}function Ha(e,t){let n;for(n in t){let r=(Ba.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Ba.call(r,a)||(r[a]=[]);let e=i[a];Ua(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Ua(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Ra(e,0,0,r)}function Wa(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Ga(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var Ka=to(/[A-Za-z]/),qa=to(/[\dA-Za-z]/),Ja=to(/[#-'*+\--9=?A-Z^-~]/);function Ya(e){return e!==null&&(e<32||e===127)}var Xa=to(/\d/),Za=to(/[\dA-Fa-f]/),Qa=to(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function X(e){return e!==null&&(e<0||e===32)}function Z(e){return e===-2||e===-1||e===32}var $a=to(/\p{P}|\p{S}/u),eo=to(/\s/);function to(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function no(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&qa(e.charCodeAt(n+1))&&qa(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Q(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Z(r)?(e.enter(n),s(r)):t(r)}function s(r){return Z(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var ro={tokenize:io};function io(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Q(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Y(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var ao={tokenize:so},oo={tokenize:co};function so(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Ra(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(oo,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(oo,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Y(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Ra(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function co(e,t,n){return Q(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function lo(e){if(e===null||X(e)||eo(e))return 1;if($a(e))return 2}function uo(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var fo={name:`attention`,resolveAll:po,tokenize:mo};function po(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};ho(d,-c),ho(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=za(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=za(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=za(l,uo(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=za(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=za(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Ra(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function mo(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=lo(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=lo(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function ho(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var go={name:`autolink`,tokenize:_o};function _o(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Ka(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||qa(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||qa(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Ya(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Ja(t)?(e.consume(t),l):n(t)}function u(e){return qa(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||qa(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var vo={partial:!0,tokenize:yo};function yo(e,t,n){return r;function r(t){return Z(t)?Q(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Y(e)?t(e):n(e)}}var bo={continuation:{tokenize:So},exit:Co,name:`blockQuote`,tokenize:xo};function xo(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return Z(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function So(e,t,n){let r=this;return i;function i(t){return Z(t)?Q(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(bo,t,n)(r)}}function Co(e){e.exit(`blockQuote`)}var wo={name:`characterEscape`,tokenize:To};function To(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Qa(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Eo={name:`characterReference`,tokenize:Do};function Do(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=qa,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Za,u):(e.enter(`characterReferenceValue`),a=7,o=Xa,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===qa&&!La(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Oo={partial:!0,tokenize:jo},ko={concrete:!0,name:`codeFenced`,tokenize:Ao};function Ao(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),Z(t)?Q(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Y(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Oo,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):Z(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Q(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Y(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&Z(t)?Q(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Y(t)?e.check(Oo,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Y(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Z(t)?Q(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Z(t)?Q(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Y(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function jo(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Mo={name:`codeIndented`,tokenize:Po},No={partial:!0,tokenize:Fo};function Po(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Q(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Y(t)?e.attempt(No,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Y(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Fo(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Q(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Y(e)?i(e):n(e)}}var Io={name:`codeText`,previous:Ro,resolve:Lo,tokenize:zo};function Lo(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Ro(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function zo(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Y(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Bo=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Vo(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Vo(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Vo(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);Vo(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Vo(this.left,t.reverse())}}}};function Vo(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 Ho(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Bo(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Uo(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Ra(e,0,1/0,u.slice(0)),!l}function Uo(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Wo={resolve:Ko,tokenize:qo},Go={partial:!0,tokenize:Jo};function Ko(e){return Ho(e),e}function qo(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Y(t)?e.check(Go,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Jo(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Q(e,a,`linePrefix`)}function a(i){if(i===null||Y(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Yo(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Ya(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Y(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||X(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Ya(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Xo(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Y(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Y(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Z(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Zo(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Q(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Y(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Qo(e,t){let n;return r;function r(i){return Y(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Z(i)?Q(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var $o={name:`definition`,tokenize:ts},es={partial:!0,tokenize:ns};function ts(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Xo.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Ga(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return X(t)?Qo(e,l)(t):l(t)}function l(t){return Yo(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(es,d,d)(t)}function d(t){return Z(t)?Q(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Y(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function ns(e,t,n){return r;function r(t){return X(t)?Qo(e,i)(t):n(t)}function i(t){return Zo(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Z(t)?Q(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Y(e)?t(e):n(e)}}var rs={name:`hardBreakEscape`,tokenize:is};function is(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Y(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var as={name:`headingAtx`,resolve:os,tokenize:ss};function os(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Ra(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function ss(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||X(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Y(n)?(e.exit(`atxHeading`),t(n)):Z(n)?Q(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||X(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var cs=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),ls=[`pre`,`script`,`style`,`textarea`],us={concrete:!0,name:`htmlFlow`,resolveTo:ps,tokenize:ms},ds={partial:!0,tokenize:gs},fs={partial:!0,tokenize:hs};function ps(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 ms(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:ie):Ka(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Ka(a)?(e.consume(a),i=4,r.interrupt?t:ie):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:ie):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return Ka(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||X(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&ls.includes(l)?(i=1,r.interrupt?t(s):O(s)):cs.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||qa(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Z(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||Ka(t)?(e.consume(t),b):Z(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||qa(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Z(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Z(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Y(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||X(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Z(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Y(t)?O(t):Z(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),ae):t===63&&i===3?(e.consume(t),ie):t===93&&i===5?(e.consume(t),re):Y(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(ds,oe,k)(t)):t===null||Y(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(fs,ee,oe)(t)}function ee(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return t===null||Y(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function A(t){return t===45?(e.consume(t),ie):O(t)}function j(t){return t===47?(e.consume(t),o=``,ne):O(t)}function ne(t){if(t===62){let n=o.toLowerCase();return ls.includes(n)?(e.consume(t),ae):O(t)}return Ka(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):O(t)}function re(t){return t===93?(e.consume(t),ie):O(t)}function ie(t){return t===62?(e.consume(t),ae):t===45&&i===2?(e.consume(t),ie):O(t)}function ae(t){return t===null||Y(t)?(e.exit(`htmlFlowData`),oe(t)):(e.consume(t),ae)}function oe(n){return e.exit(`htmlFlow`),t(n)}}function hs(e,t,n){let r=this;return i;function i(t){return Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function gs(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(vo,t,n)}}var _s={name:`htmlText`,tokenize:vs};function vs(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Ka(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Ka(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Y(t)?(o=d,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Y(t)?(o=h,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):Y(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Y(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return Ka(t)?(e.consume(t),S):n(t)}function S(t){return t===45||qa(t)?(e.consume(t),S):C(t)}function C(t){return Y(t)?(o=C,j(t)):Z(t)?(e.consume(t),C):A(t)}function w(t){return t===45||qa(t)?(e.consume(t),w):t===47||t===62||X(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||Ka(t)?(e.consume(t),E):Y(t)?(o=T,j(t)):Z(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||qa(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Y(t)?(o=D,j(t)):Z(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Y(t)?(o=O,j(t)):Z(t)?(e.consume(t),O):(e.consume(t),ee)}function k(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):Y(t)?(o=k,j(t)):(e.consume(t),k)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||X(t)?T(t):(e.consume(t),ee)}function te(e){return e===47||e===62||X(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return Z(t)?Q(e,re,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):re(t)}function re(t){return e.enter(`htmlTextData`),o(t)}}var ys={name:`labelEnd`,resolveAll:Cs,resolveTo:ws,tokenize:Ts},bs={tokenize:Es},xs={tokenize:Ds},Ss={tokenize:Os};function Cs(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Ra(e,0,e.length,n),e}function ws(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=za(s,e.slice(a+1,a+r+3)),s=za(s,[[`enter`,u,t]]),s=za(s,uo(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=za(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=za(s,e.slice(o+1)),s=za(s,[[`exit`,c,t]]),Ra(e,a,e.length,s),e}function Ts(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Ga(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(bs,u,o?u:d)(t):t===91?e.attempt(xs,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Ss,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Es(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return X(t)?Qo(e,a)(t):a(t)}function a(t){return t===41?u(t):Yo(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return X(t)?Qo(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Zo(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return X(t)?Qo(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Ds(e,t,n){let r=this;return i;function i(t){return Xo.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Ga(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Os(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var ks={name:`labelStartImage`,resolveAll:ys.resolveAll,tokenize:As};function As(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var js={name:`labelStartLink`,resolveAll:ys.resolveAll,tokenize:Ms};function Ms(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var Ns={name:`lineEnding`,tokenize:Ps};function Ps(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Q(e,t,`linePrefix`)}}var Fs={name:`thematicBreak`,tokenize:Is};function Is(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Y(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Z(t)?Q(e,s,`whitespace`)(t):s(t))}}var Ls={continuation:{tokenize:Vs},exit:Us,name:`list`,tokenize:Bs},Rs={partial:!0,tokenize:Ws},zs={partial:!0,tokenize:Hs};function Bs(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Xa(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Fs,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Xa(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(vo,r.interrupt?n:u,e.attempt(Rs,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Z(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Vs(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(vo,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Q(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Z(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(zs,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Q(e,e.attempt(Ls,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Hs(e,t,n){let r=this;return Q(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Us(e){e.exit(this.containerState.type)}function Ws(e,t,n){let r=this;return Q(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Z(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Gs={name:`setextUnderline`,resolveTo:Ks,tokenize:qs};function Ks(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function qs(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Z(t)?Q(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Y(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Js={tokenize:Ys};function Ys(e){let t=this,n=e.attempt(vo,r,e.attempt(this.parser.constructs.flowInitial,i,Q(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Wo,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Xs={resolveAll:ec()},Zs=$s(`string`),Qs=$s(`text`);function $s(e){return{resolveAll:ec(e===`text`?tc:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function ec(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function tc(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var nc=t({attentionMarkers:()=>uc,contentInitial:()=>ic,disable:()=>dc,document:()=>rc,flow:()=>oc,flowInitial:()=>ac,insideSpan:()=>lc,string:()=>sc,text:()=>cc}),rc={42:Ls,43:Ls,45:Ls,48:Ls,49:Ls,50:Ls,51:Ls,52:Ls,53:Ls,54:Ls,55:Ls,56:Ls,57:Ls,62:bo},ic={91:$o},ac={[-2]:Mo,[-1]:Mo,32:Mo},oc={35:as,42:Fs,45:[Gs,Fs],60:us,61:Gs,95:Fs,96:ko,126:ko},sc={38:Eo,92:wo},cc={[-5]:Ns,[-4]:Ns,[-3]:Ns,33:ks,38:Eo,42:fo,60:[go,_s],91:js,92:[rs,wo],93:ys,95:fo,96:Io},lc={null:[fo,Xs]},uc={null:[42,95]},dc={null:[]};function fc(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=za(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=uo(a,l.events,l),l.events):[]}function f(e,t){return mc(p(e),t)}function p(e){return pc(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){Y(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Ra(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function pc(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function mc(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
3
|
-
`;break;case-3:o=`\r
|
|
4
|
-
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function hc(e){let t={constructs:Va([nc,...(e||{}).extensions||[]]),content:n(ro),defined:[],document:n(ao),flow:n(Js),lazy:{},string:n(Zs),text:n(Qs)};return t;function n(e){return n;function n(n){return fc(t,e,n)}}}function gc(e){for(;!Ho(e););return e}var _c=/[\0\t\n\r]/g;function vc(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(_c.lastIndex=u,c=_c.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var yc=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function bc(e){return e.replace(yc,xc)}function xc(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return Wa(n.slice(t?2:1),t?16:10)}return La(n)||e}var Sc={}.hasOwnProperty;function Cc(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),wc(n)(gc(hc(n).document().write(vc()(e,t,!0))))}function wc(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(Ce),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(ye),blockQuote:a(me),characterEscape:T,characterReference:T,codeFenced:a(he),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(he,o),codeText:a(ge,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(_e),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ve),hardBreakEscape:a(be),hardBreakTrailing:a(be),htmlFlow:a(xe,o),htmlFlowData:T,htmlText:a(xe,o),htmlTextData:T,image:a(Se),label:o,link:a(Ce),listItem:a(Te),listItemValue:f,listOrdered:a(we,d),listUnordered:a(we),paragraph:a(Ee),reference:se,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(ye),strong:a(De),thematicBreak:a(ke)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:pe,autolinkProtocol:fe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:le,characterReferenceMarkerNumeric:le,characterReferenceValue:ue,characterReference:de,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(te),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(ee),htmlTextData:E,image:c(j),label:re,labelText:ne,lineEnding:D,link:c(A),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ce,resourceDestinationString:ie,resourceTitleString:ae,resource:oe,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Ec(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];Sc.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Oc).call(a,void 0,e[0])}for(r.position={start:Tc(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Tc(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Tc(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Oc).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+Zi({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Tc(e.end)}function u(){return Ma(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ga(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Oe(),n.position={start:Tc(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Tc(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Tc(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function te(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ne(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=bc(t),n.identifier=Ga(t).toLowerCase()}function re(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ae(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function oe(){this.data.inReference=void 0}function se(){this.data.referenceType=`collapsed`}function ce(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Ga(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function le(e){this.data.characterReferenceType=e.type}function ue(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=Wa(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=La(t);let i=this.stack[this.stack.length-1];i.value+=r}function de(e){let t=this.stack.pop();t.position.end=Tc(e.end)}function fe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function pe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function me(){return{type:`blockquote`,children:[]}}function he(){return{type:`code`,lang:null,meta:null,value:``}}function ge(){return{type:`inlineCode`,value:``}}function _e(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function ve(){return{type:`emphasis`,children:[]}}function ye(){return{type:`heading`,depth:0,children:[]}}function be(){return{type:`break`}}function xe(){return{type:`html`,value:``}}function Se(){return{type:`image`,title:null,url:``,alt:null}}function Ce(){return{type:`link`,title:null,url:``,children:[]}}function we(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function Te(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function Ee(){return{type:`paragraph`,children:[]}}function De(){return{type:`strong`,children:[]}}function Oe(){return{type:`text`,value:``}}function ke(){return{type:`thematicBreak`}}}function Tc(e){return{line:e.line,column:e.column,offset:e.offset}}function Ec(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Ec(e,r):Dc(e,r)}}function Dc(e,t){let n;for(n in t)if(Sc.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Oc(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+Zi({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Zi({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+Zi({start:t.start,end:t.end})+`) is still open`)}function kc(e){let t=this;t.parser=n;function n(n){return Cc(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Ac(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function jc(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
5
|
-
`}]}function Mc(e,t){let n=t.value?t.value+`
|
|
6
|
-
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Nc(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pc(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fc(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=no(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Ic(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Lc(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Rc(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function zc(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Rc(e,t);let i={src:no(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Bc(e,t){let n={src:no(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Vc(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Hc(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Rc(e,t);let i={href:no(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Uc(e,t){let n={href:no(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Wc(e,t,n){let r=e.all(t),i=n?Gc(n):Kc(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
7
|
-
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
8
|
-
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Gc(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Kc(n[r])}return t}function Kc(e){return e.spread??e.children.length>1}function qc(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Jc(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yc(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Xc(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zc(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Ji(t.children[1]),o=qi(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Qc(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function $c(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var el=9,tl=32;function nl(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(rl(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(rl(t.slice(i),i>0,!1)),a.join(``)}function rl(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===el||t===tl;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===el||t===tl;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function il(e,t){let n={type:`text`,value:nl(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function al(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var ol={blockquote:Ac,break:jc,code:Mc,delete:Nc,emphasis:Pc,footnoteReference:Fc,heading:Ic,html:Lc,imageReference:zc,image:Bc,inlineCode:Vc,linkReference:Hc,link:Uc,listItem:Wc,list:qc,paragraph:Jc,root:Yc,strong:Xc,table:Zc,tableCell:$c,tableRow:Qc,text:il,thematicBreak:al,toml:sl,yaml:sl,definition:sl,footnoteDefinition:sl};function sl(){}var cl=typeof self==`object`?self:globalThis,ll=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new cl[e](t)},ul=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(ll(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(ll(a,o),i)};return r},dl=e=>ul(new Map,e)(0),fl=``,{toString:pl}={},{keys:ml}=Object,hl=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=pl.call(e).slice(8,-1);switch(n){case`Array`:return[1,fl];case`Object`:return[2,fl];case`Date`:return[3,fl];case`RegExp`:return[4,fl];case`Map`:return[5,fl];case`Set`:return[6,fl];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},gl=([e,t])=>e===0&&(t===`function`||t===`symbol`),_l=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=hl(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of ml(r))(e||!gl(hl(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(gl(hl(n))||gl(hl(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!gl(hl(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},vl=(e,{json:t,lossy:n}={})=>{let r=[];return _l(!(t||n),!!t,new Map,r)(e),r},yl=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?dl(vl(e,t)):structuredClone(e):(e,t)=>dl(vl(e,t));function bl(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function xl(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Sl(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||bl,r=e.options.footnoteBackLabel||xl,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=no(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...yl(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
9
|
-
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
10
|
-
`}]}}var Cl=(function(e){if(e==null)return Ol;if(typeof e==`function`)return Dl(e);if(typeof e==`object`)return Array.isArray(e)?wl(e):Tl(e);if(typeof e==`string`)return El(e);throw Error(`Expected function, string, or object as test`)});function wl(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Cl(e[n]);return Dl(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Tl(e){let t=e;return Dl(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function El(e){return Dl(t);function t(t){return t&&t.type===e}}function Dl(e){return t;function t(t,n,r){return!!(kl(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Ol(){return!0}function kl(e){return typeof e==`object`&&!!e&&`type`in e}function Al(e){return e}var jl=[];function Ml(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=Cl(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+Al(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=jl,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Nl(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Nl(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?jl:[e]}function Pl(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Ml(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var Fl={}.hasOwnProperty,Il={};function Ll(e,t){let n=t||Il,r=new Map,i=new Map,a={all:s,applyData:zl,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...ol,...n.handlers},one:o,options:n,patch:Rl,wrap:Vl};return Pl(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Fl.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=yl(n);return r.children=a.all(e),r}return yl(e)}return(a.options.unknownHandler||Bl)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Hl(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Hl(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Rl(e,t){e.position&&(t.position=Xi(e))}function zl(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,yl(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Bl(e,t){let n=t.data||{},r=`value`in t&&!(Fl.call(n,`hProperties`)||Fl.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 Vl(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
11
|
-
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
12
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
13
|
-
`}),n}function Hl(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ul(e,t){let n=Ll(e,t),r=n.one(e,void 0),i=Sl(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
14
|
-
`},i)),a}function Wl(e,t){return e&&`run`in e?async function(n,r){let i=Ul(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ul(n,{file:r,...e||t})}}function Gl(e){if(e)throw e}var Kl=r(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function ql(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Jl(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Yl(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Yl(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Xl={basename:Zl,dirname:Ql,extname:$l,join:eu,sep:`/`};function Zl(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);ru(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Ql(e){if(ru(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function $l(e){ru(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function eu(...e){let t=-1,n;for(;++t<e.length;)ru(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:tu(n)}function tu(e){ru(e);let t=e.codePointAt(0)===47,n=nu(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function nu(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function ru(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var iu={cwd:au};function au(){return`/`}function ou(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function su(e){if(typeof e==`string`)e=new URL(e);else if(!ou(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return cu(e)}function cu(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var lu=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],uu=class{constructor(e){let t;t=e?ou(e)?{path:e}:typeof e==`string`||mu(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:iu.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<lu.length;){let e=lu[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)lu.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Xl.basename(this.path):void 0}set basename(e){fu(e,`basename`),du(e,`basename`),this.path=Xl.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Xl.dirname(this.path):void 0}set dirname(e){pu(this.basename,`dirname`),this.path=Xl.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Xl.extname(this.path):void 0}set extname(e){if(du(e,`extname`),pu(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Xl.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){ou(e)&&(e=su(e)),fu(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Xl.basename(this.path,this.extname):void 0}set stem(e){fu(e,`stem`),du(e,`stem`),this.path=Xl.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new J(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function du(e,t){if(e&&e.includes(Xl.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Xl.sep+"`")}function fu(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function pu(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function mu(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var hu=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),gu=e(Kl(),1),_u={}.hasOwnProperty,vu=new class e extends hu{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=Jl()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,gu.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(xu(`data`,this.frozen),this.namespace[e]=t,this):_u.call(this.namespace,e)&&this.namespace[e]||void 0:e?(xu(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=wu(e),n=this.parser||this.Parser;return yu(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),yu(`process`,this.parser||this.Parser),bu(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=wu(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Eu(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),yu(`processSync`,this.parser||this.Parser),bu(`processSync`,this.compiler||this.Compiler),this.process(e,r),Cu(`processSync`,`process`,t),n;function r(e,r){t=!0,Gl(e),n=r}}run(e,t,n){Su(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=wu(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Cu(`runSync`,`run`,n),r;function i(e,t){Gl(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=wu(t),r=this.compiler||this.Compiler;return bu(`stringify`,r),Su(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(xu(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,gu.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];ql(o)&&ql(r)&&(r=(0,gu.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function yu(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function bu(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function xu(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Su(e){if(!ql(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Cu(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function wu(e){return Tu(e)?e:new uu(e)}function Tu(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Eu(e){return typeof e==`string`||Du(e)}function Du(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ou=[],ku={allowDangerousHtml:!0},Au=/^(https?|ircs?|mailto|xmpp)$/i,ju=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Mu(e){let t=Nu(e),n=Pu(e);return Fu(t.runSync(t.parse(n),n),e)}function Nu(e){let t=e.rehypePlugins||Ou,n=e.remarkPlugins||Ou,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ku}:ku;return vu().use(kc).use(n).use(Wl,r).use(t)}function Pu(e){let t=e.children||``,n=new uu;return typeof t==`string`?n.value=t:``+t,n}function Fu(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Iu;for(let e of ju)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Pl(e,l),ca(e,{Fragment:M.Fragment,components:i,ignoreInvalidStyle:!0,jsx:M.jsx,jsxs:M.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Aa)if(Object.hasOwn(Aa,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Aa[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Iu(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Au.test(e.slice(0,t))?e:``}function Lu(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ru(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function zu(e,t,n){let r=Cl((n||{}).ignore||[]),i=Bu(t),a=-1;for(;++a<i.length;)Ml(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Bu(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Vu(e[0]),Hu(e[1])])}return t}function Vu(e){return typeof e==`string`?new RegExp(Ru(e),`g`):e}function Hu(e){return typeof e==`function`?e:function(){return e}}var Uu=`phrasing`,Wu=[`autolink`,`link`,`image`,`label`];function Gu(){return{transforms:[$u],enter:{literalAutolink:qu,literalAutolinkEmail:Ju,literalAutolinkHttp:Ju,literalAutolinkWww:Ju},exit:{literalAutolink:Qu,literalAutolinkEmail:Zu,literalAutolinkHttp:Yu,literalAutolinkWww:Xu}}}function Ku(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:Uu,notInConstruct:Wu},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:Uu,notInConstruct:Wu},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:Uu,notInConstruct:Wu}]}}function qu(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function Ju(e){this.config.enter.autolinkProtocol.call(this,e)}function Yu(e){this.config.exit.autolinkProtocol.call(this,e)}function Xu(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Zu(e){this.config.exit.autolinkEmail.call(this,e)}function Qu(e){this.exit(e)}function $u(e){zu(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ed],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,td]],{ignore:[`link`,`linkReference`]})}function ed(e,t,n,r,i){let a=``;if(!id(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!nd(n)))return!1;let o=rd(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function td(e,t,n,r){return!id(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function nd(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function rd(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Lu(e,`(`),a=Lu(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function id(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||eo(n)||$a(n))&&(!t||n!==47)}md.peek=pd;function ad(){this.buffer()}function od(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function sd(){this.buffer()}function cd(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function ld(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ga(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ud(e){this.exit(e)}function dd(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ga(this.sliceSerialize(e)).toLowerCase(),n.label=t}function fd(e){this.exit(e)}function pd(){return`[`}function md(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function hd(){return{enter:{gfmFootnoteCallString:ad,gfmFootnoteCall:od,gfmFootnoteDefinitionLabelString:sd,gfmFootnoteDefinition:cd},exit:{gfmFootnoteCallString:ld,gfmFootnoteCall:ud,gfmFootnoteDefinitionLabelString:dd,gfmFootnoteDefinition:fd}}}function gd(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:md},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
15
|
-
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?vd:_d))),s(),o}}function _d(e,t,n){return t===0?e:vd(e,t,n)}function vd(e,t,n){return(n?``:` `)+e}var yd=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];wd.peek=Td;function bd(){return{canContainEols:[`delete`],enter:{strikethrough:Sd},exit:{strikethrough:Cd}}}function xd(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:yd}],handlers:{delete:wd}}}function Sd(e){this.enter({type:`delete`,children:[]},e)}function Cd(e){this.exit(e)}function wd(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function Td(){return`~`}function Ed(e){return e.length}function Dd(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ed,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Od(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=kd(r[d]);else{let e=kd(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
16
|
-
`)}function Od(e){return e==null?``:String(e)}function kd(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Ad(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),jd);return i(),o}function jd(e,t,n){return`>`+(n?``:` `)+e}function Md(e,t){return Nd(e,t.inConstruct,!0)&&!Nd(e,t.notInConstruct,!1)}function Nd(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 Pd(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
17
|
-
`&&Md(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
18
|
-
`}function Fd(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function Id(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 Ld(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Rd(e,t,n,r){let i=Ld(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(Id(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,zd);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(Fd(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
19
|
-
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
20
|
-
`),a&&(u+=s.move(a+`
|
|
21
|
-
`)),u+=s.move(c),l(),u}function zd(e,t,n){return(n?``:` `)+e}function Bd(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Vd(e,t,n,r){let i=Bd(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
|
|
22
|
-
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function Hd(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ud(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function Wd(e,t,n){let r=lo(e),i=lo(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Gd.peek=Kd;function Gd(e,t,n,r){let i=Hd(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Wd(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Ud(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Wd(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Ud(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Kd(e,t,n){return n.options.emphasis||`*`}function qd(e,t){let n=!1;return Pl(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Ma(e)&&(t.options.setext||n))}function Jd(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(qd(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
23
|
-
`,after:`
|
|
24
|
-
`});return r(),t(),o+`
|
|
25
|
-
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
26
|
-
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
27
|
-
`,...a.current()});return/^[\t ]/.test(l)&&(l=Ud(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Yd.peek=Xd;function Yd(e){return e.value||``}function Xd(){return`<`}Zd.peek=Qd;function Zd(e,t,n,r){let i=Bd(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Qd(){return`!`}$d.peek=ef;function $d(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function ef(){return`!`}tf.peek=nf;function tf(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function nf(){return"`"}function rf(e,t){let n=Ma(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))}af.peek=of;function af(e,t,n,r){let i=Bd(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(rf(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function of(e,t,n){return rf(e,n)?`<`:`[`}sf.peek=cf;function sf(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function cf(){return`[`}function lf(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function uf(e){let t=lf(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function df(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function ff(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function pf(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?df(n):lf(n),s=e.ordered?o===`.`?`)`:`.`:uf(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),ff(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function mf(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function hf(e,t,n,r){let i=mf(n),a=n.bulletCurrent||lf(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function gf(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var _f=Cl([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function vf(e,t,n,r){return(e.children.some(function(e){return _f(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function yf(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}bf.peek=xf;function bf(e,t,n,r){let i=yf(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Wd(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Ud(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Wd(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Ud(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function xf(e,t,n){return n.options.strong||`*`}function Sf(e,t,n,r){return n.safe(e.value,r)}function Cf(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function wf(e,t,n){let r=(ff(n)+(n.options.ruleSpaces?` `:``)).repeat(Cf(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Tf={blockquote:Ad,break:Pd,code:Rd,definition:Vd,emphasis:Gd,hardBreak:Pd,heading:Jd,html:Yd,image:Zd,imageReference:$d,inlineCode:tf,link:af,linkReference:sf,list:pf,listItem:hf,paragraph:gf,root:vf,strong:bf,text:Sf,thematicBreak:wf};function Ef(){return{enter:{table:Df,tableData:jf,tableHeader:jf,tableRow:kf},exit:{codeText:Mf,table:Of,tableData:Af,tableHeader:Af,tableRow:Af}}}function Df(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Of(e){this.exit(e),this.data.inTable=void 0}function kf(e){this.enter({type:`tableRow`,children:[]},e)}function Af(e){this.exit(e)}function jf(e){this.enter({type:`tableCell`,children:[]},e)}function Mf(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Nf));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Nf(e,t){return t===`|`?t:e}function Pf(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
28
|
-
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
29
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Dd(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Tf.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Ff(){return{exit:{taskListCheckValueChecked:Lf,taskListCheckValueUnchecked:Lf,paragraph:Rf}}}function If(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:zf}}}function Lf(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Rf(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function zf(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Tf.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Bf(){return[Gu(),hd(),bd(),Ef(),Ff()]}function Vf(e){return{extensions:[Ku(),gd(e),xd(),Pf(e),If()]}}var Hf={tokenize:np,partial:!0},Uf={tokenize:rp,partial:!0},Wf={tokenize:ip,partial:!0},Gf={tokenize:ap,partial:!0},Kf={tokenize:op,partial:!0},qf={name:`wwwAutolink`,tokenize:ep,previous:sp},Jf={name:`protocolAutolink`,tokenize:tp,previous:cp},Yf={name:`emailAutolink`,tokenize:$f,previous:lp},Xf={};function Zf(){return{text:Xf}}for(var Qf=48;Qf<123;)Xf[Qf]=Yf,Qf++,Qf===58?Qf=65:Qf===91&&(Qf=97);Xf[43]=Yf,Xf[45]=Yf,Xf[46]=Yf,Xf[95]=Yf,Xf[72]=[Yf,Jf],Xf[104]=[Yf,Jf],Xf[87]=[Yf,qf],Xf[119]=[Yf,qf];function $f(e,t,n){let r=this,i,a;return o;function o(t){return!up(t)||!lp.call(r,r.previous)||dp(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return up(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Kf,u,l)(t):t===45||t===95||qa(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Ka(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function ep(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!sp.call(r,r.previous)||dp(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Hf,e.attempt(Uf,e.attempt(Wf,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function tp(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&cp.call(r,r.previous)&&!dp(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Ka(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Ya(t)||X(t)||eo(t)||$a(t)?n(t):e.attempt(Uf,e.attempt(Wf,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function np(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function rp(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Gf,c,s)(t):t===null||X(t)||eo(t)||t!==45&&$a(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function ip(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Gf,t,a)(o):o===null||X(o)||eo(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function ap(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||X(o)||eo(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||X(e)||eo(e)?t(e):r(e)}function a(e){return Ka(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Ka(t)?(e.consume(t),o):n(t)}}function op(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return qa(e)?n(e):t(e)}}function sp(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||X(e)}function cp(e){return!Ka(e)}function lp(e){return!(e===47||up(e))}function up(e){return e===43||e===45||e===46||e===95||qa(e)}function dp(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var fp={tokenize:bp,partial:!0};function pp(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:_p,continuation:{tokenize:vp},exit:yp}},text:{91:{name:`gfmFootnoteCall`,tokenize:gp},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:mp,resolveTo:hp}}}}function mp(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Ga(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function hp(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function gp(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||X(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Ga(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return X(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function _p(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||X(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Ga(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return X(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Q(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function vp(e,t,n){return e.check(vo,t,e.attempt(fp,t,n))}function yp(e){e.exit(`gfmFootnoteDefinition`)}function bp(e,t,n){let r=this;return Q(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function xp(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Ra(o,o.length,0,uo(s,e.slice(r+1,n),t)),Ra(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Ra(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=lo(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=lo(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Sp=class{constructor(){this.map=[]}add(e,t,n){Cp(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Cp(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function wp(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Tp(){return{flow:{null:{name:`table`,tokenize:Ep,resolveAll:Dp}}}}function Ep(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Y(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Z(t)?Q(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||X(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Z(t)?Q(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Z(t)?Q(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Y(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Z(t)?Q(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Y(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Y(n)?(e.exit(`tableRow`),t(n)):Z(n)?Q(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||X(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Dp(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Sp;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(kp(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Op(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Op(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Op(f,t,o,i,n,d)):(o[0]=o[1],d=Op(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&kp(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=wp(t.events,n))}return e}function Op(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Ap(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Ap(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Ap(t.events,n[2]),a=Ap(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Ap(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function kp(e,t,n,r,i){let a=[],o=Ap(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Ap(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var jp={name:`tasklistCheck`,tokenize:Np};function Mp(){return{text:{91:jp}}}function Np(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return X(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Y(r)?t(r):Z(r)?e.check({tokenize:Pp},t,n)(r):n(r)}}function Pp(e,t,n){return Q(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Fp(e){return Va([Zf(),pp(),xp(e),Tp(),Mp()])}var Ip={};function Lp(e){let t=this,n=e||Ip,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Fp(n)),a.push(Bf()),o.push(Vf(n))}function Rp(e){let t=``;return T.Children.forEach(e,e=>{typeof e==`string`||typeof e==`number`?t+=e:(0,T.isValidElement)(e)&&(t+=Rp(e.props.children))}),t}function zp({children:e}){let[t,n]=(0,T.useState)(`idle`),r=(0,T.useRef)(void 0);(0,T.useEffect)(()=>()=>clearTimeout(r.current),[]);let i=async()=>{try{await navigator.clipboard.writeText(Rp(e)),n(`copied`)}catch{n(`failed`)}clearTimeout(r.current),r.current=setTimeout(()=>n(`idle`),1800)};return(0,M.jsxs)(`div`,{className:`code-block-wrapper`,children:[(0,M.jsxs)(`div`,{className:`code-block-header`,children:[(0,M.jsx)(`span`,{children:`Code`}),(0,M.jsxs)(`button`,{type:`button`,className:`copy-btn ${t}`,onClick:()=>void i(),"aria-label":t===`failed`?`Copy failed; try again`:`Copy code`,children:[t===`copied`?(0,M.jsx)(ee,{size:12}):(0,M.jsx)(m,{size:12}),(0,M.jsx)(`span`,{"aria-live":`polite`,children:t===`copied`?`Copied`:t===`failed`?`Copy failed`:`Copy`})]})]}),(0,M.jsx)(`pre`,{children:e})]})}function Bp({href:e,children:t}){let[n,r]=(0,T.useState)(null),i=!1;try{let t=new URL(e??``);i=t.protocol===`https:`&&!t.username&&!t.password}catch{}return!i||!e?(0,M.jsx)(`span`,{children:t}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,onClick:t=>{window.osecDesktop&&(t.preventDefault(),r(null),window.osecDesktop.openExternal(e).catch(e=>r(e instanceof Error?e.message:String(e))))},children:t}),n&&(0,M.jsxs)(`span`,{role:`alert`,children:[` `,n]})]})}var Vp={img:({alt:e})=>(0,M.jsx)(`span`,{children:e?`[Image: ${e}]`:`[Image]`}),a:({href:e,children:t})=>(0,M.jsx)(Bp,{href:e,children:t}),pre:({children:e})=>(0,M.jsx)(zp,{children:e}),table:({children:e})=>(0,M.jsx)(`div`,{style:{overflowX:`auto`},children:(0,M.jsx)(`table`,{children:e})})},Hp=[Lp],Up=(0,T.memo)(function({text:e}){return(0,M.jsx)(`div`,{className:`message-body`,children:(0,M.jsx)(Mu,{remarkPlugins:Hp,components:Vp,skipHtml:!0,children:e})})});function Wp({question:e,selectedLabels:t,customText:n,onSelectChange:r,onCustomChange:i}){let a=(0,T.useCallback)(n=>{e.multiSelect?r(t.includes(n)?t.filter(e=>e!==n):[...t,n]):r(t[0]===n?[]:[n])},[e.multiSelect,t,r]);return(0,M.jsxs)(`div`,{className:`question-item`,children:[(0,M.jsx)(`div`,{className:`question-header`,children:e.header}),e.question&&(0,M.jsx)(`div`,{className:`question-text`,children:e.question}),e.options&&e.options.length>0&&(0,M.jsx)(`div`,{className:`question-options`,children:e.options.map((e,n)=>(0,M.jsx)(`button`,{className:`question-option${t.includes(e.label)?` selected`:``}`,onClick:()=>a(e.label),children:e.label},n))}),e.allowCustom&&(0,M.jsx)(`textarea`,{className:`question-custom-input`,value:n,onChange:e=>i(e.target.value),placeholder:`Custom answer…`,rows:2})]})}function Gp(e){switch(e){case`tool`:return(0,M.jsx)(he,{size:16});case`scope`:return(0,M.jsx)(re,{size:16});case`local-scope`:return(0,M.jsx)(A,{size:16});case`audit-escalation`:return(0,M.jsx)(fe,{size:16});case`operator-question`:return(0,M.jsx)(S,{size:16});default:return(0,M.jsx)(c,{size:16})}}function Kp({decision:e,workspace:t}){let[n,r]=(0,T.useState)({}),[i,a]=(0,T.useState)({}),o=(0,T.useCallback)(()=>({id:e.id,kind:e.kind,title:e.title,detail:e.detail,call:e.call,requestedUrls:e.requestedUrls,requestedPath:e.requestedPath,questions:e.questions}),[e]),s=(0,T.useCallback)(()=>{let r={approve:!0};e.questions&&e.questions.length>0&&(r.answers=e.questions.map(e=>{let t={header:e.header},r=n[e.header];r&&r.length>0&&(t.selectedLabels=r);let a=i[e.header];return a?.trim()&&(t.customText=a.trim()),t})),t.resolveDecision(o(),r)},[e,t,n,i,o]),c=(0,T.useCallback)(()=>{t.resolveDecision(o(),{approve:!1})},[t,o]);return e.resolved?(0,M.jsxs)(`div`,{className:`approval-panel resolved${e.approved?` approved`:` declined`}`,children:[(0,M.jsxs)(`div`,{className:`approval-header`,children:[(0,M.jsx)(`span`,{className:`approval-icon`,children:e.approved?(0,M.jsx)(ee,{size:16,color:`#22c55e`}):(0,M.jsx)(_,{size:16,color:`var(--danger)`})}),(0,M.jsx)(`span`,{className:`approval-title`,children:e.title}),(0,M.jsx)(`span`,{className:`approval-kind`,children:e.kind})]}),(0,M.jsx)(`div`,{className:`approval-resolved-badge${e.approved?` approved`:` declined`}`,children:e.approved===void 0?`Closed`:e.approved?`Approved`:`Declined`})]}):(0,M.jsxs)(`div`,{className:`approval-panel`,children:[(0,M.jsxs)(`div`,{className:`approval-header`,children:[(0,M.jsx)(`span`,{className:`approval-icon`,children:Gp(e.kind)}),(0,M.jsx)(`span`,{className:`approval-title`,children:e.title}),(0,M.jsx)(`span`,{className:`approval-kind`,children:e.kind})]}),(0,M.jsx)(`div`,{className:`approval-detail`,children:e.detail}),e.call&&(0,M.jsx)(`div`,{className:`approval-tool-preview`,children:(0,M.jsx)(`pre`,{children:(0,M.jsxs)(`code`,{children:[e.call.name,`(`,JSON.stringify(e.call.arguments),`)`]})})}),e.requestedUrls&&e.requestedUrls.length>0&&(0,M.jsx)(`div`,{className:`approval-tool-preview`,children:e.requestedUrls.map((e,t)=>(0,M.jsx)(`div`,{style:{fontSize:11,fontFamily:`var(--mono)`,padding:`2px 0`},children:e},t))}),e.requestedPath&&(0,M.jsx)(`div`,{className:`approval-tool-preview`,children:(0,M.jsx)(`code`,{style:{fontSize:11},children:e.requestedPath})}),e.questions&&e.questions.length>0&&(0,M.jsx)(`div`,{className:`question-group`,children:e.questions.map((e,t)=>{let o=n[e.header]??[],s=i[e.header]??``;return(0,M.jsx)(Wp,{question:e,selectedLabels:o,customText:s,onSelectChange:t=>r(n=>({...n,[e.header]:t})),onCustomChange:t=>a(n=>({...n,[e.header]:t}))},t)})}),(0,M.jsxs)(`div`,{className:`approval-actions`,children:[(0,M.jsx)(`button`,{className:`decline-btn`,disabled:t.busy,onClick:c,children:`Decline`}),(0,M.jsx)(`button`,{className:`approve-btn`,disabled:t.busy||e.questions?.some(e=>!(n[e.header]?.length||e.allowCustom&&i[e.header]?.trim())),onClick:s,children:e.kind===`operator-question`?`Submit`:`Approve`})]})]})}function qp(e){let t=[],n=null;for(let r of e)switch(r.type){case`user`:if(n&&!n.isComplete){n.isComplete=!0,n.isWorking=!1;for(let e of n.decisions)e.resolved=!0;for(let e of n.toolCalls)e.isRunning=!1}n={id:`turn-${r.sequence}`,user:{text:r.text,sequence:r.sequence},assistantText:``,reasoningText:``,toolCalls:[],decisions:[],notices:[],isComplete:!1,isWorking:!1},t.push(n);break;case`assistant-delta`:n&&(n.assistantText+=r.text);break;case`reasoning-delta`:n&&(n.reasoningText+=r.text);break;case`tool-start`:if(n){n.isWorking=!0;let e=r.call.id??`tool-${n.toolCalls.length}`;n.toolCalls.push({id:e,name:r.call.name,arguments:r.call.arguments,isRunning:!0})}break;case`tool-result`:if(n){let e=r.call.id?n.toolCalls.find(e=>e.id===r.call.id):n.toolCalls.find(e=>e.name===r.call.name&&e.isRunning);e&&(e.result=r.result,e.isRunning=!1)}break;case`usage`:n&&(n.usage=r.usage);break;case`notice`:n&&n.notices.push(r.text);break;case`decision`:n&&(n.decisions.push({id:r.decision.id,kind:r.decision.kind,title:r.decision.title,detail:r.decision.detail,call:r.decision.call,requestedUrls:r.decision.requestedUrls,requestedPath:r.decision.requestedPath,questions:r.decision.questions,resolved:!1}),n.isWorking=!0);break;case`decision-resolved`:if(n){let e=n.decisions.find(e=>e.id===r.decisionId);e&&(e.resolved=!0,e.approved=r.approved)}break;case`turn-complete`:if(n){n.isComplete=!0,n.isWorking=!1,n.budget=r.budget,n.stopReason=r.stopReason,r.error&&(n.error=r.error);for(let e of n.decisions)e.resolved=!0;for(let e of n.toolCalls)e.isRunning=!1}break;case`error`:n&&(n.error||(n.error=r.message))}return n&&!n.isComplete&&(n.isWorking=!0),t}function Jp({text:e}){let[t,n]=(0,T.useState)(!1);return e?(0,M.jsxs)(`details`,{className:`reasoning-block`,open:t,onToggle:e=>n(e.target.open),children:[(0,M.jsxs)(`summary`,{children:[(0,M.jsx)(k,{size:14}),(0,M.jsx)(`span`,{children:`Reasoning`}),(0,M.jsx)(f,{size:14,className:`chevron`})]}),(0,M.jsx)(`div`,{className:`reasoning-content`,children:e})]}):null}function Yp({call:e}){let[t,n]=(0,T.useState)(!1),r=(0,T.useMemo)(()=>{if(e.result===void 0)return null;try{let t=typeof e.result==`string`?e.result:JSON.stringify(e.result,null,2);return t.length>2e3?t.slice(0,2e3)+`
|
|
30
|
-
… (truncated)`:t}catch{return String(e.result)}},[e.result]);return(0,M.jsxs)(`div`,{className:`tool-call${e.isRunning?` running`:``}`,children:[(0,M.jsxs)(`button`,{className:`tool-call-header`,onClick:()=>n(!t),"aria-expanded":t,children:[(0,M.jsx)(he,{size:14}),(0,M.jsx)(`span`,{className:`tool-name`,children:e.name}),e.isRunning&&(0,M.jsx)(`span`,{className:`tool-status`,children:`Running…`}),(0,M.jsx)(f,{size:14,className:`chevron${t?` open`:``}`})]}),t&&(0,M.jsxs)(`div`,{className:`tool-call-body`,children:[(0,M.jsx)(`span`,{className:`section-label`,children:`Arguments`}),(0,M.jsx)(`pre`,{children:(0,M.jsx)(`code`,{children:typeof e.arguments==`string`?e.arguments:JSON.stringify(e.arguments,null,2)})}),r!==null&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`span`,{className:`section-label`,children:`Result`}),(0,M.jsx)(`pre`,{children:(0,M.jsx)(`code`,{children:r})})]}),e.isRunning&&(0,M.jsx)(`span`,{style:{fontSize:11,color:`var(--muted)`},children:`Awaiting result…`})]})]})}function Xp({text:e}){return(0,M.jsx)(`div`,{className:`user-message`,children:(0,M.jsx)(`div`,{className:`bubble`,children:e})})}function Zp({error:e,stopReason:t}){let n=t===`cancelled`||t===`interrupted`;return(0,M.jsx)(`div`,{className:`turn-error${n?` warning`:``}`,children:(0,M.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`flex-start`},children:[n?(0,M.jsx)(p,{size:14,style:{flexShrink:0,marginTop:1}}):(0,M.jsx)(ce,{size:14,style:{flexShrink:0,marginTop:1}}),(0,M.jsx)(`span`,{children:e})]})})}function Qp({text:e}){return(0,M.jsxs)(`div`,{className:`system-notice`,children:[(0,M.jsx)(p,{size:12}),(0,M.jsx)(`span`,{children:e})]})}function $p({turn:e,workspace:t}){let n=e.assistantText.trim().length>0,r=e.reasoningText.trim().length>0,i=e.toolCalls.length>0,a=e.decisions.length>0,o=e.notices.length>0,s=!!e.error,c=e.isWorking;return(0,M.jsxs)(`div`,{className:`turn-block`,"data-turn-id":e.id,children:[(0,M.jsx)(Xp,{text:e.user.text}),o&&e.notices.map((e,t)=>(0,M.jsx)(Qp,{text:e},t)),a&&e.decisions.map(e=>(0,M.jsx)(Kp,{decision:e,workspace:t},e.id)),r&&(0,M.jsx)(Jp,{text:e.reasoningText}),i&&e.toolCalls.map(e=>(0,M.jsx)(Yp,{call:e},e.id)),n&&(0,M.jsx)(Up,{text:e.assistantText}),c&&!n&&!r&&!i&&(0,M.jsxs)(`div`,{className:`working-indicator`,children:[(0,M.jsx)(`span`,{className:`working-dot`}),`Working…`]}),s&&(0,M.jsx)(Zp,{error:e.error,stopReason:e.stopReason}),e.isComplete&&!n&&!s&&e.stopReason!=null&&(0,M.jsx)(`div`,{className:`turn-error warning`,children:(0,M.jsxs)(`div`,{style:{display:`flex`,gap:6,alignItems:`flex-start`},children:[(0,M.jsx)(p,{size:14,style:{flexShrink:0,marginTop:1}}),(0,M.jsxs)(`span`,{children:[`Turn ended: `,e.stopReason]})]})})]})}function em({onNewSession:e}){return(0,M.jsxs)(`div`,{className:`conversation-empty`,children:[(0,M.jsx)(`h2`,{children:`0sec Desktop`}),(0,M.jsx)(`p`,{children:`Run security engagements through the local console daemon. Start a new session to begin scanning, auditing, or reviewing a target.`}),(0,M.jsxs)(`button`,{className:`empty-btn`,onClick:e,children:[(0,M.jsx)(ue,{size:14}),`New session`]})]})}function tm({draft:e,onDraftChange:t,onSend:n,onStop:r,disabled:i,isWorking:a}){let o=(0,T.useRef)(null),[s,c]=(0,T.useState)(!1),l=(0,T.useCallback)(()=>{let e=o.current;e&&(e.style.height=`auto`,e.style.height=Math.min(e.scrollHeight,200)+`px`)},[]);(0,T.useEffect)(()=>{l()},[e,l]);let u=(0,T.useCallback)(t=>{s||t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),!i&&!a&&e.trim()&&n())},[s,i,a,e,n]);return(0,M.jsx)(`div`,{className:`conversation-composer`,children:(0,M.jsxs)(`div`,{className:`composer-row`,children:[(0,M.jsx)(`textarea`,{ref:o,className:`composer-textarea`,"aria-label":`Message`,value:e,onChange:e=>t(e.target.value),onKeyDown:u,onCompositionStart:()=>c(!0),onCompositionEnd:()=>c(!1),placeholder:i?`No active session`:`Send a message…`,disabled:i,rows:1}),(0,M.jsx)(`div`,{className:`composer-actions`,children:a?(0,M.jsx)(`button`,{className:`composer-action-btn stop-btn`,onClick:r,title:`Stop`,"aria-label":`Stop`,children:(0,M.jsx)(pe,{size:14})}):(0,M.jsx)(`button`,{className:`composer-action-btn send-btn`,onClick:n,disabled:i||!e.trim(),title:`Send`,"aria-label":`Send`,children:(0,M.jsx)(O,{size:14})})})]})})}function nm({session:e,onConnection:t,onSettings:n}){return e?(0,M.jsxs)(`div`,{className:`bottom-context-row`,children:[(0,M.jsxs)(`div`,{className:`context-left`,children:[(0,M.jsxs)(`span`,{className:`context-badge`,title:`Role`,children:[(0,M.jsx)(C,{size:10}),e.role]}),(0,M.jsx)(`span`,{className:`context-badge`,title:`Autonomy mode`,children:e.autonomyMode})]}),(0,M.jsxs)(`div`,{className:`context-actions`,children:[(0,M.jsxs)(`button`,{className:`context-action-btn`,onClick:t,title:`Connection status`,children:[(0,M.jsx)(w,{size:11}),`Connection`]}),(0,M.jsxs)(`button`,{className:`context-action-btn`,onClick:n,title:`Session settings`,children:[(0,M.jsx)(de,{size:11}),`Settings`]})]})]}):(0,M.jsx)(`div`,{className:`bottom-context-row`})}function rm({workspace:e,onSettings:t,onNewSession:n,onInspect:r}){let i=(0,T.useRef)(null),[a,o]=(0,T.useState)(!0),s=(0,T.useMemo)(()=>qp(e.events),[e.events]),c=(0,T.useCallback)(()=>{let e=i.current;if(!e)return;let t=e.scrollHeight-e.scrollTop-e.clientHeight<100;o(t)},[]);(0,T.useEffect)(()=>{a&&i.current&&(i.current.scrollTop=i.current.scrollHeight)},[s,a]);let l=(0,T.useCallback)(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight,o(!0))},[]),u=(0,T.useCallback)(()=>{e.draft.trim()&&!e.busy&&e.send()},[e]),d=(0,T.useCallback)(t=>{e.setDraft(t)},[e]),f=e.activeSession;return f?(0,M.jsxs)(`div`,{className:`conversation-panel`,children:[(0,M.jsxs)(`div`,{className:`conversation-scroll`,ref:i,onScroll:c,children:[s.length===0&&(0,M.jsx)(`div`,{className:`conversation-empty`,children:(0,M.jsx)(`p`,{style:{marginBottom:0},children:`Session started. Send a message to begin.`})}),s.map(t=>(0,M.jsx)($p,{turn:t,workspace:e},t.id))]}),!a&&s.length>0&&(0,M.jsx)(`div`,{className:`jump-to-latest`,children:(0,M.jsxs)(`button`,{onClick:l,children:[(0,M.jsx)(D,{size:14}),`Latest`]})}),(0,M.jsx)(tm,{draft:e.draft,onDraftChange:d,onSend:u,onStop:e.cancel,disabled:e.loading||f.status===`closed`||f.status===`failed`,isWorking:f.status===`working`||f.status===`waiting`}),(0,M.jsx)(nm,{session:f,onConnection:t,onSettings:t})]}):(0,M.jsxs)(`div`,{className:`conversation-panel`,children:[(0,M.jsx)(em,{onNewSession:n}),(0,M.jsx)(tm,{draft:e.draft,onDraftChange:d,onSend:u,onStop:e.cancel,disabled:!0,isWorking:!1}),(0,M.jsx)(nm,{session:null,onConnection:t,onSettings:t})]})}function im({session:e}){return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`inspect-section`,children:[(0,M.jsx)(`div`,{className:`inspect-section-title`,children:`Session`}),(0,M.jsxs)(`div`,{className:`inspect-row`,children:[(0,M.jsx)(`span`,{className:`inspect-label`,children:`Role`}),(0,M.jsx)(`span`,{className:`inspect-value`,children:e.role})]}),(0,M.jsxs)(`div`,{className:`inspect-row`,children:[(0,M.jsx)(`span`,{className:`inspect-label`,children:`Mode`}),(0,M.jsx)(`span`,{className:`inspect-value`,children:e.autonomyMode})]}),(0,M.jsxs)(`div`,{className:`inspect-row`,children:[(0,M.jsx)(`span`,{className:`inspect-label`,children:`Status`}),(0,M.jsx)(`span`,{className:`inspect-badge ${e.status}`,children:e.status})]})]}),(0,M.jsxs)(`div`,{className:`inspect-section`,children:[(0,M.jsx)(`div`,{className:`inspect-section-title`,children:`Scope`}),(0,M.jsxs)(`div`,{className:`inspect-row`,children:[(0,M.jsx)(`span`,{className:`inspect-label`,children:`Target`}),(0,M.jsx)(`span`,{className:`inspect-value`,style:{fontSize:11},children:e.target||`—`})]}),(0,M.jsxs)(`div`,{className:`inspect-row`,children:[(0,M.jsx)(`span`,{className:`inspect-label`,children:`Scope configured`}),(0,M.jsx)(`span`,{className:`inspect-value`,children:e.scopeConfigured?`Yes`:`No`})]}),(0,M.jsxs)(`div`,{className:`inspect-row`,children:[(0,M.jsx)(`span`,{className:`inspect-label`,children:`Local scope`}),(0,M.jsx)(`span`,{className:`inspect-value`,children:e.localScopeConfigured?`Yes`:`No`})]})]})]})}function am({events:e}){let t=(0,T.useMemo)(()=>{let t=e.filter(e=>e.type===`usage`);return t[t.length-1]?.usage??null},[e]),n=(0,T.useMemo)(()=>{let t=e.filter(e=>e.type===`turn-complete`);return t[t.length-1]?.budget??null},[e]),r=(0,T.useMemo)(()=>e.filter(e=>e.type===`user`).length,[e]),i=(0,T.useMemo)(()=>e.filter(e=>e.type===`tool-start`).length,[e]),a=t,o=n;return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`inspect-section`,children:[(0,M.jsx)(`div`,{className:`inspect-section-title`,children:`Turns`}),(0,M.jsxs)(`div`,{className:`inspect-row`,children:[(0,M.jsx)(`span`,{className:`inspect-label`,children:`Messages`}),(0,M.jsx)(`span`,{className:`inspect-value`,children:r})]}),(0,M.jsxs)(`div`,{className:`inspect-row`,children:[(0,M.jsx)(`span`,{className:`inspect-label`,children:`Tool calls`}),(0,M.jsx)(`span`,{className:`inspect-value`,children:i})]})]}),a&&(0,M.jsxs)(`div`,{className:`inspect-section`,children:[(0,M.jsx)(`div`,{className:`inspect-section-title`,children:`Usage (Last Turn)`}),(0,M.jsxs)(`div`,{className:`inspect-row`,children:[(0,M.jsx)(`span`,{className:`inspect-label`,children:`Input tokens`}),(0,M.jsx)(`span`,{className:`inspect-value`,children:a.inputTokens.toLocaleString()})]}),(0,M.jsxs)(`div`,{className:`inspect-row`,children:[(0,M.jsx)(`span`,{className:`inspect-label`,children:`Output tokens`}),(0,M.jsx)(`span`,{className:`inspect-value`,children:a.outputTokens.toLocaleString()})]}),(0,M.jsxs)(`div`,{className:`inspect-row`,children:[(0,M.jsx)(`span`,{className:`inspect-label`,children:`Iterations`}),(0,M.jsxs)(`span`,{className:`inspect-value`,children:[a.iterations,` / `,a.maxToolIterations]})]}),(0,M.jsxs)(`div`,{className:`inspect-row`,children:[(0,M.jsx)(`span`,{className:`inspect-label`,children:`Token budget`}),(0,M.jsxs)(`span`,{className:`inspect-value`,children:[a.turnTokensUsed.toLocaleString(),` /`,` `,a.turnTokenBudget.toLocaleString()]})]}),(0,M.jsx)(`div`,{className:`inspect-bar`,children:(0,M.jsx)(`div`,{className:`inspect-bar-fill`,style:{width:`${Math.min(100,a.turnTokensUsed/Math.max(1,a.turnTokenBudget)*100)}%`}})})]}),o&&(0,M.jsxs)(`div`,{className:`inspect-section`,children:[(0,M.jsx)(`div`,{className:`inspect-section-title`,children:`Budget`}),(0,M.jsxs)(`div`,{className:`inspect-row`,children:[(0,M.jsx)(`span`,{className:`inspect-label`,children:`Tokens`}),(0,M.jsxs)(`span`,{className:`inspect-value`,children:[o.tokensUsed.toLocaleString(),` /`,` `,o.tokenBudget.toLocaleString()]})]}),(0,M.jsx)(`div`,{className:`inspect-bar`,children:(0,M.jsx)(`div`,{className:`inspect-bar-fill`,style:{width:`${Math.min(100,o.tokensUsed/Math.max(1,o.tokenBudget)*100)}%`}})}),(0,M.jsxs)(`div`,{className:`inspect-row`,children:[(0,M.jsx)(`span`,{className:`inspect-label`,children:`Iterations`}),(0,M.jsxs)(`span`,{className:`inspect-value`,children:[o.iterations,` / `,o.maxToolIterations]})]})]}),!a&&!o&&(0,M.jsx)(`div`,{style:{fontSize:12,color:`var(--muted)`,textAlign:`center`,padding:20},children:`No activity yet`})]})}function om({events:e}){let t=(0,T.useMemo)(()=>e.filter(e=>e.type===`tool-result`),[e]);return t.length===0?(0,M.jsx)(`div`,{style:{fontSize:12,color:`var(--muted)`,textAlign:`center`,padding:20},children:`No tool results yet`}):(0,M.jsxs)(`div`,{className:`inspect-section`,children:[(0,M.jsxs)(`div`,{className:`inspect-section-title`,children:[`Tool Results (`,t.length,`)`]}),(0,M.jsx)(`div`,{className:`evidence-list`,children:t.map((e,t)=>{let n=e.result,r=typeof n==`string`?n.slice(0,120):JSON.stringify(n).slice(0,120),i=e.call;return(0,M.jsxs)(`div`,{className:`evidence-item`,children:[(0,M.jsx)(`span`,{className:`ev-tool-name`,children:i.name}),(0,M.jsx)(`div`,{className:`ev-preview`,children:r})]},t)})})]})}function sm({workspace:e,onClose:t}){let[n,r]=(0,T.useState)(`context`),i=e.activeSession;return i?(0,M.jsxs)(`div`,{className:`inspector`,children:[(0,M.jsxs)(`div`,{className:`inspector-header`,children:[(0,M.jsx)(`h3`,{children:`Inspector`}),(0,M.jsx)(`button`,{className:`close-btn`,onClick:t,"aria-label":`Close inspector`,children:(0,M.jsx)(_,{size:14})})]}),(0,M.jsx)(`div`,{className:`inspector-tabs`,children:[`context`,`activity`,`evidence`].map(e=>(0,M.jsx)(`button`,{className:`inspector-tab${n===e?` active`:``}`,onClick:()=>r(e),children:e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,M.jsxs)(`div`,{className:`inspector-content`,children:[n===`context`&&(0,M.jsx)(im,{session:i}),n===`activity`&&(0,M.jsx)(am,{events:e.events}),n===`evidence`&&(0,M.jsx)(om,{events:e.events})]})]}):(0,M.jsxs)(`div`,{className:`inspector`,children:[(0,M.jsxs)(`div`,{className:`inspector-header`,children:[(0,M.jsx)(`h3`,{children:`Inspector`}),(0,M.jsx)(`button`,{className:`close-btn`,onClick:t,"aria-label":`Close inspector`,children:(0,M.jsx)(_,{size:14})})]}),(0,M.jsx)(`div`,{style:{fontSize:12,color:`var(--muted)`,textAlign:`center`,padding:24},children:`No active session`})]})}var $=`___home___`,cm=window.osecDesktop?.platform===`darwin`||/Mac/i.test(navigator.platform),lm=cm?`⌘`:`Ctrl+`,um=[`discovery`,`attack`,`verify`,`report`,`audit`,`review`],dm=[`standard`,`recon`,`copilot`,`yolo`],fm=(e,t)=>t[e.id]||e.target||`New session`,pm=e=>e.replace(/\/$/,``).split(/[\\/]/).at(-1)||e;function mm(){let e=ni(),[t,n]=Zr(`0sec:theme`,`system`),[r,i]=Zr(`0sec:tabs`,[$]),[a,o]=Zr(`0sec:active-tab`,$),[s,c]=Zr(`0sec:sidebar`,!0),[l,u]=Zr(`0sec:projects`,[]),[d,f]=(0,T.useState)(!1),[p,m]=(0,T.useState)(null),[h,g]=(0,T.useState)(!1),[v,y]=(0,T.useState)(!1),[b,x]=(0,T.useState)(null),[C,E]=(0,T.useState)(``),[D,O]=(0,T.useState)(null),k=e.sessions.find(e=>e.id===a)??null,ee=e.selectSession;(0,T.useEffect)(()=>{let e=matchMedia(`(prefers-color-scheme: dark)`),n=()=>{document.documentElement.dataset.theme=t===`system`?e.matches?`dark`:`light`:t};return n(),e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)},[t]),(0,T.useEffect)(()=>{if(e.loading)return;let t=new Set(e.sessions.map(e=>e.id));i(e=>{let n=[$,...e.filter(e=>e!==$&&t.has(e))];return n.length===e.length&&n.every((t,n)=>t===e[n])?e:n}),a!==$&&!t.has(a)&&o($)},[e.loading,e.sessions,a,i,o]),(0,T.useEffect)(()=>{k&&e.activeId!==a&&ee(a)},[k,a,e.activeId,ee]);let te=(0,T.useCallback)(e=>{i(t=>t.includes(e)?t:[...t,e]),o(e),ee(e)},[i,o,ee]),A=(0,T.useCallback)(e=>{e===$?o($):te(e)},[te,o]),re=e=>{e!==$&&(i(t=>t.filter(t=>t!==e)),a===e&&o($))},oe=e=>{e&&u(t=>t.some(t=>t.target===e)?t:[...t,{target:e,name:pm(e)}])},se=(0,T.useCallback)(async()=>{if(y(!1),!window.osecDesktop){m(``);return}try{let e=await window.osecDesktop.chooseDirectory();e&&m(e)}catch(e){x(String(e))}},[]),ce=async t=>{let n=await e.createSession(t);return n?(oe(t.target??``),te(n),m(null),!0):!1};(0,T.useEffect)(()=>{let e=e=>{if(e.defaultPrevented||e.isComposing)return;let t=cm?e.metaKey:e.ctrlKey,n=e.key.toLowerCase();if(t&&n===`k`){e.preventDefault(),y(e=>!e);return}if(t&&e.shiftKey&&n===`h`){e.preventDefault(),o($);return}if(e.ctrlKey&&n===`tab`){e.preventDefault();let t=(r.indexOf(a)+(e.shiftKey?-1:1)+r.length)%r.length;A(r[t]??$);return}!t||window.osecDesktop||(n===`n`&&(e.preventDefault(),m(``)),n===`o`&&(e.preventDefault(),se()),n===`b`&&(e.preventDefault(),c(e=>!e)),n===`,`&&(e.preventDefault(),g(!0)))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r,a,A,o,c,se]),(0,T.useEffect)(()=>window.osecDesktop?.onCommand(e=>{e===`new-thread`&&m(``),e===`open-folder`&&se(),e===`toggle-sidebar`&&c(e=>!e),e===`settings`&&g(!0)}),[se,c]);let fe=(0,T.useMemo)(()=>{let t=new Map(l.filter(e=>typeof e.target==`string`).map(e=>[e.target,e]));for(let n of e.sessions)n.target&&!t.has(n.target)&&t.set(n.target,{target:n.target,name:pm(n.target)});return[...t.values()]},[l,e.sessions]),pe=e.sessions.filter(t=>(!D||t.target===D)&&`${fm(t,e.titles)} ${t.target} ${t.role}`.toLowerCase().includes(C.toLowerCase())),me=b||e.error;return(0,M.jsxs)(`div`,{className:`app-shell`,children:[(0,M.jsx)(`div`,{className:`titlebar${cm?` macos`:``}`,children:(0,M.jsx)(`span`,{className:`titlebar-title`,children:`0sec`})}),me&&(0,M.jsxs)(`div`,{className:`error-banner`,role:`alert`,children:[(0,M.jsx)(`span`,{className:`error-banner-text`,children:me}),(0,M.jsx)(`button`,{className:`btn btn-sm`,onClick:()=>{x(null),e.clearError()},children:`Dismiss`})]}),(0,M.jsxs)(`div`,{className:`tab-bar`,role:`tablist`,"aria-label":`Workspace tabs`,children:[r.map((t,n)=>{let i=e.sessions.find(e=>e.id===t),o=t===$?`Home`:i?fm(i,e.titles):`Session`;return(0,M.jsxs)(`div`,{className:`tab${a===t?` active`:``}`,children:[(0,M.jsxs)(`button`,{role:`tab`,"aria-selected":a===t,tabIndex:a===t?0:-1,onClick:()=>A(t),onKeyDown:e=>{if(e.key===`ArrowLeft`||e.key===`ArrowRight`){e.preventDefault();let t=(n+(e.key===`ArrowLeft`?-1:1)+r.length)%r.length;A(r[t]),e.currentTarget.closest(`[role="tablist"]`)?.querySelectorAll(`[role="tab"]`)[t]?.focus()}e.key===`Delete`&&t!==$&&re(t)},children:[t===$?(0,M.jsx)(ie,{size:13}):(0,M.jsx)(S,{size:13}),(0,M.jsx)(`span`,{children:o})]}),t!==$&&(0,M.jsx)(`button`,{className:`tab-close`,"aria-label":`Close ${o}`,onClick:()=>re(t),children:(0,M.jsx)(_,{size:12})})]},t)}),(0,M.jsx)(`button`,{className:`new-tab-btn`,"aria-label":`New session`,onClick:()=>m(``),children:(0,M.jsx)(ue,{size:15})}),(0,M.jsxs)(`div`,{className:`workspace-toolbar`,children:[(0,M.jsx)(`button`,{className:`session-header-btn`,"aria-label":`Toggle sidebar`,"aria-pressed":s,onClick:()=>c(e=>!e),children:(0,M.jsx)(le,{size:15})}),(0,M.jsx)(`button`,{className:`session-header-btn`,"aria-label":`Command palette`,onClick:()=>y(!0),children:(0,M.jsx)(w,{size:15})}),(0,M.jsx)(`button`,{className:`session-header-btn`,"aria-label":`Settings`,onClick:()=>g(!0),children:(0,M.jsx)(de,{size:15})})]})]}),(0,M.jsxs)(`div`,{className:`workspace`,children:[s&&(0,M.jsxs)(`aside`,{className:`session-sidebar`,children:[(0,M.jsxs)(`div`,{className:`sidebar-header`,children:[(0,M.jsx)(`h3`,{children:`Projects`}),(0,M.jsx)(`button`,{className:`session-header-btn`,"aria-label":`Add project`,onClick:()=>m(``),children:(0,M.jsx)(ue,{size:14})})]}),(0,M.jsxs)(`div`,{className:`sidebar-scroll`,children:[(0,M.jsxs)(`button`,{className:`target-item${D===null?` active`:``}`,onClick:()=>O(null),children:[(0,M.jsx)(ie,{size:13}),`All sessions`]}),fe.map(e=>(0,M.jsxs)(`button`,{className:`target-item${D===e.target?` active`:``}`,title:e.target,onClick:()=>{O(e.target),o($)},children:[(0,M.jsx)(ne,{size:13}),(0,M.jsx)(`span`,{className:`session-label`,children:e.name})]},e.target)),(0,M.jsxs)(`div`,{className:`sidebar-header`,children:[(0,M.jsx)(`h3`,{children:`Sessions`}),(0,M.jsx)(`button`,{className:`session-header-btn`,"aria-label":`New session in project`,onClick:()=>m(D??``),children:(0,M.jsx)(ue,{size:14})})]}),(0,M.jsx)(`div`,{className:`sidebar-filter`,children:(0,M.jsx)(`input`,{"aria-label":`Filter sessions`,placeholder:`Filter sessions…`,value:C,onChange:e=>E(e.target.value)})}),(t=>t.map(t=>(0,M.jsxs)(`button`,{className:`target-item${a===t.id?` active`:``}`,onClick:()=>te(t.id),"aria-current":a===t.id?`page`:void 0,children:[(0,M.jsx)(`span`,{className:`target-status ${t.status}`,title:t.status}),(0,M.jsx)(`span`,{className:`session-label`,children:fm(t,e.titles)})]},t.id)))(pe),!pe.length&&(0,M.jsx)(`p`,{className:`sidebar-empty`,children:e.loading?`Loading sessions…`:`No sessions`})]}),(0,M.jsxs)(`a`,{className:`sidebar-operations`,href:`/operations`,children:[(0,M.jsx)(ae,{size:14}),`Operations`]})]}),k?(0,M.jsxs)(`div`,{className:`session-content`,children:[(0,M.jsxs)(`div`,{className:`session-main`,children:[(0,M.jsx)(gm,{title:fm(k,e.titles),status:k.status,onRename:t=>e.renameSession(k.id,t),inspector:d,onInspect:()=>f(e=>!e)},`header-${k.id}`),e.activeId===a?(0,M.jsx)(rm,{workspace:e,onSettings:()=>g(!0),onNewSession:()=>m(D??``),onInspect:()=>f(!0)},a):(0,M.jsx)(`div`,{className:`loading-shell`,children:`Loading session…`})]}),d&&e.activeId===a&&(0,M.jsx)(`div`,{className:`inspector-panel`,children:(0,M.jsx)(sm,{workspace:e,onClose:()=>f(!1)})})]}):(0,M.jsx)(`main`,{className:`home-page`,children:(0,M.jsxs)(`div`,{className:`home-main`,children:[(0,M.jsx)(`h1`,{className:`home-greeting`,children:D?pm(D):`What are we working on?`}),(0,M.jsx)(`p`,{className:`home-subtitle`,children:D||`A local workspace for security research. Your CLI runs the engine.`}),(0,M.jsxs)(`div`,{className:`home-actions`,children:[(0,M.jsxs)(`button`,{className:`btn btn-primary`,onClick:()=>m(D??``),children:[(0,M.jsx)(ue,{size:14}),`New session`]}),(0,M.jsxs)(`button`,{className:`btn`,onClick:()=>void se(),children:[(0,M.jsx)(j,{size:14}),window.osecDesktop?`Open folder`:`Choose target`]})]}),(0,M.jsx)(`div`,{className:`home-section-title`,children:C?`Matching sessions`:`Recent sessions`}),(0,M.jsx)(`div`,{className:`home-recent-list`,children:pe.map(t=>(0,M.jsx)(`button`,{className:`home-recent-item`,onClick:()=>te(t.id),children:(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`recent-title`,children:fm(t,e.titles)}),(0,M.jsxs)(`div`,{className:`recent-meta`,children:[t.role,` · `,t.autonomyMode,` ·`,` `,new Date(t.updatedAt).toLocaleDateString()]})]})},t.id))}),!pe.length&&(0,M.jsxs)(`div`,{className:`empty-state`,children:[(0,M.jsx)(S,{size:28}),(0,M.jsx)(`h2`,{children:e.loading?`Loading workspace…`:C?`No matching sessions`:`Start with a conversation`}),(0,M.jsx)(`p`,{children:`Choose a project, or start an unscoped session. Targets and tool permissions remain explicit.`})]})]})})]}),p!==null&&(0,M.jsx)(_m,{initialTarget:p,onClose:()=>m(null),onCreate:ce,error:e.error}),h&&(0,M.jsx)(vm,{theme:t,onTheme:n,workspace:e,onClose:()=>g(!1)}),v&&(0,M.jsx)(hm,{title:`Command palette`,className:`cmdk-dialog`,onClose:()=>y(!1),children:(0,M.jsxs)(et,{label:`Command palette`,children:[(0,M.jsx)(et.Input,{autoFocus:!0,className:`cmdk-input`,placeholder:`Search actions and sessions…`}),(0,M.jsxs)(et.List,{className:`cmdk-list`,children:[(0,M.jsx)(et.Empty,{children:`No results`}),(0,M.jsx)(et.Group,{heading:`Actions`,children:[[`New session`,()=>m(D??``)],[`Open folder`,()=>void se()],[`Toggle sidebar`,()=>c(e=>!e)],[`Settings`,()=>g(!0)],[`Go to Home`,()=>o($)]].map(([e,t])=>(0,M.jsx)(et.Item,{className:`cmdk-item`,onSelect:()=>{y(!1),t()},children:String(e)},String(e)))}),(0,M.jsx)(et.Group,{heading:`Sessions`,children:e.sessions.map(t=>(0,M.jsx)(et.Item,{value:`${t.id} ${fm(t,e.titles)}`,className:`cmdk-item`,onSelect:()=>{y(!1),te(t.id)},children:fm(t,e.titles)},t.id))})]})]})})]})}function hm({title:e,children:t,onClose:n,busy:r=!1,className:i=``}){return(0,M.jsx)(y,{open:!0,onOpenChange:e=>{!e&&!r&&n()},children:(0,M.jsxs)(h,{children:[(0,M.jsx)(g,{className:`dialog-overlay`}),(0,M.jsxs)(v,{className:`dialog-content ${i}`,"aria-describedby":void 0,onOpenAutoFocus:e=>{let t=e.target.querySelector(`input`);t&&(e.preventDefault(),t.focus())},onEscapeKeyDown:e=>{r&&e.preventDefault()},onPointerDownOutside:e=>{r&&e.preventDefault()},children:[(0,M.jsxs)(`div`,{className:`dialog-header`,children:[(0,M.jsx)(b,{children:e}),(0,M.jsx)(x,{asChild:!0,children:(0,M.jsx)(`button`,{className:`dialog-close`,disabled:r,"aria-label":`Close dialog`,children:(0,M.jsx)(_,{size:16})})})]}),t]})]})})}function gm({title:e,status:t,inspector:n,onRename:r,onInspect:i}){let[a,o]=(0,T.useState)(!1),[s,c]=(0,T.useState)(e),l=(0,T.useRef)(!1);return(0,M.jsxs)(`div`,{className:`session-header`,children:[(0,M.jsxs)(`div`,{className:`session-title-area`,children:[(0,M.jsx)(`span`,{className:`session-status-dot ${t}`}),a?(0,M.jsx)(`input`,{autoFocus:!0,className:`session-title-input`,"aria-label":`Session title`,value:s,onChange:e=>c(e.target.value),onBlur:()=>{o(!1),!l.current&&s.trim()&&s.trim()!==e&&r(s.trim())},onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur(),e.key===`Escape`&&(l.current=!0,o(!1))}}):(0,M.jsx)(`button`,{className:`session-title-input`,title:`Rename session`,onClick:()=>{l.current=!1,c(e),o(!0)},children:e})]}),(0,M.jsx)(`div`,{className:`session-header-actions`,children:(0,M.jsx)(`button`,{className:`session-header-btn`,"aria-label":`Toggle inspector`,"aria-pressed":n,onClick:i,children:(0,M.jsx)(ae,{size:15})})})]})}function _m({initialTarget:e,onClose:t,onCreate:n,error:r}){let[i,a]=(0,T.useState)(e),[o,s]=(0,T.useState)(`audit`),[c,l]=(0,T.useState)(Ir),[u,d]=(0,T.useState)(!1),[f,p]=(0,T.useState)(!1),m=(0,T.useRef)(!1),[h,g]=(0,T.useState)(null),_=async(e=!1)=>{if(!(m.current||!e&&c===`yolo`&&!u)){m.current=!0,p(!0);try{await n(e?{role:`audit`,autonomyMode:Ir}:{target:i.trim()||void 0,role:o,autonomyMode:c})}finally{m.current=!1,p(!1)}}},v=async()=>{if(!(!window.osecDesktop||m.current)){m.current=!0,p(!0);try{let e=await window.osecDesktop.chooseDirectory();e&&a(e)}catch(e){g(String(e))}finally{m.current=!1,p(!1)}}};return(0,M.jsx)(hm,{title:`New session`,onClose:t,busy:f,children:(0,M.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),_()},children:[(0,M.jsxs)(`div`,{className:`dialog-body`,children:[(h||r)&&(0,M.jsx)(`p`,{role:`alert`,className:`form-warning`,children:h||r}),(0,M.jsxs)(`div`,{className:`form-group`,children:[(0,M.jsx)(`label`,{className:`form-label`,htmlFor:`session-target`,children:`Target`}),(0,M.jsxs)(`div`,{className:`input-with-action`,children:[(0,M.jsx)(`input`,{id:`session-target`,className:`form-input`,placeholder:`URL or local path (optional)`,value:i,disabled:f,onChange:e=>a(e.target.value)}),window.osecDesktop&&(0,M.jsxs)(`button`,{className:`btn btn-sm`,type:`button`,disabled:f,onClick:()=>void v(),children:[(0,M.jsx)(j,{size:13}),`Browse`]})]}),(0,M.jsx)(`p`,{className:`form-hint`,children:`Selecting a target is not an authorization grant. The engine still applies scope and tool policy.`})]}),(0,M.jsxs)(`div`,{className:`form-group`,children:[(0,M.jsx)(`label`,{className:`form-label`,htmlFor:`session-role`,children:`Role`}),(0,M.jsx)(`select`,{id:`session-role`,className:`form-select`,value:o,disabled:f,onChange:e=>s(e.target.value),children:um.map(e=>(0,M.jsx)(`option`,{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),(0,M.jsxs)(`div`,{className:`form-group`,children:[(0,M.jsx)(`label`,{className:`form-label`,htmlFor:`session-mode`,children:`Autonomy`}),(0,M.jsx)(`select`,{id:`session-mode`,className:`form-select`,value:c,disabled:f,onChange:e=>{l(e.target.value),d(!1)},children:dm.map(e=>(0,M.jsx)(`option`,{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),c===`yolo`&&(0,M.jsxs)(`label`,{className:`form-warning`,children:[(0,M.jsx)(`input`,{type:`checkbox`,checked:u,disabled:f,onChange:e=>d(e.target.checked)}),` `,`I understand that YOLO removes normal approval prompts. Use only with explicitly authorized targets.`]})]}),(0,M.jsxs)(`div`,{className:`dialog-footer`,children:[(0,M.jsx)(`button`,{type:`button`,className:`btn btn-ghost`,disabled:f,onClick:()=>void _(!0),children:`Unscoped chat`}),(0,M.jsx)(`button`,{type:`submit`,className:`btn btn-primary`,disabled:f||c===`yolo`&&!u,children:f?`Opening…`:`Start session`})]})]})})}function vm({theme:e,onTheme:t,workspace:n,onClose:r}){let[i,a]=(0,T.useState)(`appearance`),[o,s]=(0,T.useState)(null),{auth:c}=n,l=[...new Set((c?.lines.join(`
|
|
31
|
-
`).match(/https:\/\/[^\s<>]+/g)??[]).map(e=>e.replace(/[),.;]+$/,``)))].filter(e=>{try{let t=new URL(e);return!t.username&&!t.password}catch{return!1}}),u=async e=>{try{await window.osecDesktop?.openExternal(e)}catch(e){s(String(e))}};return(0,M.jsxs)(hm,{title:`Settings`,onClose:r,className:`settings-dialog`,children:[(0,M.jsx)(`nav`,{className:`settings-tabs`,"aria-label":`Settings sections`,children:[`appearance`,`connection`,`shortcuts`].map(e=>(0,M.jsx)(`button`,{className:`settings-tab${i===e?` active`:``}`,"aria-pressed":i===e,onClick:()=>a(e),children:e.charAt(0).toUpperCase()+e.slice(1)},e))}),(0,M.jsxs)(`div`,{className:`dialog-body`,children:[i===`appearance`&&(0,M.jsxs)(`div`,{className:`settings-row`,children:[(0,M.jsxs)(`div`,{className:`settings-row-info`,children:[(0,M.jsx)(`div`,{className:`settings-row-label`,children:`Appearance`}),(0,M.jsx)(`p`,{className:`settings-row-desc`,children:`Follow your system, or choose a theme.`})]}),(0,M.jsx)(`div`,{className:`theme-options`,children:[`light`,`dark`,`system`].map(n=>(0,M.jsxs)(`button`,{className:`theme-option${e===n?` active`:``}`,"aria-pressed":e===n,onClick:()=>t(n),children:[n===`light`?(0,M.jsx)(me,{size:14}):n===`dark`?(0,M.jsx)(se,{size:14}):(0,M.jsx)(oe,{size:14}),n.charAt(0).toUpperCase()+n.slice(1)]},n))})]}),i===`connection`&&(0,M.jsxs)(`div`,{className:`settings-section`,children:[(0,M.jsx)(`div`,{className:`settings-row-label`,children:`OpenAI Codex`}),(0,M.jsx)(`p`,{className:`settings-row-desc`,children:`Sign in to OpenAI through the local CLI. This is provider authentication, not 0cloud.`}),(0,M.jsx)(`p`,{role:`status`,children:c?.message||`Checking provider connection…`}),c?.lines.length?(0,M.jsx)(`pre`,{className:`auth-output`,children:c.lines.join(`
|
|
32
|
-
`)}):null,l.map(e=>(0,M.jsxs)(`a`,{className:`btn btn-sm`,href:e,target:`_blank`,rel:`noreferrer`,onClick:t=>{window.osecDesktop&&(t.preventDefault(),u(e))},children:[(0,M.jsx)(te,{size:13}),`Open verification page`]},e)),o&&(0,M.jsx)(`p`,{role:`alert`,children:o}),n.error&&(0,M.jsx)(`p`,{role:`alert`,children:n.error}),(0,M.jsx)(`div`,{className:`dialog-footer`,children:c?.phase===`running`?(0,M.jsx)(`button`,{className:`btn`,disabled:n.busy,onClick:()=>void n.cancelCodex(),children:`Cancel sign-in`}):c?.phase===`connected`?(0,M.jsx)(`span`,{children:`Connected`}):(0,M.jsx)(`button`,{className:`btn btn-primary`,disabled:n.busy,onClick:()=>void n.connectCodex(),children:`Sign in to Codex`})}),(0,M.jsxs)(`p`,{className:`form-hint`,children:[`Other providers and model selection use the CLI configuration. Run`,` `,(0,M.jsx)(`code`,{children:`0sec console`}),` and use its provider controls. Quitting the desktop ends its live sidecar sessions; UI preferences are retained.`]})]}),i===`shortcuts`&&(0,M.jsx)(`div`,{className:`shortcuts-list`,children:[[`Command palette`,`${lm}K`],[`New session`,`${lm}N`],[`Open folder`,`${lm}O`],[`Toggle sidebar`,`${lm}B`],[`Settings`,`${lm},`],[`Next / previous tab`,`Ctrl+Tab / Ctrl+Shift+Tab`],[`Home`,`${lm}Shift+H`],[`Send / newline`,`Enter / Shift+Enter`]].map(([e,t])=>(0,M.jsxs)(`div`,{className:`shortcut-row`,children:[(0,M.jsx)(`span`,{children:e}),(0,M.jsx)(`kbd`,{children:t})]},e))})]})]})}var ym=class extends T.Component{state={error:null};static getDerivedStateFromError(e){return{error:e instanceof Error?e.message:String(e)}}render(){return this.state.error?(0,M.jsxs)(`main`,{className:`startup-error`,role:`alert`,children:[(0,M.jsx)(`h1`,{children:`Unable to open your workspace`}),(0,M.jsx)(`p`,{children:this.state.error}),(0,M.jsx)(`button`,{onClick:()=>window.location.reload(),children:`Reload workspace`})]}):this.props.children}},bm=(0,E.createRoot)(document.getElementById(`root`));async function xm(){try{if(window.osecDesktop){let e=await window.osecDesktop.getPreferences();for(let[t,n]of Object.entries(e))t.startsWith(`0sec:`)&&localStorage.setItem(t,JSON.stringify(n))}bm.render((0,M.jsx)(T.StrictMode,{children:(0,M.jsx)(ym,{children:(0,M.jsx)(mm,{})})}))}catch(e){bm.render((0,M.jsxs)(`main`,{className:`startup-error`,role:`alert`,children:[(0,M.jsx)(`h1`,{children:`Unable to load your workspace`}),(0,M.jsx)(`p`,{children:e instanceof Error?e.message:String(e)}),(0,M.jsx)(`button`,{onClick:()=>void xm(),children:`Try again`})]}))}}xm();
|