@matechat/core 1.11.1 → 1.12.0-alpha

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.
Files changed (42) hide show
  1. package/Attachment/Attachment.vue.d.ts +8 -8
  2. package/Attachment/attachment-types.d.ts +3 -35
  3. package/Attachment/index.css +1 -1
  4. package/Attachment/index.js +43 -45
  5. package/Bubble/index.css +1 -1
  6. package/Bubble/index.js +276 -146
  7. package/Bubble/useBubbleFoundation.d.ts +9 -0
  8. package/FileList/index.js +1 -1
  9. package/Header/index.css +1 -1
  10. package/Header/index.js +11 -11
  11. package/Input/components/EditableBlock.vue.d.ts +2 -2
  12. package/Input/index.css +1 -1
  13. package/Input/index.js +82 -57
  14. package/Introduction/index.css +1 -1
  15. package/Introduction/index.js +129 -39
  16. package/Layout/index.js +6 -6
  17. package/List/index.js +5 -5
  18. package/MarkdownCard/MDCardParser.d.ts +0 -10
  19. package/MarkdownCard/MermaidService-yeLQUW_e.js +142 -0
  20. package/MarkdownCard/index.css +1 -1
  21. package/MarkdownCard/index.js +542 -361
  22. package/MarkdownCard/mdCard.types.d.ts +2 -29
  23. package/MarkdownCard/mdCard.vue.d.ts +2 -2
  24. package/MarkdownCard/useMarkdownCardFoundation.d.ts +8 -0
  25. package/Mention/Mention.vue.d.ts +12 -3
  26. package/Mention/index.css +1 -1
  27. package/Mention/index.js +364 -110
  28. package/Mention/mention-types.d.ts +6 -4
  29. package/Mention/use-mention.d.ts +7 -0
  30. package/Prompt/index.js +1 -1
  31. package/Toolbar/index.css +1 -1
  32. package/Toolbar/index.d.ts +2 -1
  33. package/Toolbar/index.js +189 -198
  34. package/Toolbar/toolbar.types.d.ts +2 -26
  35. package/index.d.ts +2 -2
  36. package/mate-chat.js +2 -1
  37. package/package.json +1 -1
  38. package/Attachment/uploader.d.ts +0 -11
  39. package/MarkdownCard/MDCardService.d.ts +0 -14
  40. package/MarkdownCard/MermaidService-B6BcjbW_.js +0 -127
  41. package/MarkdownCard/MermaidService.d.ts +0 -22
  42. package/Mention/const.d.ts +0 -4
@@ -1,41 +1,46 @@
1
1
  import "./index.css";
