@spteck/react-controls-v2 2.3.91 → 2.4.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/dist/LocalizationProvider-BbfcY9z3.cjs +2 -0
- package/dist/{LocalizationProvider-te5iu_6z.js → LocalizationProvider-CvSHuk0e.js} +46 -46
- package/dist/{ar-Blifx2MN.js → ar-BPzd6WER.js} +1 -1
- package/dist/ar-CBSdRr5Q.cjs +2 -0
- package/dist/az-DoZjCfF0.cjs +2 -0
- package/dist/{az-CMhDjtnj.js → az-MWX-WDgc.js} +1 -1
- package/dist/{bg-C96WirSv.js → bg-CvRGS4sF.js} +1 -1
- package/dist/bg-DI8UD_HF.cjs +2 -0
- package/dist/bs-DQhZlEEo.cjs +2 -0
- package/dist/{bs-_St1wBE_.js → bs-aXQgChJT.js} +1 -1
- package/dist/{ca-QlLcV4wf.js → ca-BCXCXzgh.js} +1 -1
- package/dist/ca-DSC32tOX.cjs +2 -0
- package/dist/components/dropDownField/IOption.d.ts +2 -0
- package/dist/components/iconButton/IconButtonProps.d.ts +2 -0
- package/dist/cs-B0C33FJt.cjs +2 -0
- package/dist/{cs-MrS2bH7F.js → cs-VHWnqXwJ.js} +1 -1
- package/dist/cy-BNabORao.cjs +2 -0
- package/dist/{cy-BX97Tgwk.js → cy-qF-aNCW-.js} +1 -1
- package/dist/da-BmgXTEXm.cjs +2 -0
- package/dist/{da-BnewPPrh.js → da-rR5TnSBw.js} +1 -1
- package/dist/de-B4w38-0d.cjs +2 -0
- package/dist/{de-BSZuzGTL.js → de-DbeDjRNp.js} +1 -1
- package/dist/el-Cgk6VsxL.cjs +2 -0
- package/dist/{el-DrOk3N7-.js → el-DDeD6FiX.js} +1 -1
- package/dist/es-3ugMIZuA.cjs +2 -0
- package/dist/{es-CGqzubZ2.js → es-dvKffn6Q.js} +1 -1
- package/dist/et-CIIzxbat.cjs +2 -0
- package/dist/{et-DGqkocuq.js → et-DgZFBtK7.js} +1 -1
- package/dist/eu-BUNUOJ7E.cjs +2 -0
- package/dist/{eu-DEo7fdTW.js → eu-C6r1_PRy.js} +1 -1
- package/dist/{fi-DxErwnd5.js → fi-CzOKgmjK.js} +1 -1
- package/dist/fi-q6BFPHtt.cjs +2 -0
- package/dist/fr-BEnCZ733.cjs +2 -0
- package/dist/{fr-zrtSZX0o.js → fr-D0cDkdbn.js} +1 -1
- package/dist/{ga-CbHxGc9_.js → ga-0A7ndSzw.js} +1 -1
- package/dist/ga-BXyKTnJr.cjs +2 -0
- package/dist/{gl--w0P3RY4.js → gl-BNwj4XAu.js} +1 -1
- package/dist/gl-DR1C-hSi.cjs +2 -0
- package/dist/{he-DY19lzWp.js → he-BPiZ6D5h.js} +1 -1
- package/dist/he-OD1Ex2Fw.cjs +2 -0
- package/dist/{hi-CFSsoO_8.js → hi-CSgtp9Yg.js} +1 -1
- package/dist/hi-Dt9FvBmh.cjs +2 -0
- package/dist/{hr-DIRJ1Z8e.js → hr-CDSSj52Q.js} +1 -1
- package/dist/hr-DMzwNhar.cjs +2 -0
- package/dist/hu-Bc-rChfV.cjs +2 -0
- package/dist/{hu-DqYPRWZh.js → hu-TDJYiDOB.js} +1 -1
- package/dist/{id-Dgj7SUCi.js → id-B3IF5pnh.js} +1 -1
- package/dist/id-CwndN9HH.cjs +2 -0
- package/dist/index.cjs +105 -114
- package/dist/index.js +6162 -18503
- package/dist/{it-QdChHqVN.js → it-BLET318M.js} +1 -1
- package/dist/it-DaYS5Vil.cjs +2 -0
- package/dist/ja-BYA2LXHy.cjs +2 -0
- package/dist/{ja-BNS0BbY-.js → ja-NxwXLaKV.js} +1 -1
- package/dist/{kk-Dhkax68h.js → kk-CceJcjtl.js} +1 -1
- package/dist/kk-Ctrvuqlz.cjs +2 -0
- package/dist/{ko-heRMHZWp.js → ko-cS_OE967.js} +1 -1
- package/dist/ko-evIcpTG8.cjs +2 -0
- package/dist/lt-CYTLGgh6.cjs +2 -0
- package/dist/{lt-Decqbo8S.js → lt-CZ-kk_5b.js} +1 -1
- package/dist/{lv-wZASv0Lw.js → lv-BTvPpEjc.js} +1 -1
- package/dist/lv-COjitD3w.cjs +2 -0
- package/dist/mk-B-LF5gVL.cjs +2 -0
- package/dist/{mk-BTsLGTJT.js → mk-CSSyI3El.js} +1 -1
- package/dist/ms-CzEvkib0.cjs +2 -0
- package/dist/{ms-C0cVNwky.js → ms-Dz5JnKJ1.js} +1 -1
- package/dist/nb-B1KWSX94.cjs +2 -0
- package/dist/{nb-DGX4q4tS.js → nb-DkgTg1et.js} +1 -1
- package/dist/{nl-CnXZa8tZ.js → nl-CQ5eoxw2.js} +1 -1
- package/dist/nl-knWqo2aX.cjs +2 -0
- package/dist/{pl-DbIdTNpg.js → pl-BQJfOizT.js} +1 -1
- package/dist/pl-Ce6dq53t.cjs +2 -0
- package/dist/providers.cjs +1 -1
- package/dist/providers.js +1 -1
- package/dist/pt-BVqTnGkF.cjs +2 -0
- package/dist/{pt-CcKYweQk.js → pt-b0p7DoD0.js} +1 -1
- package/dist/ro-DqJMfhmX.cjs +2 -0
- package/dist/{ro-C-8tiqgA.js → ro-sbBtUVJV.js} +1 -1
- package/dist/ru-Dm2NAQyK.cjs +2 -0
- package/dist/{ru-Dhnz96q2.js → ru-ofzbka6D.js} +1 -1
- package/dist/sk-BNe6CHG-.cjs +2 -0
- package/dist/{sk-BU-Z5EsC.js → sk-BtpdNCPC.js} +1 -1
- package/dist/{sl-CcfjJFxo.js → sl-B4GsKLu6.js} +1 -1
- package/dist/sl-BKmEUGyu.cjs +2 -0
- package/dist/{sr-S53unrLA.js → sr-C76YVpkQ.js} +1 -1
- package/dist/sr-Dwya5lwF.cjs +2 -0
- package/dist/sv-BGL2G9Vm.cjs +2 -0
- package/dist/{sv-BiJrVfZr.js → sv-PesX57cX.js} +1 -1
- package/dist/{th-vQ7LQ7nD.js → th-CbCNOBnR.js} +1 -1
- package/dist/th-DEv6shFI.cjs +2 -0
- package/dist/{tr-C5RrNGLz.js → tr-B0TPxXKS.js} +1 -1
- package/dist/tr-BB-QonGE.cjs +2 -0
- package/dist/uk-B-3fLKpR.cjs +2 -0
- package/dist/{uk-WGCFH0fY.js → uk-_9cNoBNe.js} +1 -1
- package/dist/{vi-Waa7HkXq.js → vi-B8SfqLW6.js} +1 -1
- package/dist/vi-Dx6pJ0ir.cjs +2 -0
- package/dist/zh-DD0ml2HG.cjs +2 -0
- package/dist/{zh-BmUS7Wn_.js → zh-DqHnbp6B.js} +1 -1
- package/package.json +6 -3
- package/dist/LocalizationProvider-B6NxHbu2.cjs +0 -2
- package/dist/_arrayEach-BuSFKyFt.js +0 -54
- package/dist/_arrayEach-ChR-TejB.cjs +0 -2
- package/dist/_getTag-BRuLtYrv.js +0 -28
- package/dist/_getTag-D6VVyrEu.cjs +0 -2
- package/dist/ar-ip3bGOX3.cjs +0 -2
- package/dist/arc-4yb49ncY.js +0 -82
- package/dist/arc-djsA8IT0.cjs +0 -2
- package/dist/architecture-PBZL5I3N-CvTfVLFi.js +0 -3
- package/dist/architecture-PBZL5I3N-wZIE3ggH.cjs +0 -1
- package/dist/architectureDiagram-2XIMDMQ5-DFEvJNx1.cjs +0 -37
- package/dist/architectureDiagram-2XIMDMQ5-g-HotzpG.js +0 -4047
- package/dist/array-BNB_vRFv.cjs +0 -2
- package/dist/array-DP0duYiO.js +0 -8
- package/dist/az-CyVLdUDz.cjs +0 -2
- package/dist/bg-Bexoz3hL.cjs +0 -2
- package/dist/blockDiagram-WCTKOSBZ-DWgb5Ghz.js +0 -3165
- package/dist/blockDiagram-WCTKOSBZ-Dl04FBAy.cjs +0 -133
- package/dist/bs-MMcvhwLv.cjs +0 -2
- package/dist/c4Diagram-IC4MRINW-ClZvialQ.js +0 -2966
- package/dist/c4Diagram-IC4MRINW-ZFE2cGZP.cjs +0 -11
- package/dist/ca-BspMSeHN.cjs +0 -2
- package/dist/channel-2Bqnb1FY.js +0 -7
- package/dist/channel-5_aP1EVB.cjs +0 -2
- package/dist/chunk-4BX2VUAB-B5Va_oZz.js +0 -10
- package/dist/chunk-4BX2VUAB-BWDW-gYk.cjs +0 -2
- package/dist/chunk-55IACEB6-4ind_ByS.cjs +0 -2
- package/dist/chunk-55IACEB6-Pcyz_aR_.js +0 -10
- package/dist/chunk-7E7YKBS2-Sw9_w4gt.cjs +0 -2
- package/dist/chunk-7E7YKBS2-VHdgsed6.js +0 -25
- package/dist/chunk-7R4GIKGN-BKoqTTU_.cjs +0 -81
- package/dist/chunk-7R4GIKGN-CaQJ0QBF.js +0 -2598
- package/dist/chunk-C72U2L5F-CCvi6jiy.cjs +0 -2
- package/dist/chunk-C72U2L5F-MjJQTOMh.js +0 -25
- package/dist/chunk-D-IZpNpi.cjs +0 -1
- package/dist/chunk-EGIJ26TM-Bffl84Wq.cjs +0 -2
- package/dist/chunk-EGIJ26TM-DLMAfvpZ.js +0 -25
- package/dist/chunk-FMBD7UC4-BvqqU04Z.cjs +0 -16
- package/dist/chunk-FMBD7UC4-xjRtkFXe.js +0 -7
- package/dist/chunk-GEFDOKGD-BNgT40Ex.js +0 -1302
- package/dist/chunk-GEFDOKGD-BOwd6Jqp.cjs +0 -3
- package/dist/chunk-GLR3WWYH-DdNAJNRC.cjs +0 -2
- package/dist/chunk-GLR3WWYH-kyo6BUtq.js +0 -43
- package/dist/chunk-HHEYEP7N-DO1AYIZw.js +0 -11
- package/dist/chunk-HHEYEP7N-pdmgQZzP.cjs +0 -2
- package/dist/chunk-JSJVCQXG-Ci0seBb4.cjs +0 -2
- package/dist/chunk-JSJVCQXG-DowfYWcD.js +0 -62
- package/dist/chunk-KX2RTZJC-BJeOHReu.cjs +0 -2
- package/dist/chunk-KX2RTZJC-D-bUTSNy.js +0 -27
- package/dist/chunk-KYZI473N-DEPuSXaW.js +0 -3436
- package/dist/chunk-KYZI473N-DzBMFOER.cjs +0 -54
- package/dist/chunk-L3YUKLVL-BDGCTzmy.js +0 -25
- package/dist/chunk-L3YUKLVL-BZ17sqh5.cjs +0 -2
- package/dist/chunk-MX3YWQON-CAsnAj2e.js +0 -82
- package/dist/chunk-MX3YWQON-DulrBJdn.cjs +0 -2
- package/dist/chunk-NBPlniwU.js +0 -23
- package/dist/chunk-NQ4KR5QH-BJBAT2kM.cjs +0 -221
- package/dist/chunk-NQ4KR5QH-DFem-ORD.js +0 -2004
- package/dist/chunk-O4XLMI2P-BQF7MAo7.cjs +0 -8
- package/dist/chunk-O4XLMI2P-DA4TPzPG.js +0 -513
- package/dist/chunk-OZEHJAEY-CAiiXJUP.cjs +0 -2
- package/dist/chunk-OZEHJAEY-D7SX2SbR.js +0 -66
- package/dist/chunk-PQ6SQG4A-BZnW4-Sd.cjs +0 -2
- package/dist/chunk-PQ6SQG4A-ObFGkauo.js +0 -69
- package/dist/chunk-PU5JKC2W-BM5NPS-q.js +0 -1887
- package/dist/chunk-PU5JKC2W-eRU8wnTH.cjs +0 -71
- package/dist/chunk-QZHKN3VN-Dhli_tM0.cjs +0 -2
- package/dist/chunk-QZHKN3VN-x258g6EH.js +0 -17
- package/dist/chunk-R5LLSJPH-CNTEucEd.cjs +0 -2
- package/dist/chunk-R5LLSJPH-Gt27ml2m.js +0 -37
- package/dist/chunk-WL4C6EOR-CQXw6d0l.cjs +0 -190
- package/dist/chunk-WL4C6EOR-DuM6QmqM.js +0 -3196
- package/dist/chunk-XIRO2GV7-CswC9CO8.cjs +0 -2
- package/dist/chunk-XIRO2GV7-DXlO8X82.js +0 -32
- package/dist/chunk-XPW4576I-Bpsr4SZJ.js +0 -1148
- package/dist/chunk-XPW4576I-C68T-WIW.cjs +0 -33
- package/dist/chunk-XZSTWKYB-DJv9rEVU.cjs +0 -95
- package/dist/chunk-XZSTWKYB-jD9M1izK.js +0 -16132
- package/dist/chunk-YBOYWFTD-B6CeuteH.js +0 -34
- package/dist/chunk-YBOYWFTD-CiLW6HW_.cjs +0 -2
- package/dist/classDiagram-VBA2DB6C-Us0kuDfz.cjs +0 -2
- package/dist/classDiagram-VBA2DB6C-VOsE3gN0.js +0 -31
- package/dist/classDiagram-v2-RAHNMMFH-BWsm3ea6.cjs +0 -2
- package/dist/classDiagram-v2-RAHNMMFH-DPqMNfOz.js +0 -31
- package/dist/cose-bilkent-S5V4N54A-CKhwzobJ.js +0 -2252
- package/dist/cose-bilkent-S5V4N54A-DmyaRQ6l.cjs +0 -2
- package/dist/cs-FZSeHYld.cjs +0 -2
- package/dist/cy-CzQmM2lQ.cjs +0 -2
- package/dist/cytoscape.esm-CcJAI0wG.cjs +0 -322
- package/dist/cytoscape.esm-D9EjU25_.js +0 -18102
- package/dist/da-CexFt-Oj.cjs +0 -2
- package/dist/dagre-CpEPaL3r.cjs +0 -2
- package/dist/dagre-Dd8wCGc6.js +0 -1305
- package/dist/dagre-KLK3FWXG-BpxkjvB3.js +0 -294
- package/dist/dagre-KLK3FWXG-DIznPQl_.cjs +0 -5
- package/dist/de-B68HwuYu.cjs +0 -2
- package/dist/defaultLocale-CYOzCjwh.js +0 -203
- package/dist/defaultLocale-DSgylVA1.cjs +0 -2
- package/dist/diagram-E7M64L7V-dXqTi77U.cjs +0 -25
- package/dist/diagram-E7M64L7V-oX07GVAD.js +0 -529
- package/dist/diagram-IFDJBPK2-CriVAAmI.cjs +0 -44
- package/dist/diagram-IFDJBPK2-lCNF06_S.js +0 -215
- package/dist/diagram-P4PSJMXO-TfwVJh4S.js +0 -135
- package/dist/diagram-P4PSJMXO-k7F0lH6Q.cjs +0 -25
- package/dist/dist-CV9Ez7cn.js +0 -52
- package/dist/dist-DVthN7lF.cjs +0 -2
- package/dist/el-DQc4jSMd.cjs +0 -2
- package/dist/erDiagram-INFDFZHY-CDt3mOSU.cjs +0 -71
- package/dist/erDiagram-INFDFZHY-Ds_R2Ds4.js +0 -1668
- package/dist/es-DI8Y4Bv1.cjs +0 -2
- package/dist/et-DfaryKvp.cjs +0 -2
- package/dist/eu-BVOSXciF.cjs +0 -2
- package/dist/fi-C5L-OzaI.cjs +0 -2
- package/dist/flowDiagram-PKNHOUZH-7XJG07fo.cjs +0 -163
- package/dist/flowDiagram-PKNHOUZH-CkeYebJ5.js +0 -4163
- package/dist/fr-yFvjqx8B.cjs +0 -2
- package/dist/ga-6mVQhlWi.cjs +0 -2
- package/dist/ganttDiagram-A5KZAMGK-Bbck1pyM.cjs +0 -293
- package/dist/ganttDiagram-A5KZAMGK-CFT3Xn_r.js +0 -3074
- package/dist/gitGraph-HDMCJU4V-BKE04oIl.js +0 -3
- package/dist/gitGraph-HDMCJU4V-C9GYfOYb.cjs +0 -1
- package/dist/gitGraphDiagram-K3NZZRJ6-CXz9SHBX.js +0 -627
- package/dist/gitGraphDiagram-K3NZZRJ6-Dt4D-ig1.cjs +0 -66
- package/dist/gl-BJzJe1sq.cjs +0 -2
- package/dist/graphlib-CPo7oIsu.js +0 -223
- package/dist/graphlib-CmUS4Qin.cjs +0 -2
- package/dist/he-B3Bw3qr0.cjs +0 -2
- package/dist/hi-kofL-mD8.cjs +0 -2
- package/dist/hr-CDxqA9Jm.cjs +0 -2
- package/dist/hu-Defen_75.cjs +0 -2
- package/dist/id-DcwMRgmX.cjs +0 -2
- package/dist/identity-6JlhFhuM.cjs +0 -2
- package/dist/identity-C1jKsMoW.js +0 -395
- package/dist/info-3K5VOQVL-DfN_3mKd.js +0 -3
- package/dist/info-3K5VOQVL-d6J9FY0_.cjs +0 -1
- package/dist/infoDiagram-LFFYTUFH-Bp9btqnA.cjs +0 -3
- package/dist/infoDiagram-LFFYTUFH-DnvgRFnx.js +0 -21
- package/dist/init-BAFZAp9S.cjs +0 -2
- package/dist/init-m0TwgR4W.js +0 -17
- package/dist/isEmpty-BTp1uKIj.cjs +0 -2
- package/dist/isEmpty-uXVYZZYe.js +0 -17
- package/dist/ishikawaDiagram-PHBUUO56-DLaOkz38.js +0 -719
- package/dist/ishikawaDiagram-PHBUUO56-DmqObwMZ.cjs +0 -71
- package/dist/it-D5nM6KCi.cjs +0 -2
- package/dist/ja-BtuHirv7.cjs +0 -2
- package/dist/journeyDiagram-4ABVD52K-Cv0DbLMi.cjs +0 -140
- package/dist/journeyDiagram-4ABVD52K-DYmmcNK4.js +0 -885
- package/dist/kanban-definition-K7BYSVSG-BdQLAMeB.cjs +0 -90
- package/dist/kanban-definition-K7BYSVSG-CLEYqSz5.js +0 -973
- package/dist/katex-B-Nju2J8.js +0 -22002
- package/dist/katex-WY67Rp7A.cjs +0 -266
- package/dist/kk-BSl8IqgQ.cjs +0 -2
- package/dist/ko-eplb1GD0.cjs +0 -2
- package/dist/line-CbEBKCYr.js +0 -36
- package/dist/line-DqSdvtRR.cjs +0 -2
- package/dist/linear-DvLDpS6A.cjs +0 -2
- package/dist/linear-Eb79THx6.js +0 -291
- package/dist/lt-DsYAWFbF.cjs +0 -2
- package/dist/lv-DHmTjCb8.cjs +0 -2
- package/dist/maplibre-gl-qSrG75fp.js +0 -33003
- package/dist/maplibre-gl-tm_pVdmb.cjs +0 -757
- package/dist/math-DR9t6ixc.cjs +0 -2
- package/dist/math-DyURnvXC.js +0 -12
- package/dist/mermaid-parser.core-BdTB9qx-.js +0 -61
- package/dist/mermaid-parser.core-BlzF5RRD.cjs +0 -4
- package/dist/mindmap-definition-YRQLILUH-CzcVgr-U.js +0 -966
- package/dist/mindmap-definition-YRQLILUH-zWN_YXC3.cjs +0 -69
- package/dist/mk-CCV_308U.cjs +0 -2
- package/dist/ms-CH83xVYN.cjs +0 -2
- package/dist/nb-DZ-DlwcL.cjs +0 -2
- package/dist/nl-Xdf-A19i.cjs +0 -2
- package/dist/ordinal-BAWGEQkf.js +0 -67
- package/dist/ordinal-CL2X4e2C.cjs +0 -2
- package/dist/packet-RMMSAZCW-Bek1stRX.cjs +0 -1
- package/dist/packet-RMMSAZCW-DUN6t9lN.js +0 -3
- package/dist/path-Bt6guLtL.cjs +0 -2
- package/dist/path-DSzKK8fH.js +0 -87
- package/dist/pie-UPGHQEXC-DjqNO54R.js +0 -3
- package/dist/pie-UPGHQEXC-pJq6_YgE.cjs +0 -1
- package/dist/pieDiagram-SKSYHLDU-Ba-c0fRA.cjs +0 -31
- package/dist/pieDiagram-SKSYHLDU-ya07MTY-.js +0 -167
- package/dist/pl-BStql1S-.cjs +0 -2
- package/dist/pt-Dk4jELuZ.cjs +0 -2
- package/dist/quadrantDiagram-337W2JSQ-CQQEVC49.cjs +0 -8
- package/dist/quadrantDiagram-337W2JSQ-Dp_QyIEO.js +0 -1976
- package/dist/radar-KQ55EAFF-Bid2hXXI.cjs +0 -1
- package/dist/radar-KQ55EAFF-C6zhEkCz.js +0 -3
- package/dist/requirementDiagram-Z7DCOOCP-CRl2914V.js +0 -2203
- package/dist/requirementDiagram-Z7DCOOCP-CeMYhXEm.cjs +0 -74
- package/dist/ro-BvhMyTKh.cjs +0 -2
- package/dist/rough.esm-BjJ_weyP.cjs +0 -2
- package/dist/rough.esm-DBHP55VQ.js +0 -1354
- package/dist/ru-BQosng8l.cjs +0 -2
- package/dist/sankeyDiagram-WA2Y5GQK-BFrF47Iv.js +0 -922
- package/dist/sankeyDiagram-WA2Y5GQK-DDfjtQ4G.cjs +0 -11
- package/dist/sequenceDiagram-2WXFIKYE-B-zWyr9f.cjs +0 -146
- package/dist/sequenceDiagram-2WXFIKYE-BAd8OVlz.js +0 -4111
- package/dist/sk-BhA7UeAk.cjs +0 -2
- package/dist/sl-6Mczv4jG.cjs +0 -2
- package/dist/sr-CxObZdu0.cjs +0 -2
- package/dist/src-DFxq-N5I.cjs +0 -2
- package/dist/src-Dm6r9c7l.js +0 -2148
- package/dist/stateDiagram-RAJIS63D-C-tfqeC-.js +0 -219
- package/dist/stateDiagram-RAJIS63D-C1Aj8vJQ.cjs +0 -2
- package/dist/stateDiagram-v2-FVOUBMTO-C-w53gXL.js +0 -29
- package/dist/stateDiagram-v2-FVOUBMTO-VoIE_KVn.cjs +0 -2
- package/dist/sv-BfiunVuX.cjs +0 -2
- package/dist/th-BqLGltZi.cjs +0 -2
- package/dist/timeline-definition-YZTLITO2-CE1y2S_r.js +0 -832
- package/dist/timeline-definition-YZTLITO2-D8aFfnYE.cjs +0 -62
- package/dist/tr-Brwl4o_Z.cjs +0 -2
- package/dist/treemap-KZPCXAKY-D2v0uStP.cjs +0 -1
- package/dist/treemap-KZPCXAKY-DLE_f1Bk.js +0 -3
- package/dist/uk-CV49TRvS.cjs +0 -2
- package/dist/vennDiagram-LZ73GAT5-BSpVMORX.js +0 -1860
- package/dist/vennDiagram-LZ73GAT5-DvnB0e7u.cjs +0 -35
- package/dist/vi-JzM7bjn_.cjs +0 -2
- package/dist/xychartDiagram-JWTSCODW-0qbVGrDs.cjs +0 -8
- package/dist/xychartDiagram-JWTSCODW-DpIry-th.js +0 -2043
- package/dist/zh-DEm0SGzZ.cjs +0 -2
|
@@ -1,1887 +0,0 @@
|
|
|
1
|
-
import { g as e, h as t, p as n } from "./src-Dm6r9c7l.js";
|
|
2
|
-
import { L as r, P as i, k as a, s as o, y as s } from "./chunk-7R4GIKGN-CaQJ0QBF.js";
|
|
3
|
-
import { i as c } from "./chunk-GEFDOKGD-BNgT40Ex.js";
|
|
4
|
-
//#region node_modules/@iconify/utils/lib/icon/defaults.js
|
|
5
|
-
var l = Object.freeze({
|
|
6
|
-
left: 0,
|
|
7
|
-
top: 0,
|
|
8
|
-
width: 16,
|
|
9
|
-
height: 16
|
|
10
|
-
}), u = Object.freeze({
|
|
11
|
-
rotate: 0,
|
|
12
|
-
vFlip: !1,
|
|
13
|
-
hFlip: !1
|
|
14
|
-
}), d = Object.freeze({
|
|
15
|
-
...l,
|
|
16
|
-
...u
|
|
17
|
-
}), f = Object.freeze({
|
|
18
|
-
...d,
|
|
19
|
-
body: "",
|
|
20
|
-
hidden: !1
|
|
21
|
-
}), p = Object.freeze({
|
|
22
|
-
width: null,
|
|
23
|
-
height: null
|
|
24
|
-
}), m = Object.freeze({
|
|
25
|
-
...p,
|
|
26
|
-
...u
|
|
27
|
-
}), h = (e, t, n, r = "") => {
|
|
28
|
-
let i = e.split(":");
|
|
29
|
-
if (e.slice(0, 1) === "@") {
|
|
30
|
-
if (i.length < 2 || i.length > 3) return null;
|
|
31
|
-
r = i.shift().slice(1);
|
|
32
|
-
}
|
|
33
|
-
if (i.length > 3 || !i.length) return null;
|
|
34
|
-
if (i.length > 1) {
|
|
35
|
-
let e = i.pop(), n = i.pop(), a = {
|
|
36
|
-
provider: i.length > 0 ? i[0] : r,
|
|
37
|
-
prefix: n,
|
|
38
|
-
name: e
|
|
39
|
-
};
|
|
40
|
-
return t && !g(a) ? null : a;
|
|
41
|
-
}
|
|
42
|
-
let a = i[0], o = a.split("-");
|
|
43
|
-
if (o.length > 1) {
|
|
44
|
-
let e = {
|
|
45
|
-
provider: r,
|
|
46
|
-
prefix: o.shift(),
|
|
47
|
-
name: o.join("-")
|
|
48
|
-
};
|
|
49
|
-
return t && !g(e) ? null : e;
|
|
50
|
-
}
|
|
51
|
-
if (n && r === "") {
|
|
52
|
-
let e = {
|
|
53
|
-
provider: r,
|
|
54
|
-
prefix: "",
|
|
55
|
-
name: a
|
|
56
|
-
};
|
|
57
|
-
return t && !g(e, n) ? null : e;
|
|
58
|
-
}
|
|
59
|
-
return null;
|
|
60
|
-
}, g = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
|
|
61
|
-
//#endregion
|
|
62
|
-
//#region node_modules/@iconify/utils/lib/icon/transformations.js
|
|
63
|
-
function ee(e, t) {
|
|
64
|
-
let n = {};
|
|
65
|
-
!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
|
|
66
|
-
let r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
67
|
-
return r && (n.rotate = r), n;
|
|
68
|
-
}
|
|
69
|
-
//#endregion
|
|
70
|
-
//#region node_modules/@iconify/utils/lib/icon/merge.js
|
|
71
|
-
function te(e, t) {
|
|
72
|
-
let n = ee(e, t);
|
|
73
|
-
for (let r in f) r in u ? r in e && !(r in n) && (n[r] = u[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
|
|
74
|
-
return n;
|
|
75
|
-
}
|
|
76
|
-
//#endregion
|
|
77
|
-
//#region node_modules/@iconify/utils/lib/icon-set/tree.js
|
|
78
|
-
function ne(e, t) {
|
|
79
|
-
let n = e.icons, r = e.aliases || Object.create(null), i = Object.create(null);
|
|
80
|
-
function a(e) {
|
|
81
|
-
if (n[e]) return i[e] = [];
|
|
82
|
-
if (!(e in i)) {
|
|
83
|
-
i[e] = null;
|
|
84
|
-
let t = r[e] && r[e].parent, n = t && a(t);
|
|
85
|
-
n && (i[e] = [t].concat(n));
|
|
86
|
-
}
|
|
87
|
-
return i[e];
|
|
88
|
-
}
|
|
89
|
-
return (t || Object.keys(n).concat(Object.keys(r))).forEach(a), i;
|
|
90
|
-
}
|
|
91
|
-
//#endregion
|
|
92
|
-
//#region node_modules/@iconify/utils/lib/icon-set/get-icon.js
|
|
93
|
-
function re(e, t, n) {
|
|
94
|
-
let r = e.icons, i = e.aliases || Object.create(null), a = {};
|
|
95
|
-
function o(e) {
|
|
96
|
-
a = te(r[e] || i[e], a);
|
|
97
|
-
}
|
|
98
|
-
return o(t), n.forEach(o), te(e, a);
|
|
99
|
-
}
|
|
100
|
-
function ie(e, t) {
|
|
101
|
-
if (e.icons[t]) return re(e, t, []);
|
|
102
|
-
let n = ne(e, [t])[t];
|
|
103
|
-
return n ? re(e, t, n) : null;
|
|
104
|
-
}
|
|
105
|
-
//#endregion
|
|
106
|
-
//#region node_modules/@iconify/utils/lib/svg/size.js
|
|
107
|
-
var ae = /(-?[0-9.]*[0-9]+[0-9.]*)/g, oe = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
108
|
-
function se(e, t, n) {
|
|
109
|
-
if (t === 1) return e;
|
|
110
|
-
if (n ||= 100, typeof e == "number") return Math.ceil(e * t * n) / n;
|
|
111
|
-
if (typeof e != "string") return e;
|
|
112
|
-
let r = e.split(ae);
|
|
113
|
-
if (r === null || !r.length) return e;
|
|
114
|
-
let i = [], a = r.shift(), o = oe.test(a);
|
|
115
|
-
for (;;) {
|
|
116
|
-
if (o) {
|
|
117
|
-
let e = parseFloat(a);
|
|
118
|
-
isNaN(e) ? i.push(a) : i.push(Math.ceil(e * t * n) / n);
|
|
119
|
-
} else i.push(a);
|
|
120
|
-
if (a = r.shift(), a === void 0) return i.join("");
|
|
121
|
-
o = !o;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
//#endregion
|
|
125
|
-
//#region node_modules/@iconify/utils/lib/svg/defs.js
|
|
126
|
-
function ce(e, t = "defs") {
|
|
127
|
-
let n = "", r = e.indexOf("<" + t);
|
|
128
|
-
for (; r >= 0;) {
|
|
129
|
-
let i = e.indexOf(">", r), a = e.indexOf("</" + t);
|
|
130
|
-
if (i === -1 || a === -1) break;
|
|
131
|
-
let o = e.indexOf(">", a);
|
|
132
|
-
if (o === -1) break;
|
|
133
|
-
n += e.slice(i + 1, a).trim(), e = e.slice(0, r).trim() + e.slice(o + 1);
|
|
134
|
-
}
|
|
135
|
-
return {
|
|
136
|
-
defs: n,
|
|
137
|
-
content: e
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
function le(e, t) {
|
|
141
|
-
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
142
|
-
}
|
|
143
|
-
function ue(e, t, n) {
|
|
144
|
-
let r = ce(e);
|
|
145
|
-
return le(r.defs, t + r.content + n);
|
|
146
|
-
}
|
|
147
|
-
//#endregion
|
|
148
|
-
//#region node_modules/@iconify/utils/lib/svg/build.js
|
|
149
|
-
var de = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
150
|
-
function fe(e, t) {
|
|
151
|
-
let n = {
|
|
152
|
-
...d,
|
|
153
|
-
...e
|
|
154
|
-
}, r = {
|
|
155
|
-
...m,
|
|
156
|
-
...t
|
|
157
|
-
}, i = {
|
|
158
|
-
left: n.left,
|
|
159
|
-
top: n.top,
|
|
160
|
-
width: n.width,
|
|
161
|
-
height: n.height
|
|
162
|
-
}, a = n.body;
|
|
163
|
-
[n, r].forEach((e) => {
|
|
164
|
-
let t = [], n = e.hFlip, r = e.vFlip, o = e.rotate;
|
|
165
|
-
n ? r ? o += 2 : (t.push("translate(" + (i.width + i.left).toString() + " " + (0 - i.top).toString() + ")"), t.push("scale(-1 1)"), i.top = i.left = 0) : r && (t.push("translate(" + (0 - i.left).toString() + " " + (i.height + i.top).toString() + ")"), t.push("scale(1 -1)"), i.top = i.left = 0);
|
|
166
|
-
let s;
|
|
167
|
-
switch (o < 0 && (o -= Math.floor(o / 4) * 4), o %= 4, o) {
|
|
168
|
-
case 1:
|
|
169
|
-
s = i.height / 2 + i.top, t.unshift("rotate(90 " + s.toString() + " " + s.toString() + ")");
|
|
170
|
-
break;
|
|
171
|
-
case 2:
|
|
172
|
-
t.unshift("rotate(180 " + (i.width / 2 + i.left).toString() + " " + (i.height / 2 + i.top).toString() + ")");
|
|
173
|
-
break;
|
|
174
|
-
case 3:
|
|
175
|
-
s = i.width / 2 + i.left, t.unshift("rotate(-90 " + s.toString() + " " + s.toString() + ")");
|
|
176
|
-
break;
|
|
177
|
-
}
|
|
178
|
-
o % 2 == 1 && (i.left !== i.top && (s = i.left, i.left = i.top, i.top = s), i.width !== i.height && (s = i.width, i.width = i.height, i.height = s)), t.length && (a = ue(a, "<g transform=\"" + t.join(" ") + "\">", "</g>"));
|
|
179
|
-
});
|
|
180
|
-
let o = r.width, s = r.height, c = i.width, l = i.height, u, f;
|
|
181
|
-
o === null ? (f = s === null ? "1em" : s === "auto" ? l : s, u = se(f, c / l)) : (u = o === "auto" ? c : o, f = s === null ? se(u, l / c) : s === "auto" ? l : s);
|
|
182
|
-
let p = {}, h = (e, t) => {
|
|
183
|
-
de(t) || (p[e] = t.toString());
|
|
184
|
-
};
|
|
185
|
-
h("width", u), h("height", f);
|
|
186
|
-
let g = [
|
|
187
|
-
i.left,
|
|
188
|
-
i.top,
|
|
189
|
-
c,
|
|
190
|
-
l
|
|
191
|
-
];
|
|
192
|
-
return p.viewBox = g.join(" "), {
|
|
193
|
-
attributes: p,
|
|
194
|
-
viewBox: g,
|
|
195
|
-
body: a
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
//#endregion
|
|
199
|
-
//#region node_modules/@iconify/utils/lib/svg/id.js
|
|
200
|
-
var pe = /\sid="(\S+)"/g, me = /* @__PURE__ */ new Map();
|
|
201
|
-
function he(e) {
|
|
202
|
-
e = e.replace(/[0-9]+$/, "") || "a";
|
|
203
|
-
let t = me.get(e) || 0;
|
|
204
|
-
return me.set(e, t + 1), t ? `${e}${t}` : e;
|
|
205
|
-
}
|
|
206
|
-
function ge(e) {
|
|
207
|
-
let t = [], n;
|
|
208
|
-
for (; n = pe.exec(e);) t.push(n[1]);
|
|
209
|
-
if (!t.length) return e;
|
|
210
|
-
let r = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
211
|
-
return t.forEach((t) => {
|
|
212
|
-
let n = he(t), i = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
213
|
-
e = e.replace(RegExp("([#;\"])(" + i + ")([\")]|\\.[a-z])", "g"), "$1" + n + r + "$3");
|
|
214
|
-
}), e = e.replace(new RegExp(r, "g"), ""), e;
|
|
215
|
-
}
|
|
216
|
-
//#endregion
|
|
217
|
-
//#region node_modules/@iconify/utils/lib/svg/html.js
|
|
218
|
-
function _e(e, t) {
|
|
219
|
-
let n = e.indexOf("xlink:") === -1 ? "" : " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
|
|
220
|
-
for (let e in t) n += " " + e + "=\"" + t[e] + "\"";
|
|
221
|
-
return "<svg xmlns=\"http://www.w3.org/2000/svg\"" + n + ">" + e + "</svg>";
|
|
222
|
-
}
|
|
223
|
-
//#endregion
|
|
224
|
-
//#region node_modules/marked/lib/marked.esm.js
|
|
225
|
-
function _() {
|
|
226
|
-
return {
|
|
227
|
-
async: !1,
|
|
228
|
-
breaks: !1,
|
|
229
|
-
extensions: null,
|
|
230
|
-
gfm: !0,
|
|
231
|
-
hooks: null,
|
|
232
|
-
pedantic: !1,
|
|
233
|
-
renderer: null,
|
|
234
|
-
silent: !1,
|
|
235
|
-
tokenizer: null,
|
|
236
|
-
walkTokens: null
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
var v = _();
|
|
240
|
-
function ve(e) {
|
|
241
|
-
v = e;
|
|
242
|
-
}
|
|
243
|
-
var y = { exec: () => null };
|
|
244
|
-
function b(e, t = "") {
|
|
245
|
-
let n = typeof e == "string" ? e : e.source, r = {
|
|
246
|
-
replace: (e, t) => {
|
|
247
|
-
let i = typeof t == "string" ? t : t.source;
|
|
248
|
-
return i = i.replace(x.caret, "$1"), n = n.replace(e, i), r;
|
|
249
|
-
},
|
|
250
|
-
getRegex: () => new RegExp(n, t)
|
|
251
|
-
};
|
|
252
|
-
return r;
|
|
253
|
-
}
|
|
254
|
-
var ye = (() => {
|
|
255
|
-
try {
|
|
256
|
-
return !0;
|
|
257
|
-
} catch {
|
|
258
|
-
return !1;
|
|
259
|
-
}
|
|
260
|
-
})(), x = {
|
|
261
|
-
codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
|
|
262
|
-
outputLinkReplace: /\\([\[\]])/g,
|
|
263
|
-
indentCodeCompensation: /^(\s+)(?:```)/,
|
|
264
|
-
beginningSpace: /^\s+/,
|
|
265
|
-
endingHash: /#$/,
|
|
266
|
-
startingSpaceChar: /^ /,
|
|
267
|
-
endingSpaceChar: / $/,
|
|
268
|
-
nonSpaceChar: /[^ ]/,
|
|
269
|
-
newLineCharGlobal: /\n/g,
|
|
270
|
-
tabCharGlobal: /\t/g,
|
|
271
|
-
multipleSpaceGlobal: /\s+/g,
|
|
272
|
-
blankLine: /^[ \t]*$/,
|
|
273
|
-
doubleBlankLine: /\n[ \t]*\n[ \t]*$/,
|
|
274
|
-
blockquoteStart: /^ {0,3}>/,
|
|
275
|
-
blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g,
|
|
276
|
-
blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
|
|
277
|
-
listReplaceTabs: /^\t+/,
|
|
278
|
-
listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
|
|
279
|
-
listIsTask: /^\[[ xX]\] /,
|
|
280
|
-
listReplaceTask: /^\[[ xX]\] +/,
|
|
281
|
-
anyLine: /\n.*\n/,
|
|
282
|
-
hrefBrackets: /^<(.*)>$/,
|
|
283
|
-
tableDelimiter: /[:|]/,
|
|
284
|
-
tableAlignChars: /^\||\| *$/g,
|
|
285
|
-
tableRowBlankLine: /\n[ \t]*$/,
|
|
286
|
-
tableAlignRight: /^ *-+: *$/,
|
|
287
|
-
tableAlignCenter: /^ *:-+: *$/,
|
|
288
|
-
tableAlignLeft: /^ *:-+ *$/,
|
|
289
|
-
startATag: /^<a /i,
|
|
290
|
-
endATag: /^<\/a>/i,
|
|
291
|
-
startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i,
|
|
292
|
-
endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i,
|
|
293
|
-
startAngleBracket: /^</,
|
|
294
|
-
endAngleBracket: />$/,
|
|
295
|
-
pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/,
|
|
296
|
-
unicodeAlphaNumeric: /[\p{L}\p{N}]/u,
|
|
297
|
-
escapeTest: /[&<>"']/,
|
|
298
|
-
escapeReplace: /[&<>"']/g,
|
|
299
|
-
escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,
|
|
300
|
-
escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,
|
|
301
|
-
unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,
|
|
302
|
-
caret: /(^|[^\[])\^/g,
|
|
303
|
-
percentDecode: /%25/g,
|
|
304
|
-
findPipe: /\|/g,
|
|
305
|
-
splitPipe: / \|/,
|
|
306
|
-
slashPipe: /\\\|/g,
|
|
307
|
-
carriageReturn: /\r\n|\r/g,
|
|
308
|
-
spaceLine: /^ +$/gm,
|
|
309
|
-
notSpaceStart: /^\S*/,
|
|
310
|
-
endingNewline: /\n$/,
|
|
311
|
-
listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
|
|
312
|
-
nextBulletRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),
|
|
313
|
-
hrRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),
|
|
314
|
-
fencesBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`),
|
|
315
|
-
headingBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}#`),
|
|
316
|
-
htmlBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i")
|
|
317
|
-
}, be = /^(?:[ \t]*(?:\n|$))+/, xe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Se = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, S = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Ce = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, C = /(?:[*+-]|\d{1,9}[.)])/, we = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Te = b(we).replace(/bull/g, C).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Ee = b(we).replace(/bull/g, C).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), w = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, De = /^[^\n]+/, T = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Oe = b(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", T).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ke = b(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, C).getRegex(), E = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", D = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ae = b("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", D).replace("tag", E).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), je = b(w).replace("hr", S).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", E).getRegex(), O = {
|
|
318
|
-
blockquote: b(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", je).getRegex(),
|
|
319
|
-
code: xe,
|
|
320
|
-
def: Oe,
|
|
321
|
-
fences: Se,
|
|
322
|
-
heading: Ce,
|
|
323
|
-
hr: S,
|
|
324
|
-
html: Ae,
|
|
325
|
-
lheading: Te,
|
|
326
|
-
list: ke,
|
|
327
|
-
newline: be,
|
|
328
|
-
paragraph: je,
|
|
329
|
-
table: y,
|
|
330
|
-
text: De
|
|
331
|
-
}, Me = b("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", S).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", E).getRegex(), Ne = {
|
|
332
|
-
...O,
|
|
333
|
-
lheading: Ee,
|
|
334
|
-
table: Me,
|
|
335
|
-
paragraph: b(w).replace("hr", S).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Me).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", E).getRegex()
|
|
336
|
-
}, Pe = {
|
|
337
|
-
...O,
|
|
338
|
-
html: b("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", D).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
339
|
-
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
340
|
-
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
341
|
-
fences: y,
|
|
342
|
-
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
343
|
-
paragraph: b(w).replace("hr", S).replace("heading", " *#{1,6} *[^\n]").replace("lheading", Te).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
344
|
-
}, Fe = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ie = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Le = /^( {2,}|\\)\n(?!\s*$)/, Re = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, k = /[\p{P}\p{S}]/u, A = /[\s\p{P}\p{S}]/u, ze = /[^\s\p{P}\p{S}]/u, Be = b(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, A).getRegex(), Ve = /(?!~)[\p{P}\p{S}]/u, He = /(?!~)[\s\p{P}\p{S}]/u, Ue = /(?:[^\s\p{P}\p{S}]|~)/u, We = b(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ye ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Ge = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Ke = b(Ge, "u").replace(/punct/g, k).getRegex(), qe = b(Ge, "u").replace(/punct/g, Ve).getRegex(), Je = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ye = b(Je, "gu").replace(/notPunctSpace/g, ze).replace(/punctSpace/g, A).replace(/punct/g, k).getRegex(), Xe = b(Je, "gu").replace(/notPunctSpace/g, Ue).replace(/punctSpace/g, He).replace(/punct/g, Ve).getRegex(), Ze = b("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ze).replace(/punctSpace/g, A).replace(/punct/g, k).getRegex(), Qe = b(/\\(punct)/, "gu").replace(/punct/g, k).getRegex(), $e = b(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), et = b(D).replace("(?:-->|$)", "-->").getRegex(), tt = b("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", et).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), j = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, nt = b(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", j).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), rt = b(/^!?\[(label)\]\[(ref)\]/).replace("label", j).replace("ref", T).getRegex(), it = b(/^!?\[(ref)\](?:\[\])?/).replace("ref", T).getRegex(), at = b("reflink|nolink(?!\\()", "g").replace("reflink", rt).replace("nolink", it).getRegex(), ot = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, M = {
|
|
345
|
-
_backpedal: y,
|
|
346
|
-
anyPunctuation: Qe,
|
|
347
|
-
autolink: $e,
|
|
348
|
-
blockSkip: We,
|
|
349
|
-
br: Le,
|
|
350
|
-
code: Ie,
|
|
351
|
-
del: y,
|
|
352
|
-
emStrongLDelim: Ke,
|
|
353
|
-
emStrongRDelimAst: Ye,
|
|
354
|
-
emStrongRDelimUnd: Ze,
|
|
355
|
-
escape: Fe,
|
|
356
|
-
link: nt,
|
|
357
|
-
nolink: it,
|
|
358
|
-
punctuation: Be,
|
|
359
|
-
reflink: rt,
|
|
360
|
-
reflinkSearch: at,
|
|
361
|
-
tag: tt,
|
|
362
|
-
text: Re,
|
|
363
|
-
url: y
|
|
364
|
-
}, st = {
|
|
365
|
-
...M,
|
|
366
|
-
link: b(/^!?\[(label)\]\((.*?)\)/).replace("label", j).getRegex(),
|
|
367
|
-
reflink: b(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", j).getRegex()
|
|
368
|
-
}, N = {
|
|
369
|
-
...M,
|
|
370
|
-
emStrongRDelimAst: Xe,
|
|
371
|
-
emStrongLDelim: qe,
|
|
372
|
-
url: b(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ot).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
373
|
-
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
374
|
-
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
375
|
-
text: b(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ot).getRegex()
|
|
376
|
-
}, ct = {
|
|
377
|
-
...N,
|
|
378
|
-
br: b(Le).replace("{2,}", "*").getRegex(),
|
|
379
|
-
text: b(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
380
|
-
}, P = {
|
|
381
|
-
normal: O,
|
|
382
|
-
gfm: Ne,
|
|
383
|
-
pedantic: Pe
|
|
384
|
-
}, F = {
|
|
385
|
-
normal: M,
|
|
386
|
-
gfm: N,
|
|
387
|
-
breaks: ct,
|
|
388
|
-
pedantic: st
|
|
389
|
-
}, lt = {
|
|
390
|
-
"&": "&",
|
|
391
|
-
"<": "<",
|
|
392
|
-
">": ">",
|
|
393
|
-
"\"": """,
|
|
394
|
-
"'": "'"
|
|
395
|
-
}, ut = (e) => lt[e];
|
|
396
|
-
function I(e, t) {
|
|
397
|
-
if (t) {
|
|
398
|
-
if (x.escapeTest.test(e)) return e.replace(x.escapeReplace, ut);
|
|
399
|
-
} else if (x.escapeTestNoEncode.test(e)) return e.replace(x.escapeReplaceNoEncode, ut);
|
|
400
|
-
return e;
|
|
401
|
-
}
|
|
402
|
-
function dt(e) {
|
|
403
|
-
try {
|
|
404
|
-
e = encodeURI(e).replace(x.percentDecode, "%");
|
|
405
|
-
} catch {
|
|
406
|
-
return null;
|
|
407
|
-
}
|
|
408
|
-
return e;
|
|
409
|
-
}
|
|
410
|
-
function ft(e, t) {
|
|
411
|
-
let n = e.replace(x.findPipe, (e, t, n) => {
|
|
412
|
-
let r = !1, i = t;
|
|
413
|
-
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
414
|
-
return r ? "|" : " |";
|
|
415
|
-
}).split(x.splitPipe), r = 0;
|
|
416
|
-
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
|
|
417
|
-
else for (; n.length < t;) n.push("");
|
|
418
|
-
for (; r < n.length; r++) n[r] = n[r].trim().replace(x.slashPipe, "|");
|
|
419
|
-
return n;
|
|
420
|
-
}
|
|
421
|
-
function L(e, t, n) {
|
|
422
|
-
let r = e.length;
|
|
423
|
-
if (r === 0) return "";
|
|
424
|
-
let i = 0;
|
|
425
|
-
for (; i < r;) {
|
|
426
|
-
let a = e.charAt(r - i - 1);
|
|
427
|
-
if (a === t && !n) i++;
|
|
428
|
-
else if (a !== t && n) i++;
|
|
429
|
-
else break;
|
|
430
|
-
}
|
|
431
|
-
return e.slice(0, r - i);
|
|
432
|
-
}
|
|
433
|
-
function pt(e, t) {
|
|
434
|
-
if (e.indexOf(t[1]) === -1) return -1;
|
|
435
|
-
let n = 0;
|
|
436
|
-
for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
|
|
437
|
-
else if (e[r] === t[0]) n++;
|
|
438
|
-
else if (e[r] === t[1] && (n--, n < 0)) return r;
|
|
439
|
-
return n > 0 ? -2 : -1;
|
|
440
|
-
}
|
|
441
|
-
function mt(e, t, n, r, i) {
|
|
442
|
-
let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
|
|
443
|
-
r.state.inLink = !0;
|
|
444
|
-
let c = {
|
|
445
|
-
type: e[0].charAt(0) === "!" ? "image" : "link",
|
|
446
|
-
raw: n,
|
|
447
|
-
href: a,
|
|
448
|
-
title: o,
|
|
449
|
-
text: s,
|
|
450
|
-
tokens: r.inlineTokens(s)
|
|
451
|
-
};
|
|
452
|
-
return r.state.inLink = !1, c;
|
|
453
|
-
}
|
|
454
|
-
function ht(e, t, n) {
|
|
455
|
-
let r = e.match(n.other.indentCodeCompensation);
|
|
456
|
-
if (r === null) return t;
|
|
457
|
-
let i = r[1];
|
|
458
|
-
return t.split("\n").map((e) => {
|
|
459
|
-
let t = e.match(n.other.beginningSpace);
|
|
460
|
-
if (t === null) return e;
|
|
461
|
-
let [r] = t;
|
|
462
|
-
return r.length >= i.length ? e.slice(i.length) : e;
|
|
463
|
-
}).join("\n");
|
|
464
|
-
}
|
|
465
|
-
var R = class {
|
|
466
|
-
options;
|
|
467
|
-
rules;
|
|
468
|
-
lexer;
|
|
469
|
-
constructor(e) {
|
|
470
|
-
this.options = e || v;
|
|
471
|
-
}
|
|
472
|
-
space(e) {
|
|
473
|
-
let t = this.rules.block.newline.exec(e);
|
|
474
|
-
if (t && t[0].length > 0) return {
|
|
475
|
-
type: "space",
|
|
476
|
-
raw: t[0]
|
|
477
|
-
};
|
|
478
|
-
}
|
|
479
|
-
code(e) {
|
|
480
|
-
let t = this.rules.block.code.exec(e);
|
|
481
|
-
if (t) {
|
|
482
|
-
let e = t[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
483
|
-
return {
|
|
484
|
-
type: "code",
|
|
485
|
-
raw: t[0],
|
|
486
|
-
codeBlockStyle: "indented",
|
|
487
|
-
text: this.options.pedantic ? e : L(e, "\n")
|
|
488
|
-
};
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
fences(e) {
|
|
492
|
-
let t = this.rules.block.fences.exec(e);
|
|
493
|
-
if (t) {
|
|
494
|
-
let e = t[0], n = ht(e, t[3] || "", this.rules);
|
|
495
|
-
return {
|
|
496
|
-
type: "code",
|
|
497
|
-
raw: e,
|
|
498
|
-
lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2],
|
|
499
|
-
text: n
|
|
500
|
-
};
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
heading(e) {
|
|
504
|
-
let t = this.rules.block.heading.exec(e);
|
|
505
|
-
if (t) {
|
|
506
|
-
let e = t[2].trim();
|
|
507
|
-
if (this.rules.other.endingHash.test(e)) {
|
|
508
|
-
let t = L(e, "#");
|
|
509
|
-
(this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
|
|
510
|
-
}
|
|
511
|
-
return {
|
|
512
|
-
type: "heading",
|
|
513
|
-
raw: t[0],
|
|
514
|
-
depth: t[1].length,
|
|
515
|
-
text: e,
|
|
516
|
-
tokens: this.lexer.inline(e)
|
|
517
|
-
};
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
hr(e) {
|
|
521
|
-
let t = this.rules.block.hr.exec(e);
|
|
522
|
-
if (t) return {
|
|
523
|
-
type: "hr",
|
|
524
|
-
raw: L(t[0], "\n")
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
blockquote(e) {
|
|
528
|
-
let t = this.rules.block.blockquote.exec(e);
|
|
529
|
-
if (t) {
|
|
530
|
-
let e = L(t[0], "\n").split("\n"), n = "", r = "", i = [];
|
|
531
|
-
for (; e.length > 0;) {
|
|
532
|
-
let t = !1, a = [], o;
|
|
533
|
-
for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
|
|
534
|
-
else if (!t) a.push(e[o]);
|
|
535
|
-
else break;
|
|
536
|
-
e = e.slice(o);
|
|
537
|
-
let s = a.join("\n"), c = s.replace(this.rules.other.blockquoteSetextReplace, "\n $1").replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
538
|
-
n = n ? `${n}
|
|
539
|
-
${s}` : s, r = r ? `${r}
|
|
540
|
-
${c}` : c;
|
|
541
|
-
let l = this.lexer.state.top;
|
|
542
|
-
if (this.lexer.state.top = !0, this.lexer.blockTokens(c, i, !0), this.lexer.state.top = l, e.length === 0) break;
|
|
543
|
-
let u = i.at(-1);
|
|
544
|
-
if (u?.type === "code") break;
|
|
545
|
-
if (u?.type === "blockquote") {
|
|
546
|
-
let t = u, a = t.raw + "\n" + e.join("\n"), o = this.blockquote(a);
|
|
547
|
-
i[i.length - 1] = o, n = n.substring(0, n.length - t.raw.length) + o.raw, r = r.substring(0, r.length - t.text.length) + o.text;
|
|
548
|
-
break;
|
|
549
|
-
} else if (u?.type === "list") {
|
|
550
|
-
let t = u, a = t.raw + "\n" + e.join("\n"), o = this.list(a);
|
|
551
|
-
i[i.length - 1] = o, n = n.substring(0, n.length - u.raw.length) + o.raw, r = r.substring(0, r.length - t.raw.length) + o.raw, e = a.substring(i.at(-1).raw.length).split("\n");
|
|
552
|
-
continue;
|
|
553
|
-
}
|
|
554
|
-
}
|
|
555
|
-
return {
|
|
556
|
-
type: "blockquote",
|
|
557
|
-
raw: n,
|
|
558
|
-
tokens: i,
|
|
559
|
-
text: r
|
|
560
|
-
};
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
list(e) {
|
|
564
|
-
let t = this.rules.block.list.exec(e);
|
|
565
|
-
if (t) {
|
|
566
|
-
let n = t[1].trim(), r = n.length > 1, i = {
|
|
567
|
-
type: "list",
|
|
568
|
-
raw: "",
|
|
569
|
-
ordered: r,
|
|
570
|
-
start: r ? +n.slice(0, -1) : "",
|
|
571
|
-
loose: !1,
|
|
572
|
-
items: []
|
|
573
|
-
};
|
|
574
|
-
n = r ? `\\d{1,9}\\${n.slice(-1)}` : `\\${n}`, this.options.pedantic && (n = r ? n : "[*+-]");
|
|
575
|
-
let a = this.rules.other.listItemRegex(n), o = !1;
|
|
576
|
-
for (; e;) {
|
|
577
|
-
let n = !1, r = "", s = "";
|
|
578
|
-
if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
579
|
-
r = t[0], e = e.substring(r.length);
|
|
580
|
-
let c = t[2].split("\n", 1)[0].replace(this.rules.other.listReplaceTabs, (e) => " ".repeat(3 * e.length)), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
|
|
581
|
-
if (this.options.pedantic ? (d = 2, s = c.trimStart()) : u ? d = t[1].length + 1 : (d = t[2].search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, s = c.slice(d), d += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
|
|
582
|
-
let t = this.rules.other.nextBulletRegex(d), n = this.rules.other.hrRegex(d), i = this.rules.other.fencesBeginRegex(d), a = this.rules.other.headingBeginRegex(d), o = this.rules.other.htmlBeginRegex(d);
|
|
583
|
-
for (; e;) {
|
|
584
|
-
let f = e.split("\n", 1)[0], p;
|
|
585
|
-
if (l = f, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), p = l) : p = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || t.test(l) || n.test(l)) break;
|
|
586
|
-
if (p.search(this.rules.other.nonSpaceChar) >= d || !l.trim()) s += "\n" + p.slice(d);
|
|
587
|
-
else {
|
|
588
|
-
if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
|
|
589
|
-
s += "\n" + l;
|
|
590
|
-
}
|
|
591
|
-
!u && !l.trim() && (u = !0), r += f + "\n", e = e.substring(f.length + 1), c = p.slice(d);
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0));
|
|
595
|
-
let f = null, p;
|
|
596
|
-
this.options.gfm && (f = this.rules.other.listIsTask.exec(s), f && (p = f[0] !== "[ ] ", s = s.replace(this.rules.other.listReplaceTask, ""))), i.items.push({
|
|
597
|
-
type: "list_item",
|
|
598
|
-
raw: r,
|
|
599
|
-
task: !!f,
|
|
600
|
-
checked: p,
|
|
601
|
-
loose: !1,
|
|
602
|
-
text: s,
|
|
603
|
-
tokens: []
|
|
604
|
-
}), i.raw += r;
|
|
605
|
-
}
|
|
606
|
-
let s = i.items.at(-1);
|
|
607
|
-
if (s) s.raw = s.raw.trimEnd(), s.text = s.text.trimEnd();
|
|
608
|
-
else return;
|
|
609
|
-
i.raw = i.raw.trimEnd();
|
|
610
|
-
for (let e = 0; e < i.items.length; e++) if (this.lexer.state.top = !1, i.items[e].tokens = this.lexer.blockTokens(i.items[e].text, []), !i.loose) {
|
|
611
|
-
let t = i.items[e].tokens.filter((e) => e.type === "space");
|
|
612
|
-
i.loose = t.length > 0 && t.some((e) => this.rules.other.anyLine.test(e.raw));
|
|
613
|
-
}
|
|
614
|
-
if (i.loose) for (let e = 0; e < i.items.length; e++) i.items[e].loose = !0;
|
|
615
|
-
return i;
|
|
616
|
-
}
|
|
617
|
-
}
|
|
618
|
-
html(e) {
|
|
619
|
-
let t = this.rules.block.html.exec(e);
|
|
620
|
-
if (t) return {
|
|
621
|
-
type: "html",
|
|
622
|
-
block: !0,
|
|
623
|
-
raw: t[0],
|
|
624
|
-
pre: t[1] === "pre" || t[1] === "script" || t[1] === "style",
|
|
625
|
-
text: t[0]
|
|
626
|
-
};
|
|
627
|
-
}
|
|
628
|
-
def(e) {
|
|
629
|
-
let t = this.rules.block.def.exec(e);
|
|
630
|
-
if (t) {
|
|
631
|
-
let e = t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), n = t[2] ? t[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r = t[3] ? t[3].substring(1, t[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t[3];
|
|
632
|
-
return {
|
|
633
|
-
type: "def",
|
|
634
|
-
tag: e,
|
|
635
|
-
raw: t[0],
|
|
636
|
-
href: n,
|
|
637
|
-
title: r
|
|
638
|
-
};
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
table(e) {
|
|
642
|
-
let t = this.rules.block.table.exec(e);
|
|
643
|
-
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
644
|
-
let n = ft(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
|
|
645
|
-
type: "table",
|
|
646
|
-
raw: t[0],
|
|
647
|
-
header: [],
|
|
648
|
-
align: [],
|
|
649
|
-
rows: []
|
|
650
|
-
};
|
|
651
|
-
if (n.length === r.length) {
|
|
652
|
-
for (let e of r) this.rules.other.tableAlignRight.test(e) ? a.align.push("right") : this.rules.other.tableAlignCenter.test(e) ? a.align.push("center") : this.rules.other.tableAlignLeft.test(e) ? a.align.push("left") : a.align.push(null);
|
|
653
|
-
for (let e = 0; e < n.length; e++) a.header.push({
|
|
654
|
-
text: n[e],
|
|
655
|
-
tokens: this.lexer.inline(n[e]),
|
|
656
|
-
header: !0,
|
|
657
|
-
align: a.align[e]
|
|
658
|
-
});
|
|
659
|
-
for (let e of i) a.rows.push(ft(e, a.header.length).map((e, t) => ({
|
|
660
|
-
text: e,
|
|
661
|
-
tokens: this.lexer.inline(e),
|
|
662
|
-
header: !1,
|
|
663
|
-
align: a.align[t]
|
|
664
|
-
})));
|
|
665
|
-
return a;
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
lheading(e) {
|
|
669
|
-
let t = this.rules.block.lheading.exec(e);
|
|
670
|
-
if (t) return {
|
|
671
|
-
type: "heading",
|
|
672
|
-
raw: t[0],
|
|
673
|
-
depth: t[2].charAt(0) === "=" ? 1 : 2,
|
|
674
|
-
text: t[1],
|
|
675
|
-
tokens: this.lexer.inline(t[1])
|
|
676
|
-
};
|
|
677
|
-
}
|
|
678
|
-
paragraph(e) {
|
|
679
|
-
let t = this.rules.block.paragraph.exec(e);
|
|
680
|
-
if (t) {
|
|
681
|
-
let e = t[1].charAt(t[1].length - 1) === "\n" ? t[1].slice(0, -1) : t[1];
|
|
682
|
-
return {
|
|
683
|
-
type: "paragraph",
|
|
684
|
-
raw: t[0],
|
|
685
|
-
text: e,
|
|
686
|
-
tokens: this.lexer.inline(e)
|
|
687
|
-
};
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
text(e) {
|
|
691
|
-
let t = this.rules.block.text.exec(e);
|
|
692
|
-
if (t) return {
|
|
693
|
-
type: "text",
|
|
694
|
-
raw: t[0],
|
|
695
|
-
text: t[0],
|
|
696
|
-
tokens: this.lexer.inline(t[0])
|
|
697
|
-
};
|
|
698
|
-
}
|
|
699
|
-
escape(e) {
|
|
700
|
-
let t = this.rules.inline.escape.exec(e);
|
|
701
|
-
if (t) return {
|
|
702
|
-
type: "escape",
|
|
703
|
-
raw: t[0],
|
|
704
|
-
text: t[1]
|
|
705
|
-
};
|
|
706
|
-
}
|
|
707
|
-
tag(e) {
|
|
708
|
-
let t = this.rules.inline.tag.exec(e);
|
|
709
|
-
if (t) return !this.lexer.state.inLink && this.rules.other.startATag.test(t[0]) ? this.lexer.state.inLink = !0 : this.lexer.state.inLink && this.rules.other.endATag.test(t[0]) && (this.lexer.state.inLink = !1), !this.lexer.state.inRawBlock && this.rules.other.startPreScriptTag.test(t[0]) ? this.lexer.state.inRawBlock = !0 : this.lexer.state.inRawBlock && this.rules.other.endPreScriptTag.test(t[0]) && (this.lexer.state.inRawBlock = !1), {
|
|
710
|
-
type: "html",
|
|
711
|
-
raw: t[0],
|
|
712
|
-
inLink: this.lexer.state.inLink,
|
|
713
|
-
inRawBlock: this.lexer.state.inRawBlock,
|
|
714
|
-
block: !1,
|
|
715
|
-
text: t[0]
|
|
716
|
-
};
|
|
717
|
-
}
|
|
718
|
-
link(e) {
|
|
719
|
-
let t = this.rules.inline.link.exec(e);
|
|
720
|
-
if (t) {
|
|
721
|
-
let e = t[2].trim();
|
|
722
|
-
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
|
|
723
|
-
if (!this.rules.other.endAngleBracket.test(e)) return;
|
|
724
|
-
let t = L(e.slice(0, -1), "\\");
|
|
725
|
-
if ((e.length - t.length) % 2 == 0) return;
|
|
726
|
-
} else {
|
|
727
|
-
let e = pt(t[2], "()");
|
|
728
|
-
if (e === -2) return;
|
|
729
|
-
if (e > -1) {
|
|
730
|
-
let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
|
|
731
|
-
t[2] = t[2].substring(0, e), t[0] = t[0].substring(0, n).trim(), t[3] = "";
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
let n = t[2], r = "";
|
|
735
|
-
if (this.options.pedantic) {
|
|
736
|
-
let e = this.rules.other.pedanticHrefTitle.exec(n);
|
|
737
|
-
e && (n = e[1], r = e[3]);
|
|
738
|
-
} else r = t[3] ? t[3].slice(1, -1) : "";
|
|
739
|
-
return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), mt(t, {
|
|
740
|
-
href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
741
|
-
title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
|
|
742
|
-
}, t[0], this.lexer, this.rules);
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
reflink(e, t) {
|
|
746
|
-
let n;
|
|
747
|
-
if ((n = this.rules.inline.reflink.exec(e)) || (n = this.rules.inline.nolink.exec(e))) {
|
|
748
|
-
let e = t[(n[2] || n[1]).replace(this.rules.other.multipleSpaceGlobal, " ").toLowerCase()];
|
|
749
|
-
if (!e) {
|
|
750
|
-
let e = n[0].charAt(0);
|
|
751
|
-
return {
|
|
752
|
-
type: "text",
|
|
753
|
-
raw: e,
|
|
754
|
-
text: e
|
|
755
|
-
};
|
|
756
|
-
}
|
|
757
|
-
return mt(n, e, n[0], this.lexer, this.rules);
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
emStrong(e, t, n = "") {
|
|
761
|
-
let r = this.rules.inline.emStrongLDelim.exec(e);
|
|
762
|
-
if (!(!r || r[3] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(r[1] || r[2]) || !n || this.rules.inline.punctuation.exec(n))) {
|
|
763
|
-
let n = [...r[0]].length - 1, i, a, o = n, s = 0, c = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
764
|
-
for (c.lastIndex = 0, t = t.slice(-1 * e.length + n); (r = c.exec(t)) != null;) {
|
|
765
|
-
if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i) continue;
|
|
766
|
-
if (a = [...i].length, r[3] || r[4]) {
|
|
767
|
-
o += a;
|
|
768
|
-
continue;
|
|
769
|
-
} else if ((r[5] || r[6]) && n % 3 && !((n + a) % 3)) {
|
|
770
|
-
s += a;
|
|
771
|
-
continue;
|
|
772
|
-
}
|
|
773
|
-
if (o -= a, o > 0) continue;
|
|
774
|
-
a = Math.min(a, a + o + s);
|
|
775
|
-
let t = [...r[0]][0].length, c = e.slice(0, n + r.index + t + a);
|
|
776
|
-
if (Math.min(n, a) % 2) {
|
|
777
|
-
let e = c.slice(1, -1);
|
|
778
|
-
return {
|
|
779
|
-
type: "em",
|
|
780
|
-
raw: c,
|
|
781
|
-
text: e,
|
|
782
|
-
tokens: this.lexer.inlineTokens(e)
|
|
783
|
-
};
|
|
784
|
-
}
|
|
785
|
-
let l = c.slice(2, -2);
|
|
786
|
-
return {
|
|
787
|
-
type: "strong",
|
|
788
|
-
raw: c,
|
|
789
|
-
text: l,
|
|
790
|
-
tokens: this.lexer.inlineTokens(l)
|
|
791
|
-
};
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
}
|
|
795
|
-
codespan(e) {
|
|
796
|
-
let t = this.rules.inline.code.exec(e);
|
|
797
|
-
if (t) {
|
|
798
|
-
let e = t[2].replace(this.rules.other.newLineCharGlobal, " "), n = this.rules.other.nonSpaceChar.test(e), r = this.rules.other.startingSpaceChar.test(e) && this.rules.other.endingSpaceChar.test(e);
|
|
799
|
-
return n && r && (e = e.substring(1, e.length - 1)), {
|
|
800
|
-
type: "codespan",
|
|
801
|
-
raw: t[0],
|
|
802
|
-
text: e
|
|
803
|
-
};
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
|
-
br(e) {
|
|
807
|
-
let t = this.rules.inline.br.exec(e);
|
|
808
|
-
if (t) return {
|
|
809
|
-
type: "br",
|
|
810
|
-
raw: t[0]
|
|
811
|
-
};
|
|
812
|
-
}
|
|
813
|
-
del(e) {
|
|
814
|
-
let t = this.rules.inline.del.exec(e);
|
|
815
|
-
if (t) return {
|
|
816
|
-
type: "del",
|
|
817
|
-
raw: t[0],
|
|
818
|
-
text: t[2],
|
|
819
|
-
tokens: this.lexer.inlineTokens(t[2])
|
|
820
|
-
};
|
|
821
|
-
}
|
|
822
|
-
autolink(e) {
|
|
823
|
-
let t = this.rules.inline.autolink.exec(e);
|
|
824
|
-
if (t) {
|
|
825
|
-
let e, n;
|
|
826
|
-
return t[2] === "@" ? (e = t[1], n = "mailto:" + e) : (e = t[1], n = e), {
|
|
827
|
-
type: "link",
|
|
828
|
-
raw: t[0],
|
|
829
|
-
text: e,
|
|
830
|
-
href: n,
|
|
831
|
-
tokens: [{
|
|
832
|
-
type: "text",
|
|
833
|
-
raw: e,
|
|
834
|
-
text: e
|
|
835
|
-
}]
|
|
836
|
-
};
|
|
837
|
-
}
|
|
838
|
-
}
|
|
839
|
-
url(e) {
|
|
840
|
-
let t;
|
|
841
|
-
if (t = this.rules.inline.url.exec(e)) {
|
|
842
|
-
let e, n;
|
|
843
|
-
if (t[2] === "@") e = t[0], n = "mailto:" + e;
|
|
844
|
-
else {
|
|
845
|
-
let r;
|
|
846
|
-
do
|
|
847
|
-
r = t[0], t[0] = this.rules.inline._backpedal.exec(t[0])?.[0] ?? "";
|
|
848
|
-
while (r !== t[0]);
|
|
849
|
-
e = t[0], n = t[1] === "www." ? "http://" + t[0] : t[0];
|
|
850
|
-
}
|
|
851
|
-
return {
|
|
852
|
-
type: "link",
|
|
853
|
-
raw: t[0],
|
|
854
|
-
text: e,
|
|
855
|
-
href: n,
|
|
856
|
-
tokens: [{
|
|
857
|
-
type: "text",
|
|
858
|
-
raw: e,
|
|
859
|
-
text: e
|
|
860
|
-
}]
|
|
861
|
-
};
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
inlineText(e) {
|
|
865
|
-
let t = this.rules.inline.text.exec(e);
|
|
866
|
-
if (t) {
|
|
867
|
-
let e = this.lexer.state.inRawBlock;
|
|
868
|
-
return {
|
|
869
|
-
type: "text",
|
|
870
|
-
raw: t[0],
|
|
871
|
-
text: t[0],
|
|
872
|
-
escaped: e
|
|
873
|
-
};
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
}, z = class e {
|
|
877
|
-
tokens;
|
|
878
|
-
options;
|
|
879
|
-
state;
|
|
880
|
-
tokenizer;
|
|
881
|
-
inlineQueue;
|
|
882
|
-
constructor(e) {
|
|
883
|
-
this.tokens = [], this.tokens.links = Object.create(null), this.options = e || v, this.options.tokenizer = this.options.tokenizer || new R(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
884
|
-
inLink: !1,
|
|
885
|
-
inRawBlock: !1,
|
|
886
|
-
top: !0
|
|
887
|
-
};
|
|
888
|
-
let t = {
|
|
889
|
-
other: x,
|
|
890
|
-
block: P.normal,
|
|
891
|
-
inline: F.normal
|
|
892
|
-
};
|
|
893
|
-
this.options.pedantic ? (t.block = P.pedantic, t.inline = F.pedantic) : this.options.gfm && (t.block = P.gfm, this.options.breaks ? t.inline = F.breaks : t.inline = F.gfm), this.tokenizer.rules = t;
|
|
894
|
-
}
|
|
895
|
-
static get rules() {
|
|
896
|
-
return {
|
|
897
|
-
block: P,
|
|
898
|
-
inline: F
|
|
899
|
-
};
|
|
900
|
-
}
|
|
901
|
-
static lex(t, n) {
|
|
902
|
-
return new e(n).lex(t);
|
|
903
|
-
}
|
|
904
|
-
static lexInline(t, n) {
|
|
905
|
-
return new e(n).inlineTokens(t);
|
|
906
|
-
}
|
|
907
|
-
lex(e) {
|
|
908
|
-
e = e.replace(x.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
|
|
909
|
-
for (let e = 0; e < this.inlineQueue.length; e++) {
|
|
910
|
-
let t = this.inlineQueue[e];
|
|
911
|
-
this.inlineTokens(t.src, t.tokens);
|
|
912
|
-
}
|
|
913
|
-
return this.inlineQueue = [], this.tokens;
|
|
914
|
-
}
|
|
915
|
-
blockTokens(e, t = [], n = !1) {
|
|
916
|
-
for (this.options.pedantic && (e = e.replace(x.tabCharGlobal, " ").replace(x.spaceLine, "")); e;) {
|
|
917
|
-
let r;
|
|
918
|
-
if (this.options.extensions?.block?.some((n) => (r = n.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
|
|
919
|
-
if (r = this.tokenizer.space(e)) {
|
|
920
|
-
e = e.substring(r.raw.length);
|
|
921
|
-
let n = t.at(-1);
|
|
922
|
-
r.raw.length === 1 && n !== void 0 ? n.raw += "\n" : t.push(r);
|
|
923
|
-
continue;
|
|
924
|
-
}
|
|
925
|
-
if (r = this.tokenizer.code(e)) {
|
|
926
|
-
e = e.substring(r.raw.length);
|
|
927
|
-
let n = t.at(-1);
|
|
928
|
-
n?.type === "paragraph" || n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + r.raw, n.text += "\n" + r.text, this.inlineQueue.at(-1).src = n.text) : t.push(r);
|
|
929
|
-
continue;
|
|
930
|
-
}
|
|
931
|
-
if (r = this.tokenizer.fences(e)) {
|
|
932
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
933
|
-
continue;
|
|
934
|
-
}
|
|
935
|
-
if (r = this.tokenizer.heading(e)) {
|
|
936
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
937
|
-
continue;
|
|
938
|
-
}
|
|
939
|
-
if (r = this.tokenizer.hr(e)) {
|
|
940
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
941
|
-
continue;
|
|
942
|
-
}
|
|
943
|
-
if (r = this.tokenizer.blockquote(e)) {
|
|
944
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
945
|
-
continue;
|
|
946
|
-
}
|
|
947
|
-
if (r = this.tokenizer.list(e)) {
|
|
948
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
949
|
-
continue;
|
|
950
|
-
}
|
|
951
|
-
if (r = this.tokenizer.html(e)) {
|
|
952
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
953
|
-
continue;
|
|
954
|
-
}
|
|
955
|
-
if (r = this.tokenizer.def(e)) {
|
|
956
|
-
e = e.substring(r.raw.length);
|
|
957
|
-
let n = t.at(-1);
|
|
958
|
-
n?.type === "paragraph" || n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + r.raw, n.text += "\n" + r.raw, this.inlineQueue.at(-1).src = n.text) : this.tokens.links[r.tag] || (this.tokens.links[r.tag] = {
|
|
959
|
-
href: r.href,
|
|
960
|
-
title: r.title
|
|
961
|
-
}, t.push(r));
|
|
962
|
-
continue;
|
|
963
|
-
}
|
|
964
|
-
if (r = this.tokenizer.table(e)) {
|
|
965
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
966
|
-
continue;
|
|
967
|
-
}
|
|
968
|
-
if (r = this.tokenizer.lheading(e)) {
|
|
969
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
970
|
-
continue;
|
|
971
|
-
}
|
|
972
|
-
let i = e;
|
|
973
|
-
if (this.options.extensions?.startBlock) {
|
|
974
|
-
let t = Infinity, n = e.slice(1), r;
|
|
975
|
-
this.options.extensions.startBlock.forEach((e) => {
|
|
976
|
-
r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
|
|
977
|
-
}), t < Infinity && t >= 0 && (i = e.substring(0, t + 1));
|
|
978
|
-
}
|
|
979
|
-
if (this.state.top && (r = this.tokenizer.paragraph(i))) {
|
|
980
|
-
let a = t.at(-1);
|
|
981
|
-
n && a?.type === "paragraph" ? (a.raw += (a.raw.endsWith("\n") ? "" : "\n") + r.raw, a.text += "\n" + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = a.text) : t.push(r), n = i.length !== e.length, e = e.substring(r.raw.length);
|
|
982
|
-
continue;
|
|
983
|
-
}
|
|
984
|
-
if (r = this.tokenizer.text(e)) {
|
|
985
|
-
e = e.substring(r.raw.length);
|
|
986
|
-
let n = t.at(-1);
|
|
987
|
-
n?.type === "text" ? (n.raw += (n.raw.endsWith("\n") ? "" : "\n") + r.raw, n.text += "\n" + r.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = n.text) : t.push(r);
|
|
988
|
-
continue;
|
|
989
|
-
}
|
|
990
|
-
if (e) {
|
|
991
|
-
let t = "Infinite loop on byte: " + e.charCodeAt(0);
|
|
992
|
-
if (this.options.silent) {
|
|
993
|
-
console.error(t);
|
|
994
|
-
break;
|
|
995
|
-
} else throw Error(t);
|
|
996
|
-
}
|
|
997
|
-
}
|
|
998
|
-
return this.state.top = !0, t;
|
|
999
|
-
}
|
|
1000
|
-
inline(e, t = []) {
|
|
1001
|
-
return this.inlineQueue.push({
|
|
1002
|
-
src: e,
|
|
1003
|
-
tokens: t
|
|
1004
|
-
}), t;
|
|
1005
|
-
}
|
|
1006
|
-
inlineTokens(e, t = []) {
|
|
1007
|
-
let n = e, r = null;
|
|
1008
|
-
if (this.tokens.links) {
|
|
1009
|
-
let e = Object.keys(this.tokens.links);
|
|
1010
|
-
if (e.length > 0) for (; (r = this.tokenizer.rules.inline.reflinkSearch.exec(n)) != null;) e.includes(r[0].slice(r[0].lastIndexOf("[") + 1, -1)) && (n = n.slice(0, r.index) + "[" + "a".repeat(r[0].length - 2) + "]" + n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
|
|
1011
|
-
}
|
|
1012
|
-
for (; (r = this.tokenizer.rules.inline.anyPunctuation.exec(n)) != null;) n = n.slice(0, r.index) + "++" + n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
1013
|
-
let i;
|
|
1014
|
-
for (; (r = this.tokenizer.rules.inline.blockSkip.exec(n)) != null;) i = r[2] ? r[2].length : 0, n = n.slice(0, r.index + i) + "[" + "a".repeat(r[0].length - i - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
1015
|
-
n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
|
|
1016
|
-
let a = !1, o = "";
|
|
1017
|
-
for (; e;) {
|
|
1018
|
-
a || (o = ""), a = !1;
|
|
1019
|
-
let r;
|
|
1020
|
-
if (this.options.extensions?.inline?.some((n) => (r = n.call({ lexer: this }, e, t)) ? (e = e.substring(r.raw.length), t.push(r), !0) : !1)) continue;
|
|
1021
|
-
if (r = this.tokenizer.escape(e)) {
|
|
1022
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
1023
|
-
continue;
|
|
1024
|
-
}
|
|
1025
|
-
if (r = this.tokenizer.tag(e)) {
|
|
1026
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
1027
|
-
continue;
|
|
1028
|
-
}
|
|
1029
|
-
if (r = this.tokenizer.link(e)) {
|
|
1030
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
1031
|
-
continue;
|
|
1032
|
-
}
|
|
1033
|
-
if (r = this.tokenizer.reflink(e, this.tokens.links)) {
|
|
1034
|
-
e = e.substring(r.raw.length);
|
|
1035
|
-
let n = t.at(-1);
|
|
1036
|
-
r.type === "text" && n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
|
|
1037
|
-
continue;
|
|
1038
|
-
}
|
|
1039
|
-
if (r = this.tokenizer.emStrong(e, n, o)) {
|
|
1040
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
1041
|
-
continue;
|
|
1042
|
-
}
|
|
1043
|
-
if (r = this.tokenizer.codespan(e)) {
|
|
1044
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
1045
|
-
continue;
|
|
1046
|
-
}
|
|
1047
|
-
if (r = this.tokenizer.br(e)) {
|
|
1048
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
1049
|
-
continue;
|
|
1050
|
-
}
|
|
1051
|
-
if (r = this.tokenizer.del(e)) {
|
|
1052
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
1053
|
-
continue;
|
|
1054
|
-
}
|
|
1055
|
-
if (r = this.tokenizer.autolink(e)) {
|
|
1056
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
1057
|
-
continue;
|
|
1058
|
-
}
|
|
1059
|
-
if (!this.state.inLink && (r = this.tokenizer.url(e))) {
|
|
1060
|
-
e = e.substring(r.raw.length), t.push(r);
|
|
1061
|
-
continue;
|
|
1062
|
-
}
|
|
1063
|
-
let i = e;
|
|
1064
|
-
if (this.options.extensions?.startInline) {
|
|
1065
|
-
let t = Infinity, n = e.slice(1), r;
|
|
1066
|
-
this.options.extensions.startInline.forEach((e) => {
|
|
1067
|
-
r = e.call({ lexer: this }, n), typeof r == "number" && r >= 0 && (t = Math.min(t, r));
|
|
1068
|
-
}), t < Infinity && t >= 0 && (i = e.substring(0, t + 1));
|
|
1069
|
-
}
|
|
1070
|
-
if (r = this.tokenizer.inlineText(i)) {
|
|
1071
|
-
e = e.substring(r.raw.length), r.raw.slice(-1) !== "_" && (o = r.raw.slice(-1)), a = !0;
|
|
1072
|
-
let n = t.at(-1);
|
|
1073
|
-
n?.type === "text" ? (n.raw += r.raw, n.text += r.text) : t.push(r);
|
|
1074
|
-
continue;
|
|
1075
|
-
}
|
|
1076
|
-
if (e) {
|
|
1077
|
-
let t = "Infinite loop on byte: " + e.charCodeAt(0);
|
|
1078
|
-
if (this.options.silent) {
|
|
1079
|
-
console.error(t);
|
|
1080
|
-
break;
|
|
1081
|
-
} else throw Error(t);
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
return t;
|
|
1085
|
-
}
|
|
1086
|
-
}, B = class {
|
|
1087
|
-
options;
|
|
1088
|
-
parser;
|
|
1089
|
-
constructor(e) {
|
|
1090
|
-
this.options = e || v;
|
|
1091
|
-
}
|
|
1092
|
-
space(e) {
|
|
1093
|
-
return "";
|
|
1094
|
-
}
|
|
1095
|
-
code({ text: e, lang: t, escaped: n }) {
|
|
1096
|
-
let r = (t || "").match(x.notSpaceStart)?.[0], i = e.replace(x.endingNewline, "") + "\n";
|
|
1097
|
-
return r ? "<pre><code class=\"language-" + I(r) + "\">" + (n ? i : I(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : I(i, !0)) + "</code></pre>\n";
|
|
1098
|
-
}
|
|
1099
|
-
blockquote({ tokens: e }) {
|
|
1100
|
-
return `<blockquote>
|
|
1101
|
-
${this.parser.parse(e)}</blockquote>
|
|
1102
|
-
`;
|
|
1103
|
-
}
|
|
1104
|
-
html({ text: e }) {
|
|
1105
|
-
return e;
|
|
1106
|
-
}
|
|
1107
|
-
def(e) {
|
|
1108
|
-
return "";
|
|
1109
|
-
}
|
|
1110
|
-
heading({ tokens: e, depth: t }) {
|
|
1111
|
-
return `<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
1112
|
-
`;
|
|
1113
|
-
}
|
|
1114
|
-
hr(e) {
|
|
1115
|
-
return "<hr>\n";
|
|
1116
|
-
}
|
|
1117
|
-
list(e) {
|
|
1118
|
-
let t = e.ordered, n = e.start, r = "";
|
|
1119
|
-
for (let t = 0; t < e.items.length; t++) {
|
|
1120
|
-
let n = e.items[t];
|
|
1121
|
-
r += this.listitem(n);
|
|
1122
|
-
}
|
|
1123
|
-
let i = t ? "ol" : "ul", a = t && n !== 1 ? " start=\"" + n + "\"" : "";
|
|
1124
|
-
return "<" + i + a + ">\n" + r + "</" + i + ">\n";
|
|
1125
|
-
}
|
|
1126
|
-
listitem(e) {
|
|
1127
|
-
let t = "";
|
|
1128
|
-
if (e.task) {
|
|
1129
|
-
let n = this.checkbox({ checked: !!e.checked });
|
|
1130
|
-
e.loose ? e.tokens[0]?.type === "paragraph" ? (e.tokens[0].text = n + " " + e.tokens[0].text, e.tokens[0].tokens && e.tokens[0].tokens.length > 0 && e.tokens[0].tokens[0].type === "text" && (e.tokens[0].tokens[0].text = n + " " + I(e.tokens[0].tokens[0].text), e.tokens[0].tokens[0].escaped = !0)) : e.tokens.unshift({
|
|
1131
|
-
type: "text",
|
|
1132
|
-
raw: n + " ",
|
|
1133
|
-
text: n + " ",
|
|
1134
|
-
escaped: !0
|
|
1135
|
-
}) : t += n + " ";
|
|
1136
|
-
}
|
|
1137
|
-
return t += this.parser.parse(e.tokens, !!e.loose), `<li>${t}</li>
|
|
1138
|
-
`;
|
|
1139
|
-
}
|
|
1140
|
-
checkbox({ checked: e }) {
|
|
1141
|
-
return "<input " + (e ? "checked=\"\" " : "") + "disabled=\"\" type=\"checkbox\">";
|
|
1142
|
-
}
|
|
1143
|
-
paragraph({ tokens: e }) {
|
|
1144
|
-
return `<p>${this.parser.parseInline(e)}</p>
|
|
1145
|
-
`;
|
|
1146
|
-
}
|
|
1147
|
-
table(e) {
|
|
1148
|
-
let t = "", n = "";
|
|
1149
|
-
for (let t = 0; t < e.header.length; t++) n += this.tablecell(e.header[t]);
|
|
1150
|
-
t += this.tablerow({ text: n });
|
|
1151
|
-
let r = "";
|
|
1152
|
-
for (let t = 0; t < e.rows.length; t++) {
|
|
1153
|
-
let i = e.rows[t];
|
|
1154
|
-
n = "";
|
|
1155
|
-
for (let e = 0; e < i.length; e++) n += this.tablecell(i[e]);
|
|
1156
|
-
r += this.tablerow({ text: n });
|
|
1157
|
-
}
|
|
1158
|
-
return r &&= `<tbody>${r}</tbody>`, "<table>\n<thead>\n" + t + "</thead>\n" + r + "</table>\n";
|
|
1159
|
-
}
|
|
1160
|
-
tablerow({ text: e }) {
|
|
1161
|
-
return `<tr>
|
|
1162
|
-
${e}</tr>
|
|
1163
|
-
`;
|
|
1164
|
-
}
|
|
1165
|
-
tablecell(e) {
|
|
1166
|
-
let t = this.parser.parseInline(e.tokens), n = e.header ? "th" : "td";
|
|
1167
|
-
return (e.align ? `<${n} align="${e.align}">` : `<${n}>`) + t + `</${n}>
|
|
1168
|
-
`;
|
|
1169
|
-
}
|
|
1170
|
-
strong({ tokens: e }) {
|
|
1171
|
-
return `<strong>${this.parser.parseInline(e)}</strong>`;
|
|
1172
|
-
}
|
|
1173
|
-
em({ tokens: e }) {
|
|
1174
|
-
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
1175
|
-
}
|
|
1176
|
-
codespan({ text: e }) {
|
|
1177
|
-
return `<code>${I(e, !0)}</code>`;
|
|
1178
|
-
}
|
|
1179
|
-
br(e) {
|
|
1180
|
-
return "<br>";
|
|
1181
|
-
}
|
|
1182
|
-
del({ tokens: e }) {
|
|
1183
|
-
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
1184
|
-
}
|
|
1185
|
-
link({ href: e, title: t, tokens: n }) {
|
|
1186
|
-
let r = this.parser.parseInline(n), i = dt(e);
|
|
1187
|
-
if (i === null) return r;
|
|
1188
|
-
e = i;
|
|
1189
|
-
let a = "<a href=\"" + e + "\"";
|
|
1190
|
-
return t && (a += " title=\"" + I(t) + "\""), a += ">" + r + "</a>", a;
|
|
1191
|
-
}
|
|
1192
|
-
image({ href: e, title: t, text: n, tokens: r }) {
|
|
1193
|
-
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
1194
|
-
let i = dt(e);
|
|
1195
|
-
if (i === null) return I(n);
|
|
1196
|
-
e = i;
|
|
1197
|
-
let a = `<img src="${e}" alt="${n}"`;
|
|
1198
|
-
return t && (a += ` title="${I(t)}"`), a += ">", a;
|
|
1199
|
-
}
|
|
1200
|
-
text(e) {
|
|
1201
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : I(e.text);
|
|
1202
|
-
}
|
|
1203
|
-
}, V = class {
|
|
1204
|
-
strong({ text: e }) {
|
|
1205
|
-
return e;
|
|
1206
|
-
}
|
|
1207
|
-
em({ text: e }) {
|
|
1208
|
-
return e;
|
|
1209
|
-
}
|
|
1210
|
-
codespan({ text: e }) {
|
|
1211
|
-
return e;
|
|
1212
|
-
}
|
|
1213
|
-
del({ text: e }) {
|
|
1214
|
-
return e;
|
|
1215
|
-
}
|
|
1216
|
-
html({ text: e }) {
|
|
1217
|
-
return e;
|
|
1218
|
-
}
|
|
1219
|
-
text({ text: e }) {
|
|
1220
|
-
return e;
|
|
1221
|
-
}
|
|
1222
|
-
link({ text: e }) {
|
|
1223
|
-
return "" + e;
|
|
1224
|
-
}
|
|
1225
|
-
image({ text: e }) {
|
|
1226
|
-
return "" + e;
|
|
1227
|
-
}
|
|
1228
|
-
br() {
|
|
1229
|
-
return "";
|
|
1230
|
-
}
|
|
1231
|
-
}, H = class e {
|
|
1232
|
-
options;
|
|
1233
|
-
renderer;
|
|
1234
|
-
textRenderer;
|
|
1235
|
-
constructor(e) {
|
|
1236
|
-
this.options = e || v, this.options.renderer = this.options.renderer || new B(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new V();
|
|
1237
|
-
}
|
|
1238
|
-
static parse(t, n) {
|
|
1239
|
-
return new e(n).parse(t);
|
|
1240
|
-
}
|
|
1241
|
-
static parseInline(t, n) {
|
|
1242
|
-
return new e(n).parseInline(t);
|
|
1243
|
-
}
|
|
1244
|
-
parse(e, t = !0) {
|
|
1245
|
-
let n = "";
|
|
1246
|
-
for (let r = 0; r < e.length; r++) {
|
|
1247
|
-
let i = e[r];
|
|
1248
|
-
if (this.options.extensions?.renderers?.[i.type]) {
|
|
1249
|
-
let e = i, t = this.options.extensions.renderers[e.type].call({ parser: this }, e);
|
|
1250
|
-
if (t !== !1 || ![
|
|
1251
|
-
"space",
|
|
1252
|
-
"hr",
|
|
1253
|
-
"heading",
|
|
1254
|
-
"code",
|
|
1255
|
-
"table",
|
|
1256
|
-
"blockquote",
|
|
1257
|
-
"list",
|
|
1258
|
-
"html",
|
|
1259
|
-
"def",
|
|
1260
|
-
"paragraph",
|
|
1261
|
-
"text"
|
|
1262
|
-
].includes(e.type)) {
|
|
1263
|
-
n += t || "";
|
|
1264
|
-
continue;
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
let a = i;
|
|
1268
|
-
switch (a.type) {
|
|
1269
|
-
case "space":
|
|
1270
|
-
n += this.renderer.space(a);
|
|
1271
|
-
continue;
|
|
1272
|
-
case "hr":
|
|
1273
|
-
n += this.renderer.hr(a);
|
|
1274
|
-
continue;
|
|
1275
|
-
case "heading":
|
|
1276
|
-
n += this.renderer.heading(a);
|
|
1277
|
-
continue;
|
|
1278
|
-
case "code":
|
|
1279
|
-
n += this.renderer.code(a);
|
|
1280
|
-
continue;
|
|
1281
|
-
case "table":
|
|
1282
|
-
n += this.renderer.table(a);
|
|
1283
|
-
continue;
|
|
1284
|
-
case "blockquote":
|
|
1285
|
-
n += this.renderer.blockquote(a);
|
|
1286
|
-
continue;
|
|
1287
|
-
case "list":
|
|
1288
|
-
n += this.renderer.list(a);
|
|
1289
|
-
continue;
|
|
1290
|
-
case "html":
|
|
1291
|
-
n += this.renderer.html(a);
|
|
1292
|
-
continue;
|
|
1293
|
-
case "def":
|
|
1294
|
-
n += this.renderer.def(a);
|
|
1295
|
-
continue;
|
|
1296
|
-
case "paragraph":
|
|
1297
|
-
n += this.renderer.paragraph(a);
|
|
1298
|
-
continue;
|
|
1299
|
-
case "text": {
|
|
1300
|
-
let i = a, o = this.renderer.text(i);
|
|
1301
|
-
for (; r + 1 < e.length && e[r + 1].type === "text";) i = e[++r], o += "\n" + this.renderer.text(i);
|
|
1302
|
-
t ? n += this.renderer.paragraph({
|
|
1303
|
-
type: "paragraph",
|
|
1304
|
-
raw: o,
|
|
1305
|
-
text: o,
|
|
1306
|
-
tokens: [{
|
|
1307
|
-
type: "text",
|
|
1308
|
-
raw: o,
|
|
1309
|
-
text: o,
|
|
1310
|
-
escaped: !0
|
|
1311
|
-
}]
|
|
1312
|
-
}) : n += o;
|
|
1313
|
-
continue;
|
|
1314
|
-
}
|
|
1315
|
-
default: {
|
|
1316
|
-
let e = "Token with \"" + a.type + "\" type was not found.";
|
|
1317
|
-
if (this.options.silent) return console.error(e), "";
|
|
1318
|
-
throw Error(e);
|
|
1319
|
-
}
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
1322
|
-
return n;
|
|
1323
|
-
}
|
|
1324
|
-
parseInline(e, t = this.renderer) {
|
|
1325
|
-
let n = "";
|
|
1326
|
-
for (let r = 0; r < e.length; r++) {
|
|
1327
|
-
let i = e[r];
|
|
1328
|
-
if (this.options.extensions?.renderers?.[i.type]) {
|
|
1329
|
-
let e = this.options.extensions.renderers[i.type].call({ parser: this }, i);
|
|
1330
|
-
if (e !== !1 || ![
|
|
1331
|
-
"escape",
|
|
1332
|
-
"html",
|
|
1333
|
-
"link",
|
|
1334
|
-
"image",
|
|
1335
|
-
"strong",
|
|
1336
|
-
"em",
|
|
1337
|
-
"codespan",
|
|
1338
|
-
"br",
|
|
1339
|
-
"del",
|
|
1340
|
-
"text"
|
|
1341
|
-
].includes(i.type)) {
|
|
1342
|
-
n += e || "";
|
|
1343
|
-
continue;
|
|
1344
|
-
}
|
|
1345
|
-
}
|
|
1346
|
-
let a = i;
|
|
1347
|
-
switch (a.type) {
|
|
1348
|
-
case "escape":
|
|
1349
|
-
n += t.text(a);
|
|
1350
|
-
break;
|
|
1351
|
-
case "html":
|
|
1352
|
-
n += t.html(a);
|
|
1353
|
-
break;
|
|
1354
|
-
case "link":
|
|
1355
|
-
n += t.link(a);
|
|
1356
|
-
break;
|
|
1357
|
-
case "image":
|
|
1358
|
-
n += t.image(a);
|
|
1359
|
-
break;
|
|
1360
|
-
case "strong":
|
|
1361
|
-
n += t.strong(a);
|
|
1362
|
-
break;
|
|
1363
|
-
case "em":
|
|
1364
|
-
n += t.em(a);
|
|
1365
|
-
break;
|
|
1366
|
-
case "codespan":
|
|
1367
|
-
n += t.codespan(a);
|
|
1368
|
-
break;
|
|
1369
|
-
case "br":
|
|
1370
|
-
n += t.br(a);
|
|
1371
|
-
break;
|
|
1372
|
-
case "del":
|
|
1373
|
-
n += t.del(a);
|
|
1374
|
-
break;
|
|
1375
|
-
case "text":
|
|
1376
|
-
n += t.text(a);
|
|
1377
|
-
break;
|
|
1378
|
-
default: {
|
|
1379
|
-
let e = "Token with \"" + a.type + "\" type was not found.";
|
|
1380
|
-
if (this.options.silent) return console.error(e), "";
|
|
1381
|
-
throw Error(e);
|
|
1382
|
-
}
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
return n;
|
|
1386
|
-
}
|
|
1387
|
-
}, U = class {
|
|
1388
|
-
options;
|
|
1389
|
-
block;
|
|
1390
|
-
constructor(e) {
|
|
1391
|
-
this.options = e || v;
|
|
1392
|
-
}
|
|
1393
|
-
static passThroughHooks = new Set([
|
|
1394
|
-
"preprocess",
|
|
1395
|
-
"postprocess",
|
|
1396
|
-
"processAllTokens",
|
|
1397
|
-
"emStrongMask"
|
|
1398
|
-
]);
|
|
1399
|
-
static passThroughHooksRespectAsync = new Set([
|
|
1400
|
-
"preprocess",
|
|
1401
|
-
"postprocess",
|
|
1402
|
-
"processAllTokens"
|
|
1403
|
-
]);
|
|
1404
|
-
preprocess(e) {
|
|
1405
|
-
return e;
|
|
1406
|
-
}
|
|
1407
|
-
postprocess(e) {
|
|
1408
|
-
return e;
|
|
1409
|
-
}
|
|
1410
|
-
processAllTokens(e) {
|
|
1411
|
-
return e;
|
|
1412
|
-
}
|
|
1413
|
-
emStrongMask(e) {
|
|
1414
|
-
return e;
|
|
1415
|
-
}
|
|
1416
|
-
provideLexer() {
|
|
1417
|
-
return this.block ? z.lex : z.lexInline;
|
|
1418
|
-
}
|
|
1419
|
-
provideParser() {
|
|
1420
|
-
return this.block ? H.parse : H.parseInline;
|
|
1421
|
-
}
|
|
1422
|
-
}, W = new class {
|
|
1423
|
-
defaults = _();
|
|
1424
|
-
options = this.setOptions;
|
|
1425
|
-
parse = this.parseMarkdown(!0);
|
|
1426
|
-
parseInline = this.parseMarkdown(!1);
|
|
1427
|
-
Parser = H;
|
|
1428
|
-
Renderer = B;
|
|
1429
|
-
TextRenderer = V;
|
|
1430
|
-
Lexer = z;
|
|
1431
|
-
Tokenizer = R;
|
|
1432
|
-
Hooks = U;
|
|
1433
|
-
constructor(...e) {
|
|
1434
|
-
this.use(...e);
|
|
1435
|
-
}
|
|
1436
|
-
walkTokens(e, t) {
|
|
1437
|
-
let n = [];
|
|
1438
|
-
for (let r of e) switch (n = n.concat(t.call(this, r)), r.type) {
|
|
1439
|
-
case "table": {
|
|
1440
|
-
let e = r;
|
|
1441
|
-
for (let r of e.header) n = n.concat(this.walkTokens(r.tokens, t));
|
|
1442
|
-
for (let r of e.rows) for (let e of r) n = n.concat(this.walkTokens(e.tokens, t));
|
|
1443
|
-
break;
|
|
1444
|
-
}
|
|
1445
|
-
case "list": {
|
|
1446
|
-
let e = r;
|
|
1447
|
-
n = n.concat(this.walkTokens(e.items, t));
|
|
1448
|
-
break;
|
|
1449
|
-
}
|
|
1450
|
-
default: {
|
|
1451
|
-
let e = r;
|
|
1452
|
-
this.defaults.extensions?.childTokens?.[e.type] ? this.defaults.extensions.childTokens[e.type].forEach((r) => {
|
|
1453
|
-
let i = e[r].flat(Infinity);
|
|
1454
|
-
n = n.concat(this.walkTokens(i, t));
|
|
1455
|
-
}) : e.tokens && (n = n.concat(this.walkTokens(e.tokens, t)));
|
|
1456
|
-
}
|
|
1457
|
-
}
|
|
1458
|
-
return n;
|
|
1459
|
-
}
|
|
1460
|
-
use(...e) {
|
|
1461
|
-
let t = this.defaults.extensions || {
|
|
1462
|
-
renderers: {},
|
|
1463
|
-
childTokens: {}
|
|
1464
|
-
};
|
|
1465
|
-
return e.forEach((e) => {
|
|
1466
|
-
let n = { ...e };
|
|
1467
|
-
if (n.async = this.defaults.async || n.async || !1, e.extensions && (e.extensions.forEach((e) => {
|
|
1468
|
-
if (!e.name) throw Error("extension name required");
|
|
1469
|
-
if ("renderer" in e) {
|
|
1470
|
-
let n = t.renderers[e.name];
|
|
1471
|
-
n ? t.renderers[e.name] = function(...t) {
|
|
1472
|
-
let r = e.renderer.apply(this, t);
|
|
1473
|
-
return r === !1 && (r = n.apply(this, t)), r;
|
|
1474
|
-
} : t.renderers[e.name] = e.renderer;
|
|
1475
|
-
}
|
|
1476
|
-
if ("tokenizer" in e) {
|
|
1477
|
-
if (!e.level || e.level !== "block" && e.level !== "inline") throw Error("extension level must be 'block' or 'inline'");
|
|
1478
|
-
let n = t[e.level];
|
|
1479
|
-
n ? n.unshift(e.tokenizer) : t[e.level] = [e.tokenizer], e.start && (e.level === "block" ? t.startBlock ? t.startBlock.push(e.start) : t.startBlock = [e.start] : e.level === "inline" && (t.startInline ? t.startInline.push(e.start) : t.startInline = [e.start]));
|
|
1480
|
-
}
|
|
1481
|
-
"childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
|
|
1482
|
-
}), n.extensions = t), e.renderer) {
|
|
1483
|
-
let t = this.defaults.renderer || new B(this.defaults);
|
|
1484
|
-
for (let n in e.renderer) {
|
|
1485
|
-
if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
|
|
1486
|
-
if (["options", "parser"].includes(n)) continue;
|
|
1487
|
-
let r = n, i = e.renderer[r], a = t[r];
|
|
1488
|
-
t[r] = (...e) => {
|
|
1489
|
-
let n = i.apply(t, e);
|
|
1490
|
-
return n === !1 && (n = a.apply(t, e)), n || "";
|
|
1491
|
-
};
|
|
1492
|
-
}
|
|
1493
|
-
n.renderer = t;
|
|
1494
|
-
}
|
|
1495
|
-
if (e.tokenizer) {
|
|
1496
|
-
let t = this.defaults.tokenizer || new R(this.defaults);
|
|
1497
|
-
for (let n in e.tokenizer) {
|
|
1498
|
-
if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
|
|
1499
|
-
if ([
|
|
1500
|
-
"options",
|
|
1501
|
-
"rules",
|
|
1502
|
-
"lexer"
|
|
1503
|
-
].includes(n)) continue;
|
|
1504
|
-
let r = n, i = e.tokenizer[r], a = t[r];
|
|
1505
|
-
t[r] = (...e) => {
|
|
1506
|
-
let n = i.apply(t, e);
|
|
1507
|
-
return n === !1 && (n = a.apply(t, e)), n;
|
|
1508
|
-
};
|
|
1509
|
-
}
|
|
1510
|
-
n.tokenizer = t;
|
|
1511
|
-
}
|
|
1512
|
-
if (e.hooks) {
|
|
1513
|
-
let t = this.defaults.hooks || new U();
|
|
1514
|
-
for (let n in e.hooks) {
|
|
1515
|
-
if (!(n in t)) throw Error(`hook '${n}' does not exist`);
|
|
1516
|
-
if (["options", "block"].includes(n)) continue;
|
|
1517
|
-
let r = n, i = e.hooks[r], a = t[r];
|
|
1518
|
-
U.passThroughHooks.has(n) ? t[r] = (e) => {
|
|
1519
|
-
if (this.defaults.async && U.passThroughHooksRespectAsync.has(n)) return (async () => {
|
|
1520
|
-
let n = await i.call(t, e);
|
|
1521
|
-
return a.call(t, n);
|
|
1522
|
-
})();
|
|
1523
|
-
let r = i.call(t, e);
|
|
1524
|
-
return a.call(t, r);
|
|
1525
|
-
} : t[r] = (...e) => {
|
|
1526
|
-
if (this.defaults.async) return (async () => {
|
|
1527
|
-
let n = await i.apply(t, e);
|
|
1528
|
-
return n === !1 && (n = await a.apply(t, e)), n;
|
|
1529
|
-
})();
|
|
1530
|
-
let n = i.apply(t, e);
|
|
1531
|
-
return n === !1 && (n = a.apply(t, e)), n;
|
|
1532
|
-
};
|
|
1533
|
-
}
|
|
1534
|
-
n.hooks = t;
|
|
1535
|
-
}
|
|
1536
|
-
if (e.walkTokens) {
|
|
1537
|
-
let t = this.defaults.walkTokens, r = e.walkTokens;
|
|
1538
|
-
n.walkTokens = function(e) {
|
|
1539
|
-
let n = [];
|
|
1540
|
-
return n.push(r.call(this, e)), t && (n = n.concat(t.call(this, e))), n;
|
|
1541
|
-
};
|
|
1542
|
-
}
|
|
1543
|
-
this.defaults = {
|
|
1544
|
-
...this.defaults,
|
|
1545
|
-
...n
|
|
1546
|
-
};
|
|
1547
|
-
}), this;
|
|
1548
|
-
}
|
|
1549
|
-
setOptions(e) {
|
|
1550
|
-
return this.defaults = {
|
|
1551
|
-
...this.defaults,
|
|
1552
|
-
...e
|
|
1553
|
-
}, this;
|
|
1554
|
-
}
|
|
1555
|
-
lexer(e, t) {
|
|
1556
|
-
return z.lex(e, t ?? this.defaults);
|
|
1557
|
-
}
|
|
1558
|
-
parser(e, t) {
|
|
1559
|
-
return H.parse(e, t ?? this.defaults);
|
|
1560
|
-
}
|
|
1561
|
-
parseMarkdown(e) {
|
|
1562
|
-
return (t, n) => {
|
|
1563
|
-
let r = { ...n }, i = {
|
|
1564
|
-
...this.defaults,
|
|
1565
|
-
...r
|
|
1566
|
-
}, a = this.onError(!!i.silent, !!i.async);
|
|
1567
|
-
if (this.defaults.async === !0 && r.async === !1) return a(/* @__PURE__ */ Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
|
|
1568
|
-
if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
|
|
1569
|
-
if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
|
|
1570
|
-
if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
|
|
1571
|
-
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer() : e ? z.lex : z.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
|
|
1572
|
-
i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
|
|
1573
|
-
let o = await (i.hooks ? await i.hooks.provideParser() : e ? H.parse : H.parseInline)(a, i);
|
|
1574
|
-
return i.hooks ? await i.hooks.postprocess(o) : o;
|
|
1575
|
-
})().catch(a);
|
|
1576
|
-
try {
|
|
1577
|
-
i.hooks && (t = i.hooks.preprocess(t));
|
|
1578
|
-
let n = (i.hooks ? i.hooks.provideLexer() : e ? z.lex : z.lexInline)(t, i);
|
|
1579
|
-
i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
|
|
1580
|
-
let r = (i.hooks ? i.hooks.provideParser() : e ? H.parse : H.parseInline)(n, i);
|
|
1581
|
-
return i.hooks && (r = i.hooks.postprocess(r)), r;
|
|
1582
|
-
} catch (e) {
|
|
1583
|
-
return a(e);
|
|
1584
|
-
}
|
|
1585
|
-
};
|
|
1586
|
-
}
|
|
1587
|
-
onError(e, t) {
|
|
1588
|
-
return (n) => {
|
|
1589
|
-
if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
|
|
1590
|
-
let e = "<p>An error occurred:</p><pre>" + I(n.message + "", !0) + "</pre>";
|
|
1591
|
-
return t ? Promise.resolve(e) : e;
|
|
1592
|
-
}
|
|
1593
|
-
if (t) return Promise.reject(n);
|
|
1594
|
-
throw n;
|
|
1595
|
-
};
|
|
1596
|
-
}
|
|
1597
|
-
}();
|
|
1598
|
-
function G(e, t) {
|
|
1599
|
-
return W.parse(e, t);
|
|
1600
|
-
}
|
|
1601
|
-
G.options = G.setOptions = function(e) {
|
|
1602
|
-
return W.setOptions(e), G.defaults = W.defaults, ve(G.defaults), G;
|
|
1603
|
-
}, G.getDefaults = _, G.defaults = v, G.use = function(...e) {
|
|
1604
|
-
return W.use(...e), G.defaults = W.defaults, ve(G.defaults), G;
|
|
1605
|
-
}, G.walkTokens = function(e, t) {
|
|
1606
|
-
return W.walkTokens(e, t);
|
|
1607
|
-
}, G.parseInline = W.parseInline, G.Parser = H, G.parser = H.parse, G.Renderer = B, G.TextRenderer = V, G.Lexer = z, G.lexer = z.lex, G.Tokenizer = R, G.Hooks = U, G.parse = G, G.options, G.setOptions, G.use, G.walkTokens, G.parseInline, H.parse, z.lex;
|
|
1608
|
-
//#endregion
|
|
1609
|
-
//#region node_modules/ts-dedent/esm/index.js
|
|
1610
|
-
function gt(e) {
|
|
1611
|
-
var t = [...arguments].slice(1), n = Array.from(typeof e == "string" ? [e] : e);
|
|
1612
|
-
n[n.length - 1] = n[n.length - 1].replace(/\r?\n([\t ]*)$/, "");
|
|
1613
|
-
var r = n.reduce(function(e, t) {
|
|
1614
|
-
var n = t.match(/\n([\t ]+|(?!\s).)/g);
|
|
1615
|
-
return n ? e.concat(n.map(function(e) {
|
|
1616
|
-
return e.match(/[\t ]/g)?.length ?? 0;
|
|
1617
|
-
})) : e;
|
|
1618
|
-
}, []);
|
|
1619
|
-
if (r.length) {
|
|
1620
|
-
var i = RegExp("\n[ ]{" + Math.min.apply(Math, r) + "}", "g");
|
|
1621
|
-
n = n.map(function(e) {
|
|
1622
|
-
return e.replace(i, "\n");
|
|
1623
|
-
});
|
|
1624
|
-
}
|
|
1625
|
-
n[0] = n[0].replace(/^\r?\n/, "");
|
|
1626
|
-
var a = n[0];
|
|
1627
|
-
return t.forEach(function(e, t) {
|
|
1628
|
-
var r = a.match(/(?:^|\n)( *)$/), i = r ? r[1] : "", o = e;
|
|
1629
|
-
typeof e == "string" && e.includes("\n") && (o = String(e).split("\n").map(function(e, t) {
|
|
1630
|
-
return t === 0 ? e : "" + i + e;
|
|
1631
|
-
}).join("\n")), a += o + n[t + 1];
|
|
1632
|
-
}), a;
|
|
1633
|
-
}
|
|
1634
|
-
//#endregion
|
|
1635
|
-
//#region node_modules/mermaid/dist/chunks/mermaid.core/chunk-PU5JKC2W.mjs
|
|
1636
|
-
var _t = {
|
|
1637
|
-
body: "<g><rect width=\"80\" height=\"80\" style=\"fill: #087ebf; stroke-width: 0px;\"/><text transform=\"translate(21.16 64.67)\" style=\"fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;\"><tspan x=\"0\" y=\"0\">?</tspan></text></g>",
|
|
1638
|
-
height: 80,
|
|
1639
|
-
width: 80
|
|
1640
|
-
}, K = /* @__PURE__ */ new Map(), vt = /* @__PURE__ */ new Map(), yt = /* @__PURE__ */ t((t) => {
|
|
1641
|
-
for (let n of t) {
|
|
1642
|
-
if (!n.name) throw Error("Invalid icon loader. Must have a \"name\" property with non-empty string value.");
|
|
1643
|
-
if (e.debug("Registering icon pack:", n.name), "loader" in n) vt.set(n.name, n.loader);
|
|
1644
|
-
else if ("icons" in n) K.set(n.name, n.icons);
|
|
1645
|
-
else throw e.error("Invalid icon loader:", n), Error("Invalid icon loader. Must have either \"icons\" or \"loader\" property.");
|
|
1646
|
-
}
|
|
1647
|
-
}, "registerIconPacks"), bt = /* @__PURE__ */ t(async (t, n) => {
|
|
1648
|
-
let r = h(t, !0, n !== void 0);
|
|
1649
|
-
if (!r) throw Error(`Invalid icon name: ${t}`);
|
|
1650
|
-
let i = r.prefix || n;
|
|
1651
|
-
if (!i) throw Error(`Icon name must contain a prefix: ${t}`);
|
|
1652
|
-
let a = K.get(i);
|
|
1653
|
-
if (!a) {
|
|
1654
|
-
let t = vt.get(i);
|
|
1655
|
-
if (!t) throw Error(`Icon set not found: ${r.prefix}`);
|
|
1656
|
-
try {
|
|
1657
|
-
a = {
|
|
1658
|
-
...await t(),
|
|
1659
|
-
prefix: i
|
|
1660
|
-
}, K.set(i, a);
|
|
1661
|
-
} catch (t) {
|
|
1662
|
-
throw e.error(t), Error(`Failed to load icon set: ${r.prefix}`);
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
let o = ie(a, r.name);
|
|
1666
|
-
if (!o) throw Error(`Icon not found: ${t}`);
|
|
1667
|
-
return o;
|
|
1668
|
-
}, "getRegisteredIconData"), xt = /* @__PURE__ */ t(async (e) => {
|
|
1669
|
-
try {
|
|
1670
|
-
return await bt(e), !0;
|
|
1671
|
-
} catch {
|
|
1672
|
-
return !1;
|
|
1673
|
-
}
|
|
1674
|
-
}, "isIconAvailable"), St = /* @__PURE__ */ t(async (t, n, i) => {
|
|
1675
|
-
let a;
|
|
1676
|
-
try {
|
|
1677
|
-
a = await bt(t, n?.fallbackPrefix);
|
|
1678
|
-
} catch (t) {
|
|
1679
|
-
e.error(t), a = _t;
|
|
1680
|
-
}
|
|
1681
|
-
let o = fe(a, n);
|
|
1682
|
-
return r(_e(ge(o.body), {
|
|
1683
|
-
...o.attributes,
|
|
1684
|
-
...i
|
|
1685
|
-
}), s());
|
|
1686
|
-
}, "getIconSVG");
|
|
1687
|
-
function Ct(e, { markdownAutoWrap: t }) {
|
|
1688
|
-
return gt(e.replace(/<br\/>/g, "\n").replace(/\n{2,}/g, "\n"));
|
|
1689
|
-
}
|
|
1690
|
-
t(Ct, "preprocessMarkdown");
|
|
1691
|
-
function wt(e) {
|
|
1692
|
-
return e.split(/\\n|\n|<br\s*\/?>/gi).map((e) => e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((e) => ({
|
|
1693
|
-
content: e,
|
|
1694
|
-
type: "normal"
|
|
1695
|
-
})) ?? []);
|
|
1696
|
-
}
|
|
1697
|
-
t(wt, "nonMarkdownToLines");
|
|
1698
|
-
function Tt(e, n = {}) {
|
|
1699
|
-
let r = Ct(e, n), i = G.lexer(r), a = [[]], o = 0;
|
|
1700
|
-
function s(e, t = "normal") {
|
|
1701
|
-
e.type === "text" ? e.text.split("\n").forEach((e, n) => {
|
|
1702
|
-
n !== 0 && (o++, a.push([])), e.split(" ").forEach((e) => {
|
|
1703
|
-
e = e.replace(/'/g, "'"), e && a[o].push({
|
|
1704
|
-
content: e,
|
|
1705
|
-
type: t
|
|
1706
|
-
});
|
|
1707
|
-
});
|
|
1708
|
-
}) : e.type === "strong" || e.type === "em" ? e.tokens.forEach((t) => {
|
|
1709
|
-
s(t, e.type);
|
|
1710
|
-
}) : e.type === "html" && a[o].push({
|
|
1711
|
-
content: e.text,
|
|
1712
|
-
type: "normal"
|
|
1713
|
-
});
|
|
1714
|
-
}
|
|
1715
|
-
return t(s, "processNode"), i.forEach((e) => {
|
|
1716
|
-
e.type === "paragraph" ? e.tokens?.forEach((e) => {
|
|
1717
|
-
s(e);
|
|
1718
|
-
}) : e.type === "html" ? a[o].push({
|
|
1719
|
-
content: e.text,
|
|
1720
|
-
type: "normal"
|
|
1721
|
-
}) : a[o].push({
|
|
1722
|
-
content: e.raw,
|
|
1723
|
-
type: "normal"
|
|
1724
|
-
});
|
|
1725
|
-
}), a;
|
|
1726
|
-
}
|
|
1727
|
-
t(Tt, "markdownToLines");
|
|
1728
|
-
function Et(e) {
|
|
1729
|
-
return e ? `<p>${e.replace(/\\n|\n/g, "<br />")}</p>` : "";
|
|
1730
|
-
}
|
|
1731
|
-
t(Et, "nonMarkdownToHTML");
|
|
1732
|
-
function Dt(n, { markdownAutoWrap: r } = {}) {
|
|
1733
|
-
let i = G.lexer(n);
|
|
1734
|
-
function a(t) {
|
|
1735
|
-
return t.type === "text" ? r === !1 ? t.text.replace(/\n */g, "<br/>").replace(/ /g, " ") : t.text.replace(/\n */g, "<br/>") : t.type === "strong" ? `<strong>${t.tokens?.map(a).join("")}</strong>` : t.type === "em" ? `<em>${t.tokens?.map(a).join("")}</em>` : t.type === "paragraph" ? `<p>${t.tokens?.map(a).join("")}</p>` : t.type === "space" ? "" : t.type === "html" ? `${t.text}` : t.type === "escape" ? t.text : (e.warn(`Unsupported markdown: ${t.type}`), t.raw);
|
|
1736
|
-
}
|
|
1737
|
-
return t(a, "output"), i.map(a).join("");
|
|
1738
|
-
}
|
|
1739
|
-
t(Dt, "markdownToHTML");
|
|
1740
|
-
function Ot(e) {
|
|
1741
|
-
return Intl.Segmenter ? [...new Intl.Segmenter().segment(e)].map((e) => e.segment) : [...e];
|
|
1742
|
-
}
|
|
1743
|
-
t(Ot, "splitTextToChars");
|
|
1744
|
-
function kt(e, t) {
|
|
1745
|
-
return q(e, [], Ot(t.content), t.type);
|
|
1746
|
-
}
|
|
1747
|
-
t(kt, "splitWordToFitWidth");
|
|
1748
|
-
function q(e, t, n, r) {
|
|
1749
|
-
if (n.length === 0) return [{
|
|
1750
|
-
content: t.join(""),
|
|
1751
|
-
type: r
|
|
1752
|
-
}, {
|
|
1753
|
-
content: "",
|
|
1754
|
-
type: r
|
|
1755
|
-
}];
|
|
1756
|
-
let [i, ...a] = n, o = [...t, i];
|
|
1757
|
-
return e([{
|
|
1758
|
-
content: o.join(""),
|
|
1759
|
-
type: r
|
|
1760
|
-
}]) ? q(e, o, a, r) : (t.length === 0 && i && (t.push(i), n.shift()), [{
|
|
1761
|
-
content: t.join(""),
|
|
1762
|
-
type: r
|
|
1763
|
-
}, {
|
|
1764
|
-
content: n.join(""),
|
|
1765
|
-
type: r
|
|
1766
|
-
}]);
|
|
1767
|
-
}
|
|
1768
|
-
t(q, "splitWordToFitWidthRecursion");
|
|
1769
|
-
function At(e, t) {
|
|
1770
|
-
if (e.some(({ content: e }) => e.includes("\n"))) throw Error("splitLineToFitWidth does not support newlines in the line");
|
|
1771
|
-
return J(e, t);
|
|
1772
|
-
}
|
|
1773
|
-
t(At, "splitLineToFitWidth");
|
|
1774
|
-
function J(e, t, n = [], r = []) {
|
|
1775
|
-
if (e.length === 0) return r.length > 0 && n.push(r), n.length > 0 ? n : [];
|
|
1776
|
-
let i = "";
|
|
1777
|
-
e[0].content === " " && (i = " ", e.shift());
|
|
1778
|
-
let a = e.shift() ?? {
|
|
1779
|
-
content: " ",
|
|
1780
|
-
type: "normal"
|
|
1781
|
-
}, o = [...r];
|
|
1782
|
-
if (i !== "" && o.push({
|
|
1783
|
-
content: i,
|
|
1784
|
-
type: "normal"
|
|
1785
|
-
}), o.push(a), t(o)) return J(e, t, n, o);
|
|
1786
|
-
if (r.length > 0) n.push(r), e.unshift(a);
|
|
1787
|
-
else if (a.content) {
|
|
1788
|
-
let [r, i] = kt(t, a);
|
|
1789
|
-
n.push([r]), i.content && e.unshift(i);
|
|
1790
|
-
}
|
|
1791
|
-
return J(e, t, n);
|
|
1792
|
-
}
|
|
1793
|
-
t(J, "splitLineToFitWidthRecursion");
|
|
1794
|
-
function Y(e, t) {
|
|
1795
|
-
t && e.attr("style", t);
|
|
1796
|
-
}
|
|
1797
|
-
t(Y, "applyStyle");
|
|
1798
|
-
var jt = 16384;
|
|
1799
|
-
async function Mt(e, t, n, c, l = !1, u = s()) {
|
|
1800
|
-
let d = e.append("foreignObject");
|
|
1801
|
-
d.attr("width", `${Math.min(10 * n, jt)}px`), d.attr("height", `${Math.min(10 * n, jt)}px`);
|
|
1802
|
-
let f = d.append("xhtml:div"), p = a(t.label) ? await i(t.label.replace(o.lineBreakRegex, "\n"), u) : r(t.label, u), m = t.isNode ? "nodeLabel" : "edgeLabel", h = f.append("span");
|
|
1803
|
-
h.html(p), Y(h, t.labelStyle), h.attr("class", `${m} ${c}`), Y(f, t.labelStyle), f.style("display", "table-cell"), f.style("white-space", "nowrap"), f.style("line-height", "1.5"), n !== Infinity && (f.style("max-width", n + "px"), f.style("text-align", "center")), f.attr("xmlns", "http://www.w3.org/1999/xhtml"), l && f.attr("class", "labelBkg");
|
|
1804
|
-
let g = f.node().getBoundingClientRect();
|
|
1805
|
-
return g.width === n && (f.style("display", "table"), f.style("white-space", "break-spaces"), f.style("width", n + "px"), g = f.node().getBoundingClientRect()), d.node();
|
|
1806
|
-
}
|
|
1807
|
-
t(Mt, "addHtmlSpan");
|
|
1808
|
-
function X(e, t, n, r = !1) {
|
|
1809
|
-
let i = e.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", t * n - .1 + "em").attr("dy", n + "em");
|
|
1810
|
-
return r && i.attr("text-anchor", "middle"), i;
|
|
1811
|
-
}
|
|
1812
|
-
t(X, "createTspan");
|
|
1813
|
-
function Nt(e, t, n) {
|
|
1814
|
-
let r = e.append("text"), i = X(r, 1, t);
|
|
1815
|
-
Q(i, n);
|
|
1816
|
-
let a = i.node().getComputedTextLength();
|
|
1817
|
-
return r.remove(), a;
|
|
1818
|
-
}
|
|
1819
|
-
t(Nt, "computeWidthOfText");
|
|
1820
|
-
function Pt(e, t, n) {
|
|
1821
|
-
let r = e.append("text"), i = X(r, 1, t);
|
|
1822
|
-
Q(i, [{
|
|
1823
|
-
content: n,
|
|
1824
|
-
type: "normal"
|
|
1825
|
-
}]);
|
|
1826
|
-
let a = i.node()?.getBoundingClientRect();
|
|
1827
|
-
return a && r.remove(), a;
|
|
1828
|
-
}
|
|
1829
|
-
t(Pt, "computeDimensionOfText");
|
|
1830
|
-
function Z(e, n, r, i = !1, a = !1) {
|
|
1831
|
-
let o = 1.1, s = n.append("g"), c = s.insert("rect").attr("class", "background").attr("style", "stroke: none"), l = s.append("text").attr("y", "-10.1");
|
|
1832
|
-
a && l.attr("text-anchor", "middle");
|
|
1833
|
-
let u = 0;
|
|
1834
|
-
for (let n of r) {
|
|
1835
|
-
let r = /* @__PURE__ */ t((t) => Nt(s, o, t) <= e, "checkWidth"), i = r(n) ? [n] : At(n, r);
|
|
1836
|
-
for (let e of i) Q(X(l, u, o, a), e), u++;
|
|
1837
|
-
}
|
|
1838
|
-
if (i) {
|
|
1839
|
-
let e = l.node().getBBox();
|
|
1840
|
-
return c.attr("x", e.x - 2).attr("y", e.y - 2).attr("width", e.width + 4).attr("height", e.height + 4), s.node();
|
|
1841
|
-
} else return l.node();
|
|
1842
|
-
}
|
|
1843
|
-
t(Z, "createFormattedText");
|
|
1844
|
-
function Q(e, t) {
|
|
1845
|
-
e.text(""), t.forEach((t, n) => {
|
|
1846
|
-
let r = e.append("tspan").attr("font-style", t.type === "em" ? "italic" : "normal").attr("class", "text-inner-tspan").attr("font-weight", t.type === "strong" ? "bold" : "normal");
|
|
1847
|
-
n === 0 ? r.text(t.content) : r.text(" " + t.content);
|
|
1848
|
-
});
|
|
1849
|
-
}
|
|
1850
|
-
t(Q, "updateTextContentAndStyles");
|
|
1851
|
-
async function $(e, t = {}) {
|
|
1852
|
-
let n = [];
|
|
1853
|
-
e.replace(/(fa[bklrs]?):fa-([\w-]+)/g, (e, i, a) => (n.push((async () => {
|
|
1854
|
-
let n = `${i}:${a}`;
|
|
1855
|
-
return await xt(n) ? await St(n, void 0, { class: "label-icon" }) : `<i class='${r(e, t).replace(":", " ")}'></i>`;
|
|
1856
|
-
})()), e));
|
|
1857
|
-
let i = await Promise.all(n);
|
|
1858
|
-
return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g, () => i.shift() ?? "");
|
|
1859
|
-
}
|
|
1860
|
-
t($, "replaceIconSubstring");
|
|
1861
|
-
var Ft = /* @__PURE__ */ t(async (t, r = "", { style: i = "", isTitle: o = !1, classes: s = "", useHtmlLabels: l = !0, markdown: u = !0, isNode: d = !0, width: f = 200, addSvgBackground: p = !1 } = {}, m) => {
|
|
1862
|
-
if (e.debug("XYZ createText", r, i, o, s, l, d, "addSvgBackground: ", p), l) {
|
|
1863
|
-
let e = await $(c(u ? Dt(r, m) : Et(r)), m), n = r.replace(/\\\\/g, "\\");
|
|
1864
|
-
return await Mt(t, {
|
|
1865
|
-
isNode: d,
|
|
1866
|
-
label: a(r) ? n : e,
|
|
1867
|
-
labelStyle: i.replace("fill:", "color:")
|
|
1868
|
-
}, f, s, p, m);
|
|
1869
|
-
} else {
|
|
1870
|
-
let e = r.replace(/<br\s*\/?>/g, "<br/>"), a = Z(f, t, u ? Tt(e.replace("<br>", "<br/>"), m) : wt(e), r ? p : !1, !d);
|
|
1871
|
-
if (d) {
|
|
1872
|
-
/stroke:/.exec(i) && (i = i.replace("stroke:", "lineColor:"));
|
|
1873
|
-
let e = i.replace(/stroke:[^;]+;?/g, "").replace(/stroke-width:[^;]+;?/g, "").replace(/fill:[^;]+;?/g, "").replace(/color:/g, "fill:");
|
|
1874
|
-
n(a).attr("style", e);
|
|
1875
|
-
} else {
|
|
1876
|
-
let e = i.replace(/stroke:[^;]+;?/g, "").replace(/stroke-width:[^;]+;?/g, "").replace(/fill:[^;]+;?/g, "").replace(/background:/g, "fill:");
|
|
1877
|
-
n(a).select("rect").attr("style", e.replace(/background:/g, "fill:"));
|
|
1878
|
-
let t = i.replace(/stroke:[^;]+;?/g, "").replace(/stroke-width:[^;]+;?/g, "").replace(/fill:[^;]+;?/g, "").replace(/color:/g, "fill:");
|
|
1879
|
-
n(a).select("text").attr("style", t);
|
|
1880
|
-
}
|
|
1881
|
-
return o ? n(a).selectAll("tspan.text-outer-tspan").classed("title-row", !0) : n(a).selectAll("tspan.text-outer-tspan").classed("row", !0), a;
|
|
1882
|
-
}
|
|
1883
|
-
}, "createText");
|
|
1884
|
-
//#endregion
|
|
1885
|
-
export { _t as a, yt as i, Ft as n, gt as o, St as r, Pt as t };
|
|
1886
|
-
|
|
1887
|
-
//# sourceMappingURL=chunk-PU5JKC2W-BM5NPS-q.js.map
|