@wirecat/drive-cli 0.70.0 → 0.72.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +150 -70
- package/contracts/wirecat.json +77 -8
- package/dist/bin/drive.js +2 -2
- package/dist/bundle/agent-23OB2NZP.js +46 -0
- package/dist/bundle/{all-profiles-FW3GK3QO.js → all-profiles-GXGDVNQJ.js} +67 -25
- package/dist/bundle/{anthropic-QVKJT3II.js → anthropic-H5C4GQHC.js} +9 -9
- package/dist/bundle/{app-server-QU73RD5R.js → app-server-EQ3UK4C7.js} +97 -79
- package/dist/bundle/{bun-5XCD5CBB.js → bun-DTJVSRY3.js} +2 -2
- package/dist/bundle/{bun-sqlite-TIGSVNSV.js → bun-sqlite-JIFY7MAE.js} +9 -9
- package/dist/bundle/chunk-2Q325BBD.js +353 -0
- package/dist/bundle/chunk-35FIJGTT.js +52 -0
- package/dist/bundle/{chunk-7C5KENNU.js → chunk-3FRQ6V4T.js} +3 -3
- package/dist/bundle/chunk-47L262VI.js +340 -0
- package/dist/bundle/chunk-4HP6KGBI.js +32 -0
- package/dist/bundle/{chunk-GA3URWIF.js → chunk-4HPXWYTE.js} +1 -1
- package/dist/bundle/{chunk-HYXXMSVD.js → chunk-4IUNYYYL.js} +4473 -2685
- package/dist/bundle/{chunk-FYPW7NMH.js → chunk-4JS32SRX.js} +64 -4
- package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
- package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
- package/dist/bundle/{chunk-SONPLYV7.js → chunk-55FH6IEL.js} +5 -5
- package/dist/bundle/{chunk-VVN6GHAZ.js → chunk-5BNMWSU2.js} +659 -255
- package/dist/bundle/{chunk-FVTKFIQH.js → chunk-5H747A76.js} +5496 -3195
- package/dist/bundle/{chunk-PR7XD2DI.js → chunk-5KWCO56H.js} +2 -2
- package/dist/bundle/{chunk-3AHBZP33.js → chunk-5U3NCE5R.js} +35 -12
- package/dist/bundle/{chunk-HRATXUFH.js → chunk-6CCO3JCM.js} +31 -22
- package/dist/bundle/{chunk-RLNZ7NX5.js → chunk-6ZW2ZJYC.js} +2 -2
- package/dist/bundle/{chunk-RQNRYF6D.js → chunk-75DAHQOV.js} +3 -3
- package/dist/bundle/{chunk-7QSRODXM.js → chunk-77OBW43F.js} +6 -6
- package/dist/bundle/{chunk-GV5DGHSA.js → chunk-7EFM6AW3.js} +4 -4
- package/dist/bundle/{chunk-BXPC5TFG.js → chunk-A3S7QM5L.js} +3 -3
- package/dist/bundle/{chunk-IGNIUDI3.js → chunk-AA4LKC6W.js} +251 -565
- package/dist/bundle/chunk-ASTKHB6B.js +3233 -0
- package/dist/bundle/{chunk-3TCMANIM.js → chunk-BM6V7456.js} +8 -227
- package/dist/bundle/chunk-BO6EDBYJ.js +50 -0
- package/dist/bundle/{chunk-F5KJWRF5.js → chunk-BPA3R4KN.js} +2 -100
- package/dist/bundle/chunk-CIFE4KPX.js +2159 -0
- package/dist/bundle/chunk-CKB4XZZJ.js +730 -0
- package/dist/bundle/{chunk-YCL3SK4T.js → chunk-COJTCEZP.js} +113 -860
- package/dist/bundle/{chunk-BD2K2ONK.js → chunk-CWPYDT73.js} +6 -6
- package/dist/bundle/{chunk-6BMTW5A6.js → chunk-D4JNCXS7.js} +9 -9
- package/dist/bundle/chunk-DCPWZIOV.js +696 -0
- package/dist/bundle/{chunk-P7PLKNPX.js → chunk-DHMNCOQI.js} +415 -272
- package/dist/bundle/chunk-DOQMH4DC.js +280 -0
- package/dist/bundle/chunk-DQSOYH6N.js +20 -0
- package/dist/bundle/{chunk-ML3R2UHV.js → chunk-DWRUOLBF.js} +4 -4
- package/dist/bundle/{chunk-5JTB4URG.js → chunk-E3VWZC3K.js} +14 -13
- package/dist/bundle/chunk-ECYOTDJM.js +14 -0
- package/dist/bundle/{chunk-7IBENBCK.js → chunk-EVG3AA5M.js} +2 -2
- package/dist/bundle/chunk-F4BX7TH2.js +15 -0
- package/dist/bundle/{chunk-FCSHWUMW.js → chunk-FBEZSA76.js} +5 -5
- package/dist/bundle/{chunk-RHSBXOQM.js → chunk-FBQJN74J.js} +1 -1
- package/dist/bundle/{chunk-4WK26MPY.js → chunk-FIZOPJYY.js} +1 -1
- package/dist/bundle/chunk-FNAYSZWK.js +783 -0
- package/dist/bundle/{chunk-LINBDWJK.js → chunk-FRCJHGZM.js} +2 -2
- package/dist/bundle/{chunk-RCTOWLCD.js → chunk-FTG5QBSD.js} +41 -33
- package/dist/bundle/{chunk-ABZ2NYDT.js → chunk-FUDUXIVG.js} +1 -1
- package/dist/bundle/{chunk-NYECVHFH.js → chunk-G4NHRFS7.js} +755 -0
- package/dist/bundle/{chunk-PAPY6Q6H.js → chunk-GIEZYBRC.js} +1 -1
- package/dist/bundle/chunk-GTPPUBYU.js +1876 -0
- package/dist/bundle/chunk-GU6ICH53.js +108 -0
- package/dist/bundle/{chunk-REM5WHHQ.js → chunk-GUMKKRE6.js} +107 -71
- package/dist/bundle/{chunk-QBAOIMVB.js → chunk-GWCDOYSC.js} +1 -1
- package/dist/bundle/{chunk-HHAZ6DCY.js → chunk-GXGSC622.js} +69 -7
- package/dist/bundle/chunk-HAGXTGJC.js +188 -0
- package/dist/bundle/{chunk-TNKQDS5A.js → chunk-IMAWQC5K.js} +6 -6
- package/dist/bundle/{chunk-ZHZYGY5R.js → chunk-IVGVVSPW.js} +4 -4
- package/dist/bundle/{chunk-EDO5LZVF.js → chunk-J4NUHSM7.js} +1 -1
- package/dist/bundle/{chunk-DVVUJ254.js → chunk-K652FYCO.js} +6 -6
- package/dist/bundle/chunk-K6ZWNTXY.js +561 -0
- package/dist/bundle/{chunk-FONIFRYI.js → chunk-KF3ZBQJV.js} +4 -4
- package/dist/bundle/chunk-KFZCHJRT.js +80 -0
- package/dist/bundle/chunk-KLPFDFLI.js +221 -0
- package/dist/bundle/{chunk-LMJBQFW6.js → chunk-KP2XMCNT.js} +13 -13
- package/dist/bundle/{chunk-FADAOLGB.js → chunk-KWDZ3KVH.js} +4 -4
- package/dist/bundle/{chunk-MXNQZAJQ.js → chunk-KX4C32WD.js} +2 -2
- package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
- package/dist/bundle/{chunk-ILAQIBEO.js → chunk-M2ZWYVWO.js} +1 -1
- package/dist/bundle/chunk-MEYYH47C.js +25 -0
- package/dist/bundle/{chunk-ZCXWV4XO.js → chunk-ML2QIWX2.js} +4 -4
- package/dist/bundle/{chunk-XOL346TJ.js → chunk-MUFF2YTH.js} +2 -2
- package/dist/bundle/{chunk-GAHIHE4K.js → chunk-N24YSLED.js} +9166 -9751
- package/dist/bundle/chunk-N4GTCPML.js +7 -0
- package/dist/bundle/{chunk-DVI72ZQG.js → chunk-NBMGDRP4.js} +1 -1
- package/dist/bundle/chunk-NMQRSEZM.js +37 -0
- package/dist/bundle/{chunk-I7YSHUPW.js → chunk-NNGA4QDR.js} +13 -26
- package/dist/bundle/{chunk-5DPV7X27.js → chunk-NTZWY5R3.js} +321 -0
- package/dist/bundle/chunk-O7CZZ36M.js +80 -0
- package/dist/bundle/{chunk-HWUPU6WX.js → chunk-OAONP6KI.js} +13 -9
- package/dist/bundle/{chunk-3CHW7JGR.js → chunk-OESP4PHB.js} +17 -17
- package/dist/bundle/chunk-OHR6IZNH.js +116 -0
- package/dist/bundle/{chunk-54NDYVZA.js → chunk-OLCU7Q2B.js} +1 -1
- package/dist/bundle/{chunk-FN3RXBO7.js → chunk-OLDQLEPA.js} +6 -6
- package/dist/bundle/{chunk-7DJNURKV.js → chunk-OPIPG6AP.js} +16 -9
- package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
- package/dist/bundle/chunk-PRYMT3OG.js +30 -0
- package/dist/bundle/chunk-QDUIVMEW.js +36 -0
- package/dist/bundle/{chunk-66PL7P4C.js → chunk-QKBPCX7Y.js} +1 -1
- package/dist/bundle/{chunk-PN4JYURZ.js → chunk-QSLOACDT.js} +201 -423
- package/dist/bundle/{chunk-3UWRAIWA.js → chunk-QUZFDU4K.js} +4 -4
- package/dist/bundle/{chunk-KSJAFMU5.js → chunk-R32DHS6J.js} +211 -380
- package/dist/bundle/{chunk-2SBC4DVV.js → chunk-R57QUYBG.js} +6 -28
- package/dist/bundle/{chunk-IFTX7AQU.js → chunk-R64OSDOD.js} +45 -66
- package/dist/bundle/{chunk-WJK6KTCS.js → chunk-RSPBVKOC.js} +8 -8
- package/dist/bundle/{chunk-GPDPEHYX.js → chunk-SPNPJ3FZ.js} +3 -4
- package/dist/bundle/chunk-SQHDSIFL.js +388 -0
- package/dist/bundle/{chunk-XZBA6FVH.js → chunk-ST35FIUG.js} +3 -3
- package/dist/bundle/{chunk-37MAA6F2.js → chunk-STUPCKAA.js} +11 -2221
- package/dist/bundle/chunk-SZ7XJZGH.js +2231 -0
- package/dist/bundle/chunk-TRYYWV7J.js +291 -0
- package/dist/bundle/{chunk-OY7TNUEC.js → chunk-TTPWKTVR.js} +1 -1
- package/dist/bundle/{chunk-3UZ4OH22.js → chunk-U7VEJ3CW.js} +49 -129
- package/dist/bundle/{chunk-6Y2BYFXQ.js → chunk-UC7JLE6J.js} +0 -7
- package/dist/bundle/{chunk-HK225DAG.js → chunk-UIQ35CA5.js} +1 -1
- package/dist/bundle/{chunk-GK3BJMGK.js → chunk-UJY26HW4.js} +1 -1
- package/dist/bundle/{chunk-EG62WVR2.js → chunk-UWG3PRY7.js} +9 -60
- package/dist/bundle/{chunk-BBRMDMIR.js → chunk-VAR3MJU6.js} +3 -3
- package/dist/bundle/{chunk-GJZSVSV3.js → chunk-VPQSI5IU.js} +4 -4
- package/dist/bundle/{chunk-YZPE72GE.js → chunk-VQPT3Y7W.js} +12 -12
- package/dist/bundle/{chunk-T5D4OGDC.js → chunk-WMG3H2VK.js} +2 -2
- package/dist/bundle/{chunk-6DPOWBKA.js → chunk-X5BGAZC5.js} +6 -6
- package/dist/bundle/{chunk-DHX27E5M.js → chunk-XC6TRWLZ.js} +3 -3
- package/dist/bundle/{chunk-Q5C6YKAY.js → chunk-XQZEMRCU.js} +402 -402
- package/dist/bundle/{chunk-54BQWRJL.js → chunk-XZ7MO6EU.js} +7 -7
- package/dist/bundle/{chunk-TGS5VPJD.js → chunk-YAIOEPKU.js} +341 -433
- package/dist/bundle/chunk-YHWFF6DN.js +39 -0
- package/dist/bundle/{chunk-WWE5GO6G.js → chunk-YWOLQEDV.js} +16 -3
- package/dist/bundle/{chunk-DR57KDAY.js → chunk-ZFDSJ5YJ.js} +38 -8
- package/dist/bundle/{chunk-BBFXQPKD.js → chunk-ZFUZEFU6.js} +3 -3
- package/dist/bundle/{chunk-YRUR3E3E.js → chunk-ZJKXSMXK.js} +72 -59
- package/dist/bundle/{chunk-BFKFKDPC.js → chunk-ZKWT6HXT.js} +1 -1
- package/dist/bundle/chunk-ZPUY3COZ.js +250 -0
- package/dist/bundle/{cli-K4D4DIGQ.js → cli-2P5FW2RL.js} +201 -98
- package/dist/bundle/command-contract-BMQT2G5X.js +45 -0
- package/dist/bundle/{command-server-entry-WREK3QBB.js → command-server-entry-KP2UDGLA.js} +36 -34
- package/dist/bundle/{decode-SEETPKBH.js → decode-K2JZ5D6V.js} +10 -10
- package/dist/bundle/{dispatch-SQCEURVK.js → dispatch-KOQZA74A.js} +10 -10
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/drive.js +11 -11
- package/dist/bundle/{echarts-WZ5RKFCX.js → echarts-URO3QGCG.js} +2 -2
- package/dist/bundle/{embed-B2UCRZZR.js → embed-JLIPWTNN.js} +10 -10
- package/dist/bundle/{embedder-4R6Z7G7L.js → embedder-LUTDO3HS.js} +15 -15
- package/dist/bundle/entry-AVF6LMG7.js +25 -0
- package/dist/bundle/{failure-CYNXH3RQ.js → failure-GJMQLM7O.js} +4 -4
- package/dist/bundle/first-run-VYTIEUDA.js +31 -0
- package/dist/bundle/first-screen-QVZPF7KL.js +45 -0
- package/dist/bundle/google-VX7IPACN.js +46 -0
- package/dist/bundle/{google-api-SAND2F7L.js → google-api-RFXKRLL4.js} +88 -73
- package/dist/bundle/grants-4XWJFVD6.js +133 -0
- package/dist/bundle/hast-util-from-html-X2DCPS3T.js +10531 -0
- package/dist/bundle/hast-util-to-html-VP6XLPKJ.js +998 -0
- package/dist/bundle/hast-util-to-mdast-IZ5PRX72.js +2272 -0
- package/dist/bundle/{identity-JVVGS4U6.js → identity-FXPB5EMT.js} +7 -6
- package/dist/bundle/{instructions-JSMTSB22.js → instructions-IROIUVZI.js} +1 -1
- package/dist/bundle/{login-6WG3YBDU.js → login-WIY5VQU7.js} +96 -81
- package/dist/bundle/{mcp-VFIOZDVY.js → mcp-NJIOKW3E.js} +2 -2
- package/dist/bundle/{mdast-util-from-markdown-FXEPSNER.js → mdast-util-from-markdown-HEZF7KJ4.js} +137 -195
- package/dist/bundle/mdast-util-gfm-AQW6R6MG.js +925 -0
- package/dist/bundle/mdast-util-to-hast-DF2QVIRV.js +879 -0
- package/dist/bundle/mdast-util-to-markdown-XYLXB3Z3.js +18 -0
- package/dist/bundle/meeting-combined-JUNV35GM.js +28 -0
- package/dist/bundle/meeting-model-XY4UNWWK.js +29 -0
- package/dist/bundle/{meeting-semantic-5U7JQCFF.js → meeting-semantic-62QNQMOM.js} +10 -10
- package/dist/bundle/{micromark-extension-gfm-GRL24TU6.js → micromark-extension-gfm-OE2GBORZ.js} +11 -78
- package/dist/bundle/{node-VJMVHOWD.js → node-IACCI2CW.js} +2 -2
- package/dist/bundle/{node-sqlite-DCNT3HVE.js → node-sqlite-WYIRC7C7.js} +10 -10
- package/dist/bundle/notes-search-DEDUJKSN.js +70 -0
- package/dist/bundle/oauth-HXBXF4VI.js +22 -0
- package/dist/bundle/{open-NFOEHVW7.js → open-H32B6BCT.js} +8 -8
- package/dist/bundle/{openai-D47WY7EC.js → openai-VHMPJJUG.js} +22 -21
- package/dist/bundle/{process-Q2FRU5VA.js → process-RNHPF5OK.js} +1 -1
- package/dist/bundle/{program-T2AJJQEM.js → program-GYMJ3DDH.js} +276 -1132
- package/dist/bundle/{prompt-YJSDABXN.js → prompt-TOG2CRCE.js} +8 -8
- package/dist/bundle/{reasons-WEHPCSJX.js → reasons-TLFQ45YX.js} +6 -5
- package/dist/bundle/{recognize-6OBEIEB3.js → recognize-GYGY45EY.js} +7 -7
- package/dist/bundle/remote-6XN2QLI5.js +35 -0
- package/dist/bundle/{rerank-L6F5SLIB.js → rerank-HJO3O4TW.js} +11 -11
- package/dist/bundle/{serve-GYSWIWH4.js → serve-XPCNLHCR.js} +19 -19
- package/dist/bundle/server-UBJZ66XE.js +97 -0
- package/dist/bundle/{server-GWWP3RIT.js → server-WPT3NC5B.js} +89 -70
- package/dist/bundle/{services-BDQBRXT5.js → services-253KKKVU.js} +109 -89
- package/dist/bundle/{sqlite-runtime-ZSZGAUYB.js → sqlite-runtime-EZASGJXW.js} +9 -9
- package/dist/bundle/{start-BJ275RUK.js → start-UHI35JFL.js} +7 -7
- package/dist/bundle/{state-HLNGFI2T.js → state-KJTSPFGK.js} +9 -9
- package/dist/bundle/{store-I43KZNJW.js → store-62J2H2A3.js} +36 -25
- package/dist/bundle/{store-OSRTGYGI.js → store-G5B7T7M7.js} +38 -23
- package/dist/bundle/store-maintenance-command-C6T4YLVF.js +85 -0
- package/dist/bundle/surface-3OT64BHS.js +83 -0
- package/dist/bundle/tokens-EHYO6D2X.js +133 -0
- package/dist/commands/documents.d.ts.map +1 -1
- package/dist/commands/documents.js +11 -1
- package/dist/commands/documents.js.map +1 -1
- package/dist/commands/remote.d.ts.map +1 -1
- package/dist/commands/remote.js +8 -22
- package/dist/commands/remote.js.map +1 -1
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +14 -4
- package/dist/commands/sync.js.map +1 -1
- package/dist/config.d.ts +5 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -1
- package/dist/config.js.map +1 -1
- package/dist/first-screen.d.ts.map +1 -1
- package/dist/first-screen.js +2 -1
- package/dist/first-screen.js.map +1 -1
- package/dist/generated/manifest.d.ts +2 -1
- package/dist/generated/manifest.d.ts.map +1 -1
- package/dist/generated/manifest.js +782 -0
- package/dist/generated/manifest.js.map +1 -1
- package/dist/generated/types.d.ts +262 -58
- package/dist/generated/types.d.ts.map +1 -1
- package/dist/google.d.ts.map +1 -1
- package/dist/google.js +5 -5
- package/dist/google.js.map +1 -1
- package/dist/model.d.ts +5 -2
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js.map +1 -1
- package/dist/policy-keys.js +1 -1
- package/dist/policy-keys.js.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/program.js +9 -4
- package/dist/program.js.map +1 -1
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +6 -1
- package/dist/state.js.map +1 -1
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +2 -7
- package/dist/store.js.map +1 -1
- package/dist/supported.d.ts +2 -2
- package/dist/supported.d.ts.map +1 -1
- package/dist/supported.js +2 -3
- package/dist/supported.js.map +1 -1
- package/dist/sync.d.ts +2 -1
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +6 -4
- package/dist/sync.js.map +1 -1
- package/dist/transcripts.d.ts +0 -6
- package/dist/transcripts.d.ts.map +1 -1
- package/dist/transcripts.js +0 -13
- package/dist/transcripts.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/scenarios/find-decision.md +1 -1
- package/skills/drive-cli/SKILL.md +4 -2
- package/dist/bundle/chunk-AV5UKJZM.js +0 -729
- package/dist/bundle/chunk-NP7LJATI.js +0 -598
- package/dist/bundle/chunk-P77FL6RY.js +0 -896
- package/dist/bundle/chunk-ZI3YTXSF.js +0 -2
- package/dist/bundle/command-contract-V3F452QI.js +0 -43
- package/dist/bundle/entry-ORZYRJ5N.js +0 -25
- package/dist/bundle/first-run-KAKA6KBY.js +0 -31
- package/dist/bundle/first-screen-R645UHRH.js +0 -41
- package/dist/bundle/google-BSO3YB7N.js +0 -45
- package/dist/bundle/grants-PLNFYARD.js +0 -118
- package/dist/bundle/mdast-util-gfm-SZM5GBDF.js +0 -2103
- package/dist/bundle/meeting-combined-SUKMFK3F.js +0 -27
- package/dist/bundle/meeting-model-S4YGKIFI.js +0 -29
- package/dist/bundle/oauth-KCMNQ3ZP.js +0 -22
- package/dist/bundle/remote-3SL2QJ7T.js +0 -35
- package/dist/bundle/server-BI46BSRE.js +0 -80
- package/dist/bundle/store-maintenance-command-FO7LEVSL.js +0 -72
- package/dist/bundle/tokens-DB7O7QNB.js +0 -118
|
@@ -0,0 +1,879 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
normalizeUri
|
|
5
|
+
} from "./chunk-4ZTB7LS3.js";
|
|
6
|
+
import {
|
|
7
|
+
esm_default,
|
|
8
|
+
pointEnd,
|
|
9
|
+
pointStart,
|
|
10
|
+
position
|
|
11
|
+
} from "./chunk-L7P3LUDQ.js";
|
|
12
|
+
import {
|
|
13
|
+
ok
|
|
14
|
+
} from "./chunk-ECYOTDJM.js";
|
|
15
|
+
import {
|
|
16
|
+
visit
|
|
17
|
+
} from "./chunk-TRYYWV7J.js";
|
|
18
|
+
import "./chunk-UC7JLE6J.js";
|
|
19
|
+
import {
|
|
20
|
+
__name
|
|
21
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
22
|
+
|
|
23
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/blockquote.js
|
|
24
|
+
function blockquote(state, node) {
|
|
25
|
+
const result = {
|
|
26
|
+
type: "element",
|
|
27
|
+
tagName: "blockquote",
|
|
28
|
+
properties: {},
|
|
29
|
+
children: state.wrap(state.all(node), true)
|
|
30
|
+
};
|
|
31
|
+
state.patch(node, result);
|
|
32
|
+
return state.applyData(node, result);
|
|
33
|
+
}
|
|
34
|
+
__name(blockquote, "blockquote");
|
|
35
|
+
|
|
36
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/break.js
|
|
37
|
+
function hardBreak(state, node) {
|
|
38
|
+
const result = { type: "element", tagName: "br", properties: {}, children: [] };
|
|
39
|
+
state.patch(node, result);
|
|
40
|
+
return [state.applyData(node, result), { type: "text", value: "\n" }];
|
|
41
|
+
}
|
|
42
|
+
__name(hardBreak, "hardBreak");
|
|
43
|
+
|
|
44
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/code.js
|
|
45
|
+
function code(state, node) {
|
|
46
|
+
const value = node.value ? node.value + "\n" : "";
|
|
47
|
+
const properties = {};
|
|
48
|
+
const language = node.lang ? node.lang.split(/\s+/) : [];
|
|
49
|
+
if (language.length > 0) {
|
|
50
|
+
properties.className = ["language-" + language[0]];
|
|
51
|
+
}
|
|
52
|
+
let result = {
|
|
53
|
+
type: "element",
|
|
54
|
+
tagName: "code",
|
|
55
|
+
properties,
|
|
56
|
+
children: [{ type: "text", value }]
|
|
57
|
+
};
|
|
58
|
+
if (node.meta) {
|
|
59
|
+
result.data = { meta: node.meta };
|
|
60
|
+
}
|
|
61
|
+
state.patch(node, result);
|
|
62
|
+
result = state.applyData(node, result);
|
|
63
|
+
result = { type: "element", tagName: "pre", properties: {}, children: [result] };
|
|
64
|
+
state.patch(node, result);
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
__name(code, "code");
|
|
68
|
+
|
|
69
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/delete.js
|
|
70
|
+
function strikethrough(state, node) {
|
|
71
|
+
const result = {
|
|
72
|
+
type: "element",
|
|
73
|
+
tagName: "del",
|
|
74
|
+
properties: {},
|
|
75
|
+
children: state.all(node)
|
|
76
|
+
};
|
|
77
|
+
state.patch(node, result);
|
|
78
|
+
return state.applyData(node, result);
|
|
79
|
+
}
|
|
80
|
+
__name(strikethrough, "strikethrough");
|
|
81
|
+
|
|
82
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/emphasis.js
|
|
83
|
+
function emphasis(state, node) {
|
|
84
|
+
const result = {
|
|
85
|
+
type: "element",
|
|
86
|
+
tagName: "em",
|
|
87
|
+
properties: {},
|
|
88
|
+
children: state.all(node)
|
|
89
|
+
};
|
|
90
|
+
state.patch(node, result);
|
|
91
|
+
return state.applyData(node, result);
|
|
92
|
+
}
|
|
93
|
+
__name(emphasis, "emphasis");
|
|
94
|
+
|
|
95
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/footnote-reference.js
|
|
96
|
+
function footnoteReference(state, node) {
|
|
97
|
+
const clobberPrefix = typeof state.options.clobberPrefix === "string" ? state.options.clobberPrefix : "user-content-";
|
|
98
|
+
const id = String(node.identifier).toUpperCase();
|
|
99
|
+
const safeId = normalizeUri(id.toLowerCase());
|
|
100
|
+
const index = state.footnoteOrder.indexOf(id);
|
|
101
|
+
let counter;
|
|
102
|
+
let reuseCounter = state.footnoteCounts.get(id);
|
|
103
|
+
if (reuseCounter === void 0) {
|
|
104
|
+
reuseCounter = 0;
|
|
105
|
+
state.footnoteOrder.push(id);
|
|
106
|
+
counter = state.footnoteOrder.length;
|
|
107
|
+
} else {
|
|
108
|
+
counter = index + 1;
|
|
109
|
+
}
|
|
110
|
+
reuseCounter += 1;
|
|
111
|
+
state.footnoteCounts.set(id, reuseCounter);
|
|
112
|
+
const link2 = {
|
|
113
|
+
type: "element",
|
|
114
|
+
tagName: "a",
|
|
115
|
+
properties: {
|
|
116
|
+
href: "#" + clobberPrefix + "fn-" + safeId,
|
|
117
|
+
id: clobberPrefix + "fnref-" + safeId + (reuseCounter > 1 ? "-" + reuseCounter : ""),
|
|
118
|
+
dataFootnoteRef: true,
|
|
119
|
+
ariaDescribedBy: ["footnote-label"]
|
|
120
|
+
},
|
|
121
|
+
children: [{ type: "text", value: String(counter) }]
|
|
122
|
+
};
|
|
123
|
+
state.patch(node, link2);
|
|
124
|
+
const sup = {
|
|
125
|
+
type: "element",
|
|
126
|
+
tagName: "sup",
|
|
127
|
+
properties: {},
|
|
128
|
+
children: [link2]
|
|
129
|
+
};
|
|
130
|
+
state.patch(node, sup);
|
|
131
|
+
return state.applyData(node, sup);
|
|
132
|
+
}
|
|
133
|
+
__name(footnoteReference, "footnoteReference");
|
|
134
|
+
|
|
135
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/heading.js
|
|
136
|
+
function heading(state, node) {
|
|
137
|
+
const result = {
|
|
138
|
+
type: "element",
|
|
139
|
+
tagName: "h" + node.depth,
|
|
140
|
+
properties: {},
|
|
141
|
+
children: state.all(node)
|
|
142
|
+
};
|
|
143
|
+
state.patch(node, result);
|
|
144
|
+
return state.applyData(node, result);
|
|
145
|
+
}
|
|
146
|
+
__name(heading, "heading");
|
|
147
|
+
|
|
148
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/html.js
|
|
149
|
+
function html(state, node) {
|
|
150
|
+
if (state.options.allowDangerousHtml) {
|
|
151
|
+
const result = { type: "raw", value: node.value };
|
|
152
|
+
state.patch(node, result);
|
|
153
|
+
return state.applyData(node, result);
|
|
154
|
+
}
|
|
155
|
+
return void 0;
|
|
156
|
+
}
|
|
157
|
+
__name(html, "html");
|
|
158
|
+
|
|
159
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/revert.js
|
|
160
|
+
function revert(state, node) {
|
|
161
|
+
const subtype = node.referenceType;
|
|
162
|
+
let suffix = "]";
|
|
163
|
+
if (subtype === "collapsed") {
|
|
164
|
+
suffix += "[]";
|
|
165
|
+
} else if (subtype === "full") {
|
|
166
|
+
suffix += "[" + (node.label || node.identifier) + "]";
|
|
167
|
+
}
|
|
168
|
+
if (node.type === "imageReference") {
|
|
169
|
+
return [{ type: "text", value: "![" + node.alt + suffix }];
|
|
170
|
+
}
|
|
171
|
+
const contents = state.all(node);
|
|
172
|
+
const head = contents[0];
|
|
173
|
+
if (head && head.type === "text") {
|
|
174
|
+
head.value = "[" + head.value;
|
|
175
|
+
} else {
|
|
176
|
+
contents.unshift({ type: "text", value: "[" });
|
|
177
|
+
}
|
|
178
|
+
const tail = contents[contents.length - 1];
|
|
179
|
+
if (tail && tail.type === "text") {
|
|
180
|
+
tail.value += suffix;
|
|
181
|
+
} else {
|
|
182
|
+
contents.push({ type: "text", value: suffix });
|
|
183
|
+
}
|
|
184
|
+
return contents;
|
|
185
|
+
}
|
|
186
|
+
__name(revert, "revert");
|
|
187
|
+
|
|
188
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/image-reference.js
|
|
189
|
+
function imageReference(state, node) {
|
|
190
|
+
const id = String(node.identifier).toUpperCase();
|
|
191
|
+
const definition = state.definitionById.get(id);
|
|
192
|
+
if (!definition) {
|
|
193
|
+
return revert(state, node);
|
|
194
|
+
}
|
|
195
|
+
const properties = { src: normalizeUri(definition.url || "") };
|
|
196
|
+
if (node.alt !== null && node.alt !== void 0) {
|
|
197
|
+
properties.alt = node.alt;
|
|
198
|
+
}
|
|
199
|
+
if (definition.title !== null && definition.title !== void 0) {
|
|
200
|
+
properties.title = definition.title;
|
|
201
|
+
}
|
|
202
|
+
const result = { type: "element", tagName: "img", properties, children: [] };
|
|
203
|
+
state.patch(node, result);
|
|
204
|
+
return state.applyData(node, result);
|
|
205
|
+
}
|
|
206
|
+
__name(imageReference, "imageReference");
|
|
207
|
+
|
|
208
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/image.js
|
|
209
|
+
function image(state, node) {
|
|
210
|
+
const properties = { src: normalizeUri(node.url) };
|
|
211
|
+
if (node.alt !== null && node.alt !== void 0) {
|
|
212
|
+
properties.alt = node.alt;
|
|
213
|
+
}
|
|
214
|
+
if (node.title !== null && node.title !== void 0) {
|
|
215
|
+
properties.title = node.title;
|
|
216
|
+
}
|
|
217
|
+
const result = { type: "element", tagName: "img", properties, children: [] };
|
|
218
|
+
state.patch(node, result);
|
|
219
|
+
return state.applyData(node, result);
|
|
220
|
+
}
|
|
221
|
+
__name(image, "image");
|
|
222
|
+
|
|
223
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/inline-code.js
|
|
224
|
+
function inlineCode(state, node) {
|
|
225
|
+
const text2 = { type: "text", value: node.value.replace(/\r?\n|\r/g, " ") };
|
|
226
|
+
state.patch(node, text2);
|
|
227
|
+
const result = {
|
|
228
|
+
type: "element",
|
|
229
|
+
tagName: "code",
|
|
230
|
+
properties: {},
|
|
231
|
+
children: [text2]
|
|
232
|
+
};
|
|
233
|
+
state.patch(node, result);
|
|
234
|
+
return state.applyData(node, result);
|
|
235
|
+
}
|
|
236
|
+
__name(inlineCode, "inlineCode");
|
|
237
|
+
|
|
238
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/link-reference.js
|
|
239
|
+
function linkReference(state, node) {
|
|
240
|
+
const id = String(node.identifier).toUpperCase();
|
|
241
|
+
const definition = state.definitionById.get(id);
|
|
242
|
+
if (!definition) {
|
|
243
|
+
return revert(state, node);
|
|
244
|
+
}
|
|
245
|
+
const properties = { href: normalizeUri(definition.url || "") };
|
|
246
|
+
if (definition.title !== null && definition.title !== void 0) {
|
|
247
|
+
properties.title = definition.title;
|
|
248
|
+
}
|
|
249
|
+
const result = {
|
|
250
|
+
type: "element",
|
|
251
|
+
tagName: "a",
|
|
252
|
+
properties,
|
|
253
|
+
children: state.all(node)
|
|
254
|
+
};
|
|
255
|
+
state.patch(node, result);
|
|
256
|
+
return state.applyData(node, result);
|
|
257
|
+
}
|
|
258
|
+
__name(linkReference, "linkReference");
|
|
259
|
+
|
|
260
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/link.js
|
|
261
|
+
function link(state, node) {
|
|
262
|
+
const properties = { href: normalizeUri(node.url) };
|
|
263
|
+
if (node.title !== null && node.title !== void 0) {
|
|
264
|
+
properties.title = node.title;
|
|
265
|
+
}
|
|
266
|
+
const result = {
|
|
267
|
+
type: "element",
|
|
268
|
+
tagName: "a",
|
|
269
|
+
properties,
|
|
270
|
+
children: state.all(node)
|
|
271
|
+
};
|
|
272
|
+
state.patch(node, result);
|
|
273
|
+
return state.applyData(node, result);
|
|
274
|
+
}
|
|
275
|
+
__name(link, "link");
|
|
276
|
+
|
|
277
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/list-item.js
|
|
278
|
+
function listItem(state, node, parent) {
|
|
279
|
+
const results = state.all(node);
|
|
280
|
+
const loose = parent ? listLoose(parent) : listItemLoose(node);
|
|
281
|
+
const properties = {};
|
|
282
|
+
const children = [];
|
|
283
|
+
if (typeof node.checked === "boolean") {
|
|
284
|
+
const head = results[0];
|
|
285
|
+
let paragraph2;
|
|
286
|
+
if (head && head.type === "element" && head.tagName === "p") {
|
|
287
|
+
paragraph2 = head;
|
|
288
|
+
} else {
|
|
289
|
+
paragraph2 = { type: "element", tagName: "p", properties: {}, children: [] };
|
|
290
|
+
results.unshift(paragraph2);
|
|
291
|
+
}
|
|
292
|
+
if (paragraph2.children.length > 0) {
|
|
293
|
+
paragraph2.children.unshift({ type: "text", value: " " });
|
|
294
|
+
}
|
|
295
|
+
paragraph2.children.unshift({
|
|
296
|
+
type: "element",
|
|
297
|
+
tagName: "input",
|
|
298
|
+
properties: { type: "checkbox", checked: node.checked, disabled: true },
|
|
299
|
+
children: []
|
|
300
|
+
});
|
|
301
|
+
properties.className = ["task-list-item"];
|
|
302
|
+
}
|
|
303
|
+
let index = -1;
|
|
304
|
+
while (++index < results.length) {
|
|
305
|
+
const child = results[index];
|
|
306
|
+
if (loose || index !== 0 || child.type !== "element" || child.tagName !== "p") {
|
|
307
|
+
children.push({ type: "text", value: "\n" });
|
|
308
|
+
}
|
|
309
|
+
if (child.type === "element" && child.tagName === "p" && !loose) {
|
|
310
|
+
children.push(...child.children);
|
|
311
|
+
} else {
|
|
312
|
+
children.push(child);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
const tail = results[results.length - 1];
|
|
316
|
+
if (tail && (loose || tail.type !== "element" || tail.tagName !== "p")) {
|
|
317
|
+
children.push({ type: "text", value: "\n" });
|
|
318
|
+
}
|
|
319
|
+
const result = { type: "element", tagName: "li", properties, children };
|
|
320
|
+
state.patch(node, result);
|
|
321
|
+
return state.applyData(node, result);
|
|
322
|
+
}
|
|
323
|
+
__name(listItem, "listItem");
|
|
324
|
+
function listLoose(node) {
|
|
325
|
+
let loose = false;
|
|
326
|
+
if (node.type === "list") {
|
|
327
|
+
loose = node.spread || false;
|
|
328
|
+
const { children } = node;
|
|
329
|
+
let index = -1;
|
|
330
|
+
while (!loose && ++index < children.length) {
|
|
331
|
+
loose = listItemLoose(children[index]);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
return loose;
|
|
335
|
+
}
|
|
336
|
+
__name(listLoose, "listLoose");
|
|
337
|
+
function listItemLoose(node) {
|
|
338
|
+
const { spread } = node;
|
|
339
|
+
return spread === null || spread === void 0 ? node.children.length > 1 : spread;
|
|
340
|
+
}
|
|
341
|
+
__name(listItemLoose, "listItemLoose");
|
|
342
|
+
|
|
343
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/list.js
|
|
344
|
+
function list(state, node) {
|
|
345
|
+
const properties = {};
|
|
346
|
+
const results = state.all(node);
|
|
347
|
+
let index = -1;
|
|
348
|
+
if (typeof node.start === "number" && node.start !== 1) {
|
|
349
|
+
properties.start = node.start;
|
|
350
|
+
}
|
|
351
|
+
while (++index < results.length) {
|
|
352
|
+
const child = results[index];
|
|
353
|
+
if (child.type === "element" && child.tagName === "li" && child.properties && Array.isArray(child.properties.className) && child.properties.className.includes("task-list-item")) {
|
|
354
|
+
properties.className = ["contains-task-list"];
|
|
355
|
+
break;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
const result = {
|
|
359
|
+
type: "element",
|
|
360
|
+
tagName: node.ordered ? "ol" : "ul",
|
|
361
|
+
properties,
|
|
362
|
+
children: state.wrap(results, true)
|
|
363
|
+
};
|
|
364
|
+
state.patch(node, result);
|
|
365
|
+
return state.applyData(node, result);
|
|
366
|
+
}
|
|
367
|
+
__name(list, "list");
|
|
368
|
+
|
|
369
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/paragraph.js
|
|
370
|
+
function paragraph(state, node) {
|
|
371
|
+
const result = {
|
|
372
|
+
type: "element",
|
|
373
|
+
tagName: "p",
|
|
374
|
+
properties: {},
|
|
375
|
+
children: state.all(node)
|
|
376
|
+
};
|
|
377
|
+
state.patch(node, result);
|
|
378
|
+
return state.applyData(node, result);
|
|
379
|
+
}
|
|
380
|
+
__name(paragraph, "paragraph");
|
|
381
|
+
|
|
382
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/root.js
|
|
383
|
+
function root(state, node) {
|
|
384
|
+
const result = { type: "root", children: state.wrap(state.all(node)) };
|
|
385
|
+
state.patch(node, result);
|
|
386
|
+
return state.applyData(node, result);
|
|
387
|
+
}
|
|
388
|
+
__name(root, "root");
|
|
389
|
+
|
|
390
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/strong.js
|
|
391
|
+
function strong(state, node) {
|
|
392
|
+
const result = {
|
|
393
|
+
type: "element",
|
|
394
|
+
tagName: "strong",
|
|
395
|
+
properties: {},
|
|
396
|
+
children: state.all(node)
|
|
397
|
+
};
|
|
398
|
+
state.patch(node, result);
|
|
399
|
+
return state.applyData(node, result);
|
|
400
|
+
}
|
|
401
|
+
__name(strong, "strong");
|
|
402
|
+
|
|
403
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/table.js
|
|
404
|
+
function table(state, node) {
|
|
405
|
+
const rows = state.all(node);
|
|
406
|
+
const firstRow = rows.shift();
|
|
407
|
+
const tableContent = [];
|
|
408
|
+
if (firstRow) {
|
|
409
|
+
const head = {
|
|
410
|
+
type: "element",
|
|
411
|
+
tagName: "thead",
|
|
412
|
+
properties: {},
|
|
413
|
+
children: state.wrap([firstRow], true)
|
|
414
|
+
};
|
|
415
|
+
state.patch(node.children[0], head);
|
|
416
|
+
tableContent.push(head);
|
|
417
|
+
}
|
|
418
|
+
if (rows.length > 0) {
|
|
419
|
+
const body = {
|
|
420
|
+
type: "element",
|
|
421
|
+
tagName: "tbody",
|
|
422
|
+
properties: {},
|
|
423
|
+
children: state.wrap(rows, true)
|
|
424
|
+
};
|
|
425
|
+
const start = pointStart(node.children[1]);
|
|
426
|
+
const end = pointEnd(node.children[node.children.length - 1]);
|
|
427
|
+
if (start && end) body.position = { start, end };
|
|
428
|
+
tableContent.push(body);
|
|
429
|
+
}
|
|
430
|
+
const result = {
|
|
431
|
+
type: "element",
|
|
432
|
+
tagName: "table",
|
|
433
|
+
properties: {},
|
|
434
|
+
children: state.wrap(tableContent, true)
|
|
435
|
+
};
|
|
436
|
+
state.patch(node, result);
|
|
437
|
+
return state.applyData(node, result);
|
|
438
|
+
}
|
|
439
|
+
__name(table, "table");
|
|
440
|
+
|
|
441
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/table-row.js
|
|
442
|
+
function tableRow(state, node, parent) {
|
|
443
|
+
const siblings = parent ? parent.children : void 0;
|
|
444
|
+
const rowIndex = siblings ? siblings.indexOf(node) : 1;
|
|
445
|
+
const tagName = rowIndex === 0 ? "th" : "td";
|
|
446
|
+
const align = parent && parent.type === "table" ? parent.align : void 0;
|
|
447
|
+
const length = align ? align.length : node.children.length;
|
|
448
|
+
let cellIndex = -1;
|
|
449
|
+
const cells = [];
|
|
450
|
+
while (++cellIndex < length) {
|
|
451
|
+
const cell = node.children[cellIndex];
|
|
452
|
+
const properties = {};
|
|
453
|
+
const alignValue = align ? align[cellIndex] : void 0;
|
|
454
|
+
if (alignValue) {
|
|
455
|
+
properties.align = alignValue;
|
|
456
|
+
}
|
|
457
|
+
let result2 = { type: "element", tagName, properties, children: [] };
|
|
458
|
+
if (cell) {
|
|
459
|
+
result2.children = state.all(cell);
|
|
460
|
+
state.patch(cell, result2);
|
|
461
|
+
result2 = state.applyData(cell, result2);
|
|
462
|
+
}
|
|
463
|
+
cells.push(result2);
|
|
464
|
+
}
|
|
465
|
+
const result = {
|
|
466
|
+
type: "element",
|
|
467
|
+
tagName: "tr",
|
|
468
|
+
properties: {},
|
|
469
|
+
children: state.wrap(cells, true)
|
|
470
|
+
};
|
|
471
|
+
state.patch(node, result);
|
|
472
|
+
return state.applyData(node, result);
|
|
473
|
+
}
|
|
474
|
+
__name(tableRow, "tableRow");
|
|
475
|
+
|
|
476
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/table-cell.js
|
|
477
|
+
function tableCell(state, node) {
|
|
478
|
+
const result = {
|
|
479
|
+
type: "element",
|
|
480
|
+
tagName: "td",
|
|
481
|
+
// Assume body cell.
|
|
482
|
+
properties: {},
|
|
483
|
+
children: state.all(node)
|
|
484
|
+
};
|
|
485
|
+
state.patch(node, result);
|
|
486
|
+
return state.applyData(node, result);
|
|
487
|
+
}
|
|
488
|
+
__name(tableCell, "tableCell");
|
|
489
|
+
|
|
490
|
+
// node_modules/.pnpm/trim-lines@3.0.1/node_modules/trim-lines/index.js
|
|
491
|
+
var tab = 9;
|
|
492
|
+
var space = 32;
|
|
493
|
+
function trimLines(value) {
|
|
494
|
+
const source = String(value);
|
|
495
|
+
const search = /\r?\n|\r/g;
|
|
496
|
+
let match = search.exec(source);
|
|
497
|
+
let last = 0;
|
|
498
|
+
const lines = [];
|
|
499
|
+
while (match) {
|
|
500
|
+
lines.push(
|
|
501
|
+
trimLine(source.slice(last, match.index), last > 0, true),
|
|
502
|
+
match[0]
|
|
503
|
+
);
|
|
504
|
+
last = match.index + match[0].length;
|
|
505
|
+
match = search.exec(source);
|
|
506
|
+
}
|
|
507
|
+
lines.push(trimLine(source.slice(last), last > 0, false));
|
|
508
|
+
return lines.join("");
|
|
509
|
+
}
|
|
510
|
+
__name(trimLines, "trimLines");
|
|
511
|
+
function trimLine(value, start, end) {
|
|
512
|
+
let startIndex = 0;
|
|
513
|
+
let endIndex = value.length;
|
|
514
|
+
if (start) {
|
|
515
|
+
let code2 = value.codePointAt(startIndex);
|
|
516
|
+
while (code2 === tab || code2 === space) {
|
|
517
|
+
startIndex++;
|
|
518
|
+
code2 = value.codePointAt(startIndex);
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
if (end) {
|
|
522
|
+
let code2 = value.codePointAt(endIndex - 1);
|
|
523
|
+
while (code2 === tab || code2 === space) {
|
|
524
|
+
endIndex--;
|
|
525
|
+
code2 = value.codePointAt(endIndex - 1);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
return endIndex > startIndex ? value.slice(startIndex, endIndex) : "";
|
|
529
|
+
}
|
|
530
|
+
__name(trimLine, "trimLine");
|
|
531
|
+
|
|
532
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/text.js
|
|
533
|
+
function text(state, node) {
|
|
534
|
+
const result = { type: "text", value: trimLines(String(node.value)) };
|
|
535
|
+
state.patch(node, result);
|
|
536
|
+
return state.applyData(node, result);
|
|
537
|
+
}
|
|
538
|
+
__name(text, "text");
|
|
539
|
+
|
|
540
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/thematic-break.js
|
|
541
|
+
function thematicBreak(state, node) {
|
|
542
|
+
const result = {
|
|
543
|
+
type: "element",
|
|
544
|
+
tagName: "hr",
|
|
545
|
+
properties: {},
|
|
546
|
+
children: []
|
|
547
|
+
};
|
|
548
|
+
state.patch(node, result);
|
|
549
|
+
return state.applyData(node, result);
|
|
550
|
+
}
|
|
551
|
+
__name(thematicBreak, "thematicBreak");
|
|
552
|
+
|
|
553
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/handlers/index.js
|
|
554
|
+
var handlers = {
|
|
555
|
+
blockquote,
|
|
556
|
+
break: hardBreak,
|
|
557
|
+
code,
|
|
558
|
+
delete: strikethrough,
|
|
559
|
+
emphasis,
|
|
560
|
+
footnoteReference,
|
|
561
|
+
heading,
|
|
562
|
+
html,
|
|
563
|
+
imageReference,
|
|
564
|
+
image,
|
|
565
|
+
inlineCode,
|
|
566
|
+
linkReference,
|
|
567
|
+
link,
|
|
568
|
+
listItem,
|
|
569
|
+
list,
|
|
570
|
+
paragraph,
|
|
571
|
+
// @ts-expect-error: root is different, but hard to type.
|
|
572
|
+
root,
|
|
573
|
+
strong,
|
|
574
|
+
table,
|
|
575
|
+
tableCell,
|
|
576
|
+
tableRow,
|
|
577
|
+
text,
|
|
578
|
+
thematicBreak,
|
|
579
|
+
toml: ignore,
|
|
580
|
+
yaml: ignore,
|
|
581
|
+
definition: ignore,
|
|
582
|
+
footnoteDefinition: ignore
|
|
583
|
+
};
|
|
584
|
+
function ignore() {
|
|
585
|
+
return void 0;
|
|
586
|
+
}
|
|
587
|
+
__name(ignore, "ignore");
|
|
588
|
+
|
|
589
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/footer.js
|
|
590
|
+
function defaultFootnoteBackContent(_, rereferenceIndex) {
|
|
591
|
+
const result = [{ type: "text", value: "\u21A9" }];
|
|
592
|
+
if (rereferenceIndex > 1) {
|
|
593
|
+
result.push({
|
|
594
|
+
type: "element",
|
|
595
|
+
tagName: "sup",
|
|
596
|
+
properties: {},
|
|
597
|
+
children: [{ type: "text", value: String(rereferenceIndex) }]
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
return result;
|
|
601
|
+
}
|
|
602
|
+
__name(defaultFootnoteBackContent, "defaultFootnoteBackContent");
|
|
603
|
+
function defaultFootnoteBackLabel(referenceIndex, rereferenceIndex) {
|
|
604
|
+
return "Back to reference " + (referenceIndex + 1) + (rereferenceIndex > 1 ? "-" + rereferenceIndex : "");
|
|
605
|
+
}
|
|
606
|
+
__name(defaultFootnoteBackLabel, "defaultFootnoteBackLabel");
|
|
607
|
+
function footer(state) {
|
|
608
|
+
const clobberPrefix = typeof state.options.clobberPrefix === "string" ? state.options.clobberPrefix : "user-content-";
|
|
609
|
+
const footnoteBackContent = state.options.footnoteBackContent || defaultFootnoteBackContent;
|
|
610
|
+
const footnoteBackLabel = state.options.footnoteBackLabel || defaultFootnoteBackLabel;
|
|
611
|
+
const footnoteLabel = state.options.footnoteLabel || "Footnotes";
|
|
612
|
+
const footnoteLabelTagName = state.options.footnoteLabelTagName || "h2";
|
|
613
|
+
const footnoteLabelProperties = state.options.footnoteLabelProperties || {
|
|
614
|
+
className: ["sr-only"]
|
|
615
|
+
};
|
|
616
|
+
const contents = [];
|
|
617
|
+
const listItems = [];
|
|
618
|
+
let referenceIndex = -1;
|
|
619
|
+
while (++referenceIndex < state.footnoteOrder.length) {
|
|
620
|
+
const definition = state.footnoteById.get(
|
|
621
|
+
state.footnoteOrder[referenceIndex]
|
|
622
|
+
);
|
|
623
|
+
if (definition) {
|
|
624
|
+
contents[referenceIndex] = state.all(definition);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
referenceIndex = -1;
|
|
628
|
+
while (++referenceIndex < state.footnoteOrder.length) {
|
|
629
|
+
const definition = state.footnoteById.get(
|
|
630
|
+
state.footnoteOrder[referenceIndex]
|
|
631
|
+
);
|
|
632
|
+
if (!definition) {
|
|
633
|
+
continue;
|
|
634
|
+
}
|
|
635
|
+
const content = contents[referenceIndex];
|
|
636
|
+
const id = String(definition.identifier).toUpperCase();
|
|
637
|
+
const safeId = normalizeUri(id.toLowerCase());
|
|
638
|
+
let rereferenceIndex = 0;
|
|
639
|
+
const backReferences = [];
|
|
640
|
+
const counts = state.footnoteCounts.get(id);
|
|
641
|
+
while (counts !== void 0 && ++rereferenceIndex <= counts) {
|
|
642
|
+
if (backReferences.length > 0) {
|
|
643
|
+
backReferences.push({ type: "text", value: " " });
|
|
644
|
+
}
|
|
645
|
+
let children = typeof footnoteBackContent === "string" ? footnoteBackContent : footnoteBackContent(referenceIndex, rereferenceIndex);
|
|
646
|
+
if (typeof children === "string") {
|
|
647
|
+
children = { type: "text", value: children };
|
|
648
|
+
}
|
|
649
|
+
backReferences.push({
|
|
650
|
+
type: "element",
|
|
651
|
+
tagName: "a",
|
|
652
|
+
properties: {
|
|
653
|
+
href: "#" + clobberPrefix + "fnref-" + safeId + (rereferenceIndex > 1 ? "-" + rereferenceIndex : ""),
|
|
654
|
+
dataFootnoteBackref: "",
|
|
655
|
+
ariaLabel: typeof footnoteBackLabel === "string" ? footnoteBackLabel : footnoteBackLabel(referenceIndex, rereferenceIndex),
|
|
656
|
+
className: ["data-footnote-backref"]
|
|
657
|
+
},
|
|
658
|
+
children: Array.isArray(children) ? children : [children]
|
|
659
|
+
});
|
|
660
|
+
}
|
|
661
|
+
const tail = content[content.length - 1];
|
|
662
|
+
if (tail && tail.type === "element" && tail.tagName === "p") {
|
|
663
|
+
const tailTail = tail.children[tail.children.length - 1];
|
|
664
|
+
if (tailTail && tailTail.type === "text") {
|
|
665
|
+
tailTail.value += " ";
|
|
666
|
+
} else {
|
|
667
|
+
tail.children.push({ type: "text", value: " " });
|
|
668
|
+
}
|
|
669
|
+
tail.children.push(...backReferences);
|
|
670
|
+
} else {
|
|
671
|
+
content.push(...backReferences);
|
|
672
|
+
}
|
|
673
|
+
const listItem2 = {
|
|
674
|
+
type: "element",
|
|
675
|
+
tagName: "li",
|
|
676
|
+
properties: { id: clobberPrefix + "fn-" + safeId },
|
|
677
|
+
children: state.wrap(content, true)
|
|
678
|
+
};
|
|
679
|
+
state.patch(definition, listItem2);
|
|
680
|
+
listItems.push(listItem2);
|
|
681
|
+
}
|
|
682
|
+
if (listItems.length === 0) {
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
685
|
+
return {
|
|
686
|
+
type: "element",
|
|
687
|
+
tagName: "section",
|
|
688
|
+
properties: { dataFootnotes: true, className: ["footnotes"] },
|
|
689
|
+
children: [
|
|
690
|
+
{
|
|
691
|
+
type: "element",
|
|
692
|
+
tagName: footnoteLabelTagName,
|
|
693
|
+
properties: {
|
|
694
|
+
...esm_default(footnoteLabelProperties),
|
|
695
|
+
id: "footnote-label"
|
|
696
|
+
},
|
|
697
|
+
children: [{ type: "text", value: footnoteLabel }]
|
|
698
|
+
},
|
|
699
|
+
{ type: "text", value: "\n" },
|
|
700
|
+
{
|
|
701
|
+
type: "element",
|
|
702
|
+
tagName: "ol",
|
|
703
|
+
properties: {},
|
|
704
|
+
children: state.wrap(listItems, true)
|
|
705
|
+
},
|
|
706
|
+
{ type: "text", value: "\n" }
|
|
707
|
+
]
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
__name(footer, "footer");
|
|
711
|
+
|
|
712
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/state.js
|
|
713
|
+
var own = {}.hasOwnProperty;
|
|
714
|
+
var emptyOptions = {};
|
|
715
|
+
function createState(tree, options) {
|
|
716
|
+
const settings = options || emptyOptions;
|
|
717
|
+
const definitionById = /* @__PURE__ */ new Map();
|
|
718
|
+
const footnoteById = /* @__PURE__ */ new Map();
|
|
719
|
+
const footnoteCounts = /* @__PURE__ */ new Map();
|
|
720
|
+
const handlers2 = { ...handlers, ...settings.handlers };
|
|
721
|
+
const state = {
|
|
722
|
+
all,
|
|
723
|
+
applyData,
|
|
724
|
+
definitionById,
|
|
725
|
+
footnoteById,
|
|
726
|
+
footnoteCounts,
|
|
727
|
+
footnoteOrder: [],
|
|
728
|
+
handlers: handlers2,
|
|
729
|
+
one,
|
|
730
|
+
options: settings,
|
|
731
|
+
patch,
|
|
732
|
+
wrap
|
|
733
|
+
};
|
|
734
|
+
visit(tree, function(node) {
|
|
735
|
+
if (node.type === "definition" || node.type === "footnoteDefinition") {
|
|
736
|
+
const id = String(node.identifier).toUpperCase();
|
|
737
|
+
if (node.type === "definition") {
|
|
738
|
+
if (!definitionById.has(id)) {
|
|
739
|
+
definitionById.set(id, node);
|
|
740
|
+
}
|
|
741
|
+
} else if (!footnoteById.has(id)) {
|
|
742
|
+
footnoteById.set(id, node);
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
return state;
|
|
747
|
+
function one(node, parent) {
|
|
748
|
+
const { type } = node;
|
|
749
|
+
const handle = state.handlers[type];
|
|
750
|
+
if (own.call(state.handlers, type) && handle) {
|
|
751
|
+
return handle(state, node, parent);
|
|
752
|
+
}
|
|
753
|
+
if (state.options.passThrough && state.options.passThrough.includes(type)) {
|
|
754
|
+
if ("children" in node) {
|
|
755
|
+
const { children, ...shallow } = node;
|
|
756
|
+
return { ...esm_default(shallow), children: state.all(node) };
|
|
757
|
+
}
|
|
758
|
+
return esm_default(node);
|
|
759
|
+
}
|
|
760
|
+
const unknown = state.options.unknownHandler || defaultUnknownHandler;
|
|
761
|
+
return unknown(state, node, parent);
|
|
762
|
+
}
|
|
763
|
+
__name(one, "one");
|
|
764
|
+
function all(parent) {
|
|
765
|
+
const values = [];
|
|
766
|
+
if ("children" in parent) {
|
|
767
|
+
const nodes = parent.children;
|
|
768
|
+
let index = -1;
|
|
769
|
+
while (++index < nodes.length) {
|
|
770
|
+
const result = state.one(nodes[index], parent);
|
|
771
|
+
if (result) {
|
|
772
|
+
if (index && nodes[index - 1].type === "break") {
|
|
773
|
+
if (!Array.isArray(result) && result.type === "text") {
|
|
774
|
+
result.value = trimMarkdownSpaceStart(result.value);
|
|
775
|
+
}
|
|
776
|
+
if (!Array.isArray(result) && result.type === "element") {
|
|
777
|
+
const head = result.children[0];
|
|
778
|
+
if (head && head.type === "text") {
|
|
779
|
+
head.value = trimMarkdownSpaceStart(head.value);
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
if (Array.isArray(result)) {
|
|
784
|
+
values.push(...result);
|
|
785
|
+
} else {
|
|
786
|
+
values.push(result);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
return values;
|
|
792
|
+
}
|
|
793
|
+
__name(all, "all");
|
|
794
|
+
}
|
|
795
|
+
__name(createState, "createState");
|
|
796
|
+
function patch(from, to) {
|
|
797
|
+
if (from.position) to.position = position(from);
|
|
798
|
+
}
|
|
799
|
+
__name(patch, "patch");
|
|
800
|
+
function applyData(from, to) {
|
|
801
|
+
let result = to;
|
|
802
|
+
if (from && from.data) {
|
|
803
|
+
const { hChildren, hName, hProperties } = from.data;
|
|
804
|
+
if (typeof hName === "string") {
|
|
805
|
+
if (result.type === "element") {
|
|
806
|
+
result.tagName = hName;
|
|
807
|
+
} else {
|
|
808
|
+
const children = "children" in result ? result.children : [result];
|
|
809
|
+
result = { type: "element", tagName: hName, properties: {}, children };
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
if (result.type === "element" && hProperties) {
|
|
813
|
+
Object.assign(result.properties, esm_default(hProperties));
|
|
814
|
+
}
|
|
815
|
+
if ("children" in result && result.children && hChildren !== null && hChildren !== void 0) {
|
|
816
|
+
result.children = hChildren;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
return result;
|
|
820
|
+
}
|
|
821
|
+
__name(applyData, "applyData");
|
|
822
|
+
function defaultUnknownHandler(state, node) {
|
|
823
|
+
const data = node.data || {};
|
|
824
|
+
const result = "value" in node && !(own.call(data, "hProperties") || own.call(data, "hChildren")) ? { type: "text", value: node.value } : {
|
|
825
|
+
type: "element",
|
|
826
|
+
tagName: "div",
|
|
827
|
+
properties: {},
|
|
828
|
+
children: state.all(node)
|
|
829
|
+
};
|
|
830
|
+
state.patch(node, result);
|
|
831
|
+
return state.applyData(node, result);
|
|
832
|
+
}
|
|
833
|
+
__name(defaultUnknownHandler, "defaultUnknownHandler");
|
|
834
|
+
function wrap(nodes, loose) {
|
|
835
|
+
const result = [];
|
|
836
|
+
let index = -1;
|
|
837
|
+
if (loose) {
|
|
838
|
+
result.push({ type: "text", value: "\n" });
|
|
839
|
+
}
|
|
840
|
+
while (++index < nodes.length) {
|
|
841
|
+
if (index) result.push({ type: "text", value: "\n" });
|
|
842
|
+
result.push(nodes[index]);
|
|
843
|
+
}
|
|
844
|
+
if (loose && nodes.length > 0) {
|
|
845
|
+
result.push({ type: "text", value: "\n" });
|
|
846
|
+
}
|
|
847
|
+
return result;
|
|
848
|
+
}
|
|
849
|
+
__name(wrap, "wrap");
|
|
850
|
+
function trimMarkdownSpaceStart(value) {
|
|
851
|
+
let index = 0;
|
|
852
|
+
let code2 = value.charCodeAt(index);
|
|
853
|
+
while (code2 === 9 || code2 === 32) {
|
|
854
|
+
index++;
|
|
855
|
+
code2 = value.charCodeAt(index);
|
|
856
|
+
}
|
|
857
|
+
return value.slice(index);
|
|
858
|
+
}
|
|
859
|
+
__name(trimMarkdownSpaceStart, "trimMarkdownSpaceStart");
|
|
860
|
+
|
|
861
|
+
// node_modules/.pnpm/mdast-util-to-hast@13.2.2/node_modules/mdast-util-to-hast/lib/index.js
|
|
862
|
+
function toHast(tree, options) {
|
|
863
|
+
const state = createState(tree, options);
|
|
864
|
+
const node = state.one(tree, void 0);
|
|
865
|
+
const foot = footer(state);
|
|
866
|
+
const result = Array.isArray(node) ? { type: "root", children: node } : node || { type: "root", children: [] };
|
|
867
|
+
if (foot) {
|
|
868
|
+
ok("children" in result);
|
|
869
|
+
result.children.push({ type: "text", value: "\n" }, foot);
|
|
870
|
+
}
|
|
871
|
+
return result;
|
|
872
|
+
}
|
|
873
|
+
__name(toHast, "toHast");
|
|
874
|
+
export {
|
|
875
|
+
defaultFootnoteBackContent,
|
|
876
|
+
defaultFootnoteBackLabel,
|
|
877
|
+
handlers as defaultHandlers,
|
|
878
|
+
toHast
|
|
879
|
+
};
|