2
- import { defineComponent as le, ref as x, computed as W, watch as k, nextTick as Z, onMounted as ce, createElementBlock as v, openBlock as C, normalizeClass as b, renderSlot as R, createVNode as ye, createElementVNode as M, toDisplayString as K, createCommentVNode as O, unref as L, Transition as fe, withCtx as Me, withDirectives as Ce, vShow as we, isVNode as ae, h as f, useSlots as ve, Fragment as A, createBlock as Le, resolveDynamicComponent as Ne } from "vue";
3
- import D from "highlight.js";
4
- import Ie from "markdown-it";
5
- import { debounce as De } from "lodash-es";
6
- import { getDefaultWhiteList as xe, getDefaultCSSWhiteList as Te, filterXSS as Ae } from "xss";
7
- import { useMcI18n as be } from "@matechat/core/Locale";
8
- const ke = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eenlarge%3c/title%3e%3cg%20id='enlarge'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M7.16666667,1%20C10.572409,1%2013.3333333,3.76092429%2013.3333333,7.16666667%20C13.3333333,8.68984984%2012.781084,10.0840543%2011.8658888,11.1599767%20L14.4225201,13.7154466%20C14.6177822,13.9107088%2014.6177822,14.2272912%2014.4225201,14.4225534%20C14.2489537,14.5961197%2013.9795293,14.6154049%2013.7846612,14.4804088%20L13.7154133,14.4225534%20L11.158968,11.8667467%20C10.083183,12.7814291%208.68937384,13.3333333%207.16666667,13.3333333%20C3.76092429,13.3333333%201,10.572409%201,7.16666667%20C1,3.76092429%203.76092429,1%207.16666667,1%20Z%20M7.16666667,2%20C4.31320904,2%202,4.31320904%202,7.16666667%20C2,10.0201243%204.31320904,12.3333333%207.16666667,12.3333333%20C10.0201243,12.3333333%2012.3333333,10.0201243%2012.3333333,7.16666667%20C12.3333333,4.31320904%2010.0201243,2%207.16666667,2%20Z%20M7.16666667,4.66666667%20C7.41212656,4.66666667%207.61627504,4.84354183%207.658611,5.07679103%20L7.66666667,5.16666667%20L7.666,6.668%20L9.16601582,6.66666666%20C9.44215796,6.66630764%209.66630679,6.88987368%209.66666668,7.16601582%20C9.66698576,7.4114755%209.49037648,7.61585405%209.25718258,7.65849359%20L9.16731751,7.66666666%20L7.666,7.668%20L7.66666667,9.16666667%20C7.66666667,9.44280904%207.44280904,9.66666667%207.16666667,9.66666667%20C6.92120678,9.66666667%206.7170583,9.48979151%206.67472234,9.2565423%20L6.66666667,9.16666667%20L6.666,7.669%20L5.17251751,7.67186668%20C4.89637537,7.6722257%204.67222654,7.44865965%204.67186666,7.17251751%20C4.67154758,6.92705783%204.84815685,6.72267929%205.08135075,6.68003974%20L5.17121582,6.67186709%20L6.666,6.669%20L6.66666667,5.16666667%20C6.66666667,4.89052429%206.89052429,4.66666667%207.16666667,4.66666667%20Z'%20id='形状结合'%20fill='%2371757F'%20fill-rule='nonzero'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", je = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ezoom-out%3c/title%3e%3cg%20id='zoom-out'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M7.16666667,1%20C10.572409,1%2013.3333333,3.76092429%2013.3333333,7.16666667%20C13.3333333,8.68984984%2012.781084,10.0840543%2011.8658888,11.1599767%20L14.4225201,13.7154466%20C14.6177822,13.9107088%2014.6177822,14.2272912%2014.4225201,14.4225534%20C14.2489537,14.5961197%2013.9795293,14.6154049%2013.7846612,14.4804088%20L13.7154133,14.4225534%20L11.158968,11.8667467%20C10.083183,12.7814291%208.68937384,13.3333333%207.16666667,13.3333333%20C3.76092429,13.3333333%201,10.572409%201,7.16666667%20C1,3.76092429%203.76092429,1%207.16666667,1%20Z%20M7.16666667,2%20C4.31320904,2%202,4.31320904%202,7.16666667%20C2,10.0201243%204.31320904,12.3333333%207.16666667,12.3333333%20C10.0201243,12.3333333%2012.3333333,10.0201243%2012.3333333,7.16666667%20C12.3333333,4.31320904%2010.0201243,2%207.16666667,2%20Z%20M9.16601582,6.66666666%20C9.44215796,6.66630764%209.66630679,6.88987368%209.66666668,7.16601582%20C9.66698576,7.4114755%209.49037648,7.61585405%209.25718258,7.65849359%20L9.16731751,7.66666666%20L5.17251751,7.67186668%20C4.89637537,7.6722257%204.67222654,7.44865965%204.67186666,7.17251751%20C4.67154758,6.92705783%204.84815685,6.72267929%205.08135075,6.68003974%20L5.17121582,6.67186709%20L9.16601582,6.66666666%20Z'%20id='形状结合'%20fill='%2371757F'%20fill-rule='nonzero'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", Se = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ei下载%3c/title%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='i下载'%3e%3cpath%20d='M14.5,14%20C14.7761424,14%2015,14.2238576%2015,14.5%20C15,14.7761424%2014.7761424,15%2014.5,15%20L1.5,15%20C1.22385763,15%201,14.7761424%201,14.5%20C1,14.2238576%201.22385763,14%201.5,14%20L14.5,14%20Z%20M8,1%20C8.24545989,1%208.44960837,1.17687516%208.49194433,1.41012437%20L8.5,1.5%20L8.5,10.793%20L11.6464466,7.64644661%20C11.820013,7.47288026%2012.0894374,7.45359511%2012.2843055,7.58859116%20L12.3535534,7.64644661%20C12.5271197,7.82001296%2012.5464049,8.08943736%2012.4114088,8.2843055%20L12.3535534,8.35355339%20L8.35355339,12.3535534%20L8.34128643,12.3654113%20C8.32881868,12.3770608%208.31575424,12.3880797%208.30214392,12.3984173%20L8.35355339,12.3535534%20C8.32671912,12.3803877%208.29759357,12.4035342%208.26680652,12.422993%20C8.25568247,12.4299807%208.24404667,12.4367067%208.23212724,12.4429657%20C8.21827569,12.4502504%208.20453886,12.4566485%208.1905951,12.4623894%20C8.17802507,12.4675915%208.16473685,12.4724419%208.15119917,12.4767316%20C8.13583471,12.481552%208.12047425,12.4856039%208.10498705,12.4889143%20C8.09430622,12.4912471%208.08325248,12.4932298%208.07207924,12.494843%20C8.05487076,12.4972949%208.03773477,12.498877%208.02056948,12.4995793%20C8.01375728,12.4998604%208.00689494,12.5%208,12.5%20L7.98043349,12.4996194%20C7.96293275,12.4989382%207.94546098,12.4973429%207.92809589,12.4948333%20L8,12.5%20C7.96390296,12.5%207.92869933,12.4961748%207.89477235,12.4889078%20C7.87952575,12.4856039%207.86416529,12.481552%207.84898836,12.4767587%20C7.83526315,12.4724419%207.82197493,12.4675915%207.80896344,12.4622078%20C7.79546114,12.4566485%207.78172431,12.4502504%207.76824181,12.443195%20C7.75595333,12.4367067%207.74431753,12.4299807%207.73298968,12.422812%20C7.72729809,12.4192668%207.72146362,12.4154054%207.7156945,12.4114088%20L7.69785608,12.3984173%20C7.68424576,12.3880797%207.67118132,12.3770608%207.65871357,12.3654113%20L7.64644661,12.3535534%20L3.64644661,8.35355339%20C3.45118446,8.15829124%203.45118446,7.84170876%203.64644661,7.64644661%20C3.82001296,7.47288026%204.08943736,7.45359511%204.2843055,7.58859116%20L4.35355339,7.64644661%20L7.5,10.793%20L7.5,1.5%20C7.5,1.22385763%207.72385763,1%208,1%20Z'%20id='形状结合'%20fill='%2371757F'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Oe = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e全部收起%3c/title%3e%3cg%20id='全部收起'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M4.715694,14.4114091%20C4.910563,14.5464051%205.179987,14.5271201%205.353553,14.3535531%20L5.353553,14.3535531%20L7.99999988,11.7070001%20L10.646447,14.3535531%20L10.715694,14.4114091%20C10.910563,14.5464051%2011.179987,14.5271201%2011.353553,14.3535531%20C11.548816,14.1582911%2011.548816,13.8417091%2011.353553,13.6464471%20L11.353553,13.6464471%20L8.353553,10.6464471%20L8.284306,10.5885911%20C8.089437,10.4535951%207.820013,10.4728801%207.646447,10.6464471%20L7.646447,10.6464471%20L4.646447,13.6464471%20L4.588591,13.7156941%20C4.453595,13.9105631%204.47288,14.1799871%204.646447,14.3535531%20L4.646447,14.3535531%20L4.715694,14.4114091%20Z%20M14.5,7.50000012%20C14.776142,7.50000012%2015,7.72385812%2015,8.00000012%20C15,8.27614212%2014.776142,8.50000012%2014.5,8.50000012%20L1.5,8.50000012%20C1.223858,8.50000012%201,8.27614212%201,8.00000012%20C1,7.72385812%201.223858,7.50000012%201.5,7.50000012%20L14.5,7.50000012%20Z%20M8.284306,5.41140912%20L8.353553,5.35355312%20L11.353553,2.35355312%20C11.548816,2.15829112%2011.548816,1.84170912%2011.353553,1.64644712%20C11.179987,1.47288012%2010.910563,1.45359512%2010.715694,1.58859112%20L10.646447,1.64644712%20L7.99999988,4.29300012%20L5.353553,1.64644712%20C5.179987,1.47288012%204.910563,1.45359512%204.715694,1.58859112%20L4.646447,1.64644712%20C4.47288,1.82001312%204.453595,2.08943712%204.588591,2.28430612%20L4.646447,2.35355312%20L7.646447,5.35355312%20C7.820013,5.52712012%208.089437,5.54640512%208.284306,5.41140912%20Z'%20id='形状结合'%20fill='%2371757F'%20fill-rule='nonzero'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", Ee = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgMTYgMTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+ZnVuY3Rpb24gaWNvbi9jb3B5PC90aXRsZT4KICAgIDxnIGlkPSLpobXpnaItMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IkFQSS1zdGFydGVyLeWbvuagh+WFpeW6kyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTU5Mi4wMDAwMDAsIC0yMDQuMDAwMDAwKSI+CiAgICAgICAgICAgIDxnIGlkPSLmlrnmoLzlpIfku70tMTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDU2MC4wMDAwMDAsIDE4MC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDx0ZXh0IGlkPSLlm77moIciIGZvbnQtZmFtaWx5PSJQaW5nRmFuZ1NDLVJlZ3VsYXIsIFBpbmdGYW5nIFNDIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0ibm9ybWFsIiBsaW5lLXNwYWNpbmc9IjE2IiBmaWxsPSIjNzE3NTdGIj4KICAgICAgICAgICAgICAgICAgICA8dHNwYW4geD0iMjcuMTM2IiB5PSI2MSI+5aSN5Yi2PC90c3Bhbj4KICAgICAgICAgICAgICAgIDwvdGV4dD4KICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8cGF0aCBkPSJNNjA0LjUsMjA2IEM2MDUuMjc5Njk2LDIwNiA2MDUuOTIwNDQ5LDIwNi41OTQ4ODggNjA1Ljk5MzEzMywyMDcuMzU1NTQgTDYwNiwyMDcuNSBMNjA2LDIxNC41IEM2MDYsMjE1LjI3OTY5NiA2MDUuNDA1MTEyLDIxNS45MjA0NDkgNjA0LjY0NDQ2LDIxNS45OTMxMzMgTDYwNC41LDIxNiBMNjA0LDIxNiBMNjA0LDIxNi41IEM2MDQsMjE3LjI3OTY5NiA2MDMuNDA1MTEyLDIxNy45MjA0NDkgNjAyLjY0NDQ2LDIxNy45OTMxMzMgTDYwMi41LDIxOCBMNTk1LjUsMjE4IEM1OTQuNjcxNTczLDIxOCA1OTQsMjE3LjMyODQyNyA1OTQsMjE2LjUgTDU5NCwyMTYuNSBMNTk0LDIwOS41IEM1OTQsMjA4LjY3MTU3MyA1OTQuNjcxNTczLDIwOCA1OTUuNSwyMDggTDU5NS41LDIwOCBMNTk2LDIwOCBMNTk2LDIwNy41IEM1OTYsMjA2LjcyMDMwNCA1OTYuNTk0ODg4LDIwNi4wNzk1NTEgNTk3LjM1NTU0LDIwNi4wMDY4NjcgTDU5Ny41LDIwNiBMNjA0LjUsMjA2IFogTTYwMi41LDIwOSBMNTk1LjUsMjA5IEM1OTUuMjIzODU4LDIwOSA1OTUsMjA5LjIyMzg1OCA1OTUsMjA5LjUgTDU5NSwyMDkuNSBMNTk1LDIxNi41IEM1OTUsMjE2Ljc3NjE0MiA1OTUuMjIzODU4LDIxNyA1OTUuNSwyMTcgTDU5NS41LDIxNyBMNjAyLjUsMjE3IEM2MDIuNzc2MTQyLDIxNyA2MDMsMjE2Ljc3NjE0MiA2MDMsMjE2LjUgTDYwMywyMTYuNSBMNjAzLDIwOS41IEM2MDMsMjA5LjIyMzg1OCA2MDIuNzc2MTQyLDIwOSA2MDIuNSwyMDkgTDYwMi41LDIwOSBaIE02MDQuNSwyMDcgTDU5Ny41LDIwNyBDNTk3LjI1NDU0LDIwNyA1OTcuMDUwMzkyLDIwNy4xNzY4NzUgNTk3LjAwODA1NiwyMDcuNDEwMTI0IEw1OTcsMjA3LjUgTDU5NywyMDggTDYwMi41LDIwOCBDNjAzLjI3OTY5NiwyMDggNjAzLjkyMDQ0OSwyMDguNTk0ODg4IDYwMy45OTMxMzMsMjA5LjM1NTU0IEw2MDQsMjA5LjUgTDYwNCwyMTUgTDYwNC41LDIxNSBDNjA0Ljc0NTQ2LDIxNSA2MDQuOTQ5NjA4LDIxNC44MjMxMjUgNjA0Ljk5MTk0NCwyMTQuNTg5ODc2IEw2MDUsMjE0LjUgTDYwNSwyMDcuNSBDNjA1LDIwNy4yNTQ1NCA2MDQuODIzMTI1LDIwNy4wNTAzOTIgNjA0LjU4OTg3NiwyMDcuMDA4MDU2IEw2MDQuNSwyMDcgWiIgaWQ9IuW9oueKtue7k+WQiCIgZmlsbD0iIzcxNzU3RiIgZmlsbC1ydWxlPSJub256ZXJvIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=", Be = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3estatus/whiteBG/correct%3c/title%3e%3cdesc%3eCreated%20with%20Sketch.%3c/desc%3e%3cdefs%3e%3cpolygon%20id='path-1'%20points='6.53553391%209.77817459%2012.1923882%204.12132034%2013.6066017%205.53553391%206.53553391%2012.6066017%203%209.07106781%204.41421356%207.65685425%206.53553391%209.77817459'%3e%3c/polygon%3e%3c/defs%3e%3cg%20id='status/whiteBG/correct'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cmask%20id='mask-2'%20fill='white'%3e%3cuse%20xlink:href='%23path-1'%3e%3c/use%3e%3c/mask%3e%3cuse%20id='Mask'%20fill='%233DCCA6'%20xlink:href='%23path-1'%3e%3c/use%3e%3c/g%3e%3c/svg%3e";
9
- class de {
2
+ var we = Object.defineProperty;
3
+ var ve = (o, t, s) => t in o ? we(o, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : o[t] = s;
4
+ var N = (o, t, s) => ve(o, typeof t != "symbol" ? t + "" : t, s);
5
+ import { defineComponent as de, ref as D, computed as Q, watch as E, nextTick as W, onMounted as ge, openBlock as M, createElementBlock as I, normalizeClass as O, createElementVNode as C, toDisplayString as J, renderSlot as q, unref as T, createCommentVNode as z, createVNode as Ie, Transition as Le, withCtx as Ne, withDirectives as Te, vShow as De, isVNode as ue, h as y, reactive as xe, onBeforeUnmount as Ae, useSlots as ke, Fragment as j, createBlock as Se, resolveDynamicComponent as be } from "vue";
6
+ import A from "highlight.js";
7
+ import je from "markdown-it";
8
+ import { debounce as Oe } from "lodash-es";
9
+ import { getDefaultWhiteList as Ee, getDefaultCSSWhiteList as _e, filterXSS as Be } from "xss";
10
+ import { useMcI18n as pe } from "@matechat/core/Locale";
11
+ const Ue = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eenlarge%3c/title%3e%3cg%20id='enlarge'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M7.16666667,1%20C10.572409,1%2013.3333333,3.76092429%2013.3333333,7.16666667%20C13.3333333,8.68984984%2012.781084,10.0840543%2011.8658888,11.1599767%20L14.4225201,13.7154466%20C14.6177822,13.9107088%2014.6177822,14.2272912%2014.4225201,14.4225534%20C14.2489537,14.5961197%2013.9795293,14.6154049%2013.7846612,14.4804088%20L13.7154133,14.4225534%20L11.158968,11.8667467%20C10.083183,12.7814291%208.68937384,13.3333333%207.16666667,13.3333333%20C3.76092429,13.3333333%201,10.572409%201,7.16666667%20C1,3.76092429%203.76092429,1%207.16666667,1%20Z%20M7.16666667,2%20C4.31320904,2%202,4.31320904%202,7.16666667%20C2,10.0201243%204.31320904,12.3333333%207.16666667,12.3333333%20C10.0201243,12.3333333%2012.3333333,10.0201243%2012.3333333,7.16666667%20C12.3333333,4.31320904%2010.0201243,2%207.16666667,2%20Z%20M7.16666667,4.66666667%20C7.41212656,4.66666667%207.61627504,4.84354183%207.658611,5.07679103%20L7.66666667,5.16666667%20L7.666,6.668%20L9.16601582,6.66666666%20C9.44215796,6.66630764%209.66630679,6.88987368%209.66666668,7.16601582%20C9.66698576,7.4114755%209.49037648,7.61585405%209.25718258,7.65849359%20L9.16731751,7.66666666%20L7.666,7.668%20L7.66666667,9.16666667%20C7.66666667,9.44280904%207.44280904,9.66666667%207.16666667,9.66666667%20C6.92120678,9.66666667%206.7170583,9.48979151%206.67472234,9.2565423%20L6.66666667,9.16666667%20L6.666,7.669%20L5.17251751,7.67186668%20C4.89637537,7.6722257%204.67222654,7.44865965%204.67186666,7.17251751%20C4.67154758,6.92705783%204.84815685,6.72267929%205.08135075,6.68003974%20L5.17121582,6.67186709%20L6.666,6.669%20L6.66666667,5.16666667%20C6.66666667,4.89052429%206.89052429,4.66666667%207.16666667,4.66666667%20Z'%20id='形状结合'%20fill='%2371757F'%20fill-rule='nonzero'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", ze = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ezoom-out%3c/title%3e%3cg%20id='zoom-out'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M7.16666667,1%20C10.572409,1%2013.3333333,3.76092429%2013.3333333,7.16666667%20C13.3333333,8.68984984%2012.781084,10.0840543%2011.8658888,11.1599767%20L14.4225201,13.7154466%20C14.6177822,13.9107088%2014.6177822,14.2272912%2014.4225201,14.4225534%20C14.2489537,14.5961197%2013.9795293,14.6154049%2013.7846612,14.4804088%20L13.7154133,14.4225534%20L11.158968,11.8667467%20C10.083183,12.7814291%208.68937384,13.3333333%207.16666667,13.3333333%20C3.76092429,13.3333333%201,10.572409%201,7.16666667%20C1,3.76092429%203.76092429,1%207.16666667,1%20Z%20M7.16666667,2%20C4.31320904,2%202,4.31320904%202,7.16666667%20C2,10.0201243%204.31320904,12.3333333%207.16666667,12.3333333%20C10.0201243,12.3333333%2012.3333333,10.0201243%2012.3333333,7.16666667%20C12.3333333,4.31320904%2010.0201243,2%207.16666667,2%20Z%20M9.16601582,6.66666666%20C9.44215796,6.66630764%209.66630679,6.88987368%209.66666668,7.16601582%20C9.66698576,7.4114755%209.49037648,7.61585405%209.25718258,7.65849359%20L9.16731751,7.66666666%20L5.17251751,7.67186668%20C4.89637537,7.6722257%204.67222654,7.44865965%204.67186666,7.17251751%20C4.67154758,6.92705783%204.84815685,6.72267929%205.08135075,6.68003974%20L5.17121582,6.67186709%20L9.16601582,6.66666666%20Z'%20id='形状结合'%20fill='%2371757F'%20fill-rule='nonzero'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", We = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3ei下载%3c/title%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='i下载'%3e%3cpath%20d='M14.5,14%20C14.7761424,14%2015,14.2238576%2015,14.5%20C15,14.7761424%2014.7761424,15%2014.5,15%20L1.5,15%20C1.22385763,15%201,14.7761424%201,14.5%20C1,14.2238576%201.22385763,14%201.5,14%20L14.5,14%20Z%20M8,1%20C8.24545989,1%208.44960837,1.17687516%208.49194433,1.41012437%20L8.5,1.5%20L8.5,10.793%20L11.6464466,7.64644661%20C11.820013,7.47288026%2012.0894374,7.45359511%2012.2843055,7.58859116%20L12.3535534,7.64644661%20C12.5271197,7.82001296%2012.5464049,8.08943736%2012.4114088,8.2843055%20L12.3535534,8.35355339%20L8.35355339,12.3535534%20L8.34128643,12.3654113%20C8.32881868,12.3770608%208.31575424,12.3880797%208.30214392,12.3984173%20L8.35355339,12.3535534%20C8.32671912,12.3803877%208.29759357,12.4035342%208.26680652,12.422993%20C8.25568247,12.4299807%208.24404667,12.4367067%208.23212724,12.4429657%20C8.21827569,12.4502504%208.20453886,12.4566485%208.1905951,12.4623894%20C8.17802507,12.4675915%208.16473685,12.4724419%208.15119917,12.4767316%20C8.13583471,12.481552%208.12047425,12.4856039%208.10498705,12.4889143%20C8.09430622,12.4912471%208.08325248,12.4932298%208.07207924,12.494843%20C8.05487076,12.4972949%208.03773477,12.498877%208.02056948,12.4995793%20C8.01375728,12.4998604%208.00689494,12.5%208,12.5%20L7.98043349,12.4996194%20C7.96293275,12.4989382%207.94546098,12.4973429%207.92809589,12.4948333%20L8,12.5%20C7.96390296,12.5%207.92869933,12.4961748%207.89477235,12.4889078%20C7.87952575,12.4856039%207.86416529,12.481552%207.84898836,12.4767587%20C7.83526315,12.4724419%207.82197493,12.4675915%207.80896344,12.4622078%20C7.79546114,12.4566485%207.78172431,12.4502504%207.76824181,12.443195%20C7.75595333,12.4367067%207.74431753,12.4299807%207.73298968,12.422812%20C7.72729809,12.4192668%207.72146362,12.4154054%207.7156945,12.4114088%20L7.69785608,12.3984173%20C7.68424576,12.3880797%207.67118132,12.3770608%207.65871357,12.3654113%20L7.64644661,12.3535534%20L3.64644661,8.35355339%20C3.45118446,8.15829124%203.45118446,7.84170876%203.64644661,7.64644661%20C3.82001296,7.47288026%204.08943736,7.45359511%204.2843055,7.58859116%20L4.35355339,7.64644661%20L7.5,10.793%20L7.5,1.5%20C7.5,1.22385763%207.72385763,1%208,1%20Z'%20id='形状结合'%20fill='%2371757F'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e", Pe = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3e全部收起%3c/title%3e%3cg%20id='全部收起'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M4.715694,14.4114091%20C4.910563,14.5464051%205.179987,14.5271201%205.353553,14.3535531%20L5.353553,14.3535531%20L7.99999988,11.7070001%20L10.646447,14.3535531%20L10.715694,14.4114091%20C10.910563,14.5464051%2011.179987,14.5271201%2011.353553,14.3535531%20C11.548816,14.1582911%2011.548816,13.8417091%2011.353553,13.6464471%20L11.353553,13.6464471%20L8.353553,10.6464471%20L8.284306,10.5885911%20C8.089437,10.4535951%207.820013,10.4728801%207.646447,10.6464471%20L7.646447,10.6464471%20L4.646447,13.6464471%20L4.588591,13.7156941%20C4.453595,13.9105631%204.47288,14.1799871%204.646447,14.3535531%20L4.646447,14.3535531%20L4.715694,14.4114091%20Z%20M14.5,7.50000012%20C14.776142,7.50000012%2015,7.72385812%2015,8.00000012%20C15,8.27614212%2014.776142,8.50000012%2014.5,8.50000012%20L1.5,8.50000012%20C1.223858,8.50000012%201,8.27614212%201,8.00000012%20C1,7.72385812%201.223858,7.50000012%201.5,7.50000012%20L14.5,7.50000012%20Z%20M8.284306,5.41140912%20L8.353553,5.35355312%20L11.353553,2.35355312%20C11.548816,2.15829112%2011.548816,1.84170912%2011.353553,1.64644712%20C11.179987,1.47288012%2010.910563,1.45359512%2010.715694,1.58859112%20L10.646447,1.64644712%20L7.99999988,4.29300012%20L5.353553,1.64644712%20C5.179987,1.47288012%204.910563,1.45359512%204.715694,1.58859112%20L4.646447,1.64644712%20C4.47288,1.82001312%204.453595,2.08943712%204.588591,2.28430612%20L4.646447,2.35355312%20L7.646447,5.35355312%20C7.820013,5.52712012%208.089437,5.54640512%208.284306,5.41140912%20Z'%20id='形状结合'%20fill='%2371757F'%20fill-rule='nonzero'%3e%3c/path%3e%3c/g%3e%3c/svg%3e", He = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTZweCIgaGVpZ2h0PSIxNnB4IiB2aWV3Qm94PSIwIDAgMTYgMTYiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+ZnVuY3Rpb24gaWNvbi9jb3B5PC90aXRsZT4KICAgIDxnIGlkPSLpobXpnaItMSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCI+CiAgICAgICAgPGcgaWQ9IkFQSS1zdGFydGVyLeWbvuagh+WFpeW6kyIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTU5Mi4wMDAwMDAsIC0yMDQuMDAwMDAwKSI+CiAgICAgICAgICAgIDxnIGlkPSLmlrnmoLzlpIfku70tMTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDU2MC4wMDAwMDAsIDE4MC4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDx0ZXh0IGlkPSLlm77moIciIGZvbnQtZmFtaWx5PSJQaW5nRmFuZ1NDLVJlZ3VsYXIsIFBpbmdGYW5nIFNDIiBmb250LXNpemU9IjEyIiBmb250LXdlaWdodD0ibm9ybWFsIiBsaW5lLXNwYWNpbmc9IjE2IiBmaWxsPSIjNzE3NTdGIj4KICAgICAgICAgICAgICAgICAgICA8dHNwYW4geD0iMjcuMTM2IiB5PSI2MSI+5aSN5Yi2PC90c3Bhbj4KICAgICAgICAgICAgICAgIDwvdGV4dD4KICAgICAgICAgICAgPC9nPgogICAgICAgICAgICA8cGF0aCBkPSJNNjA0LjUsMjA2IEM2MDUuMjc5Njk2LDIwNiA2MDUuOTIwNDQ5LDIwNi41OTQ4ODggNjA1Ljk5MzEzMywyMDcuMzU1NTQgTDYwNiwyMDcuNSBMNjA2LDIxNC41IEM2MDYsMjE1LjI3OTY5NiA2MDUuNDA1MTEyLDIxNS45MjA0NDkgNjA0LjY0NDQ2LDIxNS45OTMxMzMgTDYwNC41LDIxNiBMNjA0LDIxNiBMNjA0LDIxNi41IEM2MDQsMjE3LjI3OTY5NiA2MDMuNDA1MTEyLDIxNy45MjA0NDkgNjAyLjY0NDQ2LDIxNy45OTMxMzMgTDYwMi41LDIxOCBMNTk1LjUsMjE4IEM1OTQuNjcxNTczLDIxOCA1OTQsMjE3LjMyODQyNyA1OTQsMjE2LjUgTDU5NCwyMTYuNSBMNTk0LDIwOS41IEM1OTQsMjA4LjY3MTU3MyA1OTQuNjcxNTczLDIwOCA1OTUuNSwyMDggTDU5NS41LDIwOCBMNTk2LDIwOCBMNTk2LDIwNy41IEM1OTYsMjA2LjcyMDMwNCA1OTYuNTk0ODg4LDIwNi4wNzk1NTEgNTk3LjM1NTU0LDIwNi4wMDY4NjcgTDU5Ny41LDIwNiBMNjA0LjUsMjA2IFogTTYwMi41LDIwOSBMNTk1LjUsMjA5IEM1OTUuMjIzODU4LDIwOSA1OTUsMjA5LjIyMzg1OCA1OTUsMjA5LjUgTDU5NSwyMDkuNSBMNTk1LDIxNi41IEM1OTUsMjE2Ljc3NjE0MiA1OTUuMjIzODU4LDIxNyA1OTUuNSwyMTcgTDU5NS41LDIxNyBMNjAyLjUsMjE3IEM2MDIuNzc2MTQyLDIxNyA2MDMsMjE2Ljc3NjE0MiA2MDMsMjE2LjUgTDYwMywyMTYuNSBMNjAzLDIwOS41IEM2MDMsMjA5LjIyMzg1OCA2MDIuNzc2MTQyLDIwOSA2MDIuNSwyMDkgTDYwMi41LDIwOSBaIE02MDQuNSwyMDcgTDU5Ny41LDIwNyBDNTk3LjI1NDU0LDIwNyA1OTcuMDUwMzkyLDIwNy4xNzY4NzUgNTk3LjAwODA1NiwyMDcuNDEwMTI0IEw1OTcsMjA3LjUgTDU5NywyMDggTDYwMi41LDIwOCBDNjAzLjI3OTY5NiwyMDggNjAzLjkyMDQ0OSwyMDguNTk0ODg4IDYwMy45OTMxMzMsMjA5LjM1NTU0IEw2MDQsMjA5LjUgTDYwNCwyMTUgTDYwNC41LDIxNSBDNjA0Ljc0NTQ2LDIxNSA2MDQuOTQ5NjA4LDIxNC44MjMxMjUgNjA0Ljk5MTk0NCwyMTQuNTg5ODc2IEw2MDUsMjE0LjUgTDYwNSwyMDcuNSBDNjA1LDIwNy4yNTQ1NCA2MDQuODIzMTI1LDIwNy4wNTAzOTIgNjA0LjU4OTg3NiwyMDcuMDA4MDU2IEw2MDQuNSwyMDcgWiIgaWQ9IuW9oueKtue7k+WQiCIgZmlsbD0iIzcxNzU3RiIgZmlsbC1ydWxlPSJub256ZXJvIj48L3BhdGg+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4=", Ze = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='16px'%20height='16px'%20viewBox='0%200%2016%2016'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3estatus/whiteBG/correct%3c/title%3e%3cdesc%3eCreated%20with%20Sketch.%3c/desc%3e%3cdefs%3e%3cpolygon%20id='path-1'%20points='6.53553391%209.77817459%2012.1923882%204.12132034%2013.6066017%205.53553391%206.53553391%2012.6066017%203%209.07106781%204.41421356%207.65685425%206.53553391%209.77817459'%3e%3c/polygon%3e%3c/defs%3e%3cg%20id='status/whiteBG/correct'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cmask%20id='mask-2'%20fill='white'%3e%3cuse%20xlink:href='%23path-1'%3e%3c/use%3e%3c/mask%3e%3cuse%20id='Mask'%20fill='%233DCCA6'%20xlink:href='%23path-1'%3e%3c/use%3e%3c/g%3e%3c/svg%3e";
12
+ class he {
10
13
  constructor() {
11
- this.xssWhiteList = xe(), this.cssWhiteList = Te(), this.setDefaultXss();
14
+ N(this, "xssWhiteList", Ee());
15
+ N(this, "cssWhiteList", _e());
16
+ this.setDefaultXss();
12
17
  }
13
18
  setDefaultXss() {
14
- this.xssWhiteList.input = ["type", "checked", "disabled", "class"], this.xssWhiteList.label = ["for"], this.xssWhiteList.ul = ["class"], this.xssWhiteList.div = ["class"], this.xssWhiteList.a = ["href", "class", "target", "name"], this.xssWhiteList.ol = ["start"], this.xssWhiteList.p = ["class"], this.xssWhiteList.span = ["style", "class", "title", "id"], this.xssWhiteList.svg = ["style", "class", "width", "height", "viewbox", "preserveaspectratio", "id", "fill", "stroke"], this.xssWhiteList.path = ["style", "class", "d", "id", "fill", "stroke"], this.xssWhiteList.th = ["style"], this.xssWhiteList.td = ["style"];
19
+ this.xssWhiteList.input = ["type", "checked", "disabled", "class"], this.xssWhiteList.label = ["for"], this.xssWhiteList.ul = ["class"], this.xssWhiteList.div = ["class", "key"], this.xssWhiteList.a = ["href", "class", "target", "name"], this.xssWhiteList.ol = ["start"], this.xssWhiteList.p = ["class"], this.xssWhiteList.span = ["style", "class", "title", "id"], this.xssWhiteList.svg = ["style", "class", "width", "height", "viewbox", "preserveaspectratio", "id", "fill", "stroke"], this.xssWhiteList.path = ["style", "class", "d", "id", "fill", "stroke"], this.xssWhiteList.th = ["style"], this.xssWhiteList.td = ["style"];
15
20
  }
16
- onIgnoreTagAttr(s, r, a, n) {
17
- if (!n && (r === "id" || s === "span" && r === "style"))
18
- return r + "=" + a;
21
+ onIgnoreTagAttr(t, s, a, n) {
22
+ if (!n && (s === "id" || t === "span" && s === "style"))
23
+ return s + "=" + a;
19
24
  }
20
25
  getXssWhiteList() {
21
26
  return this.xssWhiteList;
22
27
  }
23
- setXssWhiteList(s) {
24
- this.xssWhiteList = s;
28
+ setXssWhiteList(t) {
29
+ this.xssWhiteList = t;
25
30
  }
26
- setCustomXssRules(s) {
27
- s && s.forEach((r) => {
28
- r.value === null ? delete this.xssWhiteList[r.key] : this.xssWhiteList[r.key] = r.value;
31
+ setCustomXssRules(t) {
32
+ t && t.forEach((s) => {
33
+ s.value === null ? delete this.xssWhiteList[s.key] : this.xssWhiteList[s.key] = s.value;
29
34
  });
30
35
  }
31
- setMdPlugins(s, r) {
32
- s && s.length && s.forEach((a) => {
33
- const { plugin: n, opts: g } = a;
34
- r.use(n, g);
36
+ setMdPlugins(t, s) {
37
+ t && t.length && t.forEach((a) => {
38
+ const { plugin: n, opts: c } = a;
39
+ s.use(n, c);
35
40
  });
36
41
  }
37
- filterHtml(s) {
38
- return Ae(s, {
42
+ filterHtml(t) {
43
+ return Be(t, {
39
44
  whiteList: this.xssWhiteList,
40
45
  onIgnoreTagAttr: this.onIgnoreTagAttr,
41
46
  css: {
@@ -49,22 +54,22 @@ class de {
49
54
  });
50
55
  }
51
56
  }
52
- const Ue = {
57
+ const Ye = {
53
58
  key: 0,
54
59
  class: "mc-code-block-header"
55
- }, _e = { class: "mc-code-lang" }, ze = { class: "mc-code-block-actions" }, We = {
60
+ }, Qe = { class: "mc-code-lang" }, Fe = { class: "mc-code-block-actions" }, Ge = {
56
61
  key: 0,
57
62
  style: { "margin-right": "8px" }
58
- }, Ze = ["title"], Ye = ["title"], Pe = ["title"], Qe = ["title"], Ge = ["title"], He = {
63
+ }, $e = ["title"], Xe = ["title"], Re = ["title"], Ke = ["title"], Ve = ["title"], Je = {
59
64
  key: 0,
60
- src: Ee
61
- }, Fe = {
65
+ src: He
66
+ }, qe = {
62
67
  key: 1,
63
- src: Be
64
- }, $e = {
68
+ src: Ze
69
+ }, et = {
65
70
  key: 0,
66
71
  class: "mc-mermaid-content"
67
- }, Xe = { key: 1 }, Re = ["innerHTML"], Ke = /* @__PURE__ */ le({
72
+ }, tt = { key: 1 }, st = ["innerHTML"], nt = /* @__PURE__ */ de({
68
73
  __name: "CodeBlock",
69
74
  props: {
70
75
  code: {
@@ -92,135 +97,135 @@ const Ue = {
92
97
  default: () => ({})
93
98
  }
94
99
  },
95
- setup(i) {
96
- const s = i, { t: r } = be(), a = new de();
100
+ setup(o) {
101
+ const t = o, { t: s } = pe(), a = new he();
97
102
  let n = null;
98
- const g = x(!0), d = x(!1);
99
- x("");
100
- const l = x(!0), c = W(() => {
101
- var t;
102
- return s.enableMermaid && ((t = s.language) == null ? void 0 : t.toLowerCase()) === "mermaid";
103
- }), h = W(() => {
103
+ const c = D(!0), d = D(!1);
104
+ D("");
105
+ const r = D(!0), g = Q(() => {
106
+ var i;
107
+ return t.enableMermaid && ((i = t.language) == null ? void 0 : i.toLowerCase()) === "mermaid";
108
+ }), m = Q(() => {
104
109
  try {
105
- const t = s.code.indexOf('<span class="mc-typewriter');
110
+ const i = t.code.indexOf('<span class="mc-typewriter');
106
111
  let e;
107
- return s.language && D.getLanguage(s.language) ? t !== -1 ? e = D.highlight(s.code.slice(0, t), { language: s.language }).value + s.code.slice(t) : e = D.highlight(s.code, { language: s.language }).value : typeof D.highlightAuto !== void 0 ? t !== -1 ? e = D.highlightAuto(s.code.slice(0, t)).value + s.code.slice(t) : e = D.highlightAuto(s.code).value : e = a.filterHtml(s.code), e;
112
+ return t.language && A.getLanguage(t.language) ? i !== -1 ? e = A.highlight(t.code.slice(0, i), { language: t.language }).value + t.code.slice(i) : e = A.highlight(t.code, { language: t.language }).value : typeof A.highlightAuto !== void 0 ? i !== -1 ? e = A.highlightAuto(t.code.slice(0, i)).value + t.code.slice(i) : e = A.highlightAuto(t.code).value : e = a.filterHtml(t.code), e;
108
113
  } catch {
109
114
  }
110
- }), w = x(null), E = () => {
115
+ }), f = D(null), x = () => {
111
116
  var e;
112
- const t = (e = w.value) == null ? void 0 : e.querySelector(".mc-mermaid-content");
113
- t && n && n.zoomIn(t);
114
- }, N = () => {
117
+ const i = (e = f.value) == null ? void 0 : e.querySelector(".mc-mermaid-content");
118
+ i && n && n.zoomIn(i);
119
+ }, k = () => {
115
120
  var e;
116
- const t = (e = w.value) == null ? void 0 : e.querySelector(".mc-mermaid-content");
117
- t && n && n.zoomOut(t);
118
- }, P = () => {
121
+ const i = (e = f.value) == null ? void 0 : e.querySelector(".mc-mermaid-content");
122
+ i && n && n.zoomOut(i);
123
+ }, L = () => {
119
124
  var e;
120
- const t = (e = w.value) == null ? void 0 : e.querySelector(".mc-mermaid-content");
121
- t && n && n.download(t);
122
- }, I = async () => {
123
- if (!(!c.value || !s.code)) {
125
+ const i = (e = f.value) == null ? void 0 : e.querySelector(".mc-mermaid-content");
126
+ i && n && n.download(i);
127
+ }, _ = async () => {
128
+ if (!(!g.value || !t.code)) {
124
129
  if (!n)
125
130
  try {
126
- const { MermaidService: t } = await import("./MermaidService-B6BcjbW_.js"), e = {
127
- theme: s.theme === "dark" ? "dark" : "default",
128
- ...s.mermaidConfig
131
+ const { MermaidService: i } = await import("./MermaidService-yeLQUW_e.js"), e = {
132
+ theme: t.theme === "dark" ? "dark" : "default",
133
+ ...t.mermaidConfig
129
134
  };
130
- n = new t(e);
131
- } catch (t) {
132
- console.error("Failed to load MermaidService:", t);
135
+ n = new i(e);
136
+ } catch (i) {
137
+ console.error("Failed to load MermaidService:", i);
133
138
  return;
134
139
  }
135
- Z(async () => {
140
+ W(async () => {
136
141
  var e;
137
- const t = (e = w.value) == null ? void 0 : e.querySelector(".mc-mermaid-content");
138
- t && await n.renderToContainer(t, s.code.replace(/<span[^>]*\bclass\s*=\s*['"]mc-typewriter[^>]*>([\s\S]*?)<\/span>/g, "$1"), s.theme);
142
+ const i = (e = f.value) == null ? void 0 : e.querySelector(".mc-mermaid-content");
143
+ i && await n.renderToContainer(i, t.code.replace(/<span[^>]*\bclass\s*=\s*['"]mc-typewriter[^>]*>([\s\S]*?)<\/span>/g, "$1"), t.theme);
139
144
  });
140
145
  }
141
- }, Q = () => {
142
- g.value = !g.value;
143
- }, B = De((t) => {
144
- const e = t.target;
146
+ }, S = () => {
147
+ c.value = !c.value;
148
+ }, P = Oe((i) => {
149
+ const e = i.target;
145
150
  if (navigator.clipboard)
146
- navigator.clipboard.writeText(s.code);
151
+ navigator.clipboard.writeText(t.code);
147
152
  else {
148
- const o = document.createElement("textarea");
149
- o.style.position = "fixed", o.style.top = "-9999px", o.style.left = "-9999px", o.style.zIndex = "-1", o.value = s.code, document.body.appendChild(o), o.select(), document.execCommand("copy"), document.body.removeChild(o);
153
+ const l = document.createElement("textarea");
154
+ l.style.position = "fixed", l.style.top = "-9999px", l.style.left = "-9999px", l.style.zIndex = "-1", l.value = t.code, document.body.appendChild(l), l.select(), document.execCommand("copy"), document.body.removeChild(l);
150
155
  }
151
156
  e.classList.remove("icon-copy-new"), d.value = !0, setTimeout(() => {
152
157
  d.value = !1;
153
158
  }, 1500);
154
- }, 300), G = (t) => {
155
- t.dataset || (t.dataset = {}), t.style.height && (t.dataset.height = t.style.height), t.style.maxHeight = 0;
156
- }, H = (t) => {
159
+ }, 300), $ = (i) => {
160
+ i.dataset || (i.dataset = {}), i.style.height && (i.dataset.height = i.style.height), i.style.maxHeight = 0;
161
+ }, X = (i) => {
157
162
  requestAnimationFrame(() => {
158
- t.dataset.oldOverflow = t.style.overflow, t.dataset.height ? t.style.maxHeight = t.dataset.height : t.scrollHeight !== 0 ? t.style.maxHeight = `${t.scrollHeight}px` : t.style.maxHeight = 0, t.style.overflow = "hidden";
163
+ i.dataset.oldOverflow = i.style.overflow, i.dataset.height ? i.style.maxHeight = i.dataset.height : i.scrollHeight !== 0 ? i.style.maxHeight = `${i.scrollHeight}px` : i.style.maxHeight = 0, i.style.overflow = "hidden";
159
164
  });
160
- }, U = (t) => {
161
- t.style.maxHeight = "", t.style.overflow = t.dataset.oldOverflow;
162
- }, j = (t) => {
163
- t.dataset || (t.dataset = {}), t.dataset.oldOverflow = t.style.overflow, t.style.maxHeight = `${t.scrollHeight}px`, t.style.overflow = "hidden";
164
- }, F = (t) => {
165
- t.scrollHeight !== 0 && (t.style.maxHeight = 0);
166
- }, $ = (t) => {
167
- t.style.maxHeight = "", t.style.overflow = t.dataset.oldOverflow;
168
- }, X = W(() => s.theme === "dark" ? "mc-code-block-dark" : "mc-code-block-light");
169
- return k(() => [s.code, s.theme, s.enableMermaid], () => {
170
- c.value && Z(() => {
171
- I();
165
+ }, H = (i) => {
166
+ i.style.maxHeight = "", i.style.overflow = i.dataset.oldOverflow;
167
+ }, B = (i) => {
168
+ i.dataset || (i.dataset = {}), i.dataset.oldOverflow = i.style.overflow, i.style.maxHeight = `${i.scrollHeight}px`, i.style.overflow = "hidden";
169
+ }, R = (i) => {
170
+ i.scrollHeight !== 0 && (i.style.maxHeight = 0);
171
+ }, K = (i) => {
172
+ i.style.maxHeight = "", i.style.overflow = i.dataset.oldOverflow;
173
+ }, V = Q(() => t.theme === "dark" ? "mc-code-block-dark" : "mc-code-block-light");
174
+ return E(() => [t.code, t.theme, t.enableMermaid], () => {
175
+ g.value && W(() => {
176
+ _();
172
177
  });
173
- }, { immediate: !0 }), k(
174
- () => l.value,
175
- (t) => {
176
- t && c.value && Z(() => {
177
- I();
178
+ }, { immediate: !0 }), E(
179
+ () => r.value,
180
+ (i) => {
181
+ i && g.value && W(() => {
182
+ _();
178
183
  });
179
184
  }
180
- ), ce(() => {
181
- c.value && I();
182
- }), (t, e) => (C(), v(
185
+ ), ge(() => {
186
+ g.value && _();
187
+ }), (i, e) => (M(), I(
183
188
  "div",
184
189
  {
185
- class: b(["mc-code-block", X.value]),
190
+ class: O(["mc-code-block", V.value]),
186
191
  ref_key: "rootRef",
187
- ref: w
192
+ ref: f
188
193
  },
189
194
  [
190
- t.$slots.header ? R(t.$slots, "header", { key: 1 }, void 0, !0) : (C(), v("div", Ue, [
191
- M(
195
+ i.$slots.header ? q(i.$slots, "header", { key: 1 }, void 0, !0) : (M(), I("div", Ye, [
196
+ C(
192
197
  "span",
193
- _e,
194
- K(i.language),
198
+ Qe,
199
+ J(o.language),
195
200
  1
196
201
  /* TEXT */
197
202
  ),
198
- R(t.$slots, "actions", {}, () => [
199
- M("div", ze, [
200
- c.value ? (C(), v("div", We, [
201
- M(
203
+ q(i.$slots, "actions", {}, () => [
204
+ C("div", Fe, [
205
+ g.value ? (M(), I("div", Ge, [
206
+ C(
202
207
  "ul",
203
208
  {
204
- class: b(["mc-diagram-switch", { "mc-show-code": !l.value }])
209
+ class: O(["mc-diagram-switch", { "mc-show-code": !r.value }])
205
210
  },
206
211
  [
207
- M(
212
+ C(
208
213
  "li",
209
214
  {
210
- onClick: e[0] || (e[0] = (o) => l.value = !0),
211
- class: b({ "mc-diagram-switch-active": l.value })
215
+ onClick: e[0] || (e[0] = (l) => r.value = !0),
216
+ class: O({ "mc-diagram-switch-active": r.value })
212
217
  },
213
- K(L(r)("Md.diagram")),
218
+ J(T(s)("Md.diagram")),
214
219
  3
215
220
  /* TEXT, CLASS */
216
221
  ),
217
- M(
222
+ C(
218
223
  "li",
219
224
  {
220
- onClick: e[1] || (e[1] = (o) => l.value = !1),
221
- class: b({ "mc-diagram-switch-active": !l.value })
225
+ onClick: e[1] || (e[1] = (l) => r.value = !1),
226
+ class: O({ "mc-diagram-switch-active": !r.value })
222
227
  },
223
- K(L(r)("Md.code")),
228
+ J(T(s)("Md.code")),
224
229
  3
225
230
  /* TEXT, CLASS */
226
231
  )
@@ -228,99 +233,99 @@ const Ue = {
228
233
  2
229
234
  /* CLASS */
230
235
  )
231
- ])) : O("v-if", !0),
232
- c.value && l.value ? (C(), v("div", {
236
+ ])) : z("v-if", !0),
237
+ g.value && r.value ? (M(), I("div", {
233
238
  key: 1,
234
239
  class: "mc-action-btn mc-toggle-btn",
235
- title: L(r)("Md.zoomIn"),
236
- onClick: E
240
+ title: T(s)("Md.zoomIn"),
241
+ onClick: x
237
242
  }, e[3] || (e[3] = [
238
- M(
243
+ C(
239
244
  "img",
240
- { src: ke },
245
+ { src: Ue },
241
246
  null,
242
247
  -1
243
248
  /* HOISTED */
244
249
  )
245
- ]), 8, Ze)) : O("v-if", !0),
246
- c.value && l.value ? (C(), v("div", {
250
+ ]), 8, $e)) : z("v-if", !0),
251
+ g.value && r.value ? (M(), I("div", {
247
252
  key: 2,
248
253
  class: "mc-action-btn mc-toggle-btn",
249
- title: L(r)("Md.zoomOut"),
250
- onClick: N
254
+ title: T(s)("Md.zoomOut"),
255
+ onClick: k
251
256
  }, e[4] || (e[4] = [
252
- M(
257
+ C(
253
258
  "img",
254
- { src: je },
259
+ { src: ze },
255
260
  null,
256
261
  -1
257
262
  /* HOISTED */
258
263
  )
259
- ]), 8, Ye)) : O("v-if", !0),
260
- c.value && l.value ? (C(), v("div", {
264
+ ]), 8, Xe)) : z("v-if", !0),
265
+ g.value && r.value ? (M(), I("div", {
261
266
  key: 3,
262
267
  class: "mc-action-btn mc-toggle-btn",
263
- title: L(r)("Md.downLoad"),
264
- onClick: P
268
+ title: T(s)("Md.downLoad"),
269
+ onClick: L
265
270
  }, e[5] || (e[5] = [
266
- M(
271
+ C(
267
272
  "img",
268
- { src: Se },
273
+ { src: We },
269
274
  null,
270
275
  -1
271
276
  /* HOISTED */
272
277
  )
273
- ]), 8, Pe)) : O("v-if", !0),
274
- M("div", {
278
+ ]), 8, Re)) : z("v-if", !0),
279
+ C("div", {
275
280
  class: "mc-action-btn mc-toggle-btn",
276
- title: L(r)("Md.toggle"),
277
- onClick: Q
281
+ title: T(s)("Md.toggle"),
282
+ onClick: S
278
283
  }, e[6] || (e[6] = [
279
- M(
284
+ C(
280
285
  "img",
281
- { src: Oe },
286
+ { src: Pe },
282
287
  null,
283
288
  -1
284
289
  /* HOISTED */
285
290
  )
286
- ]), 8, Qe),
287
- M("div", {
291
+ ]), 8, Ke),
292
+ C("div", {
288
293
  class: "mc-action-btn mc-copy-btn",
289
- title: L(r)("Md.copy"),
294
+ title: T(s)("Md.copy"),
290
295
  onClick: e[2] || (e[2] = //@ts-ignore
291
- (...o) => L(B) && L(B)(...o))
296
+ (...l) => T(P) && T(P)(...l))
292
297
  }, [
293
- d.value ? (C(), v("img", Fe)) : (C(), v("img", He))
294
- ], 8, Ge)
298
+ d.value ? (M(), I("img", qe)) : (M(), I("img", Je))
299
+ ], 8, Ve)
295
300
  ])
296
301
  ], !0)
297
302
  ])),
298
- ye(fe, {
303
+ Ie(Le, {
299
304
  name: "collapse-transition",
300
- onBeforeEnter: G,
301
- onEnter: H,
302
- onAfterEnter: U,
303
- onBeforeLeave: j,
304
- onLeave: F,
305
- onAfterLeave: $,
305
+ onBeforeEnter: $,
306
+ onEnter: X,
307
+ onAfterEnter: H,
308
+ onBeforeLeave: B,
309
+ onLeave: R,
310
+ onAfterLeave: K,
306
311
  persisted: ""
307
312
  }, {
308
- default: Me(() => [
309
- Ce(M(
313
+ default: Ne(() => [
314
+ Te(C(
310
315
  "div",
311
316
  null,
312
317
  [
313
- c.value && l.value && !t.$slots.content ? (C(), v("div", $e)) : t.$slots.content ? R(t.$slots, "content", { key: 2 }, void 0, !0) : (C(), v("pre", Xe, [
314
- M("code", {
315
- class: b(`hljs language-${i.language}`),
316
- innerHTML: h.value
317
- }, null, 10, Re)
318
+ g.value && r.value && !i.$slots.content ? (M(), I("div", et)) : i.$slots.content ? q(i.$slots, "content", { key: 2 }, void 0, !0) : (M(), I("pre", tt, [
319
+ C("code", {
320
+ class: O(`hljs language-${o.language}`),
321
+ innerHTML: m.value
322
+ }, null, 10, st)
318
323
  ]))
319
324
  ],
320
325
  512
321
326
  /* NEED_PATCH */
322
327
  ), [
323
- [we, g.value]
328
+ [De, c.value]
324
329
  ])
325
330
  ]),
326
331
  _: 3
@@ -331,16 +336,12 @@ const Ue = {
331
336
  /* CLASS */
332
337
  ));
333
338
  }
334
- }), ge = (i, s) => {
335
- const r = i.__vccOpts || i;
336
- for (const [a, n] of s)
337
- r[a] = n;
338
- return r;
339
- }, Ve = /* @__PURE__ */ ge(Ke, [["__scopeId", "data-v-6332bb90"]]), oe = {
340
- step: 2,
341
- interval: 50,
342
- style: "normal"
343
- }, Je = {
339
+ }), me = (o, t) => {
340
+ const s = o.__vccOpts || o;
341
+ for (const [a, n] of t)
342
+ s[a] = n;
343
+ return s;
344
+ }, it = /* @__PURE__ */ me(nt, [["__scopeId", "data-v-871cb018"]]), ot = {
344
345
  content: {
345
346
  type: String,
346
347
  default: ""
@@ -397,314 +398,494 @@ const Ue = {
397
398
  type: Object,
398
399
  default: () => ({})
399
400
  }
400
- }, qe = (i, s) => {
401
- const r = (i == null ? void 0 : i.content) || "", a = (s == null ? void 0 : s.content) || "", n = r.match(/<(\w+)/), g = a.match(/<\/(\w+)/);
402
- return n && g ? n[1] === g[1] : !1;
403
- }, et = (i) => {
404
- const s = i.content || "";
405
- if (s.match(/<(\w+)[^>]*\/>/))
401
+ }, G = {
402
+ step: 2,
403
+ interval: 50,
404
+ style: "normal"
405
+ }, rt = (o) => {
406
+ const t = o.content || "";
407
+ if (t.match(/<(\w+)[^>]*\/>/))
406
408
  return !0;
407
- const r = [], a = /<(\w+)[^>]*>/g, n = /<\/(\w+)>/g;
408
- let g, d;
409
+ const s = [], a = /<(\w+)[^>]*>/g, n = /<\/(\w+)>/g;
410
+ let c, d;
409
411
  a.lastIndex = 0, n.lastIndex = 0;
410
- const l = [];
411
- for (; (g = a.exec(s)) !== null; )
412
- l.push({
412
+ const r = [];
413
+ for (; (c = a.exec(t)) !== null; )
414
+ r.push({
413
415
  type: "open",
414
- tagName: g[1],
415
- index: g.index
416
+ tagName: c[1],
417
+ index: c.index
416
418
  });
417
- for (; (d = n.exec(s)) !== null; )
418
- l.push({
419
+ for (; (d = n.exec(t)) !== null; )
420
+ r.push({
419
421
  type: "close",
420
422
  tagName: d[1],
421
423
  index: d.index
422
424
  });
423
- l.sort((c, h) => c.index - h.index);
424
- for (const c of l)
425
- if (c.type === "open")
426
- r.push(c.tagName);
425
+ r.sort((g, m) => g.index - m.index);
426
+ for (const g of r)
427
+ if (g.type === "open")
428
+ s.push(g.tagName);
427
429
  else {
428
- if (r.length === 0 || r[r.length - 1] !== c.tagName)
430
+ if (s.length === 0 || s[s.length - 1] !== g.tagName)
429
431
  return !1;
430
- r.pop();
432
+ s.pop();
431
433
  }
432
- return r.length === 0;
433
- }, V = (i) => ({
434
- nodeType: i ? i.type.replace("_open", "") : "root",
435
- openNode: i,
434
+ return s.length === 0;
435
+ }, at = (o, t) => {
436
+ const s = (o == null ? void 0 : o.content) || "", a = (t == null ? void 0 : t.content) || "", n = s.match(/<(\w+)/), c = a.match(/<\/(\w+)/);
437
+ return n && c ? n[1] === c[1] : !1;
438
+ }, ee = (o) => ({
439
+ nodeType: o ? o.type.replace("_open", "") : "root",
440
+ openNode: o,
436
441
  closeNode: null,
437
442
  children: [],
438
- vNodeKey: (i == null ? void 0 : i.vNodeKey) || ""
439
- }), tt = (i, s) => {
440
- const r = i.content.startsWith("</");
441
- if (!s.length) {
442
- i.nesting = r ? 0 : 1, s.push(i);
443
+ vNodeKey: (o == null ? void 0 : o.vNodeKey) || ""
444
+ }), lt = (o, t) => {
445
+ const s = o.content.startsWith("</");
446
+ if (!t.length) {
447
+ o.nesting = s ? 0 : 1, t.push(o);
443
448
  return;
444
449
  }
445
- const a = s[s.length - 1];
446
- qe(a, i) ? (i.nesting = -1, s.pop()) : r ? i.nesting = 0 : (i.nesting = 1, s.push(i));
447
- }, ue = (i) => {
448
- const s = (l) => {
449
- const c = V(l);
450
- return l.children && l.children.length > 0 && (c.children = ue(l.children)), c;
451
- }, r = V(null);
452
- let a = r;
453
- const n = [], g = [], d = [];
454
- return i.forEach((l, c) => {
455
- if (l.vNodeKey = `mc-markdown-content-key-${c}`, l.tokenIndex = c, l.type.includes("html_")) {
456
- if (et(l)) {
457
- l.nesting = 0;
450
+ const a = t[t.length - 1];
451
+ at(a, o) ? (o.nesting = -1, t.pop()) : s ? o.nesting = 0 : (o.nesting = 1, t.push(o));
452
+ }, F = (o) => {
453
+ if (!o) return !1;
454
+ try {
455
+ return document.createElement(o), !0;
456
+ } catch {
457
+ return !1;
458
+ }
459
+ }, ye = (o) => {
460
+ const t = (r) => {
461
+ const g = ee(r);
462
+ return r.children && r.children.length > 0 && (g.children = ye(r.children)), g;
463
+ }, s = ee(null);
464
+ let a = s;
465
+ const n = [], c = [], d = [];
466
+ return o.forEach((r, g) => {
467
+ if (r.vNodeKey = `mc-markdown-content-key-${g}`, r.tokenIndex = g, r.type.includes("html_")) {
468
+ if (rt(r)) {
469
+ r.nesting = 0;
458
470
  return;
459
471
  }
460
- const h = l.type === "html_block" ? d : g;
461
- tt(l, h);
472
+ const m = r.type === "html_block" ? d : c;
473
+ lt(r, m);
462
474
  }
463
- }), i.forEach((l, c) => {
464
- let h;
465
- if (l.nesting === 1)
466
- h = V(l), a.children.push(h), n.push(a), a = h;
467
- else if (l.nesting === -1) {
468
- if (a.closeNode = l, !n.length)
475
+ }), o.forEach((r, g) => {
476
+ let m;
477
+ if (r.nesting === 1)
478
+ m = ee(r), a.children.push(m), n.push(a), a = m;
479
+ else if (r.nesting === -1) {
480
+ if (a.closeNode = r, !n.length)
469
481
  throw new Error("AST stack underflow.");
470
- h = n.pop(), a = h;
471
- } else if (l.nesting === 0)
472
- if (l.type === "inline" && l.children && l.children.length > 0) {
473
- const w = s(l);
474
- a.children.push(w);
482
+ m = n.pop(), a = m;
483
+ } else if (r.nesting === 0)
484
+ if (r.type === "inline" && r.children && r.children.length > 0) {
485
+ const f = t(r);
486
+ a.children.push(f);
475
487
  } else
476
- a.children.push(l);
488
+ a.children.push(r);
477
489
  else
478
- throw new Error(`Invalid nesting level found in token index ${c}.`);
479
- }), r.children;
480
- }, z = (i) => {
481
- if (!i || !i.trim()) return [];
490
+ throw new Error(`Invalid nesting level found in token index ${g}.`);
491
+ }), s.children;
492
+ }, Y = (o) => {
493
+ if (!o || !o.trim()) return [];
482
494
  if (typeof window > "u" || typeof DOMParser > "u")
483
- return [i];
484
- const r = new DOMParser().parseFromString(`<body>${i}</body>`, "text/html"), a = [];
485
- return r.body.childNodes.forEach((n, g) => {
486
- const d = he(n);
487
- (ae(d) || typeof d == "string") && (typeof d == "object" && (d.key = g), a.push(d));
495
+ return [o];
496
+ const s = new DOMParser().parseFromString(`<body>${o}</body>`, "text/html"), a = [];
497
+ return s.body.childNodes.forEach((n, c) => {
498
+ const d = fe(n);
499
+ (ue(d) || typeof d == "string") && (typeof d == "object" && (d.key = c), a.push(d));
488
500
  }), a;
489
- }, he = (i) => {
490
- if (i.nodeType === Node.TEXT_NODE) return i.textContent;
491
- if (i.nodeType !== Node.ELEMENT_NODE) return i.textContent || "";
492
- const s = i, r = {};
493
- if (s.hasAttributes() && s.attributes)
494
- for (const n of Array.from(s.attributes))
495
- r[n.name] = n.value;
501
+ }, fe = (o) => {
502
+ if (o.nodeType === Node.TEXT_NODE) return o.textContent;
503
+ if (o.nodeType !== Node.ELEMENT_NODE) return o.textContent || "";
504
+ const t = o, s = {};
505
+ if (t.hasAttributes() && t.attributes)
506
+ for (const n of Array.from(t.attributes))
507
+ s[n.name] = n.value;
496
508
  const a = [];
497
- return s.childNodes.length > 0 && s.childNodes.forEach((n) => {
498
- const g = he(n);
499
- (ae(g) || typeof g == "string") && a.push(g);
500
- }), Y(s.tagName) ? f(s.tagName.toLowerCase(), r, a) : (i == null ? void 0 : i.textContent) || "";
501
- }, Y = (i) => {
502
- if (!i) return !1;
503
- try {
504
- return document.createElement(i), !0;
505
- } catch {
506
- return !1;
509
+ return t.childNodes.length > 0 && t.childNodes.forEach((n) => {
510
+ const c = fe(n);
511
+ (ue(c) || typeof c == "string") && a.push(c);
512
+ }), F(t.tagName) ? y(t.tagName.toLowerCase(), s, a) : (o == null ? void 0 : o.textContent) || "";
513
+ };
514
+ function ct() {
515
+ const o = xe({});
516
+ return {
517
+ getCache: (t) => o[t],
518
+ getCaches: () => ({ ...o }),
519
+ setCache: (t, s) => {
520
+ o[t] = s;
521
+ },
522
+ nextTick: W
523
+ };
524
+ }
525
+ function dt({
526
+ adapter: o,
527
+ foundationClass: t
528
+ }) {
529
+ const s = D(null), a = () => (s.value || (s.value = new t(o), typeof s.value.init == "function" && s.value.init()), s.value), n = () => {
530
+ s.value && (typeof s.value.destroy == "function" && s.value.destroy(), s.value = null);
531
+ };
532
+ return Ae(() => {
533
+ n();
534
+ }), {
535
+ foundation: a(),
536
+ destroyFoundation: n
537
+ };
538
+ }
539
+ const v = () => {
540
+ };
541
+ class te {
542
+ constructor(t) {
543
+ N(this, "_adapter");
544
+ this._adapter = { ...te.defaultAdapter, ...t };
545
+ }
546
+ static get cssClasses() {
547
+ return {};
548
+ }
549
+ static get strings() {
550
+ return {};
551
+ }
552
+ static get numbers() {
553
+ return {};
554
+ }
555
+ static get defaultAdapter() {
556
+ return {
557
+ getProp: v,
558
+ getProps: v,
559
+ getState: v,
560
+ getStates: v,
561
+ setState: v,
562
+ getContext: v,
563
+ getContexts: v,
564
+ getCache: v,
565
+ setCache: v,
566
+ getCaches: v,
567
+ stopPropagation: v
568
+ };
569
+ }
570
+ getProp(t) {
571
+ return this._adapter.getProp(t);
572
+ }
573
+ getProps() {
574
+ return this._adapter.getProps();
575
+ }
576
+ getState(t) {
577
+ return this._adapter.getState(t);
578
+ }
579
+ getStates() {
580
+ return this._adapter.getStates();
581
+ }
582
+ setState(t, s) {
583
+ return this._adapter.setState({ ...t }, s);
507
584
  }
508
- }, st = /* @__PURE__ */ le({
585
+ /* istanbul ignore next */
586
+ getCaches() {
587
+ return this._adapter.getCaches();
588
+ }
589
+ getCache(t) {
590
+ return this._adapter.getCache(t);
591
+ }
592
+ setCache(t, s) {
593
+ return t && this._adapter.setCache(t, s);
594
+ }
595
+ nextTick(t) {
596
+ return this._adapter.nextTick(t);
597
+ }
598
+ _isInProps(t) {
599
+ const s = this.getProps();
600
+ return t in s;
601
+ }
602
+ init(t) {
603
+ }
604
+ destroy() {
605
+ }
606
+ }
607
+ class gt extends te {
608
+ constructor(s) {
609
+ super({ ...s });
610
+ N(this, "isToken", (s) => "type" in s && "content" in s);
611
+ N(this, "typewriterEnd", () => {
612
+ var s, a;
613
+ this.setState({ isTyping: !1 }), (a = (s = this._adapter).typingEnd) == null || a.call(s);
614
+ });
615
+ N(this, "getThinkContent", (s, a) => {
616
+ var c;
617
+ const n = (a == null ? void 0 : a.customClass) || "mc-think-block";
618
+ return ((c = s == null ? void 0 : s.replace("<think>", `<div class="${n}">`)) == null ? void 0 : c.replace("</think>", `
619
+ </div>`)) || "";
620
+ });
621
+ N(this, "parseTypingContent", (s) => {
622
+ const { typingOptions: a } = this.getProps(), { typingIndex: n } = this.getStates();
623
+ s = s.slice(0, n) || "";
624
+ const c = { ...G, ...a };
625
+ return c.style === "cursor" ? s += '<span class="mc-typewriter mc-typewriter-cursor">|</span>' : (c.style === "color" || c.style === "gradient") && (s = s.slice(0, -5) + `<span class="mc-typewriter mc-typewriter-${c.style}">${s.slice(-5)}</span>`), s || "";
626
+ });
627
+ N(this, "parseContent", () => {
628
+ const { content: s, thinkOptions: a, enableThink: n } = this.getProps(), { typing: c, isTyping: d } = this.getStates();
629
+ let r = s || "";
630
+ c && d && (r = this.parseTypingContent(s)), n && (r = this.getThinkContent(s, a)), r = this._adapter.parseContent(r);
631
+ });
632
+ N(this, "typewriterStart", () => {
633
+ var r, g;
634
+ const { typingOptions: s } = this.getProps(), { timer: a } = this.getStates();
635
+ a && clearTimeout(a), this.setState({ isTyping: !0 }), (g = (r = this._adapter).typingStart) == null || g.call(r);
636
+ const n = { ...G, ...s }, c = () => {
637
+ const { typingIndex: m, content: f } = this.getStates();
638
+ let x = n.step || 2;
639
+ Array.isArray(n.step) && (x = n.step[0] + Math.floor(Math.random() * (n.step[1] - n.step[0])));
640
+ let k = m + x;
641
+ if (this.setState({ typingIndex: k }), this.parseContent(), this._adapter.typingEvent(), k >= f.length) {
642
+ this.typewriterEnd(), this.parseContent();
643
+ return;
644
+ }
645
+ let L = setTimeout(
646
+ c,
647
+ typeof n.interval == "number" ? n.interval : 50
648
+ );
649
+ this.setState({
650
+ timer: L
651
+ });
652
+ };
653
+ let d = setTimeout(c);
654
+ this.setState({
655
+ timer: d
656
+ });
657
+ });
658
+ }
659
+ }
660
+ function ut({
661
+ props: o,
662
+ emit: t
663
+ }) {
664
+ const { t: s } = pe(), n = {
665
+ ...ct(),
666
+ getProps: () => o,
667
+ getProp: (d) => o[d],
668
+ getStates: () => ({}),
669
+ getState: (d) => {
670
+ },
671
+ setState: (d, r) => {
672
+ },
673
+ locale: (d, r) => s(d, r),
674
+ typingStart: () => t("typingStart"),
675
+ typingEnd: () => t("typingEnd"),
676
+ typingEvent: () => t("typingEvent"),
677
+ parseContent: (d) => {
678
+ }
679
+ // todo
680
+ }, { foundation: c } = dt({
681
+ adapter: n,
682
+ foundationClass: gt
683
+ });
684
+ return {
685
+ foundation: c
686
+ };
687
+ }
688
+ const pt = /* @__PURE__ */ de({
509
689
  __name: "mdCard",
510
- props: Je,
690
+ props: ot,
511
691
  emits: ["afterMdtInit", "typingStart", "typing", "typingEnd"],
512
- setup(i, { expose: s, emit: r }) {
513
- const a = new de(), n = i, g = r, d = ve();
514
- let l = null;
515
- const c = Ie({
692
+ setup(o, { expose: t, emit: s }) {
693
+ const a = new he(), n = o, c = s, d = ke();
694
+ let r = null;
695
+ const g = je({
516
696
  breaks: !0,
517
697
  linkify: !0,
518
698
  html: !0,
519
- highlight: (e, o) => {
520
- if (o && D.getLanguage(o))
699
+ highlight: (e, l) => {
700
+ if (l && A.getLanguage(l))
521
701
  try {
522
- return D.highlight(e, { language: o }).value;
702
+ return A.highlight(e, { language: l }).value;
523
703
  } catch {
524
704
  }
525
705
  return "";
526
706
  },
527
707
  ...n.mdOptions
528
- }), h = x(0), w = x(!1), E = x(), N = () => {
529
- var m;
708
+ }), { foundation: m } = ut({
709
+ props: n,
710
+ emit: c
711
+ }), f = D(0), x = D(!1), k = D(), L = () => {
530
712
  let e = n.content || "";
531
- if (n.typing && w.value) {
532
- e = n.content.slice(0, h.value) || "";
533
- const p = { ...oe, ...n == null ? void 0 : n.typingOptions };
534
- p.style === "cursor" ? e += '<span class="mc-typewriter mc-typewriter-cursor">|</span>' : (p.style === "color" || p.style === "gradient") && (e = e.slice(0, -5) + `<span class="mc-typewriter mc-typewriter-${p.style}">${e.slice(-5)}</span>`);
535
- }
536
- if (n.enableThink) {
537
- const p = ((m = n.thinkOptions) == null ? void 0 : m.customClass) || "mc-think-block";
538
- e = (e == null ? void 0 : e.replace("<think>", `<div class="${p}">`).replace("</think>", "</div>")) || "";
713
+ if (n.typing && x.value) {
714
+ e = n.content.slice(0, f.value) || "";
715
+ const h = { ...G, ...n == null ? void 0 : n.typingOptions };
716
+ h.style === "cursor" ? e += '<span class="mc-typewriter mc-typewriter-cursor">|</span>' : (h.style === "color" || h.style === "gradient") && (e = e.slice(0, -5) + `<span class="mc-typewriter mc-typewriter-${h.style}">${e.slice(-5)}</span>`);
539
717
  }
540
- const o = c.parse(e, {}), u = ue(o), y = P(u);
541
- E.value = f(A, y);
542
- }, P = (e) => e.map((o) => I(o)), I = (e) => {
543
- var o, u;
718
+ n.enableThink && (e = m.getThinkContent(e, n.thinkOptions));
719
+ const l = g.parse(e, {}), u = ye(l), p = _(u);
720
+ k.value = y(j, p);
721
+ }, _ = (e) => e.map((l) => S(l)), S = (e) => {
722
+ var l;
544
723
  if (e.nodeType === "html_inline" || e.nodeType === "html_block") {
545
- const y = z(((o = e.openNode) == null ? void 0 : o.content) || "");
546
- if (!y || y.length === 0)
547
- return f("span", ((u = e.openNode) == null ? void 0 : u.content) || "");
548
- const m = y.map((p) => {
549
- if (typeof p == "string")
550
- return f("span", p);
551
- const S = e.children.map((T) => I(T));
552
- return Array.isArray(p.children) ? p.children = [...p.children, ...S] : p.children = [p.children, ...S].filter((T) => T), p;
724
+ const u = a.filterHtml(((l = e.openNode) == null ? void 0 : l.content) || ""), p = Y(u);
725
+ if (!p || p.length === 0)
726
+ return y("span", u);
727
+ const h = p.map((w) => {
728
+ if (typeof w == "string")
729
+ return y("span", w);
730
+ const U = e.children.map((b) => S(b));
731
+ return Array.isArray(w.children) ? w.children = [...w.children, ...U] : w.children = [w.children, ...U].filter((b) => b), w;
553
732
  });
554
- return f(A, m);
733
+ return y(j, h);
555
734
  }
556
735
  if (e.nodeType === "inline") {
557
- const y = c.renderer.render([e.openNode], c.options, {}), m = z(y);
558
- return f(A, m);
736
+ const u = g.renderer.render([e.openNode], g.options, {}), p = a.filterHtml(u), h = Y(p);
737
+ return y(j, h);
559
738
  }
560
- return Q(e) ? B(e) : H(e);
561
- }, Q = (e) => "type" in e && "content" in e, B = (e) => {
739
+ return m.isToken(e) ? P(e) : X(e);
740
+ }, P = (e) => {
562
741
  if (e.type === "text")
563
742
  return e.content;
564
743
  if (e.type === "inline")
565
- return G(e);
744
+ return $(e);
566
745
  if (e.type === "fence")
567
- return U(e);
746
+ return H(e);
568
747
  if (e.type === "softbreak")
569
- return c.options.breaks ? f("br") : `
748
+ return g.options.breaks ? y("br") : `
570
749
  `;
571
- if (e.type === "html_block" || e.type === "html_inline")
572
- return e.type === "html_block" ? f("div", { innerHTML: e.content }) : f("span", { innerHTML: e.content });
750
+ if (e.type === "html_block" || e.type === "html_inline") {
751
+ const l = a.filterHtml(e.content);
752
+ return e.type === "html_block" ? y("div", { innerHTML: l }) : y("span", { innerHTML: l });
753
+ }
573
754
  if (e.type === "math_block" && e.markup === "$$") {
574
- const o = c.renderer.render([e], c.options, {}), u = z(o);
575
- return f(A, u);
755
+ const l = g.renderer.render([e], g.options, {}), u = a.filterHtml(l), p = Y(u);
756
+ return y(j, p);
576
757
  }
577
758
  if (e.tag) {
578
- const o = Y(e.tag) ? e.tag : "div", u = j(e.attrs || []);
579
- return f(o, { ...u, key: e.vNodeKey }, e.content);
759
+ const l = F(e.tag) ? e.tag : "div", u = B(e.attrs || []);
760
+ return y(l, { ...u, key: e.vNodeKey }, e.content);
580
761
  }
581
762
  return e.content;
582
- }, G = (e) => {
583
- const o = c.renderer.render([e], c.options, {}), u = z(o);
584
- return f(A, u);
585
- }, H = (e) => {
586
- var m, p, S, T, J, q, ee, te, se;
587
- let o = "div";
588
- (m = e.openNode) != null && m.tag && Y((p = e.openNode) == null ? void 0 : p.tag) && (o = (S = e.openNode) == null ? void 0 : S.tag);
589
- const u = j(((T = e.openNode) == null ? void 0 : T.attrs) || []);
590
- if (((J = e.openNode) == null ? void 0 : J.type) === "fence")
591
- return U(e.openNode);
592
- if ((q = e.openNode) != null && q.tag) {
593
- let _ = Y((ee = e.openNode) == null ? void 0 : ee.tag) ? (te = e.openNode) == null ? void 0 : te.tag : "div";
594
- const me = e.children.map((ie) => I(ie)), pe = j(((se = e.openNode) == null ? void 0 : se.attrs) || []), ne = f(_, { ...pe, key: e.vNodeKey }, me);
595
- return _ === "table" ? f("div", { className: "mc-table-container", key: `${e.vNodeKey}-table-container` }, [ne]) : ne;
763
+ }, $ = (e) => {
764
+ const l = g.renderer.render([e], g.options, {}), u = a.filterHtml(l), p = Y(u);
765
+ return y(j, p);
766
+ }, X = (e) => {
767
+ var h, w, U, b, se, ne, ie, oe, re;
768
+ let l = "div";
769
+ (h = e.openNode) != null && h.tag && F((w = e.openNode) == null ? void 0 : w.tag) && (l = (U = e.openNode) == null ? void 0 : U.tag);
770
+ const u = B(((b = e.openNode) == null ? void 0 : b.attrs) || []);
771
+ if (((se = e.openNode) == null ? void 0 : se.type) === "fence")
772
+ return H(e.openNode);
773
+ if ((ne = e.openNode) != null && ne.tag) {
774
+ let Z = F((ie = e.openNode) == null ? void 0 : ie.tag) ? (oe = e.openNode) == null ? void 0 : oe.tag : "div";
775
+ const Ce = e.children.map((le) => S(le)), Me = B(((re = e.openNode) == null ? void 0 : re.attrs) || []), ae = y(Z, { ...Me, key: e.vNodeKey }, Ce);
776
+ return Z === "table" ? y("div", { className: "mc-table-container", key: `${e.vNodeKey}-table-container` }, [ae]) : ae;
596
777
  }
597
- const y = e.children.map((_) => I(_));
598
- return f(o, { ...u, key: e.vNodeKey }, y);
599
- }, U = (e) => {
600
- var y;
601
- const o = ((y = e.info) == null ? void 0 : y.replace(/<span\b[^>]*>/i, "").replace("</span>", "")) || "", u = e.content;
602
- return F(o, u, e.tokenIndex);
603
- }, j = (e) => e.reduce((o, [u, y]) => (o[u] = y, o), {});
604
- k(
778
+ const p = e.children.map((Z) => S(Z));
779
+ return y(l, { ...u, key: e.vNodeKey }, p);
780
+ }, H = (e) => {
781
+ var p;
782
+ const l = ((p = e.info) == null ? void 0 : p.replace(/<span\b[^>]*>/i, "").replace("</span>", "")) || "", u = e.content;
783
+ return R(l, u, e.tokenIndex);
784
+ }, B = (e) => e.reduce((l, [u, p]) => (l[u] = p, l), {});
785
+ E(
605
786
  () => {
606
787
  var e;
607
788
  return [n.enableThink, (e = n.thinkOptions) == null ? void 0 : e.customClass, n.theme];
608
789
  },
609
790
  () => {
610
- N();
791
+ L();
611
792
  }
612
793
  );
613
- const F = (e, o, u) => {
614
- const y = {
794
+ const R = (e, l, u) => {
795
+ const p = {
615
796
  actions: d.actions ? () => {
616
- var m;
617
- return ((m = d.actions) == null ? void 0 : m.call(d, { codeBlockData: { code: o, language: e } })) || null;
797
+ var h;
798
+ return ((h = d.actions) == null ? void 0 : h.call(d, { codeBlockData: { code: l, language: e } })) || null;
618
799
  } : void 0,
619
800
  header: d.header ? () => {
620
- var m;
621
- return ((m = d.header) == null ? void 0 : m.call(d, { codeBlockData: { code: o, language: e } })) || null;
801
+ var h;
802
+ return ((h = d.header) == null ? void 0 : h.call(d, { codeBlockData: { code: l, language: e } })) || null;
622
803
  } : void 0,
623
804
  content: d.content ? () => {
624
- var m;
625
- return ((m = d.content) == null ? void 0 : m.call(d, { codeBlockData: { code: o, language: e } })) || null;
805
+ var h;
806
+ return ((h = d.content) == null ? void 0 : h.call(d, { codeBlockData: { code: l, language: e } })) || null;
626
807
  } : void 0
627
808
  };
628
- return f(
629
- Ve,
809
+ return y(
810
+ it,
630
811
  {
631
812
  language: e,
632
- code: o,
813
+ code: l,
633
814
  blockIndex: u,
634
815
  theme: n.theme,
635
816
  enableMermaid: n.enableMermaid,
636
817
  mermaidConfig: n.mermaidConfig,
637
818
  key: `code-block-${u}`
638
819
  },
639
- y
820
+ p
640
821
  );
641
- }, $ = () => {
642
- clearTimeout(l), w.value = !0, g("typingStart");
643
- const e = { ...oe, ...n == null ? void 0 : n.typingOptions }, o = () => {
822
+ }, K = () => {
823
+ clearTimeout(r), x.value = !0, c("typingStart");
824
+ const e = { ...G, ...n == null ? void 0 : n.typingOptions }, l = () => {
644
825
  let u = e.step;
645
- if (Array.isArray(e.step) && (u = e.step[0] + Math.floor(Math.random() * (e.step[1] - e.step[0]))), h.value += u, N(), g("typing"), h.value >= n.content.length) {
646
- X(), N();
826
+ if (Array.isArray(e.step) && (u = e.step[0] + Math.floor(Math.random() * (e.step[1] - e.step[0]))), f.value += u, L(), c("typing"), f.value >= n.content.length) {
827
+ V(), L();
647
828
  return;
648
829
  }
649
- l = setTimeout(o, e.interval);
830
+ r = setTimeout(l, e.interval);
650
831
  };
651
- l = setTimeout(o);
832
+ r = setTimeout(l);
652
833
  };
653
- k(
834
+ E(
654
835
  () => n.content,
655
- (e, o) => {
836
+ (e, l) => {
656
837
  if (!n.typing) {
657
- h.value = (e == null ? void 0 : e.length) || 0, N();
838
+ f.value = (e == null ? void 0 : e.length) || 0, L();
658
839
  return;
659
840
  }
660
- e.indexOf(o) === -1 && (h.value = 0), Z(() => $());
841
+ e.indexOf(l) === -1 && (f.value = 0), W(() => K());
661
842
  },
662
843
  { immediate: !0 }
663
844
  );
664
- const X = () => {
665
- w.value = !1, g("typingEnd");
845
+ const V = () => {
846
+ x.value = !1, c("typingEnd");
666
847
  };
667
- k(
848
+ E(
668
849
  () => n.customXssRules,
669
850
  (e) => {
670
- a.setCustomXssRules(e), N();
851
+ a.setCustomXssRules(e), L();
671
852
  },
672
- { deep: !1 }
673
- ), k(
853
+ { deep: !1, immediate: !0 }
854
+ ), E(
674
855
  () => n.mdPlugins,
675
856
  (e) => {
676
- a.setMdPlugins(e, c), N();
857
+ a.setMdPlugins(e, g), L();
677
858
  },
678
859
  { immediate: !0, deep: !1 }
679
860
  );
680
- const t = W(() => n.theme === "dark" ? "mc-markdown-render-dark" : "mc-markdown-render-light");
681
- return ce(() => {
682
- g("afterMdtInit", c);
683
- }), s({ mdt: c }), (e, o) => (C(), v(
684
- A,
861
+ const i = Q(() => n.theme === "dark" ? "mc-markdown-render-dark" : "mc-markdown-render-light");
862
+ return ge(() => {
863
+ c("afterMdtInit", g);
864
+ }), t({ mdt: g }), (e, l) => (M(), I(
865
+ j,
685
866
  null,
686
867
  [
687
- M(
868
+ C(
688
869
  "div",
689
870
  {
690
- class: b(["mc-markdown-render", t.value])
871
+ class: O(["mc-markdown-render", i.value])
691
872
  },
692
873
  [
693
- (C(), Le(Ne(E.value)))
874
+ (M(), Se(be(k.value)))
694
875
  ],
695
876
  2
696
877
  /* CLASS */
697
878
  ),
698
- O("v-if", !0)
879
+ z("v-if", !0)
699
880
  ],
700
881
  64
701
882
  /* STABLE_FRAGMENT */
702
883
  ));
703
884
  }
704
- }), re = /* @__PURE__ */ ge(st, [["__scopeId", "data-v-f0759799"]]);
705
- re.install = (i) => {
706
- i.component("McMarkdownCard", re);
885
+ }), ce = /* @__PURE__ */ me(pt, [["__scopeId", "data-v-8063b2f5"]]);
886
+ ce.install = (o) => {
887
+ o.component("McMarkdownCard", ce);
707
888
  };
708
889
  export {
709
- re as McMarkdownCard
890
+ ce as McMarkdownCard
710
891
  };