@tempots/beatui 0.94.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/dist/ar-CuI1Jgt6.cjs +1 -0
  2. package/dist/{ar-8Cko5i-Z.js → ar-DaKbK_t8.js} +88 -11
  3. package/dist/auth/index.cjs.js +1 -1
  4. package/dist/auth/index.es.js +1 -1
  5. package/dist/{auth-divider-Rt0WDKAe.js → auth-divider-BQIhr3-R.js} +99 -98
  6. package/dist/auth-divider-DvnUModP.cjs +1 -0
  7. package/dist/beatui.css +1628 -541
  8. package/dist/beatui.tailwind.css +1629 -542
  9. package/dist/better-auth/index.cjs.js +1 -1
  10. package/dist/better-auth/index.es.js +9 -9
  11. package/dist/codehighlight/index.cjs.js +22 -0
  12. package/dist/codehighlight/index.es.js +76 -0
  13. package/dist/colors-B-p6IzX9.cjs +1 -0
  14. package/dist/{colors-BY0Ja_bf.js → colors-DwufPN8S.js} +18 -18
  15. package/dist/{de-Bt-d2iKj.js → de-3MTPDS1i.js} +83 -6
  16. package/dist/de-DthHehbh.cjs +1 -0
  17. package/dist/{deep-merge-CoLO4id0.js → deep-merge-BzIheQtH.js} +511 -517
  18. package/dist/deep-merge-EkjEgK0N.cjs +1 -0
  19. package/dist/{duration-input-47x7nbGh.cjs → duration-input-ClgYjeBa.cjs} +1 -1
  20. package/dist/{duration-input-DrVonjKK.js → duration-input-DGzmIImj.js} +5 -5
  21. package/dist/{editor-toolbar-group-CzdBZ1yr.js → editor-toolbar-group-Crlu1QJw.js} +3 -3
  22. package/dist/{editor-toolbar-group-DhKJdqER.cjs → editor-toolbar-group-mkL4QozO.cjs} +1 -1
  23. package/dist/es-B6GJLk9h.cjs +1 -0
  24. package/dist/{es-2llfNFX2.js → es-DwMUvBeU.js} +95 -18
  25. package/dist/{fa-CQVIBjKP.js → fa-0rvQiKrJ.js} +88 -11
  26. package/dist/fa-BwgP93iV.cjs +1 -0
  27. package/dist/{fr-CC3smTlW.js → fr-B4i6NzLl.js} +87 -10
  28. package/dist/fr-CQzk5zqY.cjs +1 -0
  29. package/dist/{he-CZilsN75.js → he-C71n-hsn.js} +88 -11
  30. package/dist/he-DcxxvRfs.cjs +1 -0
  31. package/dist/hi-D-KHVWg4.cjs +1 -0
  32. package/dist/{hi-CAZjwGv-.js → hi-xmrXpeVU.js} +88 -11
  33. package/dist/index-B5MAsOC-.cjs +1 -0
  34. package/dist/{index-B8cqD9ny.js → index-C3o9GSH6.js} +106 -105
  35. package/dist/index.cjs.js +4 -4
  36. package/dist/index.es.js +8055 -5285
  37. package/dist/input-container-BvEcp7FU.js +275 -0
  38. package/dist/input-container-Di1YvVB_.cjs +1 -0
  39. package/dist/{it-D6RXFIL6.js → it-CDZTtOBC.js} +84 -7
  40. package/dist/it-D344Dutu.cjs +1 -0
  41. package/dist/ja-BNgnDZ27.cjs +1 -0
  42. package/dist/{ja-D7zsz4Ij.js → ja-Zz1LzidW.js} +92 -15
  43. package/dist/json-schema/index.cjs.js +1 -1
  44. package/dist/json-schema/index.es.js +261 -257
  45. package/dist/json-schema-display/index.cjs.js +1 -1
  46. package/dist/json-schema-display/index.es.js +2 -2
  47. package/dist/json-structure/index.cjs.js +1 -1
  48. package/dist/json-structure/index.es.js +132 -133
  49. package/dist/{ko-taN2Npr4.js → ko-9laUsZDL.js} +91 -14
  50. package/dist/ko-D-WJ9NK7.cjs +1 -0
  51. package/dist/lexical/index.cjs.js +2 -39
  52. package/dist/lexical/index.es.js +2102 -20521
  53. package/dist/markdown/index.cjs.js +1 -1
  54. package/dist/markdown/index.es.js +41 -4
  55. package/dist/{menu-CV85y3Xf.js → menu-B8yoDMRS.js} +23 -23
  56. package/dist/menu-B92oSDct.cjs +1 -0
  57. package/dist/modal-BT0jjDqX.cjs +1 -0
  58. package/dist/{modal-ZitwUeXx.js → modal-DBguyX-b.js} +9 -9
  59. package/dist/monaco/index.cjs.js +2 -2
  60. package/dist/monaco/index.es.js +7 -7
  61. package/dist/nl-CrqUlFie.cjs +1 -0
  62. package/dist/{nl-CRC6r4Q4.js → nl-Dcll9fVA.js} +87 -10
  63. package/dist/{notice-E_p2hg1G.js → notice-E19wu9lA.js} +51 -51
  64. package/dist/notice-_9XhdrFw.cjs +1 -0
  65. package/dist/oneof-branch-detection-J_DYEEcD.js +1077 -0
  66. package/dist/oneof-branch-detection-ZUBZ6hqy.cjs +1 -0
  67. package/dist/pl-9UksIrvX.cjs +1 -0
  68. package/dist/{pl-C6qNs0Lq.js → pl-Dm9N9Gbr.js} +84 -7
  69. package/dist/prosemirror/index.cjs.js +3 -1
  70. package/dist/prosemirror/index.es.js +636 -4
  71. package/dist/{pt-CcWPLqBh.js → pt-CFi5cn0k.js} +89 -12
  72. package/dist/pt-_kfdzwqi.cjs +1 -0
  73. package/dist/{ru-Dt9-9m0E.js → ru-CEhZUw8R.js} +92 -15
  74. package/dist/ru-CW1WNNlr.cjs +1 -0
  75. package/dist/stack-BLMteGTn.js +15 -0
  76. package/dist/stack-dwLevGa2.cjs +1 -0
  77. package/dist/tailwind/preset.cjs.js +1 -1
  78. package/dist/tailwind/preset.es.js +2 -2
  79. package/dist/tailwind/vite-plugin.cjs.js +1 -1
  80. package/dist/tailwind/vite-plugin.es.js +1 -1
  81. package/dist/text-input-DfqXolVe.js +55 -0
  82. package/dist/text-input-X_q01NsY.cjs +1 -0
  83. package/dist/toolbar-DY0ax2Qd.js +130 -0
  84. package/dist/toolbar-DoKdYXIL.cjs +1 -0
  85. package/dist/tr-B6GIRegf.cjs +1 -0
  86. package/dist/{tr-CDTWeRY0.js → tr-ZmnVDhLP.js} +83 -6
  87. package/dist/{translations-NBY7SubC.js → translations-A4kR7CW8.js} +1 -1
  88. package/dist/{translations-CiBhB2FV.js → translations-B1_yyDUK.js} +185 -106
  89. package/dist/{translations-BdCtLBZt.cjs → translations-C81buKAw.cjs} +1 -1
  90. package/dist/translations-Dbx7L7Q1.cjs +1 -0
  91. package/dist/types/beatui-i18n/default.d.ts +72 -0
  92. package/dist/types/beatui-i18n/locales/en.d.ts +72 -0
  93. package/dist/types/beatui-i18n/translations.d.ts +72 -0
  94. package/dist/types/codehighlight/code-highlight.d.ts +21 -0
  95. package/dist/types/codehighlight/index.d.ts +14 -0
  96. package/dist/types/components/button/toggle-button.d.ts +4 -4
  97. package/dist/types/components/data/avatar.d.ts +3 -1
  98. package/dist/types/components/data/badge.d.ts +10 -18
  99. package/dist/types/components/data/column-filter-panel.d.ts +31 -0
  100. package/dist/types/components/data/column-filter.d.ts +110 -0
  101. package/dist/types/components/data/column-header-menu.d.ts +42 -0
  102. package/dist/types/components/data/data-source.d.ts +190 -0
  103. package/dist/types/components/data/data-table-body.d.ts +12 -0
  104. package/dist/types/components/data/data-table-column-toggle.d.ts +4 -0
  105. package/dist/types/components/data/data-table-context.d.ts +53 -0
  106. package/dist/types/components/data/data-table-header.d.ts +6 -0
  107. package/dist/types/components/data/data-table-resolve.d.ts +26 -0
  108. package/dist/types/components/data/data-table-types.d.ts +201 -0
  109. package/dist/types/components/data/data-table.d.ts +38 -0
  110. package/dist/types/components/data/data-toolbar.d.ts +44 -0
  111. package/dist/types/components/data/date-picker-shared.d.ts +55 -0
  112. package/dist/types/components/data/date-picker.d.ts +58 -0
  113. package/dist/types/components/data/date-range-picker.d.ts +56 -0
  114. package/dist/types/components/data/filter.d.ts +268 -0
  115. package/dist/types/components/data/index.d.ts +13 -4
  116. package/dist/types/components/data/indicator.d.ts +41 -0
  117. package/dist/types/components/data/progress-bar.d.ts +2 -2
  118. package/dist/types/components/data/selection-checkbox.d.ts +63 -0
  119. package/dist/types/components/data/skeleton.d.ts +1 -1
  120. package/dist/types/components/data/sortable-header.d.ts +55 -0
  121. package/dist/types/components/data/unstyled-drop-zone.d.ts +2 -2
  122. package/dist/types/components/form/control/control.d.ts +9 -9
  123. package/dist/types/components/form/input/advanced-slider.d.ts +6 -6
  124. package/dist/types/components/form/input/appearance-selector.d.ts +9 -2
  125. package/dist/types/components/form/input/checkbox-input.d.ts +6 -7
  126. package/dist/types/components/form/input/color-input.d.ts +1 -1
  127. package/dist/types/components/form/input/color-swatch-input.d.ts +3 -3
  128. package/dist/types/components/form/input/combobox-input.d.ts +5 -5
  129. package/dist/types/components/form/input/combobox-tags-input.d.ts +5 -5
  130. package/dist/types/components/form/input/create-nullable-string-input.d.ts +2 -2
  131. package/dist/types/components/form/input/date-input.d.ts +4 -4
  132. package/dist/types/components/form/input/dropdown-input.d.ts +5 -5
  133. package/dist/types/components/form/input/editable-text.d.ts +2 -2
  134. package/dist/types/components/form/input/email-input.d.ts +4 -4
  135. package/dist/types/components/form/input/index.d.ts +1 -0
  136. package/dist/types/components/form/input/input-container.d.ts +1 -1
  137. package/dist/types/components/form/input/input-options.d.ts +28 -1
  138. package/dist/types/components/form/input/mask-input.d.ts +8 -2
  139. package/dist/types/components/form/input/native-select.d.ts +3 -3
  140. package/dist/types/components/form/input/nullable-date-input.d.ts +2 -2
  141. package/dist/types/components/form/input/nullable-email-input.d.ts +3 -3
  142. package/dist/types/components/form/input/nullable-rating-input.d.ts +8 -8
  143. package/dist/types/components/form/input/nullable-uuid-input.d.ts +4 -4
  144. package/dist/types/components/form/input/number-input.d.ts +3 -3
  145. package/dist/types/components/form/input/otp-input.d.ts +12 -12
  146. package/dist/types/components/form/input/rating-input.d.ts +7 -8
  147. package/dist/types/components/form/input/select-tags-input.d.ts +5 -5
  148. package/dist/types/components/form/input/switch.d.ts +2 -2
  149. package/dist/types/components/form/input/tri-state-checkbox-input.d.ts +82 -0
  150. package/dist/types/components/form/input/uuid-input.d.ts +2 -2
  151. package/dist/types/components/json-structure/controls/uuid-control.d.ts +1 -1
  152. package/dist/types/components/layout/card.d.ts +66 -0
  153. package/dist/types/components/layout/collapse.d.ts +2 -2
  154. package/dist/types/components/layout/flex.d.ts +26 -0
  155. package/dist/types/components/layout/index.d.ts +1 -0
  156. package/dist/types/components/lexical/floating/slash-command-palette.d.ts +2 -2
  157. package/dist/types/components/lexical/toolbar/toolbar-registry.d.ts +2 -1
  158. package/dist/types/components/media/pdf-page-viewer.d.ts +8 -5
  159. package/dist/types/components/misc/index.d.ts +1 -0
  160. package/dist/types/components/misc/loading-overlay.d.ts +29 -0
  161. package/dist/types/components/misc/notice.d.ts +4 -4
  162. package/dist/types/components/misc/notification-provider.d.ts +9 -3
  163. package/dist/types/components/misc/notification.d.ts +9 -9
  164. package/dist/types/components/navigation/breadcrumbs.d.ts +1 -1
  165. package/dist/types/components/navigation/menu.d.ts +6 -6
  166. package/dist/types/components/navigation/pagination.d.ts +17 -4
  167. package/dist/types/components/navigation/sidebar/sidebar-link.d.ts +2 -2
  168. package/dist/types/components/navigation/tabs/tabs.d.ts +17 -8
  169. package/dist/types/components/navigation/toolbar/toolbar.d.ts +12 -6
  170. package/dist/types/components/overlay/announcement-bar.d.ts +12 -4
  171. package/dist/types/components/overlay/dialogs.d.ts +2 -2
  172. package/dist/types/components/overlay/modal.d.ts +9 -2
  173. package/dist/types/components/overlay/tooltip.d.ts +6 -6
  174. package/dist/types/components/theme/types.d.ts +15 -4
  175. package/dist/types/lexical/index.d.ts +2 -2
  176. package/dist/types/lexical/plugins/index.d.ts +1 -1
  177. package/dist/types/lexical/plugins/slash-commands.d.ts +1 -1
  178. package/dist/types/lexical/plugins/text.d.ts +5 -0
  179. package/dist/types/lexical/types.d.ts +126 -5
  180. package/dist/types/lexical-i18n/default.d.ts +1 -0
  181. package/dist/types/lexical-i18n/locales/ar.d.ts +1 -0
  182. package/dist/types/lexical-i18n/locales/de.d.ts +1 -0
  183. package/dist/types/lexical-i18n/locales/en.d.ts +1 -0
  184. package/dist/types/lexical-i18n/locales/es.d.ts +1 -0
  185. package/dist/types/lexical-i18n/locales/fa.d.ts +1 -0
  186. package/dist/types/lexical-i18n/locales/fr.d.ts +1 -0
  187. package/dist/types/lexical-i18n/locales/he.d.ts +1 -0
  188. package/dist/types/lexical-i18n/locales/hi.d.ts +1 -0
  189. package/dist/types/lexical-i18n/locales/it.d.ts +1 -0
  190. package/dist/types/lexical-i18n/locales/ja.d.ts +1 -0
  191. package/dist/types/lexical-i18n/locales/ko.d.ts +1 -0
  192. package/dist/types/lexical-i18n/locales/nl.d.ts +1 -0
  193. package/dist/types/lexical-i18n/locales/pl.d.ts +1 -0
  194. package/dist/types/lexical-i18n/locales/pt.d.ts +1 -0
  195. package/dist/types/lexical-i18n/locales/ru.d.ts +1 -0
  196. package/dist/types/lexical-i18n/locales/tr.d.ts +1 -0
  197. package/dist/types/lexical-i18n/locales/ur.d.ts +1 -0
  198. package/dist/types/lexical-i18n/locales/vi.d.ts +1 -0
  199. package/dist/types/lexical-i18n/locales/zh.d.ts +1 -0
  200. package/dist/types/tokens/z-index.d.ts +18 -18
  201. package/dist/types/utils/use-animated-toggle.d.ts +12 -4
  202. package/dist/ur-CtFl_tz6.cjs +1 -0
  203. package/dist/{ur-CLrK5FPQ.js → ur-yYgj3NmT.js} +88 -11
  204. package/dist/use-animated-toggle-C3asw_Sg.js +207 -0
  205. package/dist/use-animated-toggle-cKcuItmz.cjs +1 -0
  206. package/dist/use-form-CaW192gw.cjs +2 -0
  207. package/dist/{use-form-BQRVnIp9.js → use-form-Dn6v2tEh.js} +153 -152
  208. package/dist/utils-DmEuG3Np.cjs +1 -0
  209. package/dist/utils-vUtP6iPG.js +165 -0
  210. package/dist/{vi-B1_QDUQJ.js → vi-D5u4CLQO.js} +89 -12
  211. package/dist/vi-DyCZSpsk.cjs +1 -0
  212. package/dist/widget-customization-DgW1SXN6.cjs +1 -0
  213. package/dist/{widget-customization-C-fSx3RB.js → widget-customization-Dkx7kNSe.js} +413 -398
  214. package/dist/{zh-rDtQ92Pp.js → zh-B0kwMMer.js} +91 -14
  215. package/dist/zh-C3ZxMQKb.cjs +1 -0
  216. package/package.json +209 -38
  217. package/dist/_commonjsHelpers-DKOUU3wS.cjs +0 -1
  218. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
  219. package/dist/ar-D2DjoXta.cjs +0 -1
  220. package/dist/auth-divider-C3E16pml.cjs +0 -1
  221. package/dist/colors-BI0YhONJ.cjs +0 -1
  222. package/dist/de-Cdf3432J.cjs +0 -1
  223. package/dist/deep-merge-Blrucd-E.cjs +0 -1
  224. package/dist/es-6fFPkKHL.cjs +0 -1
  225. package/dist/fa-GXyNzAXz.cjs +0 -1
  226. package/dist/fr-C6EYTwSH.cjs +0 -1
  227. package/dist/he-CJUgxvi8.cjs +0 -1
  228. package/dist/hi-DqIR4VtX.cjs +0 -1
  229. package/dist/hls.light.min-C6xKDzRR.cjs +0 -27
  230. package/dist/hls.light.min-hEMf_E8u.js +0 -8311
  231. package/dist/index-1JaBwDB-.js +0 -921
  232. package/dist/index-B-cwxUsP.cjs +0 -1
  233. package/dist/index-BFzxpY7y.js +0 -68
  234. package/dist/index-BOC0cVoY.cjs +0 -36
  235. package/dist/index-CN10Cyqr.cjs +0 -1
  236. package/dist/index-CTcbhnPw.cjs +0 -4
  237. package/dist/index-DF7RFzD9.cjs +0 -1
  238. package/dist/index-DJ9YIJcG.js +0 -14308
  239. package/dist/index-DfPkCwdC.js +0 -2709
  240. package/dist/input-container-9r1F3KuX.js +0 -263
  241. package/dist/input-container-DiYEl_y8.cjs +0 -1
  242. package/dist/it-BvHsJ7fH.cjs +0 -1
  243. package/dist/ja-B2gP7OHY.cjs +0 -1
  244. package/dist/ko-BddhddIA.cjs +0 -1
  245. package/dist/menu-De_-sGeb.cjs +0 -1
  246. package/dist/modal-DUlqGUW7.cjs +0 -1
  247. package/dist/nl-COrtZUnH.cjs +0 -1
  248. package/dist/notice-DAVOTnfA.cjs +0 -1
  249. package/dist/oneof-branch-detection-D6Xa8qNR.cjs +0 -8
  250. package/dist/oneof-branch-detection-DCPwyutI.js +0 -6290
  251. package/dist/pl-BHI4zBgV.cjs +0 -1
  252. package/dist/pt-BGzC9MhU.cjs +0 -1
  253. package/dist/ru-CXeFbIPb.cjs +0 -1
  254. package/dist/stack-4VUGISn6.cjs +0 -1
  255. package/dist/stack-Bm-UZosx.js +0 -879
  256. package/dist/string-B9vVyfq3.cjs +0 -1
  257. package/dist/string-DYyMxBl-.js +0 -19
  258. package/dist/text-input-BgPx8BbG.js +0 -45
  259. package/dist/text-input-DUnhBUd6.cjs +0 -1
  260. package/dist/timer-BJHOsuS6.cjs +0 -1
  261. package/dist/timer-Rd2sKnvH.js +0 -65
  262. package/dist/toolbar-DKOh_gbA.js +0 -118
  263. package/dist/toolbar-Dkc2y1dI.cjs +0 -1
  264. package/dist/tr-CdOtQAtA.cjs +0 -1
  265. package/dist/translations-Cy9hoMGV.cjs +0 -1
  266. package/dist/types/components/data/calendar-shared.d.ts +0 -59
  267. package/dist/types/components/data/calendar.d.ts +0 -107
  268. package/dist/types/components/data/icon-badge.d.ts +0 -14
  269. package/dist/types/components/data/range-calendar.d.ts +0 -104
  270. package/dist/types/components/data/tag.d.ts +0 -51
  271. package/dist/ur-C7itXvnC.cjs +0 -1
  272. package/dist/use-animated-toggle-C7PTmnZi.js +0 -195
  273. package/dist/use-animated-toggle-DrqK7nUS.cjs +0 -1
  274. package/dist/use-form-DTyNw0kM.cjs +0 -2
  275. package/dist/utils-DEbsp9Q9.js +0 -129
  276. package/dist/utils-DIUEhA-Z.cjs +0 -1
  277. package/dist/vi-CQrUWB3y.cjs +0 -1
  278. package/dist/widget-customization-xEBfEPhQ.cjs +0 -1
  279. package/dist/zh-DWswYYTS.cjs +0 -1
