drizzle-cube 0.5.6 → 0.5.7

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 (225) hide show
  1. package/dist/{server/dist-DxegvyZF.cjs → adapters/dist-BOdf-GQO.cjs} +1 -1
  2. package/dist/adapters/express/index.cjs +1 -1
  3. package/dist/adapters/express/index.js +4 -4
  4. package/dist/adapters/fastify/index.cjs +2 -2
  5. package/dist/adapters/fastify/index.js +4 -4
  6. package/dist/adapters/{google-CT4kgmBf.js → google-CFYljAOF.js} +1 -1
  7. package/dist/adapters/{google-Dgo9-Kb5.cjs → google-DUlXeeDA.cjs} +1 -1
  8. package/dist/adapters/{handler-C0nUppAK.cjs → handler-C63rJUUK.cjs} +2 -2
  9. package/dist/adapters/{handler-Odsi9_Rd.js → handler-Dz1F4iwf.js} +4 -4
  10. package/dist/adapters/hono/index.cjs +1 -1
  11. package/dist/adapters/hono/index.js +4 -4
  12. package/dist/adapters/{locale-Dv6bl_eU.cjs → locale-CTNwPVZI.cjs} +6 -6
  13. package/dist/adapters/{locale-Dy3LcTwN.js → locale-gU_d1Wja.js} +16 -1
  14. package/dist/adapters/mcp-tools.cjs +1 -1
  15. package/dist/adapters/mcp-tools.js +2 -2
  16. package/dist/adapters/mcp-transport-C4J4SAcn.cjs +40 -0
  17. package/dist/adapters/mcp-transport-CVUiifEc.js +579 -0
  18. package/dist/adapters/nextjs/index.cjs +1 -1
  19. package/dist/adapters/nextjs/index.js +4 -4
  20. package/dist/adapters/{openai-BjLV_Wjx.cjs → openai-6wrBvAnv.cjs} +1 -1
  21. package/dist/adapters/openai-BDwb2u7y.cjs +17 -0
  22. package/dist/{server/openai-CLWSwD-D.js → adapters/openai-DiVskd89.js} +1 -1
  23. package/dist/{server/openai-zpXlGbbF.js → adapters/openai-y7GhJNdn.js} +2062 -928
  24. package/dist/adapters/{utils-DklqMBHn.cjs → utils-CkEkU8Bo.cjs} +2 -2
  25. package/dist/adapters/{utils-Bd5mzZfk.js → utils-DosuoabY.js} +8 -6
  26. package/dist/adapters/utils.cjs +1 -1
  27. package/dist/adapters/utils.js +1 -1
  28. package/dist/client/charts.js +13 -13
  29. package/dist/client/chunks/{DashboardEditModal-BiJwVv0b.js → DashboardEditModal-6KRE36mm.js} +6231 -3453
  30. package/dist/client/chunks/DashboardEditModal-6KRE36mm.js.map +1 -0
  31. package/dist/client/chunks/{RetentionCombinedChart-CivIny9P.js → RetentionCombinedChart-CCpu0C-s.js} +4 -4
  32. package/dist/client/chunks/{RetentionCombinedChart-CivIny9P.js.map → RetentionCombinedChart-CCpu0C-s.js.map} +1 -1
  33. package/dist/client/chunks/{RetentionHeatmap-BHCgwZmB.js → RetentionHeatmap-B24PiIfr.js} +3 -3
  34. package/dist/client/chunks/{RetentionHeatmap-BHCgwZmB.js.map → RetentionHeatmap-B24PiIfr.js.map} +1 -1
  35. package/dist/client/chunks/{af-ZA-BdL6DOWy.js → af-ZA-BTaChuqI.js} +1 -1
  36. package/dist/client/chunks/{af-ZA-BdL6DOWy.js.map → af-ZA-BTaChuqI.js.map} +1 -1
  37. package/dist/client/chunks/{analysis-builder-shared-DmyRh2O3.js → analysis-builder-shared-x576-O5p.js} +289 -289
  38. package/dist/client/chunks/{analysis-builder-shared-DmyRh2O3.js.map → analysis-builder-shared-x576-O5p.js.map} +1 -1
  39. package/dist/client/chunks/{analysis-builder-MoGvbMRe.js → analysis-builder-zd48FVJO.js} +244 -244
  40. package/dist/client/chunks/{analysis-builder-MoGvbMRe.js.map → analysis-builder-zd48FVJO.js.map} +1 -1
  41. package/dist/client/chunks/{chart-activity-grid-Bdb8U_NC.js → chart-activity-grid-CiHrLH6Y.js} +6 -6
  42. package/dist/client/chunks/{chart-activity-grid-Bdb8U_NC.js.map → chart-activity-grid-CiHrLH6Y.js.map} +1 -1
  43. package/dist/client/chunks/{chart-area-BZEnT-tf.js → chart-area-CXFK-Grv.js} +3 -3
  44. package/dist/client/chunks/{chart-area-BZEnT-tf.js.map → chart-area-CXFK-Grv.js.map} +1 -1
  45. package/dist/client/chunks/{chart-bar-CTmdv_v0.js → chart-bar-DKXfLoGG.js} +4 -4
  46. package/dist/client/chunks/{chart-bar-CTmdv_v0.js.map → chart-bar-DKXfLoGG.js.map} +1 -1
  47. package/dist/client/chunks/{chart-box-plot-CYObdFtp.js → chart-box-plot-Bu9hy-17.js} +3 -3
  48. package/dist/client/chunks/{chart-box-plot-CYObdFtp.js.map → chart-box-plot-Bu9hy-17.js.map} +1 -1
  49. package/dist/client/chunks/{chart-bubble-CjFprySz.js → chart-bubble-DGkTQlxM.js} +3 -3
  50. package/dist/client/chunks/{chart-bubble-CjFprySz.js.map → chart-bubble-DGkTQlxM.js.map} +1 -1
  51. package/dist/client/chunks/{chart-candlestick-D2HoM3B5.js → chart-candlestick-Dau5AF4E.js} +3 -3
  52. package/dist/client/chunks/{chart-candlestick-D2HoM3B5.js.map → chart-candlestick-Dau5AF4E.js.map} +1 -1
  53. package/dist/client/chunks/{chart-config-activity-grid-Bom99j9m.js → chart-config-activity-grid-D_UX4NHC.js} +2 -2
  54. package/dist/client/chunks/{chart-config-activity-grid-Bom99j9m.js.map → chart-config-activity-grid-D_UX4NHC.js.map} +1 -1
  55. package/dist/client/chunks/{chart-config-area-DtYTKZxS.js → chart-config-area-Bq_UsW3x.js} +2 -2
  56. package/dist/client/chunks/{chart-config-area-DtYTKZxS.js.map → chart-config-area-Bq_UsW3x.js.map} +1 -1
  57. package/dist/client/chunks/{chart-config-bar-7v5JVY2y.js → chart-config-bar-_JEGZnAu.js} +2 -2
  58. package/dist/client/chunks/{chart-config-bar-7v5JVY2y.js.map → chart-config-bar-_JEGZnAu.js.map} +1 -1
  59. package/dist/client/chunks/{chart-config-box-plot-BHGv-wqu.js → chart-config-box-plot-DJ-dWWXA.js} +2 -2
  60. package/dist/client/chunks/{chart-config-box-plot-BHGv-wqu.js.map → chart-config-box-plot-DJ-dWWXA.js.map} +1 -1
  61. package/dist/client/chunks/{chart-config-bubble-BkHm-mfu.js → chart-config-bubble-gIoqVyjZ.js} +2 -2
  62. package/dist/client/chunks/{chart-config-bubble-BkHm-mfu.js.map → chart-config-bubble-gIoqVyjZ.js.map} +1 -1
  63. package/dist/client/chunks/{chart-config-candlestick-D1aaHvTe.js → chart-config-candlestick-N6DchAA3.js} +2 -2
  64. package/dist/client/chunks/{chart-config-candlestick-D1aaHvTe.js.map → chart-config-candlestick-N6DchAA3.js.map} +1 -1
  65. package/dist/client/chunks/{chart-config-data-table-B_Hw8w2J.js → chart-config-data-table-d7VBY-y_.js} +2 -2
  66. package/dist/client/chunks/{chart-config-data-table-B_Hw8w2J.js.map → chart-config-data-table-d7VBY-y_.js.map} +1 -1
  67. package/dist/client/chunks/{chart-config-funnel-DL8PSGuL.js → chart-config-funnel-DEYMcxsD.js} +2 -2
  68. package/dist/client/chunks/{chart-config-funnel-DL8PSGuL.js.map → chart-config-funnel-DEYMcxsD.js.map} +1 -1
  69. package/dist/client/chunks/{chart-config-gauge-BVLxuA3f.js → chart-config-gauge-DSwC04l0.js} +2 -2
  70. package/dist/client/chunks/{chart-config-gauge-BVLxuA3f.js.map → chart-config-gauge-DSwC04l0.js.map} +1 -1
  71. package/dist/client/chunks/{chart-config-heat-map-CjudGdui.js → chart-config-heat-map-CfRnRNcw.js} +2 -2
  72. package/dist/client/chunks/{chart-config-heat-map-CjudGdui.js.map → chart-config-heat-map-CfRnRNcw.js.map} +1 -1
  73. package/dist/client/chunks/{chart-config-kpi-delta-Bf47hGqD.js → chart-config-kpi-delta-D6BIkHL3.js} +2 -2
  74. package/dist/client/chunks/{chart-config-kpi-delta-Bf47hGqD.js.map → chart-config-kpi-delta-D6BIkHL3.js.map} +1 -1
  75. package/dist/client/chunks/{chart-config-kpi-number-QTQRNgOi.js → chart-config-kpi-number-Bx-V9a62.js} +2 -2
  76. package/dist/client/chunks/{chart-config-kpi-number-QTQRNgOi.js.map → chart-config-kpi-number-Bx-V9a62.js.map} +1 -1
  77. package/dist/client/chunks/{chart-config-kpi-text-BRze2eyh.js → chart-config-kpi-text-CcqC1u-8.js} +2 -2
  78. package/dist/client/chunks/{chart-config-kpi-text-BRze2eyh.js.map → chart-config-kpi-text-CcqC1u-8.js.map} +1 -1
  79. package/dist/client/chunks/{chart-config-line-BFeCqmKH.js → chart-config-line-Db3jDsWc.js} +2 -2
  80. package/dist/client/chunks/{chart-config-line-BFeCqmKH.js.map → chart-config-line-Db3jDsWc.js.map} +1 -1
  81. package/dist/client/chunks/{chart-config-markdown-EWYckwXv.js → chart-config-markdown-BtRIe8JN.js} +2 -2
  82. package/dist/client/chunks/{chart-config-markdown-EWYckwXv.js.map → chart-config-markdown-BtRIe8JN.js.map} +1 -1
  83. package/dist/client/chunks/{chart-config-measure-profile-B9nIhqKR.js → chart-config-measure-profile-DxRGa-zf.js} +2 -2
  84. package/dist/client/chunks/{chart-config-measure-profile-B9nIhqKR.js.map → chart-config-measure-profile-DxRGa-zf.js.map} +1 -1
  85. package/dist/client/chunks/{chart-config-pie-6LHtEyMM.js → chart-config-pie-DD4SmRTF.js} +2 -2
  86. package/dist/client/chunks/{chart-config-pie-6LHtEyMM.js.map → chart-config-pie-DD4SmRTF.js.map} +1 -1
  87. package/dist/client/chunks/{chart-config-radar-BuLS6Inn.js → chart-config-radar-CC2XAaGr.js} +2 -2
  88. package/dist/client/chunks/{chart-config-radar-BuLS6Inn.js.map → chart-config-radar-CC2XAaGr.js.map} +1 -1
  89. package/dist/client/chunks/{chart-config-radial-bar-BP0eMohx.js → chart-config-radial-bar-DmxKx1R0.js} +2 -2
  90. package/dist/client/chunks/{chart-config-radial-bar-BP0eMohx.js.map → chart-config-radial-bar-DmxKx1R0.js.map} +1 -1
  91. package/dist/client/chunks/{chart-config-sankey-CT8oGIGP.js → chart-config-sankey-BTnWA7EW.js} +2 -2
  92. package/dist/client/chunks/{chart-config-sankey-CT8oGIGP.js.map → chart-config-sankey-BTnWA7EW.js.map} +1 -1
  93. package/dist/client/chunks/{chart-config-scatter-DOSpN07Z.js → chart-config-scatter-DSYTjwRb.js} +2 -2
  94. package/dist/client/chunks/{chart-config-scatter-DOSpN07Z.js.map → chart-config-scatter-DSYTjwRb.js.map} +1 -1
  95. package/dist/client/chunks/{chart-config-sunburst-BSUX_YoB.js → chart-config-sunburst-Bwjtdf7X.js} +2 -2
  96. package/dist/client/chunks/{chart-config-sunburst-BSUX_YoB.js.map → chart-config-sunburst-Bwjtdf7X.js.map} +1 -1
  97. package/dist/client/chunks/{chart-config-tree-map-D8GuAgVB.js → chart-config-tree-map-BI-oQStO.js} +2 -2
  98. package/dist/client/chunks/{chart-config-tree-map-D8GuAgVB.js.map → chart-config-tree-map-BI-oQStO.js.map} +1 -1
  99. package/dist/client/chunks/{chart-config-waterfall-BDi7BoJP.js → chart-config-waterfall-DSnyixbI.js} +2 -2
  100. package/dist/client/chunks/{chart-config-waterfall-BDi7BoJP.js.map → chart-config-waterfall-DSnyixbI.js.map} +1 -1
  101. package/dist/client/chunks/{chart-data-table-DT4uBZaq.js → chart-data-table-Cm5jrpaw.js} +842 -834
  102. package/dist/client/chunks/chart-data-table-Cm5jrpaw.js.map +1 -0
  103. package/dist/client/chunks/{chart-funnel-B9crR3b3.js → chart-funnel-Eke8IPtG.js} +3 -3
  104. package/dist/client/chunks/{chart-funnel-B9crR3b3.js.map → chart-funnel-Eke8IPtG.js.map} +1 -1
  105. package/dist/client/chunks/{chart-gauge-DAMFsicz.js → chart-gauge-DeRZNsyl.js} +3 -3
  106. package/dist/client/chunks/{chart-gauge-DAMFsicz.js.map → chart-gauge-DeRZNsyl.js.map} +1 -1
  107. package/dist/client/chunks/{chart-heat-map-BxgM_X1G.js → chart-heat-map-C86thSJ4.js} +3 -3
  108. package/dist/client/chunks/{chart-heat-map-BxgM_X1G.js.map → chart-heat-map-C86thSJ4.js.map} +1 -1
  109. package/dist/client/chunks/{chart-kpi-delta-DJKL02Ut.js → chart-kpi-delta-CxOYD2f1.js} +6 -6
  110. package/dist/client/chunks/{chart-kpi-delta-DJKL02Ut.js.map → chart-kpi-delta-CxOYD2f1.js.map} +1 -1
  111. package/dist/client/chunks/{chart-kpi-number-CuNEYbRx.js → chart-kpi-number-C6gWz-x4.js} +8 -8
  112. package/dist/client/chunks/{chart-kpi-number-CuNEYbRx.js.map → chart-kpi-number-C6gWz-x4.js.map} +1 -1
  113. package/dist/client/chunks/{chart-kpi-text-u8FJaZDQ.js → chart-kpi-text-dDONrhS-.js} +4 -4
  114. package/dist/client/chunks/{chart-kpi-text-u8FJaZDQ.js.map → chart-kpi-text-dDONrhS-.js.map} +1 -1
  115. package/dist/client/chunks/{chart-line-BZhzOjRl.js → chart-line-r4iWevKZ.js} +4 -4
  116. package/dist/client/chunks/{chart-line-BZhzOjRl.js.map → chart-line-r4iWevKZ.js.map} +1 -1
  117. package/dist/client/chunks/{chart-markdown-DEtjn8gx.js → chart-markdown-BPW-EAm9.js} +920 -924
  118. package/dist/client/chunks/chart-markdown-BPW-EAm9.js.map +1 -0
  119. package/dist/client/chunks/{chart-measure-profile-BnpIOS4Q.js → chart-measure-profile-BI3kADCp.js} +4 -4
  120. package/dist/client/chunks/{chart-measure-profile-BnpIOS4Q.js.map → chart-measure-profile-BI3kADCp.js.map} +1 -1
  121. package/dist/client/chunks/{chart-pie-CsdzxmSK.js → chart-pie-yqH2YVEI.js} +4 -4
  122. package/dist/client/chunks/{chart-pie-CsdzxmSK.js.map → chart-pie-yqH2YVEI.js.map} +1 -1
  123. package/dist/client/chunks/{chart-radar-C_9RwMKw.js → chart-radar-B-_3v-rE.js} +4 -4
  124. package/dist/client/chunks/{chart-radar-C_9RwMKw.js.map → chart-radar-B-_3v-rE.js.map} +1 -1
  125. package/dist/client/chunks/{chart-radial-bar-CewRelyQ.js → chart-radial-bar-C0EgzfAF.js} +4 -4
  126. package/dist/client/chunks/{chart-radial-bar-CewRelyQ.js.map → chart-radial-bar-C0EgzfAF.js.map} +1 -1
  127. package/dist/client/chunks/{chart-sankey-ItraHWH1.js → chart-sankey-CFzjGvZX.js} +3 -3
  128. package/dist/client/chunks/{chart-sankey-ItraHWH1.js.map → chart-sankey-CFzjGvZX.js.map} +1 -1
  129. package/dist/client/chunks/{chart-scatter-k2IJbO2Y.js → chart-scatter-DZPirzwX.js} +4 -4
  130. package/dist/client/chunks/{chart-scatter-k2IJbO2Y.js.map → chart-scatter-DZPirzwX.js.map} +1 -1
  131. package/dist/client/chunks/{chart-sunburst-NsFRuqi9.js → chart-sunburst-91Q2tzaB.js} +4 -4
  132. package/dist/client/chunks/{chart-sunburst-NsFRuqi9.js.map → chart-sunburst-91Q2tzaB.js.map} +1 -1
  133. package/dist/client/chunks/{chart-tree-map-Cj_ewpwJ.js → chart-tree-map-Bi4axCvh.js} +4 -4
  134. package/dist/client/chunks/{chart-tree-map-Cj_ewpwJ.js.map → chart-tree-map-Bi4axCvh.js.map} +1 -1
  135. package/dist/client/chunks/{chart-waterfall-C-MTFcOz.js → chart-waterfall-DcHbbPaG.js} +4 -4
  136. package/dist/client/chunks/{chart-waterfall-C-MTFcOz.js.map → chart-waterfall-DcHbbPaG.js.map} +1 -1
  137. package/dist/client/chunks/{charts-core-vZA3zPKb.js → charts-core-CrBDYN6N.js} +2 -2
  138. package/dist/client/chunks/{charts-core-vZA3zPKb.js.map → charts-core-CrBDYN6N.js.map} +1 -1
  139. package/dist/client/chunks/{core-Su6tIYhp.js → core-DsAWNRRv.js} +84 -84
  140. package/dist/client/chunks/{core-Su6tIYhp.js.map → core-DsAWNRRv.js.map} +1 -1
  141. package/dist/client/chunks/{dist-BTq3NoG3.js → dist-zPWyTBdU.js} +1 -1
  142. package/dist/client/chunks/{dist-BTq3NoG3.js.map → dist-zPWyTBdU.js.map} +1 -1
  143. package/dist/client/chunks/{en-US-D-1JPTPv.js → en-US-BE6VoG0o.js} +1 -1
  144. package/dist/client/chunks/{en-US-D-1JPTPv.js.map → en-US-BE6VoG0o.js.map} +1 -1
  145. package/dist/client/chunks/{exceljs.min-Dc1cBQ5l.js → exceljs.min-CIqBqwTW.js} +2 -2
  146. package/dist/client/chunks/{exceljs.min-Dc1cBQ5l.js.map → exceljs.min-CIqBqwTW.js.map} +1 -1
  147. package/dist/client/chunks/{javascript-YXkoOgWa.js → javascript-DFnKaHmQ.js} +3 -3
  148. package/dist/client/chunks/{javascript-YXkoOgWa.js.map → javascript-DFnKaHmQ.js.map} +1 -1
  149. package/dist/client/chunks/{json-O7MKB_4V.js → json-Cu6rbgWf.js} +1 -1
  150. package/dist/client/chunks/{json-O7MKB_4V.js.map → json-Cu6rbgWf.js.map} +1 -1
  151. package/dist/client/chunks/{nl-NL-BErZMygi.js → nl-NL-oyr2wENY.js} +1 -1
  152. package/dist/client/chunks/{nl-NL-BErZMygi.js.map → nl-NL-oyr2wENY.js.map} +1 -1
  153. package/dist/client/chunks/{providers-DX3Vw5kc.js → providers-DwQCKdGW.js} +1 -1
  154. package/dist/client/chunks/{providers-DX3Vw5kc.js.map → providers-DwQCKdGW.js.map} +1 -1
  155. package/dist/client/chunks/{retention-YhT1Oohi.js → retention-ChW9jYdy.js} +1 -1
  156. package/dist/client/chunks/{retention-YhT1Oohi.js.map → retention-ChW9jYdy.js.map} +1 -1
  157. package/dist/client/chunks/{schema-visualization-BY9L2nBQ.js → schema-visualization-BszcrmZX.js} +5 -5
  158. package/dist/client/chunks/{schema-visualization-BY9L2nBQ.js.map → schema-visualization-BszcrmZX.js.map} +1 -1
  159. package/dist/client/chunks/{sql-r2a-9CCK.js → sql-CmVzGP4w.js} +1 -1
  160. package/dist/client/chunks/{sql-r2a-9CCK.js.map → sql-CmVzGP4w.js.map} +1 -1
  161. package/dist/client/chunks/{useDebounce-DGfYXtkm.js → useDirtyStateTracking-B5wCDJSj.js} +99 -37
  162. package/dist/client/chunks/useDirtyStateTracking-B5wCDJSj.js.map +1 -0
  163. package/dist/client/chunks/{useExplainAI-CD0KuKwY.js → useExplainAI-CCeCYzDm.js} +19 -19
  164. package/dist/client/chunks/{useExplainAI-CD0KuKwY.js.map → useExplainAI-CCeCYzDm.js.map} +1 -1
  165. package/dist/client/chunks/{useNotebookLayout-DKkMenhj.js → useNotebookLayout-Ck3Z3uzg.js} +2 -2
  166. package/dist/client/chunks/{useNotebookLayout-DKkMenhj.js.map → useNotebookLayout-Ck3Z3uzg.js.map} +1 -1
  167. package/dist/client/chunks/{utils-D2SCtAkZ.js → utils-kqa-JIMg.js} +40 -13
  168. package/dist/client/chunks/utils-kqa-JIMg.js.map +1 -0
  169. package/dist/client/chunks/{vendor-CfR5hJGc.js → vendor-0hJNlZXQ.js} +102 -97
  170. package/dist/client/chunks/vendor-0hJNlZXQ.js.map +1 -0
  171. package/dist/client/components/DashboardGrid.d.ts +3 -1
  172. package/dist/client/components/dashboard/DashboardContext.d.ts +113 -0
  173. package/dist/client/components/dashboard/DashboardCoordinator.d.ts +2 -0
  174. package/dist/client/components/dashboard/DashboardFilterBar.d.ts +8 -0
  175. package/dist/client/components/dashboard/DashboardGridSurface.d.ts +8 -0
  176. package/dist/client/components/dashboard/DashboardModals.d.ts +8 -0
  177. package/dist/client/components/dashboard/DashboardProvider.d.ts +2 -0
  178. package/dist/client/components/dashboard/DashboardToolbar.d.ts +11 -0
  179. package/dist/client/components/dashboard/dashboardGridUtils.d.ts +17 -0
  180. package/dist/client/components/dashboard/index.d.ts +13 -0
  181. package/dist/client/components.d.ts +2 -0
  182. package/dist/client/components.js +3 -4
  183. package/dist/client/hooks.js +5 -6
  184. package/dist/client/icons.js +2 -2
  185. package/dist/client/index.d.ts +2 -0
  186. package/dist/client/index.js +161 -163
  187. package/dist/client/index.js.map +1 -1
  188. package/dist/client/providers.js +3 -3
  189. package/dist/client/schema.js +1 -1
  190. package/dist/client/utils.js +6 -7
  191. package/dist/client-bundle-stats.html +1 -1
  192. package/dist/mcp-app/mcp-app.html +77 -51
  193. package/dist/{adapters/dist-Boc63-1q.cjs → server/dist-BOdf-GQO.cjs} +1 -1
  194. package/dist/server/{google-BXwMolCu.js → google-CFYljAOF.js} +1 -1
  195. package/dist/server/{google-DzQWXFwF.cjs → google-DUlXeeDA.cjs} +1 -1
  196. package/dist/server/index.cjs +7 -7
  197. package/dist/server/index.js +26 -9
  198. package/dist/server/{openai-BfiZU0rG.cjs → openai-6wrBvAnv.cjs} +1 -1
  199. package/dist/server/openai-BDwb2u7y.cjs +17 -0
  200. package/dist/{adapters/openai-DQawCWQb.js → server/openai-DiVskd89.js} +1 -1
  201. package/dist/{adapters/openai-CuUGrKaK.js → server/openai-y7GhJNdn.js} +2062 -928
  202. package/package.json +3 -3
  203. package/dist/adapters/mcp-transport-BCtjU0lC.cjs +0 -40
  204. package/dist/adapters/mcp-transport-DW_Uks-O.js +0 -579
  205. package/dist/adapters/openai-Bgri5TJc.cjs +0 -16
  206. package/dist/client/chunks/DashboardEditModal-BiJwVv0b.js.map +0 -1
  207. package/dist/client/chunks/FieldSearchModal-DdcbCwAi.js +0 -2660
  208. package/dist/client/chunks/FieldSearchModal-DdcbCwAi.js.map +0 -1
  209. package/dist/client/chunks/chart-data-table-DT4uBZaq.js.map +0 -1
  210. package/dist/client/chunks/chart-markdown-DEtjn8gx.js.map +0 -1
  211. package/dist/client/chunks/syntaxHighlighting-5zHcjn27.js +0 -30
  212. package/dist/client/chunks/syntaxHighlighting-5zHcjn27.js.map +0 -1
  213. package/dist/client/chunks/useDebounce-DGfYXtkm.js.map +0 -1
  214. package/dist/client/chunks/useDirtyStateTracking-KAjwj1Ht.js +0 -66
  215. package/dist/client/chunks/useDirtyStateTracking-KAjwj1Ht.js.map +0 -1
  216. package/dist/client/chunks/utils-D2SCtAkZ.js.map +0 -1
  217. package/dist/client/chunks/vendor-CfR5hJGc.js.map +0 -1
  218. package/dist/server/openai-BwsBio1K.cjs +0 -16
  219. /package/dist/adapters/{anthropic-B_rg0BhK.js → anthropic-CZh4hB-m.js} +0 -0
  220. /package/dist/adapters/{anthropic-BIva8k1r.cjs → anthropic-DG4r1LSm.cjs} +0 -0
  221. /package/dist/adapters/{dist-De5fzUEM.js → dist-CH3hwAUk.js} +0 -0
  222. /package/dist/client/chunks/{rolldown-runtime-CKnJJeip.js → rolldown-runtime-CWhphoD1.js} +0 -0
  223. /package/dist/server/{anthropic-BsNspi1r.js → anthropic-CZh4hB-m.js} +0 -0
  224. /package/dist/server/{anthropic-DsCEX6Fm.cjs → anthropic-DG4r1LSm.cjs} +0 -0
  225. /package/dist/server/{dist-CMWZC51B.js → dist-CH3hwAUk.js} +0 -0
@@ -1,5 +1,5 @@
1
- import { n as e } from "./rolldown-runtime-CKnJJeip.js";
2
- import { k as t } from "./chart-activity-grid-Bdb8U_NC.js";
1
+ import { n as e } from "./rolldown-runtime-CWhphoD1.js";
2
+ import { k as t } from "./chart-activity-grid-CiHrLH6Y.js";
3
3
  import * as n from "react";
4
4
  import r, { useMemo as i } from "react";
5
5
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
@@ -15,7 +15,7 @@ function c(e) {
15
15
  }
16
16
  //#endregion
17
17
  //#region node_modules/markdown-to-jsx/dist/index.js
