@datawhale/prosemirror-render 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/dist/AttachmentBlock-ChMNTUOo.mjs +351 -0
  2. package/dist/AttachmentBlock-DsmJP3Kw.js +1 -0
  3. package/dist/AttachmentInline-Dc3dp0g-.js +1 -0
  4. package/dist/AttachmentInline-tbC8BJBy.mjs +52 -0
  5. package/dist/AttachmentMenu-B5x8P9_n.mjs +541 -0
  6. package/dist/AttachmentMenu-ExoCOe4B.js +1 -0
  7. package/dist/Blockquote-BamWUQND.mjs +15 -0
  8. package/dist/Blockquote-CQSBFnsu.js +1 -0
  9. package/dist/BulletList-BQTUD69X.mjs +15 -0
  10. package/dist/BulletList-CFjF3U-l.js +1 -0
  11. package/dist/Callout-Cu6HI-xq.mjs +28 -0
  12. package/dist/Callout-DPdOqTb4.js +1 -0
  13. package/dist/CellOutput-C33VK0df.mjs +981 -0
  14. package/dist/CellOutput-DiKZlIFa.js +6 -0
  15. package/dist/CodeBlock-Cjuxuq7B.mjs +8359 -0
  16. package/dist/CodeBlock-DWniNUQB.js +148 -0
  17. package/dist/Doc-6s4VMDsx.mjs +15 -0
  18. package/dist/Doc-D2yvlSII.js +1 -0
  19. package/dist/FoldBlock-DRdlU-DX.mjs +75 -0
  20. package/dist/FoldBlock-ZPMf0QsR.js +1 -0
  21. package/dist/Grid-GfmJxM93.mjs +31 -0
  22. package/dist/Grid-QToZdaRT.js +1 -0
  23. package/dist/HardBreak-B2tFO31P.mjs +13 -0
  24. package/dist/HardBreak-Dbf5Zg5o.js +1 -0
  25. package/dist/Heading-BElRvhGn.mjs +21 -0
  26. package/dist/Heading-BUnffIAz.js +1 -0
  27. package/dist/HorizontalRule-BRG45oT0.mjs +13 -0
  28. package/dist/HorizontalRule-CE09LZGf.js +1 -0
  29. package/dist/IFrame-CaAOVLGN.mjs +17 -0
  30. package/dist/IFrame-DcCpSoDC.js +1 -0
  31. package/dist/Image-C8v5dCij.mjs +105 -0
  32. package/dist/Image-cHL85CXs.js +1 -0
  33. package/dist/ListItem-BrjxeGxz.js +1 -0
  34. package/dist/ListItem-X0T7a_z8.mjs +15 -0
  35. package/dist/MathDisplay-CESKZV46.js +1 -0
  36. package/dist/MathDisplay-CoGsFzXW.mjs +30 -0
  37. package/dist/MathInline-0xTZoIIq.mjs +30 -0
  38. package/dist/MathInline-C_1SJUVz.js +1 -0
  39. package/dist/McChoices-Aj394G5E.mjs +52 -0
  40. package/dist/McChoices-B4euzY7M.js +1 -0
  41. package/dist/McQuestion-Dq0aM5tC.js +1 -0
  42. package/dist/McQuestion-DvD-J47M.mjs +38 -0
  43. package/dist/McSolution-C5sTXz3y.mjs +24 -0
  44. package/dist/McSolution-N79CllH9.js +1 -0
  45. package/dist/MultipleChoice-DTCF3Q8m.js +1 -0
  46. package/dist/MultipleChoice-Dv-k1zUU.mjs +47 -0
  47. package/dist/OrderedList-B8v1gchv.mjs +17 -0
  48. package/dist/OrderedList-DMl3tvwP.js +1 -0
  49. package/dist/Paragraph-CzRSCJNr.js +1 -0
  50. package/dist/Paragraph-DGcZy8t_.mjs +16 -0
  51. package/dist/SlotNode-6OpoUcOa.mjs +10 -0
  52. package/dist/SlotNode-DMG0R6Vf.js +1 -0
  53. package/dist/TableCell-BY9gdldc.js +1 -0
  54. package/dist/TableCell-Bp52L368.mjs +20 -0
  55. package/dist/TableContainer-C5KXY6f7.js +1 -0
  56. package/dist/TableContainer-C9PhNGlz.mjs +29 -0
  57. package/dist/TableHeader-BTuqvorM.js +1 -0
  58. package/dist/TableHeader-C7KKz3e1.mjs +17 -0
  59. package/dist/TableRow-D4F6AKFt.js +1 -0
  60. package/dist/TableRow-OzpVq1qW.mjs +15 -0
  61. package/dist/Text-Br_pcGz4.mjs +78 -0
  62. package/dist/Text-DlUfrsNI.js +1 -0
  63. package/dist/emoji-Bk6FG72F.js +1 -0
  64. package/dist/emoji-CmOToDEU.mjs +3711 -0
  65. package/dist/index-D2CtpNvR.js +1 -0
  66. package/dist/index-DVmWCrQE.mjs +159 -0
  67. package/dist/index.cjs.js +1 -0
  68. package/dist/index.es.js +4 -0
  69. package/dist/katex-CS0ZfoxP.js +261 -0
  70. package/dist/katex-r9TeExgs.mjs +11690 -0
  71. package/dist/prosemirror-render.css +1 -0
  72. package/dist/types/apis/monitor.d.ts +9 -0
  73. package/dist/types/apis/tingwu.d.ts +14 -0
  74. package/dist/types/apis/types.d.ts +23 -0
  75. package/dist/types/components/TreeRecursive.vue.d.ts +7 -0
  76. package/dist/types/components/TreeRender.vue.d.ts +9 -0
  77. package/dist/types/components/collections/async/AsyncError.vue.d.ts +3 -0
  78. package/dist/types/components/collections/async/AsyncLoading.vue.d.ts +3 -0
  79. package/dist/types/components/collections/attachment/AttachmentBlock.vue.d.ts +7 -0
  80. package/dist/types/components/collections/attachment/AttachmentInline.vue.d.ts +7 -0
  81. package/dist/types/components/collections/attachment/AttachmentMenu.vue.d.ts +16 -0
  82. package/dist/types/components/collections/attachment/VideoDetail.vue.d.ts +7 -0
  83. package/dist/types/components/collections/attachment/index.d.ts +1 -0
  84. package/dist/types/components/collections/basic/Blockquote.vue.d.ts +17 -0
  85. package/dist/types/components/collections/basic/BulletList.vue.d.ts +17 -0
  86. package/dist/types/components/collections/basic/HardBreak.vue.d.ts +7 -0
  87. package/dist/types/components/collections/basic/Heading.vue.d.ts +17 -0
  88. package/dist/types/components/collections/basic/HorizontalRule.vue.d.ts +7 -0
  89. package/dist/types/components/collections/basic/ListItem.vue.d.ts +17 -0
  90. package/dist/types/components/collections/basic/OrderedList.vue.d.ts +17 -0
  91. package/dist/types/components/collections/basic/Paragraph.vue.d.ts +17 -0
  92. package/dist/types/components/collections/basic/Text.vue.d.ts +7 -0
  93. package/dist/types/components/collections/basic/index.d.ts +1 -0
  94. package/dist/types/components/collections/callout/Callout.vue.d.ts +7 -0
  95. package/dist/types/components/collections/callout/index.d.ts +1 -0
  96. package/dist/types/components/collections/code/CellOutput.vue.d.ts +7 -0
  97. package/dist/types/components/collections/code/CodeBlock.vue.d.ts +7 -0
  98. package/dist/types/components/collections/code/index.d.ts +1 -0
  99. package/dist/types/components/collections/fold/FoldBlock.vue.d.ts +7 -0
  100. package/dist/types/components/collections/fold/index.d.ts +1 -0
  101. package/dist/types/components/collections/grid/Grid.vue.d.ts +7 -0
  102. package/dist/types/components/collections/grid/index.d.ts +1 -0
  103. package/dist/types/components/collections/iframe/IFrame.vue.d.ts +7 -0
  104. package/dist/types/components/collections/iframe/index.d.ts +1 -0
  105. package/dist/types/components/collections/img/Image.vue.d.ts +7 -0
  106. package/dist/types/components/collections/img/index.d.ts +1 -0
  107. package/dist/types/components/collections/index.d.ts +1 -0
  108. package/dist/types/components/collections/math/MathDisplay.vue.d.ts +7 -0
  109. package/dist/types/components/collections/math/MathInline.vue.d.ts +7 -0
  110. package/dist/types/components/collections/math/index.d.ts +1 -0
  111. package/dist/types/components/collections/multipleChoice/McChoices.vue.d.ts +16 -0
  112. package/dist/types/components/collections/multipleChoice/McQuestion.vue.d.ts +7 -0
  113. package/dist/types/components/collections/multipleChoice/McSolution.vue.d.ts +8 -0
  114. package/dist/types/components/collections/multipleChoice/MultipleChoice.vue.d.ts +7 -0
  115. package/dist/types/components/collections/multipleChoice/index.d.ts +1 -0
  116. package/dist/types/components/collections/table/TableCell.vue.d.ts +17 -0
  117. package/dist/types/components/collections/table/TableContainer.vue.d.ts +17 -0
  118. package/dist/types/components/collections/table/TableHeader.vue.d.ts +17 -0
  119. package/dist/types/components/collections/table/TableRow.vue.d.ts +17 -0
  120. package/dist/types/components/collections/table/index.d.ts +1 -0
  121. package/dist/types/components/collections/utils.d.ts +2 -0
  122. package/dist/types/components/collections/wrapper/Doc.vue.d.ts +17 -0
  123. package/dist/types/components/collections/wrapper/SlotNode.vue.d.ts +13 -0
  124. package/dist/types/components/collections/wrapper/index.d.ts +1 -0
  125. package/dist/types/components/index.d.ts +1 -0
  126. package/dist/types/icons/Attachment/CardView.vue.d.ts +9 -0
  127. package/dist/types/icons/Attachment/Code/Bat.vue.d.ts +3 -0
  128. package/dist/types/icons/Attachment/Code/C.vue.d.ts +3 -0
  129. package/dist/types/icons/Attachment/Code/Cpp.vue.d.ts +3 -0
  130. package/dist/types/icons/Attachment/Code/Css.vue.d.ts +3 -0
  131. package/dist/types/icons/Attachment/Code/Go.vue.d.ts +3 -0
  132. package/dist/types/icons/Attachment/Code/Html.vue.d.ts +3 -0
  133. package/dist/types/icons/Attachment/Code/Java.vue.d.ts +3 -0
  134. package/dist/types/icons/Attachment/Code/Js.vue.d.ts +3 -0
  135. package/dist/types/icons/Attachment/Code/Json.vue.d.ts +3 -0
  136. package/dist/types/icons/Attachment/Code/Jsx.vue.d.ts +3 -0
  137. package/dist/types/icons/Attachment/Code/Md.vue.d.ts +3 -0
  138. package/dist/types/icons/Attachment/Code/Php.vue.d.ts +3 -0
  139. package/dist/types/icons/Attachment/Code/Python.vue.d.ts +3 -0
  140. package/dist/types/icons/Attachment/Code/Rb.vue.d.ts +3 -0
  141. package/dist/types/icons/Attachment/Code/Sh.vue.d.ts +3 -0
  142. package/dist/types/icons/Attachment/Code/Sql.vue.d.ts +3 -0
  143. package/dist/types/icons/Attachment/Code/Swift.vue.d.ts +3 -0
  144. package/dist/types/icons/Attachment/Code/Ts.vue.d.ts +3 -0
  145. package/dist/types/icons/Attachment/Code/Tsx.vue.d.ts +3 -0
  146. package/dist/types/icons/Attachment/Code/Vue.vue.d.ts +3 -0
  147. package/dist/types/icons/Attachment/Excel.vue.d.ts +3 -0
  148. package/dist/types/icons/Attachment/Eye.vue.d.ts +3 -0
  149. package/dist/types/icons/Attachment/FullScreen.vue.d.ts +3 -0
  150. package/dist/types/icons/Attachment/InlineView.vue.d.ts +9 -0
  151. package/dist/types/icons/Attachment/Pdf.vue.d.ts +3 -0
  152. package/dist/types/icons/Attachment/Ppt.vue.d.ts +3 -0
  153. package/dist/types/icons/Attachment/PreviewView.vue.d.ts +9 -0
  154. package/dist/types/icons/Attachment/UnknownFile.vue.d.ts +3 -0
  155. package/dist/types/icons/Attachment/VideoIcon.vue.d.ts +3 -0
  156. package/dist/types/icons/Attachment/VideoPlay.vue.d.ts +3 -0
  157. package/dist/types/icons/Attachment/Word.vue.d.ts +3 -0
  158. package/dist/types/icons/Code/Confirm.vue.d.ts +3 -0
  159. package/dist/types/icons/Code/Paste.vue.d.ts +3 -0
  160. package/dist/types/icons/Common/Choice.vue.d.ts +3 -0
  161. package/dist/types/icons/Common/Close.vue.d.ts +3 -0
  162. package/dist/types/icons/Common/Comment.vue.d.ts +3 -0
  163. package/dist/types/icons/Common/CopyAnchorLink.vue.d.ts +3 -0
  164. package/dist/types/icons/Common/Delete.vue.d.ts +3 -0
  165. package/dist/types/icons/Common/Download.vue.d.ts +3 -0
  166. package/dist/types/icons/Common/FoldClose.vue.d.ts +3 -0
  167. package/dist/types/icons/Common/FoldOpen.vue.d.ts +3 -0
  168. package/dist/types/icons/Common/Plate.vue.d.ts +3 -0
  169. package/dist/types/icons/Common/Question.vue.d.ts +3 -0
  170. package/dist/types/icons/Common/ShareTextLink.vue.d.ts +3 -0
  171. package/dist/types/index.d.ts +2 -0
  172. package/dist/types/types.d.ts +269 -0
  173. package/dist/types/utils/common.d.ts +1 -0
  174. package/dist/types/utils/emoji.d.ts +10 -0
  175. package/dist/types/utils/globalStatus.d.ts +16 -0
  176. package/dist/types/utils/shiki.d.ts +3 -0
  177. package/dist/types/utils/useAttachment.d.ts +8 -0
  178. package/package.json +29 -0
  179. package/src/apis/monitor.ts +8 -0
  180. package/src/apis/tingwu.ts +22 -0
  181. package/src/apis/types.ts +45 -0
  182. package/src/components/TreeRecursive.vue +47 -0
  183. package/src/components/TreeRender.vue +404 -0
  184. package/src/components/collections/async/AsyncError.vue +17 -0
  185. package/src/components/collections/async/AsyncLoading.vue +1 -0
  186. package/src/components/collections/attachment/AttachmentBlock.vue +561 -0
  187. package/src/components/collections/attachment/AttachmentInline.vue +90 -0
  188. package/src/components/collections/attachment/AttachmentMenu.vue +359 -0
  189. package/src/components/collections/attachment/VideoDetail.vue +375 -0
  190. package/src/components/collections/attachment/index.ts +6 -0
  191. package/src/components/collections/basic/Blockquote.vue +15 -0
  192. package/src/components/collections/basic/BulletList.vue +15 -0
  193. package/src/components/collections/basic/HardBreak.vue +11 -0
  194. package/src/components/collections/basic/Heading.vue +15 -0
  195. package/src/components/collections/basic/HorizontalRule.vue +11 -0
  196. package/src/components/collections/basic/ListItem.vue +15 -0
  197. package/src/components/collections/basic/OrderedList.vue +15 -0
  198. package/src/components/collections/basic/Paragraph.vue +19 -0
  199. package/src/components/collections/basic/Text.vue +73 -0
  200. package/src/components/collections/basic/index.ts +13 -0
  201. package/src/components/collections/callout/Callout.vue +77 -0
  202. package/src/components/collections/callout/index.ts +5 -0
  203. package/src/components/collections/code/CellOutput.vue +72 -0
  204. package/src/components/collections/code/CodeBlock.vue +83 -0
  205. package/src/components/collections/code/index.ts +6 -0
  206. package/src/components/collections/fold/FoldBlock.vue +130 -0
  207. package/src/components/collections/fold/index.ts +5 -0
  208. package/src/components/collections/grid/Grid.vue +70 -0
  209. package/src/components/collections/grid/index.ts +5 -0
  210. package/src/components/collections/iframe/IFrame.vue +19 -0
  211. package/src/components/collections/iframe/index.ts +5 -0
  212. package/src/components/collections/img/Image.vue +318 -0
  213. package/src/components/collections/img/index.ts +5 -0
  214. package/src/components/collections/index.ts +29 -0
  215. package/src/components/collections/math/MathDisplay.vue +42 -0
  216. package/src/components/collections/math/MathInline.vue +42 -0
  217. package/src/components/collections/math/index.ts +6 -0
  218. package/src/components/collections/multipleChoice/McChoices.vue +72 -0
  219. package/src/components/collections/multipleChoice/McQuestion.vue +61 -0
  220. package/src/components/collections/multipleChoice/McSolution.vue +47 -0
  221. package/src/components/collections/multipleChoice/MultipleChoice.vue +62 -0
  222. package/src/components/collections/multipleChoice/index.ts +8 -0
  223. package/src/components/collections/table/TableCell.vue +20 -0
  224. package/src/components/collections/table/TableContainer.vue +32 -0
  225. package/src/components/collections/table/TableHeader.vue +15 -0
  226. package/src/components/collections/table/TableRow.vue +15 -0
  227. package/src/components/collections/table/index.ts +8 -0
  228. package/src/components/collections/utils.ts +17 -0
  229. package/src/components/collections/wrapper/Doc.vue +15 -0
  230. package/src/components/collections/wrapper/SlotNode.vue +5 -0
  231. package/src/components/collections/wrapper/index.ts +6 -0
  232. package/src/components/index.ts +1 -0
  233. package/src/icons/Attachment/CardView.vue +21 -0
  234. package/src/icons/Attachment/Code/Bat.vue +26 -0
  235. package/src/icons/Attachment/Code/C.vue +26 -0
  236. package/src/icons/Attachment/Code/Cpp.vue +26 -0
  237. package/src/icons/Attachment/Code/Css.vue +34 -0
  238. package/src/icons/Attachment/Code/Go.vue +26 -0
  239. package/src/icons/Attachment/Code/Html.vue +34 -0
  240. package/src/icons/Attachment/Code/Java.vue +42 -0
  241. package/src/icons/Attachment/Code/Js.vue +26 -0
  242. package/src/icons/Attachment/Code/Json.vue +26 -0
  243. package/src/icons/Attachment/Code/Jsx.vue +30 -0
  244. package/src/icons/Attachment/Code/Md.vue +26 -0
  245. package/src/icons/Attachment/Code/Php.vue +26 -0
  246. package/src/icons/Attachment/Code/Python.vue +30 -0
  247. package/src/icons/Attachment/Code/Rb.vue +26 -0
  248. package/src/icons/Attachment/Code/Sh.vue +30 -0
  249. package/src/icons/Attachment/Code/Sql.vue +30 -0
  250. package/src/icons/Attachment/Code/Swift.vue +26 -0
  251. package/src/icons/Attachment/Code/Ts.vue +26 -0
  252. package/src/icons/Attachment/Code/Tsx.vue +30 -0
  253. package/src/icons/Attachment/Code/Vue.vue +24 -0
  254. package/src/icons/Attachment/Excel.vue +26 -0
  255. package/src/icons/Attachment/Eye.vue +15 -0
  256. package/src/icons/Attachment/FullScreen.vue +15 -0
  257. package/src/icons/Attachment/InlineView.vue +21 -0
  258. package/src/icons/Attachment/Pdf.vue +25 -0
  259. package/src/icons/Attachment/Ppt.vue +26 -0
  260. package/src/icons/Attachment/PreviewView.vue +21 -0
  261. package/src/icons/Attachment/UnknownFile.vue +26 -0
  262. package/src/icons/Attachment/VideoIcon.vue +25 -0
  263. package/src/icons/Attachment/VideoPlay.vue +15 -0
  264. package/src/icons/Attachment/Word.vue +26 -0
  265. package/src/icons/Code/Confirm.vue +38 -0
  266. package/src/icons/Code/Paste.vue +8 -0
  267. package/src/icons/Common/Choice.vue +28 -0
  268. package/src/icons/Common/Close.vue +15 -0
  269. package/src/icons/Common/Comment.vue +16 -0
  270. package/src/icons/Common/CopyAnchorLink.vue +15 -0
  271. package/src/icons/Common/Delete.vue +15 -0
  272. package/src/icons/Common/Download.vue +15 -0
  273. package/src/icons/Common/FoldClose.vue +9 -0
  274. package/src/icons/Common/FoldOpen.vue +9 -0
  275. package/src/icons/Common/Plate.vue +23 -0
  276. package/src/icons/Common/Question.vue +8 -0
  277. package/src/icons/Common/ShareTextLink.vue +15 -0
  278. package/src/index.ts +3 -0
  279. package/src/types.ts +236 -0
  280. package/src/utils/common.ts +6 -0
  281. package/src/utils/emoji.ts +3715 -0
  282. package/src/utils/globalStatus.ts +19 -0
  283. package/src/utils/shiki.ts +25 -0
  284. package/src/utils/useAttachment.ts +215 -0
  285. package/tsconfig.build.json +10 -0
  286. package/tsconfig.json +23 -0
  287. package/vite.config.ts +24 -0
