file-viewer3 1.0.26 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +7 -377
- package/README.md +8 -352
- package/dist/file-viewer3.css +1 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +27 -129
- package/dist/components/3MFLoader.js +0 -527
- package/dist/components/AMFLoader.js +0 -188
- package/dist/components/ArchiveViewer.js +0 -526
- package/dist/components/AudioViewer.js +0 -66
- package/dist/components/CadViewer.js +0 -9040
- package/dist/components/CodeViewer.js +0 -151
- package/dist/components/ColladaLoader.js +0 -2282
- package/dist/components/DrawingViewer.js +0 -295
- package/dist/components/EdaViewer.js +0 -630
- package/dist/components/EmailViewer.js +0 -276
- package/dist/components/EpubViewer.js +0 -172
- package/dist/components/FBXLoader.js +0 -1574
- package/dist/components/GLTFLoader.js +0 -1383
- package/dist/components/ImageViewer.js +0 -1519
- package/dist/components/KMZLoader.js +0 -45
- package/dist/components/MarkdownViewer.js +0 -1476
- package/dist/components/ModelViewer.js +0 -797
- package/dist/components/OBJLoader.js +0 -287
- package/dist/components/OfdViewer.js +0 -133
- package/dist/components/PCDLoader.js +0 -141
- package/dist/components/PLYLoader.js +0 -305
- package/dist/components/PdfView.js +0 -27667
- package/dist/components/PptxRender.js +0 -11217
- package/dist/components/STLLoader.js +0 -83
- package/dist/components/TDSLoader.js +0 -228
- package/dist/components/TypstViewer.js +0 -1697
- package/dist/components/USDLoader.js +0 -2526
- package/dist/components/UmdViewer.js +0 -1873
- package/dist/components/VRMLLoader.js +0 -6422
- package/dist/components/VTKLoader.js +0 -337
- package/dist/components/XYZLoader.js +0 -30
- package/dist/components/XlsxTable.js +0 -7879
- package/dist/components/__vite-browser-external.js +0 -7
- package/dist/components/_plugin-vue_export-helper.js +0 -8
- package/dist/components/ar-SA-G6X2FPQ2.js +0 -523
- package/dist/components/arc.js +0 -79
- package/dist/components/architecture-7EHR7CIX.js +0 -3
- package/dist/components/architectureDiagram-3BPJPVTR.js +0 -4096
- package/dist/components/archive.js +0 -24
- package/dist/components/asyncToGenerator.js +0 -29
- package/dist/components/audio.js +0 -19
- package/dist/components/az-AZ-76LH7QW2.js +0 -523
- package/dist/components/bash.js +0 -169
- package/dist/components/bg-BG-XCXSNQG7.js +0 -523
- package/dist/components/blockDiagram-GPEHLZMM.js +0 -3357
- package/dist/components/bn-BD-2XOGV67Q.js +0 -523
- package/dist/components/c4Diagram-AAUBKEIU.js +0 -2957
- package/dist/components/ca-ES-6MX7JW3Y.js +0 -523
- package/dist/components/cad.js +0 -23
- package/dist/components/cfb.js +0 -1174
- package/dist/components/channel.js +0 -5
- package/dist/components/chunk-2J33WTMH.js +0 -26
- package/dist/components/chunk-3OPIFGDE.js +0 -4167
- package/dist/components/chunk-4BX2VUAB.js +0 -19
- package/dist/components/chunk-55IACEB6.js +0 -9
- package/dist/components/chunk-5ZQYHXKU.js +0 -669
- package/dist/components/chunk-6U3AYISY.js +0 -624
- package/dist/components/chunk-727SXJPM.js +0 -3356
- package/dist/components/chunk-AGHRB4JF.js +0 -324
- package/dist/components/chunk-AQP2D5EJ.js +0 -2055
- package/dist/components/chunk-BSJP7CBP.js +0 -83
- package/dist/components/chunk-CSCIHK7Q.js +0 -3500
- package/dist/components/chunk-EIO257PC.js +0 -1836
- package/dist/components/chunk-FMBD7UC4.js +0 -5
- package/dist/components/chunk-K2UTITRG.js +0 -17627
- package/dist/components/chunk-KSCS5N6A.js +0 -572
- package/dist/components/chunk-L5ZTLDWV.js +0 -40
- package/dist/components/chunk-LZXEDZCA.js +0 -60
- package/dist/components/chunk-ND2GUHAM.js +0 -61
- package/dist/components/chunk-NNHCCRGN.js +0 -20425
- package/dist/components/chunk-NZK2D7GU.js +0 -68
- package/dist/components/chunk-O5CBEL6O.js +0 -1894
- package/dist/components/chunk-QZHKN3VN.js +0 -12
- package/dist/components/chunk-SRAX5OIU.js +0 -22
- package/dist/components/chunk-WU5MYG2G.js +0 -14
- package/dist/components/chunk-XPW4576I.js +0 -1146
- package/dist/components/chunk-Z3N5DIM6.js +0 -59
- package/dist/components/chunk-ZUYEQ4TG.js +0 -22
- package/dist/components/chunk.js +0 -23
- package/dist/components/classDiagram-4FO5ZUOK.js +0 -29
- package/dist/components/classDiagram-v2-Q7XG4LA2.js +0 -29
- package/dist/components/compiler.js +0 -2
- package/dist/components/core.js +0 -845
- package/dist/components/cose-bilkent-S5V4N54A.js +0 -2268
- package/dist/components/cpp.js +0 -225
- package/dist/components/cs-CZ-2BRQDIVT.js +0 -523
- package/dist/components/csharp.js +0 -260
- package/dist/components/css.js +0 -140
- package/dist/components/cytoscape.esm.js +0 -18114
- package/dist/components/da-DK-5WZEPLOC.js +0 -523
- package/dist/components/dagre-BM42HDAG.js +0 -325
- package/dist/components/dagre.js +0 -1936
- package/dist/components/de-DE-XR44H4JA.js +0 -523
- package/dist/components/defaultLocale.js +0 -201
- package/dist/components/defineProperty.js +0 -50
- package/dist/components/diagram-2AECGRRQ.js +0 -229
- package/dist/components/diagram-5GNKFQAL.js +0 -108
- package/dist/components/diagram-KO2AKTUF.js +0 -443
- package/dist/components/diagram-LMA3HP47.js +0 -139
- package/dist/components/diagram-OG6HWLK6.js +0 -541
- package/dist/components/diff.js +0 -39
- package/dist/components/directory-open-01563666.js +0 -26
- package/dist/components/directory-open-4ed118d0.js +0 -83
- package/dist/components/dist.js +0 -50
- package/dist/components/dist2.js +0 -3291
- package/dist/components/dist3.js +0 -1593
- package/dist/components/documentSearch.js +0 -378
- package/dist/components/docx-preview.js +0 -3113
- package/dist/components/drawing.js +0 -19
- package/dist/components/ebook.js +0 -16
- package/dist/components/eda.js +0 -20
- package/dist/components/el-GR-BZB4AONW.js +0 -523
- package/dist/components/email.js +0 -21
- package/dist/components/en-B4ZKOASM.js +0 -3
- package/dist/components/erDiagram-TEJ5UH35.js +0 -1719
- package/dist/components/es-ES-U4NZUMDT.js +0 -523
- package/dist/components/eu-ES-A7QVB2H4.js +0 -523
- package/dist/components/eventmodeling-FCH6USID.js +0 -3
- package/dist/components/fa-IR-HGAKTJCU.js +0 -523
- package/dist/components/fflate.module.js +0 -323
- package/dist/components/fi-FI-Z5N7JZ37.js +0 -523
- package/dist/components/file-open-002ab408.js +0 -38
- package/dist/components/file-open-7c801643.js +0 -24
- package/dist/components/file-save-3189631c.js +0 -40
- package/dist/components/file-save-745eba88.js +0 -36
- package/dist/components/flowDiagram-I6XJVG4X.js +0 -4181
- package/dist/components/fr-FR-RHASNOE6.js +0 -523
- package/dist/components/ganttDiagram-6RSMTGT7.js +0 -2182
- package/dist/components/gitGraph-WXDBUCRP.js +0 -3
- package/dist/components/gitGraphDiagram-PVQCEYII.js +0 -788
- package/dist/components/gl-ES-HMX3MZ6V.js +0 -523
- package/dist/components/global-compiler.js +0 -23
- package/dist/components/global-renderer.js +0 -23
- package/dist/components/go.js +0 -140
- package/dist/components/graphlib.js +0 -1267
- package/dist/components/he-IL-6SHJWFNN.js +0 -523
- package/dist/components/hi-IN-IWLTKZ5I.js +0 -523
- package/dist/components/hu-HU-A5ZG7DT2.js +0 -523
- package/dist/components/id-ID-SAP4L64H.js +0 -523
- package/dist/components/image-GAAHSSAO.js +0 -3
- package/dist/components/image-blob-reduce.esm.js +0 -1429
- package/dist/components/image.js +0 -17
- package/dist/components/info-J43DQDTF.js +0 -3
- package/dist/components/infoDiagram-5YYISTIA.js +0 -26
- package/dist/components/ini.js +0 -88
- package/dist/components/init.js +0 -15
- package/dist/components/ishikawaDiagram-YF4QCWOH.js +0 -718
- package/dist/components/it-IT-JPQ66NNP.js +0 -523
- package/dist/components/ja-JP-DBVTYXUO.js +0 -523
- package/dist/components/java.js +0 -169
- package/dist/components/javascript.js +0 -436
- package/dist/components/journeyDiagram-JHISSGLW.js +0 -885
- package/dist/components/json.js +0 -36
- package/dist/components/jszip.min.js +0 -3033
- package/dist/components/kaa-6HZHGXH3.js +0 -523
- package/dist/components/kab-KAB-ZGHBKWFO.js +0 -523
- package/dist/components/kanban-definition-UN3LZRKU.js +0 -986
- package/dist/components/katex.js +0 -21979
- package/dist/components/kk-KZ-P5N5QNE5.js +0 -523
- package/dist/components/km-KH-HSX4SM5Z.js +0 -523
- package/dist/components/ko-KR-MTYHY66A.js +0 -523
- package/dist/components/ku-TR-6OUDTVRD.js +0 -523
- package/dist/components/lib.js +0 -4877
- package/dist/components/libarchive.js +0 -360
- package/dist/components/linear.js +0 -289
- package/dist/components/lt-LT-XHIRWOB4.js +0 -523
- package/dist/components/lv-LV-5QDEKY6T.js +0 -523
- package/dist/components/markdown.js +0 -181
- package/dist/components/md.js +0 -17
- package/dist/components/mermaid-parser.core.js +0 -328
- package/dist/components/mindmap-definition-RKZ34NQL.js +0 -1016
- package/dist/components/model.js +0 -21
- package/dist/components/mp4.js +0 -12
- package/dist/components/mr-IN-CRQNXWMA.js +0 -523
- package/dist/components/my-MM-5M5IBNSE.js +0 -523
- package/dist/components/nb-NO-T6EIAALU.js +0 -523
- package/dist/components/nestedRender.js +0 -158
- package/dist/components/nl-NL-IS3SIHDZ.js +0 -523
- package/dist/components/nn-NO-6E72VCQL.js +0 -523
- package/dist/components/objectSpread2.js +0 -29
- package/dist/components/objectWithoutProperties.js +0 -28
- package/dist/components/oc-FR-POXYY2M6.js +0 -523
- package/dist/components/ofd.js +0 -5261
- package/dist/components/ofd2.js +0 -16
- package/dist/components/ordinal.js +0 -65
- package/dist/components/pa-IN-N4M65BXN.js +0 -523
- package/dist/components/packet-YPE3B663.js +0 -3
- package/dist/components/pdf.js +0 -24
- package/dist/components/percentages-BXMCSKIN.js +0 -3
- package/dist/components/php.js +0 -294
- package/dist/components/pica.js +0 -1009
- package/dist/components/pie-LRSECV5Y.js +0 -3
- package/dist/components/pie.js +0 -47
- package/dist/components/pieDiagram-4H26LBE5.js +0 -130
- package/dist/components/pl-PL-T2D74RX3.js +0 -523
- package/dist/components/postal-mime.js +0 -3146
- package/dist/components/pptx.js +0 -15
- package/dist/components/printLayout.js +0 -42
- package/dist/components/prod.js +0 -21770
- package/dist/components/pt-BR-5N22H2LF.js +0 -523
- package/dist/components/pt-PT-UZXXM6DQ.js +0 -523
- package/dist/components/python.js +0 -238
- package/dist/components/quadrantDiagram-W4KKPZXB.js +0 -1988
- package/dist/components/radar-GUYGQ44K.js +0 -3
- package/dist/components/renderer.js +0 -2
- package/dist/components/requirementDiagram-4Y6WPE33.js +0 -2230
- package/dist/components/ro-RO-JPDTUUEW.js +0 -523
- package/dist/components/rough.esm.js +0 -1355
- package/dist/components/roundRect.js +0 -90
- package/dist/components/ru-RU-B4JR7IUQ.js +0 -523
- package/dist/components/rust.js +0 -169
- package/dist/components/sankeyDiagram-5OEKKPKP.js +0 -972
- package/dist/components/sequenceDiagram-3UESZ5HK.js +0 -4255
- package/dist/components/shared.js +0 -175
- package/dist/components/shared2.js +0 -4
- package/dist/components/si-LK-N5RQ5JYF.js +0 -523
- package/dist/components/sk-SK-C5VTKIMK.js +0 -523
- package/dist/components/sl-SI-NN7IZMDC.js +0 -523
- package/dist/components/sourceLoading.js +0 -134
- package/dist/components/sql.js +0 -118
- package/dist/components/src.js +0 -2664
- package/dist/components/src2.js +0 -10722
- package/dist/components/stateDiagram-AJRCARHV.js +0 -217
- package/dist/components/stateDiagram-v2-BHNVJYJU.js +0 -27
- package/dist/components/subset-shared.chunk.js +0 -3
- package/dist/components/subset-worker.chunk.js +0 -21
- package/dist/components/sv-SE-XGPEYMSR.js +0 -523
- package/dist/components/ta-IN-2NMHFXQM.js +0 -523
- package/dist/components/text.js +0 -20
- package/dist/components/th-TH-HPSO5L25.js +0 -523
- package/dist/components/three.module.js +0 -13134
- package/dist/components/time.js +0 -910
- package/dist/components/timeline-definition-PNZ67QCA.js +0 -1084
- package/dist/components/tr-TR-DEFEU3FU.js +0 -523
- package/dist/components/treeView-BLDUP644.js +0 -3
- package/dist/components/treemap-LRROVOQU.js +0 -3
- package/dist/components/typescript.js +0 -521
- package/dist/components/typst.js +0 -25
- package/dist/components/uk-UA-QMV73CPH.js +0 -523
- package/dist/components/umd.js +0 -16
- package/dist/components/use.js +0 -422
- package/dist/components/util.js +0 -49
- package/dist/components/vennDiagram-CIIHVFJN.js +0 -1880
- package/dist/components/vi-VN-M7AON7JQ.js +0 -523
- package/dist/components/viewerZoom.js +0 -92
- package/dist/components/wardley-L42UT6IY.js +0 -3
- package/dist/components/wardleyDiagram-YWT4CUSO.js +0 -656
- package/dist/components/wasm-pack-shim.js +0 -1711
- package/dist/components/wasm-pack-shim2.js +0 -934
- package/dist/components/wasm.js +0 -97
- package/dist/components/word.js +0 -3055
- package/dist/components/worker-ref.js +0 -16
- package/dist/components/xlsx.js +0 -21
- package/dist/components/xml.js +0 -166
- package/dist/components/xychartDiagram-2RQKCTM6.js +0 -2015
- package/dist/components/yaml.js +0 -144
- package/dist/components/zh-CN-LNUGB5OW.js +0 -523
- package/dist/components/zh-HK-E62DVLB3.js +0 -523
- package/dist/components/zh-TW-RAJ6MFWO.js +0 -523
- package/dist/index.mjs +0 -3293
- package/dist/src/App.vue.d.ts +0 -3
- package/dist/src/compare/CompareApp.vue.d.ts +0 -3
- package/dist/src/compare/main.d.ts +0 -0
- package/dist/src/compare/useSynchronizedScroll.d.ts +0 -7
- package/dist/src/components/HelloWorld.vue.d.ts +0 -3
- package/dist/src/components/utils.d.ts +0 -4
- package/dist/src/main.d.ts +0 -0
- package/dist/src/package/common/printCapability.d.ts +0 -27
- package/dist/src/package/common/printLayout.d.ts +0 -16
- package/dist/src/package/common/sourceLoading.d.ts +0 -10
- package/dist/src/package/common/type.d.ts +0 -544
- package/dist/src/package/common/util.d.ts +0 -5
- package/dist/src/package/common/worker-ref.d.ts +0 -12
- package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +0 -75
- package/dist/src/package/components/FileViewer/exportDocumentTemplate.d.ts +0 -9
- package/dist/src/package/components/FileViewer/hooks/useViewerDocumentFeatures.d.ts +0 -29
- package/dist/src/package/components/FileViewer/hooks/useViewerExport.d.ts +0 -21
- package/dist/src/package/components/FileViewer/hooks/useViewerWatermark.d.ts +0 -8
- package/dist/src/package/components/FileViewer/hooks/useViewerZoom.d.ts +0 -34
- package/dist/src/package/components/FileViewer/index.d.ts +0 -2
- package/dist/src/package/components/FileViewer/util.d.ts +0 -3
- package/dist/src/package/index.d.ts +0 -22
- package/dist/src/package/use/documentLocation.d.ts +0 -15
- package/dist/src/package/use/documentSearch.d.ts +0 -234
- package/dist/src/package/use/index.d.ts +0 -5
- package/dist/src/package/use/loading.d.ts +0 -33
- package/dist/src/package/use/viewerZoom.d.ts +0 -42
- package/dist/src/package/use/worker.d.ts +0 -24
- package/dist/src/package/vendors/archive/ArchiveViewer.vue.d.ts +0 -9
- package/dist/src/package/vendors/archive/cache.d.ts +0 -10
- package/dist/src/package/vendors/archive/fallback.d.ts +0 -9
- package/dist/src/package/vendors/archive/index.d.ts +0 -3
- package/dist/src/package/vendors/archive/shared.d.ts +0 -24
- package/dist/src/package/vendors/audio/AudioViewer.vue.d.ts +0 -7
- package/dist/src/package/vendors/audio/index.d.ts +0 -7
- package/dist/src/package/vendors/cad/CadViewer.vue.d.ts +0 -9
- package/dist/src/package/vendors/cad/index.d.ts +0 -8
- package/dist/src/package/vendors/drawing/DrawingViewer.vue.d.ts +0 -15
- package/dist/src/package/vendors/drawing/index.d.ts +0 -7
- package/dist/src/package/vendors/ebook/EpubViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/ebook/index.d.ts +0 -7
- package/dist/src/package/vendors/eda/EdaViewer.vue.d.ts +0 -8
- package/dist/src/package/vendors/eda/index.d.ts +0 -2
- package/dist/src/package/vendors/eda/parser.d.ts +0 -77
- package/dist/src/package/vendors/email/EmailViewer.vue.d.ts +0 -10
- package/dist/src/package/vendors/email/index.d.ts +0 -2
- package/dist/src/package/vendors/image/ImageViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/image/index.d.ts +0 -4
- package/dist/src/package/vendors/md/MarkdownViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/md/index.d.ts +0 -4
- package/dist/src/package/vendors/model/ModelViewer.vue.d.ts +0 -8
- package/dist/src/package/vendors/model/index.d.ts +0 -3
- package/dist/src/package/vendors/model/shared.d.ts +0 -1
- package/dist/src/package/vendors/mp4/index.d.ts +0 -4
- package/dist/src/package/vendors/nestedRender.d.ts +0 -10
- package/dist/src/package/vendors/ofd/OfdViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/ofd/index.d.ts +0 -7
- package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +0 -10
- package/dist/src/package/vendors/pdf/index.d.ts +0 -2
- package/dist/src/package/vendors/pdf/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/pdf/worker/pdf.worker.d.ts +0 -0
- package/dist/src/package/vendors/pptx/PptxRender.vue.d.ts +0 -9
- package/dist/src/package/vendors/pptx/index.d.ts +0 -6
- package/dist/src/package/vendors/pptx/options.d.ts +0 -39
- package/dist/src/package/vendors/pptx/support/chart.d.ts +0 -4
- package/dist/src/package/vendors/pptx/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/renders.d.ts +0 -3
- package/dist/src/package/vendors/text/CodeViewer.vue.d.ts +0 -7
- package/dist/src/package/vendors/text/index.d.ts +0 -10
- package/dist/src/package/vendors/typst/TypstViewer.vue.d.ts +0 -15
- package/dist/src/package/vendors/typst/index.d.ts +0 -8
- package/dist/src/package/vendors/umd/UmdViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/umd/index.d.ts +0 -7
- package/dist/src/package/vendors/umd/parser.d.ts +0 -30
- package/dist/src/package/vendors/word/doc.d.ts +0 -5
- package/dist/src/package/vendors/word/docx.d.ts +0 -5
- package/dist/src/package/vendors/word/docx.worker.d.ts +0 -1
- package/dist/src/package/vendors/word/index.d.ts +0 -3
- package/dist/src/package/vendors/xlsx/XlsxTable.state.d.ts +0 -80
- package/dist/src/package/vendors/xlsx/XlsxTable.view.d.ts +0 -25
- package/dist/src/package/vendors/xlsx/XlsxTable.vue.d.ts +0 -6
- package/dist/src/package/vendors/xlsx/index.d.ts +0 -6
- package/dist/src/package/vendors/xlsx/util.d.ts +0 -3
- package/dist/src/package/vendors/xlsx/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/xlsx/worker/sheetjs/SheetJsModel.d.ts +0 -73
- package/dist/src/package/vendors/xlsx/worker/sheetjs/color.d.ts +0 -2
- package/dist/src/package/vendors/xlsx/worker/sheetjs/index.d.ts +0 -4
- package/dist/src/package/vendors/xlsx/worker/sheetjs/sheet.worker.d.ts +0 -1
- package/dist/style.css +0 -1
- package/dist/wasm/cad/dwfv-render.wasm +0 -0
- package/dist/wasm/cad/dwg-worker.js +0 -24
- package/dist/wasm/cad/libredwg-web.js +0 -15
- package/dist/wasm/cad/libredwg-web.wasm +0 -0
|
@@ -1,630 +0,0 @@
|
|
|
1
|
-
import { o as e } from "./chunk.js";
|
|
2
|
-
import { n as t, t as n } from "./objectSpread2.js";
|
|
3
|
-
import { n as r, t as i } from "./asyncToGenerator.js";
|
|
4
|
-
import { i as a } from "./shared.js";
|
|
5
|
-
import { t as o } from "./_plugin-vue_export-helper.js";
|
|
6
|
-
import { Fragment as s, computed as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as ee, defineComponent as f, normalizeClass as p, normalizeStyle as m, onMounted as te, openBlock as h, ref as g, renderList as _, toDisplayString as v, unref as y, vModelText as b, withDirectives as x } from "vue";
|
|
7
|
-
t(), r();
|
|
8
|
-
var S = [
|
|
9
|
-
208,
|
|
10
|
-
207,
|
|
11
|
-
17,
|
|
12
|
-
224,
|
|
13
|
-
161,
|
|
14
|
-
177,
|
|
15
|
-
26,
|
|
16
|
-
225
|
|
17
|
-
], C = 200, w = 4096, T = 192, E = 180, D = 24, O = 420, k = (e) => new Uint8Array(e), A = (e) => S.every((t, n) => e[n] === t), j = (e) => e instanceof Uint8Array ? e : new Uint8Array(e), M = (e) => e.replace(/\u0000/g, "").replace(/[^\S\r\n]+/g, " ").replace(/\r\n/g, "\n").trim(), N = (e) => M(e).toLowerCase(), P = (e) => {
|
|
18
|
-
let t = e.split("/").filter(Boolean);
|
|
19
|
-
return t[t.length - 1] || e || "/";
|
|
20
|
-
}, F = (e) => e.replace(/\.[a-z0-9]+$/i, ""), I = (e, t, n = Infinity) => {
|
|
21
|
-
let r = M(t);
|
|
22
|
-
!r || e.includes(r) || e.length >= n || e.push(r);
|
|
23
|
-
}, L = (e) => {
|
|
24
|
-
if (!e.length) return !1;
|
|
25
|
-
let t = e.slice(0, Math.min(e.length, w)), n = 0, r = 0;
|
|
26
|
-
for (let e of t) e === 0 && (r += 1), (e === 9 || e === 10 || e === 13 || e >= 32 && e <= 126 || e >= 128) && (n += 1);
|
|
27
|
-
return n / t.length > .82 || r / t.length > .25;
|
|
28
|
-
}, R = (e) => {
|
|
29
|
-
let t = e.slice(0, Math.min(e.length, w));
|
|
30
|
-
if (!t.length) return "";
|
|
31
|
-
try {
|
|
32
|
-
let e = 0, n = 0;
|
|
33
|
-
for (let r = 0; r < t.length; r += 1) t[r] === 0 && (r % 2 == 0 ? n += 1 : e += 1);
|
|
34
|
-
return M((e > t.length / 5 && e > n * 2 ? new TextDecoder("utf-16le", { fatal: !1 }) : new TextDecoder("utf-8", { fatal: !1 })).decode(t));
|
|
35
|
-
} catch (e) {
|
|
36
|
-
return "";
|
|
37
|
-
}
|
|
38
|
-
}, z = (e) => {
|
|
39
|
-
let t = e.slice(0, Math.min(e.length, T)), n = [];
|
|
40
|
-
for (let e = 0; e < t.length; e += 16) {
|
|
41
|
-
let r = t.slice(e, e + 16), i = Array.from(r).map((e) => e.toString(16).padStart(2, "0")).join(" "), a = Array.from(r).map((e) => e >= 32 && e <= 126 ? String.fromCharCode(e) : ".").join("");
|
|
42
|
-
n.push(`${e.toString(16).padStart(8, "0")} ${i.padEnd(47)} ${a}`);
|
|
43
|
-
}
|
|
44
|
-
return n.join("\n");
|
|
45
|
-
}, B = (e) => {
|
|
46
|
-
let t = [], n = "";
|
|
47
|
-
for (let r of e) {
|
|
48
|
-
if (r >= 32 && r <= 126) {
|
|
49
|
-
n += String.fromCharCode(r);
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
n.length >= 4 && t.push(n), n = "";
|
|
53
|
-
}
|
|
54
|
-
return n.length >= 4 && t.push(n), t;
|
|
55
|
-
}, V = (e) => {
|
|
56
|
-
let t = [], n = "";
|
|
57
|
-
for (let r = 0; r + 1 < e.length; r += 2) {
|
|
58
|
-
let i = e[r];
|
|
59
|
-
if (e[r + 1] === 0 && i >= 32 && i <= 126) {
|
|
60
|
-
n += String.fromCharCode(i);
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
|
-
n.length >= 4 && t.push(n), n = "";
|
|
64
|
-
}
|
|
65
|
-
return n.length >= 4 && t.push(n), t;
|
|
66
|
-
}, H = (e, t = E) => {
|
|
67
|
-
let n = /* @__PURE__ */ new Set(), r = [];
|
|
68
|
-
return e.forEach((e) => {
|
|
69
|
-
[...B(e), ...V(e)].forEach((e) => {
|
|
70
|
-
let i = M(e);
|
|
71
|
-
!i || i.length < 4 || n.has(i) || r.length >= t || (n.add(i), r.push(i));
|
|
72
|
-
});
|
|
73
|
-
}), r;
|
|
74
|
-
}, ne = /^\s*([A-Za-z][A-Za-z0-9_. /#-]{1,56})\s*[:=]\s*(.{1,240})\s*$/, re = /\b([A-Za-z][A-Za-z0-9_. /#-]{1,56})\s*=\s*([^;\n\r|]{1,240})/g, ie = (e) => M(e).replace(/\s+/g, " "), U = (e, t, n, r, i) => {
|
|
75
|
-
if (e.length >= O) return;
|
|
76
|
-
let a = ie(n), o = M(r);
|
|
77
|
-
if (!a || !o) return;
|
|
78
|
-
let s = `${i}\u0000${a.toLowerCase()}\u0000${o}`;
|
|
79
|
-
t.has(s) || (t.add(s), e.push({
|
|
80
|
-
key: a,
|
|
81
|
-
value: o,
|
|
82
|
-
source: i
|
|
83
|
-
}));
|
|
84
|
-
}, ae = (e, t, n) => {
|
|
85
|
-
let r = [], i = /* @__PURE__ */ new Set();
|
|
86
|
-
return [e, ...t].filter(Boolean).forEach((e) => {
|
|
87
|
-
M(e).split(/\n|[|;]/).forEach((e) => {
|
|
88
|
-
let t = e.match(ne);
|
|
89
|
-
t && U(r, i, t[1], t[2], n);
|
|
90
|
-
});
|
|
91
|
-
for (let t of e.matchAll(re)) U(r, i, t[1], t[2], n);
|
|
92
|
-
}), r;
|
|
93
|
-
}, W = (e, t) => {
|
|
94
|
-
let n = t.map((e) => e.toLowerCase());
|
|
95
|
-
return e.some((e) => n.includes(e.key.toLowerCase()));
|
|
96
|
-
}, G = (e, t) => {
|
|
97
|
-
var n;
|
|
98
|
-
let r = t.map((e) => e.toLowerCase());
|
|
99
|
-
return (n = e.find((e) => r.includes(e.key.toLowerCase()))) == null ? void 0 : n.value;
|
|
100
|
-
}, K = (e, t, n, r, i, a, o) => {
|
|
101
|
-
let s = N(`${t}\n${n}\n${r}\n${i.join("\n")}`);
|
|
102
|
-
if (s === "/" || t === "/") return "root";
|
|
103
|
-
if (o === "storage" && /(^|\/)(library|libraries)(\/|$)/i.test(t)) return "library";
|
|
104
|
-
if (/(header|version|source|author|metadata|property|properties)/.test(s)) return W(a, [
|
|
105
|
-
"Name",
|
|
106
|
-
"Pins",
|
|
107
|
-
"Footprint",
|
|
108
|
-
"Padstack"
|
|
109
|
-
]) ? "property" : "metadata";
|
|
110
|
-
if (e === "olb") {
|
|
111
|
-
if (/(^|\/)(symbols?|parts?)(\/|$)/.test(s) || W(a, [
|
|
112
|
-
"Pins",
|
|
113
|
-
"Footprint",
|
|
114
|
-
"PCB Footprint",
|
|
115
|
-
"Part Number"
|
|
116
|
-
])) return "symbol";
|
|
117
|
-
if (/(^|\/)(library|capture|orcad)(\/|$)/.test(s)) return "library";
|
|
118
|
-
}
|
|
119
|
-
if (e === "dra") {
|
|
120
|
-
if (/(padstack|pad stack|thermal|antipad|drill)/.test(s) || W(a, ["Padstack", "Drill"])) return "padstack";
|
|
121
|
-
if (/(footprint|package|psm|bsm|fsm|ssm|symbol)/.test(s)) return "footprint";
|
|
122
|
-
if (/(route|net|via|ratsnest)/.test(s)) return "net";
|
|
123
|
-
if (/(line |arc |circle|shape|outline|silk|place_bound|assembly|soldermask|pastemask)/.test(s)) return "geometry";
|
|
124
|
-
if (/(drawing|units|layers?|constraint|allegro)/.test(s) || W(a, ["Units", "Layers"])) return "drawing";
|
|
125
|
-
}
|
|
126
|
-
return a.length ? "property" : o === "storage" ? "library" : "unknown";
|
|
127
|
-
}, q = (e, t, n, r, i, a) => {
|
|
128
|
-
if (i === "storage" || !a) return {
|
|
129
|
-
path: t,
|
|
130
|
-
name: n,
|
|
131
|
-
size: r,
|
|
132
|
-
kind: i,
|
|
133
|
-
role: K(e, t, n, "", [], [], i),
|
|
134
|
-
strings: [],
|
|
135
|
-
properties: []
|
|
136
|
-
};
|
|
137
|
-
let o = L(a) ? R(a) : "", s = H([a], D), c = ae(o, s, t), l = K(e, t, n, o, s, c, o ? "text" : "binary");
|
|
138
|
-
return {
|
|
139
|
-
path: t,
|
|
140
|
-
name: n,
|
|
141
|
-
size: r,
|
|
142
|
-
kind: o ? "text" : "binary",
|
|
143
|
-
role: l,
|
|
144
|
-
sample: o,
|
|
145
|
-
hex: o ? void 0 : z(a),
|
|
146
|
-
strings: s,
|
|
147
|
-
properties: c
|
|
148
|
-
};
|
|
149
|
-
}, J = (e) => {
|
|
150
|
-
e.children.sort((e, t) => e.children.length === t.children.length ? e.name.localeCompare(t.name) : t.children.length - e.children.length), e.children.forEach(J);
|
|
151
|
-
}, oe = (e, t) => {
|
|
152
|
-
let n = {
|
|
153
|
-
id: `${t}:root`,
|
|
154
|
-
path: "/",
|
|
155
|
-
name: t.toUpperCase(),
|
|
156
|
-
kind: "storage",
|
|
157
|
-
role: "root",
|
|
158
|
-
size: 0,
|
|
159
|
-
children: []
|
|
160
|
-
}, r = new Map([["/", n]]);
|
|
161
|
-
return e.forEach((e) => {
|
|
162
|
-
let i = e.path.split("/").filter(Boolean), a = n, o = "";
|
|
163
|
-
i.forEach((n, s) => {
|
|
164
|
-
o += `/${n}`;
|
|
165
|
-
let c = s === i.length - 1, l = r.get(o);
|
|
166
|
-
l || (l = {
|
|
167
|
-
id: `${t}:${o}`,
|
|
168
|
-
path: o,
|
|
169
|
-
name: n,
|
|
170
|
-
kind: c ? e.kind : "storage",
|
|
171
|
-
role: c ? e.role : K(t, o, n, "", [], [], "storage"),
|
|
172
|
-
size: c ? e.size : 0,
|
|
173
|
-
children: []
|
|
174
|
-
}, r.set(o, l), a.children.push(l)), c && (l.kind = e.kind, l.role = e.role, l.size = e.size), a = l;
|
|
175
|
-
});
|
|
176
|
-
}), J(n), n.children;
|
|
177
|
-
}, Y = (e) => {
|
|
178
|
-
if (!e) return [];
|
|
179
|
-
let t = [];
|
|
180
|
-
return e.split(/[,/;| ]+/).forEach((e) => {
|
|
181
|
-
/^[A-Za-z0-9_.+-]+$/.test(e) && I(t, e, 64);
|
|
182
|
-
}), t;
|
|
183
|
-
}, se = (e, t) => t === "olb" ? e.role === "symbol" && e.kind !== "storage" ? "symbol" : null : e.role === "padstack" ? "padstack" : e.role === "footprint" || e.role === "geometry" && /\/footprint\//i.test(e.path) ? "footprint" : e.role === "drawing" ? "drawing" : null, ce = (e, t) => {
|
|
184
|
-
if (t === "footprint") {
|
|
185
|
-
let t = e.path.match(/^(.+?\/Footprint)(?:\/|$)/i);
|
|
186
|
-
return (t == null ? void 0 : t[1]) || e.path;
|
|
187
|
-
}
|
|
188
|
-
if (t === "drawing") {
|
|
189
|
-
let t = e.path.match(/^(.+?\/Drawing)(?:\/|$)/i);
|
|
190
|
-
return (t == null ? void 0 : t[1]) || e.path;
|
|
191
|
-
}
|
|
192
|
-
return e.path;
|
|
193
|
-
}, le = (e, t, n) => {
|
|
194
|
-
let r = G(e.properties, [
|
|
195
|
-
"Name",
|
|
196
|
-
"Part",
|
|
197
|
-
"Part Name",
|
|
198
|
-
"Symbol",
|
|
199
|
-
"Device",
|
|
200
|
-
"Footprint",
|
|
201
|
-
"PCB Footprint",
|
|
202
|
-
"Package",
|
|
203
|
-
"Padstack",
|
|
204
|
-
"Pad Stack",
|
|
205
|
-
"Drawing"
|
|
206
|
-
]);
|
|
207
|
-
if (r) return r;
|
|
208
|
-
let i = F(P(n));
|
|
209
|
-
return i && i !== "/" ? i : t.toUpperCase();
|
|
210
|
-
}, ue = (e, t) => {
|
|
211
|
-
let n = [], r = `${e.path}\n${e.sample || ""}\n${e.strings.join("\n")}`.toLowerCase();
|
|
212
|
-
return (t === "symbol" ? [
|
|
213
|
-
"pins",
|
|
214
|
-
"footprint",
|
|
215
|
-
"pspice",
|
|
216
|
-
"part",
|
|
217
|
-
"symbol"
|
|
218
|
-
] : [
|
|
219
|
-
"units",
|
|
220
|
-
"layers",
|
|
221
|
-
"padstack",
|
|
222
|
-
"drill",
|
|
223
|
-
"outline",
|
|
224
|
-
"route",
|
|
225
|
-
"constraint",
|
|
226
|
-
"shape",
|
|
227
|
-
"place_bound"
|
|
228
|
-
]).forEach((e) => {
|
|
229
|
-
r.includes(e) && I(n, e, 12);
|
|
230
|
-
}), n;
|
|
231
|
-
}, X = (e, t) => {
|
|
232
|
-
let n = new Set(e.map((e) => `${e.key.toLowerCase()}\u0000${e.value}`));
|
|
233
|
-
t.forEach((t) => {
|
|
234
|
-
let r = `${t.key.toLowerCase()}\u0000${t.value}`;
|
|
235
|
-
n.has(r) || (n.add(r), e.push(t));
|
|
236
|
-
});
|
|
237
|
-
}, de = (e, t) => {
|
|
238
|
-
let n = /* @__PURE__ */ new Map();
|
|
239
|
-
return e.forEach((e) => {
|
|
240
|
-
let r = se(e, t);
|
|
241
|
-
if (!r) return;
|
|
242
|
-
let i = ce(e, r), a = `${r}:${i.toLowerCase()}`, o = n.get(a) || {
|
|
243
|
-
id: a,
|
|
244
|
-
name: le(e, r, i),
|
|
245
|
-
role: r,
|
|
246
|
-
path: i,
|
|
247
|
-
streamCount: 0,
|
|
248
|
-
byteLength: 0,
|
|
249
|
-
properties: [],
|
|
250
|
-
pins: [],
|
|
251
|
-
layers: [],
|
|
252
|
-
keywords: []
|
|
253
|
-
};
|
|
254
|
-
o.streamCount += 1, o.byteLength += e.size, X(o.properties, e.properties), Y(G(e.properties, [
|
|
255
|
-
"Pins",
|
|
256
|
-
"Pin",
|
|
257
|
-
"Pin Numbers"
|
|
258
|
-
])).forEach((e) => I(o.pins, e, 96)), Y(G(e.properties, ["Layers", "Layer"])).forEach((e) => I(o.layers, e, 64)), ue(e, r).forEach((e) => I(o.keywords, e, 16)), o.description || (o.description = G(o.properties, ["Description", "Desc"])), o.footprint || (o.footprint = G(o.properties, [
|
|
259
|
-
"Footprint",
|
|
260
|
-
"PCB Footprint",
|
|
261
|
-
"Package"
|
|
262
|
-
])), n.set(a, o);
|
|
263
|
-
}), Array.from(n.values()).sort((e, t) => {
|
|
264
|
-
var n, r;
|
|
265
|
-
let i = {
|
|
266
|
-
symbol: 0,
|
|
267
|
-
footprint: 1,
|
|
268
|
-
padstack: 2,
|
|
269
|
-
drawing: 3
|
|
270
|
-
};
|
|
271
|
-
return ((n = i[e.role]) == null ? 9 : n) - ((r = i[t.role]) == null ? 9 : r) || e.name.localeCompare(t.name);
|
|
272
|
-
});
|
|
273
|
-
}, fe = (e) => {
|
|
274
|
-
let t = [];
|
|
275
|
-
return e.forEach((e) => {
|
|
276
|
-
(e.role === "metadata" || e.role === "library" || e.role === "drawing") && X(t, e.properties);
|
|
277
|
-
}), t.slice(0, 80);
|
|
278
|
-
}, pe = (e, t, n, r) => {
|
|
279
|
-
let i = {
|
|
280
|
-
textStreams: e.filter((e) => e.kind === "text").length,
|
|
281
|
-
binaryStreams: e.filter((e) => e.kind === "binary").length,
|
|
282
|
-
storageEntries: e.filter((e) => e.kind === "storage").length,
|
|
283
|
-
propertyCount: e.reduce((e, t) => e + t.properties.length, 0),
|
|
284
|
-
stringCount: n.length,
|
|
285
|
-
symbolCount: t.filter((e) => e.role === "symbol").length,
|
|
286
|
-
footprintCount: t.filter((e) => e.role === "footprint").length,
|
|
287
|
-
padstackCount: t.filter((e) => e.role === "padstack").length,
|
|
288
|
-
confidence: "low"
|
|
289
|
-
};
|
|
290
|
-
return r === "cfb" && t.length && i.propertyCount ? i.confidence = "high" : (r === "cfb" || n.length || i.propertyCount) && (i.confidence = "medium"), i;
|
|
291
|
-
}, me = (e, t, n, r, i, a) => {
|
|
292
|
-
let o = a.map((e, t) => ({
|
|
293
|
-
level: "warning",
|
|
294
|
-
code: `warning-${t + 1}`,
|
|
295
|
-
message: e
|
|
296
|
-
}));
|
|
297
|
-
o.push({
|
|
298
|
-
level: "info",
|
|
299
|
-
code: "parser",
|
|
300
|
-
message: t === "cfb" ? "已识别为 Microsoft Compound File / OLE2 复合文档容器,并在浏览器端解析目录与流。" : "未识别为 CFB 容器,已使用二进制字符串索引模式展示可读信息。"
|
|
301
|
-
}), o.push({
|
|
302
|
-
level: "info",
|
|
303
|
-
code: "coverage",
|
|
304
|
-
message: `已索引 ${n.length} 个条目、${i.length} 个可读字符串、${r.length} 个 EDA 结构候选。`
|
|
305
|
-
});
|
|
306
|
-
let s = e === "olb" && !r.some((e) => e.role === "symbol"), c = e === "dra" && !r.some((e) => e.role === "footprint" || e.role === "padstack");
|
|
307
|
-
return (s || c) && o.push({
|
|
308
|
-
level: "warning",
|
|
309
|
-
code: "domain-candidates",
|
|
310
|
-
message: e === "olb" ? "未发现明确的元件符号候选,文件可能使用了私有二进制编码或需要专业工具导出 ASCII/XML 后再检查。" : "未发现明确的封装、图形或 padstack 候选,文件可能使用了私有二进制数据库编码。"
|
|
311
|
-
}), o;
|
|
312
|
-
}, Z = (e, t, n, r, i, a, o) => {
|
|
313
|
-
let s = i.reduce((e, t) => e + t.size, 0), c = de(i, t), l = fe(i), u = me(t, n, i, c, a, o);
|
|
314
|
-
return {
|
|
315
|
-
type: t,
|
|
316
|
-
parser: n,
|
|
317
|
-
title: t === "olb" ? n === "cfb" ? "OrCAD Capture Symbol Library" : "OLB Binary Library" : n === "cfb" ? "OrCAD / Allegro Drawing Library" : "DRA Binary Drawing",
|
|
318
|
-
byteLength: e.byteLength,
|
|
319
|
-
streamCount: r,
|
|
320
|
-
totalStreamBytes: s,
|
|
321
|
-
streams: i,
|
|
322
|
-
tree: oe(i, t),
|
|
323
|
-
entities: c,
|
|
324
|
-
metadata: l,
|
|
325
|
-
strings: a,
|
|
326
|
-
warnings: o,
|
|
327
|
-
diagnostics: u,
|
|
328
|
-
stats: pe(i, c, a, n)
|
|
329
|
-
};
|
|
330
|
-
}, he = function() {
|
|
331
|
-
var t = i(function* (t, n) {
|
|
332
|
-
let r = (yield import("./cfb.js").then((t) => /* @__PURE__ */ e(t.default, 1))).parse(k(t), { type: "array" }), i = r.FileIndex.map((e, t) => ({
|
|
333
|
-
entry: e,
|
|
334
|
-
path: r.FullPaths[t] || e.name
|
|
335
|
-
})).filter((e) => e.entry.type !== 5 && e.path !== "/" && e.entry.name).slice(0, C), a = [], o = i.map(({ entry: e, path: t }) => {
|
|
336
|
-
if (e.type === 1) return q(n, t, e.name, e.size || 0, "storage");
|
|
337
|
-
let r = j(e.content || []);
|
|
338
|
-
return a.push(r), q(n, t, e.name, e.size || r.byteLength || 0, "binary", r);
|
|
339
|
-
}), s = i.length >= C ? [`仅展示前 ${C} 个 CFB 项,完整文件仍可下载后在专业 EDA 工具中打开。`] : [];
|
|
340
|
-
return Z(t, n, "cfb", r.FileIndex.length, o, H(a), s);
|
|
341
|
-
});
|
|
342
|
-
return function(e, n) {
|
|
343
|
-
return t.apply(this, arguments);
|
|
344
|
-
};
|
|
345
|
-
}(), Q = (e, t) => {
|
|
346
|
-
let n = k(e);
|
|
347
|
-
return Z(e, t, "binary", 1, [q(t, `${t}.${t}`, `${t}.${t}`, e.byteLength, "binary", n)], H([n]), ["该文件不是标准 CFB 容器,已退化为安全的二进制字符串索引预览。"]);
|
|
348
|
-
}, ge = function() {
|
|
349
|
-
var e = i(function* (e, t = "olb") {
|
|
350
|
-
let n = t === "dra" ? "dra" : "olb";
|
|
351
|
-
if (!A(k(e))) return Q(e, n);
|
|
352
|
-
try {
|
|
353
|
-
return yield he(e, n);
|
|
354
|
-
} catch (t) {
|
|
355
|
-
let r = Q(e, n);
|
|
356
|
-
return r.warnings.unshift(t instanceof Error ? t.message : String(t)), r.diagnostics.unshift({
|
|
357
|
-
level: "warning",
|
|
358
|
-
code: "cfb-parse-failed",
|
|
359
|
-
message: t instanceof Error ? t.message : String(t)
|
|
360
|
-
}), r;
|
|
361
|
-
}
|
|
362
|
-
});
|
|
363
|
-
return function(t) {
|
|
364
|
-
return e.apply(this, arguments);
|
|
365
|
-
};
|
|
366
|
-
}();
|
|
367
|
-
//#endregion
|
|
368
|
-
//#region src/package/vendors/eda/EdaViewer.vue?vue&type=script&setup=true&lang.ts
|
|
369
|
-
r();
|
|
370
|
-
var _e = { class: "eda-viewer" }, ve = { class: "eda-header" }, ye = { key: 0 }, be = {
|
|
371
|
-
key: 0,
|
|
372
|
-
class: "eda-body"
|
|
373
|
-
}, xe = { class: "eda-sidebar" }, Se = { class: "eda-summary" }, Ce = { class: "eda-mini-grid" }, we = {
|
|
374
|
-
key: 0,
|
|
375
|
-
class: "eda-warning"
|
|
376
|
-
}, Te = { class: "eda-stream-list" }, Ee = ["onClick"], De = ["data-role"], Oe = { class: "eda-preview" }, ke = { class: "eda-panel eda-panel--compact" }, Ae = { class: "eda-panel-head" }, je = { class: "eda-stat-grid" }, Me = { class: "eda-topology" }, Ne = { class: "eda-panel" }, Pe = { class: "eda-panel-head" }, Fe = { class: "eda-tree" }, Ie = ["onClick"], Le = { class: "eda-panel" }, Re = { class: "eda-panel-head" }, ze = {
|
|
377
|
-
key: 0,
|
|
378
|
-
class: "eda-entities"
|
|
379
|
-
}, Be = ["onClick"], Ve = { key: 0 }, He = { key: 0 }, Ue = { key: 1 }, We = { key: 2 }, Ge = { key: 3 }, Ke = {
|
|
380
|
-
key: 1,
|
|
381
|
-
class: "eda-empty"
|
|
382
|
-
}, qe = { class: "eda-panel" }, Je = { class: "eda-panel-head" }, $ = {
|
|
383
|
-
key: 0,
|
|
384
|
-
class: "eda-selected-meta"
|
|
385
|
-
}, Ye = {
|
|
386
|
-
key: 1,
|
|
387
|
-
class: "eda-property-grid"
|
|
388
|
-
}, Xe = { key: 2 }, Ze = {
|
|
389
|
-
key: 3,
|
|
390
|
-
class: "eda-empty"
|
|
391
|
-
}, Qe = { class: "eda-bottom" }, $e = { class: "eda-panel" }, et = { class: "eda-panel-head" }, tt = { class: "eda-string-grid" }, nt = { class: "eda-panel" }, rt = { class: "eda-panel-head" }, it = { class: "eda-diagnostics" }, at = ["data-level"], ot = {
|
|
392
|
-
key: 0,
|
|
393
|
-
class: "eda-local-strings"
|
|
394
|
-
}, st = {
|
|
395
|
-
key: 1,
|
|
396
|
-
class: "eda-state"
|
|
397
|
-
}, ct = {
|
|
398
|
-
key: 2,
|
|
399
|
-
class: "eda-error"
|
|
400
|
-
}, lt = /*#__PURE__*/ o(/* @__PURE__ */ f({
|
|
401
|
-
__name: "EdaViewer",
|
|
402
|
-
props: {
|
|
403
|
-
data: {},
|
|
404
|
-
type: {},
|
|
405
|
-
filename: {}
|
|
406
|
-
},
|
|
407
|
-
setup(e) {
|
|
408
|
-
let t = e, r = g(null), o = g(!0), f = g(""), S = g(null), C = g(""), w = {
|
|
409
|
-
root: "根",
|
|
410
|
-
library: "库",
|
|
411
|
-
symbol: "元件符号",
|
|
412
|
-
footprint: "封装",
|
|
413
|
-
padstack: "Padstack",
|
|
414
|
-
drawing: "图纸",
|
|
415
|
-
metadata: "元数据",
|
|
416
|
-
property: "属性",
|
|
417
|
-
geometry: "几何",
|
|
418
|
-
net: "网络",
|
|
419
|
-
unknown: "未知"
|
|
420
|
-
}, T = {
|
|
421
|
-
high: "高",
|
|
422
|
-
medium: "中",
|
|
423
|
-
low: "低"
|
|
424
|
-
}, E = (e) => w[e] || e, D = (e) => e === "storage" ? "目录" : e === "text" ? "文本" : "二进制", O = (e) => e.replace(/^\/+/, "").toLowerCase(), k = c(() => {
|
|
425
|
-
if (!r.value) return [];
|
|
426
|
-
let e = r.value.stats;
|
|
427
|
-
return [
|
|
428
|
-
{
|
|
429
|
-
label: "文本流",
|
|
430
|
-
value: e.textStreams
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
label: "二进制流",
|
|
434
|
-
value: e.binaryStreams
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
label: "目录",
|
|
438
|
-
value: e.storageEntries
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
label: "属性",
|
|
442
|
-
value: e.propertyCount
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
label: "符号",
|
|
446
|
-
value: e.symbolCount
|
|
447
|
-
},
|
|
448
|
-
{
|
|
449
|
-
label: "封装",
|
|
450
|
-
value: e.footprintCount
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
label: "Padstack",
|
|
454
|
-
value: e.padstackCount
|
|
455
|
-
},
|
|
456
|
-
{
|
|
457
|
-
label: "可信度",
|
|
458
|
-
value: T[e.confidence]
|
|
459
|
-
}
|
|
460
|
-
];
|
|
461
|
-
}), A = c(() => {
|
|
462
|
-
var e;
|
|
463
|
-
let t = ((e = r.value) == null ? void 0 : e.entities) || [], n = [
|
|
464
|
-
{
|
|
465
|
-
role: "symbol",
|
|
466
|
-
label: "元件符号",
|
|
467
|
-
items: []
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
role: "footprint",
|
|
471
|
-
label: "封装图形",
|
|
472
|
-
items: []
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
role: "padstack",
|
|
476
|
-
label: "Padstack",
|
|
477
|
-
items: []
|
|
478
|
-
},
|
|
479
|
-
{
|
|
480
|
-
role: "drawing",
|
|
481
|
-
label: "图纸信息",
|
|
482
|
-
items: []
|
|
483
|
-
}
|
|
484
|
-
];
|
|
485
|
-
return n.forEach((e) => {
|
|
486
|
-
e.items = t.filter((t) => t.role === e.role);
|
|
487
|
-
}), n.filter((e) => e.items.length);
|
|
488
|
-
}), j = c(() => {
|
|
489
|
-
var e;
|
|
490
|
-
let t = C.value.trim().toLowerCase(), n = ((e = r.value) == null ? void 0 : e.streams) || [];
|
|
491
|
-
return t ? n.filter((e) => {
|
|
492
|
-
let n = e.properties.map((e) => `${e.key}=${e.value}`).join("\n");
|
|
493
|
-
return `${e.path}\n${e.name}\n${e.kind}\n${e.role}\n${e.sample || ""}\n${e.strings.join("\n")}\n${n}`.toLowerCase().includes(t);
|
|
494
|
-
}) : n;
|
|
495
|
-
}), M = (e, t = 0) => e.flatMap((e) => [n(n({}, e), {}, { depth: t }), ...M(e.children, t + 1)]), N = c(() => {
|
|
496
|
-
var e;
|
|
497
|
-
return M(((e = r.value) == null ? void 0 : e.tree) || []);
|
|
498
|
-
}), P = c(() => {
|
|
499
|
-
var e;
|
|
500
|
-
return ((e = S.value) == null ? void 0 : e.properties) || [];
|
|
501
|
-
}), F = c(() => {
|
|
502
|
-
var e;
|
|
503
|
-
return ((e = S.value) == null ? void 0 : e.strings) || [];
|
|
504
|
-
}), I = c(() => {
|
|
505
|
-
var e, t;
|
|
506
|
-
return ((e = S.value) == null ? void 0 : e.sample) || ((t = S.value) == null ? void 0 : t.hex) || "";
|
|
507
|
-
}), L = (e) => {
|
|
508
|
-
S.value = e;
|
|
509
|
-
}, R = (e) => {
|
|
510
|
-
var t;
|
|
511
|
-
let n = O(e.path), i = (t = r.value) == null ? void 0 : t.streams.find((e) => O(e.path) === n);
|
|
512
|
-
i && (S.value = i);
|
|
513
|
-
}, z = (e) => {
|
|
514
|
-
var t;
|
|
515
|
-
let n = O(e.path), i = (t = r.value) == null ? void 0 : t.streams.find((e) => {
|
|
516
|
-
let t = O(e.path);
|
|
517
|
-
return t === n || t.startsWith(`${n}/`);
|
|
518
|
-
});
|
|
519
|
-
i && (S.value = i);
|
|
520
|
-
}, B = function() {
|
|
521
|
-
var e = i(function* () {
|
|
522
|
-
o.value = !0, f.value = "";
|
|
523
|
-
try {
|
|
524
|
-
let e = yield ge(t.data, t.type);
|
|
525
|
-
r.value = e, S.value = e.streams.find((e) => e.properties.length) || e.streams.find((e) => e.kind === "text") || e.streams[0] || null;
|
|
526
|
-
} catch (e) {
|
|
527
|
-
console.error(e), f.value = e instanceof Error ? e.message : String(e);
|
|
528
|
-
} finally {
|
|
529
|
-
o.value = !1;
|
|
530
|
-
}
|
|
531
|
-
});
|
|
532
|
-
return function() {
|
|
533
|
-
return e.apply(this, arguments);
|
|
534
|
-
};
|
|
535
|
-
}();
|
|
536
|
-
return te(() => {
|
|
537
|
-
B();
|
|
538
|
-
}), (t, n) => {
|
|
539
|
-
var i, c;
|
|
540
|
-
return h(), u("section", _e, [
|
|
541
|
-
d("header", ve, [d("div", null, [d("span", null, v(((i = r.value) == null ? void 0 : i.parser) === "cfb" ? "CFB STRUCTURE VIEWER" : "BINARY STRUCTURE VIEWER"), 1), d("h2", null, v(e.filename), 1)]), r.value ? (h(), u("dl", ye, [
|
|
542
|
-
d("div", null, [n[1] || (n[1] = d("dt", null, "格式", -1)), d("dd", null, v(r.value.type.toUpperCase()), 1)]),
|
|
543
|
-
d("div", null, [n[2] || (n[2] = d("dt", null, "大小", -1)), d("dd", null, v(y(a)(r.value.byteLength)), 1)]),
|
|
544
|
-
d("div", null, [n[3] || (n[3] = d("dt", null, "条目", -1)), d("dd", null, v(r.value.streamCount), 1)]),
|
|
545
|
-
d("div", null, [n[4] || (n[4] = d("dt", null, "可信度", -1)), d("dd", null, v(T[r.value.stats.confidence]), 1)])
|
|
546
|
-
])) : l("", !0)]),
|
|
547
|
-
r.value ? (h(), u("div", be, [d("aside", xe, [
|
|
548
|
-
d("div", Se, [d("strong", null, v(r.value.title), 1), n[5] || (n[5] = d("p", null, "OLB / DRA 属于 OrCAD / Allegro 生态的私有设计数据。预览器优先解析 CFB 结构、对象候选、属性和可读文本,并在纯前端安全退化。", -1))]),
|
|
549
|
-
d("div", Ce, [(h(!0), u(s, null, _(k.value.slice(0, 4), (e) => (h(), u("div", { key: e.label }, [d("span", null, v(e.label), 1), d("strong", null, v(e.value), 1)]))), 128))]),
|
|
550
|
-
r.value.warnings.length ? (h(), u("div", we, [(h(!0), u(s, null, _(r.value.warnings, (e) => (h(), u("p", { key: e }, v(e), 1))), 128))])) : l("", !0),
|
|
551
|
-
x(d("input", {
|
|
552
|
-
"onUpdate:modelValue": n[0] || (n[0] = (e) => C.value = e),
|
|
553
|
-
class: "eda-search",
|
|
554
|
-
type: "search",
|
|
555
|
-
placeholder: "筛选路径、角色、属性或文本"
|
|
556
|
-
}, null, 512), [[b, C.value]]),
|
|
557
|
-
d("div", Te, [(h(!0), u(s, null, _(j.value, (e) => {
|
|
558
|
-
var t;
|
|
559
|
-
return h(), u("button", {
|
|
560
|
-
key: e.path,
|
|
561
|
-
type: "button",
|
|
562
|
-
class: p(["eda-stream", { active: ((t = S.value) == null ? void 0 : t.path) === e.path }]),
|
|
563
|
-
onClick: (t) => L(e)
|
|
564
|
-
}, [
|
|
565
|
-
d("span", { "data-role": e.role }, v(E(e.role)), 9, De),
|
|
566
|
-
d("strong", null, v(e.name || e.path), 1),
|
|
567
|
-
d("em", null, v(e.path), 1),
|
|
568
|
-
d("small", null, v(D(e.kind)) + " · " + v(y(a)(e.size)), 1)
|
|
569
|
-
], 10, Ee);
|
|
570
|
-
}), 128))])
|
|
571
|
-
]), d("main", Oe, [
|
|
572
|
-
d("section", ke, [d("div", Ae, [n[6] || (n[6] = d("span", null, "解析概览", -1)), d("strong", null, v(r.value.parser.toUpperCase()) + " · " + v(y(a)(r.value.totalStreamBytes)), 1)]), d("div", je, [(h(!0), u(s, null, _(k.value, (e) => (h(), u("div", { key: e.label }, [d("span", null, v(e.label), 1), d("strong", null, v(e.value), 1)]))), 128))])]),
|
|
573
|
-
d("section", Me, [d("div", Ne, [d("div", Pe, [n[7] || (n[7] = d("span", null, "结构树", -1)), d("strong", null, v(N.value.length) + " 节点", 1)]), d("div", Fe, [(h(!0), u(s, null, _(N.value, (e) => {
|
|
574
|
-
var t;
|
|
575
|
-
return h(), u("button", {
|
|
576
|
-
key: e.id,
|
|
577
|
-
type: "button",
|
|
578
|
-
class: p({ active: O(((t = S.value) == null ? void 0 : t.path) || "") === O(e.path) }),
|
|
579
|
-
onClick: (t) => R(e)
|
|
580
|
-
}, [
|
|
581
|
-
d("span", { style: m({ paddingLeft: `${e.depth * 14}px` }) }, v(e.children.length ? "▸" : "•"), 5),
|
|
582
|
-
d("strong", null, v(e.name), 1),
|
|
583
|
-
d("em", null, v(E(e.role)), 1),
|
|
584
|
-
d("small", null, v(e.size ? y(a)(e.size) : D(e.kind)), 1)
|
|
585
|
-
], 10, Ie);
|
|
586
|
-
}), 128))])]), d("div", Le, [d("div", Re, [n[8] || (n[8] = d("span", null, "EDA 对象", -1)), d("strong", null, v(r.value.entities.length) + " 项", 1)]), A.value.length ? (h(), u("div", ze, [(h(!0), u(s, null, _(A.value, (e) => (h(), u("div", {
|
|
587
|
-
key: e.role,
|
|
588
|
-
class: "eda-entity-group"
|
|
589
|
-
}, [d("h3", null, v(e.label), 1), (h(!0), u(s, null, _(e.items, (e) => (h(), u("button", {
|
|
590
|
-
key: e.id,
|
|
591
|
-
type: "button",
|
|
592
|
-
onClick: (t) => z(e)
|
|
593
|
-
}, [
|
|
594
|
-
d("strong", null, v(e.name), 1),
|
|
595
|
-
d("span", null, v(y(a)(e.byteLength)) + " · " + v(e.streamCount) + " 条目", 1),
|
|
596
|
-
e.description ? (h(), u("p", Ve, v(e.description), 1)) : l("", !0),
|
|
597
|
-
d("dl", null, [
|
|
598
|
-
e.footprint ? (h(), u("div", He, [n[9] || (n[9] = d("dt", null, "Footprint", -1)), d("dd", null, v(e.footprint), 1)])) : l("", !0),
|
|
599
|
-
e.pins.length ? (h(), u("div", Ue, [n[10] || (n[10] = d("dt", null, "Pins", -1)), d("dd", null, v(e.pins.join(", ")), 1)])) : l("", !0),
|
|
600
|
-
e.layers.length ? (h(), u("div", We, [n[11] || (n[11] = d("dt", null, "Layers", -1)), d("dd", null, v(e.layers.join(", ")), 1)])) : l("", !0),
|
|
601
|
-
e.keywords.length ? (h(), u("div", Ge, [n[12] || (n[12] = d("dt", null, "Keywords", -1)), d("dd", null, v(e.keywords.join(", ")), 1)])) : l("", !0)
|
|
602
|
-
])
|
|
603
|
-
], 8, Be))), 128))]))), 128))])) : (h(), u("div", Ke, [...n[13] || (n[13] = [d("strong", null, "没有明确对象候选", -1), d("p", null, "仍可从结构树、属性和字符串索引中查看可读内容。", -1)])]))])]),
|
|
604
|
-
d("section", qe, [
|
|
605
|
-
d("div", Je, [n[14] || (n[14] = d("span", null, "当前条目", -1)), d("strong", null, v(((c = S.value) == null ? void 0 : c.path) || "未选择"), 1)]),
|
|
606
|
-
S.value ? (h(), u("div", $, [
|
|
607
|
-
d("span", null, v(E(S.value.role)), 1),
|
|
608
|
-
d("span", null, v(D(S.value.kind)), 1),
|
|
609
|
-
d("span", null, v(y(a)(S.value.size)), 1)
|
|
610
|
-
])) : l("", !0),
|
|
611
|
-
P.value.length ? (h(), u("div", Ye, [(h(!0), u(s, null, _(P.value, (e) => (h(), u("div", { key: `${e.source}-${e.key}-${e.value}` }, [d("span", null, v(e.key), 1), d("strong", null, v(e.value), 1)]))), 128))])) : l("", !0),
|
|
612
|
-
I.value ? (h(), u("pre", Xe, v(I.value), 1)) : (h(), u("div", Ze, [...n[15] || (n[15] = [d("strong", null, "目录条目", -1), d("p", null, "该节点用于组织下级流,没有可直接展示的文本或十六进制片段。", -1)])]))
|
|
613
|
-
]),
|
|
614
|
-
d("section", Qe, [d("div", $e, [d("div", et, [n[16] || (n[16] = d("span", null, "可读字符串", -1)), d("strong", null, v(r.value.strings.length) + " 项", 1)]), d("div", tt, [(h(!0), u(s, null, _(r.value.strings, (e, t) => (h(), u("span", { key: `${e}-${t}` }, v(e), 1))), 128))])]), d("div", nt, [
|
|
615
|
-
d("div", rt, [n[17] || (n[17] = d("span", null, "诊断", -1)), d("strong", null, v(r.value.diagnostics.length) + " 条", 1)]),
|
|
616
|
-
d("div", it, [(h(!0), u(s, null, _(r.value.diagnostics, (e) => (h(), u("p", {
|
|
617
|
-
key: `${e.code}-${e.message}`,
|
|
618
|
-
"data-level": e.level
|
|
619
|
-
}, [d("span", null, v(e.level), 1), ee(" " + v(e.message), 1)], 8, at))), 128))]),
|
|
620
|
-
F.value.length ? (h(), u("div", ot, [n[18] || (n[18] = d("strong", null, "当前条目字符串", -1)), (h(!0), u(s, null, _(F.value, (e, t) => (h(), u("span", { key: `${e}-${t}` }, v(e), 1))), 128))])) : l("", !0)
|
|
621
|
-
])])
|
|
622
|
-
])])) : l("", !0),
|
|
623
|
-
o.value ? (h(), u("div", st, [n[19] || (n[19] = d("span", null, null, -1)), d("strong", null, "正在解析 " + v(e.type.toUpperCase()) + "...", 1)])) : l("", !0),
|
|
624
|
-
f.value ? (h(), u("div", ct, [n[20] || (n[20] = d("strong", null, "EDA 预览提示", -1)), d("p", null, v(f.value), 1)])) : l("", !0)
|
|
625
|
-
]);
|
|
626
|
-
};
|
|
627
|
-
}
|
|
628
|
-
}), [["__scopeId", "data-v-9eb9b927"]]);
|
|
629
|
-
//#endregion
|
|
630
|
-
export { lt as default };
|