@@ -1,921 +0,0 @@
1
- import { a as _, b as I, m as k, u as E, c as K, d as st, s as N, n as T, e as ht, f as F, g as P, r as gt, h as X, i as L, j as x, k as mt, l as ft } from "./index-DfPkCwdC.js";
2
- const bt = {
3
- tokenize: Ct,
4
- partial: !0
5
- }, v = {
6
- tokenize: yt,
7
- partial: !0
8
- }, tt = {
9
- tokenize: Ft,
10
- partial: !0
11
- }, et = {
12
- tokenize: At,
13
- partial: !0
14
- }, pt = {
15
- tokenize: xt,
16
- partial: !0
17
- }, nt = {
18
- name: "wwwAutolink",
19
- tokenize: ct,
20
- previous: rt
21
- }, it = {
22
- name: "protocolAutolink",
23
- tokenize: wt,
24
- previous: lt
25
- }, C = {
26
- name: "emailAutolink",
27
- tokenize: Dt,
28
- previous: at
29
- }, c = {};
30
- function kt() {
31
- return {
32
- text: c
33
- };
34
- }
35
- let A = 48;
36
- for (; A < 123; )
37
- c[A] = C, A++, A === 58 ? A = 65 : A === 91 && (A = 97);
38
- c[43] = C;
39
- c[45] = C;
40
- c[46] = C;
41
- c[95] = C;
42
- c[72] = [C, it];
43
- c[104] = [C, it];
44
- c[87] = [C, nt];
45
- c[119] = [C, nt];
46
- function Dt(t, i, e) {
47
- const r = this;
48
- let s, h;
49
- return n;
50
- function n(l) {
51
- return !B(l) || !at.call(r, r.previous) || W(r.events) ? e(l) : (t.enter("literalAutolink"), t.enter("literalAutolinkEmail"), u(l));
52
- }
53
- function u(l) {
54
- return B(l) ? (t.consume(l), u) : l === 64 ? (t.consume(l), o) : e(l);
55
- }
56
- function o(l) {
57
- return l === 46 ? t.check(pt, f, m)(l) : l === 45 || l === 95 || _(l) ? (h = !0, t.consume(l), o) : f(l);
58
- }
59
- function m(l) {
60
- return t.consume(l), s = !0, o;
61
- }
62
- function f(l) {
63
- return h && s && I(r.previous) ? (t.exit("literalAutolinkEmail"), t.exit("literalAutolink"), i(l)) : e(l);
64
- }
65
- }
66
- function ct(t, i, e) {
67
- const r = this;
68
- return s;
69
- function s(n) {
70
- return n !== 87 && n !== 119 || !rt.call(r, r.previous) || W(r.events) ? e(n) : (t.enter("literalAutolink"), t.enter("literalAutolinkWww"), t.check(bt, t.attempt(v, t.attempt(tt, h), e), e)(n));
71
- }
72
- function h(n) {
73
- return t.exit("literalAutolinkWww"), t.exit("literalAutolink"), i(n);
74
- }
75
- }
76
- function wt(t, i, e) {
77
- const r = this;
78
- let s = "", h = !1;
79
- return n;
80
- function n(l) {
81
- return (l === 72 || l === 104) && lt.call(r, r.previous) && !W(r.events) ? (t.enter("literalAutolink"), t.enter("literalAutolinkHttp"), s += String.fromCodePoint(l), t.consume(l), u) : e(l);
82
- }
83
- function u(l) {
84
- if (I(l) && s.length < 5)
85
- return s += String.fromCodePoint(l), t.consume(l), u;
86
- if (l === 58) {
87
- const b = s.toLowerCase();
88
- if (b === "http" || b === "https")
89
- return t.consume(l), o;
90
- }
91
- return e(l);
92
- }
93
- function o(l) {
94
- return l === 47 ? (t.consume(l), h ? m : (h = !0, o)) : e(l);
95
- }
96
- function m(l) {
97
- return l === null || st(l) || k(l) || E(l) || K(l) ? e(l) : t.attempt(v, t.attempt(tt, f), e)(l);
98
- }
99
- function f(l) {
100
- return t.exit("literalAutolinkHttp"), t.exit("literalAutolink"), i(l);
101
- }
102
- }
103
- function Ct(t, i, e) {
104
- let r = 0;
105
- return s;
106
- function s(n) {
107
- return (n === 87 || n === 119) && r < 3 ? (r++, t.consume(n), s) : n === 46 && r === 3 ? (t.consume(n), h) : e(n);
108
- }
109
- function h(n) {
110
- return n === null ? e(n) : i(n);
111
- }
112
- }
113
- function yt(t, i, e) {
114
- let r, s, h;
115
- return n;
116
- function n(m) {
117
- return m === 46 || m === 95 ? t.check(et, o, u)(m) : m === null || k(m) || E(m) || m !== 45 && K(m) ? o(m) : (h = !0, t.consume(m), n);
118
- }
119
- function u(m) {
120
- return m === 95 ? r = !0 : (s = r, r = void 0), t.consume(m), n;
121
- }
122
- function o(m) {
123
- return s || r || !h ? e(m) : i(m);
124
- }
125
- }
126
- function Ft(t, i) {
127
- let e = 0, r = 0;
128
- return s;
129
- function s(n) {
130
- return n === 40 ? (e++, t.consume(n), s) : n === 41 && r < e ? h(n) : n === 33 || n === 34 || n === 38 || n === 39 || n === 41 || n === 42 || n === 44 || n === 46 || n === 58 || n === 59 || n === 60 || n === 63 || n === 93 || n === 95 || n === 126 ? t.check(et, i, h)(n) : n === null || k(n) || E(n) ? i(n) : (t.consume(n), s);
131
- }
132
- function h(n) {
133
- return n === 41 && r++, t.consume(n), s;
134
- }
135
- }
136
- function At(t, i, e) {
137
- return r;
138
- function r(u) {
139
- return u === 33 || u === 34 || u === 39 || u === 41 || u === 42 || u === 44 || u === 46 || u === 58 || u === 59 || u === 63 || u === 95 || u === 126 ? (t.consume(u), r) : u === 38 ? (t.consume(u), h) : u === 93 ? (t.consume(u), s) : (
140
- // `<` is an end.
141
- u === 60 || // So is whitespace.
142
- u === null || k(u) || E(u) ? i(u) : e(u)
143
- );
144
- }
145
- function s(u) {
146
- return u === null || u === 40 || u === 91 || k(u) || E(u) ? i(u) : r(u);
147
- }
148
- function h(u) {
149
- return I(u) ? n(u) : e(u);
150
- }
151
- function n(u) {
152
- return u === 59 ? (t.consume(u), r) : I(u) ? (t.consume(u), n) : e(u);
153
- }
154
- }
155
- function xt(t, i, e) {
156
- return r;
157
- function r(h) {
158
- return t.consume(h), s;
159
- }
160
- function s(h) {
161
- return _(h) ? e(h) : i(h);
162
- }
163
- }
164
- function rt(t) {
165
- return t === null || t === 40 || t === 42 || t === 95 || t === 91 || t === 93 || t === 126 || k(t);
166
- }
167
- function lt(t) {
168
- return !I(t);
169
- }
170
- function at(t) {
171
- return !(t === 47 || B(t));
172
- }
173
- function B(t) {
174
- return t === 43 || t === 45 || t === 46 || t === 95 || _(t);
175
- }
176
- function W(t) {
177
- let i = t.length, e = !1;
178
- for (; i--; ) {
179
- const r = t[i][1];
180
- if ((r.type === "labelLink" || r.type === "labelImage") && !r._balanced) {
181
- e = !0;
182
- break;
183
- }
184
- if (r._gfmAutolinkLiteralWalkedInto) {
185
- e = !1;
186
- break;
187
- }
188
- }
189
- return t.length > 0 && !e && (t[t.length - 1][1]._gfmAutolinkLiteralWalkedInto = !0), e;
190
- }
191
- function St() {
192
- return {
193
- exit: {
194
- literalAutolinkEmail: zt,
195
- literalAutolinkHttp: Lt,
196
- literalAutolinkWww: dt
197
- }
198
- };
199
- }
200
- function dt(t) {
201
- q.call(this, t, "http://");
202
- }
203
- function zt(t) {
204
- q.call(this, t, "mailto:");
205
- }
206
- function Lt(t) {
207
- q.call(this, t);
208
- }
209
- function q(t, i) {
210
- const e = this.sliceSerialize(t);
211
- this.tag('<a href="' + N((i || "") + e) + '">'), this.raw(this.encode(e)), this.tag("</a>");
212
- }
213
- const It = {
214
- tokenize: Ht,
215
- partial: !0
216
- };
217
- function Et() {
218
- return {
219
- document: {
220
- 91: {
221
- name: "gfmFootnoteDefinition",
222
- tokenize: Mt,
223
- continuation: {
224
- tokenize: jt
225
- },
226
- exit: Pt
227
- }
228
- },
229
- text: {
230
- 91: {
231
- name: "gfmFootnoteCall",
232
- tokenize: Rt
233
- },
234
- 93: {
235
- name: "gfmPotentialFootnoteCall",
236
- add: "after",
237
- tokenize: Tt,
238
- resolveTo: Ot
239
- }
240
- }
241
- };
242
- }
243
- function Tt(t, i, e) {
244
- const r = this;
245
- let s = r.events.length;
246
- const h = r.parser.gfmFootnotes || (r.parser.gfmFootnotes = []);
247
- let n;
248
- for (; s--; ) {
249
- const o = r.events[s][1];
250
- if (o.type === "labelImage") {
251
- n = o;
252
- break;
253
- }
254
- if (o.type === "gfmFootnoteCall" || o.type === "labelLink" || o.type === "label" || o.type === "image" || o.type === "link")
255
- break;
256
- }
257
- return u;
258
- function u(o) {
259
- if (!n || !n._balanced)
260
- return e(o);
261
- const m = T(r.sliceSerialize({
262
- start: n.end,
263
- end: r.now()
264
- }));
265
- return m.codePointAt(0) !== 94 || !h.includes(m.slice(1)) ? e(o) : (t.enter("gfmFootnoteCallLabelMarker"), t.consume(o), t.exit("gfmFootnoteCallLabelMarker"), i(o));
266
- }
267
- }
268
- function Ot(t, i) {
269
- let e = t.length;
270
- for (; e--; )
271
- if (t[e][1].type === "labelImage" && t[e][0] === "enter") {
272
- t[e][1];
273
- break;
274
- }
275
- t[e + 1][1].type = "data", t[e + 3][1].type = "gfmFootnoteCallLabelMarker";
276
- const r = {
277
- type: "gfmFootnoteCall",
278
- start: Object.assign({}, t[e + 3][1].start),
279
- end: Object.assign({}, t[t.length - 1][1].end)
280
- }, s = {
281
- type: "gfmFootnoteCallMarker",
282
- start: Object.assign({}, t[e + 3][1].end),
283
- end: Object.assign({}, t[e + 3][1].end)
284
- };
285
- s.end.column++, s.end.offset++, s.end._bufferIndex++;
286
- const h = {
287
- type: "gfmFootnoteCallString",
288
- start: Object.assign({}, s.end),
289
- end: Object.assign({}, t[t.length - 1][1].start)
290
- }, n = {
291
- type: "chunkString",
292
- contentType: "string",
293
- start: Object.assign({}, h.start),
294
- end: Object.assign({}, h.end)
295
- }, u = [
296
- // Take the `labelImageMarker` (now `data`, the `!`)
297
- t[e + 1],
298
- t[e + 2],
299
- ["enter", r, i],
300
- // The `[`
301
- t[e + 3],
302
- t[e + 4],
303
- // The `^`.
304
- ["enter", s, i],
305
- ["exit", s, i],
306
- // Everything in between.
307
- ["enter", h, i],
308
- ["enter", n, i],
309
- ["exit", n, i],
310
- ["exit", h, i],
311
- // The ending (`]`, properly parsed and labelled).
312
- t[t.length - 2],
313
- t[t.length - 1],
314
- ["exit", r, i]
315
- ];
316
- return t.splice(e, t.length - e + 1, ...u), t;
317
- }
318
- function Rt(t, i, e) {
319
- const r = this, s = r.parser.gfmFootnotes || (r.parser.gfmFootnotes = []);
320
- let h = 0, n;
321
- return u;
322
- function u(l) {
323
- return t.enter("gfmFootnoteCall"), t.enter("gfmFootnoteCallLabelMarker"), t.consume(l), t.exit("gfmFootnoteCallLabelMarker"), o;
324
- }
325
- function o(l) {
326
- return l !== 94 ? e(l) : (t.enter("gfmFootnoteCallMarker"), t.consume(l), t.exit("gfmFootnoteCallMarker"), t.enter("gfmFootnoteCallString"), t.enter("chunkString").contentType = "string", m);
327
- }
328
- function m(l) {
329
- if (
330
- // Too long.
331
- h > 999 || // Closing brace with nothing.
332
- l === 93 && !n || // Space or tab is not supported by GFM for some reason.
333
- // `\n` and `[` not being supported makes sense.
334
- l === null || l === 91 || k(l)
335
- )
336
- return e(l);
337
- if (l === 93) {
338
- t.exit("chunkString");
339
- const b = t.exit("gfmFootnoteCallString");
340
- return s.includes(T(r.sliceSerialize(b))) ? (t.enter("gfmFootnoteCallLabelMarker"), t.consume(l), t.exit("gfmFootnoteCallLabelMarker"), t.exit("gfmFootnoteCall"), i) : e(l);
341
- }
342
- return k(l) || (n = !0), h++, t.consume(l), l === 92 ? f : m;
343
- }
344
- function f(l) {
345
- return l === 91 || l === 92 || l === 93 ? (t.consume(l), h++, m) : m(l);
346
- }
347
- }
348
- function Mt(t, i, e) {
349
- const r = this, s = r.parser.gfmFootnotes || (r.parser.gfmFootnotes = []);
350
- let h, n = 0, u;
351
- return o;
352
- function o(g) {
353
- return t.enter("gfmFootnoteDefinition")._container = !0, t.enter("gfmFootnoteDefinitionLabel"), t.enter("gfmFootnoteDefinitionLabelMarker"), t.consume(g), t.exit("gfmFootnoteDefinitionLabelMarker"), m;
354
- }
355
- function m(g) {
356
- return g === 94 ? (t.enter("gfmFootnoteDefinitionMarker"), t.consume(g), t.exit("gfmFootnoteDefinitionMarker"), t.enter("gfmFootnoteDefinitionLabelString"), t.enter("chunkString").contentType = "string", f) : e(g);
357
- }
358
- function f(g) {
359
- if (
360
- // Too long.
361
- n > 999 || // Closing brace with nothing.
362
- g === 93 && !u || // Space or tab is not supported by GFM for some reason.
363
- // `\n` and `[` not being supported makes sense.
364
- g === null || g === 91 || k(g)
365
- )
366
- return e(g);
367
- if (g === 93) {
368
- t.exit("chunkString");
369
- const D = t.exit("gfmFootnoteDefinitionLabelString");
370
- return h = T(r.sliceSerialize(D)), t.enter("gfmFootnoteDefinitionLabelMarker"), t.consume(g), t.exit("gfmFootnoteDefinitionLabelMarker"), t.exit("gfmFootnoteDefinitionLabel"), b;
371
- }
372
- return k(g) || (u = !0), n++, t.consume(g), g === 92 ? l : f;
373
- }
374
- function l(g) {
375
- return g === 91 || g === 92 || g === 93 ? (t.consume(g), n++, f) : f(g);
376
- }
377
- function b(g) {
378
- return g === 58 ? (t.enter("definitionMarker"), t.consume(g), t.exit("definitionMarker"), s.includes(h) || s.push(h), F(t, p, "gfmFootnoteDefinitionWhitespace")) : e(g);
379
- }
380
- function p(g) {
381
- return i(g);
382
- }
383
- }
384
- function jt(t, i, e) {
385
- return t.check(ht, i, t.attempt(It, i, e));
386
- }
387
- function Pt(t) {
388
- t.exit("gfmFootnoteDefinition");
389
- }
390
- function Ht(t, i, e) {
391
- const r = this;
392
- return F(t, s, "gfmFootnoteDefinitionIndent", 5);
393
- function s(h) {
394
- const n = r.events[r.events.length - 1];
395
- return n && n[1].type === "gfmFootnoteDefinitionIndent" && n[2].sliceSerialize(n[1], !0).length === 4 ? i(h) : e(h);
396
- }
397
- }
398
- const Nt = {}.hasOwnProperty, Bt = {};
399
- function _t(t, i) {
400
- return "Back to reference " + (t + 1) + (i > 1 ? "-" + i : "");
401
- }
402
- function Wt(t) {
403
- const i = t || Bt, e = i.label || "Footnotes", r = i.labelTagName || "h2", s = i.labelAttributes === null || i.labelAttributes === void 0 ? 'class="sr-only"' : i.labelAttributes, h = i.backLabel || _t, n = i.clobberPrefix === null || i.clobberPrefix === void 0 ? "user-content-" : i.clobberPrefix;
404
- return {
405
- enter: {
406
- gfmFootnoteDefinition() {
407
- this.getData("tightStack").push(!1);
408
- },
409
- gfmFootnoteDefinitionLabelString() {
410
- this.buffer();
411
- },
412
- gfmFootnoteCallString() {
413
- this.buffer();
414
- }
415
- },
416
- exit: {
417
- gfmFootnoteDefinition() {
418
- let u = this.getData("gfmFootnoteDefinitions");
419
- const o = this.getData("gfmFootnoteDefinitionStack"), m = this.getData("tightStack"), f = o.pop(), l = this.resume();
420
- u || this.setData("gfmFootnoteDefinitions", u = {}), Nt.call(u, f) || (u[f] = l), m.pop(), this.setData("slurpOneLineEnding", !0), this.setData("lastWasTag");
421
- },
422
- gfmFootnoteDefinitionLabelString(u) {
423
- let o = this.getData("gfmFootnoteDefinitionStack");
424
- o || this.setData("gfmFootnoteDefinitionStack", o = []), o.push(T(this.sliceSerialize(u))), this.resume(), this.buffer();
425
- },
426
- gfmFootnoteCallString(u) {
427
- let o = this.getData("gfmFootnoteCallOrder"), m = this.getData("gfmFootnoteCallCounts");
428
- const f = T(this.sliceSerialize(u));
429
- let l;
430
- this.resume(), o || this.setData("gfmFootnoteCallOrder", o = []), m || this.setData("gfmFootnoteCallCounts", m = {});
431
- const b = o.indexOf(f), p = N(f.toLowerCase());
432
- b === -1 ? (o.push(f), m[f] = 1, l = o.length) : (m[f]++, l = b + 1);
433
- const g = m[f];
434
- this.tag('<sup><a href="#' + n + "fn-" + p + '" id="' + n + "fnref-" + p + (g > 1 ? "-" + g : "") + '" data-footnote-ref="" aria-describedby="footnote-label">' + String(l) + "</a></sup>");
435
- },
436
- null() {
437
- const u = this.getData("gfmFootnoteCallOrder") || [], o = this.getData("gfmFootnoteCallCounts") || {}, m = this.getData("gfmFootnoteDefinitions") || {};
438
- let f = -1;
439
- for (u.length > 0 && (this.lineEndingIfNeeded(), this.tag('<section data-footnotes="" class="footnotes"><' + r + ' id="footnote-label"' + (s ? " " + s : "") + ">"), this.raw(this.encode(e)), this.tag("</" + r + ">"), this.lineEndingIfNeeded(), this.tag("<ol>")); ++f < u.length; ) {
440
- const l = u[f], b = N(l.toLowerCase());
441
- let p = 0;
442
- const g = [];
443
- for (; ++p <= o[l]; )
444
- g.push('<a href="#' + n + "fnref-" + b + (p > 1 ? "-" + p : "") + '" data-footnote-backref="" aria-label="' + this.encode(typeof h == "string" ? h : h(f, p)) + '" class="data-footnote-backref">↩' + (p > 1 ? "<sup>" + p + "</sup>" : "") + "</a>");
445
- const D = g.join(" ");
446
- let w = !1;
447
- this.lineEndingIfNeeded(), this.tag('<li id="' + n + "fn-" + b + '">'), this.lineEndingIfNeeded(), this.tag(m[l].replace(/<\/p>(?:\r?\n|\r)?$/, function(y) {
448
- return w = !0, " " + D + y;
449
- })), w || (this.lineEndingIfNeeded(), this.tag(D)), this.lineEndingIfNeeded(), this.tag("</li>");
450
- }
451
- u.length > 0 && (this.lineEndingIfNeeded(), this.tag("</ol>"), this.lineEndingIfNeeded(), this.tag("</section>"));
452
- }
453
- }
454
- };
455
- }
456
- function qt() {
457
- return {
458
- enter: {
459
- strikethrough() {
460
- this.tag("<del>");
461
- }
462
- },
463
- exit: {
464
- strikethrough() {
465
- this.tag("</del>");
466
- }
467
- }
468
- };
469
- }
470
- function Vt(t) {
471
- let e = (t || {}).singleTilde;
472
- const r = {
473
- name: "strikethrough",
474
- tokenize: h,
475
- resolveAll: s
476
- };
477
- return e == null && (e = !0), {
478
- text: {
479
- 126: r
480
- },
481
- insideSpan: {
482
- null: [r]
483
- },
484
- attentionMarkers: {
485
- null: [126]
486
- }
487
- };
488
- function s(n, u) {
489
- let o = -1;
490
- for (; ++o < n.length; )
491
- if (n[o][0] === "enter" && n[o][1].type === "strikethroughSequenceTemporary" && n[o][1]._close) {
492
- let m = o;
493
- for (; m--; )
494
- if (n[m][0] === "exit" && n[m][1].type === "strikethroughSequenceTemporary" && n[m][1]._open && // If the sizes are the same:
495
- n[o][1].end.offset - n[o][1].start.offset === n[m][1].end.offset - n[m][1].start.offset) {
496
- n[o][1].type = "strikethroughSequence", n[m][1].type = "strikethroughSequence";
497
- const f = {
498
- type: "strikethrough",
499
- start: Object.assign({}, n[m][1].start),
500
- end: Object.assign({}, n[o][1].end)
501
- }, l = {
502
- type: "strikethroughText",
503
- start: Object.assign({}, n[m][1].end),
504
- end: Object.assign({}, n[o][1].start)
505
- }, b = [["enter", f, u], ["enter", n[m][1], u], ["exit", n[m][1], u], ["enter", l, u]], p = u.parser.constructs.insideSpan.null;
506
- p && P(b, b.length, 0, gt(p, n.slice(m + 1, o), u)), P(b, b.length, 0, [["exit", l, u], ["enter", n[o][1], u], ["exit", n[o][1], u], ["exit", f, u]]), P(n, m - 1, o - m + 3, b), o = m + b.length - 2;
507
- break;
508
- }
509
- }
510
- for (o = -1; ++o < n.length; )
511
- n[o][1].type === "strikethroughSequenceTemporary" && (n[o][1].type = "data");
512
- return n;
513
- }
514
- function h(n, u, o) {
515
- const m = this.previous, f = this.events;
516
- let l = 0;
517
- return b;
518
- function b(g) {
519
- return m === 126 && f[f.length - 1][1].type !== "characterEscape" ? o(g) : (n.enter("strikethroughSequenceTemporary"), p(g));
520
- }
521
- function p(g) {
522
- const D = X(m);
523
- if (g === 126)
524
- return l > 1 ? o(g) : (n.consume(g), l++, p);
525
- if (l < 2 && !e) return o(g);
526
- const w = n.exit("strikethroughSequenceTemporary"), y = X(g);
527
- return w._open = !y || y === 2 && !!D, w._close = !D || D === 2 && !!y, u(g);
528
- }
529
- }
530
- }
531
- const H = {
532
- none: "",
533
- left: ' align="left"',
534
- right: ' align="right"',
535
- center: ' align="center"'
536
- };
537
- function Ut() {
538
- return {
539
- enter: {
540
- table(t) {
541
- const i = t._align;
542
- this.lineEndingIfNeeded(), this.tag("<table>"), this.setData("tableAlign", i);
543
- },
544
- tableBody() {
545
- this.tag("<tbody>");
546
- },
547
- tableData() {
548
- const t = this.getData("tableAlign"), i = this.getData("tableColumn"), e = H[t[i]];
549
- e === void 0 ? this.buffer() : (this.lineEndingIfNeeded(), this.tag("<td" + e + ">"));
550
- },
551
- tableHead() {
552
- this.lineEndingIfNeeded(), this.tag("<thead>");
553
- },
554
- tableHeader() {
555
- const t = this.getData("tableAlign"), i = this.getData("tableColumn"), e = H[t[i]];
556
- this.lineEndingIfNeeded(), this.tag("<th" + e + ">");
557
- },
558
- tableRow() {
559
- this.setData("tableColumn", 0), this.lineEndingIfNeeded(), this.tag("<tr>");
560
- }
561
- },
562
- exit: {
563
- // Overwrite the default code text data handler to unescape escaped pipes when
564
- // they are in tables.
565
- codeTextData(t) {
566
- let i = this.sliceSerialize(t);
567
- this.getData("tableAlign") && (i = i.replace(/\\([\\|])/g, Gt)), this.raw(this.encode(i));
568
- },
569
- table() {
570
- this.setData("tableAlign"), this.setData("slurpAllLineEndings"), this.lineEndingIfNeeded(), this.tag("</table>");
571
- },
572
- tableBody() {
573
- this.lineEndingIfNeeded(), this.tag("</tbody>");
574
- },
575
- tableData() {
576
- const t = this.getData("tableAlign"), i = this.getData("tableColumn");
577
- i in t ? (this.tag("</td>"), this.setData("tableColumn", i + 1)) : this.resume();
578
- },
579
- tableHead() {
580
- this.lineEndingIfNeeded(), this.tag("</thead>");
581
- },
582
- tableHeader() {
583
- const t = this.getData("tableColumn");
584
- this.tag("</th>"), this.setData("tableColumn", t + 1);
585
- },
586
- tableRow() {
587
- const t = this.getData("tableAlign");
588
- let i = this.getData("tableColumn");
589
- for (; i < t.length; )
590
- this.lineEndingIfNeeded(), this.tag("<td" + H[t[i]] + "></td>"), i++;
591
- this.setData("tableColumn", i), this.lineEndingIfNeeded(), this.tag("</tr>");
592
- }
593
- }
594
- };
595
- }
596
- function Gt(t, i) {
597
- return i === "|" ? i : t;
598
- }
599
- class $t {
600
- /**
601
- * Create a new edit map.
602
- */
603
- constructor() {
604
- this.map = [];
605
- }
606
- /**
607
- * Create an edit: a remove and/or add at a certain place.
608
- *
609
- * @param {number} index
610
- * @param {number} remove
611
- * @param {Array<Event>} add
612
- * @returns {undefined}
613
- */
614
- add(i, e, r) {
615
- Jt(this, i, e, r);
616
- }
617
- // To do: add this when moving to `micromark`.
618
- // /**
619
- // * Create an edit: but insert `add` before existing additions.
620
- // *
621
- // * @param {number} index
622
- // * @param {number} remove
623
- // * @param {Array<Event>} add
624
- // * @returns {undefined}
625
- // */
626
- // addBefore(index, remove, add) {
627
- // addImplementation(this, index, remove, add, true)
628
- // }
629
- /**
630
- * Done, change the events.
631
- *
632
- * @param {Array<Event>} events
633
- * @returns {undefined}
634
- */
635
- consume(i) {
636
- if (this.map.sort(function(h, n) {
637
- return h[0] - n[0];
638
- }), this.map.length === 0)
639
- return;
640
- let e = this.map.length;
641
- const r = [];
642
- for (; e > 0; )
643
- e -= 1, r.push(i.slice(this.map[e][0] + this.map[e][1]), this.map[e][2]), i.length = this.map[e][0];
644
- r.push(i.slice()), i.length = 0;
645
- let s = r.pop();
646
- for (; s; ) {
647
- for (const h of s)
648
- i.push(h);
649
- s = r.pop();
650
- }
651
- this.map.length = 0;
652
- }
653
- }
654
- function Jt(t, i, e, r) {
655
- let s = 0;
656
- if (!(e === 0 && r.length === 0)) {
657
- for (; s < t.map.length; ) {
658
- if (t.map[s][0] === i) {
659
- t.map[s][1] += e, t.map[s][2].push(...r);
660
- return;
661
- }
662
- s += 1;
663
- }
664
- t.map.push([i, e, r]);
665
- }
666
- }
667
- function Qt(t, i) {
668
- let e = !1;
669
- const r = [];
670
- for (; i < t.length; ) {
671
- const s = t[i];
672
- if (e) {
673
- if (s[0] === "enter")
674
- s[1].type === "tableContent" && r.push(t[i + 1][1].type === "tableDelimiterMarker" ? "left" : "none");
675
- else if (s[1].type === "tableContent") {
676
- if (t[i - 1][1].type === "tableDelimiterMarker") {
677
- const h = r.length - 1;
678
- r[h] = r[h] === "left" ? "center" : "right";
679
- }
680
- } else if (s[1].type === "tableDelimiterRow")
681
- break;
682
- } else s[0] === "enter" && s[1].type === "tableDelimiterRow" && (e = !0);
683
- i += 1;
684
- }
685
- return r;
686
- }
687
- function Xt() {
688
- return {
689
- flow: {
690
- null: {
691
- name: "table",
692
- tokenize: Yt,
693
- resolveAll: Zt
694
- }
695
- }
696
- };
697
- }
698
- function Yt(t, i, e) {
699
- const r = this;
700
- let s = 0, h = 0, n;
701
- return u;
702
- function u(a) {
703
- let z = r.events.length - 1;
704
- for (; z > -1; ) {
705
- const Q = r.events[z][1].type;
706
- if (Q === "lineEnding" || // Note: markdown-rs uses `whitespace` instead of `linePrefix`
707
- Q === "linePrefix") z--;
708
- else break;
709
- }
710
- const $ = z > -1 ? r.events[z][1].type : null, J = $ === "tableHead" || $ === "tableRow" ? G : o;
711
- return J === G && r.parser.lazy[r.now().line] ? e(a) : J(a);
712
- }
713
- function o(a) {
714
- return t.enter("tableHead"), t.enter("tableRow"), m(a);
715
- }
716
- function m(a) {
717
- return a === 124 || (n = !0, h += 1), f(a);
718
- }
719
- function f(a) {
720
- return a === null ? e(a) : L(a) ? h > 1 ? (h = 0, r.interrupt = !0, t.exit("tableRow"), t.enter("lineEnding"), t.consume(a), t.exit("lineEnding"), p) : e(a) : x(a) ? F(t, f, "whitespace")(a) : (h += 1, n && (n = !1, s += 1), a === 124 ? (t.enter("tableCellDivider"), t.consume(a), t.exit("tableCellDivider"), n = !0, f) : (t.enter("data"), l(a)));
721
- }
722
- function l(a) {
723
- return a === null || a === 124 || k(a) ? (t.exit("data"), f(a)) : (t.consume(a), a === 92 ? b : l);
724
- }
725
- function b(a) {
726
- return a === 92 || a === 124 ? (t.consume(a), l) : l(a);
727
- }
728
- function p(a) {
729
- return r.interrupt = !1, r.parser.lazy[r.now().line] ? e(a) : (t.enter("tableDelimiterRow"), n = !1, x(a) ? F(t, g, "linePrefix", r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(a) : g(a));
730
- }
731
- function g(a) {
732
- return a === 45 || a === 58 ? w(a) : a === 124 ? (n = !0, t.enter("tableCellDivider"), t.consume(a), t.exit("tableCellDivider"), D) : d(a);
733
- }
734
- function D(a) {
735
- return x(a) ? F(t, w, "whitespace")(a) : w(a);
736
- }
737
- function w(a) {
738
- return a === 58 ? (h += 1, n = !0, t.enter("tableDelimiterMarker"), t.consume(a), t.exit("tableDelimiterMarker"), y) : a === 45 ? (h += 1, y(a)) : a === null || L(a) ? j(a) : d(a);
739
- }
740
- function y(a) {
741
- return a === 45 ? (t.enter("tableDelimiterFiller"), V(a)) : d(a);
742
- }
743
- function V(a) {
744
- return a === 45 ? (t.consume(a), V) : a === 58 ? (n = !0, t.exit("tableDelimiterFiller"), t.enter("tableDelimiterMarker"), t.consume(a), t.exit("tableDelimiterMarker"), U) : (t.exit("tableDelimiterFiller"), U(a));
745
- }
746
- function U(a) {
747
- return x(a) ? F(t, j, "whitespace")(a) : j(a);
748
- }
749
- function j(a) {
750
- return a === 124 ? g(a) : a === null || L(a) ? !n || s !== h ? d(a) : (t.exit("tableDelimiterRow"), t.exit("tableHead"), i(a)) : d(a);
751
- }
752
- function d(a) {
753
- return e(a);
754
- }
755
- function G(a) {
756
- return t.enter("tableRow"), O(a);
757
- }
758
- function O(a) {
759
- return a === 124 ? (t.enter("tableCellDivider"), t.consume(a), t.exit("tableCellDivider"), O) : a === null || L(a) ? (t.exit("tableRow"), i(a)) : x(a) ? F(t, O, "whitespace")(a) : (t.enter("data"), R(a));
760
- }
761
- function R(a) {
762
- return a === null || a === 124 || k(a) ? (t.exit("data"), O(a)) : (t.consume(a), a === 92 ? ot : R);
763
- }
764
- function ot(a) {
765
- return a === 92 || a === 124 ? (t.consume(a), R) : R(a);
766
- }
767
- }
768
- function Zt(t, i) {
769
- let e = -1, r = !0, s = 0, h = [0, 0, 0, 0], n = [0, 0, 0, 0], u = !1, o = 0, m, f, l;
770
- const b = new $t();
771
- for (; ++e < t.length; ) {
772
- const p = t[e], g = p[1];
773
- p[0] === "enter" ? g.type === "tableHead" ? (u = !1, o !== 0 && (Y(b, i, o, m, f), f = void 0, o = 0), m = {
774
- type: "table",
775
- start: Object.assign({}, g.start),
776
- // Note: correct end is set later.
777
- end: Object.assign({}, g.end)
778
- }, b.add(e, 0, [["enter", m, i]])) : g.type === "tableRow" || g.type === "tableDelimiterRow" ? (r = !0, l = void 0, h = [0, 0, 0, 0], n = [0, e + 1, 0, 0], u && (u = !1, f = {
779
- type: "tableBody",
780
- start: Object.assign({}, g.start),
781
- // Note: correct end is set later.
782
- end: Object.assign({}, g.end)
783
- }, b.add(e, 0, [["enter", f, i]])), s = g.type === "tableDelimiterRow" ? 2 : f ? 3 : 1) : s && (g.type === "data" || g.type === "tableDelimiterMarker" || g.type === "tableDelimiterFiller") ? (r = !1, n[2] === 0 && (h[1] !== 0 && (n[0] = n[1], l = M(b, i, h, s, void 0, l), h = [0, 0, 0, 0]), n[2] = e)) : g.type === "tableCellDivider" && (r ? r = !1 : (h[1] !== 0 && (n[0] = n[1], l = M(b, i, h, s, void 0, l)), h = n, n = [h[1], e, 0, 0])) : g.type === "tableHead" ? (u = !0, o = e) : g.type === "tableRow" || g.type === "tableDelimiterRow" ? (o = e, h[1] !== 0 ? (n[0] = n[1], l = M(b, i, h, s, e, l)) : n[1] !== 0 && (l = M(b, i, n, s, e, l)), s = 0) : s && (g.type === "data" || g.type === "tableDelimiterMarker" || g.type === "tableDelimiterFiller") && (n[3] = e);
784
- }
785
- for (o !== 0 && Y(b, i, o, m, f), b.consume(i.events), e = -1; ++e < i.events.length; ) {
786
- const p = i.events[e];
787
- p[0] === "enter" && p[1].type === "table" && (p[1]._align = Qt(i.events, e));
788
- }
789
- return t;
790
- }
791
- function M(t, i, e, r, s, h) {
792
- const n = r === 1 ? "tableHeader" : r === 2 ? "tableDelimiter" : "tableData", u = "tableContent";
793
- e[0] !== 0 && (h.end = Object.assign({}, S(i.events, e[0])), t.add(e[0], 0, [["exit", h, i]]));
794
- const o = S(i.events, e[1]);
795
- if (h = {
796
- type: n,
797
- start: Object.assign({}, o),
798
- // Note: correct end is set later.
799
- end: Object.assign({}, o)
800
- }, t.add(e[1], 0, [["enter", h, i]]), e[2] !== 0) {
801
- const m = S(i.events, e[2]), f = S(i.events, e[3]), l = {
802
- type: u,
803
- start: Object.assign({}, m),
804
- end: Object.assign({}, f)
805
- };
806
- if (t.add(e[2], 0, [["enter", l, i]]), r !== 2) {
807
- const b = i.events[e[2]], p = i.events[e[3]];
808
- if (b[1].end = Object.assign({}, p[1].end), b[1].type = "chunkText", b[1].contentType = "text", e[3] > e[2] + 1) {
809
- const g = e[2] + 1, D = e[3] - e[2] - 1;
810
- t.add(g, D, []);
811
- }
812
- }
813
- t.add(e[3] + 1, 0, [["exit", l, i]]);
814
- }
815
- return s !== void 0 && (h.end = Object.assign({}, S(i.events, s)), t.add(s, 0, [["exit", h, i]]), h = void 0), h;
816
- }
817
- function Y(t, i, e, r, s) {
818
- const h = [], n = S(i.events, e);
819
- s && (s.end = Object.assign({}, n), h.push(["exit", s, i])), r.end = Object.assign({}, n), h.push(["exit", r, i]), t.add(e + 1, 0, h);
820
- }
821
- function S(t, i) {
822
- const e = t[i], r = e[0] === "enter" ? "start" : "end";
823
- return e[1][r];
824
- }
825
- const ut = /<(\/?)(iframe|noembed|noframes|plaintext|script|style|title|textarea|xmp)(?=[\t\n\f\r />])/gi, Kt = new RegExp("^" + ut.source, "i");
826
- function vt() {
827
- return {
828
- exit: {
829
- htmlFlowData(t) {
830
- Z.call(this, t, ut);
831
- },
832
- htmlTextData(t) {
833
- Z.call(this, t, Kt);
834
- }
835
- }
836
- };
837
- }
838
- function Z(t, i) {
839
- let e = this.sliceSerialize(t);
840
- this.options.allowDangerousHtml && (e = e.replace(i, "&lt;$1$2")), this.raw(this.encode(e));
841
- }
842
- function te() {
843
- return {
844
- enter: {
845
- taskListCheck() {
846
- this.tag('<input type="checkbox" disabled="" ');
847
- }
848
- },
849
- exit: {
850
- taskListCheck() {
851
- this.tag("/>");
852
- },
853
- taskListCheckValueChecked() {
854
- this.tag('checked="" ');
855
- }
856
- }
857
- };
858
- }
859
- const ee = {
860
- name: "tasklistCheck",
861
- tokenize: ie
862
- };
863
- function ne() {
864
- return {
865
- text: {
866
- 91: ee
867
- }
868
- };
869
- }
870
- function ie(t, i, e) {
871
- const r = this;
872
- return s;
873
- function s(o) {
874
- return (
875
- // Exit if there’s stuff before.
876
- r.previous !== null || // Exit if not in the first content that is the first child of a list
877
- // item.
878
- !r._gfmTasklistFirstContentOfListItem ? e(o) : (t.enter("taskListCheck"), t.enter("taskListCheckMarker"), t.consume(o), t.exit("taskListCheckMarker"), h)
879
- );
880
- }
881
- function h(o) {
882
- return k(o) ? (t.enter("taskListCheckValueUnchecked"), t.consume(o), t.exit("taskListCheckValueUnchecked"), n) : o === 88 || o === 120 ? (t.enter("taskListCheckValueChecked"), t.consume(o), t.exit("taskListCheckValueChecked"), n) : e(o);
883
- }
884
- function n(o) {
885
- return o === 93 ? (t.enter("taskListCheckMarker"), t.consume(o), t.exit("taskListCheckMarker"), t.exit("taskListCheck"), u) : e(o);
886
- }
887
- function u(o) {
888
- return L(o) ? i(o) : x(o) ? t.check({
889
- tokenize: re
890
- }, i, e)(o) : e(o);
891
- }
892
- }
893
- function re(t, i, e) {
894
- return F(t, r, "whitespace");
895
- function r(s) {
896
- return s === null ? e(s) : i(s);
897
- }
898
- }
899
- function ae(t) {
900
- return mt([
901
- kt(),
902
- Et(),
903
- Vt(t),
904
- Xt(),
905
- ne()
906
- ]);
907
- }
908
- function ue(t) {
909
- return ft([
910
- St(),
911
- Wt(t),
912
- qt(),
913
- Ut(),
914
- vt(),
915
- te()
916
- ]);
917
- }
918
- export {
919
- ae as gfm,
920
- ue as gfmHtml
921
- };