@@ -0,0 +1,351 @@
1
+ import { createElementBlock as a, openBlock as s, createElementVNode as e, defineComponent as B, ref as h, inject as F, onMounted as L, toDisplayString as l, createCommentVNode as w, normalizeClass as b, Fragment as O, renderList as J, createTextVNode as S, useTemplateRef as j, computed as H, withDirectives as E, createBlock as _, resolveDynamicComponent as P, unref as v, createVNode as M, vShow as N } from "vue";
2
+ import { _ as x, a as z } from "./index-DVmWCrQE.mjs";
3
+ import { u as K, A as R, r as D } from "./AttachmentMenu-B5x8P9_n.mjs";
4
+ async function U(t, i) {
5
+ return await t.post("/api/monitor", { data: i });
6
+ }
7
+ const q = {}, G = {
8
+ width: "1em",
9
+ height: "1em",
10
+ viewBox: "0 0 24 24",
11
+ fill: "none",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ "data-icon": "VisibleOutlined"
14
+ };
15
+ function Q(t, i) {
16
+ return s(), a("svg", G, [...i[0] || (i[0] = [
17
+ e("path", {
18
+ d: "M11.985 18.5c3.238 0 6.236-2.06 9.015-6.513C18.292 7.55 15.3 5.5 11.985 5.5 8.67 5.5 5.689 7.549 3 11.987c2.76 4.454 5.748 6.513 8.985 6.513ZM1.502 12.89a1.782 1.782 0 0 1 .023-1.838C4.428 6.017 7.915 3.5 11.984 3.5c4.086 0 7.594 2.538 10.523 7.614l.028.048c.296.519.294 1.16-.01 1.675-3.006 5.108-6.52 7.663-10.541 7.663-4.007 0-7.501-2.537-10.482-7.61ZM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm0-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",
19
+ fill: "rgb(100, 106, 115)"
20
+ }, null, -1)
21
+ ])]);
22
+ }
23
+ const W = /* @__PURE__ */ x(q, [["render", Q]]), X = {}, Y = {
24
+ width: "1em",
25
+ height: "1em",
26
+ viewBox: "0 0 24 24",
27
+ fill: "none",
28
+ xmlns: "http://www.w3.org/2000/svg",
29
+ "data-icon": "PlayFilled"
30
+ };
31
+ function ee(t, i) {
32
+ return s(), a("svg", Y, [...i[0] || (i[0] = [
33
+ e("path", {
34
+ d: "M21.073 13.698a2.018 2.018 0 0 0 0-3.396L7.116 1.325C5.771.459 4 1.425 4 3.023v17.954c0 1.599 1.771 2.564 3.116 1.698l13.957-8.977Z",
35
+ fill: "rgb(100, 106, 115)"
36
+ }, null, -1)
37
+ ])]);
38
+ }
39
+ const te = /* @__PURE__ */ x(X, [["render", ee]]);
40
+ async function se(t, i) {
41
+ return (await t.get("/admin/editor/v2/videoProgressDetail", {
42
+ params: i
43
+ })).data;
44
+ }
45
+ const ae = { class: "ai-panel" }, ne = { class: "panel-header" }, oe = {
46
+ key: 0,
47
+ class: "panel-loading"
48
+ }, ie = {
49
+ key: 1,
50
+ class: "panel-error"
51
+ }, le = {
52
+ key: 2,
53
+ class: "panel-content"
54
+ }, ce = {
55
+ key: 0,
56
+ class: "content-card summary-card"
57
+ }, de = { class: "content-card chapters-card" }, re = { class: "card-header" }, ve = { class: "badge" }, ue = { class: "chapter-list" }, me = ["onClick"], he = { class: "chapter-index" }, fe = { class: "chapter-info" }, ke = { class: "chapter-title" }, we = { class: "chapter-time" }, pe = {
58
+ key: 0,
59
+ class: "empty-state"
60
+ }, ye = /* @__PURE__ */ B({
61
+ __name: "VideoDetail",
62
+ props: {
63
+ taskId: {},
64
+ videoRef: {}
65
+ },
66
+ setup(t) {
67
+ const i = t, m = h(!1), u = h(""), r = h(null), f = h(!1), k = F(z), p = async () => {
68
+ if (i.taskId && k) {
69
+ m.value = !0;
70
+ try {
71
+ const n = await se(k, { taskId: i.taskId });
72
+ r.value = {
73
+ summary: n.summary,
74
+ chapters: JSON.parse(n.chapters)
75
+ }, m.value = !1;
76
+ } catch (n) {
77
+ u.value = "加载失败", m.value = !1, console.error(n);
78
+ }
79
+ }
80
+ }, I = async (n) => {
81
+ i.videoRef && (i.videoRef.currentTime = n.startTime, i.videoRef.play()), k && await U(k, {
82
+ log: JSON.stringify({
83
+ name: "toggleVideoAiPanelSidebar",
84
+ chapterTitle: n.title,
85
+ tingwuTaskId: i.taskId,
86
+ videoPageUrl: window.location.href
87
+ })
88
+ });
89
+ }, y = (n) => {
90
+ const o = Math.floor(n / 60), d = Math.floor(n % 60);
91
+ return `${o}:${d.toString().padStart(2, "0")}`;
92
+ };
93
+ return L(async () => {
94
+ await p();
95
+ }), (n, o) => (s(), a("div", ae, [
96
+ e("div", ne, [
97
+ o[3] || (o[3] = e("div", { class: "header-title" }, [
98
+ e("span", { class: "icon" }, "🤖"),
99
+ e("span", null, "智能分析结果")
100
+ ], -1)),
101
+ e("button", {
102
+ class: "close-btn",
103
+ onClick: o[0] || (o[0] = (d) => n.$emit("close")),
104
+ title: "关闭助手"
105
+ }, [...o[2] || (o[2] = [
106
+ e("svg", {
107
+ viewBox: "0 0 24 24",
108
+ fill: "none",
109
+ stroke: "currentColor",
110
+ "stroke-width": "2"
111
+ }, [
112
+ e("path", {
113
+ "stroke-linecap": "round",
114
+ "stroke-linejoin": "round",
115
+ d: "M6 18L18 6M6 6l12 12"
116
+ })
117
+ ], -1)
118
+ ])])
119
+ ]),
120
+ m.value ? (s(), a("div", oe, [...o[4] || (o[4] = [
121
+ e("div", { class: "spinner" }, null, -1),
122
+ e("p", null, "正在生成分析结果...", -1)
123
+ ])])) : u.value ? (s(), a("div", ie, l(u.value), 1)) : (s(), a("div", le, [
124
+ r.value?.summary ? (s(), a("div", ce, [
125
+ o[5] || (o[5] = e("div", { class: "card-header" }, [
126
+ e("span", { class: "card-title" }, "全文摘要")
127
+ ], -1)),
128
+ e("div", {
129
+ class: b(["summary-text", { expanded: f.value }])
130
+ }, l(r.value.summary), 3),
131
+ r.value.summary.length > 100 ? (s(), a("div", {
132
+ key: 0,
133
+ class: "expand-btn",
134
+ onClick: o[1] || (o[1] = (d) => f.value = !f.value)
135
+ }, l(f.value ? "收起" : "展开全文"), 1)) : w("", !0)
136
+ ])) : w("", !0),
137
+ e("div", de, [
138
+ e("div", re, [
139
+ o[6] || (o[6] = e("span", { class: "card-title" }, "章节速览", -1)),
140
+ e("span", ve, l(r.value?.chapters?.length || 0), 1)
141
+ ]),
142
+ e("div", ue, [
143
+ (s(!0), a(O, null, J(r.value?.chapters || [], (d, $) => (s(), a("div", {
144
+ key: $,
145
+ class: "chapter-item",
146
+ onClick: (g) => I(d)
147
+ }, [
148
+ e("div", he, l($ + 1), 1),
149
+ e("div", fe, [
150
+ e("div", ke, l(d.title), 1),
151
+ e("div", we, [
152
+ o[7] || (o[7] = e("i", { class: "icon-time" }, "🕒", -1)),
153
+ S(" " + l(y(d.startTime)) + " - " + l(y(d.endTime)), 1)
154
+ ])
155
+ ])
156
+ ], 8, me))), 128)),
157
+ !r.value?.chapters || r.value.chapters.length === 0 ? (s(), a("div", pe, "暂无章节信息")) : w("", !0)
158
+ ])
159
+ ])
160
+ ]))
161
+ ]));
162
+ }
163
+ }), ge = /* @__PURE__ */ x(ye, [["__scopeId", "data-v-a1e65f27"]]), be = {
164
+ key: 0,
165
+ class: "attachment-block-card-container"
166
+ }, $e = { class: "attachment-block-card-icon" }, Te = { class: "attachment-block-card-info" }, _e = { class: "attachment-block-card-info-name" }, Pe = {
167
+ key: 0,
168
+ class: "attachment-block-card-info-size"
169
+ }, xe = {
170
+ key: 1,
171
+ class: "attachment-block-card-info-size"
172
+ }, Ie = {
173
+ key: 2,
174
+ class: "attachment-block-card-info-size",
175
+ style: { color: "rgb(247, 78, 0)" }
176
+ }, Ce = { class: "attachment-block-card-preview" }, Me = {
177
+ key: 1,
178
+ class: "attachment-block-preview-container"
179
+ }, Se = {
180
+ key: 0,
181
+ class: "video-block-preview-container"
182
+ }, Ae = { class: "video-main-section" }, Ve = {
183
+ key: 0,
184
+ class: "video-player-wrapper"
185
+ }, Ee = ["src"], Ne = {
186
+ key: 1,
187
+ class: "video-uploading-wrapper"
188
+ }, Re = {
189
+ key: 0,
190
+ class: "uploading-content"
191
+ }, De = {
192
+ key: 1,
193
+ class: "error-content"
194
+ }, Be = {
195
+ key: 2,
196
+ class: "video-toolbar"
197
+ }, Fe = {
198
+ key: 0,
199
+ class: "video-sidebar-section"
200
+ }, ze = {
201
+ key: 1,
202
+ class: "notVideo-block-preview-container"
203
+ }, Ue = {
204
+ key: 1,
205
+ class: "attachment-block-preview-unable"
206
+ }, Ze = ["src"], Le = { class: "attachment-block-preview-unable-text" }, Oe = { style: { "font-weight": "bold" } }, Je = { class: "attachment-block-preview-unable-text" }, je = { class: "attachment-block-preview-info" }, He = /* @__PURE__ */ B({
207
+ __name: "AttachmentBlock",
208
+ props: {
209
+ node: {}
210
+ },
211
+ setup(t) {
212
+ const i = F(z), m = j("videoPreviewRef"), u = H(() => t.node.attrs.uploadProgress === void 0 || t.node.attrs.uploadProgress < 1), { icon: r, calculatedFileSize: f, cannotPreviewImgDataUrl: k, canPreview: p, genPreviewSrc: I } = K(
213
+ t.node.attrs.fileType,
214
+ t.node.attrs.fileSize
215
+ ), y = (V) => ["mp4", "avi", "mkv", "mov"].includes(V), n = h(!1), o = async () => {
216
+ n.value = !n.value, i && n.value && t.node.attrs.tingwuTaskId && await U(i, {
217
+ log: JSON.stringify({
218
+ name: "toggleVideoAiPanel",
219
+ tingwuTaskId: t.node.attrs.tingwuTaskId,
220
+ videoPageUrl: window.location.href
221
+ })
222
+ });
223
+ }, d = h(!1), $ = () => {
224
+ d.value = !0, alert("全屏预览功能将在后续版本中开放");
225
+ }, g = h(!1), T = h(null), Z = () => {
226
+ T.value = setTimeout(() => {
227
+ g.value = !1;
228
+ }, 200);
229
+ }, A = () => {
230
+ T.value && (clearTimeout(T.value), T.value = null);
231
+ };
232
+ return (V, c) => (s(), a("div", {
233
+ onMouseenter: c[2] || (c[2] = (C) => g.value = !0),
234
+ onMouseleave: Z,
235
+ class: "attachment-block-container"
236
+ }, [
237
+ t.node.attrs.dispType === "card" ? (s(), a("div", be, [
238
+ e("div", $e, [
239
+ (s(), _(P(v(r)), { class: "attachment-block-card-icon-svg" }))
240
+ ]),
241
+ e("div", Te, [
242
+ e("div", _e, l(t.node.attrs.fileName) + "." + l(t.node.attrs.fileType), 1),
243
+ !u.value && !t.node.attrs.uploadError ? (s(), a("div", Pe, l(v(f)), 1)) : u.value && !t.node.attrs.uploadError ? (s(), a("div", xe, " 附件正在上传中,请等待... ")) : (s(), a("div", Ie, " 附件出错,请等待管理员处理 "))
244
+ ]),
245
+ e("div", Ce, [
246
+ e("div", {
247
+ class: "attachment-block-card-preview-wrapper",
248
+ onClick: $
249
+ }, [
250
+ (s(), _(P(y(t.node.attrs.fileType) ? te : W), { class: "attachment-block-card-preview-btn" }))
251
+ ])
252
+ ]),
253
+ E(e("div", {
254
+ class: "attachment-block-card-menu",
255
+ onMouseenter: A
256
+ }, [
257
+ M(R, {
258
+ node: t.node,
259
+ "show-full-screen-dialog": d.value,
260
+ "onUpdate:showFullScreenDialog": c[0] || (c[0] = (C) => d.value = C)
261
+ }, null, 8, ["node", "show-full-screen-dialog"])
262
+ ], 544), [
263
+ [N, g.value && !u.value && !t.node.attrs.uploadError]
264
+ ])
265
+ ])) : t.node.attrs.dispType === "preview" ? (s(), a("div", Me, [
266
+ y(t.node.attrs.fileType) ? (s(), a("div", Se, [
267
+ e("div", {
268
+ class: b(["video-block-container", { "has-sidebar": n.value }])
269
+ }, [
270
+ e("div", Ae, [
271
+ !u.value && !t.node.attrs.uploadError ? (s(), a("div", Ve, [
272
+ e("video", {
273
+ ref_key: "videoPreviewRef",
274
+ ref: m,
275
+ src: v(D)(t.node.attrs.src),
276
+ controls: "",
277
+ class: "video-element"
278
+ }, null, 8, Ee)
279
+ ])) : (s(), a("div", Ne, [
280
+ t.node.attrs.uploadError ? (s(), a("div", De, [...c[4] || (c[4] = [
281
+ e("span", null, "⚠️ 视频出错,请等待管理员处理", -1)
282
+ ])])) : (s(), a("div", Re, [...c[3] || (c[3] = [
283
+ e("div", { class: "spinner" }, null, -1),
284
+ e("span", null, "视频正在上传中,请等待...", -1)
285
+ ])]))
286
+ ])),
287
+ !u.value && t.node.attrs.tingwuTaskId ? (s(), a("div", Be, [
288
+ c[6] || (c[6] = e("div", { class: "toolbar-info" }, [
289
+ e("span", { class: "toolbar-title" }, "分析"),
290
+ e("span", { class: "toolbar-desc" }, "摘要与章节")
291
+ ], -1)),
292
+ e("button", {
293
+ class: b(["ai-toggle-btn", { active: n.value }]),
294
+ onClick: o
295
+ }, [
296
+ c[5] || (c[5] = e("i", { class: "icon-ai" }, "✨", -1)),
297
+ S(" " + l(n.value ? "收起助手" : "AI 助手"), 1)
298
+ ], 2)
299
+ ])) : w("", !0)
300
+ ]),
301
+ n.value ? (s(), a("div", Fe, [
302
+ M(ge, {
303
+ taskId: t.node.attrs.tingwuTaskId,
304
+ videoRef: m.value,
305
+ onClose: c[1] || (c[1] = (C) => n.value = !1)
306
+ }, null, 8, ["taskId", "videoRef"])
307
+ ])) : w("", !0)
308
+ ], 2)
309
+ ])) : (s(), a("div", ze, [
310
+ e("div", {
311
+ class: b(["attachment-block-preview-content", { "attachment-block-preview-dark-bg": !v(p) }])
312
+ }, [
313
+ v(p) ? (s(), _(P(t.node.attrs.fileType === "pdf" ? "embed" : "iframe"), {
314
+ key: 0,
315
+ class: "attachment-block-preview-iframe",
316
+ src: v(D)(v(I)(t.node.attrs.src))
317
+ }, null, 8, ["src"])) : (s(), a("div", Ue, [
318
+ e("img", {
319
+ class: "attachment-block-preview-unable-img",
320
+ src: v(k),
321
+ alt: "该文件类型无法预览"
322
+ }, null, 8, Ze),
323
+ e("div", Le, [
324
+ e("strong", Oe, "." + l(t.node.attrs.fileType), 1),
325
+ c[7] || (c[7] = S("文件类型无法预览 ", -1))
326
+ ]),
327
+ e("div", Je, l(t.node.attrs.fileName) + "." + l(t.node.attrs.fileType) + " · " + l(v(f)), 1)
328
+ ]))
329
+ ], 2),
330
+ e("div", {
331
+ class: b(["attachment-block-preview-footer", { "attachment-block-preview-dark-bg": !v(p) }])
332
+ }, [
333
+ (s(), _(P(v(r)), { class: "attachment-block-preview-icon-svg" })),
334
+ e("span", je, l(t.node.attrs.fileName) + "." + l(t.node.attrs.fileType), 1)
335
+ ], 2)
336
+ ])),
337
+ E(e("div", {
338
+ class: "attachment-block-preview-menu",
339
+ onMouseenter: A
340
+ }, [
341
+ M(R, { node: t.node }, null, 8, ["node"])
342
+ ], 544), [
343
+ [N, g.value && !u.value && !t.node.attrs.uploadError]
344
+ ])
345
+ ])) : w("", !0)
346
+ ], 32));
347
+ }
348
+ }), Qe = /* @__PURE__ */ x(He, [["__scopeId", "data-v-6ebf6463"]]);
349
+ export {
350
+ Qe as default
351
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./index-D2CtpNvR.js"),f=require("./AttachmentMenu-ExoCOe4B.js");async function N(t,a){return await t.post("/api/monitor",{data:a})}const b={},S={width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"VisibleOutlined"};function T(t,a){return e.openBlock(),e.createElementBlock("svg",S,[...a[0]||(a[0]=[e.createElementVNode("path",{d:"M11.985 18.5c3.238 0 6.236-2.06 9.015-6.513C18.292 7.55 15.3 5.5 11.985 5.5 8.67 5.5 5.689 7.549 3 11.987c2.76 4.454 5.748 6.513 8.985 6.513ZM1.502 12.89a1.782 1.782 0 0 1 .023-1.838C4.428 6.017 7.915 3.5 11.984 3.5c4.086 0 7.594 2.538 10.523 7.614l.028.048c.296.519.294 1.16-.01 1.675-3.006 5.108-6.52 7.663-10.541 7.663-4.007 0-7.501-2.537-10.482-7.61ZM12 16a4 4 0 1 1 0-8 4 4 0 0 1 0 8Zm0-2a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",fill:"rgb(100, 106, 115)"},null,-1)])])}const D=v._export_sfc(b,[["render",T]]),$={},C={width:"1em",height:"1em",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-icon":"PlayFilled"};function _(t,a){return e.openBlock(),e.createElementBlock("svg",C,[...a[0]||(a[0]=[e.createElementVNode("path",{d:"M21.073 13.698a2.018 2.018 0 0 0 0-3.396L7.116 1.325C5.771.459 4 1.425 4 3.023v17.954c0 1.599 1.771 2.564 3.116 1.698l13.957-8.977Z",fill:"rgb(100, 106, 115)"},null,-1)])])}const x=v._export_sfc($,[["render",_]]);async function P(t,a){return(await t.get("/admin/editor/v2/videoProgressDetail",{params:a})).data}const M={class:"ai-panel"},I={class:"panel-header"},A={key:0,class:"panel-loading"},z={key:1,class:"panel-error"},R={key:2,class:"panel-content"},F={key:0,class:"content-card summary-card"},U={class:"content-card chapters-card"},O={class:"card-header"},Z={class:"badge"},j={class:"chapter-list"},L=["onClick"],q={class:"chapter-index"},J={class:"chapter-info"},K={class:"chapter-title"},H={class:"chapter-time"},G={key:0,class:"empty-state"},Q=e.defineComponent({__name:"VideoDetail",props:{taskId:{},videoRef:{}},setup(t){const a=t,i=e.ref(!1),r=e.ref(""),c=e.ref(null),d=e.ref(!1),m=e.inject(v.axiosKey),u=async()=>{if(a.taskId&&m){i.value=!0;try{const o=await P(m,{taskId:a.taskId});c.value={summary:o.summary,chapters:JSON.parse(o.chapters)},i.value=!1}catch(o){r.value="加载失败",i.value=!1,console.error(o)}}},E=async o=>{a.videoRef&&(a.videoRef.currentTime=o.startTime,a.videoRef.play()),m&&await N(m,{log:JSON.stringify({name:"toggleVideoAiPanelSidebar",chapterTitle:o.title,tingwuTaskId:a.taskId,videoPageUrl:window.location.href})})},k=o=>{const n=Math.floor(o/60),s=Math.floor(o%60);return`${n}:${s.toString().padStart(2,"0")}`};return e.onMounted(async()=>{await u()}),(o,n)=>(e.openBlock(),e.createElementBlock("div",M,[e.createElementVNode("div",I,[n[3]||(n[3]=e.createElementVNode("div",{class:"header-title"},[e.createElementVNode("span",{class:"icon"},"🤖"),e.createElementVNode("span",null,"智能分析结果")],-1)),e.createElementVNode("button",{class:"close-btn",onClick:n[0]||(n[0]=s=>o.$emit("close")),title:"关闭助手"},[...n[2]||(n[2]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),i.value?(e.openBlock(),e.createElementBlock("div",A,[...n[4]||(n[4]=[e.createElementVNode("div",{class:"spinner"},null,-1),e.createElementVNode("p",null,"正在生成分析结果...",-1)])])):r.value?(e.openBlock(),e.createElementBlock("div",z,e.toDisplayString(r.value),1)):(e.openBlock(),e.createElementBlock("div",R,[c.value?.summary?(e.openBlock(),e.createElementBlock("div",F,[n[5]||(n[5]=e.createElementVNode("div",{class:"card-header"},[e.createElementVNode("span",{class:"card-title"},"全文摘要")],-1)),e.createElementVNode("div",{class:e.normalizeClass(["summary-text",{expanded:d.value}])},e.toDisplayString(c.value.summary),3),c.value.summary.length>100?(e.openBlock(),e.createElementBlock("div",{key:0,class:"expand-btn",onClick:n[1]||(n[1]=s=>d.value=!d.value)},e.toDisplayString(d.value?"收起":"展开全文"),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",U,[e.createElementVNode("div",O,[n[6]||(n[6]=e.createElementVNode("span",{class:"card-title"},"章节速览",-1)),e.createElementVNode("span",Z,e.toDisplayString(c.value?.chapters?.length||0),1)]),e.createElementVNode("div",j,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value?.chapters||[],(s,h)=>(e.openBlock(),e.createElementBlock("div",{key:h,class:"chapter-item",onClick:p=>E(s)},[e.createElementVNode("div",q,e.toDisplayString(h+1),1),e.createElementVNode("div",J,[e.createElementVNode("div",K,e.toDisplayString(s.title),1),e.createElementVNode("div",H,[n[7]||(n[7]=e.createElementVNode("i",{class:"icon-time"},"🕒",-1)),e.createTextVNode(" "+e.toDisplayString(k(s.startTime))+" - "+e.toDisplayString(k(s.endTime)),1)])])],8,L))),128)),!c.value?.chapters||c.value.chapters.length===0?(e.openBlock(),e.createElementBlock("div",G,"暂无章节信息")):e.createCommentVNode("",!0)])])]))]))}}),W=v._export_sfc(Q,[["__scopeId","data-v-a1e65f27"]]),X={key:0,class:"attachment-block-card-container"},Y={class:"attachment-block-card-icon"},ee={class:"attachment-block-card-info"},te={class:"attachment-block-card-info-name"},oe={key:0,class:"attachment-block-card-info-size"},ne={key:1,class:"attachment-block-card-info-size"},ae={key:2,class:"attachment-block-card-info-size",style:{color:"rgb(247, 78, 0)"}},le={class:"attachment-block-card-preview"},se={key:1,class:"attachment-block-preview-container"},ce={key:0,class:"video-block-preview-container"},re={class:"video-main-section"},ie={key:0,class:"video-player-wrapper"},de=["src"],me={key:1,class:"video-uploading-wrapper"},ve={key:0,class:"uploading-content"},ue={key:1,class:"error-content"},ke={key:2,class:"video-toolbar"},pe={key:0,class:"video-sidebar-section"},fe={key:1,class:"notVideo-block-preview-container"},he={key:1,class:"attachment-block-preview-unable"},ye=["src"],Ee={class:"attachment-block-preview-unable-text"},ge={style:{"font-weight":"bold"}},we={class:"attachment-block-preview-unable-text"},Ve={class:"attachment-block-preview-info"},Ne=e.defineComponent({__name:"AttachmentBlock",props:{node:{}},setup(t){const a=e.inject(v.axiosKey),i=e.useTemplateRef("videoPreviewRef"),r=e.computed(()=>t.node.attrs.uploadProgress===void 0||t.node.attrs.uploadProgress<1),{icon:c,calculatedFileSize:d,cannotPreviewImgDataUrl:m,canPreview:u,genPreviewSrc:E}=f.useAttachment(t.node.attrs.fileType,t.node.attrs.fileSize),k=V=>["mp4","avi","mkv","mov"].includes(V),o=e.ref(!1),n=async()=>{o.value=!o.value,a&&o.value&&t.node.attrs.tingwuTaskId&&await N(a,{log:JSON.stringify({name:"toggleVideoAiPanel",tingwuTaskId:t.node.attrs.tingwuTaskId,videoPageUrl:window.location.href})})},s=e.ref(!1),h=()=>{s.value=!0,alert("全屏预览功能将在后续版本中开放")},p=e.ref(!1),y=e.ref(null),B=()=>{y.value=setTimeout(()=>{p.value=!1},200)},w=()=>{y.value&&(clearTimeout(y.value),y.value=null)};return(V,l)=>(e.openBlock(),e.createElementBlock("div",{onMouseenter:l[2]||(l[2]=g=>p.value=!0),onMouseleave:B,class:"attachment-block-container"},[t.node.attrs.dispType==="card"?(e.openBlock(),e.createElementBlock("div",X,[e.createElementVNode("div",Y,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(c)),{class:"attachment-block-card-icon-svg"}))]),e.createElementVNode("div",ee,[e.createElementVNode("div",te,e.toDisplayString(t.node.attrs.fileName)+"."+e.toDisplayString(t.node.attrs.fileType),1),!r.value&&!t.node.attrs.uploadError?(e.openBlock(),e.createElementBlock("div",oe,e.toDisplayString(e.unref(d)),1)):r.value&&!t.node.attrs.uploadError?(e.openBlock(),e.createElementBlock("div",ne," 附件正在上传中,请等待... ")):(e.openBlock(),e.createElementBlock("div",ae," 附件出错,请等待管理员处理 "))]),e.createElementVNode("div",le,[e.createElementVNode("div",{class:"attachment-block-card-preview-wrapper",onClick:h},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(k(t.node.attrs.fileType)?x:D),{class:"attachment-block-card-preview-btn"}))])]),e.withDirectives(e.createElementVNode("div",{class:"attachment-block-card-menu",onMouseenter:w},[e.createVNode(f.AttachmentMenu,{node:t.node,"show-full-screen-dialog":s.value,"onUpdate:showFullScreenDialog":l[0]||(l[0]=g=>s.value=g)},null,8,["node","show-full-screen-dialog"])],544),[[e.vShow,p.value&&!r.value&&!t.node.attrs.uploadError]])])):t.node.attrs.dispType==="preview"?(e.openBlock(),e.createElementBlock("div",se,[k(t.node.attrs.fileType)?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",{class:e.normalizeClass(["video-block-container",{"has-sidebar":o.value}])},[e.createElementVNode("div",re,[!r.value&&!t.node.attrs.uploadError?(e.openBlock(),e.createElementBlock("div",ie,[e.createElementVNode("video",{ref_key:"videoPreviewRef",ref:i,src:e.unref(f.resolvedFileUrl)(t.node.attrs.src),controls:"",class:"video-element"},null,8,de)])):(e.openBlock(),e.createElementBlock("div",me,[t.node.attrs.uploadError?(e.openBlock(),e.createElementBlock("div",ue,[...l[4]||(l[4]=[e.createElementVNode("span",null,"⚠️ 视频出错,请等待管理员处理",-1)])])):(e.openBlock(),e.createElementBlock("div",ve,[...l[3]||(l[3]=[e.createElementVNode("div",{class:"spinner"},null,-1),e.createElementVNode("span",null,"视频正在上传中,请等待...",-1)])]))])),!r.value&&t.node.attrs.tingwuTaskId?(e.openBlock(),e.createElementBlock("div",ke,[l[6]||(l[6]=e.createElementVNode("div",{class:"toolbar-info"},[e.createElementVNode("span",{class:"toolbar-title"},"分析"),e.createElementVNode("span",{class:"toolbar-desc"},"摘要与章节")],-1)),e.createElementVNode("button",{class:e.normalizeClass(["ai-toggle-btn",{active:o.value}]),onClick:n},[l[5]||(l[5]=e.createElementVNode("i",{class:"icon-ai"},"✨",-1)),e.createTextVNode(" "+e.toDisplayString(o.value?"收起助手":"AI 助手"),1)],2)])):e.createCommentVNode("",!0)]),o.value?(e.openBlock(),e.createElementBlock("div",pe,[e.createVNode(W,{taskId:t.node.attrs.tingwuTaskId,videoRef:i.value,onClose:l[1]||(l[1]=g=>o.value=!1)},null,8,["taskId","videoRef"])])):e.createCommentVNode("",!0)],2)])):(e.openBlock(),e.createElementBlock("div",fe,[e.createElementVNode("div",{class:e.normalizeClass(["attachment-block-preview-content",{"attachment-block-preview-dark-bg":!e.unref(u)}])},[e.unref(u)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.node.attrs.fileType==="pdf"?"embed":"iframe"),{key:0,class:"attachment-block-preview-iframe",src:e.unref(f.resolvedFileUrl)(e.unref(E)(t.node.attrs.src))},null,8,["src"])):(e.openBlock(),e.createElementBlock("div",he,[e.createElementVNode("img",{class:"attachment-block-preview-unable-img",src:e.unref(m),alt:"该文件类型无法预览"},null,8,ye),e.createElementVNode("div",Ee,[e.createElementVNode("strong",ge,"."+e.toDisplayString(t.node.attrs.fileType),1),l[7]||(l[7]=e.createTextVNode("文件类型无法预览 ",-1))]),e.createElementVNode("div",we,e.toDisplayString(t.node.attrs.fileName)+"."+e.toDisplayString(t.node.attrs.fileType)+" · "+e.toDisplayString(e.unref(d)),1)]))],2),e.createElementVNode("div",{class:e.normalizeClass(["attachment-block-preview-footer",{"attachment-block-preview-dark-bg":!e.unref(u)}])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(c)),{class:"attachment-block-preview-icon-svg"})),e.createElementVNode("span",Ve,e.toDisplayString(t.node.attrs.fileName)+"."+e.toDisplayString(t.node.attrs.fileType),1)],2)])),e.withDirectives(e.createElementVNode("div",{class:"attachment-block-preview-menu",onMouseenter:w},[e.createVNode(f.AttachmentMenu,{node:t.node},null,8,["node"])],544),[[e.vShow,p.value&&!r.value&&!t.node.attrs.uploadError]])])):e.createCommentVNode("",!0)],32))}}),Be=v._export_sfc(Ne,[["__scopeId","data-v-6ebf6463"]]);exports.default=Be;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./AttachmentMenu-ExoCOe4B.js"),f=require("./index-D2CtpNvR.js"),m=e.defineComponent({__name:"AttachmentInline",props:{node:{}},setup(t){e.useCssVars(l=>({v4668c5a8:c.value}));const{icon:u}=s.useAttachment(t.node.attrs.fileType,t.node.attrs.fileSize),a=e.ref(null),c=e.ref("0px");e.onMounted(async()=>{const l=1.15*parseFloat(getComputedStyle(document.documentElement).fontSize);await e.nextTick(),a.value&&(c.value=`${(l+a.value.offsetWidth+2)/2}px`)});const o=e.ref(!1),n=e.ref(null),r=()=>{n.value=setTimeout(()=>{o.value=!1},200)},d=()=>{n.value&&(clearTimeout(n.value),n.value=null)};return(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:"attachment-inline-container",onMouseenter:i[0]||(i[0]=h=>o.value=!0),onMouseleave:r},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(u)),{class:"attachment-inline-icon",ref:"iconRef"},null,512)),e.createElementVNode("span",{class:"attachment-inline-text",ref_key:"textRef",ref:a},e.toDisplayString(t.node.attrs.fileName)+"."+e.toDisplayString(t.node.attrs.fileType),513),e.withDirectives(e.createElementVNode("div",{class:"attachment-inline-menu",onMouseenter:d},[e.createVNode(s.AttachmentMenu,{node:t.node},null,8,["node"])],544),[[e.vShow,o.value]])],32))}}),v=f._export_sfc(m,[["__scopeId","data-v-7c608a16"]]);exports.default=v;
@@ -0,0 +1,52 @@
1
+ import { defineComponent as v, useCssVars as h, ref as n, onMounted as p, nextTick as x, createElementBlock as y, openBlock as i, createBlock as M, createElementVNode as u, withDirectives as k, resolveDynamicComponent as A, unref as S, toDisplayString as r, createVNode as T, vShow as C } from "vue";
2
+ import { u as E, A as w } from "./AttachmentMenu-B5x8P9_n.mjs";
3
+ import { _ as B } from "./index-DVmWCrQE.mjs";
4
+ const D = /* @__PURE__ */ v({
5
+ __name: "AttachmentInline",
6
+ props: {
7
+ node: {}
8
+ },
9
+ setup(e) {
10
+ h((l) => ({
11
+ v4668c5a8: s.value
12
+ }));
13
+ const { icon: m } = E(e.node.attrs.fileType, e.node.attrs.fileSize), a = n(null), s = n("0px");
14
+ p(async () => {
15
+ const l = 1.15 * parseFloat(getComputedStyle(document.documentElement).fontSize);
16
+ await x(), a.value && (s.value = `${(l + a.value.offsetWidth + 2) / 2}px`);
17
+ });
18
+ const o = n(!1), t = n(null), d = () => {
19
+ t.value = setTimeout(() => {
20
+ o.value = !1;
21
+ }, 200);
22
+ }, f = () => {
23
+ t.value && (clearTimeout(t.value), t.value = null);
24
+ };
25
+ return (l, c) => (i(), y("div", {
26
+ class: "attachment-inline-container",
27
+ onMouseenter: c[0] || (c[0] = (I) => o.value = !0),
28
+ onMouseleave: d
29
+ }, [
30
+ (i(), M(A(S(m)), {
31
+ class: "attachment-inline-icon",
32
+ ref: "iconRef"
33
+ }, null, 512)),
34
+ u("span", {
35
+ class: "attachment-inline-text",
36
+ ref_key: "textRef",
37
+ ref: a
38
+ }, r(e.node.attrs.fileName) + "." + r(e.node.attrs.fileType), 513),
39
+ k(u("div", {
40
+ class: "attachment-inline-menu",
41
+ onMouseenter: f
42
+ }, [
43
+ T(w, { node: e.node }, null, 8, ["node"])
44
+ ], 544), [
45
+ [C, o.value]
46
+ ])
47
+ ], 32));
48
+ }
49
+ }), W = /* @__PURE__ */ B(D, [["__scopeId", "data-v-7c608a16"]]);
50
+ export {
51
+ W as default
52
+ };