@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.
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/dist/FileViewer.js +7 -0
- package/dist/FileViewer.vue.d.ts +37 -0
- package/dist/FileViewer.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/components/AppxViewer.js +7 -0
- package/dist/components/AppxViewer.vue.d.ts +18 -0
- package/dist/components/AppxViewer.vue_vue_type_script_setup_true_lang.js +174 -0
- package/dist/components/ArchiveBrowser.js +7 -0
- package/dist/components/ArchiveBrowser.vue.d.ts +18 -0
- package/dist/components/ArchiveBrowser.vue_vue_type_script_setup_true_lang.js +279 -0
- package/dist/components/AudioViewer.js +7 -0
- package/dist/components/AudioViewer.vue.d.ts +21 -0
- package/dist/components/AudioViewer.vue_vue_type_script_setup_true_lang.js +201 -0
- package/dist/components/BinObjBrowser.js +7 -0
- package/dist/components/BinObjBrowser.vue.d.ts +19 -0
- package/dist/components/BinObjBrowser.vue_vue_type_script_setup_true_lang.js +141 -0
- package/dist/components/CertViewer.js +7 -0
- package/dist/components/CertViewer.vue.d.ts +17 -0
- package/dist/components/CertViewer.vue_vue_type_script_setup_true_lang.js +251 -0
- package/dist/components/ClassViewer.js +7 -0
- package/dist/components/ClassViewer.vue.d.ts +15 -0
- package/dist/components/ClassViewer.vue_vue_type_script_setup_true_lang.js +164 -0
- package/dist/components/CodeBlock.js +7 -0
- package/dist/components/CodeBlock.vue.d.ts +17 -0
- package/dist/components/CodeBlock.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/components/CodeView.js +7 -0
- package/dist/components/CodeView.vue.d.ts +21 -0
- package/dist/components/CodeView.vue_vue_type_script_setup_true_lang.js +180 -0
- package/dist/components/CsvViewer.js +7 -0
- package/dist/components/CsvViewer.vue.d.ts +26 -0
- package/dist/components/CsvViewer.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/components/DicomViewer.js +7 -0
- package/dist/components/DicomViewer.vue.d.ts +30 -0
- package/dist/components/DicomViewer.vue_vue_type_script_setup_true_lang.js +362 -0
- package/dist/components/DocxViewer.js +7 -0
- package/dist/components/DocxViewer.vue.d.ts +19 -0
- package/dist/components/DocxViewer.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/DrawioViewer.js +7 -0
- package/dist/components/DrawioViewer.vue.d.ts +16 -0
- package/dist/components/DrawioViewer.vue_vue_type_script_setup_true_lang.js +38 -0
- package/dist/components/DxfViewer.js +7 -0
- package/dist/components/DxfViewer.vue.d.ts +14 -0
- package/dist/components/DxfViewer.vue_vue_type_script_setup_true_lang.js +239 -0
- package/dist/components/EbookViewer.js +7 -0
- package/dist/components/EbookViewer.vue.d.ts +22 -0
- package/dist/components/EbookViewer.vue_vue_type_script_setup_true_lang.js +170 -0
- package/dist/components/EmlViewer.js +7 -0
- package/dist/components/EmlViewer.vue.d.ts +21 -0
- package/dist/components/EmlViewer.vue_vue_type_script_setup_true_lang.js +193 -0
- package/dist/components/EplViewer.js +7 -0
- package/dist/components/EplViewer.vue.d.ts +19 -0
- package/dist/components/EplViewer.vue_vue_type_script_setup_true_lang.js +201 -0
- package/dist/components/FileViewerBody.js +7 -0
- package/dist/components/FileViewerBody.vue.d.ts +47 -0
- package/dist/components/FileViewerBody.vue_vue_type_script_setup_true_lang.js +599 -0
- package/dist/components/FileViewerPanel.js +7 -0
- package/dist/components/FileViewerPanel.vue.d.ts +3 -0
- package/dist/components/FileViewerPanel.vue_vue_type_script_setup_true_lang.js +207 -0
- package/dist/components/FontViewer.js +7 -0
- package/dist/components/FontViewer.vue.d.ts +17 -0
- package/dist/components/FontViewer.vue_vue_type_script_setup_true_lang.js +120 -0
- package/dist/components/FrontmatterCard.js +7 -0
- package/dist/components/FrontmatterCard.vue.d.ts +11 -0
- package/dist/components/FrontmatterCard.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/components/GeoViewer.js +7 -0
- package/dist/components/GeoViewer.vue.d.ts +17 -0
- package/dist/components/GeoViewer.vue_vue_type_script_setup_true_lang.js +255 -0
- package/dist/components/HarViewer.js +7 -0
- package/dist/components/HarViewer.vue.d.ts +20 -0
- package/dist/components/HarViewer.vue_vue_type_script_setup_true_lang.js +322 -0
- package/dist/components/HexViewer.js +7 -0
- package/dist/components/HexViewer.vue.d.ts +22 -0
- package/dist/components/HexViewer.vue_vue_type_script_setup_true_lang.js +121 -0
- package/dist/components/HprofViewer.js +7 -0
- package/dist/components/HprofViewer.vue.d.ts +27 -0
- package/dist/components/HprofViewer.vue_vue_type_script_setup_true_lang.js +561 -0
- package/dist/components/ImageLightbox.js +7 -0
- package/dist/components/ImageLightbox.vue.d.ts +3 -0
- package/dist/components/ImageLightbox.vue_vue_type_script_setup_true_lang.js +86 -0
- package/dist/components/InlineText.d.ts +29 -0
- package/dist/components/InlineText.js +21 -0
- package/dist/components/JksViewer.js +7 -0
- package/dist/components/JksViewer.vue.d.ts +22 -0
- package/dist/components/JksViewer.vue_vue_type_script_setup_true_lang.js +353 -0
- package/dist/components/JsonlViewer.js +7 -0
- package/dist/components/JsonlViewer.vue.d.ts +15 -0
- package/dist/components/JsonlViewer.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/components/LogViewer.js +7 -0
- package/dist/components/LogViewer.vue.d.ts +29 -0
- package/dist/components/LogViewer.vue_vue_type_script_setup_true_lang.js +670 -0
- package/dist/components/LrcViewer.js +7 -0
- package/dist/components/LrcViewer.vue.d.ts +17 -0
- package/dist/components/LrcViewer.vue_vue_type_script_setup_true_lang.js +106 -0
- package/dist/components/MarkdownTable.js +7 -0
- package/dist/components/MarkdownTable.vue.d.ts +19 -0
- package/dist/components/MarkdownTable.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/components/MarkdownText.d.ts +30 -0
- package/dist/components/MarkdownText.js +21 -0
- package/dist/components/MhtViewer.js +7 -0
- package/dist/components/MhtViewer.vue.d.ts +22 -0
- package/dist/components/MhtViewer.vue_vue_type_script_setup_true_lang.js +112 -0
- package/dist/components/MindMapView.js +7 -0
- package/dist/components/MindMapView.vue.d.ts +23 -0
- package/dist/components/MindMapView.vue_vue_type_script_setup_true_lang.js +337 -0
- package/dist/components/MissingDependency.js +7 -0
- package/dist/components/MissingDependency.vue.d.ts +17 -0
- package/dist/components/MissingDependency.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/ModelViewer.js +7 -0
- package/dist/components/ModelViewer.vue.d.ts +18 -0
- package/dist/components/ModelViewer.vue_vue_type_script_setup_true_lang.js +157 -0
- package/dist/components/MsiViewer.js +7 -0
- package/dist/components/MsiViewer.vue.d.ts +19 -0
- package/dist/components/MsiViewer.vue_vue_type_script_setup_true_lang.js +136 -0
- package/dist/components/NotebookViewer.js +7 -0
- package/dist/components/NotebookViewer.vue.d.ts +20 -0
- package/dist/components/NotebookViewer.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/components/PdfViewer.js +7 -0
- package/dist/components/PdfViewer.vue.d.ts +19 -0
- package/dist/components/PdfViewer.vue_vue_type_script_setup_true_lang.js +114 -0
- package/dist/components/PptxViewer.js +7 -0
- package/dist/components/PptxViewer.vue.d.ts +20 -0
- package/dist/components/PptxViewer.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/PsdViewer.js +7 -0
- package/dist/components/PsdViewer.vue.d.ts +15 -0
- package/dist/components/PsdViewer.vue_vue_type_script_setup_true_lang.js +218 -0
- package/dist/components/QmcAudioViewer.js +7 -0
- package/dist/components/QmcAudioViewer.vue.d.ts +18 -0
- package/dist/components/QmcAudioViewer.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/components/RasterViewer.js +7 -0
- package/dist/components/RasterViewer.vue.d.ts +21 -0
- package/dist/components/RasterViewer.vue_vue_type_script_setup_true_lang.js +161 -0
- package/dist/components/RtfViewer.js +7 -0
- package/dist/components/RtfViewer.vue.d.ts +21 -0
- package/dist/components/RtfViewer.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/components/SevenZipBrowser.js +7 -0
- package/dist/components/SevenZipBrowser.vue.d.ts +13 -0
- package/dist/components/SevenZipBrowser.vue_vue_type_script_setup_true_lang.js +366 -0
- package/dist/components/SqliteViewer.js +7 -0
- package/dist/components/SqliteViewer.vue.d.ts +18 -0
- package/dist/components/SqliteViewer.vue_vue_type_script_setup_true_lang.js +186 -0
- package/dist/components/SubtitleViewer.js +7 -0
- package/dist/components/SubtitleViewer.vue.d.ts +15 -0
- package/dist/components/SubtitleViewer.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/XlsxChart.js +7 -0
- package/dist/components/XlsxChart.vue.d.ts +14 -0
- package/dist/components/XlsxChart.vue_vue_type_script_setup_true_lang.js +240 -0
- package/dist/components/XlsxViewer.js +7 -0
- package/dist/components/XlsxViewer.vue.d.ts +22 -0
- package/dist/components/XlsxViewer.vue_vue_type_script_setup_true_lang.js +814 -0
- package/dist/components/XmindViewer.js +7 -0
- package/dist/components/XmindViewer.vue.d.ts +13 -0
- package/dist/components/XmindViewer.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/ZipBrowser.js +7 -0
- package/dist/components/ZipBrowser.vue.d.ts +14 -0
- package/dist/components/ZipBrowser.vue_vue_type_script_setup_true_lang.js +326 -0
- package/dist/components/ZoomImage.js +7 -0
- package/dist/components/ZoomImage.vue.d.ts +29 -0
- package/dist/components/ZoomImage.vue_vue_type_script_setup_true_lang.js +147 -0
- package/dist/components/epl/EplCodeBlock.js +7 -0
- package/dist/components/epl/EplCodeBlock.vue.d.ts +15 -0
- package/dist/components/epl/EplCodeBlock.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/components/epl/EplDoc.js +7 -0
- package/dist/components/epl/EplDoc.vue.d.ts +19 -0
- package/dist/components/epl/EplDoc.vue_vue_type_script_setup_true_lang.js +327 -0
- package/dist/components/epl/EplMethod.js +7 -0
- package/dist/components/epl/EplMethod.vue.d.ts +14 -0
- package/dist/components/epl/EplMethod.vue_vue_type_script_setup_true_lang.js +100 -0
- package/dist/components/epl/EplResource.js +7 -0
- package/dist/components/epl/EplResource.vue.d.ts +15 -0
- package/dist/components/epl/EplResource.vue_vue_type_script_setup_true_lang.js +204 -0
- package/dist/components/epl/EplTree.js +7 -0
- package/dist/components/epl/EplTree.vue.d.ts +27 -0
- package/dist/components/epl/EplTree.vue_vue_type_script_setup_true_lang.js +123 -0
- package/dist/components/epl/EplVarTable.js +7 -0
- package/dist/components/epl/EplVarTable.vue.d.ts +21 -0
- package/dist/components/epl/EplVarTable.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/epl/docTypes.d.ts +12 -0
- package/dist/components/epl/numbering.d.ts +21 -0
- package/dist/components/epl/numbering.js +14 -0
- package/dist/components/icons/Icon.js +7 -0
- package/dist/components/icons/Icon.vue.d.ts +14 -0
- package/dist/components/icons/Icon.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/components/icons/iconPaths.d.ts +60 -0
- package/dist/components/icons/iconPaths.js +54 -0
- package/dist/components/optionalViewer.d.ts +14 -0
- package/dist/components/optionalViewer.js +37 -0
- package/dist/components/ui/ClampBlock.d.ts +82 -0
- package/dist/components/ui/ClampBlock.js +63 -0
- package/dist/composables/useFileViewer.d.ts +428 -0
- package/dist/composables/useFileViewer.js +27 -0
- package/dist/composables/useLightbox.d.ts +33 -0
- package/dist/composables/useLightbox.js +17 -0
- package/dist/composables/useLogRules.d.ts +47 -0
- package/dist/composables/useLogRules.js +74 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +30 -0
- package/dist/lib/aes.d.ts +25 -0
- package/dist/lib/aes.js +99 -0
- package/dist/lib/appx.d.ts +66 -0
- package/dist/lib/appx.js +112 -0
- package/dist/lib/archive.d.ts +29 -0
- package/dist/lib/asn1.d.ts +47 -0
- package/dist/lib/asn1.js +122 -0
- package/dist/lib/binobj.d.ts +69 -0
- package/dist/lib/binobj.js +430 -0
- package/dist/lib/brotli.d.ts +14 -0
- package/dist/lib/brotli.js +16 -0
- package/dist/lib/bzip2.d.ts +14 -0
- package/dist/lib/bzip2.js +161 -0
- package/dist/lib/classfile.d.ts +72 -0
- package/dist/lib/classfile.js +210 -0
- package/dist/lib/codePreview.d.ts +22 -0
- package/dist/lib/codePreview.js +27 -0
- package/dist/lib/codefold.d.ts +14 -0
- package/dist/lib/codefold.js +30 -0
- package/dist/lib/codeformat.d.ts +21 -0
- package/dist/lib/codeformat.js +130 -0
- package/dist/lib/csv.d.ts +19 -0
- package/dist/lib/csv.js +74 -0
- package/dist/lib/des.d.ts +17 -0
- package/dist/lib/des.js +928 -0
- package/dist/lib/diagram.d.ts +5 -0
- package/dist/lib/diagram.js +479 -0
- package/dist/lib/dicom.d.ts +69 -0
- package/dist/lib/dicom.js +442 -0
- package/dist/lib/dicomCodecs.d.ts +28 -0
- package/dist/lib/dicomCodecs.js +156 -0
- package/dist/lib/dicomRender.d.ts +46 -0
- package/dist/lib/dicomRender.js +114 -0
- package/dist/lib/dxf.d.ts +86 -0
- package/dist/lib/dxf.js +399 -0
- package/dist/lib/eml.d.ts +40 -0
- package/dist/lib/eml.js +46 -0
- package/dist/lib/encoding.d.ts +28 -0
- package/dist/lib/encoding.js +44 -0
- package/dist/lib/epl/code/ast.d.ts +150 -0
- package/dist/lib/epl/code/codeDataParser.d.ts +3 -0
- package/dist/lib/epl/code/codeDataParser.js +330 -0
- package/dist/lib/epl/code/codeLines.d.ts +20 -0
- package/dist/lib/epl/code/codeLines.js +191 -0
- package/dist/lib/epl/code/structures.d.ts +86 -0
- package/dist/lib/epl/code/textCode.d.ts +29 -0
- package/dist/lib/epl/code/textCode.js +150 -0
- package/dist/lib/epl/code/variable.d.ts +25 -0
- package/dist/lib/epl/eplDocument.d.ts +21 -0
- package/dist/lib/epl/eplDocument.js +36 -0
- package/dist/lib/epl/imageList.d.ts +28 -0
- package/dist/lib/epl/imageList.js +66 -0
- package/dist/lib/epl/index.d.ts +53 -0
- package/dist/lib/epl/index.js +45 -0
- package/dist/lib/epl/io/binaryReader.d.ts +56 -0
- package/dist/lib/epl/io/binaryReader.js +119 -0
- package/dist/lib/epl/io/encoding.d.ts +16 -0
- package/dist/lib/epl/io/encoding.js +27 -0
- package/dist/lib/epl/model/eplSystemId.d.ts +64 -0
- package/dist/lib/epl/model/eplSystemId.js +16 -0
- package/dist/lib/epl/model/section.d.ts +46 -0
- package/dist/lib/epl/names/eplLibData.js +39 -0
- package/dist/lib/epl/names/idToNameMap.d.ts +33 -0
- package/dist/lib/epl/names/idToNameMap.js +130 -0
- package/dist/lib/epl/names/libNameProvider.d.ts +15 -0
- package/dist/lib/epl/names/libNameProvider.js +18 -0
- package/dist/lib/epl/program.d.ts +120 -0
- package/dist/lib/epl/program.js +134 -0
- package/dist/lib/epl/projectFileReader.d.ts +23 -0
- package/dist/lib/epl/projectFileReader.js +65 -0
- package/dist/lib/epl/sections/code.d.ts +20 -0
- package/dist/lib/epl/sections/esystemInfo.d.ts +14 -0
- package/dist/lib/epl/sections/losable.d.ts +11 -0
- package/dist/lib/epl/sections/projectConfig.d.ts +23 -0
- package/dist/lib/epl/sections/resource.d.ts +57 -0
- package/dist/lib/fb2.d.ts +14 -0
- package/dist/lib/fb2.js +62 -0
- package/dist/lib/fileType.d.ts +315 -0
- package/dist/lib/fileType.js +800 -0
- package/dist/lib/fonts.d.ts +8 -0
- package/dist/lib/fonts.js +4 -0
- package/dist/lib/format.d.ts +16 -0
- package/dist/lib/format.js +38 -0
- package/dist/lib/frontmatter.d.ts +13 -0
- package/dist/lib/frontmatter.js +23 -0
- package/dist/lib/geo.d.ts +30 -0
- package/dist/lib/geo.js +235 -0
- package/dist/lib/har.d.ts +171 -0
- package/dist/lib/har.js +397 -0
- package/dist/lib/highlight.d.ts +18 -0
- package/dist/lib/highlight.js +34 -0
- package/dist/lib/highlightLangs.d.ts +15 -0
- package/dist/lib/highlightLangs.js +93 -0
- package/dist/lib/hprof.d.ts +211 -0
- package/dist/lib/hprof.js +709 -0
- package/dist/lib/ipynb.d.ts +48 -0
- package/dist/lib/ipynb.js +130 -0
- package/dist/lib/jks.d.ts +86 -0
- package/dist/lib/jks.js +167 -0
- package/dist/lib/jsonl.d.ts +29 -0
- package/dist/lib/jsonl.js +24 -0
- package/dist/lib/lrc.d.ts +32 -0
- package/dist/lib/lrc.js +84 -0
- package/dist/lib/lzma.d.ts +70 -0
- package/dist/lib/lzma.js +204 -0
- package/dist/lib/markdown/blocks.d.ts +9 -0
- package/dist/lib/markdown/blocks.js +221 -0
- package/dist/lib/markdown/index.d.ts +3 -0
- package/dist/lib/markdown/inline.d.ts +33 -0
- package/dist/lib/markdown/inline.js +84 -0
- package/dist/lib/markdown/math.d.ts +5 -0
- package/dist/lib/markdown/math.js +25 -0
- package/dist/lib/markdown/segmentize.d.ts +11 -0
- package/dist/lib/markdown/segmentize.js +28 -0
- package/dist/lib/markdown/styles.d.ts +26 -0
- package/dist/lib/markdown/styles.js +135 -0
- package/dist/lib/mht.d.ts +51 -0
- package/dist/lib/mht.js +122 -0
- package/dist/lib/midi.d.ts +28 -0
- package/dist/lib/midi.js +84 -0
- package/dist/lib/mime.d.ts +82 -0
- package/dist/lib/mime.js +151 -0
- package/dist/lib/mindmap.d.ts +51 -0
- package/dist/lib/mindmap.js +113 -0
- package/dist/lib/mobi.d.ts +15 -0
- package/dist/lib/mobi.js +68 -0
- package/dist/lib/msi.d.ts +50 -0
- package/dist/lib/msi.js +332 -0
- package/dist/lib/optionalDep.d.ts +26 -0
- package/dist/lib/optionalDep.js +20 -0
- package/dist/lib/pkcs12.d.ts +56 -0
- package/dist/lib/pkcs12.js +356 -0
- package/dist/lib/qmc.d.ts +50 -0
- package/dist/lib/qmc.js +213 -0
- package/dist/lib/rar.d.ts +16 -0
- package/dist/lib/rar.js +40 -0
- package/dist/lib/rawPreview.d.ts +12 -0
- package/dist/lib/rawPreview.js +54 -0
- package/dist/lib/rc2.d.ts +12 -0
- package/dist/lib/rc2.js +298 -0
- package/dist/lib/resolveInput.d.ts +22 -0
- package/dist/lib/resolveInput.js +55 -0
- package/dist/lib/rtf.d.ts +53 -0
- package/dist/lib/rtf.js +413 -0
- package/dist/lib/sevenZip.d.ts +82 -0
- package/dist/lib/sevenZip.js +395 -0
- package/dist/lib/sha1.d.ts +24 -0
- package/dist/lib/sha1.js +53 -0
- package/dist/lib/sha256.d.ts +21 -0
- package/dist/lib/sha256.js +119 -0
- package/dist/lib/speechAudio.d.ts +36 -0
- package/dist/lib/speechAudio.js +85 -0
- package/dist/lib/sqlite.d.ts +38 -0
- package/dist/lib/sqlite.js +104 -0
- package/dist/lib/subtitle.d.ts +26 -0
- package/dist/lib/subtitle.js +99 -0
- package/dist/lib/tarball.d.ts +20 -0
- package/dist/lib/tarball.js +248 -0
- package/dist/lib/viewerFormats.d.ts +35 -0
- package/dist/lib/viewerFormats.js +83 -0
- package/dist/lib/viewerKind.d.ts +36 -0
- package/dist/lib/viewerKind.js +233 -0
- package/dist/lib/x509.d.ts +68 -0
- package/dist/lib/x509.js +267 -0
- package/dist/lib/xlsx.d.ts +55 -0
- package/dist/lib/xlsx.js +321 -0
- package/dist/lib/xlsxCharts.d.ts +34 -0
- package/dist/lib/xlsxCharts.js +152 -0
- package/dist/lib/xmind.d.ts +6 -0
- package/dist/lib/xmind.js +124 -0
- package/dist/lib/zip.d.ts +56 -0
- package/dist/lib/zip.js +169 -0
- package/dist/style.css +2 -0
- package/dist/types.d.ts +42 -0
- package/package.json +128 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./CertViewer.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/CertViewer.vue
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-adece100"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Side-viewer for certificates / keys (pem / crt / cer / der / csr / key / p12 / pfx). Fetches the BYTES
|
|
3
|
+
* itself (binary-safe — a .der/.p12 would be mangled by the panel's text load), sniffs PEM vs raw DER, and
|
|
4
|
+
* for each block shows the human-meaningful X.509 fields (subject / issuer, validity with an expiry badge,
|
|
5
|
+
* serial, signature + public-key algorithm, SANs, key usages, SHA-256 fingerprint) plus a collapsible raw
|
|
6
|
+
* ASN.1 structure tree. Parsing is hand-rolled and READ-ONLY (lib/asn1.ts + lib/x509.ts) — it never verifies
|
|
7
|
+
* signatures or trust. PKCS#12 (.p12/.pfx) containers are usually encrypted, so they're shown as structure
|
|
8
|
+
* only with a "use openssl to extract" note (best effort).
|
|
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;
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { fileExt as e } from "../lib/fileType.js";
|
|
2
|
+
import { formatBytes as t } from "../lib/format.js";
|
|
3
|
+
import n from "./icons/Icon.js";
|
|
4
|
+
import { TAG as r, asn1String as i, asn1Time as a, bytesToHex as o, decodeAsn1 as s, oidToString as ee, tagName as te } from "../lib/asn1.js";
|
|
5
|
+
import { looksLikePem as ne, oidName as re, parseCertificate as ie, parseCsr as ae, parsePemBlocks as oe, sha256Hex as se, summarizeBlock as c } from "../lib/x509.js";
|
|
6
|
+
import { Fragment as l, computed as ce, createBlock as le, createCommentVNode as u, createElementBlock as d, createElementVNode as f, defineComponent as p, normalizeClass as m, normalizeStyle as h, onBeforeUnmount as g, openBlock as _, reactive as v, ref as y, renderList as b, toDisplayString as x, unref as S, watch as ue } from "vue";
|
|
7
|
+
//#region src/components/CertViewer.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var C = { class: "cert" }, w = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "cert__msg"
|
|
11
|
+
}, T = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "cert__msg cert__gate"
|
|
14
|
+
}, E = {
|
|
15
|
+
key: 2,
|
|
16
|
+
class: "cert__msg cert__msg--error"
|
|
17
|
+
}, D = {
|
|
18
|
+
key: 3,
|
|
19
|
+
class: "cert__scroll"
|
|
20
|
+
}, O = { class: "cert__cardhead" }, k = { class: "cert__kind" }, A = { class: "cert__label" }, j = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "cert__note"
|
|
23
|
+
}, M = {
|
|
24
|
+
key: 1,
|
|
25
|
+
class: "cert__dl"
|
|
26
|
+
}, N = { class: "cert__mono" }, P = { class: "cert__mono cert__fp" }, F = { class: "cert__tree" }, I = { class: "cert__rows" }, L = ["onClick"], R = { class: "cert__twisty" }, z = { class: "cert__tag" }, B = {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: "cert__val"
|
|
29
|
+
}, V = 8 * 1024 * 1024, H = /*@__PURE__*/ p({
|
|
30
|
+
__name: "CertViewer",
|
|
31
|
+
props: {
|
|
32
|
+
url: {},
|
|
33
|
+
name: {},
|
|
34
|
+
size: {}
|
|
35
|
+
},
|
|
36
|
+
setup(p) {
|
|
37
|
+
let H = p, U = y("loading"), W = y(""), G = y([]), K = v({}), q = v(/* @__PURE__ */ new Set());
|
|
38
|
+
function J(e) {
|
|
39
|
+
return {
|
|
40
|
+
summary: e,
|
|
41
|
+
forest: s(e.der)
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function de(t) {
|
|
45
|
+
let n = new Uint8Array(t), r = e(H.name), i = new TextDecoder("latin1").decode(n.subarray(0, Math.min(64, n.length))), a = [];
|
|
46
|
+
if (i.includes("-----BEGIN") || ne(new TextDecoder("latin1").decode(n))) {
|
|
47
|
+
let e = new TextDecoder("utf-8").decode(n);
|
|
48
|
+
for (let t of oe(e)) a.push(J(c(t.label, t.der)));
|
|
49
|
+
}
|
|
50
|
+
if (!a.length) if (r === "p12" || r === "pfx") {
|
|
51
|
+
let e = fe(n);
|
|
52
|
+
a.push(J(e));
|
|
53
|
+
} else if (r === "csr" || r === "req") a.push(J(ae(n)));
|
|
54
|
+
else {
|
|
55
|
+
let e = ie(n);
|
|
56
|
+
a.push(J(e.ok ? e : pe(n, r)));
|
|
57
|
+
}
|
|
58
|
+
G.value = a, U.value = "ready", a.forEach((e, t) => {
|
|
59
|
+
e.summary.kind === "certificate" && e.summary.ok && se(e.summary.der).then((e) => {
|
|
60
|
+
K[t] = e;
|
|
61
|
+
}).catch(() => {});
|
|
62
|
+
}), a.length && a[0].forest.length && q.add("0.0");
|
|
63
|
+
}
|
|
64
|
+
function fe(e) {
|
|
65
|
+
return {
|
|
66
|
+
ok: !0,
|
|
67
|
+
kind: "pkcs12",
|
|
68
|
+
label: "PKCS#12",
|
|
69
|
+
subject: [],
|
|
70
|
+
issuer: [],
|
|
71
|
+
sans: [],
|
|
72
|
+
keyUsages: [],
|
|
73
|
+
extKeyUsages: [],
|
|
74
|
+
der: e,
|
|
75
|
+
note: "PKCS#12 容器通常已加密,浏览器内仅展示 ASN.1 结构;如需提取证书/私钥请用 openssl pkcs12 -info。"
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
function pe(e, t) {
|
|
79
|
+
return {
|
|
80
|
+
ok: !0,
|
|
81
|
+
kind: "unknown",
|
|
82
|
+
label: t ? `.${t}` : "二进制",
|
|
83
|
+
subject: [],
|
|
84
|
+
issuer: [],
|
|
85
|
+
sans: [],
|
|
86
|
+
keyUsages: [],
|
|
87
|
+
extKeyUsages: [],
|
|
88
|
+
der: e,
|
|
89
|
+
note: "无法识别为 X.509 证书 —— 展开下方结构树查看原始 ASN.1。"
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
async function Y() {
|
|
93
|
+
if (H.url) {
|
|
94
|
+
U.value = "loading", W.value = "", G.value = [], q.clear();
|
|
95
|
+
for (let e of Object.keys(K)) delete K[Number(e)];
|
|
96
|
+
try {
|
|
97
|
+
let e = await fetch(H.url);
|
|
98
|
+
if (!e.ok) throw Error(`HTTP ${e.status}`);
|
|
99
|
+
de(await e.arrayBuffer());
|
|
100
|
+
} catch (e) {
|
|
101
|
+
W.value = e instanceof Error ? e.message : String(e), U.value = "error";
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function me() {
|
|
106
|
+
if (H.size && H.size > V) {
|
|
107
|
+
U.value = "gate";
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
Y();
|
|
111
|
+
}
|
|
112
|
+
function X(e) {
|
|
113
|
+
return e.map((e) => `${e.name}=${e.value}`).join(", ");
|
|
114
|
+
}
|
|
115
|
+
let he = {
|
|
116
|
+
certificate: "证书",
|
|
117
|
+
request: "证书请求 (CSR)",
|
|
118
|
+
key: "密钥",
|
|
119
|
+
crl: "CRL",
|
|
120
|
+
pkcs12: "PKCS#12",
|
|
121
|
+
pkcs7: "PKCS#7",
|
|
122
|
+
unknown: "未知"
|
|
123
|
+
};
|
|
124
|
+
function Z(e) {
|
|
125
|
+
let t = [];
|
|
126
|
+
return e.pubKeyAlg && t.push(e.pubKeyAlg), e.pubKeyBits && t.push(`${e.pubKeyBits} 位`), e.pubKeyCurve && e.pubKeyCurve !== e.pubKeyAlg && t.push(e.pubKeyCurve), t.join(" · ");
|
|
127
|
+
}
|
|
128
|
+
function Q(e) {
|
|
129
|
+
if (e.notAfterMs == null) return null;
|
|
130
|
+
let t = Date.now();
|
|
131
|
+
if (e.notBeforeMs != null && t < e.notBeforeMs) return {
|
|
132
|
+
text: "尚未生效",
|
|
133
|
+
cls: "cert__badge--warn"
|
|
134
|
+
};
|
|
135
|
+
if (t > e.notAfterMs) return {
|
|
136
|
+
text: "已过期",
|
|
137
|
+
cls: "cert__badge--bad"
|
|
138
|
+
};
|
|
139
|
+
let n = Math.floor((e.notAfterMs - t) / 864e5);
|
|
140
|
+
return n <= 30 ? {
|
|
141
|
+
text: `${n} 天后过期`,
|
|
142
|
+
cls: "cert__badge--warn"
|
|
143
|
+
} : {
|
|
144
|
+
text: `有效(剩 ${n} 天)`,
|
|
145
|
+
cls: "cert__badge--ok"
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
function ge(e, t) {
|
|
149
|
+
let n = [], r = (e, t, i) => {
|
|
150
|
+
e.forEach((e, a) => {
|
|
151
|
+
let o = `${i}.${a}`, s = e.children.length > 0;
|
|
152
|
+
n.push({
|
|
153
|
+
node: e,
|
|
154
|
+
depth: t,
|
|
155
|
+
path: o,
|
|
156
|
+
hasChildren: s
|
|
157
|
+
}), s && q.has(o) && r(e.children, t + 1, o);
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
return r(e, 0, t), n;
|
|
161
|
+
}
|
|
162
|
+
let _e = ce(() => G.value.map((e, t) => ge(e.forest, String(t))));
|
|
163
|
+
function ve(e) {
|
|
164
|
+
q.has(e) ? q.delete(e) : q.add(e);
|
|
165
|
+
}
|
|
166
|
+
function $(e) {
|
|
167
|
+
if (e.constructed) return "";
|
|
168
|
+
switch (e.tagNumber) {
|
|
169
|
+
case r.OID: {
|
|
170
|
+
let t = ee(e.content), n = re(t);
|
|
171
|
+
return n === t ? t : `${n} (${t})`;
|
|
172
|
+
}
|
|
173
|
+
case r.BOOLEAN: return e.content[0] ? "true" : "false";
|
|
174
|
+
case r.INTEGER:
|
|
175
|
+
if (e.content.length <= 4) {
|
|
176
|
+
let t = 0;
|
|
177
|
+
for (let n of e.content) t = t * 256 + n;
|
|
178
|
+
return String(t);
|
|
179
|
+
}
|
|
180
|
+
return `0x${o(e.content).slice(0, 32)}${e.content.length > 16 ? "…" : ""}`;
|
|
181
|
+
case r.UTF8String:
|
|
182
|
+
case r.PrintableString:
|
|
183
|
+
case r.IA5String: return i(e);
|
|
184
|
+
case r.UTCTime:
|
|
185
|
+
case r.GeneralizedTime: return a(e)?.text ?? i(e);
|
|
186
|
+
case r.NULL: return "";
|
|
187
|
+
default: {
|
|
188
|
+
if (e.tagClass === 2) {
|
|
189
|
+
let t = new TextDecoder("latin1").decode(e.content);
|
|
190
|
+
if (/^[\x20-\x7e]*$/.test(t)) return t;
|
|
191
|
+
}
|
|
192
|
+
let t = o(e.content);
|
|
193
|
+
return t.length > 32 ? `${t.slice(0, 32)}… (${e.length}B)` : t;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
return ue(() => [H.url, H.name], me, { immediate: !0 }), g(() => {}), (e, r) => (_(), d("div", C, [U.value === "loading" ? (_(), d("p", w, "正在解析证书…")) : U.value === "gate" ? (_(), d("div", T, [f("p", null, "该文件较大(" + x(S(t)(H.size)) + "),将在浏览器内解析。是否继续?", 1), f("button", {
|
|
198
|
+
type: "button",
|
|
199
|
+
class: "cert__btn",
|
|
200
|
+
onClick: Y
|
|
201
|
+
}, "解析并预览")])) : U.value === "error" ? (_(), d("div", E, [f("p", null, "无法解析:" + x(W.value), 1), f("button", {
|
|
202
|
+
type: "button",
|
|
203
|
+
class: "cert__btn",
|
|
204
|
+
onClick: Y
|
|
205
|
+
}, "重试")])) : (_(), d("div", D, [(_(!0), d(l, null, b(G.value, (e, t) => (_(), d("section", {
|
|
206
|
+
key: t,
|
|
207
|
+
class: "cert__card"
|
|
208
|
+
}, [
|
|
209
|
+
f("header", O, [
|
|
210
|
+
f("span", k, x(he[e.summary.kind]), 1),
|
|
211
|
+
f("span", A, x(e.summary.subjectCN || e.summary.label), 1),
|
|
212
|
+
Q(e.summary) ? (_(), d("span", {
|
|
213
|
+
key: 0,
|
|
214
|
+
class: m(["cert__badge", Q(e.summary)?.cls])
|
|
215
|
+
}, x(Q(e.summary)?.text), 3)) : u("", !0)
|
|
216
|
+
]),
|
|
217
|
+
e.summary.note ? (_(), d("p", j, x(e.summary.note), 1)) : u("", !0),
|
|
218
|
+
e.summary.subject.length || e.summary.kind === "certificate" ? (_(), d("dl", M, [
|
|
219
|
+
e.summary.subject.length ? (_(), d(l, { key: 0 }, [r[0] ||= f("dt", null, "主题", -1), f("dd", null, x(X(e.summary.subject)), 1)], 64)) : u("", !0),
|
|
220
|
+
e.summary.issuer.length ? (_(), d(l, { key: 1 }, [r[1] ||= f("dt", null, "颁发者", -1), f("dd", null, x(X(e.summary.issuer)), 1)], 64)) : u("", !0),
|
|
221
|
+
e.summary.notBefore || e.summary.notAfter ? (_(), d(l, { key: 2 }, [r[2] ||= f("dt", null, "有效期", -1), f("dd", null, x(e.summary.notBefore ?? "?") + " → " + x(e.summary.notAfter ?? "?"), 1)], 64)) : u("", !0),
|
|
222
|
+
Z(e.summary) ? (_(), d(l, { key: 3 }, [r[3] ||= f("dt", null, "公钥", -1), f("dd", null, x(Z(e.summary)), 1)], 64)) : u("", !0),
|
|
223
|
+
e.summary.sigAlg ? (_(), d(l, { key: 4 }, [r[4] ||= f("dt", null, "签名算法", -1), f("dd", null, x(e.summary.sigAlg), 1)], 64)) : u("", !0),
|
|
224
|
+
e.summary.serialHex ? (_(), d(l, { key: 5 }, [r[5] ||= f("dt", null, "序列号", -1), f("dd", N, x(e.summary.serialHex), 1)], 64)) : u("", !0),
|
|
225
|
+
e.summary.sans.length ? (_(), d(l, { key: 6 }, [r[6] ||= f("dt", null, "备用名 (SAN)", -1), f("dd", null, x(e.summary.sans.join(",")), 1)], 64)) : u("", !0),
|
|
226
|
+
e.summary.keyUsages.length ? (_(), d(l, { key: 7 }, [r[7] ||= f("dt", null, "密钥用法", -1), f("dd", null, x(e.summary.keyUsages.join(",")), 1)], 64)) : u("", !0),
|
|
227
|
+
e.summary.extKeyUsages.length ? (_(), d(l, { key: 8 }, [r[8] ||= f("dt", null, "扩展用法", -1), f("dd", null, x(e.summary.extKeyUsages.join(",")), 1)], 64)) : u("", !0),
|
|
228
|
+
e.summary.isCa == null ? u("", !0) : (_(), d(l, { key: 9 }, [r[9] ||= f("dt", null, "CA", -1), f("dd", null, x(e.summary.isCa ? "是" : "否") + x(e.summary.pathLen == null ? "" : `(pathLen ${e.summary.pathLen})`), 1)], 64)),
|
|
229
|
+
K[t] ? (_(), d(l, { key: 10 }, [r[10] ||= f("dt", null, "SHA-256", -1), f("dd", P, x(K[t]), 1)], 64)) : u("", !0)
|
|
230
|
+
])) : u("", !0),
|
|
231
|
+
f("details", F, [r[11] ||= f("summary", { class: "cert__treehead" }, "ASN.1 结构", -1), f("div", I, [(_(!0), d(l, null, b(_e.value[t], (e) => (_(), d("button", {
|
|
232
|
+
key: e.path,
|
|
233
|
+
type: "button",
|
|
234
|
+
class: "cert__row",
|
|
235
|
+
style: h({ paddingLeft: `${8 + e.depth * 16}px` }),
|
|
236
|
+
onClick: (t) => e.hasChildren && ve(e.path)
|
|
237
|
+
}, [
|
|
238
|
+
f("span", R, [e.hasChildren ? (_(), le(n, {
|
|
239
|
+
key: 0,
|
|
240
|
+
name: "chevronRight",
|
|
241
|
+
size: 12,
|
|
242
|
+
class: m({ "cert__twisty--open": q.has(e.path) })
|
|
243
|
+
}, null, 8, ["class"])) : u("", !0)]),
|
|
244
|
+
f("span", z, x(S(te)(e.node)), 1),
|
|
245
|
+
$(e.node) ? (_(), d("span", B, x($(e.node)), 1)) : u("", !0)
|
|
246
|
+
], 12, L))), 128))])])
|
|
247
|
+
]))), 128))]))]));
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
//#endregion
|
|
251
|
+
export { H as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./ClassViewer.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/ClassViewer.vue
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-31d96cf6"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The side viewer's Java `.class` mode: fetch the bytes, parse the structure entirely in-browser (see
|
|
3
|
+
* lib/classfile.ts), and list the FIELDS and METHODS — a lightweight `javap`. Mirrors BinObjBrowser: the
|
|
4
|
+
* bytes come from the same download endpoint as any other file and never leave the browser. No decompilation
|
|
5
|
+
* (method bodies aren't reconstructed); a method's local variables expand inline when the class carried a
|
|
6
|
+
* LocalVariableTable (`javac -g`).
|
|
7
|
+
*/
|
|
8
|
+
type __VLS_Props = {
|
|
9
|
+
url: string;
|
|
10
|
+
name: string;
|
|
11
|
+
size?: number;
|
|
12
|
+
};
|
|
13
|
+
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>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import e from "./icons/Icon.js";
|
|
2
|
+
import { NotClassFileError as t, parseClass as n } from "../lib/classfile.js";
|
|
3
|
+
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, onBeforeUnmount as ee, onMounted as f, openBlock as p, ref as m, renderList as h, resolveDynamicComponent as te, toDisplayString as g, watch as ne, withCtx as re } from "vue";
|
|
4
|
+
//#region src/components/ClassViewer.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var ie = { class: "cls" }, _ = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "cls__msg"
|
|
8
|
+
}, v = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "cls__msg cls__msg--error"
|
|
11
|
+
}, y = { class: "cls__summary" }, b = { class: "cls__kind" }, x = { class: "cls__ver" }, S = { class: "cls__sig" }, C = { class: "cls__sigline" }, w = { class: "cls__mod" }, T = ["title"], E = { class: "cls__kw" }, D = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "cls__punc"
|
|
14
|
+
}, O = ["title"], k = { class: "cls__section" }, A = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "cls__empty"
|
|
17
|
+
}, j = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "cls__rows"
|
|
20
|
+
}, M = {
|
|
21
|
+
key: 0,
|
|
22
|
+
class: "cls__mods"
|
|
23
|
+
}, N = ["title"], P = { class: "cls__name" }, F = { class: "cls__section" }, I = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "cls__empty"
|
|
26
|
+
}, ae = {
|
|
27
|
+
key: 1,
|
|
28
|
+
class: "cls__rows"
|
|
29
|
+
}, L = {
|
|
30
|
+
key: 1,
|
|
31
|
+
class: "cls__mods"
|
|
32
|
+
}, R = ["title"], z = { class: "cls__params" }, B = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "cls__punc"
|
|
35
|
+
}, V = ["title"], H = {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: "cls__locals"
|
|
38
|
+
}, U = ["title"], W = { class: "cls__localname" }, G = { class: "cls__foot" }, K = /*@__PURE__*/ u({
|
|
39
|
+
__name: "ClassViewer",
|
|
40
|
+
props: {
|
|
41
|
+
url: {},
|
|
42
|
+
name: {},
|
|
43
|
+
size: {}
|
|
44
|
+
},
|
|
45
|
+
setup(u) {
|
|
46
|
+
let K = u, q = m("loading"), J = m(""), Y = m(null), X = m(/* @__PURE__ */ new Set());
|
|
47
|
+
async function Z() {
|
|
48
|
+
q.value = "loading", J.value = "", Y.value = null, X.value = /* @__PURE__ */ new Set();
|
|
49
|
+
try {
|
|
50
|
+
let e = await fetch(K.url);
|
|
51
|
+
if (!e.ok) throw Error(`HTTP ${e.status}`);
|
|
52
|
+
Y.value = n(await e.arrayBuffer()), q.value = "ready";
|
|
53
|
+
} catch (e) {
|
|
54
|
+
J.value = e instanceof t || e instanceof Error ? e.message : String(e), q.value = "error";
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function Q(e) {
|
|
58
|
+
if (!e) return "";
|
|
59
|
+
let t = e.replace(/\[\]$/g, "").lastIndexOf(".");
|
|
60
|
+
return t >= 0 ? e.slice(t + 1) : e;
|
|
61
|
+
}
|
|
62
|
+
function oe(e) {
|
|
63
|
+
return e.name === "<init>" ? "«构造器»" : e.name === "<clinit>" ? "«静态初始化»" : e.name;
|
|
64
|
+
}
|
|
65
|
+
function $(e) {
|
|
66
|
+
return (e.locals ?? []).filter((e) => e.name !== "this");
|
|
67
|
+
}
|
|
68
|
+
function se(e) {
|
|
69
|
+
let t = new Set(X.value);
|
|
70
|
+
t.has(e) ? t.delete(e) : t.add(e), X.value = t;
|
|
71
|
+
}
|
|
72
|
+
let ce = i(() => {
|
|
73
|
+
let e = Y.value;
|
|
74
|
+
return e ? [
|
|
75
|
+
...e.modifiers,
|
|
76
|
+
e.kind,
|
|
77
|
+
e.thisClass ?? "?"
|
|
78
|
+
].join(" ") : "";
|
|
79
|
+
});
|
|
80
|
+
return f(Z), ne(() => K.url, Z), ee(() => X.value.clear()), (t, n) => (p(), s("div", ie, [q.value === "loading" ? (p(), s("p", _, "正在解析 .class…")) : q.value === "error" ? (p(), s("div", v, [c("p", null, g(J.value), 1), c("button", {
|
|
81
|
+
type: "button",
|
|
82
|
+
class: "cls__retry",
|
|
83
|
+
onClick: Z
|
|
84
|
+
}, "重试")])) : q.value === "ready" && Y.value ? (p(), s(r, { key: 2 }, [
|
|
85
|
+
c("div", y, [
|
|
86
|
+
c("span", b, g(Y.value.kind.toUpperCase()), 1),
|
|
87
|
+
c("span", x, "字节码 v" + g(Y.value.version), 1),
|
|
88
|
+
c("span", null, g(Y.value.javaLabel), 1),
|
|
89
|
+
c("span", null, g(Y.value.fields.length) + " 字段", 1),
|
|
90
|
+
c("span", null, g(Y.value.methods.length) + " 方法", 1)
|
|
91
|
+
]),
|
|
92
|
+
c("div", S, [c("code", C, [
|
|
93
|
+
c("span", w, g(ce.value), 1),
|
|
94
|
+
Y.value.superClass && Y.value.superClass !== "java.lang.Object" ? (p(), s(r, { key: 0 }, [n[0] ||= c("span", { class: "cls__kw" }, " extends ", -1), c("span", {
|
|
95
|
+
class: "cls__type",
|
|
96
|
+
title: Y.value.superClass
|
|
97
|
+
}, g(Q(Y.value.superClass)), 9, T)], 64)) : o("", !0),
|
|
98
|
+
Y.value.interfaces.length ? (p(), s(r, { key: 1 }, [c("span", E, g(Y.value.kind === "interface" || Y.value.kind === "@interface" ? "extends" : "implements"), 1), (p(!0), s(r, null, h(Y.value.interfaces, (e, t) => (p(), s("span", { key: e }, [t > 0 ? (p(), s("span", D, ", ")) : o("", !0), c("span", {
|
|
99
|
+
class: "cls__type",
|
|
100
|
+
title: e
|
|
101
|
+
}, g(Q(e)), 9, O)]))), 128))], 64)) : o("", !0)
|
|
102
|
+
])]),
|
|
103
|
+
c("section", k, [n[1] ||= c("h3", { class: "cls__h" }, "字段 · FIELDS", -1), Y.value.fields.length ? (p(), s("div", j, [(p(!0), s(r, null, h(Y.value.fields, (e, t) => (p(), s("div", {
|
|
104
|
+
key: t,
|
|
105
|
+
class: "cls__member"
|
|
106
|
+
}, [
|
|
107
|
+
e.flags.length ? (p(), s("span", M, g(e.flags.join(" ")), 1)) : o("", !0),
|
|
108
|
+
c("span", {
|
|
109
|
+
class: "cls__type",
|
|
110
|
+
title: e.type
|
|
111
|
+
}, g(Q(e.type)), 9, N),
|
|
112
|
+
c("span", P, g(e.name), 1)
|
|
113
|
+
]))), 128))])) : (p(), s("p", A, "无字段"))]),
|
|
114
|
+
c("section", F, [n[5] ||= c("h3", { class: "cls__h" }, "方法 · METHODS", -1), Y.value.methods.length ? (p(), s("div", ae, [(p(!0), s(r, null, h(Y.value.methods, (e, t) => (p(), s("div", {
|
|
115
|
+
key: t,
|
|
116
|
+
class: "cls__methodwrap"
|
|
117
|
+
}, [(p(), a(te($(e).length ? "button" : "div"), {
|
|
118
|
+
type: $(e).length ? "button" : void 0,
|
|
119
|
+
class: d(["cls__member cls__method", { "cls__method--btn": $(e).length }]),
|
|
120
|
+
title: $(e).length ? "点击查看局部变量" : void 0,
|
|
121
|
+
onClick: (n) => $(e).length && se(t)
|
|
122
|
+
}, {
|
|
123
|
+
default: re(() => [
|
|
124
|
+
$(e).length ? (p(), s("span", {
|
|
125
|
+
key: 0,
|
|
126
|
+
class: d(["cls__caret", { "cls__caret--open": X.value.has(t) }])
|
|
127
|
+
}, "▶", 2)) : o("", !0),
|
|
128
|
+
e.flags.length ? (p(), s("span", L, g(e.flags.join(" ")), 1)) : o("", !0),
|
|
129
|
+
c("span", {
|
|
130
|
+
class: "cls__type",
|
|
131
|
+
title: e.ret
|
|
132
|
+
}, g(Q(e.ret)), 9, R),
|
|
133
|
+
c("span", { class: d(["cls__name", { "cls__name--special": e.name.startsWith("<") }]) }, g(oe(e)), 3),
|
|
134
|
+
c("span", z, [
|
|
135
|
+
n[2] ||= c("span", { class: "cls__punc" }, "(", -1),
|
|
136
|
+
(p(!0), s(r, null, h(e.params, (e, t) => (p(), s(r, { key: t }, [t > 0 ? (p(), s("span", B, ", ")) : o("", !0), c("span", {
|
|
137
|
+
class: "cls__type",
|
|
138
|
+
title: e
|
|
139
|
+
}, g(Q(e)), 9, V)], 64))), 128)),
|
|
140
|
+
n[3] ||= c("span", { class: "cls__punc" }, ")", -1)
|
|
141
|
+
])
|
|
142
|
+
]),
|
|
143
|
+
_: 2
|
|
144
|
+
}, 1032, [
|
|
145
|
+
"type",
|
|
146
|
+
"class",
|
|
147
|
+
"title",
|
|
148
|
+
"onClick"
|
|
149
|
+
])), X.value.has(t) ? (p(), s("div", H, [n[4] ||= c("span", { class: "cls__locals-label" }, "局部变量", -1), (p(!0), s(r, null, h($(e), (e, t) => (p(), s("div", {
|
|
150
|
+
key: t,
|
|
151
|
+
class: "cls__local"
|
|
152
|
+
}, [c("span", {
|
|
153
|
+
class: "cls__type",
|
|
154
|
+
title: e.type
|
|
155
|
+
}, g(Q(e.type)), 9, U), c("span", W, g(e.name), 1)]))), 128))])) : o("", !0)]))), 128))])) : (p(), s("p", I, "无方法"))]),
|
|
156
|
+
c("div", G, [l(e, {
|
|
157
|
+
name: "code",
|
|
158
|
+
size: 13
|
|
159
|
+
}), n[6] ||= c("span", null, "仅解析结构(字段 / 方法),不反编译方法体", -1)])
|
|
160
|
+
], 64)) : o("", !0)]));
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
//#endregion
|
|
164
|
+
export { K as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./CodeBlock.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/CodeBlock.vue
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-71d58741"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fenced code block: header (language label + copy button) over a highlighted <pre>.
|
|
3
|
+
* Without `maxHeight` a tall block clamps to a Show more / less toggle; pass
|
|
4
|
+
* `maxHeight` (e.g. timeline tool steps) to keep the legacy fixed-height scroll.
|
|
5
|
+
*/
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
code: string;
|
|
8
|
+
lang?: string;
|
|
9
|
+
maxHeight?: string;
|
|
10
|
+
margin?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
13
|
+
lang: string;
|
|
14
|
+
margin: string;
|
|
15
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { highlightCode as e } from "../lib/highlight.js";
|
|
2
|
+
import t from "./icons/Icon.js";
|
|
3
|
+
import { codePreview as n } from "../lib/codePreview.js";
|
|
4
|
+
import { useFileViewer as r } from "../composables/useFileViewer.js";
|
|
5
|
+
import i from "./ui/ClampBlock.js";
|
|
6
|
+
import { computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createVNode as u, defineComponent as d, normalizeStyle as f, onBeforeUnmount as p, openBlock as m, ref as h, toDisplayString as g, unref as _, withCtx as v } from "vue";
|
|
7
|
+
//#region src/components/CodeBlock.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var y = { class: "code-block__head" }, b = { class: "code-block__lang" }, x = { class: "code-block__actions" }, S = { class: "code-block__pre code-block__pre--clamped" }, C = ["innerHTML"], w = { key: 1 }, T = ["innerHTML"], E = { key: 1 }, D = /*@__PURE__*/ d({
|
|
9
|
+
__name: "CodeBlock",
|
|
10
|
+
props: {
|
|
11
|
+
code: {},
|
|
12
|
+
lang: { default: "" },
|
|
13
|
+
maxHeight: {},
|
|
14
|
+
margin: { default: "4px 0 20px" }
|
|
15
|
+
},
|
|
16
|
+
setup(d) {
|
|
17
|
+
let D = d, O = a(() => (D.lang || "").trim().toLowerCase()), k = a(() => e(D.code, O.value)), A = a(() => n(O.value)), { open: j } = r();
|
|
18
|
+
function M() {
|
|
19
|
+
let e = A.value;
|
|
20
|
+
e && j({
|
|
21
|
+
name: `代码片段.${e.ext}`,
|
|
22
|
+
content: String(D.code),
|
|
23
|
+
...e.fields
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
let N = a(() => D.maxHeight ? {
|
|
27
|
+
maxHeight: D.maxHeight,
|
|
28
|
+
overflowY: "auto"
|
|
29
|
+
} : {}), P = h(!1), F;
|
|
30
|
+
async function I() {
|
|
31
|
+
try {
|
|
32
|
+
await navigator.clipboard?.writeText(String(D.code));
|
|
33
|
+
} catch {}
|
|
34
|
+
P.value = !0, clearTimeout(F), F = setTimeout(() => P.value = !1, 1400);
|
|
35
|
+
}
|
|
36
|
+
return p(() => clearTimeout(F)), (e, n) => (m(), c("div", {
|
|
37
|
+
class: "code-block",
|
|
38
|
+
style: f({ margin: d.margin })
|
|
39
|
+
}, [l("div", y, [l("span", b, g(O.value || "text"), 1), l("div", x, [A.value ? (m(), c("button", {
|
|
40
|
+
key: 0,
|
|
41
|
+
class: "code-block__btn",
|
|
42
|
+
type: "button",
|
|
43
|
+
title: "在侧栏预览运行",
|
|
44
|
+
onClick: M
|
|
45
|
+
}, [u(t, {
|
|
46
|
+
name: "play",
|
|
47
|
+
size: 13
|
|
48
|
+
}), n[0] ||= l("span", null, "Run", -1)])) : s("", !0), l("button", {
|
|
49
|
+
class: "code-block__btn",
|
|
50
|
+
type: "button",
|
|
51
|
+
onClick: I
|
|
52
|
+
}, [u(t, {
|
|
53
|
+
name: "copy",
|
|
54
|
+
size: 13
|
|
55
|
+
}), l("span", null, g(P.value ? "Copied" : "Copy"), 1)])])]), d.maxHeight ? (m(), c("pre", {
|
|
56
|
+
key: 1,
|
|
57
|
+
class: "code-block__pre",
|
|
58
|
+
style: f(N.value)
|
|
59
|
+
}, [k.value ? (m(), c("code", {
|
|
60
|
+
key: 0,
|
|
61
|
+
class: "hljs",
|
|
62
|
+
innerHTML: k.value
|
|
63
|
+
}, null, 8, T)) : (m(), c("code", E, g(d.code), 1))], 4)) : (m(), o(_(i), {
|
|
64
|
+
key: 0,
|
|
65
|
+
"max-height": 340,
|
|
66
|
+
fade: "var(--code-bg)",
|
|
67
|
+
inset: 16
|
|
68
|
+
}, {
|
|
69
|
+
default: v(() => [l("pre", S, [k.value ? (m(), c("code", {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: "hljs",
|
|
72
|
+
innerHTML: k.value
|
|
73
|
+
}, null, 8, C)) : (m(), c("code", w, g(d.code), 1))])]),
|
|
74
|
+
_: 1
|
|
75
|
+
}))], 4));
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
//#endregion
|
|
79
|
+
export { D as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./CodeView.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/CodeView.vue
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-f432e526"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The side viewer's source-code view: a line-number gutter + syntax-highlighted code, with indentation-based
|
|
3
|
+
* code FOLDING (click a chevron to collapse a block; see lib/codefold.ts), on-demand Prettier FORMATTING (the
|
|
4
|
+
* 格式化 button, shown only for languages Prettier can parse — see lib/codeformat.ts; loaded lazily), and a
|
|
5
|
+
* manual HIGHLIGHT-LANGUAGE picker (the 语言 button — auto-detection by extension/mime is often empty or wrong,
|
|
6
|
+
* so any file can be re-colorized as JSON / XML / Python / … or forced to plain text; see lib/highlightLangs).
|
|
7
|
+
* Used for every non-rendered file (plain text, code, or markdown/html/svg viewed as source). Highlighting is
|
|
8
|
+
* split per line (see highlightLines) so rows can be hidden individually.
|
|
9
|
+
*
|
|
10
|
+
* Very large files (> {@link MAX_FOLD_LINES}) skip the per-line DOM and fall back to a single highlighted block
|
|
11
|
+
* — folding a 10k-line file isn't worth tens of thousands of row elements, and such files mostly reach the
|
|
12
|
+
* streaming log viewer anyway (see isLogFile).
|
|
13
|
+
*/
|
|
14
|
+
type __VLS_Props = {
|
|
15
|
+
code: string;
|
|
16
|
+
lang: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
};
|
|
19
|
+
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>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|