@l1yp/file-viewer 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (373) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +134 -0
  3. package/dist/FileViewer.js +7 -0
  4. package/dist/FileViewer.vue.d.ts +37 -0
  5. package/dist/FileViewer.vue_vue_type_script_setup_true_lang.js +103 -0
  6. package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
  7. package/dist/components/AppxViewer.js +7 -0
  8. package/dist/components/AppxViewer.vue.d.ts +18 -0
  9. package/dist/components/AppxViewer.vue_vue_type_script_setup_true_lang.js +174 -0
  10. package/dist/components/ArchiveBrowser.js +7 -0
  11. package/dist/components/ArchiveBrowser.vue.d.ts +18 -0
  12. package/dist/components/ArchiveBrowser.vue_vue_type_script_setup_true_lang.js +279 -0
  13. package/dist/components/AudioViewer.js +7 -0
  14. package/dist/components/AudioViewer.vue.d.ts +21 -0
  15. package/dist/components/AudioViewer.vue_vue_type_script_setup_true_lang.js +201 -0
  16. package/dist/components/BinObjBrowser.js +7 -0
  17. package/dist/components/BinObjBrowser.vue.d.ts +19 -0
  18. package/dist/components/BinObjBrowser.vue_vue_type_script_setup_true_lang.js +141 -0
  19. package/dist/components/CertViewer.js +7 -0
  20. package/dist/components/CertViewer.vue.d.ts +17 -0
  21. package/dist/components/CertViewer.vue_vue_type_script_setup_true_lang.js +251 -0
  22. package/dist/components/ClassViewer.js +7 -0
  23. package/dist/components/ClassViewer.vue.d.ts +15 -0
  24. package/dist/components/ClassViewer.vue_vue_type_script_setup_true_lang.js +164 -0
  25. package/dist/components/CodeBlock.js +7 -0
  26. package/dist/components/CodeBlock.vue.d.ts +17 -0
  27. package/dist/components/CodeBlock.vue_vue_type_script_setup_true_lang.js +79 -0
  28. package/dist/components/CodeView.js +7 -0
  29. package/dist/components/CodeView.vue.d.ts +21 -0
  30. package/dist/components/CodeView.vue_vue_type_script_setup_true_lang.js +180 -0
  31. package/dist/components/CsvViewer.js +7 -0
  32. package/dist/components/CsvViewer.vue.d.ts +26 -0
  33. package/dist/components/CsvViewer.vue_vue_type_script_setup_true_lang.js +187 -0
  34. package/dist/components/DicomViewer.js +7 -0
  35. package/dist/components/DicomViewer.vue.d.ts +30 -0
  36. package/dist/components/DicomViewer.vue_vue_type_script_setup_true_lang.js +362 -0
  37. package/dist/components/DocxViewer.js +7 -0
  38. package/dist/components/DocxViewer.vue.d.ts +19 -0
  39. package/dist/components/DocxViewer.vue_vue_type_script_setup_true_lang.js +59 -0
  40. package/dist/components/DrawioViewer.js +7 -0
  41. package/dist/components/DrawioViewer.vue.d.ts +16 -0
  42. package/dist/components/DrawioViewer.vue_vue_type_script_setup_true_lang.js +38 -0
  43. package/dist/components/DxfViewer.js +7 -0
  44. package/dist/components/DxfViewer.vue.d.ts +14 -0
  45. package/dist/components/DxfViewer.vue_vue_type_script_setup_true_lang.js +239 -0
  46. package/dist/components/EbookViewer.js +7 -0
  47. package/dist/components/EbookViewer.vue.d.ts +22 -0
  48. package/dist/components/EbookViewer.vue_vue_type_script_setup_true_lang.js +170 -0
  49. package/dist/components/EmlViewer.js +7 -0
  50. package/dist/components/EmlViewer.vue.d.ts +21 -0
  51. package/dist/components/EmlViewer.vue_vue_type_script_setup_true_lang.js +193 -0
  52. package/dist/components/EplViewer.js +7 -0
  53. package/dist/components/EplViewer.vue.d.ts +19 -0
  54. package/dist/components/EplViewer.vue_vue_type_script_setup_true_lang.js +201 -0
  55. package/dist/components/FileViewerBody.js +7 -0
  56. package/dist/components/FileViewerBody.vue.d.ts +47 -0
  57. package/dist/components/FileViewerBody.vue_vue_type_script_setup_true_lang.js +599 -0
  58. package/dist/components/FileViewerPanel.js +7 -0
  59. package/dist/components/FileViewerPanel.vue.d.ts +3 -0
  60. package/dist/components/FileViewerPanel.vue_vue_type_script_setup_true_lang.js +207 -0
  61. package/dist/components/FontViewer.js +7 -0
  62. package/dist/components/FontViewer.vue.d.ts +17 -0
  63. package/dist/components/FontViewer.vue_vue_type_script_setup_true_lang.js +120 -0
  64. package/dist/components/FrontmatterCard.js +7 -0
  65. package/dist/components/FrontmatterCard.vue.d.ts +11 -0
  66. package/dist/components/FrontmatterCard.vue_vue_type_script_setup_true_lang.js +30 -0
  67. package/dist/components/GeoViewer.js +7 -0
  68. package/dist/components/GeoViewer.vue.d.ts +17 -0
  69. package/dist/components/GeoViewer.vue_vue_type_script_setup_true_lang.js +255 -0
  70. package/dist/components/HarViewer.js +7 -0
  71. package/dist/components/HarViewer.vue.d.ts +20 -0
  72. package/dist/components/HarViewer.vue_vue_type_script_setup_true_lang.js +322 -0
  73. package/dist/components/HexViewer.js +7 -0
  74. package/dist/components/HexViewer.vue.d.ts +22 -0
  75. package/dist/components/HexViewer.vue_vue_type_script_setup_true_lang.js +121 -0
  76. package/dist/components/HprofViewer.js +7 -0
  77. package/dist/components/HprofViewer.vue.d.ts +27 -0
  78. package/dist/components/HprofViewer.vue_vue_type_script_setup_true_lang.js +561 -0
  79. package/dist/components/ImageLightbox.js +7 -0
  80. package/dist/components/ImageLightbox.vue.d.ts +3 -0
  81. package/dist/components/ImageLightbox.vue_vue_type_script_setup_true_lang.js +86 -0
  82. package/dist/components/InlineText.d.ts +29 -0
  83. package/dist/components/InlineText.js +21 -0
  84. package/dist/components/JksViewer.js +7 -0
  85. package/dist/components/JksViewer.vue.d.ts +22 -0
  86. package/dist/components/JksViewer.vue_vue_type_script_setup_true_lang.js +353 -0
  87. package/dist/components/JsonlViewer.js +7 -0
  88. package/dist/components/JsonlViewer.vue.d.ts +15 -0
  89. package/dist/components/JsonlViewer.vue_vue_type_script_setup_true_lang.js +103 -0
  90. package/dist/components/LogViewer.js +7 -0
  91. package/dist/components/LogViewer.vue.d.ts +29 -0
  92. package/dist/components/LogViewer.vue_vue_type_script_setup_true_lang.js +670 -0
  93. package/dist/components/LrcViewer.js +7 -0
  94. package/dist/components/LrcViewer.vue.d.ts +17 -0
  95. package/dist/components/LrcViewer.vue_vue_type_script_setup_true_lang.js +106 -0
  96. package/dist/components/MarkdownTable.js +7 -0
  97. package/dist/components/MarkdownTable.vue.d.ts +19 -0
  98. package/dist/components/MarkdownTable.vue_vue_type_script_setup_true_lang.js +71 -0
  99. package/dist/components/MarkdownText.d.ts +30 -0
  100. package/dist/components/MarkdownText.js +21 -0
  101. package/dist/components/MhtViewer.js +7 -0
  102. package/dist/components/MhtViewer.vue.d.ts +22 -0
  103. package/dist/components/MhtViewer.vue_vue_type_script_setup_true_lang.js +112 -0
  104. package/dist/components/MindMapView.js +7 -0
  105. package/dist/components/MindMapView.vue.d.ts +23 -0
  106. package/dist/components/MindMapView.vue_vue_type_script_setup_true_lang.js +337 -0
  107. package/dist/components/MissingDependency.js +7 -0
  108. package/dist/components/MissingDependency.vue.d.ts +17 -0
  109. package/dist/components/MissingDependency.vue_vue_type_script_setup_true_lang.js +37 -0
  110. package/dist/components/ModelViewer.js +7 -0
  111. package/dist/components/ModelViewer.vue.d.ts +18 -0
  112. package/dist/components/ModelViewer.vue_vue_type_script_setup_true_lang.js +157 -0
  113. package/dist/components/MsiViewer.js +7 -0
  114. package/dist/components/MsiViewer.vue.d.ts +19 -0
  115. package/dist/components/MsiViewer.vue_vue_type_script_setup_true_lang.js +136 -0
  116. package/dist/components/NotebookViewer.js +7 -0
  117. package/dist/components/NotebookViewer.vue.d.ts +20 -0
  118. package/dist/components/NotebookViewer.vue_vue_type_script_setup_true_lang.js +125 -0
  119. package/dist/components/PdfViewer.js +7 -0
  120. package/dist/components/PdfViewer.vue.d.ts +19 -0
  121. package/dist/components/PdfViewer.vue_vue_type_script_setup_true_lang.js +114 -0
  122. package/dist/components/PptxViewer.js +7 -0
  123. package/dist/components/PptxViewer.vue.d.ts +20 -0
  124. package/dist/components/PptxViewer.vue_vue_type_script_setup_true_lang.js +73 -0
  125. package/dist/components/PsdViewer.js +7 -0
  126. package/dist/components/PsdViewer.vue.d.ts +15 -0
  127. package/dist/components/PsdViewer.vue_vue_type_script_setup_true_lang.js +218 -0
  128. package/dist/components/QmcAudioViewer.js +7 -0
  129. package/dist/components/QmcAudioViewer.vue.d.ts +18 -0
  130. package/dist/components/QmcAudioViewer.vue_vue_type_script_setup_true_lang.js +92 -0
  131. package/dist/components/RasterViewer.js +7 -0
  132. package/dist/components/RasterViewer.vue.d.ts +21 -0
  133. package/dist/components/RasterViewer.vue_vue_type_script_setup_true_lang.js +161 -0
  134. package/dist/components/RtfViewer.js +7 -0
  135. package/dist/components/RtfViewer.vue.d.ts +21 -0
  136. package/dist/components/RtfViewer.vue_vue_type_script_setup_true_lang.js +66 -0
  137. package/dist/components/SevenZipBrowser.js +7 -0
  138. package/dist/components/SevenZipBrowser.vue.d.ts +13 -0
  139. package/dist/components/SevenZipBrowser.vue_vue_type_script_setup_true_lang.js +366 -0
  140. package/dist/components/SqliteViewer.js +7 -0
  141. package/dist/components/SqliteViewer.vue.d.ts +18 -0
  142. package/dist/components/SqliteViewer.vue_vue_type_script_setup_true_lang.js +186 -0
  143. package/dist/components/SubtitleViewer.js +7 -0
  144. package/dist/components/SubtitleViewer.vue.d.ts +15 -0
  145. package/dist/components/SubtitleViewer.vue_vue_type_script_setup_true_lang.js +48 -0
  146. package/dist/components/XlsxChart.js +7 -0
  147. package/dist/components/XlsxChart.vue.d.ts +14 -0
  148. package/dist/components/XlsxChart.vue_vue_type_script_setup_true_lang.js +240 -0
  149. package/dist/components/XlsxViewer.js +7 -0
  150. package/dist/components/XlsxViewer.vue.d.ts +22 -0
  151. package/dist/components/XlsxViewer.vue_vue_type_script_setup_true_lang.js +814 -0
  152. package/dist/components/XmindViewer.js +7 -0
  153. package/dist/components/XmindViewer.vue.d.ts +13 -0
  154. package/dist/components/XmindViewer.vue_vue_type_script_setup_true_lang.js +48 -0
  155. package/dist/components/ZipBrowser.js +7 -0
  156. package/dist/components/ZipBrowser.vue.d.ts +14 -0
  157. package/dist/components/ZipBrowser.vue_vue_type_script_setup_true_lang.js +326 -0
  158. package/dist/components/ZoomImage.js +7 -0
  159. package/dist/components/ZoomImage.vue.d.ts +29 -0
  160. package/dist/components/ZoomImage.vue_vue_type_script_setup_true_lang.js +147 -0
  161. package/dist/components/epl/EplCodeBlock.js +7 -0
  162. package/dist/components/epl/EplCodeBlock.vue.d.ts +15 -0
  163. package/dist/components/epl/EplCodeBlock.vue_vue_type_script_setup_true_lang.js +72 -0
  164. package/dist/components/epl/EplDoc.js +7 -0
  165. package/dist/components/epl/EplDoc.vue.d.ts +19 -0
  166. package/dist/components/epl/EplDoc.vue_vue_type_script_setup_true_lang.js +327 -0
  167. package/dist/components/epl/EplMethod.js +7 -0
  168. package/dist/components/epl/EplMethod.vue.d.ts +14 -0
  169. package/dist/components/epl/EplMethod.vue_vue_type_script_setup_true_lang.js +100 -0
  170. package/dist/components/epl/EplResource.js +7 -0
  171. package/dist/components/epl/EplResource.vue.d.ts +15 -0
  172. package/dist/components/epl/EplResource.vue_vue_type_script_setup_true_lang.js +204 -0
  173. package/dist/components/epl/EplTree.js +7 -0
  174. package/dist/components/epl/EplTree.vue.d.ts +27 -0
  175. package/dist/components/epl/EplTree.vue_vue_type_script_setup_true_lang.js +123 -0
  176. package/dist/components/epl/EplVarTable.js +7 -0
  177. package/dist/components/epl/EplVarTable.vue.d.ts +21 -0
  178. package/dist/components/epl/EplVarTable.vue_vue_type_script_setup_true_lang.js +60 -0
  179. package/dist/components/epl/docTypes.d.ts +12 -0
  180. package/dist/components/epl/numbering.d.ts +21 -0
  181. package/dist/components/epl/numbering.js +14 -0
  182. package/dist/components/icons/Icon.js +7 -0
  183. package/dist/components/icons/Icon.vue.d.ts +14 -0
  184. package/dist/components/icons/Icon.vue_vue_type_script_setup_true_lang.js +33 -0
  185. package/dist/components/icons/iconPaths.d.ts +60 -0
  186. package/dist/components/icons/iconPaths.js +54 -0
  187. package/dist/components/optionalViewer.d.ts +14 -0
  188. package/dist/components/optionalViewer.js +37 -0
  189. package/dist/components/ui/ClampBlock.d.ts +82 -0
  190. package/dist/components/ui/ClampBlock.js +63 -0
  191. package/dist/composables/useFileViewer.d.ts +428 -0
  192. package/dist/composables/useFileViewer.js +27 -0
  193. package/dist/composables/useLightbox.d.ts +33 -0
  194. package/dist/composables/useLightbox.js +17 -0
  195. package/dist/composables/useLogRules.d.ts +47 -0
  196. package/dist/composables/useLogRules.js +74 -0
  197. package/dist/index.d.ts +44 -0
  198. package/dist/index.js +30 -0
  199. package/dist/lib/aes.d.ts +25 -0
  200. package/dist/lib/aes.js +99 -0
  201. package/dist/lib/appx.d.ts +66 -0
  202. package/dist/lib/appx.js +112 -0
  203. package/dist/lib/archive.d.ts +29 -0
  204. package/dist/lib/asn1.d.ts +47 -0
  205. package/dist/lib/asn1.js +122 -0
  206. package/dist/lib/binobj.d.ts +69 -0
  207. package/dist/lib/binobj.js +430 -0
  208. package/dist/lib/brotli.d.ts +14 -0
  209. package/dist/lib/brotli.js +16 -0
  210. package/dist/lib/bzip2.d.ts +14 -0
  211. package/dist/lib/bzip2.js +161 -0
  212. package/dist/lib/classfile.d.ts +72 -0
  213. package/dist/lib/classfile.js +210 -0
  214. package/dist/lib/codePreview.d.ts +22 -0
  215. package/dist/lib/codePreview.js +27 -0
  216. package/dist/lib/codefold.d.ts +14 -0
  217. package/dist/lib/codefold.js +30 -0
  218. package/dist/lib/codeformat.d.ts +21 -0
  219. package/dist/lib/codeformat.js +130 -0
  220. package/dist/lib/csv.d.ts +19 -0
  221. package/dist/lib/csv.js +74 -0
  222. package/dist/lib/des.d.ts +17 -0
  223. package/dist/lib/des.js +928 -0
  224. package/dist/lib/diagram.d.ts +5 -0
  225. package/dist/lib/diagram.js +479 -0
  226. package/dist/lib/dicom.d.ts +69 -0
  227. package/dist/lib/dicom.js +442 -0
  228. package/dist/lib/dicomCodecs.d.ts +28 -0
  229. package/dist/lib/dicomCodecs.js +156 -0
  230. package/dist/lib/dicomRender.d.ts +46 -0
  231. package/dist/lib/dicomRender.js +114 -0
  232. package/dist/lib/dxf.d.ts +86 -0
  233. package/dist/lib/dxf.js +399 -0
  234. package/dist/lib/eml.d.ts +40 -0
  235. package/dist/lib/eml.js +46 -0
  236. package/dist/lib/encoding.d.ts +28 -0
  237. package/dist/lib/encoding.js +44 -0
  238. package/dist/lib/epl/code/ast.d.ts +150 -0
  239. package/dist/lib/epl/code/codeDataParser.d.ts +3 -0
  240. package/dist/lib/epl/code/codeDataParser.js +330 -0
  241. package/dist/lib/epl/code/codeLines.d.ts +20 -0
  242. package/dist/lib/epl/code/codeLines.js +191 -0
  243. package/dist/lib/epl/code/structures.d.ts +86 -0
  244. package/dist/lib/epl/code/textCode.d.ts +29 -0
  245. package/dist/lib/epl/code/textCode.js +150 -0
  246. package/dist/lib/epl/code/variable.d.ts +25 -0
  247. package/dist/lib/epl/eplDocument.d.ts +21 -0
  248. package/dist/lib/epl/eplDocument.js +36 -0
  249. package/dist/lib/epl/imageList.d.ts +28 -0
  250. package/dist/lib/epl/imageList.js +66 -0
  251. package/dist/lib/epl/index.d.ts +53 -0
  252. package/dist/lib/epl/index.js +45 -0
  253. package/dist/lib/epl/io/binaryReader.d.ts +56 -0
  254. package/dist/lib/epl/io/binaryReader.js +119 -0
  255. package/dist/lib/epl/io/encoding.d.ts +16 -0
  256. package/dist/lib/epl/io/encoding.js +27 -0
  257. package/dist/lib/epl/model/eplSystemId.d.ts +64 -0
  258. package/dist/lib/epl/model/eplSystemId.js +16 -0
  259. package/dist/lib/epl/model/section.d.ts +46 -0
  260. package/dist/lib/epl/names/eplLibData.js +39 -0
  261. package/dist/lib/epl/names/idToNameMap.d.ts +33 -0
  262. package/dist/lib/epl/names/idToNameMap.js +130 -0
  263. package/dist/lib/epl/names/libNameProvider.d.ts +15 -0
  264. package/dist/lib/epl/names/libNameProvider.js +18 -0
  265. package/dist/lib/epl/program.d.ts +120 -0
  266. package/dist/lib/epl/program.js +134 -0
  267. package/dist/lib/epl/projectFileReader.d.ts +23 -0
  268. package/dist/lib/epl/projectFileReader.js +65 -0
  269. package/dist/lib/epl/sections/code.d.ts +20 -0
  270. package/dist/lib/epl/sections/esystemInfo.d.ts +14 -0
  271. package/dist/lib/epl/sections/losable.d.ts +11 -0
  272. package/dist/lib/epl/sections/projectConfig.d.ts +23 -0
  273. package/dist/lib/epl/sections/resource.d.ts +57 -0
  274. package/dist/lib/fb2.d.ts +14 -0
  275. package/dist/lib/fb2.js +62 -0
  276. package/dist/lib/fileType.d.ts +315 -0
  277. package/dist/lib/fileType.js +800 -0
  278. package/dist/lib/fonts.d.ts +8 -0
  279. package/dist/lib/fonts.js +4 -0
  280. package/dist/lib/format.d.ts +16 -0
  281. package/dist/lib/format.js +38 -0
  282. package/dist/lib/frontmatter.d.ts +13 -0
  283. package/dist/lib/frontmatter.js +23 -0
  284. package/dist/lib/geo.d.ts +30 -0
  285. package/dist/lib/geo.js +235 -0
  286. package/dist/lib/har.d.ts +171 -0
  287. package/dist/lib/har.js +397 -0
  288. package/dist/lib/highlight.d.ts +18 -0
  289. package/dist/lib/highlight.js +34 -0
  290. package/dist/lib/highlightLangs.d.ts +15 -0
  291. package/dist/lib/highlightLangs.js +93 -0
  292. package/dist/lib/hprof.d.ts +211 -0
  293. package/dist/lib/hprof.js +709 -0
  294. package/dist/lib/ipynb.d.ts +48 -0
  295. package/dist/lib/ipynb.js +130 -0
  296. package/dist/lib/jks.d.ts +86 -0
  297. package/dist/lib/jks.js +167 -0
  298. package/dist/lib/jsonl.d.ts +29 -0
  299. package/dist/lib/jsonl.js +24 -0
  300. package/dist/lib/lrc.d.ts +32 -0
  301. package/dist/lib/lrc.js +84 -0
  302. package/dist/lib/lzma.d.ts +70 -0
  303. package/dist/lib/lzma.js +204 -0
  304. package/dist/lib/markdown/blocks.d.ts +9 -0
  305. package/dist/lib/markdown/blocks.js +221 -0
  306. package/dist/lib/markdown/index.d.ts +3 -0
  307. package/dist/lib/markdown/inline.d.ts +33 -0
  308. package/dist/lib/markdown/inline.js +84 -0
  309. package/dist/lib/markdown/math.d.ts +5 -0
  310. package/dist/lib/markdown/math.js +25 -0
  311. package/dist/lib/markdown/segmentize.d.ts +11 -0
  312. package/dist/lib/markdown/segmentize.js +28 -0
  313. package/dist/lib/markdown/styles.d.ts +26 -0
  314. package/dist/lib/markdown/styles.js +135 -0
  315. package/dist/lib/mht.d.ts +51 -0
  316. package/dist/lib/mht.js +122 -0
  317. package/dist/lib/midi.d.ts +28 -0
  318. package/dist/lib/midi.js +84 -0
  319. package/dist/lib/mime.d.ts +82 -0
  320. package/dist/lib/mime.js +151 -0
  321. package/dist/lib/mindmap.d.ts +51 -0
  322. package/dist/lib/mindmap.js +113 -0
  323. package/dist/lib/mobi.d.ts +15 -0
  324. package/dist/lib/mobi.js +68 -0
  325. package/dist/lib/msi.d.ts +50 -0
  326. package/dist/lib/msi.js +332 -0
  327. package/dist/lib/optionalDep.d.ts +26 -0
  328. package/dist/lib/optionalDep.js +20 -0
  329. package/dist/lib/pkcs12.d.ts +56 -0
  330. package/dist/lib/pkcs12.js +356 -0
  331. package/dist/lib/qmc.d.ts +50 -0
  332. package/dist/lib/qmc.js +213 -0
  333. package/dist/lib/rar.d.ts +16 -0
  334. package/dist/lib/rar.js +40 -0
  335. package/dist/lib/rawPreview.d.ts +12 -0
  336. package/dist/lib/rawPreview.js +54 -0
  337. package/dist/lib/rc2.d.ts +12 -0
  338. package/dist/lib/rc2.js +298 -0
  339. package/dist/lib/resolveInput.d.ts +22 -0
  340. package/dist/lib/resolveInput.js +55 -0
  341. package/dist/lib/rtf.d.ts +53 -0
  342. package/dist/lib/rtf.js +413 -0
  343. package/dist/lib/sevenZip.d.ts +82 -0
  344. package/dist/lib/sevenZip.js +395 -0
  345. package/dist/lib/sha1.d.ts +24 -0
  346. package/dist/lib/sha1.js +53 -0
  347. package/dist/lib/sha256.d.ts +21 -0
  348. package/dist/lib/sha256.js +119 -0
  349. package/dist/lib/speechAudio.d.ts +36 -0
  350. package/dist/lib/speechAudio.js +85 -0
  351. package/dist/lib/sqlite.d.ts +38 -0
  352. package/dist/lib/sqlite.js +104 -0
  353. package/dist/lib/subtitle.d.ts +26 -0
  354. package/dist/lib/subtitle.js +99 -0
  355. package/dist/lib/tarball.d.ts +20 -0
  356. package/dist/lib/tarball.js +248 -0
  357. package/dist/lib/viewerFormats.d.ts +35 -0
  358. package/dist/lib/viewerFormats.js +83 -0
  359. package/dist/lib/viewerKind.d.ts +36 -0
  360. package/dist/lib/viewerKind.js +233 -0
  361. package/dist/lib/x509.d.ts +68 -0
  362. package/dist/lib/x509.js +267 -0
  363. package/dist/lib/xlsx.d.ts +55 -0
  364. package/dist/lib/xlsx.js +321 -0
  365. package/dist/lib/xlsxCharts.d.ts +34 -0
  366. package/dist/lib/xlsxCharts.js +152 -0
  367. package/dist/lib/xmind.d.ts +6 -0
  368. package/dist/lib/xmind.js +124 -0
  369. package/dist/lib/zip.d.ts +56 -0
  370. package/dist/lib/zip.js +169 -0
  371. package/dist/style.css +2 -0
  372. package/dist/types.d.ts +42 -0
  373. package/package.json +128 -0
