@8btc/mditor 0.0.1

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 (663) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +623 -0
  3. package/dist/css/content-theme/ant-design.css +210 -0
  4. package/dist/css/content-theme/dark.css +177 -0
  5. package/dist/css/content-theme/light.css +136 -0
  6. package/dist/css/content-theme/wechat.css +94 -0
  7. package/dist/images/emoji/b3log.png +0 -0
  8. package/dist/images/emoji/chainbook.png +0 -0
  9. package/dist/images/emoji/doge.png +0 -0
  10. package/dist/images/emoji/hacpai.png +0 -0
  11. package/dist/images/emoji/huaji.gif +0 -0
  12. package/dist/images/emoji/latke.png +0 -0
  13. package/dist/images/emoji/liandi.png +0 -0
  14. package/dist/images/emoji/lute.png +0 -0
  15. package/dist/images/emoji/octocat.png +0 -0
  16. package/dist/images/emoji/pipe.png +0 -0
  17. package/dist/images/emoji/siyuan.png +0 -0
  18. package/dist/images/emoji/solo.png +0 -0
  19. package/dist/images/emoji/sym.png +0 -0
  20. package/dist/images/emoji/trollface.png +0 -0
  21. package/dist/images/emoji/vditor.png +0 -0
  22. package/dist/images/emoji/wide.png +0 -0
  23. package/dist/images/emoji/wulian.png +0 -0
  24. package/dist/images/img-loading.svg +1 -0
  25. package/dist/images/logo.png +0 -0
  26. package/dist/index.css +1919 -0
  27. package/dist/index.d.ts +82 -0
  28. package/dist/index.js +18263 -0
  29. package/dist/index.min.js +1 -0
  30. package/dist/js/abcjs/abcjs_basic.min.js +3 -0
  31. package/dist/js/color-picker/color-picker.min.css +6 -0
  32. package/dist/js/color-picker/color-picker.nano.css +2 -0
  33. package/dist/js/color-picker/color-picker.nano.js +3 -0
  34. package/dist/js/docx/docx.min.js +1 -0
  35. package/dist/js/echarts/echarts.min.js +45 -0
  36. package/dist/js/flowchart.js/flowchart.min.js +8 -0
  37. package/dist/js/graphviz/full.render.js +90 -0
  38. package/dist/js/graphviz/viz.js +333 -0
  39. package/dist/js/highlight.js/LICENSE +29 -0
  40. package/dist/js/highlight.js/highlight.min.js +3835 -0
  41. package/dist/js/highlight.js/styles/a11y-dark.min.css +7 -0
  42. package/dist/js/highlight.js/styles/a11y-light.min.css +7 -0
  43. package/dist/js/highlight.js/styles/agate.min.css +20 -0
  44. package/dist/js/highlight.js/styles/an-old-hope.min.css +9 -0
  45. package/dist/js/highlight.js/styles/androidstudio.min.css +1 -0
  46. package/dist/js/highlight.js/styles/ant-design.min.css +84 -0
  47. package/dist/js/highlight.js/styles/arduino-light.min.css +1 -0
  48. package/dist/js/highlight.js/styles/arta.min.css +1 -0
  49. package/dist/js/highlight.js/styles/ascetic.min.css +1 -0
  50. package/dist/js/highlight.js/styles/atom-one-dark-reasonable.min.css +1 -0
  51. package/dist/js/highlight.js/styles/atom-one-dark.min.css +1 -0
  52. package/dist/js/highlight.js/styles/atom-one-light.min.css +1 -0
  53. package/dist/js/highlight.js/styles/base16/3024.min.css +7 -0
  54. package/dist/js/highlight.js/styles/base16/apathy.min.css +7 -0
  55. package/dist/js/highlight.js/styles/base16/apprentice.min.css +7 -0
  56. package/dist/js/highlight.js/styles/base16/ashes.min.css +7 -0
  57. package/dist/js/highlight.js/styles/base16/atelier-cave-light.min.css +7 -0
  58. package/dist/js/highlight.js/styles/base16/atelier-cave.min.css +7 -0
  59. package/dist/js/highlight.js/styles/base16/atelier-dune-light.min.css +7 -0
  60. package/dist/js/highlight.js/styles/base16/atelier-dune.min.css +7 -0
  61. package/dist/js/highlight.js/styles/base16/atelier-estuary-light.min.css +7 -0
  62. package/dist/js/highlight.js/styles/base16/atelier-estuary.min.css +7 -0
  63. package/dist/js/highlight.js/styles/base16/atelier-forest-light.min.css +7 -0
  64. package/dist/js/highlight.js/styles/base16/atelier-forest.min.css +7 -0
  65. package/dist/js/highlight.js/styles/base16/atelier-heath-light.min.css +7 -0
  66. package/dist/js/highlight.js/styles/base16/atelier-heath.min.css +7 -0
  67. package/dist/js/highlight.js/styles/base16/atelier-lakeside-light.min.css +7 -0
  68. package/dist/js/highlight.js/styles/base16/atelier-lakeside.min.css +7 -0
  69. package/dist/js/highlight.js/styles/base16/atelier-plateau-light.min.css +7 -0
  70. package/dist/js/highlight.js/styles/base16/atelier-plateau.min.css +7 -0
  71. package/dist/js/highlight.js/styles/base16/atelier-savanna-light.min.css +7 -0
  72. package/dist/js/highlight.js/styles/base16/atelier-savanna.min.css +7 -0
  73. package/dist/js/highlight.js/styles/base16/atelier-seaside-light.min.css +7 -0
  74. package/dist/js/highlight.js/styles/base16/atelier-seaside.min.css +7 -0
  75. package/dist/js/highlight.js/styles/base16/atelier-sulphurpool-light.min.css +7 -0
  76. package/dist/js/highlight.js/styles/base16/atelier-sulphurpool.min.css +7 -0
  77. package/dist/js/highlight.js/styles/base16/atlas.min.css +7 -0
  78. package/dist/js/highlight.js/styles/base16/bespin.min.css +7 -0
  79. package/dist/js/highlight.js/styles/base16/black-metal-bathory.min.css +7 -0
  80. package/dist/js/highlight.js/styles/base16/black-metal-burzum.min.css +7 -0
  81. package/dist/js/highlight.js/styles/base16/black-metal-dark-funeral.min.css +7 -0
  82. package/dist/js/highlight.js/styles/base16/black-metal-gorgoroth.min.css +7 -0
  83. package/dist/js/highlight.js/styles/base16/black-metal-immortal.min.css +7 -0
  84. package/dist/js/highlight.js/styles/base16/black-metal-khold.min.css +7 -0
  85. package/dist/js/highlight.js/styles/base16/black-metal-marduk.min.css +7 -0
  86. package/dist/js/highlight.js/styles/base16/black-metal-mayhem.min.css +7 -0
  87. package/dist/js/highlight.js/styles/base16/black-metal-nile.min.css +7 -0
  88. package/dist/js/highlight.js/styles/base16/black-metal-venom.min.css +7 -0
  89. package/dist/js/highlight.js/styles/base16/black-metal.min.css +7 -0
  90. package/dist/js/highlight.js/styles/base16/brewer.min.css +7 -0
  91. package/dist/js/highlight.js/styles/base16/bright.min.css +7 -0
  92. package/dist/js/highlight.js/styles/base16/brogrammer.min.css +7 -0
  93. package/dist/js/highlight.js/styles/base16/brush-trees-dark.min.css +7 -0
  94. package/dist/js/highlight.js/styles/base16/brush-trees.min.css +7 -0
  95. package/dist/js/highlight.js/styles/base16/chalk.min.css +7 -0
  96. package/dist/js/highlight.js/styles/base16/circus.min.css +7 -0
  97. package/dist/js/highlight.js/styles/base16/classic-dark.min.css +7 -0
  98. package/dist/js/highlight.js/styles/base16/classic-light.min.css +7 -0
  99. package/dist/js/highlight.js/styles/base16/codeschool.min.css +7 -0
  100. package/dist/js/highlight.js/styles/base16/colors.min.css +7 -0
  101. package/dist/js/highlight.js/styles/base16/cupcake.min.css +7 -0
  102. package/dist/js/highlight.js/styles/base16/cupertino.min.css +7 -0
  103. package/dist/js/highlight.js/styles/base16/danqing.min.css +7 -0
  104. package/dist/js/highlight.js/styles/base16/darcula.min.css +7 -0
  105. package/dist/js/highlight.js/styles/base16/dark-violet.min.css +7 -0
  106. package/dist/js/highlight.js/styles/base16/darkmoss.min.css +7 -0
  107. package/dist/js/highlight.js/styles/base16/darktooth.min.css +7 -0
  108. package/dist/js/highlight.js/styles/base16/decaf.min.css +7 -0
  109. package/dist/js/highlight.js/styles/base16/default-dark.min.css +7 -0
  110. package/dist/js/highlight.js/styles/base16/default-light.min.css +7 -0
  111. package/dist/js/highlight.js/styles/base16/dirtysea.min.css +7 -0
  112. package/dist/js/highlight.js/styles/base16/dracula.min.css +7 -0
  113. package/dist/js/highlight.js/styles/base16/edge-dark.min.css +7 -0
  114. package/dist/js/highlight.js/styles/base16/edge-light.min.css +7 -0
  115. package/dist/js/highlight.js/styles/base16/eighties.min.css +7 -0
  116. package/dist/js/highlight.js/styles/base16/embers.min.css +7 -0
  117. package/dist/js/highlight.js/styles/base16/equilibrium-dark.min.css +7 -0
  118. package/dist/js/highlight.js/styles/base16/equilibrium-gray-dark.min.css +7 -0
  119. package/dist/js/highlight.js/styles/base16/equilibrium-gray-light.min.css +7 -0
  120. package/dist/js/highlight.js/styles/base16/equilibrium-light.min.css +7 -0
  121. package/dist/js/highlight.js/styles/base16/espresso.min.css +7 -0
  122. package/dist/js/highlight.js/styles/base16/eva-dim.min.css +7 -0
  123. package/dist/js/highlight.js/styles/base16/eva.min.css +7 -0
  124. package/dist/js/highlight.js/styles/base16/flat.min.css +7 -0
  125. package/dist/js/highlight.js/styles/base16/framer.min.css +7 -0
  126. package/dist/js/highlight.js/styles/base16/fruit-soda.min.css +7 -0
  127. package/dist/js/highlight.js/styles/base16/gigavolt.min.css +7 -0
  128. package/dist/js/highlight.js/styles/base16/github.min.css +7 -0
  129. package/dist/js/highlight.js/styles/base16/google-dark.min.css +7 -0
  130. package/dist/js/highlight.js/styles/base16/google-light.min.css +7 -0
  131. package/dist/js/highlight.js/styles/base16/grayscale-dark.min.css +7 -0
  132. package/dist/js/highlight.js/styles/base16/grayscale-light.min.css +7 -0
  133. package/dist/js/highlight.js/styles/base16/green-screen.min.css +7 -0
  134. package/dist/js/highlight.js/styles/base16/gruvbox-dark-hard.min.css +7 -0
  135. package/dist/js/highlight.js/styles/base16/gruvbox-dark-medium.min.css +7 -0
  136. package/dist/js/highlight.js/styles/base16/gruvbox-dark-pale.min.css +7 -0
  137. package/dist/js/highlight.js/styles/base16/gruvbox-dark-soft.min.css +7 -0
  138. package/dist/js/highlight.js/styles/base16/gruvbox-light-hard.min.css +7 -0
  139. package/dist/js/highlight.js/styles/base16/gruvbox-light-medium.min.css +7 -0
  140. package/dist/js/highlight.js/styles/base16/gruvbox-light-soft.min.css +7 -0
  141. package/dist/js/highlight.js/styles/base16/hardcore.min.css +7 -0
  142. package/dist/js/highlight.js/styles/base16/harmonic16-dark.min.css +7 -0
  143. package/dist/js/highlight.js/styles/base16/harmonic16-light.min.css +7 -0
  144. package/dist/js/highlight.js/styles/base16/heetch-dark.min.css +7 -0
  145. package/dist/js/highlight.js/styles/base16/heetch-light.min.css +7 -0
  146. package/dist/js/highlight.js/styles/base16/helios.min.css +7 -0
  147. package/dist/js/highlight.js/styles/base16/hopscotch.min.css +7 -0
  148. package/dist/js/highlight.js/styles/base16/horizon-dark.min.css +7 -0
  149. package/dist/js/highlight.js/styles/base16/horizon-light.min.css +7 -0
  150. package/dist/js/highlight.js/styles/base16/humanoid-dark.min.css +7 -0
  151. package/dist/js/highlight.js/styles/base16/humanoid-light.min.css +7 -0
  152. package/dist/js/highlight.js/styles/base16/ia-dark.min.css +7 -0
  153. package/dist/js/highlight.js/styles/base16/ia-light.min.css +7 -0
  154. package/dist/js/highlight.js/styles/base16/icy-dark.min.css +7 -0
  155. package/dist/js/highlight.js/styles/base16/ir-black.min.css +7 -0
  156. package/dist/js/highlight.js/styles/base16/isotope.min.css +7 -0
  157. package/dist/js/highlight.js/styles/base16/kimber.min.css +7 -0
  158. package/dist/js/highlight.js/styles/base16/london-tube.min.css +7 -0
  159. package/dist/js/highlight.js/styles/base16/macintosh.min.css +7 -0
  160. package/dist/js/highlight.js/styles/base16/marrakesh.min.css +7 -0
  161. package/dist/js/highlight.js/styles/base16/materia.min.css +7 -0
  162. package/dist/js/highlight.js/styles/base16/material-darker.min.css +7 -0
  163. package/dist/js/highlight.js/styles/base16/material-lighter.min.css +7 -0
  164. package/dist/js/highlight.js/styles/base16/material-palenight.min.css +7 -0
  165. package/dist/js/highlight.js/styles/base16/material-vivid.min.css +7 -0
  166. package/dist/js/highlight.js/styles/base16/material.min.css +7 -0
  167. package/dist/js/highlight.js/styles/base16/mellow-purple.min.css +7 -0
  168. package/dist/js/highlight.js/styles/base16/mexico-light.min.css +7 -0
  169. package/dist/js/highlight.js/styles/base16/mocha.min.css +7 -0
  170. package/dist/js/highlight.js/styles/base16/monokai.min.css +7 -0
  171. package/dist/js/highlight.js/styles/base16/nebula.min.css +7 -0
  172. package/dist/js/highlight.js/styles/base16/nord.min.css +7 -0
  173. package/dist/js/highlight.js/styles/base16/nova.min.css +7 -0
  174. package/dist/js/highlight.js/styles/base16/ocean.min.css +7 -0
  175. package/dist/js/highlight.js/styles/base16/oceanicnext.min.css +7 -0
  176. package/dist/js/highlight.js/styles/base16/one-light.min.css +7 -0
  177. package/dist/js/highlight.js/styles/base16/onedark.min.css +7 -0
  178. package/dist/js/highlight.js/styles/base16/outrun-dark.min.css +7 -0
  179. package/dist/js/highlight.js/styles/base16/papercolor-dark.min.css +7 -0
  180. package/dist/js/highlight.js/styles/base16/papercolor-light.min.css +7 -0
  181. package/dist/js/highlight.js/styles/base16/paraiso.min.css +7 -0
  182. package/dist/js/highlight.js/styles/base16/pasque.min.css +7 -0
  183. package/dist/js/highlight.js/styles/base16/phd.min.css +7 -0
  184. package/dist/js/highlight.js/styles/base16/pico.min.css +7 -0
  185. package/dist/js/highlight.js/styles/base16/pop.min.css +7 -0
  186. package/dist/js/highlight.js/styles/base16/porple.min.css +7 -0
  187. package/dist/js/highlight.js/styles/base16/qualia.min.css +7 -0
  188. package/dist/js/highlight.js/styles/base16/railscasts.min.css +7 -0
  189. package/dist/js/highlight.js/styles/base16/rebecca.min.css +7 -0
  190. package/dist/js/highlight.js/styles/base16/ros-pine-dawn.min.css +7 -0
  191. package/dist/js/highlight.js/styles/base16/ros-pine-moon.min.css +7 -0
  192. package/dist/js/highlight.js/styles/base16/ros-pine.min.css +7 -0
  193. package/dist/js/highlight.js/styles/base16/sagelight.min.css +7 -0
  194. package/dist/js/highlight.js/styles/base16/sandcastle.min.css +7 -0
  195. package/dist/js/highlight.js/styles/base16/seti-ui.min.css +7 -0
  196. package/dist/js/highlight.js/styles/base16/shapeshifter.min.css +7 -0
  197. package/dist/js/highlight.js/styles/base16/silk-dark.min.css +7 -0
  198. package/dist/js/highlight.js/styles/base16/silk-light.min.css +7 -0
  199. package/dist/js/highlight.js/styles/base16/snazzy.min.css +7 -0
  200. package/dist/js/highlight.js/styles/base16/solar-flare-light.min.css +7 -0
  201. package/dist/js/highlight.js/styles/base16/solar-flare.min.css +7 -0
  202. package/dist/js/highlight.js/styles/base16/solarized-dark.min.css +7 -0
  203. package/dist/js/highlight.js/styles/base16/solarized-light.min.css +7 -0
  204. package/dist/js/highlight.js/styles/base16/spacemacs.min.css +7 -0
  205. package/dist/js/highlight.js/styles/base16/summercamp.min.css +7 -0
  206. package/dist/js/highlight.js/styles/base16/summerfruit-dark.min.css +7 -0
  207. package/dist/js/highlight.js/styles/base16/summerfruit-light.min.css +7 -0
  208. package/dist/js/highlight.js/styles/base16/synth-midnight-terminal-dark.min.css +7 -0
  209. package/dist/js/highlight.js/styles/base16/synth-midnight-terminal-light.min.css +7 -0
  210. package/dist/js/highlight.js/styles/base16/tango.min.css +7 -0
  211. package/dist/js/highlight.js/styles/base16/tender.min.css +7 -0
  212. package/dist/js/highlight.js/styles/base16/tomorrow-night.min.css +7 -0
  213. package/dist/js/highlight.js/styles/base16/tomorrow.min.css +7 -0
  214. package/dist/js/highlight.js/styles/base16/twilight.min.css +7 -0
  215. package/dist/js/highlight.js/styles/base16/unikitty-dark.min.css +7 -0
  216. package/dist/js/highlight.js/styles/base16/unikitty-light.min.css +7 -0
  217. package/dist/js/highlight.js/styles/base16/vulcan.min.css +7 -0
  218. package/dist/js/highlight.js/styles/base16/windows-10-light.min.css +7 -0
  219. package/dist/js/highlight.js/styles/base16/windows-10.min.css +7 -0
  220. package/dist/js/highlight.js/styles/base16/windows-95-light.min.css +7 -0
  221. package/dist/js/highlight.js/styles/base16/windows-95.min.css +7 -0
  222. package/dist/js/highlight.js/styles/base16/windows-high-contrast-light.min.css +7 -0
  223. package/dist/js/highlight.js/styles/base16/windows-high-contrast.min.css +7 -0
  224. package/dist/js/highlight.js/styles/base16/windows-nt-light.min.css +7 -0
  225. package/dist/js/highlight.js/styles/base16/windows-nt.min.css +7 -0
  226. package/dist/js/highlight.js/styles/base16/woodland.min.css +7 -0
  227. package/dist/js/highlight.js/styles/base16/xcode-dusk.min.css +7 -0
  228. package/dist/js/highlight.js/styles/base16/zenburn.min.css +7 -0
  229. package/dist/js/highlight.js/styles/brown-paper.min.css +1 -0
  230. package/dist/js/highlight.js/styles/brown-papersq.png +0 -0
  231. package/dist/js/highlight.js/styles/codepen-embed.min.css +1 -0
  232. package/dist/js/highlight.js/styles/color-brewer.min.css +1 -0
  233. package/dist/js/highlight.js/styles/dark.min.css +1 -0
  234. package/dist/js/highlight.js/styles/default.min.css +9 -0
  235. package/dist/js/highlight.js/styles/devibeans.min.css +7 -0
  236. package/dist/js/highlight.js/styles/docco.min.css +1 -0
  237. package/dist/js/highlight.js/styles/far.min.css +1 -0
  238. package/dist/js/highlight.js/styles/felipec.min.css +7 -0
  239. package/dist/js/highlight.js/styles/foundation.min.css +1 -0
  240. package/dist/js/highlight.js/styles/github-dark-dimmed.min.css +9 -0
  241. package/dist/js/highlight.js/styles/github-dark.min.css +10 -0
  242. package/dist/js/highlight.js/styles/github.min.css +10 -0
  243. package/dist/js/highlight.js/styles/gml.min.css +1 -0
  244. package/dist/js/highlight.js/styles/googlecode.min.css +1 -0
  245. package/dist/js/highlight.js/styles/gradient-dark.min.css +1 -0
  246. package/dist/js/highlight.js/styles/gradient-light.min.css +1 -0
  247. package/dist/js/highlight.js/styles/grayscale.min.css +1 -0
  248. package/dist/js/highlight.js/styles/hybrid.min.css +1 -0
  249. package/dist/js/highlight.js/styles/idea.min.css +1 -0
  250. package/dist/js/highlight.js/styles/intellij-light.min.css +1 -0
  251. package/dist/js/highlight.js/styles/ir-black.min.css +1 -0
  252. package/dist/js/highlight.js/styles/isbl-editor-dark.min.css +1 -0
  253. package/dist/js/highlight.js/styles/isbl-editor-light.min.css +1 -0
  254. package/dist/js/highlight.js/styles/kimbie-dark.min.css +1 -0
  255. package/dist/js/highlight.js/styles/kimbie-light.min.css +1 -0
  256. package/dist/js/highlight.js/styles/lightfair.min.css +1 -0
  257. package/dist/js/highlight.js/styles/lioshi.min.css +1 -0
  258. package/dist/js/highlight.js/styles/magula.min.css +1 -0
  259. package/dist/js/highlight.js/styles/mono-blue.min.css +1 -0
  260. package/dist/js/highlight.js/styles/monokai-sublime.min.css +1 -0
  261. package/dist/js/highlight.js/styles/monokai.min.css +1 -0
  262. package/dist/js/highlight.js/styles/night-owl.min.css +1 -0
  263. package/dist/js/highlight.js/styles/nnfx-dark.min.css +10 -0
  264. package/dist/js/highlight.js/styles/nnfx-light.min.css +10 -0
  265. package/dist/js/highlight.js/styles/nord.min.css +1 -0
  266. package/dist/js/highlight.js/styles/obsidian.min.css +1 -0
  267. package/dist/js/highlight.js/styles/panda-syntax-dark.min.css +1 -0
  268. package/dist/js/highlight.js/styles/panda-syntax-light.min.css +1 -0
  269. package/dist/js/highlight.js/styles/paraiso-dark.min.css +1 -0
  270. package/dist/js/highlight.js/styles/paraiso-light.min.css +1 -0
  271. package/dist/js/highlight.js/styles/pojoaque.jpg +0 -0
  272. package/dist/js/highlight.js/styles/pojoaque.min.css +1 -0
  273. package/dist/js/highlight.js/styles/purebasic.min.css +1 -0
  274. package/dist/js/highlight.js/styles/qtcreator-dark.min.css +1 -0
  275. package/dist/js/highlight.js/styles/qtcreator-light.min.css +1 -0
  276. package/dist/js/highlight.js/styles/rainbow.min.css +1 -0
  277. package/dist/js/highlight.js/styles/routeros.min.css +1 -0
  278. package/dist/js/highlight.js/styles/school-book.min.css +1 -0
  279. package/dist/js/highlight.js/styles/shades-of-purple.min.css +1 -0
  280. package/dist/js/highlight.js/styles/srcery.min.css +1 -0
  281. package/dist/js/highlight.js/styles/stackoverflow-dark.min.css +13 -0
  282. package/dist/js/highlight.js/styles/stackoverflow-light.min.css +13 -0
  283. package/dist/js/highlight.js/styles/sunburst.min.css +1 -0
  284. package/dist/js/highlight.js/styles/tokyo-night-dark.min.css +8 -0
  285. package/dist/js/highlight.js/styles/tokyo-night-light.min.css +8 -0
  286. package/dist/js/highlight.js/styles/tomorrow-night-blue.min.css +1 -0
  287. package/dist/js/highlight.js/styles/tomorrow-night-bright.min.css +1 -0
  288. package/dist/js/highlight.js/styles/vs.min.css +1 -0
  289. package/dist/js/highlight.js/styles/vs2015.min.css +1 -0
  290. package/dist/js/highlight.js/styles/xcode.min.css +1 -0
  291. package/dist/js/highlight.js/styles/xt256.min.css +1 -0
  292. package/dist/js/highlight.js/third-languages.js +135 -0
  293. package/dist/js/html2canvas/html2canvas.min.20251104.js +20 -0
  294. package/dist/js/html2canvas/html2canvas.min.js +20 -0
  295. package/dist/js/i18n/de_DE.js +86 -0
  296. package/dist/js/i18n/en_US.js +86 -0
  297. package/dist/js/i18n/es_ES.js +86 -0
  298. package/dist/js/i18n/fr_FR.js +86 -0
  299. package/dist/js/i18n/ja_JP.js +86 -0
  300. package/dist/js/i18n/ko_KR.js +86 -0
  301. package/dist/js/i18n/pt_BR.js +86 -0
  302. package/dist/js/i18n/ru_RU.js +86 -0
  303. package/dist/js/i18n/sv_SE.js +86 -0
  304. package/dist/js/i18n/vi_VN.js +86 -0
  305. package/dist/js/i18n/zh_CN.js +86 -0
  306. package/dist/js/i18n/zh_TW.js +86 -0
  307. package/dist/js/icons/ant.js +174 -0
  308. package/dist/js/icons/material.js +195 -0
  309. package/dist/js/jspdf/jspdf.umd.min.20251104.js +398 -0
  310. package/dist/js/jspdf/jspdf.umd.min.js +398 -0
  311. package/dist/js/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
  312. package/dist/js/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
  313. package/dist/js/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  314. package/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  315. package/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  316. package/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  317. package/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  318. package/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  319. package/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  320. package/dist/js/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  321. package/dist/js/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  322. package/dist/js/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  323. package/dist/js/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  324. package/dist/js/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  325. package/dist/js/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  326. package/dist/js/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
  327. package/dist/js/katex/fonts/KaTeX_Main-Bold.woff +0 -0
  328. package/dist/js/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
  329. package/dist/js/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  330. package/dist/js/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  331. package/dist/js/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  332. package/dist/js/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
  333. package/dist/js/katex/fonts/KaTeX_Main-Italic.woff +0 -0
  334. package/dist/js/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
  335. package/dist/js/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
  336. package/dist/js/katex/fonts/KaTeX_Main-Regular.woff +0 -0
  337. package/dist/js/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
  338. package/dist/js/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  339. package/dist/js/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  340. package/dist/js/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  341. package/dist/js/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
  342. package/dist/js/katex/fonts/KaTeX_Math-Italic.woff +0 -0
  343. package/dist/js/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
  344. package/dist/js/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  345. package/dist/js/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  346. package/dist/js/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  347. package/dist/js/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  348. package/dist/js/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  349. package/dist/js/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  350. package/dist/js/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  351. package/dist/js/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  352. package/dist/js/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  353. package/dist/js/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
  354. package/dist/js/katex/fonts/KaTeX_Script-Regular.woff +0 -0
  355. package/dist/js/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
  356. package/dist/js/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
  357. package/dist/js/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
  358. package/dist/js/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  359. package/dist/js/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
  360. package/dist/js/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
  361. package/dist/js/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  362. package/dist/js/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
  363. package/dist/js/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
  364. package/dist/js/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  365. package/dist/js/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
  366. package/dist/js/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
  367. package/dist/js/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  368. package/dist/js/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  369. package/dist/js/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  370. package/dist/js/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  371. package/dist/js/katex/katex.min.css +1 -0
  372. package/dist/js/katex/katex.min.js +1 -0
  373. package/dist/js/katex/mhchem.min.js +1 -0
  374. package/dist/js/lute/lute.min.js +1 -0
  375. package/dist/js/markmap/katex.min.css +1 -0
  376. package/dist/js/markmap/markmap.min.js +8251 -0
  377. package/dist/js/markmap/prism.css +140 -0
  378. package/dist/js/mathjax/LICENSE +202 -0
  379. package/dist/js/mathjax/a11y/assistive-mml.js +1 -0
  380. package/dist/js/mathjax/a11y/complexity.js +1 -0
  381. package/dist/js/mathjax/a11y/explorer.js +1 -0
  382. package/dist/js/mathjax/a11y/semantic-enrich.js +1 -0
  383. package/dist/js/mathjax/input/asciimath.js +1 -0
  384. package/dist/js/mathjax/input/mml/entities.js +1 -0
  385. package/dist/js/mathjax/input/mml.js +1 -0
  386. package/dist/js/mathjax/input/tex/extensions/action.js +1 -0
  387. package/dist/js/mathjax/input/tex/extensions/all-packages.js +1 -0
  388. package/dist/js/mathjax/input/tex/extensions/ams.js +1 -0
  389. package/dist/js/mathjax/input/tex/extensions/amscd.js +1 -0
  390. package/dist/js/mathjax/input/tex/extensions/autoload.js +1 -0
  391. package/dist/js/mathjax/input/tex/extensions/bbox.js +1 -0
  392. package/dist/js/mathjax/input/tex/extensions/boldsymbol.js +1 -0
  393. package/dist/js/mathjax/input/tex/extensions/braket.js +1 -0
  394. package/dist/js/mathjax/input/tex/extensions/bussproofs.js +1 -0
  395. package/dist/js/mathjax/input/tex/extensions/cancel.js +1 -0
  396. package/dist/js/mathjax/input/tex/extensions/color.js +1 -0
  397. package/dist/js/mathjax/input/tex/extensions/colorV2.js +1 -0
  398. package/dist/js/mathjax/input/tex/extensions/configMacros.js +1 -0
  399. package/dist/js/mathjax/input/tex/extensions/enclose.js +1 -0
  400. package/dist/js/mathjax/input/tex/extensions/extpfeil.js +1 -0
  401. package/dist/js/mathjax/input/tex/extensions/html.js +1 -0
  402. package/dist/js/mathjax/input/tex/extensions/mhchem.js +1 -0
  403. package/dist/js/mathjax/input/tex/extensions/newcommand.js +1 -0
  404. package/dist/js/mathjax/input/tex/extensions/noerrors.js +1 -0
  405. package/dist/js/mathjax/input/tex/extensions/noundefined.js +1 -0
  406. package/dist/js/mathjax/input/tex/extensions/physics.js +1 -0
  407. package/dist/js/mathjax/input/tex/extensions/require.js +1 -0
  408. package/dist/js/mathjax/input/tex/extensions/tagFormat.js +1 -0
  409. package/dist/js/mathjax/input/tex/extensions/textmacros.js +1 -0
  410. package/dist/js/mathjax/input/tex/extensions/unicode.js +1 -0
  411. package/dist/js/mathjax/input/tex/extensions/verb.js +1 -0
  412. package/dist/js/mathjax/input/tex-base.js +1 -0
  413. package/dist/js/mathjax/input/tex-full.js +1 -0
  414. package/dist/js/mathjax/input/tex.js +1 -0
  415. package/dist/js/mathjax/sre/mathmaps/de.js +104 -0
  416. package/dist/js/mathjax/sre/mathmaps/en.js +110 -0
  417. package/dist/js/mathjax/sre/mathmaps/es.js +104 -0
  418. package/dist/js/mathjax/sre/mathmaps/fr.js +104 -0
  419. package/dist/js/mathjax/sre/mathmaps/mathmaps_ie.js +518 -0
  420. package/dist/js/mathjax/sre/mathmaps/nemeth.js +104 -0
  421. package/dist/js/mathjax/sre/sre-node.js +11 -0
  422. package/dist/js/mathjax/sre/sre_browser.js +1633 -0
  423. package/dist/js/mathjax/tex-svg-full.js +1 -0
  424. package/dist/js/mermaid/mermaid.min.js +2694 -0
  425. package/dist/js/plantuml/plantuml-encoder.min.js +1 -0
  426. package/dist/js/smiles-drawer/smiles-drawer.min.js +71 -0
  427. package/dist/method.d.ts +51 -0
  428. package/dist/method.js +4532 -0
  429. package/dist/method.min.js +1 -0
  430. package/dist/ts/constants.d.ts +46 -0
  431. package/dist/ts/devtools/index.d.ts +6 -0
  432. package/dist/ts/export/index.d.ts +4 -0
  433. package/dist/ts/hint/index.d.ts +13 -0
  434. package/dist/ts/ir/expandMarker.d.ts +1 -0
  435. package/dist/ts/ir/highlightToolbarIR.d.ts +1 -0
  436. package/dist/ts/ir/index.d.ts +12 -0
  437. package/dist/ts/ir/input.d.ts +1 -0
  438. package/dist/ts/ir/process.d.ts +8 -0
  439. package/dist/ts/ir/processKeydown.d.ts +1 -0
  440. package/dist/ts/markdown/SMILESRender.d.ts +1 -0
  441. package/dist/ts/markdown/abcRender.d.ts +1 -0
  442. package/dist/ts/markdown/adapterRender.d.ts +51 -0
  443. package/dist/ts/markdown/anchorRender.d.ts +1 -0
  444. package/dist/ts/markdown/chartRender.d.ts +1 -0
  445. package/dist/ts/markdown/codeRender.d.ts +1 -0
  446. package/dist/ts/markdown/flowchartRender.d.ts +1 -0
  447. package/dist/ts/markdown/getHTML.d.ts +1 -0
  448. package/dist/ts/markdown/getMarkdown.d.ts +1 -0
  449. package/dist/ts/markdown/graphvizRender.d.ts +1 -0
  450. package/dist/ts/markdown/highlightRender.d.ts +1 -0
  451. package/dist/ts/markdown/lazyLoadImageRender.d.ts +6 -0
  452. package/dist/ts/markdown/markmapRender.d.ts +1 -0
  453. package/dist/ts/markdown/mathContextMenu.d.ts +17 -0
  454. package/dist/ts/markdown/mathRender.d.ts +19 -0
  455. package/dist/ts/markdown/mediaRender.d.ts +1 -0
  456. package/dist/ts/markdown/mermaidRender.d.ts +1 -0
  457. package/dist/ts/markdown/mindmapRender.d.ts +1 -0
  458. package/dist/ts/markdown/outlineRender.d.ts +1 -0
  459. package/dist/ts/markdown/plantumlRender.d.ts +1 -0
  460. package/dist/ts/markdown/previewRender.d.ts +2 -0
  461. package/dist/ts/markdown/setLute.d.ts +1 -0
  462. package/dist/ts/markdown/speechRender.d.ts +6 -0
  463. package/dist/ts/outline/index.d.ts +6 -0
  464. package/dist/ts/preview/image.d.ts +1 -0
  465. package/dist/ts/preview/index.d.ts +26 -0
  466. package/dist/ts/resize/index.d.ts +5 -0
  467. package/dist/ts/sv/combineFootnote.d.ts +6 -0
  468. package/dist/ts/sv/index.d.ts +12 -0
  469. package/dist/ts/sv/inputEvent.d.ts +1 -0
  470. package/dist/ts/sv/process.d.ts +11 -0
  471. package/dist/ts/sv/processKeydown.d.ts +1 -0
  472. package/dist/ts/tip/index.d.ts +6 -0
  473. package/dist/ts/toolbar/Both.d.ts +4 -0
  474. package/dist/ts/toolbar/Br.d.ts +4 -0
  475. package/dist/ts/toolbar/CodeTheme.d.ts +5 -0
  476. package/dist/ts/toolbar/ContentTheme.d.ts +5 -0
  477. package/dist/ts/toolbar/Counter.d.ts +5 -0
  478. package/dist/ts/toolbar/Custom.d.ts +4 -0
  479. package/dist/ts/toolbar/Devtools.d.ts +4 -0
  480. package/dist/ts/toolbar/Divider.d.ts +4 -0
  481. package/dist/ts/toolbar/EditMode.d.ts +7 -0
  482. package/dist/ts/toolbar/Emoji.d.ts +6 -0
  483. package/dist/ts/toolbar/Export.d.ts +5 -0
  484. package/dist/ts/toolbar/Fullscreen.d.ts +5 -0
  485. package/dist/ts/toolbar/Headings.d.ts +6 -0
  486. package/dist/ts/toolbar/Help.d.ts +4 -0
  487. package/dist/ts/toolbar/Indent.d.ts +4 -0
  488. package/dist/ts/toolbar/Info.d.ts +4 -0
  489. package/dist/ts/toolbar/InsertAfter.d.ts +4 -0
  490. package/dist/ts/toolbar/InsertBefore.d.ts +4 -0
  491. package/dist/ts/toolbar/MenuItem.d.ts +4 -0
  492. package/dist/ts/toolbar/Outdent.d.ts +4 -0
  493. package/dist/ts/toolbar/Outline.d.ts +4 -0
  494. package/dist/ts/toolbar/Preview.d.ts +5 -0
  495. package/dist/ts/toolbar/Record.d.ts +5 -0
  496. package/dist/ts/toolbar/Redo.d.ts +4 -0
  497. package/dist/ts/toolbar/Undo.d.ts +4 -0
  498. package/dist/ts/toolbar/Upload.d.ts +5 -0
  499. package/dist/ts/toolbar/index.d.ts +9 -0
  500. package/dist/ts/toolbar/setToolbar.d.ts +20 -0
  501. package/dist/ts/ui/initUI.d.ts +4 -0
  502. package/dist/ts/ui/setCodeTheme.d.ts +1 -0
  503. package/dist/ts/ui/setContentTheme.d.ts +1 -0
  504. package/dist/ts/ui/setPreviewMode.d.ts +1 -0
  505. package/dist/ts/ui/setTheme.d.ts +6 -0
  506. package/dist/ts/undo/index.d.ts +18 -0
  507. package/dist/ts/upload/getElement.d.ts +1 -0
  508. package/dist/ts/upload/index.d.ts +8 -0
  509. package/dist/ts/upload/setHeaders.d.ts +1 -0
  510. package/dist/ts/util/Options.d.ts +19 -0
  511. package/dist/ts/util/RecordMedia.d.ts +18 -0
  512. package/dist/ts/util/addScript.d.ts +2 -0
  513. package/dist/ts/util/addStyle.d.ts +1 -0
  514. package/dist/ts/util/code160to32.d.ts +1 -0
  515. package/dist/ts/util/compatibility.d.ts +7 -0
  516. package/dist/ts/util/editorCommonEvent.d.ts +13 -0
  517. package/dist/ts/util/fixBrowserBehavior.d.ts +39 -0
  518. package/dist/ts/util/function.d.ts +3 -0
  519. package/dist/ts/util/getSelectText.d.ts +1 -0
  520. package/dist/ts/util/hasClosest.d.ts +9 -0
  521. package/dist/ts/util/hasClosestByHeadings.d.ts +2 -0
  522. package/dist/ts/util/highlightToolbar.d.ts +1 -0
  523. package/dist/ts/util/hotKey.d.ts +1 -0
  524. package/dist/ts/util/log.d.ts +1 -0
  525. package/dist/ts/util/merge.d.ts +1 -0
  526. package/dist/ts/util/processCode.d.ts +2 -0
  527. package/dist/ts/util/selection.d.ts +14 -0
  528. package/dist/ts/util/toc.d.ts +5 -0
  529. package/dist/ts/wysiwyg/afterRenderEvent.d.ts +5 -0
  530. package/dist/ts/wysiwyg/highlightToolbarWYSIWYG.d.ts +9 -0
  531. package/dist/ts/wysiwyg/index.d.ts +27 -0
  532. package/dist/ts/wysiwyg/inlineTag.d.ts +10 -0
  533. package/dist/ts/wysiwyg/input.d.ts +1 -0
  534. package/dist/ts/wysiwyg/processKeydown.d.ts +2 -0
  535. package/dist/ts/wysiwyg/renderDomByMd.d.ts +5 -0
  536. package/dist/ts/wysiwyg/setHeading.d.ts +2 -0
  537. package/dist/ts/wysiwyg/showCode.d.ts +1 -0
  538. package/dist/ts/wysiwyg/toolbarEvent.d.ts +1 -0
  539. package/dist/types/index.d.ts +930 -0
  540. package/package.json +63 -0
  541. package/src/assets/less/_content.less +247 -0
  542. package/src/assets/less/_hint.less +67 -0
  543. package/src/assets/less/_ir.less +282 -0
  544. package/src/assets/less/_line-number.less +30 -0
  545. package/src/assets/less/_math-menu.less +78 -0
  546. package/src/assets/less/_panel.less +110 -0
  547. package/src/assets/less/_reset.less +628 -0
  548. package/src/assets/less/_sv.less +132 -0
  549. package/src/assets/less/_toolbar.less +180 -0
  550. package/src/assets/less/_tooltipped.less +171 -0
  551. package/src/assets/less/_wysiwyg.less +215 -0
  552. package/src/assets/less/index.less +99 -0
  553. package/src/index.ts +641 -0
  554. package/src/method.ts +71 -0
  555. package/src/ts/constants.ts +350 -0
  556. package/src/ts/devtools/index.ts +83 -0
  557. package/src/ts/export/index.ts +84 -0
  558. package/src/ts/hint/index.ts +276 -0
  559. package/src/ts/ir/expandMarker.ts +79 -0
  560. package/src/ts/ir/highlightToolbarIR.ts +97 -0
  561. package/src/ts/ir/index.ts +268 -0
  562. package/src/ts/ir/input.ts +250 -0
  563. package/src/ts/ir/process.ts +222 -0
  564. package/src/ts/ir/processKeydown.ts +238 -0
  565. package/src/ts/markdown/SMILESRender.ts +29 -0
  566. package/src/ts/markdown/abcRender.ts +27 -0
  567. package/src/ts/markdown/adapterRender.ts +96 -0
  568. package/src/ts/markdown/anchorRender.ts +19 -0
  569. package/src/ts/markdown/chartRender.ts +1153 -0
  570. package/src/ts/markdown/codeRender.ts +60 -0
  571. package/src/ts/markdown/flowchartRender.ts +25 -0
  572. package/src/ts/markdown/getHTML.ts +11 -0
  573. package/src/ts/markdown/getMarkdown.ts +12 -0
  574. package/src/ts/markdown/graphvizRender.ts +49 -0
  575. package/src/ts/markdown/highlightRender.ts +94 -0
  576. package/src/ts/markdown/lazyLoadImageRender.ts +56 -0
  577. package/src/ts/markdown/markmapRender.ts +56 -0
  578. package/src/ts/markdown/mathContextMenu.ts +423 -0
  579. package/src/ts/markdown/mathRender.ts +281 -0
  580. package/src/ts/markdown/mediaRender.ts +105 -0
  581. package/src/ts/markdown/mermaidRender.ts +60 -0
  582. package/src/ts/markdown/mindmapRender.ts +74 -0
  583. package/src/ts/markdown/outlineRender.ts +110 -0
  584. package/src/ts/markdown/plantumlRender.ts +32 -0
  585. package/src/ts/markdown/previewRender.ts +171 -0
  586. package/src/ts/markdown/setLute.ts +26 -0
  587. package/src/ts/markdown/speechRender.ts +107 -0
  588. package/src/ts/outline/index.ts +45 -0
  589. package/src/ts/preview/image.ts +50 -0
  590. package/src/ts/preview/index.ts +299 -0
  591. package/src/ts/resize/index.ts +57 -0
  592. package/src/ts/sv/combineFootnote.ts +27 -0
  593. package/src/ts/sv/index.ts +128 -0
  594. package/src/ts/sv/inputEvent.ts +188 -0
  595. package/src/ts/sv/process.ts +215 -0
  596. package/src/ts/sv/processKeydown.ts +202 -0
  597. package/src/ts/tip/index.ts +39 -0
  598. package/src/ts/toolbar/Both.ts +28 -0
  599. package/src/ts/toolbar/Br.ts +8 -0
  600. package/src/ts/toolbar/CodeTheme.ts +36 -0
  601. package/src/ts/toolbar/ContentTheme.ts +44 -0
  602. package/src/ts/toolbar/Counter.ts +40 -0
  603. package/src/ts/toolbar/Custom.ts +17 -0
  604. package/src/ts/toolbar/Devtools.ts +28 -0
  605. package/src/ts/toolbar/Divider.ts +8 -0
  606. package/src/ts/toolbar/EditMode.ts +198 -0
  607. package/src/ts/toolbar/Emoji.ts +79 -0
  608. package/src/ts/toolbar/Export.ts +41 -0
  609. package/src/ts/toolbar/Fullscreen.ts +66 -0
  610. package/src/ts/toolbar/Headings.ts +73 -0
  611. package/src/ts/toolbar/Help.ts +30 -0
  612. package/src/ts/toolbar/Indent.ts +25 -0
  613. package/src/ts/toolbar/Info.ts +28 -0
  614. package/src/ts/toolbar/InsertAfter.ts +18 -0
  615. package/src/ts/toolbar/InsertBefore.ts +18 -0
  616. package/src/ts/toolbar/MenuItem.ts +54 -0
  617. package/src/ts/toolbar/Outdent.ts +24 -0
  618. package/src/ts/toolbar/Outline.ts +21 -0
  619. package/src/ts/toolbar/Preview.ts +55 -0
  620. package/src/ts/toolbar/Record.ts +60 -0
  621. package/src/ts/toolbar/Redo.ts +18 -0
  622. package/src/ts/toolbar/Undo.ts +18 -0
  623. package/src/ts/toolbar/Upload.ts +41 -0
  624. package/src/ts/toolbar/index.ts +195 -0
  625. package/src/ts/toolbar/setToolbar.ts +120 -0
  626. package/src/ts/ui/initUI.ts +214 -0
  627. package/src/ts/ui/setCodeTheme.ts +16 -0
  628. package/src/ts/ui/setContentTheme.ts +15 -0
  629. package/src/ts/ui/setPreviewMode.ts +31 -0
  630. package/src/ts/ui/setTheme.ts +14 -0
  631. package/src/ts/undo/index.ts +270 -0
  632. package/src/ts/upload/getElement.ts +10 -0
  633. package/src/ts/upload/index.ts +273 -0
  634. package/src/ts/upload/setHeaders.ts +10 -0
  635. package/src/ts/util/Options.ts +458 -0
  636. package/src/ts/util/RecordMedia.ts +170 -0
  637. package/src/ts/util/addScript.ts +43 -0
  638. package/src/ts/util/addStyle.ts +10 -0
  639. package/src/ts/util/code160to32.ts +4 -0
  640. package/src/ts/util/compatibility.ts +67 -0
  641. package/src/ts/util/editorCommonEvent.ts +270 -0
  642. package/src/ts/util/fixBrowserBehavior.ts +2234 -0
  643. package/src/ts/util/function.ts +15 -0
  644. package/src/ts/util/getSelectText.ts +8 -0
  645. package/src/ts/util/hasClosest.ts +154 -0
  646. package/src/ts/util/hasClosestByHeadings.ts +27 -0
  647. package/src/ts/util/highlightToolbar.ts +10 -0
  648. package/src/ts/util/hotKey.ts +54 -0
  649. package/src/ts/util/log.ts +6 -0
  650. package/src/ts/util/merge.ts +18 -0
  651. package/src/ts/util/processCode.ts +218 -0
  652. package/src/ts/util/selection.ts +349 -0
  653. package/src/ts/util/toc.ts +83 -0
  654. package/src/ts/wysiwyg/afterRenderEvent.ts +41 -0
  655. package/src/ts/wysiwyg/highlightToolbarWYSIWYG.ts +1169 -0
  656. package/src/ts/wysiwyg/index.ts +604 -0
  657. package/src/ts/wysiwyg/inlineTag.ts +129 -0
  658. package/src/ts/wysiwyg/input.ts +212 -0
  659. package/src/ts/wysiwyg/processKeydown.ts +363 -0
  660. package/src/ts/wysiwyg/renderDomByMd.ts +18 -0
  661. package/src/ts/wysiwyg/setHeading.ts +43 -0
  662. package/src/ts/wysiwyg/showCode.ts +32 -0
  663. package/src/ts/wysiwyg/toolbarEvent.ts +333 -0
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Vditor=t():e.Vditor=t()}(this,(function(){return(()=>{"use strict";var e={145:(e,t,n)=>{n.d(t,{g:()=>a});var a=function(){function e(){}return e.ZWSP="​",e.DROP_EDITOR="application/editor",e.MOBILE_WIDTH=520,e.CLASS_MENU_DISABLED="vditor-menu--disabled",e.EDIT_TOOLBARS=["emoji","headings","bold","italic","strike","link","list","ordered-list","outdent","indent","check","line","quote","code","inline-code","insert-after","insert-before","upload","record","table"],e.CODE_THEME=["a11y-dark","agate","an-old-hope","androidstudio","arta","atom-one-dark","atom-one-dark-reasonable","base16/3024","base16/apathy","base16/apprentice","base16/ashes","base16/atelier-cave","base16/atelier-dune","base16/atelier-estuary","base16/atelier-forest","base16/atelier-heath","base16/atelier-lakeside","base16/atelier-plateau","base16/atelier-savanna","base16/atelier-seaside","base16/atelier-sulphurpool","base16/atlas","base16/bespin","base16/black-metal","base16/black-metal-bathory","base16/black-metal-burzum","base16/black-metal-dark-funeral","base16/black-metal-gorgoroth","base16/black-metal-immortal","base16/black-metal-khold","base16/black-metal-marduk","base16/black-metal-mayhem","base16/black-metal-nile","base16/black-metal-venom","base16/brewer","base16/bright","base16/brogrammer","base16/brush-trees-dark","base16/chalk","base16/circus","base16/classic-dark","base16/codeschool","base16/colors","base16/danqing","base16/darcula","base16/dark-violet","base16/darkmoss","base16/darktooth","base16/decaf","base16/default-dark","base16/dracula","base16/edge-dark","base16/eighties","base16/embers","base16/equilibrium-dark","base16/equilibrium-gray-dark","base16/espresso","base16/eva","base16/eva-dim","base16/flat","base16/framer","base16/gigavolt","base16/google-dark","base16/grayscale-dark","base16/green-screen","base16/gruvbox-dark-hard","base16/gruvbox-dark-medium","base16/gruvbox-dark-pale","base16/gruvbox-dark-soft","base16/hardcore","base16/harmonic16-dark","base16/heetch-dark","base16/helios","base16/hopscotch","base16/horizon-dark","base16/humanoid-dark","base16/ia-dark","base16/icy-dark","base16/ir-black","base16/isotope","base16/kimber","base16/london-tube","base16/macintosh","base16/marrakesh","base16/materia","base16/material","base16/material-darker","base16/material-palenight","base16/material-vivid","base16/mellow-purple","base16/mocha","base16/monokai","base16/nebula","base16/nord","base16/nova","base16/ocean","base16/oceanicnext","base16/onedark","base16/outrun-dark","base16/papercolor-dark","base16/paraiso","base16/pasque","base16/phd","base16/pico","base16/pop","base16/porple","base16/qualia","base16/railscasts","base16/rebecca","base16/ros-pine","base16/ros-pine-moon","base16/sandcastle","base16/seti-ui","base16/silk-dark","base16/snazzy","base16/solar-flare","base16/solarized-dark","base16/spacemacs","base16/summercamp","base16/summerfruit-dark","base16/synth-midnight-terminal-dark","base16/tango","base16/tender","base16/tomorrow-night","base16/twilight","base16/unikitty-dark","base16/vulcan","base16/windows-10","base16/windows-95","base16/windows-high-contrast","base16/windows-nt","base16/woodland","base16/xcode-dusk","base16/zenburn","codepen-embed","dark","devibeans","far","felipec","github-dark","github-dark-dimmed","gml","gradient-dark","hybrid","ir-black","isbl-editor-dark","kimbie-dark","lioshi","monokai","monokai-sublime","night-owl","nnfx-dark","nord","obsidian","panda-syntax-dark","paraiso-dark","pojoaque","qtcreator-dark","rainbow","shades-of-purple","srcery","stackoverflow-dark","sunburst","tomorrow-night-blue","tomorrow-night-bright","tokyo-night-dark","vs2015","xt256","ant-design","a11y-light","arduino-light","ascetic","atom-one-light","base16/atelier-cave-light","base16/atelier-dune-light","base16/atelier-estuary-light","base16/atelier-forest-light","base16/atelier-heath-light","base16/atelier-lakeside-light","base16/atelier-plateau-light","base16/atelier-savanna-light","base16/atelier-seaside-light","base16/atelier-sulphurpool-light","base16/brush-trees","base16/classic-light","base16/cupcake","base16/cupertino","base16/default-light","base16/dirtysea","base16/edge-light","base16/equilibrium-gray-light","base16/equilibrium-light","base16/fruit-soda","base16/github","base16/google-light","base16/grayscale-light","base16/gruvbox-light-hard","base16/gruvbox-light-medium","base16/gruvbox-light-soft","base16/harmonic16-light","base16/heetch-light","base16/humanoid-light","base16/horizon-light","base16/ia-light","base16/material-lighter","base16/mexico-light","base16/one-light","base16/papercolor-light","base16/ros-pine-dawn","base16/sagelight","base16/shapeshifter","base16/silk-light","base16/solar-flare-light","base16/solarized-light","base16/summerfruit-light","base16/synth-midnight-terminal-light","base16/tomorrow","base16/unikitty-light","base16/windows-10-light","base16/windows-95-light","base16/windows-high-contrast-light","brown-paper","base16/windows-nt-light","color-brewer","docco","foundation","github","googlecode","gradient-light","grayscale","idea","intellij-light","isbl-editor-light","kimbie-light","lightfair","magula","mono-blue","nnfx-light","panda-syntax-light","paraiso-light","purebasic","qtcreator-light","routeros","school-book","stackoverflow-light","tokyo-night-light","vs","xcode","default"],e.ALIAS_CODE_LANGUAGES=["abc","plantuml","mermaid","flowchart","echarts","mindmap","graphviz","math","markmap","smiles","js","ts","html","toml","c#","bat"],e.CDN="https://webcdn.wujieai.com/vditor@".concat("0.0.22"),e.MARKDOWN_OPTIONS={autoSpace:!1,gfmAutoLink:!0,codeBlockPreview:!0,fixTermTypo:!1,footnotes:!0,linkBase:"",linkPrefix:"",listStyle:!1,mark:!1,mathBlockPreview:!0,paragraphBeginningSpace:!1,sanitize:!0,sub:!1,sup:!1,toc:!1},e.HLJS_OPTIONS={enable:!0,lineNumber:!1,defaultLang:"",style:"github"},e.MATH_OPTIONS={engine:"MathJax",inlineDigit:!1,macros:{oiint:"\\unicode{x222F}"}},e.THEME_OPTIONS={current:"light",list:{"ant-design":"Ant Design",dark:"Dark",light:"Light",wechat:"WeChat"},path:"".concat(e.CDN,"/dist/css/content-theme")},e}()},825:(e,t,n)=>{n.d(t,{J:()=>s});var a=n(145),r=n(413),i=n(840),o=n(494),s=function(e,t,n){void 0===e&&(e=document),void 0===t&&(t=a.g.CDN);var s=i.SMILESRenderAdapter.getElements(e);s.length>0&&(0,r.G)("".concat(t,"/dist/js/smiles-drawer/smiles-drawer.min.js?v=2.1.7"),"vditorAbcjsScript").then((function(){var e=new SmiDrawer({},{});s.forEach((function(t){var a=i.SMILESRenderAdapter.getCode(t).trim();if("true"!==t.getAttribute("data-processed")&&""!==a.trim()){var r="smiles"+(0,o.Wb)();t.innerHTML='<svg id="'.concat(r,'"></svg>'),e.draw(a,"#"+r,"dark"===n?"dark":void 0),t.setAttribute("data-processed","true")}}))}))}},135:(e,t,n)=>{n.d(t,{Q:()=>o});var a=n(145),r=n(413),i=n(840),o=function(e,t){void 0===e&&(e=document),void 0===t&&(t=a.g.CDN);var n=i.abcRenderAdapter.getElements(e);n.length>0&&(0,r.G)("".concat(t,"/dist/js/abcjs/abcjs_basic.min.js"),"vditorAbcjsScript").then((function(){n.forEach((function(e){e.parentElement.classList.contains("vditor-wysiwyg__pre")||e.parentElement.classList.contains("vditor-ir__marker--pre")||"true"!==e.getAttribute("data-processed")&&(ABCJS.renderAbc(e,i.abcRenderAdapter.getCode(e).trim()),e.style.overflowX="auto",e.setAttribute("data-processed","true"))}))}))}},840:(e,t,n)=>{n.r(t),n.d(t,{mathRenderAdapter:()=>r,SMILESRenderAdapter:()=>i,mermaidRenderAdapter:()=>o,markmapRenderAdapter:()=>s,mindmapRenderAdapter:()=>c,chartRenderAdapter:()=>l,abcRenderAdapter:()=>d,graphvizRenderAdapter:()=>u,flowchartRenderAdapter:()=>m,plantumlRenderAdapter:()=>p});var a=n(106),r={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-math")}},i={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-smiles")}},o={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-mermaid")}},s={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-markmap")}},c={getCode:function(e){return e.getAttribute("data-code")},getElements:function(e){return e.querySelectorAll(".language-mindmap")}},l={getCode:function(e){return e.innerText},getElements:function(e){return e.querySelectorAll(".language-echarts")},setCode:function(e,t){var n=null!=t?t:"";try{n=function(e){try{var t=Object.keys(e).map((function(t){var n=e[t],a="";return Array.isArray(n),a=JSON.stringify(n),'"'.concat(t,'": ').concat(a)}));return"{\n".concat(t.join(",\n"),"\n}")}catch(t){return JSON.stringify(e)}}(JSON.parse(t))}catch(e){}var r=(0,a.fb)(e,"vditor-wysiwyg__block");if(r){var i=r.firstElementChild;if(i&&i.classList.contains("vditor-wysiwyg__pre")){var o=i.querySelector("code");if(o)return o.textContent=n,void o.classList.add("language-echarts")}}}},d={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-abc")}},u={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-graphviz")}},m={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-flowchart")}},p={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-plantuml")}}},775:(e,t,n)=>{n.d(t,{p:()=>d});var a=n(145),r=n(413),i=n(290),o=n(840),s=n(494),c=function(e,t,n,a){return new(n||(n=Promise))((function(r,i){function o(e){try{c(a.next(e))}catch(e){i(e)}}function s(e){try{c(a.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((a=a.apply(e,t||[])).next())}))},l=function(e,t){var n,a,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(n=1,a&&(r=2&s[0]?a.return:s[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,s[1])).done)return r;switch(a=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,a=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],a=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},d=function(e,t,n){void 0===e&&(e=document),void 0===t&&(t=a.g.CDN);var i=o.chartRenderAdapter.getElements(e);i.length>0&&(0,r.G)("".concat(t,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then((function(){i.forEach((function(e){return c(void 0,void 0,void 0,(function(){var a,r,i,c;return l(this,(function(l){switch(l.label){case 0:if(e.parentElement.classList.contains("vditor-wysiwyg__pre")||e.parentElement.classList.contains("vditor-ir__marker--pre"))return[2];if(!(a=o.chartRenderAdapter.getCode(e).trim()))return[2];l.label=1;case 1:return l.trys.push([1,3,,4]),"true"===e.getAttribute("data-processed")?[2]:[4,(0,s.Qf)(a)];case 2:return r=l.sent(),function(e){var t=["#5470C6","#91CC75","#FAC858","#EE6666","#73C0DE","#3CA9CF","#FC8452","#9A60B4","#ea7ccc"];Array.isArray(null==e?void 0:e.color)&&0!==e.color.length||(e.color=t.slice()),(Array.isArray(null==e?void 0:e.series)?e.series:[]).forEach((function(e,n){if(e&&"object"==typeof e){var a=e.type;if("line"===a||"bar"===a||"scatter"===a||"effectScatter"===a||"radar"===a){var r=t[n%t.length];e.itemStyle=e.itemStyle||{},e.itemStyle.color||(e.itemStyle.color=r),"radar"===a&&(e.lineStyle=e.lineStyle||{},e.lineStyle.color||(e.lineStyle.color=e.itemStyle.color))}}}))}(r),(i=echarts.init(e,"dark"===n?"dark":void 0)).setOption(r),u(e,r,i,t),e.setAttribute("data-processed","true"),[3,4];case 3:return c=l.sent(),e.className="vditor-reset--error",e.innerHTML="echarts render error: <br>".concat(c),[3,4];case 4:return[2]}}))}))}))}))},u=function(e,t,n,a){var s,c,l,d;if("true"!==e.getAttribute("data-context-menu")&&(e.setAttribute("data-context-menu","true"),!!(!e.closest(".vditor-preview")&&!e.closest(".vditor-sv")))){var u=Array.isArray(null==t?void 0:t.series)?t.series:[],m={};u.forEach((function(e){e&&"string"==typeof e.name&&(m[e.name]=e)}));var p=u.some((function(e){return e&&"pie"===e.type}))?"pie":u.some((function(e){return e&&"radar"===e.type}))?"radar":u.some((function(e){return e&&"funnel"===e.type}))?"funnel":u.some((function(e){return e&&("scatter"===e.type||"effectScatter"===e.type)}))?"scatter":"default",h=u.find((function(e){return e&&"pie"===e.type&&Array.isArray(e.data)})),v={},f=[];if(h){var g=Array.isArray(null===(s=null==t?void 0:t.legend)||void 0===s?void 0:s.data)?t.legend.data.filter((function(e){return"string"==typeof e})):[];(E=h.data.map((function(e){return e&&"string"==typeof e.name?e.name:null})).filter((function(e){return!!e}))).forEach((function(e,t){v[e]=t})),f=g.length>0?g:E}var b=u.find((function(e){return e&&"radar"===e.type&&Array.isArray(e.data)})),y=[];if(b){g=Array.isArray(null===(c=null==t?void 0:t.legend)||void 0===c?void 0:c.data)?t.legend.data.filter((function(e){return"string"==typeof e})):[];(E=b.data.map((function(e){return e&&"string"==typeof e.name?e.name:null})).filter((function(e){return!!e}))).forEach((function(e,t){v[e]=t})),y=g.length>0?g:E}var w=u.filter((function(e){return e&&"funnel"===e.type&&Array.isArray(e.data)})),S=[];if(w.length>0){g=Array.isArray(null===(l=null==t?void 0:t.legend)||void 0===l?void 0:l.data)?t.legend.data.filter((function(e){return"string"==typeof e})):[];var k=new Set;w.forEach((function(e){e.data.forEach((function(e,t){e&&"string"==typeof e.name&&k.add(e.name)}))}));var E=Array.from(k);w[0]&&w[0].data.forEach((function(e,t){e&&"string"==typeof e.name&&(v[e.name]=t)})),S=g.length>0?g:E}var x=[];if("scatter"===p){g=Array.isArray(null===(d=null==t?void 0:t.legend)||void 0===d?void 0:d.data)?t.legend.data.filter((function(e){return"string"==typeof e})):[];var A=[],L=[];if(u.forEach((function(e,t){!e||"scatter"!==e.type&&"effectScatter"!==e.type||(A.push(t),L.push(e&&"string"==typeof e.name?e.name:null))})),g.length>0){var T=0;g.forEach((function(e){var t=L.findIndex((function(t){return t===e}));t>=0?v[e]=A[t]:T<A.length&&(v[e]=A[T++])})),x.push.apply(x,g)}else L.filter(Boolean).length>0?L.forEach((function(e,t){e&&(x.push(e),v[e]=A[t])})):A.forEach((function(e,t){var n="散点系列".concat(t+1);x.push(n),v[n]=e}))}var M=null,C=null,_=null,j=null,H=null,I=null,R=function(){I||(I=function(e){var t=e.target;if(t&&!(M&&"none"!==M.style.display&&M.contains(t)||C&&"none"!==C.style.display&&C.contains(t))){try{if(C&&"none"!==C.style.display&&j&&H){var a=m[j];a&&(a.itemStyle=a.itemStyle||{},a.itemStyle.color=H),n.setOption({series:[{name:j,itemStyle:{color:H}}]})}}catch(e){}B(),N()}},document.addEventListener("mousedown",I,!0),document.addEventListener("touchstart",I,!0))},N=function(){M&&(M.style.display="none",C&&"none"===C.style.display&&I&&(document.removeEventListener("mousedown",I,!0),document.removeEventListener("touchstart",I,!0),I=null))},O=function(e){return new Promise((function(t){window.VditorI18n?t():(0,r.G)("".concat(e,"/dist/js/i18n/zh_CN.js"),"vditorI18nScriptzh_CN").then((function(){return t()}))}))},P=function(){var t,n=e.closest(".vditor-ir, .vditor-sv, .vditor-wysiwyg");if(n){var a=null;a=n.classList.contains("vditor-ir")?n.querySelector("pre.vditor-reset"):n.classList.contains("vditor-sv")?n:n.querySelector("pre.vditor-reset");try{null===(t=a||n)||void 0===t||t.focus();var r=getSelection();if(r&&0===r.rangeCount){var i=document.createRange(),o=a||n;i.selectNodeContents(o),i.collapse(!1),r.removeAllRanges(),r.addRange(i)}}catch(e){}var s=new InputEvent("input",{bubbles:!0,cancelable:!0,data:"",inputType:"insertText"});(a||n).dispatchEvent(s)}},D=function(s,c,l){var d,f,g;Promise.all([(d=a,f="".concat(d,"/dist/js/color-picker/color-picker.nano.css"),g="".concat(d,"/dist/js/color-picker/color-picker.nano.js"),(0,i.c)(f,"vditorColorPickerStyle"),new Promise((function(e){window.Pickr?e():(0,r.G)(g,"vditorColorPickerScript").then((function(){return e()}))}))),O(a)]).then((function(){var a,r,i,d,f,g,y,S,k,E,x,A,L,T,M,I,O,D,q,z,G,J;if(!C){(C=document.createElement("div")).className="vditor-echarts-color-picker",C.style.position="fixed",C.style.zIndex="10000",C.style.background="#fff",C.style.border="1px solid #e5e7eb",C.style.boxShadow="0 4px 12px rgba(0,0,0,0.15)",C.style.borderRadius="6px",C.style.padding="8px",C.style.display="none",C.style.opacity="0",C.style.transform="scale(0.96)",C.style.transition="opacity 120ms ease, transform 120ms ease",C.tabIndex=-1,C.addEventListener("mousedown",(function(e){e.preventDefault(),e.stopPropagation()}));var W=document.createElement("div");C.appendChild(W),document.body.appendChild(C);try{var V=window.Pickr;if(!V||!V.create)throw new Error("Pickr 未正确加载");switch(j=s,p){case"pie":var X=v[s];try{var F=null===(a=null==h?void 0:h.itemStyle)||void 0===a?void 0:a.color;H="function"==typeof F?F({dataIndex:X,data:h.data[X]}):(null===(d=null===(i=null===(r=null==h?void 0:h.data)||void 0===r?void 0:r[X])||void 0===i?void 0:i.itemStyle)||void 0===d?void 0:d.color)||null}catch(e){H=null}break;case"radar":X=v[s];try{var U=null===(f=null==b?void 0:b.data)||void 0===f?void 0:f[X];H=(null===(g=null==U?void 0:U.itemStyle)||void 0===g?void 0:g.color)||(null===(y=null==U?void 0:U.lineStyle)||void 0===y?void 0:y.color)||null}catch(e){H=null}break;case"funnel":X=v[s];try{if(!(U=null===(S=null==(re=w[0])?void 0:re.data)||void 0===S?void 0:S[X])&&re&&(U=re.data.find((function(e){return(null==e?void 0:e.name)===s}))),null===(k=null==U?void 0:U.itemStyle)||void 0===k?void 0:k.color)H=U.itemStyle.color;else if(Array.isArray(null==t?void 0:t.color)&&"number"==typeof X){var K=t.color;H=K[X]||null}else H=null}catch(e){H=null}break;case"scatter":var $=v[s];try{var Y=u[$];H=(null===(E=null==Y?void 0:Y.itemStyle)||void 0===E?void 0:E.color)||null}catch(e){H=null}break;default:H=(null===(A=null===(x=m[s])||void 0===x?void 0:x.itemStyle)||void 0===A?void 0:A.color)||null}var Z=window.VditorI18n||{},Q={"ui:dialog":"颜色选择","btn:save":Z.confirm||"确定","btn:cancel":Z.close||"取消","btn:clear":Z.remove||"清除"};null===(L=null==(_=V.create({el:W,theme:"nano",default:H||"#409EFF",inline:!0,useAsButton:!0,i18n:Q,swatches:["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFEB3B","#FFC107"],components:{preview:!0,opacity:!0,hue:!0,interaction:{hex:!1,rgba:!1,hsla:!1,hsva:!1,cmyk:!1,input:!0,clear:!0,save:!0}}}))?void 0:_.show)||void 0===L||L.call(_);var ee=function(){try{var n=JSON.stringify(t);o.chartRenderAdapter.setCode(e,n)}catch(e){}},te=function(a,r,i){var o;if(void 0===r&&(r=!1),void 0===i&&(i=!1),j&&a){switch(p){case"pie":var s=v[j];(c=h.data[s])&&(c.itemStyle=c.itemStyle||{},c.itemStyle.color=a);break;case"radar":var c;s=v[j];if((c=null===(o=null==b?void 0:b.data)||void 0===o?void 0:o[s])&&(c.itemStyle=c.itemStyle||{},c.lineStyle=c.lineStyle||{},c.itemStyle.color=a,c.lineStyle.color=a,c.areaStyle&&"object"==typeof c.areaStyle)){var l=c.areaStyle.color,d="string"==typeof l&&l.match(/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([0-9.]+)\s*\)$/);if(d){var f=d[4],g=a.replace("#",""),y=parseInt(g.substring(0,2),16),S=parseInt(g.substring(2,4),16),k=parseInt(g.substring(4,6),16);c.areaStyle.color="rgba(".concat(y,", ").concat(S,", ").concat(k,", ").concat(f,")")}}break;case"funnel":w.forEach((function(e){var t,n=v[j];if(null!=n&&(null===(t=e.data[n])||void 0===t?void 0:t.name)===j||!Array.isArray(e.data)||(n=e.data.findIndex((function(e){return e&&e.name===j}))),null!=n&&n>=0){var r=e.data[n];r&&(r.itemStyle=r.itemStyle||{},r.itemStyle.color=a)}}));break;case"scatter":var E=v[j],x=u[E];x&&(x.itemStyle=x.itemStyle||{},x.itemStyle.color=a);break;default:var A=m[j];A&&(A.itemStyle=A.itemStyle||{},A.itemStyle.color=a)}if(i)try{var L="data-echarts-colors",T=e.getAttribute(L),M=T?JSON.parse(T):{};M[j]=a,e.setAttribute(L,JSON.stringify(M))}catch(e){}switch(p){case"pie":n.setOption({series:[{name:h.name,type:"pie",data:h.data}]});break;case"radar":n.setOption({series:[{name:null==b?void 0:b.name,type:"radar",data:null==b?void 0:b.data}]});break;case"funnel":case"scatter":n.setOption({series:t.series});break;default:n.setOption({series:[{name:j,itemStyle:{color:a}}]})}r&&(B(),N())}},ne=null,ae=null;_.on("change",(function(e){try{var t=e.toHEXA().toString();ne=t,null==ae&&(ae=requestAnimationFrame((function(){ne&&(te(ne,!1,!1),ne=null),ae=null})))}catch(e){}})),_.on("swatchselect",(function(e){try{var t=e.toHEXA().toString();te(t,!1,!1)}catch(e){}})),_.on("save",(function(e){var t,n,a;try{var r=null===(a=null===(t=null==e?void 0:e.toHEXA)||void 0===t?void 0:(n=t.call(e)).toString)||void 0===a?void 0:a.call(n);r?(te(r,!0,!0),ee(),P()):H?(te(H,!0,!0),ee(),P()):(B(),N())}catch(e){B(),N()}})),_.on("cancel",(function(){try{H&&j?te(H,!0,!1):(B(),N())}catch(e){B(),N()}})),_.on("clear",(function(){H&&te(H,!0,!1),B(),N()}))}catch(e){W.innerHTML='<div class="vditor-reset--error">Color Picker 加载失败:'.concat(e,"</div>")}}j=s;try{switch(p){case"pie":X=v[s],F=null===(T=null==h?void 0:h.itemStyle)||void 0===T?void 0:T.color;H="function"==typeof F?F({dataIndex:X,data:h.data[X]}):(null===(O=null===(I=null===(M=null==h?void 0:h.data)||void 0===M?void 0:M[X])||void 0===I?void 0:I.itemStyle)||void 0===O?void 0:O.color)||null;break;case"radar":X=v[s],U=null===(D=null==b?void 0:b.data)||void 0===D?void 0:D[X];H=(null===(q=null==U?void 0:U.itemStyle)||void 0===q?void 0:q.color)||(null===(z=null==U?void 0:U.lineStyle)||void 0===z?void 0:z.color)||null;break;case"funnel":var re;X=v[s];if(!(U=null===(G=null==(re=w[0])?void 0:re.data)||void 0===G?void 0:G[X])&&re&&(U=re.data.find((function(e){return(null==e?void 0:e.name)===s}))),null===(J=null==U?void 0:U.itemStyle)||void 0===J?void 0:J.color)H=U.itemStyle.color;else if(Array.isArray(null==t?void 0:t.color)&&"number"==typeof X){K=t.color;H=K[X]||null}else H=null;break;case"scatter":$=v[s],Y=u[$];H=Y&&Y.itemStyle&&Y.itemStyle.color||null;break;default:var ie=m[s];H=ie&&ie.itemStyle&&ie.itemStyle.color||null}}catch(e){H=null}C.style.left="".concat(c,"px"),C.style.top="".concat(l,"px"),C.style.display="block";try{_&&_.show&&(_.show(),H&&_.setColor(H,!0))}catch(e){}R();var oe=C.getBoundingClientRect(),se=c,ce=l;oe.right>window.innerWidth&&(se=Math.max(8,window.innerWidth-oe.width-8)),oe.bottom>window.innerHeight&&(ce=Math.max(8,window.innerHeight-oe.height-8)),C.style.left="".concat(se,"px"),C.style.top="".concat(ce,"px"),requestAnimationFrame((function(){C.style.opacity="1",C.style.transform="scale(1)"}))}))},B=function(){var e;if(C&&"none"!==C.style.display){try{null===(e=null==_?void 0:_.hide)||void 0===e||e.call(_)}catch(e){}C.style.opacity="0",C.style.transform="scale(0.96)",window.setTimeout((function(){C&&(C.style.display="none",M&&"none"===M.style.display&&I&&(document.removeEventListener("mousedown",I,!0),document.removeEventListener("touchstart",I,!0),I=null))}),120)}},q=new Set(["pie","radar","funnel","scatter","effectScatter","line","bar"]),z=u.length>0&&u.every((function(e){return e&&q.has(e.type)}));e.addEventListener("contextmenu",(function(e){z&&(e.preventDefault(),function(e,t){if(!M){(M=document.createElement("div")).className="vditor-echarts-context-menu",M.style.position="fixed",M.style.zIndex="9999",M.style.background="#fff",M.style.border="1px solid #e5e7eb",M.style.boxShadow="0 2px 8px rgba(0,0,0,0.15)",M.style.borderRadius="4px",M.style.padding="4px 0",M.style.fontSize="12px",M.style.minWidth="120px",M.addEventListener("mousedown",(function(e){e.stopPropagation()}));var n=[];switch(p){case"pie":n=f;break;case"radar":n=y;break;case"funnel":n=S;break;case"scatter":n=x;break;default:n=Array.from(new Set(u.map((function(e){return e&&"string"==typeof e.name?e.name:null})).filter((function(e){return!!e&&e.length>0}))))}n.forEach((function(e){var t=document.createElement("div");t.textContent="修改".concat(e,"配色"),t.style.padding="6px 12px",t.style.cursor="pointer",t.style.userSelect="none",t.addEventListener("mouseenter",(function(){t.style.background="#f5f7fa"})),t.addEventListener("mouseleave",(function(){t.style.background="transparent"})),t.addEventListener("mousedown",(function(e){e.stopPropagation(),e.preventDefault()})),t.addEventListener("click",(function(t){t.stopPropagation(),t.preventDefault();var n=t.currentTarget.getBoundingClientRect(),a=n.right+8,r=n.top;D(e,a,r)})),M.appendChild(t)})),document.body.appendChild(M)}M.style.left="".concat(e,"px"),M.style.top="".concat(t,"px"),M.style.display="block",R()}(e.clientX,e.clientY))}))}}},428:(e,t,n)=>{n.d(t,{O:()=>i});var a=n(105),r=n(145),i=function(e,t){Array.from(e.querySelectorAll("pre > code")).filter((function(t,n){return!t.parentElement.classList.contains("vditor-wysiwyg__pre")&&!t.parentElement.classList.contains("vditor-ir__marker--pre")&&(!(t.classList.contains("language-mermaid")||t.classList.contains("language-flowchart")||t.classList.contains("language-echarts")||t.classList.contains("language-mindmap")||t.classList.contains("language-plantuml")||t.classList.contains("language-markmap")||t.classList.contains("language-abc")||t.classList.contains("language-graphviz")||t.classList.contains("language-math")||t.classList.contains("language-smiles"))&&(!(t.style.maxHeight.indexOf("px")>-1)&&!(e.classList.contains("vditor-preview")&&n>5)))})).forEach((function(e){var n,i,o,s=e.innerText;if(e.classList.contains("highlight-chroma")){var c=e.cloneNode(!0);c.querySelectorAll(".highlight-ln").forEach((function(e){e.remove()})),s=c.innerText}else s.endsWith("\n")&&(s=s.substr(0,s.length-1));var l='<svg><use xlink:href="#vditor-icon-copy"></use></svg>';document.getElementById("vditorIconScript")||(l='<svg viewBox="0 0 32 32"><path d="M22.545-0h-17.455c-1.6 0-2.909 1.309-2.909 2.909v20.364h2.909v-20.364h17.455v-2.909zM26.909 5.818h-16c-1.6 0-2.909 1.309-2.909 2.909v20.364c0 1.6 1.309 2.909 2.909 2.909h16c1.6 0 2.909-1.309 2.909-2.909v-20.364c0-1.6-1.309-2.909-2.909-2.909zM26.909 29.091h-16v-20.364h16v20.364z"></path></svg>');var d=document.createElement("div");d.className="vditor-copy",d.innerHTML='<span aria-label="'.concat((null===(n=window.VditorI18n)||void 0===n?void 0:n.copy)||"复制","\"\nonmouseover=\"this.setAttribute('aria-label', '").concat((null===(i=window.VditorI18n)||void 0===i?void 0:i.copy)||"复制","')\"\nclass=\"vditor-tooltipped vditor-tooltipped__w\"\nonclick=\"event.stopPropagation();this.previousElementSibling.select();document.execCommand('copy');this.setAttribute('aria-label', '").concat((null===(o=window.VditorI18n)||void 0===o?void 0:o.copied)||"已复制","');this.previousElementSibling.blur()\">").concat(l,"</span>");var u=document.createElement("textarea");u.value=(0,a.X)(s),d.insertAdjacentElement("afterbegin",u),t&&t.renderMenu&&t.renderMenu(e,d),e.before(d),e.style.maxHeight=window.outerHeight-40+"px",e.insertAdjacentHTML("afterend",'<span style="position: absolute">'.concat(r.g.ZWSP,"</span>"))}))}},325:(e,t,n)=>{n.d(t,{P:()=>o});var a=n(145),r=n(413),i=n(840),o=function(e,t){void 0===t&&(t=a.g.CDN);var n=i.flowchartRenderAdapter.getElements(e);0!==n.length&&(0,r.G)("".concat(t,"/dist/js/flowchart.js/flowchart.min.js"),"vditorFlowchartScript").then((function(){n.forEach((function(e){if("true"!==e.getAttribute("data-processed")){var t=flowchart.parse(i.flowchartRenderAdapter.getCode(e));e.innerHTML="",t.drawSVG(e),e.setAttribute("data-processed","true")}}))}))}},483:(e,t,n)=>{n.d(t,{v:()=>o});var a=n(145),r=n(413),i=n(840),o=function(e,t){void 0===t&&(t=a.g.CDN);var n=i.graphvizRenderAdapter.getElements(e);0!==n.length&&(0,r.G)("".concat(t,"/dist/js/graphviz/viz.js"),"vditorGraphVizScript").then((function(){n.forEach((function(e){var t=i.graphvizRenderAdapter.getCode(e);if(!e.parentElement.classList.contains("vditor-wysiwyg__pre")&&!e.parentElement.classList.contains("vditor-ir__marker--pre")&&"true"!==e.getAttribute("data-processed")&&""!==t.trim()){try{var n=new Blob(["importScripts('".concat(document.getElementById("vditorGraphVizScript").src.replace("viz.js","full.render.js"),"');")],{type:"application/javascript"}),a=(window.URL||window.webkitURL).createObjectURL(n),r=new Worker(a);new Viz({worker:r}).renderSVGElement(t).then((function(t){e.innerHTML=t.outerHTML})).catch((function(t){e.innerHTML="graphviz render error: <br>".concat(t),e.className="vditor-reset--error"}))}catch(e){console.error("graphviz error",e)}e.setAttribute("data-processed","true")}}))}))}},999:(e,t,n)=>{n.d(t,{s:()=>o});var a=n(145),r=n(413),i=n(290),o=function(e,t,n){void 0===t&&(t=document),void 0===n&&(n=a.g.CDN);var o=e.style;a.g.CODE_THEME.includes(o)||(o="github");var s=document.getElementById("vditorHljsStyle"),c="".concat(n,"/dist/js/highlight.js/styles/").concat(o,".min.css");(s&&s.getAttribute("href")!==c&&s.remove(),(0,i.c)("".concat(n,"/dist/js/highlight.js/styles/").concat(o,".min.css"),"vditorHljsStyle"),!1!==e.enable)&&(0!==t.querySelectorAll("pre > code").length&&(0,r.G)("".concat(n,"/dist/js/highlight.js/highlight.min.js?v=11.7.0"),"vditorHljsScript").then((function(){(0,r.G)("".concat(n,"/dist/js/highlight.js/third-languages.js?v=1.0.1"),"vditorHljsThirdScript").then((function(){t.querySelectorAll("pre > code").forEach((function(t){if(!t.parentElement.classList.contains("vditor-ir__marker--pre")&&!t.parentElement.classList.contains("vditor-wysiwyg__pre")&&!(t.classList.contains("language-mermaid")||t.classList.contains("language-flowchart")||t.classList.contains("language-echarts")||t.classList.contains("language-mindmap")||t.classList.contains("language-plantuml")||t.classList.contains("language-smiles")||t.classList.contains("language-abc")||t.classList.contains("language-graphviz")||t.classList.contains("language-math"))){""!==e.defaultLang&&-1===t.className.indexOf("language-")&&t.classList.add("language-"+e.defaultLang);var n=t.className.replace("language-","");if(window.hljs.getLanguage(n)||(n="plaintext"),t.innerHTML=window.hljs.highlight(t.textContent,{language:n,ignoreIllegals:!0}).value,t.classList.add("hljs"),e.lineNumber){t.classList.add("vditor-linenumber");var a=t.querySelector(".vditor-linenumber__temp");a||((a=document.createElement("div")).className="vditor-linenumber__temp",t.insertAdjacentElement("beforeend",a));var r=getComputedStyle(t).whiteSpace,i=!1;"pre-wrap"!==r&&"pre-line"!==r||(i=!0);var o="",s=t.textContent.split(/\r\n|\r|\n/g);s.pop(),s.map((function(e){var t="";i&&(a.textContent=e||"\n",t=' style="height:'.concat(a.getBoundingClientRect().height,'px"')),o+="<span".concat(t,"></span>")})),a.style.display="none",o='<span class="vditor-linenumber__rows">'.concat(o,"</span>"),t.insertAdjacentHTML("beforeend",o)}}}))}))})))}},11:(e,t,n)=>{n.d(t,{K:()=>c});var a=n(145),r=n(413),i=n(840),o={},s=function(e,t){var n=window.markmap,a=n.Transformer,r=n.Markmap,i=n.deriveOptions,s=(n.globalCSS,new a);e.innerHTML='<svg style="width:100%"></svg>';var c=e.firstChild,l=r.create(c,null),d=function(e,t){var n=e.transform(t),a=Object.keys(n.features).filter((function(e){return!o[e]}));a.forEach((function(e){o[e]=!0}));var r=e.getAssets(a),i=r.styles,s=r.scripts,c=window.markmap;return i&&c.loadCSS(i),s&&c.loadJS(s),n}(s,t),u=d.root,m=d.frontmatter,p=i(null==m?void 0:m.markmap);l.setData(u,p),l.fit()},c=function(e,t){void 0===e&&(e=document),void 0===t&&(t=a.g.CDN);var n=i.markmapRenderAdapter.getElements(e);0!==n.length&&(0,r.G)("".concat(t,"/dist/js/markmap/markmap.min.js"),"vditorMarkerScript").then((function(){n.forEach((function(e){var t=i.markmapRenderAdapter.getCode(e);if("true"!==e.getAttribute("data-processed")&&""!==t.trim()){var n=document.createElement("div");n.className="language-markmap",e.parentNode.appendChild(n),s(n,t),"CODE"==e.parentNode.childNodes[0].nodeName&&e.parentNode.removeChild(e.parentNode.childNodes[0])}}))}))}},284:(e,t,n)=>{n.d(t,{xX:()=>s});var a=n(413),r=function(e,t,n,a){return new(n||(n=Promise))((function(r,i){function o(e){try{c(a.next(e))}catch(e){i(e)}}function s(e){try{c(a.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((a=a.apply(e,t||[])).next())}))},i=function(e,t){var n,a,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(n=1,a&&(r=2&s[0]?a.return:s[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,s[1])).done)return r;switch(a=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,a=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],a=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},o=new(function(){function e(){this.menuEl=null,this.hideTimer=null}return e.prototype.init=function(){var e=this;this.menuEl||(this.menuEl=document.createElement("div"),this.menuEl.className="vditor-math-menu",this.menuEl.style.display="none",this.menuEl.innerHTML='\n <div class="vditor-math-menu__item" data-action="mml">复制 MathML</div>\n <div class="vditor-math-menu__item" data-action="tex">复制 Tex Commands</div>\n <div class="vditor-math-menu__item" data-action="svg">复制 SVG 代码</div>\n ',this.menuEl.addEventListener("mousedown",(function(e){e.stopPropagation()})),this.menuEl.addEventListener("touchstart",(function(e){e.stopPropagation()}),{passive:!0}),this.menuEl.addEventListener("click",(function(t){var n=t.target.getAttribute("data-action"),a=e.menuEl.dataset.targetId?document.querySelector('[data-math-id="'.concat(e.menuEl.dataset.targetId,'"]')):null;n&&a&&(e.onAction(n,a),e.hide())})),document.body.appendChild(this.menuEl),document.addEventListener("mousedown",(function(t){var n,a=t.target;e.menuEl&&"none"!==e.menuEl.style.display&&(a&&(null===(n=e.menuEl)||void 0===n?void 0:n.contains(a))||e.hide())}),!0),document.addEventListener("touchstart",(function(t){var n,a=t.target||null;e.menuEl&&"none"!==e.menuEl.style.display&&(a&&(null===(n=e.menuEl)||void 0===n?void 0:n.contains(a))||e.hide())}),{capture:!0,passive:!0}),document.addEventListener("scroll",(function(){return e.hide()}),{capture:!0}),window.addEventListener("resize",(function(){return e.hide()})))},e.prototype.show=function(e,t,n){if(this.menuEl){this.menuEl.style.display="block";this.menuEl.style.left="".concat(e,"px"),this.menuEl.style.top="".concat(t,"px");var a=this.menuEl.offsetWidth,r=this.menuEl.offsetHeight,i=window.innerWidth,o=window.innerHeight,s=e,c=t;s+a+8>i&&(s=Math.max(8,i-a-8)),c+r+8>o&&(c=Math.max(8,o-r-8)),this.menuEl.style.left="".concat(s,"px"),this.menuEl.style.top="".concat(c,"px");var l=n.getAttribute("data-math-id");l||(l="mjx-".concat(Date.now(),"-").concat(Math.floor(1e4*Math.random())),n.setAttribute("data-math-id",l)),this.menuEl.dataset.targetId=l,this.hideTimer&&(window.clearTimeout(this.hideTimer),this.hideTimer=null)}},e.prototype.hide=function(){this.menuEl&&(this.menuEl.style.display="none",this.menuEl.dataset.targetId="")},e.prototype.onAction=function(e,t){var n;return r(this,void 0,void 0,(function(){var a,r,o,s,c,l,d,u;return i(this,(function(i){switch(i.label){case 0:if(a=t.getAttribute("data-math")||"","mml"!==e)return[3,1];try{r="",c="DIV"===t.tagName,"undefined"!=typeof katex?r=katex.renderToString(a,{displayMode:c,output:"mathml"}):(null===(n=window.MathJax)||void 0===n?void 0:n.tex2mml)&&(r=window.MathJax.tex2mml(a,{display:c})),o=this.normalizeMathML(r||a),this.copyText(o),this.toast("MathML 已复制到剪贴板")}catch(e){this.copyText(a),this.toast("MathML 转换失败,已复制 TeX")}return[3,6];case 1:return"tex"!==e?[3,2]:(this.copyText(a),this.toast("TeX 已复制到剪贴板"),[3,6]);case 2:if("svg"!==e)return[3,6];i.label=3;case 3:return i.trys.push([3,5,,6]),[4,this.ensureMathJaxSvg()];case 4:return(null==(s=i.sent())?void 0:s.tex2svg)&&(c="DIV"===t.tagName,l=s.tex2svg(a,{display:c}),d=l.querySelector("svg"))?(d.getAttribute("xmlns")||d.setAttribute("xmlns","http://www.w3.org/2000/svg"),u=d.outerHTML,this.copySvg(u),[2]):(this.toast("当前引擎不支持 SVG 导出"),[3,6]);case 5:return i.sent(),this.toast("SVG 导出失败"),[3,6];case 6:return[2]}}))}))},e.prototype.ensureMathJaxSvg=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return(null==(e=window.MathJax)?void 0:e.tex2svg)?[2,e]:[4,(0,a.G)("/js/mathjax/tex-svg-full.js","protyleMathJaxSvgScript")];case 1:return t.sent(),[2,window.MathJax]}}))}))},e.prototype.normalizeMathML=function(e){try{var t=(new DOMParser).parseFromString(e,"text/html").querySelector("math");if(t)return t.outerHTML}catch(e){}var n=e.match(/^<span[^>]*>\s*(<math[\s\S]*?<\/math>)\s*<\/span>$/i);return n&&n[1]?n[1]:e},e.prototype.copySvg=function(e){this.copyText(e),this.toast("SVG 源码已复制到剪贴板")},e.prototype.escapeHTML=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},e.prototype.copyText=function(e){var t=this;navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(e).catch((function(){return t.fallbackCopy(e)})):this.fallbackCopy(e)},e.prototype.fallbackCopy=function(e){var t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(t)},e.prototype.toast=function(e){var t=document.createElement("div");t.textContent=e,t.style.position="fixed",t.style.bottom="16px",t.style.right="16px",t.style.background="#fff",t.style.color="#333",t.style.border="1px solid #e5e7eb",t.style.boxShadow="0 2px 8px rgba(0,0,0,0.15)",t.style.padding="6px 10px",t.style.borderRadius="4px",t.style.fontSize="12px",t.style.zIndex="10000",document.body.appendChild(t),setTimeout((function(){t.parentNode&&t.parentNode.removeChild(t)}),1600)},e}()),s=function(e){!(!e.closest(".vditor-preview")&&!e.closest(".vditor-sv"))||"true"!==e.getAttribute("data-context-menu")&&(o.init(),e.addEventListener("contextmenu",(function(t){t.preventDefault(),t.stopPropagation(),"function"==typeof t.stopImmediatePropagation&&t.stopImmediatePropagation();var n=t.clientX,a=t.clientY;o.show(n,a,e)}),{capture:!0}),e.setAttribute("data-context-menu","true"))}},472:(e,t,n)=>{n.d(t,{H:()=>d});var a=n(145),r=n(413),i=n(290),o=n(105),s=n(840),c=n(284),l=function(e){var t=new RegExp("\\\\(?:".concat(["vdots","ddots","ldots","cdots","dots","dotsc","dotsb","dotsm","dotsi","dotso"].join("|"),")(?=[A-Za-z0-9_])"),"g");return e.replace(t,(function(e){return"".concat(e,"{}")}))},d=function(e,t){void 0===e&&(e=document);var n=s.mathRenderAdapter.getElements(e);if(0!==n.length){var d={cdn:a.g.CDN,math:{engine:"MathJax",inlineDigit:!1,macros:{}}};if(t&&t.math&&(t.math=Object.assign({},d.math,t.math)),"KaTeX"===(t=Object.assign({},d,t)).math.engine)(0,i.c)("".concat(t.cdn,"/dist/js/katex/katex.min.css?v=0.16.9"),"vditorKatexStyle"),(0,r.G)("".concat(t.cdn,"/dist/js/katex/katex.min.js?v=0.16.9"),"vditorKatexScript").then((function(){(0,r.G)("".concat(t.cdn,"/dist/js/katex/mhchem.min.js?v=0.16.9"),"vditorKatexChemScript").then((function(){n.forEach((function(e){if(!e.parentElement.classList.contains("vditor-wysiwyg__pre")&&!e.parentElement.classList.contains("vditor-ir__marker--pre")&&!e.getAttribute("data-math")){var n=l((0,o.X)(s.mathRenderAdapter.getCode(e)));e.setAttribute("data-math",n);try{var a=Object.assign({oiint:"\\iint"},t.math.macros||{}),r=e.parentElement&&"PRE"===e.parentElement.tagName;if(e.innerHTML=katex.renderToString(n,{displayMode:r||"DIV"===e.tagName,output:"html",macros:a}),r)e.parentElement.classList.add("vditor-wysiwyg__preview--math")}catch(t){var i=(0,o.X)(s.mathRenderAdapter.getCode(e));e.textContent=i,e.className="language-math"}e.addEventListener("copy",(function(e){e.stopPropagation(),e.preventDefault();var t=e.currentTarget.closest(".language-math");e.clipboardData.setData("text/html",t.innerHTML),e.clipboardData.setData("text/plain",t.getAttribute("data-math"))})),(0,c.xX)(e)}}))}))}));else if("MathJax"===t.math.engine){window.MathJax||(window.MathJax={loader:{paths:{mathjax:"".concat(t.cdn,"/dist/js/mathjax")}},startup:{typeset:!0},tex:{inlineMath:[["$","$"],["\\(","\\)"]],displayMath:[["$$","$$"],["\\[","\\]"]],processEscapes:!0,macros:t.math.macros,packages:{"[+]":["ams","unicode","noerrors"]}},options:{enableMenu:!1}},Object.assign(window.MathJax,t.math.mathJaxOptions)),(0,r.J)("".concat(t.cdn,"/dist/js/mathjax/tex-svg-full.js"),"protyleMathJaxScript");var u=function(e,t){var n=(0,o.X)(e.textContent).trim(),a=l(n),r=e.parentElement&&"PRE"===e.parentElement.tagName,i=window.MathJax.getMetricsFor(e);i.display=r||"DIV"===e.tagName,window.MathJax.tex2svgPromise(a,i).then((function(i){(e.innerHTML="",e.setAttribute("data-math",a),e.append(i),r)&&e.parentElement.classList.add("vditor-wysiwyg__preview--math");(0,c.xX)(e),window.MathJax.startup.document.clear(),window.MathJax.startup.document.updateDocument();var o=i.querySelector('[data-mml-node="merror"]');o&&""!==o.textContent.trim()&&(e.textContent=n,e.className="language-math"),t&&t()}))};window.MathJax.startup.promise.then((function(){for(var e=[],t=function(t){var a=n[t];a.parentElement.classList.contains("vditor-wysiwyg__pre")||a.parentElement.classList.contains("vditor-ir__marker--pre")||a.getAttribute("data-math")||!(0,o.X)(a.textContent).trim()||e.push((function(e){t===n.length-1?u(a):u(a,e)}))},a=0;a<n.length;a++)t(a);!function(e){if(0!==e.length){var t=0,n=e[e.length-1],a=function(){var r=e[t++];r===n?r():r(a)};a()}}(e)}))}}}},280:(e,t,n)=>{n.d(t,{Y:()=>r});var a=n(494),r=function(e){e&&e.querySelectorAll("a").forEach((function(e){var t=e.getAttribute("href");t&&(t.match(/^.+.(mp4|m4v|ogg|ogv|webm)$/)?function(e,t){e.insertAdjacentHTML("afterend",'<video controls="controls" src="'.concat(t,'"></video>')),e.remove()}(e,t):t.match(/^.+.(mp3|wav|flac)$/)?function(e,t){e.insertAdjacentHTML("afterend",'<audio controls="controls" src="'.concat(t,'"></audio>')),e.remove()}(e,t):function(e,t){var n=t.match(/\/\/(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))([\w|-]{11})(?:(?:[\?&]t=)(\S+))?/),r=t.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),i=t.match(/\/\/v\.qq\.com\/x\/cover\/.*\/([^\/]+)\.html\??.*/),o=t.match(/(?:www\.|\/\/)coub\.com\/view\/(\w+)/),s=t.match(/(?:www\.|\/\/)facebook\.com\/([^\/]+)\/videos\/([0-9]+)/),c=t.match(/.+dailymotion.com\/(video|hub)\/(\w+)\?/),l=t.match(/(?:www\.|\/\/)bilibili\.com\/video\/(\w+)/),d=t.match(/(?:www\.|\/\/)ted\.com\/talks\/(\w+)/);if(n&&11===n[1].length)e.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//www.youtube.com/embed/'.concat(n[1]+(n[2]?"?start="+n[2]:""),'"></iframe>')),e.remove();else if(r&&r[1])e.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//player.youku.com/embed/'.concat(r[1],'"></iframe>')),e.remove();else if(i&&i[1])e.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="https://v.qq.com/txp/iframe/player.html?vid='.concat(i[1],'"></iframe>')),e.remove();else if(o&&o[1])e.insertAdjacentHTML("afterend",'<iframe class="iframe__video"\n src="//coub.com/embed/'.concat(o[1],'?muted=false&autostart=false&originalSize=true&startWithHD=true"></iframe>')),e.remove();else if(s&&s[0])e.insertAdjacentHTML("afterend",'<iframe class="iframe__video"\n src="https://www.facebook.com/plugins/video.php?href='.concat(encodeURIComponent(s[0]),'"></iframe>')),e.remove();else if(c&&c[2])e.insertAdjacentHTML("afterend",'<iframe class="iframe__video"\n src="https://www.dailymotion.com/embed/video/'.concat(c[2],'"></iframe>')),e.remove();else if(t.indexOf("bilibili.com")>-1&&(t.indexOf("bvid=")>-1||l&&l[1])){var u={bvid:(0,a.on)("bvid",t)||l&&l[1],page:"1",high_quality:"1",as_wide:"1",allowfullscreen:"true",autoplay:"0"};new URL(t.startsWith("http")?t:"https:"+t).search.split("&").forEach((function(e,t){if(e){0===t&&(e=e.substr(1));var n=e.split("=");u[n[0]]=n[1]}}));var m="https://player.bilibili.com/player.html?",p=Object.keys(u);p.forEach((function(e,t){m+="".concat(e,"=").concat(u[e]),t<p.length-1&&(m+="&")})),e.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="'.concat(m,'"></iframe>')),e.remove()}else d&&d[1]&&(e.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//embed.ted.com/talks/'.concat(d[1],'"></iframe>')),e.remove())}(e,t))}))}},637:(e,t,n)=>{n.d(t,{i:()=>l});var a=n(145),r=n(413),i=n(840),o=n(494),s=function(e,t,n,a){return new(n||(n=Promise))((function(r,i){function o(e){try{c(a.next(e))}catch(e){i(e)}}function s(e){try{c(a.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((a=a.apply(e,t||[])).next())}))},c=function(e,t){var n,a,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(n=1,a&&(r=2&s[0]?a.return:s[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,s[1])).done)return r;switch(a=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,a=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],a=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},l=function(e,t,n){void 0===e&&(e=document),void 0===t&&(t=a.g.CDN);var l=i.mermaidRenderAdapter.getElements(e);0!==l.length&&(0,r.G)("".concat(t,"/dist/js/mermaid/mermaid.min.js?v=11.11.0"),"vditorMermaidScript").then((function(){var e={securityLevel:"loose",altFontFamily:"sans-serif",fontFamily:"sans-serif",startOnLoad:!1,flowchart:{htmlLabels:!0,useMaxWidth:!0},sequence:{useMaxWidth:!0,diagramMarginX:8,diagramMarginY:8,boxMargin:8,showSequenceNumbers:!0},gantt:{leftPadding:75,rightPadding:20}};"dark"===n&&(e.theme="dark"),mermaid.initialize(e),l.forEach((function(e){return s(void 0,void 0,void 0,(function(){var t,n,a,r,s;return c(this,(function(c){switch(c.label){case 0:if(t=i.mermaidRenderAdapter.getCode(e),"true"===e.getAttribute("data-processed")||""===t.trim())return[2];n="mermaid"+(0,o.Wb)(),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,mermaid.render(n,e.textContent)];case 2:return a=c.sent(),e.innerHTML=a.svg,[3,4];case 3:return r=c.sent(),s=document.querySelector("#"+n),e.innerHTML="".concat(s.outerHTML,'<br>\n<div style="text-align: left"><small>').concat(r.message.replace(/\n/,"<br>"),"</small></div>"),s.parentElement.remove(),[3,4];case 4:return e.setAttribute("data-processed","true"),[2]}}))}))}))}))}},194:(e,t,n)=>{n.d(t,{P:()=>o});var a=n(145),r=n(413),i=n(840),o=function(e,t,n){void 0===e&&(e=document),void 0===t&&(t=a.g.CDN);var o=i.mindmapRenderAdapter.getElements(e);o.length>0&&(0,r.G)("".concat(t,"/dist/js/echarts/echarts.min.js?v=5.5.1"),"vditorEchartsScript").then((function(){o.forEach((function(e){if(!e.parentElement.classList.contains("vditor-wysiwyg__pre")&&!e.parentElement.classList.contains("vditor-ir__marker--pre")){var t=i.mindmapRenderAdapter.getCode(e);if(t)try{if("true"===e.getAttribute("data-processed"))return;echarts.init(e,"dark"===n?"dark":void 0).setOption({series:[{data:[JSON.parse(decodeURIComponent(t))],initialTreeDepth:-1,itemStyle:{borderWidth:0,color:"#4285f4"},label:{backgroundColor:"#f6f8fa",borderColor:"#d1d5da",borderRadius:5,borderWidth:.5,color:"#586069",lineHeight:20,offset:[-5,0],padding:[0,5],position:"insideRight"},lineStyle:{color:"#d1d5da",width:1},roam:!0,symbol:function(e,t){var n;return(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.children)?"circle":"path://"},type:"tree"}],tooltip:{trigger:"item",triggerOn:"mousemove"}}),e.setAttribute("data-processed","true")}catch(t){e.className="vditor-reset--error",e.innerHTML="mindmap render error: <br>".concat(t)}}}))}))}},436:(e,t,n)=>{n.d(t,{k:()=>i});var a=n(771),r=n(472),i=function(e,t,n){var i="",o=[];if(Array.from(e.children).forEach((function(e,t){if((0,a.W)(e)){if(n){var r=e.id.lastIndexOf("_");e.id=e.id.substring(0,-1===r?void 0:r)+"_"+t}o.push(e.id),i+=e.outerHTML.replace("<wbr>","")}})),""===i)return t.innerHTML="","";var s=document.createElement("div");if(n)n.lute.SetToC(!0),"wysiwyg"!==n.currentMode||n.preview.element.contains(e)?"ir"!==n.currentMode||n.preview.element.contains(e)?s.innerHTML=n.lute.HTML2VditorDOM("<p>[ToC]</p>"+i):s.innerHTML=n.lute.SpinVditorIRDOM("<p>[ToC]</p>"+i):s.innerHTML=n.lute.SpinVditorDOM("<p>[ToC]</p>"+i),n.lute.SetToC(n.options.preview.markdown.toc);else{t.classList.add("vditor-outline");var c=Lute.New();c.SetToC(!0),s.innerHTML=c.HTML2VditorDOM("<p>[ToC]</p>"+i)}var l=s.firstElementChild.querySelectorAll("li > span[data-target-id]");return l.forEach((function(e,t){if(e.nextElementSibling&&"UL"===e.nextElementSibling.tagName){var n="<svg class='vditor-outline__action'><use xlink:href='#vditor-icon-down'></use></svg>";document.getElementById("vditorIconScript")||(n='<svg class="vditor-outline__action" viewBox="0 0 32 32"><path d="M3.76 6.12l12.24 12.213 12.24-12.213 3.76 3.76-16 16-16-16 3.76-3.76z"></path></svg>'),e.innerHTML="".concat(n,"<span>").concat(e.innerHTML,"</span>")}else e.innerHTML="<svg></svg><span>".concat(e.innerHTML,"</span>");e.setAttribute("data-target-id",o[t])})),i=s.firstElementChild.innerHTML,0===l.length?(t.innerHTML="",i):(t.innerHTML=i,n&&(0,r.H)(t,{cdn:n.options.cdn,math:n.options.preview.math}),t.firstElementChild.addEventListener("click",(function(a){for(var r=a.target;r&&!r.isEqualNode(t);){if(r.classList.contains("vditor-outline__action")){r.classList.contains("vditor-outline__action--close")?(r.classList.remove("vditor-outline__action--close"),r.parentElement.nextElementSibling.setAttribute("style","display:block")):(r.classList.add("vditor-outline__action--close"),r.parentElement.nextElementSibling.setAttribute("style","display:none")),a.preventDefault(),a.stopPropagation();break}if(r.getAttribute("data-target-id")){a.preventDefault(),a.stopPropagation();var i=document.getElementById(r.getAttribute("data-target-id"));if(!i)return;if(n)if("auto"===n.options.height){var o=i.offsetTop+n.element.offsetTop;n.options.toolbarConfig.pin||(o+=n.toolbar.element.offsetHeight),window.scrollTo(window.scrollX,o)}else n.element.offsetTop<window.scrollY&&window.scrollTo(window.scrollX,n.element.offsetTop),n.preview.element.contains(e)?e.parentElement.scrollTop=i.offsetTop:e.scrollTop=i.offsetTop;else window.scrollTo(window.scrollX,i.offsetTop);break}r=r.parentElement}})),i)}},229:(e,t,n)=>{n.d(t,{B:()=>o});var a=n(145),r=n(413),i=n(840),o=function(e,t){void 0===e&&(e=document),void 0===t&&(t=a.g.CDN);var n=i.plantumlRenderAdapter.getElements(e);0!==n.length&&(0,r.G)("".concat(t,"/dist/js/plantuml/plantuml-encoder.min.js"),"vditorPlantumlScript").then((function(){n.forEach((function(e){if(!e.parentElement.classList.contains("vditor-wysiwyg__pre")&&!e.parentElement.classList.contains("vditor-ir__marker--pre")){var t=i.plantumlRenderAdapter.getCode(e).trim();if(t)try{e.innerHTML='<object type="image/svg+xml" data="https://www.plantuml.com/plantuml/svg/~1'.concat(plantumlEncoder.encode(t),'"/>')}catch(t){e.className="vditor-reset--error",e.innerHTML="plantuml render error: <br>".concat(t)}}}))}))}},214:(e,t,n)=>{n.d(t,{X:()=>a});var a=function(e){var t=Lute.New();return t.PutEmojis(e.emojis),t.SetEmojiSite(e.emojiSite),t.SetHeadingAnchor(e.headingAnchor),t.SetInlineMathAllowDigitAfterOpenMarker(e.inlineMathDigit),t.SetAutoSpace(e.autoSpace),t.SetToC(e.toc),t.SetFootnotes(e.footnotes),t.SetFixTermTypo(e.fixTermTypo),t.SetVditorCodeBlockPreview(e.codeBlockPreview),t.SetVditorMathBlockPreview(e.mathBlockPreview),t.SetSanitize(e.sanitize),t.SetChineseParagraphBeginningSpace(e.paragraphBeginningSpace),t.SetRenderListStyle(e.listStyle),t.SetLinkBase(e.linkBase),t.SetLinkPrefix(e.linkPrefix),t.SetMark(e.mark),t.SetGFMAutoLink(e.gfmAutoLink),e.lazyLoadImage&&t.SetImageLazyLoading(e.lazyLoadImage),t.SetSup(e.sup),t.SetSub(e.sub),t}},190:(e,t,n)=>{n.d(t,{E:()=>a});var a=function(e,t,n){void 0===t&&(t="zh_CN"),void 0===n&&(n="classic");var a=e.getBoundingClientRect();document.body.insertAdjacentHTML("beforeend",'<div class="vditor vditor-img'.concat("dark"===n?" vditor--dark":"",'">\n <div class="vditor-img__bar">\n <span class="vditor-img__btn" data-deg="0">\n <svg><use xlink:href="#vditor-icon-redo"></use></svg>\n ').concat(window.VditorI18n.spin,"\n </span>\n <span class=\"vditor-img__btn\" onclick=\"this.parentElement.parentElement.outerHTML = '';document.body.style.overflow = ''\">\n X &nbsp;").concat(window.VditorI18n.close,'\n </span>\n </div>\n <div class="vditor-img__img" onclick="this.parentElement.outerHTML = \'\';document.body.style.overflow = \'\'">\n <img style="width: ').concat(e.width,"px;height:").concat(e.height,"px;transform: translate3d(").concat(a.left,"px, ").concat(a.top-36,'px, 0)" src="').concat(e.getAttribute("src"),'">\n </div>\n</div>')),document.body.style.overflow="hidden";var r=document.querySelector(".vditor-img img"),i="translate3d(".concat(Math.max(0,window.innerWidth-e.naturalWidth)/2,"px, ").concat(Math.max(0,window.innerHeight-36-e.naturalHeight)/2,"px, 0)");setTimeout((function(){r.setAttribute("style","transition: transform .3s ease-in-out;transform: ".concat(i)),setTimeout((function(){r.parentElement.scrollTo((r.parentElement.scrollWidth-r.parentElement.clientWidth)/2,(r.parentElement.scrollHeight-r.parentElement.clientHeight)/2)}),400)}));var o=document.querySelector(".vditor-img__btn");o.addEventListener("click",(function(){var t=parseInt(o.getAttribute("data-deg"),10)+90;t/90%2==1&&e.naturalWidth>r.parentElement.clientHeight?r.style.transform="translate3d(".concat(Math.max(0,window.innerWidth-e.naturalWidth)/2,"px, ").concat(e.naturalWidth/2-e.naturalHeight/2,"px, 0) rotateZ(").concat(t,"deg)"):r.style.transform="".concat(i," rotateZ(").concat(t,"deg)"),o.setAttribute("data-deg",t.toString()),setTimeout((function(){r.parentElement.scrollTo((r.parentElement.scrollWidth-r.parentElement.clientWidth)/2,(r.parentElement.scrollHeight-r.parentElement.clientHeight)/2)}),400)}))}},580:(e,t,n)=>{n.d(t,{Y:()=>i});var a=n(145),r=n(290),i=function(e,t){void 0===t&&(t=a.g.CDN),a.g.CODE_THEME.includes(e)||(e="github");var n=document.getElementById("vditorHljsStyle"),i="".concat(t,"/dist/js/highlight.js/styles/").concat(e,".min.css");n?n.getAttribute("href")!==i&&(n.remove(),(0,r.c)(i,"vditorHljsStyle")):(0,r.c)(i,"vditorHljsStyle")}},538:(e,t,n)=>{n.d(t,{Z:()=>r});var a=n(290),r=function(e,t){if(e&&t){var n=document.getElementById("vditorContentTheme"),r="".concat(t,"/").concat(e,".css");n?n.getAttribute("href")!==r&&(n.remove(),(0,a.c)(r,"vditorContentTheme")):(0,a.c)(r,"vditorContentTheme")}}},413:(e,t,n)=>{n.d(t,{J:()=>a,G:()=>r});var a=function(e,t){if(document.getElementById(t))return!1;var n=new XMLHttpRequest;n.open("GET",e,!1),n.setRequestHeader("Accept","text/javascript, application/javascript, application/ecmascript, application/x-ecmascript, */*; q=0.01"),n.send("");var a=document.createElement("script");a.type="text/javascript",a.text=n.responseText,a.id=t,document.head.appendChild(a)},r=function(e,t){return new Promise((function(n,a){if(document.getElementById(t))return n(!0),!1;var r=document.createElement("script");r.src=e,r.async=!0,document.head.appendChild(r),r.onerror=function(e){a(e)},r.onload=function(){if(document.getElementById(t))return r.remove(),n(!0),!1;r.id=t,n(!0)}}))}},290:(e,t,n)=>{n.d(t,{c:()=>a});var a=function(e,t){if(!document.getElementById(t)){var n=document.createElement("link");n.id=t,n.rel="stylesheet",n.type="text/css",n.href=e,document.getElementsByTagName("head")[0].appendChild(n)}}},105:(e,t,n)=>{n.d(t,{X:()=>a});var a=function(e){return e.replace(/\u00a0/g," ")}},494:(e,t,n)=>{n.d(t,{Wb:()=>a,on:()=>r,Qf:()=>i});var a=function(){return([1e7].toString()+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(parseInt(e,10)^window.crypto.getRandomValues(new Uint32Array(1))[0]&15>>parseInt(e,10)/4).toString(16)}))},r=function(e,t){void 0===t&&(t=window.location.search);var n=t.substring(t.indexOf("?")),a=n.indexOf("#");return new URLSearchParams(n.substring(0,a>=0?a:void 0)).get(e)},i=function(e){return Function('"use strict";return ('.concat(e,")"))()}},106:(e,t,n)=>{n.d(t,{lG:()=>a,fb:()=>r});var a=function(e,t){if(!e)return!1;3===e.nodeType&&(e=e.parentElement);for(var n=e,a=!1;n&&!a&&!n.classList.contains("vditor-reset");)n.nodeName===t?a=!0:n=n.parentElement;return a&&n},r=function(e,t){if(!e)return!1;3===e.nodeType&&(e=e.parentElement);for(var n=e,a=!1;n&&!a&&!n.classList.contains("vditor-reset");)n.classList.contains(t)?a=!0:n=n.parentElement;return a&&n}},771:(e,t,n)=>{n.d(t,{W:()=>a});var a=function(e){var t=function(e,t){if(!e)return!1;3===e.nodeType&&(e=e.parentElement);for(var n=e,a=!1;n&&!a&&!n.classList.contains("vditor-reset");)0===n.nodeName.indexOf(t)?a=!0:n=n.parentElement;return a&&n}(e,"H");return!(!t||2!==t.tagName.length||"HR"===t.tagName)&&t}},673:(e,t,n)=>{n.d(t,{T:()=>a});var a=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n={},r=function(e){for(var t in e)e.hasOwnProperty(t)&&("[object Object]"===Object.prototype.toString.call(e[t])?n[t]=a(n[t],e[t]):n[t]=e[t])},i=0;i<e.length;i++)r(e[i]);return n}},810:(e,t,n)=>{n.d(t,{Hc:()=>a});n(145);var a=function(e){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}}},t={};function n(a){var r=t[a];if(void 0!==r)return r.exports;var i=t[a]={exports:{}};return e[a](i,i.exports,n),i.exports}n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{n.d(a,{default:()=>I});var e=n(135),t=n(840),r=n(775),i=n(428),o=n(325),s=n(483),c=n(999),l=function(e){void 0===e&&(e=document);var t=function(e){var t=document.createElement("img");t.src=e.getAttribute("data-src"),t.addEventListener("load",(function(){e.getAttribute("style")||e.getAttribute("class")||e.getAttribute("width")||e.getAttribute("height")||t.naturalHeight>t.naturalWidth&&t.naturalWidth/t.naturalHeight<document.querySelector(".vditor-reset").clientWidth/(window.innerHeight-40)&&t.naturalHeight>window.innerHeight-40&&(e.style.height=window.innerHeight-40+"px"),e.src=t.src})),e.removeAttribute("data-src")};if(!("IntersectionObserver"in window))return e.querySelectorAll("img").forEach((function(e){e.getAttribute("data-src")&&t(e)})),!1;window.vditorImageIntersectionObserver?(window.vditorImageIntersectionObserver.disconnect(),e.querySelectorAll("img").forEach((function(e){window.vditorImageIntersectionObserver.observe(e)}))):(window.vditorImageIntersectionObserver=new IntersectionObserver((function(e){e.forEach((function(e){(void 0===e.isIntersecting?0!==e.intersectionRatio:e.isIntersecting)&&e.target.getAttribute("data-src")&&t(e.target)}))})),e.querySelectorAll("img").forEach((function(e){window.vditorImageIntersectionObserver.observe(e)})))},d=n(472),u=n(280),m=n(637),p=n(825),h=n(11),v=n(194),f=n(436),g=n(229),b=n(145),y=n(538),w=n(413),S=n(106),k=n(673),E=n(214),x=n(810),A=function(e,t){if(void 0===t&&(t="zh_CN"),"undefined"!=typeof speechSynthesis&&"undefined"!=typeof SpeechSynthesisUtterance){var n=function(){var e,n;return speechSynthesis.getVoices().forEach((function(a){a.lang===t.replace("_","-")&&(e=a),a.default&&(n=a)})),e||(e=n),e},a='<svg><use xlink:href="#vditor-icon-play"></use></svg>',r='<svg><use xlink:href="#vditor-icon-pause"></use></svg>';document.getElementById("vditorIconScript")||(a='<svg viewBox="0 0 32 32"><path d="M3.436 0l25.128 16-25.128 16v-32z"></path></svg>',r='<svg viewBox="0 0 32 32"><path d="M20.617 0h9.128v32h-9.128v-32zM2.255 32v-32h9.128v32h-9.128z"></path></svg>');var i=document.querySelector(".vditor-speech");i||((i=document.createElement("button")).className="vditor-speech",e.insertAdjacentElement("beforeend",i),void 0!==speechSynthesis.onvoiceschanged&&(speechSynthesis.onvoiceschanged=n));var o=n(),s=new SpeechSynthesisUtterance;s.voice=o,s.onend=s.onerror=function(){i.style.display="none",speechSynthesis.cancel(),i.classList.remove("vditor-speech--current"),i.innerHTML=a},e.addEventListener(void 0!==window.ontouchstart?"touchend":"click",(function(t){var n=t.target;if(n.classList.contains("vditor-speech")||n.parentElement.classList.contains("vditor-speech"))return i.classList.contains("vditor-speech--current")?speechSynthesis.speaking&&(speechSynthesis.paused?(speechSynthesis.resume(),i.innerHTML=r):(speechSynthesis.pause(),i.innerHTML=a)):(s.text=i.getAttribute("data-text"),speechSynthesis.speak(s),i.classList.add("vditor-speech--current"),i.innerHTML=r),(0,x.Hc)(window.vditorSpeechRange),void e.focus();if(i.style.display="none",speechSynthesis.cancel(),i.classList.remove("vditor-speech--current"),i.innerHTML=a,0!==getSelection().rangeCount){var o=getSelection().getRangeAt(0),c=o.toString().trim();if(c){window.vditorSpeechRange=o.cloneRange();var l=o.getBoundingClientRect();i.innerHTML=a,i.style.display="block",i.style.top=l.top+l.height+document.querySelector("html").scrollTop-20+"px",void 0!==window.ontouchstart?i.style.left=t.changedTouches[t.changedTouches.length-1].pageX+2+"px":i.style.left=t.clientX+2+"px",i.setAttribute("data-text",c)}}}))}},L=function(e,t,n,a){return new(n||(n=Promise))((function(r,i){function o(e){try{c(a.next(e))}catch(e){i(e)}}function s(e){try{c(a.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((a=a.apply(e,t||[])).next())}))},T=function(e,t){var n,a,r,i,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(n=1,a&&(r=2&s[0]?a.return:s[0]?a.throw||((r=a.return)&&r.call(a),0):a.next)&&!(r=r.call(a,s[1])).done)return r;switch(a=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,a=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],a=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}},M=function(e){var t,n={anchor:0,cdn:b.g.CDN,customEmoji:{},emojiPath:"".concat(b.g.CDN,"/dist/images/emoji"),hljs:b.g.HLJS_OPTIONS,icon:"ant",lang:"zh_CN",markdown:b.g.MARKDOWN_OPTIONS,math:b.g.MATH_OPTIONS,mode:"light",speech:{enable:!1},render:{media:{enable:!0}},theme:b.g.THEME_OPTIONS};return e.cdn&&((null===(t=e.theme)||void 0===t?void 0:t.path)||(n.theme.path="".concat(e.cdn,"/dist/css/content-theme")),e.emojiPath||(n.emojiPath="".concat(e.cdn,"/dist/images/emoji"))),(0,k.T)(n,e)},C=function(e,t){var n=M(t);return(0,w.G)("".concat(n.cdn,"/dist/js/lute/lute.min.js"),"vditorLuteScript").then((function(){var a=(0,E.X)({autoSpace:n.markdown.autoSpace,gfmAutoLink:n.markdown.gfmAutoLink,codeBlockPreview:n.markdown.codeBlockPreview,emojiSite:n.emojiPath,emojis:n.customEmoji,fixTermTypo:n.markdown.fixTermTypo,footnotes:n.markdown.footnotes,headingAnchor:0!==n.anchor,inlineMathDigit:n.math.inlineDigit,lazyLoadImage:n.lazyLoadImage,linkBase:n.markdown.linkBase,linkPrefix:n.markdown.linkPrefix,listStyle:n.markdown.listStyle,mark:n.markdown.mark,mathBlockPreview:n.markdown.mathBlockPreview,paragraphBeginningSpace:n.markdown.paragraphBeginningSpace,sanitize:n.markdown.sanitize,sub:n.markdown.sub,sup:n.markdown.sup,toc:n.markdown.toc});return(null==t?void 0:t.renderers)&&a.SetJSRenderers({renderers:{Md2HTML:t.renderers}}),a.SetHeadingID(!0),a.Md2HTML(e)}))},_=function(t,n,a){return L(void 0,void 0,void 0,(function(){var f,b,k,E;return T(this,(function(x){switch(x.label){case 0:return f=M(a),[4,C(n,f)];case 1:if(b=x.sent(),f.transform&&(b=f.transform(b)),t.innerHTML=b,t.classList.add("vditor-reset"),f.i18n)return[3,5];if(["de_DE","en_US","es_ES","fr_FR","ja_JP","ko_KR","pt_BR","ru_RU","sv_SE","vi_VN","zh_CN","zh_TW"].includes(f.lang))return[3,2];throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");case 2:return E=(k="vditorI18nScript")+f.lang,document.querySelectorAll('head script[id^="'.concat(k,'"]')).forEach((function(e){e.id!==E&&document.head.removeChild(e)})),[4,(0,w.G)("".concat(f.cdn,"/dist/js/i18n/").concat(f.lang,".js"),E)];case 3:x.sent(),x.label=4;case 4:return[3,6];case 5:window.VditorI18n=f.i18n,x.label=6;case 6:return f.icon?[4,(0,w.G)("".concat(f.cdn,"/dist/js/icons/").concat(f.icon,".js"),"vditorIconScript")]:[3,8];case 7:x.sent(),x.label=8;case 8:return(0,y.Z)(f.theme.current,f.theme.path),1===f.anchor&&t.classList.add("vditor-reset--anchor"),(0,i.O)(t,f.hljs),(0,c.s)(f.hljs,t,f.cdn),(0,d.H)(t,{cdn:f.cdn,math:f.math}),(0,m.i)(t,f.cdn,f.mode),(0,p.J)(t,f.cdn,f.mode),(0,h.K)(t,f.cdn),(0,o.P)(t,f.cdn),(0,s.v)(t,f.cdn),(0,r.p)(t,f.cdn,f.mode),(0,v.P)(t,f.cdn,f.mode),(0,g.B)(t,f.cdn),(0,e.Q)(t,f.cdn),f.render.media.enable&&(0,u.Y)(t),f.speech.enable&&A(t),0!==f.anchor&&(L=f.anchor,document.querySelectorAll(".vditor-anchor").forEach((function(e){1===L&&e.classList.add("vditor-anchor--left"),e.onclick=function(){var t=e.getAttribute("href").substr(1),n=document.getElementById("vditorAnchor-"+t).offsetTop;document.querySelector("html").scrollTop=n}})),window.onhashchange=function(){var e=document.getElementById("vditorAnchor-"+decodeURIComponent(window.location.hash.substr(1)));e&&(document.querySelector("html").scrollTop=e.offsetTop)}),f.after&&f.after(),f.lazyLoadImage&&l(t),t.addEventListener("click",(function(e){var n=(0,S.lG)(e.target,"SPAN");if(n&&(0,S.fb)(n,"vditor-toc")){var a=t.querySelector("#"+n.getAttribute("data-target-id"));a&&window.scrollTo(window.scrollX,a.offsetTop)}else;})),[2]}var L}))}))},j=n(190),H=n(580);const I=function(){function n(){}return n.adapterRender=t,n.previewImage=j.E,n.codeRender=i.O,n.graphvizRender=s.v,n.highlightRender=c.s,n.mathRender=d.H,n.mermaidRender=m.i,n.SMILESRender=p.J,n.markmapRender=h.K,n.flowchartRender=o.P,n.chartRender=r.p,n.abcRender=e.Q,n.mindmapRender=v.P,n.plantumlRender=g.B,n.outlineRender=f.k,n.mediaRender=u.Y,n.speechRender=A,n.lazyLoadImageRender=l,n.md2html=C,n.preview=_,n.setCodeTheme=H.Y,n.setContentTheme=y.Z,n}()})(),a=a.default})()}));
@@ -0,0 +1,46 @@
1
+ declare const _VDITOR_VERSION: string;
2
+ export { _VDITOR_VERSION as VDITOR_VERSION };
3
+ export declare abstract class Constants {
4
+ static readonly ZWSP: string;
5
+ static readonly DROP_EDITOR: string;
6
+ static readonly MOBILE_WIDTH: number;
7
+ static readonly CLASS_MENU_DISABLED: string;
8
+ static readonly EDIT_TOOLBARS: string[];
9
+ static readonly CODE_THEME: string[];
10
+ static readonly ALIAS_CODE_LANGUAGES: string[];
11
+ static readonly CDN: string;
12
+ static readonly MARKDOWN_OPTIONS: {
13
+ autoSpace: boolean;
14
+ gfmAutoLink: boolean;
15
+ codeBlockPreview: boolean;
16
+ fixTermTypo: boolean;
17
+ footnotes: boolean;
18
+ linkBase: string;
19
+ linkPrefix: string;
20
+ listStyle: boolean;
21
+ mark: boolean;
22
+ mathBlockPreview: boolean;
23
+ paragraphBeginningSpace: boolean;
24
+ sanitize: boolean;
25
+ sub: boolean;
26
+ sup: boolean;
27
+ toc: boolean;
28
+ };
29
+ static readonly HLJS_OPTIONS: {
30
+ enable: boolean;
31
+ lineNumber: boolean;
32
+ defaultLang: string;
33
+ style: string;
34
+ };
35
+ static readonly MATH_OPTIONS: IMath;
36
+ static readonly THEME_OPTIONS: {
37
+ current: string;
38
+ list: {
39
+ "ant-design": string;
40
+ dark: string;
41
+ light: string;
42
+ wechat: string;
43
+ };
44
+ path: string;
45
+ };
46
+ }
@@ -0,0 +1,6 @@
1
+ export declare class DevTools {
2
+ element: HTMLDivElement;
3
+ private ASTChart;
4
+ constructor();
5
+ renderEchart(vditor: IVditor): void;
6
+ }
@@ -0,0 +1,4 @@
1
+ export declare const download: (vditor: IVditor, content: string, filename: string) => void;
2
+ export declare const exportMarkdown: (vditor: IVditor) => void;
3
+ export declare const exportPDF: (vditor: IVditor) => void;
4
+ export declare const exportHTML: (vditor: IVditor) => void;
@@ -0,0 +1,13 @@
1
+ export declare class Hint {
2
+ timeId: number;
3
+ element: HTMLDivElement;
4
+ recentLanguage: string;
5
+ private splitChar;
6
+ private lastIndex;
7
+ constructor(hintExtends: IHintExtend[]);
8
+ render(vditor: IVditor): void;
9
+ genHTML(data: IHintData[], key: string, vditor: IVditor): void;
10
+ fillEmoji: (element: HTMLElement, vditor: IVditor) => void;
11
+ select(event: KeyboardEvent, vditor: IVditor): boolean;
12
+ private getKey;
13
+ }
@@ -0,0 +1 @@
1
+ export declare const expandMarker: (range: Range, vditor: IVditor) => void;
@@ -0,0 +1 @@
1
+ export declare const highlightToolbarIR: (vditor: IVditor) => void;
@@ -0,0 +1,12 @@
1
+ declare class IR {
2
+ range: Range;
3
+ element: HTMLPreElement;
4
+ processTimeoutId: number;
5
+ hlToolbarTimeoutId: number;
6
+ composingLock: boolean;
7
+ preventInput: boolean;
8
+ constructor(vditor: IVditor);
9
+ private copy;
10
+ private bindEvent;
11
+ }
12
+ export { IR };
@@ -0,0 +1 @@
1
+ export declare const input: (vditor: IVditor, range: Range, ignoreSpace?: boolean, event?: InputEvent) => void;
@@ -0,0 +1,8 @@
1
+ export declare const processHint: (vditor: IVditor) => void;
2
+ export declare const processAfterRender: (vditor: IVditor, options?: {
3
+ enableAddUndoStack: boolean;
4
+ enableHint: boolean;
5
+ enableInput: boolean;
6
+ }) => void;
7
+ export declare const processHeading: (vditor: IVditor, value: string) => void;
8
+ export declare const processToolbar: (vditor: IVditor, actionBtn: Element, prefix: string, suffix: string) => void;
@@ -0,0 +1 @@
1
+ export declare const processKeydown: (vditor: IVditor, event: KeyboardEvent) => boolean;
@@ -0,0 +1 @@
1
+ export declare const SMILESRender: (element: (HTMLElement | Document), cdn: string, theme: string) => void;
@@ -0,0 +1 @@
1
+ export declare const abcRender: (element?: (HTMLElement | Document), cdn?: string) => void;
@@ -0,0 +1,51 @@
1
+ export declare const mathRenderAdapter: {
2
+ getCode: (el: Element) => string;
3
+ getElements: (element: HTMLElement | Document) => NodeListOf<Element>;
4
+ };
5
+ export declare const SMILESRenderAdapter: {
6
+ getCode: (el: Element) => string;
7
+ getElements: (element: HTMLElement | Document) => NodeListOf<Element>;
8
+ };
9
+ export declare const mermaidRenderAdapter: {
10
+ /** 不仅要返回code,并且需要将 code 设置为 el 的 innerHTML */
11
+ getCode: (el: Element) => string;
12
+ getElements: (element: HTMLElement | Document) => NodeListOf<Element>;
13
+ };
14
+ export declare const markmapRenderAdapter: {
15
+ getCode: (el: Element) => string;
16
+ getElements: (element: HTMLElement | Document) => NodeListOf<Element>;
17
+ };
18
+ export declare const mindmapRenderAdapter: {
19
+ getCode: (el: Element) => string;
20
+ getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
21
+ };
22
+ /**
23
+ * ECharts 渲染适配器:获取/定位 `.language-echarts` 代码块与相关元素。
24
+ */
25
+ export declare const chartRenderAdapter: {
26
+ getCode: (el: HTMLElement) => string;
27
+ getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
28
+ /**
29
+ * 更新同级别的 Markdown 源代码(vditor-wysiwyg__pre > code),并进行“一个字段一行”的轻量格式化。
30
+ * 不修改渲染区域(canvas),避免过度格式化数组/内层对象。
31
+ * @param el 预览区域中的 `.language-echarts` 元素或其子孙节点
32
+ * @param code 新的 ECharts 配置文本(JSON/JS 字符串)
33
+ */
34
+ setCode: (el: HTMLElement, code: string) => void;
35
+ };
36
+ export declare const abcRenderAdapter: {
37
+ getCode: (el: Element) => string;
38
+ getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
39
+ };
40
+ export declare const graphvizRenderAdapter: {
41
+ getCode: (el: Element) => string;
42
+ getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
43
+ };
44
+ export declare const flowchartRenderAdapter: {
45
+ getCode: (el: Element) => string;
46
+ getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
47
+ };
48
+ export declare const plantumlRenderAdapter: {
49
+ getCode: (el: Element) => string;
50
+ getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
51
+ };
@@ -0,0 +1 @@
1
+ export declare const anchorRender: (type: number) => void;
@@ -0,0 +1 @@
1
+ export declare const chartRender: (element: HTMLElement | Document, cdn: string, theme: string) => void;
@@ -0,0 +1 @@
1
+ export declare const codeRender: (element: HTMLElement, option?: IHljs) => void;
@@ -0,0 +1 @@
1
+ export declare const flowchartRender: (element: HTMLElement, cdn?: string) => void;
@@ -0,0 +1 @@
1
+ export declare const getHTML: (vditor: IVditor) => string;
@@ -0,0 +1 @@
1
+ export declare const getMarkdown: (vditor: IVditor) => string;
@@ -0,0 +1 @@
1
+ export declare const graphvizRender: (element: HTMLElement, cdn?: string) => void;
@@ -0,0 +1 @@
1
+ export declare const highlightRender: (hljsOption?: IHljs, element?: HTMLElement | Document, cdn?: string) => void;
@@ -0,0 +1,6 @@
1
+ declare global {
2
+ interface Window {
3
+ vditorImageIntersectionObserver: IntersectionObserver;
4
+ }
5
+ }
6
+ export declare const lazyLoadImageRender: (element?: (HTMLElement | Document)) => boolean;
@@ -0,0 +1 @@
1
+ export declare const markmapRender: (element?: (HTMLElement | Document), cdn?: string) => void;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * 绑定指定数学元素的右键事件,展示自定义菜单。
3
+ */
4
+ export declare const bindMathContextMenu: (mathEl: HTMLElement) => void;
5
+ /**
6
+ * 为数学元素绑定复制拦截:选区完全在数学容器内时,仅复制可见文本
7
+ * 保持与 WYSIWYG 模式一致的行为
8
+ * @param mathEl 数学公式容器(.language-math)
9
+ */
10
+ export declare const bindMathCopyInterceptor: (mathEl: HTMLElement) => void;
11
+ /**
12
+ * 在指定容器内批量为 IR/WYSIWYG 的数学元素绑定交互(右键菜单 + 复制拦截)
13
+ * - 预览/分屏预览容器内的元素会被跳过
14
+ * - 自动避免重复绑定
15
+ * @param container 扫描范围容器(例如 vditor.ir.element 或 vditor.wysiwyg.element)
16
+ */
17
+ export declare const bindMathInteractionsInContainer: (container: HTMLElement) => void;
@@ -0,0 +1,19 @@
1
+ declare global {
2
+ interface Window {
3
+ MathJax: any;
4
+ }
5
+ }
6
+ /**
7
+ * 数学公式渲染入口
8
+ *
9
+ * 默认使用 MathJax 渲染(SVG 输出),并在需要时按需加载相关脚本与样式。
10
+ * 支持通过 options.math.engine 切换为 KaTeX。
11
+ *
12
+ * 参数说明:
13
+ * - element: 需要进行数学渲染的根容器(默认 document)
14
+ * - options: 包含 cdn 路径与 math 相关设置(engine、inlineDigit、macros 等)
15
+ */
16
+ export declare const mathRender: (element?: HTMLElement | Document, options?: {
17
+ cdn?: string;
18
+ math?: IMath;
19
+ }) => void;
@@ -0,0 +1 @@
1
+ export declare const mediaRender: (element: HTMLElement) => void;
@@ -0,0 +1 @@
1
+ export declare const mermaidRender: (element: (HTMLElement | Document), cdn: string, theme: string) => void;
@@ -0,0 +1 @@
1
+ export declare const mindmapRender: (element: (HTMLElement | Document), cdn: string, theme: string) => void;
@@ -0,0 +1 @@
1
+ export declare const outlineRender: (contentElement: HTMLElement, targetElement: Element, vditor?: IVditor) => string;
@@ -0,0 +1 @@
1
+ export declare const plantumlRender: (element?: (HTMLElement | Document), cdn?: string) => void;
@@ -0,0 +1,2 @@
1
+ export declare const md2html: (mdText: string, options?: IPreviewOptions) => Promise<string>;
2
+ export declare const previewRender: (previewElement: HTMLDivElement, markdown: string, options?: IPreviewOptions) => Promise<void>;
@@ -0,0 +1 @@
1
+ export declare const setLute: (options: ILuteOptions) => Lute;
@@ -0,0 +1,6 @@
1
+ declare global {
2
+ interface Window {
3
+ vditorSpeechRange: Range;
4
+ }
5
+ }
6
+ export declare const speechRender: (element: HTMLElement, lang?: keyof II18n) => void;
@@ -0,0 +1,6 @@
1
+ export declare class Outline {
2
+ element: HTMLElement;
3
+ constructor(outlineLabel: string);
4
+ render(vditor: IVditor): string;
5
+ toggle(vditor: IVditor, show?: boolean, focus?: boolean): void;
6
+ }
@@ -0,0 +1 @@
1
+ export declare const previewImage: (oldImgElement: HTMLImageElement, lang?: keyof II18n, theme?: string) => void;
@@ -0,0 +1,26 @@
1
+ export declare class Preview {
2
+ element: HTMLElement;
3
+ previewElement: HTMLElement;
4
+ private mdTimeoutId;
5
+ /**
6
+ * 构造预览区域容器,注册复制与点击事件。
7
+ * - 复制:将选区内容以干净的 HTML 形式复制,避免多余样式。
8
+ * - 点击:处理目录跳转、链接打开与图片预览。
9
+ * 已移除 options.preview.actions 面板及按钮交互。
10
+ */
11
+ constructor(vditor: IVditor);
12
+ /**
13
+ * 渲染预览内容。
14
+ * - 优先使用远程接口(options.preview.url);失败则使用 Lute 本地渲染。
15
+ * - 支持 transform 前置转换与 afterRender 后置资源渲染。
16
+ */
17
+ render(vditor: IVditor, value?: string): void;
18
+ /**
19
+ * 渲染完成后的处理:执行 parse 回调、性能提示、取消评论高亮、代码与图形等资源渲染。
20
+ */
21
+ private afterRender;
22
+ /**
23
+ * 复制到剪贴板:修正数学公式显示、清理多余样式并执行复制。
24
+ */
25
+ private copyToClipboard;
26
+ }
@@ -0,0 +1,5 @@
1
+ export declare class Resize {
2
+ element: HTMLElement;
3
+ constructor(vditor: IVditor);
4
+ private bindEvent;
5
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 合并脚注
3
+ * @param elements vditor.sv.element
4
+ * @param afterCombine 每个脚注块合并完成后的回调, param: root为合并后的脚注块
5
+ */
6
+ export declare const combineFootnote: (elements: HTMLElement, afterCombine?: (root: HTMLElement) => void) => void;
@@ -0,0 +1,12 @@
1
+ declare class Editor {
2
+ range: Range;
3
+ element: HTMLPreElement;
4
+ composingLock: boolean;
5
+ processTimeoutId: number;
6
+ hlToolbarTimeoutId: number;
7
+ preventInput: boolean;
8
+ constructor(vditor: IVditor);
9
+ private copy;
10
+ private bindEvent;
11
+ }
12
+ export { Editor };
@@ -0,0 +1 @@
1
+ export declare const inputEvent: (vditor: IVditor, event?: InputEvent) => void;
@@ -0,0 +1,11 @@
1
+ export declare const processPaste: (vditor: IVditor, text: string) => void;
2
+ export declare const getSideByType: (spanNode: Node, type: string, isPrevious?: boolean) => false | Element;
3
+ export declare const processSpinVditorSVDOM: (html: string, vditor: IVditor) => string;
4
+ export declare const processPreviousMarkers: (spanElement: HTMLElement) => string;
5
+ export declare const processAfterRender: (vditor: IVditor, options?: {
6
+ enableAddUndoStack: boolean;
7
+ enableHint: boolean;
8
+ enableInput: boolean;
9
+ }) => void;
10
+ export declare const processHeading: (vditor: IVditor, value: string) => void;
11
+ export declare const processToolbar: (vditor: IVditor, actionBtn: Element, prefix: string, suffix: string) => void;
@@ -0,0 +1 @@
1
+ export declare const processKeydown: (vditor: IVditor, event: KeyboardEvent) => boolean;
@@ -0,0 +1,6 @@
1
+ export declare class Tip {
2
+ element: HTMLElement;
3
+ constructor();
4
+ show(text: string, time?: number): void;
5
+ hide(): void;
6
+ }
@@ -0,0 +1,4 @@
1
+ import { MenuItem } from "./MenuItem";
2
+ export declare class Both extends MenuItem {
3
+ constructor(vditor: IVditor, menuItem: IMenuItem);
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare class Br {
2
+ element: HTMLElement;
3
+ constructor();
4
+ }
@@ -0,0 +1,5 @@
1
+ import { MenuItem } from "./MenuItem";
2
+ export declare class CodeTheme extends MenuItem {
3
+ element: HTMLElement;
4
+ constructor(vditor: IVditor, menuItem: IMenuItem);
5
+ }
@@ -0,0 +1,5 @@
1
+ import { MenuItem } from "./MenuItem";
2
+ export declare class ContentTheme extends MenuItem {
3
+ element: HTMLElement;
4
+ constructor(vditor: IVditor, menuItem: IMenuItem);
5
+ }
@@ -0,0 +1,5 @@
1
+ export declare class Counter {
2
+ element: HTMLElement;
3
+ constructor(vditor: IVditor);
4
+ render(vditor: IVditor, mdText: string): void;
5
+ }
@@ -0,0 +1,4 @@
1
+ import { MenuItem } from "./MenuItem";
2
+ export declare class Custom extends MenuItem {
3
+ constructor(vditor: IVditor, menuItem: IMenuItem);
4
+ }