@nocobase/plugin-block-markdown 2.0.0-alpha.22

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 (330) hide show
  1. package/LICENSE.txt +172 -0
  2. package/README.md +1 -0
  3. package/build.config.ts +15 -0
  4. package/client.d.ts +2 -0
  5. package/client.js +1 -0
  6. package/dist/client/index.d.ts +9 -0
  7. package/dist/client/index.js +10 -0
  8. package/dist/client/locale.d.ts +10 -0
  9. package/dist/client/models/MarkdownBlockModel.d.ts +13 -0
  10. package/dist/client/models/index.d.ts +10 -0
  11. package/dist/client/plugin.d.ts +15 -0
  12. package/dist/client/vditor/dist/css/content-theme/ant-design.css +210 -0
  13. package/dist/client/vditor/dist/css/content-theme/dark.css +123 -0
  14. package/dist/client/vditor/dist/css/content-theme/light.css +101 -0
  15. package/dist/client/vditor/dist/css/content-theme/wechat.css +94 -0
  16. package/dist/client/vditor/dist/images/emoji/b3log.png +0 -0
  17. package/dist/client/vditor/dist/images/emoji/chainbook.png +0 -0
  18. package/dist/client/vditor/dist/images/emoji/doge.png +0 -0
  19. package/dist/client/vditor/dist/images/emoji/hacpai.png +0 -0
  20. package/dist/client/vditor/dist/images/emoji/huaji.gif +0 -0
  21. package/dist/client/vditor/dist/images/emoji/latke.png +0 -0
  22. package/dist/client/vditor/dist/images/emoji/liandi.png +0 -0
  23. package/dist/client/vditor/dist/images/emoji/lute.png +0 -0
  24. package/dist/client/vditor/dist/images/emoji/octocat.png +0 -0
  25. package/dist/client/vditor/dist/images/emoji/pipe.png +0 -0
  26. package/dist/client/vditor/dist/images/emoji/siyuan.png +0 -0
  27. package/dist/client/vditor/dist/images/emoji/solo.png +0 -0
  28. package/dist/client/vditor/dist/images/emoji/sym.png +0 -0
  29. package/dist/client/vditor/dist/images/emoji/trollface.png +0 -0
  30. package/dist/client/vditor/dist/images/emoji/vditor.png +0 -0
  31. package/dist/client/vditor/dist/images/emoji/wide.png +0 -0
  32. package/dist/client/vditor/dist/images/emoji/wulian.png +0 -0
  33. package/dist/client/vditor/dist/images/img-loading.svg +1 -0
  34. package/dist/client/vditor/dist/images/logo.png +0 -0
  35. package/dist/client/vditor/dist/index.css +1836 -0
  36. package/dist/client/vditor/dist/index.d.ts +76 -0
  37. package/dist/client/vditor/dist/index.min.js +10 -0
  38. package/dist/client/vditor/dist/js/abcjs/abcjs_basic.min.js +12 -0
  39. package/dist/client/vditor/dist/js/echarts/echarts.min.js +32 -0
  40. package/dist/client/vditor/dist/js/flowchart.js/flowchart.min.js +17 -0
  41. package/dist/client/vditor/dist/js/graphviz/full.render.js +99 -0
  42. package/dist/client/vditor/dist/js/graphviz/viz.js +342 -0
  43. package/dist/client/vditor/dist/js/highlight.js/highlight.pack.js +1626 -0
  44. package/dist/client/vditor/dist/js/highlight.js/solidity.min.js +82 -0
  45. package/dist/client/vditor/dist/js/highlight.js/styles/abap.css +155 -0
  46. package/dist/client/vditor/dist/js/highlight.js/styles/algol.css +143 -0
  47. package/dist/client/vditor/dist/js/highlight.js/styles/algol_nu.css +90 -0
  48. package/dist/client/vditor/dist/js/highlight.js/styles/ant-design.css +469 -0
  49. package/dist/client/vditor/dist/js/highlight.js/styles/arduino.css +157 -0
  50. package/dist/client/vditor/dist/js/highlight.js/styles/autumn.css +138 -0
  51. package/dist/client/vditor/dist/js/highlight.js/styles/borland.css +147 -0
  52. package/dist/client/vditor/dist/js/highlight.js/styles/bw.css +150 -0
  53. package/dist/client/vditor/dist/js/highlight.js/styles/colorful.css +158 -0
  54. package/dist/client/vditor/dist/js/highlight.js/styles/dracula.css +140 -0
  55. package/dist/client/vditor/dist/js/highlight.js/styles/emacs.css +167 -0
  56. package/dist/client/vditor/dist/js/highlight.js/styles/friendly.css +183 -0
  57. package/dist/client/vditor/dist/js/highlight.js/styles/fruity.css +123 -0
  58. package/dist/client/vditor/dist/js/highlight.js/styles/github.css +174 -0
  59. package/dist/client/vditor/dist/js/highlight.js/styles/igor.css +124 -0
  60. package/dist/client/vditor/dist/js/highlight.js/styles/lovelace.css +146 -0
  61. package/dist/client/vditor/dist/js/highlight.js/styles/manni.css +139 -0
  62. package/dist/client/vditor/dist/js/highlight.js/styles/monokai.css +132 -0
  63. package/dist/client/vditor/dist/js/highlight.js/styles/monokailight.css +180 -0
  64. package/dist/client/vditor/dist/js/highlight.js/styles/murphy.css +144 -0
  65. package/dist/client/vditor/dist/js/highlight.js/styles/native.css +164 -0
  66. package/dist/client/vditor/dist/js/highlight.js/styles/paraiso-dark.css +137 -0
  67. package/dist/client/vditor/dist/js/highlight.js/styles/paraiso-light.css +136 -0
  68. package/dist/client/vditor/dist/js/highlight.js/styles/pastie.css +180 -0
  69. package/dist/client/vditor/dist/js/highlight.js/styles/perldoc.css +141 -0
  70. package/dist/client/vditor/dist/js/highlight.js/styles/pygments.css +159 -0
  71. package/dist/client/vditor/dist/js/highlight.js/styles/rainbow_dash.css +164 -0
  72. package/dist/client/vditor/dist/js/highlight.js/styles/rrt.css +159 -0
  73. package/dist/client/vditor/dist/js/highlight.js/styles/solarized-dark.css +146 -0
  74. package/dist/client/vditor/dist/js/highlight.js/styles/solarized-dark256.css +146 -0
  75. package/dist/client/vditor/dist/js/highlight.js/styles/solarized-light.css +163 -0
  76. package/dist/client/vditor/dist/js/highlight.js/styles/swapoff.css +144 -0
  77. package/dist/client/vditor/dist/js/highlight.js/styles/tango.css +183 -0
  78. package/dist/client/vditor/dist/js/highlight.js/styles/trac.css +167 -0
  79. package/dist/client/vditor/dist/js/highlight.js/styles/vim.css +144 -0
  80. package/dist/client/vditor/dist/js/highlight.js/styles/vs.css +113 -0
  81. package/dist/client/vditor/dist/js/highlight.js/styles/xcode.css +174 -0
  82. package/dist/client/vditor/dist/js/highlight.js/yul.min.js +39 -0
  83. package/dist/client/vditor/dist/js/i18n/en_US.js +94 -0
  84. package/dist/client/vditor/dist/js/i18n/fr_FR.js +94 -0
  85. package/dist/client/vditor/dist/js/i18n/ja_JP.js +94 -0
  86. package/dist/client/vditor/dist/js/i18n/ko_KR.js +94 -0
  87. package/dist/client/vditor/dist/js/i18n/pt_BR.js +94 -0
  88. package/dist/client/vditor/dist/js/i18n/ru_RU.js +94 -0
  89. package/dist/client/vditor/dist/js/i18n/sv_SE.js +94 -0
  90. package/dist/client/vditor/dist/js/i18n/zh_CN.js +94 -0
  91. package/dist/client/vditor/dist/js/i18n/zh_TW.js +94 -0
  92. package/dist/client/vditor/dist/js/icons/ant.js +183 -0
  93. package/dist/client/vditor/dist/js/icons/material.js +204 -0
  94. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
  95. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
  96. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  97. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  98. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  99. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  100. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  101. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  102. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  103. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  104. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  105. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  106. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  107. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  108. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  109. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
  110. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Bold.woff +0 -0
  111. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
  112. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  113. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  114. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  115. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
  116. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Italic.woff +0 -0
  117. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
  118. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
  119. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Regular.woff +0 -0
  120. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
  121. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  122. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  123. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  124. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
  125. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Math-Italic.woff +0 -0
  126. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
  127. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  128. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  129. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  130. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  131. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  132. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  133. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  134. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  135. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  136. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
  137. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Script-Regular.woff +0 -0
  138. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
  139. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
  140. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
  141. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  142. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
  143. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
  144. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  145. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
  146. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
  147. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  148. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
  149. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
  150. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  151. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  152. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  153. package/dist/client/vditor/dist/js/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  154. package/dist/client/vditor/dist/js/katex/katex.min.css +1 -0
  155. package/dist/client/vditor/dist/js/katex/katex.min.js +10 -0
  156. package/dist/client/vditor/dist/js/katex/mhchem.min.js +10 -0
  157. package/dist/client/vditor/dist/js/lute/lute.min.js +80 -0
  158. package/dist/client/vditor/dist/js/markmap/katex.min.css +1 -0
  159. package/dist/client/vditor/dist/js/markmap/markmap.min.js +8260 -0
  160. package/dist/client/vditor/dist/js/markmap/prism.css +140 -0
  161. package/dist/client/vditor/dist/js/mathjax/LICENSE +202 -0
  162. package/dist/client/vditor/dist/js/mathjax/a11y/assistive-mml.js +10 -0
  163. package/dist/client/vditor/dist/js/mathjax/a11y/complexity.js +10 -0
  164. package/dist/client/vditor/dist/js/mathjax/a11y/explorer.js +10 -0
  165. package/dist/client/vditor/dist/js/mathjax/a11y/semantic-enrich.js +10 -0
  166. package/dist/client/vditor/dist/js/mathjax/input/asciimath.js +10 -0
  167. package/dist/client/vditor/dist/js/mathjax/input/mml/entities.js +10 -0
  168. package/dist/client/vditor/dist/js/mathjax/input/mml.js +10 -0
  169. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/action.js +10 -0
  170. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/all-packages.js +10 -0
  171. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/ams.js +10 -0
  172. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/amscd.js +10 -0
  173. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/autoload.js +10 -0
  174. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/bbox.js +10 -0
  175. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/boldsymbol.js +10 -0
  176. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/braket.js +10 -0
  177. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/bussproofs.js +10 -0
  178. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/cancel.js +10 -0
  179. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/color.js +10 -0
  180. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/colorV2.js +10 -0
  181. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/configMacros.js +10 -0
  182. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/enclose.js +10 -0
  183. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/extpfeil.js +10 -0
  184. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/html.js +10 -0
  185. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/mhchem.js +10 -0
  186. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/newcommand.js +10 -0
  187. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/noerrors.js +10 -0
  188. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/noundefined.js +10 -0
  189. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/physics.js +10 -0
  190. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/require.js +10 -0
  191. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/tagFormat.js +10 -0
  192. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/textmacros.js +10 -0
  193. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/unicode.js +10 -0
  194. package/dist/client/vditor/dist/js/mathjax/input/tex/extensions/verb.js +10 -0
  195. package/dist/client/vditor/dist/js/mathjax/input/tex-base.js +10 -0
  196. package/dist/client/vditor/dist/js/mathjax/input/tex-full.js +10 -0
  197. package/dist/client/vditor/dist/js/mathjax/input/tex.js +10 -0
  198. package/dist/client/vditor/dist/js/mathjax/sre/mathmaps/de.js +113 -0
  199. package/dist/client/vditor/dist/js/mathjax/sre/mathmaps/en.js +119 -0
  200. package/dist/client/vditor/dist/js/mathjax/sre/mathmaps/es.js +113 -0
  201. package/dist/client/vditor/dist/js/mathjax/sre/mathmaps/fr.js +113 -0
  202. package/dist/client/vditor/dist/js/mathjax/sre/mathmaps/mathmaps_ie.js +527 -0
  203. package/dist/client/vditor/dist/js/mathjax/sre/mathmaps/nemeth.js +113 -0
  204. package/dist/client/vditor/dist/js/mathjax/sre/sre-node.js +20 -0
  205. package/dist/client/vditor/dist/js/mathjax/sre/sre_browser.js +1642 -0
  206. package/dist/client/vditor/dist/js/mathjax/tex-svg-full.js +10 -0
  207. package/dist/client/vditor/dist/js/mermaid/mermaid.min.js +1768 -0
  208. package/dist/client/vditor/dist/js/plantuml/plantuml-encoder.min.js +10 -0
  209. package/dist/client/vditor/dist/method.d.ts +50 -0
  210. package/dist/client/vditor/dist/method.min.js +10 -0
  211. package/dist/client/vditor/dist/ts/constants.d.ts +45 -0
  212. package/dist/client/vditor/dist/ts/devtools/index.d.ts +7 -0
  213. package/dist/client/vditor/dist/ts/export/index.d.ts +5 -0
  214. package/dist/client/vditor/dist/ts/hint/index.d.ts +14 -0
  215. package/dist/client/vditor/dist/ts/ir/expandMarker.d.ts +2 -0
  216. package/dist/client/vditor/dist/ts/ir/highlightToolbarIR.d.ts +2 -0
  217. package/dist/client/vditor/dist/ts/ir/index.d.ts +13 -0
  218. package/dist/client/vditor/dist/ts/ir/input.d.ts +2 -0
  219. package/dist/client/vditor/dist/ts/ir/process.d.ts +9 -0
  220. package/dist/client/vditor/dist/ts/ir/processKeydown.d.ts +2 -0
  221. package/dist/client/vditor/dist/ts/markdown/abcRender.d.ts +1 -0
  222. package/dist/client/vditor/dist/ts/markdown/adapterRender.d.ts +37 -0
  223. package/dist/client/vditor/dist/ts/markdown/anchorRender.d.ts +1 -0
  224. package/dist/client/vditor/dist/ts/markdown/chartRender.d.ts +1 -0
  225. package/dist/client/vditor/dist/ts/markdown/codeRender.d.ts +2 -0
  226. package/dist/client/vditor/dist/ts/markdown/flowchartRender.d.ts +1 -0
  227. package/dist/client/vditor/dist/ts/markdown/getHTML.d.ts +2 -0
  228. package/dist/client/vditor/dist/ts/markdown/getMarkdown.d.ts +2 -0
  229. package/dist/client/vditor/dist/ts/markdown/graphvizRender.d.ts +1 -0
  230. package/dist/client/vditor/dist/ts/markdown/highlightRender.d.ts +2 -0
  231. package/dist/client/vditor/dist/ts/markdown/lazyLoadImageRender.d.ts +6 -0
  232. package/dist/client/vditor/dist/ts/markdown/markmapRender.d.ts +1 -0
  233. package/dist/client/vditor/dist/ts/markdown/mathRender.d.ts +10 -0
  234. package/dist/client/vditor/dist/ts/markdown/mediaRender.d.ts +1 -0
  235. package/dist/client/vditor/dist/ts/markdown/mermaidRender.d.ts +1 -0
  236. package/dist/client/vditor/dist/ts/markdown/mindmapRender.d.ts +1 -0
  237. package/dist/client/vditor/dist/ts/markdown/outlineRender.d.ts +2 -0
  238. package/dist/client/vditor/dist/ts/markdown/plantumlRender.d.ts +1 -0
  239. package/dist/client/vditor/dist/ts/markdown/previewRender.d.ts +3 -0
  240. package/dist/client/vditor/dist/ts/markdown/setLute.d.ts +2 -0
  241. package/dist/client/vditor/dist/ts/markdown/speechRender.d.ts +7 -0
  242. package/dist/client/vditor/dist/ts/outline/index.d.ts +7 -0
  243. package/dist/client/vditor/dist/ts/preview/image.d.ts +2 -0
  244. package/dist/client/vditor/dist/ts/preview/index.d.ts +10 -0
  245. package/dist/client/vditor/dist/ts/resize/index.d.ts +6 -0
  246. package/dist/client/vditor/dist/ts/sv/combineFootnote.d.ts +6 -0
  247. package/dist/client/vditor/dist/ts/sv/index.d.ts +13 -0
  248. package/dist/client/vditor/dist/ts/sv/inputEvent.d.ts +2 -0
  249. package/dist/client/vditor/dist/ts/sv/process.d.ts +12 -0
  250. package/dist/client/vditor/dist/ts/sv/processKeydown.d.ts +2 -0
  251. package/dist/client/vditor/dist/ts/tip/index.d.ts +6 -0
  252. package/dist/client/vditor/dist/ts/toolbar/Both.d.ts +5 -0
  253. package/dist/client/vditor/dist/ts/toolbar/Br.d.ts +4 -0
  254. package/dist/client/vditor/dist/ts/toolbar/CodeTheme.d.ts +6 -0
  255. package/dist/client/vditor/dist/ts/toolbar/ContentTheme.d.ts +6 -0
  256. package/dist/client/vditor/dist/ts/toolbar/Counter.d.ts +6 -0
  257. package/dist/client/vditor/dist/ts/toolbar/Custom.d.ts +5 -0
  258. package/dist/client/vditor/dist/ts/toolbar/Devtools.d.ts +5 -0
  259. package/dist/client/vditor/dist/ts/toolbar/Divider.d.ts +4 -0
  260. package/dist/client/vditor/dist/ts/toolbar/EditMode.d.ts +8 -0
  261. package/dist/client/vditor/dist/ts/toolbar/Emoji.d.ts +7 -0
  262. package/dist/client/vditor/dist/ts/toolbar/Export.d.ts +6 -0
  263. package/dist/client/vditor/dist/ts/toolbar/Fullscreen.d.ts +6 -0
  264. package/dist/client/vditor/dist/ts/toolbar/Headings.d.ts +7 -0
  265. package/dist/client/vditor/dist/ts/toolbar/Help.d.ts +5 -0
  266. package/dist/client/vditor/dist/ts/toolbar/Indent.d.ts +5 -0
  267. package/dist/client/vditor/dist/ts/toolbar/Info.d.ts +5 -0
  268. package/dist/client/vditor/dist/ts/toolbar/InsertAfter.d.ts +5 -0
  269. package/dist/client/vditor/dist/ts/toolbar/InsertBefore.d.ts +5 -0
  270. package/dist/client/vditor/dist/ts/toolbar/MenuItem.d.ts +5 -0
  271. package/dist/client/vditor/dist/ts/toolbar/Outdent.d.ts +5 -0
  272. package/dist/client/vditor/dist/ts/toolbar/Outline.d.ts +5 -0
  273. package/dist/client/vditor/dist/ts/toolbar/Preview.d.ts +6 -0
  274. package/dist/client/vditor/dist/ts/toolbar/Record.d.ts +6 -0
  275. package/dist/client/vditor/dist/ts/toolbar/Redo.d.ts +5 -0
  276. package/dist/client/vditor/dist/ts/toolbar/Undo.d.ts +5 -0
  277. package/dist/client/vditor/dist/ts/toolbar/Upload.d.ts +6 -0
  278. package/dist/client/vditor/dist/ts/toolbar/index.d.ts +9 -0
  279. package/dist/client/vditor/dist/ts/toolbar/setToolbar.d.ts +21 -0
  280. package/dist/client/vditor/dist/ts/ui/initUI.d.ts +10 -0
  281. package/dist/client/vditor/dist/ts/ui/setCodeTheme.d.ts +1 -0
  282. package/dist/client/vditor/dist/ts/ui/setContentTheme.d.ts +1 -0
  283. package/dist/client/vditor/dist/ts/ui/setPreviewMode.d.ts +2 -0
  284. package/dist/client/vditor/dist/ts/ui/setTheme.d.ts +2 -0
  285. package/dist/client/vditor/dist/ts/undo/index.d.ts +19 -0
  286. package/dist/client/vditor/dist/ts/upload/getElement.d.ts +2 -0
  287. package/dist/client/vditor/dist/ts/upload/index.d.ts +9 -0
  288. package/dist/client/vditor/dist/ts/upload/setHeaders.d.ts +2 -0
  289. package/dist/client/vditor/dist/ts/util/Options.d.ts +8 -0
  290. package/dist/client/vditor/dist/ts/util/RecordMedia.d.ts +18 -0
  291. package/dist/client/vditor/dist/ts/util/addScript.d.ts +2 -0
  292. package/dist/client/vditor/dist/ts/util/addStyle.d.ts +1 -0
  293. package/dist/client/vditor/dist/ts/util/code160to32.d.ts +1 -0
  294. package/dist/client/vditor/dist/ts/util/compatibility.d.ts +7 -0
  295. package/dist/client/vditor/dist/ts/util/editorCommonEvent.d.ts +10 -0
  296. package/dist/client/vditor/dist/ts/util/fixBrowserBehavior.d.ts +40 -0
  297. package/dist/client/vditor/dist/ts/util/function.d.ts +2 -0
  298. package/dist/client/vditor/dist/ts/util/getSelectText.d.ts +1 -0
  299. package/dist/client/vditor/dist/ts/util/hasClosest.d.ts +9 -0
  300. package/dist/client/vditor/dist/ts/util/hasClosestByHeadings.d.ts +2 -0
  301. package/dist/client/vditor/dist/ts/util/highlightToolbar.d.ts +2 -0
  302. package/dist/client/vditor/dist/ts/util/hotKey.d.ts +1 -0
  303. package/dist/client/vditor/dist/ts/util/log.d.ts +1 -0
  304. package/dist/client/vditor/dist/ts/util/merge.d.ts +1 -0
  305. package/dist/client/vditor/dist/ts/util/processCode.d.ts +3 -0
  306. package/dist/client/vditor/dist/ts/util/selection.d.ts +15 -0
  307. package/dist/client/vditor/dist/ts/util/toc.d.ts +6 -0
  308. package/dist/client/vditor/dist/ts/wysiwyg/afterRenderEvent.d.ts +6 -0
  309. package/dist/client/vditor/dist/ts/wysiwyg/highlightToolbarWYSIWYG.d.ts +5 -0
  310. package/dist/client/vditor/dist/ts/wysiwyg/index.d.ts +22 -0
  311. package/dist/client/vditor/dist/ts/wysiwyg/inlineTag.d.ts +11 -0
  312. package/dist/client/vditor/dist/ts/wysiwyg/input.d.ts +2 -0
  313. package/dist/client/vditor/dist/ts/wysiwyg/processKeydown.d.ts +3 -0
  314. package/dist/client/vditor/dist/ts/wysiwyg/renderDomByMd.d.ts +6 -0
  315. package/dist/client/vditor/dist/ts/wysiwyg/setHeading.d.ts +3 -0
  316. package/dist/client/vditor/dist/ts/wysiwyg/showCode.d.ts +2 -0
  317. package/dist/client/vditor/dist/ts/wysiwyg/toolbarEvent.d.ts +2 -0
  318. package/dist/client/vditor/dist/types/index.d.ts +866 -0
  319. package/dist/externalVersion.js +16 -0
  320. package/dist/index.d.ts +10 -0
  321. package/dist/index.js +48 -0
  322. package/dist/locale/en-US.json +1 -0
  323. package/dist/locale/zh-CN.json +1 -0
  324. package/dist/server/index.d.ts +9 -0
  325. package/dist/server/index.js +42 -0
  326. package/dist/server/plugin.d.ts +19 -0
  327. package/dist/server/plugin.js +54 -0
  328. package/package.json +21 -0
  329. package/server.d.ts +2 -0
  330. package/server.js +1 -0
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.plantumlEncoder=t()}}(function(){return function t(e,a,n){function r(s,h){if(!a[s]){if(!e[s]){var o="function"==typeof require&&require;if(!h&&o)return o(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var _=a[s]={exports:{}};e[s][0].call(_.exports,function(t){var a=e[s][1][t];return r(a?a:t)},_,_.exports,t,e,a,n)}return a[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e,a){e.exports=t("./lib/plantuml-encoder")},{"./lib/plantuml-encoder":3}],2:[function(t,e,a){"use strict";function n(t){return t<10?String.fromCharCode(48+t):(t-=10,t<26?String.fromCharCode(65+t):(t-=26,t<26?String.fromCharCode(97+t):(t-=26,0===t?"-":1===t?"_":"?")))}function r(t,e,a){var r=t>>2,i=(3&t)<<4|e>>4,s=(15&e)<<2|a>>6,h=63&a,o="";return o+=n(63&r),o+=n(63&i),o+=n(63&s),o+=n(63&h)}e.exports.encode=function(t){for(var e="",a=0;a<t.length;a+=3)e+=a+2===t.length?r(t.charCodeAt(a),t.charCodeAt(a+1),0):a+1===t.length?r(t.charCodeAt(a),0,0):r(t.charCodeAt(a),t.charCodeAt(a+1),t.charCodeAt(a+2));return e}},{}],3:[function(t,e,a){"use strict";var n=t("utf8-bytes"),r=t("pako/lib/deflate.js"),i=t("./encode64");e.exports.encode=function(t){var e=n(t),a=r.deflate(e,{level:9,to:"string"});return i.encode(a)}},{"./encode64":2,"pako/lib/deflate.js":4,"utf8-bytes":13}],4:[function(t,e,a){"use strict";function n(t){if(!(this instanceof n))return new n(t);this.options=o.assign({level:b,method:w,chunkSize:16384,windowBits:15,memLevel:8,strategy:v,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new d,this.strm.avail_out=0;var a=h.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==p)throw new Error(_[a]);if(e.header&&h.deflateSetHeader(this.strm,e.header),e.dictionary){var r;if(r="string"==typeof e.dictionary?l.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=h.deflateSetDictionary(this.strm,r),a!==p)throw new Error(_[a]);this._dict_set=!0}}function r(t,e){var a=new n(e);if(a.push(t,!0),a.err)throw a.msg;return a.result}function i(t,e){return e=e||{},e.raw=!0,r(t,e)}function s(t,e){return e=e||{},e.gzip=!0,r(t,e)}var h=t("./zlib/deflate"),o=t("./utils/common"),l=t("./utils/strings"),_=t("./zlib/messages"),d=t("./zlib/zstream"),u=Object.prototype.toString,f=0,c=4,p=0,g=1,m=2,b=-1,v=0,w=8;n.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;n=e===~~e?e:e===!0?c:f,"string"==typeof t?r.input=l.string2buf(t):"[object ArrayBuffer]"===u.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new o.Buf8(i),r.next_out=0,r.avail_out=i),a=h.deflate(r,n),a!==g&&a!==p)return this.onEnd(a),this.ended=!0,!1;0!==r.avail_out&&(0!==r.avail_in||n!==c&&n!==m)||("string"===this.options.to?this.onData(l.buf2binstring(o.shrinkBuf(r.output,r.next_out))):this.onData(o.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||0===r.avail_out)&&a!==g);return n===c?(a=h.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===p):n!==m||(this.onEnd(p),r.avail_out=0,!0)},n.prototype.onData=function(t){this.chunks.push(t)},n.prototype.onEnd=function(t){t===p&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},a.Deflate=n,a.deflate=r,a.deflateRaw=i,a.gzip=s},{"./utils/common":5,"./utils/strings":6,"./zlib/deflate":9,"./zlib/messages":10,"./zlib/zstream":12}],5:[function(t,e,a){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;a.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var n in a)a.hasOwnProperty(n)&&(t[n]=a[n])}}return t},a.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var r={arraySet:function(t,e,a,n,r){if(e.subarray&&t.subarray)return void t.set(e.subarray(a,a+n),r);for(var i=0;i<n;i++)t[r+i]=e[a+i]},flattenChunks:function(t){var e,a,n,r,i,s;for(n=0,e=0,a=t.length;e<a;e++)n+=t[e].length;for(s=new Uint8Array(n),r=0,e=0,a=t.length;e<a;e++)i=t[e],s.set(i,r),r+=i.length;return s}},i={arraySet:function(t,e,a,n,r){for(var i=0;i<n;i++)t[r+i]=e[a+i]},flattenChunks:function(t){return[].concat.apply([],t)}};a.setTyped=function(t){t?(a.Buf8=Uint8Array,a.Buf16=Uint16Array,a.Buf32=Int32Array,a.assign(a,r)):(a.Buf8=Array,a.Buf16=Array,a.Buf32=Array,a.assign(a,i))},a.setTyped(n)},{}],6:[function(t,e,a){"use strict";function n(t,e){if(e<65537&&(t.subarray&&s||!t.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(t,e));for(var a="",n=0;n<e;n++)a+=String.fromCharCode(t[n]);return a}var r=t("./common"),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){s=!1}for(var h=new r.Buf8(256),o=0;o<256;o++)h[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;h[254]=h[254]=1,a.string2buf=function(t){var e,a,n,i,s,h=t.length,o=0;for(i=0;i<h;i++)a=t.charCodeAt(i),55296===(64512&a)&&i+1<h&&(n=t.charCodeAt(i+1),56320===(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),i++)),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new r.Buf8(o),s=0,i=0;s<o;i++)a=t.charCodeAt(i),55296===(64512&a)&&i+1<h&&(n=t.charCodeAt(i+1),56320===(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),i++)),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},a.buf2binstring=function(t){return n(t,t.length)},a.binstring2buf=function(t){for(var e=new r.Buf8(t.length),a=0,n=e.length;a<n;a++)e[a]=t.charCodeAt(a);return e},a.buf2string=function(t,e){var a,r,i,s,o=e||t.length,l=new Array(2*o);for(r=0,a=0;a<o;)if(i=t[a++],i<128)l[r++]=i;else if(s=h[i],s>4)l[r++]=65533,a+=s-1;else{for(i&=2===s?31:3===s?15:7;s>1&&a<o;)i=i<<6|63&t[a++],s--;s>1?l[r++]=65533:i<65536?l[r++]=i:(i-=65536,l[r++]=55296|i>>10&1023,l[r++]=56320|1023&i)}return n(l,r)},a.utf8border=function(t,e){var a;for(e=e||t.length,e>t.length&&(e=t.length),a=e-1;a>=0&&128===(192&t[a]);)a--;return a<0?e:0===a?e:a+h[t[a]]>e?a:e}},{"./common":5}],7:[function(t,e,a){"use strict";function n(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){s=a>2e3?2e3:a,a-=s;do r=r+e[n++]|0,i=i+r|0;while(--s);r%=65521,i%=65521}return r|i<<16|0}e.exports=n},{}],8:[function(t,e,a){"use strict";function n(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}function r(t,e,a,n){var r=i,s=n+a;t^=-1;for(var h=n;h<s;h++)t=t>>>8^r[255&(t^e[h])];return t^-1}var i=n();e.exports=r},{}],9:[function(t,e,a){"use strict";function n(t,e){return t.msg=I[e],e}function r(t){return(t<<1)-(t>4?9:0)}function i(t){for(var e=t.length;--e>=0;)t[e]=0}function s(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(j.arraySet(t.output,e.pending_buf,e.pending_out,a,t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))}function h(t,e){U._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,s(t.strm)}function o(t,e){t.pending_buf[t.pending++]=e}function l(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function _(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,j.arraySet(e,t.input,t.next_in,r,a),1===t.state.wrap?t.adler=D(t.adler,e,r,a):2===t.state.wrap&&(t.adler=M(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)}function d(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,o=t.strstart>t.w_size-dt?t.strstart-(t.w_size-dt):0,l=t.window,_=t.w_mask,d=t.prev,u=t.strstart+_t,f=l[i+s-1],c=l[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do if(a=e,l[a+s]===c&&l[a+s-1]===f&&l[a]===l[i]&&l[++a]===l[i+1]){i+=2,a++;do;while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&i<u);if(n=_t-(u-i),i=u-_t,n>s){if(t.match_start=e,s=n,n>=h)break;f=l[i+s-1],c=l[i+s]}}while((e=d[e&_])>o&&0!==--r);return s<=t.lookahead?s:t.lookahead}function u(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-dt)){j.arraySet(t.window,t.window,s,s,0),t.match_start-=s,t.strstart-=s,t.block_start-=s,a=t.hash_size,e=a;do n=t.head[--e],t.head[e]=n>=s?n-s:0;while(--a);a=s,e=a;do n=t.prev[--e],t.prev[e]=n>=s?n-s:0;while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=_(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=lt)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[i+lt-1])&t.hash_mask,t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<lt)););}while(t.lookahead<dt&&0!==t.strm.avail_in)}function f(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(u(t),0===t.lookahead&&e===O)return wt;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,h(t,!1),0===t.strm.avail_out))return wt;if(t.strstart-t.block_start>=t.w_size-dt&&(h(t,!1),0===t.strm.avail_out))return wt}return t.insert=0,e===L?(h(t,!0),0===t.strm.avail_out?kt:zt):t.strstart>t.block_start&&(h(t,!1),0===t.strm.avail_out)?wt:wt}function c(t,e){for(var a,n;;){if(t.lookahead<dt){if(u(t),t.lookahead<dt&&e===O)return wt;if(0===t.lookahead)break}if(a=0,t.lookahead>=lt&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+lt-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-dt&&(t.match_length=d(t,a)),t.match_length>=lt)if(n=U._tr_tally(t,t.strstart-t.match_start,t.match_length-lt),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=lt){t.match_length--;do t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+lt-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=U._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(h(t,!1),0===t.strm.avail_out))return wt}return t.insert=t.strstart<lt-1?t.strstart:lt-1,e===L?(h(t,!0),0===t.strm.avail_out?kt:zt):t.last_lit&&(h(t,!1),0===t.strm.avail_out)?wt:yt}function p(t,e){for(var a,n,r;;){if(t.lookahead<dt){if(u(t),t.lookahead<dt&&e===O)return wt;if(0===t.lookahead)break}if(a=0,t.lookahead>=lt&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+lt-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=lt-1,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-dt&&(t.match_length=d(t,a),t.match_length<=5&&(t.strategy===J||t.match_length===lt&&t.strstart-t.match_start>4096)&&(t.match_length=lt-1)),t.prev_length>=lt&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-lt,n=U._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-lt),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=r&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+lt-1])&t.hash_mask,a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(0!==--t.prev_length);if(t.match_available=0,t.match_length=lt-1,t.strstart++,n&&(h(t,!1),0===t.strm.avail_out))return wt}else if(t.match_available){if(n=U._tr_tally(t,0,t.window[t.strstart-1]),n&&h(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return wt}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=U._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<lt-1?t.strstart:lt-1,e===L?(h(t,!0),0===t.strm.avail_out?kt:zt):t.last_lit&&(h(t,!1),0===t.strm.avail_out)?wt:yt}function g(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=_t){if(u(t),t.lookahead<=_t&&e===O)return wt;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=lt&&t.strstart>0&&(r=t.strstart-1,n=s[r],n===s[++r]&&n===s[++r]&&n===s[++r])){i=t.strstart+_t;do;while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=_t-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=lt?(a=U._tr_tally(t,1,t.match_length-lt),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=U._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(h(t,!1),0===t.strm.avail_out))return wt}return t.insert=0,e===L?(h(t,!0),0===t.strm.avail_out?kt:zt):t.last_lit&&(h(t,!1),0===t.strm.avail_out)?wt:yt}function m(t,e){for(var a;;){if(0===t.lookahead&&(u(t),0===t.lookahead)){if(e===O)return wt;break}if(t.match_length=0,a=U._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(h(t,!1),0===t.strm.avail_out))return wt}return t.insert=0,e===L?(h(t,!0),0===t.strm.avail_out?kt:zt):t.last_lit&&(h(t,!1),0===t.strm.avail_out)?wt:yt}function b(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}function v(t){t.window_size=2*t.w_size,i(t.head),t.max_lazy_match=E[t.level].max_lazy,t.good_match=E[t.level].good_length,t.nice_match=E[t.level].nice_length,t.max_chain_length=E[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=lt-1,t.match_available=0,t.ins_h=0}function w(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new j.Buf16(2*ht),this.dyn_dtree=new j.Buf16(2*(2*it+1)),this.bl_tree=new j.Buf16(2*(2*st+1)),i(this.dyn_ltree),i(this.dyn_dtree),i(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new j.Buf16(ot+1),this.heap=new j.Buf16(2*rt+1),i(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new j.Buf16(2*rt+1),i(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function y(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=Y,e=t.state,e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?ft:bt,t.adler=2===e.wrap?0:1,e.last_flush=O,U._tr_init(e),R):n(t,F)}function k(t){var e=y(t);return e===R&&v(t.state),e}function z(t,e){return t&&t.state?2!==t.state.wrap?F:(t.state.gzhead=e,R):F}function x(t,e,a,r,i,s){if(!t)return F;var h=1;if(e===G&&(e=6),r<0?(h=0,r=-r):r>15&&(h=2,r-=16),i<1||i>$||a!==Z||r<8||r>15||e<0||e>9||s<0||s>W)return n(t,F);8===r&&(r=9);var o=new w;return t.state=o,o.strm=t,o.wrap=h,o.gzhead=null,o.w_bits=r,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+lt-1)/lt),o.window=new j.Buf8(2*o.w_size),o.head=new j.Buf16(o.hash_size),o.prev=new j.Buf16(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new j.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=e,o.strategy=s,o.method=a,k(t)}function A(t,e){return x(t,e,Z,tt,et,X)}function B(t,e){var a,h,_,d;if(!t||!t.state||e>N||e<0)return t?n(t,F):F;if(h=t.state,!t.output||!t.input&&0!==t.avail_in||h.status===vt&&e!==L)return n(t,0===t.avail_out?P:F);if(h.strm=t,a=h.last_flush,h.last_flush=e,h.status===ft)if(2===h.wrap)t.adler=0,o(h,31),o(h,139),o(h,8),h.gzhead?(o(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),o(h,255&h.gzhead.time),o(h,h.gzhead.time>>8&255),o(h,h.gzhead.time>>16&255),o(h,h.gzhead.time>>24&255),o(h,9===h.level?2:h.strategy>=Q||h.level<2?4:0),o(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(o(h,255&h.gzhead.extra.length),o(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(t.adler=M(t.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=ct):(o(h,0),o(h,0),o(h,0),o(h,0),o(h,0),o(h,9===h.level?2:h.strategy>=Q||h.level<2?4:0),o(h,xt),h.status=bt);else{var u=Z+(h.w_bits-8<<4)<<8,f=-1;f=h.strategy>=Q||h.level<2?0:h.level<6?1:6===h.level?2:3,u|=f<<6,0!==h.strstart&&(u|=ut),u+=31-u%31,h.status=bt,l(h,u),0!==h.strstart&&(l(h,t.adler>>>16),l(h,65535&t.adler)),t.adler=1}if(h.status===ct)if(h.gzhead.extra){for(_=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>_&&(t.adler=M(t.adler,h.pending_buf,h.pending-_,_)),s(t),_=h.pending,h.pending!==h.pending_buf_size));)o(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>_&&(t.adler=M(t.adler,h.pending_buf,h.pending-_,_)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=pt)}else h.status=pt;if(h.status===pt)if(h.gzhead.name){_=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>_&&(t.adler=M(t.adler,h.pending_buf,h.pending-_,_)),s(t),_=h.pending,h.pending===h.pending_buf_size)){d=1;break}d=h.gzindex<h.gzhead.name.length?255&h.gzhead.name.charCodeAt(h.gzindex++):0,o(h,d)}while(0!==d);h.gzhead.hcrc&&h.pending>_&&(t.adler=M(t.adler,h.pending_buf,h.pending-_,_)),0===d&&(h.gzindex=0,h.status=gt)}else h.status=gt;if(h.status===gt)if(h.gzhead.comment){_=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>_&&(t.adler=M(t.adler,h.pending_buf,h.pending-_,_)),s(t),_=h.pending,h.pending===h.pending_buf_size)){d=1;break}d=h.gzindex<h.gzhead.comment.length?255&h.gzhead.comment.charCodeAt(h.gzindex++):0,o(h,d)}while(0!==d);h.gzhead.hcrc&&h.pending>_&&(t.adler=M(t.adler,h.pending_buf,h.pending-_,_)),0===d&&(h.status=mt)}else h.status=mt;if(h.status===mt&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&s(t),h.pending+2<=h.pending_buf_size&&(o(h,255&t.adler),o(h,t.adler>>8&255),t.adler=0,h.status=bt)):h.status=bt),0!==h.pending){if(s(t),0===t.avail_out)return h.last_flush=-1,R}else if(0===t.avail_in&&r(e)<=r(a)&&e!==L)return n(t,P);if(h.status===vt&&0!==t.avail_in)return n(t,P);if(0!==t.avail_in||0!==h.lookahead||e!==O&&h.status!==vt){var c=h.strategy===Q?m(h,e):h.strategy===V?g(h,e):E[h.level].func(h,e);if(c!==kt&&c!==zt||(h.status=vt),c===wt||c===kt)return 0===t.avail_out&&(h.last_flush=-1),R;if(c===yt&&(e===q?U._tr_align(h):e!==N&&(U._tr_stored_block(h,0,0,!1),e===T&&(i(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),s(t),0===t.avail_out))return h.last_flush=-1,R}return e!==L?R:h.wrap<=0?H:(2===h.wrap?(o(h,255&t.adler),o(h,t.adler>>8&255),o(h,t.adler>>16&255),o(h,t.adler>>24&255),o(h,255&t.total_in),o(h,t.total_in>>8&255),o(h,t.total_in>>16&255),o(h,t.total_in>>24&255)):(l(h,t.adler>>>16),l(h,65535&t.adler)),s(t),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?R:H)}function C(t){var e;return t&&t.state?(e=t.state.status,e!==ft&&e!==ct&&e!==pt&&e!==gt&&e!==mt&&e!==bt&&e!==vt?n(t,F):(t.state=null,e===bt?n(t,K):R)):F}function S(t,e){var a,n,r,s,h,o,l,_,d=e.length;if(!t||!t.state)return F;if(a=t.state,s=a.wrap,2===s||1===s&&a.status!==ft||a.lookahead)return F;for(1===s&&(t.adler=D(t.adler,e,d,0)),a.wrap=0,d>=a.w_size&&(0===s&&(i(a.head),a.strstart=0,a.block_start=0,a.insert=0),_=new j.Buf8(a.w_size),j.arraySet(_,e,d-a.w_size,a.w_size,0),e=_,d=a.w_size),h=t.avail_in,o=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,u(a);a.lookahead>=lt;){n=a.strstart,r=a.lookahead-(lt-1);do a.ins_h=(a.ins_h<<a.hash_shift^a.window[n+lt-1])&a.hash_mask,a.prev[n&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=n,n++;while(--r);a.strstart=n,a.lookahead=lt-1,u(a)}return a.strstart+=a.lookahead,a.block_start=a.strstart,a.insert=a.lookahead,a.lookahead=0,a.match_length=a.prev_length=lt-1,a.match_available=0,t.next_in=o,t.input=l,t.avail_in=h,a.wrap=s,R}var E,j=t("../utils/common"),U=t("./trees"),D=t("./adler32"),M=t("./crc32"),I=t("./messages"),O=0,q=1,T=3,L=4,N=5,R=0,H=1,F=-2,K=-3,P=-5,G=-1,J=1,Q=2,V=3,W=4,X=0,Y=2,Z=8,$=9,tt=15,et=8,at=29,nt=256,rt=nt+1+at,it=30,st=19,ht=2*rt+1,ot=15,lt=3,_t=258,dt=_t+lt+1,ut=32,ft=42,ct=69,pt=73,gt=91,mt=103,bt=113,vt=666,wt=1,yt=2,kt=3,zt=4,xt=3;E=[new b(0,0,0,0,f),new b(4,4,8,4,c),new b(4,5,16,8,c),new b(4,6,32,32,c),new b(4,4,16,16,p),new b(8,16,32,32,p),new b(8,16,128,128,p),new b(8,32,128,256,p),new b(32,128,258,1024,p),new b(32,258,258,4096,p)],a.deflateInit=A,a.deflateInit2=x,a.deflateReset=k,a.deflateResetKeep=y,a.deflateSetHeader=z,a.deflate=B,a.deflateEnd=C,a.deflateSetDictionary=S,a.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":5,"./adler32":7,"./crc32":8,"./messages":10,"./trees":11}],10:[function(t,e,a){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],11:[function(t,e,a){"use strict";function n(t){for(var e=t.length;--e>=0;)t[e]=0}function r(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function i(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function s(t){return t<256?ot[t]:ot[256+(t>>>7)]}function h(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function o(t,e,a){t.bi_valid>W-a?(t.bi_buf|=e<<t.bi_valid&65535,h(t,t.bi_buf),t.bi_buf=e>>W-t.bi_valid,t.bi_valid+=a-W):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)}function l(t,e,a){o(t,a[2*e],a[2*e+1])}function _(t,e){var a=0;do a|=1&t,t>>>=1,a<<=1;while(--e>0);return a>>>1}function d(t){16===t.bi_valid?(h(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}function u(t,e){var a,n,r,i,s,h,o=e.dyn_tree,l=e.max_code,_=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=V;i++)t.bl_count[i]=0;for(o[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<Q;a++)n=t.heap[a],i=o[2*o[2*n+1]+1]+1,i>c&&(i=c,p++),o[2*n+1]=i,n>l||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=o[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(_[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)r=t.heap[--a],r>l||(o[2*r+1]!==i&&(t.opt_len+=(i-o[2*r+1])*o[2*r],o[2*r+1]=i),n--)}}function f(t,e,a){var n,r,i=new Array(V+1),s=0;for(n=1;n<=V;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=_(i[h]++,h))}}function c(){var t,e,a,n,i,s=new Array(V+1);for(a=0,n=0;n<F-1;n++)for(_t[n]=a,t=0;t<1<<et[n];t++)lt[a++]=n;for(lt[a-1]=n,i=0,n=0;n<16;n++)for(dt[n]=i,t=0;t<1<<at[n];t++)ot[i++]=n;for(i>>=7;n<G;n++)for(dt[n]=i<<7,t=0;t<1<<at[n]-7;t++)ot[256+i++]=n;for(e=0;e<=V;e++)s[e]=0;for(t=0;t<=143;)st[2*t+1]=8,t++,s[8]++;for(;t<=255;)st[2*t+1]=9,t++,s[9]++;for(;t<=279;)st[2*t+1]=7,t++,s[7]++;for(;t<=287;)st[2*t+1]=8,t++,s[8]++;for(f(st,P+1,s),t=0;t<G;t++)ht[2*t+1]=5,ht[2*t]=_(t,5);ut=new r(st,et,K+1,P,V),ft=new r(ht,at,0,G,V),ct=new r(new Array(0),nt,0,J,X)}function p(t){var e;for(e=0;e<P;e++)t.dyn_ltree[2*e]=0;for(e=0;e<G;e++)t.dyn_dtree[2*e]=0;for(e=0;e<J;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*Y]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function g(t){t.bi_valid>8?h(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function m(t,e,a,n){g(t),n&&(h(t,a),h(t,~a)),D.arraySet(t.pending_buf,t.window,e,a,t.pending),t.pending+=a}function b(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]}function v(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&b(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!b(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n}function w(t,e,a){var n,r,i,h,_=0;if(0!==t.last_lit)do n=t.pending_buf[t.d_buf+2*_]<<8|t.pending_buf[t.d_buf+2*_+1],r=t.pending_buf[t.l_buf+_],_++,0===n?l(t,r,e):(i=lt[r],l(t,i+K+1,e),h=et[i],0!==h&&(r-=_t[i],o(t,r,h)),n--,i=s(n),l(t,i,a),h=at[i],0!==h&&(n-=dt[i],o(t,n,h)));while(_<t.last_lit);l(t,Y,e)}function y(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,o=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=Q,a=0;a<o;a++)0!==i[2*a]?(t.heap[++t.heap_len]=l=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)r=t.heap[++t.heap_len]=l<2?++l:0,i[2*r]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=l,a=t.heap_len>>1;a>=1;a--)v(t,i,a);r=o;do a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],v(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,v(t,i,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],u(t,e),f(i,l,t.bl_count)}function k(t,e,a){var n,r,i=-1,s=e[1],h=0,o=7,l=4;for(0===s&&(o=138,l=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<o&&r===s||(h<l?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[2*Z]++):h<=10?t.bl_tree[2*$]++:t.bl_tree[2*tt]++,h=0,i=r,0===s?(o=138,l=3):r===s?(o=6,l=3):(o=7,l=4))}function z(t,e,a){var n,r,i=-1,s=e[1],h=0,_=7,d=4;for(0===s&&(_=138,d=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<_&&r===s)){if(h<d){do l(t,r,t.bl_tree);while(0!==--h)}else 0!==r?(r!==i&&(l(t,r,t.bl_tree),h--),l(t,Z,t.bl_tree),o(t,h-3,2)):h<=10?(l(t,$,t.bl_tree),o(t,h-3,3)):(l(t,tt,t.bl_tree),o(t,h-11,7));h=0,i=r,0===s?(_=138,d=3):r===s?(_=6,d=3):(_=7,d=4)}}function x(t){var e;for(k(t,t.dyn_ltree,t.l_desc.max_code),k(t,t.dyn_dtree,t.d_desc.max_code),y(t,t.bl_desc),e=J-1;e>=3&&0===t.bl_tree[2*rt[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}function A(t,e,a,n){var r;for(o(t,e-257,5),o(t,a-1,5),o(t,n-4,4),r=0;r<n;r++)o(t,t.bl_tree[2*rt[r]+1],3);z(t,t.dyn_ltree,e-1),z(t,t.dyn_dtree,a-1)}function B(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return I;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return O;for(e=32;e<K;e++)if(0!==t.dyn_ltree[2*e])return O;return I}function C(t){pt||(c(),pt=!0),t.l_desc=new i(t.dyn_ltree,ut),t.d_desc=new i(t.dyn_dtree,ft),t.bl_desc=new i(t.bl_tree,ct),t.bi_buf=0,t.bi_valid=0,p(t)}function S(t,e,a,n){o(t,(T<<1)+(n?1:0),3),m(t,e,a,!0)}function E(t){o(t,L<<1,3),l(t,Y,st),d(t)}function j(t,e,a,n){var r,i,s=0;t.level>0?(t.strm.data_type===q&&(t.strm.data_type=B(t)),y(t,t.l_desc),y(t,t.d_desc),s=x(t),r=t.opt_len+3+7>>>3,i=t.static_len+3+7>>>3,i<=r&&(r=i)):r=i=a+5,a+4<=r&&e!==-1?S(t,e,a,n):t.strategy===M||i===r?(o(t,(L<<1)+(n?1:0),3),w(t,st,ht)):(o(t,(N<<1)+(n?1:0),3),A(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),w(t,t.dyn_ltree,t.dyn_dtree)),p(t),n&&g(t)}function U(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(lt[a]+K+1)]++,t.dyn_dtree[2*s(e)]++),t.last_lit===t.lit_bufsize-1}var D=t("../utils/common"),M=4,I=0,O=1,q=2,T=0,L=1,N=2,R=3,H=258,F=29,K=256,P=K+1+F,G=30,J=19,Q=2*P+1,V=15,W=16,X=7,Y=256,Z=16,$=17,tt=18,et=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],at=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],nt=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],rt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],it=512,st=new Array(2*(P+2));n(st);var ht=new Array(2*G);n(ht);var ot=new Array(it);n(ot);var lt=new Array(H-R+1);n(lt);var _t=new Array(F);n(_t);var dt=new Array(G);n(dt);var ut,ft,ct,pt=!1;a._tr_init=C,a._tr_stored_block=S,a._tr_flush_block=j,a._tr_tally=U,a._tr_align=E},{"../utils/common":5}],12:[function(t,e,a){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}e.exports=n},{}],13:[function(t,e,a){e.exports=function(t){for(var e=[],a=0;a<t.length;a++){var n=t.charCodeAt(a);if(n>=55296&&n<=56319&&a+1<t.length){var r=t.charCodeAt(a+1);if(r>=56320&&r<=57343){var i=1024*(n-55296)+r-56320+65536;e.push(240+Math.floor(i/64/64/64),128+Math.floor(i/64/64)%64,128+Math.floor(i/64)%64,128+i%64),a+=1;continue}}n>=2048?e.push(224+Math.floor(n/64/64),128+Math.floor(n/64)%64,128+n%64):n>=128?e.push(192+Math.floor(n/64),128+n%64):e.push(n)}return e}},{}]},{},[1])(1)});
@@ -0,0 +1,50 @@
1
+ /// <reference types="./types" />
2
+ import * as adapterRender from "./ts/markdown/adapterRender";
3
+ declare class Vditor {
4
+ /** 点击图片放大 */
5
+ static adapterRender: typeof adapterRender;
6
+ /** 点击图片放大 */
7
+ static previewImage: (oldImgElement: HTMLImageElement, lang?: "en_US" | "fr_FR" | "ja_JP" | "ko_KR" | "ru_RU" | "sv_SE" | "zh_CN" | "zh_TW" | "pt_BR", theme?: string) => void;
8
+ /** 为 element 中的代码块添加复制按钮 */
9
+ static codeRender: (element: HTMLElement, option?: IHljs) => void;
10
+ /** 对 graphviz 进行渲染 */
11
+ static graphvizRender: (element: HTMLElement, cdn?: string) => void;
12
+ /** 为 element 中的代码块进行高亮渲染 */
13
+ static highlightRender: (hljsOption?: IHljs, element?: HTMLElement | Document, cdn?: string) => void;
14
+ /** 对数学公式进行渲染 */
15
+ static mathRender: (element: HTMLElement, options?: {
16
+ cdn?: string;
17
+ math?: IMath;
18
+ }) => void;
19
+ /** 流程图/时序图/甘特图渲染 */
20
+ static mermaidRender: (element: HTMLElement, cdn: string, theme: string) => void;
21
+ /** 支持markdown的思维导图 */
22
+ static markmapRender: (element: HTMLElement, cdn: string, theme: string) => void;
23
+ /** flowchart.js 渲染 */
24
+ static flowchartRender: (element: HTMLElement, cdn?: string) => void;
25
+ /** 图表渲染 */
26
+ static chartRender: (element: HTMLElement | Document, cdn: string, theme: string) => void;
27
+ /** 五线谱渲染 */
28
+ static abcRender: (element?: HTMLElement | Document, cdn?: string) => void;
29
+ /** 脑图渲染 */
30
+ static mindmapRender: (element: HTMLElement | Document, cdn: string, theme: string) => void;
31
+ /** plantuml渲染 */
32
+ static plantumlRender: (element?: HTMLElement | Document, cdn?: string) => void;
33
+ /** 大纲渲染 */
34
+ static outlineRender: (contentElement: HTMLElement, targetElement: Element, vditor?: IVditor) => string;
35
+ /** 为[特定链接](https://github.com/Vanessa219/vditor/issues/7)分别渲染为视频、音频、嵌入的 iframe */
36
+ static mediaRender: (element: HTMLElement) => void;
37
+ /** 对选中的文字进行阅读 */
38
+ static speechRender: (element: HTMLElement, lang?: "en_US" | "fr_FR" | "ja_JP" | "ko_KR" | "ru_RU" | "sv_SE" | "zh_CN" | "zh_TW" | "pt_BR") => void;
39
+ /** 对图片进行懒加载 */
40
+ static lazyLoadImageRender: (element?: HTMLElement | Document) => boolean;
41
+ /** Markdown 文本转换为 HTML,该方法需使用[异步编程](https://ld246.com/article/1546828434083?r=Vaness) */
42
+ static md2html: (mdText: string, options?: IPreviewOptions) => Promise<string>;
43
+ /** 页面 Markdown 文章渲染 */
44
+ static preview: (previewElement: HTMLDivElement, markdown: string, options?: IPreviewOptions) => Promise<void>;
45
+ /** 设置代码主题 */
46
+ static setCodeTheme: (codeTheme: string, cdn?: string) => void;
47
+ /** 设置内容主题 */
48
+ static setContentTheme: (contentTheme: string, path: string) => void;
49
+ }
50
+ export default Vditor;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ !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,(()=>(()=>{"use strict";var e={54:(e,t,n)=>{n.d(t,{g:()=>r});var r=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=["abap","algol","algol_nu","arduino","autumn","borland","bw","colorful","dracula","emacs","friendly","fruity","github","igor","lovelace","manni","monokai","monokailight","murphy","native","paraiso-dark","paraiso-light","pastie","perldoc","pygments","rainbow_dash","rrt","solarized-dark","solarized-dark256","solarized-light","swapoff","tango","trac","vim","vs","xcode","ant-design"],e.CODE_LANGUAGES=["mermaid","echarts","mindmap","plantuml","abc","graphviz","flowchart","apache","js","ts","html","markmap","properties","apache","bash","c","csharp","cpp","css","coffeescript","diff","go","xml","http","json","java","javascript","kotlin","less","lua","makefile","markdown","nginx","objectivec","php","php-template","perl","plaintext","python","python-repl","r","ruby","rust","scss","sql","shell","swift","ini","typescript","vbnet","yaml","ada","clojure","dart","erb","fortran","gradle","haskell","julia","julia-repl","lisp","matlab","pgsql","powershell","sql_more","stata","cmake","mathematica","solidity","yul"],e.CDN="https://unpkg.com/vditor@3.10.4",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,toc:!1},e.HLJS_OPTIONS={enable:!0,lineNumber:!1,defaultLang:"",style:"github"},e.MATH_OPTIONS={engine:"KaTeX",inlineDigit:!1,macros:{}},e.THEME_OPTIONS={current:"light",list:{"ant-design":"Ant Design",dark:"Dark",light:"Light",wechat:"WeChat"},path:e.CDN+"/dist/css/content-theme"},e}()},478:(e,t,n)=>{n.d(t,{Q:()=>o});var r=n(54),i=n(526),a=n(156),o=function(e,t){void 0===e&&(e=document),void 0===t&&(t=r.g.CDN);var n=a.abcRenderAdapter.getElements(e);n.length>0&&(0,i.G)(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,a.abcRenderAdapter.getCode(e).trim()),e.style.overflowX="auto",e.setAttribute("data-processed","true"))}))}))}},156:(e,t,n)=>{n.r(t),n.d(t,{abcRenderAdapter:()=>c,chartRenderAdapter:()=>s,flowchartRenderAdapter:()=>d,graphvizRenderAdapter:()=>l,markmapRenderAdapter:()=>a,mathRenderAdapter:()=>r,mermaidRenderAdapter:()=>i,mindmapRenderAdapter:()=>o,plantumlRenderAdapter:()=>u});var 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-mermaid")}},a={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-markmap")}},o={getCode:function(e){return e.getAttribute("data-code")},getElements:function(e){return e.querySelectorAll(".language-mindmap")}},s={getCode:function(e){return e.innerText},getElements:function(e){return e.querySelectorAll(".language-echarts")}},c={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-abc")}},l={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-graphviz")}},d={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-flowchart")}},u={getCode:function(e){return e.textContent},getElements:function(e){return e.querySelectorAll(".language-plantuml")}}},314:(e,t,n)=>{n.d(t,{p:()=>o});var r=n(54),i=n(526),a=n(156),o=function(e,t,n){void 0===e&&(e=document),void 0===t&&(t=r.g.CDN);var o=a.chartRenderAdapter.getElements(e);o.length>0&&(0,i.G)(t+"/dist/js/echarts/echarts.min.js","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=a.chartRenderAdapter.getCode(e).trim();if(t)try{if("true"===e.getAttribute("data-processed"))return;var r=JSON.parse(t);echarts.init(e,"dark"===n?"dark":void 0).setOption(r),e.setAttribute("data-processed","true")}catch(t){e.className="vditor-reset--error",e.innerHTML="echarts render error: <br>"+t}}}))}))}},730:(e,t,n)=>{n.d(t,{O:()=>a});var r=n(51),i=n(54),a=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.style.maxHeight.indexOf("px")>-1)&&!(e.classList.contains("vditor-preview")&&n>5)))})).forEach((function(e){var n,a,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="'+((null===(n=window.VditorI18n)||void 0===n?void 0:n.copy)||"复制")+"\"\nonmouseover=\"this.setAttribute('aria-label', '"+((null===(a=window.VditorI18n)||void 0===a?void 0:a.copy)||"复制")+"')\"\nclass=\"vditor-tooltipped vditor-tooltipped__w\"\nonclick=\"this.previousElementSibling.select();document.execCommand('copy');this.setAttribute('aria-label', '"+((null===(o=window.VditorI18n)||void 0===o?void 0:o.copied)||"已复制")+"');this.previousElementSibling.blur()\">"+l+"</span>";var u=document.createElement("textarea");u.value=(0,r.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">'+i.g.ZWSP+"</span>")}))}},66:(e,t,n)=>{n.d(t,{P:()=>o});var r=n(54),i=n(526),a=n(156),o=function(e,t){void 0===t&&(t=r.g.CDN);var n=a.flowchartRenderAdapter.getElements(e);0!==n.length&&(0,i.G)(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(a.flowchartRenderAdapter.getCode(e));e.innerHTML="",t.drawSVG(e),e.setAttribute("data-processed","true")}}))}))}},218:(e,t,n)=>{n.d(t,{v:()=>o});var r=n(54),i=n(526),a=n(156),o=function(e,t){void 0===t&&(t=r.g.CDN);var n=a.graphvizRenderAdapter.getElements(e);0!==n.length&&(0,i.G)(t+"/dist/js/graphviz/viz.js","vditorGraphVizScript").then((function(){n.forEach((function(e){var t=a.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('"+document.getElementById("vditorGraphVizScript").src.replace("viz.js","full.render.js")+"');"],{type:"application/javascript"}),r=(window.URL||window.webkitURL).createObjectURL(n),i=new Worker(r);new Viz({worker:i}).renderSVGElement(t).then((function(t){e.innerHTML=t.outerHTML})).catch((function(t){e.innerHTML="graphviz render error: <br>"+t,e.className="vditor-reset--error"}))}catch(e){console.error("graphviz error",e)}e.setAttribute("data-processed","true")}}))}))}},702:(e,t,n)=>{n.d(t,{s:()=>o});var r=n(54),i=n(526),a=n(578),o=function(e,t,n){void 0===t&&(t=document),void 0===n&&(n=r.g.CDN);var o=e.style;r.g.CODE_THEME.includes(o)||(o="github");var s=document.getElementById("vditorHljsStyle"),c=n+"/dist/js/highlight.js/styles/"+o+".css";(s&&s.getAttribute("href")!==c&&s.remove(),(0,a.c)(n+"/dist/js/highlight.js/styles/"+o+".css","vditorHljsStyle"),!1!==e.enable)&&(0!==t.querySelectorAll("pre > code").length&&(0,i.G)(n+"/dist/js/highlight.js/highlight.pack.js","vditorHljsScript").then((function(){(0,i.G)(n+"/dist/js/highlight.js/solidity.min.js","vditorHljsSolidityScript").then((function(){(0,i.G)(n+"/dist/js/highlight.js/yul.min.js","vditorHljsYulScript").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-abc")||t.classList.contains("language-graphviz")||t.classList.contains("language-math"))&&(""!==e.defaultLang&&-1===t.className.indexOf("language-")&&t.classList.add("language-"+e.defaultLang),hljs.highlightElement(t),e.lineNumber)){t.classList.add("vditor-linenumber");var n=t.querySelector(".vditor-linenumber__temp");n||((n=document.createElement("div")).className="vditor-linenumber__temp",t.insertAdjacentElement("beforeend",n));var r=getComputedStyle(t).whiteSpace,i=!1;"pre-wrap"!==r&&"pre-line"!==r||(i=!0);var a="",o=t.textContent.split(/\r\n|\r|\n/g);o.pop(),o.map((function(e){var t="";i&&(n.textContent=e||"\n",t=' style="height:'+n.getBoundingClientRect().height+'px"'),a+="<span"+t+"></span>"})),n.style.display="none",a='<span class="vditor-linenumber__rows">'+a+"</span>",t.insertAdjacentHTML("beforeend",a)}}))}))}))})))}},563:(e,t,n)=>{n.d(t,{K:()=>c});var r=n(54),i=n(526),a=n(156),o={},s=function(e,t){var n=window.markmap,r=n.Transformer,i=n.Markmap,a=n.deriveOptions,s=(n.globalCSS,new r);e.innerHTML='<svg style="width:100%"></svg>';var c=e.firstChild,l=i.create(c,null),d=function(e,t){var n=e.transform(t),r=Object.keys(n.features).filter((function(e){return!o[e]}));r.forEach((function(e){o[e]=!0}));var i=e.getAssets(r),a=i.styles,s=i.scripts,c=window.markmap;return a&&c.loadCSS(a),s&&c.loadJS(s),n}(s,t),u=d.root,m=d.frontmatter,p=a(null==m?void 0:m.markmap);l.setData(u,p),l.fit()},c=function(e,t,n){void 0===t&&(t=r.g.CDN);var o=a.markmapRenderAdapter.getElements(e);0!==o.length&&(0,i.G)(t+"/dist/js/markmap/markmap.min.js","vditorMermaidScript").then((function(){o.forEach((function(e){var t=a.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])}}))}))}},466:(e,t,n)=>{n.d(t,{H:()=>c});var r=n(54),i=n(526),a=n(578),o=n(51),s=n(156),c=function(e,t){var n=s.mathRenderAdapter.getElements(e);if(0!==n.length){var c={cdn:r.g.CDN,math:{engine:"KaTeX",inlineDigit:!1,macros:{}}};if(t&&t.math&&(t.math=Object.assign({},c.math,t.math)),"KaTeX"===(t=Object.assign({},c,t)).math.engine)(0,a.c)(t.cdn+"/dist/js/katex/katex.min.css?v=0.16.9","vditorKatexStyle"),(0,i.G)(t.cdn+"/dist/js/katex/katex.min.js?v=0.16.9","vditorKatexScript").then((function(){(0,i.G)(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=(0,o.X)(s.mathRenderAdapter.getCode(e));e.setAttribute("data-math",n);try{e.innerHTML=katex.renderToString(n,{displayMode:"DIV"===e.tagName,output:"html",macros:t.math.macros})}catch(t){e.innerHTML=t.message,e.className="language-math vditor-reset--error"}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"))}))}}))}))}));else if("MathJax"===t.math.engine){window.MathJax||(window.MathJax={loader:{paths:{mathjax:t.cdn+"/dist/js/mathjax"}},startup:{typeset:!1},tex:{macros:t.math.macros}},Object.assign(window.MathJax,t.math.mathJaxOptions)),(0,i.J)(t.cdn+"/dist/js/mathjax/tex-svg-full.js","protyleMathJaxScript");var l=function(e,t){var n=(0,o.X)(e.textContent).trim(),r=window.MathJax.getMetricsFor(e);r.display="DIV"===e.tagName,window.MathJax.tex2svgPromise(n,r).then((function(r){e.innerHTML="",e.setAttribute("data-math",n),e.append(r),window.MathJax.startup.document.clear(),window.MathJax.startup.document.updateDocument();var i=r.querySelector('[data-mml-node="merror"]');i&&""!==i.textContent.trim()&&(e.innerHTML=i.textContent.trim(),e.className="vditor-reset--error"),t&&t()}))};window.MathJax.startup.promise.then((function(){for(var e=[],t=function(t){var r=n[t];r.parentElement.classList.contains("vditor-wysiwyg__pre")||r.parentElement.classList.contains("vditor-ir__marker--pre")||r.getAttribute("data-math")||!(0,o.X)(r.textContent).trim()||e.push((function(e){t===n.length-1?l(r):l(r,e)}))},r=0;r<n.length;r++)t(r);!function(e){if(0!==e.length){var t=0,n=e[e.length-1],r=function(){var i=e[t++];i===n?i():i(r)};r()}}(e)}))}}}},554:(e,t,n)=>{n.d(t,{Y:()=>i});var r=n(835),i=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="'+t+'"></video>'),e.remove()}(e,t):t.match(/^.+.(mp3|wav|flac)$/)?function(e,t){e.insertAdjacentHTML("afterend",'<audio controls="controls" src="'+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+))?/),i=t.match(/\/\/v\.youku\.com\/v_show\/id_(\w+)=*\.html/),a=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/'+n[1]+(n[2]?"?start="+n[2]:"")+'"></iframe>'),e.remove();else if(i&&i[1])e.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//player.youku.com/embed/'+i[1]+'"></iframe>'),e.remove();else if(a&&a[1])e.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="https://v.qq.com/txp/iframe/player.html?vid='+a[1]+'"></iframe>'),e.remove();else if(o&&o[1])e.insertAdjacentHTML("afterend",'<iframe class="iframe__video"\n src="//coub.com/embed/'+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='+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/'+c[2]+'"></iframe>'),e.remove();else if(t.indexOf("bilibili.com")>-1&&(t.indexOf("bvid=")>-1||l&&l[1])){var u={bvid:(0,r.o)("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+=e+"="+u[e],t<p.length-1&&(m+="&")})),e.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="'+m+'"></iframe>'),e.remove()}else d&&d[1]&&(e.insertAdjacentHTML("afterend",'<iframe class="iframe__video" src="//embed.ted.com/talks/'+d[1]+'"></iframe>'),e.remove())}(e,t))}))}},40:(e,t,n)=>{n.d(t,{i:()=>l});var r=n(54),i=n(526),a=n(156),o=n(835),s=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}))},c=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},l=function(e,t,n){void 0===t&&(t=r.g.CDN);var l=a.mermaidRenderAdapter.getElements(e);0!==l.length&&(0,i.G)(t+"/dist/js/mermaid/mermaid.min.js","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,r,i,s;return c(this,(function(c){switch(c.label){case 0:if(t=a.mermaidRenderAdapter.getCode(e),"true"===e.getAttribute("data-processed")||""===t.trim())return[2];n="mermaid"+(0,o.W)(),c.label=1;case 1:return c.trys.push([1,3,,4]),[4,mermaid.render(n,e.textContent)];case 2:return r=c.sent(),e.innerHTML=r.svg,[3,4];case 3:return i=c.sent(),s=document.querySelector("#"+n),e.innerHTML=s.outerHTML+'<br>\n<div style="text-align: left"><small>'+i.message.replace(/\n/,"<br>")+"</small></div>",s.parentElement.remove(),[3,4];case 4:return e.setAttribute("data-processed","true"),[2]}}))}))}))}))}},749:(e,t,n)=>{n.d(t,{P:()=>o});var r=n(54),i=n(526),a=n(156),o=function(e,t,n){void 0===e&&(e=document),void 0===t&&(t=r.g.CDN);var o=a.mindmapRenderAdapter.getElements(e);o.length>0&&(0,i.G)(t+"/dist/js/echarts/echarts.min.js","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=a.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>"+t}}}))}))}},818:(e,t,n)=>{n.d(t,{k:()=>a});var r=n(64),i=n(466),a=function(e,t,n){var a="",o=[];if(Array.from(e.children).forEach((function(e,t){if((0,r.W)(e)){if(n){var i=e.id.lastIndexOf("_");e.id=e.id.substring(0,-1===i?void 0:i)+"_"+t}o.push(e.id),a+=e.outerHTML.replace("<wbr>","")}})),""===a)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>"+a):s.innerHTML=n.lute.SpinVditorIRDOM("<p>[ToC]</p>"+a):s.innerHTML=n.lute.SpinVditorDOM("<p>[ToC]</p>"+a),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>"+a)}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=n+"<span>"+e.innerHTML+"</span>"}else e.innerHTML="<svg></svg><span>"+e.innerHTML+"</span>";e.setAttribute("data-target-id",o[t])})),a=s.firstElementChild.innerHTML,0===l.length?(t.innerHTML="",a):(t.innerHTML=a,n&&(0,i.H)(t,{cdn:n.options.cdn,math:n.options.preview.math}),t.firstElementChild.addEventListener("click",(function(r){for(var i=r.target;i&&!i.isEqualNode(t);){if(i.classList.contains("vditor-outline__action")){i.classList.contains("vditor-outline__action--close")?(i.classList.remove("vditor-outline__action--close"),i.parentElement.nextElementSibling.setAttribute("style","display:block")):(i.classList.add("vditor-outline__action--close"),i.parentElement.nextElementSibling.setAttribute("style","display:none")),r.preventDefault(),r.stopPropagation();break}if(i.getAttribute("data-target-id")){r.preventDefault(),r.stopPropagation();var a=document.getElementById(i.getAttribute("data-target-id"));if(!a)return;if(n)if("auto"===n.options.height){var o=a.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=a.offsetTop:e.scrollTop=a.offsetTop;else window.scrollTo(window.scrollX,a.offsetTop);break}i=i.parentElement}})),a)}},408:(e,t,n)=>{n.d(t,{B:()=>o});var r=n(54),i=n(526),a=n(156),o=function(e,t){void 0===e&&(e=document),void 0===t&&(t=r.g.CDN);var n=a.plantumlRenderAdapter.getElements(e);0!==n.length&&(0,i.G)(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=a.plantumlRenderAdapter.getCode(e).trim();if(t)try{e.innerHTML='<object type="image/svg+xml" data="https://www.plantuml.com/plantuml/svg/~1'+plantumlEncoder.encode(t)+'"/>'}catch(t){e.className="vditor-reset--error",e.innerHTML="plantuml render error: <br>"+t}}}))}))}},895:(e,t,n)=>{n.d(t,{X:()=>r});var r=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}},863:(e,t,n)=>{n.d(t,{E:()=>r});var r=function(e,t,n){void 0===t&&(t="zh_CN"),void 0===n&&(n="classic");var r=e.getBoundingClientRect();document.body.insertAdjacentHTML("beforeend",'<div class="vditor vditor-img'+("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 '+window.VditorI18n.spin+"\n </span>\n <span class=\"vditor-img__btn\" onclick=\"this.parentElement.parentElement.outerHTML = '';document.body.style.overflow = ''\">\n X &nbsp;"+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: '+e.width+"px;height:"+e.height+"px;transform: translate3d("+r.left+"px, "+(r.top-36)+'px, 0)" src="'+e.getAttribute("src")+'">\n </div>\n</div>'),document.body.style.overflow="hidden";var i=document.querySelector(".vditor-img img"),a="translate3d("+Math.max(0,window.innerWidth-e.naturalWidth)/2+"px, "+Math.max(0,window.innerHeight-36-e.naturalHeight)/2+"px, 0)";setTimeout((function(){i.setAttribute("style","transition: transform .3s ease-in-out;transform: "+a),setTimeout((function(){i.parentElement.scrollTo((i.parentElement.scrollWidth-i.parentElement.clientWidth)/2,(i.parentElement.scrollHeight-i.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>i.parentElement.clientHeight?i.style.transform="translate3d("+Math.max(0,window.innerWidth-e.naturalWidth)/2+"px, "+(e.naturalWidth/2-e.naturalHeight/2)+"px, 0) rotateZ("+t+"deg)":i.style.transform=a+" rotateZ("+t+"deg)",o.setAttribute("data-deg",t.toString()),setTimeout((function(){i.parentElement.scrollTo((i.parentElement.scrollWidth-i.parentElement.clientWidth)/2,(i.parentElement.scrollHeight-i.parentElement.clientHeight)/2)}),400)}))}},312:(e,t,n)=>{n.d(t,{Y:()=>a});var r=n(54),i=n(578),a=function(e,t){void 0===t&&(t=r.g.CDN),r.g.CODE_THEME.includes(e)||(e="github");var n=document.getElementById("vditorHljsStyle"),a=t+"/dist/js/highlight.js/styles/"+e+".css";n?n.getAttribute("href")!==a&&(n.remove(),(0,i.c)(a,"vditorHljsStyle")):(0,i.c)(a,"vditorHljsStyle")}},227:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(578),i=function(e,t){if(e&&t){var n=document.getElementById("vditorContentTheme"),i=t+"/"+e+".css";n?n.getAttribute("href")!==i&&(n.remove(),(0,r.c)(i,"vditorContentTheme")):(0,r.c)(i,"vditorContentTheme")}}},526:(e,t,n)=>{n.d(t,{G:()=>i,J:()=>r});var r=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 r=document.createElement("script");r.type="text/javascript",r.text=n.responseText,r.id=t,document.head.appendChild(r)},i=function(e,t){return new Promise((function(n,r){if(document.getElementById(t))return n(),!1;var i=document.createElement("script");i.src=e,i.async=!0,document.head.appendChild(i),i.onerror=function(e){r(e)},i.onload=function(){if(document.getElementById(t))return i.remove(),n(),!1;i.id=t,n()}}))}},578:(e,t,n)=>{n.d(t,{c:()=>r});var r=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)}}},51:(e,t,n)=>{n.d(t,{X:()=>r});var r=function(e){return e.replace(/\u00a0/g," ")}},835:(e,t,n)=>{n.d(t,{W:()=>r,o:()=>i});var r=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)}))},i=function(e,t){void 0===t&&(t=window.location.search);var n=t.substring(t.indexOf("?")),r=n.indexOf("#");return new URLSearchParams(n.substring(0,r>=0?r:void 0)).get(e)}},827:(e,t,n)=>{n.d(t,{fb:()=>i,lG:()=>r});var r=function(e,t){if(!e)return!1;3===e.nodeType&&(e=e.parentElement);for(var n=e,r=!1;n&&!r&&!n.classList.contains("vditor-reset");)n.nodeName===t?r=!0:n=n.parentElement;return r&&n},i=function(e,t){if(!e)return!1;3===e.nodeType&&(e=e.parentElement);for(var n=e,r=!1;n&&!r&&!n.classList.contains("vditor-reset");)n.classList.contains(t)?r=!0:n=n.parentElement;return r&&n}},64:(e,t,n)=>{n.d(t,{W:()=>r});var r=function(e){var t=function(e,t){if(!e)return!1;3===e.nodeType&&(e=e.parentElement);for(var n=e,r=!1;n&&!r&&!n.classList.contains("vditor-reset");)0===n.nodeName.indexOf(t)?r=!0:n=n.parentElement;return r&&n}(e,"H");return!(!t||2!==t.tagName.length||"HR"===t.tagName)&&t}},640:(e,t,n)=>{n.d(t,{T:()=>r});var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n={},i=function(e){for(var t in e)e.hasOwnProperty(t)&&("[object Object]"===Object.prototype.toString.call(e[t])?n[t]=r(n[t],e[t]):n[t]=e[t])},a=0;a<e.length;a++)i(e[a]);return n}},393:(e,t,n)=>{n.d(t,{Hc:()=>r});n(54);var r=function(e){var t=window.getSelection();t.removeAllRanges(),t.addRange(e)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},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 r={};return(()=>{n.d(r,{default:()=>C});var e=n(478),t=n(156),i=n(314),a=n(730),o=n(66),s=n(218),c=n(702),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(466),u=n(554),m=n(40),p=n(563),h=n(749),v=n(818),g=n(408),f=n(54),w=n(227),y=n(526),b=n(827),S=n(640),E=n(895),L=n(393),T=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(r){r.lang===t.replace("_","-")&&(e=r),r.default&&(n=r)})),e||(e=n),e},r='<svg><use xlink:href="#vditor-icon-play"></use></svg>',i='<svg><use xlink:href="#vditor-icon-pause"></use></svg>';document.getElementById("vditorIconScript")||(r='<svg viewBox="0 0 32 32"><path d="M3.436 0l25.128 16-25.128 16v-32z"></path></svg>',i='<svg viewBox="0 0 32 32"><path d="M20.617 0h9.128v32h-9.128v-32zM2.255 32v-32h9.128v32h-9.128z"></path></svg>');var a=document.querySelector(".vditor-speech");a||((a=document.createElement("button")).className="vditor-speech",e.insertAdjacentElement("beforeend",a),void 0!==speechSynthesis.onvoiceschanged&&(speechSynthesis.onvoiceschanged=n));var o=n(),s=new SpeechSynthesisUtterance;s.voice=o,s.onend=s.onerror=function(){a.style.display="none",speechSynthesis.cancel(),a.classList.remove("vditor-speech--current"),a.innerHTML=r},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 a.classList.contains("vditor-speech--current")?speechSynthesis.speaking&&(speechSynthesis.paused?(speechSynthesis.resume(),a.innerHTML=i):(speechSynthesis.pause(),a.innerHTML=r)):(s.text=a.getAttribute("data-text"),speechSynthesis.speak(s),a.classList.add("vditor-speech--current"),a.innerHTML=i),(0,L.Hc)(window.vditorSpeechRange),void e.focus();if(a.style.display="none",speechSynthesis.cancel(),a.classList.remove("vditor-speech--current"),a.innerHTML=r,0!==getSelection().rangeCount){var o=getSelection().getRangeAt(0),c=o.toString().trim();if(c){window.vditorSpeechRange=o.cloneRange();var l=o.getBoundingClientRect();a.innerHTML=r,a.style.display="block",a.style.top=l.top+l.height+document.querySelector("html").scrollTop-20+"px",void 0!==window.ontouchstart?a.style.left=t.changedTouches[t.changedTouches.length-1].pageX+2+"px":a.style.left=t.clientX+2+"px",a.setAttribute("data-text",c)}}}))}},k=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}c((r=r.apply(e,t||[])).next())}))},A=function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],r=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}},x=function(e){var t,n={anchor:0,cdn:f.g.CDN,customEmoji:{},emojiPath:f.g.CDN+"/dist/images/emoji",hljs:f.g.HLJS_OPTIONS,icon:"ant",lang:"zh_CN",markdown:f.g.MARKDOWN_OPTIONS,math:f.g.MATH_OPTIONS,mode:"light",speech:{enable:!1},render:{media:{enable:!0}},theme:f.g.THEME_OPTIONS};return e.cdn&&((null===(t=e.theme)||void 0===t?void 0:t.path)||(n.theme.path=e.cdn+"/dist/css/content-theme"),e.emojiPath||(n.emojiPath=e.cdn+"/dist/images/emoji")),(0,S.T)(n,e)},j=function(e,t){var n=x(t);return(0,y.G)(n.cdn+"/dist/js/lute/lute.min.js","vditorLuteScript").then((function(){var r=(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,toc:n.markdown.toc});return(null==t?void 0:t.renderers)&&r.SetJSRenderers({renderers:{Md2HTML:t.renderers}}),r.SetHeadingID(!0),r.Md2HTML(e)}))},_=function(t,n,r){return k(void 0,void 0,void 0,(function(){var v,f,S;return A(this,(function(E){switch(E.label){case 0:return v=x(r),[4,j(n,v)];case 1:if(f=E.sent(),v.transform&&(f=v.transform(f)),t.innerHTML=f,t.classList.add("vditor-reset"),v.i18n)return[3,5];if(["en_US","fr_FR","pt_BR","ja_JP","ko_KR","ru_RU","sv_SE","zh_CN","zh_TW"].includes(v.lang))return[3,2];throw new Error("options.lang error, see https://ld246.com/article/1549638745630#options");case 2:return S="vditorI18nScript"+v.lang,document.querySelectorAll('head script[id^="vditorI18nScript"]').forEach((function(e){e.id!==S&&document.head.removeChild(e)})),[4,(0,y.G)(v.cdn+"/dist/js/i18n/"+v.lang+".js",S)];case 3:E.sent(),E.label=4;case 4:return[3,6];case 5:window.VditorI18n=v.i18n,E.label=6;case 6:return v.icon?[4,(0,y.G)(v.cdn+"/dist/js/icons/"+v.icon+".js","vditorIconScript")]:[3,8];case 7:E.sent(),E.label=8;case 8:return(0,w.Z)(v.theme.current,v.theme.path),1===v.anchor&&t.classList.add("vditor-reset--anchor"),(0,a.O)(t,v.hljs),(0,c.s)(v.hljs,t,v.cdn),(0,d.H)(t,{cdn:v.cdn,math:v.math}),(0,m.i)(t,v.cdn,v.mode),(0,p.K)(t,v.cdn,v.mode),(0,o.P)(t,v.cdn),(0,s.v)(t,v.cdn),(0,i.p)(t,v.cdn,v.mode),(0,h.P)(t,v.cdn,v.mode),(0,g.B)(t,v.cdn),(0,e.Q)(t,v.cdn),v.render.media.enable&&(0,u.Y)(t),v.speech.enable&&T(t),0!==v.anchor&&(L=v.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)}),v.after&&v.after(),v.lazyLoadImage&&l(t),t.addEventListener("click",(function(e){var n=(0,b.lG)(e.target,"SPAN");if(n&&(0,b.fb)(n,"vditor-toc")){var r=t.querySelector("#"+n.getAttribute("data-target-id"));r&&window.scrollTo(window.scrollX,r.offsetTop)}else;})),[2]}var L}))}))},M=n(863),H=n(312);const C=function(){function n(){}return n.adapterRender=t,n.previewImage=M.E,n.codeRender=a.O,n.graphvizRender=s.v,n.highlightRender=c.s,n.mathRender=d.H,n.mermaidRender=m.i,n.markmapRender=p.K,n.flowchartRender=o.P,n.chartRender=i.p,n.abcRender=e.Q,n.mindmapRender=h.P,n.plantumlRender=g.B,n.outlineRender=v.k,n.mediaRender=u.Y,n.speechRender=T,n.lazyLoadImageRender=l,n.md2html=j,n.preview=_,n.setCodeTheme=H.Y,n.setContentTheme=w.Z,n}()})(),r=r.default})()));
@@ -0,0 +1,45 @@
1
+ /// <reference types="./types" />
2
+ declare const _VDITOR_VERSION: string;
3
+ export { _VDITOR_VERSION as VDITOR_VERSION };
4
+ export declare abstract class Constants {
5
+ static readonly ZWSP: string;
6
+ static readonly DROP_EDITOR: string;
7
+ static readonly MOBILE_WIDTH: number;
8
+ static readonly CLASS_MENU_DISABLED: string;
9
+ static readonly EDIT_TOOLBARS: string[];
10
+ static readonly CODE_THEME: string[];
11
+ static readonly CODE_LANGUAGES: string[];
12
+ static readonly CDN: string;
13
+ static readonly MARKDOWN_OPTIONS: {
14
+ autoSpace: boolean;
15
+ gfmAutoLink: boolean;
16
+ codeBlockPreview: boolean;
17
+ fixTermTypo: boolean;
18
+ footnotes: boolean;
19
+ linkBase: string;
20
+ linkPrefix: string;
21
+ listStyle: boolean;
22
+ mark: boolean;
23
+ mathBlockPreview: boolean;
24
+ paragraphBeginningSpace: boolean;
25
+ sanitize: boolean;
26
+ toc: boolean;
27
+ };
28
+ static readonly HLJS_OPTIONS: {
29
+ enable: boolean;
30
+ lineNumber: boolean;
31
+ defaultLang: string;
32
+ style: string;
33
+ };
34
+ static readonly MATH_OPTIONS: IMath;
35
+ static readonly THEME_OPTIONS: {
36
+ current: string;
37
+ list: {
38
+ "ant-design": string;
39
+ dark: string;
40
+ light: string;
41
+ wechat: string;
42
+ };
43
+ path: string;
44
+ };
45
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="./types" />
2
+ export declare class DevTools {
3
+ element: HTMLDivElement;
4
+ private ASTChart;
5
+ constructor();
6
+ renderEchart(vditor: IVditor): void;
7
+ }
@@ -0,0 +1,5 @@
1
+ /// <reference types="./types" />
2
+ export declare const download: (vditor: IVditor, content: string, filename: string) => void;
3
+ export declare const exportMarkdown: (vditor: IVditor) => void;
4
+ export declare const exportPDF: (vditor: IVditor) => void;
5
+ export declare const exportHTML: (vditor: IVditor) => void;
@@ -0,0 +1,14 @@
1
+ /// <reference types="./types" />
2
+ export declare class Hint {
3
+ timeId: number;
4
+ element: HTMLDivElement;
5
+ recentLanguage: string;
6
+ private splitChar;
7
+ private lastIndex;
8
+ constructor(hintExtends: IHintExtend[]);
9
+ render(vditor: IVditor): void;
10
+ genHTML(data: IHintData[], key: string, vditor: IVditor): void;
11
+ fillEmoji: (element: HTMLElement, vditor: IVditor) => void;
12
+ select(event: KeyboardEvent, vditor: IVditor): boolean;
13
+ private getKey;
14
+ }
@@ -0,0 +1,2 @@
1
+ /// <reference types="./types" />
2
+ export declare const expandMarker: (range: Range, vditor: IVditor) => void;
@@ -0,0 +1,2 @@
1
+ /// <reference types="./types" />
2
+ export declare const highlightToolbarIR: (vditor: IVditor) => void;
@@ -0,0 +1,13 @@
1
+ /// <reference types="./types" />
2
+ declare class IR {
3
+ range: Range;
4
+ element: HTMLPreElement;
5
+ processTimeoutId: number;
6
+ hlToolbarTimeoutId: number;
7
+ composingLock: boolean;
8
+ preventInput: boolean;
9
+ constructor(vditor: IVditor);
10
+ private copy;
11
+ private bindEvent;
12
+ }
13
+ export { IR };
@@ -0,0 +1,2 @@
1
+ /// <reference types="./types" />
2
+ export declare const input: (vditor: IVditor, range: Range, ignoreSpace?: boolean, event?: InputEvent) => void;
@@ -0,0 +1,9 @@
1
+ /// <reference types="./types" />
2
+ export declare const processHint: (vditor: IVditor) => void;
3
+ export declare const processAfterRender: (vditor: IVditor, options?: {
4
+ enableAddUndoStack: boolean;
5
+ enableHint: boolean;
6
+ enableInput: boolean;
7
+ }) => void;
8
+ export declare const processHeading: (vditor: IVditor, value: string) => void;
9
+ export declare const processToolbar: (vditor: IVditor, actionBtn: Element, prefix: string, suffix: string) => void;
@@ -0,0 +1,2 @@
1
+ /// <reference types="./types" />
2
+ export declare const processKeydown: (vditor: IVditor, event: KeyboardEvent) => boolean;
@@ -0,0 +1 @@
1
+ export declare const abcRender: (element?: (HTMLElement | Document), cdn?: string) => void;
@@ -0,0 +1,37 @@
1
+ export declare const mathRenderAdapter: {
2
+ getCode: (mathElement: Element) => string;
3
+ getElements: (element: HTMLElement) => NodeListOf<Element>;
4
+ };
5
+ export declare const mermaidRenderAdapter: {
6
+ /** 不仅要返回code,并且需要将 code 设置为 el 的 innerHTML */
7
+ getCode: (el: Element) => string;
8
+ getElements: (element: HTMLElement) => NodeListOf<Element>;
9
+ };
10
+ export declare const markmapRenderAdapter: {
11
+ getCode: (el: Element) => string;
12
+ getElements: (element: HTMLElement) => NodeListOf<Element>;
13
+ };
14
+ export declare const mindmapRenderAdapter: {
15
+ getCode: (el: Element) => string;
16
+ getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
17
+ };
18
+ export declare const chartRenderAdapter: {
19
+ getCode: (el: HTMLElement) => string;
20
+ getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
21
+ };
22
+ export declare const abcRenderAdapter: {
23
+ getCode: (el: Element) => string;
24
+ getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
25
+ };
26
+ export declare const graphvizRenderAdapter: {
27
+ getCode: (el: Element) => string;
28
+ getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
29
+ };
30
+ export declare const flowchartRenderAdapter: {
31
+ getCode: (el: Element) => string;
32
+ getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
33
+ };
34
+ export declare const plantumlRenderAdapter: {
35
+ getCode: (el: Element) => string;
36
+ getElements: (el: HTMLElement | Document) => NodeListOf<Element>;
37
+ };
@@ -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,2 @@
1
+ /// <reference types="./types" />
2
+ 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,2 @@
1
+ /// <reference types="./types" />
2
+ export declare const getHTML: (vditor: IVditor) => string;
@@ -0,0 +1,2 @@
1
+ /// <reference types="./types" />
2
+ export declare const getMarkdown: (vditor: IVditor) => string;
@@ -0,0 +1 @@
1
+ export declare const graphvizRender: (element: HTMLElement, cdn?: string) => void;
@@ -0,0 +1,2 @@
1
+ /// <reference types="./types" />
2
+ 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, cdn: string, theme: string) => void;
@@ -0,0 +1,10 @@
1
+ /// <reference types="./types" />
2
+ declare global {
3
+ interface Window {
4
+ MathJax: any;
5
+ }
6
+ }
7
+ export declare const mathRender: (element: HTMLElement, options?: {
8
+ cdn?: string;
9
+ math?: IMath;
10
+ }) => void;
@@ -0,0 +1 @@
1
+ export declare const mediaRender: (element: HTMLElement) => void;
@@ -0,0 +1 @@
1
+ export declare const mermaidRender: (element: HTMLElement, cdn: string, theme: string) => void;
@@ -0,0 +1 @@
1
+ export declare const mindmapRender: (element: (HTMLElement | Document), cdn: string, theme: string) => void;
@@ -0,0 +1,2 @@
1
+ /// <reference types="./types" />
2
+ 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,3 @@
1
+ /// <reference types="./types" />
2
+ export declare const md2html: (mdText: string, options?: IPreviewOptions) => Promise<string>;
3
+ export declare const previewRender: (previewElement: HTMLDivElement, markdown: string, options?: IPreviewOptions) => Promise<void>;
@@ -0,0 +1,2 @@
1
+ /// <reference types="./types" />
2
+ export declare const setLute: (options: ILuteOptions) => Lute;
@@ -0,0 +1,7 @@
1
+ /// <reference types="./types" />
2
+ declare global {
3
+ interface Window {
4
+ vditorSpeechRange: Range;
5
+ }
6
+ }
7
+ export declare const speechRender: (element: HTMLElement, lang?: keyof II18n) => void;
@@ -0,0 +1,7 @@
1
+ /// <reference types="./types" />
2
+ export declare class Outline {
3
+ element: HTMLElement;
4
+ constructor(outlineLabel: string);
5
+ render(vditor: IVditor): string;
6
+ toggle(vditor: IVditor, show?: boolean, focus?: boolean): void;
7
+ }
@@ -0,0 +1,2 @@
1
+ /// <reference types="./types" />
2
+ export declare const previewImage: (oldImgElement: HTMLImageElement, lang?: keyof II18n, theme?: string) => void;
@@ -0,0 +1,10 @@
1
+ /// <reference types="./types" />
2
+ export declare class Preview {
3
+ element: HTMLElement;
4
+ previewElement: HTMLElement;
5
+ private mdTimeoutId;
6
+ constructor(vditor: IVditor);
7
+ render(vditor: IVditor, value?: string): void;
8
+ private afterRender;
9
+ private copyToX;
10
+ }
@@ -0,0 +1,6 @@
1
+ /// <reference types="./types" />
2
+ export declare class Resize {
3
+ element: HTMLElement;
4
+ constructor(vditor: IVditor);
5
+ private bindEvent;
6
+ }
@@ -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,13 @@
1
+ /// <reference types="./types" />
2
+ declare class Editor {
3
+ range: Range;
4
+ element: HTMLPreElement;
5
+ composingLock: boolean;
6
+ processTimeoutId: number;
7
+ hlToolbarTimeoutId: number;
8
+ preventInput: boolean;
9
+ constructor(vditor: IVditor);
10
+ private copy;
11
+ private bindEvent;
12
+ }
13
+ export { Editor };
@@ -0,0 +1,2 @@
1
+ /// <reference types="./types" />
2
+ export declare const inputEvent: (vditor: IVditor, event?: InputEvent) => void;
@@ -0,0 +1,12 @@
1
+ /// <reference types="./types" />
2
+ export declare const processPaste: (vditor: IVditor, text: string) => void;
3
+ export declare const getSideByType: (spanNode: Node, type: string, isPrevious?: boolean) => false | Element;
4
+ export declare const processSpinVditorSVDOM: (html: string, vditor: IVditor) => string;
5
+ export declare const processPreviousMarkers: (spanElement: HTMLElement) => string;
6
+ export declare const processAfterRender: (vditor: IVditor, options?: {
7
+ enableAddUndoStack: boolean;
8
+ enableHint: boolean;
9
+ enableInput: boolean;
10
+ }) => void;
11
+ export declare const processHeading: (vditor: IVditor, value: string) => void;
12
+ export declare const processToolbar: (vditor: IVditor, actionBtn: Element, prefix: string, suffix: string) => void;
@@ -0,0 +1,2 @@
1
+ /// <reference types="./types" />
2
+ 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,5 @@
1
+ /// <reference types="./types" />
2
+ import { MenuItem } from "./MenuItem";
3
+ export declare class Both extends MenuItem {
4
+ constructor(vditor: IVditor, menuItem: IMenuItem);
5
+ }
@@ -0,0 +1,4 @@
1
+ export declare class Br {
2
+ element: HTMLElement;
3
+ constructor();
4
+ }