@yaoshu-ai/ai-chat 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +448 -0
- package/dist/1.png +0 -0
- package/dist/2.png +0 -0
- package/dist/RenderContent-Dlqka7tn.js +33786 -0
- package/dist/__vite-optional-peer-dep_stream-monaco_markstream-vue_false-HdL4xm5U.js +5 -0
- package/dist/__vite-optional-peer-dep_vue-i18n_markstream-vue_false-B9Pwe5kz.js +5 -0
- package/dist/_arrayEach-CWzCztxB.js +44 -0
- package/dist/abap-Y8Dl9g_6.js +6 -0
- package/dist/actionscript-3-DQVEcJUW.js +6 -0
- package/dist/ada-vP6ak0IW.js +6 -0
- package/dist/ai-chat.css +1 -0
- package/dist/andromeeda-BbmzSJq1.js +4 -0
- package/dist/angular-html-DPB4Rf0C.js +32 -0
- package/dist/angular-ts-CTOR2ofC.js +21 -0
- package/dist/apache-BUjz-sD2.js +6 -0
- package/dist/apex-OyTfjCYK.js +6 -0
- package/dist/apl-CjNiDgad.js +16 -0
- package/dist/applescript-BPx7YFFu.js +6 -0
- package/dist/ara-Z2fSOxSw.js +6 -0
- package/dist/arc-B1p3jPmf.js +83 -0
- package/dist/architecture-U656AL7Q-BbBZWZnv.js +5 -0
- package/dist/architectureDiagram-VXUJARFQ-o3qI6Hfe.js +4662 -0
- package/dist/asciidoc-C1T9ziH6.js +6 -0
- package/dist/asm-BTWLY5ym.js +6 -0
- package/dist/assets/_basePickBy-Cpv34cvw.js +151 -0
- package/dist/assets/_baseUniq-DcdXmdC4.js +614 -0
- package/dist/assets/arc-B0v8Xerj.js +83 -0
- package/dist/assets/architectureDiagram-VXUJARFQ-CuYvJnXX.js +4662 -0
- package/dist/assets/blockDiagram-VD42YOAC-BxZitMjG.js +2262 -0
- package/dist/assets/c4Diagram-YG6GDRKO-ZsN99P-D.js +1580 -0
- package/dist/assets/channel-d_ygJPeO.js +5 -0
- package/dist/assets/chunk-4BX2VUAB-96IoYLlF.js +8 -0
- package/dist/assets/chunk-55IACEB6-gENcR4HP.js +8 -0
- package/dist/assets/chunk-B4BG7PRW-BOypo6sC.js +1375 -0
- package/dist/assets/chunk-DI55MBZ5-DHEKLVmM.js +1370 -0
- package/dist/assets/chunk-FMBD7UC4-CZ-mW5Zk.js +19 -0
- package/dist/assets/chunk-QN33PNHL-BeoL9V94.js +19 -0
- package/dist/assets/chunk-QZHKN3VN-DedBAq5I.js +15 -0
- package/dist/assets/chunk-TZMSLE5B-Bg9wRIeU.js +64 -0
- package/dist/assets/classDiagram-2ON5EDUG-OqXlgyvI.js +19 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-OqXlgyvI.js +19 -0
- package/dist/assets/clone-D3-moMc7.js +8 -0
- package/dist/assets/cose-bilkent-S5V4N54A-CrU20ri2.js +2607 -0
- package/dist/assets/cytoscape.esm-DfdJODL8.js +18735 -0
- package/dist/assets/dagre-6UL2VRFP-BMNAUhAh.js +444 -0
- package/dist/assets/defaultLocale-57BWB7pV.js +171 -0
- package/dist/assets/diagram-PSM6KHXK-DDXdcx9h.js +535 -0
- package/dist/assets/diagram-QEK2KX5R-DaOkv31-.js +220 -0
- package/dist/assets/diagram-S2PKOQOG-Kk0nHneV.js +145 -0
- package/dist/assets/erDiagram-Q2GNP2WA-DVKOxqjl.js +841 -0
- package/dist/assets/flowDiagram-NV44I4VS-BoWYkdqy.js +1620 -0
- package/dist/assets/ganttDiagram-LVOFAZNH-Dvgzms7S.js +2500 -0
- package/dist/assets/gitGraphDiagram-NY62KEGX-Bna3uwG8.js +702 -0
- package/dist/assets/graph-BLzmbjIy.js +247 -0
- package/dist/assets/infoDiagram-ER5ION4S-Did3mqZL.js +27 -0
- package/dist/assets/init-DjUOC4st.js +16 -0
- package/dist/assets/journeyDiagram-XKPGCS4Q-C3BPCBal.js +834 -0
- package/dist/assets/kanban-definition-3W4ZIXB7-Cf5SUn-1.js +719 -0
- package/dist/assets/katex-SsTUIUTC.js +11688 -0
- package/dist/assets/layout-B00gooay.js +1335 -0
- package/dist/assets/linear-DVxTWzAi.js +259 -0
- package/dist/assets/mindmap-definition-VGOIOE7T-Q-_IrD51.js +785 -0
- package/dist/assets/ordinal-DfAQgscy.js +61 -0
- package/dist/assets/pieDiagram-ADFJNKIX-LygDPC1s.js +165 -0
- package/dist/assets/quadrantDiagram-AYHSOK5B-77SStCdg.js +1024 -0
- package/dist/assets/requirementDiagram-UZGBJVZJ-CMlgwZi9.js +850 -0
- package/dist/assets/sankeyDiagram-TZEHDZUN-DnlAgtvb.js +811 -0
- package/dist/assets/sequenceDiagram-WL72ISMW-Cf4BDgIS.js +2511 -0
- package/dist/assets/stateDiagram-FKZM4ZOC-CBGqngi4.js +267 -0
- package/dist/assets/stateDiagram-v2-4FDKWEC3-BZTJjZnO.js +18 -0
- package/dist/assets/timeline-definition-IT6M3QCI-DVwyHSfZ.js +795 -0
- package/dist/assets/treemap-KMMF4GRG-Bx903ckh.js +12994 -0
- package/dist/assets/xychartDiagram-PRI3JC2R-pvSCMiXN.js +1341 -0
- package/dist/astro-CFFExE8Q.js +18 -0
- package/dist/aurora-x-BwoVEUWZ.js +4 -0
- package/dist/awk-Fb0P9dkn.js +6 -0
- package/dist/ayu-dark-DJoqd4M9.js +4 -0
- package/dist/ayu-light-BzXEJRJ-.js +4 -0
- package/dist/ayu-mirage-BJ2oZGzi.js +4 -0
- package/dist/ballerina-oZK-YekG.js +6 -0
- package/dist/bat-0FvbqU9S.js +6 -0
- package/dist/beancount-DqJEb89h.js +6 -0
- package/dist/berry-DODBq_Ff.js +6 -0
- package/dist/bibtex-EULQRLY5.js +6 -0
- package/dist/bicep-BorU73w0.js +6 -0
- package/dist/bird2-CraR6qSn.js +6 -0
- package/dist/blade-D0HyNvCw.js +20 -0
- package/dist/blockDiagram-VD42YOAC-DahK-Cj4.js +2364 -0
- package/dist/bsl-NkNNwerW.js +8 -0
- package/dist/c-eeMepfLm.js +6 -0
- package/dist/c3-BY5XW5ym.js +6 -0
- package/dist/c4Diagram-YG6GDRKO-DEyHjCYx.js +1580 -0
- package/dist/cadence-02UX7mW8.js +6 -0
- package/dist/cairo-DM6WF2e3.js +8 -0
- package/dist/catppuccin-frappe-D3cH2rXe.js +4 -0
- package/dist/catppuccin-latte-C0LRGUW4.js +4 -0
- package/dist/catppuccin-macchiato-c5wQ11TT.js +4 -0
- package/dist/catppuccin-mocha-WMD6Qvya.js +4 -0
- package/dist/channel-3keaKHdb.js +5 -0
- package/dist/chunk-4BX2VUAB-DAiVtoK8.js +8 -0
- package/dist/chunk-55IACEB6-CaBF4LGk.js +8 -0
- package/dist/chunk-B4BG7PRW-BRwDg4Nv.js +1375 -0
- package/dist/chunk-DI55MBZ5-DSCddmFg.js +1370 -0
- package/dist/chunk-FMBD7UC4-DeD5V5dF.js +19 -0
- package/dist/chunk-QN33PNHL-DtsdNsBa.js +19 -0
- package/dist/chunk-QZHKN3VN-BjOYbdQP.js +15 -0
- package/dist/chunk-TZMSLE5B-BwhJBSuO.js +64 -0
- package/dist/clarity-PKm5CwqM.js +6 -0
- package/dist/classDiagram-2ON5EDUG-C0IaF0ZL.js +16 -0
- package/dist/classDiagram-v2-WZHVMYZB-C0IaF0ZL.js +16 -0
- package/dist/clojure-CXJfHrL3.js +6 -0
- package/dist/cmake-BJz8BOTU.js +6 -0
- package/dist/cobol-DBolczTz.js +10 -0
- package/dist/codeowners-Bt9yU6NX.js +6 -0
- package/dist/codeql-DHkodjjI.js +6 -0
- package/dist/coffee-DGBR_nr_.js +8 -0
- package/dist/common-lisp-EVqT9Zhp.js +6 -0
- package/dist/coq-B0L9upzn.js +6 -0
- package/dist/cose-bilkent-S5V4N54A-CRxUs4km.js +2609 -0
- package/dist/cpp-Cj177cuW.js +18 -0
- package/dist/crystal-CRJyc4G-.js +18 -0
- package/dist/csharp-CCgA4A09.js +6 -0
- package/dist/css-CECN5uSL.js +6 -0
- package/dist/csv-CmYOceLb.js +6 -0
- package/dist/cue-ZzumE7IT.js +6 -0
- package/dist/cypher-jpdmjtA6.js +6 -0
- package/dist/cytoscape.esm-DfdJODL8.js +18735 -0
- package/dist/d-CBagWSwH.js +6 -0
- package/dist/d2_markstream-vue_false-BfRvcluz.js +5 -0
- package/dist/dagre-6UL2VRFP-dTDl1Tgv.js +442 -0
- package/dist/dark-plus-pUHDTVV0.js +4 -0
- package/dist/dart-6ObCrKr9.js +6 -0
- package/dist/dax-CcDT-8dH.js +6 -0
- package/dist/defaultLocale-D7EN2tov.js +171 -0
- package/dist/desktop-B93p9R9O.js +6 -0
- package/dist/diagram-PSM6KHXK-Dh-BBqVQ.js +531 -0
- package/dist/diagram-QEK2KX5R-CPqYwhdb.js +217 -0
- package/dist/diagram-S2PKOQOG-CapIa3n7.js +142 -0
- package/dist/diff-BxzP2J8R.js +6 -0
- package/dist/docker-CsHqm9tx.js +6 -0
- package/dist/dotenv-BMjVjUL1.js +6 -0
- package/dist/dracula-BtZx2Kac.js +4 -0
- package/dist/dracula-soft-BKa-aqBv.js +4 -0
- package/dist/dream-maker-PAx17jaB.js +6 -0
- package/dist/echarts-gl.min.js +1 -0
- package/dist/echarts.min.js +46 -0
- package/dist/edge-BYQkOzbF.js +12 -0
- package/dist/elixir-Dh036GMp.js +8 -0
- package/dist/elm-BtNbw_Cd.js +8 -0
- package/dist/emacs-lisp-Cfxdx5D-.js +6 -0
- package/dist/erDiagram-Q2GNP2WA-B8d80SOq.js +841 -0
- package/dist/erb-ScVOXVpH.js +10 -0
- package/dist/erlang-DNcDT8Hi.js +8 -0
- package/dist/everforest-dark-DMCBqXCK.js +4 -0
- package/dist/everforest-light-BbXl82Em.js +4 -0
- package/dist/favicon.svg +1 -0
- package/dist/fennel-N4WcXuKx.js +6 -0
- package/dist/fish-BTDEUgqH.js +6 -0
- package/dist/flowDiagram-NV44I4VS-Wtd6x8Dz.js +1620 -0
- package/dist/fluent-BMXUxfv1.js +6 -0
- package/dist/fortran-fixed-form-B67KFkXH.js +8 -0
- package/dist/fortran-free-form-CwqYvCLJ.js +6 -0
- package/dist/fsharp-CYOiIVNx.js +8 -0
- package/dist/ganttDiagram-LVOFAZNH-PIGXq8YG.js +2506 -0
- package/dist/gdresource-CvCIUjhi.js +10 -0
- package/dist/gdscript-DSAxJ_aS.js +6 -0
- package/dist/gdshader-Bk8fF6yr.js +6 -0
- package/dist/genie-DzUvd7U9.js +6 -0
- package/dist/geo.json +1 -0
- package/dist/gherkin-DHRaV0YP.js +6 -0
- package/dist/git-commit-Bd32YZ0K.js +8 -0
- package/dist/git-rebase-ZWUFO_T4.js +8 -0
- package/dist/gitGraph-F6HP7TQM-CIGXYS91.js +5 -0
- package/dist/gitGraphDiagram-NY62KEGX-BDnzMpYT.js +699 -0
- package/dist/github-dark-DenFmJkN.js +4 -0
- package/dist/github-dark-default-BJPUVz4H.js +4 -0
- package/dist/github-dark-dimmed-DUshB20C.js +4 -0
- package/dist/github-dark-high-contrast-D3aGCnF8.js +4 -0
- package/dist/github-light-JYsPkUQd.js +4 -0
- package/dist/github-light-default-D99KPAby.js +4 -0
- package/dist/github-light-high-contrast-BbmZE-Mp.js +4 -0
- package/dist/gleam-Bv284lvN.js +6 -0
- package/dist/glimmer-js-DkxNrfPT.js +14 -0
- package/dist/glimmer-ts-D6YZEmK_.js +14 -0
- package/dist/glsl-CkUcVZNK.js +8 -0
- package/dist/gn-XtJxiLa4.js +6 -0
- package/dist/gnuplot-yPG9-sE_.js +6 -0
- package/dist/go-CvFNMTvu.js +6 -0
- package/dist/graph-BJDrjORS.js +244 -0
- package/dist/graphql-CBu2ehBn.js +14 -0
- package/dist/groovy-CJQTphOW.js +6 -0
- package/dist/gruvbox-dark-hard-C5HOtKIh.js +4 -0
- package/dist/gruvbox-dark-medium-FVgwJHuz.js +4 -0
- package/dist/gruvbox-dark-soft-B46F314v.js +4 -0
- package/dist/gruvbox-light-hard-CJD38wDZ.js +4 -0
- package/dist/gruvbox-light-medium-BlIhMYTA.js +4 -0
- package/dist/gruvbox-light-soft-DoPHyLVZ.js +4 -0
- package/dist/hack-ItRNKiEb.js +10 -0
- package/dist/haml-NZLVzu_R.js +10 -0
- package/dist/handlebars-mxStpSE7.js +14 -0
- package/dist/haskell-WeIwNIP6.js +6 -0
- package/dist/haxe-TztHsm5T.js +6 -0
- package/dist/hcl-D438OF-I.js +6 -0
- package/dist/hjson-DYBUbqOl.js +6 -0
- package/dist/hlsl-Bk8TCZNL.js +6 -0
- package/dist/horizon-CJQ10nlf.js +4 -0
- package/dist/horizon-bright-2WzHy-Vo.js +4 -0
- package/dist/houston-BDYrDoDW.js +4 -0
- package/dist/html-B50bmoVb.js +10 -0
- package/dist/html-derivative-C6bxFbFW.js +8 -0
- package/dist/http-DLvAkeD-.js +14 -0
- package/dist/hurl-CgkFN90t.js +12 -0
- package/dist/hxml-GbqSQCLa.js +8 -0
- package/dist/hy-Brt5EZ7-.js +6 -0
- package/dist/imba-CimUv-Uh.js +6 -0
- package/dist/index-C8Q6O4II.js +513 -0
- package/dist/index-DAiOgSvo.js +10210 -0
- package/dist/index-qjiatRMM.js +74370 -0
- package/dist/index.es.js +12 -0
- package/dist/index2-Pjnp80bi.js +70 -0
- package/dist/index3-Bhg7Q86T.js +70 -0
- package/dist/index4-5xarPQV7.js +544 -0
- package/dist/index5-DYxqqGmv.js +592 -0
- package/dist/index6-DXyezjvJ.js +196 -0
- package/dist/index7-IFig1gg1.js +217 -0
- package/dist/info-NVLQJR56-CFDwNFH-.js +5 -0
- package/dist/infoDiagram-ER5ION4S-ClOwLtgG.js +24 -0
- package/dist/infographic_markstream-vue_false-BfsmcXxk.js +5 -0
- package/dist/ini-BZIuRIvJ.js +6 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/java-DY6VlHhP.js +6 -0
- package/dist/javascript-C25yR2R2.js +6 -0
- package/dist/jinja-CFW5uAwY.js +11 -0
- package/dist/jison-DdreslRX.js +8 -0
- package/dist/journeyDiagram-XKPGCS4Q-_UZpi048.js +834 -0
- package/dist/json-DxJze_jm.js +6 -0
- package/dist/json5-BT4Fjg39.js +6 -0
- package/dist/jsonc-CHjZD8gR.js +6 -0
- package/dist/jsonl-BGuvDmy9.js +6 -0
- package/dist/jsonnet-Bx2cfsXg.js +6 -0
- package/dist/jssm-BcADi6EI.js +6 -0
- package/dist/jsx-BtKADgXT.js +6 -0
- package/dist/julia-CZiKXNNP.js +16 -0
- package/dist/just-CEK2SJ_k.js +18 -0
- package/dist/kanagawa-dragon-CiKur4Hl.js +4 -0
- package/dist/kanagawa-lotus-BKu-smKu.js +4 -0
- package/dist/kanagawa-wave-CQwozSzG.js +4 -0
- package/dist/kanban-definition-3W4ZIXB7-Cutzg6yp.js +719 -0
- package/dist/katex-SsTUIUTC.js +11688 -0
- package/dist/kdl-BNOv9TC3.js +6 -0
- package/dist/kotlin-ByBMgTeR.js +6 -0
- package/dist/kusto-DH_XitHS.js +6 -0
- package/dist/languageIconExtended-OLNeqZ3A.js +119 -0
- package/dist/laserwave-6a00oqik.js +4 -0
- package/dist/latex-B8Egmqc5.js +8 -0
- package/dist/layout-PTzgkkQP.js +1223 -0
- package/dist/lean-BnVxaZxY.js +6 -0
- package/dist/less-B1GLI2Di.js +6 -0
- package/dist/light-plus-CZuVqSLX.js +4 -0
- package/dist/linear-Bye2JJhy.js +259 -0
- package/dist/liquid-CHzkx3jT.js +14 -0
- package/dist/llvm-Bk2XctFf.js +6 -0
- package/dist/log-Al8wyEFV.js +6 -0
- package/dist/logo-DBa4JDzV.js +6 -0
- package/dist/lua-Bp3IRv7I.js +8 -0
- package/dist/luau-UQyhudEE.js +6 -0
- package/dist/make-CsMclxtr.js +6 -0
- package/dist/markdown-CrScaQ96.js +6 -0
- package/dist/marko-CJBA24Ri.js +14 -0
- package/dist/material-theme-D6KBX41T.js +4 -0
- package/dist/material-theme-darker-CkRroheE.js +4 -0
- package/dist/material-theme-lighter-BUBw43Yz.js +4 -0
- package/dist/material-theme-ocean-ClGX14Ja.js +4 -0
- package/dist/material-theme-palenight-C1RVm8K1.js +4 -0
- package/dist/matlab-BOAaUVP0.js +6 -0
- package/dist/mdc-C9YSUwVC.js +12 -0
- package/dist/mdx-BOhZZUJ8.js +6 -0
- package/dist/mermaid-C3rz4dYh.js +6 -0
- package/dist/mermaid-parser.core-C86xHHvY.js +13249 -0
- package/dist/mermaid.core-BIhT9VUC.js +14709 -0
- package/dist/mhchem-XHl7cef5.js +2306 -0
- package/dist/min-dark-C7ak0t6c.js +4 -0
- package/dist/min-light-CKFxVcPp.js +4 -0
- package/dist/mindmap-definition-VGOIOE7T-l17eTXZb.js +784 -0
- package/dist/mipsasm-CTx18fBl.js +6 -0
- package/dist/mojo-EIZIZRTQ.js +6 -0
- package/dist/monokai-C1KBYcO0.js +4 -0
- package/dist/moonbit-B1TV0fG3.js +6 -0
- package/dist/move-Db4ltDq1.js +6 -0
- package/dist/narrat-DmhDCBs-.js +6 -0
- package/dist/nextflow-47kAzSl1.js +8 -0
- package/dist/nextflow-groovy-Drz_2V0j.js +6 -0
- package/dist/nginx-D7O4WoB1.js +8 -0
- package/dist/night-owl-Bm2rzalh.js +4 -0
- package/dist/night-owl-light-CBI5u5kw.js +4 -0
- package/dist/nim-QAjRdh9w.js +20 -0
- package/dist/nix-fTRXMGic.js +9 -0
- package/dist/nord-CC5OiUXg.js +4 -0
- package/dist/nushell-BGCPRlV5.js +6 -0
- package/dist/objective-c-Itk8tzmv.js +6 -0
- package/dist/objective-cpp-DGt5UKRO.js +6 -0
- package/dist/ocaml-eSVK32Eg.js +6 -0
- package/dist/odin-BItnF517.js +6 -0
- package/dist/one-dark-pro-DTA3VF0_.js +4 -0
- package/dist/one-light-LkMrt1Cf.js +4 -0
- package/dist/openscad-Sp5uZ6f2.js +6 -0
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/packet-BFZMPI3H-c2t_1f8D.js +5 -0
- package/dist/pascal-xy8pJNns.js +6 -0
- package/dist/perl-DkVrgJBg.js +16 -0
- package/dist/php-BIzsF_5x.js +18 -0
- package/dist/pie-7BOR55EZ-CVvzPUU7.js +5 -0
- package/dist/pieDiagram-ADFJNKIX-C01Py6L8.js +161 -0
- package/dist/pkl-C-zSNmaA.js +6 -0
- package/dist/plastic-CSTz3KZp.js +4 -0
- package/dist/plsql-pVbGZfOv.js +6 -0
- package/dist/po-BNfHvqmm.js +6 -0
- package/dist/poimandres-C-VADXHD.js +4 -0
- package/dist/polar-CAZahv3u.js +6 -0
- package/dist/postcss-05aHdL-n.js +6 -0
- package/dist/powerquery-DI9HkTvs.js +6 -0
- package/dist/powershell-Clc4ydu-.js +6 -0
- package/dist/prisma-FZjmVtSl.js +6 -0
- package/dist/prolog-C5-yg4TO.js +6 -0
- package/dist/proto-C7QgialS.js +6 -0
- package/dist/pug-XOw9Q1Ho.js +12 -0
- package/dist/puppet-CUJHmnxV.js +6 -0
- package/dist/purescript-rUfGld-4.js +6 -0
- package/dist/python-BFNSHbwJ.js +6 -0
- package/dist/qml-rTNXsquU.js +8 -0
- package/dist/qmldir-BInDYbpo.js +6 -0
- package/dist/qss-AeJTysr_.js +6 -0
- package/dist/quadrantDiagram-AYHSOK5B-sypB1aPG.js +1022 -0
- package/dist/r-CSmzDPi7.js +6 -0
- package/dist/racket-B83wSAja.js +6 -0
- package/dist/radar-NHE76QYJ-GJjAzk_L.js +5 -0
- package/dist/raku-nEQ4ZJJ7.js +6 -0
- package/dist/razor-Ci8D0dQK.js +10 -0
- package/dist/red-7y8PH7HH.js +4 -0
- package/dist/reg-m_s_Kiip.js +6 -0
- package/dist/regexp-BazyLpPg.js +6 -0
- package/dist/rel-BcRfyd6Q.js +6 -0
- package/dist/requirementDiagram-UZGBJVZJ-Cs95WEDy.js +850 -0
- package/dist/riscv-Ce8MAQLP.js +6 -0
- package/dist/ron-DCEEQypA.js +6 -0
- package/dist/rose-pine-BKc3yVeu.js +4 -0
- package/dist/rose-pine-dawn-BulJcPZT.js +4 -0
- package/dist/rose-pine-moon-j6jiXKV8.js +4 -0
- package/dist/rosmsg-Cz0w1km8.js +6 -0
- package/dist/rst-DM32Wy3O.js +22 -0
- package/dist/ruby-BeqCs27h.js +30 -0
- package/dist/rust-CLzF9zIN.js +6 -0
- package/dist/safeRaf-I3a3-dyJ.js +10 -0
- package/dist/sankeyDiagram-TZEHDZUN-BN3bNFt9.js +810 -0
- package/dist/sas-fpEvgATw.js +8 -0
- package/dist/sass-DxHp5rTx.js +6 -0
- package/dist/scala-D4grkFkl.js +6 -0
- package/dist/scheme-BCRWuEm4.js +6 -0
- package/dist/scss-B1FaCqwR.js +8 -0
- package/dist/sdbl-B7T8abf4.js +6 -0
- package/dist/sequenceDiagram-WL72ISMW-CZ6inTco.js +2511 -0
- package/dist/shaderlab-Cr62-Wb4.js +8 -0
- package/dist/shellscript-InADTalH.js +6 -0
- package/dist/shellsession-DiDJNQdy.js +8 -0
- package/dist/slack-dark-i7wN4OET.js +4 -0
- package/dist/slack-ochin-ndHf0LoP.js +4 -0
- package/dist/smalltalk-BlI1_OkM.js +6 -0
- package/dist/snazzy-light-BlSJXAu4.js +4 -0
- package/dist/solarized-dark-UTmkh7lw.js +4 -0
- package/dist/solarized-light-BheCkDPT.js +4 -0
- package/dist/solidity-DUWnFhS6.js +6 -0
- package/dist/soy-C1-6njHa.js +8 -0
- package/dist/sparql-B0KWFEri.js +8 -0
- package/dist/splunk-CRXR8A9s.js +6 -0
- package/dist/sql-Cn_v3PB0.js +6 -0
- package/dist/ssh-config-DP-hNVbF.js +6 -0
- package/dist/stata-B8c5fTjX.js +8 -0
- package/dist/stateDiagram-FKZM4ZOC-BjHpkttt.js +264 -0
- package/dist/stateDiagram-v2-4FDKWEC3-SoFWin9i.js +16 -0
- package/dist/stylus-CyKEU1Ej.js +6 -0
- package/dist/surrealql-CQi7GQN7.js +8 -0
- package/dist/svelte-rYri41WT.js +14 -0
- package/dist/swift-DJpUqPLg.js +6 -0
- package/dist/synthwave-84-NU3C_KFZ.js +4 -0
- package/dist/system-verilog-BCm7smPJ.js +6 -0
- package/dist/systemd-C-4qm6XH.js +6 -0
- package/dist/talonscript-CFF3LF_O.js +6 -0
- package/dist/tasl-Cg_WBUAe.js +6 -0
- package/dist/tcl-DN7buRTF.js +6 -0
- package/dist/templ-Crs9Ui8q.js +12 -0
- package/dist/terraform-DGvcn9zM.js +6 -0
- package/dist/tex-AHxmLTL0.js +8 -0
- package/dist/timeline-definition-IT6M3QCI-axILemxx.js +795 -0
- package/dist/tokyo-night-DP4TmcQl.js +4 -0
- package/dist/toml-DY62mUL_.js +6 -0
- package/dist/treemap-KMMF4GRG-DLUO0usq.js +5 -0
- package/dist/ts-tags-BUclWxCG.js +41 -0
- package/dist/tsv-BtvSkaG0.js +6 -0
- package/dist/tsx-B8rCNbgL.js +6 -0
- package/dist/turtle-_H59FV7D.js +6 -0
- package/dist/twig-DwV2Fi4L.js +18 -0
- package/dist/typescript-RycA9KXf.js +6 -0
- package/dist/typespec-DWqp-kUU.js +6 -0
- package/dist/typst-D_1QKWns.js +6 -0
- package/dist/v-BPCNiyYe.js +6 -0
- package/dist/vala-uxaPR7d1.js +6 -0
- package/dist/vb-D8_c5-KN.js +6 -0
- package/dist/verilog-B-bybjPF.js +6 -0
- package/dist/vesper-BckBta1U.js +4 -0
- package/dist/vhdl-CUlNa8ac.js +6 -0
- package/dist/viml-DsfA-sWm.js +6 -0
- package/dist/vitesse-black-BoGvW84i.js +4 -0
- package/dist/vitesse-dark-Cym-eLtO.js +4 -0
- package/dist/vitesse-light-CcmG315c.js +4 -0
- package/dist/vue-DXEmyXn9.js +31 -0
- package/dist/vue-html-j9xNEdu3.js +8 -0
- package/dist/vue-vine-D41-N99t.js +18 -0
- package/dist/vyper-CPQuu50u.js +6 -0
- package/dist/wasm-BBXxrAl7.js +6 -0
- package/dist/wasm-DQxwEHae.js +7 -0
- package/dist/wenyan-pbVjoM9_.js +6 -0
- package/dist/wgsl-DY4iK1q1.js +6 -0
- package/dist/wikitext-Z-MoUasO.js +6 -0
- package/dist/wit-CQMQOlTg.js +6 -0
- package/dist/wolfram-Dz4KXISs.js +6 -0
- package/dist/xml-C2J0sS9M.js +8 -0
- package/dist/xsl-BmSZphgC.js +8 -0
- package/dist/xychartDiagram-PRI3JC2R-C7nmWmlk.js +1340 -0
- package/dist/yaml-DaO7k5B1.js +6 -0
- package/dist/zenscript-CxBjpf9c.js +6 -0
- package/dist/zig-Vm0PO9wB.js +6 -0
- package/package.json +134 -0
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
import { defineComponent as At, ref as d, computed as Q, watch as V, onBeforeUnmount as Ft, onMounted as Rt, onUnmounted as Ht, createElementBlock as w, openBlock as g, normalizeClass as y, createCommentVNode as ee, withDirectives as Nt, renderSlot as Je, createElementVNode as n, unref as h, toDisplayString as xe, normalizeStyle as xt, createBlock as _t, mergeProps as kt, toHandlers as bt, Teleport as Xt, createVNode as Yt, Transition as Vt, withCtx as Zt, withModifiers as qt, vShow as It, nextTick as A } from "vue";
|
|
2
|
+
import { l as Ut, u as Wt, m as Gt, V as Mt, r as Tt, b as Kt, W as Jt, R as Qt, Y as el } from "./RenderContent-Dlqka7tn.js";
|
|
3
|
+
import { e as tl } from "./safeRaf-I3a3-dyJ.js";
|
|
4
|
+
var ll = Object.defineProperty, rl = Object.defineProperties, nl = Object.getOwnPropertyDescriptors, Ct = Object.getOwnPropertySymbols, ol = Object.prototype.hasOwnProperty, al = Object.prototype.propertyIsEnumerable, Dt = (L, j, M) => j in L ? ll(L, j, { enumerable: !0, configurable: !0, writable: !0, value: M }) : L[j] = M, Qe = (L, j) => {
|
|
5
|
+
for (var M in j || (j = {})) ol.call(j, M) && Dt(L, M, j[M]);
|
|
6
|
+
if (Ct) for (var M of Ct(j)) al.call(j, M) && Dt(L, M, j[M]);
|
|
7
|
+
return L;
|
|
8
|
+
}, D = (L, j, M) => new Promise((ke, o) => {
|
|
9
|
+
var re = (F) => {
|
|
10
|
+
try {
|
|
11
|
+
P(M.next(F));
|
|
12
|
+
} catch (ne) {
|
|
13
|
+
o(ne);
|
|
14
|
+
}
|
|
15
|
+
}, be = (F) => {
|
|
16
|
+
try {
|
|
17
|
+
P(M.throw(F));
|
|
18
|
+
} catch (ne) {
|
|
19
|
+
o(ne);
|
|
20
|
+
}
|
|
21
|
+
}, P = (F) => F.done ? ke(F.value) : Promise.resolve(F.value).then(re, be);
|
|
22
|
+
P((M = M.apply(L, j)).next());
|
|
23
|
+
});
|
|
24
|
+
const il = { key: 0 }, ul = { key: 1, class: "flex items-center gap-x-2 overflow-hidden" }, sl = ["src"], cl = { key: 2 }, dl = { class: "flex items-center gap-x-1" }, vl = { class: "flex items-center gap-x-1" }, ml = { key: 4 }, fl = { key: 5, class: "flex items-center gap-x-1" }, hl = ["aria-pressed"], gl = { key: 0, xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, pl = { key: 1, xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, wl = ["disabled"], yl = ["disabled"], xl = { key: 0, xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "0.75rem", height: "0.75rem", viewBox: "0 0 24 24" }, kl = { key: 1, xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "0.75rem", height: "0.75rem", viewBox: "0 0 24 24" }, bl = { key: 1, class: "relative" }, Ml = { key: 0, class: "absolute top-2 right-2 z-10 rounded-lg" }, Tl = { class: "flex items-center gap-2 backdrop-blur rounded-lg" }, Cl = { class: "markstream-vue" }, Dl = { class: "absolute top-6 right-6 z-50 flex items-center gap-2" }, et = /* @__PURE__ */ Ut(/* @__PURE__ */ At({ __name: "MermaidBlockNode", props: { node: {}, maxHeight: { default: "500px" }, loading: { type: Boolean, default: !0 }, isDark: { type: Boolean }, workerTimeoutMs: { default: 1400 }, parseTimeoutMs: { default: 1800 }, renderTimeoutMs: { default: 2500 }, fullRenderTimeoutMs: { default: 4e3 }, showHeader: { type: Boolean, default: !0 }, showModeToggle: { type: Boolean, default: !0 }, showCopyButton: { type: Boolean, default: !0 }, showExportButton: { type: Boolean, default: !0 }, showFullscreenButton: { type: Boolean, default: !0 }, showCollapseButton: { type: Boolean, default: !0 }, showZoomControls: { type: Boolean, default: !0 }, enableWheelZoom: { type: Boolean, default: !1 }, isStrict: { type: Boolean, default: !1 } }, emits: ["copy", "export", "openModal", "toggleMode"], setup(L, { emit: j }) {
|
|
25
|
+
var M, ke;
|
|
26
|
+
const o = L, re = j, be = { USE_PROFILES: { svg: !0 }, FORBID_TAGS: ["script"], FORBID_ATTR: [/^on/i], ADD_TAGS: ["style"], ADD_ATTR: ["style"], SAFE_FOR_TEMPLATES: !0 }, P = d(!1), F = Q(() => o.isStrict ? "strict" : "loose"), ne = Q(() => ({ startOnLoad: !1, securityLevel: F.value, dompurifyConfig: F.value === "strict" ? be : void 0, flowchart: F.value === "strict" ? { htmlLabels: !1 } : void 0 })), Bt = [/javascript:/i, /expression\s*\(/i, /url\s*\(\s*javascript:/i, /@import/i], Et = /^(?:https?:|mailto:|tel:|#|\/|data:image\/(?:png|gif|jpe?g|webp);)/i;
|
|
27
|
+
function St(t) {
|
|
28
|
+
if (!t) return "";
|
|
29
|
+
const e = t.trim();
|
|
30
|
+
return Et.test(e) ? e : "";
|
|
31
|
+
}
|
|
32
|
+
function Me(t) {
|
|
33
|
+
if (t) try {
|
|
34
|
+
t.replaceChildren();
|
|
35
|
+
} catch {
|
|
36
|
+
t.innerHTML = "";
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function oe(t, e) {
|
|
40
|
+
if (!t) return "";
|
|
41
|
+
if (F.value === "strict") return (function(l, r) {
|
|
42
|
+
if (!l) return "";
|
|
43
|
+
try {
|
|
44
|
+
l.replaceChildren();
|
|
45
|
+
} catch {
|
|
46
|
+
l.innerHTML = "";
|
|
47
|
+
}
|
|
48
|
+
const c = (function(a) {
|
|
49
|
+
if (typeof window > "u" || typeof DOMParser > "u" || !a) return null;
|
|
50
|
+
const s = a.replace(/["']\s*javascript:/gi, "#").replace(/\bjavascript:/gi, "#").replace(/["']\s*vbscript:/gi, "#").replace(/\bvbscript:/gi, "#").replace(/\bdata:text\/html/gi, "#"), i = new DOMParser().parseFromString(s, "image/svg+xml").documentElement;
|
|
51
|
+
if (!i || i.nodeName.toLowerCase() !== "svg") return null;
|
|
52
|
+
const m = i;
|
|
53
|
+
return (function(v) {
|
|
54
|
+
const p = /* @__PURE__ */ new Set(["script"]), z = [v, ...Array.from(v.querySelectorAll("*"))];
|
|
55
|
+
for (const C of z) {
|
|
56
|
+
if (p.has(C.tagName.toLowerCase())) {
|
|
57
|
+
C.remove();
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
const Y = Array.from(C.attributes);
|
|
61
|
+
for (const N of Y) {
|
|
62
|
+
const b = N.name;
|
|
63
|
+
if (/^on/i.test(b)) C.removeAttribute(b);
|
|
64
|
+
else {
|
|
65
|
+
if (b === "style" && N.value) {
|
|
66
|
+
const k = N.value;
|
|
67
|
+
if (Bt.some((Ye) => Ye.test(k))) {
|
|
68
|
+
C.removeAttribute(b);
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if ((b === "href" || b === "xlink:href") && N.value) {
|
|
73
|
+
const k = St(N.value);
|
|
74
|
+
if (!k) {
|
|
75
|
+
C.removeAttribute(b);
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
k !== N.value && C.setAttribute(b, k);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
})(m), m;
|
|
84
|
+
})(r);
|
|
85
|
+
return c ? (l.appendChild(c), l.innerHTML) : "";
|
|
86
|
+
})(t, e);
|
|
87
|
+
try {
|
|
88
|
+
t.replaceChildren();
|
|
89
|
+
} catch {
|
|
90
|
+
t.innerHTML = "";
|
|
91
|
+
}
|
|
92
|
+
if (e) try {
|
|
93
|
+
t.insertAdjacentHTML("afterbegin", e);
|
|
94
|
+
} catch {
|
|
95
|
+
t.innerHTML = e;
|
|
96
|
+
}
|
|
97
|
+
return t.innerHTML;
|
|
98
|
+
}
|
|
99
|
+
const { t: f } = Wt();
|
|
100
|
+
function Te() {
|
|
101
|
+
return D(this, null, function* () {
|
|
102
|
+
try {
|
|
103
|
+
const t = yield el();
|
|
104
|
+
return P.value = !!t, t;
|
|
105
|
+
} catch (t) {
|
|
106
|
+
throw P.value = !1, t;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
typeof window < "u" && D(null, null, function* () {
|
|
111
|
+
var t;
|
|
112
|
+
try {
|
|
113
|
+
const e = yield Te();
|
|
114
|
+
if (!e) return;
|
|
115
|
+
(t = e?.initialize) == null || t.call(e, Qe({}, ne.value));
|
|
116
|
+
} catch (e) {
|
|
117
|
+
P.value = !1, console.warn("[markstream-vue] Failed to initialize mermaid renderer. Call enableMermaid() to configure a loader.", e);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
const Ce = d(!1), Z = d(!1), q = d(), u = d(), ae = d(), De = d(null), jt = Gt(), me = d(null), ie = d(typeof window > "u"), tt = d(), H = Q(() => o.node.code.replace(/\]::([^:])/g, "]:::$1").replace(/:::subgraphNode$/gm, "::subgraphNode")), x = d(1), O = d(0), $ = d(0), Be = d(!1), Ee = d({ x: 0, y: 0 }), E = d(!1), Se = d(!1), W = d(!1), je = d(null), Pe = d(0), Ve = d(!1);
|
|
121
|
+
let fe = null, he = null, ge = 0;
|
|
122
|
+
const lt = (M = globalThis.requestIdleCallback) != null ? M : (t, e) => setTimeout(() => t({ didTimeout: !0 }), 16), ue = /* @__PURE__ */ (function() {
|
|
123
|
+
let t = null;
|
|
124
|
+
return (...e) => {
|
|
125
|
+
t && clearTimeout(t), t = setTimeout(() => (() => {
|
|
126
|
+
lt(() => {
|
|
127
|
+
wt();
|
|
128
|
+
}, { timeout: 500 });
|
|
129
|
+
})(...e), 300);
|
|
130
|
+
};
|
|
131
|
+
})();
|
|
132
|
+
function pe() {
|
|
133
|
+
he != null && (globalThis.clearTimeout(he), he = null);
|
|
134
|
+
}
|
|
135
|
+
function rt(t = 600) {
|
|
136
|
+
if (typeof globalThis > "u") return;
|
|
137
|
+
const e = Math.max(0, t);
|
|
138
|
+
pe(), he = globalThis.setTimeout(() => {
|
|
139
|
+
he = null, o.loading || W.value || !ie.value ? rt(Math.min(1200, Math.max(300, 1.2 * e))) : ue();
|
|
140
|
+
}, e);
|
|
141
|
+
}
|
|
142
|
+
const G = d("360px");
|
|
143
|
+
let se = null;
|
|
144
|
+
const B = d(!1), te = d(!1), K = d({}), nt = d(null), we = d(""), Ze = d(0);
|
|
145
|
+
let R = null;
|
|
146
|
+
const I = d(!1), le = d({ zoom: 1, translateX: 0, translateY: 0, containerHeight: "360px" }), ot = Q(() => o.enableWheelZoom ? { wheel: Ot } : {}), U = Q(() => {
|
|
147
|
+
var t, e, l, r;
|
|
148
|
+
return { worker: (t = o.workerTimeoutMs) != null ? t : 1400, parse: (e = o.parseTimeoutMs) != null ? e : 1800, render: (l = o.renderTimeoutMs) != null ? l : 2500, fullRender: (r = o.fullRenderTimeoutMs) != null ? r : 4e3 };
|
|
149
|
+
}), Pt = (ke = globalThis.cancelIdleCallback) != null ? ke : (t) => clearTimeout(t);
|
|
150
|
+
let ce = null, Oe = null, de = !1, ye = 800, _ = null, $e = 0, qe = !0, ze = 0;
|
|
151
|
+
function Le(t, e) {
|
|
152
|
+
const l = e?.timeoutMs, r = e?.signal;
|
|
153
|
+
if (r?.aborted) return Promise.reject(new DOMException("Aborted", "AbortError"));
|
|
154
|
+
let c = null, a = !1, s = null;
|
|
155
|
+
return new Promise((i, m) => {
|
|
156
|
+
const v = () => {
|
|
157
|
+
c != null && clearTimeout(c), s && r && r.removeEventListener("abort", s);
|
|
158
|
+
};
|
|
159
|
+
l && l > 0 && (c = globalThis.setTimeout(() => {
|
|
160
|
+
a || (a = !0, v(), m(new Error("Operation timed out")));
|
|
161
|
+
}, l)), r && (s = () => {
|
|
162
|
+
a || (a = !0, v(), m(new DOMException("Aborted", "AbortError")));
|
|
163
|
+
}, r.addEventListener("abort", s)), t().then((p) => {
|
|
164
|
+
a || (a = !0, v(), i(p));
|
|
165
|
+
}).catch((p) => {
|
|
166
|
+
a || (a = !0, v(), m(p));
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
function at(t) {
|
|
171
|
+
if (typeof document > "u" || !u.value) return;
|
|
172
|
+
const e = document.createElement("div");
|
|
173
|
+
e.className = "text-red-500 p-4", e.textContent = "Failed to render diagram: ";
|
|
174
|
+
const l = document.createElement("span");
|
|
175
|
+
l.textContent = t instanceof Error ? t.message : "Unknown error", e.appendChild(l), Me(u.value), u.value.appendChild(e), G.value = "360px", I.value = !0, X();
|
|
176
|
+
}
|
|
177
|
+
function it(t) {
|
|
178
|
+
return !t || t.disabled;
|
|
179
|
+
}
|
|
180
|
+
function S(t, e, l = "top") {
|
|
181
|
+
if (it(t.currentTarget)) return;
|
|
182
|
+
const r = t, c = r?.clientX != null && r?.clientY != null ? { x: r.clientX, y: r.clientY } : void 0;
|
|
183
|
+
Tt(t.currentTarget, e, l, !1, c, o.isDark);
|
|
184
|
+
}
|
|
185
|
+
function T() {
|
|
186
|
+
Kt();
|
|
187
|
+
}
|
|
188
|
+
function ut(t) {
|
|
189
|
+
if (it(t.currentTarget)) return;
|
|
190
|
+
const e = Ce.value ? f("common.copied") || "Copied" : f("common.copy") || "Copy", l = t, r = l?.clientX != null && l?.clientY != null ? { x: l.clientX, y: l.clientY } : void 0;
|
|
191
|
+
Tt(t.currentTarget, e, "top", !1, r, o.isDark);
|
|
192
|
+
}
|
|
193
|
+
function st(t, e) {
|
|
194
|
+
const l = `%%{init: {"theme": "${e === "dark" ? "dark" : "default"}"}}%%
|
|
195
|
+
`;
|
|
196
|
+
return t.trimStart().startsWith("%%{") ? t : l + t;
|
|
197
|
+
}
|
|
198
|
+
function ct() {
|
|
199
|
+
return qe && !E.value && !B.value && !I.value;
|
|
200
|
+
}
|
|
201
|
+
function dt(t) {
|
|
202
|
+
const e = t.split(/\r?\n/);
|
|
203
|
+
for (; e.length > 0; ) {
|
|
204
|
+
const l = e[e.length - 1].trimEnd();
|
|
205
|
+
if (l !== "") {
|
|
206
|
+
if (!(/^[-=~>|<\s]+$/.test(l.trim()) || /(?:--|==|~~|->|<-|-\||-\)|-x|o-|\|-|\.-)\s*$/.test(l) || /[-|><]$/.test(l) || /(?:graph|flowchart|sequenceDiagram|classDiagram|stateDiagram|erDiagram|gantt)\s*$/i.test(l))) break;
|
|
207
|
+
e.pop();
|
|
208
|
+
} else e.pop();
|
|
209
|
+
}
|
|
210
|
+
return e.join(`
|
|
211
|
+
`);
|
|
212
|
+
}
|
|
213
|
+
function Ae(t, e, l) {
|
|
214
|
+
return D(this, null, function* () {
|
|
215
|
+
var r;
|
|
216
|
+
try {
|
|
217
|
+
return yield Qt(t, e, (r = l?.timeoutMs) != null ? r : U.value.worker);
|
|
218
|
+
} catch {
|
|
219
|
+
return yield (function(a, s, i) {
|
|
220
|
+
return D(this, null, function* () {
|
|
221
|
+
var m, v;
|
|
222
|
+
const p = yield Te();
|
|
223
|
+
if (!p) return;
|
|
224
|
+
const z = p, C = st(a, s);
|
|
225
|
+
if (typeof z.parse == "function") return yield Le(() => z.parse(C), { timeoutMs: (m = i?.timeoutMs) != null ? m : U.value.parse, signal: i?.signal }), !0;
|
|
226
|
+
const Y = `mermaid-parse-${Math.random().toString(36).slice(2, 9)}`;
|
|
227
|
+
return yield Le(() => p.render(Y, C), { timeoutMs: (v = i?.timeoutMs) != null ? v : U.value.render, signal: i?.signal }), !0;
|
|
228
|
+
});
|
|
229
|
+
})(t, e, l);
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
typeof window < "u" && V(() => q.value, (t) => {
|
|
234
|
+
var e;
|
|
235
|
+
if ((e = me.value) == null || e.destroy(), me.value = null, !t) return void (ie.value = !1);
|
|
236
|
+
const l = jt(t, { rootMargin: "400px" });
|
|
237
|
+
me.value = l, ie.value = l.isVisible.value, l.whenVisible.then(() => {
|
|
238
|
+
ie.value = !0;
|
|
239
|
+
});
|
|
240
|
+
}, { immediate: !0 }), Ft(() => {
|
|
241
|
+
var t;
|
|
242
|
+
(t = me.value) == null || t.destroy(), me.value = null;
|
|
243
|
+
});
|
|
244
|
+
const Fe = Q(() => E.value || W.value || Z.value);
|
|
245
|
+
function Ie(t) {
|
|
246
|
+
if (!q.value || !u.value) return;
|
|
247
|
+
const e = u.value.querySelector("svg");
|
|
248
|
+
if (!e) return;
|
|
249
|
+
let l = 0, r = 0;
|
|
250
|
+
const c = e.getAttribute("viewBox"), a = e.getAttribute("width"), s = e.getAttribute("height");
|
|
251
|
+
if (c) {
|
|
252
|
+
const i = c.split(" ");
|
|
253
|
+
i.length === 4 && (l = Number.parseFloat(i[2]), r = Number.parseFloat(i[3]));
|
|
254
|
+
}
|
|
255
|
+
if (l && r || a && s && (l = Number.parseFloat(a), r = Number.parseFloat(s)), Number.isNaN(l) || Number.isNaN(r) || l <= 0 || r <= 0) try {
|
|
256
|
+
const i = e.getBBox();
|
|
257
|
+
i && i.width > 0 && i.height > 0 && (l = i.width, r = i.height);
|
|
258
|
+
} catch (i) {
|
|
259
|
+
return void console.error("Failed to get SVG BBox:", i);
|
|
260
|
+
}
|
|
261
|
+
if (l > 0 && r > 0) {
|
|
262
|
+
const i = r / l;
|
|
263
|
+
let m = (t ?? q.value.clientWidth) * i;
|
|
264
|
+
m > r && (m = r), G.value = `${m}px`;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
const J = d(!1), Ue = Q(() => ({ transform: `translate(${O.value}px, ${$.value}px) scale(${x.value})` }));
|
|
268
|
+
function vt(t) {
|
|
269
|
+
t.key === "Escape" && J.value && We();
|
|
270
|
+
}
|
|
271
|
+
function We() {
|
|
272
|
+
if (J.value = !1, ae.value && Me(ae.value), De.value = null, typeof document < "u") try {
|
|
273
|
+
document.body.style.overflow = "";
|
|
274
|
+
} catch {
|
|
275
|
+
}
|
|
276
|
+
if (typeof window < "u") try {
|
|
277
|
+
window.removeEventListener("keydown", vt);
|
|
278
|
+
} catch {
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
function mt() {
|
|
282
|
+
x.value < 3 && (x.value += 0.1);
|
|
283
|
+
}
|
|
284
|
+
function ft() {
|
|
285
|
+
x.value > 0.5 && (x.value -= 0.1);
|
|
286
|
+
}
|
|
287
|
+
function ht() {
|
|
288
|
+
x.value = 1, O.value = 0, $.value = 0;
|
|
289
|
+
}
|
|
290
|
+
function Re(t) {
|
|
291
|
+
Be.value = !0, t instanceof MouseEvent ? Ee.value = { x: t.clientX - O.value, y: t.clientY - $.value } : Ee.value = { x: t.touches[0].clientX - O.value, y: t.touches[0].clientY - $.value };
|
|
292
|
+
}
|
|
293
|
+
function He(t) {
|
|
294
|
+
if (!Be.value) return;
|
|
295
|
+
let e, l;
|
|
296
|
+
t instanceof MouseEvent ? (e = t.clientX, l = t.clientY) : (e = t.touches[0].clientX, l = t.touches[0].clientY), O.value = e - Ee.value.x, $.value = l - Ee.value.y;
|
|
297
|
+
}
|
|
298
|
+
function ve() {
|
|
299
|
+
Be.value = !1;
|
|
300
|
+
}
|
|
301
|
+
function Ot(t) {
|
|
302
|
+
if (o.enableWheelZoom && (t.ctrlKey || t.metaKey)) {
|
|
303
|
+
if (t.preventDefault(), !q.value) return;
|
|
304
|
+
const e = q.value.getBoundingClientRect(), l = t.clientX - e.left, r = t.clientY - e.top, c = l - e.width / 2, a = r - e.height / 2, s = (c - O.value) / x.value, i = (a - $.value) / x.value, m = 0.01, v = -t.deltaY * m, p = Math.min(Math.max(x.value + v, 0.5), 3);
|
|
305
|
+
p !== x.value && (O.value = c - s * p, $.value = a - i * p, x.value = p);
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
function $t() {
|
|
309
|
+
return D(this, null, function* () {
|
|
310
|
+
try {
|
|
311
|
+
const t = H.value, e = { payload: { type: "copy", text: t }, defaultPrevented: !1, preventDefault() {
|
|
312
|
+
this.defaultPrevented = !0;
|
|
313
|
+
} };
|
|
314
|
+
if (re("copy", e), e.defaultPrevented) return;
|
|
315
|
+
typeof navigator < "u" && navigator.clipboard && typeof navigator.clipboard.writeText == "function" && (yield navigator.clipboard.writeText(t)), Ce.value = !0, setTimeout(() => {
|
|
316
|
+
Ce.value = !1;
|
|
317
|
+
}, 1e3);
|
|
318
|
+
} catch (t) {
|
|
319
|
+
console.error("Failed to copy:", t);
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
function zt() {
|
|
324
|
+
var t;
|
|
325
|
+
const e = (t = u.value) == null ? void 0 : t.querySelector("svg");
|
|
326
|
+
if (!e) return void console.error("SVG element not found");
|
|
327
|
+
const l = new XMLSerializer().serializeToString(e), r = { payload: { type: "export" }, defaultPrevented: !1, preventDefault() {
|
|
328
|
+
this.defaultPrevented = !0;
|
|
329
|
+
}, svgElement: e, svgString: l };
|
|
330
|
+
re("export", r), r.defaultPrevented || (function(c, a = null) {
|
|
331
|
+
D(this, null, function* () {
|
|
332
|
+
try {
|
|
333
|
+
const s = a ?? new XMLSerializer().serializeToString(c), i = new Blob([s], { type: "image/svg+xml;charset=utf-8" }), m = URL.createObjectURL(i);
|
|
334
|
+
if (typeof document < "u") {
|
|
335
|
+
const v = document.createElement("a");
|
|
336
|
+
v.href = m, v.download = `mermaid-diagram-${Date.now()}.svg`;
|
|
337
|
+
try {
|
|
338
|
+
document.body.appendChild(v), v.click(), document.body.removeChild(v);
|
|
339
|
+
} catch {
|
|
340
|
+
}
|
|
341
|
+
URL.revokeObjectURL(m);
|
|
342
|
+
}
|
|
343
|
+
} catch (s) {
|
|
344
|
+
console.error("Failed to export SVG:", s);
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
})(e, l);
|
|
348
|
+
}
|
|
349
|
+
function Lt() {
|
|
350
|
+
var t, e;
|
|
351
|
+
const l = (e = (t = u.value) == null ? void 0 : t.querySelector("svg")) != null ? e : null, r = l ? new XMLSerializer().serializeToString(l) : null, c = { payload: { type: "open-modal" }, defaultPrevented: !1, preventDefault() {
|
|
352
|
+
this.defaultPrevented = !0;
|
|
353
|
+
}, svgElement: l, svgString: r };
|
|
354
|
+
re("openModal", c), c.defaultPrevented || (function() {
|
|
355
|
+
if (J.value = !0, typeof document < "u") try {
|
|
356
|
+
document.body.style.overflow = "hidden";
|
|
357
|
+
} catch {
|
|
358
|
+
}
|
|
359
|
+
if (typeof window < "u") try {
|
|
360
|
+
window.addEventListener("keydown", vt);
|
|
361
|
+
} catch {
|
|
362
|
+
}
|
|
363
|
+
A(() => {
|
|
364
|
+
if (q.value && ae.value) {
|
|
365
|
+
const a = q.value.cloneNode(!0);
|
|
366
|
+
a.classList.add("fullscreen");
|
|
367
|
+
const s = a.querySelector("[data-mermaid-wrapper]");
|
|
368
|
+
s && (De.value = s, s.style.transform = Ue.value.transform), Me(ae.value), ae.value.appendChild(a);
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
})();
|
|
372
|
+
}
|
|
373
|
+
function gt(t) {
|
|
374
|
+
const e = { payload: { type: "toggle-mode", target: t }, defaultPrevented: !1, preventDefault() {
|
|
375
|
+
this.defaultPrevented = !0;
|
|
376
|
+
} };
|
|
377
|
+
re("toggleMode", t, e), e.defaultPrevented || pt(t);
|
|
378
|
+
}
|
|
379
|
+
function pt(t) {
|
|
380
|
+
return D(this, null, function* () {
|
|
381
|
+
const e = tt.value;
|
|
382
|
+
if (!e) return Se.value = !0, void (E.value = t === "source");
|
|
383
|
+
const l = e.getBoundingClientRect().height;
|
|
384
|
+
e.style.height = `${l}px`, e.style.overflow = "hidden", Se.value = !0, E.value = t === "source", yield A();
|
|
385
|
+
const r = e.scrollHeight;
|
|
386
|
+
e.style.transition = "height 180ms ease", e.offsetHeight, e.style.height = `${r}px`;
|
|
387
|
+
const c = () => {
|
|
388
|
+
e.style.transition = "", e.style.height = "", e.style.overflow = "", e.removeEventListener("transitionend", a);
|
|
389
|
+
};
|
|
390
|
+
function a() {
|
|
391
|
+
c();
|
|
392
|
+
}
|
|
393
|
+
e.addEventListener("transitionend", a), setTimeout(() => c(), 220);
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
function Ne() {
|
|
397
|
+
return D(this, null, function* () {
|
|
398
|
+
return W.value ? je.value : u.value || (yield A(), u.value) ? (W.value = !0, je.value = D(null, null, function* () {
|
|
399
|
+
var t, e, l;
|
|
400
|
+
u.value && (u.value.style.opacity = "0");
|
|
401
|
+
try {
|
|
402
|
+
const r = yield Te();
|
|
403
|
+
if (!r) return;
|
|
404
|
+
const c = `mermaid-${Date.now()}-${Math.random().toString(36).substring(2, 11)}`;
|
|
405
|
+
B.value || te.value || (t = r.initialize) == null || t.call(r, (e = Qe({}, ne.value), l = { dompurifyConfig: Qe({}, be) }, rl(e, nl(l))));
|
|
406
|
+
const a = (function(m, v = H.value) {
|
|
407
|
+
const p = v, z = `%%{init: {"theme": "${m === "dark" ? "dark" : "default"}"}}%%
|
|
408
|
+
`;
|
|
409
|
+
return p.trim().startsWith("%%{") ? p : z + p;
|
|
410
|
+
})(o.isDark ? "dark" : "light"), s = yield Le(() => r.render(c, a), { timeoutMs: U.value.fullRender }), i = s?.svg;
|
|
411
|
+
if (u.value) {
|
|
412
|
+
const m = oe(u.value, i);
|
|
413
|
+
B.value || te.value || (Ie(), B.value = !0, le.value = { zoom: x.value, translateX: O.value, translateY: $.value, containerHeight: G.value });
|
|
414
|
+
const v = o.isDark ? "dark" : "light";
|
|
415
|
+
m && (K.value[v] = m), te.value && (te.value = !1), I.value = !1, ge = 0, pe();
|
|
416
|
+
}
|
|
417
|
+
} catch (r) {
|
|
418
|
+
const c = (function(s) {
|
|
419
|
+
const i = typeof s == "string" ? s : typeof s?.message == "string" ? s.message : "";
|
|
420
|
+
return typeof i == "string" && /timed out/i.test(i);
|
|
421
|
+
})(r), a = ge + 1;
|
|
422
|
+
c && a <= 3 ? (ge = a, rt(Math.min(1200, 600 * a))) : (ge = 0, pe(), console.error("Failed to render mermaid diagram:", r), o.loading === !1 && at(r));
|
|
423
|
+
} finally {
|
|
424
|
+
yield A(), u.value && (u.value.style.opacity = "1"), W.value = !1, je.value = null;
|
|
425
|
+
}
|
|
426
|
+
}), je.value) : void console.warn("Mermaid container not ready");
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
function wt() {
|
|
430
|
+
return D(this, null, function* () {
|
|
431
|
+
var t, e;
|
|
432
|
+
const l = Date.now(), r = ++Ze.value;
|
|
433
|
+
R && R.abort(), R = new AbortController();
|
|
434
|
+
const c = R.signal, a = o.isDark ? "dark" : "light", s = H.value, i = s.replace(/\s+/g, "");
|
|
435
|
+
if (!s.trim()) return u.value && Me(u.value), nt.value = null, we.value = "", void (I.value = !1);
|
|
436
|
+
if (i === we.value) return;
|
|
437
|
+
try {
|
|
438
|
+
const v = yield (function(z, C, Y) {
|
|
439
|
+
return D(this, null, function* () {
|
|
440
|
+
var N;
|
|
441
|
+
try {
|
|
442
|
+
if (yield Ae(z, C, Y)) return { fullOk: !0, prefixOk: !1 };
|
|
443
|
+
} catch (k) {
|
|
444
|
+
if (k?.name === "AbortError") throw k;
|
|
445
|
+
}
|
|
446
|
+
let b = dt(z);
|
|
447
|
+
if (b && b.trim() && b !== z) try {
|
|
448
|
+
try {
|
|
449
|
+
const k = yield Jt(z, C, (N = Y?.timeoutMs) != null ? N : U.value.worker);
|
|
450
|
+
k && k.trim() && (b = k);
|
|
451
|
+
} catch {
|
|
452
|
+
}
|
|
453
|
+
if (yield Ae(b, C, Y)) return { fullOk: !1, prefixOk: !0, prefix: b };
|
|
454
|
+
} catch (k) {
|
|
455
|
+
if (k?.name === "AbortError") throw k;
|
|
456
|
+
}
|
|
457
|
+
return { fullOk: !1, prefixOk: !1 };
|
|
458
|
+
});
|
|
459
|
+
})(s, a, { signal: c, timeoutMs: U.value.worker });
|
|
460
|
+
if (v.fullOk) return yield Ne(), void (Ze.value === r && (nt.value = (e = (t = u.value) == null ? void 0 : t.innerHTML) != null ? e : null, we.value = i, I.value = !1));
|
|
461
|
+
const p = $e && l <= $e;
|
|
462
|
+
if (v.prefixOk && v.prefix && ct() && !p) return void (yield (function(z) {
|
|
463
|
+
return D(this, null, function* () {
|
|
464
|
+
if (ct() && (u.value || (yield A(), u.value)) && !W.value) {
|
|
465
|
+
W.value = !0;
|
|
466
|
+
try {
|
|
467
|
+
const C = yield Te();
|
|
468
|
+
if (!C) return;
|
|
469
|
+
const Y = `mermaid-partial-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`, N = o.isDark ? "dark" : "light", b = dt(z), k = st(b && b.trim() ? b : z, N);
|
|
470
|
+
u.value && (u.value.style.opacity = "0");
|
|
471
|
+
const Ye = yield Le(() => C.render(Y, k), { timeoutMs: U.value.render }), yt = Ye?.svg;
|
|
472
|
+
u.value && yt && (oe(u.value, yt), Ie());
|
|
473
|
+
} catch {
|
|
474
|
+
} finally {
|
|
475
|
+
yield A(), u.value && (u.value.style.opacity = "1"), W.value = !1;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
})(v.prefix));
|
|
480
|
+
} catch (v) {
|
|
481
|
+
if (v?.name === "AbortError") return;
|
|
482
|
+
}
|
|
483
|
+
if (Ze.value !== r || I.value) return;
|
|
484
|
+
const m = K.value[a];
|
|
485
|
+
m && u.value && oe(u.value, m);
|
|
486
|
+
});
|
|
487
|
+
}
|
|
488
|
+
function X() {
|
|
489
|
+
de && (de = !1, ye = 800, qe = !1, _ && (_.abort(), _ = null), ce && (globalThis.clearTimeout(ce), ce = null), Oe && (Pt(Oe), Oe = null), $e = Date.now());
|
|
490
|
+
}
|
|
491
|
+
function _e() {
|
|
492
|
+
if (X(), R) {
|
|
493
|
+
try {
|
|
494
|
+
R.abort();
|
|
495
|
+
} catch {
|
|
496
|
+
}
|
|
497
|
+
R = null;
|
|
498
|
+
}
|
|
499
|
+
if (_) {
|
|
500
|
+
try {
|
|
501
|
+
_.abort();
|
|
502
|
+
} catch {
|
|
503
|
+
}
|
|
504
|
+
_ = null;
|
|
505
|
+
}
|
|
506
|
+
Mt(), pe(), ge = 0;
|
|
507
|
+
}
|
|
508
|
+
function Ge(t = 800) {
|
|
509
|
+
de && (ze >= 12 ? X() : (ce && globalThis.clearTimeout(ce), ce = globalThis.setTimeout(() => {
|
|
510
|
+
Oe = lt(() => D(null, null, function* () {
|
|
511
|
+
if (!de) return;
|
|
512
|
+
if (E.value || B.value) return void X();
|
|
513
|
+
const e = o.isDark ? "dark" : "light", l = H.value;
|
|
514
|
+
if (!l.trim()) return o.loading === !1 ? void X() : void Ge(ye);
|
|
515
|
+
if (ze++, ze > 12) X();
|
|
516
|
+
else {
|
|
517
|
+
_ && _.abort(), _ = new AbortController();
|
|
518
|
+
try {
|
|
519
|
+
if ((yield Ae(l, e, { signal: _.signal, timeoutMs: U.value.worker })) && (yield Ne(), B.value)) return void X();
|
|
520
|
+
} catch {
|
|
521
|
+
}
|
|
522
|
+
ye = Math.min(Math.floor(1.5 * ye), 4e3), Ge(ye);
|
|
523
|
+
}
|
|
524
|
+
}), { timeout: 500 });
|
|
525
|
+
}, t)));
|
|
526
|
+
}
|
|
527
|
+
function Ke() {
|
|
528
|
+
de || E.value || B.value || (de = !0, $e = 0, qe = !0, ze = 0, Ge(500));
|
|
529
|
+
}
|
|
530
|
+
V(Ue, (t) => {
|
|
531
|
+
J.value && De.value && (De.value.style.transform = t.transform);
|
|
532
|
+
}, { immediate: !0 }), V(() => H.value, () => {
|
|
533
|
+
B.value = !1, K.value = {}, ue(), !E.value && P.value && Ke(), (function() {
|
|
534
|
+
if (!E.value || !P.value) return;
|
|
535
|
+
const t = H.value.length;
|
|
536
|
+
t !== Pe.value && (Ve.value = !0, Pe.value = t, fe && clearTimeout(fe), fe = setTimeout(() => {
|
|
537
|
+
Ve.value && E.value && H.value.trim() && (Ve.value = !1, pt("preview"));
|
|
538
|
+
}, 500));
|
|
539
|
+
})();
|
|
540
|
+
}), V(() => o.isDark, () => D(null, null, function* () {
|
|
541
|
+
if (!B.value || I.value) return;
|
|
542
|
+
const t = o.isDark ? "dark" : "light", e = K.value[t];
|
|
543
|
+
if (e) return void (u.value && oe(u.value, e));
|
|
544
|
+
const l = { zoom: x.value, translateX: O.value, translateY: $.value, containerHeight: G.value }, r = x.value !== 1 || O.value !== 0 || $.value !== 0;
|
|
545
|
+
te.value = !0, r && (x.value = 1, O.value = 0, $.value = 0, yield A()), yield Ne(), r && (yield A(), x.value = l.zoom, O.value = l.translateX, $.value = l.translateY, G.value = l.containerHeight, le.value = l);
|
|
546
|
+
})), V(() => E.value, (t) => D(null, null, function* () {
|
|
547
|
+
if (t) X(), B.value && (le.value = { zoom: x.value, translateX: O.value, translateY: $.value, containerHeight: G.value });
|
|
548
|
+
else {
|
|
549
|
+
if (I.value) return;
|
|
550
|
+
const e = o.isDark ? "dark" : "light";
|
|
551
|
+
if (B.value && K.value[e]) return yield A(), u.value && oe(u.value, K.value[e]), x.value = le.value.zoom, O.value = le.value.translateX, $.value = le.value.translateY, void (G.value = le.value.containerHeight);
|
|
552
|
+
if (yield A(), !P.value) return;
|
|
553
|
+
yield wt(), Ke();
|
|
554
|
+
}
|
|
555
|
+
})), V(() => o.loading, (t, e) => D(null, null, function* () {
|
|
556
|
+
if (e === !0 && t === !1) {
|
|
557
|
+
const l = H.value.trim();
|
|
558
|
+
if (!l) return _e();
|
|
559
|
+
const r = o.isDark ? "dark" : "light", c = l.replace(/\s+/g, "");
|
|
560
|
+
if (B.value && c === we.value) return yield A(), u.value && !u.value.querySelector("svg") && K.value[r] && oe(u.value, K.value[r]), void _e();
|
|
561
|
+
try {
|
|
562
|
+
yield Ae(l, r, { timeoutMs: U.value.worker }), yield Ne(), we.value = c, I.value = !1, _e();
|
|
563
|
+
} catch (a) {
|
|
564
|
+
_e(), at(a);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
})), V(q, (t) => {
|
|
568
|
+
se && se.disconnect(), !t || B.value || te.value || (se = new ResizeObserver((e) => {
|
|
569
|
+
e && e.length > 0 && !B.value && !te.value && tl(() => {
|
|
570
|
+
Ie(e[0].contentRect.width);
|
|
571
|
+
});
|
|
572
|
+
}), se.observe(t));
|
|
573
|
+
}, { immediate: !0 }), Rt(() => D(null, null, function* () {
|
|
574
|
+
yield A(), Se.value || (E.value = !P.value), ie.value && (ue(), Pe.value = H.value.length);
|
|
575
|
+
})), V(() => P.value, (t) => {
|
|
576
|
+
Se.value || (E.value = !t);
|
|
577
|
+
}), V(() => ie.value, (t) => {
|
|
578
|
+
t && (B.value || (ue(), Pe.value = H.value.length), o.loading || B.value || ue());
|
|
579
|
+
}, { immediate: !1 }), Ht(() => {
|
|
580
|
+
fe && clearTimeout(fe), se && se.disconnect(), R && (R.abort(), R = null), Mt(), X(), pe();
|
|
581
|
+
}), V(() => Z.value, (t) => D(null, null, function* () {
|
|
582
|
+
t ? (X(), R && R.abort()) : B.value || (yield A(), ue(), E.value || Ke());
|
|
583
|
+
}), { immediate: !1 });
|
|
584
|
+
const Xe = Q(() => o.isDark ? "mermaid-action-btn p-2 text-xs rounded text-gray-400 hover:bg-gray-700 hover:text-gray-200" : "mermaid-action-btn p-2 text-xs rounded text-gray-600 hover:bg-gray-200 hover:text-gray-700");
|
|
585
|
+
return (t, e) => (g(), w("div", { class: y(["my-4 rounded-lg border overflow-hidden shadow-sm", [o.isDark ? "border-gray-700/30" : "border-gray-200", { "is-rendering": o.loading }]]) }, [o.showHeader ? (g(), w("div", { key: 0, class: y(["mermaid-block-header flex justify-between items-center px-4 py-2.5 border-b", o.isDark ? "bg-gray-800 border-gray-700/30" : "bg-gray-50 border-gray-200"]) }, [t.$slots["header-left"] ? (g(), w("div", il, [Je(t.$slots, "header-left", {}, void 0, !0)])) : (g(), w("div", ul, [n("img", { src: h("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20width='16'%20height='16'%3e%3cpath%20fill='none'%20stroke='%23ca9ee6'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M1.5%202.5c0%206%202.25%205.75%204%207%20.83.67%201.17%202%201%204h3c-.17-2%20.17-3.33%201-4%201.75-1.25%204-1%204-7C12%202.5%2010%203%208%207%206%203%204%202.5%201.5%202.5'%20/%3e%3c/svg%3e"), class: "w-4 h-4 my-0", alt: "Mermaid" }, null, 8, sl), n("span", { class: y(["text-sm font-medium font-mono truncate", o.isDark ? "text-gray-400" : "text-gray-600"]) }, "Mermaid", 2)])), t.$slots["header-center"] ? (g(), w("div", cl, [Je(t.$slots, "header-center", {}, void 0, !0)])) : o.showModeToggle && P.value ? (g(), w("div", { key: 3, class: y(["flex items-center gap-x-1 rounded-md p-0.5", o.isDark ? "bg-gray-700" : "bg-gray-100"]) }, [n("button", { class: y(["px-2.5 py-1 text-xs rounded transition-colors", [E.value ? o.isDark ? "text-gray-400 hover:text-gray-200" : "text-gray-500 hover:text-gray-700" : o.isDark ? "bg-gray-600 text-gray-200 shadow-sm" : "bg-white text-gray-700 shadow-sm"]]), onClick: e[0] || (e[0] = () => gt("preview")), onMouseenter: e[1] || (e[1] = (l) => S(l, h(f)("common.preview") || "Preview")), onFocus: e[2] || (e[2] = (l) => S(l, h(f)("common.preview") || "Preview")), onMouseleave: T, onBlur: T }, [n("div", dl, [e[21] || (e[21] = n("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [n("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2" }, [n("path", { d: "M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0" }), n("circle", { cx: "12", cy: "12", r: "3" })])], -1)), n("span", null, xe(h(f)("common.preview") || "Preview"), 1)])], 34), n("button", { class: y(["px-2.5 py-1 text-xs rounded transition-colors", [E.value ? o.isDark ? "bg-gray-600 text-gray-200 shadow-sm" : "bg-white text-gray-700 shadow-sm" : o.isDark ? "text-gray-400 hover:text-gray-200" : "text-gray-500 hover:text-gray-700"]]), onClick: e[3] || (e[3] = () => gt("source")), onMouseenter: e[4] || (e[4] = (l) => S(l, h(f)("common.source") || "Source")), onFocus: e[5] || (e[5] = (l) => S(l, h(f)("common.source") || "Source")), onMouseleave: T, onBlur: T }, [n("div", vl, [e[22] || (e[22] = n("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [n("path", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "m16 18l6-6l-6-6M8 6l-6 6l6 6" })], -1)), n("span", null, xe(h(f)("common.source") || "Source"), 1)])], 34)], 2)) : ee("", !0), t.$slots["header-right"] ? (g(), w("div", ml, [Je(t.$slots, "header-right", {}, void 0, !0)])) : (g(), w("div", fl, [o.showCollapseButton ? (g(), w("button", { key: 0, class: y(Xe.value), "aria-pressed": Z.value, onClick: e[6] || (e[6] = (l) => Z.value = !Z.value), onMouseenter: e[7] || (e[7] = (l) => S(l, Z.value ? h(f)("common.expand") || "Expand" : h(f)("common.collapse") || "Collapse")), onFocus: e[8] || (e[8] = (l) => S(l, Z.value ? h(f)("common.expand") || "Expand" : h(f)("common.collapse") || "Collapse")), onMouseleave: T, onBlur: T }, [(g(), w("svg", { style: xt({ rotate: Z.value ? "0deg" : "90deg" }), xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [...e[23] || (e[23] = [n("path", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "m9 18l6-6l-6-6" }, null, -1)])], 4))], 42, hl)) : ee("", !0), o.showCopyButton ? (g(), w("button", { key: 1, class: y(Xe.value), onClick: $t, onMouseenter: e[9] || (e[9] = (l) => ut(l)), onFocus: e[10] || (e[10] = (l) => ut(l)), onMouseleave: T, onBlur: T }, [Ce.value ? (g(), w("svg", pl, [...e[25] || (e[25] = [n("path", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M20 6L9 17l-5-5" }, null, -1)])])) : (g(), w("svg", gl, [...e[24] || (e[24] = [n("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2" }, [n("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }), n("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })], -1)])]))], 34)) : ee("", !0), o.showExportButton && P.value ? (g(), w("button", { key: 2, class: y(`${Xe.value} ${Fe.value ? "opacity-50 cursor-not-allowed" : ""}`), disabled: Fe.value, onClick: zt, onMouseenter: e[11] || (e[11] = (l) => S(l, h(f)("common.export") || "Export")), onFocus: e[12] || (e[12] = (l) => S(l, h(f)("common.export") || "Export")), onMouseleave: T, onBlur: T }, [...e[26] || (e[26] = [n("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [n("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2" }, [n("path", { d: "M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), n("path", { d: "m7 10l5 5l5-5" })])], -1)])], 42, wl)) : ee("", !0), o.showFullscreenButton && P.value ? (g(), w("button", { key: 3, class: y(`${Xe.value} ${Fe.value ? "opacity-50 cursor-not-allowed" : ""}`), disabled: Fe.value, onClick: Lt, onMouseenter: e[13] || (e[13] = (l) => S(l, J.value ? h(f)("common.minimize") || "Minimize" : h(f)("common.open") || "Open")), onFocus: e[14] || (e[14] = (l) => S(l, J.value ? h(f)("common.minimize") || "Minimize" : h(f)("common.open") || "Open")), onMouseleave: T, onBlur: T }, [J.value ? (g(), w("svg", kl, [...e[28] || (e[28] = [n("path", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6" }, null, -1)])])) : (g(), w("svg", xl, [...e[27] || (e[27] = [n("path", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6" }, null, -1)])]))], 42, yl)) : ee("", !0)]))], 2)) : ee("", !0), Nt(n("div", { ref_key: "modeContainerRef", ref: tt }, [E.value ? (g(), w("div", { key: 0, class: y(["p-4", o.isDark ? "bg-gray-900" : "bg-gray-50"]) }, [n("pre", { class: y(["text-sm font-mono whitespace-pre-wrap", o.isDark ? "text-gray-300" : "text-gray-700"]) }, xe(H.value), 3)], 2)) : (g(), w("div", bl, [o.showZoomControls ? (g(), w("div", Ml, [n("div", Tl, [n("button", { class: y(["p-2 text-xs rounded transition-colors", [o.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]), onClick: mt, onMouseenter: e[15] || (e[15] = (l) => S(l, h(f)("common.zoomIn") || "Zoom in")), onFocus: e[16] || (e[16] = (l) => S(l, h(f)("common.zoomIn") || "Zoom in")), onMouseleave: T, onBlur: T }, [...e[29] || (e[29] = [n("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [n("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2" }, [n("circle", { cx: "11", cy: "11", r: "8" }), n("path", { d: "m21 21l-4.35-4.35M11 8v6m-3-3h6" })])], -1)])], 34), n("button", { class: y(["p-2 text-xs rounded transition-colors", [o.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]), onClick: ft, onMouseenter: e[17] || (e[17] = (l) => S(l, h(f)("common.zoomOut") || "Zoom out")), onFocus: e[18] || (e[18] = (l) => S(l, h(f)("common.zoomOut") || "Zoom out")), onMouseleave: T, onBlur: T }, [...e[30] || (e[30] = [n("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [n("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2" }, [n("circle", { cx: "11", cy: "11", r: "8" }), n("path", { d: "m21 21l-4.35-4.35M8 11h6" })])], -1)])], 34), n("button", { class: y(["p-2 text-xs rounded transition-colors", [o.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]), onClick: ht, onMouseenter: e[19] || (e[19] = (l) => S(l, h(f)("common.resetZoom") || "Reset zoom")), onFocus: e[20] || (e[20] = (l) => S(l, h(f)("common.resetZoom") || "Reset zoom")), onMouseleave: T, onBlur: T }, xe(Math.round(100 * x.value)) + "% ", 35)])])) : ee("", !0), n("div", kt({ ref_key: "mermaidContainer", ref: q, class: ["min-h-[360px] relative transition-all duration-100 overflow-hidden block", o.isDark ? "bg-gray-900" : "bg-gray-50"], style: { height: G.value } }, bt(ot.value, !0), { onMousedown: Re, onMousemove: He, onMouseup: ve, onMouseleave: ve, onTouchstartPassive: Re, onTouchmovePassive: He, onTouchendPassive: ve }), [n("div", { "data-mermaid-wrapper": "", class: y(["absolute inset-0 cursor-grab", { "cursor-grabbing": Be.value }]), style: xt(Ue.value) }, [n("div", { ref_key: "mermaidContent", ref: u, class: "_mermaid w-full text-center flex items-center justify-center min-h-full" }, null, 512)], 6)], 16), (g(), _t(Xt, { to: "body" }, [n("div", Cl, [Yt(Vt, { name: "mermaid-dialog", appear: "" }, { default: Zt(() => [J.value ? (g(), w("div", { key: 0, class: "fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-4", onClick: qt(We, ["self"]) }, [n("div", { class: y(["dialog-panel relative w-full h-full max-w-full max-h-full rounded shadow-lg overflow-hidden", o.isDark ? "bg-gray-900" : "bg-white"]) }, [n("div", Dl, [n("button", { class: y(["p-2 text-xs rounded transition-colors", [o.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]), onClick: mt }, [...e[31] || (e[31] = [n("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [n("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2" }, [n("circle", { cx: "11", cy: "11", r: "8" }), n("path", { d: "m21 21l-4.35-4.35M11 8v6m-3-3h6" })])], -1)])], 2), n("button", { class: y(["p-2 text-xs rounded transition-colors", [o.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]), onClick: ft }, [...e[32] || (e[32] = [n("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [n("g", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2" }, [n("circle", { cx: "11", cy: "11", r: "8" }), n("path", { d: "m21 21l-4.35-4.35M8 11h6" })])], -1)])], 2), n("button", { class: y(["p-2 text-xs rounded transition-colors", [o.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]), onClick: ht }, xe(Math.round(100 * x.value)) + "% ", 3), n("button", { class: y(["inline-flex items-center justify-center p-2 rounded transition-colors", [o.isDark ? "text-gray-400 hover:bg-gray-700" : "text-gray-600 hover:bg-gray-200"]]), onClick: We }, [...e[33] || (e[33] = [n("svg", { xmlns: "http://www.w3.org/2000/svg", "xmlns:xlink": "http://www.w3.org/1999/xlink", "aria-hidden": "true", role: "img", width: "1em", height: "1em", viewBox: "0 0 24 24", class: "w-3 h-3" }, [n("path", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M18 6L6 18M6 6l12 12" })], -1)])], 2)]), n("div", kt({ ref_key: "modalContent", ref: ae, class: "w-full h-full flex items-center justify-center p-4 overflow-hidden" }, bt(ot.value, !0), { onMousedown: Re, onMousemove: He, onMouseup: ve, onMouseleave: ve, onTouchstartPassive: Re, onTouchmovePassive: He, onTouchendPassive: ve }), null, 16)], 2)])) : ee("", !0)]), _: 1 })])]))]))], 512), [[It, !Z.value]])], 2));
|
|
586
|
+
} }), [["__scopeId", "data-v-2ff46cc8"]]);
|
|
587
|
+
et.install = (L) => {
|
|
588
|
+
L.component(et.__name, et);
|
|
589
|
+
};
|
|
590
|
+
export {
|
|
591
|
+
et as default
|
|
592
|
+
};
|