18
- var l = 32, u = 9, d = 13, f = 10, p = 96, m = 126, h = 91, g = 94, _ = 62, v = 35, y = 37, b = 45, x = 61, S = 92, C = 42, w = 95, T = 60, E = 64, D = 93, O = 33, k = 38, A = 58, j = 70, M = 102, N = 104, P = 119, F = 116, I = 112, ee = 115, L = 160, R = 12, te = 44, ne = 59, re = 63, ie = 46, ae = 47, z = 39, B = 34, oe = 43, se = 124, ce = 123, le = 125, ue = 40, de = 41, fe = 30, pe = 31, V = 48, H = 57, U = 65, W = 90, G = 97, me = 122, he = 128, ge = 32, K = {
18
+ var l = 32, u = 9, d = 13, f = 10, p = 96, m = 126, h = 91, g = 94, _ = 62, v = 35, y = 37, b = 45, x = 61, S = 92, C = 42, w = 95, T = 60, E = 64, D = 93, O = 33, k = 38, A = 58, j = 70, M = 102, N = 104, P = 119, F = 116, I = 112, ee = 115, L = 160, R = 12, te = 44, ne = 59, re = 63, z = 46, ie = 47, B = 39, ae = 34, oe = 43, V = 124, se = 123, ce = 125, le = 40, ue = 41, de = 30, fe = 31, H = 48, U = 57, W = 65, G = 90, K = 97, pe = 122, me = 128, he = 32, q = {
19
19
  blockQuote: 0,
20
20
  breakLine: 1,
21
21
  breakThematic: 2,
@@ -40,7 +40,7 @@ var l = 32, u = 9, d = 13, f = 10, p = 96, m = 126, h = 91, g = 94, _ = 62, v =
40
40
  textFormatted: 21,
41
41
  unorderedList: 22
42
42
  };
43
- function _e(e) {
43
+ function ge(e) {
44
44
  if (!we(e, "---")) return null;
45
45
  let t = 3;
46
46
  for (; t < e.length && (e[t] === " " || e[t] === " ");) t++;
@@ -60,8 +60,8 @@ function _e(e) {
60
60
  let t = He(e, r, i);
61
61
  if (t < i) {
62
62
  let r = e.charCodeAt(t);
63
- if (r >= G && r <= me || r >= U && r <= W || r >= V && r <= H || r === w) {
64
- for (t++; t < i && (r = e.charCodeAt(t), r >= G && r <= me || r >= U && r <= W || r >= V && r <= H || r === w || r === b || r === ie);) t++;
63
+ if (r >= K && r <= pe || r >= W && r <= G || r >= H && r <= U || r === w) {
64
+ for (t++; t < i && (r = e.charCodeAt(t), r >= K && r <= pe || r >= W && r <= G || r >= H && r <= U || r === w || r === b || r === z);) t++;
65
65
  t < i && e.charCodeAt(t) === A && (t++, t >= i ? n = !0 : (r = e.charCodeAt(t), (r === l || r === u) && (n = !0)));
66
66
  }
67
67
  }
@@ -69,7 +69,7 @@ function _e(e) {
69
69
  }
70
70
  return null;
71
71
  }
72
- var ve = /&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi, q = {
72
+ var _e = /&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi, J = {
73
73
  class: "className",
74
74
  for: "htmlFor",
75
75
  allowfullscreen: "allowFullScreen",
@@ -113,10 +113,10 @@ var ve = /&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi, q = {
113
113
  usemap: "useMap",
114
114
  viewbox: "viewBox"
115
115
  };
116
- function J(e) {
116
+ function Y(e) {
117
117
  var t = {};
118
118
  for (var n in e) {
119
- var r = q[n.toLowerCase()];
119
+ var r = J[n.toLowerCase()];
120
120
  if (r) t[r] = e[n];
121
121
  else {
122
122
  var i = n.indexOf(":");
@@ -125,9 +125,9 @@ function J(e) {
125
125
  }
126
126
  return t;
127
127
  }
128
- var ye = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;
129
- function be(e) {
130
- return e.indexOf("&") === -1 ? e : e.replace(ve, (e, t) => {
128
+ var ve = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s|^<(div|p|h[1-6]|ul|ol|li|blockquote|pre|table|thead|tbody|tr|td|th|dl|dt|dd|hr|address|article|aside|details|dialog|figure|figcaption|footer|form|header|main|menu|nav|section|summary|textarea|fieldset|legend|center|dir|hgroup|marquee|search|output|template)\b)/i;
129
+ function ye(e) {
130
+ return e.indexOf("&") === -1 ? e : e.replace(_e, (e, t) => {
131
131
  var n = c(t);
132
132
  if (n) return n;
133
133
  if (t[0] === "#") {
@@ -137,19 +137,19 @@ function be(e) {
137
137
  return e;
138
138
  });
139
139
  }
140
- var xe = /(javascript|vbscript|data(?!:image)):/i;
141
- function Se(e) {
142
- if (xe.test(e)) return null;
140
+ var be = /(javascript|vbscript|data(?!:image)):/i;
141
+ function xe(e) {
142
+ if (be.test(e)) return null;
143
143
  if (e.indexOf("%") === -1) return e;
144
144
  try {
145
145
  let t = decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g, "");
146
- if (xe.test(t)) return null;
146
+ if (be.test(t)) return null;
147
147
  } catch {
148
148
  return null;
149
149
  }
150
150
  return e;
151
151
  }
152
- var Y = {}, Ce, X;
152
+ var Se = {}, Ce, X;
153
153
  for (Ce = [
154
154
  192,
155
155
  193,
@@ -165,8 +165,8 @@ for (Ce = [
165
165
  229,
166
166
  230,
167
167
  198
168
- ], X = 0; X < Ce.length; X++) Y[Ce[X]] = "a";
169
- for (Y[231] = Y[199] = "c", Y[240] = Y[208] = "d", Ce = [
168
+ ], X = 0; X < Ce.length; X++) Se[Ce[X]] = "a";
169
+ for (Se[231] = Se[199] = "c", Se[240] = Se[208] = "d", Ce = [
170
170
  200,
171
171
  201,
172
172
  202,
@@ -175,7 +175,7 @@ for (Y[231] = Y[199] = "c", Y[240] = Y[208] = "d", Ce = [
175
175
  232,
176
176
  234,
177
177
  235
178
- ], X = 0; X < Ce.length; X++) Y[Ce[X]] = "e";
178
+ ], X = 0; X < Ce.length; X++) Se[Ce[X]] = "e";
179
179
  for (Ce = [
180
180
  207,
181
181
  239,
@@ -185,8 +185,8 @@ for (Ce = [
185
185
  237,
186
186
  204,
187
187
  236
188
- ], X = 0; X < Ce.length; X++) Y[Ce[X]] = "i";
189
- for (Y[209] = Y[241] = "n", Ce = [
188
+ ], X = 0; X < Ce.length; X++) Se[Ce[X]] = "i";
189
+ for (Se[209] = Se[241] = "n", Ce = [
190
190
  248,
191
191
  216,
192
192
  339,
@@ -199,7 +199,7 @@ for (Y[209] = Y[241] = "n", Ce = [
199
199
  243,
200
200
  210,
201
201
  242
202
- ], X = 0; X < Ce.length; X++) Y[Ce[X]] = "o";
202
+ ], X = 0; X < Ce.length; X++) Se[Ce[X]] = "o";
203
203
  for (Ce = [
204
204
  220,
205
205
  252,
@@ -209,17 +209,17 @@ for (Ce = [
209
209
  250,
210
210
  217,
211
211
  249
212
- ], X = 0; X < Ce.length; X++) Y[Ce[X]] = "u";
213
- Y[376] = Y[255] = Y[221] = Y[253] = "y";
212
+ ], X = 0; X < Ce.length; X++) Se[Ce[X]] = "u";
213
+ Se[376] = Se[255] = Se[221] = Se[253] = "y";
214
214
  function Z(e) {
215
215
  for (var t = "", n = -1, r = e.length, i = 0; i < r; i++) {
216
216
  var a = e.charCodeAt(i);
217
- if (a >= G && a <= me || a >= V && a <= H) {
217
+ if (a >= K && a <= pe || a >= H && a <= U) {
218
218
  n < 0 && (n = i);
219
219
  continue;
220
220
  }
221
- if (a >= U && a <= W) {
222
- n >= 0 && (t += e.slice(n, i), n = -1), t += String.fromCharCode(a + ge);
221
+ if (a >= W && a <= G) {
222
+ n >= 0 && (t += e.slice(n, i), n = -1), t += String.fromCharCode(a + he);
223
223
  continue;
224
224
  }
225
225
  if (a === l || a === b) {
@@ -227,7 +227,7 @@ function Z(e) {
227
227
  continue;
228
228
  }
229
229
  n >= 0 && (t += e.slice(n, i), n = -1);
230
- var o = Y[a];
230
+ var o = Se[a];
231
231
  o && (t += o);
232
232
  }
233
233
  return n >= 0 && (t += e.slice(n)), t;
@@ -270,13 +270,13 @@ function Te(e) {
270
270
  }
271
271
  var Ee = 1, De = 2, Oe = 4, ke = 8, Ae = 16, je = 32, Me = 64, Ne = 1, Pe = 2, Fe = 3, Ie = 4, Le = (function() {
272
272
  var e = new Uint8Array(128), t;
273
- for (e[u] = Ee, e[f] = Ee | De, e[R] = Ee, e[d] = Ee | De, e[l] = Ee, t = O; t <= ae; t++) e[t] = Oe;
273
+ for (e[u] = Ee, e[f] = Ee | De, e[R] = Ee, e[d] = Ee | De, e[l] = Ee, t = O; t <= ie; t++) e[t] = Oe;
274
274
  for (t = A; t <= E; t++) e[t] = Oe;
275
275
  for (t = h; t <= p; t++) e[t] = Oe;
276
- for (t = ce; t <= m; t++) e[t] = Oe;
277
- for (t = V; t <= H; t++) e[t] = Ae;
278
- for (t = U; t <= W; t++) e[t] = ke;
279
- for (t = G; t <= me; t++) e[t] = ke;
276
+ for (t = se; t <= m; t++) e[t] = Oe;
277
+ for (t = H; t <= U; t++) e[t] = Ae;
278
+ for (t = W; t <= G; t++) e[t] = ke;
279
+ for (t = K; t <= pe; t++) e[t] = ke;
280
280
  return e;
281
281
  })();
282
282
  (function() {
@@ -301,14 +301,40 @@ function He(e, t, n) {
301
301
  for (; t < r && (e[t] === " " || e[t] === " ");) t++;
302
302
  return t;
303
303
  }
304
- function Ue(e, t, n) {
304
+ function Ue(e) {
305
+ if (!e) return !1;
306
+ for (var t in e) return !0;
307
+ return !1;
308
+ }
309
+ function We(e) {
310
+ return {
311
+ attrs: {},
312
+ children: [{
313
+ type: q.text,
314
+ text: e
315
+ }],
316
+ c: !0,
317
+ type: q.htmlBlock,
318
+ tag: "header"
319
+ };
320
+ }
321
+ function Ge(e) {
322
+ var t = [];
323
+ if (!e) return t;
324
+ for (var n in e) n.charCodeAt(0) === 94 && t.push({
325
+ identifier: n,
326
+ footnote: e[n].target
327
+ });
328
+ return t;
329
+ }
330
+ function Ke(e, t, n) {
305
331
  for (var r = e, i = t.split("."), a = 0; a < i.length && (r = r?.[i[a]], r !== void 0);) a++;
306
332
  return r || n;
307
333
  }
308
- function We(e) {
334
+ function qe(e) {
309
335
  for (var t = !1, n = 0; n < e.length; n++) {
310
336
  var r = e.charCodeAt(n);
311
- if (r <= l || r === B || r === y || r === T || r === _ || r === h || r === S || r === D || r === g || r === p || r >= 123) {
337
+ if (r <= l || r === ae || r === y || r === T || r === _ || r === h || r === S || r === D || r === g || r === p || r >= 123) {
312
338
  t = !0;
313
339
  break;
314
340
  }
@@ -318,7 +344,7 @@ function We(e) {
318
344
  var r = e.charCodeAt(n);
319
345
  if (r === y && n + 2 < e.length) {
320
346
  var a = e.charCodeAt(n + 1), o = e.charCodeAt(n + 2);
321
- if ((a >= V && a <= H || a >= U && a <= j || a >= G && a <= M) && (o >= V && o <= H || o >= U && o <= j || o >= G && o <= M)) {
347
+ if ((a >= H && a <= U || a >= W && a <= j || a >= K && a <= M) && (o >= H && o <= U || o >= W && o <= j || o >= K && o <= M)) {
322
348
  i += e[n] + e[n + 1] + e[n + 2], n += 2;
323
349
  continue;
324
350
  }
@@ -327,10 +353,10 @@ function We(e) {
327
353
  }
328
354
  return i;
329
355
  }
330
- function Ge(...e) {
356
+ function Je(...e) {
331
357
  return e.filter(Boolean).join(" ");
332
358
  }
333
- var Ke = new Set([
359
+ var Ye = new Set([
334
360
  "title",
335
361
  "textarea",
336
362
  "style",
@@ -340,24 +366,24 @@ var Ke = new Set([
340
366
  "noframes",
341
367
  "script",
342
368
  "plaintext"
343
- ]), qe = /<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;
344
- function Je(e) {
345
- return Ke.has(e.toLowerCase());
369
+ ]), Xe = /<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi;
370
+ function Ze(e) {
371
+ return Ye.has(e.toLowerCase());
346
372
  }
347
- function Ye(e) {
348
- return qe.lastIndex = 0, qe.test(e);
373
+ function Qe(e) {
374
+ return Xe.lastIndex = 0, Xe.test(e);
349
375
  }
350
- function Xe(e) {
351
- return qe.lastIndex = 0, e.replace(qe, function(e, t, n, r) {
376
+ function $e(e) {
377
+ return Xe.lastIndex = 0, e.replace(Xe, function(e, t, n, r) {
352
378
  return "&lt;" + t + n + r;
353
379
  });
354
380
  }
355
- var Ze = /^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/, Qe = /^<[A-Z]/, $e = [
381
+ var et = /^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/, tt = /^<[A-Z]/, nt = [
356
382
  "script",
357
383
  "pre",
358
384
  "style",
359
385
  "textarea"
360
- ], et = new Set($e), tt = /<(?:pre|script|style|textarea)\b/i, nt = /<(?:pre|script|style|textarea)\b/iy, rt = /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m, it = /^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im, at = new Uint8Array(128);
386
+ ], rt = new Set(nt), it = /<(?:pre|script|style|textarea)\b/i, at = /<(?:pre|script|style|textarea)\b/iy, ot = /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m, st = /^<([a-z][^ >/\n\r]*) ?([^>]*?)>/im, ct = new Uint8Array(128);
361
387
  (function() {
362
388
  for (var e = [
363
389
  p,
@@ -369,45 +395,45 @@ var Ze = /^<([a-zA-Z][a-zA-Z0-9-]*)\s[^>]*>/, Qe = /^<[A-Z]/, $e = [
369
395
  O,
370
396
  T,
371
397
  S,
372
- pe,
398
+ fe,
373
399
  N,
374
400
  P,
375
401
  M
376
- ], t = 0; t < e.length; t++) at[e[t]] = 1;
402
+ ], t = 0; t < e.length; t++) ct[e[t]] = 1;
377
403
  })();
378
- var ot = /([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;
379
- function st(e) {
380
- return et.has(e);
404
+ var lt = /([a-zA-Z_][a-zA-Z0-9_-]*)=(?:"([^"]*)"|'([^']*)')/g;
405
+ function ut(e) {
406
+ return rt.has(e);
381
407
  }
382
- function ct(e) {
383
- return tt.test(e);
408
+ function dt(e) {
409
+ return it.test(e);
384
410
  }
385
- function lt(e, t, n) {
411
+ function ft(e, t, n) {
386
412
  for (var r = t, i = n; r < i && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
387
413
  if (r >= i) return !1;
388
- e.charCodeAt(r) === se && r++;
414
+ e.charCodeAt(r) === V && r++;
389
415
  for (var a = 0; r < i;) {
390
416
  for (; r < i && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
391
417
  if (r >= i) break;
392
- if (e.charCodeAt(r) === se && a > 0) {
418
+ if (e.charCodeAt(r) === V && a > 0) {
393
419
  for (var o = r + 1; o < i && (e.charCodeAt(o) === l || e.charCodeAt(o) === u);) o++;
394
420
  if (o >= i) return !0;
395
421
  }
396
422
  if (e.charCodeAt(r) === A && r++, r >= i || e.charCodeAt(r) !== b) return !1;
397
423
  for (; r < i && e.charCodeAt(r) === b;) r++;
398
424
  for (r < i && e.charCodeAt(r) === A && r++, a++; r < i && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
399
- if (r < i) if (e.charCodeAt(r) === se) r++;
425
+ if (r < i) if (e.charCodeAt(r) === V) r++;
400
426
  else return !1;
401
427
  }
402
428
  return a > 0;
403
429
  }
404
- function ut(e, t) {
430
+ function pt(e, t) {
405
431
  if (e.charCodeAt(t) !== T) return null;
406
432
  let n = t + 1, r = e.length, i = !1;
407
- e.charCodeAt(n) === ae && (n++, i = !0);
433
+ e.charCodeAt(n) === ie && (n++, i = !0);
408
434
  let a = n, o = e.charCodeAt(n);
409
- if (!(o >= G && o <= me || o >= U && o <= W)) return null;
410
- for (; n < r && (e.charCodeAt(n) >= G && e.charCodeAt(n) <= me || e.charCodeAt(n) >= U && e.charCodeAt(n) <= W || e.charCodeAt(n) >= V && e.charCodeAt(n) <= H || e.charCodeAt(n) === b);) n++;
435
+ if (!(o >= K && o <= pe || o >= W && o <= G)) return null;
436
+ for (; n < r && (e.charCodeAt(n) >= K && e.charCodeAt(n) <= pe || e.charCodeAt(n) >= W && e.charCodeAt(n) <= G || e.charCodeAt(n) >= H && e.charCodeAt(n) <= U || e.charCodeAt(n) === b);) n++;
411
437
  let s = e.slice(a, n);
412
438
  if (!s) return null;
413
439
  let c = n;
@@ -415,7 +441,7 @@ function ut(e, t) {
415
441
  let d = e.slice(c, n);
416
442
  if (n === c && n < r) {
417
443
  var m = e.charCodeAt(n);
418
- if (m !== _ && m !== ae) return null;
444
+ if (m !== _ && m !== ie) return null;
419
445
  }
420
446
  let h = n, g = {}, v = !1;
421
447
  for (; n < r;) {
@@ -437,7 +463,7 @@ function ut(e, t) {
437
463
  n++;
438
464
  continue;
439
465
  }
440
- if (t === ae && n + 1 < r && e.charCodeAt(n + 1) === _) {
466
+ if (t === ie && n + 1 < r && e.charCodeAt(n + 1) === _) {
441
467
  let t = e.slice(h, n);
442
468
  return v = n > h && e.charCodeAt(n - 1) === l, {
443
469
  tag: s,
@@ -451,10 +477,10 @@ function ut(e, t) {
451
477
  };
452
478
  }
453
479
  var y = n, S = e.charCodeAt(n);
454
- if (!(S >= G && S <= me || S >= U && S <= W || S === w || S === A)) return null;
480
+ if (!(S >= K && S <= pe || S >= W && S <= G || S === w || S === A)) return null;
455
481
  for (n++; n < r;) {
456
482
  var C = e.charCodeAt(n);
457
- if (C >= G && C <= me || C >= U && C <= W || C >= V && C <= H || C === w || C === ie || C === A || C === b) n++;
483
+ if (C >= K && C <= pe || C >= W && C <= G || C >= H && C <= U || C === w || C === z || C === A || C === b) n++;
458
484
  else break;
459
485
  }
460
486
  for (var E = e.slice(y, n); n < r && (e.charCodeAt(n) === l || e.charCodeAt(n) === u);) n++;
@@ -464,25 +490,25 @@ function ut(e, t) {
464
490
  }
465
491
  for (n++; n < r && (e.charCodeAt(n) === l || e.charCodeAt(n) === u);) n++;
466
492
  var D = e.charCodeAt(n);
467
- if (D === B || D === z) {
493
+ if (D === ae || D === B) {
468
494
  n++;
469
495
  for (var O = n; n < r && e.charCodeAt(n) !== D;) n++;
470
496
  if (n >= r) return null;
471
497
  if (g[E] = e.slice(O, n), n++, n < r) {
472
498
  var k = e.charCodeAt(n);
473
- if (k !== l && k !== u && k !== f && k !== _ && k !== ae) return null;
499
+ if (k !== l && k !== u && k !== f && k !== _ && k !== ie) return null;
474
500
  }
475
- } else if (D === ce) {
501
+ } else if (D === se) {
476
502
  var j = 1, O = n;
477
503
  for (n++; n < r && j > 0;) {
478
504
  var C = e.charCodeAt(n);
479
- C === ce ? j++ : C === le && j--, n++;
505
+ C === se ? j++ : C === ce && j--, n++;
480
506
  }
481
507
  g[E] = e.slice(O, n);
482
508
  } else {
483
509
  for (var O = n; n < r;) {
484
510
  var M = e.charCodeAt(n);
485
- if (M === l || M === u || M === _ || M === f || M === B || M === z || M === x || M === T || M === p) break;
511
+ if (M === l || M === u || M === _ || M === f || M === ae || M === B || M === x || M === T || M === p) break;
486
512
  n++;
487
513
  }
488
514
  if (n === O) return null;
@@ -491,8 +517,8 @@ function ut(e, t) {
491
517
  }
492
518
  return null;
493
519
  }
494
- function dt(e, t, n) {
495
- if (!n.streaming && !n.optimizeForStreaming && e.indexOf("[") === -1) return !1;
520
+ function mt(e, t, n) {
521
+ if (!n.optimizeForStreaming && e.indexOf("[") === -1) return !1;
496
522
  for (var r = 0, i = e.length, a = !1, o = !1; r < i;) {
497
523
  for (var s = e.indexOf("\n", r), c = s < 0 ? i : s, d = r, y = 0; d < c && y < 4;) if (e.charCodeAt(d) === l) y++, d++;
498
524
  else if (e.charCodeAt(d) === u) y += 4, d++;
@@ -550,7 +576,7 @@ function dt(e, t, n) {
550
576
  a = !1;
551
577
  }
552
578
  if (!a && y < 4 && P < c && e.charCodeAt(P) === h && !(P + 1 < i && e.charCodeAt(P + 1) === g)) {
553
- var I = ft(e, P, t);
579
+ var I = ht(e, P, t);
554
580
  if (I) {
555
581
  r = I, a = !1;
556
582
  continue;
@@ -571,7 +597,7 @@ function dt(e, t, n) {
571
597
  }
572
598
  return o;
573
599
  }
574
- function ft(e, t, n) {
600
+ function ht(e, t, n) {
575
601
  let r = e.length;
576
602
  if (e.charCodeAt(t) !== h) return null;
577
603
  let i = t + 1 < r && e.charCodeAt(t + 1) === g, a = t + 1;
@@ -587,7 +613,7 @@ function ft(e, t, n) {
587
613
  if (a > r || e.charCodeAt(a - 1) !== D) return null;
588
614
  let s = e.slice(t + 1, a - 1);
589
615
  if (s.length > 999) return null;
590
- let c = gt(s);
616
+ let c = yt(s);
591
617
  if (!c || a >= r || e.charCodeAt(a) !== A) return null;
592
618
  a++;
593
619
  let d = !1;
@@ -614,13 +640,13 @@ function ft(e, t, n) {
614
640
  if (b < y) {
615
641
  if (b === a) return null;
616
642
  var x = e.charCodeAt(b);
617
- if (x !== B && x !== z && x !== ue) return null;
643
+ if (x !== ae && x !== B && x !== le) return null;
618
644
  }
619
645
  } else {
620
646
  for (var m = a, C = 0; a < r;) {
621
647
  var o = e.charCodeAt(a);
622
- if (o === ue) C++;
623
- else if (o === de) {
648
+ if (o === le) C++;
649
+ else if (o === ue) {
624
650
  if (C === 0) break;
625
651
  C--;
626
652
  } else {
@@ -636,8 +662,8 @@ function ft(e, t, n) {
636
662
  if (a === E && a < r) for (M = a + 1; M < r && (e.charCodeAt(M) === l || e.charCodeAt(M) === u);) M++;
637
663
  if (M < r) {
638
664
  var N = e.charCodeAt(M);
639
- if (N === B || N === z || N === ue) {
640
- for (var P = N === ue ? 41 : N, F = M + 1, I = F; F < r;) {
665
+ if (N === ae || N === B || N === le) {
666
+ for (var P = N === le ? 41 : N, F = M + 1, I = F; F < r;) {
641
667
  var ee = e.charCodeAt(F);
642
668
  if (ee === P) {
643
669
  for (var L = F + 1; L < r && (e.charCodeAt(L) === l || e.charCodeAt(L) === u);) L++;
@@ -655,19 +681,19 @@ function ft(e, t, n) {
655
681
  }
656
682
  }
657
683
  if (k) return n[c] || (n[c] = {
658
- target: vt(p),
659
- title: O === void 0 ? O : be(vt(O))
684
+ target: xt(p),
685
+ title: O === void 0 ? O : ye(xt(O))
660
686
  }), j;
661
687
  for (; a < E && (e.charCodeAt(a) === l || e.charCodeAt(a) === u);) a++;
662
688
  return a < E ? null : (n[c] || (n[c] = {
663
- target: vt(p),
689
+ target: xt(p),
664
690
  title: O
665
691
  }), w < 0 ? r : w + 1);
666
692
  }
667
- var pt = new Uint8Array(Le);
668
- for (pt[pe] = Ee, pt[v] |= je, pt[_] |= je, pt[b] |= je | Me, pt[oe] |= je, pt[C] |= je | Me, pt[w] |= je | Me, pt[p] |= je | Me, pt[m] |= je | Me, pt[T] |= je | Me, pt[h] |= Me, pt[O] |= Me, pt[se] |= je, mt = V; mt <= H; mt++) pt[mt] |= je;
669
- var mt;
670
- function ht(e) {
693
+ var gt = new Uint8Array(Le);
694
+ for (gt[fe] = Ee, gt[v] |= je, gt[_] |= je, gt[b] |= je | Me, gt[oe] |= je, gt[C] |= je | Me, gt[w] |= je | Me, gt[p] |= je | Me, gt[m] |= je | Me, gt[T] |= je | Me, gt[h] |= Me, gt[O] |= Me, gt[V] |= je, _t = H; _t <= U; _t++) gt[_t] |= je;
695
+ var _t;
696
+ function vt(e) {
671
697
  if (e.indexOf("[") < 0 && e.indexOf("]") < 0) return !1;
672
698
  for (var t = 0; t < e.length; t++) {
673
699
  if (e.charCodeAt(t) === S) {
@@ -678,27 +704,27 @@ function ht(e) {
678
704
  }
679
705
  return !1;
680
706
  }
681
- function gt(e) {
707
+ function yt(e) {
682
708
  var t = e.replace(/\s+/g, " ").trim();
683
709
  return t.indexOf("ẞ") === -1 ? t.toLowerCase() : t.replace(/\u1E9E/g, "ss").toLowerCase();
684
710
  }
685
- function _t(e) {
686
- return e < he ? pt[e] : e === L ? Ee : 0;
711
+ function bt(e) {
712
+ return e < me ? gt[e] : e === L ? Ee : 0;
687
713
  }
688
- function vt(e) {
689
- return e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, "$1");
714
+ function xt(e) {
715
+ return e.indexOf("\\") === -1 ? e : e.replace(/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, "$1");
690
716
  }
691
- var yt = null, bt = -1, xt = -1;
692
- function St(e, t) {
693
- if (t === bt && e === yt) return xt;
717
+ var St = null, Ct = -1, wt = -1;
718
+ function Tt(e, t) {
719
+ if (t === Ct && e === St) return wt;
694
720
  var n = e.indexOf("\n", t);
695
721
  return n < 0 ? e.length : n;
696
722
  }
697
723
  function $(e, t) {
698
- let n = St(e, t);
724
+ let n = Tt(e, t);
699
725
  return n < e.length ? n + 1 : n;
700
726
  }
701
- function Ct(e, t, n) {
727
+ function Et(e, t, n) {
702
728
  for (; t < n;) {
703
729
  let n = e.charCodeAt(t);
704
730
  if (n !== l && n !== u) break;
@@ -706,49 +732,49 @@ function Ct(e, t, n) {
706
732
  }
707
733
  return t;
708
734
  }
709
- function wt(e, t) {
735
+ function Dt(e, t) {
710
736
  let n = $(e, t);
711
737
  for (; n < e.length;) {
712
- let t = St(e, n);
713
- if (kt(e, n, t)) return n;
738
+ let t = Tt(e, n);
739
+ if (Mt(e, n, t)) return n;
714
740
  n = $(e, n);
715
741
  }
716
742
  return e.length;
717
743
  }
718
- function Tt(e, t, n, r) {
744
+ function Ot(e, t, n, r) {
719
745
  let i = 0;
720
746
  for (; t + i < n && e.charCodeAt(t + i) === r;) i++;
721
747
  return i;
722
748
  }
723
- var Et = 0, Dt = 0;
724
- function Ot(e, t, n) {
725
- for (Et = 0, Dt = 0; t + Dt < n;) {
726
- let n = e.charCodeAt(t + Dt);
727
- if (n === u) Et += 4 - Et % 4;
728
- else if (n === l) Et++;
749
+ var kt = 0, At = 0;
750
+ function jt(e, t, n) {
751
+ for (kt = 0, At = 0; t + At < n;) {
752
+ let n = e.charCodeAt(t + At);
753
+ if (n === u) kt += 4 - kt % 4;
754
+ else if (n === l) kt++;
729
755
  else break;
730
- Dt++;
756
+ At++;
731
757
  }
732
758
  }
733
- function kt(e, t, n) {
734
- return Ct(e, t, n) >= n;
759
+ function Mt(e, t, n) {
760
+ return Et(e, t, n) >= n;
735
761
  }
736
- function At(e, t, n, r) {
737
- let i = St(e, t);
738
- if (Ot(e, t, i), Et > 3) return null;
739
- let a = t + Dt;
762
+ function Nt(e, t, n, r) {
763
+ let i = Tt(e, t);
764
+ if (jt(e, t, i), kt > 3) return null;
765
+ let a = t + At;
740
766
  if (e.charCodeAt(a) !== v) return null;
741
- let o = Tt(e, a, i, 35);
767
+ let o = Ot(e, a, i, 35);
742
768
  if (o < 1 || o > 6 || (a += o, a < i && e.charCodeAt(a) !== l && e.charCodeAt(a) !== u)) return null;
743
- a = Ct(e, a, i);
769
+ a = Et(e, a, i);
744
770
  for (var s = i; s > a && e.charCodeAt(s - 1) === l;) s--;
745
771
  for (var c = s; s > a && e.charCodeAt(s - 1) === v;) s--;
746
772
  if (s < c) if (s === a || e.charCodeAt(s - 1) === l) for (; s > a && e.charCodeAt(s - 1) === l;) s--;
747
773
  else s = c;
748
- let d = e.slice(a, s), f = Sn(d, 0, d.length, n, r), p = (r?.slugify || Z)(d);
774
+ let d = e.slice(a, s), f = Tn(d, 0, d.length, n, r), p = (r?.slugify || Z)(d);
749
775
  return {
750
776
  node: {
751
- type: K.heading,
777
+ type: q.heading,
752
778
  level: o,
753
779
  children: f,
754
780
  id: p
@@ -756,17 +782,17 @@ function At(e, t, n, r) {
756
782
  end: $(e, i)
757
783
  };
758
784
  }
759
- function jt(e, t, n) {
785
+ function Pt(e, t, n) {
760
786
  var r = e.charCodeAt(t);
761
787
  if (r !== x && r !== b) return !1;
762
788
  for (var i = t; i < n && e.charCodeAt(i) === r;) i++;
763
789
  for (; i < n && (e.charCodeAt(i) === l || e.charCodeAt(i) === u);) i++;
764
790
  return i >= n;
765
791
  }
766
- function Mt(e, t) {
767
- let n = St(e, t);
768
- if (Ot(e, t, n), Et > 3) return null;
769
- let r = t + Dt, i = e.charCodeAt(r);
792
+ function Ft(e, t) {
793
+ let n = Tt(e, t);
794
+ if (jt(e, t, n), kt > 3) return null;
795
+ let r = t + At, i = e.charCodeAt(r);
770
796
  if (i !== b && i !== C && i !== w) return null;
771
797
  let a = 0;
772
798
  for (; r < n;) {
@@ -776,37 +802,37 @@ function Mt(e, t) {
776
802
  r++;
777
803
  }
778
804
  return a < 3 ? null : {
779
- node: { type: K.breakThematic },
805
+ node: { type: q.breakThematic },
780
806
  end: $(e, n)
781
807
  };
782
808
  }
783
- function Nt(e, t, n) {
784
- let r = St(e, t);
785
- if (Ot(e, t, r), Et > 3) return null;
786
- let i = Et, a = t + Dt, o = e.charCodeAt(a);
809
+ function It(e, t, n) {
810
+ let r = Tt(e, t);
811
+ if (jt(e, t, r), kt > 3) return null;
812
+ let i = kt, a = t + At, o = e.charCodeAt(a);
787
813
  if (o !== p && o !== m) return null;
788
- let s = Tt(e, a, r, o);
814
+ let s = Ot(e, a, r, o);
789
815
  if (s < 3) return null;
790
816
  a += s;
791
- let c = Ct(e, a, r), d = r;
817
+ let c = Et(e, a, r), d = r;
792
818
  if (o === p) {
793
819
  for (let t = c; t < r; t++) if (e.charCodeAt(t) === p) return null;
794
820
  }
795
821
  for (; d > c && (e.charCodeAt(d - 1) === l || e.charCodeAt(d - 1) === u);) d--;
796
822
  let h = e.slice(c, d), g = "", _ = "", v = h.indexOf(" ");
797
- v === -1 ? g = h : (g = h.slice(0, v), _ = h.slice(v + 1).trim()), g = vt(g);
823
+ v === -1 ? g = h : (g = h.slice(0, v), _ = h.slice(v + 1).trim()), g = xt(g);
798
824
  var y = void 0;
799
825
  if (_) {
800
- ot.lastIndex = 0;
801
- for (var b; (b = ot.exec(_)) !== null;) y ||= {}, y[b[1]] = b[2] === void 0 ? b[3] : b[2];
826
+ lt.lastIndex = 0;
827
+ for (var b; (b = lt.exec(_)) !== null;) y ||= {}, y[b[1]] = b[2] === void 0 ? b[3] : b[2];
802
828
  }
803
829
  let x = $(e, r), S = x, C = e.length;
804
830
  for (; S < e.length;) {
805
- let t = St(e, S);
806
- if (Ot(e, S, t), Et < 4) {
807
- let n = S + Dt;
808
- var w = Tt(e, n, t, o);
809
- if (w >= s && kt(e, n + w, t)) {
831
+ let t = Tt(e, S);
832
+ if (jt(e, S, t), kt < 4) {
833
+ let n = S + At;
834
+ var w = Ot(e, n, t, o);
835
+ if (w >= s && Mt(e, n + w, t)) {
810
836
  C = $(e, t);
811
837
  break;
812
838
  }
@@ -818,14 +844,14 @@ function Nt(e, t, n) {
818
844
  else {
819
845
  T = "";
820
846
  for (var E = x; E < S;) {
821
- var D = St(e, E);
822
- Ot(e, E, D), T += e.slice(E + Math.min(Dt, i), D) + "\n", E = $(e, D);
847
+ var D = Tt(e, E);
848
+ jt(e, E, D), T += e.slice(E + Math.min(At, i), D) + "\n", E = $(e, D);
823
849
  }
824
850
  T.length > 0 && T.charCodeAt(T.length - 1) === f && (T = T.slice(0, -1));
825
851
  }
826
852
  return {
827
853
  node: {
828
- type: K.codeBlock,
854
+ type: q.codeBlock,
829
855
  lang: g || void 0,
830
856
  text: T,
831
857
  infoString: _ || void 0,
@@ -834,19 +860,19 @@ function Nt(e, t, n) {
834
860
  end: C
835
861
  };
836
862
  }
837
- function Pt(e, t) {
838
- if (Ot(e, t, St(e, t)), Et < 4) return null;
863
+ function Lt(e, t) {
864
+ if (jt(e, t, Tt(e, t)), kt < 4) return null;
839
865
  let n = "", r = t;
840
866
  for (; r < e.length;) {
841
- let t = St(e, r);
842
- if (Ot(e, r, t), kt(e, r, t)) {
867
+ let t = Tt(e, r);
868
+ if (jt(e, r, t), Mt(e, r, t)) {
843
869
  for (var i = 0, a = $(e, t); a < e.length;) {
844
- var o = St(e, a);
845
- if (kt(e, a, o)) {
870
+ var o = Tt(e, a);
871
+ if (Mt(e, a, o)) {
846
872
  i++, a = $(e, o);
847
873
  continue;
848
874
  }
849
- if (Ot(e, a, o), Et >= 4) {
875
+ if (jt(e, a, o), kt >= 4) {
850
876
  for (var s = 0; s <= i; s++) n += "\n";
851
877
  r = a;
852
878
  break;
@@ -856,7 +882,7 @@ function Pt(e, t) {
856
882
  if (r !== a) break;
857
883
  continue;
858
884
  }
859
- if (Et < 4) break;
885
+ if (kt < 4) break;
860
886
  let f = 0, m = 0;
861
887
  var c = 0;
862
888
  for (let n = r; n < t && m < 4; n++) {
@@ -874,7 +900,7 @@ function Pt(e, t) {
874
900
  for (; n.length > 0 && n.charCodeAt(n.length - 1) === f;) n = n.slice(0, -1);
875
901
  return n ? {
876
902
  node: {
877
- type: K.codeBlock,
903
+ type: q.codeBlock,
878
904
  lang: void 0,
879
905
  text: n,
880
906
  infoString: void 0,
@@ -883,18 +909,18 @@ function Pt(e, t) {
883
909
  end: r
884
910
  } : null;
885
911
  }
886
- function Ft(e, t, n, r) {
887
- if (Ot(e, t, St(e, t)), Et > 3) return null;
888
- let i = t + Dt;
912
+ function Rt(e, t, n, r) {
913
+ if (jt(e, t, Tt(e, t)), kt > 3) return null;
914
+ let i = t + At;
889
915
  if (e.charCodeAt(i) !== _) return null;
890
916
  let a = "", o = t, s, c = !1, d = !1, f = !1;
891
917
  for (; o < e.length;) {
892
- let t = St(e, o);
893
- Ot(e, o, t);
894
- let n = o + Dt;
918
+ let t = Tt(e, o);
919
+ jt(e, o, t);
920
+ let n = o + At;
895
921
  if (e.charCodeAt(n) === _) {
896
922
  let r = n + 1;
897
- var h = Et + 1, g = !1;
923
+ var h = kt + 1, g = !1;
898
924
  if (r < t) {
899
925
  var y = e.charCodeAt(r);
900
926
  y === l ? (r++, h++, g = !0) : y === u && (g = !0);
@@ -924,13 +950,13 @@ function Ft(e, t, n, r) {
924
950
  a += x + "\n";
925
951
  var N = x.trimStart();
926
952
  N.startsWith("```") || N.startsWith("~~~") ? f = !f : x.startsWith(" ") || x.startsWith(" ") ? f = !0 : N.length > 0 && !f && (f = !1), d = N.length > 0, o = $(e, t);
927
- } else if (a && !kt(e, o, t) && d) {
928
- if (Et < 4) {
929
- var P = o + Dt, F = P < t ? e.charCodeAt(P) : 0;
930
- if (F === v || F === _ || F === p || F === m || F === T || (F === b || F === C || F === w) && Mt(e, o) || (F === b || F === C || F === oe) && P + 1 < t && (e.charCodeAt(P + 1) === l || e.charCodeAt(P + 1) === u)) break;
931
- if (F >= V && F <= H) {
932
- for (var I = P; I < t && e.charCodeAt(I) >= V && e.charCodeAt(I) <= H;) I++;
933
- if (I < t && (e.charCodeAt(I) === ie || e.charCodeAt(I) === de)) break;
953
+ } else if (a && !Mt(e, o, t) && d) {
954
+ if (kt < 4) {
955
+ var P = o + At, F = P < t ? e.charCodeAt(P) : 0;
956
+ if (F === v || F === _ || F === p || F === m || F === T || (F === b || F === C || F === w) && Ft(e, o) || (F === b || F === C || F === oe) && P + 1 < t && (e.charCodeAt(P + 1) === l || e.charCodeAt(P + 1) === u)) break;
957
+ if (F >= H && F <= U) {
958
+ for (var I = P; I < t && e.charCodeAt(I) >= H && e.charCodeAt(I) <= U;) I++;
959
+ if (I < t && (e.charCodeAt(I) === z || e.charCodeAt(I) === ue)) break;
934
960
  }
935
961
  }
936
962
  if (f) break;
@@ -940,45 +966,45 @@ function Ft(e, t, n, r) {
940
966
  if (!a && !s) return null;
941
967
  var { inBlockQuote: ee, g: L } = n;
942
968
  n.inBlockQuote = !0, c && (n.g = !0);
943
- let R = wn(a || "", n, r);
969
+ let R = Dn(a || "", n, r);
944
970
  return n.inBlockQuote = ee, n.g = L, {
945
971
  node: {
946
- type: K.blockQuote,
972
+ type: q.blockQuote,
947
973
  children: R,
948
974
  alert: s || void 0
949
975
  },
950
976
  end: o
951
977
  };
952
978
  }
953
- function It(e, t, n) {
979
+ function zt(e, t, n) {
954
980
  for (var r = 0, i = t; i < n; i++) e.charCodeAt(i) === u ? r += 4 - r % 4 : r++;
955
981
  return r;
956
982
  }
957
- function Lt(e, t, n) {
958
- if (Ot(e, t, n), Et > 3) return null;
959
- var r = t + Dt;
983
+ function Bt(e, t, n) {
984
+ if (jt(e, t, n), kt > 3) return null;
985
+ var r = t + At;
960
986
  if (r >= n) return null;
961
- var i = e.charCodeAt(r), a = Et, o = r;
987
+ var i = e.charCodeAt(r), a = kt, o = r;
962
988
  if (i === b || i === C || i === oe) {
963
989
  if (o = r + 1, o < n && e.charCodeAt(o) !== l && e.charCodeAt(o) !== u && e.charCodeAt(o) !== f) return null;
964
- } else if (i >= V && i <= H) {
990
+ } else if (i >= H && i <= U) {
965
991
  for (var s = r; s < n && s - r < 9;) {
966
992
  var c = e.charCodeAt(s);
967
- if (c < V || c > H) break;
993
+ if (c < H || c > U) break;
968
994
  s++;
969
995
  }
970
996
  if (s > r && s < n) {
971
997
  var d = e.charCodeAt(s);
972
- if (d === ie || d === de) {
998
+ if (d === z || d === ue) {
973
999
  if (o = s + 1, o < n && e.charCodeAt(o) !== l && e.charCodeAt(o) !== u && e.charCodeAt(o) !== f) return null;
974
1000
  } else return null;
975
1001
  } else return null;
976
1002
  } else return null;
977
- var p = o, m = It(e, t, o), h = 0, g = p, _ = m;
1003
+ var p = o, m = zt(e, t, o), h = 0, g = p, _ = m;
978
1004
  if (p >= n) return {
979
- ordered: i >= V && i <= H,
980
- marker: i >= V && i <= H ? e[s] : e[r],
981
- start: i >= V && i <= H ? parseInt(e.slice(r, s), 10) : void 0,
1005
+ ordered: i >= H && i <= U,
1006
+ marker: i >= H && i <= U ? e[s] : e[r],
1007
+ start: i >= H && i <= U ? parseInt(e.slice(r, s), 10) : void 0,
982
1008
  contentStart: p,
983
1009
  contentCol: m + 1,
984
1010
  markerCol: a,
@@ -993,24 +1019,24 @@ function Lt(e, t, n) {
993
1019
  }
994
1020
  var y = g >= n, x = _ - m;
995
1021
  return y || x > 4 ? (_ = m + 1, g = p + 1, h = 1) : h === 0 && (_ = m + 1, g = p, h = 1), {
996
- ordered: i >= V && i <= H,
997
- marker: i >= V && i <= H ? e[s] : e[r],
998
- start: i >= V && i <= H ? parseInt(e.slice(r, s), 10) : void 0,
1022
+ ordered: i >= H && i <= U,
1023
+ marker: i >= H && i <= U ? e[s] : e[r],
1024
+ start: i >= H && i <= U ? parseInt(e.slice(r, s), 10) : void 0,
999
1025
  contentStart: g,
1000
1026
  contentCol: _,
1001
1027
  markerCol: a,
1002
1028
  isEmpty: y
1003
1029
  };
1004
1030
  }
1005
- var Rt = 0;
1006
- function zt(e, t, n, r) {
1031
+ var Vt = 0;
1032
+ function Ht(e, t, n, r) {
1007
1033
  var i = 0, a = t;
1008
- for (Rt = 0; a < n && i < r;) {
1034
+ for (Vt = 0; a < n && i < r;) {
1009
1035
  var o = e.charCodeAt(a);
1010
1036
  if (o === u) {
1011
1037
  var s = 4 - i % 4;
1012
1038
  if (i + s > r) {
1013
- Rt = i + s - r, a++, i = r;
1039
+ Vt = i + s - r, a++, i = r;
1014
1040
  break;
1015
1041
  }
1016
1042
  i += s;
@@ -1020,8 +1046,8 @@ function zt(e, t, n, r) {
1020
1046
  }
1021
1047
  return a;
1022
1048
  }
1023
- function Bt(e, t, n, r) {
1024
- var i = St(e, t), a = Lt(e, t, i);
1049
+ function Ut(e, t, n, r) {
1050
+ var i = Tt(e, t), a = Bt(e, t, i);
1025
1051
  if (!a) return null;
1026
1052
  var o = [], s = t, c = a.contentCol, g = "", y = a.isEmpty, x = !1, S = !1;
1027
1053
  if (!a.isEmpty) {
@@ -1030,7 +1056,7 @@ function Bt(e, t, n, r) {
1030
1056
  break;
1031
1057
  }
1032
1058
  if (E) {
1033
- var k = "", A = It(e, t, a.contentStart), j = A - a.contentCol;
1059
+ var k = "", A = zt(e, t, a.contentStart), j = A - a.contentCol;
1034
1060
  if (j > 0) for (var M = 0; M < j; M++) k += " ";
1035
1061
  for (var N = a.contentStart; N < i; N++) if (e.charCodeAt(N) === u) {
1036
1062
  for (var P = 4 - A % 4, F = 0; F < P; F++) k += " ";
@@ -1040,11 +1066,11 @@ function Bt(e, t, n, r) {
1040
1066
  } else g = e.slice(a.contentStart, i) + "\n";
1041
1067
  }
1042
1068
  for (s = $(e, i); s < e.length;) {
1043
- var I = St(e, s);
1044
- Ot(e, s, I);
1045
- var ee = e.charCodeAt(s + Dt);
1046
- if (Et < c && (ee === b || ee === C || ee === w) && Et <= 3 && Mt(e, s)) break;
1047
- var L = Lt(e, s, I);
1069
+ var I = Tt(e, s);
1070
+ jt(e, s, I);
1071
+ var ee = e.charCodeAt(s + At);
1072
+ if (kt < c && (ee === b || ee === C || ee === w) && kt <= 3 && Ft(e, s)) break;
1073
+ var L = Bt(e, s, I);
1048
1074
  if (L && L.ordered === a.ordered && L.marker === a.marker && L.markerCol < c) {
1049
1075
  o.push({
1050
1076
  contentCol: c,
@@ -1054,7 +1080,7 @@ function Bt(e, t, n, r) {
1054
1080
  }), x && (S = !0), c = L.contentCol, y = L.isEmpty, x = !1, g = L.isEmpty ? "" : e.slice(L.contentStart, I) + "\n", s = $(e, I);
1055
1081
  continue;
1056
1082
  }
1057
- if (kt(e, s, I)) {
1083
+ if (Mt(e, s, I)) {
1058
1084
  g += "\n", s = $(e, I);
1059
1085
  for (var R = !1, te = 0; te < g.length; te++) {
1060
1086
  var ne = g.charCodeAt(te);
@@ -1064,48 +1090,48 @@ function Bt(e, t, n, r) {
1064
1090
  }
1065
1091
  }
1066
1092
  if (y && !R) if (s < e.length) {
1067
- var re = St(e, s), ie = Lt(e, s, re);
1068
- if (!ie || ie.ordered !== a.ordered || ie.marker !== a.marker) break;
1093
+ var re = Tt(e, s), z = Bt(e, s, re);
1094
+ if (!z || z.ordered !== a.ordered || z.marker !== a.marker) break;
1069
1095
  x = !0;
1070
1096
  } else break;
1071
1097
  if (s < e.length) {
1072
- var ae = St(e, s);
1073
- Ot(e, s, ae);
1074
- var z = e.charCodeAt(s + Dt);
1075
- if ((z === b || z === C || z === w) && Et <= 3 && Mt(e, s)) break;
1076
- var B = Lt(e, s, ae);
1077
- if (B && B.ordered === a.ordered && B.marker === a.marker && B.markerCol < c) {
1098
+ var ie = Tt(e, s);
1099
+ jt(e, s, ie);
1100
+ var B = e.charCodeAt(s + At);
1101
+ if ((B === b || B === C || B === w) && kt <= 3 && Ft(e, s)) break;
1102
+ var ae = Bt(e, s, ie);
1103
+ if (ae && ae.ordered === a.ordered && ae.marker === a.marker && ae.markerCol < c) {
1078
1104
  x = !0;
1079
1105
  continue;
1080
1106
  }
1081
- if (!kt(e, s, ae) && Et < c) break;
1107
+ if (!Mt(e, s, ie) && kt < c) break;
1082
1108
  }
1083
1109
  continue;
1084
1110
  }
1085
- if (Et >= c) {
1086
- var se = zt(e, s, I, c);
1087
- if (Rt > 0) {
1088
- for (var ce = "", le = c, ue = 0; ue < Rt; ue++) ce += " ", le++;
1089
- for (var de = se; de < I; de++) if (e.charCodeAt(de) === u) {
1090
- for (var fe = 4 - le % 4, pe = 0; pe < fe; pe++) ce += " ";
1091
- le += fe;
1092
- } else ce += e[de], le++;
1093
- g += ce + "\n";
1094
- } else g += e.slice(se, I) + "\n";
1111
+ if (kt >= c) {
1112
+ var V = Ht(e, s, I, c);
1113
+ if (Vt > 0) {
1114
+ for (var se = "", ce = c, le = 0; le < Vt; le++) se += " ", ce++;
1115
+ for (var ue = V; ue < I; ue++) if (e.charCodeAt(ue) === u) {
1116
+ for (var de = 4 - ce % 4, fe = 0; fe < de; fe++) se += " ";
1117
+ ce += de;
1118
+ } else se += e[ue], ce++;
1119
+ g += se + "\n";
1120
+ } else g += e.slice(V, I) + "\n";
1095
1121
  s = $(e, I);
1096
1122
  continue;
1097
1123
  }
1098
- for (var U = !1, W = 0; W < g.length; W++) {
1099
- var G = g.charCodeAt(W);
1100
- if (G !== f && G !== d && G !== l && G !== u) {
1101
- U = !0;
1124
+ for (var W = !1, G = 0; G < g.length; G++) {
1125
+ var K = g.charCodeAt(G);
1126
+ if (K !== f && K !== d && K !== l && K !== u) {
1127
+ W = !0;
1102
1128
  break;
1103
1129
  }
1104
1130
  }
1105
- if (!x && U && !y) {
1106
- var me = s + Dt, he = e.charCodeAt(me);
1107
- if (!(he === v || he === _ || he === T || he === p || he === m || (he === b || he === C || he === w || he === oe) && (Mt(e, s) !== null || Lt(e, s, I) !== null) || he >= V && he <= H && Lt(e, s, I) !== null)) {
1108
- g += "" + e.slice(me, I) + "\n", s = $(e, I);
1131
+ if (!x && W && !y) {
1132
+ var pe = s + At, me = e.charCodeAt(pe);
1133
+ if (!(me === v || me === _ || me === T || me === p || me === m || (me === b || me === C || me === w || me === oe) && (Ft(e, s) !== null || Bt(e, s, I) !== null) || me >= H && me <= U && Bt(e, s, I) !== null)) {
1134
+ g += "" + e.slice(pe, I) + "\n", s = $(e, I);
1109
1135
  continue;
1110
1136
  }
1111
1137
  }
@@ -1117,69 +1143,69 @@ function Bt(e, t, n, r) {
1117
1143
  hasBlankAfter: x,
1118
1144
  isEmpty: y
1119
1145
  }), o.length === 0) return null;
1120
- var ge = S;
1121
- if (!ge) for (var _e = 0; _e < o.length; _e++) {
1122
- if (o[_e].hasBlankAfter && _e < o.length - 1) {
1123
- ge = !0;
1146
+ var he = S;
1147
+ if (!he) for (var ge = 0; ge < o.length; ge++) {
1148
+ if (o[ge].hasBlankAfter && ge < o.length - 1) {
1149
+ he = !0;
1124
1150
  break;
1125
1151
  }
1126
- if (!o[_e].isEmpty) {
1127
- for (var ve = o[_e].raw, q = ve.length, J = 0, ye = !1, be = !1, xe = !1, Se = !1, Y = 0, Ce = 0, X = -1; J < q;) {
1128
- var Z = ve.indexOf("\n", J);
1129
- if (Z < 0 && (Z = q), Se) {
1130
- Ot(ve, J, Z);
1131
- for (var we = ve.slice(J + Dt, Z), Q = 0; Q < we.length && we.charCodeAt(Q) === Y;) Q++;
1132
- Q >= Ce && we.slice(Q).trim() === "" && (Se = !1), J = Z < q ? Z + 1 : q;
1152
+ if (!o[ge].isEmpty) {
1153
+ for (var _e = o[ge].raw, J = _e.length, Y = 0, ve = !1, ye = !1, be = !1, xe = !1, Se = 0, Ce = 0, X = -1; Y < J;) {
1154
+ var Z = _e.indexOf("\n", Y);
1155
+ if (Z < 0 && (Z = J), xe) {
1156
+ jt(_e, Y, Z);
1157
+ for (var we = _e.slice(Y + At, Z), Q = 0; Q < we.length && we.charCodeAt(Q) === Se;) Q++;
1158
+ Q >= Ce && we.slice(Q).trim() === "" && (xe = !1), Y = Z < J ? Z + 1 : J;
1133
1159
  continue;
1134
1160
  }
1135
- if (kt(ve, J, Z)) {
1136
- X >= 0 ? xe = !0 : ye && (be = !0), J = Z < q ? Z + 1 : q;
1161
+ if (Mt(_e, Y, Z)) {
1162
+ X >= 0 ? be = !0 : ve && (ye = !0), Y = Z < J ? Z + 1 : J;
1137
1163
  continue;
1138
1164
  }
1139
- if (Ot(ve, J, Z), X >= 0) {
1140
- if (Et >= X) {
1141
- J = Z < q ? Z + 1 : q;
1165
+ if (jt(_e, Y, Z), X >= 0) {
1166
+ if (kt >= X) {
1167
+ Y = Z < J ? Z + 1 : J;
1142
1168
  continue;
1143
1169
  }
1144
- var Te = Lt(ve, J, Z);
1170
+ var Te = Bt(_e, Y, Z);
1145
1171
  if (Te && Te.markerCol < X && Te.contentCol <= X) {
1146
- J = Z < q ? Z + 1 : q;
1172
+ Y = Z < J ? Z + 1 : J;
1147
1173
  continue;
1148
1174
  }
1149
1175
  if (Te) {
1150
- J = Z < q ? Z + 1 : q;
1176
+ Y = Z < J ? Z + 1 : J;
1151
1177
  continue;
1152
1178
  }
1153
- X = -1, xe &&= (be = !0, !1);
1179
+ X = -1, be &&= (ye = !0, !1);
1154
1180
  }
1155
- var Ee = ve.slice(J + Dt, Z), De = Ee.charCodeAt(0);
1156
- if ((De === p || De === m) && Et <= 3) {
1181
+ var Ee = _e.slice(Y + At, Z), De = Ee.charCodeAt(0);
1182
+ if ((De === p || De === m) && kt <= 3) {
1157
1183
  for (var Oe = 0; Oe < Ee.length && Ee.charCodeAt(Oe) === De;) Oe++;
1158
1184
  if (Oe >= 3) {
1159
- if (be && ye) {
1160
- ge = !0;
1185
+ if (ye && ve) {
1186
+ he = !0;
1161
1187
  break;
1162
1188
  }
1163
- Se = !0, Y = De, Ce = Oe, ye = !0, J = Z < q ? Z + 1 : q;
1189
+ xe = !0, Se = De, Ce = Oe, ve = !0, Y = Z < J ? Z + 1 : J;
1164
1190
  continue;
1165
1191
  }
1166
1192
  }
1167
- var ke = Et <= 3 ? Lt(ve, J, Z) : null;
1168
- if (ke && ye) {
1169
- if (be) {
1170
- ge = !0;
1193
+ var ke = kt <= 3 ? Bt(_e, Y, Z) : null;
1194
+ if (ke && ve) {
1195
+ if (ye) {
1196
+ he = !0;
1171
1197
  break;
1172
1198
  }
1173
- X = ke.contentCol, xe = !1, J = Z < q ? Z + 1 : q, ye = !0;
1199
+ X = ke.contentCol, be = !1, Y = Z < J ? Z + 1 : J, ve = !0;
1174
1200
  continue;
1175
1201
  }
1176
- if (be) {
1177
- ge = !0;
1202
+ if (ye) {
1203
+ he = !0;
1178
1204
  break;
1179
1205
  }
1180
- ye = !0, J = Z < q ? Z + 1 : q;
1206
+ ve = !0, Y = Z < J ? Z + 1 : J;
1181
1207
  }
1182
- if (ge) break;
1208
+ if (he) break;
1183
1209
  }
1184
1210
  }
1185
1211
  for (var Ae = [], je = 0; je < o.length; je++) {
@@ -1188,20 +1214,20 @@ function Bt(e, t, n, r) {
1188
1214
  if (Fe.length >= 3 && Fe.charCodeAt(0) === h) {
1189
1215
  var Le = Fe[1];
1190
1216
  (Le === " " || Le === "x" || Le === "X") && Fe.charCodeAt(2) === D && (Ie = {
1191
- type: K.gfmTask,
1217
+ type: q.gfmTask,
1192
1218
  completed: Le === "x" || Le === "X"
1193
1219
  }, Fe = Fe.slice(3));
1194
1220
  }
1195
1221
  var Re;
1196
1222
  if (Me.isEmpty && Fe.trim() === "") Re = [];
1197
- else if (ge) {
1223
+ else if (he) {
1198
1224
  var ze = n.inList;
1199
- n.inList = !0, Re = wn(Fe, n, r), n.inList = ze;
1225
+ n.inList = !0, Re = Dn(Fe, n, r), n.inList = ze;
1200
1226
  } else {
1201
1227
  var Be = n.inList;
1202
- if (n.inList = !0, Re = wn(Fe, n, r), n.inList = Be, Re.length === 1 && Re[0].type === K.paragraph) Re = Re[0].children;
1228
+ if (n.inList = !0, Re = Dn(Fe, n, r), n.inList = Be, Re.length === 1 && Re[0].type === q.paragraph) Re = Re[0].children;
1203
1229
  else {
1204
- for (var Ve = [], He = 0; He < Re.length; He++) if (Re[He].type === K.paragraph) for (var Ue = Re[He].children, We = 0; We < Ue.length; We++) Ve.push(Ue[We]);
1230
+ for (var Ve = [], He = 0; He < Re.length; He++) if (Re[He].type === q.paragraph) for (var Ue = Re[He].children, We = 0; We < Ue.length; We++) Ve.push(Ue[We]);
1205
1231
  else Ve.push(Re[He]);
1206
1232
  Re = Ve;
1207
1233
  }
@@ -1209,7 +1235,7 @@ function Bt(e, t, n, r) {
1209
1235
  Ae.push(Ie ? [
1210
1236
  Ie,
1211
1237
  {
1212
- type: K.text,
1238
+ type: q.text,
1213
1239
  text: " "
1214
1240
  },
1215
1241
  ...Re
@@ -1217,15 +1243,15 @@ function Bt(e, t, n, r) {
1217
1243
  }
1218
1244
  return {
1219
1245
  node: {
1220
- type: a.ordered ? K.orderedList : K.unorderedList,
1246
+ type: a.ordered ? q.orderedList : q.unorderedList,
1221
1247
  start: a.ordered ? a.start : void 0,
1222
1248
  items: Ae
1223
1249
  },
1224
1250
  end: s
1225
1251
  };
1226
1252
  }
1227
- var Vt = new Set(/* @__PURE__ */ "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.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul".split("."));
1228
- function Ht(e, t, n) {
1253
+ var Wt = new Set(/* @__PURE__ */ "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.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul".split("."));
1254
+ function Gt(e, t, n) {
1229
1255
  let r = {};
1230
1256
  for (let [o, s] of Object.entries(e)) {
1231
1257
  let e = o, c = o.toLowerCase();
@@ -1233,7 +1259,7 @@ function Ht(e, t, n) {
1233
1259
  let t = {}, n = [], i = 0, a = 0;
1234
1260
  for (let e = 0; e < s.length; e++) {
1235
1261
  let t = s.charCodeAt(e);
1236
- t === ue ? i++ : t === de ? i-- : t === ne && i === 0 && (n.push(s.slice(a, e)), a = e + 1);
1262
+ t === le ? i++ : t === ue ? i-- : t === ne && i === 0 && (n.push(s.slice(a, e)), a = e + 1);
1237
1263
  }
1238
1264
  a < s.length && n.push(s.slice(a));
1239
1265
  let o = !1;
@@ -1254,11 +1280,11 @@ function Ht(e, t, n) {
1254
1280
  let i = n.sanitizer(s, t, c);
1255
1281
  i !== null && (r[e] = i);
1256
1282
  } else if (s === "") r[e] = !0;
1257
- else if (s.length >= 2 && s.charCodeAt(0) === ce && s.charCodeAt(s.length - 1) === le) {
1283
+ else if (s.length >= 2 && s.charCodeAt(0) === se && s.charCodeAt(s.length - 1) === ce) {
1258
1284
  var i = s.slice(1, -1);
1259
1285
  if (i.length > 0) {
1260
1286
  var a = i.charCodeAt(0);
1261
- if (a === h || a === ce) try {
1287
+ if (a === h || a === se) try {
1262
1288
  r[e] = JSON.parse(i);
1263
1289
  continue;
1264
1290
  } catch {}
@@ -1280,17 +1306,17 @@ function Ht(e, t, n) {
1280
1306
  }
1281
1307
  return r;
1282
1308
  }
1283
- function Ut(e, t, n) {
1309
+ function Kt(e, t, n) {
1284
1310
  let r = t.length;
1285
1311
  if (r === 0) return n;
1286
1312
  var i = t.charCodeAt(0);
1287
- if (!(i >= U && i <= W || i >= G && i <= me)) {
1313
+ if (!(i >= W && i <= G || i >= K && i <= pe)) {
1288
1314
  for (var a = String.fromCharCode(i), o = e.length - r, s = n; s <= o;) {
1289
1315
  var c = e.indexOf(a, s);
1290
1316
  if (c === -1 || c > o) return -1;
1291
1317
  for (var l = !0, u = 1; u < r; u++) {
1292
1318
  var d = e.charCodeAt(c + u), f = t.charCodeAt(u);
1293
- if (d >= U && d <= W && (d += ge), f >= U && f <= W && (f += ge), d !== f) {
1319
+ if (d >= W && d <= G && (d += he), f >= W && f <= G && (f += he), d !== f) {
1294
1320
  l = !1;
1295
1321
  break;
1296
1322
  }
@@ -1300,14 +1326,14 @@ function Ut(e, t, n) {
1300
1326
  }
1301
1327
  return -1;
1302
1328
  }
1303
- i >= U && i <= W && (i += ge);
1329
+ i >= W && i <= G && (i += he);
1304
1330
  for (let a = n; a <= e.length - r; a++) {
1305
1331
  var p = e.charCodeAt(a);
1306
- if (p >= U && p <= W && (p += ge), p !== i) continue;
1332
+ if (p >= W && p <= G && (p += he), p !== i) continue;
1307
1333
  let n = !0;
1308
1334
  for (let i = 1; i < r; i++) {
1309
1335
  let r = e.charCodeAt(a + i), o = t.charCodeAt(i);
1310
- if (r >= U && r <= W && (r += ge), o >= U && o <= W && (o += ge), r !== o) {
1336
+ if (r >= W && r <= G && (r += he), o >= W && o <= G && (o += he), r !== o) {
1311
1337
  n = !1;
1312
1338
  break;
1313
1339
  }
@@ -1316,17 +1342,17 @@ function Ut(e, t, n) {
1316
1342
  }
1317
1343
  return -1;
1318
1344
  }
1319
- function Wt(e, t, n) {
1345
+ function qt(e, t, n) {
1320
1346
  let r = t.length;
1321
1347
  var i = t.charCodeAt(0);
1322
- i >= U && i <= W && (i += ge);
1348
+ i >= W && i <= G && (i += he);
1323
1349
  for (let o = Math.min(n, e.length - r); o >= 0; o--) {
1324
1350
  var a = e.charCodeAt(o);
1325
- if (a >= U && a <= W && (a += ge), a !== i) continue;
1351
+ if (a >= W && a <= G && (a += he), a !== i) continue;
1326
1352
  let n = !0;
1327
1353
  for (let i = 1; i < r; i++) {
1328
1354
  let r = e.charCodeAt(o + i), a = t.charCodeAt(i);
1329
- if (r >= U && r <= W && (r += ge), a >= U && a <= W && (a += ge), r !== a) {
1355
+ if (r >= W && r <= G && (r += he), a >= W && a <= G && (a += he), r !== a) {
1330
1356
  n = !1;
1331
1357
  break;
1332
1358
  }
@@ -1335,19 +1361,19 @@ function Wt(e, t, n) {
1335
1361
  }
1336
1362
  return -1;
1337
1363
  }
1338
- var Gt = -1;
1339
- function Kt(e, t, n) {
1364
+ var Jt = -1;
1365
+ function Yt(e, t, n) {
1340
1366
  let r = n.toLowerCase(), i = "<" + r, a = "</" + r, o = 1, s = t, c = e.length;
1341
- for (Gt = -1; s < c && o > 0;) {
1342
- let t = Ut(e, i, s), n = Ut(e, a, s);
1367
+ for (Jt = -1; s < c && o > 0;) {
1368
+ let t = Kt(e, i, s), n = Kt(e, a, s);
1343
1369
  if (n === -1) return -1;
1344
1370
  if (t !== -1 && t < n) {
1345
- let n = ut(e, t);
1371
+ let n = pt(e, t);
1346
1372
  n ? (n.tag.toLowerCase() === r && !n.isClosing && !n.selfClosing && !Te(n.tag) && o++, s = n.end) : s = t + 1;
1347
1373
  } else {
1348
1374
  var d = n + a.length, p = d < c ? e.charCodeAt(d) : 62;
1349
1375
  if ((p === _ || p === l || p === u || p === f) && (o--, o === 0)) {
1350
- Gt = n;
1376
+ Jt = n;
1351
1377
  let t = n + a.length;
1352
1378
  for (; t < c && e.charCodeAt(t) !== _;) t++;
1353
1379
  return t + 1;
@@ -1357,23 +1383,23 @@ function Kt(e, t, n) {
1357
1383
  }
1358
1384
  return -1;
1359
1385
  }
1360
- function qt(e, t, n, r) {
1386
+ function Xt(e, t, n, r) {
1361
1387
  if (r.ignoreHTMLBlocks || r.disableParsingRawHTML) return null;
1362
- var i = St(e, t);
1363
- if (Ot(e, t, i), Et > 3 && !n.inHTML) return null;
1364
- var a = t + Dt;
1388
+ var i = Tt(e, t);
1389
+ if (jt(e, t, i), kt > 3 && !n.inHTML) return null;
1390
+ var a = t + At;
1365
1391
  if (e.charCodeAt(a) !== T) return null;
1366
1392
  var o = e.indexOf(">", a + 1);
1367
1393
  if (o !== -1 && o < i) {
1368
1394
  var s = e.slice(a + 1, o);
1369
1395
  if (/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(s) || /^[^\s@]+@[^\s@]+$/.test(s)) return null;
1370
1396
  }
1371
- var c = Jt(e, a);
1397
+ var c = Zt(e, a);
1372
1398
  if (c >= 1 && c <= 5) {
1373
1399
  var d = e.length;
1374
1400
  if (c === 1) {
1375
- for (var p = e.length, m = 0; m < $e.length; m++) {
1376
- var h = Ut(e, "</" + $e[m] + ">", a);
1401
+ for (var p = e.length, m = 0; m < nt.length; m++) {
1402
+ var h = Kt(e, "</" + nt[m] + ">", a);
1377
1403
  h >= 0 && h < p && (p = h);
1378
1404
  }
1379
1405
  if (p < e.length) {
@@ -1387,19 +1413,18 @@ function qt(e, t, n, r) {
1387
1413
  var b = e.slice(a, d);
1388
1414
  if (c >= 2) return {
1389
1415
  node: {
1390
- type: K.htmlComment,
1416
+ type: q.htmlComment,
1391
1417
  text: b,
1392
1418
  h: !1,
1393
- raw: !0,
1394
- endPos: d
1419
+ raw: !0
1395
1420
  },
1396
1421
  end: d
1397
1422
  };
1398
1423
  var x = "div", S = b.match(/^<\/?([a-zA-Z][a-zA-Z0-9-]*)/);
1399
1424
  S && (x = S[1]);
1400
- var C = ut(e, a), w = {}, E;
1401
- C && !C.isClosing && (w = Ht(C.attrs, x, r), E = C.whitespaceBeforeAttrs + C.rawAttrs);
1402
- var D = [], O = Ut(b, "</" + x.toLowerCase(), 0), k = b, A = "";
1425
+ var C = pt(e, a), w = {}, E;
1426
+ C && !C.isClosing && (w = Gt(C.attrs, x, r), E = C.whitespaceBeforeAttrs + C.rawAttrs);
1427
+ var D = [], O = Kt(b, "</" + x.toLowerCase(), 0), k = b, A = "";
1403
1428
  if (C && C.isClosing) for (k = b.slice(C.end - a); k.length > 0 && k.charCodeAt(k.length - 1) === f;) k = k.slice(0, -1);
1404
1429
  else if (C && !C.isClosing) {
1405
1430
  var j = C.end - a;
@@ -1409,7 +1434,7 @@ function qt(e, t, n, r) {
1409
1434
  }
1410
1435
  return {
1411
1436
  node: {
1412
- type: K.htmlBlock,
1437
+ type: q.htmlBlock,
1413
1438
  tag: x,
1414
1439
  attrs: w,
1415
1440
  f: E,
@@ -1417,119 +1442,113 @@ function qt(e, t, n, r) {
1417
1442
  a: k,
1418
1443
  text: A,
1419
1444
  c: !0,
1420
- b: C ? C.isClosing : !1,
1421
- endPos: d,
1422
- e: !0
1445
+ b: C ? C.isClosing : !1
1423
1446
  },
1424
1447
  end: d
1425
1448
  };
1426
1449
  }
1427
1450
  if (c === 6 || c === 7) {
1428
- var M = wt(e, t), N = M < e.length ? M : e.length, P = e.slice(a, N), L = M < e.length ? $(e, M) : e.length, R = ut(e, a);
1451
+ var M = Dt(e, t), N = M < e.length ? M : e.length, P = e.slice(a, N), L = M < e.length ? $(e, M) : e.length, R = pt(e, a);
1429
1452
  if (R) {
1430
1453
  var te = R.tag, ne = te.toLowerCase();
1431
1454
  if (R.isClosing) {
1432
1455
  var re = e.slice(R.end, N);
1433
1456
  return {
1434
1457
  node: {
1435
- type: K.htmlBlock,
1458
+ type: q.htmlBlock,
1436
1459
  tag: te,
1437
1460
  attrs: {},
1438
1461
  children: [],
1439
1462
  a: re,
1440
1463
  text: re,
1441
1464
  c: !0,
1442
- b: !0,
1443
- endPos: N,
1444
- e: c === 6
1465
+ b: !0
1445
1466
  },
1446
1467
  end: L
1447
1468
  };
1448
1469
  }
1449
1470
  if (R.selfClosing || Te(te)) return {
1450
1471
  node: {
1451
- type: K.htmlBlock,
1472
+ type: q.htmlBlock,
1452
1473
  tag: te,
1453
- attrs: Ht(R.attrs, te, r),
1474
+ attrs: Gt(R.attrs, te, r),
1454
1475
  f: R.whitespaceBeforeAttrs + R.rawAttrs,
1455
1476
  children: [],
1456
1477
  a: "",
1457
1478
  text: "",
1458
1479
  c: !1,
1459
- b: !1,
1460
- endPos: R.end,
1461
- e: c === 6
1480
+ b: !1
1462
1481
  },
1463
1482
  end: R.end < e.length && e.charCodeAt(R.end) === f ? R.end + 1 : R.end
1464
1483
  };
1465
- var ie = n.d || 0, z = e.slice(a, N), B = -1, oe = -1;
1466
- if (ie < 10) {
1467
- for (var se = "</" + ne, ce = R.end - a, le = 1, ue = ce; ue < z.length && le > 0;) {
1468
- var de = Ut(z, "<" + ne, ue), fe = Ut(z, se, ue);
1469
- if (fe === -1) break;
1470
- if (de !== -1 && de < fe) {
1471
- var pe = de + ne.length + 1;
1472
- if (pe < z.length) {
1473
- var V = z.charCodeAt(pe);
1474
- (V === l || V === u || V === f || V === _ || V === ae) && le++;
1484
+ var z = n.d || 0, B = e.slice(a, N), ae = -1, oe = -1;
1485
+ if (z < 10) {
1486
+ for (var V = "</" + ne, se = R.end - a, ce = 1, le = se; le < B.length && ce > 0;) {
1487
+ var ue = Kt(B, "<" + ne, le), de = Kt(B, V, le);
1488
+ if (de === -1) break;
1489
+ if (ue !== -1 && ue < de) {
1490
+ var fe = ue + ne.length + 1;
1491
+ if (fe < B.length) {
1492
+ var H = B.charCodeAt(fe);
1493
+ (H === l || H === u || H === f || H === _ || H === ie) && ce++;
1475
1494
  }
1476
- ue = de + 1;
1495
+ le = ue + 1;
1477
1496
  } else {
1478
- var H = fe + se.length;
1479
- if (H < z.length) {
1480
- var G = z.charCodeAt(H);
1481
- if ((G === _ || G === l || G === u || G === f) && (le--, le === 0)) {
1482
- B = fe;
1483
- for (var me = H; me < z.length && z.charCodeAt(me) !== _;) me++;
1484
- oe = me + 1;
1497
+ var U = de + V.length;
1498
+ if (U < B.length) {
1499
+ var K = B.charCodeAt(U);
1500
+ if ((K === _ || K === l || K === u || K === f) && (ce--, ce === 0)) {
1501
+ ae = de;
1502
+ for (var pe = U; pe < B.length && B.charCodeAt(pe) !== _;) pe++;
1503
+ oe = pe + 1;
1485
1504
  break;
1486
1505
  }
1487
- } else if (le--, le === 0) {
1488
- B = fe, oe = z.length;
1506
+ } else if (ce--, ce === 0) {
1507
+ ae = de, oe = B.length;
1489
1508
  break;
1490
1509
  }
1491
- ue = fe + 1;
1510
+ le = de + 1;
1492
1511
  }
1493
1512
  }
1494
- var he = !1;
1495
- if (B === -1 && c === 6 && !R.isClosing) {
1496
- var ge = Kt(e, R.end, ne);
1497
- if (ge !== -1) {
1498
- for (var _e = Gt, ve = R.end, q = !1, J = !1, ye = !1, be = 0, xe = !1, Se = !1, Y = ve; Y < _e;) {
1499
- var Ce = e.charCodeAt(Y);
1500
- if (Ce === f) Se && (q = !0), xe || be++, Se = !0, Y++;
1501
- else if (Ce === l || Ce === u) Y++;
1513
+ var me = !1;
1514
+ if (ae === -1 && c === 6 && !R.isClosing) {
1515
+ var he = Yt(e, R.end, ne);
1516
+ if (he !== -1) {
1517
+ for (var ge = Jt, _e = R.end, J = !1, Y = !1, ve = !1, ye = 0, be = !1, xe = !1, Se = _e; Se < ge;) {
1518
+ var Ce = e.charCodeAt(Se);
1519
+ if (Ce === f) xe && (J = !0), be || ye++, xe = !0, Se++;
1520
+ else if (Ce === l || Ce === u) Se++;
1502
1521
  else {
1503
- if (!xe && (xe = !0, be >= 2 && Ce === T)) {
1504
- ye = !0;
1522
+ if (!be && (be = !0, ye >= 2 && Ce === T)) {
1523
+ ve = !0;
1505
1524
  break;
1506
1525
  }
1507
- if (Se = !1, Ce === T) {
1508
- var X = e.charCodeAt(Y + 1) | 32;
1509
- if ((X === I || X === ee || X === F) && (nt.lastIndex = Y, nt.test(e))) {
1510
- J = !0;
1526
+ if (xe = !1, Ce === T) {
1527
+ var X = e.charCodeAt(Se + 1) | 32;
1528
+ if ((X === I || X === ee || X === F) && (at.lastIndex = Se, at.test(e))) {
1529
+ Y = !0;
1511
1530
  break;
1512
1531
  }
1513
1532
  }
1514
- Y++;
1533
+ Se++;
1515
1534
  }
1516
1535
  }
1517
- if (q && !ye && !J) {
1518
- var Z = St(e, ge);
1519
- N = Z, L = $(e, Z), z = e.slice(a, N), P = e.slice(a, N), B = _e - a, oe = ge - a, he = !0;
1536
+ if (J && !ve && !Y) {
1537
+ var Z = Tt(e, he);
1538
+ N = Z, L = $(e, Z), B = e.slice(a, N), P = e.slice(a, N), ae = ge - a, oe = he - a, me = !0;
1520
1539
  }
1521
1540
  }
1522
1541
  }
1523
1542
  }
1524
1543
  var we = R.rawAttrs.indexOf("\n") !== -1 || R.whitespaceBeforeAttrs.indexOf("\n") !== -1, Q = !1;
1525
- B !== -1 && (Q = z.slice(oe).trim().length === 0);
1544
+ ae !== -1 && (Q = B.slice(oe).trim().length === 0);
1526
1545
  var Ee = !1, De = N, Oe = L;
1527
- if (B !== -1) {
1528
- var ke = a + oe, Ae = St(e, ke - 1);
1546
+ if (ae !== -1) {
1547
+ var ke = a + oe, Ae = Tt(e, ke - 1);
1529
1548
  if (ke < Ae) {
1530
1549
  for (var je = ke; je < Ae && (e.charCodeAt(je) === l || e.charCodeAt(je) === u);) je++;
1531
1550
  if (je < Ae && e.charCodeAt(je) === T) {
1532
- var Me = ut(e, je);
1551
+ var Me = pt(e, je);
1533
1552
  Me && !Me.isClosing && (Ee = !0, De = ke, Oe = ke, Q = !0);
1534
1553
  }
1535
1554
  }
@@ -1537,213 +1556,202 @@ function qt(e, t, n, r) {
1537
1556
  var Ne = $(e, Ae);
1538
1557
  if (Ne < N) {
1539
1558
  for (var Pe = Ne; Pe < N && (e.charCodeAt(Pe) === l || e.charCodeAt(Pe) === u);) Pe++;
1540
- Pe < N && e.charCodeAt(Pe) === T && ut(e, Pe) && (Ee = !0, De = Ae, Oe = Ne, Q = !0);
1559
+ Pe < N && e.charCodeAt(Pe) === T && pt(e, Pe) && (Ee = !0, De = Ae, Oe = Ne, Q = !0);
1541
1560
  }
1542
1561
  }
1543
1562
  !Ee && n.inHTML && (Ee = !0, De = Ae, Oe = $(e, Ae), Q = e.slice(ke, Ae).trim().length === 0);
1544
1563
  }
1545
1564
  var Fe = [], Ie = "";
1546
- if (B !== -1) {
1547
- Ie = z.slice(R.end - a, B);
1565
+ if (ae !== -1) {
1566
+ Ie = B.slice(R.end - a, ae);
1548
1567
  var Le = Ie.trim();
1549
1568
  if (Le) {
1550
1569
  var { inline: Re, inHTML: ze, d: Be } = n;
1551
- if (n.inHTML = !0, n.d = ie + 1, ne === "p") n.inline = !0, Fe = Sn(Le, 0, Le.length, n, r);
1570
+ if (n.inHTML = !0, n.d = z + 1, ne === "p") n.inline = !0, Fe = Tn(Le, 0, Le.length, n, r);
1552
1571
  else {
1553
- var Ve = Ie.indexOf("\n\n") !== -1, He = rt.test(Le), Ue = it.test(Le), We = Ve || He || n.inHTML && Ue;
1572
+ var Ve = Ie.indexOf("\n\n") !== -1, He = ot.test(Le), Ue = st.test(Le), We = Ve || He || n.inHTML && Ue;
1554
1573
  Ie.length >= 2 && Ie.charCodeAt(0) === f && Ie.charCodeAt(Ie.length - 1) === f && !Ve && !He && !Ue ? Fe = [{
1555
- type: K.text,
1574
+ type: q.text,
1556
1575
  text: Le
1557
- }] : We || Ue ? (n.inline = !1, Fe = wn(Ie, n, r)) : (n.inline = !0, Fe = Sn(Le, 0, Le.length, n, r));
1576
+ }] : We || Ue ? (n.inline = !1, Fe = Dn(Ie, n, r)) : (n.inline = !0, Fe = Tn(Le, 0, Le.length, n, r));
1558
1577
  }
1559
1578
  n.inline = Re, n.inHTML = ze, n.d = Be;
1560
1579
  }
1561
1580
  }
1562
1581
  var Ge = !1;
1563
- if (c === 6 && B !== -1 && !n.inHTML && !we) {
1582
+ if (c === 6 && ae !== -1 && !n.inHTML && !we) {
1564
1583
  var Ke = Ie, qe = /<[a-zA-Z][^>]*>/.test(Ke), Je = /\n\n/.test(Ke) || /^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m.test(Ke);
1565
1584
  qe && !Je && (Ge = !0);
1566
1585
  }
1567
- if (!he && (n.inHTML || c === 7 || we || !Q || Ge)) {
1586
+ if (!me && (n.inHTML || c === 7 || we || !Q || Ge)) {
1568
1587
  var Ye, Xe = !1;
1569
- if (B !== -1 && Ee) {
1588
+ if (ae !== -1 && Ee) {
1570
1589
  var Ze = !1;
1571
- if (n.inHTML && oe < z.length) {
1572
- for (var Qe = oe; Qe < z.length && z.charCodeAt(Qe) !== f;) Qe++;
1573
- var tt = z.slice(oe, Qe).trim();
1574
- Ze = tt.length > 1 && tt.charCodeAt(0) === T && tt.charCodeAt(1) !== ae;
1590
+ if (n.inHTML && oe < B.length) {
1591
+ for (var Qe = oe; Qe < B.length && B.charCodeAt(Qe) !== f;) Qe++;
1592
+ var $e = B.slice(oe, Qe).trim();
1593
+ Ze = $e.length > 1 && $e.charCodeAt(0) === T && $e.charCodeAt(1) !== ie;
1575
1594
  }
1576
- Ye = Ze ? z.slice(R.end - a) : Ie, Xe = !0;
1577
- } else (c === 7 || n.inHTML) && B !== -1 ? (Ye = z.slice(R.end - a), Ye.charCodeAt(0) === f && (Ye = Ye.slice(1))) : Ee ? Ye = e.slice(a, De) : we ? Ye = P : (Ye = z.slice(R.end - a), Ye.charCodeAt(0) === f && (Ye = Ye.slice(1)));
1578
- var at = {
1579
- type: K.htmlBlock,
1595
+ Ye = Ze ? B.slice(R.end - a) : Ie, Xe = !0;
1596
+ } else (c === 7 || n.inHTML) && ae !== -1 ? (Ye = B.slice(R.end - a), Ye.charCodeAt(0) === f && (Ye = Ye.slice(1))) : Ee ? Ye = e.slice(a, De) : we ? Ye = P : (Ye = B.slice(R.end - a), Ye.charCodeAt(0) === f && (Ye = Ye.slice(1)));
1597
+ var et = {
1598
+ type: q.htmlBlock,
1580
1599
  tag: te,
1581
- attrs: Ht(R.attrs, te, r),
1600
+ attrs: Gt(R.attrs, te, r),
1582
1601
  f: R.whitespaceBeforeAttrs + R.rawAttrs,
1583
1602
  children: Fe,
1584
1603
  a: Ye,
1585
1604
  text: Ye,
1586
1605
  c: !0,
1587
- b: !1,
1588
- endPos: De,
1589
- e: c === 6
1606
+ b: !1
1590
1607
  };
1591
- return Xe && (at.k = !0), {
1592
- node: at,
1608
+ return Xe && (et.k = !0), {
1609
+ node: et,
1593
1610
  end: Oe
1594
1611
  };
1595
1612
  }
1596
1613
  return {
1597
1614
  node: {
1598
- type: K.htmlBlock,
1615
+ type: q.htmlBlock,
1599
1616
  tag: te,
1600
- attrs: Ht(R.attrs, te, r),
1617
+ attrs: Gt(R.attrs, te, r),
1601
1618
  f: R.whitespaceBeforeAttrs + R.rawAttrs,
1602
1619
  children: Fe,
1603
- a: he ? "" : Ie,
1620
+ a: me ? "" : Ie,
1604
1621
  text: Ie,
1605
1622
  c: !1,
1606
- b: !1,
1607
- endPos: De,
1608
- e: c === 6
1623
+ b: !1
1609
1624
  },
1610
1625
  end: Oe
1611
1626
  };
1612
1627
  }
1613
- var ot = P.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/), st = ot ? ot[2] : "div", ct = ot ? ot[1] === "/" : !1, lt = P;
1628
+ var tt = P.match(/^<(\/?)([a-zA-Z][a-zA-Z0-9-]*)/), it = tt ? tt[2] : "div", ct = tt ? tt[1] === "/" : !1, lt = P;
1614
1629
  if (ct) {
1615
- var dt = P.indexOf(">");
1616
- dt !== -1 && (lt = P.slice(dt + 1));
1630
+ var ut = P.indexOf(">");
1631
+ ut !== -1 && (lt = P.slice(ut + 1));
1617
1632
  }
1618
1633
  return {
1619
1634
  node: {
1620
- type: K.htmlBlock,
1621
- tag: st,
1635
+ type: q.htmlBlock,
1636
+ tag: it,
1622
1637
  attrs: {},
1623
1638
  children: [],
1624
1639
  a: lt,
1625
1640
  text: lt,
1626
1641
  c: !0,
1627
- b: ct,
1628
- endPos: N,
1629
- e: c === 6
1642
+ b: ct
1630
1643
  },
1631
1644
  end: L
1632
1645
  };
1633
1646
  }
1634
- var ft = ut(e, a);
1635
- if (!ft) return null;
1636
- var pt = ft.tag, mt = pt.toLowerCase(), ht = pt.charCodeAt(0), gt = ht >= U && ht <= W;
1637
- if (!gt && !Vt.has(mt) && !et.has(mt) && !mt.includes("-")) return null;
1638
- if (ft.isClosing) return {
1647
+ var dt = pt(e, a);
1648
+ if (!dt) return null;
1649
+ var ft = dt.tag, mt = ft.toLowerCase(), ht = ft.charCodeAt(0), gt = ht >= W && ht <= G;
1650
+ if (!gt && !Wt.has(mt) && !rt.has(mt) && !mt.includes("-")) return null;
1651
+ if (dt.isClosing) return {
1639
1652
  node: {
1640
- type: K.htmlSelfClosing,
1641
- tag: pt,
1653
+ type: q.htmlSelfClosing,
1654
+ tag: ft,
1642
1655
  attrs: {},
1643
- a: e.slice(a, ft.end),
1644
- b: !0,
1645
- endPos: ft.end
1656
+ a: e.slice(a, dt.end),
1657
+ b: !0
1646
1658
  },
1647
- end: ft.end
1659
+ end: dt.end
1648
1660
  };
1649
- var _t = Kt(e, ft.end, pt), vt = [];
1661
+ var _t = Yt(e, dt.end, ft), vt = [];
1650
1662
  if (_t !== -1) {
1651
- var yt = e.slice(ft.end, Gt), bt = yt.trim();
1663
+ var yt = e.slice(dt.end, Jt), bt = yt.trim();
1652
1664
  if (bt) {
1653
- var xt = yt.indexOf("\n\n") !== -1, Ct = rt.test(bt), Tt = it.test(bt), kt = n.inline, At = n.inHTML, jt = n.d;
1654
- n.inHTML = !0, n.d = (n.d || 0) + 1, xt || Ct || Tt ? (n.inline = !1, vt = wn(yt, n, r)) : (n.inline = !0, vt = Sn(bt, 0, bt.length, n, r)), n.inline = kt, n.inHTML = At, n.d = jt;
1665
+ var xt = yt.indexOf("\n\n") !== -1, St = ot.test(bt), Ct = st.test(bt), wt = n.inline, Et = n.inHTML, Ot = n.d;
1666
+ n.inHTML = !0, n.d = (n.d || 0) + 1, xt || St || Ct ? (n.inline = !1, vt = Dn(yt, n, r)) : (n.inline = !0, vt = Tn(bt, 0, bt.length, n, r)), n.inline = wt, n.inHTML = Et, n.d = Ot;
1655
1667
  }
1656
- var Mt = St(e, _t), Nt = e.slice(_t, Mt).trim() ? _t : $(e, _t), Pt = gt ? e.slice(a, _t) : e.slice(a, Nt), Ft = gt ? _t : Nt;
1668
+ var Mt = Tt(e, _t), Nt = e.slice(_t, Mt).trim() ? _t : $(e, _t), Pt = gt ? e.slice(a, _t) : e.slice(a, Nt);
1657
1669
  return {
1658
1670
  node: {
1659
- type: K.htmlBlock,
1660
- tag: pt,
1661
- attrs: Ht(ft.attrs, pt, r),
1662
- f: ft.whitespaceBeforeAttrs + ft.rawAttrs,
1671
+ type: q.htmlBlock,
1672
+ tag: ft,
1673
+ attrs: Gt(dt.attrs, ft, r),
1674
+ f: dt.whitespaceBeforeAttrs + dt.rawAttrs,
1663
1675
  children: vt,
1664
1676
  a: Pt,
1665
1677
  text: gt ? yt : Pt,
1666
1678
  c: !0,
1667
- b: !1,
1668
- endPos: Ft,
1669
- e: !1
1679
+ b: !1
1670
1680
  },
1671
1681
  end: Nt
1672
1682
  };
1673
1683
  }
1674
- var It = wt(e, ft.end), Lt = It < e.length ? $(e, It) : It, Rt = e.slice(ft.end, It);
1675
- if (Rt.trim()) {
1676
- var { inline: zt, inHTML: Bt, d: Wt } = n;
1677
- n.inline = !1, n.inHTML = !0, n.d = (n.d || 0) + 1, vt = wn(Rt, n, r), n.inline = zt, n.inHTML = Bt, n.d = Wt;
1684
+ var Ft = Dt(e, dt.end), It = Ft < e.length ? $(e, Ft) : Ft, Lt = e.slice(dt.end, Ft);
1685
+ if (Lt.trim()) {
1686
+ var { inline: Rt, inHTML: zt, d: Bt } = n;
1687
+ n.inline = !1, n.inHTML = !0, n.d = (n.d || 0) + 1, vt = Dn(Lt, n, r), n.inline = Rt, n.inHTML = zt, n.d = Bt;
1678
1688
  }
1679
- var qt = e.slice(ft.end, It);
1689
+ var Vt = e.slice(dt.end, Ft);
1680
1690
  return {
1681
1691
  node: {
1682
- type: K.htmlBlock,
1683
- tag: pt,
1684
- attrs: Ht(ft.attrs, pt, r),
1685
- f: ft.whitespaceBeforeAttrs + ft.rawAttrs,
1692
+ type: q.htmlBlock,
1693
+ tag: ft,
1694
+ attrs: Gt(dt.attrs, ft, r),
1695
+ f: dt.whitespaceBeforeAttrs + dt.rawAttrs,
1686
1696
  children: vt,
1687
- a: qt,
1688
- text: Rt,
1697
+ a: Vt,
1698
+ text: Lt,
1689
1699
  c: !0,
1690
- b: !1,
1691
- endPos: It,
1692
- e: !1
1700
+ b: !1
1693
1701
  },
1694
- end: Lt
1702
+ end: It
1695
1703
  };
1696
1704
  }
1697
- function Jt(e, t) {
1705
+ function Zt(e, t) {
1698
1706
  if (e.charCodeAt(t) !== T) return 0;
1699
1707
  var n = t + 1, r = e.length;
1700
1708
  if (e.charCodeAt(n) === O && e.charCodeAt(n + 1) === b && e.charCodeAt(n + 2) === b) return 2;
1701
1709
  if (e.charCodeAt(n) === re) return 3;
1702
1710
  if (e.charCodeAt(n) === O) {
1703
1711
  var i = e.charCodeAt(n + 1);
1704
- if (i >= U && i <= W) return 4;
1712
+ if (i >= W && i <= G) return 4;
1705
1713
  if (e.slice(n + 1, n + 8) === "[CDATA[") return 5;
1706
1714
  }
1707
- for (var a = e.charCodeAt(n) === ae, o = a ? n + 1 : n, s = o; s < r;) {
1715
+ for (var a = e.charCodeAt(n) === ie, o = a ? n + 1 : n, s = o; s < r;) {
1708
1716
  var c = e.charCodeAt(s);
1709
- if (c >= U && c <= W || c >= G && c <= me || c >= V && c <= H || c === b) s++;
1717
+ if (c >= W && c <= G || c >= K && c <= pe || c >= H && c <= U || c === b) s++;
1710
1718
  else break;
1711
1719
  }
1712
1720
  if (s === o) return 0;
1713
1721
  var d = e.slice(o, s);
1714
- if (et.has(d.toLowerCase())) {
1722
+ if (rt.has(d.toLowerCase())) {
1715
1723
  if (a) return 0;
1716
1724
  var p = e.charCodeAt(s);
1717
1725
  return +(p === l || p === u || p === _ || p === f || s >= r);
1718
1726
  }
1719
- if (Vt.has(d.toLowerCase())) {
1727
+ if (Wt.has(d.toLowerCase())) {
1720
1728
  if (a) {
1721
1729
  for (var m = s; m < r && (e.charCodeAt(m) === l || e.charCodeAt(m) === u);) m++;
1722
1730
  return m < r && e.charCodeAt(m) === _ ? 6 : 0;
1723
1731
  }
1724
1732
  var h = s < r ? e.charCodeAt(s) : -1;
1725
- return h === l || h === u || h === _ || h === f || h === ae || h === -1 ? 6 : 0;
1733
+ return h === l || h === u || h === _ || h === f || h === ie || h === -1 ? 6 : 0;
1726
1734
  }
1727
1735
  if (a) {
1728
1736
  for (var g = s; g < r && (e.charCodeAt(g) === l || e.charCodeAt(g) === u);) g++;
1729
1737
  if (g < r && e.charCodeAt(g) === _) {
1730
- var v = St(e, t);
1738
+ var v = Tt(e, t);
1731
1739
  if (e.slice(g + 1, v).trim() === "") return 7;
1732
1740
  }
1733
1741
  } else {
1734
- var y = St(e, t), x = ut(e, t);
1742
+ var y = Tt(e, t), x = pt(e, t);
1735
1743
  if (x && x.end <= y && e.slice(x.end, y).trim() === "") return 7;
1736
1744
  }
1737
1745
  return 0;
1738
1746
  }
1739
- function Yt(e, t, n) {
1747
+ function Qt(e, t, n) {
1740
1748
  for (var r = 0, i = e.length; r < i && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
1741
1749
  for (; i > r && (e.charCodeAt(i - 1) === l || e.charCodeAt(i - 1) === u);) i--;
1742
- r < i && e.charCodeAt(r) === se && r++, i > r && e.charCodeAt(i - 1) === se && (i - 2 < r || e.charCodeAt(i - 2) !== S) && i--;
1750
+ r < i && e.charCodeAt(r) === V && r++, i > r && e.charCodeAt(i - 1) === V && (i - 2 < r || e.charCodeAt(i - 2) !== S) && i--;
1743
1751
  for (var a = [], o = r, s = !1, c = [], d = r; d < i;) {
1744
1752
  var f = e.charCodeAt(d);
1745
1753
  if (f === S && d + 1 < i) {
1746
- e.charCodeAt(d + 1) === se ? (s || (s = !0, c = []), c.push(e.slice(o, d)), c.push("|"), d += 2, o = d) : d += 2;
1754
+ e.charCodeAt(d + 1) === V ? (s || (s = !0, c = []), c.push(e.slice(o, d)), c.push("|"), d += 2, o = d) : d += 2;
1747
1755
  continue;
1748
1756
  }
1749
1757
  if (f === p) {
@@ -1754,7 +1762,7 @@ function Yt(e, t, n) {
1754
1762
  }
1755
1763
  continue;
1756
1764
  }
1757
- if (f === se) {
1765
+ if (f === V) {
1758
1766
  var _ = s ? (c.push(e.slice(o, d)), c.join("")) : e.slice(o, d);
1759
1767
  a.push(_.trim()), d++, o = d, s = !1, c = [];
1760
1768
  continue;
@@ -1764,50 +1772,50 @@ function Yt(e, t, n) {
1764
1772
  var v = s ? (c.push(e.slice(o, i)), c.join("")) : e.slice(o, i);
1765
1773
  return a.push(v.trim()), a.map(function(e) {
1766
1774
  var r = e.indexOf("\\|") === -1 ? e : e.replace(/\\\|/g, "|");
1767
- return Sn(r, 0, r.length, t, n);
1775
+ return Tn(r, 0, r.length, t, n);
1768
1776
  });
1769
1777
  }
1770
- function Xt(e, t, n, r) {
1771
- let i = St(e, t);
1778
+ function $t(e, t, n, r) {
1779
+ let i = Tt(e, t);
1772
1780
  var a = e.indexOf("|", t);
1773
1781
  if (a < 0 || a >= i) return null;
1774
1782
  let o = $(e, i);
1775
1783
  if (o >= e.length) return null;
1776
- let s = St(e, o);
1777
- if (!lt(e, o, s)) return null;
1784
+ let s = Tt(e, o);
1785
+ if (!ft(e, o, s)) return null;
1778
1786
  let c = e.slice(t, i), d = e.slice(o, s);
1779
1787
  for (var f = [], h = 0, g = d.length; h < g && (d.charCodeAt(h) === l || d.charCodeAt(h) === u);) h++;
1780
- for (h < g && d.charCodeAt(h) === se && h++; h < g;) {
1788
+ for (h < g && d.charCodeAt(h) === V && h++; h < g;) {
1781
1789
  for (; h < g && (d.charCodeAt(h) === l || d.charCodeAt(h) === u);) h++;
1782
- if (h >= g || d.charCodeAt(h) === se) break;
1790
+ if (h >= g || d.charCodeAt(h) === V) break;
1783
1791
  var y = d.charCodeAt(h) === A;
1784
1792
  for (y && h++; h < g && d.charCodeAt(h) === b;) h++;
1785
1793
  var x = h < g && d.charCodeAt(h) === A;
1786
1794
  for (x && h++, f.push(y && x ? "center" : x ? "right" : y ? "left" : null); h < g && (d.charCodeAt(h) === l || d.charCodeAt(h) === u);) h++;
1787
- h < g && d.charCodeAt(h) === se && h++;
1795
+ h < g && d.charCodeAt(h) === V && h++;
1788
1796
  }
1789
- let S = Yt(c, n, r);
1797
+ let S = Qt(c, n, r);
1790
1798
  if (f.length !== S.length) return null;
1791
1799
  let T = [], E = $(e, s);
1792
1800
  for (; E < e.length;) {
1793
- let t = St(e, E), i = e.slice(E, t);
1794
- if (kt(e, E, t)) break;
1795
- if (Ot(e, E, t), Et < 4) {
1796
- var D = e.charCodeAt(E + Dt);
1797
- if (D === _ || D === v || (D === b || D === C || D === w) && Mt(e, E)) break;
1801
+ let t = Tt(e, E), i = e.slice(E, t);
1802
+ if (Mt(e, E, t)) break;
1803
+ if (jt(e, E, t), kt < 4) {
1804
+ var D = e.charCodeAt(E + At);
1805
+ if (D === _ || D === v || (D === b || D === C || D === w) && Ft(e, E)) break;
1798
1806
  if (D === p || D === m) {
1799
- for (var O = E + Dt, k = 0; O < t && e.charCodeAt(O) === D;) k++, O++;
1807
+ for (var O = E + At, k = 0; O < t && e.charCodeAt(O) === D;) k++, O++;
1800
1808
  if (k >= 3) break;
1801
1809
  }
1802
1810
  }
1803
- T.push(Yt(i, n, r)), E = $(e, t);
1811
+ T.push(Qt(i, n, r)), E = $(e, t);
1804
1812
  }
1805
- if ((r.streaming || r.optimizeForStreaming) && T.length === 0) return null;
1813
+ if (r.optimizeForStreaming && T.length === 0) return null;
1806
1814
  for (var j = S.length, M = 0; M < T.length; M++) if (T[M].length < j) for (; T[M].length < j;) T[M].push([]);
1807
1815
  else T[M].length > j && (T[M].length = j);
1808
1816
  return {
1809
1817
  node: {
1810
- type: K.table,
1818
+ type: q.table,
1811
1819
  header: S,
1812
1820
  cells: T,
1813
1821
  align: f
@@ -1815,19 +1823,19 @@ function Xt(e, t, n, r) {
1815
1823
  end: E
1816
1824
  };
1817
1825
  }
1818
- function Zt(e, t, n) {
1819
- if (Ot(e, t, St(e, t)), Et > 3) return null;
1820
- var r = t + Dt;
1826
+ function en(e, t, n) {
1827
+ if (jt(e, t, Tt(e, t)), kt > 3) return null;
1828
+ var r = t + At;
1821
1829
  if (e.charCodeAt(r) !== h) return null;
1822
- if (r + 1 < e.length && e.charCodeAt(r + 1) === g) return Qt(e, r, n) || null;
1830
+ if (r + 1 < e.length && e.charCodeAt(r + 1) === g) return tn(e, r, n) || null;
1823
1831
  n.refs ||= {};
1824
- var i = ft(e, r, n.refs);
1832
+ var i = ht(e, r, n.refs);
1825
1833
  return i === null ? null : {
1826
- node: { type: K.refCollection },
1834
+ node: { type: q.refCollection },
1827
1835
  end: i
1828
1836
  };
1829
1837
  }
1830
- function Qt(e, t, n) {
1838
+ function tn(e, t, n) {
1831
1839
  var r = e.length;
1832
1840
  if (e.charCodeAt(t) !== h || t + 1 >= r || e.charCodeAt(t + 1) !== g) return null;
1833
1841
  for (var i = t + 2, a = i; i < r && e.charCodeAt(i) !== D;) {
@@ -1842,11 +1850,11 @@ function Qt(e, t, n) {
1842
1850
  var s = e.indexOf("\n", i);
1843
1851
  s < 0 && (s = r);
1844
1852
  for (var c = e.slice(i, s).trim(), d = s < r ? s + 1 : r; d < r;) {
1845
- var p = St(e, d);
1846
- if (Ot(e, d, p), Et >= 2 && !kt(e, d, p)) c += "\n" + e.slice(d, p), d = $(e, p);
1847
- else if (kt(e, d, p)) {
1853
+ var p = Tt(e, d);
1854
+ if (jt(e, d, p), kt >= 2 && !Mt(e, d, p)) c += "\n" + e.slice(d, p), d = $(e, p);
1855
+ else if (Mt(e, d, p)) {
1848
1856
  var m = $(e, p);
1849
- if (m < r && (Ot(e, m, St(e, m)), Et >= 2)) {
1857
+ if (m < r && (jt(e, m, Tt(e, m)), kt >= 2)) {
1850
1858
  c += "\n", d = $(e, p);
1851
1859
  continue;
1852
1860
  }
@@ -1857,19 +1865,19 @@ function Qt(e, t, n) {
1857
1865
  target: c,
1858
1866
  title: void 0
1859
1867
  }), {
1860
- node: { type: K.footnote },
1868
+ node: { type: q.footnote },
1861
1869
  end: d
1862
1870
  };
1863
1871
  }
1864
- function $t(e, t, n, r) {
1872
+ function nn(e, t, n, r) {
1865
1873
  let i = t, a = 0, o = 0, s = -1;
1866
1874
  for (; i < e.length;) {
1867
- let t = s >= 0 ? s : St(e, i);
1868
- if (s = -1, kt(e, i, t)) break;
1869
- if (Ot(e, i, t), Et < 4 && o > 0 && !n.g) {
1870
- let n = e.charCodeAt(i + Dt);
1875
+ let t = s >= 0 ? s : Tt(e, i);
1876
+ if (s = -1, Mt(e, i, t)) break;
1877
+ if (jt(e, i, t), kt < 4 && o > 0 && !n.g) {
1878
+ let n = e.charCodeAt(i + At);
1871
1879
  if (n === x || n === b) {
1872
- let r = i + Dt;
1880
+ let r = i + At;
1873
1881
  for (; r < t && e.charCodeAt(r) === n;) r++;
1874
1882
  for (; r < t && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
1875
1883
  if (r >= t) {
@@ -1881,77 +1889,77 @@ function $t(e, t, n, r) {
1881
1889
  o = t;
1882
1890
  let d = $(e, t);
1883
1891
  if (d < e.length) {
1884
- if (e.charCodeAt(d) === fe) {
1885
- var c = St(e, d);
1892
+ if (e.charCodeAt(d) === de) {
1893
+ var c = Tt(e, d);
1886
1894
  i = $(e, c), o = c;
1887
1895
  continue;
1888
1896
  }
1889
- let t = St(e, d);
1890
- if (s = t, Ot(e, d, t), Et < 4) {
1891
- let a = e.charCodeAt(d + Dt);
1897
+ let t = Tt(e, d);
1898
+ if (s = t, jt(e, d, t), kt < 4) {
1899
+ let a = e.charCodeAt(d + At);
1892
1900
  if (a === _) {
1893
1901
  i = d;
1894
1902
  break;
1895
1903
  }
1896
- if (a === v && At(e, d, n, r)) {
1904
+ if (a === v && Nt(e, d, n, r)) {
1897
1905
  i = d;
1898
1906
  break;
1899
1907
  }
1900
1908
  if (a === p || a === m) {
1901
- for (var h = d + Dt, g = 0; h < t && e.charCodeAt(h) === a;) g++, h++;
1909
+ for (var h = d + At, g = 0; h < t && e.charCodeAt(h) === a;) g++, h++;
1902
1910
  if (g >= 3) {
1903
1911
  i = d;
1904
1912
  break;
1905
1913
  }
1906
1914
  }
1907
1915
  if (a === T) {
1908
- var y = d + Dt + 1, S = y < t ? e.charCodeAt(y) : 0, E = S === O || S === re;
1909
- if (!E && S === ae) {
1910
- for (var D = y + 1, k = D; k < t && (e.charCodeAt(k) >= U && e.charCodeAt(k) <= W || e.charCodeAt(k) >= G && e.charCodeAt(k) <= me || e.charCodeAt(k) >= V && e.charCodeAt(k) <= H || e.charCodeAt(k) === b);) k++;
1911
- k > D && (E = Vt.has(e.slice(D, k).toLowerCase()));
1916
+ var y = d + At + 1, S = y < t ? e.charCodeAt(y) : 0, E = S === O || S === re;
1917
+ if (!E && S === ie) {
1918
+ for (var D = y + 1, k = D; k < t && (e.charCodeAt(k) >= W && e.charCodeAt(k) <= G || e.charCodeAt(k) >= K && e.charCodeAt(k) <= pe || e.charCodeAt(k) >= H && e.charCodeAt(k) <= U || e.charCodeAt(k) === b);) k++;
1919
+ k > D && (E = Wt.has(e.slice(D, k).toLowerCase()));
1912
1920
  } else if (!E) {
1913
- for (var A = y; A < t && (e.charCodeAt(A) >= U && e.charCodeAt(A) <= W || e.charCodeAt(A) >= G && e.charCodeAt(A) <= me || e.charCodeAt(A) >= V && e.charCodeAt(A) <= H || e.charCodeAt(A) === b);) A++;
1921
+ for (var A = y; A < t && (e.charCodeAt(A) >= W && e.charCodeAt(A) <= G || e.charCodeAt(A) >= K && e.charCodeAt(A) <= pe || e.charCodeAt(A) >= H && e.charCodeAt(A) <= U || e.charCodeAt(A) === b);) A++;
1914
1922
  if (A > y) {
1915
1923
  var j = e.slice(y, A).toLowerCase();
1916
- E = Vt.has(j) || et.has(j);
1924
+ E = Wt.has(j) || rt.has(j);
1917
1925
  }
1918
1926
  }
1919
- if (E && qt(e, d, n, r)) {
1927
+ if (E && Xt(e, d, n, r)) {
1920
1928
  i = d;
1921
1929
  break;
1922
1930
  }
1923
1931
  }
1924
1932
  if (a === b || a === C || a === oe) {
1925
- let n = d + Dt + 1;
1926
- if (n < t && (e.charCodeAt(n) === l || e.charCodeAt(n) === u) && Ct(e, n, t) < t && !Mt(e, d)) {
1933
+ let n = d + At + 1;
1934
+ if (n < t && (e.charCodeAt(n) === l || e.charCodeAt(n) === u) && Et(e, n, t) < t && !Ft(e, d)) {
1927
1935
  i = d;
1928
1936
  break;
1929
1937
  }
1930
1938
  }
1931
- if (a >= V && a <= H) {
1932
- let n = d + Dt;
1933
- for (; n < t && e.charCodeAt(n) >= V && e.charCodeAt(n) <= H;) n++;
1934
- if (n < t && (e.charCodeAt(n) === ie || e.charCodeAt(n) === de) && n - (d + Dt) === 1 && e.charCodeAt(d + Dt) === 49) {
1939
+ if (a >= H && a <= U) {
1940
+ let n = d + At;
1941
+ for (; n < t && e.charCodeAt(n) >= H && e.charCodeAt(n) <= U;) n++;
1942
+ if (n < t && (e.charCodeAt(n) === z || e.charCodeAt(n) === ue) && n - (d + At) === 1 && e.charCodeAt(d + At) === 49) {
1935
1943
  var M = n + 1;
1936
- if (M < t && (e.charCodeAt(M) === l || e.charCodeAt(M) === u) && Ct(e, M, t) < t) {
1944
+ if (M < t && (e.charCodeAt(M) === l || e.charCodeAt(M) === u) && Et(e, M, t) < t) {
1937
1945
  i = d;
1938
1946
  break;
1939
1947
  }
1940
1948
  }
1941
1949
  }
1942
- if (a === se) {
1950
+ if (a === V) {
1943
1951
  let n = $(e, t);
1944
- if (n < e.length && lt(e, n, St(e, n))) {
1952
+ if (n < e.length && ft(e, n, Tt(e, n))) {
1945
1953
  i = d;
1946
1954
  break;
1947
1955
  }
1948
1956
  }
1949
- if ((a === b || a === C || a === w) && Mt(e, d)) {
1957
+ if ((a === b || a === C || a === w) && Ft(e, d)) {
1950
1958
  if (a !== b) {
1951
1959
  i = d;
1952
1960
  break;
1953
1961
  }
1954
- let n = 0, r = d + Dt;
1962
+ let n = 0, r = d + At;
1955
1963
  for (; r < t && e.charCodeAt(r) === b;) n++, r++;
1956
1964
  for (; r < t && (e.charCodeAt(r) === l || e.charCodeAt(r) === u);) r++;
1957
1965
  if (r < t) {
@@ -1966,18 +1974,18 @@ function $t(e, t, n, r) {
1966
1974
  for (var N = a ? o : i; N > t && (e.charCodeAt(N - 1) === f || e.charCodeAt(N - 1) === d || e.charCodeAt(N - 1) === l || e.charCodeAt(N - 1) === u);) N--;
1967
1975
  for (var P = t; P < N && (e.charCodeAt(P) === l || e.charCodeAt(P) === u);) P++;
1968
1976
  if (P >= N) return null;
1969
- for (var F = !1, I = P; I < N; I++) if (e.charCodeAt(I) === fe) {
1977
+ for (var F = !1, I = P; I < N; I++) if (e.charCodeAt(I) === de) {
1970
1978
  F = !0;
1971
1979
  break;
1972
1980
  }
1973
1981
  var ee = F ? e.slice(P, N).replace(/\u001E/g, "") : e.slice(P, N);
1974
1982
  if (!ee) return null;
1975
- let L = en(ee, 0, ee.length, n, r);
1983
+ let L = rn(ee, 0, ee.length, n, r);
1976
1984
  if (a) {
1977
1985
  let e = (r?.slugify || Z)(ee);
1978
1986
  return {
1979
1987
  node: {
1980
- type: K.heading,
1988
+ type: q.heading,
1981
1989
  level: a,
1982
1990
  children: L,
1983
1991
  id: e
@@ -1987,19 +1995,19 @@ function $t(e, t, n, r) {
1987
1995
  }
1988
1996
  return {
1989
1997
  node: {
1990
- type: K.paragraph,
1998
+ type: q.paragraph,
1991
1999
  children: L
1992
2000
  },
1993
2001
  end: i
1994
2002
  };
1995
2003
  }
1996
- function en(e, t, n, r, i) {
2004
+ function rn(e, t, n, r, i) {
1997
2005
  var a = e.indexOf("\n", t);
1998
- if (a < 0 || a >= n) return Sn(e, t, n, r, i);
2006
+ if (a < 0 || a >= n) return Tn(e, t, n, r, i);
1999
2007
  for (var o = "", s = t, c = t; c < n;) {
2000
2008
  var u = e.charCodeAt(c);
2001
2009
  if (u === p) {
2002
- var d = nn(e, c, n);
2010
+ var d = on(e, c, n);
2003
2011
  if (d > c) {
2004
2012
  for (var m = !1, h = c; h < d; h++) if (e.charCodeAt(h) === f) {
2005
2013
  m = !0;
@@ -2010,7 +2018,7 @@ function en(e, t, n, r, i) {
2010
2018
  }
2011
2019
  }
2012
2020
  if (u === T) {
2013
- var g = rn(e, c, n);
2021
+ var g = sn(e, c, n);
2014
2022
  if (g > c) {
2015
2023
  c = g;
2016
2024
  continue;
@@ -2034,20 +2042,20 @@ function en(e, t, n, r, i) {
2034
2042
  }
2035
2043
  c++;
2036
2044
  }
2037
- return s < n && (o += e.slice(s, n)), Sn(o, 0, o.length, r, i);
2045
+ return s < n && (o += e.slice(s, n)), Tn(o, 0, o.length, r, i);
2038
2046
  }
2039
- function tn(e, t, n) {
2047
+ function an(e, t, n) {
2040
2048
  if (e.charCodeAt(t) !== p) return null;
2041
- let r = Tt(e, t, n, 96), i = t + r;
2049
+ let r = Ot(e, t, n, 96), i = t + r;
2042
2050
  for (; i < n;) {
2043
2051
  let a = e.indexOf("`", i);
2044
2052
  if (a < 0 || a >= n) return null;
2045
- let o = Tt(e, a, n, 96);
2053
+ let o = Ot(e, a, n, 96);
2046
2054
  if (o === r) {
2047
2055
  let n = e.slice(t + r, a);
2048
2056
  return n = n.replace(/\n/g, " "), n.length > 0 && n[0] === " " && n[n.length - 1] === " " && n.trim().length > 0 && (n = n.slice(1, -1)), {
2049
2057
  node: {
2050
- type: K.codeInline,
2058
+ type: q.codeInline,
2051
2059
  text: n
2052
2060
  },
2053
2061
  end: a + o
@@ -2057,21 +2065,21 @@ function tn(e, t, n) {
2057
2065
  }
2058
2066
  return null;
2059
2067
  }
2060
- function nn(e, t, n) {
2068
+ function on(e, t, n) {
2061
2069
  if (e.charCodeAt(t) !== p) return t;
2062
- let r = Tt(e, t, n, 96), i = t + r;
2070
+ let r = Ot(e, t, n, 96), i = t + r;
2063
2071
  for (; i < n;) {
2064
2072
  let a = e.indexOf("`", i);
2065
2073
  if (a < 0 || a >= n) return t;
2066
- let o = Tt(e, a, n, 96);
2074
+ let o = Ot(e, a, n, 96);
2067
2075
  if (o === r) return a + o;
2068
2076
  i = a + o;
2069
2077
  }
2070
2078
  return t;
2071
2079
  }
2072
- function rn(e, t, n) {
2080
+ function sn(e, t, n) {
2073
2081
  if (e.charCodeAt(t) !== T) return t;
2074
- if (t + 1 < n && e.charCodeAt(t + 1) === ae) {
2082
+ if (t + 1 < n && e.charCodeAt(t + 1) === ie) {
2075
2083
  let r = t + 2;
2076
2084
  for (; r < n && e.charCodeAt(r) !== _;) r++;
2077
2085
  return r < n ? r + 1 : t;
@@ -2083,7 +2091,7 @@ function rn(e, t, n) {
2083
2091
  let r = t + 1, i = r;
2084
2092
  for (; r < n;) {
2085
2093
  let t = e.charCodeAt(r);
2086
- if (t >= U && t <= W || t >= G && t <= me || t >= V && t <= H || t === b) r++;
2094
+ if (t >= W && t <= G || t >= K && t <= pe || t >= H && t <= U || t === b) r++;
2087
2095
  else break;
2088
2096
  }
2089
2097
  if (r === i) return t;
@@ -2094,11 +2102,11 @@ function rn(e, t, n) {
2094
2102
  r++;
2095
2103
  break;
2096
2104
  }
2097
- if (i === ae && r + 1 < n && e.charCodeAt(r + 1) === _) {
2105
+ if (i === ie && r + 1 < n && e.charCodeAt(r + 1) === _) {
2098
2106
  r += 2, o = !0;
2099
2107
  break;
2100
2108
  }
2101
- if (i === B || i === z) {
2109
+ if (i === ae || i === B) {
2102
2110
  var s = i;
2103
2111
  for (r++; r < n && e.charCodeAt(r) !== s;) r++;
2104
2112
  r < n && r++;
@@ -2109,9 +2117,9 @@ function rn(e, t, n) {
2109
2117
  }
2110
2118
  if (o || Te(a)) return r;
2111
2119
  let c = 1;
2112
- for (; r < n && c > 0;) if (e.charCodeAt(r) === T) if (r + 1 < n && e.charCodeAt(r + 1) === ae) {
2120
+ for (; r < n && c > 0;) if (e.charCodeAt(r) === T) if (r + 1 < n && e.charCodeAt(r + 1) === ie) {
2113
2121
  let t = r + 2, i = t;
2114
- for (; i < n && (e.charCodeAt(i) >= U && e.charCodeAt(i) <= W || e.charCodeAt(i) >= G && e.charCodeAt(i) <= me);) i++;
2122
+ for (; i < n && (e.charCodeAt(i) >= W && e.charCodeAt(i) <= G || e.charCodeAt(i) >= K && e.charCodeAt(i) <= pe);) i++;
2115
2123
  if (e.slice(t, i).toLowerCase() === a) {
2116
2124
  for (; i < n && e.charCodeAt(i) !== _;) i++;
2117
2125
  if (i < n && i++, c--, c === 0) return i;
@@ -2119,29 +2127,29 @@ function rn(e, t, n) {
2119
2127
  r = i;
2120
2128
  } else {
2121
2129
  let t = r + 1, i = t;
2122
- for (; i < n && (e.charCodeAt(i) >= U && e.charCodeAt(i) <= W || e.charCodeAt(i) >= G && e.charCodeAt(i) <= me);) i++;
2130
+ for (; i < n && (e.charCodeAt(i) >= W && e.charCodeAt(i) <= G || e.charCodeAt(i) >= K && e.charCodeAt(i) <= pe);) i++;
2123
2131
  e.slice(t, i).toLowerCase() === a && c++, r++;
2124
2132
  }
2125
2133
  else r++;
2126
2134
  return r;
2127
2135
  }
2128
- function an(e, t, n, r, i) {
2136
+ function cn(e, t, n, r, i) {
2129
2137
  if (e.charCodeAt(t) !== m || t + 1 >= n || e.charCodeAt(t + 1) !== m) return null;
2130
2138
  let a = t + 2;
2131
2139
  for (; a + 1 < n;) {
2132
2140
  let o = e.charCodeAt(a);
2133
2141
  if (o === p) {
2134
- let t = nn(e, a, n);
2142
+ let t = on(e, a, n);
2135
2143
  if (t > a) {
2136
2144
  a = t;
2137
2145
  continue;
2138
2146
  }
2139
2147
  }
2140
2148
  if (o === m && e.charCodeAt(a + 1) === m) {
2141
- let n = e.slice(t + 2, a), o = Sn(n, 0, n.length, r, i);
2149
+ let n = e.slice(t + 2, a), o = Tn(n, 0, n.length, r, i);
2142
2150
  return {
2143
2151
  node: {
2144
- type: K.textFormatted,
2152
+ type: q.textFormatted,
2145
2153
  tag: "del",
2146
2154
  children: o
2147
2155
  },
@@ -2152,23 +2160,23 @@ function an(e, t, n, r, i) {
2152
2160
  }
2153
2161
  return null;
2154
2162
  }
2155
- function on(e, t, n, r, i) {
2163
+ function ln(e, t, n, r, i) {
2156
2164
  if (e.charCodeAt(t) !== x || t + 1 >= n || e.charCodeAt(t + 1) !== x) return null;
2157
2165
  let a = t + 2;
2158
2166
  for (; a + 1 < n;) {
2159
2167
  let o = e.charCodeAt(a);
2160
2168
  if (o === p) {
2161
- let t = nn(e, a, n);
2169
+ let t = on(e, a, n);
2162
2170
  if (t > a) {
2163
2171
  a = t;
2164
2172
  continue;
2165
2173
  }
2166
2174
  }
2167
2175
  if (o === x && e.charCodeAt(a + 1) === x && a > t + 2) {
2168
- let n = e.slice(t + 2, a), o = Sn(n, 0, n.length, r, i);
2176
+ let n = e.slice(t + 2, a), o = Tn(n, 0, n.length, r, i);
2169
2177
  return {
2170
2178
  node: {
2171
- type: K.textFormatted,
2179
+ type: q.textFormatted,
2172
2180
  tag: "mark",
2173
2181
  children: o
2174
2182
  },
@@ -2179,25 +2187,25 @@ function on(e, t, n, r, i) {
2179
2187
  }
2180
2188
  return null;
2181
2189
  }
2182
- function sn(e, t, n) {
2183
- return e < he ? !!(_t(e) & Oe) : Re.test(t[n]);
2190
+ function un(e, t, n) {
2191
+ return e < me ? !!(bt(e) & Oe) : Re.test(t[n]);
2184
2192
  }
2185
- function cn(e, t, n) {
2186
- return e < he ? !!(_t(e) & Ee) : ze.test(t[n]);
2193
+ function dn(e, t, n) {
2194
+ return e < me ? !!(bt(e) & Ee) : ze.test(t[n]);
2187
2195
  }
2188
- function ln(e, t, n) {
2196
+ function fn(e, t, n) {
2189
2197
  var r = e.charCodeAt(t);
2190
2198
  if (r !== C && r !== w) return null;
2191
- var i = Tt(e, t, n, r);
2199
+ var i = Ot(e, t, n, r);
2192
2200
  if (i === 0) return null;
2193
- var a = t > 0 ? e.charCodeAt(t - 1) : 32, o = t + i < n ? e.charCodeAt(t + i) : 32, s = cn(a, e, t - 1), c = cn(o, e, t + i), l = t > 0 ? sn(a, e, t - 1) : !1, u = t + i < n ? sn(o, e, t + i) : !1, d = !c && (!u || s || l), f = !s && (!l || c || u), p, m;
2201
+ var a = t > 0 ? e.charCodeAt(t - 1) : 32, o = t + i < n ? e.charCodeAt(t + i) : 32, s = dn(a, e, t - 1), c = dn(o, e, t + i), l = t > 0 ? un(a, e, t - 1) : !1, u = t + i < n ? un(o, e, t + i) : !1, d = !c && (!u || s || l), f = !s && (!l || c || u), p, m;
2194
2202
  return r === C ? (p = d, m = f) : (p = d && (!f || l), m = f && (!d || u)), {
2195
2203
  len: i,
2196
2204
  canOpen: p,
2197
2205
  canClose: m
2198
2206
  };
2199
2207
  }
2200
- function un(e, t, n, r) {
2208
+ function pn(e, t, n, r) {
2201
2209
  if (t.length !== 0) {
2202
2210
  for (var i = [], a = 0; a < 12; a++) i[a] = -1;
2203
2211
  for (var o = 0; o < t.length;) {
@@ -2222,7 +2230,7 @@ function un(e, t, n, r) {
2222
2230
  var g = e[p.idx], _ = e[s.idx];
2223
2231
  g.text = g.text.slice(0, g.text.length - h), _.text = _.text.slice(h);
2224
2232
  var v = p.idx + 1, y = s.idx, b = e.slice(v, y), x = {
2225
- type: K.textFormatted,
2233
+ type: q.textFormatted,
2226
2234
  tag: m ? "strong" : "em",
2227
2235
  children: b
2228
2236
  };
@@ -2245,10 +2253,10 @@ function un(e, t, n, r) {
2245
2253
  }
2246
2254
  for (var k = 0, A = 0; A < e.length; A++) {
2247
2255
  var j = e[A];
2248
- if (j.type === K.text) {
2256
+ if (j.type === q.text) {
2249
2257
  var M = j;
2250
2258
  if (M.text === "") continue;
2251
- if (k > 0 && e[k - 1].type === K.text) {
2259
+ if (k > 0 && e[k - 1].type === q.text) {
2252
2260
  e[k - 1].text += M.text;
2253
2261
  continue;
2254
2262
  }
@@ -2258,7 +2266,7 @@ function un(e, t, n, r) {
2258
2266
  e.length = k;
2259
2267
  }
2260
2268
  }
2261
- function dn(e, t, n, r, i) {
2269
+ function mn(e, t, n, r, i) {
2262
2270
  let a = e.charCodeAt(t) === O, o = a ? t + 1 : t;
2263
2271
  if (e.charCodeAt(o) !== h) return null;
2264
2272
  var s = e.indexOf("]", o + 1);
@@ -2270,19 +2278,19 @@ function dn(e, t, n, r, i) {
2270
2278
  continue;
2271
2279
  }
2272
2280
  if (d === p) {
2273
- var m = nn(e, c, n);
2281
+ var m = on(e, c, n);
2274
2282
  if (m > c) {
2275
2283
  c = m;
2276
2284
  continue;
2277
2285
  }
2278
2286
  }
2279
2287
  if (d === T) {
2280
- var g = fn(e, c, n);
2288
+ var g = hn(e, c, n);
2281
2289
  if (g) {
2282
2290
  c = g.end;
2283
2291
  continue;
2284
2292
  }
2285
- var v = rn(e, c, n);
2293
+ var v = sn(e, c, n);
2286
2294
  if (v > c) {
2287
2295
  c = v;
2288
2296
  continue;
@@ -2292,7 +2300,7 @@ function dn(e, t, n, r, i) {
2292
2300
  }
2293
2301
  if (u !== 0) return null;
2294
2302
  var y = c - 1, b = e.slice(o + 1, y), x = c < n ? e.charCodeAt(c) : 0, C = !1;
2295
- if (x === ue) {
2303
+ if (x === le) {
2296
2304
  var w = !0;
2297
2305
  for (c++; c < n && (e.charCodeAt(c) === l || e.charCodeAt(c) === f);) c++;
2298
2306
  var E = "", k = c;
@@ -2309,127 +2317,128 @@ function dn(e, t, n, r, i) {
2309
2317
  k++;
2310
2318
  }
2311
2319
  w && (k >= n || e.charCodeAt(k) !== _) && (w = !1), w && (E = e.slice(c, k), k++);
2312
- } else if (w) {
2313
- for (var A = 0; k < n;) {
2314
- var j = e.charCodeAt(k);
2315
- if (j === S && k + 1 < n) {
2320
+ } else if (w) if (r.e !== void 0 && c >= r.e) w = !1;
2321
+ else {
2322
+ for (var A = 0, j = !1; k < n;) {
2323
+ var M = e.charCodeAt(k);
2324
+ if (M === S && k + 1 < n) {
2316
2325
  k += 2;
2317
2326
  continue;
2318
2327
  }
2319
- if (j === ue) A++;
2320
- else if (j === de) {
2321
- if (A === 0) break;
2328
+ if (M === le) A++;
2329
+ else if (M === ue) {
2330
+ if (j = !0, A === 0) break;
2322
2331
  A--;
2323
- } else if (j === l || j === f) break;
2332
+ } else if (M === l || M === f) break;
2324
2333
  k++;
2325
2334
  }
2326
- E = e.slice(c, k);
2335
+ k >= n && !j && (r.e === void 0 || c < r.e) && (r.e = c), E = e.slice(c, k);
2327
2336
  }
2328
2337
  if (w) {
2329
2338
  for (c = k; c < n && (e.charCodeAt(c) === l || e.charCodeAt(c) === f);) c++;
2330
- var M;
2339
+ var N;
2331
2340
  if (c < n) {
2332
- var N = e.charCodeAt(c);
2333
- if (N === B || N === z || N === ue) {
2334
- var P = N === ue ? 41 : N;
2341
+ var P = e.charCodeAt(c);
2342
+ if (P === ae || P === B || P === le) {
2343
+ var F = P === le ? 41 : P;
2335
2344
  c++;
2336
- for (var F = c; c < n && e.charCodeAt(c) !== P;) e.charCodeAt(c) === S && c + 1 < n && c++, c++;
2337
- c >= n ? w = !1 : (M = e.slice(F, c), c++);
2345
+ for (var I = c; c < n && e.charCodeAt(c) !== F;) e.charCodeAt(c) === S && c + 1 < n && c++, c++;
2346
+ c >= n ? w = !1 : (N = e.slice(I, c), c++);
2338
2347
  }
2339
2348
  }
2340
2349
  if (w) {
2341
2350
  for (; c < n && (e.charCodeAt(c) === l || e.charCodeAt(c) === f);) c++;
2342
- (c >= n || e.charCodeAt(c) !== de) && (w = !1);
2351
+ (c >= n || e.charCodeAt(c) !== ue) && (w = !1);
2343
2352
  }
2344
2353
  }
2345
2354
  if (w) {
2346
- c++, E = vt(E), M !== void 0 && (M = be(vt(M)));
2347
- var I = (i?.sanitizer || Se)(E, a ? "img" : "a", a ? "src" : "href") === null ? null : E;
2355
+ c++, E = xt(E), N !== void 0 && (N = ye(xt(N)));
2356
+ var ee = (i?.sanitizer || xe)(E, a ? "img" : "a", a ? "src" : "href") === null ? null : E;
2348
2357
  if (a) {
2349
- var ee = _n(Sn(b, 0, b.length, r, i));
2358
+ var L = bn(Tn(b, 0, b.length, r, i));
2350
2359
  return {
2351
2360
  node: {
2352
- type: K.image,
2353
- target: I,
2354
- alt: ee,
2355
- title: M
2361
+ type: q.image,
2362
+ target: ee,
2363
+ alt: L,
2364
+ title: N
2356
2365
  },
2357
2366
  end: c
2358
2367
  };
2359
2368
  } else {
2360
- var L = r.inAnchor;
2369
+ var R = r.inAnchor;
2361
2370
  r.inAnchor = !0;
2362
- var R = L ? [{
2363
- type: K.text,
2371
+ var te = R ? [{
2372
+ type: q.text,
2364
2373
  text: b
2365
- }] : Sn(b, 0, b.length, r, i);
2366
- return r.inAnchor = L, !r.inAnchor && gn(R) ? null : {
2374
+ }] : Tn(b, 0, b.length, r, i);
2375
+ return r.inAnchor = R, !r.inAnchor && yn(te) ? null : {
2367
2376
  node: {
2368
- type: K.link,
2369
- target: I,
2370
- title: M,
2371
- children: R
2377
+ type: q.link,
2378
+ target: ee,
2379
+ title: N,
2380
+ children: te
2372
2381
  },
2373
2382
  end: c
2374
2383
  };
2375
2384
  }
2376
2385
  } else c = y + 1, C = !0;
2377
2386
  }
2378
- var te = "", ne = c;
2387
+ var ne = "", re = c;
2379
2388
  if (!C && x === h) {
2380
- var re = c + 1;
2381
- ne = re;
2382
- for (var ie = !1; ne < n && e.charCodeAt(ne) !== D;) {
2383
- if (e.charCodeAt(ne) === S && ne + 1 < n) {
2384
- ne += 2;
2389
+ var z = c + 1;
2390
+ re = z;
2391
+ for (var ie = !1; re < n && e.charCodeAt(re) !== D;) {
2392
+ if (e.charCodeAt(re) === S && re + 1 < n) {
2393
+ re += 2;
2385
2394
  continue;
2386
2395
  }
2387
- if (e.charCodeAt(ne) === h) {
2396
+ if (e.charCodeAt(re) === h) {
2388
2397
  ie = !0;
2389
2398
  break;
2390
2399
  }
2391
- ne++;
2400
+ re++;
2392
2401
  }
2393
- if (ie || ne >= n) return null;
2394
- var ae = e.slice(re, ne);
2395
- if (ae.trim()) te = gt(ae);
2402
+ if (ie || re >= n) return null;
2403
+ var oe = e.slice(z, re);
2404
+ if (oe.trim()) ne = yt(oe);
2396
2405
  else {
2397
- if (ht(b)) return null;
2398
- te = gt(b);
2406
+ if (vt(b)) return null;
2407
+ ne = yt(b);
2399
2408
  }
2400
- ne += 1;
2409
+ re += 1;
2401
2410
  } else {
2402
- if (ht(b)) return null;
2403
- te = gt(b);
2411
+ if (vt(b)) return null;
2412
+ ne = yt(b);
2404
2413
  }
2405
- var oe = r.refs[te];
2406
- if (!oe) return null;
2414
+ var V = r.refs[ne];
2415
+ if (!V) return null;
2407
2416
  if (a) return {
2408
2417
  node: {
2409
- type: K.image,
2410
- target: oe.target,
2411
- alt: _n(Sn(b, 0, b.length, r, i)),
2412
- title: oe.title
2418
+ type: q.image,
2419
+ target: V.target,
2420
+ alt: bn(Tn(b, 0, b.length, r, i)),
2421
+ title: V.title
2413
2422
  },
2414
- end: ne
2423
+ end: re
2415
2424
  };
2416
2425
  var se = r.inAnchor;
2417
2426
  r.inAnchor = !0;
2418
- var R = se ? [{
2419
- type: K.text,
2427
+ var te = se ? [{
2428
+ type: q.text,
2420
2429
  text: b
2421
- }] : Sn(b, 0, b.length, r, i);
2422
- return r.inAnchor = se, !r.inAnchor && gn(R) ? null : {
2430
+ }] : Tn(b, 0, b.length, r, i);
2431
+ return r.inAnchor = se, !r.inAnchor && yn(te) ? null : {
2423
2432
  node: {
2424
- type: K.link,
2425
- target: oe.target,
2426
- title: oe.title,
2427
- children: R
2433
+ type: q.link,
2434
+ target: V.target,
2435
+ title: V.title,
2436
+ children: te
2428
2437
  },
2429
- end: ne
2438
+ end: re
2430
2439
  };
2431
2440
  }
2432
- function fn(e, t, n) {
2441
+ function hn(e, t, n) {
2433
2442
  if (e.charCodeAt(t) !== T) return null;
2434
2443
  for (var r = t + 1; r < n;) {
2435
2444
  var i = e.charCodeAt(r);
@@ -2441,29 +2450,29 @@ function fn(e, t, n) {
2441
2450
  var a = e.slice(t + 1, r);
2442
2451
  return a.match(/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^\x00-\x20]*)$/) ? {
2443
2452
  node: {
2444
- type: K.link,
2453
+ type: q.link,
2445
2454
  target: a,
2446
2455
  title: void 0,
2447
2456
  children: [{
2448
- type: K.text,
2457
+ type: q.text,
2449
2458
  text: a
2450
2459
  }]
2451
2460
  },
2452
2461
  end: r + 1
2453
2462
  } : a.indexOf("@") !== -1 && /^[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])?)*$/.test(a) ? {
2454
2463
  node: {
2455
- type: K.link,
2464
+ type: q.link,
2456
2465
  target: "mailto:" + a,
2457
2466
  title: void 0,
2458
2467
  children: [{
2459
- type: K.text,
2468
+ type: q.text,
2460
2469
  text: a
2461
2470
  }]
2462
2471
  },
2463
2472
  end: r + 1
2464
2473
  } : null;
2465
2474
  }
2466
- function pn(e, t, n, r) {
2475
+ function gn(e, t, n, r) {
2467
2476
  if (e.charCodeAt(t) !== h || t + 1 >= n || e.charCodeAt(t + 1) !== g) return null;
2468
2477
  let i = t + 2;
2469
2478
  for (; i < n && e.charCodeAt(i) !== D && e.charCodeAt(i) !== f;) i++;
@@ -2471,17 +2480,17 @@ function pn(e, t, n, r) {
2471
2480
  let a = e.slice(t + 2, i);
2472
2481
  return a ? {
2473
2482
  node: {
2474
- type: K.footnoteReference,
2483
+ type: q.footnoteReference,
2475
2484
  target: "#" + Z(a),
2476
2485
  text: a
2477
2486
  },
2478
2487
  end: i + 1
2479
2488
  } : null;
2480
2489
  }
2481
- function mn(e, t, n, r) {
2490
+ function _n(e, t, n, r) {
2482
2491
  if (r.disableBareUrls) return null;
2483
2492
  var i = "", a = !1, o = e.charCodeAt(t);
2484
- if (o === N || o === 72 ? t + 8 <= n && e.charCodeAt(t + 1) === F && e.charCodeAt(t + 2) === F && e.charCodeAt(t + 3) === I && (e.charCodeAt(t + 4) === ee && e.charCodeAt(t + 5) === A && e.charCodeAt(t + 6) === ae && e.charCodeAt(t + 7) === ae ? i = "https://" : e.charCodeAt(t + 4) === A && e.charCodeAt(t + 5) === ae && e.charCodeAt(t + 6) === ae && (i = "http://")) : o === M || o === 70 ? t + 6 <= n && e.charCodeAt(t + 1) === F && e.charCodeAt(t + 2) === I && e.charCodeAt(t + 3) === A && e.charCodeAt(t + 4) === ae && e.charCodeAt(t + 5) === ae && (i = "ftp://") : (o === P || o === 87) && t + 4 <= n && e.charCodeAt(t + 1) === P && e.charCodeAt(t + 2) === P && e.charCodeAt(t + 3) === ie && (i = "www.", a = !0), !i) return null;
2493
+ if (o === N || o === 72 ? t + 8 <= n && e.charCodeAt(t + 1) === F && e.charCodeAt(t + 2) === F && e.charCodeAt(t + 3) === I && (e.charCodeAt(t + 4) === ee && e.charCodeAt(t + 5) === A && e.charCodeAt(t + 6) === ie && e.charCodeAt(t + 7) === ie ? i = "https://" : e.charCodeAt(t + 4) === A && e.charCodeAt(t + 5) === ie && e.charCodeAt(t + 6) === ie && (i = "http://")) : o === M || o === 70 ? t + 6 <= n && e.charCodeAt(t + 1) === F && e.charCodeAt(t + 2) === I && e.charCodeAt(t + 3) === A && e.charCodeAt(t + 4) === ie && e.charCodeAt(t + 5) === ie && (i = "ftp://") : (o === P || o === 87) && t + 4 <= n && e.charCodeAt(t + 1) === P && e.charCodeAt(t + 2) === P && e.charCodeAt(t + 3) === z && (i = "www.", a = !0), !i) return null;
2485
2494
  let s = t + i.length;
2486
2495
  for (; s < n;) {
2487
2496
  let t = e.charCodeAt(s);
@@ -2490,26 +2499,26 @@ function mn(e, t, n, r) {
2490
2499
  }
2491
2500
  for (var c = 0, p = 0, h = t; h < s; h++) {
2492
2501
  var g = e.charCodeAt(h);
2493
- g === ue ? c++ : g === de && p++;
2502
+ g === le ? c++ : g === ue && p++;
2494
2503
  }
2495
2504
  let v = s;
2496
2505
  for (; v > t + i.length;) {
2497
2506
  let n = e.charCodeAt(v - 1);
2498
- if (n === ie || n === te || n === A || n === O || n === re || n === de || n === C || n === w || n === m) {
2499
- if (n === de) {
2507
+ if (n === z || n === te || n === A || n === O || n === re || n === ue || n === C || n === w || n === m) {
2508
+ if (n === ue) {
2500
2509
  if (c >= p) break;
2501
2510
  p--;
2502
2511
  }
2503
2512
  v--;
2504
2513
  } else if (n === ne) {
2505
- for (var y = v - 2; y > t && (e.charCodeAt(y) >= U && e.charCodeAt(y) <= W || e.charCodeAt(y) >= G && e.charCodeAt(y) <= me || e.charCodeAt(y) >= V && e.charCodeAt(y) <= H);) y--;
2514
+ for (var y = v - 2; y > t && (e.charCodeAt(y) >= W && e.charCodeAt(y) <= G || e.charCodeAt(y) >= K && e.charCodeAt(y) <= pe || e.charCodeAt(y) >= H && e.charCodeAt(y) <= U);) y--;
2506
2515
  y >= t && e.charCodeAt(y) === k ? v = y : v--;
2507
2516
  } else break;
2508
2517
  }
2509
2518
  if (v <= t + i.length) return null;
2510
2519
  var b = t + (a ? 4 : i.length), x = e.indexOf("/", b);
2511
2520
  if ((x < 0 || x > v) && (x = v), a && e.indexOf(".", b) === -1) return null;
2512
- for (var S = -1, E = -1, D = x - 1; D >= b; D--) if (e.charCodeAt(D) === ie) if (S < 0) S = D;
2521
+ for (var S = -1, E = -1, D = x - 1; D >= b; D--) if (e.charCodeAt(D) === z) if (S < 0) S = D;
2513
2522
  else {
2514
2523
  E = D;
2515
2524
  break;
@@ -2518,45 +2527,45 @@ function mn(e, t, n, r) {
2518
2527
  var j = e.slice(t, v), L = a ? "http://" + j : j;
2519
2528
  return {
2520
2529
  node: {
2521
- type: K.link,
2530
+ type: q.link,
2522
2531
  target: L,
2523
2532
  title: void 0,
2524
2533
  children: [{
2525
- type: K.text,
2534
+ type: q.text,
2526
2535
  text: j
2527
2536
  }]
2528
2537
  },
2529
2538
  end: v
2530
2539
  };
2531
2540
  }
2532
- function hn(e, t, n, r) {
2541
+ function vn(e, t, n, r) {
2533
2542
  if (r.disableBareUrls) return null;
2534
2543
  for (var i = t, a = i; i < n;) {
2535
2544
  var o = e.charCodeAt(i);
2536
- if (o >= U && o <= W || o >= G && o <= me || o >= V && o <= H || o === ie || o === O || o === v || o === 36 || o === y || o === k || o === z || o === C || o === oe || o === ae || o === x || o === re || o === g || o === w || o === p || o === ce || o === se || o === le || o === m || o === b) i++;
2545
+ if (o >= W && o <= G || o >= K && o <= pe || o >= H && o <= U || o === z || o === O || o === v || o === 36 || o === y || o === k || o === B || o === C || o === oe || o === ie || o === x || o === re || o === g || o === w || o === p || o === se || o === V || o === ce || o === m || o === b) i++;
2537
2546
  else break;
2538
2547
  }
2539
2548
  if (i === a || i >= n || e.charCodeAt(i) !== E) return null;
2540
2549
  i++;
2541
2550
  for (var s = i, c = -1, l = i; i < n;) {
2542
2551
  var o = e.charCodeAt(i);
2543
- if (o >= U && o <= W || o >= G && o <= me || o >= V && o <= H) i++;
2552
+ if (o >= W && o <= G || o >= K && o <= pe || o >= H && o <= U) i++;
2544
2553
  else if ((o === b || o === w) && i > s) i++;
2545
- else if (o === ie) {
2554
+ else if (o === z) {
2546
2555
  if (i === s) break;
2547
2556
  var u = e.charCodeAt(i - 1);
2548
2557
  if (u === b || u === w || i - l > 63) break;
2549
2558
  if (i + 1 < n) {
2550
2559
  var d = e.charCodeAt(i + 1);
2551
- if (d >= U && d <= W || d >= G && d <= me || d >= V && d <= H) c = i, l = i + 1, i++;
2560
+ if (d >= W && d <= G || d >= K && d <= pe || d >= H && d <= U) c = i, l = i + 1, i++;
2552
2561
  else break;
2553
2562
  } else break;
2554
2563
  } else break;
2555
2564
  }
2556
2565
  if (i - l > 63 || c < 0) return null;
2557
2566
  var f = e.charCodeAt(i - 1);
2558
- if (!(f >= U && f <= W || f >= G && f <= me || f >= V && f <= H) || i <= c + 1) return null;
2559
- for (var h = -1, _ = c - 1; _ >= s; _--) if (e.charCodeAt(_) === ie) {
2567
+ if (!(f >= W && f <= G || f >= K && f <= pe || f >= H && f <= U) || i <= c + 1) return null;
2568
+ for (var h = -1, _ = c - 1; _ >= s; _--) if (e.charCodeAt(_) === z) {
2560
2569
  h = _;
2561
2570
  break;
2562
2571
  }
@@ -2564,36 +2573,36 @@ function hn(e, t, n, r) {
2564
2573
  var S = e.slice(t, i);
2565
2574
  return {
2566
2575
  node: {
2567
- type: K.link,
2576
+ type: q.link,
2568
2577
  target: "mailto:" + S,
2569
2578
  title: void 0,
2570
2579
  children: [{
2571
- type: K.text,
2580
+ type: q.text,
2572
2581
  text: S
2573
2582
  }]
2574
2583
  },
2575
2584
  end: i
2576
2585
  };
2577
2586
  }
2578
- function gn(e) {
2579
- for (var t = 0; t < e.length; t++) if (e[t].type === K.link || "children" in e[t] && Array.isArray(e[t].children) && gn(e[t].children)) return !0;
2587
+ function yn(e) {
2588
+ for (var t = 0; t < e.length; t++) if (e[t].type === q.link || "children" in e[t] && Array.isArray(e[t].children) && yn(e[t].children)) return !0;
2580
2589
  return !1;
2581
2590
  }
2582
- function _n(e) {
2591
+ function bn(e) {
2583
2592
  for (var t = "", n = 0; n < e.length; n++) {
2584
2593
  var r = e[n];
2585
- r.type === K.text ? t += r.text : r.type === K.breakLine ? t += " " : r.type === K.codeInline ? t += r.text : "children" in r && Array.isArray(r.children) ? t += _n(r.children) : r.type === K.image ? t += r.alt || "" : r.type === K.link && (t += _n(r.children));
2594
+ r.type === q.text ? t += r.text : r.type === q.breakLine ? t += " " : r.type === q.codeInline ? t += r.text : "children" in r && Array.isArray(r.children) ? t += bn(r.children) : r.type === q.image ? t += r.alt || "" : r.type === q.link && (t += bn(r.children));
2586
2595
  }
2587
2596
  return t;
2588
2597
  }
2589
- function vn(e) {
2590
- let t = e.includes("&") ? be(e) : e;
2598
+ function xn(e) {
2599
+ let t = e.includes("&") ? ye(e) : e;
2591
2600
  return {
2592
- type: K.text,
2601
+ type: q.text,
2593
2602
  text: t
2594
2603
  };
2595
2604
  }
2596
- function yn(e, t, n, r, i) {
2605
+ function Sn(e, t, n, r, i) {
2597
2606
  if (e.charCodeAt(t) !== T) return null;
2598
2607
  var a = t + 1;
2599
2608
  if (a >= n) return null;
@@ -2602,7 +2611,7 @@ function yn(e, t, n, r, i) {
2602
2611
  var s = a + 3;
2603
2612
  if (s < n && e.charCodeAt(s) === _) return {
2604
2613
  node: {
2605
- type: K.htmlComment,
2614
+ type: q.htmlComment,
2606
2615
  text: "",
2607
2616
  h: !0
2608
2617
  },
@@ -2610,7 +2619,7 @@ function yn(e, t, n, r, i) {
2610
2619
  };
2611
2620
  if (s + 1 < n && e.charCodeAt(s) === b && e.charCodeAt(s + 1) === _) return {
2612
2621
  node: {
2613
- type: K.htmlComment,
2622
+ type: q.htmlComment,
2614
2623
  text: "-",
2615
2624
  h: !0
2616
2625
  },
@@ -2619,7 +2628,7 @@ function yn(e, t, n, r, i) {
2619
2628
  var c = e.indexOf("-->", s);
2620
2629
  return c !== -1 && c <= n - 3 ? {
2621
2630
  node: {
2622
- type: K.htmlComment,
2631
+ type: q.htmlComment,
2623
2632
  text: e.slice(t + 4, c),
2624
2633
  h: !1
2625
2634
  },
@@ -2630,7 +2639,7 @@ function yn(e, t, n, r, i) {
2630
2639
  var d = e.indexOf("?>", a + 1);
2631
2640
  return d !== -1 && d < n ? {
2632
2641
  node: {
2633
- type: K.htmlSelfClosing,
2642
+ type: q.htmlSelfClosing,
2634
2643
  tag: "?",
2635
2644
  attrs: {},
2636
2645
  a: e.slice(t, d + 2),
@@ -2645,7 +2654,7 @@ function yn(e, t, n, r, i) {
2645
2654
  var m = e.indexOf("]]>", a + 8);
2646
2655
  return m !== -1 && m < n ? {
2647
2656
  node: {
2648
- type: K.htmlSelfClosing,
2657
+ type: q.htmlSelfClosing,
2649
2658
  tag: "![CDATA[",
2650
2659
  attrs: {},
2651
2660
  a: e.slice(t, m + 3),
@@ -2654,11 +2663,11 @@ function yn(e, t, n, r, i) {
2654
2663
  end: m + 3
2655
2664
  } : null;
2656
2665
  }
2657
- if (p >= U && p <= W) {
2666
+ if (p >= W && p <= G) {
2658
2667
  var g = e.indexOf(">", a + 2);
2659
2668
  return g !== -1 && g < n ? {
2660
2669
  node: {
2661
- type: K.htmlSelfClosing,
2670
+ type: q.htmlSelfClosing,
2662
2671
  tag: "!" + e.slice(a + 1, g),
2663
2672
  attrs: {},
2664
2673
  a: e.slice(t, g + 1),
@@ -2668,14 +2677,14 @@ function yn(e, t, n, r, i) {
2668
2677
  } : null;
2669
2678
  }
2670
2679
  }
2671
- if (o === ae) {
2680
+ if (o === ie) {
2672
2681
  var v = a + 1;
2673
2682
  if (v >= n) return null;
2674
2683
  var y = e.charCodeAt(v);
2675
- if (!(y >= U && y <= W || y >= G && y <= me)) return null;
2684
+ if (!(y >= W && y <= G || y >= K && y <= pe)) return null;
2676
2685
  for (v++; v < n;) {
2677
2686
  var x = e.charCodeAt(v);
2678
- if (x >= U && x <= W || x >= G && x <= me || x >= V && x <= H || x === b) v++;
2687
+ if (x >= W && x <= G || x >= K && x <= pe || x >= H && x <= U || x === b) v++;
2679
2688
  else break;
2680
2689
  }
2681
2690
  for (; v < n && (e.charCodeAt(v) === l || e.charCodeAt(v) === u || e.charCodeAt(v) === f);) v++;
@@ -2683,7 +2692,7 @@ function yn(e, t, n, r, i) {
2683
2692
  var S = e.slice(a + 1, v).trim();
2684
2693
  return {
2685
2694
  node: {
2686
- type: K.htmlSelfClosing,
2695
+ type: q.htmlSelfClosing,
2687
2696
  tag: S,
2688
2697
  attrs: {},
2689
2698
  a: e.slice(t, v + 1),
@@ -2694,68 +2703,68 @@ function yn(e, t, n, r, i) {
2694
2703
  }
2695
2704
  return null;
2696
2705
  }
2697
- if (!(o >= U && o <= W || o >= G && o <= me)) return null;
2698
- var C = ut(e, t);
2706
+ if (!(o >= W && o <= G || o >= K && o <= pe)) return null;
2707
+ var C = pt(e, t);
2699
2708
  if (!C) return null;
2700
2709
  var w = C.tag, E = w.toLowerCase();
2701
2710
  if (C.selfClosing || Te(w)) return {
2702
2711
  node: {
2703
- type: K.htmlSelfClosing,
2712
+ type: q.htmlSelfClosing,
2704
2713
  tag: w,
2705
- attrs: Ht(C.attrs, w, i),
2714
+ attrs: Gt(C.attrs, w, i),
2706
2715
  a: e.slice(t, C.end),
2707
2716
  b: !1
2708
2717
  },
2709
2718
  end: C.end
2710
2719
  };
2711
- var D = et.has(E), k = Kt(e.slice(0, n), C.end, w);
2720
+ var D = rt.has(E), k = Yt(e.slice(0, n), C.end, w);
2712
2721
  if (k === -1) return {
2713
2722
  node: {
2714
- type: K.htmlSelfClosing,
2723
+ type: q.htmlSelfClosing,
2715
2724
  tag: w,
2716
- attrs: Ht(C.attrs, w, i),
2725
+ attrs: Gt(C.attrs, w, i),
2717
2726
  a: e.slice(t, C.end),
2718
2727
  b: !1
2719
2728
  },
2720
2729
  end: C.end
2721
2730
  };
2722
- var A = Wt(e, "</" + E, k), j = e.slice(C.end, A), M = [];
2731
+ var A = qt(e, "</" + E, k), j = e.slice(C.end, A), M = [];
2723
2732
  if (D) j.trim() && (M = [{
2724
- type: K.text,
2733
+ type: q.text,
2725
2734
  text: j
2726
2735
  }]);
2727
2736
  else {
2728
2737
  var N = j.trim();
2729
2738
  if (N) {
2730
2739
  var { inAnchor: P, inline: F } = r;
2731
- E === "a" && (r.inAnchor = !0), N.indexOf("\n\n") !== -1 || /^#{1,6}\s/.test(N) ? (r.inline = !1, M = wn(N, r, i)) : M = Sn(N, 0, N.length, r, i), r.inAnchor = P, r.inline = F;
2740
+ E === "a" && (r.inAnchor = !0), N.indexOf("\n\n") !== -1 || /^#{1,6}\s/.test(N) ? (r.inline = !1, M = Dn(N, r, i)) : M = Tn(N, 0, N.length, r, i), r.inAnchor = P, r.inline = F;
2732
2741
  }
2733
2742
  }
2734
2743
  return {
2735
2744
  node: {
2736
- type: K.htmlBlock,
2745
+ type: q.htmlBlock,
2737
2746
  tag: w,
2738
- attrs: Ht(C.attrs, w, i),
2747
+ attrs: Gt(C.attrs, w, i),
2739
2748
  f: C.rawAttrs,
2740
2749
  children: M,
2741
2750
  a: void 0,
2742
2751
  text: j,
2743
2752
  c: !1,
2744
- b: !1,
2745
- endPos: k,
2746
- e: !1
2753
+ b: !1
2747
2754
  },
2748
2755
  end: k
2749
2756
  };
2750
2757
  }
2751
- var bn = 200, xn = 0;
2752
- function Sn(e, t, n, r, i) {
2753
- if (xn++, xn > bn) return xn--, [{
2754
- type: K.text,
2758
+ var Cn = 200, wn = 0;
2759
+ function Tn(e, t, n, r, i) {
2760
+ if (wn++, wn > Cn) return wn--, [{
2761
+ type: q.text,
2755
2762
  text: e.slice(t, n)
2756
2763
  }];
2757
- let a = r;
2758
- if (i.streaming || i.optimizeForStreaming) {
2764
+ var a = r.e;
2765
+ r.e = void 0;
2766
+ let o = r;
2767
+ if (i.optimizeForStreaming) {
2759
2768
  let r = function(e, t) {
2760
2769
  for (var n = 1, r = t + 1; r < e.length; r++) {
2761
2770
  var i = e.charCodeAt(r);
@@ -2764,163 +2773,163 @@ function Sn(e, t, n, r, i) {
2764
2773
  }
2765
2774
  return -1;
2766
2775
  }, i = e.slice(t, n), a = i;
2767
- for (var o = 0, s = 0, c = 0, l = 0, u = 0, d = -1, f = -1, _ = -1, v = -1, y = -1, b = 0; b < i.length; b++) {
2768
- var E = i.charCodeAt(b);
2769
- E === C ? b + 1 < i.length && i.charCodeAt(b + 1) === C ? (o++, d = b, b++) : (s++, f = b) : E === w ? b + 1 < i.length && i.charCodeAt(b + 1) === w ? (c++, _ = b, b++) : (l++, v = b) : E === m && b + 1 < i.length && i.charCodeAt(b + 1) === m && (u++, y = b, b++);
2776
+ for (var s = 0, c = 0, l = 0, u = 0, d = 0, f = -1, _ = -1, v = -1, y = -1, b = -1, E = 0; E < i.length; E++) {
2777
+ var k = i.charCodeAt(E);
2778
+ k === C ? E + 1 < i.length && i.charCodeAt(E + 1) === C ? (s++, f = E, E++) : (c++, _ = E) : k === w ? E + 1 < i.length && i.charCodeAt(E + 1) === w ? (l++, v = E, E++) : (u++, y = E) : k === m && E + 1 < i.length && i.charCodeAt(E + 1) === m && (d++, b = E, E++);
2770
2779
  }
2771
- var k = [];
2772
- u % 2 == 1 && y >= 0 && k.push([y, 2]), c % 2 == 1 && _ >= 0 && k.push([_, 2]), l % 2 == 1 && v >= 0 && k.push([v, 1]), o % 2 == 1 && d >= 0 && k.push([d, 2]), s % 2 == 1 && f >= 0 && k.push([f, 1]), k.sort(function(e, t) {
2780
+ var A = [];
2781
+ d % 2 == 1 && b >= 0 && A.push([b, 2]), l % 2 == 1 && v >= 0 && A.push([v, 2]), u % 2 == 1 && y >= 0 && A.push([y, 1]), s % 2 == 1 && f >= 0 && A.push([f, 2]), c % 2 == 1 && _ >= 0 && A.push([_, 1]), A.sort(function(e, t) {
2773
2782
  return t[0] - e[0];
2774
2783
  });
2775
- for (var A = 0; A < k.length; A++) {
2776
- var j = k[A][0], I = k[A][1];
2777
- i = i.slice(0, j) + i.slice(j + I);
2784
+ for (var j = 0; j < A.length; j++) {
2785
+ var I = A[j][0], ee = A[j][1];
2786
+ i = i.slice(0, I) + i.slice(I + ee);
2778
2787
  }
2779
- let g = 0, x = -1;
2780
- for (let e = 0; e < i.length; e++) i.charCodeAt(e) === p && (g++, x = e);
2781
- if (g % 2 == 1 && x !== -1) {
2788
+ let o = 0, g = -1;
2789
+ for (let e = 0; e < i.length; e++) i.charCodeAt(e) === p && (o++, g = e);
2790
+ if (o % 2 == 1 && g !== -1) {
2782
2791
  let e = !1, t = -1, n = 0;
2783
2792
  for (; n < i.length;) i.charCodeAt(n) === p && (e ? (e = !1, t = -1) : (t = n, e = !0)), n++;
2784
2793
  e && t !== -1 && (i = i.slice(0, t));
2785
2794
  }
2786
- for (var ee = !0; ee;) {
2787
- ee = !1;
2788
- for (var L = -1, R = -1, te = -1, ne = !1, re = 0; re < i.length; re++) if (i.charCodeAt(re) === h && (re === 0 || i.charCodeAt(re - 1) !== S)) {
2789
- var ie = re > 0 && i.charCodeAt(re - 1) === O, z = ie ? re - 1 : re, B = r(i, re);
2790
- if (B === -1) L = z, ne = ie, R = re + 1, te = i.length;
2795
+ for (var L = !0; L;) {
2796
+ L = !1;
2797
+ for (var R = -1, te = -1, ne = -1, re = !1, z = 0; z < i.length; z++) if (i.charCodeAt(z) === h && (z === 0 || i.charCodeAt(z - 1) !== S)) {
2798
+ var B = z > 0 && i.charCodeAt(z - 1) === O, ae = B ? z - 1 : z, oe = r(i, z);
2799
+ if (oe === -1) R = ae, re = B, te = z + 1, ne = i.length;
2791
2800
  else {
2792
- var oe = B + 1;
2793
- if (oe >= i.length) L = z, ne = ie, R = re + 1, te = B;
2794
- else if (i.charCodeAt(oe) === ue) {
2795
- var se = i.indexOf(")", oe + 1);
2796
- se === -1 ? (L = z, ne = ie, R = re + 1, te = B, re = i.length) : re = se;
2797
- } else if (i.charCodeAt(oe) === h) {
2798
- var ce = i.indexOf("]", oe + 1);
2799
- ce === -1 ? (L = z, ne = ie, R = re + 1, te = B, re = i.length) : re = ce;
2800
- } else re = B;
2801
+ var V = oe + 1;
2802
+ if (V >= i.length) R = ae, re = B, te = z + 1, ne = oe;
2803
+ else if (i.charCodeAt(V) === le) {
2804
+ var se = i.indexOf(")", V + 1);
2805
+ se === -1 ? (R = ae, re = B, te = z + 1, ne = oe, z = i.length) : z = se;
2806
+ } else if (i.charCodeAt(V) === h) {
2807
+ var ce = i.indexOf("]", V + 1);
2808
+ ce === -1 ? (R = ae, re = B, te = z + 1, ne = oe, z = i.length) : z = ce;
2809
+ } else z = oe;
2801
2810
  }
2802
2811
  }
2803
- if (L >= 0) {
2804
- var le = ne ? "" : i.slice(R, te);
2805
- i = i.slice(0, L) + le, ee = !0;
2812
+ if (R >= 0) {
2813
+ var ue = re ? "" : i.slice(te, ne);
2814
+ i = i.slice(0, R) + ue, L = !0;
2806
2815
  }
2807
2816
  }
2808
- let T = i.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);
2809
- if (T && T.index !== void 0) {
2810
- var de = T[0].length - T[2].length;
2811
- if (!(de >= 2 && T[0].charCodeAt(de - 2) === ae)) {
2812
- for (var fe = !1, ge = 0, _e = 0; _e < T.index; _e++) i.charCodeAt(_e) === p && ge++;
2813
- if (fe = ge % 2 == 1, !fe) {
2814
- let e = T[1];
2815
- Ut(i, "</" + e, 0) === -1 && (i = i.replace(/<[A-Z][A-Za-z0-9]*(?:\s[^>]*)?>([^<]*)$/, "$1"));
2817
+ let x = i.match(/<([A-Z][A-Za-z0-9]*)(?:\s[^>]*)?>([^<]*)$/);
2818
+ if (x && x.index !== void 0) {
2819
+ var de = x[0].length - x[2].length;
2820
+ if (!(de >= 2 && x[0].charCodeAt(de - 2) === ie)) {
2821
+ for (var he = !1, ge = 0, _e = 0; _e < x.index; _e++) i.charCodeAt(_e) === p && ge++;
2822
+ if (he = ge % 2 == 1, !he) {
2823
+ let e = x[1];
2824
+ Kt(i, "</" + e, 0) === -1 && (i = i.replace(/<[A-Z][A-Za-z0-9]*(?:\s[^>]*)?>([^<]*)$/, "$1"));
2816
2825
  }
2817
2826
  }
2818
2827
  }
2819
2828
  i !== a && (e = e.slice(0, t) + i, n = t + i.length);
2820
2829
  }
2821
- let ve = [];
2822
- var q = [];
2823
- let J = t;
2824
- var ye = i.disableAutoLink || i.disableBareUrls || a.inAnchor ? -1 : e.indexOf("@", t);
2830
+ let J = [];
2831
+ var Y = [];
2832
+ let ve = t;
2833
+ var ye = i.disableAutoLink || i.disableBareUrls || o.inAnchor ? -1 : e.indexOf("@", t);
2825
2834
  for (ye >= n && (ye = -1); t < n;) {
2826
- let r = e.charCodeAt(t), o = null;
2835
+ let r = e.charCodeAt(t), a = null;
2827
2836
  if (r === p) {
2828
- if (o = tn(e, t, n), !o) {
2829
- var be = Tt(e, t, n, p);
2837
+ if (a = an(e, t, n), !a) {
2838
+ var be = Ot(e, t, n, p);
2830
2839
  t += be - 1;
2831
2840
  }
2832
2841
  } else if (r === C || r === w) {
2833
- var xe = ln(e, t, n);
2842
+ var xe = fn(e, t, n);
2834
2843
  if (xe) {
2835
2844
  if (xe.canOpen || xe.canClose) {
2836
- t > J && ve.push(vn(e.slice(J, t)));
2837
- var Se = vn(e.slice(t, t + xe.len));
2838
- q.push({
2839
- idx: ve.length,
2845
+ t > ve && J.push(xn(e.slice(ve, t)));
2846
+ var Se = xn(e.slice(t, t + xe.len));
2847
+ Y.push({
2848
+ idx: J.length,
2840
2849
  ch: r,
2841
2850
  len: xe.len,
2842
2851
  canOpen: xe.canOpen,
2843
2852
  canClose: xe.canClose,
2844
2853
  active: !0
2845
- }), ve.push(Se), t += xe.len, J = t;
2854
+ }), J.push(Se), t += xe.len, ve = t;
2846
2855
  continue;
2847
2856
  }
2848
2857
  t += xe.len - 1;
2849
2858
  }
2850
- } else if (r === m) o = an(e, t, n, a, i);
2851
- else if (r === x) o = on(e, t, n, a, i);
2852
- else if (r === h) t + 1 < n && e.charCodeAt(t + 1) === g && (o = pn(e, t, n, a)), o ||= dn(e, t, n, a, i);
2853
- else if (r === O && t + 1 < n && e.charCodeAt(t + 1) === h) o = dn(e, t, n, a, i);
2854
- else if (r === T) o = fn(e, t, n), !o && !i.disableParsingRawHTML && !i.ignoreHTMLBlocks && (o = yn(e, t, n, a, i));
2855
- else if ((r === N || r === P || r === M) && !a.inAnchor && !i.disableAutoLink && (t === 0 || e.charCodeAt(t - 1) !== T)) {
2856
- var Y = t + 1 < n ? e.charCodeAt(t + 1) : 0;
2857
- (r === N && Y === F || r === M && Y === F || r === P && Y === P) && (o = mn(e, t, n, i));
2858
- }
2859
- if (!o && ye >= 0 && ye - t <= 64 && !a.inAnchor && !i.disableAutoLink && !i.disableBareUrls && (r >= U && r <= W || r >= G && r <= me || r >= V && r <= H) && (o = hn(e, t, n, i), !o && t >= ye && (ye = e.indexOf("@", t + 1), ye >= n && (ye = -1))), r === pe) {
2860
- t > J && ve.push(vn(e.slice(J, t))), ve.push({ type: K.breakLine }), t++, J = t;
2859
+ } else if (r === m) a = cn(e, t, n, o, i);
2860
+ else if (r === x) a = ln(e, t, n, o, i);
2861
+ else if (r === h) t + 1 < n && e.charCodeAt(t + 1) === g && (a = gn(e, t, n, o)), a ||= mn(e, t, n, o, i);
2862
+ else if (r === O && t + 1 < n && e.charCodeAt(t + 1) === h) a = mn(e, t, n, o, i);
2863
+ else if (r === T) a = hn(e, t, n), !a && !i.disableParsingRawHTML && !i.ignoreHTMLBlocks && (a = Sn(e, t, n, o, i));
2864
+ else if ((r === N || r === P || r === M) && !o.inAnchor && !i.disableAutoLink && (t === 0 || e.charCodeAt(t - 1) !== T)) {
2865
+ var Ce = t + 1 < n ? e.charCodeAt(t + 1) : 0;
2866
+ (r === N && Ce === F || r === M && Ce === F || r === P && Ce === P) && (a = _n(e, t, n, i));
2867
+ }
2868
+ if (!a && ye >= 0 && ye - t <= 64 && !o.inAnchor && !i.disableAutoLink && !i.disableBareUrls && (r >= W && r <= G || r >= K && r <= pe || r >= H && r <= U) && (a = vn(e, t, n, i), !a && t >= ye && (ye = e.indexOf("@", t + 1), ye >= n && (ye = -1))), r === fe) {
2869
+ t > ve && J.push(xn(e.slice(ve, t))), J.push({ type: q.breakLine }), t++, ve = t;
2861
2870
  continue;
2862
2871
  }
2863
- if (o) t > J && ve.push(vn(e.slice(J, t))), ve.push(o.node), t = o.end, J = t;
2872
+ if (a) t > ve && J.push(xn(e.slice(ve, t))), J.push(a.node), t = a.end, ve = t;
2864
2873
  else {
2865
- if (r === S && t + 1 < n && _t(e.charCodeAt(t + 1)) & Oe) {
2866
- t > J && ve.push(vn(e.slice(J, t))), ve.push(vn(e[t + 1])), t += 2, J = t;
2874
+ if (r === S && t + 1 < n && bt(e.charCodeAt(t + 1)) & Oe) {
2875
+ t > ve && J.push(xn(e.slice(ve, t))), J.push(xn(e[t + 1])), t += 2, ve = t;
2867
2876
  continue;
2868
2877
  }
2869
- if (t++, ye < 0 || ye - t > 64) for (; t < n;) {
2870
- var Ce = e.charCodeAt(t);
2871
- if (Ce < he && !at[Ce]) t++;
2878
+ if (t++, ye < 0 || ye - t > 64) for (; t < n && !(ye >= 0 && ye - t <= 64);) {
2879
+ var X = e.charCodeAt(t);
2880
+ if (X < me && !ct[X]) t++;
2872
2881
  else break;
2873
2882
  }
2874
2883
  }
2875
2884
  }
2876
- if (n > J) {
2877
- let t = e.slice(J, n);
2878
- t && ve.push(vn(t));
2885
+ if (n > ve) {
2886
+ let t = e.slice(ve, n);
2887
+ t && J.push(xn(t));
2879
2888
  }
2880
- return q.length > 0 && un(ve, q, r, i), xn--, ve;
2889
+ return Y.length > 0 && pn(J, Y, r, i), r.e = a, wn--, J;
2881
2890
  }
2882
- var Cn = 500;
2883
- function wn(e, t, n) {
2891
+ var En = 500;
2892
+ function Dn(e, t, n) {
2884
2893
  var r = t.i || 0;
2885
- if (r > Cn) return [{
2886
- type: K.text,
2894
+ if (r > En) return [{
2895
+ type: q.text,
2887
2896
  text: e
2888
2897
  }];
2889
- if (t.i = r + 1, (n.streaming || n.optimizeForStreaming) && !t.j) {
2898
+ if (t.i = r + 1, n.optimizeForStreaming && !t.j) {
2890
2899
  var i = e.length;
2891
2900
  i > 0 && e.charCodeAt(i - 1) === f && i--;
2892
2901
  for (var a = i; a > 0 && e.charCodeAt(a - 1) !== f;) a--;
2893
- if (a > 0 && e.charCodeAt(a) === se) {
2902
+ if (a > 0 && e.charCodeAt(a) === V) {
2894
2903
  for (var o = !0, s = a; s < i; s++) {
2895
2904
  var c = e.charCodeAt(s);
2896
- if (c !== l && c !== u && c !== b && c !== A && c !== se) {
2905
+ if (c !== l && c !== u && c !== b && c !== A && c !== V) {
2897
2906
  o = !1;
2898
2907
  break;
2899
2908
  }
2900
2909
  }
2901
2910
  if (o) {
2902
2911
  for (var d = a - 1; d > 0 && e.charCodeAt(d - 1) !== f;) d--;
2903
- e.charCodeAt(d) === se && (e = e.slice(0, d).trimEnd());
2912
+ e.charCodeAt(d) === V && (e = e.slice(0, d).trimEnd());
2904
2913
  }
2905
2914
  }
2906
2915
  var g = e.trim(), y = g.lastIndexOf("\n"), x = y === -1 ? g : g.slice(y + 1);
2907
- if (x.length > 0 && x.charCodeAt(0) === se) {
2916
+ if (x.length > 0 && x.charCodeAt(0) === V) {
2908
2917
  for (var S = !1, E = !1, D = 1; D < x.length; D++) {
2909
2918
  var O = x.charCodeAt(D);
2910
- O === se && (S = !0), O === b && (E = !0);
2919
+ O === V && (S = !0), O === b && (E = !0);
2911
2920
  }
2912
2921
  S && E && (e = y === -1 ? "" : e.slice(0, e.lastIndexOf(x)).trimEnd());
2913
2922
  }
2914
2923
  for (var k = -1, j = -1, M = -1, N = e.length - 1; N >= 0; N--) if (e.charCodeAt(N) === T) {
2915
2924
  var P = N + 1 < e.length ? e.charCodeAt(N + 1) : 0;
2916
- if (P >= U && P <= W || P >= G && P <= me) {
2925
+ if (P >= W && P <= G || P >= K && P <= pe) {
2917
2926
  for (var F = N + 2; F < e.length;) {
2918
2927
  var I = e.charCodeAt(F);
2919
- if (I >= U && I <= W || I >= G && I <= me || I >= V && I <= H) F++;
2928
+ if (I >= W && I <= G || I >= K && I <= pe || I >= H && I <= U) F++;
2920
2929
  else break;
2921
2930
  }
2922
2931
  for (var ee = F; ee < e.length && e.charCodeAt(ee) !== _;) ee++;
2923
- if (ee < e.length && e.charCodeAt(ee - 1) !== ae) {
2932
+ if (ee < e.length && e.charCodeAt(ee - 1) !== ie) {
2924
2933
  for (var L = !1, R = ee + 1; R < e.length; R++) if (e.charCodeAt(R) === T) {
2925
2934
  L = !0;
2926
2935
  break;
@@ -2934,52 +2943,52 @@ function wn(e, t, n) {
2934
2943
  for (var te = 0, ne = 0; ne < k; ne++) e.charCodeAt(ne) === p && te++;
2935
2944
  if (te % 2 == 0) {
2936
2945
  var re = e.slice(k + 1, j);
2937
- Ut(e, "</" + re, 0) === -1 && (e = e.slice(0, k) + e.slice(M));
2938
- }
2939
- }
2940
- for (var z = e.length; z > 0 && e.charCodeAt(z - 1) === f;) z--;
2941
- if (z > 0) {
2942
- for (var B = z; B > 0 && e.charCodeAt(B - 1) !== f;) B--;
2943
- for (var ce = B, le = 0; ce < z && e.charCodeAt(ce) === l && le < 3;) ce++, le++;
2944
- if (B > 0 && ce < z && jt(e, ce, z)) {
2945
- for (var ue = B - 1, pe = ue; pe > 0 && e.charCodeAt(pe - 1) !== f;) pe--;
2946
- kt(e, pe, ue) || (e = e.slice(0, B).trimEnd());
2947
- }
2948
- }
2949
- var he = e.length;
2950
- if (he > 0) {
2951
- for (var ge = e.lastIndexOf("\n"), ve = ge === -1 ? 0 : ge + 1, q = he, J = ve, ye = 0; J < q && e.charCodeAt(J) === l && ye < 3;) J++, ye++;
2952
- if (J < q) {
2953
- var be = e.charCodeAt(J), xe = !1;
2954
- if (be === C || be === b || be === oe) {
2955
- var Se = J + 1;
2956
- if (Se >= q || e.charCodeAt(Se) === l || e.charCodeAt(Se) === u) {
2957
- for (var Y = Se; Y < q && (e.charCodeAt(Y) === l || e.charCodeAt(Y) === u);) Y++;
2958
- Y >= q && (xe = !0);
2946
+ Kt(e, "</" + re, 0) === -1 && (e = e.slice(0, k) + e.slice(M));
2947
+ }
2948
+ }
2949
+ for (var B = e.length; B > 0 && e.charCodeAt(B - 1) === f;) B--;
2950
+ if (B > 0) {
2951
+ for (var ae = B; ae > 0 && e.charCodeAt(ae - 1) !== f;) ae--;
2952
+ for (var se = ae, ce = 0; se < B && e.charCodeAt(se) === l && ce < 3;) se++, ce++;
2953
+ if (ae > 0 && se < B && Pt(e, se, B)) {
2954
+ for (var le = ae - 1, fe = le; fe > 0 && e.charCodeAt(fe - 1) !== f;) fe--;
2955
+ Mt(e, fe, le) || (e = e.slice(0, ae).trimEnd());
2956
+ }
2957
+ }
2958
+ var me = e.length;
2959
+ if (me > 0) {
2960
+ for (var he = e.lastIndexOf("\n"), _e = he === -1 ? 0 : he + 1, J = me, Y = _e, ve = 0; Y < J && e.charCodeAt(Y) === l && ve < 3;) Y++, ve++;
2961
+ if (Y < J) {
2962
+ var ye = e.charCodeAt(Y), be = !1;
2963
+ if (ye === C || ye === b || ye === oe) {
2964
+ var xe = Y + 1;
2965
+ if (xe >= J || e.charCodeAt(xe) === l || e.charCodeAt(xe) === u) {
2966
+ for (var Se = xe; Se < J && (e.charCodeAt(Se) === l || e.charCodeAt(Se) === u);) Se++;
2967
+ Se >= J && (be = !0);
2959
2968
  }
2960
- } else if (be >= V && be <= H) {
2961
- for (var Ce = J; Ce < q && e.charCodeAt(Ce) >= V && e.charCodeAt(Ce) <= H;) Ce++;
2962
- if (Ce < q && (e.charCodeAt(Ce) === ie || e.charCodeAt(Ce) === de)) {
2969
+ } else if (ye >= H && ye <= U) {
2970
+ for (var Ce = Y; Ce < J && e.charCodeAt(Ce) >= H && e.charCodeAt(Ce) <= U;) Ce++;
2971
+ if (Ce < J && (e.charCodeAt(Ce) === z || e.charCodeAt(Ce) === ue)) {
2963
2972
  var X = Ce + 1;
2964
- if (X >= q || e.charCodeAt(X) === l || e.charCodeAt(X) === u) {
2965
- for (var Z = X; Z < q && (e.charCodeAt(Z) === l || e.charCodeAt(Z) === u);) Z++;
2966
- Z >= q && (xe = !0);
2973
+ if (X >= J || e.charCodeAt(X) === l || e.charCodeAt(X) === u) {
2974
+ for (var Z = X; Z < J && (e.charCodeAt(Z) === l || e.charCodeAt(Z) === u);) Z++;
2975
+ Z >= J && (be = !0);
2967
2976
  }
2968
2977
  }
2969
2978
  }
2970
- xe && (e = e.slice(0, ve).trimEnd());
2979
+ be && (e = e.slice(0, _e).trimEnd());
2971
2980
  }
2972
2981
  }
2973
2982
  }
2974
- if (t.inline) return Sn(e, 0, e.length, t, n);
2983
+ if (t.inline) return Tn(e, 0, e.length, t, n);
2975
2984
  let we = [], Q = 0, Te = e.length;
2976
2985
  if (Q === 0 && !n.disableFrontmatter && e.startsWith("---")) {
2977
- let t = _e(e);
2986
+ let t = ge(e);
2978
2987
  if (t && t.hasValidYaml) {
2979
2988
  if (n.preserveFrontmatter !== !1) {
2980
2989
  let n = e.slice(0, t.endPos).trimEnd();
2981
2990
  we.push({
2982
- type: K.frontmatter,
2991
+ type: q.frontmatter,
2983
2992
  text: n
2984
2993
  });
2985
2994
  }
@@ -2987,23 +2996,23 @@ function wn(e, t, n) {
2987
2996
  }
2988
2997
  }
2989
2998
  for (; Q < Te;) {
2990
- for (var Ee = e.indexOf("\n", Q), De = Ee < 0 ? Te : Ee; Q < Te && kt(e, Q, De);) Q = De < Te ? De + 1 : De, Q < Te && (Ee = e.indexOf("\n", Q), De = Ee < 0 ? Te : Ee);
2999
+ for (var Ee = e.indexOf("\n", Q), De = Ee < 0 ? Te : Ee; Q < Te && Mt(e, Q, De);) Q = De < Te ? De + 1 : De, Q < Te && (Ee = e.indexOf("\n", Q), De = Ee < 0 ? Te : Ee);
2991
3000
  if (Q >= Te) break;
2992
- e.charCodeAt(Q), Ot(e, Q, De);
3001
+ e.charCodeAt(Q), jt(e, Q, De);
2993
3002
  let r = null;
2994
- if (yt = e, bt = Q, xt = De, e.charCodeAt(Q) !== fe && Et >= 4 && !t.inHTML) r = Pt(e, Q);
2995
- else if (e.charCodeAt(Q) !== fe) {
2996
- let i = Q + Dt, a = e.charCodeAt(i);
2997
- a === v ? r = At(e, Q, t, n) : a === _ ? r = Ft(e, Q, t, n) : a === p || a === m ? r = Nt(e, Q, t) : a === b || a === C || a === w ? (r = Mt(e, Q), !r && (r = Bt(e, Q, t, n))) : a === oe || a >= V && a <= H ? r = Bt(e, Q, t, n) : a === T ? r = qt(e, Q, t, n) : a === se ? r = Xt(e, Q, t, n) : a === h && (r = Zt(e, Q, t));
3003
+ if (St = e, Ct = Q, wt = De, e.charCodeAt(Q) !== de && kt >= 4 && !t.inHTML) r = Lt(e, Q);
3004
+ else if (e.charCodeAt(Q) !== de) {
3005
+ let i = Q + At, a = e.charCodeAt(i);
3006
+ a === v ? r = Nt(e, Q, t, n) : a === _ ? r = Rt(e, Q, t, n) : a === p || a === m ? r = It(e, Q, t) : a === b || a === C || a === w ? (r = Ft(e, Q), !r && (r = Ut(e, Q, t, n))) : a === oe || a >= H && a <= U ? r = Ut(e, Q, t, n) : a === T ? r = Xt(e, Q, t, n) : a === V ? r = $t(e, Q, t, n) : a === h && (r = en(e, Q, t));
2998
3007
  }
2999
3008
  if (!r) {
3000
- for (var Oe = !1, ke = Q; ke < De; ke++) if (e.charCodeAt(ke) === se) {
3009
+ for (var Oe = !1, ke = Q; ke < De; ke++) if (e.charCodeAt(ke) === V) {
3001
3010
  Oe = !0;
3002
3011
  break;
3003
3012
  }
3004
- Oe && (r = Xt(e, Q, t, n));
3013
+ Oe && (r = $t(e, Q, t, n));
3005
3014
  }
3006
- if (r ||= $t(e, Q, t, n), r) r.node.type !== K.refCollection && we.push(r.node), Q = r.end;
3015
+ if (r ||= nn(e, Q, t, n), r) r.node.type !== q.refCollection && we.push(r.node), Q = r.end;
3007
3016
  else {
3008
3017
  var Ae = e.indexOf("\n", Q);
3009
3018
  Q = Ae < 0 ? Te : Ae + 1;
@@ -3011,8 +3020,8 @@ function wn(e, t, n) {
3011
3020
  }
3012
3021
  return t.i = r, we;
3013
3022
  }
3014
- function Tn(e, t, n, r) {
3015
- var i = ut(e, t);
3023
+ function On(e, t, n, r) {
3024
+ var i = pt(e, t);
3016
3025
  return i ? {
3017
3026
  tagName: i.tag,
3018
3027
  tagLower: i.tag.toLowerCase(),
@@ -3025,23 +3034,23 @@ function Tn(e, t, n, r) {
3025
3034
  endPos: i.end
3026
3035
  } : null;
3027
3036
  }
3028
- function En(e, t, n) {
3029
- xn = 0, e = Ve(e), !t.refs && (t.refs = {}), t.j = dt(e, t.refs, n);
3030
- let r = wn(e, t, n);
3031
- return t.refs && Object.keys(t.refs).length > 0 ? [{
3032
- type: K.refCollection,
3037
+ function kn(e, t, n) {
3038
+ wn = 0, e = Ve(e), !t.refs && (t.refs = {}), t.j = mt(e, t.refs, n);
3039
+ let r = Dn(e, t, n);
3040
+ return Ue(t.refs) ? [{
3041
+ type: q.refCollection,
3033
3042
  refs: t.refs
3034
3043
  }, ...r] : r;
3035
3044
  }
3036
- var Dn = /^\n+/, On;
3045
+ var An = /^\n+/, jn;
3037
3046
  try {
3038
- On = n.createElement("div").$$typeof;
3047
+ jn = n.createElement("div").$$typeof;
3039
3048
  } catch {
3040
- On = Symbol.for("react.transitional.element");
3049
+ jn = Symbol.for("react.transitional.element");
3041
3050
  }
3042
- function kn(e, t, n) {
3051
+ function Mn(e, t, n) {
3043
3052
  return {
3044
- $$typeof: On,
3053
+ $$typeof: jn,
3045
3054
  type: e,
3046
3055
  key: n == null ? null : "" + n,
3047
3056
  ref: null,
@@ -3052,49 +3061,40 @@ function kn(e, t, n) {
3052
3061
  _debugTask: null
3053
3062
  };
3054
3063
  }
3055
- var An = typeof n.createContext < "u" ? n.createContext(void 0) : void 0;
3056
- function jn(e, t, r, i, a, o, s, c, l) {
3064
+ var Nn = typeof n.createContext < "u" ? n.createContext(void 0) : void 0;
3065
+ function Pn(e, t, r, i, a, o, s, c, l) {
3057
3066
  switch (e.type) {
3058
- case K.blockQuote: {
3067
+ case q.blockQuote: {
3059
3068
  let n = { key: r.key };
3060
- return e.alert && (n.className = "markdown-alert-" + o(e.alert.toLowerCase(), Z), e.children.unshift({
3061
- attrs: {},
3062
- children: [{
3063
- type: K.text,
3064
- text: e.alert
3065
- }],
3066
- c: !0,
3067
- type: K.htmlBlock,
3068
- tag: "header"
3069
- })), i("blockquote", n, t(e.children, r));
3070
- }
3071
- case K.breakLine: return i("br", { key: r.key });
3072
- case K.breakThematic: return i("hr", { key: r.key });
3073
- case K.frontmatter: return c.preserveFrontmatter ? i("pre", { key: r.key }, e.text) : null;
3074
- case K.codeBlock:
3075
- let g = e.lang ? be(e.lang) : "";
3069
+ return e.alert && (n.className = "markdown-alert-" + o(e.alert.toLowerCase(), Z), e.children.unshift(We(e.alert))), i("blockquote", n, t(e.children, r));
3070
+ }
3071
+ case q.breakLine: return i("br", { key: r.key });
3072
+ case q.breakThematic: return i("hr", { key: r.key });
3073
+ case q.frontmatter: return c.preserveFrontmatter ? i("pre", { key: r.key }, e.text) : null;
3074
+ case q.codeBlock:
3075
+ let g = e.lang ? ye(e.lang) : "";
3076
3076
  return i("pre", { key: r.key }, i("code", {
3077
- ...J(e.attrs || {}),
3077
+ ...Y(e.attrs || {}),
3078
3078
  className: g ? `language-${g} lang-${g}` : ""
3079
3079
  }, e.text));
3080
- case K.codeInline: return i("code", { key: r.key }, e.text);
3081
- case K.footnoteReference: return i("a", {
3080
+ case q.codeInline: return i("code", { key: r.key }, e.text);
3081
+ case q.footnoteReference: return i("a", {
3082
3082
  key: r.key,
3083
3083
  href: a(e.target, "a", "href") || void 0
3084
3084
  }, i("sup", { key: r.key }, e.text));
3085
- case K.gfmTask: return i("input", {
3085
+ case q.gfmTask: return i("input", {
3086
3086
  checked: e.completed,
3087
3087
  key: r.key,
3088
3088
  readOnly: !0,
3089
3089
  type: "checkbox"
3090
3090
  });
3091
- case K.heading: return i(`h${e.level}`, {
3091
+ case q.heading: return i(`h${e.level}`, {
3092
3092
  id: e.id,
3093
3093
  key: r.key
3094
3094
  }, t(e.children, r));
3095
- case K.htmlBlock: {
3095
+ case q.htmlBlock: {
3096
3096
  let g = e;
3097
- if (c.tagfilter && Je(g.tag)) {
3097
+ if (c.tagfilter && Ze(g.tag)) {
3098
3098
  var u = "";
3099
3099
  if (g.attrs) for (var d in g.attrs) {
3100
3100
  var f = g.attrs[d];
@@ -3104,33 +3104,33 @@ function jn(e, t, r, i, a, o, s, c, l) {
3104
3104
  }
3105
3105
  if (g.a && g.c) {
3106
3106
  let i = function(e) {
3107
- if ((e.type === K.htmlSelfClosing || e.type === K.htmlBlock) && e.b) return [];
3108
- if (e.type === K.paragraph) {
3107
+ if ((e.type === q.htmlSelfClosing || e.type === q.htmlBlock) && e.b) return [];
3108
+ if (e.type === q.paragraph) {
3109
3109
  let t = e.children;
3110
3110
  return t ? t.flatMap(i) : [];
3111
3111
  }
3112
- return e.type === K.text ? e.text?.trim() ? [e] : [] : e.type === K.htmlBlock && e.children ? [{
3112
+ return e.type === q.text ? e.text?.trim() ? [e] : [] : e.type === q.htmlBlock && e.children ? [{
3113
3113
  ...e,
3114
3114
  children: e.children?.flatMap(i)
3115
3115
  }] : [e];
3116
3116
  }, u = function(e) {
3117
- for (var t = 0; t < e.length; t++) e[t].type === K.htmlBlock && (e[t].c = !1), "children" in e[t] && e[t].children && u(e[t].children);
3117
+ for (var t = 0; t < e.length; t++) e[t].type === q.htmlBlock && (e[t].c = !1), "children" in e[t] && e[t].children && u(e[t].children);
3118
3118
  }, d = function(e, t) {
3119
3119
  for (var n = 0; n < e.length; n++) {
3120
3120
  var r = e[n];
3121
- if (r.type === K.paragraph && r.children) for (var i = r.children, a = 0; a < i.length; a++) {
3121
+ if (r.type === q.paragraph && r.children) for (var i = r.children, a = 0; a < i.length; a++) {
3122
3122
  var o = i[a];
3123
- if (o.type === K.htmlSelfClosing && o.b && o.tag.toLowerCase() === t) {
3123
+ if (o.type === q.htmlSelfClosing && o.b && o.tag.toLowerCase() === t) {
3124
3124
  var s = e.slice(0, n);
3125
3125
  a > 0 && s.push({
3126
- type: K.paragraph,
3126
+ type: q.paragraph,
3127
3127
  children: i.slice(0, a)
3128
3128
  });
3129
3129
  var c = [];
3130
3130
  if (a + 1 < i.length) {
3131
3131
  var l = i.slice(a + 1);
3132
3132
  l = l.filter(function(e) {
3133
- return !(e.type === K.htmlSelfClosing && e.b);
3133
+ return !(e.type === q.htmlSelfClosing && e.b);
3134
3134
  }), l.length > 0 && (c = l);
3135
3135
  }
3136
3136
  return c = c.concat(e.slice(n + 1)), {
@@ -3140,7 +3140,7 @@ function jn(e, t, r, i, a, o, s, c, l) {
3140
3140
  };
3141
3141
  }
3142
3142
  }
3143
- if ((r.type === K.htmlSelfClosing || r.type === K.htmlBlock) && r.b && r.tag.toLowerCase() === t) return {
3143
+ if ((r.type === q.htmlSelfClosing || r.type === q.htmlBlock) && r.b && r.tag.toLowerCase() === t) return {
3144
3144
  found: !0,
3145
3145
  beforeClose: e.slice(0, n),
3146
3146
  afterClose: e.slice(n + 1)
@@ -3151,28 +3151,28 @@ function jn(e, t, r, i, a, o, s, c, l) {
3151
3151
  beforeClose: e,
3152
3152
  afterClose: []
3153
3153
  };
3154
- }, f = g.tag.toLowerCase(), _ = st(f), v = g.children && g.children.length > 0, y = /<[a-z][^>]{0,100}>/i.test(g.a);
3154
+ }, f = g.tag.toLowerCase(), _ = ut(f), v = g.children && g.children.length > 0, y = /<[a-z][^>]{0,100}>/i.test(g.a);
3155
3155
  if (_) {
3156
3156
  let t = g.a.replace(RegExp("\\s*</" + f + ">\\s*$", "i"), "");
3157
- return c.tagfilter && (t = Xe(t)), y ? l(e.tag, {
3157
+ return c.tagfilter && (t = $e(t)), y ? l(e.tag, {
3158
3158
  key: r.key,
3159
- ...J(e.attrs || {}),
3159
+ ...Y(e.attrs || {}),
3160
3160
  dangerouslySetInnerHTML: { __html: t }
3161
3161
  }) : l(e.tag, {
3162
3162
  key: r.key,
3163
- ...J(e.attrs || {})
3163
+ ...Y(e.attrs || {})
3164
3164
  }, t);
3165
3165
  }
3166
3166
  let b = RegExp(`^<${g.tag}(\\s|>)`, "i").test(g.a);
3167
- if (v && !b && c.tagfilter && Ye(g.a)) return l(e.tag, {
3167
+ if (v && !b && c.tagfilter && Qe(g.a)) return l(e.tag, {
3168
3168
  key: r.key,
3169
- ...J(e.attrs || {})
3169
+ ...Y(e.attrs || {})
3170
3170
  }, t(g.children, r));
3171
- if (ct(g.a)) {
3172
- let t = c.tagfilter ? Xe(g.a) : g.a;
3171
+ if (dt(g.a)) {
3172
+ let t = c.tagfilter ? $e(g.a) : g.a;
3173
3173
  return l(e.tag, {
3174
3174
  key: r.key,
3175
- ...J(e.attrs || {}),
3175
+ ...Y(e.attrs || {}),
3176
3176
  dangerouslySetInnerHTML: { __html: t }
3177
3177
  });
3178
3178
  }
@@ -3183,12 +3183,12 @@ function jn(e, t, r, i, a, o, s, c, l) {
3183
3183
  }, S = g.a.replace(/>\s+</g, "><").replace(/\n+/g, " ").trim();
3184
3184
  if (RegExp(`^<${g.tag}(\\s[^>]*)?>(\\s*</${g.tag}>)?$`, "i").test(S)) return g.children && g.children.length > 0 ? l(e.tag, {
3185
3185
  key: r.key,
3186
- ...J(e.attrs || {})
3186
+ ...Y(e.attrs || {})
3187
3187
  }, t(g.children, r)) : l(e.tag, {
3188
3188
  key: r.key,
3189
- ...J(e.attrs || {})
3189
+ ...Y(e.attrs || {})
3190
3190
  });
3191
- let C = En(S, {
3191
+ let C = kn(S, {
3192
3192
  inline: !1,
3193
3193
  refs: s,
3194
3194
  inHTML: !1
@@ -3197,33 +3197,33 @@ function jn(e, t, r, i, a, o, s, c, l) {
3197
3197
  let w = g.tag.toLowerCase(), T = "</" + w + ">", E = RegExp(`^<${g.tag}(\\s|>)`, "i").test(S), D = S.toLowerCase().trimEnd().endsWith(T), O = E && D;
3198
3198
  if (O && v) return l(e.tag, {
3199
3199
  key: r.key,
3200
- ...J(e.attrs || {})
3200
+ ...Y(e.attrs || {})
3201
3201
  }, t(g.children, r));
3202
3202
  if (O) return t(C.flatMap(i), r);
3203
3203
  var p = d(C, w);
3204
3204
  if (p.found && p.afterClose.length > 0) {
3205
3205
  var m = p.beforeClose.flatMap(i), h = p.afterClose.flatMap(i);
3206
- return kn(n.Fragment, { children: [l(e.tag, {
3206
+ return Mn(n.Fragment, { children: [l(e.tag, {
3207
3207
  key: r.key,
3208
- ...J(e.attrs || {})
3208
+ ...Y(e.attrs || {})
3209
3209
  }, t(m, r)), t(h, r)] }, null);
3210
3210
  }
3211
3211
  return l(e.tag, {
3212
3212
  key: r.key,
3213
- ...J(e.attrs || {})
3213
+ ...Y(e.attrs || {})
3214
3214
  }, t(C.flatMap(i), r));
3215
3215
  }
3216
3216
  return Te(e.tag) ? l(e.tag, {
3217
3217
  key: r.key,
3218
- ...J(e.attrs || {})
3218
+ ...Y(e.attrs || {})
3219
3219
  }) : l(e.tag, {
3220
3220
  key: r.key,
3221
- ...J(e.attrs || {})
3221
+ ...Y(e.attrs || {})
3222
3222
  }, e.children ? t(e.children, r) : "");
3223
3223
  }
3224
- case K.htmlSelfClosing: {
3224
+ case q.htmlSelfClosing: {
3225
3225
  let t = e;
3226
- if (c.tagfilter && Je(t.tag)) {
3226
+ if (c.tagfilter && Ze(t.tag)) {
3227
3227
  var u = "";
3228
3228
  if (t.attrs) for (var d in t.attrs) {
3229
3229
  var f = t.attrs[d];
@@ -3233,10 +3233,10 @@ function jn(e, t, r, i, a, o, s, c, l) {
3233
3233
  }
3234
3234
  return l(e.tag, {
3235
3235
  key: r.key,
3236
- ...J(e.attrs || {})
3236
+ ...Y(e.attrs || {})
3237
3237
  });
3238
3238
  }
3239
- case K.image: {
3239
+ case q.image: {
3240
3240
  let t = e.target == null ? null : a(e.target, "img", "src");
3241
3241
  return i("img", {
3242
3242
  key: r.key,
@@ -3245,11 +3245,11 @@ function jn(e, t, r, i, a, o, s, c, l) {
3245
3245
  src: t || void 0
3246
3246
  });
3247
3247
  }
3248
- case K.link: {
3248
+ case q.link: {
3249
3249
  let n = { key: r.key };
3250
- return e.target != null && (n.href = We(e.target)), e.title && (n.title = e.title), i("a", n, t(e.children, r));
3250
+ return e.target != null && (n.href = qe(e.target)), e.title && (n.title = e.title), i("a", n, t(e.children, r));
3251
3251
  }
3252
- case K.table: {
3252
+ case q.table: {
3253
3253
  let n = e;
3254
3254
  return i("table", { key: r.key }, i("thead", { key: "thead" }, i("tr", null, n.header.map(function(e, a) {
3255
3255
  return i("th", {
@@ -3265,21 +3265,21 @@ function jn(e, t, r, i, a, o, s, c, l) {
3265
3265
  }));
3266
3266
  })));
3267
3267
  }
3268
- case K.text: return e.text;
3269
- case K.textFormatted: return i(e.tag, { key: r.key }, t(e.children, r));
3270
- case K.orderedList:
3271
- case K.unorderedList: return i(e.type === K.orderedList ? "ol" : "ul", {
3268
+ case q.text: return e.text;
3269
+ case q.textFormatted: return i(e.tag, { key: r.key }, t(e.children, r));
3270
+ case q.orderedList:
3271
+ case q.unorderedList: return i(e.type === q.orderedList ? "ol" : "ul", {
3272
3272
  key: r.key,
3273
- start: e.type === K.orderedList ? e.start : void 0
3273
+ start: e.type === q.orderedList ? e.start : void 0
3274
3274
  }, e.items.map(function(e, n) {
3275
3275
  return i("li", { key: n }, t(e, r));
3276
3276
  }));
3277
- case K.paragraph: return i("p", { key: r.key }, t(e.children, r));
3278
- case K.ref: return null;
3277
+ case q.paragraph: return i("p", { key: r.key }, t(e.children, r));
3278
+ case q.ref: return null;
3279
3279
  default: return null;
3280
3280
  }
3281
3281
  }
3282
- var Mn = (e, t, n, r, i, a, o) => {
3282
+ var Fn = (e, t, n, r, i, a, o) => {
3283
3283
  var s = (e) => e.map(function(e) {
3284
3284
  return "text" in e ? e.text : "";
3285
3285
  }), c = (l, u = {}) => {
@@ -3288,7 +3288,7 @@ var Mn = (e, t, n, r, i, a, o) => {
3288
3288
  u.renderDepth = d;
3289
3289
  for (var f = u.key, p = [], m = !1, h = 0; h < l.length; h++) {
3290
3290
  u.key = h;
3291
- var g = e ? e(jn.bind(null, l[h], c, u, t, n, r, i, a, o), l[h], c, u) : jn(l[h], c, u, t, n, r, i, a, o), _ = typeof g == "string";
3291
+ var g = e ? e(Pn.bind(null, l[h], c, u, t, n, r, i, a, o), l[h], c, u) : Pn(l[h], c, u, t, n, r, i, a, o), _ = typeof g == "string";
3292
3292
  if (_ && m) p[p.length - 1] += g;
3293
3293
  else if (g !== null) if (Array.isArray(g)) for (var v = 0; v < g.length; v++) p.push(g[v]);
3294
3294
  else p.push(g);
@@ -3297,21 +3297,21 @@ var Mn = (e, t, n, r, i, a, o) => {
3297
3297
  return u.key = f, u.renderDepth = d - 1, p;
3298
3298
  };
3299
3299
  return c;
3300
- }, Nn = (e, t) => {
3301
- let n = Ue(t, e, void 0);
3302
- return n ? typeof n == "function" || typeof n == "object" && "render" in n ? n : Ue(t, `${e}.component`, e) : e;
3300
+ }, In = (e, t) => {
3301
+ let n = Ke(t, e, void 0);
3302
+ return n ? typeof n == "function" || typeof n == "object" && "render" in n ? n : Ke(t, `${e}.component`, e) : e;
3303
3303
  };
3304
- function Pn(e, t) {
3304
+ function Ln(e, t) {
3305
3305
  let n = { ...t || {} };
3306
3306
  n.overrides = n.overrides || {};
3307
- let r = n.slugify || Z, i = n.sanitizer || Se, a = n.createElement, o = n.overrides && Object.keys(n.overrides).length > 0, s = (e) => Fn(e, {
3307
+ let r = n.slugify || Z, i = n.sanitizer || xe, a = n.createElement, o = n.overrides && Object.keys(n.overrides).length > 0, s = (e) => Rn(e, {
3308
3308
  ...n,
3309
3309
  wrapper: null
3310
3310
  });
3311
3311
  function c(e) {
3312
3312
  for (var t in e) {
3313
3313
  var n = e[t];
3314
- if (typeof n == "string" && n.length > 0 && n.charCodeAt(0) === T && (Ze.test(n) || Qe.test(n) || Tn(n, 0))) {
3314
+ if (typeof n == "string" && n.length > 0 && n.charCodeAt(0) === T && (et.test(n) || tt.test(n) || On(n, 0))) {
3315
3315
  var r = s(n.trim());
3316
3316
  e[t] = t === "innerHTML" && Array.isArray(r) ? r[0] : r;
3317
3317
  }
@@ -3320,16 +3320,16 @@ function Pn(e, t) {
3320
3320
  function l(e, t, ...r) {
3321
3321
  var i = t || {}, s = e;
3322
3322
  if (o) {
3323
- var c = Ue(n.overrides, e + ".props", {});
3324
- s = Nn(e, n.overrides), i = {
3323
+ var c = Ke(n.overrides, e + ".props", {});
3324
+ s = In(e, n.overrides), i = {
3325
3325
  ...i,
3326
3326
  ...c,
3327
- className: Ge(i.className, c.className) || void 0
3327
+ className: Je(i.className, c.className) || void 0
3328
3328
  };
3329
3329
  }
3330
3330
  if (!a) {
3331
3331
  var l = i.key;
3332
- return l != null && delete i.key, r.length === 1 ? i.children = r[0] : r.length > 1 && (i.children = r), kn(s, i, l);
3332
+ return l != null && delete i.key, r.length === 1 ? i.children = r[0] : r.length > 1 && (i.children = r), Mn(s, i, l);
3333
3333
  }
3334
3334
  return a(s, i, ...r);
3335
3335
  }
@@ -3341,16 +3341,12 @@ function Pn(e, t) {
3341
3341
  slugify: n.slugify ? (e) => n.slugify(e, Z) : Z,
3342
3342
  sanitizer: i,
3343
3343
  tagfilter: n.tagfilter !== !1
3344
- }, f = e[0] && e[0].type === K.refCollection ? e[0].refs : {}, p = Mn(n.renderRule, l, i, r, f, n, u), m = p(e, {
3344
+ }, f = e[0] && e[0].type === q.refCollection ? e[0].refs : {}, p = Fn(n.renderRule, l, i, r, f, n, u), m = p(e, {
3345
3345
  inline: n.forceInline,
3346
3346
  refs: f
3347
- }), h = [];
3348
- for (let e in f) e.charCodeAt(0) === g && h.push({
3349
- identifier: e,
3350
- footnote: f[e].target
3351
- });
3347
+ }), h = Ge(f);
3352
3348
  if (h.length && m.push(l("footer", { key: "footer" }, h.map(function(e) {
3353
- let t = e.identifier.charCodeAt(0) === g ? e.identifier.slice(1) : e.identifier, n = En(e.footnote, {
3349
+ let t = e.identifier.charCodeAt(0) === g ? e.identifier.slice(1) : e.identifier, n = kn(e.footnote, {
3354
3350
  inline: !0,
3355
3351
  refs: f
3356
3352
  }, d);
@@ -3366,14 +3362,14 @@ function Pn(e, t) {
3366
3362
  if (m.length > 1 || n.forceWrapper) v = m;
3367
3363
  else return m.length === 1 ? m[0] : null;
3368
3364
  var y = n.wrapperProps ? { ...n.wrapperProps } : {};
3369
- return y.children = v, kn(_, y, "outer");
3365
+ return y.children = v, Mn(_, y, "outer");
3370
3366
  }
3371
- function Fn(e = "", t = {}) {
3367
+ function Rn(e = "", t = {}) {
3372
3368
  let n = { ...t || {} };
3373
3369
  n.overrides = n.overrides || {};
3374
- let r = n.sanitizer || Se;
3370
+ let r = n.sanitizer || xe;
3375
3371
  function i(e) {
3376
- let t = n.forceInline || !n.forceBlock && !ye.test(e), i = {
3372
+ let t = n.forceInline || !n.forceBlock && !ve.test(e), i = {
3377
3373
  ...n,
3378
3374
  slugify: n.slugify ? (e) => n.slugify(e, Z) : Z,
3379
3375
  sanitizer: r,
@@ -3382,7 +3378,7 @@ function Fn(e = "", t = {}) {
3382
3378
  if (!t) {
3383
3379
  let e = o.length;
3384
3380
  for (; e > 0 && (o[e - 1] === "\n" || o[e - 1] === "\r");) e--;
3385
- o = o.slice(0, e), o = `${o.replace(Dn, "")}
3381
+ o = o.slice(0, e), o = `${o.replace(An, "")}
3386
3382
 
3387
3383
  `;
3388
3384
  }
@@ -3390,7 +3386,7 @@ function Fn(e = "", t = {}) {
3390
3386
  var s = o.lastIndexOf("<");
3391
3387
  s !== -1 && o.indexOf(">", s) === -1 && (o = o.slice(0, s)), s = e.lastIndexOf("<"), s !== -1 && e.indexOf(">", s) === -1 && (e = e.slice(0, s));
3392
3388
  }
3393
- return Pn(En(t ? e : o, {
3389
+ return Ln(kn(t ? e : o, {
3394
3390
  inline: t,
3395
3391
  refs: a
3396
3392
  }, i), {
@@ -3401,8 +3397,8 @@ function Fn(e = "", t = {}) {
3401
3397
  let a = {};
3402
3398
  return i(e);
3403
3399
  }
3404
- var In = ({ children: e, options: t, ...r }) => {
3405
- if (!(typeof n.useContext < "u")) return Fn(e ?? "", {
3400
+ var zn = ({ children: e, options: t, ...r }) => {
3401
+ if (!(typeof n.useContext < "u")) return Rn(e ?? "", {
3406
3402
  ...t,
3407
3403
  overrides: { ...t?.overrides },
3408
3404
  wrapperProps: {
@@ -3410,7 +3406,7 @@ var In = ({ children: e, options: t, ...r }) => {
3410
3406
  ...r
3411
3407
  }
3412
3408
  });
3413
- let i = n.useContext(An), a = n.useMemo(() => ({
3409
+ let i = n.useContext(Nn), a = n.useMemo(() => ({
3414
3410
  ...i,
3415
3411
  ...t,
3416
3412
  overrides: {
@@ -3427,8 +3423,8 @@ var In = ({ children: e, options: t, ...r }) => {
3427
3423
  t,
3428
3424
  r
3429
3425
  ]), o = e ?? "";
3430
- return n.useMemo(() => Fn(o, a), [o, a]);
3431
- }, Ln = /* @__PURE__ */ e({ default: () => Bn }), Rn = {
3426
+ return n.useMemo(() => Rn(o, a), [o, a]);
3427
+ }, Bn = /* @__PURE__ */ e({ default: () => Un }), Vn = {
3432
3428
  small: {
3433
3429
  1: "dc:text-lg",
3434
3430
  2: "dc:text-base",
@@ -3444,11 +3440,11 @@ var In = ({ children: e, options: t, ...r }) => {
3444
3440
  2: "dc:text-4xl",
3445
3441
  3: "dc:text-3xl"
3446
3442
  }
3447
- }, zn = {
3443
+ }, Hn = {
3448
3444
  1: "dc:mb-4",
3449
3445
  2: "dc:mb-3",
3450
3446
  3: "dc:mb-2"
3451
- }, Bn = r.memo(function({ displayConfig: e = {}, height: n = "100%", colorPalette: r }) {
3447
+ }, Un = r.memo(function({ displayConfig: e = {}, height: n = "100%", colorPalette: r }) {
3452
3448
  let { t: s } = t(), c = e.content || "", l = e.accentColorIndex ?? 0, u = e.fontSize || "medium", d = e.alignment || "left", f = !!e.transparentBackground, p = e.accentBorder || "none", m = i(() => r?.colors && l < r.colors.length ? r.colors[l] : "#8884d8", [r, l]), h = {
3453
3449
  small: "dc:text-sm",
3454
3450
  medium: "dc:text-lg",
@@ -3459,15 +3455,15 @@ var In = ({ children: e, options: t, ...r }) => {
3459
3455
  right: "dc:text-right"
3460
3456
  }, _ = i(() => ({ overrides: {
3461
3457
  h1: { props: {
3462
- className: `dc:font-bold ${Rn[u]?.[1] || "dc:text-3xl"} ${zn[1]}`,
3458
+ className: `dc:font-bold ${Vn[u]?.[1] || "dc:text-3xl"} ${Hn[1]}`,
3463
3459
  style: { color: m }
3464
3460
  } },
3465
3461
  h2: { props: {
3466
- className: `dc:font-bold ${Rn[u]?.[2] || "dc:text-2xl"} ${zn[2]}`,
3462
+ className: `dc:font-bold ${Vn[u]?.[2] || "dc:text-2xl"} ${Hn[2]}`,
3467
3463
  style: { color: m }
3468
3464
  } },
3469
3465
  h3: { props: {
3470
- className: `dc:font-bold ${Rn[u]?.[3] || "dc:text-xl"} ${zn[3]}`,
3466
+ className: `dc:font-bold ${Vn[u]?.[3] || "dc:text-xl"} ${Hn[3]}`,
3471
3467
  style: { color: m }
3472
3468
  } },
3473
3469
  p: { props: { className: "dc:mb-3 dc:leading-relaxed text-dc-text" } },
@@ -3527,13 +3523,13 @@ var In = ({ children: e, options: t, ...r }) => {
3527
3523
  height: n === "100%" ? "100%" : n,
3528
3524
  ...v
3529
3525
  },
3530
- children: /* @__PURE__ */ a(In, {
3526
+ children: /* @__PURE__ */ a(zn, {
3531
3527
  options: _,
3532
3528
  children: c
3533
3529
  })
3534
3530
  });
3535
3531
  });
3536
3532
  //#endregion
3537
- export { Ln as n, In as r, Bn as t };
3533
+ export { Bn as n, zn as r, Un as t };
3538
3534
 
3539
- //# sourceMappingURL=chart-markdown-DEtjn8gx.js.map
3535
+ //# sourceMappingURL=chart-markdown-BPW-EAm9.js.map