@@ -0,0 +1,670 @@
1
+ import { formatBytes as e } from "../lib/format.js";
2
+ import t from "./icons/Icon.js";
3
+ import { useLogRules as n } from "../composables/useLogRules.js";
4
+ import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, normalizeStyle as f, onBeforeUnmount as p, openBlock as m, ref as h, renderList as ee, toDisplayString as g, unref as _, vModelCheckbox as v, vModelText as y, watch as b, withDirectives as x, withKeys as te, withModifiers as ne } from "vue";
5
+ //#region src/components/LogViewer.vue?vue&type=script&setup=true&lang.ts
6
+ var re = { class: "log" }, ie = {
7
+ key: 0,
8
+ class: "log__msg"
9
+ }, ae = {
10
+ key: 1,
11
+ class: "log__msg log__gate"
12
+ }, oe = {
13
+ key: 2,
14
+ class: "log__msg log__msg--error"
15
+ }, se = { class: "log__bar" }, ce = { class: "log__searchwrap" }, le = {
16
+ key: 0,
17
+ class: "log__matches"
18
+ }, ue = ["disabled"], de = ["disabled"], fe = ["disabled"], pe = ["title"], me = { class: "log__total" }, he = {
19
+ key: 0,
20
+ class: "log__rules-empty"
21
+ }, ge = ["onUpdate:modelValue"], _e = ["onUpdate:modelValue"], ve = ["onClick"], ye = ["onClick"], be = {
22
+ class: "log__rule-color",
23
+ title: "背景色"
24
+ }, xe = ["onUpdate:modelValue"], Se = ["onUpdate:modelValue", "disabled"], Ce = {
25
+ class: "log__rule-color",
26
+ title: "字体色"
27
+ }, we = ["onUpdate:modelValue"], Te = ["onUpdate:modelValue", "disabled"], Ee = ["disabled", "onClick"], De = ["disabled", "onClick"], Oe = ["onClick"], ke = ["title", "onClick"], Ae = ["title", "onClick"], je = ["title", "onClick"], Me = { class: "log__ln" }, Ne = {
28
+ key: 0,
29
+ class: "log__fold-cell"
30
+ }, Pe = ["title", "onClick"], Fe = ["innerHTML"], Ie = ["onClick"], Le = 64 * 1024 * 1024, S = 19, Re = 12, C = 10, ze = 2, w = /*@__PURE__*/ u({
31
+ __name: "LogViewer",
32
+ props: {
33
+ url: {},
34
+ name: {},
35
+ size: {}
36
+ },
37
+ setup(u) {
38
+ let w = u, T = h("loading"), E = h(""), D = h([]), O = h(null), k = h(0), A = h(400), j = null, Be = /^[ \t]+at\s+\S+[.(]/, M = /^[ \t]+File\s["']/, Ve = /^[ \t]+from\s+\S+:\d+/, He = /^[ \t]*\.\.\.\s+\d+\s+more\b/, Ue = /^[ \t]+--- End of /;
39
+ function N(e) {
40
+ return Be.test(e) || M.test(e) || Ve.test(e) || He.test(e) || Ue.test(e);
41
+ }
42
+ let P = i(() => {
43
+ let e = D.value, t = e.length, n = [], r = 0;
44
+ for (; r < t;) {
45
+ if (!N(e[r])) {
46
+ r++;
47
+ continue;
48
+ }
49
+ let i = r, a = M.test(e[r]);
50
+ for (r++; r < t;) {
51
+ let t = e[r];
52
+ if (N(t)) a = M.test(t), r++;
53
+ else if (a && /^[ \t]+\S/.test(t)) a = !1, r++;
54
+ else break;
55
+ }
56
+ let o = r - 1, s = i - 1, c = s >= 0 && !N(e[s]) && e[s].trim() !== "" ? i : i + 1;
57
+ o - c + 1 >= ze && n.push({
58
+ header: c - 1,
59
+ frameStart: c,
60
+ frameEnd: o
61
+ });
62
+ }
63
+ return n;
64
+ }), F = i(() => P.value.length > 0), We = i(() => {
65
+ let e = /* @__PURE__ */ new Map();
66
+ return P.value.forEach((t, n) => e.set(t.header, n)), e;
67
+ });
68
+ function I(e) {
69
+ let t = P.value, n = 0, r = t.length - 1;
70
+ for (; n <= r;) {
71
+ let i = n + r >> 1, a = t[i];
72
+ if (e < a.header) r = i - 1;
73
+ else if (e > a.frameEnd) n = i + 1;
74
+ else return i;
75
+ }
76
+ return -1;
77
+ }
78
+ let L = h(/* @__PURE__ */ new Set()), R = i(() => F.value && L.value.size === P.value.length);
79
+ function Ge(e) {
80
+ let t = new Set(L.value);
81
+ t.has(e) ? t.delete(e) : t.add(e), L.value = t;
82
+ }
83
+ function Ke() {
84
+ L.value = R.value ? /* @__PURE__ */ new Set() : new Set(P.value.map((e, t) => t));
85
+ }
86
+ function z(e) {
87
+ return !(L.value.has(e) || U.value && tt.value.has(e));
88
+ }
89
+ let { rules: B, add: qe, remove: Je, move: Ye } = n(), V = h(!1), Xe = i(() => {
90
+ let e = [];
91
+ for (let t of B.value) {
92
+ if (!t.enabled || !t.pattern || !(t.bgOn || t.fgOn)) continue;
93
+ let n;
94
+ if (t.regex) try {
95
+ let e = new RegExp(t.pattern, t.caseSensitive ? "" : "i");
96
+ n = (t) => e.test(t);
97
+ } catch {
98
+ n = null;
99
+ }
100
+ else if (t.caseSensitive) {
101
+ let e = t.pattern;
102
+ n = (t) => t.includes(e);
103
+ } else {
104
+ let e = t.pattern.toLowerCase();
105
+ n = (t) => t.toLowerCase().includes(e);
106
+ }
107
+ n && e.push({
108
+ test: n,
109
+ bg: t.bgOn ? t.bg : "",
110
+ fg: t.fgOn ? t.fg : ""
111
+ });
112
+ }
113
+ return e;
114
+ });
115
+ function Ze(e) {
116
+ for (let t of Xe.value) if (t.test(e)) return {
117
+ bg: t.bg,
118
+ fg: t.fg
119
+ };
120
+ return null;
121
+ }
122
+ function Qe(e) {
123
+ if (!e.regex || !e.pattern) return !1;
124
+ try {
125
+ return new RegExp(e.pattern), !1;
126
+ } catch {
127
+ return !0;
128
+ }
129
+ }
130
+ let H = h(""), U = h(""), W;
131
+ b(H, (e) => {
132
+ clearTimeout(W), W = setTimeout(() => {
133
+ U.value = e, q.value = 0, Y.value = /* @__PURE__ */ new Set();
134
+ }, 160);
135
+ });
136
+ function $e() {
137
+ H.value = "", clearTimeout(W), U.value = "", q.value = 0, Y.value = /* @__PURE__ */ new Set();
138
+ }
139
+ let G = h(!1), K = h(!1), q = h(0), J = i(() => {
140
+ let e = U.value.toLowerCase();
141
+ if (!e) return [];
142
+ let t = [], n = D.value;
143
+ for (let r = 0; r < n.length; r++) n[r].toLowerCase().includes(e) && t.push(r);
144
+ return t;
145
+ });
146
+ function et(e, t) {
147
+ return t ? e.toLowerCase().includes(t.toLowerCase()) : !1;
148
+ }
149
+ let tt = i(() => {
150
+ let e = /* @__PURE__ */ new Set();
151
+ if (!U.value) return e;
152
+ for (let t of J.value) {
153
+ let n = I(t);
154
+ n >= 0 && e.add(n);
155
+ }
156
+ return e;
157
+ }), nt = i(() => {
158
+ let e = J.value;
159
+ return e.length ? e[Math.min(q.value, e.length - 1)] : -1;
160
+ }), rt = /\b(?:ERROR|FATAL|SEVERE|CRITICAL|PANIC|FAILED|FAILURE)\b|\b\w*(?:Exception|Error)\b|\bTraceback\b|\bCaused by\b|^\s*panic:/, it = i(() => {
161
+ if (!K.value) return [];
162
+ let e = D.value, t = We.value, n = [];
163
+ for (let r = 0; r < e.length; r++) (t.has(r) || rt.test(e[r])) && n.push(r);
164
+ return n;
165
+ }), at = i(() => new Set(it.value)), ot = i(() => G.value && U.value !== ""), st = i(() => {
166
+ let e = ot.value, t = K.value;
167
+ if (!e && !t) return null;
168
+ if (e && t) {
169
+ let e = at.value;
170
+ return J.value.filter((t) => e.has(t));
171
+ }
172
+ return t ? it.value : J.value;
173
+ }), ct = i(() => ot.value), Y = h(/* @__PURE__ */ new Set());
174
+ b([K, G], () => {
175
+ Y.value = /* @__PURE__ */ new Set();
176
+ });
177
+ function X(e, t, n) {
178
+ let r = e + 1, i = t - 1;
179
+ if (i < r) return;
180
+ let a = r, o = i;
181
+ n === "down" ? o = Math.min(i, r + C - 1) : n === "up" && (a = Math.max(r, i - C + 1));
182
+ let s = new Set(Y.value);
183
+ for (let e = a; e <= o; e++) s.add(e);
184
+ Y.value = s;
185
+ }
186
+ let lt = i(() => {
187
+ let e = P.value, t = D.value.length, n = [], r = 0, i = 0;
188
+ for (let t = 0; t < e.length; t++) {
189
+ if (!z(t)) continue;
190
+ let a = e[t];
191
+ a.frameStart > i && (n.push({
192
+ o0: i,
193
+ o1: a.frameStart - 1,
194
+ d0: r
195
+ }), r += a.frameStart - i), i = a.frameEnd + 1;
196
+ }
197
+ return i < t && (n.push({
198
+ o0: i,
199
+ o1: t - 1,
200
+ d0: r
201
+ }), r += t - i), {
202
+ runs: n,
203
+ total: r
204
+ };
205
+ }), Z = i(() => {
206
+ let e = st.value;
207
+ if (e === null) return null;
208
+ let t = D.value.length, n = P.value, r = [];
209
+ if (ct.value) {
210
+ let t = /* @__PURE__ */ new Set();
211
+ for (let n of e) {
212
+ let e = I(n);
213
+ e >= 0 && t.add(e);
214
+ }
215
+ for (let e of t) r.push([n[e].header, n[e].frameEnd]);
216
+ r.sort((e, t) => e[0] - t[0]);
217
+ }
218
+ let i = (e) => {
219
+ let t = 0, n = r.length - 1;
220
+ for (; t <= n;) {
221
+ let i = t + n >> 1;
222
+ if (e < r[i][0]) n = i - 1;
223
+ else if (e > r[i][1]) t = i + 1;
224
+ else return !0;
225
+ }
226
+ return !1;
227
+ }, a = [];
228
+ for (let t of e) i(t) || a.push(t);
229
+ for (let e of Y.value) i(e) || a.push(e);
230
+ a.sort((e, t) => e - t);
231
+ let o = [], s = 0, c = 0, l = r.length ? r[0][0] : Infinity, u = -1;
232
+ for (; s < r.length || c < a.length;) {
233
+ let e = s < r.length ? l : Infinity, t = c < a.length ? a[c] : Infinity, n;
234
+ e <= t ? (n = e, l >= r[s][1] ? (s++, l = s < r.length ? r[s][0] : Infinity) : l++) : (n = t, c++), n !== u && (o.push(n), u = n);
235
+ }
236
+ let d = [], f = [], p = -1;
237
+ for (let e of o) e - p > 1 && (d.push({
238
+ t: "gap",
239
+ top: p,
240
+ bottom: e,
241
+ size: e - p - 1
242
+ }), f.push(p + .5)), d.push({
243
+ t: "line",
244
+ orig: e
245
+ }), f.push(e), p = e;
246
+ return p < t - 1 && (d.push({
247
+ t: "gap",
248
+ top: p,
249
+ bottom: t,
250
+ size: t - 1 - p
251
+ }), f.push(p + .5)), {
252
+ items: d,
253
+ key: f
254
+ };
255
+ }), ut = i(() => Z.value !== null), dt = i(() => Z.value ? Z.value.items.length : lt.value.total);
256
+ function ft(e) {
257
+ let t = D.value[e] ?? "", n = We.value.get(e);
258
+ if (n !== void 0) {
259
+ let r = P.value[n];
260
+ return {
261
+ n: e + 1,
262
+ text: t,
263
+ kind: "header",
264
+ collapsed: Z.value ? !1 : z(n),
265
+ count: r.frameEnd - r.frameStart + 1,
266
+ gid: n
267
+ };
268
+ }
269
+ let r = I(e), i = r >= 0 && e >= P.value[r].frameStart ? "frame" : "plain";
270
+ return {
271
+ n: e + 1,
272
+ text: t,
273
+ kind: i,
274
+ collapsed: !1,
275
+ count: 0,
276
+ gid: -1
277
+ };
278
+ }
279
+ function pt(e, t) {
280
+ let n = 0, r = e.length - 1, i = 0;
281
+ for (; n <= r;) {
282
+ let a = n + r >> 1;
283
+ t < e[a].d0 ? r = a - 1 : (i = a, n = a + 1);
284
+ }
285
+ let a = e[i];
286
+ return a ? a.o0 + (t - a.d0) : t;
287
+ }
288
+ let mt = i(() => Math.max(0, Math.floor(k.value / S) - Re)), ht = i(() => Math.min(dt.value, Math.ceil((k.value + A.value) / S) + Re));
289
+ function gt(e, t) {
290
+ let n = ft(t);
291
+ return {
292
+ i: e,
293
+ isGap: !1,
294
+ ...n,
295
+ style: Ze(n.text),
296
+ context: Z.value !== null && Y.value.has(t) && !et(n.text, U.value),
297
+ top: 0,
298
+ bottom: 0,
299
+ size: 0,
300
+ step: 0
301
+ };
302
+ }
303
+ let _t = i(() => {
304
+ let e = [], t = mt.value, n = ht.value, r = Z.value;
305
+ if (r) for (let i = t; i < n; i++) {
306
+ let t = r.items[i];
307
+ t && (t.t === "gap" ? e.push({
308
+ i,
309
+ isGap: !0,
310
+ n: 0,
311
+ text: "",
312
+ kind: "plain",
313
+ collapsed: !1,
314
+ count: 0,
315
+ gid: -1,
316
+ style: null,
317
+ context: !1,
318
+ top: t.top,
319
+ bottom: t.bottom,
320
+ size: t.size,
321
+ step: Math.min(C, t.size)
322
+ }) : e.push(gt(i, t.orig)));
323
+ }
324
+ else {
325
+ let r = lt.value.runs;
326
+ for (let i = t; i < n; i++) e.push(gt(i, pt(r, i)));
327
+ }
328
+ return e;
329
+ });
330
+ function Q(e) {
331
+ return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
332
+ }
333
+ function vt(e) {
334
+ let t = U.value;
335
+ if (!t) return Q(e);
336
+ let n = e.toLowerCase(), r = t.toLowerCase(), i = "", a = 0, o = n.indexOf(r, a);
337
+ for (; o !== -1;) i += Q(e.slice(a, o)), i += "<mark class=\"log__hit\">" + Q(e.slice(o, o + t.length)) + "</mark>", a = o + t.length, o = n.indexOf(r, a);
338
+ return i += Q(e.slice(a)), i;
339
+ }
340
+ function yt(e) {
341
+ let t = O.value;
342
+ t && (t.scrollTop = Math.max(0, e * S - A.value / 2 + S));
343
+ }
344
+ function bt(e) {
345
+ let t = Z.value;
346
+ if (t) {
347
+ let n = t.key, r = 0, i = n.length - 1;
348
+ for (; r <= i;) {
349
+ let t = r + i >> 1;
350
+ if (n[t] === e) return t;
351
+ n[t] < e ? r = t + 1 : i = t - 1;
352
+ }
353
+ return -1;
354
+ }
355
+ let n = I(e);
356
+ n >= 0 && e >= P.value[n].frameStart && z(n) && (e = P.value[n].header);
357
+ let r = lt.value.runs, i = 0, a = r.length - 1;
358
+ for (; i <= a;) {
359
+ let t = i + a >> 1;
360
+ if (e < r[t].o0) a = t - 1;
361
+ else if (e > r[t].o1) i = t + 1;
362
+ else return r[t].d0 + (e - r[t].o0);
363
+ }
364
+ return -1;
365
+ }
366
+ function xt(e) {
367
+ let t = J.value;
368
+ if (!t.length) return;
369
+ q.value = (q.value + e + t.length) % t.length;
370
+ let n = bt(t[q.value]);
371
+ n >= 0 && yt(n);
372
+ }
373
+ let St = h("");
374
+ function Ct() {
375
+ let e = parseInt(St.value, 10);
376
+ if (!Number.isFinite(e)) return;
377
+ let t = bt(Math.max(0, Math.min(D.value.length - 1, e - 1)));
378
+ t >= 0 && yt(t);
379
+ }
380
+ function wt() {
381
+ O.value && (k.value = O.value.scrollTop);
382
+ }
383
+ async function $() {
384
+ if (w.url) {
385
+ T.value = "loading", E.value = "";
386
+ try {
387
+ let e = await fetch(w.url);
388
+ if (!e.ok) throw Error(`HTTP ${e.status}`);
389
+ D.value = (await e.text()).split("\n"), D.value.length > 1 && D.value[D.value.length - 1] === "" && D.value.pop(), L.value = /* @__PURE__ */ new Set(), Y.value = /* @__PURE__ */ new Set(), k.value = 0, O.value && (O.value.scrollTop = 0), T.value = "ready";
390
+ } catch (e) {
391
+ E.value = e instanceof Error ? e.message : String(e), T.value = "error";
392
+ }
393
+ }
394
+ }
395
+ function Tt() {
396
+ if (w.size && w.size > Le) {
397
+ T.value = "gate";
398
+ return;
399
+ }
400
+ $();
401
+ }
402
+ return b(O, (e) => {
403
+ j?.disconnect(), e && typeof ResizeObserver < "u" && (j = new ResizeObserver(() => {
404
+ O.value && (A.value = O.value.clientHeight);
405
+ }), j.observe(e), A.value = e.clientHeight);
406
+ }, { flush: "post" }), b(() => w.url, Tt, { immediate: !0 }), p(() => {
407
+ clearTimeout(W), j?.disconnect();
408
+ }), (n, i) => (m(), o("div", re, [T.value === "loading" ? (m(), o("p", ie, "正在加载…")) : T.value === "gate" ? (m(), o("div", ae, [s("p", null, "该文件较大(" + g(_(e)(w.size)) + "),将在浏览器内加载。是否继续?", 1), s("button", {
409
+ type: "button",
410
+ class: "log__btn",
411
+ onClick: $
412
+ }, "加载并预览")])) : T.value === "error" ? (m(), o("div", oe, [s("p", null, "加载失败:" + g(E.value), 1), s("button", {
413
+ type: "button",
414
+ class: "log__btn",
415
+ onClick: $
416
+ }, "重试")])) : (m(), o(r, { key: 3 }, [s("div", se, [
417
+ s("div", ce, [x(s("input", {
418
+ "onUpdate:modelValue": i[0] ||= (e) => H.value = e,
419
+ class: "log__search",
420
+ type: "text",
421
+ placeholder: "搜索…",
422
+ "aria-label": "搜索",
423
+ onKeydown: te($e, ["esc"])
424
+ }, null, 544), [[y, H.value]]), H.value ? (m(), o("button", {
425
+ key: 0,
426
+ type: "button",
427
+ class: "log__clear",
428
+ title: "清空搜索",
429
+ "aria-label": "清空搜索",
430
+ onClick: $e
431
+ }, [l(t, {
432
+ name: "close",
433
+ size: 12
434
+ })])) : a("", !0)]),
435
+ U.value ? (m(), o("span", le, g(J.value.length ? q.value + 1 : 0) + "/" + g(J.value.length), 1)) : a("", !0),
436
+ s("button", {
437
+ type: "button",
438
+ class: "log__nav",
439
+ title: "上一处",
440
+ disabled: !J.value.length,
441
+ onClick: i[1] ||= (e) => xt(-1)
442
+ }, " ↑ ", 8, ue),
443
+ s("button", {
444
+ type: "button",
445
+ class: "log__nav",
446
+ title: "下一处",
447
+ disabled: !J.value.length,
448
+ onClick: i[2] ||= (e) => xt(1)
449
+ }, " ↓ ", 8, de),
450
+ s("button", {
451
+ type: "button",
452
+ class: d(["log__nav log__nav--text", { "log__nav--on": G.value }]),
453
+ disabled: !U.value,
454
+ title: "只看匹配行(命中的堆栈整条保留,行间可展开上下文)",
455
+ onClick: i[3] ||= (e) => G.value = !G.value
456
+ }, " 过滤 ", 10, fe),
457
+ s("button", {
458
+ type: "button",
459
+ class: d(["log__nav log__nav--text", { "log__nav--on": K.value }]),
460
+ title: "只显示异常/错误行(异常头、ERROR/FATAL、*Exception/*Error 等;可与搜索过滤叠加)",
461
+ onClick: i[4] ||= (e) => K.value = !K.value
462
+ }, " 只看异常 ", 2),
463
+ F.value ? (m(), o("button", {
464
+ key: 1,
465
+ type: "button",
466
+ class: d(["log__nav log__nav--text", { "log__nav--on": R.value }]),
467
+ title: `共 ${P.value.length} 处调用堆栈,点击${R.value ? "折叠" : "展开"}全部`,
468
+ onClick: Ke
469
+ }, g(R.value ? "折叠堆栈" : "展开堆栈"), 11, pe)) : a("", !0),
470
+ s("button", {
471
+ type: "button",
472
+ class: d(["log__nav log__nav--text", { "log__nav--on": V.value || Xe.value.length > 0 }]),
473
+ title: "按规则给行上色",
474
+ onClick: i[5] ||= (e) => V.value = !V.value
475
+ }, " 上色 ", 2),
476
+ i[15] ||= s("span", { class: "log__spacer" }, null, -1),
477
+ x(s("input", {
478
+ "onUpdate:modelValue": i[6] ||= (e) => St.value = e,
479
+ class: "log__goto",
480
+ type: "text",
481
+ inputmode: "numeric",
482
+ placeholder: "行号",
483
+ "aria-label": "跳转到行",
484
+ onKeydown: te(Ct, ["enter"])
485
+ }, null, 544), [[y, St.value]]),
486
+ s("span", me, [c(g(D.value.length) + " 行", 1), F.value ? (m(), o(r, { key: 0 }, [c(" · " + g(P.value.length) + " 堆栈", 1)], 64)) : a("", !0)]),
487
+ V.value ? (m(), o("div", {
488
+ key: 2,
489
+ class: "log__overlay",
490
+ onClick: i[7] ||= (e) => V.value = !1
491
+ })) : a("", !0),
492
+ V.value ? (m(), o("div", {
493
+ key: 3,
494
+ class: "log__rules",
495
+ onClick: i[9] ||= ne(() => {}, ["stop"])
496
+ }, [
497
+ i[14] ||= s("div", { class: "log__rules-head" }, [s("span", { class: "log__rules-title" }, "行上色规则"), s("span", { class: "log__rules-hint" }, "从上到下,首个匹配生效")], -1),
498
+ _(B).length ? a("", !0) : (m(), o("p", he, [...i[10] ||= [
499
+ c(" 还没有规则。添加一条,用关键字或正则给匹配行上色(如 ", -1),
500
+ s("code", null, "ERROR", -1),
501
+ c(" 标红)。 ", -1)
502
+ ]])),
503
+ (m(!0), o(r, null, ee(_(B), (e, n) => (m(), o("div", {
504
+ key: e.id,
505
+ class: "log__rule"
506
+ }, [
507
+ x(s("input", {
508
+ "onUpdate:modelValue": (t) => e.enabled = t,
509
+ type: "checkbox",
510
+ title: "启用该规则"
511
+ }, null, 8, ge), [[v, e.enabled]]),
512
+ x(s("input", {
513
+ "onUpdate:modelValue": (t) => e.pattern = t,
514
+ class: d(["log__rule-pat", { "log__rule-pat--bad": Qe(e) }]),
515
+ type: "text",
516
+ placeholder: "关键字或正则"
517
+ }, null, 10, _e), [[y, e.pattern]]),
518
+ s("button", {
519
+ type: "button",
520
+ class: d(["log__rule-tog", { "log__rule-tog--on": e.regex }]),
521
+ title: "按正则匹配",
522
+ onClick: (t) => e.regex = !e.regex
523
+ }, " .* ", 10, ve),
524
+ s("button", {
525
+ type: "button",
526
+ class: d(["log__rule-tog", { "log__rule-tog--on": e.caseSensitive }]),
527
+ title: "区分大小写",
528
+ onClick: (t) => e.caseSensitive = !e.caseSensitive
529
+ }, " Aa ", 10, ye),
530
+ s("label", be, [
531
+ x(s("input", {
532
+ "onUpdate:modelValue": (t) => e.bgOn = t,
533
+ type: "checkbox"
534
+ }, null, 8, xe), [[v, e.bgOn]]),
535
+ x(s("input", {
536
+ "onUpdate:modelValue": (t) => e.bg = t,
537
+ type: "color",
538
+ disabled: !e.bgOn
539
+ }, null, 8, Se), [[y, e.bg]]),
540
+ i[11] ||= s("span", null, "底", -1)
541
+ ]),
542
+ s("label", Ce, [
543
+ x(s("input", {
544
+ "onUpdate:modelValue": (t) => e.fgOn = t,
545
+ type: "checkbox"
546
+ }, null, 8, we), [[v, e.fgOn]]),
547
+ x(s("input", {
548
+ "onUpdate:modelValue": (t) => e.fg = t,
549
+ type: "color",
550
+ disabled: !e.fgOn
551
+ }, null, 8, Te), [[y, e.fg]]),
552
+ i[12] ||= s("span", null, "字", -1)
553
+ ]),
554
+ s("button", {
555
+ type: "button",
556
+ class: "log__rule-ic",
557
+ title: "上移",
558
+ disabled: n === 0,
559
+ onClick: (t) => _(Ye)(e.id, -1)
560
+ }, [l(t, {
561
+ name: "arrowUp",
562
+ size: 12
563
+ })], 8, Ee),
564
+ s("button", {
565
+ type: "button",
566
+ class: "log__rule-ic",
567
+ title: "下移",
568
+ disabled: n === _(B).length - 1,
569
+ onClick: (t) => _(Ye)(e.id, 1)
570
+ }, [l(t, {
571
+ name: "arrowDown",
572
+ size: 12
573
+ })], 8, De),
574
+ s("button", {
575
+ type: "button",
576
+ class: "log__rule-ic log__rule-del",
577
+ title: "删除",
578
+ onClick: (t) => _(Je)(e.id)
579
+ }, [l(t, {
580
+ name: "trash",
581
+ size: 12
582
+ })], 8, Oe)
583
+ ]))), 128)),
584
+ s("button", {
585
+ type: "button",
586
+ class: "log__rules-add",
587
+ onClick: i[8] ||= (...e) => _(qe) && _(qe)(...e)
588
+ }, [l(t, {
589
+ name: "plus",
590
+ size: 12
591
+ }), i[13] ||= c(" 添加规则 ", -1)])
592
+ ])) : a("", !0)
593
+ ]), s("div", {
594
+ ref_key: "scrollEl",
595
+ ref: O,
596
+ class: "log__scroll",
597
+ onScroll: wt
598
+ }, [s("div", {
599
+ class: "log__sizer",
600
+ style: f({ height: dt.value * S + "px" })
601
+ }, [s("div", {
602
+ class: "log__rows",
603
+ style: f({ paddingTop: mt.value * S + "px" })
604
+ }, [(m(!0), o(r, null, ee(_t.value, (e) => (m(), o("div", {
605
+ key: e.i,
606
+ class: d(["log__row", {
607
+ log__gaprow: e.isGap,
608
+ "log__row--active": !e.isGap && e.n - 1 === nt.value,
609
+ "log__row--header": !e.isGap && e.kind === "header",
610
+ "log__row--frame": !e.isGap && e.kind === "frame",
611
+ "log__row--context": e.context
612
+ }]),
613
+ style: f(!e.isGap && e.style && e.style.bg ? { background: e.style.bg } : void 0)
614
+ }, [e.isGap ? (m(), o(r, { key: 0 }, [
615
+ e.size > C ? (m(), o("button", {
616
+ key: 0,
617
+ type: "button",
618
+ class: "log__gapbtn",
619
+ title: `向下展开 ${e.step} 行(上方匹配之后)`,
620
+ onClick: (t) => X(e.top, e.bottom, "down")
621
+ }, [l(t, {
622
+ name: "chevronDown",
623
+ size: 12
624
+ })], 8, ke)) : a("", !0),
625
+ s("button", {
626
+ type: "button",
627
+ class: "log__gapmain",
628
+ title: `展开全部 ${e.size} 行`,
629
+ onClick: (t) => X(e.top, e.bottom, "all")
630
+ }, " ⋯ " + g(e.size) + " 行 ", 9, Ae),
631
+ e.size > C ? (m(), o("button", {
632
+ key: 1,
633
+ type: "button",
634
+ class: "log__gapbtn log__gapbtn--up",
635
+ title: `向上展开 ${e.step} 行(下方匹配之前)`,
636
+ onClick: (t) => X(e.top, e.bottom, "up")
637
+ }, [l(t, {
638
+ name: "chevronDown",
639
+ size: 12
640
+ })], 8, je)) : a("", !0)
641
+ ], 64)) : (m(), o(r, { key: 1 }, [
642
+ s("span", Me, g(e.n), 1),
643
+ F.value ? (m(), o("span", Ne, [e.kind === "header" && !ut.value ? (m(), o("button", {
644
+ key: 0,
645
+ type: "button",
646
+ class: "log__fold",
647
+ title: e.collapsed ? "展开堆栈" : "折叠堆栈",
648
+ onClick: (t) => Ge(e.gid)
649
+ }, [l(t, {
650
+ name: "chevronRight",
651
+ size: 12,
652
+ class: d(["log__chev", { "log__chev--open": !e.collapsed }])
653
+ }, null, 8, ["class"])], 8, Pe)) : a("", !0)])) : a("", !0),
654
+ s("span", {
655
+ class: "log__tx",
656
+ style: f(e.style && e.style.fg ? { color: e.style.fg } : void 0),
657
+ innerHTML: vt(e.text)
658
+ }, null, 12, Fe),
659
+ e.kind === "header" && e.collapsed && !ut.value ? (m(), o("button", {
660
+ key: 1,
661
+ type: "button",
662
+ class: "log__badge",
663
+ title: "展开堆栈",
664
+ onClick: (t) => Ge(e.gid)
665
+ }, " ⋯ " + g(e.count) + " 帧 ", 9, Ie)) : a("", !0)
666
+ ], 64))], 6))), 128))], 4)], 4)], 544)], 64))]));
667
+ }
668
+ });
669
+ //#endregion
670
+ export { w as default };
@@ -0,0 +1,7 @@
1
+ import e from "../_virtual/_plugin-vue_export-helper.js";
2
+ import t from "./LrcViewer.vue_vue_type_script_setup_true_lang.js";
3
+ /* empty css */
4
+ //#region src/components/LrcViewer.vue
5
+ var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-5cb50c8a"]]);
6
+ //#endregion
7
+ export { n as default };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Side-viewer LRC lyrics renderer. Unlike the text-backed viewers, this one self-fetches the BYTES and sniffs
3
+ * the encoding (UTF-8 → GBK → lenient, see lib/encoding.ts) — QQ Music's `.lrc` files are almost always GBK
4
+ * and would be mojibake if read as UTF-8 text. The bytes are parsed in-browser (see lib/lrc.ts) into a synced
5
+ * lyric list (timestamp + text); HTML numeric entities common in those files are decoded too.
6
+ *
7
+ * Self-contained 歌词/源码 toggle (the panel's own toggle is for text-backed kinds, which this isn't): render
8
+ * shows the parsed lines, source shows the decoded raw text.
9
+ */
10
+ type __VLS_Props = {
11
+ url?: string;
12
+ name: string;
13
+ size?: number;
14
+ };
15
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;