@marimo-team/islands 0.24.3-dev9 → 0.25.1-dev1

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 (440) hide show
  1. package/dist/{ConnectedDataExplorerComponent-C9OF_75w.js → ConnectedDataExplorerComponent-KVhjDMSe.js} +1066 -1066
  2. package/dist/ErrorBoundary-pXXIvlr3.js +200 -0
  3. package/dist/{ImageComparisonComponent-2a9TMMm2.js → ImageComparisonComponent-Dlm5aWnH.js} +4 -4
  4. package/dist/{Plot-C-9MQeGP.js → Plot-CTyjbQDT.js} +21032 -20666
  5. package/dist/_baseMerge-BiGRwuqv.js +165 -0
  6. package/dist/{abnfDiagram-N423BO3Z-CQKwzX8t.js → abnfDiagram-VCTEODGH-CpN0FRda.js} +17 -18
  7. package/dist/{any-language-editor-DmQ7dyCx.js → any-language-editor-CycIVIeP.js} +17 -17
  8. package/dist/arc-7ra3iNdN.js +81 -0
  9. package/dist/architecture-7GRP2DOG-BWLylgiA.js +3 -0
  10. package/dist/{architectureDiagram-T3A2C74G-CncrDpfa.js → architectureDiagram-5GKGNRK7-DDyj5SRB.js} +25 -25
  11. package/dist/assets/__vite-browser-external-C9iR87Zl.js +1 -0
  12. package/dist/assets/worker-D7hWi02M.js +109 -0
  13. package/dist/blockDiagram-I7D4REHJ-BbXEXJRu.js +1922 -0
  14. package/dist/{button-CKBkqR9J.js → button-DdXAm8iz.js} +5 -5
  15. package/dist/{c4Diagram-5PPSVZJV-DarUk3Yq.js → c4Diagram-7LVT6UL2-DcLsbQmR.js} +696 -668
  16. package/dist/{capabilities-CMBBJTcc.js → capabilities-B3ce_GNu.js} +1 -1
  17. package/dist/{html-to-image-BtFMe_Nq.js → cells-DYIkSxs6.js} +6757 -10137
  18. package/dist/{channel-CyiYUzJv.js → channel-B5XnTarr.js} +1 -1
  19. package/dist/chat-ui-BXj3uYjy.js +5786 -0
  20. package/dist/{check-CHig47QV.js → check-B7cIK6gb.js} +1 -1
  21. package/dist/{chunk-2Q5K7J3B-BMuJl2jB.js → chunk-2Q5K7J3B-BMkUkeuy.js} +2 -2
  22. package/dist/chunk-4HAMMTFA-D2qv8E0X.js +4188 -0
  23. package/dist/{chunk-5VM5RSS4-Bcq0ftdy.js → chunk-5VM5RSS4-DKsmPCL6.js} +2 -2
  24. package/dist/{chunk-NSK5VX7P-CDTMcJB0.js → chunk-75Z2AOVW-5_HsvXwr.js} +23 -23
  25. package/dist/{chunk-I66GZJ75-BqyTCAPf.js → chunk-DU6HZSFF-BUgAHvnM.js} +21 -4
  26. package/dist/{chunk-2GRJ4B5K-DgO8Qudq.js → chunk-F27PBJKO-DHmYWZXr.js} +4 -4
  27. package/dist/{chunk-KEIR6QF5-C4KX3XYh.js → chunk-FOHPRMQF-BpYR8RqP.js} +4 -4
  28. package/dist/{chunk-WRU74C26-BpWsbiDK.js → chunk-GMAD6QVW-Czynz8aA.js} +486 -258
  29. package/dist/chunk-GVQU2GXP-yQEdulRS.js +37 -0
  30. package/dist/{chunk-5RXB4S5H-tLNUVDdO.js → chunk-IMKFNOWR-BfwTebD0.js} +11 -11
  31. package/dist/{chunk-JWPE2WC7-BJwjGUnF.js → chunk-JWPE2WC7-DJvv1t8U.js} +2 -2
  32. package/dist/chunk-L3NEJ4N5-DwRWnDDK.js +245 -0
  33. package/dist/{chunk-7Z6QIM7H-Dc18hFxH.js → chunk-OSK3NFVY-BBKU_Ign.js} +222 -144
  34. package/dist/{chunk-W5SLKNZC-DLnvpEtV.js → chunk-P2QGCYS3-C0iGU29N.js} +20 -20
  35. package/dist/{chunk-KBJHAD2P-BuqWqkcW.js → chunk-POPQ4Y6H-BCbS3Ozc.js} +4 -4
  36. package/dist/{chunk-4I5QYGJK-DpytHuZQ.js → chunk-PWAF6VOD-CTFCL0jI.js} +4 -4
  37. package/dist/{chunk-JQJVKLGR-CgqCwe8E.js → chunk-SHT3W25Y-BspJEJ5H.js} +109 -63
  38. package/dist/{chunk-6Q2QTUOP-DmTcEBMn.js → chunk-SVP7TREG-DX3rFNTe.js} +5 -5
  39. package/dist/{chunk-GF5L2VYU-B0wgCQgS.js → chunk-TICWLB2K-fVF7Uujg.js} +13 -13
  40. package/dist/{chunk-XXDRQBXY-D73H4IN0.js → chunk-XXDRQBXY-Dnl5VBqG.js} +3 -3
  41. package/dist/{chunk-Y2CYZVJY-DoegUj_e.js → chunk-Y2CYZVJY-DKKS1VyV.js} +1 -1
  42. package/dist/{chunk-5FQGJX7Z-B85XCPv6.js → chunk-YOKDWASO-DrWbKnxA.js} +6925 -5460
  43. package/dist/classDiagram-ZZMXUADV-Fe-V14Sc.js +30 -0
  44. package/dist/classDiagram-v2-VYDZK3BY-xTDg7lOs.js +30 -0
  45. package/dist/code-visibility-BC_yF09p.js +138 -0
  46. package/dist/{common-Cv-4hMa0.js → common-Dv227ygK.js} +8838 -12645
  47. package/dist/{compiler-runtime-CAH9RLw2.js → compiler-runtime-Cj8ZWiNS.js} +2 -2
  48. package/dist/copy-icon-CLdENY__.js +190 -0
  49. package/dist/{cose-bilkent-JH36ORCC-FUWHkXFX.js → cose-bilkent-JH36ORCC-_LyRKVqm.js} +2 -2
  50. package/dist/cubic-OaEBhQPK.js +1404 -0
  51. package/dist/cynefin-OW5HDTMX-obq-i80l.js +3 -0
  52. package/dist/{cynefinDiagram-MW4NZA55-BXSFK93J.js → cynefinDiagram-5FMLGOSQ-CFQrqzSX.js} +10 -10
  53. package/dist/{dagre-CGyalH38.js → dagre-BGSfXNEb.js} +678 -537
  54. package/dist/dagre-GXQ25YYZ-xHNAUTyG.js +425 -0
  55. package/dist/{data-grid-overlay-editor-DZM4BAaI.js → data-grid-overlay-editor-B-I2K7z3.js} +8 -9
  56. package/dist/{data-grid-types-BnZwWG8z.js → data-grid-types-BucVmDDp.js} +1 -1
  57. package/dist/{defaultLocale-DKaU_opG.js → defaultLocale-JI_lnoCe.js} +1 -1
  58. package/dist/{diagram-7IWD3JNH-BjfzDNvj.js → diagram-S7CK7UJ4-Bt1rPbAx.js} +40 -39
  59. package/dist/{diagram-UB23O5K3-DDg-7wLA.js → diagram-UQ7AKVKN-D1sq5FoZ.js} +10 -10
  60. package/dist/{diagram-B4RE2ZJO-CKccR9eE.js → diagram-VSXAHHWV-BKpmG23x.js} +10 -10
  61. package/dist/{diagram-Q27KOJAE-Zhz01ss7.js → diagram-VX7I27RA-BMwGFVD6.js} +21 -21
  62. package/dist/{diagram-LBJQPF4R-CJ-bOruh.js → diagram-Z3DM3KII--KLDR9Pl.js} +10 -10
  63. package/dist/dialog-CgNq6y9-.js +94 -0
  64. package/dist/{dist-dAqZAPcF.js → dist-1HDa70oE.js} +3 -3
  65. package/dist/{dist-Re9sOPOx.js → dist-9x1ZRe-e.js} +2 -2
  66. package/dist/{dist-DEeLqRlU.js → dist-B1vYLK28.js} +1 -1
  67. package/dist/{dist-C5Bn52W4.js → dist-B8D7McG3.js} +3 -3
  68. package/dist/{dist-_XvgytiS.js → dist-BHCHt1NI.js} +1 -1
  69. package/dist/{dist-CRjAdnqF.js → dist-BRxfaJgs.js} +3 -3
  70. package/dist/{dist-Byj2bV8o.js → dist-BVGtK7Ht.js} +1 -1
  71. package/dist/{dist-BIN5LKyE.js → dist-BaHjhkpZ.js} +2 -2
  72. package/dist/{dist-DVFbIwc5.js → dist-BtKIs9N-.js} +1 -1
  73. package/dist/{dist-BrQGcfQ9.js → dist-C2KzV-vf.js} +2 -2
  74. package/dist/{dist-DJFiGP2k.js → dist-C2wDlYdD.js} +2 -2
  75. package/dist/{dist-BVRM2y1P.js → dist-C8xMLVYi.js} +2 -2
  76. package/dist/dist-CMh_W4y4.js +538 -0
  77. package/dist/{extends-BPB6_lTK.js → dist-CO1AwwG_.js} +516 -561
  78. package/dist/{dist-BzN60Z2s.js → dist-CPGxfVGX.js} +1 -1
  79. package/dist/{dist-C7v-9nUK.js → dist-Cm3iAFMD.js} +3 -3
  80. package/dist/{dist-CGAxEiaM.js → dist-Cs2FijYk.js} +2 -2
  81. package/dist/{dist-hXd65f0_.js → dist-D1PpnuZB.js} +1 -1
  82. package/dist/{dist-VdvbxG72.js → dist-DHOTQar0.js} +1 -1
  83. package/dist/{dist-DcgzXCfy.js → dist-DPcEtqmG.js} +2 -2
  84. package/dist/{dist-D4Z_qdP4.js → dist-Df0wKI0F.js} +1 -1
  85. package/dist/{dist-qhLI-SHd.js → dist-DszxuxS1.js} +2 -2
  86. package/dist/{dist-BEmkrGoQ.js → dist-Kxgjxakw.js} +1 -1
  87. package/dist/{dist-BbSMhhD2.js → dist-KzZ7WELx.js} +2 -2
  88. package/dist/{dist-jWUab2d1.js → dist-lA1Cttkb.js} +1 -1
  89. package/dist/dropdown-menu-CZgjYSAh.js +4502 -0
  90. package/dist/{ebnfDiagram-BXEA7PRR-Dm75pCAS.js → ebnfDiagram-PWID7BFC-WnG4cvSQ.js} +17 -18
  91. package/dist/{erDiagram-JOGREHBK-rVDG3VSQ.js → erDiagram-RLTQ6QDP-DhzKiYHc.js} +1037 -798
  92. package/dist/error-banner-B94dcDmP.js +391 -0
  93. package/dist/error-entries-C0NsUqXl.js +56 -0
  94. package/dist/{esm-CR1nhb1c.js → esm-BElI3qKH.js} +22 -22
  95. package/dist/{esm-C1d0g6Bv.js → esm-G4Fhsgng.js} +51 -37
  96. package/dist/{esm-CesmlDrs.js → esm-h8f7-1CJ.js} +423 -423
  97. package/dist/eventmodeling-NTZA5JFV-D7nP7Uyu.js +3 -0
  98. package/dist/feedback-button-D2hUXe09.js +380 -0
  99. package/dist/flowDiagram-HODETNUW-6dMdB8pR.js +16 -0
  100. package/dist/{formats-CslNOKy0.js → formats-BR5iGb4s.js} +8 -8
  101. package/dist/{ganttDiagram-PKOTCBZU-9D-LXF6P.js → ganttDiagram-EL5Y4UJY-DbzEBLbl.js} +15 -15
  102. package/dist/gitGraph-4MIJSDKK-Dy9uQXGh.js +3 -0
  103. package/dist/{gitGraphDiagram-DS77QQ5N-BfpsXTLf.js → gitGraphDiagram-WWUBYQGX-BMf0iKi1.js} +10 -10
  104. package/dist/{glide-data-editor-sPZ8fUFn.js → glide-data-editor-B851uguN.js} +2143 -1910
  105. package/dist/{glide-utils-NShAPPtn.js → glide-utils-B3rUT5PI.js} +15 -15
  106. package/dist/globals-CmijFoIU.js +19 -0
  107. package/dist/highlighted-body-KPVGNVTW-Ad3MKZ18.js +38 -0
  108. package/dist/html-to-image-CeYYvQNb.js +3272 -0
  109. package/dist/info-A6RAGUB7-DKoayiHY.js +3 -0
  110. package/dist/{infoDiagram-6WML65LV-DqCTXHVy.js → infoDiagram-27XIBGKW-BagtCX_5.js} +7 -7
  111. package/dist/{ishikawaDiagram-WSZJBQD7-BCUYmZ1v.js → ishikawaDiagram-5VMMS53U-DByDehYy.js} +8 -8
  112. package/dist/{journeyDiagram-NVQOT4AX-BXB6M4zN.js → journeyDiagram-3NMN7TZE-D2LcKDUO.js} +8 -8
  113. package/dist/{jsx-runtime-CpoKNRgu.js → jsx-runtime-DgDPJV9S.js} +1 -1
  114. package/dist/{kanban-definition-27J2QSJJ-CGRhrDUX.js → kanban-definition-UXKFOSKX-BxwkbBI_.js} +29 -29
  115. package/dist/katex-DFBiSucW.js +21840 -0
  116. package/dist/{label-lwzzBHUW.js → label-BJ49YTvk.js} +6 -6
  117. package/dist/{linear-D5r_1YqD.js → linear-Cnaq3Tfb.js} +4 -4
  118. package/dist/{loader-VZ__bv4g.js → loader-D2W4oM-3.js} +15 -15
  119. package/dist/main.js +8113 -13475
  120. package/dist/mermaid-DPNuhemn.js +3084 -0
  121. package/dist/mermaid-HWGCJPDP-DYCzSILp.js +2 -0
  122. package/dist/mermaid-parser.core-DxuSfYwJ.js +638 -0
  123. package/dist/{mhchem-BjwrxcV-.js → mhchem-DWCF06w9.js} +1 -1
  124. package/dist/{micromark-factory-space-DruVGzeG.js → micromark-factory-space-DGxAzmw8.js} +2 -2
  125. package/dist/{mindmap-definition-FAOFIHXS-C9gRhzZq.js → mindmap-definition-YA3MSWOX-Cgvojw3y.js} +17 -17
  126. package/dist/{node-sql-parser-DesT1xNw.js → node-sql-parser-BiZOJ-FS.js} +0 -3
  127. package/dist/{number-overlay-editor-De2CabLL.js → number-overlay-editor-BtdoxWiD.js} +5 -5
  128. package/dist/objectWithoutPropertiesLoose-BRDcTsfB.js +23 -0
  129. package/dist/packet-AYTQ26CC-Yw7ajchJ.js +3 -0
  130. package/dist/{pegDiagram-VL7TDLO6-Df9IUjMD.js → pegDiagram-XKGWAZYB-DahHhYyN.js} +19 -20
  131. package/dist/{pick-SnHlmIBN.js → pick-CJeoxYOS.js} +1 -1
  132. package/dist/pie-WAS4IAKB-BKdKOAkL.js +3 -0
  133. package/dist/{pieDiagram-7S7Q4E2Y-BmRzQ8ZP.js → pieDiagram-E7YTZNPT-CCtX0oCK.js} +29 -31
  134. package/dist/{process-output-CPy0YKUe.js → process-output-BCTjlyuH.js} +7 -6
  135. package/dist/purify.es-DgKyQviY.js +805 -0
  136. package/dist/{quadrantDiagram-CIZ2JOQS-wFBvWcxS.js → quadrantDiagram-AXDQQJYC-DftINo6g.js} +5 -5
  137. package/dist/radar-RG4KPBEZ-ScR_D_Ts.js +3 -0
  138. package/dist/railroad-74A4TZTK-DQvPSdo5.js +3 -0
  139. package/dist/railroad-abnf-HS5TGJTU-CsJQG2O8.js +3 -0
  140. package/dist/railroad-ebnf-LZEXJU2U-BgEobkSn.js +3 -0
  141. package/dist/railroad-peg-WCYAUIDC-DjLAjofI.js +3 -0
  142. package/dist/{railroadDiagram-AXF67PYL-DxbIatiN.js → railroadDiagram-O6MQD6OU-Du5NsPUb.js} +17 -18
  143. package/dist/{react-dom-C94wmq5w.js → react-dom-BUgJ-ab_.js} +3 -3
  144. package/dist/{react-DMWcHin-.js → react-ofJbxM4x.js} +2 -2
  145. package/dist/{react-vega-DSD5aT7_.js → react-vega-5AcMW8gG.js} +10012 -9369
  146. package/dist/{requirementDiagram-LRYGKXZP-X_x-Y713.js → requirementDiagram-BXWQKSXE-0pmmxL6_.js} +20 -19
  147. package/dist/{reveal-component-CVsYlb9J.js → reveal-component-DQq7NUGJ.js} +1303 -1237
  148. package/dist/{sankeyDiagram-W5VNT64P-BYJALbbm.js → sankeyDiagram-P5KCCOFB-CDKR5TJH.js} +4 -4
  149. package/dist/{select-3qHpFKF9.js → select-C6plhmZr.js} +317 -562
  150. package/dist/{sequenceDiagram-SI44F4Z6-BiPBe3Sv.js → sequenceDiagram-WJ2MYXX4-DB-ChWwU.js} +11 -11
  151. package/dist/{sizeCapture-X5ZJPWSS-BKLDeh5H.js → sizeCapture-INFHLROL-Dx5SpkQF.js} +2 -2
  152. package/dist/{spec-CutWdqo3.js → spec-CAYwFeV6.js} +4 -4
  153. package/dist/{src-C31ngt98.js → src-CA_m4ONl.js} +298 -303
  154. package/dist/{stateDiagram-OKZ733FA-B7QyNBxH.js → stateDiagram-D77RDMKH-orN6AwMx.js} +19 -20
  155. package/dist/stateDiagram-v2-MP3YSRHH-o05_rJN8.js +30 -0
  156. package/dist/style.css +2 -2
  157. package/dist/{swimlanes-SLNWSIFB-B4f8VP3b.js → swimlanes-42K2YHIH-BkSDcqDT.js} +1501 -1591
  158. package/dist/swimlanesDiagram-VR7AAH4N-D_nFQfRc.js +30 -0
  159. package/dist/{swiper-component-C90YjhaV.js → swiper-component-IOUowglM.js} +39 -26
  160. package/dist/{time-aWGfjN8x.js → time-BieKwdYS.js} +42 -42
  161. package/dist/{timeline-definition-Z64GVDOM-Dacq_5lr.js → timeline-definition-24CTP7MA-BuqJUIRZ.js} +7 -7
  162. package/dist/{toDate-CpXBeDq0.js → toDate-WXg1yLcI.js} +7 -7
  163. package/dist/toast-DvY70eFX.js +1834 -0
  164. package/dist/tooltip-qB8NlSqV.js +1742 -0
  165. package/dist/treeView-Q6P3EWNA-DuRV97YF.js +3 -0
  166. package/dist/treemap-WGGIJYW6-AsLq-uwC.js +3 -0
  167. package/dist/use-restore-focus-D5D9xEjZ.js +5946 -0
  168. package/dist/{use-vega-container-remeasure-DUW4tRxq.js → use-vega-container-remeasure-4DwJbPWu.js} +2 -2
  169. package/dist/{useAsyncData-CH6-CgJF.js → useAsyncData-BD6AStMt.js} +3 -3
  170. package/dist/{useDateFormatter-Cp9Jdxls.js → useDateFormatter-BRTPsUK7.js} +8 -8
  171. package/dist/{useDeepCompareMemoize-JC87C_jO.js → useDeepCompareMemoize-D_HNdyvI.js} +2 -2
  172. package/dist/{useIframeCapabilities-De3C-9b4.js → useIframeCapabilities-CVtNkI3Y.js} +2 -2
  173. package/dist/{useLifecycle-B4RGlyf0.js → useLifecycle-DPgiiwwU.js} +6 -6
  174. package/dist/useNumberFormatter-BfDpa21j.js +251 -0
  175. package/dist/useTheme-DzXmYZ5V.js +904 -0
  176. package/dist/{vega-component-ovBXgp91.js → vega-component-D0QXopU8.js} +34 -34
  177. package/dist/{vega-embed-container-TJ5z5dZw.js → vega-embed-container-CbnTccZi.js} +6 -6
  178. package/dist/vega-loader.browser-D95WfUcj.js +1139 -0
  179. package/dist/{vennDiagram-T6HMQDX7-D-Rcq3Iu.js → vennDiagram-4TSXK5OY-CTUlJ2PK.js} +9 -9
  180. package/dist/wardley-WFR3VGLG-Na-tFhQJ.js +3 -0
  181. package/dist/{wardleyDiagram-T6FBY63Y-Z-Og7_Wd.js → wardleyDiagram-VM6X3IG4-3evLUb0M.js} +10 -10
  182. package/dist/{xychartDiagram-ELKLHX3M-BDJ2dITA.js → xychartDiagram-S5SC5T6Z-DL2E3K8-.js} +248 -139
  183. package/package.json +54 -57
  184. package/src/__mocks__/notebook.ts +1 -0
  185. package/src/__mocks__/requests.ts +7 -0
  186. package/src/__tests__/__snapshots__/CellStatus.test.tsx.snap +12 -12
  187. package/src/__tests__/fixtures/pair-preview.ts +19 -0
  188. package/src/__tests__/mount.test.ts +18 -0
  189. package/src/components/app-config/optional-features.tsx +6 -0
  190. package/src/components/chat/acp/__tests__/agent-panel-initialization.test.tsx +394 -0
  191. package/src/components/chat/acp/__tests__/agent-panel.test.tsx +272 -0
  192. package/src/components/chat/acp/__tests__/state.test.ts +2 -2
  193. package/src/components/chat/acp/agent-panel.tsx +115 -74
  194. package/src/components/chat/acp/state.ts +1 -1
  195. package/src/components/data-table/__tests__/filters.test.ts +21 -21
  196. package/src/components/data-table/charts/__tests__/spec.test.ts +5 -10
  197. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +2 -6
  198. package/src/components/data-table/column-summary/chart-spec-model.tsx +1 -1
  199. package/src/components/data-table/columns.tsx +64 -67
  200. package/src/components/editor/RecoveryButton.tsx +1 -0
  201. package/src/components/editor/__tests__/dynamic-favicon.test.tsx +36 -2
  202. package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +115 -0
  203. package/src/components/editor/actions/__tests__/pair-with-agent-modal.test.tsx +218 -0
  204. package/src/components/editor/actions/pair-with-agent-commands.ts +46 -9
  205. package/src/components/editor/actions/pair-with-agent-modal.tsx +49 -23
  206. package/src/components/editor/ai/add-cell-with-ai.tsx +1 -0
  207. package/src/components/editor/ai/ai-completion-editor.tsx +3 -1
  208. package/src/components/editor/alerts/__tests__/connection-notice.test.tsx +186 -0
  209. package/src/components/editor/alerts/__tests__/startup-progress.test.tsx +185 -0
  210. package/src/components/editor/alerts/connecting-alert.tsx +1 -66
  211. package/src/components/editor/alerts/connection-notice.tsx +186 -0
  212. package/src/components/editor/alerts/startup-output.tsx +173 -0
  213. package/src/components/editor/alerts/startup-progress.tsx +204 -0
  214. package/src/components/editor/app-container.tsx +9 -3
  215. package/src/components/editor/boundary/ErrorBoundary.tsx +38 -16
  216. package/src/components/editor/boundary/__tests__/ErrorBoundary.test.tsx +311 -0
  217. package/src/components/editor/cell/__tests__/toolbar.test.tsx +73 -0
  218. package/src/components/editor/cell/code/__tests__/rtc-editor-config.test.ts +50 -0
  219. package/src/components/editor/cell/code/cell-editor.tsx +41 -42
  220. package/src/components/editor/cell/toolbar.tsx +11 -0
  221. package/src/components/editor/chrome/components/__tests__/feedback-button.test.tsx +94 -0
  222. package/src/components/editor/chrome/components/feedback-button.tsx +63 -42
  223. package/src/components/editor/chrome/panels/__tests__/packages-panel.test.tsx +164 -8
  224. package/src/components/editor/chrome/panels/__tests__/sandbox-details.test.tsx +358 -0
  225. package/src/components/editor/chrome/panels/__tests__/sandbox-recovery.test.tsx +168 -0
  226. package/src/components/editor/chrome/panels/packages-panel.tsx +113 -175
  227. package/src/components/editor/chrome/panels/sandbox-controller.tsx +106 -0
  228. package/src/components/editor/chrome/panels/sandbox-details-state.ts +38 -0
  229. package/src/components/editor/chrome/panels/sandbox-panel.tsx +230 -0
  230. package/src/components/editor/chrome/panels/sandbox-toggle.tsx +52 -0
  231. package/src/components/editor/chrome/wrapper/app-chrome.tsx +7 -0
  232. package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +3 -1
  233. package/src/components/editor/code/__tests__/readonly-diff.test.tsx +65 -0
  234. package/src/components/editor/code/readonly-diff.tsx +1 -1
  235. package/src/components/editor/connections/database/__tests__/__snapshots__/as-code.test.ts.snap +98 -98
  236. package/src/components/editor/connections/database/__tests__/as-code.test.ts +11 -5
  237. package/src/components/editor/dynamic-favicon.tsx +17 -10
  238. package/src/components/editor/file-tree/__tests__/file-explorer-navigation.test.tsx +13 -11
  239. package/src/components/editor/file-tree/__tests__/tree-actions.test.tsx +54 -0
  240. package/src/components/editor/file-tree/tree-actions.tsx +11 -14
  241. package/src/components/editor/header/__tests__/status.test.tsx +8 -20
  242. package/src/components/editor/header/filename-input.tsx +2 -0
  243. package/src/components/editor/header/status.tsx +5 -3
  244. package/src/components/editor/navigation/clipboard.ts +1 -0
  245. package/src/components/editor/notebook-cell.tsx +4 -2
  246. package/src/components/editor/output/JsonOutput.tsx +182 -632
  247. package/src/components/editor/output/Outputs.css +49 -17
  248. package/src/components/editor/output/__tests__/JsonOutput-interactions.test.tsx +254 -0
  249. package/src/components/editor/output/__tests__/JsonOutput-mimetype.test.tsx +41 -46
  250. package/src/components/editor/output/__tests__/{json-output.test.ts → json-output-formatting.test.ts} +113 -75
  251. package/src/components/editor/output/__tests__/json-output-pagination.test.ts +252 -0
  252. package/src/components/editor/output/json-output/formatting.ts +167 -0
  253. package/src/components/editor/output/json-output/pagination.ts +155 -0
  254. package/src/components/editor/output/json-output/renderers.tsx +196 -0
  255. package/src/components/editor/output/json-output/themes.ts +52 -0
  256. package/src/components/editor/package-alert.tsx +112 -66
  257. package/src/components/editor/renderers/cell-array.tsx +1 -5
  258. package/src/components/editor/renderers/slides-layout/__tests__/plugin.test.ts +3 -7
  259. package/src/components/slides/slide-form.tsx +1 -0
  260. package/src/components/slides/slide-notes-editor.tsx +1 -0
  261. package/src/components/tracing/tracing-spec.ts +1 -1
  262. package/src/components/ui/__tests__/badge.test.ts +6 -4
  263. package/src/components/ui/use-toast.ts +8 -0
  264. package/src/core/MarimoApp.tsx +0 -2
  265. package/src/core/ai/context/providers/__tests__/error.test.ts +16 -22
  266. package/src/core/alerts/__tests__/environment.test.ts +183 -0
  267. package/src/core/alerts/__tests__/state.test.tsx +240 -0
  268. package/src/core/alerts/environment.ts +57 -0
  269. package/src/core/alerts/state.ts +155 -99
  270. package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +296 -259
  271. package/src/core/cells/__tests__/apply-transaction.test.ts +34 -0
  272. package/src/core/cells/__tests__/cell.test.ts +61 -0
  273. package/src/core/cells/__tests__/cells.test.ts +182 -37
  274. package/src/core/cells/__tests__/document-changes.test.ts +39 -1
  275. package/src/core/cells/__tests__/outputs.test.tsx +117 -0
  276. package/src/core/cells/__tests__/pending-delete-service.test.tsx +4 -3
  277. package/src/core/cells/__tests__/session.test.ts +7 -0
  278. package/src/core/cells/cell.ts +9 -1
  279. package/src/core/cells/cells.ts +13 -18
  280. package/src/core/cells/document-changes.ts +11 -1
  281. package/src/core/cells/outputs.ts +66 -9
  282. package/src/core/cells/pending-delete-service.ts +12 -16
  283. package/src/core/cells/session.ts +2 -0
  284. package/src/core/cells/types.ts +2 -0
  285. package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +8 -16
  286. package/src/core/codemirror/language/__tests__/sql.test.ts +70 -2
  287. package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +4 -8
  288. package/src/core/codemirror/language/languages/sql/sql.ts +16 -1
  289. package/src/core/codemirror/rtc/extension.ts +5 -2
  290. package/src/core/config/pair.ts +19 -0
  291. package/src/core/datasets/__tests__/data-source.test.ts +2 -0
  292. package/src/core/datasets/data-source-connections.ts +15 -10
  293. package/src/core/edit-app.tsx +8 -5
  294. package/src/core/errors/state.ts +1 -2
  295. package/src/core/export/__tests__/hooks.test.ts +1 -6
  296. package/src/core/islands/bootstrap.ts +3 -1
  297. package/src/core/islands/bridge.ts +3 -0
  298. package/src/core/islands/worker-factory.ts +2 -12
  299. package/src/core/kernel/messages.ts +2 -2
  300. package/src/core/network/__tests__/requests-network.test.ts +4 -3
  301. package/src/core/network/connection-notice.ts +117 -0
  302. package/src/core/network/connection.ts +19 -0
  303. package/src/core/network/requests-lazy.ts +3 -0
  304. package/src/core/network/requests-network.ts +12 -0
  305. package/src/core/network/requests-static.ts +3 -0
  306. package/src/core/network/requests-toasting.tsx +3 -0
  307. package/src/core/network/resolve.ts +2 -1
  308. package/src/core/network/types.ts +7 -0
  309. package/src/core/network/useConnectionNotice.ts +53 -0
  310. package/src/core/packages/__tests__/usePackageAction.test.tsx +129 -0
  311. package/src/core/packages/__tests__/useSandboxController.test.tsx +246 -0
  312. package/src/core/packages/package-data.ts +35 -0
  313. package/src/core/packages/sandbox-state.ts +67 -0
  314. package/src/core/packages/toast-components.tsx +11 -0
  315. package/src/core/packages/useInstallPackage.ts +1 -1
  316. package/src/core/packages/usePackageAction.ts +51 -0
  317. package/src/core/packages/usePackageDependencies.ts +22 -0
  318. package/src/core/packages/useSandboxController.ts +208 -0
  319. package/src/core/run-app.tsx +2 -0
  320. package/src/core/static/__tests__/files.test.ts +12 -30
  321. package/src/core/wasm/__tests__/bootstrap.test.ts +63 -0
  322. package/src/core/wasm/__tests__/bridge.test.ts +13 -4
  323. package/src/core/wasm/__tests__/fs.test.ts +22 -0
  324. package/src/core/wasm/__tests__/runtime-config.test.ts +65 -0
  325. package/src/core/wasm/bridge.ts +35 -23
  326. package/src/core/wasm/rpc.ts +2 -0
  327. package/src/core/wasm/runtime-config.ts +31 -0
  328. package/src/core/wasm/worker/bootstrap.ts +21 -11
  329. package/src/core/wasm/worker/constants.ts +1 -0
  330. package/src/core/wasm/worker/fs.ts +4 -0
  331. package/src/core/wasm/worker/getController.ts +3 -1
  332. package/src/core/wasm/worker/save-worker.ts +10 -9
  333. package/src/core/wasm/worker/types.ts +6 -4
  334. package/src/core/wasm/worker/worker.ts +9 -9
  335. package/src/core/websocket/__tests__/useMarimoKernelConnection.hook.test.tsx +404 -3
  336. package/src/core/websocket/__tests__/useMarimoKernelConnection.test.ts +8 -6
  337. package/src/core/websocket/transports/transport.ts +1 -1
  338. package/src/core/websocket/transports/ws.ts +1 -1
  339. package/src/core/websocket/types.ts +11 -1
  340. package/src/core/websocket/useMarimoKernelConnection.tsx +63 -16
  341. package/src/hooks/useDebounce.ts +2 -0
  342. package/src/mount.tsx +3 -0
  343. package/src/plugins/core/BadPlugin.tsx +3 -14
  344. package/src/plugins/core/RenderHTML.tsx +22 -2
  345. package/src/plugins/core/__test__/RenderHTML.test.ts +187 -0
  346. package/src/plugins/core/registerReactComponent.tsx +0 -1
  347. package/src/plugins/impl/FileBrowserPlugin.tsx +10 -4
  348. package/src/plugins/impl/FormPlugin.tsx +2 -0
  349. package/src/plugins/impl/MatrixPlugin.tsx +2 -0
  350. package/src/plugins/impl/RangeSliderPlugin.tsx +2 -0
  351. package/src/plugins/impl/SliderPlugin.tsx +2 -0
  352. package/src/plugins/impl/__tests__/FileBrowserPlugin.test.tsx +50 -1
  353. package/src/plugins/impl/data-editor/__tests__/glide-data-editor.test.tsx +23 -18
  354. package/src/plugins/impl/data-frames/panel.tsx +1 -0
  355. package/src/plugins/impl/image-comparison/ImageComparisonComponent.tsx +1 -1
  356. package/src/plugins/impl/image-comparison/__tests__/ImageComparisonComponent.test.tsx +15 -0
  357. package/src/plugins/impl/vega/__tests__/make-selectable.test.ts +42 -48
  358. package/src/plugins/layout/AccordionPlugin.tsx +7 -2
  359. package/src/plugins/layout/JsonOutputPlugin.tsx +7 -10
  360. package/src/plugins/layout/__test__/AccordionPlugin.test.tsx +66 -0
  361. package/src/stories/sandbox.stories.tsx +488 -0
  362. package/src/utils/__tests__/path.test.ts +6 -5
  363. package/src/utils/__tests__/worker.test.ts +81 -0
  364. package/src/utils/worker.ts +22 -0
  365. package/dist/ErrorBoundary-CR-ZQN_c.js +0 -125
  366. package/dist/_baseMerge-Dv8bBloN.js +0 -73
  367. package/dist/_initCloneObject---vediN2.js +0 -95
  368. package/dist/arc-DOVLrCPd.js +0 -82
  369. package/dist/architecture-TIHT7OUA-MiJpPpQW.js +0 -3
  370. package/dist/array-CApNbSU9.js +0 -6
  371. package/dist/assets/__vite-browser-external-BdKGjRZ4.js +0 -1
  372. package/dist/assets/worker-DlIBfp9S.js +0 -98
  373. package/dist/blockDiagram-VBNYF7ZC-Bc--I65C.js +0 -3158
  374. package/dist/chat-ui-BSwr409J.js +0 -8455
  375. package/dist/chunk-3NCLNEKW-BIp_lB_4.js +0 -14
  376. package/dist/chunk-5FCAYU7R-C_HO9A1J.js +0 -23
  377. package/dist/chunk-5HE753X5-Bixm_MV-.js +0 -38
  378. package/dist/chunk-5JV3BV7I-CH5J3iZY.js +0 -54
  379. package/dist/chunk-5TONJI2A-DG6gDiSS.js +0 -62
  380. package/dist/chunk-7BUUIJ7U-5afmIPeo.js +0 -82
  381. package/dist/chunk-BIQX33UG-7TMBUf89.js +0 -23
  382. package/dist/chunk-CQNSW5MT-Cnqqsxt-.js +0 -38
  383. package/dist/chunk-CYSBUYHQ-BAbymFHR.js +0 -23
  384. package/dist/chunk-EMLP6XTP-Bsz-QL77.js +0 -23
  385. package/dist/chunk-J7OUQ5F2-CM_meqZH.js +0 -57
  386. package/dist/chunk-JG7HCLWE-DUnCDgPk.js +0 -62
  387. package/dist/chunk-MOZMSUNE-BG6IHvzT.js +0 -35
  388. package/dist/chunk-OSBZ3O6U-CYwj_bvR.js +0 -23
  389. package/dist/chunk-QBLGF6JB-B4vJ4j8J.js +0 -23
  390. package/dist/chunk-QR6OTTB3-D4wH2ldi.js +0 -3738
  391. package/dist/chunk-R7FJI6CG-Blf8FcmZ.js +0 -64
  392. package/dist/chunk-RYQCIY6F-BWbIlBIH.js +0 -241
  393. package/dist/chunk-U6XO7XAA-COw445DS.js +0 -63
  394. package/dist/chunk-UBXNYLIW-BHigVU4H.js +0 -32
  395. package/dist/chunk-YOTPTUD7-Dn044Q_d.js +0 -30
  396. package/dist/chunk-ZIRB5QZD-BR4TMfOa.js +0 -1153
  397. package/dist/classDiagram-JCYQIIEL-DmXSLxe_.js +0 -30
  398. package/dist/classDiagram-v2-OCEON4UE-CooqVexA.js +0 -30
  399. package/dist/click-outside-container-D_URcm3D.js +0 -167
  400. package/dist/code-block-37QAKDTI-CQrzBOr-.js +0 -107
  401. package/dist/copy-CD7S58CY.js +0 -141
  402. package/dist/cynefin-VYW2F7L2-CeHAxOEX.js +0 -3
  403. package/dist/dagre-VZM6K2ZE-CJggWPTJ.js +0 -328
  404. package/dist/dist-3_o3T78I.js +0 -1360
  405. package/dist/dist-ABQjhuek.js +0 -64
  406. package/dist/dist-CO5R6VMi.js +0 -538
  407. package/dist/dropdown-menu-DhCfcscX.js +0 -5858
  408. package/dist/emotion-is-prop-valid.esm-M57VsT8j.js +0 -14
  409. package/dist/error-banner-CsXbEEjo.js +0 -611
  410. package/dist/eventmodeling-45OFAUF4-B_lWZ-Pd.js +0 -3
  411. package/dist/flowDiagram-UKHOOZJN-g1AmrZzM.js +0 -17
  412. package/dist/gitGraph-TEB2WS4Q-Dj-eXUph.js +0 -3
  413. package/dist/info-DKCQHKI2-Bhb-pe2e.js +0 -3
  414. package/dist/line-CuKjIQa1.js +0 -34
  415. package/dist/map-BJpOfPlL.js +0 -149
  416. package/dist/math-BXtKgYah.js +0 -10
  417. package/dist/mermaid-4DMBBIKO-Ddp9TgNp.js +0 -2
  418. package/dist/mermaid-Bi23Ibnw.js +0 -1173
  419. package/dist/mermaid-parser.core-Din9FvSi.js +0 -99
  420. package/dist/packet-7NZHBO7P-fbkIIyKE.js +0 -3
  421. package/dist/path-BNHuHZP8.js +0 -87
  422. package/dist/pie-RZYD4A2V-CLRIsxY1.js +0 -3
  423. package/dist/purify.es-CB-YO1Hn.js +0 -774
  424. package/dist/radar-I7S5WNFK-BGzCbgXu.js +0 -3
  425. package/dist/railroad-3IZDKUUU-CvQIIcuU.js +0 -3
  426. package/dist/railroad-abnf-AHOZXSZD-CMwtlNtu.js +0 -3
  427. package/dist/railroad-ebnf-EBAXGLYW-n1QUOAsh.js +0 -3
  428. package/dist/railroad-peg-LSFZ7HO6-PjnrpmCs.js +0 -3
  429. package/dist/schemas-DzK6U94N.js +0 -6057
  430. package/dist/stateDiagram-v2-UEYNNEHI-BTRUs8Il.js +0 -30
  431. package/dist/step-CKczO72Q.js +0 -670
  432. package/dist/swimlanesDiagram-ULZ7WXOC-NBmgBl9G.js +0 -31
  433. package/dist/timer-DpDyj9G0.js +0 -596
  434. package/dist/tooltip-Dt77sBeT.js +0 -390
  435. package/dist/treeView-QDETBFTQ-DU8LwHuf.js +0 -3
  436. package/dist/treemap-6X3UGDF4-DUk4-k_O.js +0 -3
  437. package/dist/useTheme-CVJ0UOf2.js +0 -841
  438. package/dist/vega-loader.browser-DEggZzni.js +0 -1083
  439. package/dist/wardley-OPB4EBWU-Db-AaGas.js +0 -3
  440. package/src/components/editor/output/EmotionCacheProvider.tsx +0 -32
