@inkeep/open-knowledge 0.49.0-beta.2 → 0.49.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD_PARTY_NOTICES.md +65 -0
- package/dist/{acp-harness-probe-ziMiy7xh.mjs → acp-harness-probe-DxBf-LTU.mjs} +2 -2
- package/dist/assets/skills/packs/codebase-wiki/SKILL.md +1 -1
- package/dist/assets/skills/packs/entity-vault/SKILL.md +2 -2
- package/dist/assets/skills/packs/knowledge-base/SKILL.md +6 -6
- package/dist/assets/skills/packs/knowledge-base/consolidate/SKILL.md +2 -2
- package/dist/assets/skills/packs/knowledge-base/research/SKILL.md +5 -5
- package/dist/assets/skills/packs/okf/SKILL.md +1 -1
- package/dist/assets/skills/packs/plain-notes/SKILL.md +1 -1
- package/dist/assets/skills/packs/software-lifecycle/SKILL.md +6 -6
- package/dist/assets/skills/packs/software-lifecycle/frame-a-proposal/SKILL.md +3 -3
- package/dist/assets/skills/packs/software-lifecycle/record-a-decision/SKILL.md +7 -7
- package/dist/assets/skills/packs/software-lifecycle/review-a-design/SKILL.md +4 -4
- package/dist/assets/skills/packs/software-lifecycle/write-a-postmortem/SKILL.md +2 -2
- package/dist/assets/skills/packs/software-lifecycle/write-a-spec/SKILL.md +5 -5
- package/dist/assets/skills/packs/worldbuilding/SKILL.md +1 -1
- package/dist/assets/skills/packs/writing-pipeline/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +3 -3
- package/dist/assets/skills/project/references/starter-packs.md +1 -1
- package/dist/cli.mjs +31 -31
- package/dist/config-schema.json +38 -0
- package/dist/config.user.schema.json +38 -0
- package/dist/constants-C_nRJliJ.mjs +2 -0
- package/dist/{fs-traced-Cq61rC8q.mjs → fs-traced-By5aY-RE.mjs} +2 -2
- package/dist/fs-traced-CkLhqsEn.mjs +1 -0
- package/dist/git-handle-BOyHOuUW.mjs +1 -0
- package/dist/{git-handle-DyGrpFVy.mjs → git-handle-CxyKwEl2.mjs} +2 -2
- package/dist/index.d.mts +17 -0
- package/dist/index.mjs +1 -1
- package/dist/init-DX85IP2w.mjs +1 -0
- package/dist/{init-CrBI6vIT.mjs → init-uGxYY6UM.mjs} +17 -17
- package/dist/{launch-json-removal-BiYW3EuW.mjs → launch-json-removal-Dhdwq5FP.mjs} +2 -2
- package/dist/loader-CENRqebF.mjs +1 -0
- package/dist/{loader-CPPSnf2M.mjs → loader-CNksYhN0.mjs} +2 -2
- package/dist/md-manager-CK3MY8qo.mjs +2 -0
- package/dist/{open-browser-gBhxldMU.mjs → open-browser-WfQL3wzU.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-Bk5wWu5b.mjs → preview-BZSyDCZ1.mjs} +2 -2
- package/dist/preview-BuphBmlc.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-C3nXNwXU.js → ActivityModeContent-Dfn7Nlez.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-88NqxyAN.js → AgentDiffPane-CyHhN5YO.js} +2 -2
- package/dist/public/assets/{AgentThreadClientBinder-DNvb1Kvi.js → AgentThreadClientBinder-Dg7kpSW2.js} +1 -1
- package/dist/public/assets/{AppMenubar-_6okky_d.js → AppMenubar-DgbuW3Mn.js} +1 -1
- package/dist/public/assets/BugReportHistory-CF0synre.js +1 -0
- package/dist/public/assets/{BugReportHistoryDialog-DgM3N4RP.js → BugReportHistoryDialog-RyYP9c6e.js} +1 -1
- package/dist/public/assets/ChangedOutsideBadge-DqZ2TDGM.js +1 -0
- package/dist/public/assets/CodeMirrorPropInput-DgV9gATY.js +3 -0
- package/dist/public/assets/{ConfigSharingInfoTooltip-BhNgrS2h.js → ConfigSharingInfoTooltip-C34Mqu2n.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-CAqiYyjs.js → ConsentDialogBody-D2cqdMrg.js} +1 -1
- package/dist/public/assets/{CopyButton-DfXJBl0I.js → CopyButton-DysciFW5.js} +1 -1
- package/dist/public/assets/{DiffView-Bc5gwnAV.js → DiffView-vtrGUscK.js} +1 -1
- package/dist/public/assets/DocumentContext-BVLbIfH2.js +38 -0
- package/dist/public/assets/{EditorModeToggle-hNtfjPSO.js → EditorModeToggle-CtE8ZJiD.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-D6R1KFya.js → EnableSyncConfirmDialog-_hiHVbZX.js} +1 -1
- package/dist/public/assets/FeedbackForm-GmlPVpar.js +1 -0
- package/dist/public/assets/{GraphPanel-CD7b7bEO.js → GraphPanel-Duz6DAfx.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-Boio2l_W.js → ImportSkillDialog-8uZq0fE4.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-CVU6CMtT.js → LintConfigEditor-DlBcCkCe.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-BC3be05i.js +1 -0
- package/dist/public/assets/ManagedArtifactProperties-eSS8gOcB.js +2 -0
- package/dist/public/assets/{McpConsentDialogBody-BCWXnE1x.js → McpConsentDialogBody-DH2Kth2j.js} +1 -1
- package/dist/public/assets/{Mermaid-DT9lZOmy.js → Mermaid-EN9ImzAU.js} +2 -2
- package/dist/public/assets/{MermaidDocEditor-BA7XEwxt.js → MermaidDocEditor-iAjxxs_n.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-CSZXCqwG.js → RegisteredAgentIcon-B0CO1bW-.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-UQSprqDe.js → ReportBugDialogBody-DfM9Liz9.js} +1 -1
- package/dist/public/assets/SchemaConfigEditor-CDNOEozy.js +1 -0
- package/dist/public/assets/SessionsHost-BVng_fwc.js +2 -0
- package/dist/public/assets/SettingsDialogBody-CCdFxE-F.js +12 -0
- package/dist/public/assets/{ShareBranchSwitchDialog-B8RBBcyE.js → ShareBranchSwitchDialog-BfXB6yAf.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-CWWtfyfF.js → ShareReceiveDialog-DhyJYkDM.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-C5AIXfjD.js → ShareReceiveMissDialog-BWlcptnT.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-9ueqFia8.js → SkillEditBanner-B_rCSPhd.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-BXnRlN9C.js → SkillOriginInline-CayMH5aY.js} +1 -1
- package/dist/public/assets/SkillToolbarControls-CcJo2WHo.js +1 -0
- package/dist/public/assets/SlidesToolbarControls-BLaXC3GF.js +1 -0
- package/dist/public/assets/SourceEditor-CxhxTb3c.js +1 -0
- package/dist/public/assets/TerminalPanel-B2LAcV5N.js +146 -0
- package/dist/public/assets/{TerminalWindowApp-C01zGAL4.js → TerminalWindowApp-DucJDTXJ.js} +1 -1
- package/dist/public/assets/{TextDocEditor-Dy3xqFER.js → TextDocEditor-C1SHIJF2.js} +1 -1
- package/dist/public/assets/ThreadView-RDfDoNg-.js +10 -0
- package/dist/public/assets/{TimelineDiffPane-C0N2AQ-_.js → TimelineDiffPane-BreQDbb5.js} +2 -2
- package/dist/public/assets/{abnfDiagram-VRR7QNED-Df7YgB-u.js → abnfDiagram-VRR7QNED-BT4E4K73.js} +1 -1
- package/dist/public/assets/{agent-diff-store-CjnUWyJv.js → agent-diff-store-D7h8uSqv.js} +1 -1
- package/dist/public/assets/agent-visibility-DUGhAO32.js +1 -0
- package/dist/public/assets/{arc-CVPlXeVn.js → arc-DWS63c4g.js} +1 -1
- package/dist/public/assets/architecture-TIHT7OUA-DKDnEx-J.js +1 -0
- package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-Cid8pwpH.js → architectureDiagram-ZJ3FMSHR-C7ATAQRT.js} +1 -1
- package/dist/public/assets/arrow-up-right-0IN5lFEX.js +1 -0
- package/dist/public/assets/auth-state-cache-DBut4s-H.js +11 -0
- package/dist/public/assets/{blockDiagram-677ZJIJ3-CbwD0mr1.js → blockDiagram-677ZJIJ3-0XzCwsjs.js} +1 -1
- package/dist/public/assets/{braces-PuTG97X6.js → braces-Ytg60O62.js} +1 -1
- package/dist/public/assets/{c4Diagram-LMCZKHZV-CZHW-U3Z.js → c4Diagram-LMCZKHZV-DF_YvBJq.js} +1 -1
- package/dist/public/assets/{calendar-Dze0sDp0.js → calendar-BFaqjDfb.js} +1 -1
- package/dist/public/assets/{case-sensitive-DyF7sIpA.js → case-sensitive-DvBZDISP.js} +1 -1
- package/dist/public/assets/channel-wzRnnGj4.js +1 -0
- package/dist/public/assets/check-BLuQ2zvV.js +1 -0
- package/dist/public/assets/{checkbox-DqQC4GOw.js → checkbox-V0IoPAe3.js} +1 -1
- package/dist/public/assets/{chevron-down-CRb8csep.js → chevron-down-DrpHBSgH.js} +1 -1
- package/dist/public/assets/chevron-left-BUr-yKA4.js +1 -0
- package/dist/public/assets/chevron-right-BU8AeJST.js +1 -0
- package/dist/public/assets/{chevron-up-BZk9M0QL.js → chevron-up-CsH_dTwv.js} +1 -1
- package/dist/public/assets/chunk-2Q5K7J3B-Wikzf0nz.js +1 -0
- package/dist/public/assets/{chunk-32BRIVSS-DT6F-uh7.js → chunk-32BRIVSS-BBQ-hEPd.js} +1 -1
- package/dist/public/assets/{chunk-52WLFC77-z8Dc0FTi.js → chunk-52WLFC77-DuzENKI7.js} +1 -1
- package/dist/public/assets/{chunk-5FCAYU7R-CTroACwQ.js → chunk-5FCAYU7R-D--noBEp.js} +1 -1
- package/dist/public/assets/{chunk-5HE753X5-BiVTlY9X.js → chunk-5HE753X5-BmVsWMWw.js} +1 -1
- package/dist/public/assets/{chunk-5JV3BV7I-D5PSiL8d.js → chunk-5JV3BV7I-BPYqpeB9.js} +1 -1
- package/dist/public/assets/{chunk-5TONJI2A-Bxf6m0R0.js → chunk-5TONJI2A-DltPJUSb.js} +1 -1
- package/dist/public/assets/{chunk-5VM5RSS4-CRkhjuQ5.js → chunk-5VM5RSS4-BfP_UIjE.js} +1 -1
- package/dist/public/assets/{chunk-7BUUIJ7U-CIezx2MS.js → chunk-7BUUIJ7U-CY9HO1D_.js} +1 -1
- package/dist/public/assets/{chunk-BIQX33UG-4vkcoUCs.js → chunk-BIQX33UG-CYDmLpMo.js} +1 -1
- package/dist/public/assets/{chunk-BO2N2NFS-CC8ch_fx.js → chunk-BO2N2NFS-BsdqXBeH.js} +13 -13
- package/dist/public/assets/{chunk-C7G6YPKG-CfSnkt3g.js → chunk-C7G6YPKG-BG-T54dx.js} +1 -1
- package/dist/public/assets/{chunk-CQNSW5MT-DY98Y9zl.js → chunk-CQNSW5MT-B2t29R4y.js} +1 -1
- package/dist/public/assets/{chunk-CYSBUYHQ-BK-vm9jf.js → chunk-CYSBUYHQ-s_ScbNzb.js} +1 -1
- package/dist/public/assets/{chunk-EMLP6XTP-DZw4ZtXy.js → chunk-EMLP6XTP-BNzghYiW.js} +1 -1
- package/dist/public/assets/{chunk-EX3LRPZG-Bk_23Lji.js → chunk-EX3LRPZG-DOXxHijP.js} +1 -1
- package/dist/public/assets/{chunk-FWX5IMBZ-Bcld6_cI.js → chunk-FWX5IMBZ-C-_in5O6.js} +2 -2
- package/dist/public/assets/{chunk-HOUHSVGY-CFg4tiNL.js → chunk-HOUHSVGY-BLbx-9Cm.js} +1 -1
- package/dist/public/assets/{chunk-ICXQ74PX-D2_LgSCG.js → chunk-ICXQ74PX-CT_UjeBu.js} +1 -1
- package/dist/public/assets/{chunk-JG7HCLWE-DvlaYzpW.js → chunk-JG7HCLWE-B0c_hwBR.js} +1 -1
- package/dist/public/assets/{chunk-JWPE2WC7-CLgWJdHV.js → chunk-JWPE2WC7-C89PFunr.js} +1 -1
- package/dist/public/assets/{chunk-MOJQB5TN-ChUfYEEn.js → chunk-MOJQB5TN-3AJz0oxu.js} +1 -1
- package/dist/public/assets/{chunk-MOZMSUNE-BGXPWMly.js → chunk-MOZMSUNE-CfcFCsPH.js} +1 -1
- package/dist/public/assets/{chunk-OGEWGWER-CivbNyHY.js → chunk-OGEWGWER-CFjtHjSl.js} +1 -1
- package/dist/public/assets/{chunk-OSBZ3O6U-DWgnErEt.js → chunk-OSBZ3O6U-C7Q07ixC.js} +1 -1
- package/dist/public/assets/{chunk-PUDLZKDR-B7d6ISYj.js → chunk-PUDLZKDR-BGahXoNe.js} +1 -1
- package/dist/public/assets/{chunk-Q4XR5HBZ-91W5kPi9.js → chunk-Q4XR5HBZ-biPgC2C1.js} +1 -1
- package/dist/public/assets/{chunk-QBLGF6JB-4F2Itui7.js → chunk-QBLGF6JB-Bd2KWVj9.js} +1 -1
- package/dist/public/assets/{chunk-R7FJI6CG-hR8tQLXq.js → chunk-R7FJI6CG-BU13FFbO.js} +1 -1
- package/dist/public/assets/{chunk-RYQCIY6F-DycaSFT5.js → chunk-RYQCIY6F-DGsn_2cw.js} +1 -1
- package/dist/public/assets/{chunk-U6XO7XAA-CHI_dfPQ.js → chunk-U6XO7XAA-DEpEBtwM.js} +1 -1
- package/dist/public/assets/{chunk-V7JOEXUC-Bw7Trikr.js → chunk-V7JOEXUC-DGxur8ZW.js} +1 -1
- package/dist/public/assets/chunk-VAUOI2AC-DpeuLCbu.js +1 -0
- package/dist/public/assets/{chunk-VR4S4FIN-td2s33cT.js → chunk-VR4S4FIN-DOd4oQIX.js} +1 -1
- package/dist/public/assets/{chunk-WYO6CB5R-BL3R8kzV.js → chunk-WYO6CB5R-Dj0234fq.js} +2 -2
- package/dist/public/assets/chunk-XXDRQBXY-CZqAAXUK.js +1 -0
- package/dist/public/assets/{chunk-YOTPTUD7-Cg9yDbvj.js → chunk-YOTPTUD7-C30yZrh0.js} +1 -1
- package/dist/public/assets/{chunk-ZGVPDNZ5-DdQ8WlYq.js → chunk-ZGVPDNZ5-YEqz23C6.js} +1 -1
- package/dist/public/assets/{chunk-ZIRB5QZD-DuiWBTeF.js → chunk-ZIRB5QZD-D_Sq2Pbf.js} +1 -1
- package/dist/public/assets/classDiagram-OUVF2IWQ-jai99ZcL.js +1 -0
- package/dist/public/assets/classDiagram-v2-EOCWNBFH-B6bv8jQ6.js +1 -0
- package/dist/public/assets/client-version-BCNpEu2n.js +1 -0
- package/dist/public/assets/{cm-theme-CUwlOcHl.js → cm-theme-BouxP4zt.js} +1 -1
- package/dist/public/assets/code-highlighter-impl-BYAPyAoO.js +144 -0
- package/dist/public/assets/comment-chips-D31Mefsd.js +5 -0
- package/dist/public/assets/{config-context-3DA5oQRi.js → config-context-D-k7Feh7.js} +1 -1
- package/dist/public/assets/config-provider-BJJQMCvL.js +5 -0
- package/dist/public/assets/{cose-bilkent-JH36ORCC-YCEFr4ip.js → cose-bilkent-JH36ORCC-CE39J3kc.js} +1 -1
- package/dist/public/assets/cynefin-VYW2F7L2-DKtMkKMv.js +1 -0
- package/dist/public/assets/{cynefinDiagram-TSTJHNR4-BRxY_0dy.js → cynefinDiagram-TSTJHNR4-DrYykUwe.js} +1 -1
- package/dist/public/assets/{dagre-4yTvJ5bN.js → dagre-D8D-4Y8L.js} +1 -1
- package/dist/public/assets/{dagre-VKFMJZFB-BTPOxYfv.js → dagre-VKFMJZFB-BBs4IH3J.js} +1 -1
- package/dist/public/assets/{diagram-FQU43EPY-C6lvEDUr.js → diagram-FQU43EPY-B0s2m7E-.js} +1 -1
- package/dist/public/assets/{diagram-G47NLZAW-BHMtTNZp.js → diagram-G47NLZAW-BbP-tBhd.js} +1 -1
- package/dist/public/assets/{diagram-NH7WQ7WH-CaxSgclq.js → diagram-NH7WQ7WH-kp48H_e8.js} +1 -1
- package/dist/public/assets/{diagram-OA4YK3LP-C_1H_cmz.js → diagram-OA4YK3LP-Sh8MTEDH.js} +1 -1
- package/dist/public/assets/{diagram-WEI45ONY-hy5nz4b2.js → diagram-WEI45ONY-CHaTUq63.js} +1 -1
- package/dist/public/assets/{dialog-DwFomKjP.js → dialog-C6agJYxQ.js} +1 -1
- package/dist/public/assets/{dist-CJtNQVui.js → dist-10-BopoT.js} +1 -1
- package/dist/public/assets/{dist-Cz7Q9WAs.js → dist-B5Efgy8u.js} +1 -1
- package/dist/public/assets/{dist-KXQQa8Xt.js → dist-BBHnhLg7.js} +1 -1
- package/dist/public/assets/{dist-BHX9GuTC.js → dist-BLMHNKEA.js} +1 -1
- package/dist/public/assets/{dist-C7PQBily.js → dist-BMhliXXv.js} +1 -1
- package/dist/public/assets/{dist-DdN4_oB-.js → dist-BffqGJEV.js} +1 -1
- package/dist/public/assets/{dist-DgD72kci.js → dist-BzlU6YYd.js} +1 -1
- package/dist/public/assets/{dist-HbUc9U1a.js → dist-CgtlFWkf.js} +1 -1
- package/dist/public/assets/{dist-AhKSYQhE2.js → dist-ChcSYE9s.js} +1 -1
- package/dist/public/assets/{dist-BX-8uxZE.js → dist-DFRu_FnY.js} +1 -1
- package/dist/public/assets/{dist-CdZbZpjt.js → dist-DNKLFEzM.js} +1 -1
- package/dist/public/assets/dist-SMRIgJ7J2.js +579 -0
- package/dist/public/assets/{dist-aEzrjz-4.js → dist-SYn7UuDc.js} +1 -1
- package/dist/public/assets/{dist-CFDOSoEm.js → dist-e-KRYl_U.js} +1 -1
- package/dist/public/assets/{doc-paths-BUecntHC.js → doc-paths--BtzZubq.js} +1 -1
- package/dist/public/assets/{documents-events-KbhMdUCf.js → documents-events-CN6qju_L.js} +1 -1
- package/dist/public/assets/{download-QOlmqXQ8.js → download-Bq4sKAdj.js} +1 -1
- package/dist/public/assets/{dropdown-menu-DRytYgB4.js → dropdown-menu-BhMtMvZp.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-CCIWWBDH-CSOwp-KN.js → ebnfDiagram-CCIWWBDH-C5sFbOCC.js} +1 -1
- package/dist/public/assets/{erDiagram-Q63AITRT-CulC3etm.js → erDiagram-Q63AITRT-IzYkNb6y.js} +1 -1
- package/dist/public/assets/eventmodeling-45OFAUF4-DYp_ccag.js +1 -0
- package/dist/public/assets/{eye-CArKS_Md.js → eye-DYUvwA0Z.js} +1 -1
- package/dist/public/assets/{field-iFofWrdC.js → field-Ds_anNod.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-CqEuXZ5y.js → file-tree-adapter-F3EuvfSm.js} +1 -1
- package/dist/public/assets/{file-tree-utils-BsQPHRxA.js → file-tree-utils-D09ASMfu.js} +1 -1
- package/dist/public/assets/flowDiagram-23GEKE2U-BoiEI6fi.js +1 -0
- package/dist/public/assets/{folder-DxrU2PLH.js → folder-Cnftw7jd.js} +1 -1
- package/dist/public/assets/{folder-config-api-CM5ZFHjG.js → folder-config-api-Dhk4j3NE.js} +1 -1
- package/dist/public/assets/{folder-open-ee990ToL.js → folder-open-DoQalFip.js} +1 -1
- package/dist/public/assets/{follow-file-ClrF9UKc.js → follow-file-BYg1kvW1.js} +1 -1
- package/dist/public/assets/{ganttDiagram-NO4QXBWP-iVPMtR6h.js → ganttDiagram-NO4QXBWP-PZlgotcv.js} +1 -1
- package/dist/public/assets/gherkin-CMIKyHk7.js +1 -0
- package/dist/public/assets/{git-branch-B0WeYwW-.js → git-branch-BWBPTGqT.js} +1 -1
- package/dist/public/assets/gitGraph-TEB2WS4Q-afDp1_T4.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-DdI0uf23.js → gitGraphDiagram-IHSO6WYX-CnOfuKSB.js} +1 -1
- package/dist/public/assets/{globals-BbucswUi.js → globals-C-kRTFCu.js} +2 -2
- package/dist/public/assets/globals-D9Q1kf3c.css +1 -0
- package/dist/public/assets/{graphlib-2sje7ygs.js → graphlib-fvEEtLhE.js} +1 -1
- package/dist/public/assets/{hash-CDGtqqEo.js → hash-BZXl_HqD.js} +1 -1
- package/dist/public/assets/{highlighted-body-OFNGDK62-nVG7xLpg.js → highlighted-body-OFNGDK62-BaYzQjQZ.js} +1 -1
- package/dist/public/assets/html-void-elements-Bkr32DGT.js +1 -0
- package/dist/public/assets/i18n-B-su7WGL.js +1 -0
- package/dist/public/assets/index-zKi6jfeI.js +2097 -0
- package/dist/public/assets/info-DKCQHKI2-CrDaHnZ5.js +1 -0
- package/dist/public/assets/{info-BnJuC0vW.js → info-Jj1j2YxC.js} +1 -1
- package/dist/public/assets/{infoDiagram-FWYZ7A6U-CCLCXbok.js → infoDiagram-FWYZ7A6U-Dvre6R3A.js} +1 -1
- package/dist/public/assets/{input-group-BgDCDWUR.js → input-group-CFpex2uW.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-DYNfj8DM.js → ishikawaDiagram-FXEZZL3T-CGbM4PcO.js} +1 -1
- package/dist/public/assets/{journeyDiagram-5HDEW3XC-D3IdBiiM.js → journeyDiagram-5HDEW3XC-DE9Pf5_r.js} +1 -1
- package/dist/public/assets/{kanban-definition-HUTT4EX6-CF_ZN-jM.js → kanban-definition-HUTT4EX6-jPGc8KH6.js} +1 -1
- package/dist/public/assets/lib-BHGXbMkc.js +9 -0
- package/dist/public/assets/lib-DcrRfjuF.js +29 -0
- package/dist/public/assets/{line-BA7emVey.js → line-BJ5gC8Dy.js} +1 -1
- package/dist/public/assets/{linear-CUFA2OWO.js → linear-EWMuktsp.js} +1 -1
- package/dist/public/assets/{lint-config-client-Ctx6XxuK.js → lint-config-client-DMsg3XE_.js} +1 -1
- package/dist/public/assets/list-plus-IYEFhKGU.js +1 -0
- package/dist/public/assets/loader-circle-Coob8S41.js +1 -0
- package/dist/public/assets/{local-menu-action-bus-iy6v2osW.js → local-menu-action-bus-DLozq_c4.js} +1 -1
- package/dist/public/assets/{map-DbAr_xa0.js → map-DuXZfTxZ.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-D9sFjZMg.js → markdownlint-rule-browser-ClWCRE-k.js} +1 -1
- package/dist/public/assets/mascot-outline-CtS592mc.js +1 -0
- package/dist/public/assets/mermaid-GHXKKRXX-Dif_zbtJ.js +1 -0
- package/dist/public/assets/{mermaid-parser.core-B8FUrn7y.js → mermaid-parser.core-BVNQnpl1.js} +2 -2
- package/dist/public/assets/{mermaid.core-gcfl0bT0.js → mermaid.core-T6rBx5Mh.js} +3 -3
- package/dist/public/assets/messages-08fVqpq6.js +1 -0
- package/dist/public/assets/messages-9TiHLKyB.js +1 -0
- package/dist/public/assets/messages-B6_-Jcig.js +1 -0
- package/dist/public/assets/messages-Bb2E22t5.js +1 -0
- package/dist/public/assets/messages-CN01LMHY.js +1 -0
- package/dist/public/assets/messages-DJJz1KAA.js +1 -0
- package/dist/public/assets/messages-DNrStzR0.js +1 -0
- package/dist/public/assets/messages-DcFADkmi.js +1 -0
- package/dist/public/assets/messages-Djq--rqJ.js +1 -0
- package/dist/public/assets/messages-DoUQmGUb.js +1 -0
- package/dist/public/assets/messages-bfwA7F7-.js +1 -0
- package/dist/public/assets/{mindmap-definition-LN4V7U3C-9ySd_DkR.js → mindmap-definition-LN4V7U3C-CumX92oT.js} +1 -1
- package/dist/public/assets/minus-DPAjfzCa.js +1 -0
- package/dist/public/assets/{miss-dialog-store-B3cHkf8G.js → miss-dialog-store--ihxgGwV.js} +1 -1
- package/dist/public/assets/navigation-targets-DdXUwF8B.js +1 -0
- package/dist/public/assets/{now-B4vxsI1S.js → now-z5ELVWrb.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-DJGfoyLt.js → open-managed-artifact-tab-cqLHNiqt.js} +1 -1
- package/dist/public/assets/{ordinal-Cfxeoxe-.js → ordinal-BXAn9evv.js} +1 -1
- package/dist/public/assets/packet-7NZHBO7P-DbOy7CAU.js +1 -0
- package/dist/public/assets/{panel-right-open-Cc56I_GE.js → panel-right-open-BhUOm1Eq.js} +1 -1
- package/dist/public/assets/{paperclip-D7KMFbO9.js → paperclip-9gdTBktj.js} +1 -1
- package/dist/public/assets/{pegDiagram-2B236MQR-cNCSiNUP.js → pegDiagram-2B236MQR-CTdEF3cw.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-CR3AYTQU.js → pending-receive-nav-store-D_Yd5Kkr.js} +1 -1
- package/dist/public/assets/pie-RZYD4A2V-Bj39C3bk.js +1 -0
- package/dist/public/assets/{pieDiagram-ENE6RG2P-C2bxi6W1.js → pieDiagram-ENE6RG2P-DEG5bAYb.js} +1 -1
- package/dist/public/assets/{project-paths--7l9Mqe-.js → project-paths-BcFu3O1A.js} +1 -1
- package/dist/public/assets/{prop-types-CC3zyaqH.js → prop-types-C25REwA7.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-C8AftH1G.js → quadrantDiagram-ABIIQ3AL-DqmV_ECa.js} +1 -1
- package/dist/public/assets/radar-I7S5WNFK-8Y-4N9H-.js +1 -0
- package/dist/public/assets/railroad-3IZDKUUU-DbyANRn-.js +1 -0
- package/dist/public/assets/railroad-abnf-AHOZXSZD-CelDcVQi.js +1 -0
- package/dist/public/assets/railroad-ebnf-EBAXGLYW-GO9BaS2J.js +1 -0
- package/dist/public/assets/railroad-peg-LSFZ7HO6-DINlAt_U.js +1 -0
- package/dist/public/assets/{railroadDiagram-RFXS5EU6-CZh61tJk.js → railroadDiagram-RFXS5EU6-D1VOXkhy.js} +1 -1
- package/dist/public/assets/receive-store-DJ3Z6bz8.js +2 -0
- package/dist/public/assets/{refresh-cw-DGLnzhho.js → refresh-cw-REpEMEB2.js} +1 -1
- package/dist/public/assets/{requirementDiagram-TGXJPOKE-CQLu3M38.js → requirementDiagram-TGXJPOKE-CWGls4-H.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-HTMAVEWB-Bjus_sTX.js → sankeyDiagram-HTMAVEWB-D00ONs8l.js} +1 -1
- package/dist/public/assets/schema-fields-view-intent-CgNFg8m7.js +1 -0
- package/dist/public/assets/{select-BU4xT6VN.js → select-CRztynyQ.js} +1 -1
- package/dist/public/assets/{selection-context-DT0NuiRB.js → selection-context-CEsFBd_P.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-BR7Ay_cV.js → sequenceDiagram-DBY2YBRQ-BBwn6ouJ.js} +1 -1
- package/dist/public/assets/{sizeCapture-X5ZJPWSS-B6c4PqMD.js → sizeCapture-X5ZJPWSS-eBkr-Eez.js} +1 -1
- package/dist/public/assets/skill-actions-Cawlws49.js +2 -0
- package/dist/public/assets/{skill-scope-DEvpbPXx.js → skill-scope-DG4fOw_k.js} +1 -1
- package/dist/public/assets/{skills-api-BpuwZVN9.js → skills-api-Djw9cUyq.js} +1 -1
- package/dist/public/assets/{square-pen-CEIus1aL.js → square-pen-D3oI-YUs.js} +1 -1
- package/dist/public/assets/{src-BFmudBKQ.js → src-CJ94lzX3.js} +1 -1
- package/dist/public/assets/{src-_qYX43MU.js → src-hWhZz0ry.js} +2 -2
- package/dist/public/assets/{stateDiagram-2N3HPSRC-DJmlM8IW.js → stateDiagram-2N3HPSRC-CuLDPCky.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-6OUMAXLB-_9elEbD9.js +1 -0
- package/dist/public/assets/{swimlanes-5IMT3BWC-D8ijXWBf.js → swimlanes-5IMT3BWC-Bwx6YXUK.js} +2 -2
- package/dist/public/assets/swimlanesDiagram-G3AALYLV-B_LHFsm2.js +8 -0
- package/dist/public/assets/{tag-pill-input-D_VrZ0_G.js → tag-pill-input-Ckot4BtE.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-BhYFP54I.js → target-navigation-intent-DgeN3LEN.js} +1 -1
- package/dist/public/assets/{telemetry-impl-oH89uFEx.js → telemetry-impl-CQgbydAH.js} +2 -2
- package/dist/public/assets/{telemetry-startup-DNYyG34o.js → telemetry-startup-BJn8ZOlL.js} +1 -1
- package/dist/public/assets/terminal-DQu0Rduz.js +1 -0
- package/dist/public/assets/terminal-command-events-7vlkZt-0.js +1 -0
- package/dist/public/assets/{terminal-launch-events-BBTNOGCs.js → terminal-launch-events-8IGUYuVb.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-L6O0yS3Y.js → terminal-telemetry-Bup2OV8O.js} +1 -1
- package/dist/public/assets/text-viewer-languages-DVJ3G2Gh.js +2 -0
- package/dist/public/assets/thread-client-B3j1-NNf.js +1 -0
- package/dist/public/assets/{timeline-definition-FHXFAJF6-DwBMj07Z.js → timeline-definition-FHXFAJF6-DecPknli.js} +1 -1
- package/dist/public/assets/{trash-2-Ccq_llrY.js → trash-2-XqjnGI2m.js} +1 -1
- package/dist/public/assets/treeView-QDETBFTQ-BWkcCjcr.js +1 -0
- package/dist/public/assets/treemap-6X3UGDF4-Bz0LgCcV.js +1 -0
- package/dist/public/assets/{triangle-alert-V8YoC6ss.js → triangle-alert-CA0Kx2Dz.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-BTwaT6Tt.js → typing-burst-detector-Bcxs6e1d.js} +3 -3
- package/dist/public/assets/{undo-2-bYFSgQwb.js → undo-2-CtBobs44.js} +1 -1
- package/dist/public/assets/uninstall-rbukHZUq.js +1 -0
- package/dist/public/assets/{use-activity-panel-DENpfNoH.js → use-activity-panel-ov91fgMH.js} +1 -1
- package/dist/public/assets/{use-collab-url-ktBqBALq.js → use-collab-url-1XQxLP3g.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-Bz9dSt4p.js → use-live-xterm-theme-3-VRWhHM.js} +1 -1
- package/dist/public/assets/{use-open-skill-Bq2DfJ8n.js → use-open-skill-BNfVgdFz.js} +1 -1
- package/dist/public/assets/use-settings-route-BT3ZJmxN.js +1 -0
- package/dist/public/assets/{use-skill-directory-D5XiyMts.js → use-skill-directory-CtN1niVI.js} +1 -1
- package/dist/public/assets/{use-skill-origin-BmEyp0Uh.js → use-skill-origin-DQf3raAN.js} +1 -1
- package/dist/public/assets/{use-skills-0q5Zcw-J.js → use-skills-BrkAxYWH.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-DUjSxVhq.js → use-terminal-enabled-EeeyWLnr.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-CpB81ux4.js → use-timeline-entry-diff-t4CQRU4t.js} +4 -4
- package/dist/public/assets/use-workspace-J_BwpJRd.js +1 -0
- package/dist/public/assets/{vennDiagram-L72KCM5P-DZxwOiUn.js → vennDiagram-L72KCM5P-Bg5DY_Cn.js} +1 -1
- package/dist/public/assets/wardley-OPB4EBWU-Bx1-jXoM.js +1 -0
- package/dist/public/assets/{wardleyDiagram-EHGQE667-D44Ff-nh.js → wardleyDiagram-EHGQE667-DJ8tw7ym.js} +1 -1
- package/dist/public/assets/workspace-paths-DokE-xT8.js +1 -0
- package/dist/public/assets/{wrench-D8b4qpCM.js → wrench-CNmrVb8V.js} +1 -1
- package/dist/public/assets/x-OtqSgHKA.js +1 -0
- package/dist/public/assets/{xychartDiagram-FW5EYKEG-B_4MyxsA.js → xychartDiagram-FW5EYKEG-7eWDzOaJ.js} +1 -1
- package/dist/public/index.html +158 -129
- package/dist/public/uninstall.html +19 -15
- package/dist/{repair-launch-json-SpkGaIbQ.mjs → repair-launch-json-Ca96yug3.mjs} +2 -2
- package/dist/{repair-mcp-configs-6yfv7PDz.mjs → repair-mcp-configs-BmeaoniW.mjs} +2 -2
- package/dist/repair-skills-BxDCyrpW.mjs +1 -0
- package/dist/{repair-skills-Qa8asXi-.mjs → repair-skills-xb6EtJ_i.mjs} +2 -2
- package/dist/schemas/v0/config.user.schema.json +38 -0
- package/dist/server-lock-CSAtOeDZ.mjs +1 -0
- package/dist/{server-lock-DsDrc4RU.mjs → server-lock-D7MC1H2C.mjs} +2 -2
- package/dist/{skill-teardown-lrVGmvNz.mjs → skill-teardown-Bp4PXaVu.mjs} +2 -2
- package/dist/{sleep-ByqzSHar.mjs → sleep-DVOInM4H.mjs} +5 -5
- package/dist/src-Cz6nVs_k.mjs +1 -0
- package/dist/src-D8NOF4IF.mjs +2032 -0
- package/dist/{src-BU5VUa22.mjs → src-DOtg_Yy3.mjs} +6 -6
- package/dist/{src-azBs1EPY.mjs → src-DevJlbVv.mjs} +127 -127
- package/dist/start-Bdmc9Zwo.mjs +1 -0
- package/dist/{start-CfaFUwr3.mjs → start-DjEQzpUP.mjs} +3 -3
- package/dist/{write-project-skill-g7odZSI2.mjs → write-project-skill-CstNID_e.mjs} +4 -4
- package/package.json +4 -4
- package/dist/constants-DyV618jN.mjs +0 -2
- package/dist/fs-traced-WMTb98_i.mjs +0 -1
- package/dist/git-handle-CtdWfsLv.mjs +0 -1
- package/dist/init-BpyLNGZy.mjs +0 -1
- package/dist/loader-BXM73qNg.mjs +0 -1
- package/dist/md-manager-C54e9m9K.mjs +0 -2
- package/dist/preview-CKzgyv7F.mjs +0 -1
- package/dist/public/assets/BugReportHistory-C_4-NQ-j.js +0 -1
- package/dist/public/assets/ChangedOutsideBadge-DCLuBScT.js +0 -1
- package/dist/public/assets/CodeMirrorPropInput-nxbfw9bv.js +0 -3
- package/dist/public/assets/DocumentContext-CfyZrOH1.js +0 -38
- package/dist/public/assets/FeedbackForm-CZ6u31dO.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-4_S8d2s7.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-B8dqEG77.js +0 -2
- package/dist/public/assets/SchemaConfigEditor-C3FA7iH5.js +0 -1
- package/dist/public/assets/SessionsHost-DYHLsEW-.js +0 -2
- package/dist/public/assets/SettingsDialogBody-G6-YBwQX.js +0 -12
- package/dist/public/assets/SkillToolbarControls-DtovBTF2.js +0 -1
- package/dist/public/assets/SourceEditor-Dr9urM9j.js +0 -1
- package/dist/public/assets/TerminalPanel-BqsEcNCi.js +0 -146
- package/dist/public/assets/ThreadView-lm-6Edan.js +0 -6
- package/dist/public/assets/agent-visibility-BxHoyzki.js +0 -1
- package/dist/public/assets/architecture-TIHT7OUA-Bu3B2Eu7.js +0 -1
- package/dist/public/assets/arrow-up-right-Gp4MuO-g.js +0 -1
- package/dist/public/assets/auth-state-cache-BtIe91M8.js +0 -11
- package/dist/public/assets/channel-BBYqtvcN.js +0 -1
- package/dist/public/assets/check-DLRoQSSY.js +0 -1
- package/dist/public/assets/chevron-left-BRFq0qcJ.js +0 -1
- package/dist/public/assets/chevron-right-BjiB8LDf.js +0 -1
- package/dist/public/assets/chunk-2Q5K7J3B-DeGCwTid.js +0 -1
- package/dist/public/assets/chunk-VAUOI2AC-B4WVYMGW.js +0 -1
- package/dist/public/assets/chunk-XXDRQBXY-DjPNLLex.js +0 -1
- package/dist/public/assets/classDiagram-OUVF2IWQ-CusZeKDE.js +0 -1
- package/dist/public/assets/classDiagram-v2-EOCWNBFH-3Dd_UHkU.js +0 -1
- package/dist/public/assets/client-version-CyS4Akwb.js +0 -1
- package/dist/public/assets/comment-chips-Dbrqmzd1.js +0 -7
- package/dist/public/assets/config-provider-DdEnUd2F.js +0 -4
- package/dist/public/assets/cynefin-VYW2F7L2-Dh2yc-Yt.js +0 -1
- package/dist/public/assets/dist-P5PuqHtu2.js +0 -586
- package/dist/public/assets/eventmodeling-45OFAUF4-CoqTTBqG.js +0 -1
- package/dist/public/assets/flowDiagram-23GEKE2U-BKkbdW0r.js +0 -1
- package/dist/public/assets/gitGraph-TEB2WS4Q-D2tde3MB.js +0 -1
- package/dist/public/assets/globals-Bl3fKb9V.css +0 -1
- package/dist/public/assets/index-CgjnaYaj.js +0 -2092
- package/dist/public/assets/info-DKCQHKI2-DIQGY0RW.js +0 -1
- package/dist/public/assets/lib-CtlgmvnR.js +0 -29
- package/dist/public/assets/loader-circle-B0OUuKph.js +0 -1
- package/dist/public/assets/mermaid-GHXKKRXX-uJrCvmwj.js +0 -1
- package/dist/public/assets/minus-CKcpBpdR.js +0 -1
- package/dist/public/assets/navigation-targets-BTpBtlo2.js +0 -1
- package/dist/public/assets/packet-7NZHBO7P-C6h6PguP.js +0 -1
- package/dist/public/assets/pie-RZYD4A2V-BgsL62qC.js +0 -1
- package/dist/public/assets/radar-I7S5WNFK-2Fukjsh1.js +0 -1
- package/dist/public/assets/railroad-3IZDKUUU-BXQstaOW.js +0 -1
- package/dist/public/assets/railroad-abnf-AHOZXSZD-D4DJxFB6.js +0 -1
- package/dist/public/assets/railroad-ebnf-EBAXGLYW-B9wL5Mgq.js +0 -1
- package/dist/public/assets/railroad-peg-LSFZ7HO6-TRaMzMt0.js +0 -1
- package/dist/public/assets/receive-store-Dc_eiYW6.js +0 -2
- package/dist/public/assets/schema-fields-view-intent-Df0KnOO8.js +0 -1
- package/dist/public/assets/skill-actions-BlJ8nSSo.js +0 -2
- package/dist/public/assets/stateDiagram-v2-6OUMAXLB-DJeEhrn3.js +0 -1
- package/dist/public/assets/swimlanesDiagram-G3AALYLV-D5vkX5fS.js +0 -8
- package/dist/public/assets/text-viewer-languages-DEjz8Rlz.js +0 -2
- package/dist/public/assets/thread-client-BVh92ozO.js +0 -1
- package/dist/public/assets/treeView-QDETBFTQ-DItjR5Rl.js +0 -1
- package/dist/public/assets/treemap-6X3UGDF4-D1JSLPGs.js +0 -1
- package/dist/public/assets/uninstall-TDyS8cYc.js +0 -1
- package/dist/public/assets/use-settings-route-B10M97I7.js +0 -1
- package/dist/public/assets/use-workspace-BVw2SUvV.js +0 -1
- package/dist/public/assets/wardley-OPB4EBWU-BEy33__G.js +0 -1
- package/dist/public/assets/x-B3zGPHCO.js +0 -1
- package/dist/repair-skills-D0WSZUFt.mjs +0 -1
- package/dist/server-lock-BoNixvAi.mjs +0 -1
- package/dist/src-B-TXZyjI.mjs +0 -1
- package/dist/src-YfpQ2LX0.mjs +0 -2030
- package/dist/start-VOlPJi60.mjs +0 -1
- /package/dist/public/assets/{ActivityPanelDiffView-DZrMHlZH.js → ActivityPanelDiffView-CPRjA-1R.js} +0 -0
- /package/dist/public/assets/{SkillModeBanner-DFgrdWyf.js → SkillModeBanner-DzwdRe8-.js} +0 -0
- /package/dist/public/assets/{__vite-browser-external-CL4duhlG.js → __vite-browser-external-neOsIWyW.js} +0 -0
- /package/dist/public/assets/{agent-presence-C8KjkxgZ.js → agent-presence-1vhA03qX.js} +0 -0
- /package/dist/public/assets/{array-DRGYhAwX.js → array-C_NrAdxI.js} +0 -0
- /package/dist/public/assets/{asset-dispatch-O9x3rXhj.js → asset-dispatch-qrq0uplE.js} +0 -0
- /package/dist/public/assets/{auth-prompt-store-DQ_HcDxh.js → auth-prompt-store-CcGlao2A.js} +0 -0
- /package/dist/public/assets/{badge-CnYDYmI5.js → badge-BVZ2oTto.js} +0 -0
- /package/dist/public/assets/{chunk-KEIR6QF5-CTDrJ2_V.js → chunk-KEIR6QF5-CUEbS00h.js} +0 -0
- /package/dist/public/assets/{chunk-Y2CYZVJY-WQQLMo_s.js → chunk-Y2CYZVJY-DD_NReQM.js} +0 -0
- /package/dist/public/assets/{clike-BfpXCH0g.js → clike-fkc4XEp3.js} +0 -0
- /package/dist/public/assets/{clipboard-adapter-DPkNOslT.js → clipboard-adapter-BTORRh1U.js} +0 -0
- /package/dist/public/assets/{colors-BY0RBIvp.js → colors-CQ-pUTip.js} +0 -0
- /package/dist/public/assets/{copilot-CuzHDCzI.js → copilot-CHW7txhf.js} +0 -0
- /package/dist/public/assets/{createLucideIcon-BbgVV4EV.js → createLucideIcon-BbftclCc.js} +0 -0
- /package/dist/public/assets/{cursor-W0skD8YU.js → cursor-lV4EgEIO.js} +0 -0
- /package/dist/public/assets/{cytoscape.esm-Ck6hca6m.js → cytoscape.esm-BFZHbRez.js} +0 -0
- /package/dist/public/assets/{defaultLocale-C9lDPH35.js → defaultLocale-B_FbTTbl.js} +0 -0
- /package/dist/public/assets/{desktop-bridge-types-BwR5S9HF.js → desktop-bridge-types-D2lP_C4_.js} +0 -0
- /package/dist/public/assets/{diff-CvjWTdgS.js → diff-C18NQUVj.js} +0 -0
- /package/dist/public/assets/{dist-zYQJXuRH.js → dist-B7yUMXxJ.js} +0 -0
- /package/dist/public/assets/{dist-CTHTGkF4.js → dist-BPSCL3GQ.js} +0 -0
- /package/dist/public/assets/{dist-DIZJMUWy.js → dist-BWQ444Pw.js} +0 -0
- /package/dist/public/assets/{dist-CpRBr-Ct.js → dist-CRq7u4Aw.js} +0 -0
- /package/dist/public/assets/{dist-DmEZHXvB.js → dist-CrwFIHTH.js} +0 -0
- /package/dist/public/assets/{documents-fetch-DK-kdvYE.js → documents-fetch-BWxQ88TF.js} +0 -0
- /package/dist/public/assets/{external-link-COF7NUCm.js → external-link-BkZU8kDC.js} +0 -0
- /package/dist/public/assets/{file-tree-rename-validation-DEz_ryBu.js → file-tree-rename-validation-CHpqbXz_.js} +0 -0
- /package/dist/public/assets/{form-CGbOgaUs.js → form-uH0T1Qcu.js} +0 -0
- /package/dist/public/assets/{format-CFFWVvag.js → format-CqpPD7fR.js} +0 -0
- /package/dist/public/assets/{go-D-9nxjMR.js → go-BZZXdOuI.js} +0 -0
- /package/dist/public/assets/{init-Dpr8Tcj2.js → init-DtLQcSuO.js} +0 -0
- /package/dist/public/assets/{input-CtKG6a5B.js → input-CX1W4pdJ.js} +0 -0
- /package/dist/public/assets/{isObject-B_BLuINR.js → isObject-CJkdVXYX.js} +0 -0
- /package/dist/public/assets/{katex-7OG0ksww.js → katex-BE6VA85g.js} +0 -0
- /package/dist/public/assets/{libesm-Dcsy_--i.js → libesm-DO519K1n.js} +0 -0
- /package/dist/public/assets/{lint-plugin-meta-BnniPb1r.js → lint-plugin-meta-BUTpI0_4.js} +0 -0
- /package/dist/public/assets/{lru-string-cache-jJ5hyYK1.js → lru-string-cache-a0Cuo2yI.js} +0 -0
- /package/dist/public/assets/{lua-qAotk3Jg.js → lua-CFX1gUBY.js} +0 -0
- /package/dist/public/assets/{markdownit-DoX6x6DK.js → markdownit-CIgVFnWs.js} +0 -0
- /package/dist/public/assets/{mcp-consent-store-Dz4H-8gV.js → mcp-consent-store-Dxs6JZLB.js} +0 -0
- /package/dist/public/assets/{min-CCEG0l64.js → min-DCU_CWsT.js} +0 -0
- /package/dist/public/assets/{overlay-layers-CBGNHxJK.js → overlay-layers-AaBEWClb.js} +0 -0
- /package/dist/public/assets/{panel-UxAkffLp.js → panel-9S5Pf2VO.js} +0 -0
- /package/dist/public/assets/{panzoom.es-H6kNXvjN.js → panzoom.es-DMxgpZcZ.js} +0 -0
- /package/dist/public/assets/{parse-api-error-BFe1cdS7.js → parse-api-error-DkZQPwyl.js} +0 -0
- /package/dist/public/assets/{path-56QyJhyg.js → path-DIlZIGue.js} +0 -0
- /package/dist/public/assets/{pdf-CYHvv2Oq.js → pdf-Cy3gQIcO.js} +0 -0
- /package/dist/public/assets/{pdf.worker-B8Ju19hh.js → pdf.worker-BdzhldWt.js} +0 -0
- /package/dist/public/assets/{perl-E4P7BXaC.js → perl-BgmVruQ7.js} +0 -0
- /package/dist/public/assets/{properties-DXHbGwrb.js → properties-BdJtqVJl.js} +0 -0
- /package/dist/public/assets/{r-DCDstkyG.js → r-fecYfHVx.js} +0 -0
- /package/dist/public/assets/{rough.esm-DE_lJ5Ge.js → rough.esm-COSPye1d.js} +0 -0
- /package/dist/public/assets/{ruby-DeKk3LV3.js → ruby-D4ycjIcU.js} +0 -0
- /package/dist/public/assets/{share-metadata-rows-B1YjvGbL.js → share-metadata-rows-Btw33WmH.js} +0 -0
- /package/dist/public/assets/{shell-BRtU48Yb.js → shell-S4EbCTPW.js} +0 -0
- /package/dist/public/assets/{skeleton-DS8zjX9Q.js → skeleton-DDVOgHvc.js} +0 -0
- /package/dist/public/assets/{sortable.esm-BT6d9PDz.js → sortable.esm-CRNKDjgg.js} +0 -0
- /package/dist/public/assets/{sql-XsKG_-B3.js → sql-wdiPK9a0.js} +0 -0
- /package/dist/public/assets/{src-DLd5TgYd.js → src-BWFYg8Yg.js} +0 -0
- /package/dist/public/assets/{startup-marks-BJYEMeGu.js → startup-marks-BSFaenPs.js} +0 -0
- /package/dist/public/assets/{stex-B3qxBOBU.js → stex-DO4KgX7A.js} +0 -0
- /package/dist/public/assets/{swift-CGhDVaQR.js → swift-ClTSRUoT.js} +0 -0
- /package/dist/public/assets/{textarea-CUVLEZhx.js → textarea-B18-RfF_.js} +0 -0
- /package/dist/public/assets/{thread-draft-staging-BXLyxk1u.js → thread-draft-staging-CLYszvki.js} +0 -0
- /package/dist/public/assets/{timeline-diff-store-sC1fl4YV.js → timeline-diff-store-Buwf-OFI.js} +0 -0
- /package/dist/public/assets/{toml-DkvxgD0C.js → toml-Dzi4mOhV.js} +0 -0
- /package/dist/public/assets/{use-installed-clis-B7_xP0xS.js → use-installed-clis-BQyVc15P.js} +0 -0
- /package/dist/public/assets/{useLintConfigViewMode-C3vaXrG0.js → useLintConfigViewMode-MCAU0u93.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./highlighted-body-OFNGDK62-
|
|
2
|
-
import{o as e,t}from"./chunk-CYidjpOJ.js";import{t as n}from"./preload-helper-Chd9yIcd.js";import{t as r}from"./jsx-runtime-BUgB2tll.js";import{t as i}from"./react-f2sANaYj.js";import{t as a}from"./react-dom-DPxgxlDT.js";import{n as o,t as s}from"./bundle-mjs-SHeFpKGC.js";import{G as c,H as l,K as u,U as d,V as f,W as p,X as m,Y as h,at as g,ct as _,d as v,dt as y,et as b,f as x,i as S,it as C,j as w,lt as T,n as ee,nt as te,o as ne,ot as re,pt as ie,rt as E,st as ae,t as oe,tt as D,ut as se}from"./lib-CtlgmvnR.js";var O=e(i(),1),k={indicator:`indicator`,textOnly:`text-only`,remove:`remove`};function ce({defaultOrigin:e=``,allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a=`inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm`,blockedLinkClass:o=`text-gray-500`,linkBlockPolicy:s=k.indicator,imageBlockPolicy:c=k.indicator}){let l=t.length&&!t.every(e=>e===`*`),u=n.length&&!n.every(e=>e===`*`);if(!e&&(l||u))throw Error(`defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided`);return l=>{let u=ge(e,t,n,r,i,a,o,s,c);fe(l),p(l,u)}}function A(e,t){if(typeof e!=`string`)return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`))try{return new URL(e,`http://example.com`)}catch{return null}return null}}function le(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var ue=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),j=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function de(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e==`string`&&e.startsWith(`#`)&&!i)try{if(new URL(e,`http://example.com`).hash===e)return e}catch{}if(typeof e==`string`&&e.startsWith(`data:`))return i&&r&&e.startsWith(`data:image/`)?e:null;if(typeof e==`string`&&e.startsWith(`blob:`)){try{if(new URL(e).protocol===`blob:`&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&t!==`invalid`)return e}}catch{return null}return null}let o=A(e,n);if(!o||j.has(o.protocol)||!(ue.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=le(e);return o&&t.some(e=>{let t=A(e,n);return!t||t.origin!==o.origin?!1:o.href.startsWith(t.href)})?s?o.pathname+o.search+o.hash:o.href:t.includes(`*`)?o.protocol!==`https:`&&o.protocol!==`http:`?null:s?o.pathname+o.search+o.hash:o.href:null}function fe(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)fe(t)}}var pe=Symbol(`node-seen`);function me(e,t,n){return t===k.remove?{type:`remove`}:t===k.textOnly?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[...e.children]}}:{type:`replace`,element:{type:`element`,tagName:`span`,properties:{title:`Blocked URL: `+String(e.properties.href),class:n},children:[...e.children,{type:`text`,value:` [blocked]`}]}}}function he(e,t,n){if(t===k.remove)return{type:`remove`};if(t===k.textOnly){let t=String(e.properties.alt||``);return t?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[{type:`text`,value:t}]}}:{type:`remove`}}return{type:`replace`,element:{type:`element`,tagName:`span`,properties:{class:n},children:[{type:`text`,value:`[Image blocked: `+String(e.properties.alt||`No description`)+`]`}]}}}var ge=(e,t,n,r,i,a,o,s,l)=>{let u=(d,f,m)=>{if(d.type!==`element`||d[pe])return!0;if(d.tagName===`a`){let n=de(d.properties.href,t,e,!1,!1,i);if(n===null){if(d[pe]=!0,p(d,u),m&&typeof f==`number`){let e=me(d,s,o);if(e.type===`remove`)return m.children.splice(f,1),[c,f];m.children[f]=e.element}return c}else return d.properties.href=n,d.properties.target=`_blank`,d.properties.rel=`noopener noreferrer`,!0}if(d.tagName===`img`){let t=de(d.properties.src,n,e,r,!0,i);if(t===null){if(d[pe]=!0,p(d,u),m&&typeof f==`number`){let e=he(d,l,a);if(e.type===`remove`)return m.children.splice(f,1),[c,f];m.children[f]=e.element}return c}else return d.properties.src=t,!0}return!0};return u},_e={},ve={}.hasOwnProperty,ye=w(`type`,{handlers:{root:xe,element:Ee,text:we,comment:Te,doctype:Ce}});function be(e,t){let n=(t||_e).space;return ye(e,n===`svg`?T:_)}function xe(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=Oe(e.children,n,t),ke(e,n),n}function Se(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=Oe(e.children,n,t),ke(e,n),n}function Ce(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return ke(e,t),t}function we(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return ke(e,t),t}function Te(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return ke(e,t),t}function Ee(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=T);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&ve.call(e.properties,a)){let t=De(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:g[o],childNodes:[],parentNode:null};return s.childNodes=Oe(e.children,s,r),ke(e,s),e.tagName===`template`&&e.content&&(s.content=Se(e.content,r)),s}function De(e,t,n){let r=se(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?ae(n):re(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=g[r.space]}return i}function Oe(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=ye(e[r],n);a.parentNode=t,i.push(a)}return i}function ke(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var Ae=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,je=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),Me={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ne(e,t){let n=qe(e),r=w(`type`,{handlers:{root:Fe,element:Ie,text:Le,comment:Be,doctype:Re,raw:Ve},unknown:He}),i={parser:n?new b(Me):b.getFragmentParser(void 0,Me),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),Ue(i,l());let a=C(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&p(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function Pe(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Fe(e,t){Pe(e.children,t)}function Ie(e,t){Ge(e,t),Pe(e.children,t),Ke(e,t)}function Le(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:E.CHARACTER,chars:e.value,location:Je(e)};Ue(t,l(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Re(e,t){let n={type:E.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:Je(e)};Ue(t,l(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ze(e,t){t.stitches=!0;let n=Ye(e);`children`in e&&`children`in n&&(n.children=Ne({type:`root`,children:e.children},t.options).children),Be({type:`comment`,value:{stitch:n}},t)}function Be(e,t){let n=e.value,r={type:E.COMMENT,data:n,location:Je(e)};Ue(t,l(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Ve(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,We(t,l(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Ae,`<$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function He(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))ze(n,t);else{let e=``;throw je.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function Ue(e,t){We(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=D.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function We(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Ge(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===D.PLAINTEXT)return;Ue(t,l(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:g.html;i===g.html&&n===`svg`&&(i=g.svg);let a=be({...e,children:[]},{space:i===g.svg?`svg`:`html`}),o={type:E.START_TAG,tagName:n,tagID:te(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:Je(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Ke(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&ee.includes(n)||t.parser.tokenizer.state===D.PLAINTEXT)return;Ue(t,f(e));let r={type:E.END_TAG,tagName:n,tagID:te(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Je(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===D.RCDATA||t.parser.tokenizer.state===D.RAWTEXT||t.parser.tokenizer.state===D.SCRIPT_DATA)&&(t.parser.tokenizer.state=D.DATA)}function qe(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function Je(e){let t=l(e)||{line:void 0,column:void 0,offset:void 0},n=f(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Ye(e){return`children`in e?m({...e,children:[]}):m(e)}function Xe(e){return function(t,n){return Ne(t,{...e,file:n})}}var M=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],N={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...M,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...M],h2:[[`className`,`sr-only`]],img:[...M,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...M,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...M],table:[...M],ul:[...M,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},P={}.hasOwnProperty;function Ze(e,t){let n={type:`root`,children:[]},r=Qe({schema:t?{...N,...t}:N,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Qe(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return $e(e,n);case`doctype`:return et(e,n);case`element`:return tt(e,n);case`root`:return nt(e,n);case`text`:return rt(e,n);default:}}}function $e(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return ut(r,t),r}}function et(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return ut(e,t),e}}function tt(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=it(e,t.children),i=at(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&P.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return ut(o,t),o}function nt(e,t){let n={type:`root`,children:it(e,t.children)};return ut(n,t),n}function rt(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return ut(n,t),n}function it(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=Qe(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function at(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&P.call(r,n)?r[n]:void 0,o=r&&P.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(P.call(s,l)){let t=s[l],n=ot(e,dt(a,l),l,t);n??=ot(e,dt(o,l),l,t),n!=null&&(c[l]=n)}if(i&&P.call(i,n)){let e=i[n];for(l in e)P.call(e,l)&&!P.call(c,l)&&(c[l]=e[l])}return c}function ot(e,t,n,r){return t?Array.isArray(r)?st(e,t,n,r):ct(e,t,n,r):void 0}function st(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=ct(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function ct(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&<(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function lt(e,t,n){let r=e.schema.protocols&&P.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function ut(e,t){let n=d(t);t.data&&(e.data=m(t.data)),n&&(e.position=n)}function dt(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function ft(e){return function(t){return Ze(t,e)}}var pt=Object.defineProperty,mt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,yt=(e,t,n)=>t in e?pt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bt=(e,t)=>{for(var n in t||={})_t.call(t,n)&&yt(e,n,t[n]);if(gt)for(var n of gt(t))vt.call(t,n)&&yt(e,n,t[n]);return e},xt=(e,t)=>mt(e,ht(t)),F=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]===`\\`&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},St=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},Ct=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]===`\\`&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!St(e,n)&&(t+=1)}return t},I=(e,t)=>{let n=!1,r=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]===`\\`&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}if(!r&&e[a]==="`")if(n){if(i<t&&t<a)return!0;n=!1,i=-1}else n=!0,i=a}return!1},wt=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Tt=e=>!e||typeof e!=`string`||!e.includes(`>`)?e:e.replace(wt,(t,n,r,i)=>F(e,i)?t:`${n}\\>${r}`),Et=/(\*\*)([^*]*\*?)$/,Dt=/(__)([^_]*?)$/,Ot=/(\*\*\*)([^*]*?)$/,kt=/(\*)([^*]*?)$/,At=/(_)([^_]*?)$/,jt=/(`)([^`]*?)$/,Mt=/(~~)([^~]*?)$/,L=/^[\s_~*`]*$/,Nt=/^[\s]*[-*+][\s]+$/,Pt=/[\p{L}\p{N}_]/u,Ft=/^```[^`\n]*```?$/,It=/^\*{4,}$/,Lt=/(__)([^_]+)_$/,Rt=/(~~)([^~]+)~$/,zt=/~~/g,R=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:Pt.test(e)},Bt=(e,t)=>{let n=1;for(let r=t-1;r>=0;--r)if(e[r]===`]`)n+=1;else if(e[r]===`[`&&(--n,n===0))return r;return-1},Vt=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]===`[`)n+=1;else if(e[r]===`]`&&(--n,n===0))return r;return-1},Ht=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]===`\\`&&e[i+1]===`$`){i+=1;continue}e[i]===`$`&&(e[i+1]===`$`?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},Ut=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===`)`)return!0;if(e[n]===`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./highlighted-body-OFNGDK62-BaYzQjQZ.js","./chunk-CYidjpOJ.js","./jsx-runtime-BUgB2tll.js","./react-f2sANaYj.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{o as e,t}from"./chunk-CYidjpOJ.js";import{t as n}from"./preload-helper-Chd9yIcd.js";import{t as r}from"./jsx-runtime-BUgB2tll.js";import{t as i}from"./react-f2sANaYj.js";import{t as a}from"./react-dom-DPxgxlDT.js";import{n as o,t as s}from"./bundle-mjs-SHeFpKGC.js";import{$ as c,B as l,H as u,K as d,Q as f,R as p,U as m,V as h,X as g,Z as _,a as v,d as y,et as b,r as x,rt as S,t as C,tt as w,u as ee,z as T}from"./lib-DcrRfjuF.js";import{c as te,d as ne,f as re,i as ie,l as E,n as ae,o as oe,t as se,u as D}from"./html-void-elements-Bkr32DGT.js";var O=e(i(),1),k={indicator:`indicator`,textOnly:`text-only`,remove:`remove`};function ce({defaultOrigin:e=``,allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a=`inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm`,blockedLinkClass:o=`text-gray-500`,linkBlockPolicy:s=k.indicator,imageBlockPolicy:c=k.indicator}){let l=t.length&&!t.every(e=>e===`*`),u=n.length&&!n.every(e=>e===`*`);if(!e&&(l||u))throw Error(`defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided`);return l=>{let u=ge(e,t,n,r,i,a,o,s,c);fe(l),h(l,u)}}function A(e,t){if(typeof e!=`string`)return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`))try{return new URL(e,`http://example.com`)}catch{return null}return null}}function le(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}var ue=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),j=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function de(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e==`string`&&e.startsWith(`#`)&&!i)try{if(new URL(e,`http://example.com`).hash===e)return e}catch{}if(typeof e==`string`&&e.startsWith(`data:`))return i&&r&&e.startsWith(`data:image/`)?e:null;if(typeof e==`string`&&e.startsWith(`blob:`)){try{if(new URL(e).protocol===`blob:`&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&t!==`invalid`)return e}}catch{return null}return null}let o=A(e,n);if(!o||j.has(o.protocol)||!(ue.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=le(e);return o&&t.some(e=>{let t=A(e,n);return!t||t.origin!==o.origin?!1:o.href.startsWith(t.href)})?s?o.pathname+o.search+o.hash:o.href:t.includes(`*`)?o.protocol!==`https:`&&o.protocol!==`http:`?null:s?o.pathname+o.search+o.hash:o.href:null}function fe(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)fe(t)}}var pe=Symbol(`node-seen`);function me(e,t,n){return t===k.remove?{type:`remove`}:t===k.textOnly?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[...e.children]}}:{type:`replace`,element:{type:`element`,tagName:`span`,properties:{title:`Blocked URL: `+String(e.properties.href),class:n},children:[...e.children,{type:`text`,value:` [blocked]`}]}}}function he(e,t,n){if(t===k.remove)return{type:`remove`};if(t===k.textOnly){let t=String(e.properties.alt||``);return t?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[{type:`text`,value:t}]}}:{type:`remove`}}return{type:`replace`,element:{type:`element`,tagName:`span`,properties:{class:n},children:[{type:`text`,value:`[Image blocked: `+String(e.properties.alt||`No description`)+`]`}]}}}var ge=(e,t,n,r,i,a,o,s,c)=>{let l=(d,f,p)=>{if(d.type!==`element`||d[pe])return!0;if(d.tagName===`a`){let n=de(d.properties.href,t,e,!1,!1,i);if(n===null){if(d[pe]=!0,h(d,l),p&&typeof f==`number`){let e=me(d,s,o);if(e.type===`remove`)return p.children.splice(f,1),[u,f];p.children[f]=e.element}return u}else return d.properties.href=n,d.properties.target=`_blank`,d.properties.rel=`noopener noreferrer`,!0}if(d.tagName===`img`){let t=de(d.properties.src,n,e,r,!0,i);if(t===null){if(d[pe]=!0,h(d,l),p&&typeof f==`number`){let e=he(d,c,a);if(e.type===`remove`)return p.children.splice(f,1),[u,f];p.children[f]=e.element}return u}else return d.properties.src=t,!0}return!0};return l},_e={},ve={}.hasOwnProperty,ye=ae(`type`,{handlers:{root:xe,element:Ee,text:we,comment:Te,doctype:Ce}});function be(e,t){let n=(t||_e).space;return ye(e,n===`svg`?D:E)}function xe(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=Oe(e.children,n,t),ke(e,n),n}function Se(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=Oe(e.children,n,t),ke(e,n),n}function Ce(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return ke(e,t),t}function we(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return ke(e,t),t}function Te(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return ke(e,t),t}function Ee(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=D);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&ve.call(e.properties,a)){let t=De(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:w[o],childNodes:[],parentNode:null};return s.childNodes=Oe(e.children,s,r),ke(e,s),e.tagName===`template`&&e.content&&(s.content=Se(e.content,r)),s}function De(e,t,n){let r=ne(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?te(n):oe(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=w[r.space]}return i}function Oe(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=ye(e[r],n);a.parentNode=t,i.push(a)}return i}function ke(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var Ae=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,je=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),Me={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ne(e,t){let n=qe(e),r=ae(`type`,{handlers:{root:Fe,element:Ie,text:Le,comment:Be,doctype:Re,raw:Ve},unknown:He}),i={parser:n?new g(Me):g.getFragmentParser(void 0,Me),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),Ue(i,T());let a=b(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&h(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function Pe(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function Fe(e,t){Pe(e.children,t)}function Ie(e,t){Ge(e,t),Pe(e.children,t),Ke(e,t)}function Le(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);let n={type:c.CHARACTER,chars:e.value,location:Je(e)};Ue(t,T(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function Re(e,t){let n={type:c.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:Je(e)};Ue(t,T(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ze(e,t){t.stitches=!0;let n=Ye(e);`children`in e&&`children`in n&&(n.children=Ne({type:`root`,children:e.children},t.options).children),Be({type:`comment`,value:{stitch:n}},t)}function Be(e,t){let n=e.value,r={type:c.COMMENT,data:n,location:Je(e)};Ue(t,T(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function Ve(e,t){if(t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,We(t,T(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(Ae,`<$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;let e=t.parser.tokenizer._consume();t.parser.tokenizer._callState(e)}}function He(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))ze(n,t);else{let e=``;throw je.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function Ue(e,t){We(e,t);let n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=_.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function We(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Ge(e,t){let n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===_.PLAINTEXT)return;Ue(t,T(e));let r=t.parser.openElements.current,i=`namespaceURI`in r?r.namespaceURI:w.html;i===w.html&&n===`svg`&&(i=w.svg);let a=be({...e,children:[]},{space:i===w.svg?`svg`:`html`}),o={type:c.START_TAG,tagName:n,tagID:f(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:Je(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Ke(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&se.includes(n)||t.parser.tokenizer.state===_.PLAINTEXT)return;Ue(t,p(e));let r={type:c.END_TAG,tagName:n,tagID:f(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Je(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===_.RCDATA||t.parser.tokenizer.state===_.RAWTEXT||t.parser.tokenizer.state===_.SCRIPT_DATA)&&(t.parser.tokenizer.state=_.DATA)}function qe(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function Je(e){let t=T(e)||{line:void 0,column:void 0,offset:void 0},n=p(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Ye(e){return`children`in e?d({...e,children:[]}):d(e)}function Xe(e){return function(t,n){return Ne(t,{...e,file:n})}}var M=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],N={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...M,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...M],h2:[[`className`,`sr-only`]],img:[...M,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...M,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...M],table:[...M],ul:[...M,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},P={}.hasOwnProperty;function Ze(e,t){let n={type:`root`,children:[]},r=Qe({schema:t?{...N,...t}:N,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Qe(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return $e(e,n);case`doctype`:return et(e,n);case`element`:return tt(e,n);case`root`:return nt(e,n);case`text`:return rt(e,n);default:}}}function $e(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return ut(r,t),r}}function et(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return ut(e,t),e}}function tt(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=it(e,t.children),i=at(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&P.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return ut(o,t),o}function nt(e,t){let n={type:`root`,children:it(e,t.children)};return ut(n,t),n}function rt(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return ut(n,t),n}function it(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=Qe(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function at(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&P.call(r,n)?r[n]:void 0,o=r&&P.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(P.call(s,l)){let t=s[l],n=ot(e,dt(a,l),l,t);n??=ot(e,dt(o,l),l,t),n!=null&&(c[l]=n)}if(i&&P.call(i,n)){let e=i[n];for(l in e)P.call(e,l)&&!P.call(c,l)&&(c[l]=e[l])}return c}function ot(e,t,n,r){return t?Array.isArray(r)?st(e,t,n,r):ct(e,t,n,r):void 0}function st(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=ct(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function ct(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&<(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function lt(e,t,n){let r=e.schema.protocols&&P.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function ut(e,t){let n=l(t);t.data&&(e.data=d(t.data)),n&&(e.position=n)}function dt(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function ft(e){return function(t){return Ze(t,e)}}var pt=Object.defineProperty,mt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,_t=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,yt=(e,t,n)=>t in e?pt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bt=(e,t)=>{for(var n in t||={})_t.call(t,n)&&yt(e,n,t[n]);if(gt)for(var n of gt(t))vt.call(t,n)&&yt(e,n,t[n]);return e},xt=(e,t)=>mt(e,ht(t)),F=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]===`\\`&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},St=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},Ct=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]===`\\`&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!St(e,n)&&(t+=1)}return t},I=(e,t)=>{let n=!1,r=!1,i=-1;for(let a=0;a<e.length;a+=1){if(e[a]===`\\`&&a+1<e.length&&e[a+1]==="`"){a+=1;continue}if(e.substring(a,a+3)==="```"){r=!r,a+=2;continue}if(!r&&e[a]==="`")if(n){if(i<t&&t<a)return!0;n=!1,i=-1}else n=!0,i=a}return!1},wt=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Tt=e=>!e||typeof e!=`string`||!e.includes(`>`)?e:e.replace(wt,(t,n,r,i)=>F(e,i)?t:`${n}\\>${r}`),Et=/(\*\*)([^*]*\*?)$/,Dt=/(__)([^_]*?)$/,Ot=/(\*\*\*)([^*]*?)$/,kt=/(\*)([^*]*?)$/,At=/(_)([^_]*?)$/,jt=/(`)([^`]*?)$/,Mt=/(~~)([^~]*?)$/,L=/^[\s_~*`]*$/,Nt=/^[\s]*[-*+][\s]+$/,Pt=/[\p{L}\p{N}_]/u,Ft=/^```[^`\n]*```?$/,It=/^\*{4,}$/,Lt=/(__)([^_]+)_$/,Rt=/(~~)([^~]+)~$/,zt=/~~/g,R=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:Pt.test(e)},Bt=(e,t)=>{let n=1;for(let r=t-1;r>=0;--r)if(e[r]===`]`)n+=1;else if(e[r]===`[`&&(--n,n===0))return r;return-1},Vt=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]===`[`)n+=1;else if(e[r]===`]`&&(--n,n===0))return r;return-1},Ht=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]===`\\`&&e[i+1]===`$`){i+=1;continue}e[i]===`$`&&(e[i+1]===`$`?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},Ut=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===`)`)return!0;if(e[n]===`
|
|
3
3
|
`)return!1}return!1},Wt=(e,t)=>{for(let n=t-1;n>=0;--n){if(e[n]===`)`)return!1;if(e[n]===`(`)return n>0&&e[n-1]===`]`?Ut(e,t):!1;if(e[n]===`
|
|
4
4
|
`)return!1}return!1},Gt=(e,t)=>{for(let n=t-1;n>=0;--n){if(e[n]===`>`)return!1;if(e[n]===`<`){let t=n+1<e.length?e[n+1]:``;return t>=`a`&&t<=`z`||t>=`A`&&t<=`Z`||t===`/`}if(e[n]===`
|
|
5
5
|
`)return!1}return!1},Kt=(e,t,n)=>{let r=0;for(let n=t-1;n>=0;--n)if(e[n]===`
|
|
@@ -21,10 +21,10 @@ $$`:`${e}$$`},Cn=e=>bn(e)%2==0?e:Sn(e),wn=e=>xn(e)%2==1?`${e}$`:e,Tn=(e,t,n)=>{i
|
|
|
21
21
|
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(kn.test(i)&&!n.match(An)){let t=r.split(`
|
|
22
22
|
`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(jn.test(i)&&!n.match(Mn)){let t=r.split(`
|
|
23
23
|
`).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}return e},Pn=RegExp(`(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])`,`gu`),Fn=e=>!e||typeof e!=`string`||!e.includes(`~`)?e:e.replace(Pn,(t,n)=>F(e,n)?t:`\\~`),In=e=>{let t=e.match(Mt);if(t){let n=t[2];if(!n||L.test(n))return e;let r=e.lastIndexOf(t[1]);if(F(e,r)||I(e,r))return e;if(e.match(zt)?.length%2==1)return`${e}~~`}else{let t=e.match(Rt);if(t){let n=e.lastIndexOf(t[0].slice(0,2));if(F(e,n)||I(e,n))return e;if(e.match(zt)?.length%2==1)return`${e}~`}}return e},Ln=e=>e!==!1,Rn=e=>e===!0,z={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},zn=[{handler:{name:`singleTilde`,handle:Fn,priority:z.SINGLE_TILDE},optionKey:`singleTilde`},{handler:{name:`comparisonOperators`,handle:Tt,priority:z.COMPARISON_OPERATORS},optionKey:`comparisonOperators`},{handler:{name:`htmlTags`,handle:hn,priority:z.HTML_TAGS},optionKey:`htmlTags`},{handler:{name:`setextHeadings`,handle:Nn,priority:z.SETEXT_HEADINGS},optionKey:`setextHeadings`},{handler:{name:`links`,handle:On,priority:z.LINKS},optionKey:`links`,earlyReturn:e=>e.endsWith(`](streamdown:incomplete-link)`)},{handler:{name:`boldItalic`,handle:pn,priority:z.BOLD_ITALIC},optionKey:`boldItalic`},{handler:{name:`bold`,handle:tn,priority:z.BOLD},optionKey:`bold`},{handler:{name:`italicDoubleUnderscore`,handle:rn,priority:z.ITALIC_DOUBLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`italicSingleAsterisk`,handle:on,priority:z.ITALIC_SINGLE_ASTERISK},optionKey:`italic`},{handler:{name:`italicSingleUnderscore`,handle:un,priority:z.ITALIC_SINGLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`inlineCode`,handle:vn,priority:z.INLINE_CODE},optionKey:`inlineCode`},{handler:{name:`strikethrough`,handle:In,priority:z.STRIKETHROUGH},optionKey:`strikethrough`},{handler:{name:`katex`,handle:Cn,priority:z.KATEX},optionKey:`katex`},{handler:{name:`inlineKatex`,handle:wn,priority:z.INLINE_KATEX},optionKey:`inlineKatex`}],Bn=e=>{let t=e?.linkMode??`protocol`;return zn.filter(({handler:t,optionKey:n})=>t.name===`links`?Ln(e?.links)||Ln(e?.images):t.name===`inlineKatex`?Rn(e?.inlineKatex):Ln(e?.[n])).map(({handler:e,earlyReturn:n})=>e.name===`links`?{handler:xt(bt({},e),{handle:e=>On(e,t)}),earlyReturn:t===`protocol`?n:void 0}:{handler:e,earlyReturn:n})},Vn=(e,t)=>{if(!e||typeof e!=`string`)return e;let n=e.endsWith(` `)&&!e.endsWith(` `)?e.slice(0,-1):e,r=Bn(t),i=(t?.handlers??[]).map(e=>({handler:xt(bt({},e),{priority:e.priority??z.DEFAULT}),earlyReturn:void 0})),a=[...r,...i].sort((e,t)=>(e.handler.priority??0)-(t.handler.priority??0));for(let{handler:e,earlyReturn:t}of a)if(n=e.handle(n),t!=null&&t(n))return n;return n},Hn=t(((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,u=`
|
|
24
|
-
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function ee(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function te(){var e=[];w(e);for(var t;t=ee();)t!==!1&&(e.push(t),w(e));return e}return C(),te()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Un=t((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(Hn());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}})),Wn=t((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))}})),Gn=e(t(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Un()),r=Wn();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}))(),1),Kn={}.hasOwnProperty,qn=new Map,Jn=/[A-Z]/g,Yn=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Xn=new Set([`td`,`th`]),Zn=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Qn(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=lr(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=cr(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`?T:_,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=$n(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function $n(e,t,n){if(t.type===`element`)return er(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return tr(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return rr(e,t,n);if(t.type===`mdxjsEsm`)return nr(e,t);if(t.type===`root`)return ir(e,t,n);if(t.type===`text`)return ar(e,t)}function er(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=T,e.schema=i),e.ancestors.push(t);let a=hr(e,t.tagName,!1),o=ur(e,t),s=fr(e,t);return Yn.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!h(e):!0})),or(e,o,a,t),sr(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function tr(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)}gr(e,t.position)}function nr(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);gr(e,t.position)}function rr(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=T,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:hr(e,t.name,!0),o=dr(e,t),s=fr(e,t);return or(e,o,a,t),sr(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ir(e,t,n){let r={};return sr(r,fr(e,t)),e.create(t,e.Fragment,r,n)}function ar(e,t){return t.value}function or(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function sr(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function cr(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 lr(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=l(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 ur(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Kn.call(t.properties,i)){let a=pr(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Xn.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 dr(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 gr(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 gr(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function fr(e,t){let n=[],r=-1,i=e.passKeys?new Map:qn;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=$n(e,a,o);s!==void 0&&n.push(s)}return n}function pr(e,t,n){let r=se(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ae(n):re(n)),r.property===`style`){let t=typeof n==`object`?n:mr(e,String(n));return e.stylePropertyNameCase===`css`&&(t=_r(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?y[r.property]||r.property:r.attribute,n]}}function mr(e,t){try{return(0,Gn.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new ie("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=Zn+`#cannot-parse-style-attribute`,r}}function hr(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=S(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=S(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Kn.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);gr(e)}function gr(e,t){let n=new ie("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=Zn+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function _r(e){let t={},n;for(n in e)Kn.call(e,n)&&(t[vr(n)]=e[n]);return t}function vr(e){let t=e.replace(Jn,yr);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function yr(e){return`-`+e.toLowerCase()}var br={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`]},B=r(),xr=e(a(),1);function Sr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var V=Sr();function Cr(e){V=e}var wr={exec:()=>null};function H(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(U.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Tr=(()=>{try{return!0}catch{return!1}})(),U={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Er=/^(?:[ \t]*(?:\n|$))+/,Dr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Or=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,kr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ar=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,jr=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Mr=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Nr=H(Mr).replace(/bull/g,jr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Pr=H(Mr).replace(/bull/g,jr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Fr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ir=/^[^\n]+/,Lr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Rr=H(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Lr).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zr=H(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,jr).getRegex(),Br=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Vr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Hr=H(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Vr).replace(`tag`,Br).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ur=H(Fr).replace(`hr`,kr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Br).getRegex(),Wr={blockquote:H(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Ur).getRegex(),code:Dr,def:Rr,fences:Or,heading:Ar,hr:kr,html:Hr,lheading:Nr,list:zr,newline:Er,paragraph:Ur,table:wr,text:Ir},Gr=H(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,kr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Br).getRegex(),Kr={...Wr,lheading:Pr,table:Gr,paragraph:H(Fr).replace(`hr`,kr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Gr).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Br).getRegex()},qr={...Wr,html:H(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Vr).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:wr,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:H(Fr).replace(`hr`,kr).replace(`heading`,` *#{1,6} *[^
|
|
25
|
-
]`).replace(`lheading`,Nr).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Jr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Yr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Xr=/^( {2,}|\\)\n(?!\s*$)/,Zr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Qr=/[\p{P}\p{S}]/u,$r=/[\s\p{P}\p{S}]/u,ei=/[^\s\p{P}\p{S}]/u,ti=H(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,$r).getRegex(),ni=/(?!~)[\p{P}\p{S}]/u,ri=/(?!~)[\s\p{P}\p{S}]/u,ii=/(?:[^\s\p{P}\p{S}]|~)/u,ai=H(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Tr?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),oi=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,si=H(oi,`u`).replace(/punct/g,Qr).getRegex(),ci=H(oi,`u`).replace(/punct/g,ni).getRegex(),li=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,ui=H(li,`gu`).replace(/notPunctSpace/g,ei).replace(/punctSpace/g,$r).replace(/punct/g,Qr).getRegex(),di=H(li,`gu`).replace(/notPunctSpace/g,ii).replace(/punctSpace/g,ri).replace(/punct/g,ni).getRegex(),fi=H(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,ei).replace(/punctSpace/g,$r).replace(/punct/g,Qr).getRegex(),pi=H(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Qr).getRegex(),mi=H(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,ei).replace(/punctSpace/g,$r).replace(/punct/g,Qr).getRegex(),hi=H(/\\(punct)/,`gu`).replace(/punct/g,Qr).getRegex(),gi=H(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),_i=H(Vr).replace(`(?:-->|$)`,`-->`).getRegex(),vi=H(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,_i).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),yi=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,bi=H(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,yi).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xi=H(/^!?\[(label)\]\[(ref)\]/).replace(`label`,yi).replace(`ref`,Lr).getRegex(),Si=H(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Lr).getRegex(),Ci=H(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,xi).replace(`nolink`,Si).getRegex(),wi=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ti={_backpedal:
|
|
24
|
+
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=ee();)t!==!1&&e.push(t);return e}function ee(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function T(){var e=y(),t=S(a);if(t){if(ee(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function te(){var e=[];w(e);for(var t;t=T();)t!==!1&&(e.push(t),w(e));return e}return C(),te()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Un=t((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(Hn());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}})),Wn=t((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))}})),Gn=e(t(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Un()),r=Wn();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}))(),1),Kn={}.hasOwnProperty,qn=new Map,Jn=/[A-Z]/g,Yn=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Xn=new Set([`td`,`th`]),Zn=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Qn(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=lr(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=cr(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`?D:E,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=$n(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function $n(e,t,n){if(t.type===`element`)return er(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return tr(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return rr(e,t,n);if(t.type===`mdxjsEsm`)return nr(e,t);if(t.type===`root`)return ir(e,t,n);if(t.type===`text`)return ar(e,t)}function er(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=D,e.schema=i),e.ancestors.push(t);let a=hr(e,t.tagName,!1),o=ur(e,t),s=fr(e,t);return Yn.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!ie(e):!0})),or(e,o,a,t),sr(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function tr(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)}gr(e,t.position)}function nr(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);gr(e,t.position)}function rr(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=D,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:hr(e,t.name,!0),o=dr(e,t),s=fr(e,t);return or(e,o,a,t),sr(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function ir(e,t,n){let r={};return sr(r,fr(e,t)),e.create(t,e.Fragment,r,n)}function ar(e,t){return t.value}function or(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function sr(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function cr(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 lr(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=T(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 ur(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Kn.call(t.properties,i)){let a=pr(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Xn.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 dr(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 gr(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 gr(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function fr(e,t){let n=[],r=-1,i=e.passKeys?new Map:qn;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=$n(e,a,o);s!==void 0&&n.push(s)}return n}function pr(e,t,n){let r=ne(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?te(n):oe(n)),r.property===`style`){let t=typeof n==`object`?n:mr(e,String(n));return e.stylePropertyNameCase===`css`&&(t=_r(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?re[r.property]||r.property:r.attribute,n]}}function mr(e,t){try{return(0,Gn.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new S("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=Zn+`#cannot-parse-style-attribute`,r}}function hr(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=x(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=x(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Kn.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);gr(e)}function gr(e,t){let n=new S("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=Zn+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function _r(e){let t={},n;for(n in e)Kn.call(e,n)&&(t[vr(n)]=e[n]);return t}function vr(e){let t=e.replace(Jn,yr);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function yr(e){return`-`+e.toLowerCase()}var br={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`]},B=r(),xr=e(a(),1);function Sr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Cr=Sr();function wr(e){Cr=e}var V={exec:()=>null};function H(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(U.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Tr=(()=>{try{return!0}catch{return!1}})(),U={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`),blockquoteBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}>`)},Er=/^(?:[ \t]*(?:\n|$))+/,Dr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Or=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,kr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Ar=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,jr=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Mr=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Nr=H(Mr).replace(/bull/g,jr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Pr=H(Mr).replace(/bull/g,jr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Fr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ir=/^[^\n]+/,Lr=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Rr=H(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Lr).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),zr=H(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,jr).getRegex(),Br=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Vr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Hr=H(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Vr).replace(`tag`,Br).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ur=H(Fr).replace(`hr`,kr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Br).getRegex(),Wr={blockquote:H(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Ur).getRegex(),code:Dr,def:Rr,fences:Or,heading:Ar,hr:kr,html:Hr,lheading:Nr,list:zr,newline:Er,paragraph:Ur,table:V,text:Ir},Gr=H(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,kr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Br).getRegex(),Kr={...Wr,lheading:Pr,table:Gr,paragraph:H(Fr).replace(`hr`,kr).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,Gr).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Br).getRegex()},qr={...Wr,html:H(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Vr).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:V,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:H(Fr).replace(`hr`,kr).replace(`heading`,` *#{1,6} *[^
|
|
25
|
+
]`).replace(`lheading`,Nr).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Jr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Yr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Xr=/^( {2,}|\\)\n(?!\s*$)/,Zr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Qr=/[\p{P}\p{S}]/u,$r=/[\s\p{P}\p{S}]/u,ei=/[^\s\p{P}\p{S}]/u,ti=H(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,$r).getRegex(),ni=/(?!~)[\p{P}\p{S}]/u,ri=/(?!~)[\s\p{P}\p{S}]/u,ii=/(?:[^\s\p{P}\p{S}]|~)/u,ai=H(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Tr?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),oi=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,si=H(oi,`u`).replace(/punct/g,Qr).getRegex(),ci=H(oi,`u`).replace(/punct/g,ni).getRegex(),li=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,ui=H(li,`gu`).replace(/notPunctSpace/g,ei).replace(/punctSpace/g,$r).replace(/punct/g,Qr).getRegex(),di=H(li,`gu`).replace(/notPunctSpace/g,ii).replace(/punctSpace/g,ri).replace(/punct/g,ni).getRegex(),fi=H(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,ei).replace(/punctSpace/g,$r).replace(/punct/g,Qr).getRegex(),pi=H(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Qr).getRegex(),mi=H(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,ei).replace(/punctSpace/g,$r).replace(/punct/g,Qr).getRegex(),hi=H(/\\(punct)/,`gu`).replace(/punct/g,Qr).getRegex(),gi=H(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),_i=H(Vr).replace(`(?:-->|$)`,`-->`).getRegex(),vi=H(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,_i).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),yi=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,bi=H(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,yi).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xi=H(/^!?\[(label)\]\[(ref)\]/).replace(`label`,yi).replace(`ref`,Lr).getRegex(),Si=H(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Lr).getRegex(),Ci=H(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,xi).replace(`nolink`,Si).getRegex(),wi=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ti={_backpedal:V,anyPunctuation:hi,autolink:gi,blockSkip:ai,br:Xr,code:Yr,del:V,delLDelim:V,delRDelim:V,emStrongLDelim:si,emStrongRDelimAst:ui,emStrongRDelimUnd:fi,escape:Jr,link:bi,nolink:Si,punctuation:ti,reflink:xi,reflinkSearch:Ci,tag:vi,text:Zr,url:V},Ei={...Ti,link:H(/^!?\[(label)\]\((.*?)\)/).replace(`label`,yi).getRegex(),reflink:H(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,yi).getRegex()},Di={...Ti,emStrongRDelimAst:di,emStrongLDelim:ci,delLDelim:pi,delRDelim:mi,url:H(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,wi).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:H(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,wi).getRegex()},Oi={...Di,br:H(Xr).replace(`{2,}`,`*`).getRegex(),text:H(Di.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},ki={normal:Wr,gfm:Kr,pedantic:qr},Ai={normal:Ti,gfm:Di,breaks:Oi,pedantic:Ei},ji={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},Mi=e=>ji[e];function W(e,t){if(t){if(U.escapeTest.test(e))return e.replace(U.escapeReplace,Mi)}else if(U.escapeTestNoEncode.test(e))return e.replace(U.escapeReplaceNoEncode,Mi);return e}function Ni(e){try{e=encodeURI(e).replace(U.percentDecode,`%`)}catch{return null}return e}function Pi(e,t){let n=e.replace(U.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(U.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(U.slashPipe,`|`);return n}function Fi(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Ii(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Li(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function Ri(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function zi(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
26
26
|
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
27
|
-
`)}var Bi=class{options;rules;lexer;constructor(e){this.options=e||
|
|
27
|
+
`)}var Bi=class{options;rules;lexer;constructor(e){this.options=e||Cr}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:Fi(e,`
|
|
28
28
|
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=zi(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Fi(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Fi(t[0],`
|
|
29
29
|
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Fi(t[0],`
|
|
30
30
|
`).split(`
|
|
@@ -46,7 +46,7 @@ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
46
46
|
`+l}u=!l.trim(),r+=p+`
|
|
47
47
|
`,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),e.task){if(e.text=e.text.replace(this.rules.other.listReplaceTask,``),e.tokens[0]?.type===`text`||e.tokens[0]?.type===`paragraph`){e.tokens[0].raw=e.tokens[0].raw.replace(this.rules.other.listReplaceTask,``),e.tokens[0].text=e.tokens[0].text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}}let t=this.rules.other.listTaskCheckbox.exec(e.raw);if(t){let n={type:`checkbox`,raw:t[0]+` `,checked:t[0]!==`[ ]`};e.checked=n.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=n.raw+e.tokens[0].raw,e.tokens[0].text=n.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(n)):e.tokens.unshift({type:`paragraph`,raw:n.raw,text:n.raw,tokens:[n]}):e.tokens.unshift(n)}}if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Pi(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
48
48
|
`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Pi(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
49
|
-
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Fi(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Ii(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Ri(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Ri(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},G=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||
|
|
49
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Fi(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Ii(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Ri(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Ri(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},G=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Cr,this.options.tokenizer=this.options.tokenizer||new Bi,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:U,block:ki.normal,inline:Ai.normal};this.options.pedantic?(t.block=ki.pedantic,t.inline=Ai.pedantic):this.options.gfm&&(t.block=ki.gfm,this.options.breaks?t.inline=Ai.breaks:t.inline=Ai.gfm),this.tokenizer.rules=t}static get rules(){return{block:ki,inline:Ai}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(U.carriageReturn,`
|
|
50
50
|
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(U.tabCharGlobal,` `).replace(U.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
|
|
51
51
|
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
52
52
|
`)?``:`
|
|
@@ -60,7 +60,7 @@ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTo
|
|
|
60
60
|
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
61
61
|
`)?``:`
|
|
62
62
|
`)+r.raw,n.text+=`
|
|
63
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},Vi=class{options;parser;constructor(e){this.options=e||
|
|
63
|
+
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},Vi=class{options;parser;constructor(e){this.options=e||Cr}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(U.notSpaceStart)?.[0],i=e.replace(U.endingNewline,``)+`
|
|
64
64
|
`;return r?`<pre><code class="language-`+W(r)+`">`+(n?i:W(i,!0))+`</code></pre>
|
|
65
65
|
`:`<pre><code>`+(n?i:W(i,!0))+`</code></pre>
|
|
66
66
|
`}blockquote({tokens:e}){return`<blockquote>
|
|
@@ -78,19 +78,19 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
78
78
|
`}tablerow({text:e}){return`<tr>
|
|
79
79
|
${e}</tr>
|
|
80
80
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
81
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${W(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Ni(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+W(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Ni(e);if(i===null)return W(n);e=i;let a=`<img src="${e}" alt="${W(n)}"`;return t&&(a+=` title="${W(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:W(e.text)}},Hi=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},K=class e{options;renderer;textRenderer;constructor(e){this.options=e||
|
|
82
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+W(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function J(e,t){return q.parse(e,t)}J.options=J.setOptions=function(e){return q.setOptions(e),J.defaults=q.defaults,
|
|
81
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${W(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Ni(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+W(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Ni(e);if(i===null)return W(n);e=i;let a=`<img src="${e}" alt="${W(n)}"`;return t&&(a+=` title="${W(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:W(e.text)}},Hi=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},K=class e{options;renderer;textRenderer;constructor(e){this.options=e||Cr,this.options.renderer=this.options.renderer||new Vi,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Hi}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Ui=class{options;block;constructor(e){this.options=e||Cr}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?G.lex:G.lexInline}provideParser(e=this.block){return e?K.parse:K.parseInline}},q=new class{defaults=Sr();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=K;Renderer=Vi;TextRenderer=Hi;Lexer=G;Tokenizer=Bi;Hooks=Ui;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Vi(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Bi(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Ui;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];Ui.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&Ui.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return G.lex(e,t??this.defaults)}parser(e,t){return K.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?G.lex:G.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?K.parse:K.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?G.lex:G.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?K.parse:K.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
82
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+W(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function J(e,t){return q.parse(e,t)}J.options=J.setOptions=function(e){return q.setOptions(e),J.defaults=q.defaults,wr(J.defaults),J},J.getDefaults=Sr,J.defaults=Cr,J.use=function(...e){return q.use(...e),J.defaults=q.defaults,wr(J.defaults),J},J.walkTokens=function(e,t){return q.walkTokens(e,t)},J.parseInline=q.parseInline,J.Parser=K,J.parser=K.parse,J.Renderer=Vi,J.TextRenderer=Hi,J.Lexer=G,J.lexer=G.lex,J.Tokenizer=Bi,J.Hooks=Ui,J.parse=J,J.options,J.setOptions,J.use,J.walkTokens,J.parseInline,K.parse,G.lex;var Wi=300,Gi=`300px`,Ki=500;function qi(e={}){let{immediate:t=!1,debounceDelay:n=Wi,rootMargin:r=Gi,idleTimeout:i=Ki}=e,[a,o]=(0,O.useState)(!1),s=(0,O.useRef)(null),c=(0,O.useRef)(null),l=(0,O.useRef)(null),u=(0,O.useMemo)(()=>e=>{let t=Date.now();return window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},[]),d=(0,O.useMemo)(()=>typeof window<`u`&&window.requestIdleCallback?(e,t)=>window.requestIdleCallback(e,t):u,[u]),f=(0,O.useMemo)(()=>typeof window<`u`&&window.cancelIdleCallback?e=>window.cancelIdleCallback(e):e=>{clearTimeout(e)},[]);return(0,O.useEffect)(()=>{if(t){o(!0);return}let e=s.current;if(!e)return;c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null);let a=()=>{c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null)},u=e=>{l.current=d(t=>{t.timeRemaining()>0||t.didTimeout?(o(!0),e.disconnect()):l.current=d(()=>{o(!0),e.disconnect()},{timeout:i/2})},{timeout:i})},p=e=>{a(),c.current=window.setTimeout(()=>{var t;let n=e.takeRecords();(n.length===0||(t=n.at(-1)?.isIntersecting)!=null&&t)&&u(e)},n)},m=(e,t)=>{e.isIntersecting?p(t):a()},h=new IntersectionObserver(e=>{for(let t of e)m(t,h)},{rootMargin:r,threshold:0});return h.observe(e),()=>{c.current&&clearTimeout(c.current),l.current&&f(l.current),h.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:s}}var Ji=/\s/,Yi=/^\s+$/,Xi=new Set([`code`,`pre`,`svg`,`math`,`annotation`]),Zi=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`element`,Qi=e=>e.some(e=>Zi(e)&&Xi.has(e.tagName)),$i=e=>{let t=[],n=``,r=!1;for(let i of e){let e=Ji.test(i);e!==r&&n&&(t.push(n),n=``),n+=i,r=e}return n&&t.push(n),t},ea=e=>{let t=[],n=``;for(let r of e)Ji.test(r)?n+=r:(n&&=(t.push(n),``),t.push(r));return n&&t.push(n),t},ta=(e,t,n,r,i,a)=>{let o=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return a&&(o+=`;--sd-delay:${a}ms`),{type:`element`,tagName:`span`,properties:{"data-sd-animate":!0,style:o},children:[{type:`text`,value:e}]}},na=(e,t,n,r,i)=>{let a=t.at(-1);if(!(a&&`children`in a))return;if(Qi(t))return u;let o=a,s=o.children.indexOf(e);if(s===-1)return;let c=e.value;if(!c.trim()){i.count+=c.length;return}let l=n.sep===`char`?ea(c):$i(c),d=r.prevContentLength,f=l.map(e=>{let t=i.count;if(i.count+=e.length,Yi.test(e))return{type:`text`,value:e};let r=d>0&&t<d,a=r?0:i.newIndex++*n.stagger;return ta(e,n.animation,n.duration,n.easing,r,a)});return o.children.splice(s,1,...f),s+f.length},ra=0;function ia(e){let t={animation:e?.animation??`fadeIn`,duration:e?.duration??150,easing:e?.easing??`ease`,sep:e?.sep??`word`,stagger:e?.stagger??40},n={prevContentLength:0,lastRenderCharCount:0},r=ra++,i=()=>e=>{let r={count:0,newIndex:0};m(e,`text`,(e,i)=>na(e,i,t,n,r)),n.lastRenderCharCount=r.count,n.prevContentLength=0};return Object.defineProperty(i,`name`,{value:`rehypeAnimate$${r}`}),{name:`animate`,type:`animate`,rehypePlugin:i,setPrevContentLength(e){n.prevContentLength=e},getLastRenderCharCount(){let e=n.lastRenderCharCount;return n.lastRenderCharCount=0,e}}}ia();var aa=(0,O.createContext)(!1),oa=()=>(0,O.useContext)(aa),sa=(...e)=>s(o(e)),ca=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(t=>t.startsWith(n)?t:`${e}:${t}`).join(` `)},la=e=>e?(...t)=>ca(e,s(o(t))):sa,ua=(e,t,n)=>{let r=typeof t==`string`&&n.startsWith(`text/csv`)?``:``,i=typeof t==`string`?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},da=(0,O.createContext)(sa),Y=()=>(0,O.useContext)(da),fa=sa(`block`,`before:content-[counter(line)]`,`before:inline-block`,`before:[counter-increment:line]`,`before:w-6`,`before:mr-4`,`before:text-[13px]`,`before:text-right`,`before:text-muted-foreground/50`,`before:font-mono`,`before:select-none`),pa=e=>{let t={};for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e>0){let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();r&&i&&(t[r]=i)}}return t},ma=(0,O.memo)(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:a=!0,...o})=>{let s=Y(),c=(0,O.useMemo)(()=>s(fa),[s]),l=(0,O.useMemo)(()=>{let e={};return t.bg&&(e[`--sdm-bg`]=t.bg),t.fg&&(e[`--sdm-fg`]=t.fg),t.rootStyle&&Object.assign(e,pa(t.rootStyle)),e},[t.bg,t.fg,t.rootStyle]);return(0,B.jsx)(`div`,{className:s(r,`overflow-x-auto rounded-md border border-border bg-background p-4 text-sm`),"data-language":n,"data-streamdown":`code-block-body`,...o,children:(0,B.jsx)(`pre`,{className:s(r,`bg-[var(--sdm-bg,inherit]`,`dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]`),style:l,children:(0,B.jsx)(`code`,{className:a?s(`[counter-increment:line_0] [counter-reset:line]`):void 0,style:a&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((e,t)=>(0,B.jsx)(`span`,{className:a?c:void 0,children:e.length===0||e.length===1&&e[0].content===``?`
|
|
83
83
|
`:e.map((e,t)=>{let n={},r=!!e.bgColor;if(e.color&&(n[`--sdm-c`]=e.color),e.bgColor&&(n[`--sdm-tbg`]=e.bgColor),e.htmlStyle)for(let[t,i]of Object.entries(e.htmlStyle))t===`color`?n[`--sdm-c`]=i:t===`background-color`?(n[`--sdm-tbg`]=i,r=!0):n[t]=i;return(0,B.jsx)(`span`,{className:s(`text-[var(--sdm-c,inherit)]`,`dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]`,r&&`bg-[var(--sdm-tbg)]`,r&&`dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]`),style:n,...e.htmlAttrs,children:e.content},t)})},t))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),ha=({className:e,language:t,style:n,isIncomplete:r,...i})=>(0,B.jsx)(`div`,{className:Y()(`my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":`code-block`,style:{contentVisibility:`auto`,containIntrinsicSize:`auto 200px`,...n},...i}),ga=(0,O.createContext)({code:``}),_a=()=>(0,O.useContext)(ga),va=({language:e})=>{let t=Y();return(0,B.jsx)(`div`,{className:t(`flex h-8 items-center text-muted-foreground text-xs`),"data-language":e,"data-streamdown":`code-block-header`,children:(0,B.jsx)(`span`,{className:t(`ml-1 font-mono lowercase`),children:e})})},ya=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
84
|
-
`;)t--;return e.slice(0,t)},ba=(0,O.lazy)(()=>n(()=>import(`./highlighted-body-OFNGDK62-
|
|
84
|
+
`;)t--;return e.slice(0,t)},ba=(0,O.lazy)(()=>n(()=>import(`./highlighted-body-OFNGDK62-BaYzQjQZ.js`).then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([0,1,2,3]),import.meta.url)),xa=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:o,...s})=>{let c=Y(),l=(0,O.useMemo)(()=>ya(e),[e]),u=(0,O.useMemo)(()=>({bg:`transparent`,fg:`inherit`,tokens:l.split(`
|
|
85
85
|
`).map(e=>[{content:e,color:`inherit`,bgColor:`transparent`,htmlStyle:{},offset:0}])}),[l]);return(0,B.jsx)(ga.Provider,{value:{code:e},children:(0,B.jsxs)(ha,{isIncomplete:i,language:t,children:[(0,B.jsx)(va,{language:t}),r?(0,B.jsx)(`div`,{className:c(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,B.jsx)(`div`,{className:c(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`code-block-actions`,children:r})}):null,(0,B.jsx)(O.Suspense,{fallback:(0,B.jsx)(ma,{className:n,language:t,lineNumbers:o,result:u,startLine:a,...s}),children:(0,B.jsx)(ba,{className:n,code:l,language:t,lineNumbers:o,raw:u,startLine:a,...s})})]})})},Sa={CheckIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z`,fill:`currentColor`,fillRule:`evenodd`})}),CopyIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),DownloadIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),ExternalLinkIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z`,fill:`currentColor`,fillRule:`evenodd`})}),Loader2Icon:e=>(0,B.jsxs)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:[(0,B.jsx)(`path`,{d:`M8 0V4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M8 16V12`,opacity:`0.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M3.29773 1.52783L5.64887 4.7639`,opacity:`0.9`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M12.7023 1.52783L10.3511 4.7639`,opacity:`0.1`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M12.7023 14.472L10.3511 11.236`,opacity:`0.4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M3.29773 14.472L5.64887 11.236`,opacity:`0.6`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M15.6085 5.52783L11.8043 6.7639`,opacity:`0.2`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M0.391602 10.472L4.19583 9.23598`,opacity:`0.7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M15.6085 10.4722L11.8043 9.2361`,opacity:`0.3`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,B.jsx)(`path`,{d:`M0.391602 5.52783L4.19583 6.7639`,opacity:`0.8`,stroke:`currentColor`,strokeWidth:`1.5`})]}),Maximize2Icon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z`,fill:`currentColor`,fillRule:`evenodd`})}),RotateCcwIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z`,fill:`currentColor`,fillRule:`evenodd`})}),XIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomInIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomOutIcon:e=>(0,B.jsx)(`svg`,{color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,B.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})})},Ca=(0,O.createContext)(Sa),wa=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length?n.every(n=>e[n]===t[n]):!1},Ta=({icons:e,children:t})=>{let n=(0,O.useRef)(e),r=(0,O.useRef)(e?{...Sa,...e}:Sa);wa(n.current,e)||(n.current=e,r.current=e?{...Sa,...e}:Sa);let i=r.current;return(0,B.jsx)(Ca.Provider,{value:i,children:t})},X=()=>(0,O.useContext)(Ca),Ea={copyCode:`Copy Code`,downloadFile:`Download file`,downloadDiagram:`Download diagram`,downloadDiagramAsSvg:`Download diagram as SVG`,downloadDiagramAsPng:`Download diagram as PNG`,downloadDiagramAsMmd:`Download diagram as MMD`,viewFullscreen:`View fullscreen`,exitFullscreen:`Exit fullscreen`,mermaidFormatSvg:`SVG`,mermaidFormatPng:`PNG`,mermaidFormatMmd:`MMD`,copyTable:`Copy table`,copyTableAsMarkdown:`Copy table as Markdown`,copyTableAsCsv:`Copy table as CSV`,copyTableAsTsv:`Copy table as TSV`,downloadTable:`Download table`,downloadTableAsCsv:`Download table as CSV`,downloadTableAsMarkdown:`Download table as Markdown`,tableFormatMarkdown:`Markdown`,tableFormatCsv:`CSV`,tableFormatTsv:`TSV`,imageNotAvailable:`Image not available`,downloadImage:`Download image`,openExternalLink:`Open external link?`,externalLinkWarning:`You're about to visit an external website.`,close:`Close`,copyLink:`Copy link`,copied:`Copied`,openLink:`Open link`},Da=(0,O.createContext)(Ea),Z=()=>(0,O.useContext)(Da),Oa=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let s=Y(),[c,l]=(0,O.useState)(!1),u=(0,O.useRef)(0),{code:d}=_a(),{isAnimating:f}=(0,O.useContext)($),p=Z(),m=a??d,h=async()=>{var r;if(typeof window>`u`||!((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText)){t?.(Error(`Clipboard API not available`));return}try{c||(await navigator.clipboard.writeText(m),l(!0),e?.(),u.current=window.setTimeout(()=>l(!1),n))}catch(e){t?.(e)}};(0,O.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let g=X(),_=c?g.CheckIcon:g.CopyIcon;return(0,B.jsx)(`button`,{className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-copy-button`,disabled:f,onClick:h,title:p.copyCode,type:`button`,...o,children:r??(0,B.jsx)(_,{size:14})})},ka={"1c":`1c`,"1c-query":`1cq`,abap:`abap`,"actionscript-3":`as`,ada:`ada`,adoc:`adoc`,"angular-html":`html`,"angular-ts":`ts`,apache:`conf`,apex:`cls`,apl:`apl`,applescript:`applescript`,ara:`ara`,asciidoc:`adoc`,asm:`asm`,astro:`astro`,awk:`awk`,ballerina:`bal`,bash:`sh`,bat:`bat`,batch:`bat`,be:`be`,beancount:`beancount`,berry:`berry`,bibtex:`bib`,bicep:`bicep`,blade:`blade.php`,bsl:`bsl`,c:`c`,"c#":`cs`,"c++":`cpp`,cadence:`cdc`,cairo:`cairo`,cdc:`cdc`,clarity:`clar`,clj:`clj`,clojure:`clj`,"closure-templates":`soy`,cmake:`cmake`,cmd:`cmd`,cobol:`cob`,codeowners:`CODEOWNERS`,codeql:`ql`,coffee:`coffee`,coffeescript:`coffee`,"common-lisp":`lisp`,console:`sh`,coq:`v`,cpp:`cpp`,cql:`cql`,crystal:`cr`,cs:`cs`,csharp:`cs`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cql`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,docker:`dockerfile`,dockerfile:`dockerfile`,dotenv:`env`,"dream-maker":`dm`,edge:`edge`,elisp:`el`,elixir:`ex`,elm:`elm`,"emacs-lisp":`el`,erb:`erb`,erl:`erl`,erlang:`erl`,f:`f`,"f#":`fs`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`f90`,f95:`f95`,fennel:`fnl`,fish:`fish`,fluent:`ftl`,for:`for`,"fortran-fixed-form":`f`,"fortran-free-form":`f90`,fs:`fs`,fsharp:`fs`,fsl:`fsl`,ftl:`ftl`,gdresource:`tres`,gdscript:`gd`,gdshader:`gdshader`,genie:`gs`,gherkin:`feature`,"git-commit":`gitcommit`,"git-rebase":`gitrebase`,gjs:`js`,gleam:`gleam`,"glimmer-js":`js`,"glimmer-ts":`ts`,glsl:`glsl`,gnuplot:`plt`,go:`go`,gql:`gql`,graphql:`graphql`,groovy:`groovy`,gts:`gts`,hack:`hack`,haml:`haml`,handlebars:`hbs`,haskell:`hs`,haxe:`hx`,hbs:`hbs`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,hs:`hs`,html:`html`,"html-derivative":`html`,http:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,jade:`jade`,java:`java`,javascript:`js`,jinja:`jinja`,jison:`jison`,jl:`jl`,js:`js`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,julia:`jl`,kotlin:`kt`,kql:`kql`,kt:`kt`,kts:`kts`,kusto:`kql`,latex:`tex`,lean:`lean`,lean4:`lean`,less:`less`,liquid:`liquid`,lisp:`lisp`,lit:`lit`,llvm:`ll`,log:`log`,logo:`logo`,lua:`lua`,luau:`luau`,make:`mak`,makefile:`mak`,markdown:`md`,marko:`marko`,matlab:`m`,md:`md`,mdc:`mdc`,mdx:`mdx`,mediawiki:`wiki`,mermaid:`mmd`,mips:`s`,mipsasm:`s`,mmd:`mmd`,mojo:`mojo`,move:`move`,nar:`nar`,narrat:`narrat`,nextflow:`nf`,nf:`nf`,nginx:`conf`,nim:`nim`,nix:`nix`,nu:`nu`,nushell:`nu`,objc:`m`,"objective-c":`m`,"objective-cpp":`mm`,ocaml:`ml`,pascal:`pas`,perl:`pl`,perl6:`p6`,php:`php`,plsql:`pls`,po:`po`,polar:`polar`,postcss:`pcss`,pot:`pot`,potx:`potx`,powerquery:`pq`,powershell:`ps1`,prisma:`prisma`,prolog:`pl`,properties:`properties`,proto:`proto`,protobuf:`proto`,ps:`ps`,ps1:`ps1`,pug:`pug`,puppet:`pp`,purescript:`purs`,py:`py`,python:`py`,ql:`ql`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,racket:`rkt`,raku:`raku`,razor:`cshtml`,rb:`rb`,reg:`reg`,regex:`regex`,regexp:`regexp`,rel:`rel`,riscv:`s`,rs:`rs`,rst:`rst`,ruby:`rb`,rust:`rs`,sas:`sas`,sass:`sass`,scala:`scala`,scheme:`scm`,scss:`scss`,sdbl:`sdbl`,sh:`sh`,shader:`shader`,shaderlab:`shader`,shell:`sh`,shellscript:`sh`,shellsession:`sh`,smalltalk:`st`,solidity:`sol`,soy:`soy`,sparql:`rq`,spl:`spl`,splunk:`spl`,sql:`sql`,"ssh-config":`config`,stata:`do`,styl:`styl`,stylus:`styl`,svelte:`svelte`,swift:`swift`,"system-verilog":`sv`,systemd:`service`,talon:`talon`,talonscript:`talon`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,terraform:`tf`,tex:`tex`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`ts`,"ts-tags":`ts`,tsp:`tsp`,tsv:`tsv`,tsx:`tsx`,turtle:`ttl`,twig:`twig`,typ:`typ`,typescript:`ts`,typespec:`tsp`,typst:`typ`,v:`v`,vala:`vala`,vb:`vb`,verilog:`v`,vhdl:`vhdl`,vim:`vim`,viml:`vim`,vimscript:`vim`,vue:`vue`,"vue-html":`html`,"vue-vine":`vine`,vy:`vy`,vyper:`vy`,wasm:`wasm`,wenyan:`wy`,wgsl:`wgsl`,wiki:`wiki`,wikitext:`wiki`,wit:`wit`,wl:`wl`,wolfram:`wl`,xml:`xml`,xsl:`xsl`,yaml:`yaml`,yml:`yml`,zenscript:`zs`,zig:`zig`,zsh:`zsh`,文言:`wy`},Aa=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let s=Y(),{code:c}=_a(),{isAnimating:l}=(0,O.useContext)($),u=Z(),d=X(),f=a??c,p=`file.${n&&n in ka?ka[n]:`txt`}`;return(0,B.jsx)(`button`,{className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-download-button`,disabled:l,onClick:()=>{try{ua(p,f,`text/plain`),e?.()}catch(e){t?.(e)}},title:u.downloadFile,type:`button`,...o,children:r??(0,B.jsx)(d.DownloadIcon,{size:14})})},ja=()=>{let{Loader2Icon:e}=X(),t=Y();return(0,B.jsxs)(`div`,{className:t(`w-full divide-y divide-border overflow-hidden rounded-xl border border-border`),children:[(0,B.jsx)(`div`,{className:t(`h-[46px] w-full bg-muted/80`)}),(0,B.jsx)(`div`,{className:t(`flex w-full items-center justify-center p-4`),children:(0,B.jsx)(e,{className:t(`size-4 animate-spin`)})})]})},Ma=/\.[^/.]+$/,Na=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,...o})=>{let{DownloadIcon:s}=X(),c=Y(),l=(0,O.useRef)(null),[u,d]=(0,O.useState)(!1),[f,p]=(0,O.useState)(!1),m=Z(),h=o.width!=null||o.height!=null,g=(u||h)&&!f,_=f&&!h;(0,O.useEffect)(()=>{let e=l.current;if(e!=null&&e.complete){let t=e.naturalWidth>0;d(t),p(!t)}},[]);let v=(0,O.useCallback)(e=>{d(!0),p(!1),i?.(e)},[i]),y=(0,O.useCallback)(e=>{d(!1),p(!0),a?.(e)},[a]),b=async()=>{if(n)try{let e=await(await fetch(n)).blob(),t=new URL(n,window.location.origin).pathname.split(`/`).pop()||``,i=t.split(`.`).pop(),a=t.includes(`.`)&&i!==void 0&&i.length<=4,o=``;if(a)o=t;else{let n=e.type,i=`png`;n.includes(`jpeg`)||n.includes(`jpg`)?i=`jpg`:n.includes(`png`)?i=`png`:n.includes(`svg`)?i=`svg`:n.includes(`gif`)?i=`gif`:n.includes(`webp`)&&(i=`webp`),o=`${(r||t||`image`).replace(Ma,``)}.${i}`}ua(o,e,e.type)}catch{window.open(n,`_blank`)}};return n?(0,B.jsxs)(`div`,{className:c(`group relative my-4 inline-block`),"data-streamdown":`image-wrapper`,children:[(0,B.jsx)(`img`,{alt:r,className:c(`max-w-full rounded-lg`,_&&`hidden`,t),"data-streamdown":`image`,onError:y,onLoad:v,ref:l,src:n,...o}),_&&(0,B.jsx)(`span`,{className:c(`text-muted-foreground text-xs italic`),"data-streamdown":`image-fallback`,children:m.imageNotAvailable}),(0,B.jsx)(`div`,{className:c(`pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block`)}),g&&(0,B.jsx)(`button`,{className:c(`absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background`,`opacity-0 group-hover:opacity-100`),onClick:b,title:m.downloadImage,type:`button`,children:(0,B.jsx)(s,{size:14})})]}):null},Pa=0,Fa=()=>{Pa+=1,Pa===1&&(document.body.style.overflow=`hidden`)},Ia=()=>{Pa=Math.max(0,Pa-1),Pa===0&&(document.body.style.overflow=``)},La=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=X(),c=Y(),[l,u]=(0,O.useState)(!1),d=Z(),f=(0,O.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)}catch{}},[e]),p=(0,O.useCallback)(()=>{r(),n()},[r,n]);return(0,O.useEffect)(()=>{if(t){Fa();let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),Ia()}}},[t,n]),t?(0,B.jsx)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm`),"data-streamdown":`link-safety-modal`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`button`,tabIndex:0,children:(0,B.jsxs)(`div`,{className:c(`relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,B.jsx)(`button`,{className:c(`absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:n,title:d.close,type:`button`,children:(0,B.jsx)(s,{size:16})}),(0,B.jsxs)(`div`,{className:c(`flex flex-col gap-2`),children:[(0,B.jsxs)(`div`,{className:c(`flex items-center gap-2 font-semibold text-lg`),children:[(0,B.jsx)(o,{size:20}),(0,B.jsx)(`span`,{children:d.openExternalLink})]}),(0,B.jsx)(`p`,{className:c(`text-muted-foreground text-sm`),children:d.externalLinkWarning})]}),(0,B.jsx)(`div`,{className:c(`break-all rounded-md bg-muted p-3 font-mono text-sm`,e.length>100&&`max-h-32 overflow-y-auto`),children:e}),(0,B.jsxs)(`div`,{className:c(`flex gap-2`),children:[(0,B.jsx)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted`),onClick:f,type:`button`,children:l?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(i,{size:14}),(0,B.jsx)(`span`,{children:d.copied})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(a,{size:14}),(0,B.jsx)(`span`,{children:d.copyLink})]})}),(0,B.jsxs)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90`),onClick:p,type:`button`,children:[(0,B.jsx)(o,{size:14}),(0,B.jsx)(`span`,{children:d.openLink})]})]})]})}):null},Ra=(0,O.createContext)(null),za=()=>(0,O.useContext)(Ra),Ba=()=>za()?.code??null,Va=()=>za()?.mermaid??null,Ha=e=>{var t;let n=za();return n!=null&&n.renderers&&e&&(t=n.renderers.find(t=>Array.isArray(t.language)?t.language.includes(e):t.language===e))!=null?t:null},Ua=(e,t)=>new Promise((t,n)=>{let r=`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{let e=document.createElement(`canvas`),r=i.width*5,a=i.height*5;e.width=r,e.height=a;let o=e.getContext(`2d`);if(!o){n(Error(`Failed to create 2D canvas context for PNG export`));return}o.drawImage(i,0,0,r,a),e.toBlob(e=>{if(!e){n(Error(`Failed to create PNG blob`));return}t(e)},`image/png`)},i.onerror=()=>n(Error(`Failed to load SVG image`)),i.src=r}),Wa=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let o=Y(),[s,c]=(0,O.useState)(!1),l=(0,O.useRef)(null),{isAnimating:u}=(0,O.useContext)($),d=X(),f=Va(),p=Z(),m=async t=>{try{if(t===`mmd`){ua(`diagram.mmd`,e,`text/plain`),c(!1),r?.(t);return}if(!f){a?.(Error(`Mermaid plugin not available`));return}let n=f.getMermaid(i),o=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),s=`mermaid-${Math.abs(o)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await n.render(s,e);if(!l){a?.(Error(`SVG not found. Please wait for the diagram to render.`));return}if(t===`svg`){ua(`diagram.svg`,l,`image/svg+xml`),c(!1),r?.(t);return}if(t===`png`){ua(`diagram.png`,await Ua(l),`image/png`),r?.(t),c(!1);return}}catch(e){a?.(e)}};return(0,O.useEffect)(()=>{let e=e=>{let t=e.composedPath();l.current&&!t.includes(l.current)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,B.jsxs)(`div`,{className:o(`relative`),ref:l,children:[(0,B.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,n),disabled:u,onClick:()=>c(!s),title:p.downloadDiagram,type:`button`,children:t??(0,B.jsx)(d.DownloadIcon,{size:14})}),s?(0,B.jsxs)(`div`,{className:o(`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,B.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`svg`),title:p.downloadDiagramAsSvg,type:`button`,children:p.mermaidFormatSvg}),(0,B.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`png`),title:p.downloadDiagramAsPng,type:`button`,children:p.mermaidFormatPng}),(0,B.jsx)(`button`,{className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`mmd`),title:p.downloadDiagramAsMmd,type:`button`,children:p.mermaidFormatMmd})]}):null]})},Ga=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=X(),c=Y(),[l,u]=(0,O.useState)(!1),{isAnimating:d,controls:f}=(0,O.useContext)($),p=Z(),m=(()=>{if(typeof f==`boolean`)return f;let e=f.mermaid;return e===!1?!1:e===!0||e===void 0?!0:e.panZoom!==!1})(),h=()=>{u(!l)};return(0,O.useEffect)(()=>{if(l){Fa();let e=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),Ia()}}},[l]),(0,O.useEffect)(()=>{l?n?.():r&&r()},[l,n,r]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`button`,{className:c(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),disabled:d,onClick:h,title:p.viewFullscreen,type:`button`,...a,children:(0,B.jsx)(o,{size:14})}),l?(0,xr.createPortal)((0,B.jsxs)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm`),onClick:h,onKeyDown:e=>{e.key===`Escape`&&h()},role:`button`,tabIndex:0,children:[(0,B.jsx)(`button`,{className:c(`absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:h,title:p.exitFullscreen,type:`button`,children:(0,B.jsx)(s,{size:20})}),(0,B.jsx)(`div`,{className:c(`flex size-full items-center justify-center p-4`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:(0,B.jsx)(Ls,{chart:e,className:c(`size-full [&_svg]:h-auto [&_svg]:w-auto`),config:t,fullscreen:!0,showControls:m})})]}),document.body):null]})},Ka=e=>{let t=[],n=[],r=e.querySelectorAll(`thead th`);for(let e of r)t.push(e.textContent?.trim()||``);let i=e.querySelectorAll(`tbody tr`);for(let e of i){let t=[],r=e.querySelectorAll(`td`);for(let e of r)t.push(e.textContent?.trim()||``);n.push(t)}return{headers:t,rows:n}},qa=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1,n=!1;for(let r of e){if(r===`"`){t=!0,n=!0;break}(r===`,`||r===`
|
|
86
86
|
`)&&(t=!0)}return t?n?`"${e.replace(/"/g,`""`)}"`:`"${e}"`:e},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(`,`),o+=1);for(let e of n)a[o]=e.map(r).join(`,`),o+=1;return a.join(`
|
|
87
87
|
`)},Ja=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n of e)if(n===` `||n===`
|
|
88
88
|
`||n===`\r`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===` `?n.push(`\\t`):t===`
|
|
89
89
|
`?n.push(`\\n`):t===`\r`?n.push(`\\r`):n.push(t);return n.join(``)},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(` `),o+=1);for(let e of n)a[o]=e.map(r).join(` `),o+=1;return a.join(`
|
|
90
90
|
`)},Ya=e=>{let t=!1;for(let n of e)if(n===`\\`||n===`|`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===`\\`?n.push(`\\\\`):t===`|`?n.push(`\\|`):n.push(t);return n.join(``)},Xa=e=>{let{headers:t,rows:n}=e;if(t.length===0)return``;let r=Array(n.length+2),i=0;r[i]=`| ${t.map(e=>Ya(e)).join(` | `)} |`,i+=1;let a=Array(t.length);for(let e=0;e<t.length;e+=1)a[e]=`---`;r[i]=`| ${a.join(` | `)} |`,i+=1;for(let e of n)if(e.length<t.length){let n=Array(t.length);for(let r=0;r<t.length;r+=1)n[r]=r<e.length?Ya(e[r]):``;r[i]=`| ${n.join(` | `)} |`,i+=1}else r[i]=`| ${e.map(e=>Ya(e)).join(` | `)} |`,i+=1;return r.join(`
|
|
91
|
-
`)},Za=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=Y(),[o,s]=(0,O.useState)(!1),[c,l]=(0,O.useState)(!1),u=(0,O.useRef)(null),d=(0,O.useRef)(0),{isAnimating:f}=(0,O.useContext)($),p=Z(),m=async e=>{var t;if(typeof window>`u`||!((t=navigator==null?void 0:navigator.clipboard)!=null&&t.write)){r?.(Error(`Clipboard API not available`));return}try{let t=(u.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let a=Ka(t),o=({csv:qa,tsv:Ja,md:Xa}[e]||Xa)(a),c=new ClipboardItem({"text/plain":new Blob([o],{type:`text/plain`}),"text/html":new Blob([t.outerHTML],{type:`text/html`})});await navigator.clipboard.write([c]),l(!0),s(!1),n?.(e),d.current=window.setTimeout(()=>l(!1),i)}catch(e){r?.(e)}};(0,O.useEffect)(()=>{let e=e=>{let t=e.composedPath();u.current&&!t.includes(u.current)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e),window.clearTimeout(d.current)}},[]);let h=X(),g=c?h.CheckIcon:h.CopyIcon;return(0,B.jsxs)(`div`,{className:a(`relative`),ref:u,children:[(0,B.jsx)(`button`,{className:a(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:f,onClick:()=>s(!o),title:p.copyTable,type:`button`,children:e??(0,B.jsx)(g,{height:14,width:14})}),o?(0,B.jsxs)(`div`,{className:a(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,B.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`md`),title:p.copyTableAsMarkdown,type:`button`,children:p.tableFormatMarkdown}),(0,B.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`csv`),title:p.copyTableAsCsv,type:`button`,children:p.tableFormatCsv}),(0,B.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`tsv`),title:p.copyTableAsTsv,type:`button`,children:p.tableFormatTsv})]}):null]})},Qa=({children:e,className:t,onDownload:n,onError:r})=>{let i=Y(),[a,o]=(0,O.useState)(!1),s=(0,O.useRef)(null),{isAnimating:c}=(0,O.useContext)($),l=Z(),u=X(),d=e=>{try{let t=(s.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=Ka(t),a=e===`csv`?qa(i):Xa(i);ua(`table.${e===`csv`?`csv`:`md`}`,a,e===`csv`?`text/csv`:`text/markdown`),o(!1),n?.(e)}catch(e){r?.(e)}};return(0,O.useEffect)(()=>{let e=e=>{let t=e.composedPath();s.current&&!t.includes(s.current)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,B.jsxs)(`div`,{className:i(`relative`),ref:s,children:[(0,B.jsx)(`button`,{className:i(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:c,onClick:()=>o(!a),title:l.downloadTable,type:`button`,children:e??(0,B.jsx)(u.DownloadIcon,{size:14})}),a?(0,B.jsxs)(`div`,{className:i(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,B.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`csv`),title:l.downloadTableAsCsv,type:`button`,children:l.tableFormatCsv}),(0,B.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`markdown`),title:l.downloadTableAsMarkdown,type:`button`,children:l.tableFormatMarkdown})]}):null]})},$a=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=X(),o=Y(),[s,c]=(0,O.useState)(!1),{isAnimating:l}=(0,O.useContext)($),u=Z(),d=()=>{c(!0)},f=()=>{c(!1)};return(0,O.useEffect)(()=>{if(s){Fa();let e=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),Ia()}}},[s]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:l,onClick:d,title:u.viewFullscreen,type:`button`,children:(0,B.jsx)(i,{size:14})}),s?(0,xr.createPortal)((0,B.jsx)(`div`,{"aria-label":u.viewFullscreen,"aria-modal":`true`,className:o(`fixed inset-0 z-50 flex flex-col bg-background`),"data-streamdown":`table-fullscreen`,onClick:f,onKeyDown:e=>{e.key===`Escape`&&f()},role:`dialog`,children:(0,B.jsxs)(`div`,{className:o(`flex h-full flex-col`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,B.jsxs)(`div`,{className:o(`flex items-center justify-end gap-1 p-4`),children:[n?(0,B.jsx)(Za,{}):null,r?(0,B.jsx)(Qa,{}):null,(0,B.jsx)(`button`,{className:o(`rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:f,title:u.exitFullscreen,type:`button`,children:(0,B.jsx)(a,{size:20})})]}),(0,B.jsx)(`div`,{className:o(`flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10`),children:(0,B.jsx)(`table`,{className:o(`w-full border-collapse border border-border`),"data-streamdown":`table`,children:e})})]})}),document.body):null]})},eo=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...o})=>{let s=Y(),c=n&&r,l=n&&i,u=n&&a,d=c||l||u;return(0,B.jsxs)(`div`,{className:s(`my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2`),"data-streamdown":`table-wrapper`,children:[d?(0,B.jsxs)(`div`,{className:s(`flex items-center justify-end gap-1`),children:[c?(0,B.jsx)(Za,{}):null,l?(0,B.jsx)(Qa,{}):null,u?(0,B.jsx)($a,{showCopy:c,showDownload:l,children:e}):null]}):null,(0,B.jsx)(`div`,{className:s(`border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background`),children:(0,B.jsx)(`table`,{className:s(`w-full divide-y divide-border`,t),"data-streamdown":`table`,...o,children:e})})]})},to=/startLine=(\d+)/,no=/\bnoLineNumbers\b/,ro=(0,O.lazy)(()=>n(()=>import(`./mermaid-GHXKKRXX-uJrCvmwj.js`).then(e=>({default:e.Mermaid})),[],import.meta.url)),io=/language-([^\s]+)/;function ao(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function Q(e,t){return e.className===t.className&&ao(e.node,t.node)}var oo=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,so=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},co=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},lo=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},uo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`ol`,{className:Y()(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e}),(e,t)=>Q(e,t));uo.displayName=`MarkdownOl`;var fo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`li`,{className:Y()(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:e}),(e,t)=>e.className===t.className&&ao(e.node,t.node));fo.displayName=`MarkdownLi`;var po=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`ul`,{className:Y()(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e}),(e,t)=>Q(e,t));po.displayName=`MarkdownUl`;var mo=(0,O.memo)(({className:e,node:t,...n})=>(0,B.jsx)(`hr`,{className:Y()(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n}),(e,t)=>Q(e,t));mo.displayName=`MarkdownHr`;var ho=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`span`,{className:Y()(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e}),(e,t)=>Q(e,t));ho.displayName=`MarkdownStrong`;var go=(0,O.memo)(({children:e,className:t,href:n,node:r,...i})=>{let a=Y(),{linkSafety:o}=(0,O.useContext)($),[s,c]=(0,O.useState)(!1),l=n===`streamdown:incomplete-link`,u=(0,O.useCallback)(async e=>{if(!(!(o!=null&&o.enabled&&n)||l)){if(e.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,`_blank`,`noreferrer`);return}c(!0)}},[o,n,l]),d=(0,O.useCallback)(()=>{n&&window.open(n,`_blank`,`noreferrer`)},[n]),f=(0,O.useCallback)(()=>{c(!1)},[]),p={url:n??``,isOpen:s,onClose:f,onConfirm:d};return o!=null&&o.enabled&&n?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`button`,{className:a(`wrap-anywhere appearance-none text-left font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,onClick:u,type:`button`,children:e}),o.renderModal?o.renderModal(p):(0,B.jsx)(La,{...p})]}):(0,B.jsx)(`a`,{className:a(`wrap-anywhere font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,href:n,rel:`noreferrer`,target:`_blank`,...i,children:e})},(e,t)=>Q(e,t)&&e.href===t.href);go.displayName=`MarkdownA`;var _o=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h1`,{className:Y()(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e}),(e,t)=>Q(e,t));_o.displayName=`MarkdownH1`;var vo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h2`,{className:Y()(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e}),(e,t)=>Q(e,t));vo.displayName=`MarkdownH2`;var yo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h3`,{className:Y()(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e}),(e,t)=>Q(e,t));yo.displayName=`MarkdownH3`;var bo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h4`,{className:Y()(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e}),(e,t)=>Q(e,t));bo.displayName=`MarkdownH4`;var xo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h5`,{className:Y()(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e}),(e,t)=>Q(e,t));xo.displayName=`MarkdownH5`;var So=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h6`,{className:Y()(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e}),(e,t)=>Q(e,t));So.displayName=`MarkdownH6`;var Co=(0,O.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,O.useContext)($);return(0,B.jsx)(eo,{className:t,showControls:oo(i,`table`),showCopy:so(i,`copy`),showDownload:so(i,`download`),showFullscreen:so(i,`fullscreen`),...r,children:e})},(e,t)=>Q(e,t));Co.displayName=`MarkdownTable`;var wo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`thead`,{className:Y()(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e}),(e,t)=>Q(e,t));wo.displayName=`MarkdownThead`;var To=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`tbody`,{className:Y()(`divide-y divide-border`,t),"data-streamdown":`table-body`,...r,children:e}),(e,t)=>Q(e,t));To.displayName=`MarkdownTbody`;var Eo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`tr`,{className:Y()(`border-border`,t),"data-streamdown":`table-row`,...r,children:e}),(e,t)=>Q(e,t));Eo.displayName=`MarkdownTr`;var Do=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`th`,{className:Y()(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e}),(e,t)=>Q(e,t));Do.displayName=`MarkdownTh`;var Oo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`td`,{className:Y()(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e}),(e,t)=>Q(e,t));Oo.displayName=`MarkdownTd`;var ko=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`blockquote`,{className:Y()(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e}),(e,t)=>Q(e,t));ko.displayName=`MarkdownBlockquote`;var Ao=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`sup`,{className:Y()(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e}),(e,t)=>Q(e,t));Ao.displayName=`MarkdownSup`;var jo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`sub`,{className:Y()(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e}),(e,t)=>Q(e,t));jo.displayName=`MarkdownSub`;var Mo=(0,O.memo)(({children:e,className:t,node:n,...r})=>{if(`data-footnotes`in r){let n=e=>{if(!(0,O.isValidElement)(e))return!1;let t=Array.isArray(e.props.children)?e.props.children:[e.props.children],n=!1,r=!1;for(let e of t)if(e){if(typeof e==`string`)e.trim()!==``&&(n=!0);else if((0,O.isValidElement)(e))if(e.props?.[`data-footnote-backref`]!==void 0)r=!0;else{let t=Array.isArray(e.props.children)?e.props.children:[e.props.children];for(let e of t){if(typeof e==`string`&&e.trim()!==``){n=!0;break}if((0,O.isValidElement)(e)&&e.props?.[`data-footnote-backref`]===void 0){n=!0;break}}}}return r&&!n},i=Array.isArray(e)?e.map(e=>{if(!(0,O.isValidElement)(e))return e;if(e.type===uo){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!n(e));return t.length===0?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(i)?i.some(e=>e!==null):i!==null)?(0,B.jsx)(`section`,{className:t,...r,children:i}):null}return(0,B.jsx)(`section`,{className:t,...r,children:e})},(e,t)=>Q(e,t));Mo.displayName=`MarkdownSection`;var No=(0,O.memo)(({node:e,className:t,children:n,...r})=>{let i=Y(),a=!(`data-block`in r),{mermaid:o,controls:s,lineNumbers:c}=(0,O.useContext)($),l=Va(),u=oa(),d=(t?.match(io))?.at(1)??``,f=Ha(d);if(a)return(0,B.jsx)(`code`,{className:i(`rounded bg-muted px-1.5 py-0.5 font-mono text-sm`,t),"data-streamdown":`inline-code`,...r,children:n});let p=e?.properties?.metastring,m=p?.match(to),h=m?Number.parseInt(m[1],10):void 0,g=h!==void 0&&h>=1?h:void 0,_=!(p&&no.test(p))&&c!==!1,v=``;if((0,O.isValidElement)(n)&&n.props&&typeof n.props==`object`&&`children`in n.props&&typeof n.props.children==`string`?v=n.props.children:typeof n==`string`&&(v=n),f){let e=f.component;return(0,B.jsx)(O.Suspense,{fallback:(0,B.jsx)(ja,{}),children:(0,B.jsx)(e,{code:v,isIncomplete:u,language:d,meta:p})})}if(d===`mermaid`&&l){let e=oo(s,`mermaid`),n=lo(s,`download`),r=lo(s,`copy`),a=lo(s,`fullscreen`),c=lo(s,`panZoom`),l=e&&(n||r||a);return(0,B.jsx)(O.Suspense,{fallback:(0,B.jsx)(ja,{}),children:(0,B.jsxs)(`div`,{className:i(`group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,t),"data-streamdown":`mermaid-block`,children:[(0,B.jsx)(`div`,{className:i(`flex h-8 items-center text-muted-foreground text-xs`),children:(0,B.jsx)(`span`,{className:i(`ml-1 font-mono lowercase`),children:`mermaid`})}),l?(0,B.jsx)(`div`,{className:i(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,B.jsxs)(`div`,{className:i(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`mermaid-block-actions`,children:[n?(0,B.jsx)(Wa,{chart:v,config:o?.config}):null,r?(0,B.jsx)(Oa,{code:v}):null,a?(0,B.jsx)(Ga,{chart:v,config:o?.config}):null]})}):null,(0,B.jsx)(`div`,{className:i(`rounded-md border border-border bg-background`),children:(0,B.jsx)(ro,{chart:v,config:o?.config,showControls:c})})]})})}let y=oo(s,`code`),b=co(s,`download`),x=co(s,`copy`);return(0,B.jsx)(xa,{className:t,code:v,isIncomplete:u,language:d,lineNumbers:_,startLine:g,children:y?(0,B.jsxs)(B.Fragment,{children:[b?(0,B.jsx)(Aa,{code:v,language:d}):null,x?(0,B.jsx)(Oa,{}):null]}):null})},(e,t)=>e.className===t.className&&ao(e.node,t.node));No.displayName=`MarkdownCode`;var Po=(0,O.memo)(Na,(e,t)=>e.className===t.className&&ao(e.node,t.node));Po.displayName=`MarkdownImg`;var Fo=(0,O.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);if(r.length===1&&(0,O.isValidElement)(r[0])){let t=r[0].props.node?.tagName;if(t===`img`||t===`code`&&`data-block`in r[0].props)return(0,B.jsx)(B.Fragment,{children:e})}return(0,B.jsx)(`p`,{...n,children:e})},(e,t)=>Q(e,t));Fo.displayName=`MarkdownParagraph`;var Io={ol:uo,li:fo,ul:po,hr:mo,strong:ho,a:go,h1:_o,h2:vo,h3:yo,h4:bo,h5:xo,h6:So,table:Co,thead:wo,tbody:To,tr:Eo,th:Do,td:Oo,blockquote:ko,code:No,img:Po,pre:({children:e})=>(0,O.isValidElement)(e)?(0,O.cloneElement)(e,{"data-block":`true`}):e,sup:Ao,sub:jo,p:Fo,section:Mo},Lo=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,Ro=/\p{L}/u;function zo(e){let t=e.replace(/^#{1,6}\s+/gm,``).replace(/(\*{1,3}|_{1,3})/g,``).replace(/`[^`]*`/g,``).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/^[\s>*\-+\d.]+/gm,``);for(let e of t){if(Lo.test(e))return`rtl`;if(Ro.test(e))return`ltr`}return`ltr`}var Bo=/^[ \t]{0,3}(`{3,}|~{3,})/,Vo=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Ho=e=>{let t=e.split(`
|
|
91
|
+
`)},Za=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=Y(),[o,s]=(0,O.useState)(!1),[c,l]=(0,O.useState)(!1),u=(0,O.useRef)(null),d=(0,O.useRef)(0),{isAnimating:f}=(0,O.useContext)($),p=Z(),m=async e=>{var t;if(typeof window>`u`||!((t=navigator==null?void 0:navigator.clipboard)!=null&&t.write)){r?.(Error(`Clipboard API not available`));return}try{let t=(u.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let a=Ka(t),o=({csv:qa,tsv:Ja,md:Xa}[e]||Xa)(a),c=new ClipboardItem({"text/plain":new Blob([o],{type:`text/plain`}),"text/html":new Blob([t.outerHTML],{type:`text/html`})});await navigator.clipboard.write([c]),l(!0),s(!1),n?.(e),d.current=window.setTimeout(()=>l(!1),i)}catch(e){r?.(e)}};(0,O.useEffect)(()=>{let e=e=>{let t=e.composedPath();u.current&&!t.includes(u.current)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e),window.clearTimeout(d.current)}},[]);let h=X(),g=c?h.CheckIcon:h.CopyIcon;return(0,B.jsxs)(`div`,{className:a(`relative`),ref:u,children:[(0,B.jsx)(`button`,{className:a(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:f,onClick:()=>s(!o),title:p.copyTable,type:`button`,children:e??(0,B.jsx)(g,{height:14,width:14})}),o?(0,B.jsxs)(`div`,{className:a(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,B.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`md`),title:p.copyTableAsMarkdown,type:`button`,children:p.tableFormatMarkdown}),(0,B.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`csv`),title:p.copyTableAsCsv,type:`button`,children:p.tableFormatCsv}),(0,B.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>m(`tsv`),title:p.copyTableAsTsv,type:`button`,children:p.tableFormatTsv})]}):null]})},Qa=({children:e,className:t,onDownload:n,onError:r})=>{let i=Y(),[a,o]=(0,O.useState)(!1),s=(0,O.useRef)(null),{isAnimating:c}=(0,O.useContext)($),l=Z(),u=X(),d=e=>{try{let t=(s.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=Ka(t),a=e===`csv`?qa(i):Xa(i);ua(`table.${e===`csv`?`csv`:`md`}`,a,e===`csv`?`text/csv`:`text/markdown`),o(!1),n?.(e)}catch(e){r?.(e)}};return(0,O.useEffect)(()=>{let e=e=>{let t=e.composedPath();s.current&&!t.includes(s.current)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,B.jsxs)(`div`,{className:i(`relative`),ref:s,children:[(0,B.jsx)(`button`,{className:i(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:c,onClick:()=>o(!a),title:l.downloadTable,type:`button`,children:e??(0,B.jsx)(u.DownloadIcon,{size:14})}),a?(0,B.jsxs)(`div`,{className:i(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,B.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`csv`),title:l.downloadTableAsCsv,type:`button`,children:l.tableFormatCsv}),(0,B.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>d(`markdown`),title:l.downloadTableAsMarkdown,type:`button`,children:l.tableFormatMarkdown})]}):null]})},$a=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=X(),o=Y(),[s,c]=(0,O.useState)(!1),{isAnimating:l}=(0,O.useContext)($),u=Z(),d=()=>{c(!0)},f=()=>{c(!1)};return(0,O.useEffect)(()=>{if(s){Fa();let e=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),Ia()}}},[s]),(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:l,onClick:d,title:u.viewFullscreen,type:`button`,children:(0,B.jsx)(i,{size:14})}),s?(0,xr.createPortal)((0,B.jsx)(`div`,{"aria-label":u.viewFullscreen,"aria-modal":`true`,className:o(`fixed inset-0 z-50 flex flex-col bg-background`),"data-streamdown":`table-fullscreen`,onClick:f,onKeyDown:e=>{e.key===`Escape`&&f()},role:`dialog`,children:(0,B.jsxs)(`div`,{className:o(`flex h-full flex-col`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,B.jsxs)(`div`,{className:o(`flex items-center justify-end gap-1 p-4`),children:[n?(0,B.jsx)(Za,{}):null,r?(0,B.jsx)(Qa,{}):null,(0,B.jsx)(`button`,{className:o(`rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:f,title:u.exitFullscreen,type:`button`,children:(0,B.jsx)(a,{size:20})})]}),(0,B.jsx)(`div`,{className:o(`flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10`),children:(0,B.jsx)(`table`,{className:o(`w-full border-collapse border border-border`),"data-streamdown":`table`,children:e})})]})}),document.body):null]})},eo=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:a=!0,...o})=>{let s=Y(),c=n&&r,l=n&&i,u=n&&a,d=c||l||u;return(0,B.jsxs)(`div`,{className:s(`my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2`),"data-streamdown":`table-wrapper`,children:[d?(0,B.jsxs)(`div`,{className:s(`flex items-center justify-end gap-1`),children:[c?(0,B.jsx)(Za,{}):null,l?(0,B.jsx)(Qa,{}):null,u?(0,B.jsx)($a,{showCopy:c,showDownload:l,children:e}):null]}):null,(0,B.jsx)(`div`,{className:s(`border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background`),children:(0,B.jsx)(`table`,{className:s(`w-full divide-y divide-border`,t),"data-streamdown":`table`,...o,children:e})})]})},to=/startLine=(\d+)/,no=/\bnoLineNumbers\b/,ro=(0,O.lazy)(()=>n(()=>import(`./mermaid-GHXKKRXX-Dif_zbtJ.js`).then(e=>({default:e.Mermaid})),[],import.meta.url)),io=/language-([^\s]+)/;function ao(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,i=e.position.end,a=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===a?.line&&i?.column===a?.column}function Q(e,t){return e.className===t.className&&ao(e.node,t.node)}var oo=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,so=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},co=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},lo=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},uo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`ol`,{className:Y()(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e}),(e,t)=>Q(e,t));uo.displayName=`MarkdownOl`;var fo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`li`,{className:Y()(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:e}),(e,t)=>e.className===t.className&&ao(e.node,t.node));fo.displayName=`MarkdownLi`;var po=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`ul`,{className:Y()(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e}),(e,t)=>Q(e,t));po.displayName=`MarkdownUl`;var mo=(0,O.memo)(({className:e,node:t,...n})=>(0,B.jsx)(`hr`,{className:Y()(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n}),(e,t)=>Q(e,t));mo.displayName=`MarkdownHr`;var ho=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`span`,{className:Y()(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e}),(e,t)=>Q(e,t));ho.displayName=`MarkdownStrong`;var go=(0,O.memo)(({children:e,className:t,href:n,node:r,...i})=>{let a=Y(),{linkSafety:o}=(0,O.useContext)($),[s,c]=(0,O.useState)(!1),l=n===`streamdown:incomplete-link`,u=(0,O.useCallback)(async e=>{if(!(!(o!=null&&o.enabled&&n)||l)){if(e.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,`_blank`,`noreferrer`);return}c(!0)}},[o,n,l]),d=(0,O.useCallback)(()=>{n&&window.open(n,`_blank`,`noreferrer`)},[n]),f=(0,O.useCallback)(()=>{c(!1)},[]),p={url:n??``,isOpen:s,onClose:f,onConfirm:d};return o!=null&&o.enabled&&n?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(`button`,{className:a(`wrap-anywhere appearance-none text-left font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,onClick:u,type:`button`,children:e}),o.renderModal?o.renderModal(p):(0,B.jsx)(La,{...p})]}):(0,B.jsx)(`a`,{className:a(`wrap-anywhere font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,href:n,rel:`noreferrer`,target:`_blank`,...i,children:e})},(e,t)=>Q(e,t)&&e.href===t.href);go.displayName=`MarkdownA`;var _o=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h1`,{className:Y()(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e}),(e,t)=>Q(e,t));_o.displayName=`MarkdownH1`;var vo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h2`,{className:Y()(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e}),(e,t)=>Q(e,t));vo.displayName=`MarkdownH2`;var yo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h3`,{className:Y()(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e}),(e,t)=>Q(e,t));yo.displayName=`MarkdownH3`;var bo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h4`,{className:Y()(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e}),(e,t)=>Q(e,t));bo.displayName=`MarkdownH4`;var xo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h5`,{className:Y()(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e}),(e,t)=>Q(e,t));xo.displayName=`MarkdownH5`;var So=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`h6`,{className:Y()(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e}),(e,t)=>Q(e,t));So.displayName=`MarkdownH6`;var Co=(0,O.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i}=(0,O.useContext)($);return(0,B.jsx)(eo,{className:t,showControls:oo(i,`table`),showCopy:so(i,`copy`),showDownload:so(i,`download`),showFullscreen:so(i,`fullscreen`),...r,children:e})},(e,t)=>Q(e,t));Co.displayName=`MarkdownTable`;var wo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`thead`,{className:Y()(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e}),(e,t)=>Q(e,t));wo.displayName=`MarkdownThead`;var To=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`tbody`,{className:Y()(`divide-y divide-border`,t),"data-streamdown":`table-body`,...r,children:e}),(e,t)=>Q(e,t));To.displayName=`MarkdownTbody`;var Eo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`tr`,{className:Y()(`border-border`,t),"data-streamdown":`table-row`,...r,children:e}),(e,t)=>Q(e,t));Eo.displayName=`MarkdownTr`;var Do=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`th`,{className:Y()(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e}),(e,t)=>Q(e,t));Do.displayName=`MarkdownTh`;var Oo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`td`,{className:Y()(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e}),(e,t)=>Q(e,t));Oo.displayName=`MarkdownTd`;var ko=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`blockquote`,{className:Y()(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e}),(e,t)=>Q(e,t));ko.displayName=`MarkdownBlockquote`;var Ao=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`sup`,{className:Y()(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e}),(e,t)=>Q(e,t));Ao.displayName=`MarkdownSup`;var jo=(0,O.memo)(({children:e,className:t,node:n,...r})=>(0,B.jsx)(`sub`,{className:Y()(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e}),(e,t)=>Q(e,t));jo.displayName=`MarkdownSub`;var Mo=(0,O.memo)(({children:e,className:t,node:n,...r})=>{if(`data-footnotes`in r){let n=e=>{if(!(0,O.isValidElement)(e))return!1;let t=Array.isArray(e.props.children)?e.props.children:[e.props.children],n=!1,r=!1;for(let e of t)if(e){if(typeof e==`string`)e.trim()!==``&&(n=!0);else if((0,O.isValidElement)(e))if(e.props?.[`data-footnote-backref`]!==void 0)r=!0;else{let t=Array.isArray(e.props.children)?e.props.children:[e.props.children];for(let e of t){if(typeof e==`string`&&e.trim()!==``){n=!0;break}if((0,O.isValidElement)(e)&&e.props?.[`data-footnote-backref`]===void 0){n=!0;break}}}}return r&&!n},i=Array.isArray(e)?e.map(e=>{if(!(0,O.isValidElement)(e))return e;if(e.type===uo){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!n(e));return t.length===0?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(i)?i.some(e=>e!==null):i!==null)?(0,B.jsx)(`section`,{className:t,...r,children:i}):null}return(0,B.jsx)(`section`,{className:t,...r,children:e})},(e,t)=>Q(e,t));Mo.displayName=`MarkdownSection`;var No=(0,O.memo)(({node:e,className:t,children:n,...r})=>{let i=Y(),a=!(`data-block`in r),{mermaid:o,controls:s,lineNumbers:c}=(0,O.useContext)($),l=Va(),u=oa(),d=(t?.match(io))?.at(1)??``,f=Ha(d);if(a)return(0,B.jsx)(`code`,{className:i(`rounded bg-muted px-1.5 py-0.5 font-mono text-sm`,t),"data-streamdown":`inline-code`,...r,children:n});let p=e?.properties?.metastring,m=p?.match(to),h=m?Number.parseInt(m[1],10):void 0,g=h!==void 0&&h>=1?h:void 0,_=!(p&&no.test(p))&&c!==!1,v=``;if((0,O.isValidElement)(n)&&n.props&&typeof n.props==`object`&&`children`in n.props&&typeof n.props.children==`string`?v=n.props.children:typeof n==`string`&&(v=n),f){let e=f.component;return(0,B.jsx)(O.Suspense,{fallback:(0,B.jsx)(ja,{}),children:(0,B.jsx)(e,{code:v,isIncomplete:u,language:d,meta:p})})}if(d===`mermaid`&&l){let e=oo(s,`mermaid`),n=lo(s,`download`),r=lo(s,`copy`),a=lo(s,`fullscreen`),c=lo(s,`panZoom`),l=e&&(n||r||a);return(0,B.jsx)(O.Suspense,{fallback:(0,B.jsx)(ja,{}),children:(0,B.jsxs)(`div`,{className:i(`group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,t),"data-streamdown":`mermaid-block`,children:[(0,B.jsx)(`div`,{className:i(`flex h-8 items-center text-muted-foreground text-xs`),children:(0,B.jsx)(`span`,{className:i(`ml-1 font-mono lowercase`),children:`mermaid`})}),l?(0,B.jsx)(`div`,{className:i(`pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end`),children:(0,B.jsxs)(`div`,{className:i(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`mermaid-block-actions`,children:[n?(0,B.jsx)(Wa,{chart:v,config:o?.config}):null,r?(0,B.jsx)(Oa,{code:v}):null,a?(0,B.jsx)(Ga,{chart:v,config:o?.config}):null]})}):null,(0,B.jsx)(`div`,{className:i(`rounded-md border border-border bg-background`),children:(0,B.jsx)(ro,{chart:v,config:o?.config,showControls:c})})]})})}let y=oo(s,`code`),b=co(s,`download`),x=co(s,`copy`);return(0,B.jsx)(xa,{className:t,code:v,isIncomplete:u,language:d,lineNumbers:_,startLine:g,children:y?(0,B.jsxs)(B.Fragment,{children:[b?(0,B.jsx)(Aa,{code:v,language:d}):null,x?(0,B.jsx)(Oa,{}):null]}):null})},(e,t)=>e.className===t.className&&ao(e.node,t.node));No.displayName=`MarkdownCode`;var Po=(0,O.memo)(Na,(e,t)=>e.className===t.className&&ao(e.node,t.node));Po.displayName=`MarkdownImg`;var Fo=(0,O.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);if(r.length===1&&(0,O.isValidElement)(r[0])){let t=r[0].props.node?.tagName;if(t===`img`||t===`code`&&`data-block`in r[0].props)return(0,B.jsx)(B.Fragment,{children:e})}return(0,B.jsx)(`p`,{...n,children:e})},(e,t)=>Q(e,t));Fo.displayName=`MarkdownParagraph`;var Io={ol:uo,li:fo,ul:po,hr:mo,strong:ho,a:go,h1:_o,h2:vo,h3:yo,h4:bo,h5:xo,h6:So,table:Co,thead:wo,tbody:To,tr:Eo,th:Do,td:Oo,blockquote:ko,code:No,img:Po,pre:({children:e})=>(0,O.isValidElement)(e)?(0,O.cloneElement)(e,{"data-block":`true`}):e,sup:Ao,sub:jo,p:Fo,section:Mo},Lo=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,Ro=/\p{L}/u;function zo(e){let t=e.replace(/^#{1,6}\s+/gm,``).replace(/(\*{1,3}|_{1,3})/g,``).replace(/`[^`]*`/g,``).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/^[\s>*\-+\d.]+/gm,``);for(let e of t){if(Lo.test(e))return`rtl`;if(Ro.test(e))return`ltr`}return`ltr`}var Bo=/^[ \t]{0,3}(`{3,}|~{3,})/,Vo=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,Ho=e=>{let t=e.split(`
|
|
92
92
|
`),n=null,r=0;for(let e of t){let t=Bo.exec(e);if(n===null){if(t){let e=t[1];n=e[0],r=e.length}}else if(t){let e=t[1],i=e[0],a=e.length;i===n&&a>=r&&(n=null,r=0)}}return n!==null},Uo=e=>{let t=e.split(`
|
|
93
|
-
`);for(let e of t){let t=e.trim();if(t.length>0&&t.includes(`|`)&&Vo.test(t))return!0}return!1},Wo=()=>e=>{
|
|
93
|
+
`);for(let e of t){let t=e.trim();if(t.length>0&&t.includes(`|`)&&Vo.test(t))return!0}return!1},Wo=()=>e=>{h(e,`html`,(e,t,n)=>{!n||typeof t!=`number`||(n.children[t]={type:`text`,value:e.value})})},Go=[],Ko={allowDangerousHtml:!0},qo=new WeakMap,Jo=new class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let t=`default`;return this.keyCache.set(e,t),t}let a=e=>{if(!e||e.length===0)return``;let t=``;for(let n=0;n<e.length;n+=1){let r=e[n];if(n>0&&(t+=`,`),Array.isArray(r)){let[e,n]=r;if(typeof e==`function`){let n=qo.get(e);n||(n=e.name,qo.set(e,n)),t+=n}else t+=String(e);t+=`:`,t+=JSON.stringify(n)}else if(typeof r==`function`){let e=qo.get(r);e||(e=r.name,qo.set(r,e)),t+=e}else t+=String(r)}return t},o=a(n),s=`${a(r)}::${o}::${i?JSON.stringify(i):``}`;return this.keyCache.set(e,s),s}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(n,t)}clear(){this.cache.clear()}},Yo=e=>{let t=Xo(e),n=e.children||``;return rs(t.runSync(t.parse(n),n),e)},Xo=e=>{let t=Jo.get(e);if(t)return t;let n=Qo(e);return Jo.set(e,n),n},Zo=e=>e.some(e=>Array.isArray(e)?e[0]===Xe:e===Xe),Qo=e=>{let t=e.rehypePlugins||Go,n=e.remarkPlugins||Go,r=Zo(t)?n:[...n,Wo],i=e.remarkRehypeOptions?{...Ko,...e.remarkRehypeOptions}:Ko;return ee().use(v).use(r).use(C,i).use(t)},$o=e=>e,es=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:`text`,value:r}},ts=(e,t)=>{for(let n in br)if(Object.hasOwn(br,n)&&Object.hasOwn(e.properties,n)){let r=e.properties[n],i=br[n];(i===null||i.includes(e.tagName))&&(e.properties[n]=t(String(r||``),n,e)??void 0)}},ns=(e,t,n,r,i,a)=>{let o=!1;return r?o=!r.includes(e.tagName):i&&(o=i.includes(e.tagName)),!o&&a&&typeof t==`number`&&(o=!a(e,t,n)),o},rs=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:o,urlTransform:s}=t;if(n||r||i||a||s){let t=s||$o;h(e,(e,s,c)=>{if(e.type===`raw`&&c&&typeof s==`number`)return es(c,s,a,e.value),s;if(e.type===`element`&&(ts(e,t),ns(e,s,c,r,i,n)&&c&&typeof s==`number`))return o&&e.children?c.children.splice(s,1,...e.children):c.children.splice(s,1),s})}return Qn(e,{Fragment:B.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:B.jsx,jsxs:B.jsxs,passKeys:!0,passNode:!0})},is=/\[\^[\w-]{1,200}\](?!:)/,as=/\[\^[\w-]{1,200}\]:/,os=/<(\w+)[\s>]/,ss=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),cs=new Map,ls=new Map,us=e=>{let t=e.toLowerCase(),n=cs.get(t);if(n)return n;let r=RegExp(`<${t}(?=[\\s>/])[^>]*>`,`gi`);return cs.set(t,r),r},ds=e=>{let t=e.toLowerCase(),n=ls.get(t);if(n)return n;let r=RegExp(`</${t}(?=[\\s>])[^>]*>`,`gi`);return ls.set(t,r),r},fs=(e,t)=>{if(ss.has(t.toLowerCase()))return 0;let n=e.match(us(t));if(!n)return 0;let r=0;for(let e of n)e.trimEnd().endsWith(`/>`)||(r+=1);return r},ps=(e,t)=>{let n=e.match(ds(t));return n?n.length:0},ms=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]===`$`&&e[n+1]===`$`&&(t+=1,n+=1);return t},hs=e=>{let t=is.test(e),n=as.test(e);if(t||n)return[e];let r=G.lex(e,{gfm:!0}),i=[],a=[],o=!1;for(let e of r){let t=e.raw,n=i.length;if(a.length>0){i[n-1]+=t;let e=a.at(-1),r=fs(t,e),o=ps(t,e);for(let t=0;t<r;t+=1)a.push(e);for(let t=0;t<o;t+=1)a.length>0&&a.at(-1)===e&&a.pop();continue}if(e.type===`html`&&e.block){let e=t.match(os);if(e){let n=e[1];fs(t,n)>ps(t,n)&&a.push(n)}}if(n>0&&!o){let e=i[n-1];if(ms(e)%2==1){i[n-1]=e+t;continue}}i.push(t),e.type!==`space`&&(o=e.type===`code`)}return i},gs=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>{if(!n.includes(`
|
|
94
94
|
|
|
95
95
|
`))return t+n+r;let i=n.replace(/\n\n/g,`
|
|
96
96
|
<!---->
|
|
@@ -100,4 +100,4 @@ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error
|
|
|
100
100
|
`)?``:`
|
|
101
101
|
`)}${r}
|
|
102
102
|
|
|
103
|
-
`})}return n},_s=/([\\`*_~[\]|])/g,vs=e=>e.replace(_s,`\\$1`),ys=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>t+vs(n).replace(/\n\n/g,` `)+r)}return n},bs=e=>e.type===`text`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(bs).join(``):``,xs=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(e=>e.toLowerCase()));p(t,`element`,e=>{if(n.has(e.tagName.toLowerCase())){let t=bs(e);e.children=t?[{type:`text`,value:t}]:[]}})},Ss=()=>e=>{p(e,`code`,e=>{e.meta&&(e.data=e.data??{},e.data.hProperties={...e.data.hProperties??{},metastring:e.meta})})},Cs=/^[ \t]*<[\w!/?-]/,ws=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,Ts=e=>typeof e!=`string`||e.length===0||!Cs.test(e)?e:e.replace(ws,`$1`),Es={...N,protocols:{...N.protocols,href:[...N.protocols?.href??[],`tel`]},attributes:{...N.attributes,code:[...N.attributes?.code??[],`metastring`]}},Ds={raw:Xe,sanitize:[ft,Es],harden:[ce,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},Os={gfm:[x,{}],codeMeta:Ss},ks=Object.values(Ds),As=Object.values(Os),js={block:` ▋`,circle:` ●`},Ms=[`github-light`,`github-dark`],Ns={enabled:!0},$=(0,O.createContext)({shikiTheme:Ms,controls:!0,isAnimating:!1,lineNumbers:!0,mode:`streaming`,mermaid:void 0,linkSafety:Ns}),Ps=(0,O.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:o,...s})=>{if(o){let e=o.getLastRenderCharCount();o.setPrevContentLength(e)}let c=typeof e==`string`&&n?Ts(e):e,l=(0,B.jsx)(Yo,{...s,children:c});return(0,B.jsx)(aa.Provider,{value:i,children:a?(0,B.jsx)(`div`,{dir:a,style:{display:`contents`},children:l}):l})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(n=>e.components?.[n]!==t.components?.[n]))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Ps.displayName=`Block`;var Fs=(0,O.memo)(({children:e,mode:t=`streaming`,dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=ks,remarkPlugins:s=As,className:c,shikiTheme:l=Ms,mermaid:u,controls:d=!0,isAnimating:f=!1,animated:p,BlockComponent:m=Ps,parseMarkdownIntoBlocksFn:h=hs,caret:g,plugins:_,remend:v,linkSafety:y=Ns,lineNumbers:b=!0,allowedTags:x,literalTagContent:S,translations:C,icons:w,prefix:T,onAnimationStart:ee,onAnimationEnd:te,...ne})=>{let re=(0,O.useId)(),[ie,E]=(0,O.useTransition)(),ae=(0,O.useMemo)(()=>la(T),[T]),oe=(0,O.useRef)(null),D=(0,O.useRef)(ee),se=(0,O.useRef)(te);D.current=ee,se.current=te,(0,O.useEffect)(()=>{var e,n,r;if(t===`static`)return;let i=oe.current;if(oe.current=f,i===null){f&&((e=D.current)==null||e.call(D));return}f&&!i?(n=D.current)==null||n.call(D):!f&&i&&((r=se.current)==null||r.call(se))},[f,t]);let k=(0,O.useMemo)(()=>x?Object.keys(x):[],[x]),ce=(0,O.useMemo)(()=>{if(typeof e!=`string`)return``;let n=t===`streaming`&&r?Vn(e,v):e;return S&&S.length>0&&(n=ys(n,S)),k.length>0&&(n=gs(n,k)),n},[e,t,r,v,k,S]),A=(0,O.useMemo)(()=>h(ce),[ce,h]),[le,ue]=(0,O.useState)(A);(0,O.useEffect)(()=>{t===`streaming`&&!me?E(()=>{ue(A)}):ue(A)},[A,t]);let j=t===`streaming`?le:A,de=(0,O.useMemo)(()=>n===`auto`?j.map(zo):void 0,[j,n]),fe=(0,O.useMemo)(()=>j.map((e,t)=>`${re}-${t}`),[j.length,re]),pe=(0,O.useMemo)(()=>p===!0?`true`:p?JSON.stringify(p):``,[p]),me=(0,O.useMemo)(()=>pe?pe===`true`?ia():ia(p):null,[pe]),he=(0,O.useMemo)(()=>({shikiTheme:(_?.code)?.getThemes()??l,controls:d,isAnimating:f,lineNumbers:b,mode:t,mermaid:u,linkSafety:y}),[l,d,f,b,t,u,y,_?.code]),ge=(0,O.useMemo)(()=>({...Ea,...C}),[(0,O.useMemo)(()=>C?JSON.stringify(C):``,[C])]),_e=(0,O.useMemo)(()=>{let{inlineCode:e,...t}=a??{},n={...Io,...t};if(e){let t=n.code;n.code=n=>`data-block`in n?t?(0,O.createElement)(t,n):null:(0,O.createElement)(e,n)}return n},[a]),ve=(0,O.useMemo)(()=>{let e=[];return _!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsBefore]),e=[...e,...s],_!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsAfter]),_!=null&&_.math&&(e=[...e,_.math.remarkPlugin]),e},[s,_?.math,_?.cjk]),ye=(0,O.useMemo)(()=>{let e=o;if(x&&Object.keys(x).length>0&&o===ks){let t={...Es,tagNames:[...Es.tagNames??[],...Object.keys(x)],attributes:{...Es.attributes,...x}};e=[Ds.raw,[ft,t],Ds.harden]}return S&&S.length>0&&(e=[...e,[xs,S]]),_!=null&&_.math&&(e=[...e,_.math.rehypePlugin]),me&&f&&(e=[...e,me.rehypePlugin]),e},[o,_?.math,me,f,x,S]),be=(0,O.useMemo)(()=>{if(!f||j.length===0)return!1;let e=j.at(-1);return Ho(e)||Uo(e)},[f,j]),xe=(0,O.useMemo)(()=>g&&f&&!be?{"--streamdown-caret":`"${js[g]}"`}:void 0,[g,f,be]);return t===`static`?(0,B.jsx)(Da.Provider,{value:ge,children:(0,B.jsx)(Ra.Provider,{value:_??null,children:(0,B.jsx)($.Provider,{value:he,children:(0,B.jsx)(Ta,{icons:w,children:(0,B.jsx)(da.Provider,{value:ae,children:(0,B.jsx)(`div`,{className:ae(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,c),dir:n===`auto`?zo(ce):n,children:(0,B.jsx)(Yo,{components:_e,rehypePlugins:ye,remarkPlugins:ve,...ne,children:ce})})})})})})}):(0,B.jsx)(Da.Provider,{value:ge,children:(0,B.jsx)(Ra.Provider,{value:_??null,children:(0,B.jsx)($.Provider,{value:he,children:(0,B.jsx)(Ta,{icons:w,children:(0,B.jsx)(da.Provider,{value:ae,children:(0,B.jsxs)(`div`,{className:ae(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,g&&!be?`[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]`:null,c),style:xe,children:[j.length===0&&g&&f&&(0,B.jsx)(`span`,{}),j.map((e,t)=>{let a=t===j.length-1,o=f&&a&&Ho(e);return(0,B.jsx)(m,{animatePlugin:me,components:_e,content:e,dir:de?.[t]??(n===`auto`?void 0:n),index:t,isIncomplete:o,rehypePlugins:ye,remarkPlugins:ve,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...ne},fe[t])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);Fs.displayName=`Streamdown`;var Is=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:o=1,fullscreen:s=!1})=>{let{RotateCcwIcon:c,ZoomInIcon:l,ZoomOutIcon:u}=X(),d=Y(),f=(0,O.useRef)(null),p=(0,O.useRef)(null),[m,h]=(0,O.useState)(o),[g,_]=(0,O.useState)({x:0,y:0}),[v,y]=(0,O.useState)(!1),[b,x]=(0,O.useState)({x:0,y:0}),[S,C]=(0,O.useState)({x:0,y:0}),w=(0,O.useCallback)(e=>{h(t=>Math.max(n,Math.min(r,t+e)))},[n,r]),T=(0,O.useCallback)(()=>{w(i)},[w,i]),ee=(0,O.useCallback)(()=>{w(-i)},[w,i]),te=(0,O.useCallback)(()=>{h(o),_({x:0,y:0})},[o]),ne=(0,O.useCallback)(e=>{e.preventDefault(),w(e.deltaY>0?-i:i)},[w,i]),re=(0,O.useCallback)(e=>{if(e.button!==0||e.isPrimary===!1)return;y(!0),x({x:e.clientX,y:e.clientY}),C(g);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[g]),ie=(0,O.useCallback)(e=>{if(!v)return;e.preventDefault();let t=e.clientX-b.x,n=e.clientY-b.y;_({x:S.x+t,y:S.y+n})},[v,b,S]),E=(0,O.useCallback)(e=>{y(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,O.useEffect)(()=>{let e=f.current;if(e)return e.addEventListener(`wheel`,ne,{passive:!1}),()=>{e.removeEventListener(`wheel`,ne)}},[ne]),(0,O.useEffect)(()=>{let e=p.current;if(e&&v)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,ie,{passive:!1}),e.addEventListener(`pointerup`,E),e.addEventListener(`pointercancel`,E),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,ie),e.removeEventListener(`pointerup`,E),e.removeEventListener(`pointercancel`,E)}},[v,ie,E]),(0,B.jsxs)(`div`,{className:d(`relative flex flex-col`,s?`h-full w-full`:`min-h-28 w-full`,t),ref:f,style:{cursor:v?`grabbing`:`grab`},children:[a?(0,B.jsxs)(`div`,{className:d(`absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm`,s?`bottom-4 left-4`:`bottom-2 left-2`),children:[(0,B.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:m>=r,onClick:T,title:`Zoom in`,type:`button`,children:(0,B.jsx)(l,{size:16})}),(0,B.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:m<=n,onClick:ee,title:`Zoom out`,type:`button`,children:(0,B.jsx)(u,{size:16})}),(0,B.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`),onClick:te,title:`Reset zoom and pan`,type:`button`,children:(0,B.jsx)(c,{size:16})})]}):null,(0,B.jsx)(`div`,{className:d(`flex-1 origin-center transition-transform duration-150 ease-out`,s?`flex h-full w-full items-center justify-center`:`flex w-full items-center justify-center`),onPointerDown:re,ref:p,role:`application`,style:{transform:`translate(${g.x}px, ${g.y}px) scale(${m})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},Ls=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=Y(),[o,s]=(0,O.useState)(null),[c,l]=(0,O.useState)(!1),[u,d]=(0,O.useState)(``),[f,p]=(0,O.useState)(``),[m,h]=(0,O.useState)(0),{mermaid:g}=(0,O.useContext)($),_=Va(),v=g?.errorComponent,{shouldRender:y,containerRef:b}=qi({immediate:r});if((0,O.useEffect)(()=>{if(y){if(!_){s(`Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.`);return}(async()=>{try{s(null),l(!0);let t=_.getMermaid(n),r=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),i=`mermaid-${Math.abs(r)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:a}=await t.render(i,e);d(a),p(a)}catch(e){f||u||s(e instanceof Error?e.message:`Failed to render Mermaid chart`)}finally{l(!1)}})()}},[e,n,m,y,_]),!(y||u||f))return(0,B.jsx)(`div`,{className:a(`my-4 min-h-[200px]`,t),ref:b});if(c&&!u&&!f)return(0,B.jsx)(`div`,{className:a(`my-4 flex justify-center p-4`,t),ref:b,children:(0,B.jsxs)(`div`,{className:a(`flex items-center space-x-2 text-muted-foreground`),children:[(0,B.jsx)(`div`,{className:a(`h-4 w-4 animate-spin rounded-full border-current border-b-2`)}),(0,B.jsx)(`span`,{className:a(`text-sm`),children:`Loading diagram...`})]})});if(o&&!u&&!f)return v?(0,B.jsx)(`div`,{ref:b,children:(0,B.jsx)(v,{chart:e,error:o,retry:()=>h(e=>e+1)})}):(0,B.jsxs)(`div`,{className:a(`rounded-md bg-red-50 p-4`,t),ref:b,children:[(0,B.jsxs)(`p`,{className:a(`font-mono text-red-700 text-sm`),children:[`Mermaid Error: `,o]}),(0,B.jsxs)(`details`,{className:a(`mt-2`),children:[(0,B.jsx)(`summary`,{className:a(`cursor-pointer text-red-600 text-xs`),children:`Show Code`}),(0,B.jsx)(`pre`,{className:a(`mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs`),children:e})]})]});let x=u||f;return(0,B.jsx)(`div`,{className:a(`size-full`,t),"data-streamdown":`mermaid`,ref:b,children:(0,B.jsx)(Is,{className:a(r?`size-full overflow-hidden`:`overflow-hidden`,t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,B.jsx)(`div`,{"aria-label":`Mermaid chart`,className:a(`flex justify-center`,r?`size-full items-center`:null),dangerouslySetInnerHTML:{__html:x},role:`img`})})})};export{Ls as a,$ as i,Ba as n,Fs as r,ma as t};
|
|
103
|
+
`})}return n},_s=/([\\`*_~[\]|])/g,vs=e=>e.replace(_s,`\\$1`),ys=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>t+vs(n).replace(/\n\n/g,` `)+r)}return n},bs=e=>e.type===`text`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(bs).join(``):``,xs=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(e=>e.toLowerCase()));h(t,`element`,e=>{if(n.has(e.tagName.toLowerCase())){let t=bs(e);e.children=t?[{type:`text`,value:t}]:[]}})},Ss=()=>e=>{h(e,`code`,e=>{e.meta&&(e.data=e.data??{},e.data.hProperties={...e.data.hProperties??{},metastring:e.meta})})},Cs=/^[ \t]*<[\w!/?-]/,ws=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,Ts=e=>typeof e!=`string`||e.length===0||!Cs.test(e)?e:e.replace(ws,`$1`),Es={...N,protocols:{...N.protocols,href:[...N.protocols?.href??[],`tel`]},attributes:{...N.attributes,code:[...N.attributes?.code??[],`metastring`]}},Ds={raw:Xe,sanitize:[ft,Es],harden:[ce,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},Os={gfm:[y,{}],codeMeta:Ss},ks=Object.values(Ds),As=Object.values(Os),js={block:` ▋`,circle:` ●`},Ms=[`github-light`,`github-dark`],Ns={enabled:!0},$=(0,O.createContext)({shikiTheme:Ms,controls:!0,isAnimating:!1,lineNumbers:!0,mode:`streaming`,mermaid:void 0,linkSafety:Ns}),Ps=(0,O.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:o,...s})=>{if(o){let e=o.getLastRenderCharCount();o.setPrevContentLength(e)}let c=typeof e==`string`&&n?Ts(e):e,l=(0,B.jsx)(Yo,{...s,children:c});return(0,B.jsx)(aa.Provider,{value:i,children:a?(0,B.jsx)(`div`,{dir:a,style:{display:`contents`},children:l}):l})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(n=>e.components?.[n]!==t.components?.[n]))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Ps.displayName=`Block`;var Fs=(0,O.memo)(({children:e,mode:t=`streaming`,dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=ks,remarkPlugins:s=As,className:c,shikiTheme:l=Ms,mermaid:u,controls:d=!0,isAnimating:f=!1,animated:p,BlockComponent:m=Ps,parseMarkdownIntoBlocksFn:h=hs,caret:g,plugins:_,remend:v,linkSafety:y=Ns,lineNumbers:b=!0,allowedTags:x,literalTagContent:S,translations:C,icons:w,prefix:ee,onAnimationStart:T,onAnimationEnd:te,...ne})=>{let re=(0,O.useId)(),[ie,E]=(0,O.useTransition)(),ae=(0,O.useMemo)(()=>la(ee),[ee]),oe=(0,O.useRef)(null),se=(0,O.useRef)(T),D=(0,O.useRef)(te);se.current=T,D.current=te,(0,O.useEffect)(()=>{var e,n,r;if(t===`static`)return;let i=oe.current;if(oe.current=f,i===null){f&&((e=se.current)==null||e.call(se));return}f&&!i?(n=se.current)==null||n.call(se):!f&&i&&((r=D.current)==null||r.call(D))},[f,t]);let k=(0,O.useMemo)(()=>x?Object.keys(x):[],[x]),ce=(0,O.useMemo)(()=>{if(typeof e!=`string`)return``;let n=t===`streaming`&&r?Vn(e,v):e;return S&&S.length>0&&(n=ys(n,S)),k.length>0&&(n=gs(n,k)),n},[e,t,r,v,k,S]),A=(0,O.useMemo)(()=>h(ce),[ce,h]),[le,ue]=(0,O.useState)(A);(0,O.useEffect)(()=>{t===`streaming`&&!me?E(()=>{ue(A)}):ue(A)},[A,t]);let j=t===`streaming`?le:A,de=(0,O.useMemo)(()=>n===`auto`?j.map(zo):void 0,[j,n]),fe=(0,O.useMemo)(()=>j.map((e,t)=>`${re}-${t}`),[j.length,re]),pe=(0,O.useMemo)(()=>p===!0?`true`:p?JSON.stringify(p):``,[p]),me=(0,O.useMemo)(()=>pe?pe===`true`?ia():ia(p):null,[pe]),he=(0,O.useMemo)(()=>({shikiTheme:(_?.code)?.getThemes()??l,controls:d,isAnimating:f,lineNumbers:b,mode:t,mermaid:u,linkSafety:y}),[l,d,f,b,t,u,y,_?.code]),ge=(0,O.useMemo)(()=>({...Ea,...C}),[(0,O.useMemo)(()=>C?JSON.stringify(C):``,[C])]),_e=(0,O.useMemo)(()=>{let{inlineCode:e,...t}=a??{},n={...Io,...t};if(e){let t=n.code;n.code=n=>`data-block`in n?t?(0,O.createElement)(t,n):null:(0,O.createElement)(e,n)}return n},[a]),ve=(0,O.useMemo)(()=>{let e=[];return _!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsBefore]),e=[...e,...s],_!=null&&_.cjk&&(e=[...e,..._.cjk.remarkPluginsAfter]),_!=null&&_.math&&(e=[...e,_.math.remarkPlugin]),e},[s,_?.math,_?.cjk]),ye=(0,O.useMemo)(()=>{let e=o;if(x&&Object.keys(x).length>0&&o===ks){let t={...Es,tagNames:[...Es.tagNames??[],...Object.keys(x)],attributes:{...Es.attributes,...x}};e=[Ds.raw,[ft,t],Ds.harden]}return S&&S.length>0&&(e=[...e,[xs,S]]),_!=null&&_.math&&(e=[...e,_.math.rehypePlugin]),me&&f&&(e=[...e,me.rehypePlugin]),e},[o,_?.math,me,f,x,S]),be=(0,O.useMemo)(()=>{if(!f||j.length===0)return!1;let e=j.at(-1);return Ho(e)||Uo(e)},[f,j]),xe=(0,O.useMemo)(()=>g&&f&&!be?{"--streamdown-caret":`"${js[g]}"`}:void 0,[g,f,be]);return t===`static`?(0,B.jsx)(Da.Provider,{value:ge,children:(0,B.jsx)(Ra.Provider,{value:_??null,children:(0,B.jsx)($.Provider,{value:he,children:(0,B.jsx)(Ta,{icons:w,children:(0,B.jsx)(da.Provider,{value:ae,children:(0,B.jsx)(`div`,{className:ae(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,c),dir:n===`auto`?zo(ce):n,children:(0,B.jsx)(Yo,{components:_e,rehypePlugins:ye,remarkPlugins:ve,...ne,children:ce})})})})})})}):(0,B.jsx)(Da.Provider,{value:ge,children:(0,B.jsx)(Ra.Provider,{value:_??null,children:(0,B.jsx)($.Provider,{value:he,children:(0,B.jsx)(Ta,{icons:w,children:(0,B.jsx)(da.Provider,{value:ae,children:(0,B.jsxs)(`div`,{className:ae(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,g&&!be?`[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]`:null,c),style:xe,children:[j.length===0&&g&&f&&(0,B.jsx)(`span`,{}),j.map((e,t)=>{let a=t===j.length-1,o=f&&a&&Ho(e);return(0,B.jsx)(m,{animatePlugin:me,components:_e,content:e,dir:de?.[t]??(n===`auto`?void 0:n),index:t,isIncomplete:o,rehypePlugins:ye,remarkPlugins:ve,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...ne},fe[t])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);Fs.displayName=`Streamdown`;var Is=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:a=!0,initialZoom:o=1,fullscreen:s=!1})=>{let{RotateCcwIcon:c,ZoomInIcon:l,ZoomOutIcon:u}=X(),d=Y(),f=(0,O.useRef)(null),p=(0,O.useRef)(null),[m,h]=(0,O.useState)(o),[g,_]=(0,O.useState)({x:0,y:0}),[v,y]=(0,O.useState)(!1),[b,x]=(0,O.useState)({x:0,y:0}),[S,C]=(0,O.useState)({x:0,y:0}),w=(0,O.useCallback)(e=>{h(t=>Math.max(n,Math.min(r,t+e)))},[n,r]),ee=(0,O.useCallback)(()=>{w(i)},[w,i]),T=(0,O.useCallback)(()=>{w(-i)},[w,i]),te=(0,O.useCallback)(()=>{h(o),_({x:0,y:0})},[o]),ne=(0,O.useCallback)(e=>{e.preventDefault(),w(e.deltaY>0?-i:i)},[w,i]),re=(0,O.useCallback)(e=>{if(e.button!==0||e.isPrimary===!1)return;y(!0),x({x:e.clientX,y:e.clientY}),C(g);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[g]),ie=(0,O.useCallback)(e=>{if(!v)return;e.preventDefault();let t=e.clientX-b.x,n=e.clientY-b.y;_({x:S.x+t,y:S.y+n})},[v,b,S]),E=(0,O.useCallback)(e=>{y(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);return(0,O.useEffect)(()=>{let e=f.current;if(e)return e.addEventListener(`wheel`,ne,{passive:!1}),()=>{e.removeEventListener(`wheel`,ne)}},[ne]),(0,O.useEffect)(()=>{let e=p.current;if(e&&v)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,ie,{passive:!1}),e.addEventListener(`pointerup`,E),e.addEventListener(`pointercancel`,E),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,ie),e.removeEventListener(`pointerup`,E),e.removeEventListener(`pointercancel`,E)}},[v,ie,E]),(0,B.jsxs)(`div`,{className:d(`relative flex flex-col`,s?`h-full w-full`:`min-h-28 w-full`,t),ref:f,style:{cursor:v?`grabbing`:`grab`},children:[a?(0,B.jsxs)(`div`,{className:d(`absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm`,s?`bottom-4 left-4`:`bottom-2 left-2`),children:[(0,B.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:m>=r,onClick:ee,title:`Zoom in`,type:`button`,children:(0,B.jsx)(l,{size:16})}),(0,B.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:m<=n,onClick:T,title:`Zoom out`,type:`button`,children:(0,B.jsx)(u,{size:16})}),(0,B.jsx)(`button`,{className:d(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`),onClick:te,title:`Reset zoom and pan`,type:`button`,children:(0,B.jsx)(c,{size:16})})]}):null,(0,B.jsx)(`div`,{className:d(`flex-1 origin-center transition-transform duration-150 ease-out`,s?`flex h-full w-full items-center justify-center`:`flex w-full items-center justify-center`),onPointerDown:re,ref:p,role:`application`,style:{transform:`translate(${g.x}px, ${g.y}px) scale(${m})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},Ls=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=Y(),[o,s]=(0,O.useState)(null),[c,l]=(0,O.useState)(!1),[u,d]=(0,O.useState)(``),[f,p]=(0,O.useState)(``),[m,h]=(0,O.useState)(0),{mermaid:g}=(0,O.useContext)($),_=Va(),v=g?.errorComponent,{shouldRender:y,containerRef:b}=qi({immediate:r});if((0,O.useEffect)(()=>{if(y){if(!_){s(`Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.`);return}(async()=>{try{s(null),l(!0);let t=_.getMermaid(n),r=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),i=`mermaid-${Math.abs(r)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:a}=await t.render(i,e);d(a),p(a)}catch(e){f||u||s(e instanceof Error?e.message:`Failed to render Mermaid chart`)}finally{l(!1)}})()}},[e,n,m,y,_]),!(y||u||f))return(0,B.jsx)(`div`,{className:a(`my-4 min-h-[200px]`,t),ref:b});if(c&&!u&&!f)return(0,B.jsx)(`div`,{className:a(`my-4 flex justify-center p-4`,t),ref:b,children:(0,B.jsxs)(`div`,{className:a(`flex items-center space-x-2 text-muted-foreground`),children:[(0,B.jsx)(`div`,{className:a(`h-4 w-4 animate-spin rounded-full border-current border-b-2`)}),(0,B.jsx)(`span`,{className:a(`text-sm`),children:`Loading diagram...`})]})});if(o&&!u&&!f)return v?(0,B.jsx)(`div`,{ref:b,children:(0,B.jsx)(v,{chart:e,error:o,retry:()=>h(e=>e+1)})}):(0,B.jsxs)(`div`,{className:a(`rounded-md bg-red-50 p-4`,t),ref:b,children:[(0,B.jsxs)(`p`,{className:a(`font-mono text-red-700 text-sm`),children:[`Mermaid Error: `,o]}),(0,B.jsxs)(`details`,{className:a(`mt-2`),children:[(0,B.jsx)(`summary`,{className:a(`cursor-pointer text-red-600 text-xs`),children:`Show Code`}),(0,B.jsx)(`pre`,{className:a(`mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs`),children:e})]})]});let x=u||f;return(0,B.jsx)(`div`,{className:a(`size-full`,t),"data-streamdown":`mermaid`,ref:b,children:(0,B.jsx)(Is,{className:a(r?`size-full overflow-hidden`:`overflow-hidden`,t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:(0,B.jsx)(`div`,{"aria-label":`Mermaid chart`,className:a(`flex justify-center`,r?`size-full items-center`:null),dangerouslySetInnerHTML:{__html:x},role:`img`})})})};export{Ls as a,$ as i,Ba as n,Fs as r,ma as t};
|