@aiquants/markdown 5.0.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/README.md +93 -14
  2. package/dist/{abnfDiagram-VRR7QNED-DeHJ63Vu.js → abnfDiagram-VRR7QNED-D7Rp9EaV.js} +3 -3
  3. package/dist/{abnfDiagram-VRR7QNED-CfVjEUzG.cjs → abnfDiagram-VRR7QNED-KTGT9TWM.cjs} +1 -1
  4. package/dist/{arc-XFFLkHkK.cjs → arc-D5T_urCC.cjs} +1 -1
  5. package/dist/arc-DzZml7Bc.js +83 -0
  6. package/dist/{architectureDiagram-ZJ3FMSHR-7xJ6YYGu.cjs → architectureDiagram-ZJ3FMSHR-BOo3y9aD.cjs} +1 -1
  7. package/dist/{architectureDiagram-ZJ3FMSHR-CQ1m3MUB.js → architectureDiagram-ZJ3FMSHR-DLrGYTYy.js} +123 -123
  8. package/dist/{blockDiagram-677ZJIJ3-BPC3se0e.js → blockDiagram-677ZJIJ3-B60l5Fpl.js} +166 -166
  9. package/dist/{blockDiagram-677ZJIJ3-CJOFqwiW.cjs → blockDiagram-677ZJIJ3-DnjCjo0a.cjs} +1 -1
  10. package/dist/{c4Diagram-LMCZKHZV-BEIrp4t6.js → c4Diagram-LMCZKHZV-BmbplKCu.js} +2 -2
  11. package/dist/{c4Diagram-LMCZKHZV-D8ytYGhR.cjs → c4Diagram-LMCZKHZV-bd8fWQ1F.cjs} +1 -1
  12. package/dist/channel-B3oXm84X.js +5 -0
  13. package/dist/{channel-CJQcZr8o.cjs → channel-DJ_PyD9w.cjs} +1 -1
  14. package/dist/{chunk-2Q5K7J3B-l8ly7Yjr.js → chunk-2Q5K7J3B-C0hbxO3D.js} +1 -1
  15. package/dist/{chunk-2Q5K7J3B-BbMQR3Sm.cjs → chunk-2Q5K7J3B-CWLCO342.cjs} +1 -1
  16. package/dist/{chunk-32BRIVSS-BwDfmprN.cjs → chunk-32BRIVSS-Cb9nTxqN.cjs} +1 -1
  17. package/dist/{chunk-32BRIVSS-BhQJBlVw.js → chunk-32BRIVSS-DUWtkDEY.js} +1 -1
  18. package/dist/{chunk-5VM5RSS4-Bfis-x7E.js → chunk-5VM5RSS4-C3mSh-gE.js} +1 -1
  19. package/dist/{chunk-5VM5RSS4-CqDQlS7v.cjs → chunk-5VM5RSS4-DHA5n_Ls.cjs} +1 -1
  20. package/dist/{chunk-EX3LRPZG-9aDULZwJ.cjs → chunk-EX3LRPZG-ByY6_kep.cjs} +1 -1
  21. package/dist/{chunk-EX3LRPZG-DUTbzwDM.js → chunk-EX3LRPZG-DCF1zjtT.js} +50 -50
  22. package/dist/{chunk-JWPE2WC7-DpcSSOP5.js → chunk-JWPE2WC7-CPLOunIL.js} +1 -1
  23. package/dist/{chunk-JWPE2WC7-5cM5nFf6.cjs → chunk-JWPE2WC7-CUBzYD4G.cjs} +1 -1
  24. package/dist/{chunk-MOJQB5TN-D_h6bolU.js → chunk-MOJQB5TN-CmOhW6SK.js} +9 -9
  25. package/dist/{chunk-MOJQB5TN-Cw864mUL.cjs → chunk-MOJQB5TN-P8-yb3-j.cjs} +1 -1
  26. package/dist/{chunk-PUDLZKDR-B0wZjmzv.js → chunk-PUDLZKDR-DH7B7ZTK.js} +22 -22
  27. package/dist/{chunk-PUDLZKDR-yLvT3c9x.cjs → chunk-PUDLZKDR-pKdIELvz.cjs} +1 -1
  28. package/dist/{chunk-RYQCIY6F-DTKYsCgk.js → chunk-RYQCIY6F-C7ytn_QX.js} +6 -6
  29. package/dist/{chunk-RYQCIY6F-hj9dRWMT.cjs → chunk-RYQCIY6F-DcvQCEoc.cjs} +1 -1
  30. package/dist/{chunk-V7JOEXUC-COa9uddv.js → chunk-V7JOEXUC-BgLcssUF.js} +5 -5
  31. package/dist/{chunk-V7JOEXUC-DIQ8n1AN.cjs → chunk-V7JOEXUC-CtXgqODy.cjs} +1 -1
  32. package/dist/{chunk-VR4S4FIN-B72PxPVm.js → chunk-VR4S4FIN-BK6xeIQk.js} +3 -3
  33. package/dist/{chunk-VR4S4FIN-Cy-2mZJB.cjs → chunk-VR4S4FIN-Cc4GDi2Z.cjs} +1 -1
  34. package/dist/{chunk-XXDRQBXY-D2Sgptl-.js → chunk-XXDRQBXY-COtZ25Ez.js} +1 -1
  35. package/dist/{chunk-XXDRQBXY-DmoUE7-y.cjs → chunk-XXDRQBXY-D1OixGzR.cjs} +1 -1
  36. package/dist/{classDiagram-OUVF2IWQ-GjsCEuKI.cjs → classDiagram-OUVF2IWQ-DDLmqaG6.cjs} +1 -1
  37. package/dist/{classDiagram-v2-EOCWNBFH-Dah4_VL7.js → classDiagram-OUVF2IWQ-Jc-IwOm0.js} +2 -2
  38. package/dist/{classDiagram-v2-EOCWNBFH-GjsCEuKI.cjs → classDiagram-v2-EOCWNBFH-DDLmqaG6.cjs} +1 -1
  39. package/dist/{classDiagram-OUVF2IWQ-Dah4_VL7.js → classDiagram-v2-EOCWNBFH-Jc-IwOm0.js} +2 -2
  40. package/dist/components/MarkdownRenderer.d.ts +5 -2
  41. package/dist/components/MarkdownViewer.d.ts +3 -2
  42. package/dist/components/NodesRenderer.d.ts +1 -5
  43. package/dist/components/embeds/ClientFrame.d.ts +13 -0
  44. package/dist/components/embeds/LinkCard.d.ts +9 -0
  45. package/dist/components/embeds/ProviderEmbed.d.ts +11 -0
  46. package/dist/components/embeds/embedLabels.d.ts +12 -0
  47. package/dist/components/embeds/frameMessages.d.ts +7 -0
  48. package/dist/components/embeds/markdownEmbeds.d.ts +2 -0
  49. package/dist/components/embeds/requestQueue.d.ts +16 -0
  50. package/dist/components/embeds.d.ts +0 -8
  51. package/dist/components/htmlSanitizer.d.ts +4 -0
  52. package/dist/components/mdastNodes/HTMLBlockContainerNode.d.ts +1 -2
  53. package/dist/components/rawHtml.d.ts +6 -3
  54. package/dist/components/viewerLabels.d.ts +3 -1
  55. package/dist/{cose-bilkent-JH36ORCC-Pi0l3C5o.js → cose-bilkent-JH36ORCC-DaucPocG.js} +1 -1
  56. package/dist/{cose-bilkent-JH36ORCC-Vi9pHFwc.cjs → cose-bilkent-JH36ORCC-OwiXHdQY.cjs} +1 -1
  57. package/dist/css/zenn-content.css +0 -40
  58. package/dist/{cynefinDiagram-TSTJHNR4-BQ2k9Z6b.cjs → cynefinDiagram-TSTJHNR4-Ag-HcuUm.cjs} +1 -1
  59. package/dist/{cynefinDiagram-TSTJHNR4-CIh03JTU.js → cynefinDiagram-TSTJHNR4-Dkmz7gDw.js} +47 -47
  60. package/dist/{dagre-VKFMJZFB-cINcPwV3.js → dagre-VKFMJZFB-BHGdcjt3.js} +27 -27
  61. package/dist/{dagre-VKFMJZFB-DI2wSrAy.cjs → dagre-VKFMJZFB-Q4CcAQ09.cjs} +1 -1
  62. package/dist/{diagram-FQU43EPY-BonrBTG_.js → diagram-FQU43EPY-DBASKnKu.js} +42 -42
  63. package/dist/{diagram-FQU43EPY-B6iUH2l5.cjs → diagram-FQU43EPY-jWCrN_AW.cjs} +1 -1
  64. package/dist/{diagram-G47NLZAW-CY6mWS2R.cjs → diagram-G47NLZAW-B4XMStX7.cjs} +1 -1
  65. package/dist/{diagram-G47NLZAW-5N876QQA.js → diagram-G47NLZAW-BY1mmnYA.js} +83 -83
  66. package/dist/{diagram-NH7WQ7WH-x3SaRfd6.cjs → diagram-NH7WQ7WH-BS1eEa9R.cjs} +1 -1
  67. package/dist/{diagram-NH7WQ7WH-LFuTbHxY.js → diagram-NH7WQ7WH-BXFvYRtm.js} +18 -18
  68. package/dist/{diagram-OA4YK3LP-B9mVw8cB.cjs → diagram-OA4YK3LP-CTaL_2Nc.cjs} +1 -1
  69. package/dist/{diagram-OA4YK3LP-Cinpbl0B.js → diagram-OA4YK3LP-DgGrzezu.js} +61 -61
  70. package/dist/{diagram-WEI45ONY-HPCHpafe.js → diagram-WEI45ONY-BHxWKH3v.js} +21 -21
  71. package/dist/{diagram-WEI45ONY-BRYVUhRr.cjs → diagram-WEI45ONY-DX7BGSMI.cjs} +1 -1
  72. package/dist/{ebnfDiagram-CCIWWBDH-oLOdtH39.js → ebnfDiagram-CCIWWBDH-BUK_anpV.js} +5 -5
  73. package/dist/{ebnfDiagram-CCIWWBDH-DhFlIi0a.cjs → ebnfDiagram-CCIWWBDH-BpDmVVJY.cjs} +1 -1
  74. package/dist/embeds/frames.d.ts +4 -0
  75. package/dist/embeds/linkCards.d.ts +16 -0
  76. package/dist/embeds/placeholder.d.ts +15 -0
  77. package/dist/embeds/providers.d.ts +73 -0
  78. package/dist/embeds/testing.cjs +1 -0
  79. package/dist/embeds/testing.d.ts +7 -0
  80. package/dist/embeds/testing.js +67 -0
  81. package/dist/embeds.cjs +1 -0
  82. package/dist/embeds.d.ts +4 -0
  83. package/dist/embeds.js +94 -0
  84. package/dist/{erDiagram-Q63AITRT-DCCFR1Ai.cjs → erDiagram-Q63AITRT-Cd9H9BtP.cjs} +1 -1
  85. package/dist/{erDiagram-Q63AITRT-CCtzpK78.js → erDiagram-Q63AITRT-Qb2bmkNp.js} +9 -9
  86. package/dist/{extractHeadings-CGJexznE.js → extractHeadings-B2pUyEPa.js} +5603 -5517
  87. package/dist/extractHeadings-DgefF9l1.cjs +311 -0
  88. package/dist/flowDiagram-23GEKE2U-BOmNlv7X.cjs +1 -0
  89. package/dist/flowDiagram-23GEKE2U-DMZnRz-6.js +7 -0
  90. package/dist/{ganttDiagram-NO4QXBWP-Dfi3nINO.js → ganttDiagram-NO4QXBWP-BVISsrzr.js} +69 -69
  91. package/dist/{ganttDiagram-NO4QXBWP-C9RPyo4r.cjs → ganttDiagram-NO4QXBWP-C6-ExcDz.cjs} +1 -1
  92. package/dist/{gitGraphDiagram-IHSO6WYX-CjAqPhww.js → gitGraphDiagram-IHSO6WYX-BDVA2TFP.js} +38 -38
  93. package/dist/{gitGraphDiagram-IHSO6WYX-mT3NNT7T.cjs → gitGraphDiagram-IHSO6WYX-DLzPc702.cjs} +1 -1
  94. package/dist/index.cjs +1 -1
  95. package/dist/index.client.cjs +1 -1
  96. package/dist/index.client.d.ts +1 -10
  97. package/dist/index.client.js +41 -49
  98. package/dist/index.js +41 -49
  99. package/dist/index.server.cjs +1 -1
  100. package/dist/index.server.d.ts +0 -2
  101. package/dist/index.server.js +116 -161
  102. package/dist/{infoDiagram-FWYZ7A6U-BXWQ9Vy4.js → infoDiagram-FWYZ7A6U-D31UwqjR.js} +1 -1
  103. package/dist/{infoDiagram-FWYZ7A6U-0Co9BitR.cjs → infoDiagram-FWYZ7A6U-DMF_wb2h.cjs} +1 -1
  104. package/dist/{ishikawaDiagram-FXEZZL3T-BKqUBw1i.cjs → ishikawaDiagram-FXEZZL3T-DUlnwraq.cjs} +1 -1
  105. package/dist/{ishikawaDiagram-FXEZZL3T-CZp5P1WE.js → ishikawaDiagram-FXEZZL3T-XA6-gyHY.js} +35 -35
  106. package/dist/{journeyDiagram-5HDEW3XC-DYVTgOOE.js → journeyDiagram-5HDEW3XC-B8sfsWpu.js} +39 -39
  107. package/dist/{journeyDiagram-5HDEW3XC-CeumPQ1I.cjs → journeyDiagram-5HDEW3XC-CwQyFcYa.cjs} +1 -1
  108. package/dist/{kanban-definition-HUTT4EX6-Cg5KnsE9.cjs → kanban-definition-HUTT4EX6-BjPlt2-E.cjs} +1 -1
  109. package/dist/{kanban-definition-HUTT4EX6-CnleRy80.js → kanban-definition-HUTT4EX6-FTrTBare.js} +123 -123
  110. package/dist/{linear-qqwu6T0F.cjs → linear-D3AJM3sY.cjs} +1 -1
  111. package/dist/{linear-Cf8i6Rsk.js → linear-DI9P_z72.js} +32 -32
  112. package/dist/markdown.css +1 -1
  113. package/dist/{mindmap-definition-LN4V7U3C-DfFWeFph.cjs → mindmap-definition-LN4V7U3C-CxgWZidl.cjs} +1 -1
  114. package/dist/{mindmap-definition-LN4V7U3C-lBin9VOm.js → mindmap-definition-LN4V7U3C-YW4YcL9x.js} +33 -33
  115. package/dist/{pegDiagram-2B236MQR-Cf1f-3yi.cjs → pegDiagram-2B236MQR-CUo7q5bl.cjs} +1 -1
  116. package/dist/{pegDiagram-2B236MQR-BiD21lOj.js → pegDiagram-2B236MQR-sJjLKeF3.js} +5 -5
  117. package/dist/{pieDiagram-ENE6RG2P-jwhVsZgX.cjs → pieDiagram-ENE6RG2P-Cy_sUuLQ.cjs} +1 -1
  118. package/dist/{pieDiagram-ENE6RG2P-BqZb6gaV.js → pieDiagram-ENE6RG2P-D4VanIOv.js} +58 -58
  119. package/dist/providers-Bxr2Wb-j.cjs +1 -0
  120. package/dist/providers-Drq7MT_K.js +209 -0
  121. package/dist/{quadrantDiagram-ABIIQ3AL-sO_sIA7b.cjs → quadrantDiagram-ABIIQ3AL-D3c8xLpt.cjs} +1 -1
  122. package/dist/{quadrantDiagram-ABIIQ3AL-CNe9fRLO.js → quadrantDiagram-ABIIQ3AL-ubxphjb_.js} +48 -48
  123. package/dist/{railroadDiagram-RFXS5EU6-53YTkJrs.js → railroadDiagram-RFXS5EU6-DvpD4C_A.js} +3 -3
  124. package/dist/{railroadDiagram-RFXS5EU6-Dkc8k3e9.cjs → railroadDiagram-RFXS5EU6-_Q4W5hB-.cjs} +1 -1
  125. package/dist/{requirementDiagram-TGXJPOKE-C0GMlJO4.cjs → requirementDiagram-TGXJPOKE-DdYIO-wU.cjs} +1 -1
  126. package/dist/{requirementDiagram-TGXJPOKE-D8Gz7jzA.js → requirementDiagram-TGXJPOKE-Dk_6BuX9.js} +3 -3
  127. package/dist/{sankeyDiagram-HTMAVEWB-CEC0GaCg.js → sankeyDiagram-HTMAVEWB-s3Kd7T8n.js} +67 -67
  128. package/dist/{sankeyDiagram-HTMAVEWB-Bw9J2Ay2.cjs → sankeyDiagram-HTMAVEWB-zuYg6LTg.cjs} +1 -1
  129. package/dist/{sequenceDiagram-DBY2YBRQ-BuqPCreB.cjs → sequenceDiagram-DBY2YBRQ-BvNPCevg.cjs} +1 -1
  130. package/dist/{sequenceDiagram-DBY2YBRQ-CKb4m3I0.js → sequenceDiagram-DBY2YBRQ-YQic4wxL.js} +47 -47
  131. package/dist/{sizeCapture-X5ZJPWSS-Dm3rsxXw.cjs → sizeCapture-X5ZJPWSS-BqrdzzsI.cjs} +1 -1
  132. package/dist/{sizeCapture-X5ZJPWSS-CotnTNAA.js → sizeCapture-X5ZJPWSS-qMsWGfjy.js} +1 -1
  133. package/dist/{stateDiagram-2N3HPSRC-GWEIP-C9.js → stateDiagram-2N3HPSRC-D1Ub8LYq.js} +22 -22
  134. package/dist/{stateDiagram-2N3HPSRC-5Y-OlePe.cjs → stateDiagram-2N3HPSRC-Ds8f-scd.cjs} +1 -1
  135. package/dist/{stateDiagram-v2-6OUMAXLB-BZFV8swJ.js → stateDiagram-v2-6OUMAXLB-DW8wjtk3.js} +2 -2
  136. package/dist/{stateDiagram-v2-6OUMAXLB-v77D3Qyf.cjs → stateDiagram-v2-6OUMAXLB-PmrsPXuZ.cjs} +1 -1
  137. package/dist/styles/markdown.css +1 -1
  138. package/dist/{swimlanes-5IMT3BWC-DujAOwAt.js → swimlanes-5IMT3BWC-C8P8vU0w.js} +313 -313
  139. package/dist/{swimlanes-5IMT3BWC-B1hLl8Ph.cjs → swimlanes-5IMT3BWC-jZhcesRT.cjs} +1 -1
  140. package/dist/{swimlanesDiagram-G3AALYLV-B-5z3jDg.js → swimlanesDiagram-G3AALYLV-B9FKeJRf.js} +2 -2
  141. package/dist/{swimlanesDiagram-G3AALYLV-Cklgsxbg.cjs → swimlanesDiagram-G3AALYLV-M5Cg2MHU.cjs} +1 -1
  142. package/dist/{timeline-definition-FHXFAJF6-Fmzt_lvR.js → timeline-definition-FHXFAJF6-Ch-He--D.js} +34 -34
  143. package/dist/{timeline-definition-FHXFAJF6-B2m-aQLI.cjs → timeline-definition-FHXFAJF6-DZm1-KlQ.cjs} +1 -1
  144. package/dist/{vennDiagram-L72KCM5P-zIXK42Cx.js → vennDiagram-L72KCM5P-CaoPscCM.js} +92 -92
  145. package/dist/{vennDiagram-L72KCM5P-rL7UDYbl.cjs → vennDiagram-L72KCM5P-mUSI238J.cjs} +1 -1
  146. package/dist/{wardleyDiagram-EHGQE667-pTeeZ0uM.js → wardleyDiagram-EHGQE667-CSAqF366.js} +11 -11
  147. package/dist/{wardleyDiagram-EHGQE667-CNLieFen.cjs → wardleyDiagram-EHGQE667-CkKP97H-.cjs} +1 -1
  148. package/dist/{xychartDiagram-FW5EYKEG-CD5ik4HK.cjs → xychartDiagram-FW5EYKEG-BivGpkVk.cjs} +1 -1
  149. package/dist/{xychartDiagram-FW5EYKEG-B6UdSSVZ.js → xychartDiagram-FW5EYKEG-OEsTD_k4.js} +37 -37
  150. package/package.json +21 -8
  151. package/dist/arc-DH6k2JIR.js +0 -83
  152. package/dist/channel-DoH_tsOQ.js +0 -5
  153. package/dist/components/mdastNodes/BlockLinkNode.d.ts +0 -5
  154. package/dist/components/mdastNodes/RichLinkCard.d.ts +0 -8
  155. package/dist/components/mdastNodes/TwitterEmbedNode.d.ts +0 -25
  156. package/dist/components/mdastNodes/YouTubeEmbedNode.d.ts +0 -6
  157. package/dist/extractHeadings-lDHB2sBb.cjs +0 -310
  158. package/dist/flowDiagram-23GEKE2U-ORytlvmX.js +0 -7
  159. package/dist/flowDiagram-23GEKE2U-h2WZTCCn.cjs +0 -1
  160. package/dist/plugins/createIntentTweetLink.d.ts +0 -10
  161. package/dist/plugins/extractYouTubeVideoId.d.ts +0 -5
  162. package/dist/plugins/fetchSiteMetadata.d.ts +0 -9
  163. package/dist/plugins/remark-auto-heading-id.d.ts +0 -2
  164. package/dist/plugins/remark-block-link-metadata.d.ts +0 -23
  165. package/dist/plugins/remark-block-link.d.ts +0 -12
  166. package/dist/plugins/remark-twitter-embed.d.ts +0 -20
  167. package/dist/plugins/remark-youtube-embed.d.ts +0 -14
  168. package/dist/simple-logger-DZxBpX7v.cjs +0 -1
  169. package/dist/simple-logger-i94ikRyH.js +0 -101
  170. package/dist/utils/getFaviconUrl.d.ts +0 -1
