file-viewer3 1.0.26 → 2.0.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/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
package/dist/components/core.js
DELETED
|
@@ -1,845 +0,0 @@
|
|
|
1
|
-
import { o as e, t } from "./chunk.js";
|
|
2
|
-
var n = (/* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
3
|
-
function n(e) {
|
|
4
|
-
return e instanceof Map ? e.clear = e.delete = e.set = function() {
|
|
5
|
-
throw Error("map is read-only");
|
|
6
|
-
} : e instanceof Set && (e.add = e.clear = e.delete = function() {
|
|
7
|
-
throw Error("set is read-only");
|
|
8
|
-
}), Object.freeze(e), Object.getOwnPropertyNames(e).forEach((t) => {
|
|
9
|
-
let r = e[t], i = typeof r;
|
|
10
|
-
(i === "object" || i === "function") && !Object.isFrozen(r) && n(r);
|
|
11
|
-
}), e;
|
|
12
|
-
}
|
|
13
|
-
var r = class {
|
|
14
|
-
constructor(e) {
|
|
15
|
-
e.data === void 0 && (e.data = {}), this.data = e.data, this.isMatchIgnored = !1;
|
|
16
|
-
}
|
|
17
|
-
ignoreMatch() {
|
|
18
|
-
this.isMatchIgnored = !0;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
function i(e) {
|
|
22
|
-
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
23
|
-
}
|
|
24
|
-
function a(e, ...t) {
|
|
25
|
-
let n = Object.create(null);
|
|
26
|
-
for (let t in e) n[t] = e[t];
|
|
27
|
-
return t.forEach(function(e) {
|
|
28
|
-
for (let t in e) n[t] = e[t];
|
|
29
|
-
}), n;
|
|
30
|
-
}
|
|
31
|
-
var o = "</span>", s = (e) => !!e.scope, c = (e, { prefix: t }) => {
|
|
32
|
-
if (e.startsWith("language:")) return e.replace("language:", "language-");
|
|
33
|
-
if (e.includes(".")) {
|
|
34
|
-
let n = e.split(".");
|
|
35
|
-
return [`${t}${n.shift()}`, ...n.map((e, t) => `${e}${"_".repeat(t + 1)}`)].join(" ");
|
|
36
|
-
}
|
|
37
|
-
return `${t}${e}`;
|
|
38
|
-
}, l = class {
|
|
39
|
-
constructor(e, t) {
|
|
40
|
-
this.buffer = "", this.classPrefix = t.classPrefix, e.walk(this);
|
|
41
|
-
}
|
|
42
|
-
addText(e) {
|
|
43
|
-
this.buffer += i(e);
|
|
44
|
-
}
|
|
45
|
-
openNode(e) {
|
|
46
|
-
if (!s(e)) return;
|
|
47
|
-
let t = c(e.scope, { prefix: this.classPrefix });
|
|
48
|
-
this.span(t);
|
|
49
|
-
}
|
|
50
|
-
closeNode(e) {
|
|
51
|
-
s(e) && (this.buffer += o);
|
|
52
|
-
}
|
|
53
|
-
value() {
|
|
54
|
-
return this.buffer;
|
|
55
|
-
}
|
|
56
|
-
span(e) {
|
|
57
|
-
this.buffer += `<span class="${e}">`;
|
|
58
|
-
}
|
|
59
|
-
}, u = (e = {}) => {
|
|
60
|
-
let t = { children: [] };
|
|
61
|
-
return Object.assign(t, e), t;
|
|
62
|
-
}, d = class e {
|
|
63
|
-
constructor() {
|
|
64
|
-
this.rootNode = u(), this.stack = [this.rootNode];
|
|
65
|
-
}
|
|
66
|
-
get top() {
|
|
67
|
-
return this.stack[this.stack.length - 1];
|
|
68
|
-
}
|
|
69
|
-
get root() {
|
|
70
|
-
return this.rootNode;
|
|
71
|
-
}
|
|
72
|
-
add(e) {
|
|
73
|
-
this.top.children.push(e);
|
|
74
|
-
}
|
|
75
|
-
openNode(e) {
|
|
76
|
-
let t = u({ scope: e });
|
|
77
|
-
this.add(t), this.stack.push(t);
|
|
78
|
-
}
|
|
79
|
-
closeNode() {
|
|
80
|
-
if (this.stack.length > 1) return this.stack.pop();
|
|
81
|
-
}
|
|
82
|
-
closeAllNodes() {
|
|
83
|
-
for (; this.closeNode(););
|
|
84
|
-
}
|
|
85
|
-
toJSON() {
|
|
86
|
-
return JSON.stringify(this.rootNode, null, 4);
|
|
87
|
-
}
|
|
88
|
-
walk(e) {
|
|
89
|
-
return this.constructor._walk(e, this.rootNode);
|
|
90
|
-
}
|
|
91
|
-
static _walk(e, t) {
|
|
92
|
-
return typeof t == "string" ? e.addText(t) : t.children && (e.openNode(t), t.children.forEach((t) => this._walk(e, t)), e.closeNode(t)), e;
|
|
93
|
-
}
|
|
94
|
-
static _collapse(t) {
|
|
95
|
-
typeof t != "string" && t.children && (t.children.every((e) => typeof e == "string") ? t.children = [t.children.join("")] : t.children.forEach((t) => {
|
|
96
|
-
e._collapse(t);
|
|
97
|
-
}));
|
|
98
|
-
}
|
|
99
|
-
}, f = class extends d {
|
|
100
|
-
constructor(e) {
|
|
101
|
-
super(), this.options = e;
|
|
102
|
-
}
|
|
103
|
-
addText(e) {
|
|
104
|
-
e !== "" && this.add(e);
|
|
105
|
-
}
|
|
106
|
-
startScope(e) {
|
|
107
|
-
this.openNode(e);
|
|
108
|
-
}
|
|
109
|
-
endScope() {
|
|
110
|
-
this.closeNode();
|
|
111
|
-
}
|
|
112
|
-
__addSublanguage(e, t) {
|
|
113
|
-
let n = e.root;
|
|
114
|
-
t && (n.scope = `language:${t}`), this.add(n);
|
|
115
|
-
}
|
|
116
|
-
toHTML() {
|
|
117
|
-
return new l(this, this.options).value();
|
|
118
|
-
}
|
|
119
|
-
finalize() {
|
|
120
|
-
return this.closeAllNodes(), !0;
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
function p(e) {
|
|
124
|
-
return e ? typeof e == "string" ? e : e.source : null;
|
|
125
|
-
}
|
|
126
|
-
function m(e) {
|
|
127
|
-
return _("(?=", e, ")");
|
|
128
|
-
}
|
|
129
|
-
function h(e) {
|
|
130
|
-
return _("(?:", e, ")*");
|
|
131
|
-
}
|
|
132
|
-
function g(e) {
|
|
133
|
-
return _("(?:", e, ")?");
|
|
134
|
-
}
|
|
135
|
-
function _(...e) {
|
|
136
|
-
return e.map((e) => p(e)).join("");
|
|
137
|
-
}
|
|
138
|
-
function v(e) {
|
|
139
|
-
let t = e[e.length - 1];
|
|
140
|
-
return typeof t == "object" && t.constructor === Object ? (e.splice(e.length - 1, 1), t) : {};
|
|
141
|
-
}
|
|
142
|
-
function y(...e) {
|
|
143
|
-
return "(" + (v(e).capture ? "" : "?:") + e.map((e) => p(e)).join("|") + ")";
|
|
144
|
-
}
|
|
145
|
-
function b(e) {
|
|
146
|
-
return RegExp(e.toString() + "|").exec("").length - 1;
|
|
147
|
-
}
|
|
148
|
-
function ee(e, t) {
|
|
149
|
-
let n = e && e.exec(t);
|
|
150
|
-
return n && n.index === 0;
|
|
151
|
-
}
|
|
152
|
-
var x = /\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;
|
|
153
|
-
function S(e, { joinWith: t }) {
|
|
154
|
-
let n = 0;
|
|
155
|
-
return e.map((e) => {
|
|
156
|
-
n += 1;
|
|
157
|
-
let t = n, r = p(e), i = "";
|
|
158
|
-
for (; r.length > 0;) {
|
|
159
|
-
let e = x.exec(r);
|
|
160
|
-
if (!e) {
|
|
161
|
-
i += r;
|
|
162
|
-
break;
|
|
163
|
-
}
|
|
164
|
-
i += r.substring(0, e.index), r = r.substring(e.index + e[0].length), e[0][0] === "\\" && e[1] ? i += "\\" + String(Number(e[1]) + t) : (i += e[0], e[0] === "(" && n++);
|
|
165
|
-
}
|
|
166
|
-
return i;
|
|
167
|
-
}).map((e) => `(${e})`).join(t);
|
|
168
|
-
}
|
|
169
|
-
var C = /\b\B/, w = "[a-zA-Z]\\w*", T = "[a-zA-Z_]\\w*", E = "\\b\\d+(\\.\\d+)?", D = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", O = "\\b(0b[01]+)", k = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", A = (e = {}) => {
|
|
170
|
-
let t = /^#![ ]*\//;
|
|
171
|
-
return e.binary && (e.begin = _(t, /.*\b/, e.binary, /\b.*/)), a({
|
|
172
|
-
scope: "meta",
|
|
173
|
-
begin: t,
|
|
174
|
-
end: /$/,
|
|
175
|
-
relevance: 0,
|
|
176
|
-
"on:begin": (e, t) => {
|
|
177
|
-
e.index !== 0 && t.ignoreMatch();
|
|
178
|
-
}
|
|
179
|
-
}, e);
|
|
180
|
-
}, j = {
|
|
181
|
-
begin: "\\\\[\\s\\S]",
|
|
182
|
-
relevance: 0
|
|
183
|
-
}, M = {
|
|
184
|
-
scope: "string",
|
|
185
|
-
begin: "'",
|
|
186
|
-
end: "'",
|
|
187
|
-
illegal: "\\n",
|
|
188
|
-
contains: [j]
|
|
189
|
-
}, N = {
|
|
190
|
-
scope: "string",
|
|
191
|
-
begin: "\"",
|
|
192
|
-
end: "\"",
|
|
193
|
-
illegal: "\\n",
|
|
194
|
-
contains: [j]
|
|
195
|
-
}, P = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }, F = function(e, t, n = {}) {
|
|
196
|
-
let r = a({
|
|
197
|
-
scope: "comment",
|
|
198
|
-
begin: e,
|
|
199
|
-
end: t,
|
|
200
|
-
contains: []
|
|
201
|
-
}, n);
|
|
202
|
-
r.contains.push({
|
|
203
|
-
scope: "doctag",
|
|
204
|
-
begin: "[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",
|
|
205
|
-
end: /(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,
|
|
206
|
-
excludeBegin: !0,
|
|
207
|
-
relevance: 0
|
|
208
|
-
});
|
|
209
|
-
let i = y("I", "a", "is", "so", "us", "to", "at", "if", "in", "it", "on", /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, /[A-Za-z]+[-][a-z]+/, /[A-Za-z][a-z]{2,}/);
|
|
210
|
-
return r.contains.push({ begin: _(/[ ]+/, "(", i, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), r;
|
|
211
|
-
}, I = F("//", "$"), L = F("/\\*", "\\*/"), R = F("#", "$"), z = /*#__PURE__*/ Object.freeze({
|
|
212
|
-
__proto__: null,
|
|
213
|
-
APOS_STRING_MODE: M,
|
|
214
|
-
BACKSLASH_ESCAPE: j,
|
|
215
|
-
BINARY_NUMBER_MODE: {
|
|
216
|
-
scope: "number",
|
|
217
|
-
begin: O,
|
|
218
|
-
relevance: 0
|
|
219
|
-
},
|
|
220
|
-
BINARY_NUMBER_RE: O,
|
|
221
|
-
COMMENT: F,
|
|
222
|
-
C_BLOCK_COMMENT_MODE: L,
|
|
223
|
-
C_LINE_COMMENT_MODE: I,
|
|
224
|
-
C_NUMBER_MODE: {
|
|
225
|
-
scope: "number",
|
|
226
|
-
begin: D,
|
|
227
|
-
relevance: 0
|
|
228
|
-
},
|
|
229
|
-
C_NUMBER_RE: D,
|
|
230
|
-
END_SAME_AS_BEGIN: function(e) {
|
|
231
|
-
return Object.assign(e, {
|
|
232
|
-
"on:begin": (e, t) => {
|
|
233
|
-
t.data._beginMatch = e[1];
|
|
234
|
-
},
|
|
235
|
-
"on:end": (e, t) => {
|
|
236
|
-
t.data._beginMatch !== e[1] && t.ignoreMatch();
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
},
|
|
240
|
-
HASH_COMMENT_MODE: R,
|
|
241
|
-
IDENT_RE: w,
|
|
242
|
-
MATCH_NOTHING_RE: C,
|
|
243
|
-
METHOD_GUARD: {
|
|
244
|
-
begin: "\\.\\s*[a-zA-Z_]\\w*",
|
|
245
|
-
relevance: 0
|
|
246
|
-
},
|
|
247
|
-
NUMBER_MODE: {
|
|
248
|
-
scope: "number",
|
|
249
|
-
begin: E,
|
|
250
|
-
relevance: 0
|
|
251
|
-
},
|
|
252
|
-
NUMBER_RE: E,
|
|
253
|
-
PHRASAL_WORDS_MODE: P,
|
|
254
|
-
QUOTE_STRING_MODE: N,
|
|
255
|
-
REGEXP_MODE: {
|
|
256
|
-
scope: "regexp",
|
|
257
|
-
begin: /\/(?=[^/\n]*\/)/,
|
|
258
|
-
end: /\/[gimuy]*/,
|
|
259
|
-
contains: [j, {
|
|
260
|
-
begin: /\[/,
|
|
261
|
-
end: /\]/,
|
|
262
|
-
relevance: 0,
|
|
263
|
-
contains: [j]
|
|
264
|
-
}]
|
|
265
|
-
},
|
|
266
|
-
RE_STARTERS_RE: k,
|
|
267
|
-
SHEBANG: A,
|
|
268
|
-
TITLE_MODE: {
|
|
269
|
-
scope: "title",
|
|
270
|
-
begin: w,
|
|
271
|
-
relevance: 0
|
|
272
|
-
},
|
|
273
|
-
UNDERSCORE_IDENT_RE: T,
|
|
274
|
-
UNDERSCORE_TITLE_MODE: {
|
|
275
|
-
scope: "title",
|
|
276
|
-
begin: T,
|
|
277
|
-
relevance: 0
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
function B(e, t) {
|
|
281
|
-
e.input[e.index - 1] === "." && t.ignoreMatch();
|
|
282
|
-
}
|
|
283
|
-
function te(e, t) {
|
|
284
|
-
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
285
|
-
}
|
|
286
|
-
function ne(e, t) {
|
|
287
|
-
t && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = B, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
288
|
-
}
|
|
289
|
-
function re(e, t) {
|
|
290
|
-
Array.isArray(e.illegal) && (e.illegal = y(...e.illegal));
|
|
291
|
-
}
|
|
292
|
-
function ie(e, t) {
|
|
293
|
-
if (e.match) {
|
|
294
|
-
if (e.begin || e.end) throw Error("begin & end are not supported with match");
|
|
295
|
-
e.begin = e.match, delete e.match;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
function ae(e, t) {
|
|
299
|
-
e.relevance === void 0 && (e.relevance = 1);
|
|
300
|
-
}
|
|
301
|
-
var oe = (e, t) => {
|
|
302
|
-
if (!e.beforeMatch) return;
|
|
303
|
-
if (e.starts) throw Error("beforeMatch cannot be used with starts");
|
|
304
|
-
let n = Object.assign({}, e);
|
|
305
|
-
Object.keys(e).forEach((t) => {
|
|
306
|
-
delete e[t];
|
|
307
|
-
}), e.keywords = n.keywords, e.begin = _(n.beforeMatch, m(n.begin)), e.starts = {
|
|
308
|
-
relevance: 0,
|
|
309
|
-
contains: [Object.assign(n, { endsParent: !0 })]
|
|
310
|
-
}, e.relevance = 0, delete n.beforeMatch;
|
|
311
|
-
}, se = [
|
|
312
|
-
"of",
|
|
313
|
-
"and",
|
|
314
|
-
"for",
|
|
315
|
-
"in",
|
|
316
|
-
"not",
|
|
317
|
-
"or",
|
|
318
|
-
"if",
|
|
319
|
-
"then",
|
|
320
|
-
"parent",
|
|
321
|
-
"list",
|
|
322
|
-
"value"
|
|
323
|
-
], ce = "keyword";
|
|
324
|
-
function V(e, t, n = ce) {
|
|
325
|
-
let r = Object.create(null);
|
|
326
|
-
return typeof e == "string" ? i(n, e.split(" ")) : Array.isArray(e) ? i(n, e) : Object.keys(e).forEach(function(n) {
|
|
327
|
-
Object.assign(r, V(e[n], t, n));
|
|
328
|
-
}), r;
|
|
329
|
-
function i(e, n) {
|
|
330
|
-
t && (n = n.map((e) => e.toLowerCase())), n.forEach(function(t) {
|
|
331
|
-
let n = t.split("|");
|
|
332
|
-
r[n[0]] = [e, le(n[0], n[1])];
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
function le(e, t) {
|
|
337
|
-
return t ? Number(t) : +!ue(e);
|
|
338
|
-
}
|
|
339
|
-
function ue(e) {
|
|
340
|
-
return se.includes(e.toLowerCase());
|
|
341
|
-
}
|
|
342
|
-
var H = {}, U = (e) => {
|
|
343
|
-
console.error(e);
|
|
344
|
-
}, W = (e, ...t) => {
|
|
345
|
-
console.log(`WARN: ${e}`, ...t);
|
|
346
|
-
}, G = (e, t) => {
|
|
347
|
-
H[`${e}/${t}`] || (console.log(`Deprecated as of ${e}. ${t}`), H[`${e}/${t}`] = !0);
|
|
348
|
-
}, K = /* @__PURE__ */ Error();
|
|
349
|
-
function q(e, t, { key: n }) {
|
|
350
|
-
let r = 0, i = e[n], a = {}, o = {};
|
|
351
|
-
for (let e = 1; e <= t.length; e++) o[e + r] = i[e], a[e + r] = !0, r += b(t[e - 1]);
|
|
352
|
-
e[n] = o, e[n]._emit = a, e[n]._multi = !0;
|
|
353
|
-
}
|
|
354
|
-
function de(e) {
|
|
355
|
-
if (Array.isArray(e.begin)) {
|
|
356
|
-
if (e.skip || e.excludeBegin || e.returnBegin) throw U("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), K;
|
|
357
|
-
if (typeof e.beginScope != "object" || e.beginScope === null) throw U("beginScope must be object"), K;
|
|
358
|
-
q(e, e.begin, { key: "beginScope" }), e.begin = S(e.begin, { joinWith: "" });
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
function fe(e) {
|
|
362
|
-
if (Array.isArray(e.end)) {
|
|
363
|
-
if (e.skip || e.excludeEnd || e.returnEnd) throw U("skip, excludeEnd, returnEnd not compatible with endScope: {}"), K;
|
|
364
|
-
if (typeof e.endScope != "object" || e.endScope === null) throw U("endScope must be object"), K;
|
|
365
|
-
q(e, e.end, { key: "endScope" }), e.end = S(e.end, { joinWith: "" });
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
function pe(e) {
|
|
369
|
-
e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
|
|
370
|
-
}
|
|
371
|
-
function me(e) {
|
|
372
|
-
pe(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), de(e), fe(e);
|
|
373
|
-
}
|
|
374
|
-
function he(e) {
|
|
375
|
-
function t(t, n) {
|
|
376
|
-
return new RegExp(p(t), "m" + (e.case_insensitive ? "i" : "") + (e.unicodeRegex ? "u" : "") + (n ? "g" : ""));
|
|
377
|
-
}
|
|
378
|
-
class n {
|
|
379
|
-
constructor() {
|
|
380
|
-
this.matchIndexes = {}, this.regexes = [], this.matchAt = 1, this.position = 0;
|
|
381
|
-
}
|
|
382
|
-
addRule(e, t) {
|
|
383
|
-
t.position = this.position++, this.matchIndexes[this.matchAt] = t, this.regexes.push([t, e]), this.matchAt += b(e) + 1;
|
|
384
|
-
}
|
|
385
|
-
compile() {
|
|
386
|
-
this.regexes.length === 0 && (this.exec = () => null);
|
|
387
|
-
let e = this.regexes.map((e) => e[1]);
|
|
388
|
-
this.matcherRe = t(S(e, { joinWith: "|" }), !0), this.lastIndex = 0;
|
|
389
|
-
}
|
|
390
|
-
exec(e) {
|
|
391
|
-
this.matcherRe.lastIndex = this.lastIndex;
|
|
392
|
-
let t = this.matcherRe.exec(e);
|
|
393
|
-
if (!t) return null;
|
|
394
|
-
let n = t.findIndex((e, t) => t > 0 && e !== void 0), r = this.matchIndexes[n];
|
|
395
|
-
return t.splice(0, n), Object.assign(t, r);
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
class r {
|
|
399
|
-
constructor() {
|
|
400
|
-
this.rules = [], this.multiRegexes = [], this.count = 0, this.lastIndex = 0, this.regexIndex = 0;
|
|
401
|
-
}
|
|
402
|
-
getMatcher(e) {
|
|
403
|
-
if (this.multiRegexes[e]) return this.multiRegexes[e];
|
|
404
|
-
let t = new n();
|
|
405
|
-
return this.rules.slice(e).forEach(([e, n]) => t.addRule(e, n)), t.compile(), this.multiRegexes[e] = t, t;
|
|
406
|
-
}
|
|
407
|
-
resumingScanAtSamePosition() {
|
|
408
|
-
return this.regexIndex !== 0;
|
|
409
|
-
}
|
|
410
|
-
considerAll() {
|
|
411
|
-
this.regexIndex = 0;
|
|
412
|
-
}
|
|
413
|
-
addRule(e, t) {
|
|
414
|
-
this.rules.push([e, t]), t.type === "begin" && this.count++;
|
|
415
|
-
}
|
|
416
|
-
exec(e) {
|
|
417
|
-
let t = this.getMatcher(this.regexIndex);
|
|
418
|
-
t.lastIndex = this.lastIndex;
|
|
419
|
-
let n = t.exec(e);
|
|
420
|
-
if (this.resumingScanAtSamePosition() && !(n && n.index === this.lastIndex)) {
|
|
421
|
-
let t = this.getMatcher(0);
|
|
422
|
-
t.lastIndex = this.lastIndex + 1, n = t.exec(e);
|
|
423
|
-
}
|
|
424
|
-
return n && (this.regexIndex += n.position + 1, this.regexIndex === this.count && this.considerAll()), n;
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
function i(e) {
|
|
428
|
-
let t = new r();
|
|
429
|
-
return e.contains.forEach((e) => t.addRule(e.begin, {
|
|
430
|
-
rule: e,
|
|
431
|
-
type: "begin"
|
|
432
|
-
})), e.terminatorEnd && t.addRule(e.terminatorEnd, { type: "end" }), e.illegal && t.addRule(e.illegal, { type: "illegal" }), t;
|
|
433
|
-
}
|
|
434
|
-
function o(n, r) {
|
|
435
|
-
let a = n;
|
|
436
|
-
if (n.isCompiled) return a;
|
|
437
|
-
[
|
|
438
|
-
te,
|
|
439
|
-
ie,
|
|
440
|
-
me,
|
|
441
|
-
oe
|
|
442
|
-
].forEach((e) => e(n, r)), e.compilerExtensions.forEach((e) => e(n, r)), n.__beforeBegin = null, [
|
|
443
|
-
ne,
|
|
444
|
-
re,
|
|
445
|
-
ae
|
|
446
|
-
].forEach((e) => e(n, r)), n.isCompiled = !0;
|
|
447
|
-
let s = null;
|
|
448
|
-
return typeof n.keywords == "object" && n.keywords.$pattern && (n.keywords = Object.assign({}, n.keywords), s = n.keywords.$pattern, delete n.keywords.$pattern), s = s || /\w+/, n.keywords && (n.keywords = V(n.keywords, e.case_insensitive)), a.keywordPatternRe = t(s, !0), r && (n.begin || (n.begin = /\B|\b/), a.beginRe = t(a.begin), !n.end && !n.endsWithParent && (n.end = /\B|\b/), n.end && (a.endRe = t(a.end)), a.terminatorEnd = p(a.end) || "", n.endsWithParent && r.terminatorEnd && (a.terminatorEnd += (n.end ? "|" : "") + r.terminatorEnd)), n.illegal && (a.illegalRe = t(n.illegal)), n.contains || (n.contains = []), n.contains = [].concat(...n.contains.map(function(e) {
|
|
449
|
-
return ge(e === "self" ? n : e);
|
|
450
|
-
})), n.contains.forEach(function(e) {
|
|
451
|
-
o(e, a);
|
|
452
|
-
}), n.starts && o(n.starts, r), a.matcher = i(a), a;
|
|
453
|
-
}
|
|
454
|
-
if (e.compilerExtensions || (e.compilerExtensions = []), e.contains && e.contains.includes("self")) throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");
|
|
455
|
-
return e.classNameAliases = a(e.classNameAliases || {}), o(e);
|
|
456
|
-
}
|
|
457
|
-
function J(e) {
|
|
458
|
-
return e ? e.endsWithParent || J(e.starts) : !1;
|
|
459
|
-
}
|
|
460
|
-
function ge(e) {
|
|
461
|
-
return e.variants && !e.cachedVariants && (e.cachedVariants = e.variants.map(function(t) {
|
|
462
|
-
return a(e, { variants: null }, t);
|
|
463
|
-
})), e.cachedVariants ? e.cachedVariants : J(e) ? a(e, { starts: e.starts ? a(e.starts) : null }) : Object.isFrozen(e) ? a(e) : e;
|
|
464
|
-
}
|
|
465
|
-
var _e = "11.11.1", ve = class extends Error {
|
|
466
|
-
constructor(e, t) {
|
|
467
|
-
super(e), this.name = "HTMLInjectionError", this.html = t;
|
|
468
|
-
}
|
|
469
|
-
}, Y = i, X = a, Z = Symbol("nomatch"), ye = 7, Q = function(e) {
|
|
470
|
-
let t = Object.create(null), i = Object.create(null), a = [], o = !0, s = "Could not find the language '{}', did you forget to load/include a language module?", c = {
|
|
471
|
-
disableAutodetect: !0,
|
|
472
|
-
name: "Plain text",
|
|
473
|
-
contains: []
|
|
474
|
-
}, l = {
|
|
475
|
-
ignoreUnescapedHTML: !1,
|
|
476
|
-
throwUnescapedHTML: !1,
|
|
477
|
-
noHighlightRe: /^(no-?highlight)$/i,
|
|
478
|
-
languageDetectRe: /\blang(?:uage)?-([\w-]+)\b/i,
|
|
479
|
-
classPrefix: "hljs-",
|
|
480
|
-
cssSelector: "pre code",
|
|
481
|
-
languages: null,
|
|
482
|
-
__emitter: f
|
|
483
|
-
};
|
|
484
|
-
function u(e) {
|
|
485
|
-
return l.noHighlightRe.test(e);
|
|
486
|
-
}
|
|
487
|
-
function d(e) {
|
|
488
|
-
let t = e.className + " ";
|
|
489
|
-
t += e.parentNode ? e.parentNode.className : "";
|
|
490
|
-
let n = l.languageDetectRe.exec(t);
|
|
491
|
-
if (n) {
|
|
492
|
-
let t = M(n[1]);
|
|
493
|
-
return t || (W(s.replace("{}", n[1])), W("Falling back to no-highlight mode for this block.", e)), t ? n[1] : "no-highlight";
|
|
494
|
-
}
|
|
495
|
-
return t.split(/\s+/).find((e) => u(e) || M(e));
|
|
496
|
-
}
|
|
497
|
-
function p(e, t, n) {
|
|
498
|
-
let r = "", i = "";
|
|
499
|
-
typeof t == "object" ? (r = e, n = t.ignoreIllegals, i = t.language) : (G("10.7.0", "highlight(lang, code, ...args) has been deprecated."), G("10.7.0", "Please use highlight(code, options) instead.\nhttps://github.com/highlightjs/highlight.js/issues/2277"), i = e, r = t), n === void 0 && (n = !0);
|
|
500
|
-
let a = {
|
|
501
|
-
code: r,
|
|
502
|
-
language: i
|
|
503
|
-
};
|
|
504
|
-
R("before:highlight", a);
|
|
505
|
-
let o = a.result ? a.result : v(a.language, a.code, n);
|
|
506
|
-
return o.code = a.code, R("after:highlight", o), o;
|
|
507
|
-
}
|
|
508
|
-
function v(e, n, i, a) {
|
|
509
|
-
let c = Object.create(null);
|
|
510
|
-
function u(e, t) {
|
|
511
|
-
return e.keywords[t];
|
|
512
|
-
}
|
|
513
|
-
function d() {
|
|
514
|
-
if (!k.keywords) {
|
|
515
|
-
j.addText(N);
|
|
516
|
-
return;
|
|
517
|
-
}
|
|
518
|
-
let e = 0;
|
|
519
|
-
k.keywordPatternRe.lastIndex = 0;
|
|
520
|
-
let t = k.keywordPatternRe.exec(N), n = "";
|
|
521
|
-
for (; t;) {
|
|
522
|
-
n += N.substring(e, t.index);
|
|
523
|
-
let r = E.case_insensitive ? t[0].toLowerCase() : t[0], i = u(k, r);
|
|
524
|
-
if (i) {
|
|
525
|
-
let [e, a] = i;
|
|
526
|
-
if (j.addText(n), n = "", c[r] = (c[r] || 0) + 1, c[r] <= ye && (P += a), e.startsWith("_")) n += t[0];
|
|
527
|
-
else {
|
|
528
|
-
let n = E.classNameAliases[e] || e;
|
|
529
|
-
m(t[0], n);
|
|
530
|
-
}
|
|
531
|
-
} else n += t[0];
|
|
532
|
-
e = k.keywordPatternRe.lastIndex, t = k.keywordPatternRe.exec(N);
|
|
533
|
-
}
|
|
534
|
-
n += N.substring(e), j.addText(n);
|
|
535
|
-
}
|
|
536
|
-
function f() {
|
|
537
|
-
if (N === "") return;
|
|
538
|
-
let e = null;
|
|
539
|
-
if (typeof k.subLanguage == "string") {
|
|
540
|
-
if (!t[k.subLanguage]) {
|
|
541
|
-
j.addText(N);
|
|
542
|
-
return;
|
|
543
|
-
}
|
|
544
|
-
e = v(k.subLanguage, N, !0, A[k.subLanguage]), A[k.subLanguage] = e._top;
|
|
545
|
-
} else e = x(N, k.subLanguage.length ? k.subLanguage : null);
|
|
546
|
-
k.relevance > 0 && (P += e.relevance), j.__addSublanguage(e._emitter, e.language);
|
|
547
|
-
}
|
|
548
|
-
function p() {
|
|
549
|
-
k.subLanguage == null ? d() : f(), N = "";
|
|
550
|
-
}
|
|
551
|
-
function m(e, t) {
|
|
552
|
-
e !== "" && (j.startScope(t), j.addText(e), j.endScope());
|
|
553
|
-
}
|
|
554
|
-
function h(e, t) {
|
|
555
|
-
let n = 1, r = t.length - 1;
|
|
556
|
-
for (; n <= r;) {
|
|
557
|
-
if (!e._emit[n]) {
|
|
558
|
-
n++;
|
|
559
|
-
continue;
|
|
560
|
-
}
|
|
561
|
-
let r = E.classNameAliases[e[n]] || e[n], i = t[n];
|
|
562
|
-
r ? m(i, r) : (N = i, d(), N = ""), n++;
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
function g(e, t) {
|
|
566
|
-
return e.scope && typeof e.scope == "string" && j.openNode(E.classNameAliases[e.scope] || e.scope), e.beginScope && (e.beginScope._wrap ? (m(N, E.classNameAliases[e.beginScope._wrap] || e.beginScope._wrap), N = "") : e.beginScope._multi && (h(e.beginScope, t), N = "")), k = Object.create(e, { parent: { value: k } }), k;
|
|
567
|
-
}
|
|
568
|
-
function _(e, t, n) {
|
|
569
|
-
let i = ee(e.endRe, n);
|
|
570
|
-
if (i) {
|
|
571
|
-
if (e["on:end"]) {
|
|
572
|
-
let n = new r(e);
|
|
573
|
-
e["on:end"](t, n), n.isMatchIgnored && (i = !1);
|
|
574
|
-
}
|
|
575
|
-
if (i) {
|
|
576
|
-
for (; e.endsParent && e.parent;) e = e.parent;
|
|
577
|
-
return e;
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
if (e.endsWithParent) return _(e.parent, t, n);
|
|
581
|
-
}
|
|
582
|
-
function y(e) {
|
|
583
|
-
return k.matcher.regexIndex === 0 ? (N += e[0], 1) : (L = !0, 0);
|
|
584
|
-
}
|
|
585
|
-
function b(e) {
|
|
586
|
-
let t = e[0], n = e.rule, i = new r(n), a = [n.__beforeBegin, n["on:begin"]];
|
|
587
|
-
for (let n of a) if (n && (n(e, i), i.isMatchIgnored)) return y(t);
|
|
588
|
-
return n.skip ? N += t : (n.excludeBegin && (N += t), p(), !n.returnBegin && !n.excludeBegin && (N = t)), g(n, e), n.returnBegin ? 0 : t.length;
|
|
589
|
-
}
|
|
590
|
-
function S(e) {
|
|
591
|
-
let t = e[0], r = n.substring(e.index), i = _(k, e, r);
|
|
592
|
-
if (!i) return Z;
|
|
593
|
-
let a = k;
|
|
594
|
-
k.endScope && k.endScope._wrap ? (p(), m(t, k.endScope._wrap)) : k.endScope && k.endScope._multi ? (p(), h(k.endScope, e)) : a.skip ? N += t : (a.returnEnd || a.excludeEnd || (N += t), p(), a.excludeEnd && (N = t));
|
|
595
|
-
do
|
|
596
|
-
k.scope && j.closeNode(), !k.skip && !k.subLanguage && (P += k.relevance), k = k.parent;
|
|
597
|
-
while (k !== i.parent);
|
|
598
|
-
return i.starts && g(i.starts, e), a.returnEnd ? 0 : t.length;
|
|
599
|
-
}
|
|
600
|
-
function C() {
|
|
601
|
-
let e = [];
|
|
602
|
-
for (let t = k; t !== E; t = t.parent) t.scope && e.unshift(t.scope);
|
|
603
|
-
e.forEach((e) => j.openNode(e));
|
|
604
|
-
}
|
|
605
|
-
let w = {};
|
|
606
|
-
function T(t, r) {
|
|
607
|
-
let a = r && r[0];
|
|
608
|
-
if (N += t, a == null) return p(), 0;
|
|
609
|
-
if (w.type === "begin" && r.type === "end" && w.index === r.index && a === "") {
|
|
610
|
-
if (N += n.slice(r.index, r.index + 1), !o) {
|
|
611
|
-
let t = /* @__PURE__ */ Error(`0 width match regex (${e})`);
|
|
612
|
-
throw t.languageName = e, t.badRule = w.rule, t;
|
|
613
|
-
}
|
|
614
|
-
return 1;
|
|
615
|
-
}
|
|
616
|
-
if (w = r, r.type === "begin") return b(r);
|
|
617
|
-
if (r.type === "illegal" && !i) {
|
|
618
|
-
let e = /* @__PURE__ */ Error("Illegal lexeme \"" + a + "\" for mode \"" + (k.scope || "<unnamed>") + "\"");
|
|
619
|
-
throw e.mode = k, e;
|
|
620
|
-
} else if (r.type === "end") {
|
|
621
|
-
let e = S(r);
|
|
622
|
-
if (e !== Z) return e;
|
|
623
|
-
}
|
|
624
|
-
if (r.type === "illegal" && a === "") return N += "\n", 1;
|
|
625
|
-
if (I > 1e5 && I > r.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
|
|
626
|
-
return N += a, a.length;
|
|
627
|
-
}
|
|
628
|
-
let E = M(e);
|
|
629
|
-
if (!E) throw U(s.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
630
|
-
let D = he(E), O = "", k = a || D, A = {}, j = new l.__emitter(l);
|
|
631
|
-
C();
|
|
632
|
-
let N = "", P = 0, F = 0, I = 0, L = !1;
|
|
633
|
-
try {
|
|
634
|
-
if (E.__emitTokens) E.__emitTokens(n, j);
|
|
635
|
-
else {
|
|
636
|
-
for (k.matcher.considerAll();;) {
|
|
637
|
-
I++, L ? L = !1 : k.matcher.considerAll(), k.matcher.lastIndex = F;
|
|
638
|
-
let e = k.matcher.exec(n);
|
|
639
|
-
if (!e) break;
|
|
640
|
-
let t = T(n.substring(F, e.index), e);
|
|
641
|
-
F = e.index + t;
|
|
642
|
-
}
|
|
643
|
-
T(n.substring(F));
|
|
644
|
-
}
|
|
645
|
-
return j.finalize(), O = j.toHTML(), {
|
|
646
|
-
language: e,
|
|
647
|
-
value: O,
|
|
648
|
-
relevance: P,
|
|
649
|
-
illegal: !1,
|
|
650
|
-
_emitter: j,
|
|
651
|
-
_top: k
|
|
652
|
-
};
|
|
653
|
-
} catch (t) {
|
|
654
|
-
if (t.message && t.message.includes("Illegal")) return {
|
|
655
|
-
language: e,
|
|
656
|
-
value: Y(n),
|
|
657
|
-
illegal: !0,
|
|
658
|
-
relevance: 0,
|
|
659
|
-
_illegalBy: {
|
|
660
|
-
message: t.message,
|
|
661
|
-
index: F,
|
|
662
|
-
context: n.slice(F - 100, F + 100),
|
|
663
|
-
mode: t.mode,
|
|
664
|
-
resultSoFar: O
|
|
665
|
-
},
|
|
666
|
-
_emitter: j
|
|
667
|
-
};
|
|
668
|
-
if (o) return {
|
|
669
|
-
language: e,
|
|
670
|
-
value: Y(n),
|
|
671
|
-
illegal: !1,
|
|
672
|
-
relevance: 0,
|
|
673
|
-
errorRaised: t,
|
|
674
|
-
_emitter: j,
|
|
675
|
-
_top: k
|
|
676
|
-
};
|
|
677
|
-
throw t;
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
function b(e) {
|
|
681
|
-
let t = {
|
|
682
|
-
value: Y(e),
|
|
683
|
-
illegal: !1,
|
|
684
|
-
relevance: 0,
|
|
685
|
-
_top: c,
|
|
686
|
-
_emitter: new l.__emitter(l)
|
|
687
|
-
};
|
|
688
|
-
return t._emitter.addText(e), t;
|
|
689
|
-
}
|
|
690
|
-
function x(e, n) {
|
|
691
|
-
n = n || l.languages || Object.keys(t);
|
|
692
|
-
let r = b(e), i = n.filter(M).filter(P).map((t) => v(t, e, !1));
|
|
693
|
-
i.unshift(r);
|
|
694
|
-
let [a, o] = i.sort((e, t) => {
|
|
695
|
-
if (e.relevance !== t.relevance) return t.relevance - e.relevance;
|
|
696
|
-
if (e.language && t.language) {
|
|
697
|
-
if (M(e.language).supersetOf === t.language) return 1;
|
|
698
|
-
if (M(t.language).supersetOf === e.language) return -1;
|
|
699
|
-
}
|
|
700
|
-
return 0;
|
|
701
|
-
}), s = a;
|
|
702
|
-
return s.secondBest = o, s;
|
|
703
|
-
}
|
|
704
|
-
function S(e, t, n) {
|
|
705
|
-
let r = t && i[t] || n;
|
|
706
|
-
e.classList.add("hljs"), e.classList.add(`language-${r}`);
|
|
707
|
-
}
|
|
708
|
-
function C(e) {
|
|
709
|
-
let t = null, n = d(e);
|
|
710
|
-
if (u(n)) return;
|
|
711
|
-
if (R("before:highlightElement", {
|
|
712
|
-
el: e,
|
|
713
|
-
language: n
|
|
714
|
-
}), e.dataset.highlighted) {
|
|
715
|
-
console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.", e);
|
|
716
|
-
return;
|
|
717
|
-
}
|
|
718
|
-
if (e.children.length > 0 && (l.ignoreUnescapedHTML || (console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."), console.warn("https://github.com/highlightjs/highlight.js/wiki/security"), console.warn("The element with unescaped HTML:"), console.warn(e)), l.throwUnescapedHTML)) throw new ve("One of your code blocks includes unescaped HTML.", e.innerHTML);
|
|
719
|
-
t = e;
|
|
720
|
-
let r = t.textContent, i = n ? p(r, {
|
|
721
|
-
language: n,
|
|
722
|
-
ignoreIllegals: !0
|
|
723
|
-
}) : x(r);
|
|
724
|
-
e.innerHTML = i.value, e.dataset.highlighted = "yes", S(e, n, i.language), e.result = {
|
|
725
|
-
language: i.language,
|
|
726
|
-
re: i.relevance,
|
|
727
|
-
relevance: i.relevance
|
|
728
|
-
}, i.secondBest && (e.secondBest = {
|
|
729
|
-
language: i.secondBest.language,
|
|
730
|
-
relevance: i.secondBest.relevance
|
|
731
|
-
}), R("after:highlightElement", {
|
|
732
|
-
el: e,
|
|
733
|
-
result: i,
|
|
734
|
-
text: r
|
|
735
|
-
});
|
|
736
|
-
}
|
|
737
|
-
function w(e) {
|
|
738
|
-
l = X(l, e);
|
|
739
|
-
}
|
|
740
|
-
let T = () => {
|
|
741
|
-
O(), G("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
|
|
742
|
-
};
|
|
743
|
-
function E() {
|
|
744
|
-
O(), G("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
|
|
745
|
-
}
|
|
746
|
-
let D = !1;
|
|
747
|
-
function O() {
|
|
748
|
-
function e() {
|
|
749
|
-
O();
|
|
750
|
-
}
|
|
751
|
-
if (document.readyState === "loading") {
|
|
752
|
-
D || window.addEventListener("DOMContentLoaded", e, !1), D = !0;
|
|
753
|
-
return;
|
|
754
|
-
}
|
|
755
|
-
document.querySelectorAll(l.cssSelector).forEach(C);
|
|
756
|
-
}
|
|
757
|
-
function k(n, r) {
|
|
758
|
-
let i = null;
|
|
759
|
-
try {
|
|
760
|
-
i = r(e);
|
|
761
|
-
} catch (e) {
|
|
762
|
-
if (U("Language definition for '{}' could not be registered.".replace("{}", n)), o) U(e);
|
|
763
|
-
else throw e;
|
|
764
|
-
i = c;
|
|
765
|
-
}
|
|
766
|
-
i.name || (i.name = n), t[n] = i, i.rawDefinition = r.bind(null, e), i.aliases && N(i.aliases, { languageName: n });
|
|
767
|
-
}
|
|
768
|
-
function A(e) {
|
|
769
|
-
delete t[e];
|
|
770
|
-
for (let t of Object.keys(i)) i[t] === e && delete i[t];
|
|
771
|
-
}
|
|
772
|
-
function j() {
|
|
773
|
-
return Object.keys(t);
|
|
774
|
-
}
|
|
775
|
-
function M(e) {
|
|
776
|
-
return e = (e || "").toLowerCase(), t[e] || t[i[e]];
|
|
777
|
-
}
|
|
778
|
-
function N(e, { languageName: t }) {
|
|
779
|
-
typeof e == "string" && (e = [e]), e.forEach((e) => {
|
|
780
|
-
i[e.toLowerCase()] = t;
|
|
781
|
-
});
|
|
782
|
-
}
|
|
783
|
-
function P(e) {
|
|
784
|
-
let t = M(e);
|
|
785
|
-
return t && !t.disableAutodetect;
|
|
786
|
-
}
|
|
787
|
-
function F(e) {
|
|
788
|
-
e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (t) => {
|
|
789
|
-
e["before:highlightBlock"](Object.assign({ block: t.el }, t));
|
|
790
|
-
}), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (t) => {
|
|
791
|
-
e["after:highlightBlock"](Object.assign({ block: t.el }, t));
|
|
792
|
-
});
|
|
793
|
-
}
|
|
794
|
-
function I(e) {
|
|
795
|
-
F(e), a.push(e);
|
|
796
|
-
}
|
|
797
|
-
function L(e) {
|
|
798
|
-
let t = a.indexOf(e);
|
|
799
|
-
t !== -1 && a.splice(t, 1);
|
|
800
|
-
}
|
|
801
|
-
function R(e, t) {
|
|
802
|
-
let n = e;
|
|
803
|
-
a.forEach(function(e) {
|
|
804
|
-
e[n] && e[n](t);
|
|
805
|
-
});
|
|
806
|
-
}
|
|
807
|
-
function B(e) {
|
|
808
|
-
return G("10.7.0", "highlightBlock will be removed entirely in v12.0"), G("10.7.0", "Please use highlightElement now."), C(e);
|
|
809
|
-
}
|
|
810
|
-
Object.assign(e, {
|
|
811
|
-
highlight: p,
|
|
812
|
-
highlightAuto: x,
|
|
813
|
-
highlightAll: O,
|
|
814
|
-
highlightElement: C,
|
|
815
|
-
highlightBlock: B,
|
|
816
|
-
configure: w,
|
|
817
|
-
initHighlighting: T,
|
|
818
|
-
initHighlightingOnLoad: E,
|
|
819
|
-
registerLanguage: k,
|
|
820
|
-
unregisterLanguage: A,
|
|
821
|
-
listLanguages: j,
|
|
822
|
-
getLanguage: M,
|
|
823
|
-
registerAliases: N,
|
|
824
|
-
autoDetection: P,
|
|
825
|
-
inherit: X,
|
|
826
|
-
addPlugin: I,
|
|
827
|
-
removePlugin: L
|
|
828
|
-
}), e.debugMode = function() {
|
|
829
|
-
o = !1;
|
|
830
|
-
}, e.safeMode = function() {
|
|
831
|
-
o = !0;
|
|
832
|
-
}, e.versionString = _e, e.regex = {
|
|
833
|
-
concat: _,
|
|
834
|
-
lookahead: m,
|
|
835
|
-
either: y,
|
|
836
|
-
optional: g,
|
|
837
|
-
anyNumberOfTimes: h
|
|
838
|
-
};
|
|
839
|
-
for (let e in z) typeof z[e] == "object" && n(z[e]);
|
|
840
|
-
return Object.assign(e, z), e;
|
|
841
|
-
}, $ = Q({});
|
|
842
|
-
$.newInstance = () => Q({}), t.exports = $, $.HighlightJS = $, $.default = $;
|
|
843
|
-
})))())).default;
|
|
844
|
-
//#endregion
|
|
845
|
-
export { n as default };
|