@@ -1,10 +1,105 @@
1
- import { a as e } from "./chunk-NSK5VX7P-CDTMcJB0.js";
2
- import { n as t, t as n } from "./src-C31ngt98.js";
3
- import { n as r } from "./chunk-Y2CYZVJY-DoegUj_e.js";
4
- import { A as i, F as a, b as o, s, z as c } from "./chunk-I66GZJ75-BqyTCAPf.js";
5
- import { n as l, t as u } from "./chunk-4I5QYGJK-DpytHuZQ.js";
6
- //#region ../node_modules/.pnpm/marked@16.4.2/node_modules/marked/lib/marked.esm.js
7
- function d() {
1
+ import { a as e, t } from "./rolldown-runtime-Cb76FRpK.js";
2
+ import { a as n } from "./chunk-75Z2AOVW-5_HsvXwr.js";
3
+ import { n as r, t as i } from "./src-CA_m4ONl.js";
4
+ import { n as a } from "./chunk-Y2CYZVJY-DKKS1VyV.js";
5
+ import { A as o, F as s, b as c, s as l, z as u } from "./chunk-DU6HZSFF-BUgAHvnM.js";
6
+ import { n as d, t as f } from "./chunk-PWAF6VOD-CTFCL0jI.js";
7
+ //#region ../node_modules/.pnpm/fastdom@1.0.12/node_modules/fastdom/fastdom.js
8
+ var p = /* @__PURE__ */ t(((e, t) => {
9
+ (function(e) {
10
+ var n = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.msRequestAnimationFrame || function(e) {
11
+ return setTimeout(e, 16);
12
+ };
13
+ function r() {
14
+ var t = this;
15
+ t.reads = [], t.writes = [], t.raf = n.bind(e);
16
+ }
17
+ r.prototype = {
18
+ constructor: r,
19
+ runTasks: function(e) {
20
+ for (var t; t = e.shift();) t();
21
+ },
22
+ measure: function(e, t) {
23
+ var n = t ? e.bind(t) : e;
24
+ return this.reads.push(n), i(this), n;
25
+ },
26
+ mutate: function(e, t) {
27
+ var n = t ? e.bind(t) : e;
28
+ return this.writes.push(n), i(this), n;
29
+ },
30
+ clear: function(e) {
31
+ return o(this.reads, e) || o(this.writes, e);
32
+ },
33
+ extend: function(e) {
34
+ if (typeof e != "object") throw Error("expected object");
35
+ var t = Object.create(this);
36
+ return s(t, e), t.fastdom = this, t.initialize && t.initialize(), t;
37
+ },
38
+ catch: null
39
+ };
40
+ function i(e) {
41
+ e.scheduled || (e.scheduled = !0, e.raf(a.bind(null, e)));
42
+ }
43
+ function a(e) {
44
+ var t = e.writes, n = e.reads, r;
45
+ try {
46
+ n.length, e.runTasks(n), t.length, e.runTasks(t);
47
+ } catch (e) {
48
+ r = e;
49
+ }
50
+ if (e.scheduled = !1, (n.length || t.length) && i(e), r) {
51
+ if (r.message, e.catch) e.catch(r);
52
+ else throw r;
53
+ }
54
+ }
55
+ function o(e, t) {
56
+ var n = e.indexOf(t);
57
+ return !!~n && !!e.splice(n, 1);
58
+ }
59
+ function s(e, t) {
60
+ for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
61
+ }
62
+ var c = e.fastdom = e.fastdom || new r();
63
+ typeof define == "function" ? define(function() {
64
+ return c;
65
+ }) : typeof t == "object" && (t.exports = c);
66
+ })(typeof window < "u" ? window : e === void 0 ? globalThis : e);
67
+ })), m = /* @__PURE__ */ t(((e, t) => {
68
+ (function() {
69
+ var e = {
70
+ initialize: function() {
71
+ this._tasks = /* @__PURE__ */ new Map();
72
+ },
73
+ mutate: function(e, t) {
74
+ return n(this, "mutate", e, t);
75
+ },
76
+ measure: function(e, t) {
77
+ return n(this, "measure", e, t);
78
+ },
79
+ clear: function(e) {
80
+ var t = this._tasks, n = t.get(e);
81
+ this.fastdom.clear(n), t.delete(e);
82
+ }
83
+ };
84
+ function n(e, t, n, r) {
85
+ var i = e._tasks, a = e.fastdom, o, s = new Promise(function(e, c) {
86
+ o = a[t](function() {
87
+ i.delete(s);
88
+ try {
89
+ e(r ? n.call(r) : n());
90
+ } catch (e) {
91
+ c(e);
92
+ }
93
+ }, r);
94
+ });
95
+ return i.set(s, o), s;
96
+ }
97
+ (typeof define)[0] == "f" ? define(function() {
98
+ return e;
99
+ }) : (typeof t)[0] == "o" ? t.exports = e : window.fastdomPromised = e;
100
+ })();
101
+ })), h = /* @__PURE__ */ e(p(), 1), ee = /* @__PURE__ */ e(m(), 1);
102
+ function g() {
8
103
  return {
9
104
  async: !1,
10
105
  breaks: !1,
@@ -18,28 +113,28 @@ function d() {
18
113
  walkTokens: null
19
114
  };
20
115
  }
21
- var f = d();
22
- function p(e) {
23
- f = e;
116
+ var _ = g();
117
+ function te(e) {
118
+ _ = e;
24
119
  }
25
- var m = { exec: () => null };
26
- function h(e, t = "") {
120
+ var v = { exec: () => null };
121
+ function y(e, t = "") {
27
122
  let n = typeof e == "string" ? e : e.source, r = {
28
123
  replace: (e, t) => {
29
124
  let i = typeof t == "string" ? t : t.source;
30
- return i = i.replace(_.caret, "$1"), n = n.replace(e, i), r;
125
+ return i = i.replace(b.caret, "$1"), n = n.replace(e, i), r;
31
126
  },
32
127
  getRegex: () => new RegExp(n, t)
33
128
  };
34
129
  return r;
35
130
  }
36
- var g = (() => {
131
+ var ne = (() => {
37
132
  try {
38
133
  return !0;
39
134
  } catch {
40
135
  return !1;
41
136
  }
42
- })(), _ = {
137
+ })(), b = {
43
138
  codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
44
139
  outputLinkReplace: /\\([\[\]])/g,
45
140
  indentCodeCompensation: /^(\s+)(?:```)/,
@@ -96,113 +191,113 @@ var g = (() => {
96
191
  fencesBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`),
97
192
  headingBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}#`),
98
193
  htmlBeginRegex: (e) => RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i")
99
- }, ee = /^(?:[ \t]*(?:\n|$))+/, te = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ne = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, v = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, re = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, y = /(?:[*+-]|\d{1,9}[.)])/, ie = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ae = h(ie).replace(/bull/g, y).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(), oe = h(ie).replace(/bull/g, y).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(), b = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, se = /^[^\n]+/, x = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ce = h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", x).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), le = h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, y).getRegex(), S = "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", C = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, ue = h("^ {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", C).replace("tag", S).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), de = h(b).replace("hr", v).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", S).getRegex(), w = {
100
- blockquote: h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", de).getRegex(),
101
- code: te,
102
- def: ce,
103
- fences: ne,
104
- heading: re,
105
- hr: v,
106
- html: ue,
107
- lheading: ae,
108
- list: le,
109
- newline: ee,
110
- paragraph: de,
111
- table: m,
112
- text: se
113
- }, fe = h("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", v).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", S).getRegex(), pe = {
114
- ...w,
115
- lheading: oe,
116
- table: fe,
117
- paragraph: h(b).replace("hr", v).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", fe).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", S).getRegex()
118
- }, me = {
119
- ...w,
120
- html: h("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", C).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(),
194
+ }, re = /^(?:[ \t]*(?:\n|$))+/, ie = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ae = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, x = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, oe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, S = /(?:[*+-]|\d{1,9}[.)])/, se = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ce = y(se).replace(/bull/g, S).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(), le = y(se).replace(/bull/g, S).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(), C = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ue = /^[^\n]+/, w = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, de = y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", w).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), fe = y(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, S).getRegex(), T = "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", E = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, pe = y("^ {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", E).replace("tag", T).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), me = y(C).replace("hr", x).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", T).getRegex(), D = {
195
+ blockquote: y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", me).getRegex(),
196
+ code: ie,
197
+ def: de,
198
+ fences: ae,
199
+ heading: oe,
200
+ hr: x,
201
+ html: pe,
202
+ lheading: ce,
203
+ list: fe,
204
+ newline: re,
205
+ paragraph: me,
206
+ table: v,
207
+ text: ue
208
+ }, he = y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", x).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", T).getRegex(), ge = {
209
+ ...D,
210
+ lheading: le,
211
+ table: he,
212
+ paragraph: y(C).replace("hr", x).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", he).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", T).getRegex()
213
+ }, _e = {
214
+ ...D,
215
+ html: y("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", E).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(),
121
216
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
122
217
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
123
- fences: m,
218
+ fences: v,
124
219
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
125
- paragraph: h(b).replace("hr", v).replace("heading", " *#{1,6} *[^\n]").replace("lheading", ae).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
126
- }, he = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ge = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, _e = /^( {2,}|\\)\n(?!\s*$)/, ve = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, T = /[\p{P}\p{S}]/u, E = /[\s\p{P}\p{S}]/u, ye = /[^\s\p{P}\p{S}]/u, be = h(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, E).getRegex(), xe = /(?!~)[\p{P}\p{S}]/u, Se = /(?!~)[\s\p{P}\p{S}]/u, Ce = /(?:[^\s\p{P}\p{S}]|~)/u, we = h(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", g ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), D = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Te = h(D, "u").replace(/punct/g, T).getRegex(), Ee = h(D, "u").replace(/punct/g, xe).getRegex(), O = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", De = h(O, "gu").replace(/notPunctSpace/g, ye).replace(/punctSpace/g, E).replace(/punct/g, T).getRegex(), Oe = h(O, "gu").replace(/notPunctSpace/g, Ce).replace(/punctSpace/g, Se).replace(/punct/g, xe).getRegex(), ke = h("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ye).replace(/punctSpace/g, E).replace(/punct/g, T).getRegex(), Ae = h(/\\(punct)/, "gu").replace(/punct/g, T).getRegex(), je = h(/^<(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(), Me = h(C).replace("(?:-->|$)", "-->").getRegex(), Ne = h("^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", Me).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), k = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Pe = h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", k).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), A = h(/^!?\[(label)\]\[(ref)\]/).replace("label", k).replace("ref", x).getRegex(), j = h(/^!?\[(ref)\](?:\[\])?/).replace("ref", x).getRegex(), Fe = h("reflink|nolink(?!\\()", "g").replace("reflink", A).replace("nolink", j).getRegex(), Ie = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, M = {
127
- _backpedal: m,
128
- anyPunctuation: Ae,
129
- autolink: je,
130
- blockSkip: we,
131
- br: _e,
132
- code: ge,
133
- del: m,
134
- emStrongLDelim: Te,
135
- emStrongRDelimAst: De,
136
- emStrongRDelimUnd: ke,
137
- escape: he,
138
- link: Pe,
139
- nolink: j,
140
- punctuation: be,
141
- reflink: A,
142
- reflinkSearch: Fe,
143
- tag: Ne,
144
- text: ve,
145
- url: m
146
- }, Le = {
147
- ...M,
148
- link: h(/^!?\[(label)\]\((.*?)\)/).replace("label", k).getRegex(),
149
- reflink: h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", k).getRegex()
150
- }, N = {
151
- ...M,
152
- emStrongRDelimAst: Oe,
153
- emStrongLDelim: Ee,
154
- url: h(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Ie).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
220
+ paragraph: y(C).replace("hr", x).replace("heading", " *#{1,6} *[^\n]").replace("lheading", ce).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
221
+ }, ve = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ye = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, be = /^( {2,}|\\)\n(?!\s*$)/, xe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, O = /[\p{P}\p{S}]/u, k = /[\s\p{P}\p{S}]/u, Se = /[^\s\p{P}\p{S}]/u, Ce = y(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, k).getRegex(), we = /(?!~)[\p{P}\p{S}]/u, Te = /(?!~)[\s\p{P}\p{S}]/u, Ee = /(?:[^\s\p{P}\p{S}]|~)/u, De = y(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ne ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Oe = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, ke = y(Oe, "u").replace(/punct/g, O).getRegex(), Ae = y(Oe, "u").replace(/punct/g, we).getRegex(), je = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Me = y(je, "gu").replace(/notPunctSpace/g, Se).replace(/punctSpace/g, k).replace(/punct/g, O).getRegex(), Ne = y(je, "gu").replace(/notPunctSpace/g, Ee).replace(/punctSpace/g, Te).replace(/punct/g, we).getRegex(), Pe = y("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Se).replace(/punctSpace/g, k).replace(/punct/g, O).getRegex(), Fe = y(/\\(punct)/, "gu").replace(/punct/g, O).getRegex(), Ie = y(/^<(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(), Le = y(E).replace("(?:-->|$)", "-->").getRegex(), Re = y("^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", Le).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), A = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, ze = y(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", A).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Be = y(/^!?\[(label)\]\[(ref)\]/).replace("label", A).replace("ref", w).getRegex(), Ve = y(/^!?\[(ref)\](?:\[\])?/).replace("ref", w).getRegex(), He = y("reflink|nolink(?!\\()", "g").replace("reflink", Be).replace("nolink", Ve).getRegex(), Ue = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, j = {
222
+ _backpedal: v,
223
+ anyPunctuation: Fe,
224
+ autolink: Ie,
225
+ blockSkip: De,
226
+ br: be,
227
+ code: ye,
228
+ del: v,
229
+ emStrongLDelim: ke,
230
+ emStrongRDelimAst: Me,
231
+ emStrongRDelimUnd: Pe,
232
+ escape: ve,
233
+ link: ze,
234
+ nolink: Ve,
235
+ punctuation: Ce,
236
+ reflink: Be,
237
+ reflinkSearch: He,
238
+ tag: Re,
239
+ text: xe,
240
+ url: v
241
+ }, We = {
242
+ ...j,
243
+ link: y(/^!?\[(label)\]\((.*?)\)/).replace("label", A).getRegex(),
244
+ reflink: y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", A).getRegex()
245
+ }, M = {
246
+ ...j,
247
+ emStrongRDelimAst: Ne,
248
+ emStrongLDelim: Ae,
249
+ url: y(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Ue).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
155
250
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
156
251
  del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
157
- text: h(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Ie).getRegex()
158
- }, Re = {
159
- ...N,
160
- br: h(_e).replace("{2,}", "*").getRegex(),
161
- text: h(N.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
252
+ text: y(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Ue).getRegex()
253
+ }, Ge = {
254
+ ...M,
255
+ br: y(be).replace("{2,}", "*").getRegex(),
256
+ text: y(M.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
257
+ }, N = {
258
+ normal: D,
259
+ gfm: ge,
260
+ pedantic: _e
162
261
  }, P = {
163
- normal: w,
164
- gfm: pe,
165
- pedantic: me
166
- }, F = {
167
- normal: M,
168
- gfm: N,
169
- breaks: Re,
170
- pedantic: Le
171
- }, ze = {
262
+ normal: j,
263
+ gfm: M,
264
+ breaks: Ge,
265
+ pedantic: We
266
+ }, Ke = {
172
267
  "&": "&amp;",
173
268
  "<": "&lt;",
174
269
  ">": "&gt;",
175
270
  "\"": "&quot;",
176
271
  "'": "&#39;"
177
- }, Be = (e) => ze[e];
178
- function I(e, t) {
272
+ }, qe = (e) => Ke[e];
273
+ function F(e, t) {
179
274
  if (t) {
180
- if (_.escapeTest.test(e)) return e.replace(_.escapeReplace, Be);
181
- } else if (_.escapeTestNoEncode.test(e)) return e.replace(_.escapeReplaceNoEncode, Be);
275
+ if (b.escapeTest.test(e)) return e.replace(b.escapeReplace, qe);
276
+ } else if (b.escapeTestNoEncode.test(e)) return e.replace(b.escapeReplaceNoEncode, qe);
182
277
  return e;
183
278
  }
184
- function Ve(e) {
279
+ function Je(e) {
185
280
  try {
186
- e = encodeURI(e).replace(_.percentDecode, "%");
281
+ e = encodeURI(e).replace(b.percentDecode, "%");
187
282
  } catch {
188
283
  return null;
189
284
  }
190
285
  return e;
191
286
  }
192
- function He(e, t) {
193
- let n = e.replace(_.findPipe, (e, t, n) => {
287
+ function Ye(e, t) {
288
+ let n = e.replace(b.findPipe, (e, t, n) => {
194
289
  let r = !1, i = t;
195
290
  for (; --i >= 0 && n[i] === "\\";) r = !r;
196
291
  return r ? "|" : " |";
197
- }).split(_.splitPipe), r = 0;
292
+ }).split(b.splitPipe), r = 0;
198
293
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) {
199
294
  if (n.length > t) n.splice(t);
200
295
  else for (; n.length < t;) n.push("");
201
296
  }
202
- for (; r < n.length; r++) n[r] = n[r].trim().replace(_.slashPipe, "|");
297
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(b.slashPipe, "|");
203
298
  return n;
204
299
  }
205
- function L(e, t, n) {
300
+ function I(e, t, n) {
206
301
  let r = e.length;
207
302
  if (r === 0) return "";
208
303
  let i = 0;
@@ -214,7 +309,7 @@ function L(e, t, n) {
214
309
  }
215
310
  return e.slice(0, r - i);
216
311
  }
217
- function Ue(e, t) {
312
+ function Xe(e, t) {
218
313
  if (e.indexOf(t[1]) === -1) return -1;
219
314
  let n = 0;
220
315
  for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
@@ -222,7 +317,7 @@ function Ue(e, t) {
222
317
  else if (e[r] === t[1] && (n--, n < 0)) return r;
223
318
  return n > 0 ? -2 : -1;
224
319
  }
225
- function We(e, t, n, r, i) {
320
+ function Ze(e, t, n, r, i) {
226
321
  let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
227
322
  r.state.inLink = !0;
228
323
  let c = {
@@ -235,7 +330,7 @@ function We(e, t, n, r, i) {
235
330
  };
236
331
  return r.state.inLink = !1, c;
237
332
  }
238
- function Ge(e, t, n) {
333
+ function Qe(e, t, n) {
239
334
  let r = e.match(n.other.indentCodeCompensation);
240
335
  if (r === null) return t;
241
336
  let i = r[1];
@@ -246,12 +341,12 @@ function Ge(e, t, n) {
246
341
  return r.length >= i.length ? e.slice(i.length) : e;
247
342
  }).join("\n");
248
343
  }
249
- var R = class {
344
+ var L = class {
250
345
  options;
251
346
  rules;
252
347
  lexer;
253
348
  constructor(e) {
254
- this.options = e || f;
349
+ this.options = e || _;
255
350
  }
256
351
  space(e) {
257
352
  let t = this.rules.block.newline.exec(e);
@@ -268,14 +363,14 @@ var R = class {
268
363
  type: "code",
269
364
  raw: t[0],
270
365
  codeBlockStyle: "indented",
271
- text: this.options.pedantic ? e : L(e, "\n")
366
+ text: this.options.pedantic ? e : I(e, "\n")
272
367
  };
273
368
  }
274
369
  }
275
370
  fences(e) {
276
371
  let t = this.rules.block.fences.exec(e);
277
372
  if (t) {
278
- let e = t[0], n = Ge(e, t[3] || "", this.rules);
373
+ let e = t[0], n = Qe(e, t[3] || "", this.rules);
279
374
  return {
280
375
  type: "code",
281
376
  raw: e,
@@ -289,7 +384,7 @@ var R = class {
289
384
  if (t) {
290
385
  let e = t[2].trim();
291
386
  if (this.rules.other.endingHash.test(e)) {
292
- let t = L(e, "#");
387
+ let t = I(e, "#");
293
388
  (this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
294
389
  }
295
390
  return {
@@ -305,13 +400,13 @@ var R = class {
305
400
  let t = this.rules.block.hr.exec(e);
306
401
  if (t) return {
307
402
  type: "hr",
308
- raw: L(t[0], "\n")
403
+ raw: I(t[0], "\n")
309
404
  };
310
405
  }
311
406
  blockquote(e) {
312
407
  let t = this.rules.block.blockquote.exec(e);
313
408
  if (t) {
314
- let e = L(t[0], "\n").split("\n"), n = "", r = "", i = [];
409
+ let e = I(t[0], "\n").split("\n"), n = "", r = "", i = [];
315
410
  for (; e.length > 0;) {
316
411
  let t = !1, a = [], o;
317
412
  for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
@@ -426,7 +521,7 @@ ${c}` : c;
426
521
  table(e) {
427
522
  let t = this.rules.block.table.exec(e);
428
523
  if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
429
- let n = He(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 = {
524
+ let n = Ye(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 = {
430
525
  type: "table",
431
526
  raw: t[0],
432
527
  header: [],
@@ -441,7 +536,7 @@ ${c}` : c;
441
536
  header: !0,
442
537
  align: a.align[e]
443
538
  });
444
- for (let e of i) a.rows.push(He(e, a.header.length).map((e, t) => ({
539
+ for (let e of i) a.rows.push(Ye(e, a.header.length).map((e, t) => ({
445
540
  text: e,
446
541
  tokens: this.lexer.inline(e),
447
542
  header: !1,
@@ -506,10 +601,10 @@ ${c}` : c;
506
601
  let e = t[2].trim();
507
602
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
508
603
  if (!this.rules.other.endAngleBracket.test(e)) return;
509
- let t = L(e.slice(0, -1), "\\");
604
+ let t = I(e.slice(0, -1), "\\");
510
605
  if ((e.length - t.length) % 2 == 0) return;
511
606
  } else {
512
- let e = Ue(t[2], "()");
607
+ let e = Xe(t[2], "()");
513
608
  if (e === -2) return;
514
609
  if (e > -1) {
515
610
  let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
@@ -521,7 +616,7 @@ ${c}` : c;
521
616
  let e = this.rules.other.pedanticHrefTitle.exec(n);
522
617
  e && (n = e[1], r = e[3]);
523
618
  } else r = t[3] ? t[3].slice(1, -1) : "";
524
- 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)), We(t, {
619
+ 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)), Ze(t, {
525
620
  href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
526
621
  title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
527
622
  }, t[0], this.lexer, this.rules);
@@ -539,7 +634,7 @@ ${c}` : c;
539
634
  text: e
540
635
  };
541
636
  }
542
- return We(n, e, n[0], this.lexer, this.rules);
637
+ return Ze(n, e, n[0], this.lexer, this.rules);
543
638
  }
544
639
  }
545
640
  emStrong(e, t, n = "") {
@@ -659,29 +754,29 @@ ${c}` : c;
659
754
  };
660
755
  }
661
756
  }
662
- }, z = class e {
757
+ }, R = class e {
663
758
  tokens;
664
759
  options;
665
760
  state;
666
761
  tokenizer;
667
762
  inlineQueue;
668
763
  constructor(e) {
669
- this.tokens = [], this.tokens.links = Object.create(null), this.options = e || f, 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 = {
764
+ this.tokens = [], this.tokens.links = Object.create(null), this.options = e || _, this.options.tokenizer = this.options.tokenizer || new L(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
670
765
  inLink: !1,
671
766
  inRawBlock: !1,
672
767
  top: !0
673
768
  };
674
769
  let t = {
675
- other: _,
676
- block: P.normal,
677
- inline: F.normal
770
+ other: b,
771
+ block: N.normal,
772
+ inline: P.normal
678
773
  };
679
- this.options.pedantic ? (t.block = P.pedantic, t.inline = F.pedantic) : this.options.gfm && (t.block = P.gfm, t.inline = this.options.breaks ? F.breaks : F.gfm), this.tokenizer.rules = t;
774
+ this.options.pedantic ? (t.block = N.pedantic, t.inline = P.pedantic) : this.options.gfm && (t.block = N.gfm, t.inline = this.options.breaks ? P.breaks : P.gfm), this.tokenizer.rules = t;
680
775
  }
681
776
  static get rules() {
682
777
  return {
683
- block: P,
684
- inline: F
778
+ block: N,
779
+ inline: P
685
780
  };
686
781
  }
687
782
  static lex(t, n) {
@@ -691,7 +786,7 @@ ${c}` : c;
691
786
  return new e(n).inlineTokens(t);
692
787
  }
693
788
  lex(e) {
694
- e = e.replace(_.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
789
+ e = e.replace(b.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
695
790
  for (let e = 0; e < this.inlineQueue.length; e++) {
696
791
  let t = this.inlineQueue[e];
697
792
  this.inlineTokens(t.src, t.tokens);
@@ -699,7 +794,7 @@ ${c}` : c;
699
794
  return this.inlineQueue = [], this.tokens;
700
795
  }
701
796
  blockTokens(e, t = [], n = !1) {
702
- for (this.options.pedantic && (e = e.replace(_.tabCharGlobal, " ").replace(_.spaceLine, "")); e;) {
797
+ for (this.options.pedantic && (e = e.replace(b.tabCharGlobal, " ").replace(b.spaceLine, "")); e;) {
703
798
  let r;
704
799
  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;
705
800
  if (r = this.tokenizer.space(e)) {
@@ -871,18 +966,18 @@ ${c}` : c;
871
966
  }
872
967
  return t;
873
968
  }
874
- }, B = class {
969
+ }, z = class {
875
970
  options;
876
971
  parser;
877
972
  constructor(e) {
878
- this.options = e || f;
973
+ this.options = e || _;
879
974
  }
880
975
  space(e) {
881
976
  return "";
882
977
  }
883
978
  code({ text: e, lang: t, escaped: n }) {
884
- let r = (t || "").match(_.notSpaceStart)?.[0], i = e.replace(_.endingNewline, "") + "\n";
885
- 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";
979
+ let r = (t || "").match(b.notSpaceStart)?.[0], i = e.replace(b.endingNewline, "") + "\n";
980
+ return r ? "<pre><code class=\"language-" + F(r) + "\">" + (n ? i : F(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : F(i, !0)) + "</code></pre>\n";
886
981
  }
887
982
  blockquote({ tokens: e }) {
888
983
  return `<blockquote>
@@ -915,7 +1010,7 @@ ${this.parser.parse(e)}</blockquote>
915
1010
  let t = "";
916
1011
  if (e.task) {
917
1012
  let n = this.checkbox({ checked: !!e.checked });
918
- 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({
1013
+ 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 + " " + F(e.tokens[0].tokens[0].text), e.tokens[0].tokens[0].escaped = !0)) : e.tokens.unshift({
919
1014
  type: "text",
920
1015
  raw: n + " ",
921
1016
  text: n + " ",
@@ -962,7 +1057,7 @@ ${e}</tr>
962
1057
  return `<em>${this.parser.parseInline(e)}</em>`;
963
1058
  }
964
1059
  codespan({ text: e }) {
965
- return `<code>${I(e, !0)}</code>`;
1060
+ return `<code>${F(e, !0)}</code>`;
966
1061
  }
967
1062
  br(e) {
968
1063
  return "<br>";
@@ -971,24 +1066,24 @@ ${e}</tr>
971
1066
  return `<del>${this.parser.parseInline(e)}</del>`;
972
1067
  }
973
1068
  link({ href: e, title: t, tokens: n }) {
974
- let r = this.parser.parseInline(n), i = Ve(e);
1069
+ let r = this.parser.parseInline(n), i = Je(e);
975
1070
  if (i === null) return r;
976
1071
  e = i;
977
1072
  let a = "<a href=\"" + e + "\"";
978
- return t && (a += " title=\"" + I(t) + "\""), a += ">" + r + "</a>", a;
1073
+ return t && (a += " title=\"" + F(t) + "\""), a += ">" + r + "</a>", a;
979
1074
  }
980
1075
  image({ href: e, title: t, text: n, tokens: r }) {
981
1076
  r && (n = this.parser.parseInline(r, this.parser.textRenderer));
982
- let i = Ve(e);
983
- if (i === null) return I(n);
1077
+ let i = Je(e);
1078
+ if (i === null) return F(n);
984
1079
  e = i;
985
1080
  let a = `<img src="${e}" alt="${n}"`;
986
- return t && (a += ` title="${I(t)}"`), a += ">", a;
1081
+ return t && (a += ` title="${F(t)}"`), a += ">", a;
987
1082
  }
988
1083
  text(e) {
989
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : I(e.text);
1084
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : F(e.text);
990
1085
  }
991
- }, V = class {
1086
+ }, B = class {
992
1087
  strong({ text: e }) {
993
1088
  return e;
994
1089
  }
@@ -1016,12 +1111,12 @@ ${e}</tr>
1016
1111
  br() {
1017
1112
  return "";
1018
1113
  }
1019
- }, H = class e {
1114
+ }, V = class e {
1020
1115
  options;
1021
1116
  renderer;
1022
1117
  textRenderer;
1023
1118
  constructor(e) {
1024
- this.options = e || f, 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();
1119
+ this.options = e || _, this.options.renderer = this.options.renderer || new z(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new B();
1025
1120
  }
1026
1121
  static parse(t, n) {
1027
1122
  return new e(n).parse(t);
@@ -1172,11 +1267,11 @@ ${e}</tr>
1172
1267
  }
1173
1268
  return n;
1174
1269
  }
1175
- }, U = class {
1270
+ }, H = class {
1176
1271
  options;
1177
1272
  block;
1178
1273
  constructor(e) {
1179
- this.options = e || f;
1274
+ this.options = e || _;
1180
1275
  }
1181
1276
  static passThroughHooks = /* @__PURE__ */ new Set([
1182
1277
  "preprocess",
@@ -1202,22 +1297,22 @@ ${e}</tr>
1202
1297
  return e;
1203
1298
  }
1204
1299
  provideLexer() {
1205
- return this.block ? z.lex : z.lexInline;
1300
+ return this.block ? R.lex : R.lexInline;
1206
1301
  }
1207
1302
  provideParser() {
1208
- return this.block ? H.parse : H.parseInline;
1303
+ return this.block ? V.parse : V.parseInline;
1209
1304
  }
1210
- }, W = new class {
1211
- defaults = d();
1305
+ }, U = new class {
1306
+ defaults = g();
1212
1307
  options = this.setOptions;
1213
1308
  parse = this.parseMarkdown(!0);
1214
1309
  parseInline = this.parseMarkdown(!1);
1215
- Parser = H;
1216
- Renderer = B;
1217
- TextRenderer = V;
1218
- Lexer = z;
1219
- Tokenizer = R;
1220
- Hooks = U;
1310
+ Parser = V;
1311
+ Renderer = z;
1312
+ TextRenderer = B;
1313
+ Lexer = R;
1314
+ Tokenizer = L;
1315
+ Hooks = H;
1221
1316
  constructor(...e) {
1222
1317
  this.use(...e);
1223
1318
  }
@@ -1268,7 +1363,7 @@ ${e}</tr>
1268
1363
  }
1269
1364
  "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
1270
1365
  }), n.extensions = t), e.renderer) {
1271
- let t = this.defaults.renderer || new B(this.defaults);
1366
+ let t = this.defaults.renderer || new z(this.defaults);
1272
1367
  for (let n in e.renderer) {
1273
1368
  if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
1274
1369
  if (["options", "parser"].includes(n)) continue;
@@ -1281,7 +1376,7 @@ ${e}</tr>
1281
1376
  n.renderer = t;
1282
1377
  }
1283
1378
  if (e.tokenizer) {
1284
- let t = this.defaults.tokenizer || new R(this.defaults);
1379
+ let t = this.defaults.tokenizer || new L(this.defaults);
1285
1380
  for (let n in e.tokenizer) {
1286
1381
  if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
1287
1382
  if ([
@@ -1298,13 +1393,13 @@ ${e}</tr>
1298
1393
  n.tokenizer = t;
1299
1394
  }
1300
1395
  if (e.hooks) {
1301
- let t = this.defaults.hooks || new U();
1396
+ let t = this.defaults.hooks || new H();
1302
1397
  for (let n in e.hooks) {
1303
1398
  if (!(n in t)) throw Error(`hook '${n}' does not exist`);
1304
1399
  if (["options", "block"].includes(n)) continue;
1305
1400
  let r = n, i = e.hooks[r], a = t[r];
1306
- t[r] = U.passThroughHooks.has(n) ? (e) => {
1307
- if (this.defaults.async && U.passThroughHooksRespectAsync.has(n)) return (async () => {
1401
+ t[r] = H.passThroughHooks.has(n) ? (e) => {
1402
+ if (this.defaults.async && H.passThroughHooksRespectAsync.has(n)) return (async () => {
1308
1403
  let n = await i.call(t, e);
1309
1404
  return a.call(t, n);
1310
1405
  })();
@@ -1341,10 +1436,10 @@ ${e}</tr>
1341
1436
  }, this;
1342
1437
  }
1343
1438
  lexer(e, t) {
1344
- return z.lex(e, t ?? this.defaults);
1439
+ return R.lex(e, t ?? this.defaults);
1345
1440
  }
1346
1441
  parser(e, t) {
1347
- return H.parse(e, t ?? this.defaults);
1442
+ return V.parse(e, t ?? this.defaults);
1348
1443
  }
1349
1444
  parseMarkdown(e) {
1350
1445
  return (t, n) => {
@@ -1356,16 +1451,16 @@ ${e}</tr>
1356
1451
  if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
1357
1452
  if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
1358
1453
  if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
1359
- 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;
1454
+ let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer() : e ? R.lex : R.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
1360
1455
  i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
1361
- let o = await (i.hooks ? await i.hooks.provideParser() : e ? H.parse : H.parseInline)(a, i);
1456
+ let o = await (i.hooks ? await i.hooks.provideParser() : e ? V.parse : V.parseInline)(a, i);
1362
1457
  return i.hooks ? await i.hooks.postprocess(o) : o;
1363
1458
  })().catch(a);
1364
1459
  try {
1365
1460
  i.hooks && (t = i.hooks.preprocess(t));
1366
- let n = (i.hooks ? i.hooks.provideLexer() : e ? z.lex : z.lexInline)(t, i);
1461
+ let n = (i.hooks ? i.hooks.provideLexer() : e ? R.lex : R.lexInline)(t, i);
1367
1462
  i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
1368
- let r = (i.hooks ? i.hooks.provideParser() : e ? H.parse : H.parseInline)(n, i);
1463
+ let r = (i.hooks ? i.hooks.provideParser() : e ? V.parse : V.parseInline)(n, i);
1369
1464
  return i.hooks && (r = i.hooks.postprocess(r)), r;
1370
1465
  } catch (e) {
1371
1466
  return a(e);
@@ -1375,7 +1470,7 @@ ${e}</tr>
1375
1470
  onError(e, t) {
1376
1471
  return (n) => {
1377
1472
  if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
1378
- let e = "<p>An error occurred:</p><pre>" + I(n.message + "", !0) + "</pre>";
1473
+ let e = "<p>An error occurred:</p><pre>" + F(n.message + "", !0) + "</pre>";
1379
1474
  return t ? Promise.resolve(e) : e;
1380
1475
  }
1381
1476
  if (t) return Promise.reject(n);
@@ -1383,19 +1478,19 @@ ${e}</tr>
1383
1478
  };
1384
1479
  }
1385
1480
  }();
1386
- function G(e, t) {
1387
- return W.parse(e, t);
1481
+ function W(e, t) {
1482
+ return U.parse(e, t);
1388
1483
  }
1389
- G.options = G.setOptions = function(e) {
1390
- return W.setOptions(e), G.defaults = W.defaults, p(G.defaults), G;
1391
- }, G.getDefaults = d, G.defaults = f, G.use = function(...e) {
1392
- return W.use(...e), G.defaults = W.defaults, p(G.defaults), G;
1393
- }, G.walkTokens = function(e, t) {
1394
- return W.walkTokens(e, t);
1395
- }, 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;
1484
+ W.options = W.setOptions = function(e) {
1485
+ return U.setOptions(e), W.defaults = U.defaults, te(W.defaults), W;
1486
+ }, W.getDefaults = g, W.defaults = _, W.use = function(...e) {
1487
+ return U.use(...e), W.defaults = U.defaults, te(W.defaults), W;
1488
+ }, W.walkTokens = function(e, t) {
1489
+ return U.walkTokens(e, t);
1490
+ }, W.parseInline = U.parseInline, W.Parser = V, W.parser = V.parse, W.Renderer = z, W.TextRenderer = B, W.Lexer = R, W.lexer = R.lex, W.Tokenizer = L, W.Hooks = H, W.parse = W, W.options, W.setOptions, W.use, W.walkTokens, W.parseInline, V.parse, R.lex;
1396
1491
  //#endregion
1397
1492
  //#region ../node_modules/.pnpm/ts-dedent@2.3.0/node_modules/ts-dedent/esm/index.js
1398
- function Ke(e) {
1493
+ function $e(e) {
1399
1494
  var t = [...arguments].slice(1), n = Array.from(typeof e == "string" ? [e] : e);
1400
1495
  n[n.length - 1] = n[n.length - 1].replace(/\r?\n([\t ]*)$/, "");
1401
1496
  var r = n.reduce(function(e, t) {
@@ -1421,69 +1516,204 @@ function Ke(e) {
1421
1516
  }), a;
1422
1517
  }
1423
1518
  //#endregion
1424
- //#region ../node_modules/.pnpm/mermaid@11.16.1/node_modules/mermaid/dist/chunks/mermaid.core/chunk-WRU74C26.mjs
1425
- function qe(e, { markdownAutoWrap: t }) {
1426
- return Ke(e.replace(/<br\/>/g, "\n").replace(/\n{2,}/g, "\n"));
1519
+ //#region ../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/chunk-GMAD6QVW.mjs
1520
+ var G = typeof performance < "u" && typeof performance.now == "function", K = /* @__PURE__ */ a(() => G ? performance.now() : 0, "now"), q = "🧜 ", et = "Mermaid render", tt = "Mermaid", nt = {
1521
+ parse: "tertiary",
1522
+ prepare: "secondary",
1523
+ measure: "primary",
1524
+ layout: "primary-dark",
1525
+ layoutCore: "error",
1526
+ draw: "primary-light",
1527
+ paint: "secondary-dark",
1528
+ serialize: "tertiary-dark",
1529
+ render: "primary-light"
1530
+ };
1531
+ (class {
1532
+ constructor() {
1533
+ this.enabled = !1, this.autoPrint = !0, this.records = [], this.maxRecords = 200, this.roots = [], this.stack = [], this.buckets = {};
1534
+ }
1535
+ static {
1536
+ a(this, "Profiler");
1537
+ }
1538
+ enable() {
1539
+ return this.enabled = !0, this;
1540
+ }
1541
+ disable() {
1542
+ return this.enabled = !1, this;
1543
+ }
1544
+ start(e) {
1545
+ this.enabled && (this.roots = [], this.stack = [], this.buckets = {}, this.begin(e));
1546
+ }
1547
+ tickSync(e, t) {
1548
+ if (!this.enabled) return t();
1549
+ let n = K();
1550
+ try {
1551
+ return t();
1552
+ } finally {
1553
+ this.buckets[e] = (this.buckets[e] ?? 0) + (K() - n);
1554
+ }
1555
+ }
1556
+ async tick(e, t) {
1557
+ if (!this.enabled) return t();
1558
+ let n = K();
1559
+ try {
1560
+ return await t();
1561
+ } finally {
1562
+ this.buckets[e] = (this.buckets[e] ?? 0) + (K() - n);
1563
+ }
1564
+ }
1565
+ stop() {
1566
+ if (!this.enabled) return;
1567
+ for (; this.stack.length > 0;) this.end();
1568
+ let e = this.roots.at(-1), t = this.runLabel ?? e?.name;
1569
+ return e && (this.records.push({
1570
+ label: t ?? e.name,
1571
+ tree: e,
1572
+ buckets: { ...this.buckets }
1573
+ }), this.records.length > this.maxRecords && this.records.splice(0, this.records.length - this.maxRecords), this.autoPrint && this.printSummary(e, t)), this.runLabel = void 0, e;
1574
+ }
1575
+ begin(e) {
1576
+ if (!this.enabled) return;
1577
+ let t = {
1578
+ name: e,
1579
+ start: K(),
1580
+ duration: -1,
1581
+ children: []
1582
+ }, n = this.stack.at(-1);
1583
+ if (n ? n.children.push(t) : this.roots.push(t), this.stack.push(t), G && typeof performance.mark == "function") try {
1584
+ performance.mark(`${q}${e} \u25B6`);
1585
+ } catch {}
1586
+ }
1587
+ end() {
1588
+ if (!this.enabled) return;
1589
+ let e = this.stack.pop();
1590
+ if (!e) return;
1591
+ let t = K();
1592
+ if (e.duration = t - e.start, G && typeof performance.measure == "function") try {
1593
+ performance.measure(`${q}${e.name}`, {
1594
+ start: e.start,
1595
+ end: t,
1596
+ detail: { devtools: {
1597
+ dataType: "track-entry",
1598
+ track: et,
1599
+ trackGroup: tt,
1600
+ color: nt[e.name] ?? "primary",
1601
+ tooltipText: `${e.name} \u2014 ${e.duration.toFixed(1)} ms`
1602
+ } }
1603
+ });
1604
+ } catch {}
1605
+ }
1606
+ async span(e, t) {
1607
+ if (!this.enabled) return t();
1608
+ this.begin(e);
1609
+ try {
1610
+ return await t();
1611
+ } finally {
1612
+ this.end();
1613
+ }
1614
+ }
1615
+ report() {
1616
+ return this.records.at(-1)?.tree ?? this.roots.at(-1);
1617
+ }
1618
+ clear() {
1619
+ this.records.length = 0, this.roots = [], this.stack = [], this.runLabel = void 0;
1620
+ }
1621
+ reset() {
1622
+ this.roots = [], this.stack = [];
1623
+ }
1624
+ printSummary(e = this.report(), t) {
1625
+ if (!e) return;
1626
+ let n = e.duration, r = t && t !== e.name ? `${e.name} [${t}]` : e.name, i = ["ms % phase"], o = /* @__PURE__ */ a((e, t) => {
1627
+ let r = " ".repeat(t), a = e.duration.toFixed(1).padStart(8), s = n > 0 ? `${(e.duration / n * 100).toFixed(0).padStart(3)}%` : " -";
1628
+ i.push(`${a} ${s} ${r}${e.name}`);
1629
+ for (let n of e.children) o(n, t + 1);
1630
+ if (e.children.length > 0) {
1631
+ let t = e.children.reduce((e, t) => e + t.duration, 0), n = e.duration - t;
1632
+ if (n > .5) {
1633
+ let e = n.toFixed(1).padStart(8);
1634
+ i.push(`${e} ${r} (self)`);
1635
+ }
1636
+ }
1637
+ }, "walk");
1638
+ o(e, 0);
1639
+ let s = Object.keys(this.buckets);
1640
+ if (s.length > 0) {
1641
+ i.push("—— buckets (summed) ——");
1642
+ for (let e of s) i.push(`${this.buckets[e].toFixed(1).padStart(8)} ${e}`);
1643
+ }
1644
+ console.log(`${q}mermaid render profile \xB7 ${r}
1645
+ ${i.join("\n")}`);
1646
+ }
1647
+ }), globalThis.injected ??= {
1648
+ includeLargeFeatures: !0,
1649
+ profiling: !1,
1650
+ version: "0.0.0"
1651
+ };
1652
+ var rt = h.default.extend({ raf(e) {
1653
+ typeof queueMicrotask == "function" ? queueMicrotask(e) : setTimeout(e, 0);
1654
+ } }).extend(ee.default);
1655
+ function it(e, { markdownAutoWrap: t }) {
1656
+ return $e(e.replace(/<br\/>/g, "\n").replace(/\n{2,}/g, "\n"));
1427
1657
  }
1428
- r(qe, "preprocessMarkdown");
1429
- function Je(e) {
1658
+ a(it, "preprocessMarkdown");
1659
+ function at(e) {
1430
1660
  return e.split(/\\n|\n|<br\s*\/?>/gi).map((e) => e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map((e) => ({
1431
1661
  content: e,
1432
1662
  type: "normal"
1433
1663
  })) ?? []);
1434
1664
  }
1435
- r(Je, "nonMarkdownToLines");
1436
- function Ye(e, t = {}) {
1437
- let n = qe(e, t), i = G.lexer(n), a = [[]], o = 0;
1665
+ a(at, "nonMarkdownToLines");
1666
+ function ot(e, t = {}) {
1667
+ let n = it(e, t), r = W.lexer(n), i = [[]], o = 0;
1438
1668
  function s(e, t = "normal") {
1439
1669
  e.type === "text" ? e.text.split("\n").forEach((e, n) => {
1440
- n !== 0 && (o++, a.push([])), e.split(" ").forEach((e) => {
1441
- e = e.replace(/&#39;/g, "'"), e && a[o].push({
1670
+ n !== 0 && (o++, i.push([])), e.split(" ").forEach((e) => {
1671
+ e = e.replace(/&#39;/g, "'"), e && i[o].push({
1442
1672
  content: e,
1443
1673
  type: t
1444
1674
  });
1445
1675
  });
1446
1676
  }) : e.type === "strong" || e.type === "em" ? e.tokens.forEach((t) => {
1447
1677
  s(t, e.type);
1448
- }) : e.type === "html" && a[o].push({
1678
+ }) : e.type === "html" && i[o].push({
1449
1679
  content: e.text,
1450
1680
  type: "normal"
1451
1681
  });
1452
1682
  }
1453
- return r(s, "processNode"), i.forEach((e) => {
1683
+ return a(s, "processNode"), r.forEach((e) => {
1454
1684
  e.type === "paragraph" ? e.tokens?.forEach((e) => {
1455
1685
  s(e);
1456
- }) : e.type === "html" ? a[o].push({
1686
+ }) : e.type === "html" ? i[o].push({
1457
1687
  content: e.text,
1458
1688
  type: "normal"
1459
- }) : a[o].push({
1689
+ }) : i[o].push({
1460
1690
  content: e.raw,
1461
1691
  type: "normal"
1462
1692
  });
1463
- }), a;
1693
+ }), i;
1464
1694
  }
1465
- r(Ye, "markdownToLines");
1466
- function Xe(e) {
1695
+ a(ot, "markdownToLines");
1696
+ function st(e) {
1467
1697
  return e ? `<p>${e.replace(/\\n|\n/g, "<br />")}</p>` : "";
1468
1698
  }
1469
- r(Xe, "nonMarkdownToHTML");
1470
- function Ze(e, { markdownAutoWrap: n } = {}) {
1471
- let i = G.lexer(e);
1472
- function a(e) {
1473
- return e.type === "text" ? n === !1 ? e.text.replace(/\n */g, "<br/>").replace(/ /g, "&nbsp;") : e.text.replace(/\n */g, "<br/>") : e.type === "strong" ? `<strong>${e.tokens?.map(a).join("")}</strong>` : e.type === "em" ? `<em>${e.tokens?.map(a).join("")}</em>` : e.type === "paragraph" ? `<p>${e.tokens?.map(a).join("")}</p>` : e.type === "space" ? "" : e.type === "html" ? `${e.text}` : e.type === "escape" ? e.text : (t.warn(`Unsupported markdown: ${e.type}`), e.raw);
1699
+ a(st, "nonMarkdownToHTML");
1700
+ function ct(e, { markdownAutoWrap: t } = {}) {
1701
+ let n = W.lexer(e);
1702
+ function i(e) {
1703
+ return e.type === "text" ? t === !1 ? e.text.replace(/\n */g, "<br/>").replace(/ /g, "&nbsp;") : e.text.replace(/\n */g, "<br/>") : e.type === "strong" ? `<strong>${e.tokens?.map(i).join("")}</strong>` : e.type === "em" ? `<em>${e.tokens?.map(i).join("")}</em>` : e.type === "paragraph" ? `<p>${e.tokens?.map(i).join("")}</p>` : e.type === "space" ? "" : e.type === "html" ? `${e.text}` : e.type === "escape" ? e.text : (r.warn(`Unsupported markdown: ${e.type}`), e.raw);
1474
1704
  }
1475
- return r(a, "output"), i.map(a).join("");
1705
+ return a(i, "output"), n.map(i).join("");
1476
1706
  }
1477
- r(Ze, "markdownToHTML");
1478
- function Qe(e) {
1707
+ a(ct, "markdownToHTML");
1708
+ function lt(e) {
1479
1709
  return Intl.Segmenter ? [...new Intl.Segmenter().segment(e)].map((e) => e.segment) : [...e];
1480
1710
  }
1481
- r(Qe, "splitTextToChars");
1482
- function $e(e, t) {
1483
- return K(e, [], Qe(t.content), t.type);
1711
+ a(lt, "splitTextToChars");
1712
+ function ut(e, t) {
1713
+ return J(e, [], lt(t.content), t.type);
1484
1714
  }
1485
- r($e, "splitWordToFitWidth");
1486
- function K(e, t, n, r) {
1715
+ a(ut, "splitWordToFitWidth");
1716
+ function J(e, t, n, r) {
1487
1717
  if (n.length === 0) return [{
1488
1718
  content: t.join(""),
1489
1719
  type: r
@@ -1495,7 +1725,7 @@ function K(e, t, n, r) {
1495
1725
  return e([{
1496
1726
  content: o.join(""),
1497
1727
  type: r
1498
- }]) ? K(e, o, a, r) : (t.length === 0 && i && (t.push(i), n.shift()), [{
1728
+ }]) ? J(e, o, a, r) : (t.length === 0 && i && (t.push(i), n.shift()), [{
1499
1729
  content: t.join(""),
1500
1730
  type: r
1501
1731
  }, {
@@ -1503,13 +1733,13 @@ function K(e, t, n, r) {
1503
1733
  type: r
1504
1734
  }]);
1505
1735
  }
1506
- r(K, "splitWordToFitWidthRecursion");
1507
- function et(e, t) {
1736
+ a(J, "splitWordToFitWidthRecursion");
1737
+ function dt(e, t) {
1508
1738
  if (e.some(({ content: e }) => e.includes("\n"))) throw Error("splitLineToFitWidth does not support newlines in the line");
1509
- return q(e, t);
1739
+ return Y(e, t);
1510
1740
  }
1511
- r(et, "splitLineToFitWidth");
1512
- function q(e, t, n = [], r = []) {
1741
+ a(dt, "splitLineToFitWidth");
1742
+ function Y(e, t, n = [], r = []) {
1513
1743
  if (e.length === 0) return r.length > 0 && n.push(r), n.length > 0 ? n : [];
1514
1744
  let i = "";
1515
1745
  e[0].content === " " && (i = " ", e.shift());
@@ -1520,67 +1750,65 @@ function q(e, t, n = [], r = []) {
1520
1750
  if (i !== "" && o.push({
1521
1751
  content: i,
1522
1752
  type: "normal"
1523
- }), o.push(a), t(o)) return q(e, t, n, o);
1753
+ }), o.push(a), t(o)) return Y(e, t, n, o);
1524
1754
  if (r.length > 0) n.push(r), e.unshift(a);
1525
1755
  else if (a.content) {
1526
- let [r, i] = $e(t, a);
1756
+ let [r, i] = ut(t, a);
1527
1757
  n.push([r]), i.content && e.unshift(i);
1528
1758
  }
1529
- return q(e, t, n);
1759
+ return Y(e, t, n);
1530
1760
  }
1531
- r(q, "splitLineToFitWidthRecursion");
1532
- function J(e, t) {
1761
+ a(Y, "splitLineToFitWidthRecursion");
1762
+ function X(e, t) {
1533
1763
  t && e.attr("style", t);
1534
1764
  }
1535
- r(J, "applyStyle");
1536
- var tt = 16384;
1537
- async function Y(e, t, n, r, l = !1, u = o()) {
1765
+ a(X, "applyStyle");
1766
+ var ft = 16384;
1767
+ async function pt(e, t, n, r, i = !1, a = c()) {
1538
1768
  let d = e.append("foreignObject");
1539
- d.attr("width", `${Math.min(10 * n, tt)}px`), d.attr("height", `${Math.min(10 * n, tt)}px`);
1540
- let f = d.append("xhtml:div"), p = i(t.label) ? await a(t.label.replace(s.lineBreakRegex, "\n"), u) : c(t.label, u), m = t.isNode ? "nodeLabel" : "edgeLabel", h = f.append("span");
1541
- h.html(p), J(h, t.labelStyle), h.attr("class", `${m} ${r}`), J(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");
1542
- let g = f.node().getBoundingClientRect();
1543
- 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();
1769
+ d.attr("width", `${Math.min(10 * n, ft)}px`), d.attr("height", `${Math.min(10 * n, ft)}px`);
1770
+ let f = d.append("xhtml:div"), p = o(t.label) ? await s(t.label.replace(l.lineBreakRegex, "\n"), a) : u(t.label, a), m = t.isNode ? "nodeLabel" : "edgeLabel", h = f.append("span");
1771
+ return h.html(p), X(h, t.labelStyle), h.attr("class", `${m} ${r}`), X(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"), i && f.attr("class", "labelBkg"), (await rt.measure(() => f.node().getBoundingClientRect())).width === n && (f.style("display", "table"), f.style("white-space", "break-spaces"), f.style("width", n + "px")), d.node();
1544
1772
  }
1545
- r(Y, "addHtmlSpan");
1546
- function X(e, t, n, r = !1) {
1773
+ a(pt, "addHtmlSpan");
1774
+ function Z(e, t, n, r = !1) {
1547
1775
  let i = e.append("tspan").attr("class", "text-outer-tspan").attr("x", 0).attr("y", t * n - .1 + "em").attr("dy", n + "em");
1548
1776
  return r && i.attr("text-anchor", "middle"), i;
1549
1777
  }
1550
- r(X, "createTspan");
1551
- function nt(e, t, n) {
1552
- let r = e.append("text"), i = X(r, 1, t);
1553
- Q(i, n);
1778
+ a(Z, "createTspan");
1779
+ function mt(e, t, n) {
1780
+ let r = e.append("text"), i = Z(r, 1, t);
1781
+ $(i, n);
1554
1782
  let a = i.node().getComputedTextLength();
1555
1783
  return r.remove(), a;
1556
1784
  }
1557
- r(nt, "computeWidthOfText");
1558
- function rt(e, t, n) {
1559
- let r = e.append("text"), i = X(r, 1, t);
1560
- Q(i, [{
1785
+ a(mt, "computeWidthOfText");
1786
+ function ht(e, t, n) {
1787
+ let r = e.append("text"), i = Z(r, 1, t);
1788
+ $(i, [{
1561
1789
  content: n,
1562
1790
  type: "normal"
1563
1791
  }]);
1564
1792
  let a = i.node()?.getBoundingClientRect();
1565
1793
  return a && r.remove(), a;
1566
1794
  }
1567
- r(rt, "computeDimensionOfText");
1568
- function it(e, t, n, i = !1, a = !1) {
1795
+ a(ht, "computeDimensionOfText");
1796
+ function gt(e, t, n, r = !1, i = !1) {
1569
1797
  let o = 1.1, s = t.append("g"), c = s.insert("rect").attr("class", "background").attr("style", "stroke: none"), l = s.append("text").attr("y", "-10.1");
1570
- a && l.attr("text-anchor", "middle");
1798
+ i && l.attr("text-anchor", "middle");
1571
1799
  let u = 0;
1572
1800
  for (let t of n) {
1573
- let n = /* @__PURE__ */ r((t) => nt(s, o, t) <= e, "checkWidth"), i = n(t) ? [t] : et(t, n);
1574
- for (let e of i) Q(X(l, u, o, a), e), u++;
1801
+ let n = /* @__PURE__ */ a((t) => mt(s, o, t) <= e, "checkWidth"), r = n(t) ? [t] : dt(t, n);
1802
+ for (let e of r) $(Z(l, u, o, i), e), u++;
1575
1803
  }
1576
- if (i) {
1804
+ if (r) {
1577
1805
  let e = l.node().getBBox();
1578
1806
  return c.attr("x", e.x - 2).attr("y", e.y - 2).attr("width", e.width + 4).attr("height", e.height + 4), s.node();
1579
1807
  }
1580
1808
  return l.node();
1581
1809
  }
1582
- r(it, "createFormattedText");
1583
- function Z(e) {
1810
+ a(gt, "createFormattedText");
1811
+ function Q(e) {
1584
1812
  return e.replace(/&(amp|lt|gt);/g, (e, t) => {
1585
1813
  switch (t) {
1586
1814
  case "amp": return "&";
@@ -1590,47 +1818,47 @@ function Z(e) {
1590
1818
  }
1591
1819
  });
1592
1820
  }
1593
- r(Z, "decodeHTMLEntities");
1594
- function Q(e, t) {
1821
+ a(Q, "decodeHTMLEntities");
1822
+ function $(e, t) {
1595
1823
  e.text(""), t.forEach((t, n) => {
1596
1824
  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");
1597
- n === 0 ? r.text(Z(t.content)) : r.text(" " + Z(t.content));
1825
+ n === 0 ? r.text(Q(t.content)) : r.text(" " + Q(t.content));
1598
1826
  });
1599
1827
  }
1600
- r(Q, "updateTextContentAndStyles");
1601
- async function $(e, t = {}) {
1828
+ a($, "updateTextContentAndStyles");
1829
+ async function _t(e, t = {}) {
1602
1830
  let n = [];
1603
1831
  e.replace(/(fa[bklrs]?):fa-([\w-]+)/g, (e, r, i) => (n.push((async () => {
1604
1832
  let n = `${r}:${i}`;
1605
- return await l(n) ? await u(n, void 0, { class: "label-icon" }) : `<i class='${c(e, t).replace(":", " ")}'></i>`;
1833
+ return await d(n) ? await f(n, void 0, { class: "label-icon" }) : `<i class='${u(e, t).replace(":", " ")}'></i>`;
1606
1834
  })()), e));
1607
1835
  let r = await Promise.all(n);
1608
1836
  return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g, () => r.shift() ?? "");
1609
1837
  }
1610
- r($, "replaceIconSubstring");
1611
- var at = /* @__PURE__ */ r(async (r, a = "", { style: o = "", isTitle: s = !1, classes: c = "", useHtmlLabels: l = !0, markdown: u = !0, isNode: d = !0, width: f = 200, addSvgBackground: p = !1 } = {}, m) => {
1612
- if (t.debug("XYZ createText", a, o, s, c, l, d, "addSvgBackground: ", p), l) {
1613
- let t = u ? Ze(a, m) : Xe(a), n = await $(e(t), m), s = a.replace(/\\\\/g, "\\");
1614
- return await Y(r, {
1838
+ a(_t, "replaceIconSubstring");
1839
+ var vt = /* @__PURE__ */ a(async (e, t = "", { style: a = "", isTitle: s = !1, classes: c = "", useHtmlLabels: l = !0, markdown: u = !0, isNode: d = !0, width: f = 200, addSvgBackground: p = !1 } = {}, m) => {
1840
+ if (r.debug("XYZ createText", t, a, s, c, l, d, "addSvgBackground: ", p), l) {
1841
+ let r = u ? ct(t, m) : st(t), i = await _t(n(r), m), s = t.replace(/\\\\/g, "\\");
1842
+ return await pt(e, {
1615
1843
  isNode: d,
1616
- label: i(a) ? s : n,
1617
- labelStyle: o.replace("fill:", "color:")
1844
+ label: o(t) ? s : i,
1845
+ labelStyle: a.replace("fill:", "color:")
1618
1846
  }, f, c, p, m);
1619
1847
  }
1620
1848
  {
1621
- let t = e(a.replace(/<br\s*\/?>/g, "<br/>")), i = it(f, r, u ? Ye(t.replace("<br>", "<br/>"), m) : Je(t), a ? p : !1, !d);
1849
+ let r = n(t.replace(/<br\s*\/?>/g, "<br/>")), o = gt(f, e, u ? ot(r.replace("<br>", "<br/>"), m) : at(r), t ? p : !1, !d);
1622
1850
  if (d) {
1623
- /stroke:/.exec(o) && (o = o.replace("stroke:", "lineColor:"));
1624
- let e = o.replace(/stroke:[^;]+;?/g, "").replace(/stroke-width:[^;]+;?/g, "").replace(/fill:[^;]+;?/g, "").replace(/color:/g, "fill:");
1625
- n(i).attr("style", e);
1851
+ /stroke:/.exec(a) && (a = a.replace("stroke:", "lineColor:"));
1852
+ let e = a.replace(/stroke:[^;]+;?/g, "").replace(/stroke-width:[^;]+;?/g, "").replace(/fill:[^;]+;?/g, "").replace(/color:/g, "fill:");
1853
+ i(o).attr("style", e);
1626
1854
  } else {
1627
- let e = o.replace(/stroke:[^;]+;?/g, "").replace(/stroke-width:[^;]+;?/g, "").replace(/fill:[^;]+;?/g, "").replace(/background:/g, "fill:");
1628
- n(i).select("rect").attr("style", e.replace(/background:/g, "fill:"));
1629
- let t = o.replace(/stroke:[^;]+;?/g, "").replace(/stroke-width:[^;]+;?/g, "").replace(/fill:[^;]+;?/g, "").replace(/color:/g, "fill:");
1630
- n(i).select("text").attr("style", t);
1855
+ let e = a.replace(/stroke:[^;]+;?/g, "").replace(/stroke-width:[^;]+;?/g, "").replace(/fill:[^;]+;?/g, "").replace(/background:/g, "fill:");
1856
+ i(o).select("rect").attr("style", e.replace(/background:/g, "fill:"));
1857
+ let t = a.replace(/stroke:[^;]+;?/g, "").replace(/stroke-width:[^;]+;?/g, "").replace(/fill:[^;]+;?/g, "").replace(/color:/g, "fill:");
1858
+ i(o).select("text").attr("style", t);
1631
1859
  }
1632
- return s ? n(i).selectAll("tspan.text-outer-tspan").classed("title-row", !0) : n(i).selectAll("tspan.text-outer-tspan").classed("row", !0), i;
1860
+ return s ? i(o).selectAll("tspan.text-outer-tspan").classed("title-row", !0) : i(o).selectAll("tspan.text-outer-tspan").classed("row", !0), o;
1633
1861
  }
1634
1862
  }, "createText");
1635
1863
  //#endregion
1636
- export { at as n, Ke as r, rt as t };
1864
+ export { $e as i, vt as n, rt as r, ht as t };