@@ -1,56 +1,13 @@
1
- import { load as I } from "cheerio";
2
- import { L as B } from "./simple-logger-i94ikRyH.js";
3
- import { visit as J } from "unist-util-visit";
4
- import { spawn as $ } from "node:child_process";
5
- import { existsSync as k, unlinkSync as C } from "node:fs";
6
- import { createRequire as H } from "node:module";
7
- import * as _ from "node:net";
8
- import * as M from "node:path";
9
- import { fileURLToPath as L } from "node:url";
10
- import { createClient as O, ConnectError as q, Code as D } from "@connectrpc/connect";
11
- import { Http2SessionManager as F, createConnectTransport as K } from "@connectrpc/connect-node";
12
- import { Message as S, proto3 as o, MethodKind as U } from "@bufbuild/protobuf";
13
- const Y = async (r) => {
14
- try {
15
- const e = new AbortController(), t = setTimeout(() => e.abort(), 1e4), c = await fetch(r, { signal: e.signal });
16
- if (clearTimeout(t), !c.ok)
17
- return null;
18
- const s = await c.text(), a = { url: r }, i = I(s), n = i("title").text().trim();
19
- a.title = n;
20
- const w = i("meta");
21
- for (const m of w) {
22
- const h = m.attribs.property;
23
- h === "og:site_name" && (a.site_name = m.attribs.content || void 0), h === "og:title" && (a.title = m.attribs.content || n), h === "og:description" && (a.description = m.attribs.content || void 0), h === "og:image" && (a.image = m.attribs.content || void 0), h === "og:type" && (a.type = m.attribs.content || void 0), m.attribs.name === "description" && (a.description = m.attribs.content || void 0);
24
- }
25
- return a;
26
- } catch (e) {
27
- return B.error("Error fetching site metadata:", e), null;
28
- }
29
- }, b = /* @__PURE__ */ new Map(), j = (r, e) => e.fetchAll ? !0 : e.urlPatterns && e.urlPatterns.length > 0 ? e.urlPatterns.some((t) => t.test(r)) : /^https?:\/\//.test(r) && !r.includes("localhost") && !r.includes("127.0.0.1"), pe = (r = {}) => {
30
- const { enableCache: e = !0 } = r;
31
- return async (t) => {
32
- const c = [];
33
- J(t, "block-link", (a) => {
34
- j(a.url, r) && c.push(a);
35
- });
36
- const s = c.map(async (a) => {
37
- const i = a.url;
38
- if (e && b.has(i)) {
39
- const n = b.get(i);
40
- n && (a.data = a.data || {}, a.data.siteMetadata = n);
41
- return;
42
- }
43
- try {
44
- const n = await Y(i);
45
- n ? (a.data = a.data || {}, a.data.siteMetadata = n, e && b.set(i, n)) : e && b.set(i, null);
46
- } catch (n) {
47
- B.warn(`Failed to fetch metadata for ${i}:`, n), e && b.set(i, null);
48
- }
49
- });
50
- await Promise.all(s);
51
- };
52
- };
53
- class d extends S {
1
+ import { spawn as _ } from "node:child_process";
2
+ import { existsSync as p, unlinkSync as A } from "node:fs";
3
+ import { createRequire as N } from "node:module";
4
+ import * as v from "node:net";
5
+ import * as f from "node:path";
6
+ import { fileURLToPath as R } from "node:url";
7
+ import { createClient as I, ConnectError as J, Code as $ } from "@connectrpc/connect";
8
+ import { Http2SessionManager as H, createConnectTransport as O } from "@connectrpc/connect-node";
9
+ import { Message as h, proto3 as n, MethodKind as q } from "@bufbuild/protobuf";
10
+ class i extends h {
54
11
  /**
55
12
  * @generated from field: string markdown_text = 1;
56
13
  */
@@ -147,11 +104,11 @@ class d extends S {
147
104
  */
148
105
  deny;
149
106
  constructor(e) {
150
- super(), o.util.initPartial(e, this);
107
+ super(), n.util.initPartial(e, this);
151
108
  }
152
- static runtime = o;
109
+ static runtime = n;
153
110
  static typeName = "markdown.v1.ConvertRequest";
154
- static fields = o.util.newFieldList(() => [
111
+ static fields = n.util.newFieldList(() => [
155
112
  {
156
113
  no: 1,
157
114
  name: "markdown_text",
@@ -194,46 +151,46 @@ class d extends S {
194
151
  /* ScalarType.BOOL */
195
152
  },
196
153
  { no: 12, name: "max_html_bytes", kind: "scalar", T: 13, opt: !0 },
197
- { no: 13, name: "deny", kind: "message", T: l }
154
+ { no: 13, name: "deny", kind: "message", T: o }
198
155
  ]);
199
156
  static fromBinary(e, t) {
200
- return new d().fromBinary(e, t);
157
+ return new i().fromBinary(e, t);
201
158
  }
202
159
  static fromJson(e, t) {
203
- return new d().fromJson(e, t);
160
+ return new i().fromJson(e, t);
204
161
  }
205
162
  static fromJsonString(e, t) {
206
- return new d().fromJsonString(e, t);
163
+ return new i().fromJsonString(e, t);
207
164
  }
208
165
  static equals(e, t) {
209
- return o.util.equals(d, e, t);
166
+ return n.util.equals(i, e, t);
210
167
  }
211
168
  }
212
- class l extends S {
169
+ class o extends h {
213
170
  /**
214
171
  * @generated from field: repeated string segment_patterns = 1;
215
172
  */
216
173
  segmentPatterns = [];
217
174
  constructor(e) {
218
- super(), o.util.initPartial(e, this);
175
+ super(), n.util.initPartial(e, this);
219
176
  }
220
- static runtime = o;
177
+ static runtime = n;
221
178
  static typeName = "markdown.v1.DenyRules";
222
- static fields = o.util.newFieldList(() => [{ no: 1, name: "segment_patterns", kind: "scalar", T: 9, repeated: !0 }]);
179
+ static fields = n.util.newFieldList(() => [{ no: 1, name: "segment_patterns", kind: "scalar", T: 9, repeated: !0 }]);
223
180
  static fromBinary(e, t) {
224
- return new l().fromBinary(e, t);
181
+ return new o().fromBinary(e, t);
225
182
  }
226
183
  static fromJson(e, t) {
227
- return new l().fromJson(e, t);
184
+ return new o().fromJson(e, t);
228
185
  }
229
186
  static fromJsonString(e, t) {
230
- return new l().fromJsonString(e, t);
187
+ return new o().fromJsonString(e, t);
231
188
  }
232
189
  static equals(e, t) {
233
- return o.util.equals(l, e, t);
190
+ return n.util.equals(o, e, t);
234
191
  }
235
192
  }
236
- class u extends S {
193
+ class c extends h {
237
194
  /**
238
195
  * @generated from field: string html_content = 1;
239
196
  */
@@ -243,11 +200,11 @@ class u extends S {
243
200
  */
244
201
  headings = [];
245
202
  constructor(e) {
246
- super(), o.util.initPartial(e, this);
203
+ super(), n.util.initPartial(e, this);
247
204
  }
248
- static runtime = o;
205
+ static runtime = n;
249
206
  static typeName = "markdown.v1.ConvertResponse";
250
- static fields = o.util.newFieldList(() => [
207
+ static fields = n.util.newFieldList(() => [
251
208
  {
252
209
  no: 1,
253
210
  name: "html_content",
@@ -255,22 +212,22 @@ class u extends S {
255
212
  T: 9
256
213
  /* ScalarType.STRING */
257
214
  },
258
- { no: 2, name: "headings", kind: "message", T: f, repeated: !0 }
215
+ { no: 2, name: "headings", kind: "message", T: m, repeated: !0 }
259
216
  ]);
260
217
  static fromBinary(e, t) {
261
- return new u().fromBinary(e, t);
218
+ return new c().fromBinary(e, t);
262
219
  }
263
220
  static fromJson(e, t) {
264
- return new u().fromJson(e, t);
221
+ return new c().fromJson(e, t);
265
222
  }
266
223
  static fromJsonString(e, t) {
267
- return new u().fromJsonString(e, t);
224
+ return new c().fromJsonString(e, t);
268
225
  }
269
226
  static equals(e, t) {
270
- return o.util.equals(u, e, t);
227
+ return n.util.equals(c, e, t);
271
228
  }
272
229
  }
273
- class f extends S {
230
+ class m extends h {
274
231
  /**
275
232
  * @generated from field: string text = 1;
276
233
  */
@@ -284,11 +241,11 @@ class f extends S {
284
241
  */
285
242
  id = "";
286
243
  constructor(e) {
287
- super(), o.util.initPartial(e, this);
244
+ super(), n.util.initPartial(e, this);
288
245
  }
289
- static runtime = o;
246
+ static runtime = n;
290
247
  static typeName = "markdown.v1.Heading";
291
- static fields = o.util.newFieldList(() => [
248
+ static fields = n.util.newFieldList(() => [
292
249
  {
293
250
  no: 1,
294
251
  name: "text",
@@ -312,19 +269,19 @@ class f extends S {
312
269
  }
313
270
  ]);
314
271
  static fromBinary(e, t) {
315
- return new f().fromBinary(e, t);
272
+ return new m().fromBinary(e, t);
316
273
  }
317
274
  static fromJson(e, t) {
318
- return new f().fromJson(e, t);
275
+ return new m().fromJson(e, t);
319
276
  }
320
277
  static fromJsonString(e, t) {
321
- return new f().fromJsonString(e, t);
278
+ return new m().fromJsonString(e, t);
322
279
  }
323
280
  static equals(e, t) {
324
- return o.util.equals(f, e, t);
281
+ return n.util.equals(m, e, t);
325
282
  }
326
283
  }
327
- const G = {
284
+ const C = {
328
285
  typeName: "markdown.v1.MarkdownService",
329
286
  methods: {
330
287
  /**
@@ -332,15 +289,15 @@ const G = {
332
289
  */
333
290
  convert: {
334
291
  name: "Convert",
335
- I: d,
336
- O: u,
337
- kind: U.Unary
292
+ I: i,
293
+ O: c,
294
+ kind: q.Unary
338
295
  }
339
296
  }
340
- }, p = process.env.MARKDOWN_SOCKET_PATH || "/tmp/markdown.sock", W = new F("http://localhost", void 0, {
341
- createConnection: () => _.connect(p)
342
- }), N = 64 * 1024, X = 4294967295, v = Math.floor((X - N) / 2);
343
- class Z extends Error {
297
+ }, l = process.env.MARKDOWN_SOCKET_PATH || "/tmp/markdown.sock", D = new H("http://localhost", void 0, {
298
+ createConnection: () => v.connect(l)
299
+ }), x = 64 * 1024, L = 4294967295, g = Math.floor((L - x) / 2);
300
+ class F extends Error {
344
301
  /**
345
302
  * Wraps the service's or the transport's resource-exhausted error.
346
303
  * サービスか転送の resource exhausted のエラーを包む処理。
@@ -351,129 +308,127 @@ class Z extends Error {
351
308
  super(e.rawMessage, { cause: e }), this.name = "MarkdownResourceExhaustedError";
352
309
  }
353
310
  }
354
- const x = () => {
311
+ const M = () => {
355
312
  try {
356
- return M.dirname(L(import.meta.url));
313
+ return f.dirname(R(import.meta.url));
357
314
  } catch {
358
315
  return __dirname;
359
316
  }
360
- }, A = () => `@aiquants/markdown-${process.platform}-${process.arch}`, E = () => process.platform === "win32" ? "bin/markdown-api.exe" : "bin/markdown-api", z = () => {
317
+ }, E = () => `@aiquants/markdown-${process.platform}-${process.arch}`, S = () => process.platform === "win32" ? "bin/markdown-api.exe" : "bin/markdown-api", K = () => {
361
318
  const r = process.env.MARKDOWN_API_BINARY;
362
- if (r && k(r))
319
+ if (r && p(r))
363
320
  return r;
364
321
  try {
365
- const t = H(M.join(x(), "index.js")).resolve(`${A()}/${E()}`);
366
- if (k(t))
322
+ const t = N(f.join(M(), "index.js")).resolve(`${E()}/${S()}`);
323
+ if (p(t))
367
324
  return t;
368
325
  } catch {
369
326
  }
370
- const e = M.join(x(), "..", "..", "go", "markdown-api", "dist", M.basename(E()));
371
- return k(e) ? e : void 0;
372
- }, V = () => [
327
+ const e = f.join(M(), "..", "..", "go", "markdown-api", "dist", f.basename(S()));
328
+ return p(e) ? e : void 0;
329
+ }, U = () => [
373
330
  `markdown-api binary not found for ${process.platform}-${process.arch}.`,
374
- `Expected the optional dependency ${A()} to be installed.`,
331
+ `Expected the optional dependency ${E()} to be installed.`,
375
332
  "If your platform is unsupported, build the service yourself",
376
333
  "(https://github.com/fehde-k/aiquants/tree/main/packages/go/markdown-api)",
377
334
  "and point MARKDOWN_API_BINARY at it."
378
- ].join(" "), R = () => new Promise((r) => {
379
- const e = _.connect(p);
335
+ ].join(" "), B = () => new Promise((r) => {
336
+ const e = v.connect(l);
380
337
  e.on("connect", () => {
381
338
  e.destroy(), r(!0);
382
339
  }), e.on("error", () => r(!1));
383
- }), P = async (r) => {
340
+ }), T = async (r) => {
384
341
  const e = Date.now();
385
342
  for (; Date.now() - e < r; ) {
386
- if (await R()) return !0;
343
+ if (await B()) return !0;
387
344
  await new Promise((t) => setTimeout(t, 100));
388
345
  }
389
346
  return !1;
390
347
  };
391
- let y = null, g = null;
392
- const Q = 2e3, ee = () => {
348
+ let u = null, d = null;
349
+ const Y = 2e3, j = () => {
393
350
  const r = Number(process.env.MARKDOWN_API_STARTUP_TIMEOUT_MS);
394
351
  return Number.isFinite(r) && r > 0 ? r : 1e4;
395
352
  };
396
- let T = null;
397
- const te = async () => {
398
- if (await R()) return !0;
399
- if (g) return g;
400
- g = (async () => {
401
- const e = z();
353
+ let w = null;
354
+ const G = async () => {
355
+ if (await B()) return !0;
356
+ if (d) return d;
357
+ d = (async () => {
358
+ const e = K();
402
359
  if (!e)
403
- return await P(Q) ? !0 : (T = V(), !1);
404
- T = null;
360
+ return await T(Y) ? !0 : (w = U(), !1);
361
+ w = null;
405
362
  try {
406
- k(p) && C(p);
363
+ p(l) && A(l);
407
364
  } catch {
408
365
  }
409
366
  try {
410
- y = $(e, [], { stdio: "ignore" });
367
+ u = _(e, [], { stdio: "ignore" });
411
368
  const t = () => {
412
- if (y) {
369
+ if (u) {
413
370
  try {
414
- y.kill("SIGTERM");
371
+ u.kill("SIGTERM");
415
372
  } catch {
416
373
  }
417
- y = null;
374
+ u = null;
418
375
  }
419
376
  };
420
- return process.once("exit", t), await P(ee()) ? !0 : (console.error("markdown-api Go server did not become ready on socket:", p), t(), process.removeListener("exit", t), !1);
377
+ return process.once("exit", t), await T(j()) ? !0 : (console.error("markdown-api Go server did not become ready on socket:", l), t(), process.removeListener("exit", t), !1);
421
378
  } catch (t) {
422
- return console.error("Failed to spawn markdown-api Go server:", t), y = null, !1;
379
+ return console.error("Failed to spawn markdown-api Go server:", t), u = null, !1;
423
380
  }
424
381
  })();
425
- const r = await g;
426
- return r || (g = null), r;
427
- }, re = (r) => {
382
+ const r = await d;
383
+ return r || (d = null), r;
384
+ }, W = (r) => {
428
385
  if (!Array.isArray(r.deniedPathSegments))
429
386
  throw new TypeError("parseMarkdown: deniedPathSegments must be an array of path segment patterns (an empty array denies nothing)");
430
- if (!Number.isSafeInteger(r.maxHtmlBytes) || r.maxHtmlBytes <= 0 || r.maxHtmlBytes > v)
431
- throw new RangeError(`parseMarkdown: maxHtmlBytes must be an integer from 1 to ${v}, got ${r.maxHtmlBytes}`);
387
+ if (!Number.isSafeInteger(r.maxHtmlBytes) || r.maxHtmlBytes <= 0 || r.maxHtmlBytes > g)
388
+ throw new RangeError(`parseMarkdown: maxHtmlBytes must be an integer from 1 to ${g}, got ${r.maxHtmlBytes}`);
432
389
  if (r.timeoutMs !== void 0 && (!Number.isSafeInteger(r.timeoutMs) || r.timeoutMs <= 0))
433
390
  throw new RangeError(`parseMarkdown: timeoutMs must be a positive integer, got ${r.timeoutMs}`);
434
- }, we = async (r, e, t, c, s) => {
435
- if (re(s), !await te()) {
436
- const n = T ? ` ${T}` : "";
437
- throw new Error(`markdown service is not reachable on ${p}.${n}`);
391
+ }, re = async (r, e, t, k, a) => {
392
+ if (W(a), !await G()) {
393
+ const s = w ? ` ${w}` : "";
394
+ throw new Error(`markdown service is not reachable on ${l}.${s}`);
438
395
  }
439
- const a = {};
440
- c && (a.Authorization = `Bearer ${c}`);
441
- const i = O(G, K({ baseUrl: "http://localhost", httpVersion: "2", sessionManager: W, readMaxBytes: 2 * s.maxHtmlBytes + N }));
396
+ const y = {};
397
+ k && (y.Authorization = `Bearer ${k}`);
398
+ const P = I(C, O({ baseUrl: "http://localhost", httpVersion: "2", sessionManager: D, readMaxBytes: 2 * a.maxHtmlBytes + x }));
442
399
  try {
443
- const n = await i.convert(
400
+ const s = await P.convert(
444
401
  {
445
402
  markdownText: r,
446
403
  filePath: e,
447
404
  workspaceRoot: t,
448
- validateExistence: s.validateExistence ?? !0,
449
- enableSubscript: s.enableSubscript,
450
- enableSuperscript: s.enableSuperscript,
451
- enableMark: s.enableMark,
452
- enableTableMerge: s.enableTableMerge,
453
- enableEmbeds: s.enableEmbeds,
454
- enableZennDirectives: s.enableZennDirectives,
455
- resolveImports: s.resolveImports ?? !1,
456
- maxHtmlBytes: s.maxHtmlBytes,
457
- deny: new l({ segmentPatterns: [...s.deniedPathSegments] })
405
+ validateExistence: a.validateExistence ?? !0,
406
+ enableSubscript: a.enableSubscript,
407
+ enableSuperscript: a.enableSuperscript,
408
+ enableMark: a.enableMark,
409
+ enableTableMerge: a.enableTableMerge,
410
+ enableEmbeds: a.enableEmbeds,
411
+ enableZennDirectives: a.enableZennDirectives,
412
+ resolveImports: a.resolveImports ?? !1,
413
+ maxHtmlBytes: a.maxHtmlBytes,
414
+ deny: new o({ segmentPatterns: [...a.deniedPathSegments] })
458
415
  },
459
- { headers: a, signal: s.signal, timeoutMs: s.timeoutMs }
416
+ { headers: y, signal: a.signal, timeoutMs: a.timeoutMs }
460
417
  );
461
418
  return {
462
- htmlContent: n.htmlContent,
463
- headings: n.headings.map((w) => ({
464
- text: w.text,
465
- depth: w.depth,
466
- id: w.id
419
+ htmlContent: s.htmlContent,
420
+ headings: s.headings.map((b) => ({
421
+ text: b.text,
422
+ depth: b.depth,
423
+ id: b.id
467
424
  }))
468
425
  };
469
- } catch (n) {
470
- throw n instanceof q && n.code === D.ResourceExhausted ? new Z(n) : n;
426
+ } catch (s) {
427
+ throw s instanceof J && s.code === $.ResourceExhausted ? new F(s) : s;
471
428
  }
472
429
  };
473
430
  export {
474
- v as MAX_HTML_BYTES_LIMIT,
475
- Z as MarkdownResourceExhaustedError,
476
- Y as fetchSiteMetadata,
477
- we as parseMarkdown,
478
- pe as remarkBlockLinkMetadata
431
+ g as MAX_HTML_BYTES_LIMIT,
432
+ F as MarkdownResourceExhaustedError,
433
+ re as parseMarkdown
479
434
  };
@@ -1,4 +1,4 @@
1
- import { _ as e, $ as s, as as o, a0 as i } from "./extractHeadings-CGJexznE.js";
1
+ import { _ as e, O as s, ak as o, Q as i } from "./extractHeadings-B2pUyEPa.js";
2
2
  import { p as g } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
3
3
  var p = {
4
4
  parse: /* @__PURE__ */ e(async (r) => {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./extractHeadings-lDHB2sBb.cjs"),s=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var i={parse:e.__name(async r=>{const a=await s.parse("info",r);e.log.debug(a)},"parse")},o={version:"11.16.0"},g=e.__name(()=>o.version,"getVersion"),d={getVersion:g},v=e.__name((r,a,n)=>{e.log.debug(`rendering info diagram
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./extractHeadings-DgefF9l1.cjs"),s=require("./cynefin-VYW2F7L2-MpAliYy9.cjs");var i={parse:e.__name(async r=>{const a=await s.parse("info",r);e.log.debug(a)},"parse")},o={version:"11.16.0"},g=e.__name(()=>o.version,"getVersion"),d={getVersion:g},v=e.__name((r,a,n)=>{e.log.debug(`rendering info diagram
2
2
  `+r);const t=e.selectSvgElement(a);e.configureSvgSize(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),c={draw:v},p={parser:i,db:d,renderer:c};exports.diagram=p;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./extractHeadings-lDHB2sBb.cjs");var J=(function(){var i=e.__name(function(T,t,s,n){for(s=s||{},n=T.length;n--;s[T[n]]=t);return s},"o"),h=[1,4],l=[1,14],r=[1,12],o=[1,13],y=[6,7,8],f=[1,20],d=[1,18],m=[1,19],u=[6,7,11],g=[1,6,13,14],_=[1,23],w=[1,24],x=[1,6,7,11,13,14],D={trace:e.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e.__name(function(t,s,n,c,p,a,v){var k=a.length-1;switch(p){case 6:case 7:return c;case 15:c.addNode(a[k-1].length,a[k].trim());break;case 16:c.addNode(0,a[k].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:l,7:[1,10],9:9,12:11,13:r,14:o},i(y,[2,3]),{1:[2,2]},i(y,[2,4]),i(y,[2,5]),{1:[2,6],6:l,12:15,13:r,14:o},{6:l,9:16,12:11,13:r,14:o},{6:f,7:d,10:17,11:m},i(u,[2,18],{14:[1,21]}),i(u,[2,16]),i(u,[2,17]),{6:f,7:d,10:22,11:m},{1:[2,7],6:l,12:15,13:r,14:o},i(g,[2,14],{7:_,11:w}),i(x,[2,8]),i(x,[2,9]),i(x,[2,10]),i(u,[2,15]),i(g,[2,13],{7:_,11:w}),i(x,[2,11]),i(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e.__name(function(t,s){if(s.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=s,n}},"parseError"),parse:e.__name(function(t){var s=this,n=[0],c=[],p=[null],a=[],v=this.table,k="",I=0,$=0,L=2,A=1,C=a.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(S.yy[P]=this.yy[P]);b.setInput(t,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;a.push(R);var G=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y(B){n.length=n.length-2*B,p.length=p.length-B,a.length=a.length-B}e.__name(Y,"popStack");function tt(){var B;return B=c.pop()||b.lex()||A,typeof B!="number"&&(B instanceof Array&&(c=B,B=c.pop()),B=s.symbols_[B]||B),B}e.__name(tt,"lex");for(var M,W,N,q,j={},U,V,et,Z;;){if(W=n[n.length-1],this.defaultActions[W]?N=this.defaultActions[W]:((M===null||typeof M>"u")&&(M=tt()),N=v[W]&&v[W][M]),typeof N>"u"||!N.length||!N[0]){var K="";Z=[];for(U in v[W])this.terminals_[U]&&U>L&&Z.push("'"+this.terminals_[U]+"'");b.showPosition?K="Parse error on line "+(I+1)+`:
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./extractHeadings-DgefF9l1.cjs");var J=(function(){var i=e.__name(function(T,t,s,n){for(s=s||{},n=T.length;n--;s[T[n]]=t);return s},"o"),h=[1,4],l=[1,14],r=[1,12],o=[1,13],y=[6,7,8],f=[1,20],d=[1,18],m=[1,19],u=[6,7,11],g=[1,6,13,14],_=[1,23],w=[1,24],x=[1,6,7,11,13,14],D={trace:e.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e.__name(function(t,s,n,c,p,a,v){var k=a.length-1;switch(p){case 6:case 7:return c;case 15:c.addNode(a[k-1].length,a[k].trim());break;case 16:c.addNode(0,a[k].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:l,7:[1,10],9:9,12:11,13:r,14:o},i(y,[2,3]),{1:[2,2]},i(y,[2,4]),i(y,[2,5]),{1:[2,6],6:l,12:15,13:r,14:o},{6:l,9:16,12:11,13:r,14:o},{6:f,7:d,10:17,11:m},i(u,[2,18],{14:[1,21]}),i(u,[2,16]),i(u,[2,17]),{6:f,7:d,10:22,11:m},{1:[2,7],6:l,12:15,13:r,14:o},i(g,[2,14],{7:_,11:w}),i(x,[2,8]),i(x,[2,9]),i(x,[2,10]),i(u,[2,15]),i(g,[2,13],{7:_,11:w}),i(x,[2,11]),i(x,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e.__name(function(t,s){if(s.recoverable)this.trace(t);else{var n=new Error(t);throw n.hash=s,n}},"parseError"),parse:e.__name(function(t){var s=this,n=[0],c=[],p=[null],a=[],v=this.table,k="",I=0,$=0,L=2,A=1,C=a.slice.call(arguments,1),b=Object.create(this.lexer),S={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(S.yy[P]=this.yy[P]);b.setInput(t,S.yy),S.yy.lexer=b,S.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var R=b.yylloc;a.push(R);var G=b.options&&b.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y(B){n.length=n.length-2*B,p.length=p.length-B,a.length=a.length-B}e.__name(Y,"popStack");function tt(){var B;return B=c.pop()||b.lex()||A,typeof B!="number"&&(B instanceof Array&&(c=B,B=c.pop()),B=s.symbols_[B]||B),B}e.__name(tt,"lex");for(var M,W,N,q,j={},U,V,et,Z;;){if(W=n[n.length-1],this.defaultActions[W]?N=this.defaultActions[W]:((M===null||typeof M>"u")&&(M=tt()),N=v[W]&&v[W][M]),typeof N>"u"||!N.length||!N[0]){var K="";Z=[];for(U in v[W])this.terminals_[U]&&U>L&&Z.push("'"+this.terminals_[U]+"'");b.showPosition?K="Parse error on line "+(I+1)+`:
2
2
  `+b.showPosition()+`
3
3
  Expecting `+Z.join(", ")+", got '"+(this.terminals_[M]||M)+"'":K="Parse error on line "+(I+1)+": Unexpected "+(M==A?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(K,{text:b.match,token:this.terminals_[M]||M,line:b.yylineno,loc:R,expected:Z})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+M);switch(N[0]){case 1:n.push(M),p.push(b.yytext),a.push(b.yylloc),n.push(N[1]),M=null,$=b.yyleng,k=b.yytext,I=b.yylineno,R=b.yylloc;break;case 2:if(V=this.productions_[N[1]][1],j.$=p[p.length-V],j._$={first_line:a[a.length-(V||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(V||1)].first_column,last_column:a[a.length-1].last_column},G&&(j._$.range=[a[a.length-(V||1)].range[0],a[a.length-1].range[1]]),q=this.performAction.apply(j,[k,$,I,S.yy,N[1],p,a].concat(C)),typeof q<"u")return q;V&&(n=n.slice(0,-1*V*2),p=p.slice(0,-1*V),a=a.slice(0,-1*V)),n.push(this.productions_[N[1]][0]),p.push(j.$),a.push(j._$),et=v[n[n.length-2]][n[n.length-1]],n.push(et);break;case 3:return!0}}return!0},"parse")},O=(function(){var T={EOF:1,parseError:e.__name(function(s,n){if(this.yy.parser)this.yy.parser.parseError(s,n);else throw new Error(s)},"parseError"),setInput:e.__name(function(t,s){return this.yy=s||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:e.__name(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:e.__name(function(t){var s=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;var c=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var p=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===c.length?this.yylloc.first_column:0)+c[c.length-n.length].length-n[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:e.__name(function(){return this._more=!0,this},"more"),reject:e.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e.__name(function(t){this.unput(this.match.slice(t))},"less"),pastInput:e.__name(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e.__name(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e.__name(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+`