sanoma 0.11.21 → 0.11.23

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 (728) hide show
  1. package/README.md +55 -14
  2. package/app/README.md +12 -8
  3. package/app/dist/api.d.ts +191 -5
  4. package/app/dist/api.js +125 -4
  5. package/app/dist/api.js.map +1 -1
  6. package/app/dist/build.d.ts +28 -3
  7. package/app/dist/build.js +154 -15
  8. package/app/dist/build.js.map +1 -1
  9. package/app/dist/bundle-build.d.ts +32 -0
  10. package/app/dist/bundle-build.js +127 -67
  11. package/app/dist/bundle-build.js.map +1 -1
  12. package/app/dist/client/assets/ArrowDown.es-BVRf--PS.js +1 -0
  13. package/app/dist/client/assets/CaretDown.es-D12mWb2j.js +1 -0
  14. package/app/dist/client/assets/CatchBoundary-Cb__yx-s.js +1 -0
  15. package/app/dist/client/assets/Check.es-b7BdqO2s.js +1 -0
  16. package/app/dist/client/assets/CheckCircle.es-DKXiWmAT.js +1 -0
  17. package/app/dist/client/assets/Copy.es-CvUujKw7.js +1 -0
  18. package/app/dist/client/assets/DialogTitle-5oboyLiq.js +1 -0
  19. package/app/dist/client/assets/FloppyDisk.es-CDyDob8p.js +1 -0
  20. package/app/dist/client/assets/Globe.es-C1pgZCGM.js +1 -0
  21. package/app/dist/client/assets/MagnifyingGlass.es-CZ3i6pz0.js +1 -0
  22. package/app/dist/client/assets/Play.es-DGJ1CGhp.js +1 -0
  23. package/app/dist/client/assets/Plug.es-BPhGL8MK.js +1 -0
  24. package/app/dist/client/assets/Plus.es-i3Vaa2WW.js +1 -0
  25. package/app/dist/client/assets/Separator-Cu9cQDBN.js +1 -0
  26. package/app/dist/client/assets/X.es-B7rq0E_-.js +1 -0
  27. package/app/dist/client/assets/_id-0_Y-lz6G.js +1 -0
  28. package/app/dist/client/assets/_id-3tGIwJ5T.js +1 -0
  29. package/app/dist/client/assets/_id-CgPVeQe8.js +1 -0
  30. package/app/dist/client/assets/_id-DFlFuBDE.js +1 -0
  31. package/app/dist/client/assets/_id-QNnNLGx_.js +1 -0
  32. package/app/dist/client/assets/_name-6k1yqjX8.js +1 -0
  33. package/app/dist/client/assets/_name-B4Qba2-o.js +4 -0
  34. package/app/dist/client/assets/_name-BfPXcP49.js +1 -0
  35. package/app/dist/client/assets/_name-CqBzHz7c.js +1 -0
  36. package/app/dist/client/assets/_vendor-CfHRJBG8.js +1 -0
  37. package/app/dist/client/assets/_vendor-Dj7KCZ74.js +1 -0
  38. package/app/dist/client/assets/app-chrome-CFH47gLL.js +5 -0
  39. package/app/dist/client/assets/app-scope-Z_2GE9oz.js +1 -0
  40. package/app/dist/client/assets/approval-CgksyU5L.js +1 -0
  41. package/app/dist/client/assets/apps-BDsPVmMY.js +1 -0
  42. package/app/dist/client/assets/button-D5kdANef.js +1 -0
  43. package/app/dist/client/assets/change-glance-D6N6Xaqu.js +1 -0
  44. package/app/dist/client/assets/changes-B6xxBiC0.js +1 -0
  45. package/app/dist/client/assets/changes-BS7eJI5T.js +1 -0
  46. package/app/dist/client/assets/chat-Bw3WhRE9.js +14 -0
  47. package/app/dist/client/assets/chat-button-DNusaP5n.js +1 -0
  48. package/app/dist/client/assets/chat-prompt-z0XJPDtH.js +1 -0
  49. package/app/dist/client/assets/{code-BVYaiQEr.js → code-CT4-YDKq.js} +2 -2
  50. package/app/dist/client/assets/common-DZLdx_jS.js +3 -0
  51. package/app/dist/client/assets/composite-CoGyvQjv.js +1 -0
  52. package/app/dist/client/assets/connect-BMk-KP-f.js +1 -0
  53. package/app/dist/client/assets/connections-TbS_jeiy.js +5 -0
  54. package/app/dist/client/assets/connectors-CgRpyRdd.js +1 -0
  55. package/app/dist/client/assets/credentials-Dxpl8sUw.js +1 -0
  56. package/app/dist/client/assets/css-BGIxQoYs.js +1 -0
  57. package/app/dist/client/assets/css-DgaLhXQH.js +1 -0
  58. package/app/dist/client/assets/data-lKkklNeo.js +1 -0
  59. package/app/dist/client/assets/decidable-w2VGgZwN.js +1 -0
  60. package/app/dist/client/assets/declaration-form-CAwox7F1.js +1 -0
  61. package/app/dist/client/assets/dialog-DDAfDsGh.js +1 -0
  62. package/app/dist/client/assets/diff-woXpYk--.js +1 -0
  63. package/app/dist/client/assets/engine-CBuzy-Ik.js +1 -0
  64. package/app/dist/client/assets/existing-2kDivy4p.js +1 -0
  65. package/app/dist/client/assets/fence-BdtS5gi0.js +157 -0
  66. package/app/dist/client/assets/github-dark-C-LZuMrd.js +1 -0
  67. package/app/dist/client/assets/github-light-EUqPIrTm.js +1 -0
  68. package/app/dist/client/assets/graph-BqVQ68hK.js +7 -0
  69. package/app/dist/client/assets/grid-diff-Jj1nTy52.js +1 -0
  70. package/app/dist/client/assets/held-card-DjBO8PTe.js +1 -0
  71. package/app/dist/client/assets/highlighted-body-JLMTFACH-Co7ss_Ht.js +1 -0
  72. package/app/dist/client/assets/hosting-DC7Pftfb.js +1 -0
  73. package/app/dist/client/assets/html-BHZv6uqE.js +1 -0
  74. package/app/dist/client/assets/import-DhVQArmJ.js +1 -0
  75. package/app/dist/client/assets/inbox-5h39e_tI.js +1 -0
  76. package/app/dist/client/assets/inbox-CUNaP4uz.js +1 -0
  77. package/app/dist/client/assets/index-CA_5CFb4.js +10 -0
  78. package/app/dist/client/assets/item-vV00RYfb.js +1 -0
  79. package/app/dist/client/assets/javascript-BzbQS41l.js +1 -0
  80. package/app/dist/client/assets/javascript-CpIGwZ_Y.js +1 -0
  81. package/app/dist/client/assets/json-qhed-kSA.js +1 -0
  82. package/app/dist/client/assets/jsx-Bz0zcwM4.js +1 -0
  83. package/app/dist/client/assets/kit-BZcdh1Xm.js +1 -0
  84. package/app/dist/client/assets/lazyRouteComponent-C2a8bGcK.js +1 -0
  85. package/app/dist/client/assets/markdown-BYOwaDjH.js +1 -0
  86. package/app/dist/client/assets/markdown-bsqylRZb.js +164 -0
  87. package/app/dist/client/assets/mermaid-WFAXDIZX-CYMnek4e.js +1 -0
  88. package/app/dist/client/assets/motion-D6e1hqz4.js +1 -0
  89. package/app/dist/client/assets/people-Bn8GAJ3z.js +1 -0
  90. package/app/dist/client/assets/permissions-Csf87P7b.js +2 -0
  91. package/app/dist/client/assets/permissions-grid-CzK64E29.js +1 -0
  92. package/app/dist/client/assets/preload-helper-BLdHbfdN.js +1 -0
  93. package/app/dist/client/assets/python-gzcpVVnB.js +1 -0
  94. package/app/dist/client/assets/queries-XJ-fmuYb.js +57 -0
  95. package/app/dist/client/assets/react-dom-D6fTz1bt.js +1 -0
  96. package/app/dist/client/assets/review-BjpH-tT4.js +1 -0
  97. package/app/dist/client/assets/route-CD2oErox.js +1 -0
  98. package/app/dist/client/assets/route-CRwDZE-c.js +1 -0
  99. package/app/dist/client/assets/routes-gbZbqIhO.js +1 -0
  100. package/app/dist/client/assets/runs-table-nkQLXJxG.js +1 -0
  101. package/app/dist/client/assets/scenario-CZ7tmap7.js +1 -0
  102. package/app/dist/client/assets/scenario-graph-W2XcWuur.js +1 -0
  103. package/app/dist/client/assets/separator-Bdtc7rou.js +1 -0
  104. package/app/dist/client/assets/{sheet-BYL9XU5s.js → sheet-P-hJsTeq.js} +1 -1
  105. package/app/dist/client/assets/shellscript-CLZ0U2zV.js +1 -0
  106. package/app/dist/client/assets/site-icon-1Mcc1UIb.js +1 -0
  107. package/app/dist/client/assets/sites.index-CXcRF_R0.js +1 -0
  108. package/app/dist/client/assets/spinner-XaRXIj9W.js +1 -0
  109. package/app/dist/client/assets/sql-CEbI0hMM.js +1 -0
  110. package/app/dist/client/assets/start-form-6whPfUoW.js +1 -0
  111. package/app/dist/client/assets/store-BT988jIX.js +1 -0
  112. package/app/dist/client/assets/style-DaqPHcI1.css +2 -0
  113. package/app/dist/client/assets/table-B81tv0LG.js +1 -0
  114. package/app/dist/client/assets/textarea-CRpYU-qx.js +1 -0
  115. package/app/dist/client/assets/tsx-udAQXfEw.js +1 -0
  116. package/app/dist/client/assets/typescript-bsJCZSQ-.js +1 -0
  117. package/app/dist/client/assets/useLoaderData-BIegJC9y.js +1 -0
  118. package/app/dist/client/assets/useOpenInteractionType-UhakpAXY.js +1 -0
  119. package/app/dist/client/assets/useRegisterFieldControl-CT8iqvDE.js +1 -0
  120. package/app/dist/client/assets/useValueChanged-DBqn456b.js +1 -0
  121. package/app/dist/client/assets/utils-BRvE9-Fo.js +1 -0
  122. package/app/dist/client/assets/who-are-you-_7OehU_o.js +1 -0
  123. package/app/dist/client/assets/workflow-DSNK0oFo.js +1 -0
  124. package/app/dist/client/assets/workflow-view-VFD3onJL.js +1 -0
  125. package/app/dist/client/assets/workflows-CT9wqMl2.js +1 -0
  126. package/app/dist/client/assets/yaml-rwi0_p6S.js +1 -0
  127. package/app/dist/components/grid/plan.d.ts +46 -262
  128. package/app/dist/components/grid/plan.js +134 -138
  129. package/app/dist/components/grid/plan.js.map +1 -1
  130. package/app/dist/demo-build.d.ts +58 -0
  131. package/app/dist/demo-build.js +440 -0
  132. package/app/dist/demo-build.js.map +1 -0
  133. package/app/dist/handler.d.ts +9 -7
  134. package/app/dist/handler.js +10 -10
  135. package/app/dist/handler.js.map +1 -1
  136. package/app/dist/index.d.ts +4 -4
  137. package/app/dist/index.js +52 -35
  138. package/app/dist/index.js.map +1 -1
  139. package/app/dist/lib/chat.d.ts +67 -20
  140. package/app/dist/lib/chat.js +54 -18
  141. package/app/dist/lib/chat.js.map +1 -1
  142. package/app/dist/lib/names.d.ts +7 -0
  143. package/app/dist/lib/names.js +6 -2
  144. package/app/dist/lib/names.js.map +1 -1
  145. package/app/dist/login/page.d.ts +1 -10
  146. package/app/dist/login/page.js +0 -14
  147. package/app/dist/login/page.js.map +1 -1
  148. package/app/dist/login/staff.js +3 -3
  149. package/app/dist/login/staff.js.map +1 -1
  150. package/app/dist/server/assets/{_id-wuJIq2ZZ.js → _id-B6iAc90c.js} +2 -2
  151. package/app/dist/server/assets/{_id-Dt9tTylX.js → _id-BlceO2iK.js} +3 -3
  152. package/app/dist/server/assets/{_id-wB8khGTz.js → _id-Cc0uBuJb.js} +12 -7
  153. package/app/dist/server/assets/{_id-ce1EGp7Y.js → _id-DYfvgveB.js} +2 -2
  154. package/app/dist/server/assets/{_id-BViXAagq.js → _id-Dvn0wB-1.js} +15 -330
  155. package/app/dist/server/assets/{_name-BGagGBjX.js → _name-3AGcE6tj.js} +7 -7
  156. package/app/dist/server/assets/{_name-DntbHE-b.js → _name-BIcmcEwj.js} +11 -11
  157. package/app/dist/server/assets/{_name-BqFwnyf7.js → _name-CfoydEzk.js} +2 -2
  158. package/app/dist/server/assets/{_name-D_-MhjNf.js → _name-VpcPszKf.js} +210 -63
  159. package/app/dist/server/assets/{_tanstack-start-manifest_v-BljuBM-G.js → _tanstack-start-manifest_v-DUL7FcJk.js} +119 -91
  160. package/app/dist/server/assets/{_vendor-CcEviOki.js → _vendor-Bwis2sPx.js} +2 -2
  161. package/app/dist/server/assets/{_vendor-CNB03LWX.js → _vendor-DUtH-Z9W.js} +8 -8
  162. package/app/dist/server/assets/{actor-D6iA0pDg.js → actor-DAOPjcdj.js} +1 -1
  163. package/app/dist/server/assets/app-chrome-B8oA4uXZ.js +2298 -0
  164. package/app/dist/server/assets/{app-scope-CXIgOFmi.js → app-scope-BxuIu0xV.js} +2 -2
  165. package/app/dist/server/assets/{apply-plan-ybBda6vQ.js → apply-plan-CHJ_Hr71.js} +8 -7
  166. package/app/dist/server/assets/{approval-Su315ikC.js → approval-DR_9mBcx.js} +17 -14
  167. package/app/dist/server/assets/{apps-xwQAehch.js → apps-CtPev5RI.js} +7 -7
  168. package/app/dist/server/assets/button-Xwx3rpQ0.js +43 -0
  169. package/app/dist/server/assets/change-glance-DGqh7Pxb.js +54 -0
  170. package/app/dist/server/assets/{change-glance-CpArIbGS.js → changes-C3qjEBZP.js} +2 -54
  171. package/app/dist/server/assets/{changes-Bc_OiDBD.js → changes-DfOnO87K.js} +8 -7
  172. package/app/dist/server/assets/{chat-DMN_hoKm.js → chat-B19X0_8f.js} +133 -34
  173. package/app/dist/server/assets/{chat-button-LtA80MoR.js → chat-button-SluTWK8R.js} +2 -2
  174. package/app/dist/server/assets/{code-COyt8L-n.js → code-hVpCkmAZ.js} +1 -1
  175. package/app/dist/server/assets/{common-CWHLj7KV.js → common-JUUJLp4v.js} +30 -82
  176. package/app/dist/server/assets/{connect-BpPiu5s6.js → connect-DKu1UgY-.js} +11 -10
  177. package/app/dist/server/assets/{connections-DBgb1bvX.js → connections-Dyedl4qi.js} +12 -11
  178. package/app/dist/server/assets/{connectors-5a5_SlHO.js → connectors-yojQH7WS.js} +8 -8
  179. package/app/dist/server/assets/{credentials-ud_Y68hx.js → credentials-2Z6EHitQ.js} +10 -9
  180. package/app/dist/server/assets/{data-aEdhwcqy.js → data-1padc_i_.js} +7 -7
  181. package/app/dist/server/assets/{declaration-form-Dfg1yNuY.js → declaration-form-MAnn_M8g.js} +7 -6
  182. package/app/dist/server/assets/{dialog-BGjiw3Dx.js → dialog-T0bzlKzs.js} +2 -2
  183. package/app/dist/server/assets/{dropdown-menu-DAC3LWas.js → dropdown-menu-RGvPORm4.js} +1 -1
  184. package/app/dist/server/assets/{existing-B4d4NrC8.js → existing-BZjX_7Aa.js} +8 -7
  185. package/app/dist/server/assets/fence-BvNu3YNO.js +130 -0
  186. package/app/dist/server/assets/{field-C0Xx_90s.js → field-DFpkT1id.js} +1 -1
  187. package/app/dist/server/assets/{functions-BvFYzabD.js → functions-wlvFaDkF.js} +246 -44
  188. package/app/dist/server/assets/{graph-qYOdoz2s.js → graph-DjANDk1P.js} +5 -5
  189. package/app/dist/server/assets/{grid-diff-jTvp-8wS.js → grid-diff-D5bQDKl2.js} +1 -1
  190. package/app/dist/server/assets/held-card-CCEypEau.js +75 -0
  191. package/app/dist/server/assets/{hosting-bbn9UvDc.js → hosting-Csr6AVC7.js} +321 -42
  192. package/app/dist/server/assets/{import-DIwvzHb6.js → import-CtPlwdIl.js} +12 -10
  193. package/app/dist/server/assets/{inbox-Dj-5FleF.js → inbox-9-WMgjdU.js} +2 -2
  194. package/app/dist/server/assets/{inbox-D6R6sWBB.js → inbox-BYKHV9Yh.js} +8 -8
  195. package/app/dist/server/assets/{input-D63gF3G2.js → input-CF-vX8Xp.js} +1 -1
  196. package/app/dist/server/assets/{item-BDSXoEr_.js → item-LBDNja5f.js} +1 -1
  197. package/app/dist/server/assets/{kit-D6EulwBe.js → kit-D5moAfcg.js} +57 -4
  198. package/app/dist/server/assets/markdown-B9odAiMy.js +116 -0
  199. package/app/dist/server/assets/{middleware-B8JRLyxx.js → middleware-C4Wn6uHO.js} +325 -285
  200. package/app/dist/server/assets/{native-select-DLa-He0n.js → native-select-etaMvR-i.js} +2 -9
  201. package/app/dist/server/assets/{people-CkU_AxrV.js → people-LpcYXtEq.js} +13 -12
  202. package/app/dist/server/assets/{permissions-BfMcQqQb.js → permissions-M0kzvVVm.js} +9 -8
  203. package/app/dist/server/assets/{permissions-grid-DWP9FAAS.js → permissions-grid-CwWWdcQA.js} +4 -4
  204. package/app/dist/server/assets/{button-f9Lc8qLl.js → queries-BDuQsTdU.js} +141 -59
  205. package/app/dist/server/assets/review-BFZCPdVZ.js +355 -0
  206. package/app/dist/server/assets/{route-CF_8jQYY.js → route-BJLQf4ik.js} +2 -2
  207. package/app/dist/server/assets/{route-BTT7nMJq.js → route-C3uFABee.js} +2 -2
  208. package/app/dist/server/assets/{router-BvYtxrVN.js → router-Dx7Gu0CN.js} +175 -147
  209. package/app/dist/server/assets/routes-iVrnGFaR.js +227 -0
  210. package/app/dist/server/assets/{runs-table-BBudn12Y.js → runs-table-g3QYggO3.js} +6 -6
  211. package/app/dist/server/assets/{scenario-BXGTSTiP.js → scenario-B5dGlEGF.js} +5 -5
  212. package/app/dist/server/assets/{separator-8MZ7vR3f.js → separator-Cf98V8ie.js} +1 -1
  213. package/app/dist/server/assets/{sheet-5Cyp-4UW.js → sheet-DTOG7OHQ.js} +2 -2
  214. package/app/dist/server/assets/sites.index-BNeYUQnQ.js +165 -0
  215. package/app/dist/server/assets/{spinner-C1ZW08lp.js → spinner-016IPVi-.js} +1 -1
  216. package/app/dist/server/assets/{start-CSU4irVK.js → start-CIKqNkKp.js} +2 -2
  217. package/app/dist/server/assets/{start-form-DI60UOrc.js → start-form-BXAi2lVm.js} +10 -9
  218. package/app/dist/server/assets/{table-DtPk_h_5.js → table-y-dGlLx6.js} +1 -1
  219. package/app/dist/server/assets/{textarea-f0Ip5ed1.js → textarea-B02joDnr.js} +1 -1
  220. package/app/dist/server/assets/utils-CHesvfjo.js +138 -0
  221. package/app/dist/server/assets/{who-are-you-ZGyMnpVi.js → who-are-you-CavnVMGe.js} +16 -10
  222. package/app/dist/server/assets/{workflow-Z99QWO42.js → workflow-BXhqp6S1.js} +5 -5
  223. package/app/dist/server/assets/{workflow-view-C8X8U11S.js → workflow-view-go1rbTSF.js} +14 -13
  224. package/app/dist/server/assets/{workflows-C0kJoGf1.js → workflows-BCcXZtN-.js} +14 -14
  225. package/app/dist/server/chat.d.ts +6 -1
  226. package/app/dist/server/chat.js +39 -20
  227. package/app/dist/server/chat.js.map +1 -1
  228. package/app/dist/server/core.d.ts +24 -9
  229. package/app/dist/server/core.js +58 -119
  230. package/app/dist/server/core.js.map +1 -1
  231. package/app/dist/server/go-live.d.ts +11 -2
  232. package/app/dist/server/go-live.js +27 -27
  233. package/app/dist/server/go-live.js.map +1 -1
  234. package/app/dist/server/server.js +68 -48
  235. package/app/dist/server/setup.js +1 -1
  236. package/app/dist/server/setup.js.map +1 -1
  237. package/app/dist/server/token-redeem.d.ts +8 -0
  238. package/app/dist/server/token-redeem.js +45 -0
  239. package/app/dist/server/token-redeem.js.map +1 -0
  240. package/app/dist/site-path.d.ts +15 -0
  241. package/app/dist/site-path.js +26 -0
  242. package/app/dist/site-path.js.map +1 -1
  243. package/app/dist/snapshot-build.js +1 -0
  244. package/app/dist/snapshot-build.js.map +1 -1
  245. package/app/dist/steps/agent/acp.d.ts +3 -97
  246. package/app/dist/steps/agent/acp.js +19 -49
  247. package/app/dist/steps/agent/acp.js.map +1 -1
  248. package/app/dist/steps/agent/checkout.d.ts +18 -1
  249. package/app/dist/steps/agent/checkout.js +17 -0
  250. package/app/dist/steps/agent/checkout.js.map +1 -1
  251. package/app/dist/steps/agent/harness.d.ts +2 -4
  252. package/app/dist/steps/agent/harness.js +45 -61
  253. package/app/dist/steps/agent/harness.js.map +1 -1
  254. package/app/dist/steps/agent/prompt.d.ts +1 -1
  255. package/app/dist/steps/agent/prompt.js +37 -16
  256. package/app/dist/steps/agent/prompt.js.map +1 -1
  257. package/app/dist/steps/agent/transcript.d.ts +10 -1
  258. package/app/dist/steps/agent/transcript.js +75 -2
  259. package/app/dist/steps/agent/transcript.js.map +1 -1
  260. package/app/dist/steps/agent/turn.d.ts +4 -6
  261. package/app/dist/steps/agent/turn.js +14 -16
  262. package/app/dist/steps/agent/turn.js.map +1 -1
  263. package/app/dist/steps/index.js +2 -2
  264. package/app/dist/steps/index.js.map +1 -1
  265. package/app/dist/steps/writes.d.ts +21 -7
  266. package/app/dist/steps/writes.js +100 -23
  267. package/app/dist/steps/writes.js.map +1 -1
  268. package/app/dist/stylesheet.json +1 -1
  269. package/app/src/api.ts +188 -4
  270. package/app/src/build.ts +177 -14
  271. package/app/src/bundle-build.ts +132 -63
  272. package/app/src/components/app-chrome.tsx +28 -13
  273. package/app/src/components/approval.tsx +1 -1
  274. package/app/src/components/common.tsx +18 -88
  275. package/app/src/components/data-grid.tsx +2 -1
  276. package/app/src/components/go-live-cloud.tsx +44 -0
  277. package/app/src/components/go-live.tsx +51 -13
  278. package/app/src/components/grid/columns.tsx +175 -53
  279. package/app/src/components/grid/grid.tsx +4 -2
  280. package/app/src/components/grid/plan.ts +153 -164
  281. package/app/src/components/grid/review.tsx +108 -118
  282. package/app/src/components/home.tsx +199 -0
  283. package/app/src/components/import/match.tsx +2 -1
  284. package/app/src/components/import/sheet.ts +2 -1
  285. package/app/src/components/kit.tsx +55 -1
  286. package/app/src/components/logo.tsx +25 -0
  287. package/app/src/components/record-form.tsx +12 -5
  288. package/app/src/components/shell/bar.tsx +35 -26
  289. package/app/src/components/shell/chat-parts.tsx +185 -126
  290. package/app/src/components/shell/chat-prompt.ts +6 -2
  291. package/app/src/components/shell/chat.tsx +154 -220
  292. package/app/src/components/shell/composer.tsx +140 -0
  293. package/app/src/components/shell/connect-agent.tsx +157 -0
  294. package/app/src/components/shell/draft-card.tsx +192 -45
  295. package/app/src/components/shell/engine-mark.tsx +9 -0
  296. package/app/src/components/shell/fence.tsx +25 -0
  297. package/app/src/components/shell/held-card.tsx +58 -0
  298. package/app/src/components/shell/markdown.tsx +152 -0
  299. package/app/src/components/shell/nav-user.tsx +11 -1
  300. package/app/src/components/shell/prefs.ts +12 -1
  301. package/app/src/components/shell/thread.tsx +174 -0
  302. package/app/src/components/store-move.tsx +2 -1
  303. package/app/src/components/ui/bubble.tsx +117 -0
  304. package/app/src/components/ui/code-block.tsx +235 -0
  305. package/app/src/components/ui/input-group.tsx +136 -0
  306. package/app/src/components/ui/marker.tsx +67 -0
  307. package/app/src/components/ui/message-scroller.tsx +117 -0
  308. package/app/src/components/ui/message.tsx +74 -0
  309. package/app/src/components/ui/radio-group.tsx +26 -0
  310. package/app/src/components/ui/trace.tsx +133 -0
  311. package/app/src/components/who-are-you.tsx +8 -3
  312. package/app/src/demo/api.ts +42 -0
  313. package/app/src/demo/client-rpc.ts +16 -0
  314. package/app/src/demo/demo.css +31 -0
  315. package/app/src/demo/mount.tsx +97 -0
  316. package/app/src/demo/root.tsx +31 -0
  317. package/app/src/demo/tailwind.css +4 -0
  318. package/app/src/demo-build.ts +525 -0
  319. package/app/src/env.d.ts +12 -0
  320. package/app/src/functions.ts +50 -7
  321. package/app/src/handler.ts +20 -14
  322. package/app/src/hooks/use-highlighted-code.ts +72 -0
  323. package/app/src/index.ts +55 -36
  324. package/app/src/lib/chat.ts +113 -23
  325. package/app/src/lib/cn-tables.ts +23 -23
  326. package/app/src/lib/company-state.ts +73 -0
  327. package/app/src/lib/highlighter.tsx +114 -0
  328. package/app/src/lib/names.ts +13 -2
  329. package/app/src/login/page.ts +1 -21
  330. package/app/src/login/staff.ts +3 -3
  331. package/app/src/queries.ts +121 -18
  332. package/app/src/routes/__root.tsx +24 -7
  333. package/app/src/routes/changes/$id.tsx +4 -3
  334. package/app/src/routes/connectors/index.tsx +1 -1
  335. package/app/src/routes/data/$name/import.tsx +2 -1
  336. package/app/src/routes/data/$name/index.tsx +1 -2
  337. package/app/src/routes/hosting/index.tsx +277 -60
  338. package/app/src/routes/index.tsx +15 -4
  339. package/app/src/routes/sites.index.tsx +41 -3
  340. package/app/src/routes/workflows/$name/runs/$id.tsx +3 -1
  341. package/app/src/server/chat.ts +41 -19
  342. package/app/src/server/columns.ts +44 -18
  343. package/app/src/server/company-state.ts +76 -0
  344. package/app/src/server/core.ts +72 -116
  345. package/app/src/server/go-live.ts +35 -27
  346. package/app/src/server/setup-progress.ts +28 -0
  347. package/app/src/server/setup.ts +1 -1
  348. package/app/src/server/token-redeem.ts +49 -0
  349. package/app/src/site-api.ts +10 -0
  350. package/app/src/site-path.ts +29 -0
  351. package/app/src/site.ts +1 -1
  352. package/app/src/snapshot-build.ts +1 -0
  353. package/app/src/steps/agent/acp.ts +10 -80
  354. package/app/src/steps/agent/checkout.ts +30 -0
  355. package/app/src/steps/agent/harness.ts +53 -78
  356. package/app/src/steps/agent/prompt.ts +45 -17
  357. package/app/src/steps/agent/transcript.ts +90 -3
  358. package/app/src/steps/agent/turn.ts +18 -16
  359. package/app/src/steps/index.ts +2 -2
  360. package/app/src/steps/writes.ts +121 -31
  361. package/app/src/worker/app.ts +17 -14
  362. package/dist/check.js +2 -2
  363. package/dist/check.js.map +1 -1
  364. package/dist/cli.js +81 -22
  365. package/dist/cli.js.map +1 -1
  366. package/dist/config.d.ts +8 -1
  367. package/dist/config.js +49 -8
  368. package/dist/config.js.map +1 -1
  369. package/dist/events.d.ts +15 -1
  370. package/dist/events.js +7 -0
  371. package/dist/events.js.map +1 -1
  372. package/dist/init.d.ts +27 -14
  373. package/dist/init.js +87 -39
  374. package/dist/init.js.map +1 -1
  375. package/dist/serve.d.ts +6 -2
  376. package/dist/serve.js +71 -9
  377. package/dist/serve.js.map +1 -1
  378. package/dist/source.d.ts +5 -0
  379. package/dist/source.js +113 -23
  380. package/dist/source.js.map +1 -1
  381. package/dist/worker-port.d.ts +16 -2
  382. package/dist/worker-port.js +44 -5
  383. package/dist/worker-port.js.map +1 -1
  384. package/invoices/README.md +66 -0
  385. package/invoices/dist/calculate.d.ts +37 -0
  386. package/invoices/dist/calculate.js +97 -0
  387. package/invoices/dist/calculate.js.map +1 -0
  388. package/invoices/dist/index.d.ts +4 -0
  389. package/invoices/dist/index.js +5 -0
  390. package/invoices/dist/index.js.map +1 -0
  391. package/invoices/dist/logo.d.ts +2 -0
  392. package/invoices/dist/logo.js +89 -0
  393. package/invoices/dist/logo.js.map +1 -0
  394. package/invoices/dist/pdf.d.ts +33 -0
  395. package/invoices/dist/pdf.js +215 -0
  396. package/invoices/dist/pdf.js.map +1 -0
  397. package/invoices/dist/schema.d.ts +156 -0
  398. package/invoices/dist/schema.js +88 -0
  399. package/invoices/dist/schema.js.map +1 -0
  400. package/oxlint.json +18 -0
  401. package/package.json +42 -7
  402. package/template/.env.example +15 -4
  403. package/template/AGENTS.md +10 -6
  404. package/template/package.json +6 -1
  405. package/template/policies/policy.cedar +5 -5
  406. package/template/resources/people.ts +5 -13
  407. package/template/resources/sanoma/infra.ts +8 -0
  408. package/template/sanoma.config.ts +18 -11
  409. package/template/scenarios/record-lead/record.feature +14 -0
  410. package/template/secrets.ts +13 -0
  411. package/template/tsconfig.json +1 -0
  412. package/template/workflows/record-lead.ts +30 -0
  413. package/testing/README.md +4 -4
  414. package/testing/dist/build.d.ts +3 -3
  415. package/testing/dist/build.js +4 -4
  416. package/testing/dist/build.js.map +1 -1
  417. package/testing/dist/host.d.ts +38 -21
  418. package/testing/dist/host.js +159 -77
  419. package/testing/dist/host.js.map +1 -1
  420. package/testing/dist/scenarios.d.ts +2 -1
  421. package/testing/dist/scenarios.js +14 -4
  422. package/testing/dist/scenarios.js.map +1 -1
  423. package/workflows/CLOUD-IDENTITY.md +15 -20
  424. package/workflows/README.md +54 -19
  425. package/workflows/dist/app-steps.js +8 -0
  426. package/workflows/dist/app-steps.js.map +1 -1
  427. package/workflows/dist/app-workflows.d.ts +172 -6
  428. package/workflows/dist/app-workflows.js +57 -9
  429. package/workflows/dist/app-workflows.js.map +1 -1
  430. package/workflows/dist/approvals.d.ts +3 -1
  431. package/workflows/dist/approvals.js +3 -1
  432. package/workflows/dist/approvals.js.map +1 -1
  433. package/workflows/dist/call.d.ts +8 -40
  434. package/workflows/dist/call.js +24 -135
  435. package/workflows/dist/call.js.map +1 -1
  436. package/workflows/dist/change-steps.d.ts +7 -0
  437. package/workflows/dist/change-steps.js +37 -13
  438. package/workflows/dist/change-steps.js.map +1 -1
  439. package/workflows/dist/change-workflow.d.ts +22 -10
  440. package/workflows/dist/change-workflow.js +30 -12
  441. package/workflows/dist/change-workflow.js.map +1 -1
  442. package/workflows/dist/change.d.ts +233 -7
  443. package/workflows/dist/change.js +27 -9
  444. package/workflows/dist/change.js.map +1 -1
  445. package/workflows/dist/client.d.ts +32 -5
  446. package/workflows/dist/client.js +94 -35
  447. package/workflows/dist/client.js.map +1 -1
  448. package/workflows/dist/cloud-identity.d.ts +5 -2
  449. package/workflows/dist/cloud-identity.js +7 -4
  450. package/workflows/dist/cloud-identity.js.map +1 -1
  451. package/workflows/dist/collection-driver.d.ts +20 -0
  452. package/workflows/dist/collection-driver.js +201 -0
  453. package/workflows/dist/collection-driver.js.map +1 -0
  454. package/workflows/dist/collection.d.ts +126 -14
  455. package/workflows/dist/collection.js +45 -168
  456. package/workflows/dist/collection.js.map +1 -1
  457. package/workflows/dist/company-file.d.ts +22 -0
  458. package/workflows/dist/company-file.js +82 -0
  459. package/workflows/dist/company-file.js.map +1 -0
  460. package/workflows/dist/config.d.ts +34 -6
  461. package/workflows/dist/config.js +58 -45
  462. package/workflows/dist/config.js.map +1 -1
  463. package/workflows/dist/ctx.d.ts +101 -0
  464. package/workflows/dist/ctx.js +171 -0
  465. package/workflows/dist/ctx.js.map +1 -0
  466. package/workflows/dist/db/company.d.ts +115 -1
  467. package/workflows/dist/db/company.js +14 -1
  468. package/workflows/dist/db/company.js.map +1 -1
  469. package/workflows/dist/db/dbos.d.ts +17 -0
  470. package/workflows/dist/db/dbos.js +2 -0
  471. package/workflows/dist/db/dbos.js.map +1 -1
  472. package/workflows/dist/db/identity.d.ts +2 -2
  473. package/workflows/dist/db/identity.js +2 -2
  474. package/workflows/dist/db/identity.js.map +1 -1
  475. package/workflows/dist/db.d.ts +1 -1
  476. package/workflows/dist/db.js +10 -6
  477. package/workflows/dist/db.js.map +1 -1
  478. package/workflows/dist/deadlines.d.ts +14 -8
  479. package/workflows/dist/deadlines.js +22 -11
  480. package/workflows/dist/deadlines.js.map +1 -1
  481. package/workflows/dist/define.d.ts +0 -8
  482. package/workflows/dist/define.js +1 -24
  483. package/workflows/dist/define.js.map +1 -1
  484. package/workflows/dist/describe.d.ts +1 -1
  485. package/workflows/dist/describe.js +18 -5
  486. package/workflows/dist/describe.js.map +1 -1
  487. package/workflows/dist/description.d.ts +408 -2
  488. package/workflows/dist/description.js +130 -5
  489. package/workflows/dist/description.js.map +1 -1
  490. package/workflows/dist/drift.d.ts +5 -2
  491. package/workflows/dist/drift.js +5 -3
  492. package/workflows/dist/drift.js.map +1 -1
  493. package/workflows/dist/errors.d.ts +11 -11
  494. package/workflows/dist/errors.js +17 -36
  495. package/workflows/dist/errors.js.map +1 -1
  496. package/workflows/dist/fake.d.ts +0 -26
  497. package/workflows/dist/fake.js +0 -123
  498. package/workflows/dist/fake.js.map +1 -1
  499. package/workflows/dist/fakes.d.ts +2 -0
  500. package/workflows/dist/fakes.js +5 -0
  501. package/workflows/dist/fakes.js.map +1 -0
  502. package/workflows/dist/givens.d.ts +51 -0
  503. package/workflows/dist/givens.js +89 -0
  504. package/workflows/dist/givens.js.map +1 -0
  505. package/workflows/dist/host.d.ts +8 -7
  506. package/workflows/dist/host.js +1 -1
  507. package/workflows/dist/host.js.map +1 -1
  508. package/workflows/dist/identity-provisioning.d.ts +2 -5
  509. package/workflows/dist/identity-provisioning.js +16 -20
  510. package/workflows/dist/identity-provisioning.js.map +1 -1
  511. package/workflows/dist/import.d.ts +2 -0
  512. package/workflows/dist/import.js +7 -6
  513. package/workflows/dist/import.js.map +1 -1
  514. package/workflows/dist/index.d.ts +8 -7
  515. package/workflows/dist/index.js +4 -3
  516. package/workflows/dist/index.js.map +1 -1
  517. package/workflows/dist/ledger.js +8 -17
  518. package/workflows/dist/ledger.js.map +1 -1
  519. package/workflows/dist/lint.d.ts +2 -2
  520. package/workflows/dist/lint.js +8 -4
  521. package/workflows/dist/lint.js.map +1 -1
  522. package/workflows/dist/load.js +1 -1
  523. package/workflows/dist/load.js.map +1 -1
  524. package/workflows/dist/log.d.ts +0 -2
  525. package/workflows/dist/log.js +0 -11
  526. package/workflows/dist/log.js.map +1 -1
  527. package/workflows/dist/op.d.ts +103 -3
  528. package/workflows/dist/op.js +56 -6
  529. package/workflows/dist/op.js.map +1 -1
  530. package/workflows/dist/page-run.d.ts +40 -0
  531. package/workflows/dist/page-run.js +317 -0
  532. package/workflows/dist/page-run.js.map +1 -0
  533. package/workflows/dist/paths.d.ts +0 -13
  534. package/workflows/dist/paths.js +2 -46
  535. package/workflows/dist/paths.js.map +1 -1
  536. package/workflows/dist/renewal.d.ts +1 -1
  537. package/workflows/dist/renewal.js +1 -1
  538. package/workflows/dist/run.d.ts +4 -1
  539. package/workflows/dist/run.js.map +1 -1
  540. package/workflows/dist/runtime-ops.d.ts +19 -4
  541. package/workflows/dist/runtime-ops.js +34 -5
  542. package/workflows/dist/runtime-ops.js.map +1 -1
  543. package/workflows/dist/sandbox-runner.cjs +4 -4
  544. package/workflows/dist/sandbox.d.ts +0 -20
  545. package/workflows/dist/sandbox.js +23 -85
  546. package/workflows/dist/sandbox.js.map +1 -1
  547. package/workflows/dist/scenario.d.ts +19 -1
  548. package/workflows/dist/scenario.js +82 -21
  549. package/workflows/dist/scenario.js.map +1 -1
  550. package/workflows/dist/schedules.d.ts +1 -1
  551. package/workflows/dist/schedules.js +1 -1
  552. package/workflows/dist/secret.d.ts +4 -5
  553. package/workflows/dist/secret.js +7 -6
  554. package/workflows/dist/secret.js.map +1 -1
  555. package/workflows/dist/shared.d.ts +84 -7
  556. package/workflows/dist/shared.js +255 -8
  557. package/workflows/dist/shared.js.map +1 -1
  558. package/workflows/dist/sites.d.ts +5 -0
  559. package/workflows/dist/sites.js +7 -0
  560. package/workflows/dist/sites.js.map +1 -1
  561. package/workflows/dist/source.d.ts +40 -1
  562. package/workflows/dist/source.js +3 -3
  563. package/workflows/dist/source.js.map +1 -1
  564. package/workflows/dist/supervisor.d.ts +21 -18
  565. package/workflows/dist/supervisor.js +20 -22
  566. package/workflows/dist/supervisor.js.map +1 -1
  567. package/workflows/dist/tokens.d.ts +34 -0
  568. package/workflows/dist/tokens.js +70 -9
  569. package/workflows/dist/tokens.js.map +1 -1
  570. package/workflows/dist/vendor-info.d.ts +12 -3
  571. package/workflows/dist/vendor-info.js +21 -5
  572. package/workflows/dist/vendor-info.js.map +1 -1
  573. package/workflows/dist/version.js +1 -1
  574. package/workflows/dist/version.js.map +1 -1
  575. package/workflows/dist/wakeup-driver.js +1 -1
  576. package/workflows/dist/wakeup-driver.js.map +1 -1
  577. package/workflows/dist/wakeup-fake.d.ts +27 -0
  578. package/workflows/dist/wakeup-fake.js +125 -0
  579. package/workflows/dist/wakeup-fake.js.map +1 -0
  580. package/workflows/dist/wakeup-service.js +8 -24
  581. package/workflows/dist/wakeup-service.js.map +1 -1
  582. package/workflows/dist/wakeup-type.js +1 -1
  583. package/workflows/dist/wakeup-type.js.map +1 -1
  584. package/workflows/dist/worker.d.ts +19 -1
  585. package/workflows/dist/worker.js +67 -49
  586. package/workflows/dist/worker.js.map +1 -1
  587. package/workflows/drizzle/company/0007_token_handoffs.sql +8 -0
  588. package/workflows/drizzle/company/meta/0007_snapshot.json +1281 -0
  589. package/workflows/drizzle/company/meta/_journal.json +7 -0
  590. package/workflows/src/app-steps.ts +11 -0
  591. package/workflows/src/app-workflows.ts +100 -10
  592. package/workflows/src/approvals.ts +4 -2
  593. package/workflows/src/call.ts +37 -186
  594. package/workflows/src/change-steps.ts +43 -14
  595. package/workflows/src/change-workflow.ts +45 -16
  596. package/workflows/src/change.ts +39 -10
  597. package/workflows/src/client.ts +137 -62
  598. package/workflows/src/cloud-identity.ts +7 -4
  599. package/workflows/src/collection-driver.ts +230 -0
  600. package/workflows/src/collection.ts +62 -186
  601. package/workflows/src/company-file.ts +82 -0
  602. package/workflows/src/config.ts +97 -56
  603. package/workflows/src/ctx.ts +266 -0
  604. package/workflows/src/db/company.ts +15 -1
  605. package/workflows/src/db/dbos.ts +2 -0
  606. package/workflows/src/db/identity.ts +2 -2
  607. package/workflows/src/db.ts +10 -6
  608. package/workflows/src/deadlines.ts +31 -17
  609. package/workflows/src/define.ts +1 -24
  610. package/workflows/src/describe.ts +27 -5
  611. package/workflows/src/description.ts +152 -5
  612. package/workflows/src/drift.ts +8 -4
  613. package/workflows/src/errors.ts +19 -45
  614. package/workflows/src/fake.ts +4 -139
  615. package/workflows/src/fakes.ts +4 -0
  616. package/workflows/src/givens.ts +141 -0
  617. package/workflows/src/host.ts +8 -7
  618. package/workflows/src/identity-provisioning.ts +19 -30
  619. package/workflows/src/import.ts +8 -6
  620. package/workflows/src/index.ts +13 -2
  621. package/workflows/src/ledger.ts +8 -16
  622. package/workflows/src/lint.ts +12 -6
  623. package/workflows/src/load.ts +1 -1
  624. package/workflows/src/log.ts +0 -11
  625. package/workflows/src/op.ts +147 -12
  626. package/workflows/src/page-run.ts +437 -0
  627. package/workflows/src/paths.ts +2 -46
  628. package/workflows/src/renewal.ts +1 -1
  629. package/workflows/src/run.ts +4 -1
  630. package/workflows/src/runtime-ops.ts +36 -6
  631. package/workflows/src/sandbox.ts +31 -109
  632. package/workflows/src/scenario.ts +102 -19
  633. package/workflows/src/schedules.ts +1 -1
  634. package/workflows/src/secret.ts +8 -7
  635. package/workflows/src/shared.ts +304 -10
  636. package/workflows/src/sites.ts +8 -0
  637. package/workflows/src/source.ts +31 -5
  638. package/workflows/src/supervisor.ts +40 -38
  639. package/workflows/src/tokens.ts +100 -9
  640. package/workflows/src/vendor-info.ts +21 -6
  641. package/workflows/src/version.ts +1 -1
  642. package/workflows/src/wakeup-driver.ts +1 -1
  643. package/workflows/src/wakeup-fake.ts +138 -0
  644. package/workflows/src/wakeup-service.ts +8 -24
  645. package/workflows/src/wakeup-type.ts +1 -1
  646. package/workflows/src/worker.ts +121 -58
  647. package/app/dist/client/assets/ArrowUp.es-DOgvoS0P.js +0 -1
  648. package/app/dist/client/assets/Copy.es-B0D5SwiQ.js +0 -1
  649. package/app/dist/client/assets/DialogTitle-BgjYK22C.js +0 -1
  650. package/app/dist/client/assets/FloppyDisk.es-DnuNe_a8.js +0 -1
  651. package/app/dist/client/assets/Globe.es-B6x2e4-a.js +0 -1
  652. package/app/dist/client/assets/MagnifyingGlass.es-DoNoHEhT.js +0 -1
  653. package/app/dist/client/assets/Play.es-BwXalGBh.js +0 -1
  654. package/app/dist/client/assets/Plug.es-CaZsN5P-.js +0 -1
  655. package/app/dist/client/assets/Plus.es-w9VPpTJB.js +0 -1
  656. package/app/dist/client/assets/Separator-BAhKFgSd.js +0 -1
  657. package/app/dist/client/assets/X.es-DKMYClf-.js +0 -1
  658. package/app/dist/client/assets/_id-BSRAaWtO.js +0 -1
  659. package/app/dist/client/assets/_id-BjDP-cPH.js +0 -1
  660. package/app/dist/client/assets/_id-BudM76zX.js +0 -1
  661. package/app/dist/client/assets/_id-C37U5bBa.js +0 -1
  662. package/app/dist/client/assets/_id-lmg24JVh.js +0 -2
  663. package/app/dist/client/assets/_name-CylqFo_t.js +0 -1
  664. package/app/dist/client/assets/_name-D8Gl8iwy.js +0 -4
  665. package/app/dist/client/assets/_name-DdPCU8pt.js +0 -1
  666. package/app/dist/client/assets/_name-TteWQXe0.js +0 -1
  667. package/app/dist/client/assets/_vendor-BLxW83yk.js +0 -1
  668. package/app/dist/client/assets/_vendor-Bq3uZU4-.js +0 -1
  669. package/app/dist/client/assets/app-chrome-H8uZ4dHI.js +0 -16
  670. package/app/dist/client/assets/app-scope-BeUW_8Qh.js +0 -1
  671. package/app/dist/client/assets/approval-DpgmTc63.js +0 -1
  672. package/app/dist/client/assets/apps-CoWzNm8M.js +0 -1
  673. package/app/dist/client/assets/change-glance-DbYcBT7H.js +0 -1
  674. package/app/dist/client/assets/changes-DIJvP7wQ.js +0 -1
  675. package/app/dist/client/assets/chat-button-BgpOfYh1.js +0 -1
  676. package/app/dist/client/assets/chat-prompt-hiawXcK0.js +0 -1
  677. package/app/dist/client/assets/common-Dw2i6XKZ.js +0 -3
  678. package/app/dist/client/assets/composite-D9GNDzFj.js +0 -1
  679. package/app/dist/client/assets/connect-CIq2KJTz.js +0 -1
  680. package/app/dist/client/assets/connections-iqd2XbWQ.js +0 -5
  681. package/app/dist/client/assets/connectors-rI8_D1n1.js +0 -1
  682. package/app/dist/client/assets/credentials-26vu6Fv5.js +0 -1
  683. package/app/dist/client/assets/data-sDMlKaLV.js +0 -1
  684. package/app/dist/client/assets/decidable-zcYI7bY8.js +0 -1
  685. package/app/dist/client/assets/declaration-form-BtSVvxhq.js +0 -1
  686. package/app/dist/client/assets/dialog-DskpUgkl.js +0 -1
  687. package/app/dist/client/assets/existing-BD3VgJ_8.js +0 -1
  688. package/app/dist/client/assets/graph-Prxl3c55.js +0 -7
  689. package/app/dist/client/assets/grid-diff-SMsvea6t.js +0 -1
  690. package/app/dist/client/assets/hosting-BBHUppH-.js +0 -1
  691. package/app/dist/client/assets/import-B92fd4Tl.js +0 -1
  692. package/app/dist/client/assets/inbox-57oGZtxE.js +0 -1
  693. package/app/dist/client/assets/inbox-B2AMNtk5.js +0 -1
  694. package/app/dist/client/assets/index-Bn3XeKy8.js +0 -10
  695. package/app/dist/client/assets/kit-BsK6VZTQ.js +0 -1
  696. package/app/dist/client/assets/lazyRouteComponent-Uri98HNq.js +0 -1
  697. package/app/dist/client/assets/motion-C8lNeYvK.js +0 -1
  698. package/app/dist/client/assets/people-ISOMYCTu.js +0 -1
  699. package/app/dist/client/assets/permissions-Cenat84K.js +0 -2
  700. package/app/dist/client/assets/permissions-grid-B2GtGwzv.js +0 -1
  701. package/app/dist/client/assets/route-BP1XwaTB.js +0 -1
  702. package/app/dist/client/assets/route-KVU6QgwJ.js +0 -1
  703. package/app/dist/client/assets/runs-table-35lNzKLn.js +0 -1
  704. package/app/dist/client/assets/scenario-DSwsavxS.js +0 -1
  705. package/app/dist/client/assets/scenario-graph-CAzWOtqV.js +0 -1
  706. package/app/dist/client/assets/separator-BlwkzEY0.js +0 -1
  707. package/app/dist/client/assets/site-icon-DZvOfBvU.js +0 -1
  708. package/app/dist/client/assets/sites.index-CcNo6N8u.js +0 -1
  709. package/app/dist/client/assets/spinner-BGy6LWIW.js +0 -1
  710. package/app/dist/client/assets/start-form-Bgo9I63s.js +0 -1
  711. package/app/dist/client/assets/store-BGu0d2Ld.js +0 -57
  712. package/app/dist/client/assets/style-CCDLLPgG.css +0 -2
  713. package/app/dist/client/assets/table-DjbI5VTn.js +0 -1
  714. package/app/dist/client/assets/textarea-DXO0eUdp.js +0 -1
  715. package/app/dist/client/assets/useLoaderData-BQd5yMlA.js +0 -1
  716. package/app/dist/client/assets/useOpenInteractionType-Bin8RjM5.js +0 -1
  717. package/app/dist/client/assets/useRegisterFieldControl-CQPTOU7Z.js +0 -1
  718. package/app/dist/client/assets/useValueChanged-DMkuvFZG.js +0 -1
  719. package/app/dist/client/assets/utils-CMsCvwYQ.js +0 -1
  720. package/app/dist/client/assets/who-are-you-Bt1WI3Cz.js +0 -1
  721. package/app/dist/client/assets/workflow-BJpO61A-.js +0 -1
  722. package/app/dist/client/assets/workflow-view-DP-UlRiH.js +0 -1
  723. package/app/dist/client/assets/workflows-BLCBgxbx.js +0 -1
  724. package/app/dist/server/assets/app-chrome-BYS81Vnx.js +0 -1410
  725. package/app/dist/server/assets/sites.index-1l0BtgVf.js +0 -138
  726. package/app/dist/server/assets/utils-wksS9pYh.js +0 -138
  727. package/template/scenarios/publish-post/publish.feature +0 -28
  728. package/template/workflows/publish-post.ts +0 -20
@@ -0,0 +1,164 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/highlighted-body-JLMTFACH-Co7ss_Ht.js","assets/engine-CBuzy-Ik.js","assets/fence-BdtS5gi0.js","assets/preload-helper-BLdHbfdN.js","assets/app-chrome-CFH47gLL.js","assets/queries-XJ-fmuYb.js","assets/react-dom-D6fTz1bt.js","assets/store-BT988jIX.js","assets/button-D5kdANef.js","assets/utils-BRvE9-Fo.js","assets/common-DZLdx_jS.js","assets/kit-BZcdh1Xm.js","assets/CatchBoundary-Cb__yx-s.js","assets/item-vV00RYfb.js","assets/composite-CoGyvQjv.js","assets/useLoaderData-BIegJC9y.js","assets/ArrowDown.es-BVRf--PS.js","assets/Separator-Cu9cQDBN.js","assets/DialogTitle-5oboyLiq.js","assets/useOpenInteractionType-UhakpAXY.js","assets/useValueChanged-DBqn456b.js","assets/Check.es-b7BdqO2s.js","assets/CaretDown.es-D12mWb2j.js","assets/spinner-XaRXIj9W.js","assets/index-CA_5CFb4.js","assets/lazyRouteComponent-C2a8bGcK.js","assets/Play.es-DGJ1CGhp.js","assets/useRegisterFieldControl-CT8iqvDE.js","assets/table-B81tv0LG.js","assets/chat-Bw3WhRE9.js","assets/CheckCircle.es-DKXiWmAT.js","assets/Plug.es-BPhGL8MK.js","assets/sheet-P-hJsTeq.js","assets/X.es-B7rq0E_-.js","assets/site-icon-1Mcc1UIb.js","assets/Globe.es-C1pgZCGM.js","assets/Plus.es-i3Vaa2WW.js","assets/chat-prompt-z0XJPDtH.js","assets/textarea-CRpYU-qx.js","assets/Copy.es-CvUujKw7.js","assets/changes-B6xxBiC0.js"])))=>i.map(i=>d[i]);
2
+ import{a as e,i as t,o as n,r,s as i,t as a}from"./engine-CBuzy-Ik.js";import{t as o}from"./react-dom-D6fTz1bt.js";import{t as s}from"./CatchBoundary-Cb__yx-s.js";import{t as c}from"./button-D5kdANef.js";import{t as l}from"./utils-BRvE9-Fo.js";import{t as u}from"./separator-Bdtc7rou.js";import{t as d}from"./preload-helper-BLdHbfdN.js";import{i as f,r as p,t as m}from"./table-B81tv0LG.js";import{i as h,n as g}from"./app-chrome-CFH47gLL.js";import{a as _,i as v,n as y,o as b,r as x,s as ee,t as S}from"./dialog-DDAfDsGh.js";var C=(function(e){if(e==null)return te;if(typeof e==`function`)return D(e);if(typeof e==`object`)return Array.isArray(e)?w(e):T(e);if(typeof e==`string`)return E(e);throw Error(`Expected function, string, or object as test`)});function w(e){let t=[],n=-1;for(;++n<e.length;)t[n]=C(e[n]);return D(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function T(e){let t=e;return D(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function E(e){return D(t);function t(t){return t&&t.type===e}}function D(e){return t;function t(t,n,r){return!!(ne(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function te(){return!0}function ne(e){return typeof e==`object`&&!!e&&`type`in e}function re(e){return e}var ie=[],O=`skip`;function ae(e,t,n,r){if(!e||typeof e!=`object`)throw Error("Unexpected value `"+e+"` for `tree`, expected node");let i=!0,a,o,s,c;if(typeof n==`function`||n&&typeof n==`object`?(a=t,o=n,r&&(i=!1)):(o=t,n&&(i=!1)),typeof o==`function`)s=o;else if(o&&typeof o==`object`){if(o.enter!==null&&o.enter!==void 0){if(typeof o.enter==`function`)s=o.enter;else throw Error("Unexpected value `"+o.enter+"` for `visitors.enter`, expected optional visitor")}if(typeof o.exit==`function`)c=o.exit;else throw Error("Unexpected value `"+o.exit+"` for `visitors.exit`, expected visitor (pass a visitor directly if you only want an enter visitor)")}else throw Error("Unexpected value `"+o+"` for `enter` or `visitors`, expected visitor or object with visitors");let l=C(a),u=i?1:-1;d(e,void 0,[])();function d(e,t,n){let r=e&&typeof e==`object`?e:{};if(typeof r.type==`string`){let t=typeof r.tagName==`string`?r.tagName:typeof r.name==`string`?r.name:void 0;Object.defineProperty(o,"name",{value:`node (`+re(e.type+(t?`<`+t+`>`:``))+`)`})}return o;function o(){let r=!a||l(e,t,n[n.length-1]||void 0),o=ie;if(s&&r&&(o=oe(s(e,n,t)),o[0]===!1))return o;if(`children`in e&&e.children){let t=e;if(t.children&&o[0]!==`skip`){let e=(i?-1:t.children.length)+u,r=[...n,t];for(;e>-1&&e<t.children.length;){let n=t.children[e],i=d(n,e,r)();if(i[0]===!1)return i;e=typeof i[1]==`number`?i[1]:e+u}}}if(c&&r){let r=oe(c(e,n,t));if(r[0]===`skip`)throw Error("Unexpected value `"+r[0]+"` from `exit`, expected `CONTINUE`, `EXIT`, index, or nothing");if(r[0]===!1||typeof r[1]==`number`)return r}return o}}}function oe(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?ie:[e]}function k(e,t,n,r){let i,a,o;typeof n==`function`||n&&typeof n==`object`?(i=t,a=n,o=r):(a=t,o=n),typeof a==`function`?ae(e,i,ce(a),o):ae(e,i,se(a),o)}function se(e){return!e||typeof e!=`object`?e:{enter:typeof e.enter==`function`?ce(e.enter):e.enter,exit:typeof e.exit==`function`?ce(e.exit):e.exit}}function ce(e){return t;function t(t,n,r){return e(t,r,n[n.length-1])}}var A=i(t(),1),le={indicator:`indicator`,textOnly:`text-only`,remove:`remove`};function ue({defaultOrigin:e=``,allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:a=`inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm`,blockedLinkClass:o=`text-gray-500`,linkBlockPolicy:s=le.indicator,imageBlockPolicy:c=le.indicator}){let l=t.length&&!t.every(e=>e===`*`),u=n.length&&!n.every(e=>e===`*`);if(!e&&(l||u))throw Error(`defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided`);return l=>{let u=xe(e,t,n,r,i,a,o,s,c);_e(l),k(l,u)}}function de(e,t){if(typeof e!=`string`)return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`))try{return new URL(e,`http://example.com`)}catch{return null}return null}}function fe(e){return typeof e==`string`?e.startsWith(`/`)||e.startsWith(`./`)||e.startsWith(`../`):!1}function pe(e){let t=e.pathname+e.search+e.hash;return e.pathname.startsWith(`//`)?`/.`+t:t}var me=new Set([`https:`,`http:`,`irc:`,`ircs:`,`mailto:`,`xmpp:`,`blob:`]),he=new Set([`javascript:`,`data:`,`file:`,`vbscript:`]);function ge(e,t,n,r=!1,i=!1,a=[]){if(!e)return null;if(typeof e==`string`&&e.startsWith(`#`)&&!i)try{if(new URL(e,`http://example.com`).hash===e)return e}catch{}if(typeof e==`string`&&e.startsWith(`data:`))return i&&r&&e.startsWith(`data:image/`)?e:null;if(typeof e==`string`&&e.startsWith(`blob:`)){try{if(new URL(e).protocol===`blob:`&&e.length>5){let t=e.substring(5);if(t&&t.length>0&&t!==`invalid`)return e}}catch{return null}return null}let o=de(e,n);if(!o||he.has(o.protocol)||!(me.has(o.protocol)||a.includes(o.protocol)||a.includes(`*`)))return null;if(o.protocol===`mailto:`||!o.protocol.match(/^https?:$/))return o.href;let s=fe(e);return o&&t.some(e=>{let t=de(e,n);return!t||t.origin!==o.origin?!1:o.href.startsWith(t.href)})?s?pe(o):o.href:t.includes(`*`)?o.protocol!==`https:`&&o.protocol!==`http:`?null:s?pe(o):o.href:null}function _e(e){if(`children`in e&&Array.isArray(e.children)){e.children=e.children.filter(e=>e!=null);for(let t of e.children)_e(t)}}var ve=Symbol(`node-seen`);function ye(e,t,n){return t===le.remove?{type:`remove`}:t===le.textOnly?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[...e.children]}}:{type:`replace`,element:{type:`element`,tagName:`span`,properties:{title:`Blocked URL: `+String(e.properties.href),class:n},children:[...e.children,{type:`text`,value:` [blocked]`}]}}}function be(e,t,n){if(t===le.remove)return{type:`remove`};if(t===le.textOnly){let t=String(e.properties.alt||``);return t?{type:`replace`,element:{type:`element`,tagName:`span`,properties:{},children:[{type:`text`,value:t}]}}:{type:`remove`}}return{type:`replace`,element:{type:`element`,tagName:`span`,properties:{class:n},children:[{type:`text`,value:`[Image blocked: `+String(e.properties.alt||`No description`)+`]`}]}}}var xe=(e,t,n,r,i,a,o,s,c)=>{let l=(u,d,f)=>{if(u.type!==`element`||u[ve])return!0;if(u.tagName===`a`){let n=ge(u.properties.href,t,e,!1,!1,i);if(n===null){if(u[ve]=!0,k(u,l),f&&typeof d==`number`){let e=ye(u,s,o);if(e.type===`remove`)return f.children.splice(d,1),[O,d];f.children[d]=e.element}return O}return u.properties.href=n,u.properties.target=`_blank`,u.properties.rel=`noopener noreferrer`,!0}if(u.tagName===`img`){let t=ge(u.properties.src,n,e,r,!0,i);if(t===null){if(u[ve]=!0,k(u,l),f&&typeof d==`number`){let e=be(u,c,a);if(e.type===`remove`)return f.children.splice(d,1),[O,d];f.children[d]=e.element}return O}return u.properties.src=t,!0}return!0};return l},{defineProperty:Se}=Object,Ce=typeof self==`object`?self:globalThis,we=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Ce[e](t)},Te=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o){let i=r(t),a=r(n);i===`__proto__`?Se(e,i,{value:a,configurable:!0,enumerable:!0,writable:!0}):e[i]=a}return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof Ce[e]==`function`?we(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}case`-0`:return-0}return n(we(a,o),i)};return r},Ee=e=>Te(new Map,e)(0),De=``,{toString:Oe}={},{keys:ke,is:Ae}=Object,je=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Oe.call(e).slice(8,-1);switch(n){case`Array`:return[1,De];case`Object`:return[2,De];case`Date`:return[3,De];case`RegExp`:return[4,De];case`Map`:return[5,De];case`Set`:return[6,De];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},Me=([e,t])=>e===0&&(t===`function`||t===`symbol`),Ne=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=o=>{if(n.has(o))return n.get(o);let[s,c]=je(o);switch(s){case 0:{let t=o;switch(c){case`bigint`:s=8,t=o.toString();break;case`number`:if(!o&&Ae(o,-0))return r.push([`-0`])-1;break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+c);t=null;break;case`undefined`:return i([-1],o)}return i([s,t],o)}case 1:{if(c){let e=o;return c===`DataView`?e=new Uint8Array(o.buffer):c===`ArrayBuffer`&&(e=new Uint8Array(o)),i([c,[...e]],o)}let e=[],t=i([s,e],o);for(let t of o)e.push(a(t));return t}case 2:{if(c)switch(c){case`BigInt`:return i([c,o.toString()],o);case`Boolean`:case`Number`:case`String`:return i([c,o.valueOf()],o)}if(t&&`toJSON`in o)return a(o.toJSON());let n=[],r=i([s,n],o);for(let t of ke(o))(e||!Me(je(o[t])))&&n.push([a(t),a(o[t])]);return r}case 3:return i([s,isNaN(o.getTime())?De:o.toISOString()],o);case 4:{let{source:e,flags:t}=o;return i([s,{source:e,flags:t}],o)}case 5:{let t=[],n=i([s,t],o);for(let[n,r]of o)(e||!(Me(je(n))||Me(je(r))))&&t.push([a(n),a(r)]);return n}case 6:{let t=[],n=i([s,t],o);for(let n of o)(e||!Me(je(n)))&&t.push(a(n));return n}}let{message:l}=o;return i([s,{name:c,message:l}],o)};return a},Pe=(e,{json:t,lossy:n}={})=>{let r=[];return Ne(!(t||n),!!t,new Map,r)(e),r},Fe=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Ee(Pe(e,t)):structuredClone(e):(e,t)=>Ee(Pe(e,t)),Ie=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Ie.prototype.normal={},Ie.prototype.property={},Ie.prototype.space=void 0;function Le(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Ie(n,r,t)}function Re(e){return e.toLowerCase()}var ze=class{constructor(e,t){this.attribute=t,this.property=e}};ze.prototype.attribute=``,ze.prototype.booleanish=!1,ze.prototype.boolean=!1,ze.prototype.commaOrSpaceSeparated=!1,ze.prototype.commaSeparated=!1,ze.prototype.defined=!1,ze.prototype.mustUseProperty=!1,ze.prototype.number=!1,ze.prototype.overloadedBoolean=!1,ze.prototype.property=``,ze.prototype.spaceSeparated=!1,ze.prototype.space=void 0;var Be=n({boolean:()=>j,booleanish:()=>He,commaOrSpaceSeparated:()=>Ge,commaSeparated:()=>We,number:()=>M,overloadedBoolean:()=>Ue,spaceSeparated:()=>N}),Ve=0,j=Ke(),He=Ke(),Ue=Ke(),M=Ke(),N=Ke(),We=Ke(),Ge=Ke();function Ke(){return 2**++Ve}var qe=Object.keys(Be),Je=class extends ze{constructor(e,t,n,r){let i=-1;if(super(e,t),Ye(this,`space`,r),typeof n==`number`)for(;++i<qe.length;){let e=qe[i];Ye(this,qe[i],(n&Be[e])===Be[e])}}};Je.prototype.defined=!0;function Ye(e,t,n){n&&(e[t]=n)}function Xe(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Je(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Re(r)]=r,n[Re(a.attribute)]=r}return new Ie(t,n,e.space)}var Ze=Xe({properties:{ariaActiveDescendant:null,ariaAtomic:He,ariaAutoComplete:null,ariaBusy:He,ariaChecked:He,ariaColCount:M,ariaColIndex:M,ariaColSpan:M,ariaControls:N,ariaCurrent:null,ariaDescribedBy:N,ariaDetails:null,ariaDisabled:He,ariaDropEffect:N,ariaErrorMessage:null,ariaExpanded:He,ariaFlowTo:N,ariaGrabbed:He,ariaHasPopup:null,ariaHidden:He,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:N,ariaLevel:M,ariaLive:null,ariaModal:He,ariaMultiLine:He,ariaMultiSelectable:He,ariaOrientation:null,ariaOwns:N,ariaPlaceholder:null,ariaPosInSet:M,ariaPressed:He,ariaReadOnly:He,ariaRelevant:null,ariaRequired:He,ariaRoleDescription:N,ariaRowCount:M,ariaRowIndex:M,ariaRowSpan:M,ariaSelected:He,ariaSetSize:M,ariaSort:null,ariaValueMax:M,ariaValueMin:M,ariaValueNow:M,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Qe(e,t){return t in e?e[t]:t}function $e(e,t){return Qe(e,t.toLowerCase())}var et=Xe({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:We,acceptCharset:N,accessKey:N,action:null,allow:null,allowFullScreen:j,allowPaymentRequest:j,allowUserMedia:j,alpha:j,alt:null,as:null,async:j,autoCapitalize:null,autoComplete:N,autoFocus:j,autoPlay:j,blocking:N,capture:null,charSet:null,checked:j,cite:null,className:N,closedBy:null,colorSpace:null,cols:M,colSpan:M,command:null,commandFor:null,content:null,contentEditable:He,controls:j,controlsList:N,coords:M|We,crossOrigin:null,data:null,dateTime:null,decoding:null,default:j,defer:j,dir:null,dirName:null,disabled:j,download:Ue,draggable:He,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:j,formTarget:null,headers:N,height:M,hidden:Ue,high:M,href:null,hrefLang:null,htmlFor:N,httpEquiv:N,id:null,imageSizes:null,imageSrcSet:null,inert:j,inputMode:null,integrity:null,is:null,isMap:j,itemId:null,itemProp:N,itemRef:N,itemScope:j,itemType:N,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:j,low:M,manifest:null,max:null,maxLength:M,media:null,method:null,min:null,minLength:M,multiple:j,muted:j,name:null,nonce:null,noModule:j,noValidate:j,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:j,optimum:M,pattern:null,ping:N,placeholder:null,playsInline:j,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:j,referrerPolicy:null,rel:N,required:j,reversed:j,rows:M,rowSpan:M,sandbox:N,scope:null,scoped:j,seamless:j,selected:j,shadowRootClonable:j,shadowRootCustomElementRegistry:j,shadowRootDelegatesFocus:j,shadowRootMode:null,shadowRootSerializable:j,shape:null,size:M,sizes:null,slot:null,span:M,spellCheck:He,src:null,srcDoc:null,srcLang:null,srcSet:null,start:M,step:null,style:null,tabIndex:M,target:null,title:null,translate:null,type:null,typeMustMatch:j,useMap:null,value:He,width:M,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:N,axis:null,background:null,bgColor:null,border:M,borderColor:null,bottomMargin:M,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:j,declare:j,event:null,face:null,frame:null,frameBorder:null,hSpace:M,leftMargin:M,link:null,longDesc:null,lowSrc:null,marginHeight:M,marginWidth:M,noResize:j,noHref:j,noShade:j,noWrap:j,object:null,profile:null,prompt:null,rev:null,rightMargin:M,rules:null,scheme:null,scrolling:He,standby:null,summary:null,text:null,topMargin:M,valueType:null,version:null,vAlign:null,vLink:null,vSpace:M,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:j,disablePictureInPicture:j,disableRemotePlayback:j,exportParts:We,part:N,prefix:null,property:null,results:M,security:null,unselectable:null},space:`html`,transform:$e}),tt=Xe({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:Ge,accentHeight:M,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:M,amplitude:M,arabicForm:null,ascent:M,attributeName:null,attributeType:null,azimuth:M,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:M,by:null,calcMode:null,capHeight:M,className:N,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:M,diffuseConstant:M,direction:null,display:null,dur:null,divisor:M,dominantBaseline:null,download:j,dx:null,dy:null,edgeMode:null,editable:null,elevation:M,enableBackground:null,end:null,event:null,exponent:M,externalResourcesRequired:null,fill:null,fillOpacity:M,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:We,g2:We,glyphName:We,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:M,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:M,horizOriginX:M,horizOriginY:M,id:null,ideographic:M,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:M,k:M,k1:M,k2:M,k3:M,k4:M,kernelMatrix:Ge,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:M,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:M,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:M,overlineThickness:M,paintOrder:null,panose1:null,path:null,pathLength:M,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:N,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:M,pointsAtY:M,pointsAtZ:M,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ge,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ge,rev:Ge,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ge,requiredFeatures:Ge,requiredFonts:Ge,requiredFormats:Ge,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:M,specularExponent:M,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:M,strikethroughThickness:M,string:null,stroke:null,strokeDashArray:Ge,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:M,strokeOpacity:M,strokeWidth:null,style:null,surfaceScale:M,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ge,tabIndex:M,tableValues:null,target:null,targetX:M,targetY:M,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ge,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:M,underlineThickness:M,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:M,values:null,vAlphabetic:M,vMathematical:M,vectorEffect:null,vHanging:M,vIdeographic:M,version:null,vertAdvY:M,vertOriginX:M,vertOriginY:M,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:M,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Qe}),nt=Xe({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),rt=Xe({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:$e}),it=Xe({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),at={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},ot=/[A-Z]/g,st=/-[a-z]/g,ct=/^data[-\w.:]+$/i;function lt(e,t){let n=Re(t),r=t,i=ze;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&ct.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(st,dt);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!st.test(e)){let n=e.replace(ot,ut);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Je}return new i(r,t)}function ut(e){return`-`+e.toLowerCase()}function dt(e){return e.charAt(1).toUpperCase()}var ft=Le([Ze,et,nt,rt,it],`html`),pt=Le([Ze,tt,nt,rt,it],`svg`);function mt(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function ht(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var gt=/[#.]/g;function _t(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){gt.lastIndex=i;let e=gt.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function vt(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function yt(e){return e.join(` `).trim()}function bt(e,t,n){let r=n?Et(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=_t(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,xt(i))a.unshift(i);else for(let[t,n]of Object.entries(i))St(e,o.properties,t,n)}for(let e of a)Ct(o.children,e);return o.type===`element`&&o.tagName===`template`&&e.space===`html`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function xt(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function St(e,t,n,r){if(r==null)return;let i=lt(e,n),a;if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?vt(r):i.commaSeparated?mt(r):i.commaOrSpaceSeparated?vt(mt(r).join(` `)):wt(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Tt(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(wt(i,i.property,t));a=e}if(i.property===`className`&&Array.isArray(t.className)){let e=a;a=[...t.className,...Array.isArray(e)?e:[e]]}t[i.property]=a}function Ct(e,t){if(t!=null){if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)Ct(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Ct(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}}function wt(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||Re(n)===Re(t)))return!0}return n}function Tt(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Et(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Dt=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),Ot=bt(ft,`div`),kt=bt(pt,`g`,Dt);function At(e){let t=String(e),n=[],r=-1,i=-1;return{toOffset:s,toPoint:o};function a(){let e=n.at(-1)??0;r<e&&(r=t.indexOf(`\r`,e),r===-1&&(r=1/0)),i<e&&(i=t.indexOf(`
3
+ `,e),i===-1&&(i=1/0));let a=r+1===i?i:Math.min(r,i);n.push((a===1/0?t.length:a)+1)}function o(e){if(typeof e==`number`&&e>-1&&e<=t.length){for(;(n.at(-1)??0)<=e;)a();let t=0,r=n.length-1;for(;t<r;){let i=Math.floor((t+r)/2);n[i]>e?r=i:t=i+1}return{line:t+1,column:e-(t>0?n[t-1]:0)+1,offset:e}}}function s(e){if(e&&typeof e.line==`number`&&typeof e.column==`number`&&!Number.isNaN(e.line)&&e.column>0){for(;n.length<e.line&&(n.at(-1)??0)<=t.length;)a();let r=(e.line>1?n[e.line-2]:0)+e.column-1;if(r<n[e.line-1])return r}}}var jt={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`},Mt={}.hasOwnProperty,Nt=Object.prototype;function Pt(e,t){let n=t||{};return Ft({file:n.file||void 0,location:!1,schema:n.space===`svg`?pt:ft,verbose:n.verbose||!1},e)}function Ft(e,t){let n;switch(t.nodeName){case`#comment`:{let r=t;return n={type:`comment`,value:r.data},Rt(e,r,n),n}case`#document`:case`#document-fragment`:{let r=t,i=`mode`in r?r.mode===`quirks`||r.mode===`limited-quirks`:!1;if(n={type:`root`,children:It(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){let t=String(e.file),r=At(t),i=r.toPoint(0),a=r.toPoint(t.length);n.position={start:i,end:a}}return n}case`#documentType`:{let r=t;return n={type:`doctype`},Rt(e,r,n),n}case`#text`:{let r=t;return n={type:`text`,value:r.value},Rt(e,r,n),n}default:return n=Lt(e,t),n}}function It(e,t){let n=-1,r=[];for(;++n<t.length;){let i=Ft(e,t[n]);r.push(i)}return r}function Lt(e,t){let{schema:n}=e;e.schema=t.namespaceURI===jt.svg?pt:ft;let r=-1,i={};for(;++r<t.attrs.length;){let e=t.attrs[r],n=(e.prefix?e.prefix+`:`:``)+e.name;Mt.call(Nt,n)||(i[n]=e.value)}let a=(e.schema.space===`svg`?kt:Ot)(t.tagName,i,It(e,t.childNodes));if(Rt(e,t,a),a.tagName===`template`){if(t.namespaceURI===jt.html){let n=t,r=n.sourceCodeLocation,i=r&&r.startTag&&Bt(r.startTag),o=r&&r.endTag&&Bt(r.endTag),s=Ft(e,n.content);i&&o&&e.file&&(s.position={start:i.end,end:o.start}),a.content=s}else a.content&&(a.children=a.content.children,delete a.content)}return e.schema=n,a}function Rt(e,t,n){if(`sourceCodeLocation`in t&&t.sourceCodeLocation&&e.file){let r=zt(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function zt(e,t,n){let r=Bt(n);if(t.type===`element`){let i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){let r={},i;if(n.attrs)for(i in n.attrs)Mt.call(n.attrs,i)&&(r[lt(e.schema,i).property]=Bt(n.attrs[i]));n.startTag;let a=Bt(n.startTag),o=n.endTag?Bt(n.endTag):void 0,s={opening:a};o&&(s.closing=o),s.properties=r,t.data={position:s}}}return r}function Bt(e){let t=Vt({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Vt({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Vt(e){return e.line&&e.column?e:void 0}var Ht={}.hasOwnProperty;function Ut(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Ht.call(t,e)){let n=String(t[e]);i=Ht.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Wt={},Gt={}.hasOwnProperty,Kt=Ut(`type`,{handlers:{root:Jt,element:$t,text:Zt,comment:Qt,doctype:Xt}});function qt(e,t){let n=(t||Wt).space;return Kt(e,n===`svg`?pt:ft)}function Jt(e,t){let n={nodeName:`#document`,mode:(e.data||{}).quirksMode?`quirks`:`no-quirks`,childNodes:[]};return n.childNodes=tn(e.children,n,t),nn(e,n),n}function Yt(e,t){let n={nodeName:`#document-fragment`,childNodes:[]};return n.childNodes=tn(e.children,n,t),nn(e,n),n}function Xt(e){let t={nodeName:`#documentType`,name:`html`,publicId:``,systemId:``,parentNode:null};return nn(e,t),t}function Zt(e){let t={nodeName:`#text`,value:e.value,parentNode:null};return nn(e,t),t}function Qt(e){let t={nodeName:`#comment`,data:e.value,parentNode:null};return nn(e,t),t}function $t(e,t){let n=t,r=n;e.type===`element`&&e.tagName.toLowerCase()===`svg`&&n.space===`html`&&(r=pt);let i=[],a;if(e.properties){for(a in e.properties)if(a!==`children`&&Gt.call(e.properties,a)){let t=en(r,a,e.properties[a]);t&&i.push(t)}}let o=r.space,s={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:jt[o],childNodes:[],parentNode:null};return s.childNodes=tn(e.children,s,r),nn(e,s),e.tagName===`template`&&e.content&&(s.content=Yt(e.content,r)),s}function en(e,t,n){let r=lt(e,t);if(n===!1||n==null||typeof n==`number`&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?ht(n):yt(n));let i={name:r.attribute,value:n===!0?``:String(n)};if(r.space&&r.space!==`html`&&r.space!==`svg`){let e=i.name.indexOf(`:`);e<0?i.prefix=``:(i.name=i.name.slice(e+1),i.prefix=r.attribute.slice(0,e)),i.namespace=jt[r.space]}return i}function tn(e,t,n){let r=-1,i=[];if(e)for(;++r<e.length;){let a=Kt(e[r],n);a.parentNode=t,i.push(a)}return i}function nn(e,t){let n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}var rn=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],an=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),P;(function(e){e[e.EOF=-1]=`EOF`,e[e.NULL=0]=`NULL`,e[e.TABULATION=9]=`TABULATION`,e[e.CARRIAGE_RETURN=13]=`CARRIAGE_RETURN`,e[e.LINE_FEED=10]=`LINE_FEED`,e[e.FORM_FEED=12]=`FORM_FEED`,e[e.SPACE=32]=`SPACE`,e[e.EXCLAMATION_MARK=33]=`EXCLAMATION_MARK`,e[e.QUOTATION_MARK=34]=`QUOTATION_MARK`,e[e.AMPERSAND=38]=`AMPERSAND`,e[e.APOSTROPHE=39]=`APOSTROPHE`,e[e.HYPHEN_MINUS=45]=`HYPHEN_MINUS`,e[e.SOLIDUS=47]=`SOLIDUS`,e[e.DIGIT_0=48]=`DIGIT_0`,e[e.DIGIT_9=57]=`DIGIT_9`,e[e.SEMICOLON=59]=`SEMICOLON`,e[e.LESS_THAN_SIGN=60]=`LESS_THAN_SIGN`,e[e.EQUALS_SIGN=61]=`EQUALS_SIGN`,e[e.GREATER_THAN_SIGN=62]=`GREATER_THAN_SIGN`,e[e.QUESTION_MARK=63]=`QUESTION_MARK`,e[e.LATIN_CAPITAL_A=65]=`LATIN_CAPITAL_A`,e[e.LATIN_CAPITAL_Z=90]=`LATIN_CAPITAL_Z`,e[e.RIGHT_SQUARE_BRACKET=93]=`RIGHT_SQUARE_BRACKET`,e[e.GRAVE_ACCENT=96]=`GRAVE_ACCENT`,e[e.LATIN_SMALL_A=97]=`LATIN_SMALL_A`,e[e.LATIN_SMALL_Z=122]=`LATIN_SMALL_Z`})(P||={});var on={DASH_DASH:`--`,CDATA_START:`[CDATA[`,DOCTYPE:`doctype`,SCRIPT:`script`,PUBLIC:`public`,SYSTEM:`system`};function sn(e){return e>=55296&&e<=57343}function cn(e){return e>=56320&&e<=57343}function ln(e,t){return(e-55296)*1024+9216+t}function un(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function dn(e){return e>=64976&&e<=65007||an.has(e)}var F;(function(e){e.controlCharacterInInputStream=`control-character-in-input-stream`,e.noncharacterInInputStream=`noncharacter-in-input-stream`,e.surrogateInInputStream=`surrogate-in-input-stream`,e.nonVoidHtmlElementStartTagWithTrailingSolidus=`non-void-html-element-start-tag-with-trailing-solidus`,e.endTagWithAttributes=`end-tag-with-attributes`,e.endTagWithTrailingSolidus=`end-tag-with-trailing-solidus`,e.unexpectedSolidusInTag=`unexpected-solidus-in-tag`,e.unexpectedNullCharacter=`unexpected-null-character`,e.unexpectedQuestionMarkInsteadOfTagName=`unexpected-question-mark-instead-of-tag-name`,e.invalidFirstCharacterOfTagName=`invalid-first-character-of-tag-name`,e.unexpectedEqualsSignBeforeAttributeName=`unexpected-equals-sign-before-attribute-name`,e.missingEndTagName=`missing-end-tag-name`,e.unexpectedCharacterInAttributeName=`unexpected-character-in-attribute-name`,e.unknownNamedCharacterReference=`unknown-named-character-reference`,e.missingSemicolonAfterCharacterReference=`missing-semicolon-after-character-reference`,e.unexpectedCharacterAfterDoctypeSystemIdentifier=`unexpected-character-after-doctype-system-identifier`,e.unexpectedCharacterInUnquotedAttributeValue=`unexpected-character-in-unquoted-attribute-value`,e.eofBeforeTagName=`eof-before-tag-name`,e.eofInTag=`eof-in-tag`,e.missingAttributeValue=`missing-attribute-value`,e.missingWhitespaceBetweenAttributes=`missing-whitespace-between-attributes`,e.missingWhitespaceAfterDoctypePublicKeyword=`missing-whitespace-after-doctype-public-keyword`,e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers=`missing-whitespace-between-doctype-public-and-system-identifiers`,e.missingWhitespaceAfterDoctypeSystemKeyword=`missing-whitespace-after-doctype-system-keyword`,e.missingQuoteBeforeDoctypePublicIdentifier=`missing-quote-before-doctype-public-identifier`,e.missingQuoteBeforeDoctypeSystemIdentifier=`missing-quote-before-doctype-system-identifier`,e.missingDoctypePublicIdentifier=`missing-doctype-public-identifier`,e.missingDoctypeSystemIdentifier=`missing-doctype-system-identifier`,e.abruptDoctypePublicIdentifier=`abrupt-doctype-public-identifier`,e.abruptDoctypeSystemIdentifier=`abrupt-doctype-system-identifier`,e.cdataInHtmlContent=`cdata-in-html-content`,e.incorrectlyOpenedComment=`incorrectly-opened-comment`,e.eofInScriptHtmlCommentLikeText=`eof-in-script-html-comment-like-text`,e.eofInDoctype=`eof-in-doctype`,e.nestedComment=`nested-comment`,e.abruptClosingOfEmptyComment=`abrupt-closing-of-empty-comment`,e.eofInComment=`eof-in-comment`,e.incorrectlyClosedComment=`incorrectly-closed-comment`,e.eofInCdata=`eof-in-cdata`,e.absenceOfDigitsInNumericCharacterReference=`absence-of-digits-in-numeric-character-reference`,e.nullCharacterReference=`null-character-reference`,e.surrogateCharacterReference=`surrogate-character-reference`,e.characterReferenceOutsideUnicodeRange=`character-reference-outside-unicode-range`,e.controlCharacterReference=`control-character-reference`,e.noncharacterCharacterReference=`noncharacter-character-reference`,e.missingWhitespaceBeforeDoctypeName=`missing-whitespace-before-doctype-name`,e.missingDoctypeName=`missing-doctype-name`,e.invalidCharacterSequenceAfterDoctypeName=`invalid-character-sequence-after-doctype-name`,e.duplicateAttribute=`duplicate-attribute`,e.nonConformingDoctype=`non-conforming-doctype`,e.missingDoctype=`missing-doctype`,e.misplacedDoctype=`misplaced-doctype`,e.endTagWithoutMatchingOpenElement=`end-tag-without-matching-open-element`,e.closingOfElementWithOpenChildElements=`closing-of-element-with-open-child-elements`,e.disallowedContentInNoscriptInHead=`disallowed-content-in-noscript-in-head`,e.openElementsLeftAfterEof=`open-elements-left-after-eof`,e.abandonedHeadElementChild=`abandoned-head-element-child`,e.misplacedStartTagForHeadElement=`misplaced-start-tag-for-head-element`,e.nestedNoscriptInHead=`nested-noscript-in-head`,e.eofInElementThatCanContainOnlyText=`eof-in-element-that-can-contain-only-text`})(F||={});var fn=65536,pn=class{constructor(e){this.handler=e,this.html=``,this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=fn,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}get codePointStart(){return this.pos-Number(this.lastGapPos===this.pos)}get offset(){return this.droppedBufferSize+this.codePointStart}getError(e,t){let{line:n,col:r,offset:i}=this,a=r+t,o=i+t;return{code:e,startLine:n,endLine:n,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(e){if(this.pos!==this.html.length-1){let t=this.html.charCodeAt(this.pos+1);if(!cn(e)&&cn(t))return this.pos++,this._addGap(),ln(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(F.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(e=0){if(this.willDropParsedChunk()){let t=this.offset-this.droppedBufferSize-e;this.html=this.html.substring(t),this.lineStartPos-=t,this.droppedBufferSize+=t,this.pos-=t,this.lastGapPos=-2,this.gapStack.length=0,this.pos>e&&this._addGap()}}write(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t<e.length;t++)if((this.html.charCodeAt(this.pos+t)|32)!==e.charCodeAt(t))return!1;return!0}peek(e){let t=this.pos+e;if(t>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;let n=this.html.charCodeAt(t);return n===P.CARRIAGE_RETURN?P.LINE_FEED:n}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;let e=this.html.charCodeAt(this.pos);return e===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):e===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,sn(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===P.LINE_FEED||e===P.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){un(e)?this._err(F.controlCharacterInInputStream):dn(e)&&this._err(F.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}},I;(function(e){e[e.CHARACTER=0]=`CHARACTER`,e[e.NULL_CHARACTER=1]=`NULL_CHARACTER`,e[e.WHITESPACE_CHARACTER=2]=`WHITESPACE_CHARACTER`,e[e.START_TAG=3]=`START_TAG`,e[e.END_TAG=4]=`END_TAG`,e[e.COMMENT=5]=`COMMENT`,e[e.DOCTYPE=6]=`DOCTYPE`,e[e.EOF=7]=`EOF`,e[e.HIBERNATION=8]=`HIBERNATION`})(I||={});function mn(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}var hn=[8364,0,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,0,381,0,0,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,0,382,376];function gn(e){return e===0||e>=55296&&e<=57343||e>1114111}function _n(e){return gn(e)?65533:e>=128&&e<=159&&hn[e-128]||e}var vn=["Q=¨`p0AEligMPacutebrevecircyfrgravelphamacrndogonpfpplyFunctionringscrsigntildeumlBackslashrvwedcyecausernoullistafropfrevescrumpeqCHcyOPYacutepitalDifferentialDyleyscaronedilirconintdotedillanterDotfrhiircleDotMinusPlusTimeslockwiseContourIntegralseCurlyDoubleQuoteQuoteolonengruentinttourIntegralpfroductunterClockwiseContourIntegralrossscrupCapDDotrahdJcyScyZcyaggerrrshvcaronyeltafriacriticalAcuteDotubleAcuteGraveTildemondfferentialDopftDotEqualubleContourIntegralDotwnArrowLeftArrowRightArrowTeeongLeftArrowRightArrowRightArrowRightArrowTeeUpArrowDownArrowVerticalBarwnArrowBarUpArrowBreveLeftRightVectorTeeVectorVectorBarRightTeeVectorVectorBarTeeArrowarrowscrtrokENGTHacutecaronircydotfrgravelementmacrptySmallSquareVerySmallSquareogonpfpsilonqualTildeilibriumscrimtaumlxistsponentialEFcyfrilledSmallSquareVerySmallSquareopfrAlluriertrfscrGJcyTammadbrevecedilircydotfrgopfreaterEqualLessFullEqualGreaterLessSlantEqualTildescrtHARDcyacektcircfrilbertSpaceopfrizontalLinescrtrokumpDownHumpEqualIEcyJligOcyacutecircydotfrgravemacrginaryIpliesntegralrsectionvisibleCommaTimesogonpftascrtildeukcymlJcircyfropfscrercyukcyKHcyJcyappacedilyfropfscrLJcyTacutembdangplacetrfrrcaronedilyeftAngleBracketrrowBarRightArrowCeilingDoubleBracketwnTeeVectorVectorBarFloorRightArrowVectorTeeArrowVectorriangleBarEqualUpDownVectorTeeVectorVectorBarVectorBararrowrightarrowssEqualGreaterFullEqualGreaterLessSlantEqualTildefrleftarrowmidotongLeftArrowRightArrowRightArrowleftarrowrightarrowrightarrowpfwerLeftArrowRightArrowscrhtroktMapcyediumSpacellintrffrinusPlusopfscruNJcyacutecaronedilyegativeMediumSpaceThickSpacenSpaceVeryThinSpacestedGreaterGreaterLessLesswLinefroBreaknBreakingSpacepftCongruentupCapDoubleVerticalBarElementqualTildexistsGreaterEqualFullEqualGreaterLessSlantEqualTildeHumpDownHumpEqualLeftTriangleBarEqualssEqualGreaterLessSlantEqualTildeNestedGreaterGreaterLessLessPrecedesEqualSlantEqualReverseElementightTriangleBarEqualSquareSubsetEqualpersetEqualubsetEqualcceedsEqualSlantEqualTildepersetEqualTildeEqualFullEqualTildeVerticalBarscrtildeuOEligacutecircydblacfrgravemacregaicronopfpenCurlyDoubleQuoteQuoterscrlashtildemesumlverBarraceketParenthesisPartialDcyfrhiilusMinusoincareplanepfrecedesEqualSlantEqualTildeimeoductportionalscriQUOTfropfscrRBarrEGacutengrrtlcaronedilyeverseElementquilibriumUpEquilibriumfrhoightAngleBracketrrowBarLeftArrowCeilingDoubleBracketwnTeeVectorVectorBarFloorTeeArrowVectorriangleBarEqualUpDownVectorTeeVectorVectorBarVectorBararrowopfundImpliesrightarrowscrhuleDelayedSHCHcycyOFTcyacutecaronedilircyfrhortDownArrowLeftArrowRightArrowUpArrowigmamallCircleopfqrtuareIntersectionSubsetEqualpersetEqualUnionscrtarubsetEqualcceedsEqualSlantEqualTildehThatmpersetEqualsetTHORNRADESHcycyabucaronedilyfrhereforetaickSpacenSpaceildeEqualFullEqualTildeopfripleDotscrtrokUacuterrocirbrcyevecircydblacfrgravemacrnderBarraceketParenthesisionPlusogonpfpArrowBarDownArrowDownArrowEquilibriumTeeArrowarrowdownarrowperLeftArrowRightArrowsilonringscrtildeumlVDashbarcydashleerbarticalBarLineSeparatorTildeyThinSpacefropfscrvdashWcircedgefropfscrXfriopfscrYAcyIcyUcyacutecircyfropfscrumlZHcyacutecaronydoteroWidthSpacetafropfscraacutebrevecEdircuteyeligfrgravelefsymphphamacrlgpndanddslopevgelemsdaabcdefghrtvbdsphtzarrogonpfpEacireidosproxeqringscrtympeqtildeumlwconintintbNotackcongepsilonprimesimeqrveewedgebrktbrkcongydquoecausemptyvpsirnoutahweenfrigcapircupodotplustimessqcuptartriangledownupuplusveewedgekarowlacklozengesquaretriangledownleftrightnkk12434ocknequivotopfttomwtiexDLRlrHDUduULRlrVHLRhlrboxdLRlrhDUduminusplustimesuLRlrvHLRhlrprimerevevbarscremiimeolbhsubulletmpEeqcacutepandbrcupcapupdotsretoncapsronedilircupssmdotedilmptyvnterdotfrhcyeckmarkiirEceqlearrowleftrightdRSastcircdashefnintmidscirlubsuitoloneqmmatpfnlementxesngdotintpfrodysrrarrossscrubepetdotudarrlreprsclarrppbrcapcapupdotorsrarrmlyeqprecsuccveewedgerenvearrowleftrightveewedwconintintylctydArrHaraggerlethrrshvbkarowlaccaronydaggerrrotseqegltamptyvfishtrharlriamondsuitsegammasinvideontimesonxjcylcornropollarpfteqdotminusplussquareublebarwedgewnarrowdownarrowsharpoonleftrightrbkarowcornropscryoltroktdotrifuarrharwanglezcyigrarreDDototacutestercaronircolonydotefDotrgravesdotlinterslsdotmacrptysetvsp134ngspogonpfparsllussilonvqcircolonsimlantgtrlessualsestivDDvparslrDotarrscrdotimtahumlroxclistpectationonentialefallingdotseqcyemalefiligligligriligjliglatligtnsnofopfrallkvpartintrac123456823534584556878slownscrgElacutemmadpbrevecircydotelqqslantsccdotollesfrggimeljcylEajnEapproxeqqsimopfravescrimeltccirdotlParquestrapproxrrdoteqlessqlesslesssimvertneqqnEhArrairsplfmiltrdcyrcirwbarcirceartsuitlliprconfrksearowwarowoarrmthtokleftarrowrightarrowpfrbarscrlashtrokybullpheniacutecircyecyxclffrgraveiiintntnfinotajligmacrgelinepartthofpedncarefintieodottcalegersrcallarhkprodocygonpftaprodquestscrinEdotsvvtildeukcymljcircyfrmathopfscrercyukcykappavcedilyfrgreenhcyjcyopfscrlAarrrrtailBarrEgHaracuteemptyvgranmbdangdlepquorrbfsfshklpplsimtltailesbarrbrkracekkeslducaronedililubydcaquorrdharusharsheftarrowtailharpoondownupleftarrowsrightarrowsharpoonssquigarrowthreetimesgqqslantsccdotorgessapproxdoteqgtrqgtrgtrsimfishtloorrgEhardulblkjcylarrcornerhardtrimidotoustachenEapproxeqqsimoangrrbrkngleftarrowrightarrowmapstorightarrowoparrowleftrightparflustimeswastbarzengefparltrarrcornerhardmtrisaquocrhimegqbuortroktccirdothreeimeslarrquestrPariefurdsharuharvertneqqnEmDDotacrletesepstodownleftuprkercommaydasheasuredanglefrhoicrodastcirdotnusbdulcpdrnplusodelspfpscrtposultimapmapnGgtvLeftarrowrightarrowltvRightarrowVDashdashablacutengpEidosproxturalsbspumpecapronedilongdotupydasheArrarhkrowdotquivsearimxistsfrgEeqqslantssimtrhArrarrparisdvjcylArrEarrdreftarrowrightarrowqqslantsssimtriemidopftinEdotvabcnivabcparallelsltolintrcueeceqrArrarrcwightarrowtriesccueerhortmidparallelimeqmidparqsubepeubEeseteqqcceqpEeseteqqtglildelgrianglelefteqrightequmerospvDashHarrapdashgetinfinlArretrierArrtriesimwArrarhkrownearoSacutestcircydashblacivotsoldeligfcirrgonravethbarmintlarrcirrossinetmacregaicrondnusopfparerplusrarrderoffmigoforslopevscrlasholtildemesasumlvbarparallelsimltcyercntiodmilptenkfrhivmmatoneitchforkvlanckhkvusacirbcirdouemnsimtwomointintpfundrEapcueecapproxcurlyeqeqnapproxeqqsimsimimesnEapsimodfalarlinesurfptosimurelscriuncspqfrintopfprimescruaternionsintesteqotrAarrrrtailBarrHaraceutedicemptyvngdelequorrapbfscfshklpplsimtlwtailionalsbarrbrkracekkeslducaronedililubydcaldharquorshealinepartsctgfishtloorrhardulovightarrowtailharpoondownupleftarrowsharpoonsrightarrowssquigarrowthreetimesngsingdotseqlarrharmmoustachenmidoangrrbrkparflustimespargtpolintrarrsaquocrhqbuorthreeimesriefltriuluharxsacutebquocEaproncueedilircnEapsimpolintsimydotbeeArrarhkrowctmiswartminusnxtfrownharpchcyyortmidparallelyigmafvmdoteqgElEneplusrarrlarrmallsetminusshpeparslidletesoftcylbarpfpadesuitrqcapsupssubeseteqpesetequareffrarrscretmnmiletarftarfraightepsilonphinsubEdotedotmultnEeplusrarrseteqqneqqimubpccapproxcurlyeqeqnapproxeqqsimsimmngp123EdotsubedothsolublarrmultnEeplusseteqqneqqimubpwArrarhkrownwarzligtargetubrkcaronedilydotelrecfrhere4foretasymvickapproxsimnspkapsimornildemesbardntoeapbotcirforksaprimeradeiangledownlefteqqrighteqdoteminusplussbtimepeziumscryhcytrokwixtoheadleftarrowrightarrowuArrHaracuterrbrcyevecircydarrblacharfishtrgraveharlrblklcornerroptrimacrlogonpfparrowdownarrowharpoonleftrightlussihlonuparrowsrcornerropingtriscrtdotilderifuarrmlwanglevArrBarvDashangrtrepsilonkappanothingphiiroptorhosigmaubsetneqqpsetneqqthetariangleleftrightcydasheebareqlliprbartfrltrinsubpopfproprtriscrubnEepnEezigzagwcircedbargeqierpfropfpreathscrxcapircupdtrifrhArrarrilArrarrmapnisodotpflustimerArrarrscrqcupuplustriveewedgeyacuteycircyenfricyopfscrucymlzacutecaronydoteetrftafrhcyigrarropfscrwjnjC(D%D($(D'%$$ED($'$'$%$'%E$/D'$F%'D(D&#,%%&&$%$)%+%%$E$F$'$&$(#'D&$(%$&4%($(E'%&%($&$)%*$%$%$+)()')($:&5-($'($%*&&&/%%&)%@$'$F$%&&#%%)$&$&$&$(%%%&$(%$$%&%$E$2.&0,.(.(&'%.$F%$&&&(%6)&+*),---&*/1---)-.&)*+,).%*,&,*'('2+,+)1&'1,)2&'&*('($F%'#&D%D($(E&%$$&$ED($)$'%1(2$'%E$)$'((&+$&%%$%D&$(%-#&$E$3)2$F%'%+$&#'D$$'($$($(%&%$$&$E$$$F$./'*,***'*-*($F$$#)$'%$$'$%$.$&%/$&%'$.'(#'$'$&D(D'%$$&$%D($$%&&*%($%&('+%/,($'%E%%$&$($'E%#(%$$E$F$F%'$'#'$&$'$(%$$E$F$F#'D$$(%'%%%+%%$(%'%$$2(',&,-'*'0).+)1&'('-,)'&*(*)(*/&/('/),))/&')-&'('-%1','*'''-'($E$$%+$($/+-'-',+-'-%E%/(-$&%$%'$$#&$%$-%*$E$+$F$&$$#'$($(%'%$$5+-.)+0%5)+%($E$)%1%%%$&,'(&4&*''+H'(&*-(-L-J-'-M-(&O*H&/2F2((%*(***G*M*(&W,K&+.H.-&1'/3F3(&O2(.I4('H,(().H.-.H(I.(&(+(+,+(&.$FD($$#(D(D'%$$($ED($'%&%($F$6,($$$FE'D(&&D&$)('+&'.#+$%$E$%$$$+$/%%$$%)+(+-+(%&%(&*-%$F%$C'$E$&$F#(D%$(%%%%'%$(%'%$$$%/+-*0$%$%$3)'-&-,(*(0*.,)2&(((&+(+))*0&0((/*,*)0&().&(($&%-$-$&%$$-#)%%$($($$%'%'%&%$$E$0(,(-(*$'$-$F$&%')/))/(+)1()($F$&$%&&)(%)+(+-+(&(%$%$&(+(&&C($'$'%%$%%$$(%'%$$E$+&%%K&)$'(((,(($F$+$F%'C)%%''$'&&D'%$$($ED($'$*)',&(.%&('$'%E$)*&*,%,%.%&((%(%,%/(-%%'&$'$F$(D&#($&$%$'($$%%'&$'*+'+,+(&-$E$F$F$(#($'$E$F$F#F$$$F$F#'$&$&D($'%$$E$F$F$&#'$($(%$$&$0%%$%$&$FC)$($$%D%$E&E&%$D'$$%DD($)&%%&$'&%E$$%&&&$&(&$%$&$&%&&)%*$*$*$*$*$*$*$&%(%*$&&'$&'$'%E$$%$%'%$%%%%%')%D'$F%$%&(%D(D&$*%&#'$*'*'('&*%%'&&)%$&''$'%$$'$()$%(%&%'%%&$&'$E$('&'%&''''(&('&&/.%&(&&&($($.()(+0'0'0(&%%&'$&%%&$E&G%%$F%$&&%'%&'$'$'$&$'$'$'$'$&%'$'$'$&$'$'$'$'$'$'$&&&%'$'$'$&$'$'$'$'$&(&'&(&%'$'$'$&$'$'$'$'$'$'$$($'E'$F%&%%'$%%'$''$&'%%%'$'$($#)%$&&&(&&'%&&&D%&&%$'&&E'%&%&(%$&D'%(E%'($E$&%&('%$$%&$&$'%'..()%*$*&*'*'&$&(&&&'$'(&$'($)$%&($&$'%'))&%%'&&&%E&&F$'%$'%&$F%%'$&$'$$'$))$%&&%%')$%$&(&&'%&&&%&D%')$&+*'(&((F&&.-(%&%&$*%&$(#'$&$(%'%%%%'$$)%&$(%$$$%(&%%(D%%&%($(%D$''$$&'&*''$%$%(%&%$F&)*&&$&$(&&$(%E%$&%(&&(&'&)%/%*'-'..($*%'&&$F&$%%%'$'%%'$$'%&$)$&%)#(%%D(%'$(%%G$%'%$$&$$$'%D$$E'%$&&$$%)%$%$&&$'%&(&($%%'%($$%%%$'%E$&'%%&%%'&'$$(&'%&&**'%'&&&%(%%)$'%&$&%&%%$%E$D&%%$&%&%,&,#0$%$($(%&&&%D$'$G$&%&%&$&$F%'&$'$$*D(($H$($($($'%($G%($($'%'%($'%&%%&$F#%%$$(%&($%$$($'%$$&$$%$%$&$&(%$&%&&)$*$&D'%$E$$%$$'$&$$%$%$%$$%%%''%$&$'$%&$F$'$&%%'$'$D$%%&%%&%'%(%*'%&&&)((&'&&$K%E#'$(%%%'%'&$'&'$$&$'$()&%'%'$E$*&($'%'%.'-%E%'$F%'%'$(%'C)$$E&%$$&E&$%%DD($$%'&%%'%&$'$'&%''''&%%%%&$$%'%&(&%'%$&&&(''&(&'$&%&%E%%$'D($F%%'$'&'$($'$$$%'$'E%#(%$$E$'$F$F%'$'#(($$(%$$E$($&$&$F$F#(%%%'$'$$%$$&$(%)%'%'%%'$'%%$E&%%'$(%'%'%'%'%'&'%%$&&&$'D$'%&%'($&%'&)$$(%'&%%%%$$&%&($%(&(%%$$%*,''..%'-'-1$,+,-'-%$%$&$&(%$&%&&)$*$&D'%&*'&'()''&'&$(%'%D$$%$$''$($%&$&$$%&%)%'%&$(%')'$%%%''%$&$'$%&$'&%%&%.+-')'-%.,(%&&D&&%(%'&&%$&'&$$&'%$'%)%&($%$%&$(%E%$%%'$'$%%&%($%'D$%%&%%&%'%'%'%(%'&$'$'$$*&'$K%E#(D&%%&$'&%$&&)')')%%'$(%$$'$/$E$%D'%$&&&&F&%&($($)$$&%%$($(%E$$$F%'$$%)%&#F%D&D$,(-%D%D&D$-$(%'$'%'%E%$&D&E&%&'%&(%*$D&%F(D$&&&%'%&(F%%%$$'$$%&%''$(%%F%'%'&E%')$$E$E%$&$'D'H&D%&%$&$$'%&%&$$%$&$%$$&$'%D%&%%%$&*(-&$'D'H&D'$%&%$&%($$&$FE$&%(D(F(%)$)$&%(%)$)$$&'('E'D%(%$&&&D'$(E$'%&(D(D%,%&($$%&&&D&D%*)+%%'$($%&%&%((%%%'D'$'F*%,D&%(E&$'D'$'F*%,D$&E'%%%.0%,(1%$$%$&&&%$(%'%E%'%E&D%(%'&D&D'F%'&G%F$'%''$(%%'#%D(%%$&G$%$$'%'%%%%%'$'$'%D$&E'%$$'%$$&$'%&&'%&%$$'%&%(&$&&$F$&%&%&$$%&%$&%(%F$F$%'%%%(%$$&E'%%D(&&)%D&$'#&F$''&&'$&$$%$(&&&&&$&'$E$%&$%'%&$$%*%$$()$'%%%'''$'&'%($'$G%'&'&$$$*%EE&$$%$%%%&%$&$')'*'%'*(&(&'&%&($%%&%&&%%&(''''&$'%%&%'$F%$$(#F$&$F$($F$-'&%&(%E%#(%%%'$'$&$F&&%&%)%%'$'$'%E&%%'%'$(%'$'%'%'%'%'&'%'$%'&%('$'%&%'($&%'&)$$(%'&%%%%$$&%(%&($%%$&'&'''$%%E$$(%'%D$''$($%$&$$,-'(./%(-,+(.(-(-%%%-$'%&%$$()'$'$'&%%&%&&D&&%($&'%%)$'$(%E%$%%&%($$(%'%%'$'$''$)$$#)$'$$%$%%&&%&%$&&%&%%&%&&%)%&%$$&'$'$$'%''$(%E%%%%'%)'$%%$E&&$'%'&$%)(+E$$'($($%$&&&$'$&$'$&$'$&%&'&'$'$/&&%)%%&%%$&$'D$(%$&$'%%E$()&&$$'(D&%(D%&($(&+%'$($(&+%%$&&($&$$'$F%'%'%'$&'$%0+&&%$%&$&&&$'&&'&%'$&'&'&&)%+$)&,$'%'%($%%')'*'%'*(&(&'&%$%%%$F$F$F$&$&&'&&$'&&'(%&'&'&%'$&'&&)%+$)&,$'%'%($$'%''$(%%'D'#)%$$&$(%'%$$&$($E$(('&%(&($%,(&&&%&&&E&$'E&($)%($%%$&%$&&&&&D'&%%$($'%)+'+'/%+$+(0%&&&$&(&'&%&'%)$F&$%&%'$'%1*-#'$&D(%%$'&&D'%$$'%'%&$(%DD($''$%&$()%&&%&$'E$$'%E$)%,%.,(%&%%'$'&%+$()%&&%&%&$F$'%'%%'$$'E%$)#'$&'$$'$(%+&(&*&&'$'(&$'%&('K/D(J/D&('..($%$'$%&&&%%'%'&$$E$'$G'D$F$'$'$F%G(D&F(D$)#($(&%($%'$E$F$$$$%'$F#'%&%%$'$E$'%&$$$'%&$&$&$'%E&&%'$'%&$F%'$(%&$&$(C)&$$'%$D%$E$&$F$F$&E%#)$(%$$&$(%%$E$&$)$F$F$%%%0@0000H8H40H000047P00P@001000@0B0HP@:H9T8P000LB8d@800@I0<110000QQ8400P10030005940@410020000Q02000@0200000@P0101@8000440400000000808000000000@00000000P`0000000040400@0004<000000000008000030000000000P020T400020@0@00000000000000000000000000P0000000400400000400220080000100000000000000000P000000000000P000000@00402000000000@00000000000000000000040000000000000",`Æ&ÁĂÂА𝔄ÀΑĀ⩓Ą𝔸⁡Å𝒜≔ÃÄ∖⫧⌆Б∵ℬΒ𝔅𝔹˘ℬ≎Ч©Ć⋒ⅅℭČÇĈ∰Ċ¸·ℭΧ⊙⊖⊕⊗∲”’∷⩴≡∯∮ℂ∐∳⨯𝒞⋓≍ⅅ⤑ЂЅЏ‡↡⫤ĎД∇Δ𝔇´˙˝\`˜⋄ⅆ𝔻¨⃜≐∯¨⇓⇐⇔⫤⟸⟺⟹⇒⊨⇑⇕∥↓⤓⇵̑⥐⥞↽⥖⥟⇁⥗⊤↧⇓𝒟ĐŊÐÉĚÊЭĖ𝔈È∈Ē◻▫Ę𝔼Ε⩵≂⇌ℰ⩳ΗË∃ⅇФ𝔉◼▪𝔽∀ℱℱЃ>ΓϜĞĢĜГĠ𝔊⋙𝔾≥⋛≧⪢≷⩾≳𝒢≫Ъˇ^Ĥℌℋℍ─ℋĦ≎≏ЕIJЁÍÎИİℑÌℑĪⅈ⇒∬∫⋂⁣⁢Į𝕀ΙℐĨІÏĴЙ𝔍𝕁𝒥ЈЄХЌΚĶК𝔎𝕂𝒦Љ<ĹΛ⟪ℒ↞ĽĻЛ⟨←⇤⇆⌈⟦⥡⇃⥙⌊↔⥎⊣↤⥚⊲⧏⊴⥑⥠↿⥘↼⥒⇐⇔⋚≦≶⪡⩽≲𝔏⋘⇚Ŀ⟵⟷⟶⟸⟺⟹𝕃↙↘ℒ↰Ł≪⤅М ℳ𝔐∓𝕄ℳΜЊŃŇŅН​​​​≫≪
4
+ 𝔑⁠\xA0ℕ⫬≢≭∦∉≠≂̸∄≯≱≧̸≫̸≹⩾̸≵≎̸≏̸⋪⧏̸⋬≮≰≸≪̸⩽̸≴⪢̸⪡̸⊀⪯̸⋠∌⋫⧐̸⋭⊏̸⋢⊐̸⋣⊂⃒⊈⊁⪰̸⋡≿̸⊃⃒⊉≁≄≇≉∤𝒩ÑΝŒÓÔОŐ𝔒ÒŌΩΟ𝕆“‘⩔𝒪ØÕ⨷Ö‾⏞⎴⏜∂П𝔓ΦΠ±ℌℙ⪻≺⪯≼≾″∏∷∝𝒫Ψ"𝔔ℚ𝒬⤐®Ŕ⟫↠⤖ŘŖРℜ∋⇋⥯ℜΡ⟩→⇥⇄⌉⟧⥝⇂⥕⌋⊢↦⥛⊳⧐⊵⥏⥜↾⥔⇀⥓⇒ℝ⥰⇛ℛ↱⧴ЩШЬŚ⪼ŠŞŜС𝔖↓←→↑Σ∘𝕊√□⊓⊏⊑⊐⊒⊔𝒮⋆⋐⋐⊆≻⪰≽≿∋∑⋑⊃⊇⋑Þ™ЋЦ ΤŤŢТ𝔗∴Θ   ∼≃≅≈𝕋⃛𝒯ŦÚ↟⥉ЎŬÛУŰ𝔘ÙŪ_⏟⎵⏝⋃⊎Ų𝕌↑⤒⇅↕⥮⊥↥⇑⇕↖↗ϒΥŮ𝒰ŨÜ⊫⫫В⊩⫦⋁‖‖∣|❘≀ 𝔙𝕍𝒱⊪Ŵ⋀𝔚𝕎𝒲𝔛Ξ𝕏𝒳ЯЇЮÝŶЫ𝔜𝕐𝒴ŸЖŹŽЗŻ​Ζℨℤ𝒵áă∾∾̳∿â´аæ⁡𝔞àℵℵαā⨿&∧⩕⩜⩘⩚∠⦤∠∡⦨⦩⦪⦫⦬⦭⦮⦯∟⊾⦝∢Å⍼ą𝕒≈⩰⩯≊≋'≈≊å𝒶*≈≍ãä∳⨑⫭≌϶‵∽⋍⊽⌅⌅⎵⎶≌б„∵∵⦰϶ℬβℶ≬𝔟⋂◯⋃⨀⨁⨂⨆★▽△⨄⋁⋀⤍⧫▪▴▾◂▸␣▒░▓█=⃥≡⃥⌐𝕓⊥⊥⋈╗╔╖╓═╦╩╤╧╝╚╜╙║╬╣╠╫╢╟⧉╕╒┐┌─╥╨┬┴⊟⊞⊠╛╘┘└│╪╡╞┼┤├‵˘¦𝒷⁏∽⋍\\⧅⟈••≎⪮≏≏ć∩⩄⩉⩋⩇⩀∩︀⁁ˇ⩍čçĉ⩌⩐ċ¸⦲¢·𝔠ч✓✓χ○⧃ˆ≗↺↻®Ⓢ⊛⊚⊝≗⨐⫯⧂♣♣:≔≔,@∁∘∁ℂ≅⩭∮𝕔∐©℗↵✗𝒸⫏⫑⫐⫒⋯⤸⤵⋞⋟↶⤽∪⩈⩆⩊⊍⩅∪︀↷⤼⋞⋟⋎⋏¤↶↷⋎⋏∲∱⌭⇓⥥†ℸ↓‐⊣⤏˝ďдⅆ‡⇊⩷°δ⦱⥿𝔡⇃⇂⋄⋄♦♦¨ϝ⋲÷÷⋇⋇ђ⌞⌍$𝕕˙≐≑∸∔⊡⌆↓⇊⇃⇂⤐⌟⌌𝒹ѕ⧶đ⋱▿▾⇵⥯⦦џ⟿⩷≑é⩮ě≖ê≕эėⅇ≒𝔢⪚è⪖⪘⪙⏧ℓ⪕⪗ē∅∅∅   ŋ ę𝕖⋕⧣⩱εεϵ≖≕≂⪖⪕=≟≡⩸⧥≓⥱ℯ≐≂ηðë€!∃ℰⅇ≒ф♀ffiffffl𝔣fifj♭fl▱ƒ𝕗∀⋔⫙⨍½⅓¼⅕⅙⅛⅔⅖¾⅗⅜⅘⅚⅝⅞⁄⌢𝒻≧⪌ǵγϝ⪆ğĝгġ≥⋛≥≧⩾⩾⪩⪀⪂⪄⋛︀⪔𝔤≫⋙ℷѓ≷⪒⪥⪤≩⪊⪊⪈⪈≩⋧𝕘\`ℊ≳⪎⪐>⪧⩺⋗⦕⩼⪆⥸⋗⋛⪌≷≳≩︀≩︀⇔ ½ℋъ↔⥈↭ℏĥ♥♥…⊹𝔥⤥⤦⇿∻↩↪𝕙―𝒽ℏħ⁃‐í⁣îие¡⇔𝔦ìⅈ⨌∭⧜℩ijīℑℐℑı⊷Ƶ∈℅∞⧝ı∫⊺ℤ⊺⨗⨼ёį𝕚ι⨼¿𝒾∈⋹⋵⋴⋳∈⁢ĩіïĵй𝔧ȷ𝕛𝒿јєκϰķк𝔨ĸхќ𝕜𝓀⇚⇐⤛⤎≦⪋⥢ĺ⦴ℒλ⟨⦑⟨⪅«←⇤⤟⤝↩↫⤹⥳↢⪫⤙⪭⪭︀⤌❲{[⦋⦏⦍ľļ⌈{л⤶“„⥧⥋↲≤←↢↽↼⇇↔⇆⇋↭⋋⋚≤≦⩽⩽⪨⩿⪁⪃⋚︀⪓⪅⋖⋚⪋≶≲⥼⌊𝔩≶⪑↽↼⥪▄љ≪⇇⌞⥫◺ŀ⎰⎰≨⪉⪉⪇⪇≨⋦⟬⇽⟦⟵⟷⟼⟶↫↬⦅𝕝⨭⨴∗_◊◊⧫(⦓⇆⌟⇋⥭‎⊿‹𝓁↰≲⪍⪏[‘‚ł<⪦⩹⋖⋋⋉⥶⩻⦖◃⊴◂⥊⥦≨︀≨︀∺¯♂✠✠↦↦↧↤↥▮⨩м—∡𝔪℧µ∣*⫰·−⊟∸⨪⫛…∓⊧𝕞∓𝓂∾μ⊸⊸⋙̸≫⃒≫̸⇍⇎⋘̸≪⃒≪̸⇏⊯⊮∇ń∠⃒≉⩰̸≋̸ʼn≉♮♮ℕ\xA0≎̸≏̸⩃ňņ≇⩭̸⩂н–≠⇗⤤↗↗≐̸≢⤨≂̸∄∄𝔫≧̸≱≱≧̸⩾̸⩾̸≵≯≯⇎↮⫲∋⋼⋺∋њ⇍≦̸↚‥≰↚↮≰≦̸⩽̸⩽̸≮≴≮⋪⋬∤𝕟¬∉⋹̸⋵̸∉⋷⋶∌∌⋾⋽∦∦⫽⃥∂̸⨔⊀⋠⪯̸⊀⪯̸⇏↛⤳̸↝̸↛⋫⋭⊁⋡⪰̸𝓃∤∦≁≄≄∤∦⋢⋣⊄⫅̸⊈⊂⃒⊈⫅̸⊁⪰̸⊅⫆̸⊉⊃⃒⊉⫆̸≹ñ≸⋪⋬⋫⋭ν#№ ⊭⤄≍⃒⊬≥⃒>⃒⧞⤂≤⃒<⃒⊴⃒⤃⊵⃒∼⃒⇖⤣↖↖⤧Ⓢó⊛⊚ôо⊝ő⨸⊙⦼œ⦿𝔬˛ò⧁⦵Ω∮↺⦾⦻‾⧀ōωο⦶⊖𝕠⦷⦹⊕∨↻⩝ℴℴªº⊶⩖⩗⩛ℴø⊘õ⊗⨶ö⌽∥¶∥⫳⫽∂п%.‰⊥‱𝔭φϕℳ☎π⋔ϖℏℎℏ+⨣⊞⨢∔⨥⩲±⨦⨧±⨕𝕡£≺⪳⪷≼⪯≺⪷≼⪯⪹⪵⋨≾′ℙ⪵⪹⋨∏⌮⌒⌓∝∝≾⊰𝓅ψ 𝔮⨌𝕢⁗𝓆ℍ⨖?≟"⇛⇒⤜⤏⥤∽̱ŕ√⦳⟩⦒⦥⟩»→⥵⇥⤠⤳⤞↪↬⥅⥴↣↝⤚∶ℚ⤍❳}]⦌⦎⦐řŗ⌉}р⤷⥩””↳ℜℛℜℝ▭®⥽⌋𝔯⇁⇀⥬ρϱ→↣⇁⇀⇄⇌⇉↝⋌˚≓⇄⇌‏⎱⎱⫮⟭⇾⟧⦆𝕣⨮⨵)⦔⨒⇉›𝓇↱]’’⋌⋊▹⊵▸⧎⥨℞ś‚≻⪴⪸š≽⪰şŝ⪶⪺⋩⨓≿с⋅⊡⩦⇘⤥↘↘§;⤩∖∖✶𝔰⌢♯щш∣∥­σςς∼⩪≃≃⪞⪠⪝⪟≆⨤⥲←∖⨳⧤∣⌣⪪⪬⪬︀ь/⧄⌿𝕤♠♠∥⊓⊓︀⊔⊔︀⊏⊑⊏⊑⊐⊒⊐⊒□□▪▪→𝓈∖⌣⋆☆★ϵϕ¯⊂⫅⪽⊆⫃⫁⫋⊊⪿⥹⊂⊆⫅⊊⫋⫇⫕⫓≻⪸≽⪰⪺⪶⋩≿∑♪⊃¹²³⫆⪾⫘⊇⫄⟉⫗⥻⫂⫌⊋⫀⊃⊇⫆⊋⫌⫈⫔⫖⇙⤦↙↙⤪ß⌖τ⎴ťţт⃛⌕𝔱∴∴θϑϑ≈∼ ≈∼þ˜×⊠⨱⨰∭⤨⊤⌶⫱𝕥⫚⤩‴™▵▿◃⊴≜▹⊵◬≜⨺⨹⧍⨻⏢𝓉цћŧ≬↞↠⇑⥣ú↑ўŭûу⇅ű⥮⥾𝔲ù↿↾▀⌜⌜⌏◸ū¨ų𝕦↑↕↿↾⊎υϒυ⇈⌝⌝⌎ů◹𝓊⋰ũ▵▴⇈ü⦧⇕⫨⫩⊨⦜ϵϰ∅ϕϖ∝↕ϱς⊊︀⫋︀⊋︀⫌︀ϑ⊲⊳в⊢∨⊻≚⋮||𝔳⊲⊂⃒⊃⃒𝕧∝⊳𝓋⫋︀⊊︀⫌︀⊋︀⦚ŵ⩟∧≙℘𝔴𝕨℘≀≀𝓌⋂◯⋃▽𝔵⟺⟷ξ⟸⟵⟼⋻⨀𝕩⨁⨂⟹⟶𝓍⨆⨄△⋁⋀ýяŷы¥𝔶ї𝕪𝓎юÿźžзżℨζ𝔷ж⇝𝕫𝓏‍‌`],yn=2654435761,bn=2246822507,xn=1024,Sn=(()=>{let e=new Uint8Array(128);for(let t=48;t<=57;t++)e[t]=t-47;for(let t=65;t<=90;t++)e[t]=t-54;for(let t=97;t<=122;t++)e[t]=t-60;return e})();function Cn(e,t,n){return e.charCodeAt(t)<<25|e.charCodeAt(t+1)<<18|e.charCodeAt(t+n-2)<<11|Sn[e.charCodeAt(t+n-1)]<<5|n}function wn(e,t){return(e*3<<3^t)&1023}function Tn(e,t){return(Math.imul(e,yn)>>>16)*t>>>16}function En(e,t){return(Math.imul(e,bn)>>>16)*t>>>16}function Dn(e){let[t,n]=e,r=t.charCodeAt(0)-48<<6|t.charCodeAt(1)-48,i=t.charCodeAt(2)-48<<6|t.charCodeAt(3)-48,a=t.charCodeAt(4)-48<<6|t.charCodeAt(5)-48,o=6+i,s=o+2*r,c=2*a,l=new Int32Array(c),u=new Uint16Array(c),d=new Uint16Array(c),f=new Uint32Array(xn),p=new Map,m=[],h=``,g=6,_=0;for(let e=0;e<r;e++){let n=t.charCodeAt(o+2*e)-35,r=t.charCodeAt(o+2*e+1)-35,i=n&31,c=i+(r&31),v=(r>>5)+1;h=h.slice(0,i)+t.slice(g,g+c-i),g+=c-i;let y=Cn(h,0,c),b=2*(t.charCodeAt(s+Math.floor(e/6))-48&1<<e%6?En:Tn)(y,a);if(l[b]!==0&&(b+=1),l[b]=y,c>4){let e=h.slice(2,c-2),t=p.get(e);if(t===void 0){p.set(e,m.length),u[b]=m.length;for(let t=0;t<e.length;t+=2)m.push(e.charCodeAt(t)|e.charCodeAt(t+1)<<16)}else u[b]=t}let x=wn(h.charCodeAt(0),h.charCodeAt(1));f[x]|=c<=16?1<<c-2:32768,n&32&&(f[x]|=1<<c-2+16),d[b]=_<<2|v-1|(n&32)>>4,_+=v}return{keys:l,buckets:a,slotMidOff:u,slotValue:d,values:n,lengthBits:f,middles:new Uint32Array(m)}}var On=35,kn=59,An=61,jn=48,Mn=97,Nn=120,Pn=65,Fn=32;function In(e){return e-jn>>>0<=9}function Ln(e){return In(e)||(e|Fn)-Mn>>>0<=25}function Rn(e){return e===An||Ln(e)}var zn;(function(e){e[e.Legacy=0]=`Legacy`,e[e.Strict=1]=`Strict`,e[e.Attribute=2]=`Attribute`})(zn||={});var Bn=Dn(vn),Vn=Bn.keys,Hn=Bn.buckets,Un=Bn.slotMidOff,Wn=Bn.lengthBits,Gn=Bn.middles,Kn=Bn.slotValue,qn=Bn.values;function Jn(e,t,n){let r=e.charCodeAt(t),i=e.charCodeAt(t+1),a=e.charCodeAt(t+n-2),o=e.charCodeAt(t+n-1);if((r|i|a|o)>127)return-1;let s=r<<25|i<<18|a<<11|Sn[o]<<5|n,c=2*((Math.imul(s,yn)>>>16)*Hn>>>16);for(let r=0;;r++){if(Vn[c]===s&&(n<=4||Yn(c,e,t,n)))return c;if(Vn[c+1]===s&&(n<=4||Yn(c+1,e,t,n)))return c+1;if(r===1)return-1;c=2*((Math.imul(s,bn)>>>16)*Hn>>>16)}}function Yn(e,t,n,r){let i=Un[e],a=n+2,o=n+r-2;for(;a+1<o;){if((t.charCodeAt(a)|t.charCodeAt(a+1)<<16)!==Gn[i++])return!1;a+=2}return a===o||t.charCodeAt(a)===(Gn[i]&65535)}var Xn=(()=>{let e=new Uint8Array(128).fill(255);for(let t=0;t<10;t++)e[jn+t]=t;for(let t=0;t<6;t++)e[Pn+t]=t+10,e[Mn+t]=t+10;return e})();function Zn(e,t,n){let r=Wn[wn(e.charCodeAt(t),e.charCodeAt(t+1))]>>>16&31;for(;r!==0;){let i=31-Math.clz32(r);if(r^=1<<i,i+2>n)continue;let a=Jn(e,t,i+2);if(a>=0&&Kn[a]&2)return a<<3|i+2}return-1}function Qn(e,t,n){let r=e.slice(t,t+32).indexOf(`;`);if(r-2>>>0<=29){let n=Jn(e,t,r);if(n>=0)return n<<6|r+1}if(n!==zn.Strict){let r=Zn(e,t,Math.min(31,e.length-t));if(r>=0){let i=r&7;if(n!==zn.Attribute||t+i>=e.length||!Rn(e.charCodeAt(t+i)))return r>>3<<6|i}}return-1}var $n=0,er=1,tr=2,nr=3,rr=4,ir=class{emitCodePoint;errors;state=$n;consumed=1;result=0;decodeMode=zn.Strict;replaceNumericCodePoint=_n;constructor(e,t){this.emitCodePoint=e,this.errors=t}stateNumericStart(e,t){return t>=e.length?-1:(e.charCodeAt(t)|Fn)===Nn?(this.state=nr,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=tr,this.stateNumericDecimal(e,t))}stateNumericHex(e,t){let n=e.length,{result:r,consumed:i}=this,a=t;for(;a<n;){let t=e.charCodeAt(a),n=Xn[t];if(n<=15)r=r*16+n;else return this.result=r,this.consumed=i,this.emitNumericEntity(t,3);i+=1,a+=1}return this.result=r,this.consumed=i,-1}stateNumericDecimal(e,t){let n=e.length,{result:r,consumed:i}=this,a=t;for(;a<n;){let t=e.charCodeAt(a)-jn;if(t>>>0>9)return this.result=r,this.consumed=i,this.emitNumericEntity(t+jn,2);r=r*10+t,i+=1,a+=1}return this.result=r,this.consumed=i,-1}emitNumericEntity(e,t){if(this.consumed<=t)return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===kn)this.consumed+=1;else if(this.decodeMode===zn.Strict)return 0;return this.emitCodePoint(this.replaceNumericCodePoint(this.result),this.consumed),this.errors&&(e!==kn&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}startEntity(e){this.decodeMode=e,this.state=$n,this.result=0,this.consumed=1}write(e,t){switch(this.state){case $n:return e.charCodeAt(t)===On?(this.state=er,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=rr,this.stateNamedEntity(e,t));case er:return this.stateNumericStart(e,t);case tr:return this.stateNumericDecimal(e,t);case nr:return this.stateNumericHex(e,t);default:return this.stateNamedEntity(e,t)}}end(){switch(this.state){case rr:return this.endNamedEntity();case tr:return this.emitNumericEntity(0,2);case nr:return this.emitNumericEntity(0,3);case er:return this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed),0;default:return 0}}},ar=class extends ir{runLength=0;nameBuffer=new Uint8Array(32);emitSlot(e){let t=Kn[e],n=t>>2;this.emitCodePoint(qn.charCodeAt(n),this.consumed),t&1&&this.emitCodePoint(qn.charCodeAt(n+1),this.consumed)}startEntity(e){super.startEntity(e),this.runLength=0}stateNamedEntity(e,t){let n=e.length;if(this.runLength===0&&t+17<=n){let r=Wn[wn(e.charCodeAt(t),e.charCodeAt(t+1))];if(r&32768&&t+32<=n){let n=Qn(e,t,this.decodeMode);if(n>=0){let r=n&63;return this.consumed=r+1,this.emitSlot(n>>6),e.charCodeAt(t+r-1)!==kn&&this.errors?.missingSemicolonAfterCharacterReference(),this.consumed}return 0}let i=r&32767;for(;i!==0;){let n=i&-i;i^=n;let r=33-Math.clz32(n);if(e.charCodeAt(t+r)===kn){let n=Jn(e,t,r);if(n>=0)return this.consumed=r+2,this.emitSlot(n),this.consumed}}if(!(r&32768)){if(this.decodeMode!==zn.Strict){let n=Zn(e,t,31);if(n>=0){let r=n&7,i=e.charCodeAt(t+r);return this.decodeMode===zn.Attribute&&Rn(i)?0:(this.consumed=r+1,this.emitSlot(n>>3),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed)}}return 0}}let r=t,{runLength:i}=this,a=-1,o=Math.min(n,t+32-i);for(;r<o;){let t=e.charCodeAt(r);if(!Ln(t)){a=t;break}this.nameBuffer[i++]=t,r++}if(a<0&&i<32)return this.runLength=i,-1;if(a===kn&&i-2>>>0<=29){let e=or(this.nameBuffer,i);if(e>=0)return this.consumed=i+2,this.emitSlot(e),this.consumed}if(this.decodeMode!==zn.Strict&&i>=2){let e=cr(this.nameBuffer,i);if(e>=0){let t=e&7,n=t<i?this.nameBuffer[t]:a;return this.decodeMode===zn.Attribute&&Rn(n)?0:(this.consumed=t+1,this.emitSlot(e>>3),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed)}}return 0}endNamedEntity(){if(this.decodeMode===zn.Strict||this.runLength<2)return 0;let e=cr(this.nameBuffer,this.runLength);return e<0||this.decodeMode===zn.Attribute&&(e&7)<this.runLength?0:(this.consumed=(e&7)+1,this.emitSlot(e>>3),this.errors?.missingSemicolonAfterCharacterReference(),this.consumed)}};function or(e,t){let n=e[0]<<25|e[1]<<18|e[t-2]<<11|Sn[e[t-1]]<<5|t,r=2*((Math.imul(n,yn)>>>16)*Hn>>>16);for(let i=0;;i++){if(Vn[r]===n&&(t<=4||sr(r,e,t)))return r;if(Vn[r+1]===n&&(t<=4||sr(r+1,e,t)))return r+1;if(i===1)return-1;r=2*((Math.imul(n,bn)>>>16)*Hn>>>16)}}function sr(e,t,n){let r=Un[e],i=2,a=n-2;for(;i+1<a;){if((t[i]|t[i+1]<<16)!==Gn[r++])return!1;i+=2}return i===a||t[i]===(Gn[r]&65535)}function cr(e,t){let n=Wn[wn(e[0],e[1])]>>>16&31;for(;n!==0;){let r=31-Math.clz32(n);if(n^=1<<r,r+2>t)continue;let i=or(e,r+2);if(i>=0&&Kn[i]&2)return i<<3|r+2}return-1}var L;(function(e){e.HTML=`http://www.w3.org/1999/xhtml`,e.MATHML=`http://www.w3.org/1998/Math/MathML`,e.SVG=`http://www.w3.org/2000/svg`,e.XLINK=`http://www.w3.org/1999/xlink`,e.XML=`http://www.w3.org/XML/1998/namespace`,e.XMLNS=`http://www.w3.org/2000/xmlns/`})(L||={});var lr;(function(e){e.TYPE=`type`,e.ACTION=`action`,e.ENCODING=`encoding`,e.PROMPT=`prompt`,e.NAME=`name`,e.COLOR=`color`,e.FACE=`face`,e.SIZE=`size`})(lr||={});var ur;(function(e){e.NO_QUIRKS=`no-quirks`,e.QUIRKS=`quirks`,e.LIMITED_QUIRKS=`limited-quirks`})(ur||={});var R;(function(e){e.A=`a`,e.ADDRESS=`address`,e.ANNOTATION_XML=`annotation-xml`,e.APPLET=`applet`,e.AREA=`area`,e.ARTICLE=`article`,e.ASIDE=`aside`,e.B=`b`,e.BASE=`base`,e.BASEFONT=`basefont`,e.BGSOUND=`bgsound`,e.BIG=`big`,e.BLOCKQUOTE=`blockquote`,e.BODY=`body`,e.BR=`br`,e.BUTTON=`button`,e.CAPTION=`caption`,e.CENTER=`center`,e.CODE=`code`,e.COL=`col`,e.COLGROUP=`colgroup`,e.DD=`dd`,e.DESC=`desc`,e.DETAILS=`details`,e.DIALOG=`dialog`,e.DIR=`dir`,e.DIV=`div`,e.DL=`dl`,e.DT=`dt`,e.EM=`em`,e.EMBED=`embed`,e.FIELDSET=`fieldset`,e.FIGCAPTION=`figcaption`,e.FIGURE=`figure`,e.FONT=`font`,e.FOOTER=`footer`,e.FOREIGN_OBJECT=`foreignObject`,e.FORM=`form`,e.FRAME=`frame`,e.FRAMESET=`frameset`,e.H1=`h1`,e.H2=`h2`,e.H3=`h3`,e.H4=`h4`,e.H5=`h5`,e.H6=`h6`,e.HEAD=`head`,e.HEADER=`header`,e.HGROUP=`hgroup`,e.HR=`hr`,e.HTML=`html`,e.I=`i`,e.IMG=`img`,e.IMAGE=`image`,e.INPUT=`input`,e.IFRAME=`iframe`,e.KEYGEN=`keygen`,e.LABEL=`label`,e.LI=`li`,e.LINK=`link`,e.LISTING=`listing`,e.MAIN=`main`,e.MALIGNMARK=`malignmark`,e.MARQUEE=`marquee`,e.MATH=`math`,e.MENU=`menu`,e.META=`meta`,e.MGLYPH=`mglyph`,e.MI=`mi`,e.MO=`mo`,e.MN=`mn`,e.MS=`ms`,e.MTEXT=`mtext`,e.NAV=`nav`,e.NOBR=`nobr`,e.NOFRAMES=`noframes`,e.NOEMBED=`noembed`,e.NOSCRIPT=`noscript`,e.OBJECT=`object`,e.OL=`ol`,e.OPTGROUP=`optgroup`,e.OPTION=`option`,e.P=`p`,e.PARAM=`param`,e.PLAINTEXT=`plaintext`,e.PRE=`pre`,e.RB=`rb`,e.RP=`rp`,e.RT=`rt`,e.RTC=`rtc`,e.RUBY=`ruby`,e.S=`s`,e.SCRIPT=`script`,e.SEARCH=`search`,e.SECTION=`section`,e.SELECT=`select`,e.SOURCE=`source`,e.SMALL=`small`,e.SPAN=`span`,e.STRIKE=`strike`,e.STRONG=`strong`,e.STYLE=`style`,e.SUB=`sub`,e.SUMMARY=`summary`,e.SUP=`sup`,e.TABLE=`table`,e.TBODY=`tbody`,e.TEMPLATE=`template`,e.TEXTAREA=`textarea`,e.TFOOT=`tfoot`,e.TD=`td`,e.TH=`th`,e.THEAD=`thead`,e.TITLE=`title`,e.TR=`tr`,e.TRACK=`track`,e.TT=`tt`,e.U=`u`,e.UL=`ul`,e.SVG=`svg`,e.VAR=`var`,e.WBR=`wbr`,e.XMP=`xmp`})(R||={});var z;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.A=1]=`A`,e[e.ADDRESS=2]=`ADDRESS`,e[e.ANNOTATION_XML=3]=`ANNOTATION_XML`,e[e.APPLET=4]=`APPLET`,e[e.AREA=5]=`AREA`,e[e.ARTICLE=6]=`ARTICLE`,e[e.ASIDE=7]=`ASIDE`,e[e.B=8]=`B`,e[e.BASE=9]=`BASE`,e[e.BASEFONT=10]=`BASEFONT`,e[e.BGSOUND=11]=`BGSOUND`,e[e.BIG=12]=`BIG`,e[e.BLOCKQUOTE=13]=`BLOCKQUOTE`,e[e.BODY=14]=`BODY`,e[e.BR=15]=`BR`,e[e.BUTTON=16]=`BUTTON`,e[e.CAPTION=17]=`CAPTION`,e[e.CENTER=18]=`CENTER`,e[e.CODE=19]=`CODE`,e[e.COL=20]=`COL`,e[e.COLGROUP=21]=`COLGROUP`,e[e.DD=22]=`DD`,e[e.DESC=23]=`DESC`,e[e.DETAILS=24]=`DETAILS`,e[e.DIALOG=25]=`DIALOG`,e[e.DIR=26]=`DIR`,e[e.DIV=27]=`DIV`,e[e.DL=28]=`DL`,e[e.DT=29]=`DT`,e[e.EM=30]=`EM`,e[e.EMBED=31]=`EMBED`,e[e.FIELDSET=32]=`FIELDSET`,e[e.FIGCAPTION=33]=`FIGCAPTION`,e[e.FIGURE=34]=`FIGURE`,e[e.FONT=35]=`FONT`,e[e.FOOTER=36]=`FOOTER`,e[e.FOREIGN_OBJECT=37]=`FOREIGN_OBJECT`,e[e.FORM=38]=`FORM`,e[e.FRAME=39]=`FRAME`,e[e.FRAMESET=40]=`FRAMESET`,e[e.H1=41]=`H1`,e[e.H2=42]=`H2`,e[e.H3=43]=`H3`,e[e.H4=44]=`H4`,e[e.H5=45]=`H5`,e[e.H6=46]=`H6`,e[e.HEAD=47]=`HEAD`,e[e.HEADER=48]=`HEADER`,e[e.HGROUP=49]=`HGROUP`,e[e.HR=50]=`HR`,e[e.HTML=51]=`HTML`,e[e.I=52]=`I`,e[e.IMG=53]=`IMG`,e[e.IMAGE=54]=`IMAGE`,e[e.INPUT=55]=`INPUT`,e[e.IFRAME=56]=`IFRAME`,e[e.KEYGEN=57]=`KEYGEN`,e[e.LABEL=58]=`LABEL`,e[e.LI=59]=`LI`,e[e.LINK=60]=`LINK`,e[e.LISTING=61]=`LISTING`,e[e.MAIN=62]=`MAIN`,e[e.MALIGNMARK=63]=`MALIGNMARK`,e[e.MARQUEE=64]=`MARQUEE`,e[e.MATH=65]=`MATH`,e[e.MENU=66]=`MENU`,e[e.META=67]=`META`,e[e.MGLYPH=68]=`MGLYPH`,e[e.MI=69]=`MI`,e[e.MO=70]=`MO`,e[e.MN=71]=`MN`,e[e.MS=72]=`MS`,e[e.MTEXT=73]=`MTEXT`,e[e.NAV=74]=`NAV`,e[e.NOBR=75]=`NOBR`,e[e.NOFRAMES=76]=`NOFRAMES`,e[e.NOEMBED=77]=`NOEMBED`,e[e.NOSCRIPT=78]=`NOSCRIPT`,e[e.OBJECT=79]=`OBJECT`,e[e.OL=80]=`OL`,e[e.OPTGROUP=81]=`OPTGROUP`,e[e.OPTION=82]=`OPTION`,e[e.P=83]=`P`,e[e.PARAM=84]=`PARAM`,e[e.PLAINTEXT=85]=`PLAINTEXT`,e[e.PRE=86]=`PRE`,e[e.RB=87]=`RB`,e[e.RP=88]=`RP`,e[e.RT=89]=`RT`,e[e.RTC=90]=`RTC`,e[e.RUBY=91]=`RUBY`,e[e.S=92]=`S`,e[e.SCRIPT=93]=`SCRIPT`,e[e.SEARCH=94]=`SEARCH`,e[e.SECTION=95]=`SECTION`,e[e.SELECT=96]=`SELECT`,e[e.SOURCE=97]=`SOURCE`,e[e.SMALL=98]=`SMALL`,e[e.SPAN=99]=`SPAN`,e[e.STRIKE=100]=`STRIKE`,e[e.STRONG=101]=`STRONG`,e[e.STYLE=102]=`STYLE`,e[e.SUB=103]=`SUB`,e[e.SUMMARY=104]=`SUMMARY`,e[e.SUP=105]=`SUP`,e[e.TABLE=106]=`TABLE`,e[e.TBODY=107]=`TBODY`,e[e.TEMPLATE=108]=`TEMPLATE`,e[e.TEXTAREA=109]=`TEXTAREA`,e[e.TFOOT=110]=`TFOOT`,e[e.TD=111]=`TD`,e[e.TH=112]=`TH`,e[e.THEAD=113]=`THEAD`,e[e.TITLE=114]=`TITLE`,e[e.TR=115]=`TR`,e[e.TRACK=116]=`TRACK`,e[e.TT=117]=`TT`,e[e.U=118]=`U`,e[e.UL=119]=`UL`,e[e.SVG=120]=`SVG`,e[e.VAR=121]=`VAR`,e[e.WBR=122]=`WBR`,e[e.XMP=123]=`XMP`})(z||={});var dr=new Map([[R.A,z.A],[R.ADDRESS,z.ADDRESS],[R.ANNOTATION_XML,z.ANNOTATION_XML],[R.APPLET,z.APPLET],[R.AREA,z.AREA],[R.ARTICLE,z.ARTICLE],[R.ASIDE,z.ASIDE],[R.B,z.B],[R.BASE,z.BASE],[R.BASEFONT,z.BASEFONT],[R.BGSOUND,z.BGSOUND],[R.BIG,z.BIG],[R.BLOCKQUOTE,z.BLOCKQUOTE],[R.BODY,z.BODY],[R.BR,z.BR],[R.BUTTON,z.BUTTON],[R.CAPTION,z.CAPTION],[R.CENTER,z.CENTER],[R.CODE,z.CODE],[R.COL,z.COL],[R.COLGROUP,z.COLGROUP],[R.DD,z.DD],[R.DESC,z.DESC],[R.DETAILS,z.DETAILS],[R.DIALOG,z.DIALOG],[R.DIR,z.DIR],[R.DIV,z.DIV],[R.DL,z.DL],[R.DT,z.DT],[R.EM,z.EM],[R.EMBED,z.EMBED],[R.FIELDSET,z.FIELDSET],[R.FIGCAPTION,z.FIGCAPTION],[R.FIGURE,z.FIGURE],[R.FONT,z.FONT],[R.FOOTER,z.FOOTER],[R.FOREIGN_OBJECT,z.FOREIGN_OBJECT],[R.FORM,z.FORM],[R.FRAME,z.FRAME],[R.FRAMESET,z.FRAMESET],[R.H1,z.H1],[R.H2,z.H2],[R.H3,z.H3],[R.H4,z.H4],[R.H5,z.H5],[R.H6,z.H6],[R.HEAD,z.HEAD],[R.HEADER,z.HEADER],[R.HGROUP,z.HGROUP],[R.HR,z.HR],[R.HTML,z.HTML],[R.I,z.I],[R.IMG,z.IMG],[R.IMAGE,z.IMAGE],[R.INPUT,z.INPUT],[R.IFRAME,z.IFRAME],[R.KEYGEN,z.KEYGEN],[R.LABEL,z.LABEL],[R.LI,z.LI],[R.LINK,z.LINK],[R.LISTING,z.LISTING],[R.MAIN,z.MAIN],[R.MALIGNMARK,z.MALIGNMARK],[R.MARQUEE,z.MARQUEE],[R.MATH,z.MATH],[R.MENU,z.MENU],[R.META,z.META],[R.MGLYPH,z.MGLYPH],[R.MI,z.MI],[R.MO,z.MO],[R.MN,z.MN],[R.MS,z.MS],[R.MTEXT,z.MTEXT],[R.NAV,z.NAV],[R.NOBR,z.NOBR],[R.NOFRAMES,z.NOFRAMES],[R.NOEMBED,z.NOEMBED],[R.NOSCRIPT,z.NOSCRIPT],[R.OBJECT,z.OBJECT],[R.OL,z.OL],[R.OPTGROUP,z.OPTGROUP],[R.OPTION,z.OPTION],[R.P,z.P],[R.PARAM,z.PARAM],[R.PLAINTEXT,z.PLAINTEXT],[R.PRE,z.PRE],[R.RB,z.RB],[R.RP,z.RP],[R.RT,z.RT],[R.RTC,z.RTC],[R.RUBY,z.RUBY],[R.S,z.S],[R.SCRIPT,z.SCRIPT],[R.SEARCH,z.SEARCH],[R.SECTION,z.SECTION],[R.SELECT,z.SELECT],[R.SOURCE,z.SOURCE],[R.SMALL,z.SMALL],[R.SPAN,z.SPAN],[R.STRIKE,z.STRIKE],[R.STRONG,z.STRONG],[R.STYLE,z.STYLE],[R.SUB,z.SUB],[R.SUMMARY,z.SUMMARY],[R.SUP,z.SUP],[R.TABLE,z.TABLE],[R.TBODY,z.TBODY],[R.TEMPLATE,z.TEMPLATE],[R.TEXTAREA,z.TEXTAREA],[R.TFOOT,z.TFOOT],[R.TD,z.TD],[R.TH,z.TH],[R.THEAD,z.THEAD],[R.TITLE,z.TITLE],[R.TR,z.TR],[R.TRACK,z.TRACK],[R.TT,z.TT],[R.U,z.U],[R.UL,z.UL],[R.SVG,z.SVG],[R.VAR,z.VAR],[R.WBR,z.WBR],[R.XMP,z.XMP]]);function fr(e){return dr.get(e)??z.UNKNOWN}var B=z,pr={[L.HTML]:new Set([B.ADDRESS,B.APPLET,B.AREA,B.ARTICLE,B.ASIDE,B.BASE,B.BASEFONT,B.BGSOUND,B.BLOCKQUOTE,B.BODY,B.BR,B.BUTTON,B.CAPTION,B.CENTER,B.COL,B.COLGROUP,B.DD,B.DETAILS,B.DIR,B.DIV,B.DL,B.DT,B.EMBED,B.FIELDSET,B.FIGCAPTION,B.FIGURE,B.FOOTER,B.FORM,B.FRAME,B.FRAMESET,B.H1,B.H2,B.H3,B.H4,B.H5,B.H6,B.HEAD,B.HEADER,B.HGROUP,B.HR,B.HTML,B.IFRAME,B.IMG,B.INPUT,B.LI,B.LINK,B.LISTING,B.MAIN,B.MARQUEE,B.MENU,B.META,B.NAV,B.NOEMBED,B.NOFRAMES,B.NOSCRIPT,B.OBJECT,B.OL,B.P,B.PARAM,B.PLAINTEXT,B.PRE,B.SCRIPT,B.SECTION,B.SELECT,B.SOURCE,B.STYLE,B.SUMMARY,B.TABLE,B.TBODY,B.TD,B.TEMPLATE,B.TEXTAREA,B.TFOOT,B.TH,B.THEAD,B.TITLE,B.TR,B.TRACK,B.UL,B.WBR,B.XMP]),[L.MATHML]:new Set([B.MI,B.MO,B.MN,B.MS,B.MTEXT,B.ANNOTATION_XML]),[L.SVG]:new Set([B.TITLE,B.FOREIGN_OBJECT,B.DESC]),[L.XLINK]:new Set,[L.XML]:new Set,[L.XMLNS]:new Set},mr=new Set([B.H1,B.H2,B.H3,B.H4,B.H5,B.H6]);R.STYLE,R.SCRIPT,R.XMP,R.IFRAME,R.NOEMBED,R.NOFRAMES,R.PLAINTEXT;var hr=64,V;(function(e){e[e.DATA=0]=`DATA`,e[e.RCDATA=1]=`RCDATA`,e[e.RAWTEXT=2]=`RAWTEXT`,e[e.SCRIPT_DATA=3]=`SCRIPT_DATA`,e[e.PLAINTEXT=4]=`PLAINTEXT`,e[e.TAG_OPEN=5]=`TAG_OPEN`,e[e.END_TAG_OPEN=6]=`END_TAG_OPEN`,e[e.TAG_NAME=7]=`TAG_NAME`,e[e.RCDATA_LESS_THAN_SIGN=8]=`RCDATA_LESS_THAN_SIGN`,e[e.RCDATA_END_TAG_OPEN=9]=`RCDATA_END_TAG_OPEN`,e[e.RCDATA_END_TAG_NAME=10]=`RCDATA_END_TAG_NAME`,e[e.RAWTEXT_LESS_THAN_SIGN=11]=`RAWTEXT_LESS_THAN_SIGN`,e[e.RAWTEXT_END_TAG_OPEN=12]=`RAWTEXT_END_TAG_OPEN`,e[e.RAWTEXT_END_TAG_NAME=13]=`RAWTEXT_END_TAG_NAME`,e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]=`SCRIPT_DATA_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_END_TAG_OPEN=15]=`SCRIPT_DATA_END_TAG_OPEN`,e[e.SCRIPT_DATA_END_TAG_NAME=16]=`SCRIPT_DATA_END_TAG_NAME`,e[e.SCRIPT_DATA_ESCAPE_START=17]=`SCRIPT_DATA_ESCAPE_START`,e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]=`SCRIPT_DATA_ESCAPE_START_DASH`,e[e.SCRIPT_DATA_ESCAPED=19]=`SCRIPT_DATA_ESCAPED`,e[e.SCRIPT_DATA_ESCAPED_DASH=20]=`SCRIPT_DATA_ESCAPED_DASH`,e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]=`SCRIPT_DATA_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]=`SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]=`SCRIPT_DATA_ESCAPED_END_TAG_OPEN`,e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]=`SCRIPT_DATA_ESCAPED_END_TAG_NAME`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]=`SCRIPT_DATA_DOUBLE_ESCAPE_START`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]=`SCRIPT_DATA_DOUBLE_ESCAPED`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]=`SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH`,e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]=`SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN`,e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]=`SCRIPT_DATA_DOUBLE_ESCAPE_END`,e[e.BEFORE_ATTRIBUTE_NAME=31]=`BEFORE_ATTRIBUTE_NAME`,e[e.ATTRIBUTE_NAME=32]=`ATTRIBUTE_NAME`,e[e.AFTER_ATTRIBUTE_NAME=33]=`AFTER_ATTRIBUTE_NAME`,e[e.BEFORE_ATTRIBUTE_VALUE=34]=`BEFORE_ATTRIBUTE_VALUE`,e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]=`ATTRIBUTE_VALUE_DOUBLE_QUOTED`,e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]=`ATTRIBUTE_VALUE_SINGLE_QUOTED`,e[e.ATTRIBUTE_VALUE_UNQUOTED=37]=`ATTRIBUTE_VALUE_UNQUOTED`,e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]=`AFTER_ATTRIBUTE_VALUE_QUOTED`,e[e.SELF_CLOSING_START_TAG=39]=`SELF_CLOSING_START_TAG`,e[e.BOGUS_COMMENT=40]=`BOGUS_COMMENT`,e[e.MARKUP_DECLARATION_OPEN=41]=`MARKUP_DECLARATION_OPEN`,e[e.COMMENT_START=42]=`COMMENT_START`,e[e.COMMENT_START_DASH=43]=`COMMENT_START_DASH`,e[e.COMMENT=44]=`COMMENT`,e[e.COMMENT_LESS_THAN_SIGN=45]=`COMMENT_LESS_THAN_SIGN`,e[e.COMMENT_LESS_THAN_SIGN_BANG=46]=`COMMENT_LESS_THAN_SIGN_BANG`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]=`COMMENT_LESS_THAN_SIGN_BANG_DASH`,e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]=`COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH`,e[e.COMMENT_END_DASH=49]=`COMMENT_END_DASH`,e[e.COMMENT_END=50]=`COMMENT_END`,e[e.COMMENT_END_BANG=51]=`COMMENT_END_BANG`,e[e.DOCTYPE=52]=`DOCTYPE`,e[e.BEFORE_DOCTYPE_NAME=53]=`BEFORE_DOCTYPE_NAME`,e[e.DOCTYPE_NAME=54]=`DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_NAME=55]=`AFTER_DOCTYPE_NAME`,e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]=`AFTER_DOCTYPE_PUBLIC_KEYWORD`,e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]=`BEFORE_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]=`DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]=`DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]=`AFTER_DOCTYPE_PUBLIC_IDENTIFIER`,e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]=`BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS`,e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]=`AFTER_DOCTYPE_SYSTEM_KEYWORD`,e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]=`BEFORE_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]=`DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED`,e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]=`DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED`,e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]=`AFTER_DOCTYPE_SYSTEM_IDENTIFIER`,e[e.BOGUS_DOCTYPE=67]=`BOGUS_DOCTYPE`,e[e.CDATA_SECTION=68]=`CDATA_SECTION`,e[e.CDATA_SECTION_BRACKET=69]=`CDATA_SECTION_BRACKET`,e[e.CDATA_SECTION_END=70]=`CDATA_SECTION_END`,e[e.CHARACTER_REFERENCE=71]=`CHARACTER_REFERENCE`,e[e.AMBIGUOUS_AMPERSAND=72]=`AMBIGUOUS_AMPERSAND`})(V||={});var gr={DATA:V.DATA,RCDATA:V.RCDATA,RAWTEXT:V.RAWTEXT,SCRIPT_DATA:V.SCRIPT_DATA,PLAINTEXT:V.PLAINTEXT,CDATA_SECTION:V.CDATA_SECTION};function _r(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function vr(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function yr(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function br(e){return yr(e)||vr(e)}function xr(e){return br(e)||_r(e)}function Sr(e){return e+32}function Cr(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED||e===P.CARRIAGE_RETURN}function wr(e){return Cr(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function Tr(e){return e===P.NULL?F.nullCharacterReference:e>1114111?F.characterReferenceOutsideUnicodeRange:sn(e)?F.surrogateCharacterReference:dn(e)?F.noncharacterCharacterReference:un(e)||e===P.CARRIAGE_RETURN?F.controlCharacterReference:null}var Er=class{constructor(e,t){this.options=e,this.handler=t,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName=``,this.active=!1,this.state=V.DATA,this.returnState=V.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:``,value:``},this.currentAttrLocation=null,this.currentAttrNames=null,this.runStart=0,this.runEnd=0,this.preprocessor=new pn(t),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new ar((e,t)=>{this.preprocessor.pos=this.entityStartPos+t-1,this._isCharacterReferenceInAttribute()||this._ensureCharacterToken(Cr(e)?I.WHITESPACE_CHARACTER:e===P.NULL?I.NULL_CHARACTER:I.CHARACTER),this._extendRunWith(String.fromCodePoint(e),0),this.entityStartPos=this.preprocessor.pos-t+1},t.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(F.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:e=>{this._err(F.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+e)},validateNumericCharacterReference:e=>{let t=Tr(e);t&&this._err(t,1)}}:void 0)}_err(e,t=0){var n,r;(r=(n=this.handler).onParseError)==null||r.call(n,this.preprocessor.getError(e,t))}getCurrentLocation(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}flushCharacters(){if(this.inLoop)throw Error(`Cannot flush characters from a tokenizer callback`);let e=this.currentCharacterToken?.location,t=null;e&&(t=this.getCharacterTokenEndLocation(e),this.currentLocation=t),this.inLoop=!0;try{this._emitCurrentCharacterToken(t)}finally{this.inLoop=!1}this._runParsingLoop()}getCharacterTokenEndLocation(e){let t=this.getCharacterTokenEndOffset(),n=this.preprocessor.html.slice(e.startOffset-this.preprocessor.droppedBufferSize,t-this.preprocessor.droppedBufferSize),r=e.startLine,i=-1;for(let e=n.indexOf(`
5
+ `);e!==-1;e=n.indexOf(`
6
+ `,e+1))r++,i=e;for(let e=n.indexOf(`\r`);e!==-1;e=n.indexOf(`\r`,e+1))n.charCodeAt(e+1)!==P.LINE_FEED&&(r++,i=Math.max(i,e));return{startLine:r,startCol:i===-1?e.startCol+n.length:n.length-i,startOffset:t,endLine:-1,endCol:-1,endOffset:-1}}getCharacterTokenEndOffset(){let e=this.preprocessor.droppedBufferSize+this.preprocessor.pos+1,t=this.currentToken?.location;switch(this.state){case V.TAG_OPEN:case V.RCDATA_LESS_THAN_SIGN:case V.RAWTEXT_LESS_THAN_SIGN:case V.SCRIPT_DATA_LESS_THAN_SIGN:case V.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:case V.CDATA_SECTION_BRACKET:return e-1;case V.END_TAG_OPEN:case V.MARKUP_DECLARATION_OPEN:case V.RCDATA_END_TAG_OPEN:case V.RCDATA_END_TAG_NAME:case V.RAWTEXT_END_TAG_OPEN:case V.RAWTEXT_END_TAG_NAME:case V.SCRIPT_DATA_END_TAG_OPEN:case V.SCRIPT_DATA_END_TAG_NAME:case V.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:case V.SCRIPT_DATA_ESCAPED_END_TAG_NAME:case V.CDATA_SECTION_END:return e-2;case V.CHARACTER_REFERENCE:return this._isCharacterReferenceInAttribute()&&t?t.startOffset:this.preprocessor.droppedBufferSize+this.entityStartPos;case V.DOCTYPE:case V.BEFORE_DOCTYPE_NAME:return this.currentLocation.startOffset;default:return t&&(this.state===V.TAG_NAME||this.state>=V.BEFORE_ATTRIBUTE_NAME&&this.state<=V.BOGUS_COMMENT||this.state>=V.COMMENT_START&&this.state<=V.BOGUS_DOCTYPE)?t.startOffset:e}}pause(){this.paused=!0}resume(e){if(!this.paused)throw Error(`Parser was already resumed`);this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e?.())}write(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}flushCurrentCharacterToken(){if(this.paused||this.active||!this.currentCharacterToken||this.currentToken||this.state===V.DOCTYPE||this.state===V.BEFORE_DOCTYPE_NAME||!this.preprocessor.willDropParsedChunk())return;let e=this.preprocessor.droppedBufferSize+this.preprocessor.pos+1-this.getCharacterTokenEndOffset();this.preprocessor.advance(),this.currentLocation=this.getCurrentLocation(e),this.preprocessor.retreat(1),this._emitCurrentCharacterToken(this.currentLocation),this._createCharacterToken(I.CHARACTER),this.preprocessor.dropParsedChunk(Math.max(e-1,0)),this.entityStartPos=this.preprocessor.pos+1-e}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(e){this.consumedAfterSnapshot+=e;for(let t=0;t<e;t++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,t){return this.preprocessor.startsWith(e,t)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this._flushRun(``),this.currentToken={type:I.START_TAG,tagName:``,tagID:z.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this._flushRun(``),this.currentToken={type:I.END_TAG,tagName:``,tagID:z.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this._flushRun(``),this.currentToken={type:I.COMMENT,data:``,location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this._flushRun(``),this.currentToken={type:I.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e){if(this.currentLocation){let e=this.currentLocation.startOffset-this.preprocessor.droppedBufferSize;this.preprocessor.html[e]===`
7
+ `&&this.preprocessor.html[e-1]===`\r`&&this.currentLocation.startOffset++}this.currentCharacterToken={type:e,chars:``,location:this.currentLocation}}_createAttr(e){this._flushRun(``),this.currentAttr={name:e,value:``},this.currentAttrLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e;let t=this.currentToken,{name:n}=this.currentAttr,r=this.currentAttrNames,i;if(r===null?(i=mn(t,n)!==null,!i&&t.attrs.length===hr&&(this.currentAttrNames=new Set(t.attrs.map(e=>e.name)).add(n))):(i=r.has(n),i||r.add(n)),i)this._err(F.duplicateAttribute);else if(t.attrs.push(this.currentAttr),t.location&&this.currentAttrLocation){let n=(e=t.location).attrs??(e.attrs=Object.create(null));n[this.currentAttr.name]=this.currentAttrLocation,this._leaveAttrValue()}}_leaveAttrValue(){this.currentAttrLocation&&(this.currentAttrLocation.endLine=this.preprocessor.line,this.currentAttrLocation.endCol=this.preprocessor.col,this.currentAttrLocation.endOffset=this.preprocessor.offset)}_flushRun(e){if(this.runEnd===this.runStart&&e.length===0)return;let t=this.preprocessor.html.slice(this.runStart,this.runEnd),n=(t.length<13?t:` ${t}`.slice(1))+e,r=this.currentToken;this.runStart=this.runEnd,r===null?this.currentCharacterToken.chars+=n:r.type===I.COMMENT?r.data+=n:this.currentAttr.value+=n}_extendRun(e){let{preprocessor:t}=this;if(e===P.LINE_FEED&&t.html.charCodeAt(t.pos)!==P.LINE_FEED)this._flushRun(`
8
+ `),this.runStart=t.pos+1;else{let n=t.pos-Number(e>65535);n!==this.runEnd&&(this._flushRun(``),this.runStart=n)}this.runEnd=t.pos+1}_extendRunWith(e,t){let{preprocessor:n}=this,r=n.codePointStart+1+t-e.length;r>=0&&n.html.startsWith(e,r)?r!==this.runEnd&&(this._flushRun(``),this.runStart=r):(this._flushRun(e),this.runStart=r+e.length),this.runEnd=r+e.length}prepareToken(e){this._emitCurrentCharacterToken(e.location),this.currentToken=null,e.location&&(e.location.endLine=this.preprocessor.line,e.location.endCol=this.preprocessor.col+1,e.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){let e=this.currentToken;this.currentAttrNames=null,this.prepareToken(e),e.tagID=fr(e.tagName),e.type===I.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(F.endTagWithAttributes),e.selfClosing&&this._err(F.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}emitCurrentComment(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(e){if(this._flushRun(``),this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case I.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case I.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case I.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}_emitEOFToken(){let e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(this.currentToken?.location??e),this.handler.onEof({type:I.EOF,location:e}),this.active=!1}_ensureCharacterToken(e){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return;this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e)}_emitCodePoint(e){let t=Cr(e)?I.WHITESPACE_CHARACTER:e===P.NULL?I.NULL_CHARACTER:I.CHARACTER,n=this.currentCharacterToken;(n===null||n.type!==t)&&this._ensureCharacterToken(t),this._extendRun(e)}_emitChars(e,t=0){this.options.sourceCodeLocationInfo&&t!==0&&this.currentCharacterToken&&this.currentCharacterToken.type!==I.CHARACTER?(this.currentLocation=this.getCurrentLocation(e.length-1-t),this._emitCurrentCharacterToken(this.currentLocation),this._createCharacterToken(I.CHARACTER)):this._ensureCharacterToken(I.CHARACTER),this._extendRunWith(e,t)}_startCharacterReference(){this.returnState=this.state,this.state=V.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?zn.Attribute:zn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===V.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===V.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===V.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this._extendRun(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case V.DATA:this._stateData(e);break;case V.RCDATA:this._stateRcdata(e);break;case V.RAWTEXT:this._stateRawtext(e);break;case V.SCRIPT_DATA:this._stateScriptData(e);break;case V.PLAINTEXT:this._statePlaintext(e);break;case V.TAG_OPEN:this._stateTagOpen(e);break;case V.END_TAG_OPEN:this._stateEndTagOpen(e);break;case V.TAG_NAME:this._stateTagName(e);break;case V.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case V.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case V.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case V.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case V.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case V.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case V.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case V.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case V.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case V.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case V.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case V.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case V.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case V.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case V.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case V.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case V.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case V.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case V.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case V.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case V.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case V.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case V.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case V.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case V.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case V.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case V.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case V.BOGUS_COMMENT:this._stateBogusComment(e);break;case V.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case V.COMMENT_START:this._stateCommentStart(e);break;case V.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case V.COMMENT:this._stateComment(e);break;case V.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case V.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case V.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case V.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case V.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case V.COMMENT_END:this._stateCommentEnd(e);break;case V.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case V.DOCTYPE:this._stateDoctype(e);break;case V.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case V.DOCTYPE_NAME:this._stateDoctypeName(e);break;case V.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case V.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case V.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case V.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case V.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case V.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case V.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case V.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case V.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case V.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case V.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case V.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case V.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case V.CDATA_SECTION:this._stateCdataSection(e);break;case V.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case V.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case V.CHARACTER_REFERENCE:this._stateCharacterReference();break;case V.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;default:throw Error(`Unknown state`)}}_stateData(e){switch(e){case P.LESS_THAN_SIGN:this.state=V.TAG_OPEN;break;case P.AMPERSAND:this._startCharacterReference();break;case P.NULL:this._err(F.unexpectedNullCharacter),this._emitCodePoint(e);break;case P.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case P.AMPERSAND:this._startCharacterReference();break;case P.LESS_THAN_SIGN:this.state=V.RCDATA_LESS_THAN_SIGN;break;case P.NULL:this._err(F.unexpectedNullCharacter),this._emitChars(`�`);break;case P.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case P.LESS_THAN_SIGN:this.state=V.RAWTEXT_LESS_THAN_SIGN;break;case P.NULL:this._err(F.unexpectedNullCharacter),this._emitChars(`�`);break;case P.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case P.LESS_THAN_SIGN:this.state=V.SCRIPT_DATA_LESS_THAN_SIGN;break;case P.NULL:this._err(F.unexpectedNullCharacter),this._emitChars(`�`);break;case P.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case P.NULL:this._err(F.unexpectedNullCharacter),this._emitChars(`�`);break;case P.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateTagOpen(e){if(br(e))this._createStartTagToken(),this.state=V.TAG_NAME,this._stateTagName(e);else switch(e){case P.EXCLAMATION_MARK:this.state=V.MARKUP_DECLARATION_OPEN;break;case P.SOLIDUS:this.state=V.END_TAG_OPEN;break;case P.QUESTION_MARK:this._err(F.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=V.BOGUS_COMMENT,this._stateBogusComment(e);break;case P.EOF:this._err(F.eofBeforeTagName),this._emitChars(`<`,-1),this._emitEOFToken();break;default:this._err(F.invalidFirstCharacterOfTagName),this._emitChars(`<`,-1),this.state=V.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(br(e))this._createEndTagToken(),this.state=V.TAG_NAME,this._stateTagName(e);else switch(e){case P.GREATER_THAN_SIGN:this._err(F.missingEndTagName),this.state=V.DATA;break;case P.EOF:this._err(F.eofBeforeTagName),this._emitChars(`</`,-1),this._emitEOFToken();break;default:this._err(F.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=V.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){let t=this.currentToken;switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:this.state=V.BEFORE_ATTRIBUTE_NAME;break;case P.SOLIDUS:this.state=V.SELF_CLOSING_START_TAG;break;case P.GREATER_THAN_SIGN:this.state=V.DATA,this.emitCurrentTagToken();break;case P.NULL:this._err(F.unexpectedNullCharacter),t.tagName+=`�`;break;case P.EOF:this._err(F.eofInTag),this._emitEOFToken();break;default:t.tagName+=String.fromCodePoint(vr(e)?Sr(e):e)}}_stateRcdataLessThanSign(e){e===P.SOLIDUS?this.state=V.RCDATA_END_TAG_OPEN:(this._emitChars(`<`,-1),this.state=V.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){br(e)?(this.state=V.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars(`</`,-1),this.state=V.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();let t=this.currentToken;switch(t.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=V.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=V.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=V.DATA,!1;default:return this.currentToken=null,!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`,-1),this.state=V.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===P.SOLIDUS?this.state=V.RAWTEXT_END_TAG_OPEN:(this._emitChars(`<`,-1),this.state=V.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){br(e)?(this.state=V.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars(`</`,-1),this.state=V.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`,-1),this.state=V.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case P.SOLIDUS:this.state=V.SCRIPT_DATA_END_TAG_OPEN;break;case P.EXCLAMATION_MARK:this.state=V.SCRIPT_DATA_ESCAPE_START,this._emitChars(`<!`);break;default:this._emitChars(`<`,-1),this.state=V.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){br(e)?(this.state=V.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars(`</`,-1),this.state=V.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`,-1),this.state=V.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===P.HYPHEN_MINUS?(this.state=V.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars(`-`)):(this.state=V.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===P.HYPHEN_MINUS?(this.state=V.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`)):(this.state=V.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case P.HYPHEN_MINUS:this.state=V.SCRIPT_DATA_ESCAPED_DASH,this._emitChars(`-`);break;case P.LESS_THAN_SIGN:this.state=V.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case P.NULL:this._err(F.unexpectedNullCharacter),this._emitChars(`�`);break;case P.EOF:this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case P.HYPHEN_MINUS:this.state=V.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case P.LESS_THAN_SIGN:this.state=V.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case P.NULL:this._err(F.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case P.EOF:this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=V.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case P.HYPHEN_MINUS:this._emitChars(`-`);break;case P.LESS_THAN_SIGN:this.state=V.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break;case P.GREATER_THAN_SIGN:this.state=V.SCRIPT_DATA,this._emitChars(`>`);break;case P.NULL:this._err(F.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_ESCAPED,this._emitChars(`�`);break;case P.EOF:this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=V.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===P.SOLIDUS?this.state=V.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:br(e)?(this._emitChars(`<`,-1),this.state=V.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars(`<`,-1),this.state=V.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){br(e)?(this.state=V.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars(`</`,-1),this.state=V.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars(`</`,-1),this.state=V.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(on.SCRIPT,!1)&&wr(this.preprocessor.peek(on.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<on.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=V.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case P.HYPHEN_MINUS:this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars(`-`);break;case P.LESS_THAN_SIGN:this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case P.NULL:this._err(F.unexpectedNullCharacter),this._emitChars(`�`);break;case P.EOF:this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case P.HYPHEN_MINUS:this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars(`-`);break;case P.LESS_THAN_SIGN:this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case P.NULL:this._err(F.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case P.EOF:this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case P.HYPHEN_MINUS:this._emitChars(`-`);break;case P.LESS_THAN_SIGN:this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars(`<`);break;case P.GREATER_THAN_SIGN:this.state=V.SCRIPT_DATA,this._emitChars(`>`);break;case P.NULL:this._err(F.unexpectedNullCharacter),this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(`�`);break;case P.EOF:this._err(F.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===P.SOLIDUS?(this.state=V.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars(`/`)):(this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(on.SCRIPT,!1)&&wr(this.preprocessor.peek(on.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e<on.SCRIPT.length;e++)this._emitCodePoint(this._consume());this.state=V.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=V.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:this.state=V.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case P.EQUALS_SIGN:this._err(F.unexpectedEqualsSignBeforeAttributeName),this._createAttr(`=`),this.state=V.ATTRIBUTE_NAME;break;default:this._createAttr(``),this.state=V.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:this._leaveAttrName(),this.state=V.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break;case P.EQUALS_SIGN:this._leaveAttrName(),this.state=V.BEFORE_ATTRIBUTE_VALUE;break;case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:this._err(F.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break;case P.NULL:this._err(F.unexpectedNullCharacter),this.currentAttr.name+=`�`;break;default:this.currentAttr.name+=String.fromCodePoint(vr(e)?Sr(e):e)}}_stateAfterAttributeName(e){switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:this.state=V.SELF_CLOSING_START_TAG;break;case P.EQUALS_SIGN:this.state=V.BEFORE_ATTRIBUTE_VALUE;break;case P.GREATER_THAN_SIGN:this.state=V.DATA,this.emitCurrentTagToken();break;case P.EOF:this._err(F.eofInTag),this._emitEOFToken();break;default:this._createAttr(``),this.state=V.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:this.state=V.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break;case P.APOSTROPHE:this.state=V.ATTRIBUTE_VALUE_SINGLE_QUOTED;break;case P.GREATER_THAN_SIGN:this._err(F.missingAttributeValue),this.state=V.DATA,this.emitCurrentTagToken();break;default:this.state=V.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case P.QUOTATION_MARK:this.state=V.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case P.AMPERSAND:this._startCharacterReference();break;case P.NULL:this._err(F.unexpectedNullCharacter),this._extendRunWith(`�`,0);break;case P.EOF:this._err(F.eofInTag),this._emitEOFToken();break;default:this._extendRun(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case P.APOSTROPHE:this.state=V.AFTER_ATTRIBUTE_VALUE_QUOTED;break;case P.AMPERSAND:this._startCharacterReference();break;case P.NULL:this._err(F.unexpectedNullCharacter),this._extendRunWith(`�`,0);break;case P.EOF:this._err(F.eofInTag),this._emitEOFToken();break;default:this._extendRun(e)}}_stateAttributeValueUnquoted(e){switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:this._leaveAttrValue(),this.state=V.BEFORE_ATTRIBUTE_NAME;break;case P.AMPERSAND:this._startCharacterReference();break;case P.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=V.DATA,this.emitCurrentTagToken();break;case P.NULL:this._err(F.unexpectedNullCharacter),this._extendRunWith(`�`,0);break;case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:this._err(F.unexpectedCharacterInUnquotedAttributeValue),this._extendRun(e);break;case P.EOF:this._err(F.eofInTag),this._emitEOFToken();break;default:this._extendRun(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:this._leaveAttrValue(),this.state=V.BEFORE_ATTRIBUTE_NAME;break;case P.SOLIDUS:this._leaveAttrValue(),this.state=V.SELF_CLOSING_START_TAG;break;case P.GREATER_THAN_SIGN:this._leaveAttrValue(),this.state=V.DATA,this.emitCurrentTagToken();break;case P.EOF:this._err(F.eofInTag),this._emitEOFToken();break;default:this._err(F.missingWhitespaceBetweenAttributes),this._leaveAttrValue(),this.state=V.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case P.GREATER_THAN_SIGN:{let e=this.currentToken;e.selfClosing=!0,this.state=V.DATA,this.emitCurrentTagToken();break}case P.EOF:this._err(F.eofInTag),this._emitEOFToken();break;default:this._err(F.unexpectedSolidusInTag),this.state=V.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){let t=this.currentToken;switch(e){case P.GREATER_THAN_SIGN:this.state=V.DATA,this.emitCurrentComment(t);break;case P.EOF:this.emitCurrentComment(t),this._emitEOFToken();break;case P.NULL:this._err(F.unexpectedNullCharacter),this._extendRunWith(`�`,0);break;default:this._extendRun(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(on.DASH_DASH,!0)?(this._createCommentToken(on.DASH_DASH.length+1),this.state=V.COMMENT_START):this._consumeSequenceIfMatch(on.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(on.DOCTYPE.length+1),this.state=V.DOCTYPE):this._consumeSequenceIfMatch(on.CDATA_START,!0)?this.inForeignNode?this.state=V.CDATA_SECTION:(this._err(F.cdataInHtmlContent),this._createCommentToken(on.CDATA_START.length+1),this.currentToken.data=`[CDATA[`,this.state=V.BOGUS_COMMENT):this._ensureHibernation()||(this._err(F.incorrectlyOpenedComment),this._createCommentToken(2),this.state=V.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case P.HYPHEN_MINUS:this.state=V.COMMENT_START_DASH;break;case P.GREATER_THAN_SIGN:{this._err(F.abruptClosingOfEmptyComment),this.state=V.DATA;let e=this.currentToken;this.emitCurrentComment(e);break}default:this.state=V.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){let t=this.currentToken;switch(e){case P.HYPHEN_MINUS:this.state=V.COMMENT_END;break;case P.GREATER_THAN_SIGN:this._err(F.abruptClosingOfEmptyComment),this.state=V.DATA,this.emitCurrentComment(t);break;case P.EOF:this._err(F.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:this._extendRunWith(`-`,-1),this.state=V.COMMENT,this._stateComment(e)}}_stateComment(e){let t=this.currentToken;switch(e){case P.HYPHEN_MINUS:this.state=V.COMMENT_END_DASH;break;case P.LESS_THAN_SIGN:this._extendRunWith(`<`,0),this.state=V.COMMENT_LESS_THAN_SIGN;break;case P.NULL:this._err(F.unexpectedNullCharacter),this._extendRunWith(`�`,0);break;case P.EOF:this._err(F.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:this._extendRun(e)}}_stateCommentLessThanSign(e){switch(e){case P.EXCLAMATION_MARK:this._extendRunWith(`!`,0),this.state=V.COMMENT_LESS_THAN_SIGN_BANG;break;case P.LESS_THAN_SIGN:this._extendRunWith(`<`,0);break;default:this.state=V.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===P.HYPHEN_MINUS?this.state=V.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=V.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===P.HYPHEN_MINUS?this.state=V.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=V.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==P.GREATER_THAN_SIGN&&e!==P.EOF&&this._err(F.nestedComment),this.state=V.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){let t=this.currentToken;switch(e){case P.HYPHEN_MINUS:this.state=V.COMMENT_END;break;case P.EOF:this._err(F.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:this._extendRunWith(`-`,-1),this.state=V.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){let t=this.currentToken;switch(e){case P.GREATER_THAN_SIGN:this.state=V.DATA,this.emitCurrentComment(t);break;case P.EXCLAMATION_MARK:this.state=V.COMMENT_END_BANG;break;case P.HYPHEN_MINUS:this._extendRunWith(`-`,-2);break;case P.EOF:this._err(F.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:this._extendRunWith(`--`,-1),this.state=V.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){let t=this.currentToken;switch(e){case P.HYPHEN_MINUS:this._extendRunWith(`--!`,-1),this.state=V.COMMENT_END_DASH;break;case P.GREATER_THAN_SIGN:this._err(F.incorrectlyClosedComment),this.state=V.DATA,this.emitCurrentComment(t);break;case P.EOF:this._err(F.eofInComment),this.emitCurrentComment(t),this._emitEOFToken();break;default:this._extendRunWith(`--!`,-1),this.state=V.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:this.state=V.BEFORE_DOCTYPE_NAME;break;case P.GREATER_THAN_SIGN:this.state=V.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break;case P.EOF:{this._err(F.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._err(F.missingWhitespaceBeforeDoctypeName),this.state=V.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(vr(e))this._createDoctypeToken(String.fromCharCode(Sr(e))),this.state=V.DOCTYPE_NAME;else switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:this._err(F.unexpectedNullCharacter),this._createDoctypeToken(`�`),this.state=V.DOCTYPE_NAME;break;case P.GREATER_THAN_SIGN:{this._err(F.missingDoctypeName),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this.state=V.DATA;break}case P.EOF:{this._err(F.eofInDoctype),this._createDoctypeToken(null);let e=this.currentToken;e.forceQuirks=!0,this.emitCurrentDoctype(e),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=V.DOCTYPE_NAME}}_stateDoctypeName(e){let t=this.currentToken;switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:this.state=V.AFTER_DOCTYPE_NAME;break;case P.GREATER_THAN_SIGN:this.state=V.DATA,this.emitCurrentDoctype(t);break;case P.NULL:this._err(F.unexpectedNullCharacter),t.name+=`�`;break;case P.EOF:this._err(F.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.name+=String.fromCodePoint(vr(e)?Sr(e):e)}}_stateAfterDoctypeName(e){let t=this.currentToken;switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:this.state=V.DATA,this.emitCurrentDoctype(t);break;case P.EOF:this._err(F.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._consumeSequenceIfMatch(on.PUBLIC,!1)?this.state=V.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(on.SYSTEM,!1)?this.state=V.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(F.invalidCharacterSequenceAfterDoctypeName),t.forceQuirks=!0,this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){let t=this.currentToken;switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:this.state=V.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break;case P.QUOTATION_MARK:this._err(F.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=V.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case P.APOSTROPHE:this._err(F.missingWhitespaceAfterDoctypePublicKeyword),t.publicId=``,this.state=V.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case P.GREATER_THAN_SIGN:this._err(F.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=V.DATA,this.emitCurrentDoctype(t);break;case P.EOF:this._err(F.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(F.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:t.publicId=``,this.state=V.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break;case P.APOSTROPHE:t.publicId=``,this.state=V.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break;case P.GREATER_THAN_SIGN:this._err(F.missingDoctypePublicIdentifier),t.forceQuirks=!0,this.state=V.DATA,this.emitCurrentDoctype(t);break;case P.EOF:this._err(F.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(F.missingQuoteBeforeDoctypePublicIdentifier),t.forceQuirks=!0,this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case P.QUOTATION_MARK:this.state=V.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case P.NULL:this._err(F.unexpectedNullCharacter),t.publicId+=`�`;break;case P.GREATER_THAN_SIGN:this._err(F.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=V.DATA;break;case P.EOF:this._err(F.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case P.APOSTROPHE:this.state=V.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break;case P.NULL:this._err(F.unexpectedNullCharacter),t.publicId+=`�`;break;case P.GREATER_THAN_SIGN:this._err(F.abruptDoctypePublicIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=V.DATA;break;case P.EOF:this._err(F.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){let t=this.currentToken;switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:this.state=V.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break;case P.GREATER_THAN_SIGN:this.state=V.DATA,this.emitCurrentDoctype(t);break;case P.QUOTATION_MARK:this._err(F.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case P.APOSTROPHE:this._err(F.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),t.systemId=``,this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case P.EOF:this._err(F.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){let t=this.currentToken;switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=V.DATA;break;case P.QUOTATION_MARK:t.systemId=``,this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case P.APOSTROPHE:t.systemId=``,this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case P.EOF:this._err(F.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){let t=this.currentToken;switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:this.state=V.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break;case P.QUOTATION_MARK:this._err(F.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case P.APOSTROPHE:this._err(F.missingWhitespaceAfterDoctypeSystemKeyword),t.systemId=``,this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case P.GREATER_THAN_SIGN:this._err(F.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=V.DATA,this.emitCurrentDoctype(t);break;case P.EOF:this._err(F.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:t.systemId=``,this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break;case P.APOSTROPHE:t.systemId=``,this.state=V.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break;case P.GREATER_THAN_SIGN:this._err(F.missingDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=V.DATA,this.emitCurrentDoctype(t);break;case P.EOF:this._err(F.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(F.missingQuoteBeforeDoctypeSystemIdentifier),t.forceQuirks=!0,this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){let t=this.currentToken;switch(e){case P.QUOTATION_MARK:this.state=V.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case P.NULL:this._err(F.unexpectedNullCharacter),t.systemId+=`�`;break;case P.GREATER_THAN_SIGN:this._err(F.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=V.DATA;break;case P.EOF:this._err(F.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){let t=this.currentToken;switch(e){case P.APOSTROPHE:this.state=V.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break;case P.NULL:this._err(F.unexpectedNullCharacter),t.systemId+=`�`;break;case P.GREATER_THAN_SIGN:this._err(F.abruptDoctypeSystemIdentifier),t.forceQuirks=!0,this.emitCurrentDoctype(t),this.state=V.DATA;break;case P.EOF:this._err(F.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:t.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){let t=this.currentToken;switch(e){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=V.DATA;break;case P.EOF:this._err(F.eofInDoctype),t.forceQuirks=!0,this.emitCurrentDoctype(t),this._emitEOFToken();break;default:this._err(F.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=V.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){let t=this.currentToken;switch(e){case P.GREATER_THAN_SIGN:this.emitCurrentDoctype(t),this.state=V.DATA;break;case P.NULL:this._err(F.unexpectedNullCharacter);break;case P.EOF:this.emitCurrentDoctype(t),this._emitEOFToken()}}_stateCdataSection(e){switch(e){case P.RIGHT_SQUARE_BRACKET:this.state=V.CDATA_SECTION_BRACKET;break;case P.EOF:this._err(F.eofInCdata),this._emitEOFToken();break;default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===P.RIGHT_SQUARE_BRACKET?this.state=V.CDATA_SECTION_END:(this._emitChars(`]`,-1),this.state=V.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case P.GREATER_THAN_SIGN:this.state=V.DATA;break;case P.RIGHT_SQUARE_BRACKET:this._emitChars(`]`,-2);break;default:this._emitChars(`]]`,-1),this.state=V.CDATA_SECTION,this._stateCdataSection(e)}}_stateCharacterReference(){let e=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(e<0){if(this.preprocessor.lastChunkWritten)e=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}}e===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&xr(this.preprocessor.peek(1))?V.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){xr(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===P.SEMICOLON&&this._err(F.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}},Dr=new Set([z.DD,z.DT,z.LI,z.OPTGROUP,z.OPTION,z.P,z.RB,z.RP,z.RT,z.RTC]),Or=new Set([...Dr,z.CAPTION,z.COLGROUP,z.TBODY,z.TD,z.TFOOT,z.TH,z.THEAD,z.TR]),kr=64,Ar=256,jr=512,Mr=768,Nr=[z.H1,z.H2,z.H3,z.H4,z.H5,z.H6],Pr=[z.TBODY,z.TFOOT,z.THEAD],Fr=[z.TR,z.TEMPLATE,z.HTML],Ir=[...Pr,z.TEMPLATE,z.HTML],Lr=[z.TABLE,z.TEMPLATE,z.HTML],Rr=[z.TD,z.TH],zr=1,Br=2,Vr=4,Hr=8,Ur=16,Wr=32,Gr=new Uint8Array(Mr);for(let[e,t]of[[L.HTML,0],[L.SVG,Ar],[L.MATHML,jr]])for(let n of pr[e])Gr[t+n]=e===L.HTML&&(n===z.ADDRESS||n===z.DIV||n===z.P)?zr:3;for(let e of[z.APPLET,z.CAPTION,z.HTML,z.MARQUEE,z.OBJECT,z.TABLE,z.TD,z.TEMPLATE,z.TH,Ar+z.DESC,Ar+z.FOREIGN_OBJECT,Ar+z.TITLE,jr+z.ANNOTATION_XML,jr+z.MI,jr+z.MN,jr+z.MO,jr+z.MS,jr+z.MTEXT])Gr[e]|=28;Gr[z.OL]|=Hr,Gr[z.UL]|=Hr,Gr[z.BUTTON]|=Ur,Gr[z.TABLE]|=Wr,Gr[z.HTML]|=Wr;var Kr=new Uint8Array(Mr);for(let e of[z.A,z.B,z.BIG,z.CODE,z.EM,z.FONT,z.I,z.NOBR,z.S,z.SMALL,z.STRIKE,z.STRONG,z.TT,z.U])Kr[e]=1;function qr(e,t){if(t===z.UNKNOWN)return-1;switch(e){case L.HTML:return t;case L.SVG:return Ar+t;case L.MATHML:return jr+t;default:return-1}}var Jr=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,t,n){this.treeAdapter=t,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.depth=0,this.tmplCount=0,this.currentTagId=z.UNKNOWN,this.indexed=!1,this.below=[],this.above=[],this.keys=[],this.keyPrev=[],this.keyNext=[],this.keyTops=new Int32Array,this.specials=[],this.listItemBoundaries=[],this.scopeBoundaries=[],this.htmlSlots=[],this.formattingSlots=new Map,this.current=e}_indexOf(e){if(this.indexed){let t=this.formattingSlots.get(e);if(t!==void 0)return t;if(Kr[fr(this.treeAdapter.getTagName(e))])return-1}return this.items.lastIndexOf(e,this.stackTop)}slotBelow(e){return this.indexed?this.below[e]:e-1}slotAbove(e){return this.indexed?this.above[e]:e===this.stackTop?-1:e+1}_isInTemplate(){return this.currentTagId===z.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===L.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}_nameKey(e,t,n){let r=`${e} ${t}`,i=this.nameKeys?.get(r);if(i===void 0&&n&&(this.nameKeys??=new Map,i=Mr+this.nameKeys.size,this.nameKeys.set(r,i),i===this.keyTops.length)){let e=new Int32Array(2*i).fill(-1);e.set(this.keyTops),this.keyTops=e}return i??-1}_indexAll(){this.indexed=!0,this.keyTops=new Int32Array(Mr).fill(-1);for(let e=0;e<=this.stackTop;e++)this._index(e,e-1)}_index(e,t){let n=this.items[e],r=this.tagIDs[e],i=this.treeAdapter.getNamespaceURI(n),a=qr(i,r);a===-1&&(a=this._nameKey(i,this.treeAdapter.getTagName(n),!0));let o=this.keyTops[a];this.keys[e]=a,this.keyPrev[e]=o,this.keyNext[e]=-1,o!==-1&&(this.keyNext[o]=e),this.keyTops[a]=e,this.above[e]=-1,this._link(e,t,i===L.HTML),Kr[r]&&this.formattingSlots.set(n,e)}_link(e,t,n){let r=this.keys[e],i=r<Mr?Gr[r]:0;this.below[e]=t,t===-1?(this.specials[e]=i&zr,this.listItemBoundaries[e]=(i&Br)>>1,this.scopeBoundaries[e]=(i&Vr)>>2,this.htmlSlots[e]=n?e:-1):(this.above[t]=e,this.specials[e]=this.specials[t]+(i&zr),this.listItemBoundaries[e]=this.listItemBoundaries[t]+((i&Br)>>1),this.scopeBoundaries[e]=this.scopeBoundaries[t]+((i&Vr)>>2),this.htmlSlots[e]=n?e:this.htmlSlots[t])}_unindex(e){let t=this.keys[e],n=this.keyPrev[e],r=this.keyNext[e];n!==-1&&(this.keyNext[n]=r),r===-1?this.keyTops[t]=n:this.keyPrev[r]=n,Kr[this.tagIDs[e]]&&this.formattingSlots.delete(this.items[e])}_move(e,t){let n=this.items[e],r=this.keys[e],i=this.keyPrev[e],a=this.keyNext[e];this.items[t]=n,this.tagIDs[t]=this.tagIDs[e],this.keys[t]=r,this.keyPrev[t]=i,this.keyNext[t]=a,i!==-1&&(this.keyNext[i]=t),a===-1?this.keyTops[r]=t:this.keyPrev[a]=t,Kr[this.tagIDs[t]]&&this.formattingSlots.set(n,t)}indexOfTopmost(e){if(this.indexed)return this.keyTops[e];for(let t=this.stackTop;t>=0;t--)if(this.tagIDs[t]===e&&this.treeAdapter.getNamespaceURI(this.items[t])===L.HTML)return t;return-1}indexOfTopmostOf(e){if(this.indexed){let t=-1;for(let n of e)this.keyTops[n]>t&&(t=this.keyTops[n]);return t}for(let t=this.stackTop;t>=0;t--)if(e.includes(this.tagIDs[t])&&this.treeAdapter.getNamespaceURI(this.items[t])===L.HTML)return t;return-1}indexOfTopmostByName(e,t){if(this.indexed){let n=qr(e,fr(t));return n===-1&&(n=this._nameKey(e,t,!1)),n===-1?-1:this.keyTops[n]}for(let n=this.stackTop;n>=0;n--){let r=this.items[n];if(this.treeAdapter.getTagName(r)===t&&this.treeAdapter.getNamespaceURI(r)===e)return n}return-1}indexOfTopmostHtmlElement(){if(this.indexed)return this.stackTop===-1?-1:this.htmlSlots[this.stackTop];let e=this.stackTop;for(;e>=0&&this.treeAdapter.getNamespaceURI(this.items[e])!==L.HTML;)e--;return e}_hasAbove(e,t){for(let n=this.stackTop;n>e;n--){let e=qr(this.treeAdapter.getNamespaceURI(this.items[n]),this.tagIDs[n]);if(e!==-1&&Gr[e]&t)return!0}return!1}hasSpecialElementAbove(e){return this.indexed?this.specials[this.stackTop]!==this.specials[e]:this._hasAbove(e,zr)}hasListItemBoundaryAbove(e){return this.indexed?this.listItemBoundaries[this.stackTop]!==this.listItemBoundaries[e]:this._hasAbove(e,Br)}push(e,t){let n=this.stackTop;this.stackTop++,this.depth++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this.indexed?this._index(this.stackTop,n):this.depth===kr&&this._indexAll(),this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}_popCurrent(){this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.indexed?(this._unindex(this.stackTop),this.stackTop=this.below[this.stackTop],this.stackTop!==-1&&(this.above[this.stackTop]=-1)):this.stackTop--,this.depth--,this._updateCurrentElement()}pop(){let e=this.current;this._popCurrent(),this.handler.onItemPop(e,!0)}replace(e,t){let n=this._indexOf(e);this.items[n]=t,this.indexed&&Kr[this.tagIDs[n]]&&(this.formattingSlots.delete(e),this.formattingSlots.set(t,n)),n===this.stackTop&&(this.current=t)}replaceFormattingElement(e,t,n,r){let i=this.items[e];if(!this.indexed){this.items.splice(e,1),this.tagIDs.splice(e,1),this.handler.onItemPop(i,!1),this.items.splice(t,0,n),this.tagIDs.splice(t,0,r),t===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,t===this.stackTop);return}let a=this.keys[e],o=this.below[e],s=this.above[t],c=[];for(let n=this.above[e];n!==t;n=this.above[n])c.push(n);let l=this.keyNext[e];this._unindex(e),this.items[e]=void 0,this.handler.onItemPop(i,!1);let u=t-1;for(;c.length>0&&c[c.length-1]===u;)c.pop(),u--;for(let e=u+1;e<=t;e++)this._move(e,e-1);let d=l===-1?this.keyTops[a]:this.keyPrev[l];this.items[t]=n,this.tagIDs[t]=r,this.keys[t]=a,this.keyPrev[t]=d,this.keyNext[t]=l,d!==-1&&(this.keyNext[d]=t),l===-1?this.keyTops[a]=t:this.keyPrev[l]=t,Kr[r]&&this.formattingSlots.set(n,t);let f=o;for(let e of c)this._link(e,f,!0),f=e;for(let e=u;e<t;e++)this._link(e,f,!0),f=e;this._link(t,f,!0),s===-1&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===-1)}popUntilTagNamePopped(e){this.shortenToLength(Math.max(this.indexOfTopmost(e),0))}shortenToLength(e){for(;this.stackTop>=e;){let t=this.current;this._popCurrent(),this.handler.onItemPop(t,this.stackTop<e)}}popUntilElementPopped(e){let t=this._indexOf(e);this.shortenToLength(Math.max(t,0))}popUntilNumberedHeaderPopped(){this.shortenToLength(Math.max(this.indexOfTopmostOf(Nr),0))}popUntilTableCellPopped(){this.shortenToLength(Math.max(this.indexOfTopmostOf(Rr),0))}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}clearBackToTableContext(){this.shortenToLength(this.indexOfTopmostOf(Lr)+1)}clearBackToTableBodyContext(){this.shortenToLength(this.indexOfTopmostOf(Ir)+1)}clearBackToTableRowContext(){this.shortenToLength(this.indexOfTopmostOf(Fr)+1)}remove(e){let t=this._indexOf(e);t!==-1&&this.removeAt(t)}removeAt(e){if(e===this.stackTop){this.pop();return}let t=this.items[e];if(this.depth--,this.indexed){let t=this.keys[e]<Mr?Gr[this.keys[e]]:0,n=this.below[e],r=this.above[e];if(this._unindex(e),this.items[e]=void 0,this.below[r]=n,n!==-1&&(this.above[n]=r),t!==0)for(let e=r;e!==-1;e=this.above[e])this.specials[e]-=t&zr,this.listItemBoundaries[e]-=(t&Br)>>1,this.scopeBoundaries[e]-=(t&Vr)>>2;let i=n===-1?-1:this.htmlSlots[n];for(let t=r;t!==-1&&this.htmlSlots[t]===e;t=this.above[t])this.htmlSlots[t]=i}else this.items.splice(e,1),this.tagIDs.splice(e,1),this.stackTop--,this._updateCurrentElement();this.handler.onItemPop(t,!1)}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===z.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e),n=t===-1?-1:this.slotBelow(t);return n===-1?null:this.items[n]}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===z.HTML}_isInScope(e,t){let n=-1;switch(t){case Hr:n=Math.max(this.keyTops[z.OL],this.keyTops[z.UL]);break;case Ur:n=this.keyTops[z.BUTTON];break;case Wr:return n=Math.max(this.keyTops[z.TABLE],this.keyTops[z.HTML]),e===-1?n===-1:e>=n}return e===-1?n===-1&&(this.stackTop===-1||this.scopeBoundaries[this.stackTop]===0):e>=n&&this.scopeBoundaries[this.stackTop]===this.scopeBoundaries[e]}_scanScope(e,t,n,r){for(let i=this.stackTop;i>=0;i--){let a=qr(this.treeAdapter.getNamespaceURI(this.items[i]),this.tagIDs[i]);if(a!==-1){if((t?t.includes(a):a===e)&&(!r||this.items[i]===r))return!0;if(Gr[a]&n)return!1}}return!0}hasInScope(e,t){return this.indexed?this._isInScope(t?this._indexOf(t):this.keyTops[e],Vr):this._scanScope(e,null,Vr,t)}hasInListItemScope(e){return this.indexed?this._isInScope(this.keyTops[e],Hr):this._scanScope(e,null,Hr)}hasInButtonScope(e){return this.indexed?this._isInScope(this.keyTops[e],Ur):this._scanScope(e,null,Ur)}hasNumberedHeaderInScope(){return this.indexed?this._isInScope(this.indexOfTopmostOf(Nr),Vr):this._scanScope(z.UNKNOWN,Nr,Vr)}hasInTableScope(e){return this.indexed?this._isInScope(this.keyTops[e],Wr):this._scanScope(e,null,Wr)}hasTableBodyContextInTableScope(){return this.indexed?this._isInScope(this.indexOfTopmostOf(Pr),Wr):this._scanScope(z.UNKNOWN,Pr,Wr)}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t=this.slotBelow(t))if(this.treeAdapter.getNamespaceURI(this.items[t])===L.HTML)switch(this.tagIDs[t]){case e:return!0;case z.OPTION:case z.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Dr.has(this.currentTagId)&&this.treeAdapter.getNamespaceURI(this.current)===L.HTML;)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Or.has(this.currentTagId)&&this.treeAdapter.getNamespaceURI(this.current)===L.HTML;)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&Or.has(this.currentTagId)&&this.treeAdapter.getNamespaceURI(this.current)===L.HTML;)this.pop()}},Yr=3,Xr;(function(e){e[e.Marker=0]=`Marker`,e[e.Element=1]=`Element`})(Xr||={});var Zr=class{constructor(){this.newest=null,this.bookmark=null,this.index=null,this.elementEntries=new Map}_insertElementEntry(e,t,n){let r=n===null?null:n.newer,i={type:Xr.Element,element:e,token:t,older:n,newer:r,ark:null,olderSameTag:null,newerSameTag:null};return r===null?this.newest=i:r.older=i,n!==null&&(n.newer=i),this.index===null?null:this._addToIndex(this.index,i)}_addToIndex(e,t){let{tagName:n,attrs:r}=t.token,i=n+r.map(({name:e,value:t})=>`\0${e}\0${t}`).sort().join(``),a=e.arks.get(i);a===void 0&&(a={entries:[],key:i},e.arks.set(i,a)),a.entries.push(t),t.ark=a,this.elementEntries.set(t.element,t);let o=e.tagNames.get(n);return o===void 0&&(o={olderSameTag:null},e.tagNames.set(n,o)),t.olderSameTag=o.olderSameTag,t.newerSameTag=o,o.olderSameTag!==null&&(o.olderSameTag.newerSameTag=t),o.olderSameTag=t,a}insertMarker(){if(this.index===null)for(let e=this.newest;e!==null&&e.type===Xr.Element;e=e.older)this.elementEntries.set(e.element,e);let e={type:Xr.Marker,older:this.newest,newer:null,outerIndex:this.index};this.newest!==null&&(this.newest.newer=e),this.newest=e,this.index=null}pushElement(e,t){if(this.index===null){let e=null,t=0;for(let n=this.newest;n!==null&&n.type===Xr.Element;n=n.older)e=n,t++;if(t>=Yr){this.index={arks:new Map,tagNames:new Map};for(let t=e;t!==null&&t.type===Xr.Element;t=t.newer)this._addToIndex(this.index,t)}}let n=this._insertElementEntry(e,t,this.newest);n!==null&&n.entries.length>Yr&&this.removeEntry(n.entries[0])}insertElementAfterBookmark(e,t){let{bookmark:n}=this;this.bookmark=null,this._insertElementEntry(e,t,n)}removeEntry(e){var t;if(!(e.newer===null?this.newest!==e:e.newer.older!==e)){if(this.elementEntries.delete(e.element),e.newer===null?this.newest=e.older:e.newer.older=e.older,e.older!==null&&(e.older.newer=e.newer),e.ark!==null){let{entries:n,key:r}=e.ark;n.splice(n.indexOf(e),1),n.length===0&&((t=this.index)==null||t.arks.delete(r))}e.newerSameTag!==null&&(e.newerSameTag.olderSameTag=e.olderSameTag,e.olderSameTag!==null&&(e.olderSameTag.newerSameTag=e.newerSameTag))}}replaceElement(e,t){this.elementEntries.delete(e.element)&&this.elementEntries.set(t,e),e.element=t}clearToLastMarker(){let e=this.newest;for(;e!==null&&e.type===Xr.Element;e=e.older)this.elementEntries.delete(e.element);this.newest=e===null?null:e.older,this.index=e===null?null:e.outerIndex,this.newest!==null&&(this.newest.newer=null)}getElementEntryInScopeWithTagName(e){if(this.index!==null)return this.index.tagNames.get(e)?.olderSameTag??null;for(let t=this.newest;t!==null&&t.type===Xr.Element;t=t.older)if(t.token.tagName===e)return t;return null}getElementEntry(e){if(this.index===null){for(let t=this.newest;t!==null&&t.type===Xr.Element;t=t.older)if(t.element===e)return t}return this.elementEntries.get(e)}},Qr=new WeakMap,$r={createDocument(){return{nodeName:`#document`,mode:ur.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:`#document-fragment`,childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:`#comment`,data:e,parentNode:null}},createTextNode(e){return{nodeName:`#text`,value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){let{childNodes:r}=e,i=r[r.length-1]===n?r.length-1:r.indexOf(n);r.splice(i,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){let i=e.childNodes.find(e=>e.nodeName===`#documentType`);if(i)i.name=t,i.publicId=n,i.systemId=r;else{let i={nodeName:`#documentType`,name:t,publicId:n,systemId:r,parentNode:null};$r.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let{childNodes:t}=e.parentNode,n=t[t.length-1]===e?t.length-1:t.indexOf(e);t.splice(n,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let n=e.childNodes[e.childNodes.length-1];if($r.isTextNode(n)){n.value+=t;return}}$r.appendChild(e,$r.createTextNode(t))},insertTextBefore(e,t,n){let{childNodes:r}=e,i=r[(r[r.length-1]===n?r.length-1:r.indexOf(n))-1];i&&$r.isTextNode(i)?i.value+=t:$r.insertBefore(e,$r.createTextNode(t),n)},adoptAttributes(e,t){if(t.length===0||t===e.attrs)return;let n=Qr.get(e.attrs),r=n?.size===e.attrs.length&&t.every(({name:t})=>{let r=n.get(t);return r===void 0||e.attrs[r]?.name===t}),i=r?n:new Map;if(!r){for(let t=0;t<e.attrs.length;t++){let n=e.attrs[t];n!==void 0&&i.set(n.name,t)}Qr.set(e.attrs,i)}let a=e.attrs.length;for(let n=0;n<t.length;n++)i.has(t[n].name)||e.attrs.push(t[n]);for(let t=a;t<e.attrs.length;t++)i.set(e.attrs[t].name,t);i.size!==e.attrs.length&&Qr.delete(e.attrs)},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName===`#text`},isCommentNode(e){return e.nodeName===`#comment`},isDocumentTypeNode(e){return e.nodeName===`#documentType`},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,`tagName`)},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},ei=`html`,ti=`about:legacy-compat`,ni=`http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd`,ri=`+//silmaril//dtd html pro v0r11 19970101//,-//as//dtd html 3.0 aswedit + extensions//,-//advasoft ltd//dtd html 3.0 aswedit + extensions//,-//ietf//dtd html 2.0 level 1//,-//ietf//dtd html 2.0 level 2//,-//ietf//dtd html 2.0 strict level 1//,-//ietf//dtd html 2.0 strict level 2//,-//ietf//dtd html 2.0 strict//,-//ietf//dtd html 2.0//,-//ietf//dtd html 2.1e//,-//ietf//dtd html 3.0//,-//ietf//dtd html 3.2 final//,-//ietf//dtd html 3.2//,-//ietf//dtd html 3//,-//ietf//dtd html level 0//,-//ietf//dtd html level 1//,-//ietf//dtd html level 2//,-//ietf//dtd html level 3//,-//ietf//dtd html strict level 0//,-//ietf//dtd html strict level 1//,-//ietf//dtd html strict level 2//,-//ietf//dtd html strict level 3//,-//ietf//dtd html strict//,-//ietf//dtd html//,-//metrius//dtd metrius presentational//,-//microsoft//dtd internet explorer 2.0 html strict//,-//microsoft//dtd internet explorer 2.0 html//,-//microsoft//dtd internet explorer 2.0 tables//,-//microsoft//dtd internet explorer 3.0 html strict//,-//microsoft//dtd internet explorer 3.0 html//,-//microsoft//dtd internet explorer 3.0 tables//,-//netscape comm. corp.//dtd html//,-//netscape comm. corp.//dtd strict html//,-//o'reilly and associates//dtd html 2.0//,-//o'reilly and associates//dtd html extended 1.0//,-//o'reilly and associates//dtd html extended relaxed 1.0//,-//sq//dtd html 2.0 hotmetal + extensions//,-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//,-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//,-//spyglass//dtd html 2.0 extended//,-//sun microsystems corp.//dtd hotjava html//,-//sun microsystems corp.//dtd hotjava strict html//,-//w3c//dtd html 3 1995-03-24//,-//w3c//dtd html 3.2 draft//,-//w3c//dtd html 3.2 final//,-//w3c//dtd html 3.2//,-//w3c//dtd html 3.2s draft//,-//w3c//dtd html 4.0 frameset//,-//w3c//dtd html 4.0 transitional//,-//w3c//dtd html experimental 19960712//,-//w3c//dtd html experimental 970421//,-//w3c//dtd w3 html//,-//w3o//dtd w3 html 3.0//,-//webtechs//dtd mozilla html 2.0//,-//webtechs//dtd mozilla html//`.split(`,`),ii=[...ri,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`],ai=new Set([`-//w3o//dtd w3 html strict 3.0//en//`,`-/w3c/dtd html 4.0 transitional/en`,`html`]),oi=[`-//w3c//dtd xhtml 1.0 frameset//`,`-//w3c//dtd xhtml 1.0 transitional//`],si=[...oi,`-//w3c//dtd html 4.01 frameset//`,`-//w3c//dtd html 4.01 transitional//`];function ci(e,t){return t.some(t=>e.startsWith(t))}function li(e){return e.name===ei&&e.publicId===null&&(e.systemId===null||e.systemId===ti)}function ui(e){if(e.name!==ei)return ur.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===ni)return ur.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),ai.has(n))return ur.QUIRKS;let e=t===null?ii:ri;if(ci(n,e))return ur.QUIRKS;if(e=t===null?oi:si,ci(n,e))return ur.LIMITED_QUIRKS}return ur.NO_QUIRKS}var di={TEXT_HTML:`text/html`,APPLICATION_XML:`application/xhtml+xml`},fi=`definitionurl`,pi=`definitionURL`,mi=new Map(`attributeName.attributeType.baseFrequency.baseProfile.calcMode.clipPathUnits.diffuseConstant.edgeMode.filterUnits.glyphRef.gradientTransform.gradientUnits.kernelMatrix.kernelUnitLength.keyPoints.keySplines.keyTimes.lengthAdjust.limitingConeAngle.markerHeight.markerUnits.markerWidth.maskContentUnits.maskUnits.numOctaves.pathLength.patternContentUnits.patternTransform.patternUnits.pointsAtX.pointsAtY.pointsAtZ.preserveAlpha.preserveAspectRatio.primitiveUnits.refX.refY.repeatCount.repeatDur.requiredExtensions.requiredFeatures.specularConstant.specularExponent.spreadMethod.startOffset.stdDeviation.stitchTiles.surfaceScale.systemLanguage.tableValues.targetX.targetY.textLength.viewBox.viewTarget.xChannelSelector.yChannelSelector.zoomAndPan`.split(`.`).map(e=>[e.toLowerCase(),e])),hi=new Map([[`xlink:actuate`,{prefix:`xlink`,name:`actuate`,namespace:L.XLINK}],[`xlink:arcrole`,{prefix:`xlink`,name:`arcrole`,namespace:L.XLINK}],[`xlink:href`,{prefix:`xlink`,name:`href`,namespace:L.XLINK}],[`xlink:role`,{prefix:`xlink`,name:`role`,namespace:L.XLINK}],[`xlink:show`,{prefix:`xlink`,name:`show`,namespace:L.XLINK}],[`xlink:title`,{prefix:`xlink`,name:`title`,namespace:L.XLINK}],[`xlink:type`,{prefix:`xlink`,name:`type`,namespace:L.XLINK}],[`xml:lang`,{prefix:`xml`,name:`lang`,namespace:L.XML}],[`xml:space`,{prefix:`xml`,name:`space`,namespace:L.XML}],[`xmlns`,{prefix:``,name:`xmlns`,namespace:L.XMLNS}],[`xmlns:xlink`,{prefix:`xmlns`,name:`xlink`,namespace:L.XMLNS}]]),gi=new Map(`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.textPath`.split(`.`).map(e=>[e.toLowerCase(),e])),_i=new Set([z.B,z.BIG,z.BLOCKQUOTE,z.BODY,z.BR,z.CENTER,z.CODE,z.DD,z.DIV,z.DL,z.DT,z.EM,z.EMBED,z.H1,z.H2,z.H3,z.H4,z.H5,z.H6,z.HEAD,z.HR,z.I,z.IMG,z.LI,z.LISTING,z.MENU,z.META,z.NOBR,z.OL,z.P,z.PRE,z.RUBY,z.S,z.SMALL,z.SPAN,z.STRONG,z.STRIKE,z.SUB,z.SUP,z.TABLE,z.TT,z.U,z.UL,z.VAR]);function vi(e){let t=e.tagID;return t===z.FONT&&e.attrs.some(({name:e})=>e===lr.COLOR||e===lr.SIZE||e===lr.FACE)||_i.has(t)}function yi(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===fi){e.attrs[t].name=pi;break}}function bi(e){for(let t=0;t<e.attrs.length;t++){let n=mi.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function xi(e){for(let t=0;t<e.attrs.length;t++){let n=hi.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function Si(e){let t=gi.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=fr(e.tagName))}function Ci(e,t){return t===L.MATHML&&(e===z.MI||e===z.MO||e===z.MN||e===z.MS||e===z.MTEXT)}function wi(e,t,n){if(t===L.MATHML&&e===z.ANNOTATION_XML){for(let e=0;e<n.length;e++)if(n[e].name===lr.ENCODING){let t=n[e].value.toLowerCase();return t===di.TEXT_HTML||t===di.APPLICATION_XML}}return t===L.SVG&&(e===z.FOREIGN_OBJECT||e===z.DESC||e===z.TITLE)}function Ti(e,t,n,r){return(!r||r===L.HTML)&&wi(e,t,n)||(!r||r===L.MATHML)&&Ci(e,t)}var Ei=[z.TR,z.TBODY,z.THEAD,z.TFOOT,z.CAPTION,z.COLGROUP,z.TABLE,z.FRAMESET,z.SELECT,z.TEMPLATE,z.TD,z.TH,z.HEAD,z.BODY,z.HTML],Di=`hidden`,Oi=[],ki=8,Ai=3,H;(function(e){e[e.INITIAL=0]=`INITIAL`,e[e.BEFORE_HTML=1]=`BEFORE_HTML`,e[e.BEFORE_HEAD=2]=`BEFORE_HEAD`,e[e.IN_HEAD=3]=`IN_HEAD`,e[e.IN_HEAD_NO_SCRIPT=4]=`IN_HEAD_NO_SCRIPT`,e[e.AFTER_HEAD=5]=`AFTER_HEAD`,e[e.IN_BODY=6]=`IN_BODY`,e[e.TEXT=7]=`TEXT`,e[e.IN_TABLE=8]=`IN_TABLE`,e[e.IN_TABLE_TEXT=9]=`IN_TABLE_TEXT`,e[e.IN_CAPTION=10]=`IN_CAPTION`,e[e.IN_COLUMN_GROUP=11]=`IN_COLUMN_GROUP`,e[e.IN_TABLE_BODY=12]=`IN_TABLE_BODY`,e[e.IN_ROW=13]=`IN_ROW`,e[e.IN_CELL=14]=`IN_CELL`,e[e.IN_SELECT=15]=`IN_SELECT`,e[e.IN_SELECT_IN_TABLE=16]=`IN_SELECT_IN_TABLE`,e[e.IN_TEMPLATE=17]=`IN_TEMPLATE`,e[e.AFTER_BODY=18]=`AFTER_BODY`,e[e.IN_FRAMESET=19]=`IN_FRAMESET`,e[e.AFTER_FRAMESET=20]=`AFTER_FRAMESET`,e[e.AFTER_AFTER_BODY=21]=`AFTER_AFTER_BODY`,e[e.AFTER_AFTER_FRAMESET=22]=`AFTER_AFTER_FRAMESET`})(H||={});var ji={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Mi=new Set([z.TABLE,z.TBODY,z.TFOOT,z.THEAD,z.TR]),Ni={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:$r,onParseError:null},Pi=class{constructor(e,t,n=null,r=null){this.fragmentContext=n,this.scriptHandler=r,this.currentToken=null,this.stopped=!1,this.insertionMode=H.INITIAL,this.originalInsertionMode=H.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...Ni,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=t??this.treeAdapter.createDocument(),this.tokenizer=new Er(this.options,this),this.activeFormattingElements=new Zr,this.fragmentContextID=n?fr(this.treeAdapter.getTagName(n)):z.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new Jr(this.document,this.treeAdapter,this)}static parse(e,t){let n=new this(t);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,t){let n={...Ni,...t};e??=n.treeAdapter.createElement(R.TEMPLATE,L.HTML,[]);let r=n.treeAdapter.createElement(`documentmock`,L.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===z.TEMPLATE&&i.tmplInsertionModeStack.push(H.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){let e=this.treeAdapter.getFirstChild(this.document),t=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,t),t}_err(e,t,n){if(!this.onParseError)return;let r=e.location??ji,i={code:t,startLine:r.startLine,startCol:r.startCol,startOffset:r.startOffset,endLine:n?r.startLine:r.endLine,endCol:n?r.startCol:r.endCol,endOffset:n?r.startOffset:r.endOffset};this.onParseError(i)}onItemPush(e,t,n){var r,i;(i=(r=this.treeAdapter).onItemPush)==null||i.call(r,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,t)}onItemPop(e,t){var n,r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(r=(n=this.treeAdapter).onItemPop)==null||r.call(n,e,this.openElements.current),(i=this.annotationXmlIntegrationPoints)==null||i.delete(e),t){let e,t;this.openElements.stackTop===0&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):{current:e,currentTagId:t}=this.openElements,this._setContextModes(e,t)}}_setContextModes(e,t){let n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===L.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&t!==void 0&&!this._isIntegrationPoint(t,e)}_switchToTextParsing(e,t){this._insertElement(e,L.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=H.TEXT}switchToPlaintextParsing(){this.insertionMode=H.TEXT,this.originalInsertionMode=H.IN_BODY,this.tokenizer.state=gr.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===R.FORM&&this.treeAdapter.getNamespaceURI(e)===L.HTML){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===L.HTML)switch(this.fragmentContextID){case z.TITLE:case z.TEXTAREA:this.tokenizer.state=gr.RCDATA;break;case z.STYLE:case z.XMP:case z.IFRAME:case z.NOEMBED:case z.NOFRAMES:case z.NOSCRIPT:this.tokenizer.state=gr.RAWTEXT;break;case z.SCRIPT:this.tokenizer.state=gr.SCRIPT_DATA;break;case z.PLAINTEXT:this.tokenizer.state=gr.PLAINTEXT}}_setDocumentType(e){let t=e.name||``,n=e.publicId||``,r=e.systemId||``;if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){let t=this.treeAdapter.getChildNodes(this.document).find(e=>this.treeAdapter.isDocumentTypeNode(e));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}_attachElementToTree(e,t,n){if(this.options.sourceCodeLocationInfo){let n=t&&{...t,startTag:t};this.treeAdapter.setNodeSourceCodeLocation(e,n)}n.beforeElement?this.treeAdapter.insertBefore(n.parent,e,n.beforeElement):this.treeAdapter.appendChild(n.parent,e)}_getInsertionLocation(){return this._shouldFosterParentOnInsertion()?this._findFosterParentingLocation():{parent:this.openElements.currentTmplContentOrNode??this.document,beforeElement:null}}_createElement(e,t,n,r){var i,a;let o=this.treeAdapter.createElement(e,t,n);return(a=(i=this.treeAdapter).onElementCreated)==null||a.call(i,o,{intendedParent:r,formElement:this.formElement,isInTemplate:this.openElements.tmplCount>0}),o}_appendElement(e,t){let n=this._getInsertionLocation(),r=this._createElement(e.tagName,t,e.attrs,n.parent);this._attachElementToTree(r,e.location,n)}_insertElement(e,t){let n=this._getInsertionLocation(),r=this._createElement(e.tagName,t,e.attrs,n.parent);this._attachElementToTree(r,e.location,n),this.openElements.push(r,e.tagID)}_insertFakeElement(e,t){let n=this._getInsertionLocation(),r=this._createElement(e,L.HTML,[],n.parent);this._attachElementToTree(r,null,n),this.openElements.push(r,t)}_insertTemplate(e){let t=this._getInsertionLocation(),n=this._createElement(e.tagName,L.HTML,e.attrs,t.parent),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,e.location,t),this.openElements.push(n,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){let e=this._createElement(R.HTML,L.HTML,[],this.document);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.document,e),this.openElements.push(e,z.HTML)}_appendCommentNode(e,t){let n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let t,n;if(this._shouldFosterParentOnInsertion()?({parent:t,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;let r=this.treeAdapter.getChildNodes(t),i=r[(n?r.lastIndexOf(n):r.length)-1];if(this.treeAdapter.getNodeSourceCodeLocation(i)){let{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(i,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(i,e.location)}_adoptNodes(e,t){let n=[...this.treeAdapter.getChildNodes(e)];for(let e=n.length-1;e>=0;e--)this.treeAdapter.detachNode(n[e]);for(let e of n)this.treeAdapter.appendChild(t,e)}_setEndLocation(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){let n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===I.END_TAG&&r===t.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let t,n;return this.openElements.stackTop===0&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):{current:t,currentTagId:n}=this.openElements,e.tagID===z.SVG&&this.treeAdapter.getTagName(t)===R.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(t)===L.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===z.MGLYPH||e.tagID===z.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,t,L.HTML)}_processToken(e){switch(e.type){case I.CHARACTER:this.onCharacter(e);break;case I.NULL_CHARACTER:this.onNullCharacter(e);break;case I.COMMENT:this.onComment(e);break;case I.DOCTYPE:this.onDoctype(e);break;case I.START_TAG:this._processStartTag(e);break;case I.END_TAG:this.onEndTag(e);break;case I.EOF:this.onEof(e);break;case I.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}_isIntegrationPoint(e,t,n){let r=this.treeAdapter.getNamespaceURI(t);if(e===z.ANNOTATION_XML&&r===L.MATHML&&n!==L.MATHML){let n=this.annotationXmlIntegrationPoints??=new Map,i=n.get(t);return i===void 0&&(i=Ti(e,r,this.treeAdapter.getAttrList(t)),n.set(t,i)),i}return Ti(e,r,Oi,n)}_reconstructActiveFormattingElements(){let e=null;for(let t=this.activeFormattingElements.newest;t!==null&&t.type===Xr.Element&&!this.openElements.contains(t.element);t=t.older)e=t;for(let t=e;t!==null&&t.type===Xr.Element;t=t.newer)this._insertElement(t.token,this.treeAdapter.getNamespaceURI(t.element)),this.activeFormattingElements.replaceElement(t,this.openElements.current)}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=H.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(z.P),this.openElements.popUntilTagNamePopped(z.P)}_resetInsertionMode(){let e=this.openElements.indexOfTopmostOf(Ei),t=e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e],n=e===0&&this.fragmentContext?this.fragmentContext:this.openElements.items[e];if(n!==void 0&&this.treeAdapter.getNamespaceURI(n)===L.HTML)switch(t){case z.TR:this.insertionMode=H.IN_ROW;return;case z.TBODY:case z.THEAD:case z.TFOOT:this.insertionMode=H.IN_TABLE_BODY;return;case z.CAPTION:this.insertionMode=H.IN_CAPTION;return;case z.COLGROUP:this.insertionMode=H.IN_COLUMN_GROUP;return;case z.TABLE:this.insertionMode=H.IN_TABLE;return;case z.BODY:this.insertionMode=H.IN_BODY;return;case z.FRAMESET:this.insertionMode=H.IN_FRAMESET;return;case z.SELECT:this._resetInsertionModeForSelect(e);return;case z.TEMPLATE:this.insertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStack.length-1];return;case z.HTML:this.insertionMode=this.headElement?H.AFTER_HEAD:H.BEFORE_HEAD;return;case z.TD:case z.TH:if(e>0){this.insertionMode=H.IN_CELL;return}break;case z.HEAD:if(e>0){this.insertionMode=H.IN_HEAD;return}}this.insertionMode=H.IN_BODY}_resetInsertionModeForSelect(e){if(e>0){let e=this.openElements.indexOfTopmost(z.TABLE);if(e>0&&e>this.openElements.indexOfTopmost(z.TEMPLATE)){this.insertionMode=H.IN_SELECT_IN_TABLE;return}}this.insertionMode=H.IN_SELECT}_isElementCausesFosterParenting(e){return Mi.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){let{openElements:e}=this,t=e.indexOfTopmost(z.TABLE),n=e.indexOfTopmost(z.TEMPLATE);if(n>t)return{parent:this.treeAdapter.getTemplateContent(e.items[n]),beforeElement:null};if(t!==-1){let n=e.items[t],r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:e.items[e.slotBelow(t)],beforeElement:null}}return{parent:e.items[0],beforeElement:null}}_fosterParentElement(e){let t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}_isSpecialElement(e,t){return pr[this.treeAdapter.getNamespaceURI(e)].has(t)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)$o(this,e);else switch(this.insertionMode){case H.INITIAL:qi(this,e);break;case H.BEFORE_HTML:Xi(this,e);break;case H.BEFORE_HEAD:$i(this,e);break;case H.IN_HEAD:ra(this,e);break;case H.IN_HEAD_NO_SCRIPT:oa(this,e);break;case H.AFTER_HEAD:la(this,e);break;case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:fa(this,e);break;case H.TEXT:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:so(this,e);break;case H.IN_TABLE_TEXT:xo(this,e);break;case H.IN_COLUMN_GROUP:Oo(this,e);break;case H.AFTER_BODY:Wo(this,e);break;case H.AFTER_AFTER_BODY:Xo(this,e)}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)Qo(this,e);else switch(this.insertionMode){case H.INITIAL:qi(this,e);break;case H.BEFORE_HTML:Xi(this,e);break;case H.BEFORE_HEAD:$i(this,e);break;case H.IN_HEAD:ra(this,e);break;case H.IN_HEAD_NO_SCRIPT:oa(this,e);break;case H.AFTER_HEAD:la(this,e);break;case H.TEXT:this._insertCharacters(e);break;case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:so(this,e);break;case H.IN_COLUMN_GROUP:Oo(this,e);break;case H.AFTER_BODY:Wo(this,e);break;case H.AFTER_AFTER_BODY:Xo(this,e)}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)Hi(this,e);else switch(this.insertionMode){case H.INITIAL:case H.BEFORE_HTML:case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_TEMPLATE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:Hi(this,e);break;case H.IN_TABLE_TEXT:So(this,e);break;case H.AFTER_BODY:Ui(this,e);break;case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:Wi(this,e)}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case H.INITIAL:Ki(this,e);break;case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:this._err(e,F.misplacedDoctype);break;case H.IN_TABLE_TEXT:So(this,e)}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,F.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?ts(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case H.INITIAL:qi(this,e);break;case H.BEFORE_HTML:Ji(this,e);break;case H.BEFORE_HEAD:Zi(this,e);break;case H.IN_HEAD:ea(this,e);break;case H.IN_HEAD_NO_SCRIPT:ia(this,e);break;case H.AFTER_HEAD:sa(this,e);break;case H.IN_BODY:Ga(this,e);break;case H.IN_TABLE:_o(this,e);break;case H.IN_TABLE_TEXT:So(this,e);break;case H.IN_CAPTION:wo(this,e);break;case H.IN_COLUMN_GROUP:Eo(this,e);break;case H.IN_TABLE_BODY:ko(this,e);break;case H.IN_ROW:jo(this,e);break;case H.IN_CELL:No(this,e);break;case H.IN_SELECT:Fo(this,e);break;case H.IN_SELECT_IN_TABLE:Lo(this,e);break;case H.IN_TEMPLATE:zo(this,e);break;case H.AFTER_BODY:Ho(this,e);break;case H.IN_FRAMESET:Go(this,e);break;case H.AFTER_FRAMESET:qo(this,e);break;case H.AFTER_AFTER_BODY:Yo(this,e);break;case H.AFTER_AFTER_FRAMESET:Zo(this,e)}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?ns(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case H.INITIAL:qi(this,e);break;case H.BEFORE_HTML:Yi(this,e);break;case H.BEFORE_HEAD:Qi(this,e);break;case H.IN_HEAD:ta(this,e);break;case H.IN_HEAD_NO_SCRIPT:aa(this,e);break;case H.AFTER_HEAD:ca(this,e);break;case H.IN_BODY:ro(this,e);break;case H.TEXT:ao(this,e);break;case H.IN_TABLE:vo(this,e);break;case H.IN_TABLE_TEXT:So(this,e);break;case H.IN_CAPTION:To(this,e);break;case H.IN_COLUMN_GROUP:Do(this,e);break;case H.IN_TABLE_BODY:Ao(this,e);break;case H.IN_ROW:Mo(this,e);break;case H.IN_CELL:Po(this,e);break;case H.IN_SELECT:Io(this,e);break;case H.IN_SELECT_IN_TABLE:Ro(this,e);break;case H.IN_TEMPLATE:Bo(this,e);break;case H.AFTER_BODY:Uo(this,e);break;case H.IN_FRAMESET:Ko(this,e);break;case H.AFTER_FRAMESET:Jo(this,e);break;case H.AFTER_AFTER_BODY:Xo(this,e)}}onEof(e){switch(this.insertionMode){case H.INITIAL:qi(this,e);break;case H.BEFORE_HTML:Xi(this,e);break;case H.BEFORE_HEAD:$i(this,e);break;case H.IN_HEAD:ra(this,e);break;case H.IN_HEAD_NO_SCRIPT:oa(this,e);break;case H.AFTER_HEAD:la(this,e);break;case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:io(this,e);break;case H.TEXT:oo(this,e);break;case H.IN_TABLE_TEXT:So(this,e);break;case H.IN_TEMPLATE:Vo(this,e);break;case H.AFTER_BODY:case H.IN_FRAMESET:case H.AFTER_FRAMESET:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:Gi(this,e)}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===P.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.TEXT:case H.IN_COLUMN_GROUP:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:this._insertCharacters(e);break;case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:case H.AFTER_BODY:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:da(this,e);break;case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:so(this,e);break;case H.IN_TABLE_TEXT:bo(this,e)}}};function Fi(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID,n.element)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):no(e,t),n}function Ii(e,t){let{openElements:n}=e,r=n._indexOf(t.element);for(let t=n.slotAbove(r);t!==-1;t=n.slotAbove(t))if(e._isSpecialElement(n.items[t],n.tagIDs[t]))return t;return n.shortenToLength(r),e.activeFormattingElements.removeEntry(t),-1}function Li(e,t,n){let r=e.openElements.items[t],i=r,a=e.openElements.slotBelow(t),o=e.openElements.getCommonAncestor(n);for(let t=0,s=a;e.openElements.items[s]!==n;t++,s=a){let n=e.openElements.items[s];a=e.openElements.slotBelow(s);let c=e.activeFormattingElements.getElementEntry(n),l=c&&t>=Ai;!c||l?(l&&e.activeFormattingElements.removeEntry(c),e.openElements.removeAt(s)):(n=Ri(e,c,o),i===r&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(i),e.treeAdapter.appendChild(n,i),i=n)}return i}function Ri(e,t,n){let r=e.treeAdapter.getNamespaceURI(t.element),i=e._createElement(t.token.tagName,r,t.token.attrs,n);return e.openElements.replace(t.element,i),e.activeFormattingElements.replaceElement(t,i),i}function zi(e,t,n){let r=fr(e.treeAdapter.getTagName(t));if(e._isElementCausesFosterParenting(r))e._fosterParentElement(n);else{let i=e.treeAdapter.getNamespaceURI(t);r===z.TEMPLATE&&i===L.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Bi(e,t,n){let r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,a=e._createElement(i.tagName,r,i.attrs,t);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(n);let o=e.openElements._indexOf(n.element),s=e.openElements.slotAbove(o);for(;e.openElements.items[s]!==t;)s=e.openElements.slotAbove(s);e.openElements.replaceFormattingElement(o,s,a,i.tagID)}function Vi(e,t){let{current:n,currentTagId:r}=e.openElements;if(r===t.tagID&&e.treeAdapter.getNamespaceURI(n)===L.HTML&&!e.activeFormattingElements.getElementEntry(n))e.openElements.pop();else for(let n=0;n<ki;n++){let n=Fi(e,t);if(!n)break;let r=Ii(e,n);if(r===-1)break;let i=e.openElements.items[r];e.activeFormattingElements.bookmark=n;let a=Li(e,r,n.element),o=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(a),o&&zi(e,o,a),Bi(e,i,n)}}function Hi(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Ui(e,t){e._appendCommentNode(t,e.openElements.items[0])}function Wi(e,t){e._appendCommentNode(t,e.document)}function Gi(e,t){if(e.stopped=!0,t.location){let n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r=e.openElements.slotBelow(r))e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function Ki(e,t){e._setDocumentType(t);let n=t.forceQuirks?ur.QUIRKS:ui(t);li(t)||e._err(t,F.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=H.BEFORE_HTML}function qi(e,t){e._err(t,F.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ur.QUIRKS),e.insertionMode=H.BEFORE_HTML,e._processToken(t)}function Ji(e,t){t.tagID===z.HTML?(e._insertElement(t,L.HTML),e.insertionMode=H.BEFORE_HEAD):Xi(e,t)}function Yi(e,t){let n=t.tagID;(n===z.HTML||n===z.HEAD||n===z.BODY||n===z.BR)&&Xi(e,t)}function Xi(e,t){e._insertFakeRootElement(),e.insertionMode=H.BEFORE_HEAD,e._processToken(t)}function Zi(e,t){switch(t.tagID){case z.HTML:Ga(e,t);break;case z.HEAD:e._insertElement(t,L.HTML),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD;break;default:$i(e,t)}}function Qi(e,t){let n=t.tagID;n===z.HEAD||n===z.BODY||n===z.HTML||n===z.BR?$i(e,t):e._err(t,F.endTagWithoutMatchingOpenElement)}function $i(e,t){e._insertFakeElement(R.HEAD,z.HEAD),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD,e._processToken(t)}function ea(e,t){switch(t.tagID){case z.HTML:Ga(e,t);break;case z.BASE:case z.BASEFONT:case z.BGSOUND:case z.LINK:case z.META:e._appendElement(t,L.HTML),t.ackSelfClosing=!0;break;case z.TITLE:e._switchToTextParsing(t,gr.RCDATA);break;case z.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,gr.RAWTEXT):(e._insertElement(t,L.HTML),e.insertionMode=H.IN_HEAD_NO_SCRIPT);break;case z.NOFRAMES:case z.STYLE:e._switchToTextParsing(t,gr.RAWTEXT);break;case z.SCRIPT:e._switchToTextParsing(t,gr.SCRIPT_DATA);break;case z.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=H.IN_TEMPLATE,e.tmplInsertionModeStack.push(H.IN_TEMPLATE);break;case z.HEAD:e._err(t,F.misplacedStartTagForHeadElement);break;default:ra(e,t)}}function ta(e,t){switch(t.tagID){case z.HEAD:e.openElements.pop(),e.insertionMode=H.AFTER_HEAD;break;case z.BODY:case z.BR:case z.HTML:ra(e,t);break;case z.TEMPLATE:na(e,t);break;default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function na(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==z.TEMPLATE&&e._err(t,F.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(z.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.pop(),e._resetInsertionMode()):e._err(t,F.endTagWithoutMatchingOpenElement)}function ra(e,t){e.openElements.pop(),e.insertionMode=H.AFTER_HEAD,e._processToken(t)}function ia(e,t){switch(t.tagID){case z.HTML:Ga(e,t);break;case z.BASEFONT:case z.BGSOUND:case z.HEAD:case z.LINK:case z.META:case z.NOFRAMES:case z.STYLE:ea(e,t);break;case z.NOSCRIPT:e._err(t,F.nestedNoscriptInHead);break;default:oa(e,t)}}function aa(e,t){switch(t.tagID){case z.NOSCRIPT:e.openElements.pop(),e.insertionMode=H.IN_HEAD;break;case z.BR:oa(e,t);break;default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function oa(e,t){let n=t.type===I.EOF?F.openElementsLeftAfterEof:F.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=H.IN_HEAD,e._processToken(t)}function sa(e,t){switch(t.tagID){case z.HTML:Ga(e,t);break;case z.BODY:e._insertElement(t,L.HTML),e.framesetOk=!1,e.insertionMode=H.IN_BODY;break;case z.FRAMESET:e._insertElement(t,L.HTML),e.insertionMode=H.IN_FRAMESET;break;case z.BASE:case z.BASEFONT:case z.BGSOUND:case z.LINK:case z.META:case z.NOFRAMES:case z.SCRIPT:case z.STYLE:case z.TEMPLATE:case z.TITLE:e._err(t,F.abandonedHeadElementChild),e.openElements.push(e.headElement,z.HEAD),ea(e,t),e.openElements.remove(e.headElement);break;case z.HEAD:e._err(t,F.misplacedStartTagForHeadElement);break;default:la(e,t)}}function ca(e,t){switch(t.tagID){case z.BODY:case z.HTML:case z.BR:la(e,t);break;case z.TEMPLATE:na(e,t);break;default:e._err(t,F.endTagWithoutMatchingOpenElement)}}function la(e,t){e._insertFakeElement(R.BODY,z.BODY),e.insertionMode=H.IN_BODY,ua(e,t)}function ua(e,t){switch(t.type){case I.CHARACTER:fa(e,t);break;case I.WHITESPACE_CHARACTER:da(e,t);break;case I.COMMENT:Hi(e,t);break;case I.START_TAG:Ga(e,t);break;case I.END_TAG:ro(e,t);break;case I.EOF:io(e,t)}}function da(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function fa(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function pa(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function ma(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function ha(e,t){let n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,L.HTML),e.insertionMode=H.IN_FRAMESET)}function ga(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML)}function _a(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&mr.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,L.HTML)}function va(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function ya(e,t){let n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML),n||(e.formElement=e.openElements.current))}function ba(e,t){e.framesetOk=!1;let n=t.tagID===z.LI?e.openElements.indexOfTopmost(z.LI):Math.max(e.openElements.indexOfTopmost(z.DD),e.openElements.indexOfTopmost(z.DT));if(n!==-1&&!e.openElements.hasListItemBoundaryAbove(n)){let t=e.openElements.tagIDs[n];e.openElements.generateImpliedEndTagsWithExclusion(t),e.openElements.popUntilTagNamePopped(t)}e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML)}function xa(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.tokenizer.state=gr.PLAINTEXT}function Sa(e,t){e.openElements.hasInScope(z.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(z.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.framesetOk=!1}function Ca(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(R.A);n&&(Vi(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function wa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ta(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(z.NOBR)&&(Vi(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,L.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ea(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Da(e,t){e.treeAdapter.getDocumentMode(e.document)!==ur.QUIRKS&&e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._insertElement(t,L.HTML),e.framesetOk=!1,e.insertionMode=H.IN_TABLE}function Oa(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,L.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ka(e){let t=mn(e,lr.TYPE);return t!=null&&t.toLowerCase()===Di}function Aa(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,L.HTML),ka(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function ja(e,t){e._appendElement(t,L.HTML),t.ackSelfClosing=!0}function Ma(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._appendElement(t,L.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Na(e,t){t.tagName=R.IMG,t.tagID=z.IMG,Oa(e,t)}function Pa(e,t){e._insertElement(t,L.HTML),e.skipNextNewLine=!0,e.tokenizer.state=gr.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=H.TEXT}function Fa(e,t){e.openElements.hasInButtonScope(z.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,gr.RAWTEXT)}function Ia(e,t){e.framesetOk=!1,e._switchToTextParsing(t,gr.RAWTEXT)}function La(e,t){e._switchToTextParsing(t,gr.RAWTEXT)}function Ra(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===H.IN_TABLE||e.insertionMode===H.IN_CAPTION||e.insertionMode===H.IN_TABLE_BODY||e.insertionMode===H.IN_ROW||e.insertionMode===H.IN_CELL?H.IN_SELECT_IN_TABLE:H.IN_SELECT}function za(e,t){e.openElements.currentTagId===z.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML)}function Ba(e,t){e.openElements.hasInScope(z.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,L.HTML)}function Va(e,t){e.openElements.hasInScope(z.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(z.RTC),e._insertElement(t,L.HTML)}function Ha(e,t){e._reconstructActiveFormattingElements(),yi(t),xi(t),t.selfClosing?e._appendElement(t,L.MATHML):e._insertElement(t,L.MATHML),t.ackSelfClosing=!0}function Ua(e,t){e._reconstructActiveFormattingElements(),bi(t),xi(t),t.selfClosing?e._appendElement(t,L.SVG):e._insertElement(t,L.SVG),t.ackSelfClosing=!0}function Wa(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,L.HTML)}function Ga(e,t){switch(t.tagID){case z.I:case z.S:case z.B:case z.U:case z.EM:case z.TT:case z.BIG:case z.CODE:case z.FONT:case z.SMALL:case z.STRIKE:case z.STRONG:wa(e,t);break;case z.A:Ca(e,t);break;case z.H1:case z.H2:case z.H3:case z.H4:case z.H5:case z.H6:_a(e,t);break;case z.P:case z.DL:case z.OL:case z.UL:case z.DIV:case z.DIR:case z.NAV:case z.MAIN:case z.MENU:case z.ASIDE:case z.CENTER:case z.FIGURE:case z.FOOTER:case z.HEADER:case z.HGROUP:case z.DIALOG:case z.DETAILS:case z.ADDRESS:case z.ARTICLE:case z.SEARCH:case z.SECTION:case z.SUMMARY:case z.FIELDSET:case z.BLOCKQUOTE:case z.FIGCAPTION:ga(e,t);break;case z.LI:case z.DD:case z.DT:ba(e,t);break;case z.BR:case z.IMG:case z.WBR:case z.AREA:case z.EMBED:case z.KEYGEN:Oa(e,t);break;case z.HR:Ma(e,t);break;case z.RB:case z.RTC:Ba(e,t);break;case z.RT:case z.RP:Va(e,t);break;case z.PRE:case z.LISTING:va(e,t);break;case z.XMP:Fa(e,t);break;case z.SVG:Ua(e,t);break;case z.HTML:pa(e,t);break;case z.BASE:case z.LINK:case z.META:case z.STYLE:case z.TITLE:case z.SCRIPT:case z.BGSOUND:case z.BASEFONT:case z.TEMPLATE:ea(e,t);break;case z.BODY:ma(e,t);break;case z.FORM:ya(e,t);break;case z.NOBR:Ta(e,t);break;case z.MATH:Ha(e,t);break;case z.TABLE:Da(e,t);break;case z.INPUT:Aa(e,t);break;case z.PARAM:case z.TRACK:case z.SOURCE:ja(e,t);break;case z.IMAGE:Na(e,t);break;case z.BUTTON:Sa(e,t);break;case z.APPLET:case z.OBJECT:case z.MARQUEE:Ea(e,t);break;case z.IFRAME:Ia(e,t);break;case z.SELECT:Ra(e,t);break;case z.OPTION:case z.OPTGROUP:za(e,t);break;case z.NOEMBED:case z.NOFRAMES:La(e,t);break;case z.FRAMESET:ha(e,t);break;case z.TEXTAREA:Pa(e,t);break;case z.NOSCRIPT:e.options.scriptingEnabled?La(e,t):Wa(e,t);break;case z.PLAINTEXT:xa(e,t);break;case z.COL:case z.TH:case z.TD:case z.TR:case z.HEAD:case z.FRAME:case z.TBODY:case z.TFOOT:case z.THEAD:case z.CAPTION:case z.COLGROUP:break;default:Wa(e,t)}}function Ka(e,t){if(e.openElements.hasInScope(z.BODY)&&(e.insertionMode=H.AFTER_BODY,e.options.sourceCodeLocationInfo)){let n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function qa(e,t){e.openElements.hasInScope(z.BODY)&&(e.insertionMode=H.AFTER_BODY,Uo(e,t))}function Ja(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function Ya(e){let t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(z.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(z.FORM):n&&e.openElements.remove(n))}function Xa(e){e.openElements.hasInButtonScope(z.P)||e._insertFakeElement(R.P,z.P),e._closePElement()}function Za(e){e.openElements.hasInListItemScope(z.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(z.LI),e.openElements.popUntilTagNamePopped(z.LI))}function Qa(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function $a(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function eo(e,t){let n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function to(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(R.BR,z.BR),e.openElements.pop(),e.framesetOk=!1}function no(e,t){let n=t.tagID,r=n===z.UNKNOWN?e.openElements.indexOfTopmostByName(L.HTML,t.tagName):e.openElements.indexOfTopmost(n);r>0&&!e.openElements.hasSpecialElementAbove(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=r&&e.openElements.shortenToLength(r))}function ro(e,t){switch(t.tagID){case z.A:case z.B:case z.I:case z.S:case z.U:case z.EM:case z.TT:case z.BIG:case z.CODE:case z.FONT:case z.NOBR:case z.SMALL:case z.STRIKE:case z.STRONG:Vi(e,t);break;case z.P:Xa(e);break;case z.DL:case z.UL:case z.OL:case z.DIR:case z.DIV:case z.NAV:case z.PRE:case z.MAIN:case z.MENU:case z.ASIDE:case z.BUTTON:case z.CENTER:case z.FIGURE:case z.FOOTER:case z.HEADER:case z.HGROUP:case z.DIALOG:case z.ADDRESS:case z.ARTICLE:case z.DETAILS:case z.SEARCH:case z.SECTION:case z.SUMMARY:case z.LISTING:case z.FIELDSET:case z.BLOCKQUOTE:case z.FIGCAPTION:Ja(e,t);break;case z.LI:Za(e);break;case z.DD:case z.DT:Qa(e,t);break;case z.H1:case z.H2:case z.H3:case z.H4:case z.H5:case z.H6:$a(e);break;case z.BR:to(e);break;case z.BODY:Ka(e,t);break;case z.HTML:qa(e,t);break;case z.FORM:Ya(e);break;case z.APPLET:case z.OBJECT:case z.MARQUEE:eo(e,t);break;case z.TEMPLATE:na(e,t);break;default:no(e,t)}}function io(e,t){e.tmplInsertionModeStack.length>0?Vo(e,t):Gi(e,t)}function ao(e,t){var n;t.tagID===z.SCRIPT&&((n=e.scriptHandler)==null||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function oo(e,t){e._err(t,F.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function so(e,t){if(e.openElements.currentTagId!==void 0&&Mi.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=H.IN_TABLE_TEXT,t.type){case I.CHARACTER:xo(e,t);break;case I.WHITESPACE_CHARACTER:bo(e,t)}else yo(e,t)}function co(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,L.HTML),e.insertionMode=H.IN_CAPTION}function lo(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,L.HTML),e.insertionMode=H.IN_COLUMN_GROUP}function uo(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.COLGROUP,z.COLGROUP),e.insertionMode=H.IN_COLUMN_GROUP,Eo(e,t)}function fo(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,L.HTML),e.insertionMode=H.IN_TABLE_BODY}function po(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(R.TBODY,z.TBODY),e.insertionMode=H.IN_TABLE_BODY,ko(e,t)}function mo(e,t){e.openElements.hasInTableScope(z.TABLE)&&(e.openElements.popUntilTagNamePopped(z.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function ho(e,t){ka(t)?e._appendElement(t,L.HTML):yo(e,t),t.ackSelfClosing=!0}function go(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,L.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function _o(e,t){switch(t.tagID){case z.TD:case z.TH:case z.TR:po(e,t);break;case z.STYLE:case z.SCRIPT:case z.TEMPLATE:ea(e,t);break;case z.COL:uo(e,t);break;case z.FORM:go(e,t);break;case z.TABLE:mo(e,t);break;case z.TBODY:case z.TFOOT:case z.THEAD:fo(e,t);break;case z.INPUT:ho(e,t);break;case z.CAPTION:co(e,t);break;case z.COLGROUP:lo(e,t);break;default:yo(e,t)}}function vo(e,t){switch(t.tagID){case z.TABLE:e.openElements.hasInTableScope(z.TABLE)&&(e.openElements.popUntilTagNamePopped(z.TABLE),e._resetInsertionMode());break;case z.TEMPLATE:na(e,t);break;case z.BODY:case z.CAPTION:case z.COL:case z.COLGROUP:case z.HTML:case z.TBODY:case z.TD:case z.TFOOT:case z.TH:case z.THEAD:case z.TR:break;default:yo(e,t)}}function yo(e,t){let n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ua(e,t),e.fosterParentingEnabled=n}function bo(e,t){e.pendingCharacterTokens.push(t)}function xo(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function So(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)yo(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}var Co=new Set([z.CAPTION,z.COL,z.COLGROUP,z.TBODY,z.TD,z.TFOOT,z.TH,z.THEAD,z.TR]);function wo(e,t){let n=t.tagID;Co.has(n)?e.openElements.hasInTableScope(z.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(z.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,_o(e,t)):Ga(e,t)}function To(e,t){let n=t.tagID;switch(n){case z.CAPTION:case z.TABLE:e.openElements.hasInTableScope(z.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(z.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,n===z.TABLE&&vo(e,t));break;case z.BODY:case z.COL:case z.COLGROUP:case z.HTML:case z.TBODY:case z.TD:case z.TFOOT:case z.TH:case z.THEAD:case z.TR:break;default:ro(e,t)}}function Eo(e,t){switch(t.tagID){case z.HTML:Ga(e,t);break;case z.COL:e._appendElement(t,L.HTML),t.ackSelfClosing=!0;break;case z.TEMPLATE:ea(e,t);break;default:Oo(e,t)}}function Do(e,t){switch(t.tagID){case z.COLGROUP:e.openElements.currentTagId===z.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE);break;case z.TEMPLATE:na(e,t);break;case z.COL:break;default:Oo(e,t)}}function Oo(e,t){e.openElements.currentTagId===z.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE,e._processToken(t))}function ko(e,t){switch(t.tagID){case z.TR:e.openElements.clearBackToTableBodyContext(),e._insertElement(t,L.HTML),e.insertionMode=H.IN_ROW;break;case z.TH:case z.TD:e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(R.TR,z.TR),e.insertionMode=H.IN_ROW,jo(e,t);break;case z.CAPTION:case z.COL:case z.COLGROUP:case z.TBODY:case z.TFOOT:case z.THEAD:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,_o(e,t));break;default:_o(e,t)}}function Ao(e,t){let n=t.tagID;switch(t.tagID){case z.TBODY:case z.TFOOT:case z.THEAD:e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE);break;case z.TABLE:e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,vo(e,t));break;case z.BODY:case z.CAPTION:case z.COL:case z.COLGROUP:case z.HTML:case z.TD:case z.TH:case z.TR:break;default:vo(e,t)}}function jo(e,t){switch(t.tagID){case z.TH:case z.TD:e.openElements.clearBackToTableRowContext(),e._insertElement(t,L.HTML),e.insertionMode=H.IN_CELL,e.activeFormattingElements.insertMarker();break;case z.CAPTION:case z.COL:case z.COLGROUP:case z.TBODY:case z.TFOOT:case z.THEAD:case z.TR:e.openElements.hasInTableScope(z.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,ko(e,t));break;default:_o(e,t)}}function Mo(e,t){switch(t.tagID){case z.TR:e.openElements.hasInTableScope(z.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY);break;case z.TABLE:e.openElements.hasInTableScope(z.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,Ao(e,t));break;case z.TBODY:case z.TFOOT:case z.THEAD:(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(z.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,Ao(e,t));break;case z.BODY:case z.CAPTION:case z.COL:case z.COLGROUP:case z.HTML:case z.TD:case z.TH:break;default:vo(e,t)}}function No(e,t){let n=t.tagID;Co.has(n)?(e.openElements.hasInTableScope(z.TD)||e.openElements.hasInTableScope(z.TH))&&(e._closeTableCell(),jo(e,t)):Ga(e,t)}function Po(e,t){let n=t.tagID;switch(n){case z.TD:case z.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_ROW);break;case z.TABLE:case z.TBODY:case z.TFOOT:case z.THEAD:case z.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Mo(e,t));break;case z.BODY:case z.CAPTION:case z.COL:case z.COLGROUP:case z.HTML:break;default:ro(e,t)}}function Fo(e,t){switch(t.tagID){case z.HTML:Ga(e,t);break;case z.OPTION:e.openElements.currentTagId===z.OPTION&&e.openElements.pop(),e._insertElement(t,L.HTML);break;case z.OPTGROUP:e.openElements.currentTagId===z.OPTION&&e.openElements.pop(),e.openElements.currentTagId===z.OPTGROUP&&e.openElements.pop(),e._insertElement(t,L.HTML);break;case z.HR:e.openElements.currentTagId===z.OPTION&&e.openElements.pop(),e.openElements.currentTagId===z.OPTGROUP&&e.openElements.pop(),e._appendElement(t,L.HTML),t.ackSelfClosing=!0;break;case z.INPUT:case z.KEYGEN:case z.TEXTAREA:case z.SELECT:e.openElements.hasInSelectScope(z.SELECT)&&(e.openElements.popUntilTagNamePopped(z.SELECT),e._resetInsertionMode(),t.tagID!==z.SELECT&&e._processStartTag(t));break;case z.SCRIPT:case z.TEMPLATE:ea(e,t)}}function Io(e,t){switch(t.tagID){case z.OPTGROUP:e.openElements.stackTop>0&&e.openElements.currentTagId===z.OPTION&&e.openElements.tagIDs[e.openElements.slotBelow(e.openElements.stackTop)]===z.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===z.OPTGROUP&&e.openElements.pop();break;case z.OPTION:e.openElements.currentTagId===z.OPTION&&e.openElements.pop();break;case z.SELECT:e.openElements.hasInSelectScope(z.SELECT)&&(e.openElements.popUntilTagNamePopped(z.SELECT),e._resetInsertionMode());break;case z.TEMPLATE:na(e,t)}}function Lo(e,t){let n=t.tagID;n===z.CAPTION||n===z.TABLE||n===z.TBODY||n===z.TFOOT||n===z.THEAD||n===z.TR||n===z.TD||n===z.TH?(e.openElements.popUntilTagNamePopped(z.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Fo(e,t)}function Ro(e,t){let n=t.tagID;n===z.CAPTION||n===z.TABLE||n===z.TBODY||n===z.TFOOT||n===z.THEAD||n===z.TR||n===z.TD||n===z.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(z.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Io(e,t)}function zo(e,t){switch(t.tagID){case z.BASE:case z.BASEFONT:case z.BGSOUND:case z.LINK:case z.META:case z.NOFRAMES:case z.SCRIPT:case z.STYLE:case z.TEMPLATE:case z.TITLE:ea(e,t);break;case z.CAPTION:case z.COLGROUP:case z.TBODY:case z.TFOOT:case z.THEAD:e.tmplInsertionModeStack[e.tmplInsertionModeStack.length-1]=H.IN_TABLE,e.insertionMode=H.IN_TABLE,_o(e,t);break;case z.COL:e.tmplInsertionModeStack[e.tmplInsertionModeStack.length-1]=H.IN_COLUMN_GROUP,e.insertionMode=H.IN_COLUMN_GROUP,Eo(e,t);break;case z.TR:e.tmplInsertionModeStack[e.tmplInsertionModeStack.length-1]=H.IN_TABLE_BODY,e.insertionMode=H.IN_TABLE_BODY,ko(e,t);break;case z.TD:case z.TH:e.tmplInsertionModeStack[e.tmplInsertionModeStack.length-1]=H.IN_ROW,e.insertionMode=H.IN_ROW,jo(e,t);break;default:e.tmplInsertionModeStack[e.tmplInsertionModeStack.length-1]=H.IN_BODY,e.insertionMode=H.IN_BODY,Ga(e,t)}}function Bo(e,t){t.tagID===z.TEMPLATE&&na(e,t)}function Vo(e,t){if(e.openElements.tmplCount>0){do e.openElements.popUntilTagNamePopped(z.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.pop();while(e.openElements.tmplCount>0);e._resetInsertionMode(),e.onEof(t)}else Gi(e,t)}function Ho(e,t){t.tagID===z.HTML?Ga(e,t):Wo(e,t)}function Uo(e,t){if(t.tagID===z.HTML){if(e.fragmentContext||(e.insertionMode=H.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===z.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!e.treeAdapter.getNodeSourceCodeLocation(n)?.endTag&&e._setEndLocation(n,t)}}else Wo(e,t)}function Wo(e,t){e.insertionMode=H.IN_BODY,ua(e,t)}function Go(e,t){switch(t.tagID){case z.HTML:Ga(e,t);break;case z.FRAMESET:e._insertElement(t,L.HTML);break;case z.FRAME:e._appendElement(t,L.HTML),t.ackSelfClosing=!0;break;case z.NOFRAMES:ea(e,t)}}function Ko(e,t){t.tagID===z.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==z.FRAMESET&&(e.insertionMode=H.AFTER_FRAMESET))}function qo(e,t){switch(t.tagID){case z.HTML:Ga(e,t);break;case z.NOFRAMES:ea(e,t)}}function Jo(e,t){t.tagID===z.HTML&&(e.insertionMode=H.AFTER_AFTER_FRAMESET)}function Yo(e,t){t.tagID===z.HTML?Ga(e,t):Xo(e,t)}function Xo(e,t){e.insertionMode=H.IN_BODY,ua(e,t)}function Zo(e,t){switch(t.tagID){case z.HTML:Ga(e,t);break;case z.NOFRAMES:ea(e,t)}}function Qo(e,t){t.chars=`�`,e._insertCharacters(t)}function $o(e,t){e._insertCharacters(t),e.framesetOk=!1}function es(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==L.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function ts(e,t){if(vi(t))es(e),e._startTagOutsideForeignContent(t);else{let n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===L.MATHML?yi(t):r===L.SVG&&(Si(t),bi(t)),xi(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function ns(e,t){if(t.tagID===z.P||t.tagID===z.BR){es(e),e._endTagOutsideForeignContent(t);return}if(e.openElements.stackTop===0)return;let{tagName:n}=t,r=gi.get(n),i=e.fragmentContext?e.treeAdapter.getNamespaceURI(e.fragmentContext):L.HTML,a=Math.max(e.openElements.indexOfTopmostByName(L.SVG,n),e.openElements.indexOfTopmostByName(L.MATHML,n),r===void 0?-1:e.openElements.indexOfTopmostByName(L.SVG,r),i===L.HTML||i===L.SVG||i===L.MATHML?-1:e.openElements.indexOfTopmostByName(i,n));a>e.openElements.indexOfTopmostHtmlElement()?(t.tagName=e.treeAdapter.getTagName(e.openElements.items[a]),e.openElements.shortenToLength(a)):e._endTagOutsideForeignContent(t)}R.AREA,R.BASE,R.BASEFONT,R.BGSOUND,R.BR,R.COL,R.EMBED,R.FRAME,R.HR,R.IMG,R.INPUT,R.KEYGEN,R.LINK,R.META,R.PARAM,R.SOURCE,R.TRACK,R.WBR;var rs=as(`end`),is=as(`start`);function as(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function os(e){let t=is(e),n=rs(e);if(t&&n)return{start:t,end:n}}var ss=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,cs=new Set([`mdxFlowExpression`,`mdxJsxFlowElement`,`mdxJsxTextElement`,`mdxTextExpression`,`mdxjsEsm`]),ls={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function us(e,t){let n=ws(e),r=Ut(`type`,{handlers:{root:fs,element:ps,text:ms,comment:_s,doctype:hs,raw:vs},unknown:ys}),i={parser:n?new Pi(ls):Pi.getFragmentParser(void 0,ls),handle(e){r(e,i)},stitches:!1,options:t||{}};r(e,i),bs(i,is());let a=Pt(n?i.parser.document:i.parser.getFragment(),{file:i.options.file});return i.stitches&&k(a,`comment`,function(e,t,n){let r=e;if(r.value.stitch&&n&&t!==void 0){let e=n.children;return e[t]=r.value.stitch,t}}),a.type===`root`&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function ds(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function fs(e,t){ds(e.children,t)}function ps(e,t){Ss(e,t),ds(e.children,t),Cs(e,t)}function ms(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0),bs(t,is(e));let n=Ts(e),{value:r}=e,i=0;for(;i<r.length;){let e=Ds(r.charCodeAt(i)),a=i+1;for(;a<r.length&&Ds(r.charCodeAt(a))===e;)a++;let o={type:e,chars:r.slice(i,a),location:n};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),i=a}}function hs(e,t){let n={type:I.DOCTYPE,name:`html`,forceQuirks:!1,publicId:``,systemId:``,location:Ts(e)};bs(t,is(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function gs(e,t){t.stitches=!0;let n=Es(e);`children`in e&&`children`in n&&(n.children=us({type:`root`,children:e.children},t.options).children),_s({type:`comment`,value:{stitch:n}},t)}function _s(e,t){let n=e.value,r={type:I.COMMENT,data:n,location:Ts(e)};bs(t,is(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function vs(e,t){t.parser.tokenizer.flushCharacters(),t.parser.tokenizer.preprocessor.html=``,t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,xs(t,is(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(ss,`&lt;$1$2`):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===71&&(t.parser.tokenizer.preprocessor.pos=t.parser.tokenizer.preprocessor.html.length,t.parser.tokenizer.preprocessor.lastChunkWritten=!0,t.parser.tokenizer._stateCharacterReference(),t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.active=!0,t.parser.tokenizer._runParsingLoop())}function ys(e,t){let n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))gs(n,t);else{let e=``;throw cs.has(n.type)&&(e=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),Error("Cannot compile `"+n.type+"` node"+e)}}function bs(e,t){e.parser.tokenizer.flushCharacters(),xs(e,t),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=gr.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:``,value:``}}function xs(e,t){if(t&&t.offset!==void 0){let n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Ss(e,t){if(t.parser.tokenizer.state===gr.PLAINTEXT)return;let n=e.tagName.toLowerCase();bs(t,is(e));let{current:r}=t.parser.openElements,i=r&&`namespaceURI`in r?r.namespaceURI:jt.html;i===jt.html&&n===`svg`&&(i=jt.svg);let a=qt({...e,children:[]},{space:i===jt.svg?`svg`:`html`}),o={type:I.START_TAG,tagName:n,tagID:fr(n),selfClosing:!1,ackSelfClosing:!1,attrs:`attrs`in a?a.attrs:[],location:Ts(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function Cs(e,t){let n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&rn.includes(n)||t.parser.tokenizer.state===gr.PLAINTEXT)return;bs(t,rs(e));let r={type:I.END_TAG,tagName:n,tagID:fr(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ts(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===gr.RCDATA||t.parser.tokenizer.state===gr.RAWTEXT||t.parser.tokenizer.state===gr.SCRIPT_DATA)&&(t.parser.tokenizer.state=gr.DATA)}function ws(e){let t=e.type===`root`?e.children[0]:e;return!!(t&&(t.type===`doctype`||t.type===`element`&&t.tagName.toLowerCase()===`html`))}function Ts(e){let t=is(e)||{line:void 0,column:void 0,offset:void 0},n=rs(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function Es(e){return Fe(`children`in e?{...e,children:[]}:e)}function Ds(e){return e===9||e===10||e===12||e===13||e===32?I.WHITESPACE_CHARACTER:I.CHARACTER}function Os(e){return function(t,n){return us(t,{...e,file:n})}}var ks=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],As={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...ks,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...ks],h2:[[`className`,`sr-only`]],img:[...ks,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...ks,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...ks],table:[...ks],ul:[...ks,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},js={}.hasOwnProperty;function Ms(e,t){let n={type:`root`,children:[]},r=Ns({schema:t?{...As,...t}:As,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function Ns(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return Ps(e,n);case`doctype`:return Fs(e,n);case`element`:return Is(e,n);case`root`:return Ls(e,n);case`text`:return Rs(e,n)}}}function Ps(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return Gs(r,t),r}}function Fs(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return Gs(e,t),e}}function Is(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=zs(e,t.children),i=Bs(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&js.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return Gs(o,t),o}function Ls(e,t){let n={type:`root`,children:zs(e,t.children)};return Gs(n,t),n}function Rs(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return Gs(n,t),n}function zs(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=Ns(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function Bs(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&js.call(r,n)?r[n]:void 0,o=r&&js.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(js.call(s,l)){let t=s[l],n=Vs(e,Ks(a,l),l,t);n??=Vs(e,Ks(o,l),l,t),n!=null&&(c[l]=n)}if(i&&js.call(i,n)){let e=i[n];for(l in e)js.call(e,l)&&!js.call(c,l)&&(c[l]=e[l])}return c}function Vs(e,t,n,r){return t?Array.isArray(r)?Hs(e,t,n,r):Us(e,t,n,r):void 0}function Hs(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=Us(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function Us(e,t,n,r){if((typeof r==`boolean`||typeof r==`number`||typeof r==`string`)&&Ws(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Ws(e,t,n){let r=e.schema.protocols&&js.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function Gs(e,t){let n=os(t);t.data&&(e.data=Fe(t.data)),n&&(e.position=n)}function Ks(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function qs(e){return function(t){return Ms(t,e)}}function Js(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var Ys=ic(/[A-Za-z]/),Xs=ic(/[\dA-Za-z]/),Zs=ic(/[#-'*+\--9=?A-Z^-~]/);function Qs(e){return e!==null&&(e<32||e===127)}var $s=ic(/\d/),ec=ic(/[\dA-Fa-f]/),tc=ic(/[!-/:-@[-`{-~]/);function U(e){return e!==null&&e<-2}function W(e){return e!==null&&(e<0||e===32)}function G(e){return e===-2||e===-1||e===32}var nc=ic(/\p{P}|\p{S}/u),rc=ic(/\s/);function ic(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ac(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function oc(e,t,n){let r=C((n||{}).ignore||[]),i=sc(t),a=-1;for(;++a<i.length;)ae(e,o);function o(e,t,n){if(e.type===`text`&&typeof n==`number`)return s(e,t,n);if(r(e,n,t[t.length-1]))return O}function s(e,t,n){let r=t[t.length-1],o=i[a][0],s=i[a][1],c=0,l=!1,u=[];o.lastIndex=0;let d=o.exec(e.value);for(;d;){let n=d.index,r={index:d.index,input:d.input,stack:[...t,e]},i=s(...d,r);if(typeof i==`string`&&(i=i.length>0?{type:`text`,value:i}:void 0),i===!1)o.lastIndex=n+1;else{if(c!==n&&f({type:`text`,value:e.value.slice(c,n)}),Array.isArray(i))for(let e of i)f(e);else i&&f(i);c=n+d[0].length,l=!0}if(!o.global)break;d=o.exec(e.value)}return l?(c<e.value.length&&f({type:`text`,value:e.value.slice(c)}),r.children.splice(n,1,...u)):u=[e],n+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function sc(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([cc(e[0]),lc(e[1])])}return t}function cc(e){return typeof e==`string`?new RegExp(ac(e),`g`):e}function lc(e){return typeof e==`function`?e:function(){return e}}var uc=`phrasing`,dc=[`autolink`,`link`,`image`,`label`];function fc(){return{transforms:[bc],enter:{literalAutolink:mc,literalAutolinkEmail:hc,literalAutolinkHttp:hc,literalAutolinkWww:hc},exit:{literalAutolink:yc,literalAutolinkEmail:vc,literalAutolinkHttp:gc,literalAutolinkWww:_c}}}function pc(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:uc,notInConstruct:dc},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:uc,notInConstruct:dc},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:uc,notInConstruct:dc}]}}function mc(e){this.enter({type:`link`,title:null,url:``,children:[],position:void 0},e)}function hc(e){this.config.enter.autolinkProtocol.call(this,e)}function gc(e){this.config.exit.autolinkProtocol.call(this,e)}function _c(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function vc(e){this.config.exit.autolinkEmail.call(this,e)}function yc(e){this.exit(e)}function bc(e){oc(e,[[/(?<![\da-z])(https?:\/\/|www(?=\.))([\w-]*\.[\w\-.]*)([^\t\n\r ]*)/gi,xc],[/(?<![\w+\-.@])xmpp:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)(\/(?:[\w\-/]|\.(?=[\dA-Za-z]))*)?/g,wc],[/(?<![\w+\-.@])mailto:([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,Cc],[/(?<![\w+\-.]|(?:^|[^\d@A-Za-z])(?:mailto|xmpp):)([\w+\-.]+)@([\w-]+(?:\.[\w-]+)+)/g,Sc]],{ignore:[`link`,`linkReference`]})}function xc(e,t,n,r,i){if(!Dc(i))return!1;let a=``;if(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),nc(n.charCodeAt(0))||!Tc(n))return!1;let o=Ec(n+r),s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0],position:void 0}],position:void 0};return o[1]?[s,{type:`text`,value:o[1],position:void 0}]:s}function Sc(e,t,n){return!/[\d\-_]$/.test(n)&&{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n,position:void 0}],position:void 0}}function Cc(e,t,n){if(/[\d\-_]$/.test(n))return!1;let r=`mailto:`+t+`@`+n;return{type:`link`,title:null,url:r,children:[{type:`text`,value:r,position:void 0}],position:void 0}}function wc(e,t,n,r,i){if(/[\d\-_]$/.test(n)||r&&(!/[A-Za-z]$/.test(r)||i.input.charAt(i.index+e.length)===`@`))return!1;let a=`xmpp:`+t+`@`+n+(r||``);return{type:`link`,title:null,url:a,children:[{type:`text`,value:a,position:void 0}],position:void 0}}function Tc(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[\dA-Za-z]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[\dA-Za-z]/.test(t[t.length-2])))}function Ec(e){let t=e.length;for(;t>0;){let n=e.charCodeAt(t-1);if(n===33||n===34||n===38||n===39||n===41||n===44||n===46||n===58||n===59||n===60||n===62||n===63||n===93||n===125)t--;else break}if(t===e.length)return[e,void 0];let n=e.slice(t);e=e.slice(0,t);let r=n.indexOf(`)`),i=Js(e,`(`),a=Js(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Dc(e){let t=e.input.charCodeAt(e.index-1);return e.index===0||rc(t)||nc(t)}function Oc(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}Rc.peek=Lc;function kc(){this.buffer()}function Ac(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function jc(){this.buffer()}function Mc(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Nc(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Oc(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Pc(e){this.exit(e)}function Fc(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Oc(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Ic(e){this.exit(e)}function Lc(){return`[`}function Rc(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function zc(){return{enter:{gfmFootnoteCallString:kc,gfmFootnoteCall:Ac,gfmFootnoteDefinitionLabelString:jc,gfmFootnoteDefinition:Mc},exit:{gfmFootnoteCallString:Nc,gfmFootnoteCall:Pc,gfmFootnoteDefinitionLabelString:Fc,gfmFootnoteDefinition:Ic}}}function Bc(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Rc},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
9
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Hc:Vc))),s(),o}}function Vc(e,t,n){return t===0?e:Hc(e,t,n)}function Hc(e,t,n){return(n?``:` `)+e}var Uc=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Jc.attention=Yc,Jc.peek=Xc;function Wc(){return{canContainEols:[`delete`],enter:{strikethrough:Kc},exit:{strikethrough:qc}}}function Gc(){return{handlers:{delete:Jc},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Uc}]}}function Kc(e){this.enter({type:`delete`,children:[],position:void 0},e)}function qc(e){this.exit(e)}function Jc(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function Yc(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Xc(){return`~`}function Zc(e){return e.length}function Qc(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Zc,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=$c(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=el(r[d]);else{let e=el(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u],r=n.fillRows===!1?Math.max(1,o[u===1?0:u].length):l;d=-1;let i=[];for(;++d<r;){let o=e[d]||``,s=``,l=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];if(n===114)s=` `.repeat(e);else if(n===99){let t=e/2;e%2?(s=` `.repeat(t+.5),l=` `.repeat(t-.5)):(s=` `.repeat(t),l=s)}else l=` `.repeat(e)}n.delimiterStart!==!1&&!d&&i.push(`|`),n.padding===!1||n.alignDelimiters===!1&&o===``||n.delimiterStart===!1&&!d||i.push(` `),n.alignDelimiters!==!1&&i.push(s),i.push(o),n.alignDelimiters!==!1&&i.push(l),n.padding!==!1&&i.push(` `),(n.delimiterEnd!==!1||d!==r-1)&&i.push(`|`)}m.push(n.delimiterEnd===!1?i.join(``).replace(/ +$/,``):i.join(``))}return m.join(`
10
+ `)}function $c(e){return e==null?``:String(e)}function el(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var tl=C([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function nl(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),rl);return i(),o}function rl(e,t,n){return`>`+(n?``:` `)+e}function il(e,t){return al(e,t.inConstruct,!0)&&!al(e,t.notInConstruct,!1)}function al(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function ol(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
11
+ `&&!e.before&&!e.after&&il(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
12
+ `}function sl(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function cl(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function ll(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ul(e,t,n,r){let i=ll(n),a=e.value||``;if(cl(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,dl);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(sl(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
13
+ `,encode:["`"],...o.current()})),t()}return u+=o.move(`
14
+ `),a&&(u+=o.move(a+`
15
+ `)),u+=o.move(s),c(),u}function dl(e,t,n){return(n?``:` `)+e}function fl(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function pl(e,t,n,r){let i=fl(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
16
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function ml(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function hl(e){if(e===null||W(e)||rc(e))return 1;if(nc(e))return 2}function gl(e){let t=e.codePointAt(0);return t===void 0?``:String.fromCodePoint(t)}function _l(e){let t=e.codePointAt(e.length-2);return t!==void 0&&t>65535?e.slice(-2):e.slice(-1)}function vl(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function yl(e,t,n){let r=hl(e),i=hl(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}var bl=`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(`.`),xl=[`pre`,`script`,`style`,`textarea`];function Sl(e){if(e.charCodeAt(0)!==60)return;let t=e.charCodeAt(1);if(t===33){let t=e.charCodeAt(2);return t===45?2:t===91?5:Ys(t)?4:void 0}if(t===63)return 3;let n=t===47,r=n?2:1,i=r,a=e.charCodeAt(i);if(!Ys(a))return;for(;a===45||Xs(a);)a=e.charCodeAt(++i);let o=e.slice(r,i).toLowerCase();return!n&&a!==47&&xl.includes(o)?1:bl.includes(o)?6:7}var Cl=new Map([[`*`,!1],[`_`,!0]]);function wl(e,t,n){let r=new Set;for(let i of e){let e=n.get(i);if(e&&i.attention&&t.some(e=>e.attention===i.attention))for(let t of e.tokens)r.add(t.attention)}let i=[];for(let t of e)t.attention&&r.delete(t.attention)&&i.push(t.attention);return i.reverse(),i}function Tl(e,t,n){let r=[],i=new Map,a=new Map,o=0;for(;o<e.length;){if(!e[o].attention){o++;continue}let s=e[o].value.charAt(0),c=Cl.get(s),l=o+1;for(;l<e.length&&e[l].attention&&e[l].value.charAt(0)===s;)l++;let u=o?e[o-1].value:t,d=hl(u.charCodeAt(u.length-1)),f=hl((l<e.length?e[l].value:n).charCodeAt(0)),p=!f||f===2&&!!d,m=!d||d===2&&!!f,h={tokens:e.slice(o,l),markers:[],start:0,end:0,open:c?p&&(!!d||!m):p,close:c?m&&(!!f||!p):m,split:c!==void 0};for(let e of h.tokens){i.set(e,[...h.tokens]),a.set(e,h);let t=e.value.length;for(;t--;)h.markers.push(e)}h.end=h.markers.length,r.push(h),o=l}for(Ol(r,i),o=-1;++o<e.length;){let t=i.get(e[o]);if(t)return{attention:wl(e,t,a),index:o}}}function El(e,t){let n=e[t?0:e.length-1];if(!n||n.attention)return;let r=t?gl(n.value):_l(n.value),i=vl(r.codePointAt(0));if(t)n.value=i+n.value.slice(r.length);else{let e=n.value.slice(0,n.value.length-r.length),t=0;for(;e.charCodeAt(e.length-1-t)===92;)t++;t%2&&(e+=`\\`),n.value=e+i}}function Dl(e,t,n,r,i){for(let a of n.attention){let o=t.get(a)||a.sequences[0];for(let s of a.sequences){if(s===o)continue;let c=new Map(t);c.set(a,s);let l=Pl(e,c,r,i),u=Tl(l,r,i);if(!u||u.index>n.index)return{chosen:c,mistake:u,tokens:l}}}}function Ol(e,t){let n=new Map;for(let r of e){let e=r.tokens[0].value.charAt(0),i=n.get(e);i||(i=[],n.set(e,i));let a=r.close?i.length:0;for(;a--&&r.start<r.end;){let e=i[a],n=e.end-e.start,o=r.end-r.start;if(r.split?(e.close||r.open)&&o%3&&!((n+o)%3):n!==e.markers.length||n!==o)continue;let s=r.split?n>1&&o>1?2:1:o,c=e.markers.slice(e.end-s,e.end),l=r.markers.slice(r.start,r.start+s),u=c[0],d=l[0];if(u===c[s-1]&&u.value.length===s&&d===l[s-1]&&d.value.length===s&&u.attention===d.attention)t.delete(u),t.delete(d);else{let e=[...new Set([...c,...l])];for(let n of e){let r=t.get(n);r&&r.push(...e)}}e.end-=s,r.start+=s,e.start===e.end&&i.splice(a,1),a=i.length}r.open&&r.start<r.end&&i.push(r)}}function kl(e,t,n){if(t.length===0)throw Error("Cannot serialize `"+e+"` as attention without markers, expected one or more markers");if(n.length===0)throw Error("Cannot serialize `"+e+"` as attention without sizes, expected one or more sizes");for(let t of n)if(!Number.isSafeInteger(t)||t<1)throw Error("Cannot serialize `"+e+"` as attention with `"+t+"` as size, expected positive integer");let r=[];for(let i of t){if(i.length!==1)throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected a single ascii character");if(!tc(i.charCodeAt(0)))throw Error("Cannot serialize `"+e+"` as attention with `"+i+"` as marker, expected ascii punctuation");for(let e of n)r.push(i.repeat(e))}return r}function Al(e,t,n){let r=t.indexStack,i=e.children||[],a=[],o=-1,s=n.before;r.push(-1);let c=t.createTracker(n);for(;++o<i.length;){let l=i[o],u;if(r[r.length-1]=o,o+1<i.length){let n=t.handle.handlers[i[o+1].type];n&&n.peek&&(n=n.peek),u=n?gl(n(i[o+1],e,t,{before:``,after:``,...c.current()})):``}else u=n.after;let d=a[a.length-1];typeof d==`string`&&(s===`\r`||s===`
17
+ `)&&l.type===`html`&&Sl(l.value)!==7&&(a[a.length-1]=d.replace(/(\r?\n|\r)$/,` `),s=` `,c=t.createTracker(n),c.move(Fl(a,n.before,n.after)));let f=t.handle.handlers[l.type];if(f&&f.attention){let e=jl(l,f.attention,t,c);if(!e)continue;a.push(e),s=_l(e.sequences[0])}else{let n=t.handle(l,e,t,{...c.current(),after:u,before:s});if(!n)continue;c.move(n),a.push(n),s=_l(n)}}return r.pop(),a}function jl(e,t,n,r){let{construct:i,markers:a,sizes:o}=t(e,n),s=kl(e.type,a,o),c=s[0],l=n.enter(i),u=n.createTracker(r.current());u.move(c);let d=Al(e,n,{...u.current(),before:c,after:c});if(l(),d.length!==0)return r.move(c),r.move(Fl(d,c,c)),r.move(c),{children:d,sequences:s}}function Ml(e,t,n,r){let i=Pl(e,t,n,r),a=Tl(i,n,r);for(;a;){let o=Dl(e,t,a,n,r);if(!o)return;t=o.chosen,i=o.tokens,a=o.mistake}return i}function Nl(e,t,n,r){let i=n,a=-1;for(;++a<e.length;){let o=e[a];if(typeof o==`string`){i=``;continue}let s=a===e.length-1?r:``,c=o.sequences.find(function(t){let r=t.charAt(0);return r!==i.charAt(0)&&r!==s.charAt(0)||e.length===1&&Cl.has(r)&&t.length>n.length})||o.sequences[0];c!==o.sequences[0]&&t.set(o,c),Nl(o.children,t,c,c),i=c}}function Pl(e,t,n,r){let i=[],a,o=_l(n),s=-1;for(;++s<e.length;){let n=e[s];if(typeof n==`string`){let e={value:n,attention:void 0};a&&a===gl(n)&&El([e],!0),a=void 0,i.push(e),e.value&&(o=_l(e.value));continue}let c=t.get(n)||n.sequences[0],l=c.charAt(0),u=e[s+1],d=o,f=gl(u===void 0?r:typeof u==`string`?u:t.get(u)||u.sequences[0]),p=Pl(n.children,t,c,c),m=p[0].value,h=yl(d.charCodeAt(d.length-1),m.charCodeAt(0),l);h.inside&&El(p,!0);let g=_l(p[p.length-1].value),_=yl(f.charCodeAt(0),g.charCodeAt(g.length-1),l);_.inside&&El(p,!1),h.outside&&d!==`
18
+ `&&d!==`\r`&&El(i,!1),_.outside&&(a=f),i.push({value:c,attention:n},...p,{value:c,attention:n}),o=c.charAt(c.length-1)}return i}function Fl(e,t,n){let r=new Map;Nl(e,r,t,n);let i=(r.size>0?Ml(e,r,t,n):void 0)||Ml(e,new Map,t,n)||Pl(e,new Map,t,n),a=``;for(let e of i)a+=e.value;return a}Il.attention=Ll,Il.peek=Rl;function Il(e,t,n,r){let i=n.enter(`phrasing`),a=jl(e,Ll,n,n.createTracker(r)),o=a?Fl([a],r.before,r.after):``;return i(),o}function Ll(e,t){return{construct:`emphasis`,markers:ml(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function Rl(e,t,n){return n.options.emphasis||`*`}var zl={};function Bl(e,t){let n=t||zl;return Vl(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Vl(e,t,n){if(Ul(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Hl(e.children,t,n)}return Array.isArray(e)?Hl(e,t,n):``}function Hl(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Vl(e[i],t,n);return r.join(``)}function Ul(e){return!!(e&&typeof e==`object`)}function Wl(e,t){let n=!1;return k(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&Bl(e)&&(t.options.setext||n))}function Gl(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(Wl(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
19
+ `,after:`
20
+ `});return r(),t(),o+`
21
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
22
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
23
+ `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=vl(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Kl.peek=ql;function Kl(e){return e.value||``}function ql(){return`<`}Jl.peek=Yl;function Jl(e,t,n,r){let i=fl(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Yl(){return`!`}Xl.peek=Zl;function Xl(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Zl(){return`!`}Ql.peek=$l;function Ql(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function $l(){return"`"}function eu(e,t){let n=Bl(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}tu.peek=nu;function tu(e,t,n,r){let i=fl(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(eu(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`),u=n.containerPhrasing(e,{before:l,after:`](`,...o.current()});l+=o.move(u),c(),l+=o.move(`](`);let d=/[\0- \u007F]/.test(e.url),f=r.before.charAt(r.before.length-1),p=e.title||void 0;if(!p&&!d&&(f===`
24
+ `||f===`\r`)){let e=0;for(;e<u.length&&u.charCodeAt(e)!==93;)e+=u.charCodeAt(e)===92?2:1;u.charCodeAt(e+1)===58&&(p=``)}return!e.url&&typeof p==`string`||d?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:typeof p==`string`?` `:`)`,...o.current()}))),c(),typeof p==`string`&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(p,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function nu(e,t,n){return eu(e,n)?`<`:`[`}ru.peek=iu;function ru(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function iu(){return`[`}function au(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function ou(e){let t=au(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function su(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function cu(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function lu(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?su(n):au(n),s=e.ordered?o===`.`?`)`:`.`:ou(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),cu(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function uu(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function du(e,t,n,r){let i=uu(n),a=n.bulletCurrent||au(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function fu(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function pu(e,t,n,r){if(!e.children.some(function(e){return tl(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function mu(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}hu.attention=gu,hu.peek=_u;function hu(e,t,n,r){let i=n.enter(`phrasing`),a=jl(e,gu,n,n.createTracker(r)),o=a?Fl([a],r.before,r.after):``;return i(),o}function gu(e,t){return{construct:`strong`,markers:mu(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function _u(e,t,n){return n.options.strong||`*`}function vu(e,t,n,r){let i=t?t.children:[],a=n.indexStack[n.indexStack.length-1];return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function yu(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function bu(e,t,n){let r=(cu(n)+(n.options.ruleSpaces?` `:``)).repeat(yu(n));return n.options.ruleSpaces?r.slice(0,-1):r}var xu={blockquote:nl,break:ol,code:ul,definition:pl,emphasis:Il,hardBreak:ol,heading:Gl,html:Kl,image:Jl,imageReference:Xl,inlineCode:Ql,link:tu,linkReference:ru,list:lu,listItem:du,paragraph:fu,root:pu,strong:hu,text:vu,thematicBreak:bu},Su=document.createElement(`i`);function Cu(e){let t=`&`+e+`;`;Su.innerHTML=t;let n=Su.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function wu(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}var Tu=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Eu(e){return e.replace(Tu,Du)}function Du(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return wu(n.slice(t?2:1),t?16:10)}return Cu(n)||e}function Ou(){return{enter:{table:ku,tableData:Nu,tableHeader:Nu,tableRow:ju},exit:{codeText:Pu,table:Au,tableData:Mu,tableHeader:Mu,tableRow:Mu}}}function ku(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[],position:void 0},e),this.data.inTable=!0}function Au(e){this.exit(e),this.data.inTable=void 0}function ju(e){this.enter({type:`tableRow`,children:[],position:void 0},e)}function Mu(e){this.exit(e)}function Nu(e){this.enter({type:`tableCell`,children:[],position:void 0},e)}function Pu(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Fu));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Fu(e,t){return t===`|`?t:e}function Iu(e){let{tableCellPadding:t,tablePipeAlign:n,stringLength:r}=e||{},i=t?` `:`|`;return{handlers:{inlineCode:d,table:a,tableCell:s,tableRow:o},join:[Lu],unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
25
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}]};function a(e,t,n,r){let i=l(e,n,r),a=i[0];if(a){let t=e.align?e.align.length:0,n=-1;if(!t)for(;++n<i.length;)i[n].length>t&&(t=i[n].length);for(;a.length<t;)a.push(``)}return c(i,e.align)}function o(e,t,n,r){let i=c([u(e,n,r)]);return i.slice(0,i.indexOf(`
26
+ `))}function s(e,t,n,r){let a=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:i,after:i});return o(),a(),s}function c(e,i){return Qc(e,{align:i,alignDelimiters:n,fillRows:!1,padding:t,stringLength:r})}function l(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=u(r[i],t,n);return o(),a}function u(e,t,n){let{children:r}=e,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=s(r[i],e,t,n);return o(),a}function d(e,t,n){let r=xu.inlineCode(e,t,n);if(!n.stack.includes(`tableCell`))return r;let i=[],a=0,o=r.indexOf(`|`);for(;o!==-1;){let e=o;for(;e>a&&r.charCodeAt(e-1)===92;)e--;i.push(r.slice(a,o)),(o-e)%2==0&&i.push(`\\`),a=o,o=r.indexOf(`|`,o+1)}return i.push(r.slice(a)),i.join(``)}}function Lu(e,t,n,r){if(e.type===`table`&&n.type===`listItem`&&n.spread===!1&&(t.type===`definition`||t.type===`heading`&&Ru(t,r)||t.type===`paragraph`||t.type===`table`))return 1}function Ru(e,t){let n=!1;return k(e,function(e){if(e.type===`break`||`value`in e&&/\r?\n|\r/.test(e.value))return n=!0,!1}),!!((!e.depth||e.depth<3)&&Bl(e)&&(t.options.setext||n))}function zu(){return{exit:{taskListCheckValueChecked:Vu,taskListCheckValueUnchecked:Vu,paragraph:Hu}}}function Bu(){return{handlers:{paragraph:Uu},join:[Wu]}}function Vu(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Hu(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start={...n.position.start}))}}this.exit(e)}function Uu(e,t,n,r){if(!t||t.type!==`listItem`||Gu(t)!==e)return xu.paragraph(e,t,n,r);let i=`[`+(t.checked?`x`:` `)+`] `,a=n.createTracker(r);return a.move(i),i+xu.paragraph(e.children.length>0?e:{type:`paragraph`,children:[{type:`text`,value:` `}]},t,n,{...r,...a.current()})}function Wu(e,t,n){if(e.type!==`definition`||n.type!==`listItem`)return;let r=Gu(n);if(r&&n.children.indexOf(e)<n.children.indexOf(r))return 0}function Gu(e){if(typeof e.checked==`boolean`)for(let t of e.children){if(t.type===`paragraph`)return t;if(t.type!==`definition`)return}}function Ku(){return[fc(),zc(),Wc(),Ou(),zu()]}function qu(e){return{extensions:[pc(),Bc(e),Gc(),Iu(e),Bu()]}}function Ju(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Yu(e,t){return e.length>0?(Ju(e,e.length,0,t),e):t}var Xu={}.hasOwnProperty;function Zu(e){let t={},n=-1;for(;++n<e.length;)Qu(t,e[n]);return t}function Qu(e,t){let n;for(n in t){let r=(Xu.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Xu.call(r,a)||(r[a]=[]);let e=i[a];$u(r[a],Array.isArray(e)?e:e?[e]:[])}}}function $u(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Ju(e,0,0,r)}var ed={tokenize:md,partial:!0},td={tokenize:hd,partial:!0},nd={tokenize:gd,partial:!0},rd={tokenize:_d,partial:!0},id={tokenize:vd,partial:!0},ad={name:`wwwAutolink`,tokenize:fd,previous:yd},od={name:`protocolAutolink`,tokenize:pd,previous:bd},sd={name:`emailAutolink`,tokenize:dd,previous:xd},cd={};function ld(){return{text:cd}}for(var ud=48;ud<123;)cd[ud]=sd,ud++,ud===58?ud=65:ud===91&&(ud=97);cd[43]=sd,cd[45]=sd,cd[46]=sd,cd[95]=sd,cd[72]=[sd,od],cd[104]=[sd,od],cd[87]=[sd,ad],cd[119]=[sd,ad];function dd(e,t,n){let r=this,i,a;return o;function o(t){return!Sd(t)||!xd.call(r,r.previous)||Cd(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Sd(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(id,u,l)(t):t===45||t===95||Xs(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&Ys(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function fd(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!yd.call(r,r.previous)||Cd(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(ed,e.attempt(td,e.attempt(nd,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function pd(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&bd.call(r,r.previous)&&!Cd(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(Ys(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||Qs(t)||W(t)||rc(t)||nc(t)?n(t):e.attempt(td,e.attempt(nd,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function md(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function hd(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(rd,c,s)(t):t===null||W(t)||rc(t)||t!==45&&nc(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function gd(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(rd,t,a)(o):o===null||W(o)||rc(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function _d(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||W(o)||rc(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||W(e)||rc(e)?t(e):r(e)}function a(e){return Ys(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):Ys(t)?(e.consume(t),o):n(t)}}function vd(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return Xs(e)?n(e):t(e)}}function yd(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||W(e)}function bd(e){return!Ys(e)}function xd(e){return!(e===47||Sd(e))}function Sd(e){return e===43||e===45||e===46||e===95||Xs(e)}function Cd(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function wd(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Xs(e.charCodeAt(n+1))&&Xs(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Td(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Ed={name:`attention`,resolveAll:Dd,tokenize:Od};function Dd(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};kd(o,-a),kd(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=Yu(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=Yu(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=Yu(r,Td(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=Yu(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=Yu(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),Ju(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Od(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=hl(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=hl(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function kd(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Ad={name:`autolink`,tokenize:jd};function jd(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return Ys(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Xs(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Xs(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Qs(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Zs(t)?(e.consume(t),l):n(t)}function u(e){return Xs(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Xs(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}function K(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return G(r)?(e.enter(n),s(r)):t(r)}function s(r){return G(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function Md(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&G(t)?(e.enter(r),c(t)):l(t)}function c(t){return G(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var Nd={partial:!0,tokenize:Pd};function Pd(e,t,n){return r;function r(t){return G(t)?K(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||U(e)?t(e):n(e)}}var Fd={continuation:{tokenize:Ld},exit:Rd,name:`blockQuote`,tokenize:Id};function Id(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return G(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Ld(e,t,n){let r=this;return i;function i(t){return G(t)?K(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Fd,t,n)(r)}}function Rd(e){e.exit(`blockQuote`)}var zd={name:`characterEscape`,tokenize:Bd};function Bd(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return tc(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Vd={name:`characterReference`,tokenize:Hd};function Hd(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Xs,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=ec,u):(e.enter(`characterReferenceValue`),a=7,o=$s,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Xs&&!Cu(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Ud={partial:!0,tokenize:Wd};function Wd(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Gd={concrete:!0,name:`codeFenced`,tokenize:Kd};function Kd(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),G(t)?K(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||U(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Ud,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||U(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):G(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),K(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||U(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||U(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&G(t)?K(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||U(t)?e.check(Ud,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||U(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),G(t)?K(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),G(t)?K(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||U(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var qd={name:`codeIndented`,tokenize:Yd},Jd={partial:!0,tokenize:Xd};function Yd(e,t,n){return r;function r(t){return e.enter(`codeIndented`),Md(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):U(t)?e.attempt(Jd,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||U(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function Xd(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):U(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):Md(e,t,a,`linePrefix`,4,4)(o)}function a(e){return U(e)?i(e):n(e)}}var Zd={name:`codeText`,previous:$d,resolve:Qd,tokenize:ef};function Qd(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function $d(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function ef(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):U(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||U(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var tf=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&nf(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),nf(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),nf(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);nf(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);nf(this.left,t.reverse())}}}};function nf(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function rf(e){let t={},n=-1,r,i,a,o,s,c,l,u=new tf(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,af(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Ju(e,0,1/0,u.slice(0)),!l}function af(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var of={resolve:cf,tokenize:lf},sf={partial:!0,tokenize:uf};function cf(e){return rf(e),e}function lf(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):U(t)?e.check(sf,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function uf(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),K(e,a,`linePrefix`)}function a(i){if(i===null||U(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function df(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Qs(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||U(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||W(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Qs(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function ff(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):U(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||U(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!G(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function pf(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):U(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),K(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||U(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function mf(e,t){let n;return r;function r(i){return U(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):G(i)?K(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var hf={name:`definition`,tokenize:_f},gf={partial:!0,tokenize:vf};function _f(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return ff.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Oc(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return W(t)?mf(e,l)(t):l(t)}function l(t){return df(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(gf,d,d)(t)}function d(t){return G(t)?K(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||U(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function vf(e,t,n){return r;function r(t){return W(t)?mf(e,i)(t):n(t)}function i(t){return pf(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return G(t)?K(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||U(e)?t(e):n(e)}}var yf={name:`hardBreakEscape`,tokenize:bf};function bf(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return U(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var xf={name:`headingAtx`,resolve:Sf,tokenize:Cf};function Sf(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};Ju(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function Cf(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||W(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||U(n)?(e.exit(`atxHeading`),t(n)):G(n)?K(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||W(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var wf={concrete:!0,name:`htmlFlow`,resolveTo:Ef,tokenize:Df},Tf={partial:!0,tokenize:Of};function Ef(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Df(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:k):Ys(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):Ys(a)?(e.consume(a),i=4,r.interrupt?t:k):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:k):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:D:m):n(i)}function h(t){return Ys(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||W(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&xl.includes(l)?(i=1,r.interrupt?t(s):D(s)):bl.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):D(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Xs(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:D):n(i)}function v(t){return G(t)?(e.consume(t),v):T(t)}function y(t){return t===47?(e.consume(t),T):t===58||t===95||Ys(t)?(e.consume(t),b):G(t)?(e.consume(t),y):T(t)}function b(t){return t===45||t===46||t===58||t===95||Xs(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),ee):G(t)?(e.consume(t),x):y(t)}function ee(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,S):G(t)?(e.consume(t),ee):C(t)}function S(t){return t===c?(e.consume(t),c=null,w):t===null||U(t)?n(t):(e.consume(t),S)}function C(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||W(t)?x(t):(e.consume(t),C)}function w(e){return e===47||e===62||G(e)?y(e):n(e)}function T(t){return t===62?(e.consume(t),E):n(t)}function E(t){return t===null||U(t)?D(t):G(t)?(e.consume(t),E):n(t)}function D(t){return t===45&&i===2?(e.consume(t),ie):t===60&&i===1?(e.consume(t),O):t===62&&i===4?(e.consume(t),se):t===63&&i===3?(e.consume(t),k):t===93&&i===5?(e.consume(t),oe):U(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Tf,ce,te)(t)):t===null||U(t)?(e.exit(`htmlFlowData`),te(t)):(e.consume(t),D)}function te(t){return e.check(Ud,ne,ce)(t)}function ne(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),re}function re(t){return t===null||U(t)?te(t):(e.enter(`htmlFlowData`),D(t))}function ie(t){return t===45?(e.consume(t),k):D(t)}function O(t){return t===47?(e.consume(t),o=``,ae):D(t)}function ae(t){if(t===62){let n=o.toLowerCase();return xl.includes(n)?(e.consume(t),se):D(t)}return Ys(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ae):D(t)}function oe(t){return t===93?(e.consume(t),k):D(t)}function k(t){return t===62?(e.consume(t),se):t===45&&i===2?(e.consume(t),k):D(t)}function se(t){return t===null||U(t)?(e.exit(`htmlFlowData`),ce(t)):(e.consume(t),se)}function ce(n){return e.exit(`htmlFlow`),t(n)}}function Of(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Nd,t,n)}}var kf={name:`htmlText`,tokenize:Af};function Af(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):Ys(t)?(e.consume(t),C):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):Ys(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):U(t)?(o=d,O(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?ie(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):U(t)?(o=h,O(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?ie(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?ie(t):U(t)?(o=v,O(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):U(t)?(o=y,O(t)):(e.consume(t),y)}function b(e){return e===62?ie(e):y(e)}function x(t){return Ys(t)?(e.consume(t),ee):n(t)}function ee(t){return t===45||Xs(t)?(e.consume(t),ee):S(t)}function S(t){return U(t)?(o=S,O(t)):G(t)?(e.consume(t),S):ie(t)}function C(t){return t===45||Xs(t)?(e.consume(t),C):t===47||t===62||W(t)?w(t):n(t)}function w(t){return t===47?(e.consume(t),ie):t===58||t===95||Ys(t)?(e.consume(t),T):U(t)?(o=w,O(t)):G(t)?(e.consume(t),w):ie(t)}function T(t){return t===45||t===46||t===58||t===95||Xs(t)?(e.consume(t),T):E(t)}function E(t){return t===61?(e.consume(t),D):U(t)?(o=E,O(t)):G(t)?(e.consume(t),E):w(t)}function D(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,te):U(t)?(o=D,O(t)):G(t)?(e.consume(t),D):(e.consume(t),ne)}function te(t){return t===i?(e.consume(t),i=void 0,re):t===null?n(t):U(t)?(o=te,O(t)):(e.consume(t),te)}function ne(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||W(t)?w(t):(e.consume(t),ne)}function re(e){return e===47||e===62||W(e)?w(e):n(e)}function ie(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function O(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ae}function ae(t){return G(t)?K(e,oe,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):oe(t)}function oe(t){return e.enter(`htmlTextData`),o(t)}}var jf={name:`labelEnd`,resolveAll:Ff,resolveTo:If,tokenize:Lf},Mf={tokenize:Rf},Nf={tokenize:zf},Pf={tokenize:Bf};function Ff(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Ju(e,0,e.length,n),e}function If(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=Yu(o,e.slice(i+1,i+r+3)),o=Yu(o,[[`enter`,l,t]]),o=Yu(o,Td(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=Yu(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=Yu(o,e.slice(a+1)),o=Yu(o,[[`exit`,s,t]]),Ju(e,i,e.length,o),e}function Lf(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Oc(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Mf,u,o?u:d)(t):t===91?e.attempt(Nf,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Pf,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Rf(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return W(t)?mf(e,a)(t):a(t)}function a(t){return t===41?u(t):df(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return W(t)?mf(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?pf(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return W(t)?mf(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function zf(e,t,n){let r=this;return i;function i(t){return ff.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Oc(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Bf(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Vf={name:`labelStartImage`,resolveAll:jf.resolveAll,tokenize:Hf};function Hf(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Uf={name:`labelStartLink`,resolveAll:jf.resolveAll,tokenize:Wf};function Wf(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Gf={name:`lineEnding`,tokenize:Kf};function Kf(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),K(e,t,`linePrefix`)}}var qf={name:`thematicBreak`,tokenize:Jf};function Jf(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||U(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),G(t)?K(e,s,`whitespace`)(t):s(t))}}var Yf={continuation:{tokenize:$f},exit:tp,name:`list`,tokenize:Qf},Xf={partial:!0,tokenize:np},Zf={partial:!0,tokenize:ep};function Qf(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:$s(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(qf,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return $s(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Nd,r.interrupt?n:u,e.attempt(Xf,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return G(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function $f(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Nd,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,K(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!G(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Zf,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,K(e,e.attempt(Yf,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function ep(e,t,n){let r=this;return K(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function tp(e){e.exit(this.containerState.type)}function np(e,t,n){let r=this;return K(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!G(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var rp=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){ip(this,e,t,n,!1)}addBefore(e,t,n){ip(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function ip(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var ap={name:`setextUnderline`,resolveTo:op,tokenize:sp};function op(e,t){let n=new rp,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function sp(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),G(t)?K(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||U(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var cp={tokenize:gp,partial:!0};function lp(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:pp,continuation:{tokenize:mp},exit:hp}},text:{91:{name:`gfmFootnoteCall`,tokenize:fp},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:up,resolveTo:dp}}}}function up(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=Oc(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function dp(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function fp(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||W(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(Oc(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return W(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function pp(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||W(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=Oc(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return W(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),K(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function mp(e,t,n){return e.check(Nd,t,e.attempt(cp,t,n))}function hp(e){e.exit(`gfmFootnoteDefinition`)}function gp(e,t,n){let r=this;return K(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function _p(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&Ju(o,o.length,0,Td(s,e.slice(r+1,n),t)),Ju(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),Ju(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=hl(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=hl(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var vp=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){yp(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function yp(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function bp(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function xp(){return{flow:{null:{name:`table`,tokenize:Sp,resolveAll:Cp}}}}function Sp(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?ee:c;return a===ee&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):U(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):G(t)?K(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||W(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,G(t)?K(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return G(t)?K(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||U(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return G(t)?K(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||U(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function ee(t){return e.enter(`tableRow`),S(t)}function S(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),S):n===null||U(n)?(e.exit(`tableRow`),t(n)):G(n)?K(e,S,`whitespace`)(n):(e.enter(`data`),C(n))}function C(t){return t===null||t===124||W(t)?(e.exit(`data`),S(t)):(e.consume(t),t===92?w:C)}function w(t){return t===92||t===124?(e.consume(t),C):C(t)}}function Cp(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new vp;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Tp(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=wp(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=wp(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=wp(f,t,o,i,n,d)):(o[0]=o[1],d=wp(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Tp(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=bp(t.events,n))}return e}function wp(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Ep(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Ep(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Ep(t.events,n[2]),a=Ep(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Ep(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Tp(e,t,n,r,i){let a=[],o=Ep(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Ep(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Dp={name:`tasklistCheck`,tokenize:kp};function Op(){return{text:{91:Dp}}}function kp(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return W(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return U(r)?t(r):G(r)?e.check({tokenize:Ap},t,n)(r):n(r)}}function Ap(e,t,n){return K(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function jp(e){return Zu([ld(),lp(),_p(e),xp(),Op()])}var Mp={};function Np(e){let t=this,n=e||Mp,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(jp(n)),a.push(Ku()),o.push(qu(n))}var Pp=Object.defineProperty,Fp=Object.defineProperties,Ip=Object.getOwnPropertyDescriptors,Lp=Object.getOwnPropertySymbols,Rp=Object.prototype.hasOwnProperty,zp=Object.prototype.propertyIsEnumerable,Bp=(e,t,n)=>t in e?Pp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Vp=(e,t)=>{for(var n in t||={})Rp.call(t,n)&&Bp(e,n,t[n]);if(Lp)for(var n of Lp(t))zp.call(t,n)&&Bp(e,n,t[n]);return e},Hp=(e,t)=>Fp(e,Ip(t)),Up={PROSE:0,FENCE_MARKER:1,FENCE_INFO:2,FENCE_BODY:3,CODE_SPAN:4,CODE_SPAN_OPEN:5},Wp=/^(`{3,}|~{3,})(.*)$/,Gp=e=>e!==void 0&&e>=`0`&&e<=`9`,Kp=(e,t)=>{let n=t;if(e[n]===`-`||e[n]===`*`||e[n]===`+`)n+=1;else{for(;Gp(e[n])&&n-t<9;)n+=1;if(n===t||e[n]!==`.`&&e[n]!==`)`)return-1;n+=1}return e[n]===` `?n+1:-1},qp=(e,t,n)=>{let r=0,i=t,a=!1,o=t;for(;;){for(;o<n&&e[o]===` `;)o+=1;if(e[o]===`>`){r+=1,o+=e[o+1]===` `?2:1,i=o,a=!1;continue}let t=o<n?Kp(e,o):-1;if(t===-1)return{contentStart:o,listIndent:a?o-i:0,quoteDepth:r};o=t,a=!0}},Jp=(e,t,n,r)=>{let i=t;for(let t=0;t<r;t+=1){for(;i<n&&e[i]===` `;)i+=1;if(e[i]!==`>`)return-1;i+=1,e[i]===` `&&(i+=1)}return i},Yp=(e,t,n,r,i)=>{let a=t+r;e.fill(Up.FENCE_MARKER,a,a+i),e.fill(Up.FENCE_INFO,a+i,Math.min(n+1,e.length))},Xp=(e,t,n,r)=>{let i=t;for(;i<n&&e[i]===` `;)i+=1;let a=0;for(;i<n&&e[i]===r.char;)i+=1,a+=1;if(a<r.length)return!1;for(;i<n;){if(e[i]!==` `&&e[i]!==` `&&e[i]!==`\r`)return!1;i+=1}return!0},Zp=(e,t,n,r)=>{let i=r>n&&e[r-1]===`\r`?r-1:r,a=qp(e,n,i),o=e.slice(a.contentStart,i).match(Wp);if(!o)return null;let[,s,c]=o,l=s[0];return l==="`"&&c.includes("`")?null:(Yp(t,n,r,a.contentStart-n,s.length),{char:l,length:s.length,listIndent:a.listIndent,quoteDepth:a.quoteDepth})},Qp=(e,t,n,r)=>{let i=Jp(e,t,n,r.quoteDepth);if(i===-1||r.listIndent===0)return i;let a=i;for(;a<n&&e[a]===` `;)a+=1;return a===n||e[a]===`\r`&&a+1===n||a-i>=r.listIndent?i:-1},$p=(e,t)=>{let n=e.length,r=null,i=0;for(;i<n;){let a=e.indexOf(`
27
+ `,i);a===-1&&(a=n);let o=r?Qp(e,i,a,r):-1;r&&o===-1&&(r=null),r?Xp(e,o,a,r)?(t.fill(Up.FENCE_MARKER,i,a),r=null):t.fill(Up.FENCE_BODY,i,Math.min(a+1,n)):r=Zp(e,t,i,a),i=a+1}return r},em=(e,t)=>{let n=t+1;for(;n<e.length&&e[n]==="`";)n+=1;return n},tm=(e,t)=>{let n=t+1;for(;n<e.length&&(e[n]===` `||e[n]===` `||e[n]===`\r`);)n+=1;return n<e.length&&e[n]===`
28
+ `},nm=(e,t,n)=>{let r=n;for(;;){let n=e.indexOf("`",r);if(n===-1)return-1;let i=n>r&&e[n-1]===`\\`&&t[n-1]===Up.PROSE;if(t[n]===Up.PROSE&&!i)return n;r=n+1}},rm=(e,t)=>{let n=e.length,r=-1,i=0,a=0;for(;a<n;){if(r<0){if(a=nm(e,t,a),a===-1)break;let n=em(e,a);r=a,i=n-a,a=n;continue}if(t[a]!==Up.PROSE){t.fill(Up.CODE_SPAN_OPEN,r,a),r=-1,a+=1;continue}if(e[a]===`
29
+ `&&tm(e,a)){r=-1,a+=1;continue}if(e[a]!=="`"){a+=1;continue}let n=em(e,a);n-a===i&&(t.fill(Up.CODE_SPAN,r,n),r=-1),a=n}return r>=0?(t.fill(Up.CODE_SPAN_OPEN,r,n),{start:r,runLength:i}):null},im=e=>{let t=new Uint8Array(e.length);return{text:e,regions:t,openFence:$p(e,t),openSpan:rm(e,t),mathMask:null,linkUrlMask:null,htmlTagMask:null}},am=null,om=null,sm=e=>{if(om!==null&&e===am)return om;let t=im(e);return am=e,om=t,t},cm=()=>{am=null,om=null},lm=(e,t)=>t>=e.regions.length?e.openFence!==null||e.openSpan!==null:t<0?!1:e.regions[t]!==Up.PROSE,um=(e,t)=>e.regions[t]===Up.CODE_SPAN,dm=(e,t)=>{let n=sm(e),r=t+t,i=0;for(let t=e.indexOf(r);t!==-1;t=e.indexOf(r,t))n.regions[t]===Up.PROSE?(i+=1,t+=2):t+=1;return i},fm=new Uint8Array,pm=e=>e===`inlineLatex`||e===`blockLatex`,mm=(e,t)=>t===`[`&&e===`none`?`blockLatex`:t===`]`&&e===`blockLatex`?`none`:t===`(`&&e===`none`?`inlineLatex`:t===`)`&&e===`inlineLatex`?`none`:null,hm=(e,t)=>t?e===`blockDollar`?`none`:`blockDollar`:e===`blockDollar`?e:e===`inlineDollar`?`none`:`inlineDollar`,gm=e=>e.includes(`$`)||e.includes(`\\(`)||e.includes(`\\[`),_m=(e,t,n)=>{let r=e[t+1];if(e[t]===`\\`){if(r===`$`)return{context:n,length:2};let e=mm(n,r);return e===null?null:{context:e,length:2}}if(e[t]===`$`&&!pm(n)){let e=r===`$`;return{context:hm(n,e),length:e?2:1}}return null},vm=e=>{let{text:t,regions:n}=e,r=t.length,i=new Uint8Array(r),a=`none`,o=0;for(;o<r;){i[o]=a===`none`?0:1;let e=n[o]===Up.PROSE?_m(t,o,a):null;e===null?o+=1:(a=e.context,e.length===2&&(i[o+1]=a===`none`?0:1),o+=e.length)}return i},ym=(e,t)=>t<0||t>=e.text.length?!1:(e.mathMask===null&&(e.mathMask=gm(e.text)?vm(e):fm),e.mathMask[t]===1),bm=(e,t,n,r)=>{let{text:i,regions:a}=e,o=new Uint8Array(n-t),s=0;for(let e=n-1;e>=t;--e)i[e]===`)`&&a[e]===Up.PROSE&&(s=1),o[e-t]=s;let c=!1;for(let e=t;e<n;e+=1)c&&o[e-t]===1&&(r[e]=1),a[e]===Up.PROSE&&(i[e]===`)`?c=!1:i[e]===`(`&&(c=e>0&&i[e-1]===`]`))},xm=e=>{let{text:t}=e,n=t.length,r=new Uint8Array(n),i=0;for(;i<n;){let a=t.indexOf(`
30
+ `,i);a===-1&&(a=n),bm(e,i,a,r),i=a+1}return r},Sm=(e,t)=>t<0||t>=e.text.length?!1:(e.linkUrlMask===null&&(e.linkUrlMask=e.text.includes(`](`)?xm(e):fm),e.linkUrlMask[t]===1),Cm=e=>{let{text:t,regions:n}=e,r=t.length,i=new Uint8Array(r),a=!1;for(let e=0;e<r;e+=1)if(t[e]===`
31
+ `)a=!1;else if(i[e]=+!!a,n[e]===Up.PROSE){if(t[e]===`>`)a=!1;else if(t[e]===`<`){let n=t[e+1];a=n!==void 0&&(n>=`a`&&n<=`z`||n>=`A`&&n<=`Z`||n===`/`)}}return i},wm=(e,t)=>t<0||t>=e.text.length?!1:(e.htmlTagMask===null&&(e.htmlTagMask=e.text.includes(`<`)?Cm(e):fm),e.htmlTagMask[t]===1),Tm=(e,t)=>lm(sm(e),t),Em=(e,t)=>um(sm(e),t),Dm=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,Om=e=>!e||typeof e!=`string`||!e.includes(`>`)?e:e.replace(Dm,(t,n,r,i)=>Tm(e,i)?t:`${n}\\>${r}`),km=(e,{delimiter:t,markerLength:n,regex:r})=>{let i=e.lastIndexOf(t,e.length-2),a=i===-1?e.length-1:i;return e.slice(Math.max(0,a-n+1)).match(r)},Am={delimiter:`*`,markerLength:2,regex:/(\*\*)([^*]*\*?)$/},jm={delimiter:`_`,markerLength:2,regex:/(__)([^_]*?)$/},Mm={delimiter:`*`,markerLength:3,regex:/(\*\*\*)([^*]*?)$/},Nm={delimiter:`*`,markerLength:1,regex:/(\*)([^*]*?)$/},Pm={delimiter:`_`,markerLength:1,regex:/(_)([^_]*?)$/},Fm={delimiter:`~`,markerLength:2,regex:/(~~)([^~]*?)$/},Im={delimiter:`_`,markerLength:2,regex:/(__)([^_]+)_$/},Lm={delimiter:`~`,markerLength:2,regex:/(~~)([^~]+)~$/},Rm=/^[\s_~*`]*$/,zm=/^[\s]*[-*+][\s]+$/,Bm=/[\p{L}\p{N}_]/u,Vm=/^\*{4,}$/,Hm=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95||Bm.test(e)},Um=(e,t)=>{let n=1;for(let r=t-1;r>=0;--r)if(e[r]===`]`)n+=1;else if(e[r]===`[`&&(--n,n===0))return r;return-1},Wm=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]===`[`)n+=1;else if(e[r]===`]`&&(--n,n===0))return r;return-1},Gm=(e,t)=>ym(sm(e),t),Km=(e,t,n)=>{let r=0;for(let n=t-1;n>=0;--n)if(e[n]===`
32
+ `){r=n+1;break}let i=e.length;for(let n=t;n<e.length;n+=1)if(e[n]===`
33
+ `){i=n;break}let a=e.substring(r,i),o=0,s=!1;for(let e of a)if(e===n)o+=1;else if(e!==` `&&e!==` `){s=!0;break}return o>=3&&!s},qm=(e,t,n,r)=>n===`\\`||ym(e,t)?!0:n!==`*`&&r===`*`?(t<e.text.length-2?e.text[t+2]:``)!==`*`:n===`*`||(!n||n===` `||n===` `||n===`
34
+ `)&&(!r||r===` `||r===` `||r===`
35
+ `),Jm=e=>e===` `||e===` `||e===`
36
+ `,Ym=(e,t)=>!!(e&&t&&Hm(e)&&Hm(t)),Xm=(e,t,n,r)=>{let i=Ym(e,t),a=!!t&&!Jm(t),o=!!e&&!Jm(e);return i&&n%2==0&&!r?{count:!1}:o&&n%2==1||a?{count:!0,inWordAsteriskChain:i}:{count:!1}},Zm=e=>{let t=sm(e),n=0,r=!1,i=e.length;for(let a=0;a<i;a+=1){if(e[a]!==`*`||t.regions[a]!==Up.PROSE){Hm(e[a])||(r=!1);continue}let o=a>0?e[a-1]:``,s=a<i-1?e[a+1]:``;if(qm(t,a,o,s))continue;let c=Xm(o,s,n,r);c.count&&(n+=1,r=c.inWordAsteriskChain)}return n},Qm=(e,t,n,r)=>!!(n===`\\`||ym(e,t)||Sm(e,t)||wm(e,t)||n===`_`||r===`_`||n&&r&&Hm(n)&&Hm(r)),$m=e=>{let t=sm(e),n=0,r=e.length;for(let i=0;i<r;i+=1){if(e[i]!==`_`||t.regions[i]!==Up.PROSE)continue;let a=i>0?e[i-1]:``,o=i<r-1?e[i+1]:``;Qm(t,i,a,o)||(n+=1)}return n},eh=e=>{let t=sm(e),n=0,r=0;for(let i=0;i<e.length;i+=1)e[i]===`*`&&t.regions[i]===Up.PROSE?r+=1:(r>=3&&(n+=Math.floor(r/3)),r=0);return r>=3&&(n+=Math.floor(r/3)),n},th=e=>dm(e,`*`),nh=e=>e===``||e===` `||e===` `||e===`
37
+ `,rh=(e,t,n,r,i)=>{if(!(nh(n)&&nh(r)))return!1;if(t>i.lineEnd){let n=e.indexOf(`
38
+ `,t);i.lineEnd=n===-1?e.length:n,i.result=Km(e,t,`_`)}return i.result},ih=(e,t,n,r)=>{let i=e.text,a=t,o=!1;a>0&&i[a-1]===`\\`&&(a+=1,o=!0);let s=n-a;if(s<2)return!1;let c=a>0?i[a-1]:``,l=o?`\\`:c,u=n<i.length?i[n]:``;return Hm(l)&&Hm(u)||rh(i,a,l,u,r)||ym(e,a)||Sm(e,a)||wm(e,a)?!1:Math.floor(s/2)%2==1},ah=e=>{let t=sm(e),n=e.length,r={lineEnd:-1,result:!1},i=!1,a=0;for(;a<n;){if(e[a]!==`_`||t.regions[a]!==Up.PROSE){a+=1;continue}let o=a,s=a+1;for(;s<n&&e[s]===`_`&&t.regions[s]===Up.PROSE;)s+=1;a=s,ih(t,o,s,r)&&(i=!i)}return i},oh=(e,t,n)=>{if(!t||Rm.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
39
+ `),i=r===-1?0:r+1,a=e.substring(i,n);return zm.test(a)&&t.includes(`
40
+ `)?!0:Km(e,n,`*`)},sh=e=>{let t=km(e,Am);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return Tm(e,r)||Em(e,r)||oh(e,n,r)?e:th(e)%2==1?n.endsWith(`*`)?`${e}*`:`${e}**`:e},ch=(e,t,n)=>{if(!t||Rm.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
41
+ `),i=r===-1?0:r+1,a=e.substring(i,n);return zm.test(a)&&t.includes(`
42
+ `)?!0:Km(e,n,`_`)},lh=e=>{let t=km(e,jm);if(!t){let t=km(e,Im);if(t){let n=e.lastIndexOf(t[1]);if(!(Tm(e,n)||Em(e,n))&&ah(e))return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return Tm(e,r)||Em(e,r)||ch(e,n,r)?e:ah(e)?`${e}__`:e},uh=(e,t)=>{let{text:n}=e;return n[t]===`*`&&e.regions[t]===Up.PROSE&&n[t-1]!==`*`&&n[t+1]!==`*`&&n[t-1]!==`\\`&&!ym(e,t)},dh=e=>{let t=sm(e);for(let n=e.indexOf(`*`);n!==-1;n=e.indexOf(`*`,n+1)){if(!uh(t,n))continue;let r=n>0?e[n-1]:``,i=n<e.length-1?e[n+1]:``,a=!r||Jm(r),o=!i||Jm(i);if(!(a&&o)&&!(r&&i&&Hm(r)&&Hm(i))&&!o)return n}return-1},fh=e=>{if(!km(e,Nm))return e;let t=dh(e);if(t===-1||Tm(e,t)||Em(e,t))return e;let n=e.substring(t+1);return!n||Rm.test(n)?e:Zm(e)%2==1?`${e}*`:e},ph=e=>{let t=sm(e);for(let n=e.indexOf(`_`);n!==-1;n=e.indexOf(`_`,n+1))if(t.regions[n]===Up.PROSE&&e[n-1]!==`_`&&e[n+1]!==`_`&&e[n-1]!==`\\`&&!ym(t,n)&&!Sm(t,n)){let t=n>0?e[n-1]:``,r=n<e.length-1?e[n+1]:``;if(t&&r&&Hm(t)&&Hm(r))continue;return n}return-1},mh=e=>{let t=e.length;for(;t>0&&e[t-1]===`
43
+ `;)--t;return t<e.length?`${e.slice(0,t)}_${e.slice(t)}`:`${e}_`},hh=e=>{if(!e.endsWith(`**`))return null;let t=e.slice(0,-2);if(th(t)%2!=1)return null;let n=t.indexOf(`**`),r=ph(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},gh=e=>{if(!km(e,Pm))return e;let t=ph(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||Rm.test(n)||Tm(e,t)||Em(e,t))return e;if($m(e)%2==1){let t=hh(e);return t===null?mh(e):t}return e},_h=e=>{let t=th(e),n=Zm(e);return t%2==0&&n%2==0},vh=(e,t,n)=>!t||Rm.test(t)||Tm(e,n)||Em(e,n)?!0:Km(e,n,`*`),yh=e=>{if(Vm.test(e))return e;let t=km(e,Mm);if(!t)return e;let n=t[2];return vh(e,n,e.lastIndexOf(t[1]))?e:eh(e)%2==1?_h(e)?e:`${e}***`:e},bh=/<[a-zA-Z/][^>]*$/,xh=/[a-zA-Z/]/,Sh=e=>e.includes(`$`)||e.includes(`\\(`)||e.includes(`\\[`),Ch=(e,t)=>{let n=e[t+1];return n!==void 0&&xh.test(n)},wh=e=>{let t=e.match(bh);if(!t||t.index===void 0)return e;let n=Sh(e);for(let r=t.index;r<e.length;r+=1)if(e[r]===`<`&&Ch(e,r)&&!Tm(e,r)&&!(n&&Gm(e,r)))return e.substring(0,r).trimEnd();return e},Th=e=>{let t=sm(e);if(t.openFence)return e;let n=t.openSpan;if(!n)return e;let r=e.slice(n.start+n.runLength);if(!r||Rm.test(r))return e;let i=0,a=e.length-1;for(;a>=0&&e[a]==="`";)i+=1,--a;return i>=n.runLength?e:e+"`".repeat(n.runLength-i)},Eh=e=>dm(e,`$`),Dh=e=>{let t=sm(e),n=0;for(let r=0;r<e.length;r+=1)e[r]===`\\`?r+=1:t.regions[r]===Up.PROSE&&e[r]===`$`&&(r+1<e.length&&e[r+1]===`$`?r+=1:n+=1);return n},Oh=e=>{if(e.endsWith(`$`)&&!e.endsWith(`$$`))return`${e}$`;let t=e.indexOf(`$$`);return t!==-1&&e.indexOf(`
44
+ `,t)!==-1&&!e.endsWith(`
45
+ `)?`${e}
46
+ $$`:`${e}$$`},kh=e=>Eh(e)%2==0?e:Oh(e),Ah=e=>Dh(e)%2==1?`${e}$`:e,jh=`streamdown:incomplete-image`,Mh=(e,t,n)=>{if(e.substring(t+2).includes(`)`))return null;let r=Um(e,t);if(r===-1||Tm(e,r))return null;let i=r>0&&e[r-1]===`!`,a=i?r-1:r,o=e.substring(0,a),s=e.substring(r+1,t);return i?`${o}![${s}](${jh})`:n===`text-only`?`${o}${s}`:`${o}[${s}](streamdown:incomplete-link)`},Nh=(e,t)=>{for(let n=0;n<t;n++)if(e[n]===`[`&&!Tm(e,n)){if(n>0&&e[n-1]===`!`)continue;let t=Wm(e,n);if(t===-1)return n;if(t+1<e.length&&e[t+1]===`(`){let r=e.indexOf(`)`,t+2);r!==-1&&(n=r)}}return t},Ph=(e,t,n)=>{let r=t>0&&e[t-1]===`!`,i=r?t-1:t;if(!e.substring(t+1).includes(`]`)||Wm(e,t)===-1){let a=e.substring(0,i);if(r)return`${a}![${e.substring(t+1)}](${jh})`;if(n===`text-only`){let n=Nh(e,t);return e.substring(0,n)+e.substring(n+1)}return`${e}](streamdown:incomplete-link)`}return null},Fh=(e,t)=>{let n=e.lastIndexOf(`](`);if(n!==-1&&!Tm(e,n)){let r=Mh(e,n,t);if(r!==null)return r}for(let n=e.lastIndexOf(`[`);n!==-1;n=n===0?-1:e.lastIndexOf(`[`,n-1))if(!Tm(e,n)){let r=Ph(e,n,t);if(r!==null)return r}return e},Ih=32,Lh=(e,t=`protocol`)=>{let n=e;for(let e=0;e<Ih;e+=1){let e=Fh(n,t);if(e.length>=n.length)return e;n=e}return n},Rh=/^-{1,2}$/,zh=/^[\s]*-{1,2}[\s]+$/,Bh=/^={1,2}$/,Vh=/^[\s]*={1,2}[\s]+$/,Hh=e=>{if(!e||typeof e!=`string`)return e;let t=e.lastIndexOf(`
47
+ `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(Rh.test(i)&&!n.match(zh)){let t=r.split(`
48
+ `).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}if(Bh.test(i)&&!n.match(Vh)){let t=r.split(`
49
+ `).at(-1);if(t&&t.trim().length>0)return`${e}\u200B`}return e},Uh=/([\p{L}\p{N}_])~(?!~)(?=[\p{L}\p{N}_])/gu,Wh=e=>!e||typeof e!=`string`||!e.includes(`~`)?e:e.replace(Uh,(t,n,r)=>Tm(e,r+n.length)?t:`${n}\\~`),Gh=e=>dm(e,`~`),Kh=e=>{let t=km(e,Fm);if(t){let n=t[2];if(!n||Rm.test(n))return e;let r=e.lastIndexOf(t[1]);if(Tm(e,r)||Em(e,r))return e;if(Gh(e)%2==1)return`${e}~~`}else{let t=km(e,Lm);if(t){let n=e.lastIndexOf(t[0].slice(0,2));if(Tm(e,n)||Em(e,n))return e;if(Gh(e)%2==1)return`${e}~`}}return e},qh=e=>e!==!1,Jh=e=>e===!0,Yh={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},Xh=[{handler:{name:`singleTilde`,handle:Wh,priority:Yh.SINGLE_TILDE},optionKey:`singleTilde`},{handler:{name:`comparisonOperators`,handle:Om,priority:Yh.COMPARISON_OPERATORS},optionKey:`comparisonOperators`},{handler:{name:`htmlTags`,handle:wh,priority:Yh.HTML_TAGS},optionKey:`htmlTags`},{handler:{name:`setextHeadings`,handle:Hh,priority:Yh.SETEXT_HEADINGS},optionKey:`setextHeadings`},{handler:{name:`links`,handle:Lh,priority:Yh.LINKS},optionKey:`links`,earlyReturn:e=>e.endsWith(`](streamdown:incomplete-link)`)||e.endsWith(`](streamdown:incomplete-image)`)},{handler:{name:`boldItalic`,handle:yh,priority:Yh.BOLD_ITALIC},optionKey:`boldItalic`},{handler:{name:`bold`,handle:sh,priority:Yh.BOLD},optionKey:`bold`},{handler:{name:`italicDoubleUnderscore`,handle:lh,priority:Yh.ITALIC_DOUBLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`italicSingleAsterisk`,handle:fh,priority:Yh.ITALIC_SINGLE_ASTERISK},optionKey:`italic`},{handler:{name:`italicSingleUnderscore`,handle:gh,priority:Yh.ITALIC_SINGLE_UNDERSCORE},optionKey:`italic`},{handler:{name:`inlineCode`,handle:Th,priority:Yh.INLINE_CODE},optionKey:`inlineCode`},{handler:{name:`strikethrough`,handle:Kh,priority:Yh.STRIKETHROUGH},optionKey:`strikethrough`},{handler:{name:`katex`,handle:kh,priority:Yh.KATEX},optionKey:`katex`},{handler:{name:`inlineKatex`,handle:Ah,priority:Yh.INLINE_KATEX},optionKey:`inlineKatex`}],Zh=e=>{let t=e?.linkMode??`protocol`;return Xh.filter(({handler:t,optionKey:n})=>t.name===`links`?qh(e?.links)||qh(e?.images):t.name===`inlineKatex`?Jh(e?.inlineKatex):qh(e?.[n])).map(({handler:e,earlyReturn:n})=>e.name===`links`?{handler:Hp(Vp({},e),{handle:e=>Lh(e,t)}),earlyReturn:t===`protocol`?n:void 0}:{handler:e,earlyReturn:n})},Qh=(e,t)=>{if(!e||typeof e!=`string`)return e;let n=e.endsWith(` `)&&!e.endsWith(` `)?e.slice(0,-1):e,r=Zh(t),i=(t?.handlers??[]).map(e=>({handler:Hp(Vp({},e),{priority:e.priority??Yh.DEFAULT}),earlyReturn:void 0})),a=[...r,...i].sort((e,t)=>(e.handler.priority??0)-(t.handler.priority??0));try{for(let{handler:e,earlyReturn:t}of a)if(n=e.handle(n),t!=null&&t(n))return n;return n.endsWith(` `)&&!n.endsWith(` `)?n.slice(0,-1):n}finally{cm()}},$h=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},eg=(e,t)=>({classGroupId:e,validator:t}),tg=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ng=`-`,rg=[],ig=`arbitrary..`,ag=e=>{let t=cg(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return sg(e);let n=e.split(ng);return og(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?$h(i,t):t:i||rg}return n[e]||rg}}},og=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=og(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ng):e.slice(t).join(ng),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},sg=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?ig+r:void 0})(),cg=e=>{let{theme:t,classGroups:n}=e;return lg(n,t)},lg=(e,t)=>{let n=tg();for(let r in e){let i=e[r];ug(i,n,r,t)}return n},ug=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];dg(i,t,n,r)}},dg=(e,t,n,r)=>{typeof e==`string`?fg(e,t,n):typeof e==`function`?pg(e,t,n,r):mg(e,t,n,r)},fg=(e,t,n)=>{let r=e===``?t:hg(t,e);r.classGroupId=n},pg=(e,t,n,r)=>{gg(e)?ug(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(eg(n,e)))},mg=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];ug(o,hg(t,a),n,r)}},hg=(e,t)=>{let n=e,r=t.split(ng),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=tg(),n.nextPart.set(t,i)),n=i}return n},gg=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,_g=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},vg=`!`,yg=`:`,bg=[],xg=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Sg=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===yg){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(vg)?(c=s.slice(0,-1),l=!0):s.startsWith(vg)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return xg(t,l,c,u)};if(t){let e=t+yg,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):xg(bg,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Cg=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},wg=e=>({cache:_g(e.cacheSize),parseClassName:Sg(e),sortModifiers:Cg(e),postfixLookupClassGroupIds:Tg(e),...ag(e)}),Tg=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Eg=/\s+/,Dg=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(Eg),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+vg:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},Og=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=kg(n))&&(i&&(i+=` `),i+=r);return i},kg=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=kg(e[r]))&&(n&&(n+=` `),n+=t);return n},Ag=(e,...t)=>{let n,r,i,a,o=o=>(n=wg(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Dg(e,n);return i(e,a),a};return a=o,(...e)=>a(Og(...e))},jg=[],Mg=e=>{let t=t=>t[e]||jg;return t.isThemeGetter=!0,t.themeKey=e,t},Ng=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Pg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Fg=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ig=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lg=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Rg=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,zg=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bg=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vg=e=>Fg.test(e),q=e=>!!e&&!Number.isNaN(Number(e)),Hg=e=>!!e&&Number.isInteger(Number(e)),Ug=e=>e.endsWith(`%`)&&q(e.slice(0,-1)),Wg=e=>Ig.test(e),Gg=()=>!0,Kg=e=>Lg.test(e)&&!Rg.test(e),qg=()=>!1,Jg=e=>zg.test(e),Yg=e=>Bg.test(e),Xg=e=>!J(e)&&!Y(e),Zg=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Qg=e=>p_(e,__,qg),J=e=>Ng.test(e),$g=e=>p_(e,v_,Kg),e_=e=>p_(e,y_,q),t_=e=>p_(e,x_,Gg),n_=e=>p_(e,b_,qg),r_=e=>p_(e,h_,qg),i_=e=>p_(e,g_,Yg),a_=e=>p_(e,S_,Jg),Y=e=>Pg.test(e),o_=e=>m_(e,v_),s_=e=>m_(e,b_),c_=e=>m_(e,h_),l_=e=>m_(e,__),u_=e=>m_(e,g_),d_=e=>m_(e,S_,!0),f_=e=>m_(e,x_,!0),p_=(e,t,n)=>{let r=Ng.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},m_=(e,t,n=!1)=>{let r=Pg.exec(e);return r?r[1]?t(r[1]):n:!1},h_=e=>e===`position`||e===`percentage`,g_=e=>e===`image`||e===`url`,__=e=>e===`length`||e===`size`||e===`bg-size`,v_=e=>e===`length`,y_=e=>e===`number`,b_=e=>e===`family-name`,x_=e=>e===`number`||e===`weight`,S_=e=>e===`shadow`,C_=Ag(()=>{let e=Mg(`color`),t=Mg(`font`),n=Mg(`text`),r=Mg(`font-weight`),i=Mg(`tracking`),a=Mg(`leading`),o=Mg(`breakpoint`),s=Mg(`container`),c=Mg(`spacing`),l=Mg(`radius`),u=Mg(`shadow`),d=Mg(`inset-shadow`),f=Mg(`text-shadow`),p=Mg(`drop-shadow`),m=Mg(`blur`),h=Mg(`perspective`),g=Mg(`aspect`),_=Mg(`ease`),v=Mg(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Y,J],ee=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],S=()=>[`auto`,`contain`,`none`],C=()=>[Y,J,c],w=()=>[Vg,`full`,`auto`,...C()],T=()=>[Hg,`none`,`subgrid`,Y,J],E=()=>[`auto`,{span:[`full`,Hg,Y,J]},Hg,Y,J],D=()=>[Hg,`auto`,Y,J],te=()=>[`auto`,`min`,`max`,`fr`,Y,J],ne=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],re=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],ie=()=>[`auto`,...C()],O=()=>[Vg,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...C()],ae=()=>[s,Vg,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...C()],oe=()=>[Vg,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...C()],k=()=>[e,Y,J],se=()=>[...b(),c_,r_,{position:[Y,J]}],ce=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],A=()=>[`auto`,`cover`,`contain`,l_,Qg,{size:[Y,J]}],le=()=>[Ug,o_,$g],ue=()=>[``,`none`,`full`,l,Y,J],de=()=>[``,q,o_,$g],fe=()=>[`solid`,`dashed`,`dotted`,`double`],pe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],me=()=>[q,Ug,c_,r_],he=()=>[``,`none`,m,Y,J],ge=()=>[`none`,q,Y,J],_e=()=>[`none`,q,Y,J],ve=()=>[q,Y,J],ye=()=>[Vg,`full`,...C()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Wg],breakpoint:[Wg],color:[Gg],container:[Wg],"drop-shadow":[Wg],ease:[`in`,`out`,`in-out`],font:[Xg],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Wg],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Wg],shadow:[Wg],spacing:[`px`,q],text:[Wg],"text-shadow":[Wg],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Vg,J,Y,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Y,J]}],"container-named":[Zg],columns:[{columns:[q,`auto`,J,Y,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Hg,`auto`,Y,J]}],basis:[{basis:[Vg,`full`,`auto`,s,...C()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[q,Vg,`auto`,`initial`,`none`,J]}],grow:[{grow:[``,q,Y,J]}],shrink:[{shrink:[``,q,Y,J]}],order:[{order:[Hg,`first`,`last`,`none`,Y,J]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...ne(),`normal`]}],"justify-items":[{"justify-items":[...re(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...re()]}],"align-content":[{content:[`normal`,...ne()]}],"align-items":[{items:[...re(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...re(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ne()}],"place-items":[{"place-items":[...re(),`baseline`]}],"place-self":[{"place-self":[`auto`,...re()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:ie()}],mx:[{mx:ie()}],my:[{my:ie()}],ms:[{ms:ie()}],me:[{me:ie()}],mbs:[{mbs:ie()}],mbe:[{mbe:ie()}],mt:[{mt:ie()}],mr:[{mr:ie()}],mb:[{mb:ie()}],ml:[{ml:ie()}],"space-x":[{"space-x":C()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":C()}],"space-y-reverse":[`space-y-reverse`],size:[{size:O()}],"inline-size":[{inline:[`auto`,...ae()]}],"min-inline-size":[{"min-inline":[`auto`,...ae()]}],"max-inline-size":[{"max-inline":[`none`,...ae()]}],"block-size":[{block:[`auto`,...oe()]}],"min-block-size":[{"min-block":[`auto`,...oe()]}],"max-block-size":[{"max-block":[`none`,...oe()]}],w:[{w:[s,`screen`,...O()]}],"min-w":[{"min-w":[s,`screen`,`none`,...O()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...O()]}],h:[{h:[`screen`,`lh`,...O()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...O()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...O()]}],"font-size":[{text:[`base`,n,o_,$g]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,f_,t_]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Ug,J]}],"font-family":[{font:[s_,n_,t]}],"font-features":[{"font-features":[J]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Y,J]}],"line-clamp":[{"line-clamp":[q,`none`,Y,e_]}],leading:[{leading:[`none`,a,...C()]}],"list-image":[{"list-image":[`none`,Y,J]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Y,J]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...fe(),`wavy`]}],"text-decoration-thickness":[{decoration:[q,`from-font`,`auto`,Y,$g]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[q,`auto`,Y,J]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:C()}],"tab-size":[{tab:[Hg,Y,J]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Y,J]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Y,J]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:se()}],"bg-repeat":[{bg:ce()}],"bg-size":[{bg:A()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Hg,Y,J],radial:[``,Y,J],conic:[``,Hg,Y,J]},u_,i_]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:le()}],"gradient-via-pos":[{via:le()}],"gradient-to-pos":[{to:le()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":de()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...fe(),`hidden`,`none`]}],"divide-style":[{divide:[...fe(),`hidden`,`none`]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-bs":[{"border-bs":k()}],"border-color-be":[{"border-be":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...fe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[q,Y,J]}],"outline-w":[{outline:[``,q,o_,$g]}],"outline-color":[{outline:k()}],shadow:[{shadow:[``,`inner`,`none`,u,d_,a_]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":[`none`,d,d_,a_]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:de()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[q,$g]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":[`none`,f,d_,a_]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[q,Y,J]}],"mix-blend":[{"mix-blend":[...pe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":pe()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[q]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[Y,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[q]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:se()}],"mask-repeat":[{mask:ce()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Y,J]}],filter:[{filter:[``,`none`,Y,J]}],blur:[{blur:he()}],brightness:[{brightness:[q,Y,J]}],contrast:[{contrast:[q,Y,J]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,d_,a_]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:[``,q,Y,J]}],"hue-rotate":[{"hue-rotate":[q,Y,J]}],invert:[{invert:[``,q,Y,J]}],saturate:[{saturate:[q,Y,J]}],sepia:[{sepia:[``,q,Y,J]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,J]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[q,Y,J]}],"backdrop-contrast":[{"backdrop-contrast":[q,Y,J]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,q,Y,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[q,Y,J]}],"backdrop-invert":[{"backdrop-invert":[``,q,Y,J]}],"backdrop-opacity":[{"backdrop-opacity":[q,Y,J]}],"backdrop-saturate":[{"backdrop-saturate":[q,Y,J]}],"backdrop-sepia":[{"backdrop-sepia":[``,q,Y,J]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Y,J]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[q,`initial`,Y,J]}],ease:[{ease:[`linear`,`initial`,_,Y,J]}],delay:[{delay:[q,Y,J]}],animate:[{animate:[`none`,v,Y,J]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Y,J]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":[`scale-3d`],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[Y,J,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":[`translate-none`],zoom:[{zoom:[Hg,Y,J]}],accent:[{accent:k()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:k()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Y,J]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":k()}],"scrollbar-track-color":[{"scrollbar-track":k()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Y,J]}],fill:[{fill:[`none`,...k()]}],"stroke-w":[{stroke:[q,o_,$g,e_]}],stroke:[{stroke:[`none`,...k()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),w_=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,T_=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,E_={};function D_(e,t){return((t||E_).jsx?T_:w_).test(e)}var O_=/[ \t\n\f\r]/g;function k_(e){return typeof e==`object`?e.type===`text`&&A_(e.value):A_(e)}function A_(e){return e.replace(O_,``)===``}var j_=/\/\*(?:[^*]|\*(?!\/))*\*\//g,M_=/\n/g,N_=/^\s*/,P_=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,F_=/^:\s*/,I_=/^((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|url\((?:'(?:\\.|[^'\\])*'|"(?:\\.|[^"\\])*"|[^)]*)\)|[^};])+)/,L_=/^[;\s]*/,R_=`
50
+ `,z_=`/`,B_=`*`,V_=``,H_=`comment`,U_=`declaration`;function W_(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var n=1,r=1;function i(e){var t=e.match(M_);t&&(n+=t.length);var i=e.lastIndexOf(R_);r=~i?e.length-i:r+e.length}function a(){var e={line:n,column:r};return function(t){return t.position=new o(e),l(),t}}function o(e){this.start=e,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(i){var a=Error(t.source+`:`+n+`:`+r+`: `+i);if(a.reason=i,a.filename=t.source,a.line=n,a.column=r,a.source=e,!t.silent)throw a}function c(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function l(){c(N_)}function u(e){for(var t;t=d();)e.push(t);return e}function d(){var t=a();if(z_==e.charAt(0)&&B_==e.charAt(1)){for(var n=2;V_!=e.charAt(n)&&(B_!=e.charAt(n)||z_!=e.charAt(n+1));)++n;if(n+=2,V_===e.charAt(n-1))return s(`End of comment missing`);var o=e.slice(2,n-2);return r+=2,i(o),e=e.slice(n),r+=2,t({type:H_,comment:o})}}function f(){var e=a(),t=c(P_);if(t){if(d(),!c(F_))return s(`property missing ':'`);var n=c(I_),r=e({type:U_,property:t[0].replace(j_,V_).trim(),value:n?n[0].replace(j_,V_).trim():V_});return c(L_),r}}function p(){var e=[];u(e);for(var t;t=f();)e.push(t),u(e);return e}return l(),p()}function G_(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=W_(e),i=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:a}=e;i?t(r,a,e):a&&(n??={},n[r]=a)}),n}function K_(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?J_(e.position):`start`in e||`end`in e?J_(e):`line`in e||`column`in e?q_(e):``}function q_(e){return Y_(e&&e.line)+`:`+Y_(e&&e.column)}function J_(e){return q_(e&&e.start)+`-`+q_(e&&e.end)}function Y_(e){return e&&typeof e==`number`?e:1}var X_=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=K_(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Object.defineProperties(X_.prototype,{file:{configurable:!0,enumerable:!0,value:``,writable:!0},name:{configurable:!0,enumerable:!0,value:``,writable:!0},reason:{configurable:!0,enumerable:!0,value:``,writable:!0},message:{configurable:!0,enumerable:!0,value:``,writable:!0},stack:{configurable:!0,enumerable:!0,value:``,writable:!0},column:{configurable:!0,enumerable:!0,writable:!0},line:{configurable:!0,enumerable:!0,writable:!0},ancestors:{configurable:!0,enumerable:!0,writable:!0},cause:{configurable:!0,enumerable:!0,writable:!0},fatal:{configurable:!0,enumerable:!0,writable:!0},place:{configurable:!0,enumerable:!0,writable:!0},ruleId:{configurable:!0,enumerable:!0,writable:!0},source:{configurable:!0,enumerable:!0,writable:!0}});var Z_={}.hasOwnProperty,Q_=new Map,$_=/[A-Z]/g,ev=/-([a-z])/g,tv=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),nv=new Set([`td`,`th`]),rv=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function iv(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=hv(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=mv(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?pt:ft,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=av(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function av(e,t,n){if(t.type===`element`)return ov(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return sv(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return lv(e,t,n);if(t.type===`mdxjsEsm`)return cv(e,t);if(t.type===`root`)return uv(e,t,n);if(t.type===`text`)return dv(e,t)}function ov(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=pt,e.schema=i),e.ancestors.push(t);let a=xv(e,t.tagName,!1),o=gv(e,t),s=vv(e,t);return tv.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!k_(e)})),fv(e,o,a,t),pv(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function sv(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Sv(e,t.position)}function cv(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Sv(e,t.position)}function lv(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=pt,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:xv(e,t.name,!0),o=_v(e,t),s=vv(e,t);return fv(e,o,a,t),pv(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function uv(e,t,n){let r={};return pv(r,vv(e,t)),e.create(t,e.Fragment,r,n)}function dv(e,t){return t.value}function fv(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function pv(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function mv(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function hv(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=is(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function gv(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Z_.call(t.properties,i)){let a=yv(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&nv.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function _v(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Sv(e,t.position)}else{let{name:i}=r,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Sv(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function vv(e,t){let n=[],r=-1,i=e.passKeys?new Map:Q_;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=av(e,a,o);s!==void 0&&n.push(s)}return n}function yv(e,t,n){if(n==null||typeof n==`number`&&Number.isNaN(n))return;let r=lt(e.schema,t);return Array.isArray(n)&&(n=r.commaSeparated?ht(n):yt(n)),r.property===`style`?[`style`,typeof n==`object`?e.stylePropertyNameCase===`dom`?n:Cv(n):bv(e,String(n))]:[e.elementAttributeNameCase===`react`&&r.space?at[r.property]||r.property:r.attribute,n]}function bv(e,t){let n={};try{G_(t,function(t,r){if(t&&r){let i=t;i.slice(0,2)!==`--`&&(i=i.toLowerCase(),e.stylePropertyNameCase===`dom`&&(i.slice(0,4)===`-ms-`&&(i=i.slice(1)),i=i.replace(ev,Ev))),n[i]=r}})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new X_("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=rv+`#cannot-parse-style-attribute`,r}return n}function xv(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=D_(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=D_(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Z_.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Sv(e)}function Sv(e,t){let n=new X_("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=rv+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function Cv(e){let t={},n;for(n in e)Z_.call(e,n)&&(t[wv(n)]=e[n]);return t}function wv(e){if(e.slice(0,2)===`--`)return e;let t=e.replace($_,Tv);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Tv(e){return`-`+e.toLowerCase()}function Ev(e,t){return t.toUpperCase()}var Dv={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},Ov={tokenize:kv};function kv(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),K(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return U(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Av={tokenize:Mv},jv={tokenize:Nv};function Mv(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new rp;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(jv,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(jv,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return U(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new rp;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Nv(e,t,n){return K(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}var Pv={tokenize:Fv};function Fv(e){let t=this,n=e.attempt(Nd,r,e.attempt(this.parser.constructs.flowInitial,i,K(e,e.attempt(this.parser.constructs.flow,i,e.attempt(of,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Iv={resolveAll:Bv()},Lv=zv(`string`),Rv=zv(`text`);function zv(e){return{resolveAll:Bv(e===`text`?Vv:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Bv(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Vv(e,t){let n=new rp,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var Hv=n({attentionMarkers:()=>Xv,contentInitial:()=>Wv,disable:()=>Zv,document:()=>Uv,flow:()=>Kv,flowInitial:()=>Gv,insideSpan:()=>Yv,string:()=>qv,text:()=>Jv}),Uv={42:Yf,43:Yf,45:Yf,48:Yf,49:Yf,50:Yf,51:Yf,52:Yf,53:Yf,54:Yf,55:Yf,56:Yf,57:Yf,62:Fd},Wv={91:hf},Gv={[-2]:qd,[-1]:qd,32:qd},Kv={35:xf,42:qf,45:[ap,qf],60:wf,61:ap,95:qf,96:Gd,126:Gd},qv={38:Vd,92:zd},Jv={[-5]:Gf,[-4]:Gf,[-3]:Gf,33:Vf,38:Vd,42:Ed,60:[Ad,kf],91:Uf,92:[yf,zd],93:jf,95:Ed,96:Zd},Yv={null:[Ed,Iv]},Xv={null:[42,95]},Zv={null:[]};function Qv(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:S(x),check:S(ee),consume:v,enter:y,exit:b,interrupt:S(ee,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=Yu(o,e),g(),o[o.length-1]===null?(C(t,0),l.events=Td(a,l.events,l),l.events):[]}function f(e,t){return ey(p(e),t)}function p(e){return $v(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,T()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){U(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,T()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){C(e,t.from)}function ee(e,t){t.restore()}function S(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=w(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function C(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Ju(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function w(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,T()}}function T(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function $v(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function ey(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
51
+ `;break;case-3:o=`\r
52
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function ty(e){let t={constructs:Zu([Hv,...(e||{}).extensions||[]]),content:n(Ov),defined:[],document:n(Av),flow:n(Pv),lazy:{},string:n(Lv),text:n(Rv)};return t;function n(e){return n;function n(n){return Qv(t,e,n)}}}function ny(e){for(;!rf(e););return e}var ry=/[\0\t\n\r]/g;function iy(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){ry.lastIndex=c;let n=ry.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var ay={}.hasOwnProperty;function oy(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),sy(n)(ny(ty(n).document().write(iy()(e,t,!0))))}function sy(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(Te),autolinkProtocol:T,autolinkEmail:T,atxHeading:o(xe),blockQuote:o(ge),characterEscape:T,characterReference:T,codeFenced:o(_e),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(_e,s),codeText:o(ve,s),codeTextData:T,data:T,codeFlowValue:T,definition:o(ye),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(be),hardBreakEscape:o(Se),hardBreakTrailing:o(Se),htmlFlow:o(Ce,s),htmlFlowData:T,htmlText:o(Ce,s),htmlTextData:T,image:o(we),label:s,link:o(Te),listItem:o(De),listItemValue:p,listOrdered:o(Ee,f),listUnordered:o(Ee),paragraph:o(Oe),reference:le,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(xe),strong:o(ke),thematicBreak:o(je)},exit:{atxHeading:l(),atxHeadingSequence:ee,autolink:l(),autolinkEmail:he,autolinkProtocol:me,blockQuote:l(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:fe,characterReference:pe,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:E,codeIndented:l(v),codeText:l(ie),codeTextData:E,data:E,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(te),hardBreakTrailing:l(te),htmlFlow:l(ne),htmlFlowData:E,htmlText:l(re),htmlTextData:E,image:l(ae),label:k,labelText:oe,lineEnding:D,link:l(O),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ue,resourceDestinationString:se,resourceTitleString:ce,resource:A,setextHeading:l(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:l(),thematicBreak:l()}};ly(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),ay.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||dy).call(o,void 0,e[0])}for(r.position={start:cy(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:cy(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:cy(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+K_({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||dy).call(this,e,r[0])),n.position.end=cy(e.end)}function d(){return Bl(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Oc(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ee(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=Ae(),n.position={start:cy(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=cy(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=cy(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function te(){this.data.atHardBreak=!0}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function re(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function ie(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function O(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ae(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function oe(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Eu(t),n.identifier=Oc(t).toLowerCase()}function k(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function se(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ce(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function A(){this.data.inReference=void 0}function le(){this.data.referenceType=`collapsed`}function ue(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=Oc(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function de(e){this.data.characterReferenceType=e.type}function fe(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=wu(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=Cu(t);let i=this.stack[this.stack.length-1];i.value+=r}function pe(e){let t=this.stack.pop();t.position.end=cy(e.end)}function me(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function he(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ge(){return{type:`blockquote`,children:[],position:void 0}}function _e(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function ve(){return{type:`inlineCode`,value:``,position:void 0}}function ye(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function be(){return{type:`emphasis`,children:[],position:void 0}}function xe(){return{type:`heading`,depth:0,children:[],position:void 0}}function Se(){return{type:`break`,position:void 0}}function Ce(){return{type:`html`,value:``,position:void 0}}function we(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function Te(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function Ee(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function De(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function Oe(){return{type:`paragraph`,children:[],position:void 0}}function ke(){return{type:`strong`,children:[],position:void 0}}function Ae(){return{type:`text`,value:``,position:void 0}}function je(){return{type:`thematicBreak`,position:void 0}}}function cy(e){return{line:e.line,column:e.column,offset:e.offset}}function ly(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?ly(e,r):uy(e,r)}}function uy(e,t){let n;for(n in t)if(ay.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function dy(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+K_({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+K_({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+K_({start:t.start,end:t.end})+`) is still open`)}function fy(e){let t=this;t.parser=n;function n(n){return oy(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function py(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function my(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
53
+ `}]}function hy(e,t){let n=t.value?t.value+`
54
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function gy(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _y(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function vy(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=wd(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function yy(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function by(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function xy(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Sy(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xy(e,t);let i={src:wd(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Cy(e,t){let n={src:wd(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function wy(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Ty(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return xy(e,t);let i={href:wd(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Ey(e,t){let n={href:wd(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Dy(e,t,n){let r=e.all(t),i=n?Oy(n):ky(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
55
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
56
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Oy(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=ky(n[r])}return t}function ky(e){return e.spread??e.children.length>1}function Ay(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function jy(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function My(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Ny(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Py(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=is(t.children[1]),o=rs(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Fy(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Iy(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Ly=9,Ry=32;function zy(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(By(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(By(t.slice(i),i>0,!1)),a.join(``)}function By(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Ly||t===Ry;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Ly||t===Ry;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Vy(e,t){let n={type:`text`,value:zy(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Hy(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Uy={blockquote:py,break:my,code:hy,delete:gy,emphasis:_y,footnoteReference:vy,heading:yy,html:by,imageReference:Sy,image:Cy,inlineCode:wy,linkReference:Ty,link:Ey,listItem:Dy,list:Ay,paragraph:jy,root:My,strong:Ny,table:Py,tableCell:Iy,tableRow:Fy,text:Vy,thematicBreak:Hy,toml:Wy,yaml:Wy,definition:Wy,footnoteDefinition:Wy};function Wy(){}function Gy(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Ky(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function qy(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||Gy,r=e.options.footnoteBackLabel||Ky,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=wd(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Fe(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
57
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
58
+ `}]}}var Jy={}.hasOwnProperty,Yy={};function Xy(e,t){let n=t||Yy,r=new Map,i=new Map,a={all:s,applyData:Qy,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Uy,...n.handlers},one:o,options:n,patch:Zy,wrap:eb};return k(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Jy.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Fe(n);return r.children=a.all(e),r}return Fe(e)}return(a.options.unknownHandler||$y)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=tb(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=tb(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Zy(e,t){e.position&&(t.position=os(e))}function Qy(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Fe(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function $y(e,t){let n=t.data||{},r=`value`in t&&!(Jy.call(n,`hProperties`)||Jy.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function eb(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
59
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
60
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
61
+ `}),n}function tb(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function nb(e,t){let n=Xy(e,t),r=n.one(e,void 0),i=qy(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
62
+ `},i)),a}function rb(e,t){return e&&`run`in e?async function(n,r){let i=nb(n,{file:r,...t});await e.run(i,r)}:function(n,r){return nb(n,{file:r,...e||t})}}function ib(e){if(e)throw e}var ab=e(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function ob(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function sb(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?cb(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function cb(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var lb={basename:ub,dirname:db,extname:fb,join:pb,sep:`/`};function ub(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);gb(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function db(e){if(gb(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function fb(e){gb(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function pb(...e){let t=-1,n;for(;++t<e.length;)gb(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:mb(n)}function mb(e){gb(e);let t=e.codePointAt(0)===47,n=hb(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function hb(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function gb(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var _b={cwd:vb};function vb(){return`/`}function yb(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function bb(e){if(typeof e==`string`)e=new URL(e);else if(!yb(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return xb(e)}function xb(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Sb=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Cb=class{constructor(e){let t;t=e?yb(e)?{path:e}:typeof e==`string`||Db(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:_b.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Sb.length;){let e=Sb[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Sb.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?lb.basename(this.path):void 0}set basename(e){Tb(e,`basename`),wb(e,`basename`),this.path=lb.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?lb.dirname(this.path):void 0}set dirname(e){Eb(this.basename,`dirname`),this.path=lb.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?lb.extname(this.path):void 0}set extname(e){if(wb(e,`extname`),Eb(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=lb.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){yb(e)&&(e=bb(e)),Tb(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?lb.basename(this.path,this.extname):void 0}set stem(e){Tb(e,`stem`),wb(e,`stem`),this.path=lb.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new X_(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function wb(e,t){if(e&&e.includes(lb.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+lb.sep+"`")}function Tb(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function Eb(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Db(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Ob=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),kb=i(ab(),1),Ab={}.hasOwnProperty,jb=new class e extends Ob{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=sb()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,kb.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(Pb(`data`,this.frozen),this.namespace[e]=t,this):Ab.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Pb(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Lb(e),n=this.parser||this.Parser;return Mb(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Mb(`process`,this.parser||this.Parser),Nb(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Lb(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);zb(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Mb(`processSync`,this.parser||this.Parser),Nb(`processSync`,this.compiler||this.Compiler),this.process(e,r),Ib(`processSync`,`process`,t),n;function r(e,r){t=!0,ib(e),n=r}}run(e,t,n){Fb(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Lb(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Ib(`runSync`,`run`,n),r;function i(e,t){ib(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Lb(t),r=this.compiler||this.Compiler;return Nb(`stringify`,r),Fb(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(Pb(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,kb.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];ob(o)&&ob(r)&&(r=(0,kb.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Mb(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Nb(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Pb(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Fb(e){if(!ob(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Ib(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Lb(e){return Rb(e)?e:new Cb(e)}function Rb(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function zb(e){return typeof e==`string`||Bb(e)}function Bb(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Vb=i(o(),1),X=r();function Hb(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ub=Hb();function Wb(e){Ub=e}var Gb={exec:()=>null};function Kb(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function Z(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Jb.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var qb=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),Jb={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Kb(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Kb(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:Kb(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:Kb(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:Kb(e=>RegExp(`^ {0,${e}}(?:</?(?:${lx})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,`i`)),blockquoteBeginRegex:Kb(e=>RegExp(`^ {0,${e}}>`))},Yb=/^(?:[ \t]*(?:\n|$))+/,Xb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Zb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Qb=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,$b=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ex=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,tx=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,nx=Z(tx).replace(/bull/g,ex).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),rx=Z(tx).replace(/bull/g,ex).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ix=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,ax=/^[^\n]+/,ox=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,sx=Z(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,ox).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),cx=Z(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,ex).getRegex(),lx=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,ux=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,dx=Z(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,ux).replace(`tag`,lx).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),fx=e=>Z(ix).replace(`hr`,Qb).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,` {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`).replace(`tag`,lx).getRegex(),px=fx(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),mx=fx(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),hx={blockquote:Z(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,mx).getRegex(),code:Xb,def:sx,fences:Zb,heading:$b,hr:Qb,html:dx,lheading:nx,list:cx,newline:Yb,paragraph:px,table:Gb,text:ax},gx=Z(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,Qb).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,` {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`).replace(`tag`,lx).getRegex(),_x={...hx,lheading:rx,table:gx,paragraph:Z(ix).replace(`hr`,Qb).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,gx).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,` {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`).replace(`tag`,lx).getRegex()},vx={...hx,html:Z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,ux).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Gb,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Z(ix).replace(`hr`,Qb).replace(`heading`,` *#{1,6} *[^
63
+ ]`).replace(`lheading`,nx).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},yx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,bx=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,xx=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Sx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Cx=/[\p{P}\p{S}]/u,wx=/[\s\p{P}\p{S}]/u,Tx=/[^\s\p{P}\p{S}]/u,Ex=Z(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,wx).getRegex(),Dx=/[\p{Pi}\p{Ps}"']/u,Ox=/(?!~)[\p{P}\p{S}]/u,kx=/(?!~)[\s\p{P}\p{S}]/u,Ax=/(?:[^\s\p{P}\p{S}]|~)/u,jx=Z(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,qb?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Mx=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Nx=Z(Mx,`u`).replace(/punct/g,Cx).getRegex(),Px=Z(Mx,`u`).replace(/punct/g,Ox).getRegex(),Fx=Z(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,Dx).replace(/punct/g,Cx).getRegex(),Ix=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Lx=Z(Ix,`gu`).replace(/notPunctSpace/g,Tx).replace(/punctSpace/g,wx).replace(/punct/g,Cx).getRegex(),Rx=Z(Ix,`gu`).replace(/notPunctSpace/g,Ax).replace(/punctSpace/g,kx).replace(/punct/g,Ox).getRegex(),zx=Z(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Tx).replace(/punctSpace/g,wx).replace(/punct/g,Cx).getRegex(),Bx=Z(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Tx).replace(/punctSpace/g,wx).replace(/punct/g,Cx).getRegex(),Vx=Z(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Tx).replace(/punctSpace/g,wx).replace(/punct/g,Cx).getRegex(),Hx=Z(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Cx).getRegex(),Ux=Z(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Tx).replace(/punctSpace/g,wx).replace(/punct/g,Cx).getRegex(),Wx=Z(/\\(punct)/,`gu`).replace(/punct/g,Cx).getRegex(),Gx=Z(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,`gu`).replace(/punct/g,Cx).getRegex(),Kx=Z(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),qx=Z(ux).replace(`(?:-->|$)`,`-->`).getRegex(),Jx=Z(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,qx).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Yx=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Xx=Z(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,Yx).getRegex(),Zx=Z(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace(`label`,Xx).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qx=Z(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Xx).replace(`ref`,ox).getRegex(),$x=Z(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,ox).getRegex(),eS=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,tS=Z(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,Yx).getRegex(),nS=Z(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,Z(/^!?\[(label)\]\[(ref)\]/).replace(`label`,tS).replace(`ref`,eS).getRegex()).replace(`nolink`,Z(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,eS).getRegex()).getRegex(),rS=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,iS=Z(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),aS={_backpedal:Gb,anyPunctuation:Wx,anyPunctuationOutsideCode:Gx,autolink:Kx,blockSkip:jx,br:xx,code:bx,del:Gb,delLDelim:Gb,delRDelim:Gb,emStrongLDelim:Nx,emStrongRDelimAst:Lx,emStrongRDelimUnd:Bx,escape:yx,link:Zx,nolink:$x,punctuation:Ex,reflink:Qx,reflinkSearch:nS,tag:Jx,text:Sx,url:Gb},oS={...aS,emStrongLDelim:Fx,emStrongRDelimAst:zx,emStrongRDelimUnd:Vx,link:Z(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Xx).getRegex(),reflink:Z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Xx).getRegex()},sS={...aS,emStrongRDelimAst:Rx,emStrongLDelim:Px,delLDelim:Hx,delRDelim:Ux,url:Z(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,iS).replace(`protocol`,rS).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Z(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,rS).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},cS={...sS,br:Z(xx).replace(`{2,}`,`*`).getRegex(),text:Z(sS.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},lS={normal:hx,gfm:_x,pedantic:vx},uS={normal:aS,gfm:sS,breaks:cS,pedantic:oS},dS={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},fS=e=>dS[e];function pS(e,t){if(t){if(Jb.escapeTest.test(e))return e.replace(Jb.escapeReplace,fS)}else if(Jb.escapeTestNoEncode.test(e))return e.replace(Jb.escapeReplaceNoEncode,fS);return e}function mS(e){return Jb.numericCharacterReference.test(e)?e.replace(Jb.numericCharacterReferenceOrAmpersand,(e,t,n)=>{if(t===void 0&&n===void 0)return`&amp;`;let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:r===38?`&amp;`:String.fromCodePoint(r)}):e}function hS(e){try{e=encodeURI(e).replace(Jb.percentDecode,`%`)}catch{return null}return e}function gS(e,t){let n=e.replace(Jb.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Jb.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(Jb.slashPipe,`|`);return n}function _S(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function vS(e){let t=e.split(`
64
+ `),n=t.length-1;for(;n>=0&&Jb.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
65
+ `)}function yS(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function bS(e,t){if(e.indexOf(t[0])===-1&&e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function xS(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function SS(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`,l=r.state.inLink,u=r.state.linkEmitted,d=r.state.inRawBlock;r.state.inLink=!0,r.state.linkEmitted=!1;let f=r.inlineTokens(s),p=r.state.linkEmitted;if(r.state.linkEmitted=u,r.state.inLink=l,!c){if(p){r.state.inRawBlock=d;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:f}}function CS(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
66
+ `).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
67
+ `)}function wS(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var TS=class{options;rules;lexer;constructor(e){this.options=e||Ub}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:vS(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=CS(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=_S(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:_S(t[0],`
68
+ `),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:_S(t[0],`
69
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=_S(t[0],`
70
+ `).split(`
71
+ `),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
72
+ `),c=s.replace(this.rules.other.blockquoteSetextReplace,`
73
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
74
+ ${s}`:s,r=r?`${r}
75
+ ${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`||u?.type===`heading`||u?.type===`hr`||u?.type===`html`)break;if(u?.type===`blockquote`){let t=u,a=e.join(`
76
+ `),o=t.raw+`
77
+ `+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s;let c=o.substring(s.raw.length).replace(/^\n/,``),l=c?c.split(`
78
+ `).length:0,d=l?e.slice(0,-l):e;d.length>0&&(n=`${n}
79
+ ${d.join(`
80
+ `)}`),r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
81
+ `+e.join(`
82
+ `),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
83
+ `)}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=e,r=()=>n.length-e.length,i=t[1].trim(),a=i.length>1,o={type:`list`,raw:``,ordered:a,start:a?+i.slice(0,-1):``,loose:!1,items:[]};i=a?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=a?i:`[*+-]`);let s=this.rules.other.listItemRegex(i),c=!1;for(;e;){let i=!1,a=``;if(!(t=s.exec(e))||this.rules.block.hr.test(e))break;let l=r();e=e.substring(t[0].length);let u=t[2].split(`
84
+ `,1)[0],d=t[1].length,f=this.options.pedantic?xS(u,d):u.replace(this.rules.other.leadingSpaceTab,e=>xS(e,d)),p=e.split(`
85
+ `,1)[0],m=!f.trim(),h=0;if(this.options.pedantic?(h=2,a=f.trimStart()):m?h=d+1:(h=f.search(this.rules.other.nonSpaceChar),h=h>4?1:h,a=f.slice(h),h+=d),m&&this.rules.other.blankLine.test(p)&&(e=e.substring(p.length+1),i=!0),!i){let t=this.rules.other.nextBulletRegex(h),n=this.rules.other.hrRegex(h),r=this.rules.other.fencesBeginRegex(h),i=this.rules.other.headingBeginRegex(h),o=this.rules.other.htmlBeginRegex(h),s=this.rules.other.blockquoteBeginRegex(h);for(;e;){let c=e.split(`
86
+ `,1)[0],l;if(p=c,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting,` `),l=p):l=p.replace(this.rules.other.leadingSpaceTab,e=>xS(e)),r.test(p)||i.test(p)||o.test(p)||s.test(p)||t.test(p)||n.test(p))break;if(l.search(this.rules.other.nonSpaceChar)>=h||!p.trim())a+=`
87
+ `+l.slice(h);else{if(m||f.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||r.test(f)||i.test(f)||n.test(f))break;a+=`
88
+ `+p}m=!p.trim(),e=e.substring(c.length+1),f=l.slice(h)}}let g=n.slice(l,r());o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(c=!0)),o.items.push({type:`list_item`,raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(a),loose:!1,text:a,tokens:[]})}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=n.slice(0,r()).trimEnd();for(let e of o.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!o.loose){let t=e.tokens.filter(e=>e.type===`space`);o.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of o.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,o.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(o.loose)for(let e of o.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=vS(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){if(!this.rules.other.startAngleBracket.test(t[2])&&bS(t[2],`()`)!==-1)return;let e=yS(t[1]).replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:_S(t[0],`
89
+ `),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=gS(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
90
+ `):[],a={type:`table`,raw:_S(t[0],`
91
+ `),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(gS(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:_S(t[0],`
92
+ `),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
93
+ `?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){if(this.lexer.state.linkParenPossible===!1)return;let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&wS(e,t[1],n,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=_S(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=bS(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let i=t[2],a=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):``;return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i.slice(1):i.slice(1,-1)),SS(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,`$1`),title:a&&a.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&wS(e,n[1],r,this.rules))return;let i=t[yS((n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `))];if(!i){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return SS(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:e?t[0]:mS(t[0]),escaped:e}}}},ES=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Ub,this.options.tokenizer=this.options.tokenizer||new TS,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:Jb,block:lS.normal,inline:uS.normal};this.options.pedantic?(t.block=lS.pedantic,t.inline=uS.pedantic):this.options.gfm&&(t.block=lS.gfm,t.inline=this.options.breaks?uS.breaks:uS.gfm),this.tokenizer.rules=t}static get rules(){return{block:lS,inline:uS}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Jb.carriageReturn,`
94
+ `),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Jb.tabCharGlobal,` `).replace(Jb.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
95
+ `:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
96
+ `)?``:`
97
+ `)+i.raw,n.text+=`
98
+ `+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if((i=this.tokenizer.fences(e))||(i=this.tokenizer.heading(e))||(i=this.tokenizer.hr(e))||(i=this.tokenizer.blockquote(e))||(i=this.tokenizer.list(e))||(i=this.tokenizer.html(e))){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
99
+ `)?``:`
100
+ `)+i.raw,n.text+=`
101
+ `+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if((i=this.tokenizer.table(e))||(i=this.tokenizer.lheading(e))){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
102
+ `)?``:`
103
+ `)+i.raw,r.text+=`
104
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length)}else if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
105
+ `)?``:`
106
+ `)+i.raw,n.text+=`
107
+ `+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,yS(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=this.state.linkParenPossible;this.state.linkParenPossible=n&&e.includes(`)`);try{return this.#e(e,t)}finally{this.state.linkParenPossible=n}}#e(e,t){let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,yS(n.slice(r+1,-1))))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(e,t,n)=>n?`+`.repeat(e.length):t?t+e.slice(t.length,-t.length).replace(/`/g,`+`)+t:e),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if((o=this.tokenizer.escape(e))||(o=this.tokenizer.tag(e))||(o=this.tokenizer.link(e))){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if((o=this.tokenizer.emStrong(e,n,i))||(o=this.tokenizer.codespan(e))||(o=this.tokenizer.br(e))||(o=this.tokenizer.del(e,n,i))||(o=this.tokenizer.autolink(e))||!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o)}else if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},DS=class{options;parser;constructor(e){this.options=e||Ub}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Jb.notSpaceStart)?.[0],i=e?e.replace(Jb.endingNewline,``)+`
108
+ `:``;return r?`<pre><code class="language-`+pS(r)+`">`+(n?i:pS(i,!0))+`</code></pre>
109
+ `:`<pre><code>`+(n?i:pS(i,!0))+`</code></pre>
110
+ `}blockquote({tokens:e}){return`<blockquote>
111
+ ${this.parser.parse(e)}</blockquote>
112
+ `}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
113
+ `}hr(e){return`<hr>
114
+ `}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
115
+ `+r+`</`+i+`>
116
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
117
+ `}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
118
+ `}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
119
+ <thead>
120
+ `+t+`</thead>
121
+ `+r+`</table>
122
+ `}tablerow({text:e}){return`<tr>
123
+ ${e}</tr>
124
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
125
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${pS(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?pS(n,!0):this.parser.parseInline(r),o=hS(e);if(o===null)return a;e=pS(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+pS(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=hS(e);if(i===null)return pS(n);e=i;let a=`<img src="${pS(e)}" alt="${pS(n)}"`;return t&&(a+=` title="${pS(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:pS(e.text)}},OS=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},kS=class e{options;renderer;textRenderer;constructor(e){this.options=e||Ub,this.options.renderer=this.options.renderer||new DS,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new OS}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},AS=class{options;block;constructor(e){this.options=e||Ub}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?ES.lex:ES.lexInline}provideParser(e=this.block){return e?kS.parse:kS.parseInline}};function jS(e,t){if(Array.isArray(t))for(let n=0;n<t.length;n++)e.push(t[n]);else e.push(t)}var MS=new class{defaults=Hb();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=kS;Renderer=DS;TextRenderer=OS;Lexer=ES;Tokenizer=TS;Hooks=AS;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(jS(n,t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)jS(n,this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)jS(n,this.walkTokens(e.tokens,t));break}case`list`:{let e=r;jS(n,this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);jS(n,this.walkTokens(i,t))}):e.tokens&&jS(n,this.walkTokens(e.tokens,t))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new DS(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new TS(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new AS;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=AS.passThroughHooks.has(n)?e=>{if(this.defaults.async&&AS.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&jS(n,t.call(this,e)),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return ES.lex(e,t??this.defaults)}parser(e,t){return kS.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?ES.lex:ES.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?kS.parse:kS.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?ES.lex:ES.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?kS.parse:kS.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
126
+ Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+pS(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Q(e,t){return MS.parse(e,t)}Q.options=Q.setOptions=function(e){return MS.setOptions(e),Q.defaults=MS.defaults,Wb(Q.defaults),Q},Q.getDefaults=Hb,Q.defaults=Ub;function NS(...e){return MS.use(...e),Q.defaults=MS.defaults,Wb(Q.defaults),Q}Q.use=NS,Q.walkTokens=function(e,t){return MS.walkTokens(e,t)},Q.parseInline=MS.parseInline,Q.Parser=kS,Q.parser=kS.parse,Q.Renderer=DS,Q.TextRenderer=OS,Q.Lexer=ES,Q.lexer=ES.lex,Q.Tokenizer=TS,Q.Hooks=AS,Q.parse=Q,Q.options,Q.setOptions,Q.walkTokens,Q.parseInline,kS.parse,ES.lex;var PS=300,FS=`300px`,IS=500;function LS(e={}){let{immediate:t=!1,debounceDelay:n=PS,rootMargin:r=FS,idleTimeout:i=IS}=e,[a,o]=(0,A.useState)(!1),s=(0,A.useRef)(null),c=(0,A.useRef)(null),l=(0,A.useRef)(null),u=(0,A.useMemo)(()=>e=>{let t=Date.now();return window.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-t))})},1)},[]),d=(0,A.useMemo)(()=>typeof window<`u`&&window.requestIdleCallback?(e,t)=>window.requestIdleCallback(e,t):u,[u]),f=(0,A.useMemo)(()=>typeof window<`u`&&window.cancelIdleCallback?e=>window.cancelIdleCallback(e):e=>{clearTimeout(e)},[]);return(0,A.useEffect)(()=>{if(t){o(!0);return}let e=s.current;if(!e)return;c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null);let a=()=>{c.current&&=(clearTimeout(c.current),null),l.current&&=(f(l.current),null)},u=e=>{l.current=d(t=>{t.timeRemaining()>0||t.didTimeout?(o(!0),e.disconnect()):l.current=d(()=>{o(!0),e.disconnect()},{timeout:i/2})},{timeout:i})},p=e=>{a(),c.current=window.setTimeout(()=>{var t;let n=e.takeRecords();(n.length===0||(t=n.at(-1)?.isIntersecting)!=null&&t)&&u(e)},n)},m=(e,t)=>{e.isIntersecting?p(t):a()},h=new IntersectionObserver(e=>{for(let t of e)m(t,h)},{rootMargin:r,threshold:0});return h.observe(e),()=>{c.current&&clearTimeout(c.current),l.current&&f(l.current),h.disconnect()}},[t,n,r,i,f,d]),{shouldRender:a,containerRef:s}}var RS=320,zS=4,BS=()=>typeof performance>`u`?Date.now():performance.now();function VS(e){let t=e?.now??BS,n=e?.maxBacklogMs??RS,r=0,i=0;return{now:t,beginPass(e){i=Math.min(Math.max(r,e),e+n)},mark(){return i},rewind(e){i=e},take(e,t,r){if(e<=0)return{baseDelay:0,step:Math.max(0,t)};let a=Math.max(0,t),o=a===0?0:Math.min(a,zS),s=Math.max(i,r),c=r+n,l=s+Math.max(0,e-1)*a,u=a;if(l>c&&e>1){if(s<c){let t=c-s;u=Math.max(o,t/(e-1))}else u=o}let d=Math.max(0,Math.round(s-r));return i=s+e*u,{baseDelay:d,step:u}},commitPass(){r=i}}}var HS=/\s/,US=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\u3000-\u303F\uFF00-\uFFEF]/u,WS=/^\s+$/,GS=new Set([`pre`,`svg`,`math`,`annotation`]),KS=new Set([`img`,`hr`]),qS=e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`element`,JS=e=>e.some(e=>qS(e)&&GS.has(e.tagName)),YS=e=>{for(let t=e.length-1;t>=0;t--){let n=e[t];if(qS(n)&&n.tagName===`li`)return n}},XS=(e,t,n,r)=>{e.properties??={},e.properties[`data-sd-animate-marker`]=!0;let i=typeof e.properties.style==`string`?`${e.properties.style};`:``;e.properties.style=`${i}--sd-marker-duration:${t}ms;--sd-marker-delay:${Math.round(n)}ms;--sd-marker-easing:${r}`},ZS=new Set([`ul`,`ol`,`li`]),QS=e=>{for(let t of e.children)if(qS(t)){if(t.tagName===`input`)return t;if(ZS.has(t.tagName))continue;let e=QS(t);if(e)return e}},$S=(e,t,n,r)=>{e.properties??={},e.properties[`data-sd-animate`]=!0;let i=typeof e.properties.style==`string`?`${e.properties.style};`:``;e.properties.style=`${i}--sd-animation:sd-${t.animation};--sd-duration:${n}ms;--sd-easing:${t.easing};--sd-delay:${Math.round(r)}ms`},eC=(e,t,n,r)=>{let i=QS(e);i&&$S(i,t,n,r)},tC=(e,t,n,r,i,a)=>{if(JS(t))return;let o=r.prevContentLength,s=i.count;i.count+=1;let c=o>0&&s<o,l=c?0:a.baseDelay+i.newIndex++*a.step;$S(e,n,c?0:n.duration,l)},nC=e=>{var t;for(let n=e.length-1;n>=0;--n){let r=e[n];if(qS(r)){if((t=r.properties)!=null&&t[`data-sd-animated`])break;r.properties={...r.properties,"data-sd-animated":!0}}}},rC=e=>{let t=[],n=``,r=!1,i=!1;for(let a of e){let e=HS.test(a),o=!e&&US.test(a);if(!e&&n!==``&&(o||i))t.push(n),n=``,r=!1;else if(e!==r&&n){if(e){n+=a,r=!0;continue}t.push(n),n=``}n+=a,r=e,i=o}return n&&t.push(n),t},iC=e=>{let t=[],n=``;for(let r of e)HS.test(r)?t.length>0&&!WS.test(t.at(-1))?t[t.length-1]+=r:n+=r:(n&&=(t.push(n),``),t.push(r));return n&&(t.length>0?t[t.length-1]+=n:t.push(n)),t},aC=/^[^\s;:'"\\/](?:[^;:'"\\/\r\n]*[^\s;:'"\\/])?$/,oC=(e,t,n,r)=>{let i=`sd-${t.animation}`,a=`${n?0:t.duration}ms`,o;return t.styleObjects?(o={"--sd-animation":i,"--sd-duration":a,"--sd-easing":t.easing},r&&(o[`--sd-delay`]=`${Math.round(r)}ms`)):(o=`--sd-animation:${i};--sd-duration:${a};--sd-easing:${t.easing}`,r&&(o+=`;--sd-delay:${Math.round(r)}ms`)),{type:`element`,tagName:`span`,properties:{"data-sd-animate":!0,style:o},children:[{type:`text`,value:e}]}},sC=(e,t)=>!(e>0&&t<e),cC=e=>qS(e)&&KS.has(e.tagName),lC=(e,t,n)=>{let r=0,i=0;return ae(e,e=>e.type===`text`||cC(e),(e,a)=>{if(JS(a))return O;if(cC(e)){sC(n,i)&&(r+=1),i+=1;return}let o=e.value;if(!o.trim()){i+=o.length;return}let s=t.sep===`char`?iC(o):rC(o);for(let e of s){let t=i;i+=e.length,!WS.test(e)&&sC(n,t)&&(r+=1)}}),r},uC=(e,t,n,r,i,a)=>{var o;let s=t.at(-1);if(!(s&&`children`in s))return;if(JS(t))return O;let c=s,l=c.children.indexOf(e);if(l===-1)return;let u=e.value;if(!u.trim()){i.count+=u.length;return}let d=n.sep===`char`?iC(u):rC(u),f=r.prevContentLength,p=!1,m=YS(t),h=!(!m||(o=m.properties)!=null&&o[`data-sd-animate-marker`]),g=!1,_=d.map(e=>{let t=i.count;if(i.count+=e.length,WS.test(e))return{type:`text`,value:e};let r=f>0&&t<f,o=r?0:a.baseDelay+i.newIndex++*a.step;if(p=!0,m&&h&&!g){let e=r?0:n.duration;XS(m,e,o,n.easing),eC(m,n,e,o),g=!0}return oC(e,n,r,o)});return p&&nC(t),c.children.splice(l,1,..._),l+_.length},dC=0;function fC(e){return mC(e,!1)}var pC=e=>mC(e,!0);function mC(e,t){let n=e?.animation??`fadeIn`,r=e?.easing??`ease`,i={animation:n,duration:e?.duration??150,easing:r,sep:e?.sep??`word`,stagger:e?.stagger??40,styleObjects:t&&aC.test(n)&&aC.test(r),timeline:e?.timeline},a={committedCharCount:0,prevContentLength:0,lastRenderCharCount:0,pendingMark:null},o=dC++,s=()=>e=>{let t={count:0,newIndex:0};a.prevContentLength=a.committedCharCount;let n=i.timeline,r=n?.now()??BS();n&&(a.pendingMark===null?a.pendingMark=n.mark():n.rewind(a.pendingMark));let o=n?n.take(lC(e,i,a.prevContentLength),i.stagger,r):{baseDelay:0,step:i.stagger};ae(e,e=>e.type===`text`||cC(e),(e,n)=>{if(e.type===`text`)return uC(e,n,i,a,t,o);tC(e,n,i,a,t,o)}),a.lastRenderCharCount=t.count,a.prevContentLength=0};return Object.defineProperty(s,"name",{value:`rehypeAnimate$${o}`}),{name:`animate`,type:`animate`,rehypePlugin:s,setPrevContentLength(e){a.committedCharCount=e,a.prevContentLength=e},getLastRenderCharCount(){return a.lastRenderCharCount},commit(){a.committedCharCount=a.lastRenderCharCount,a.pendingMark=null}}}fC();var hC=(0,A.createContext)(!1),gC=()=>(0,A.useContext)(hC),_C=(...e)=>C_(a(e)),vC=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(t=>t.startsWith(n)?t:`${e}:${t}`).join(` `)},yC=e=>e?(...t)=>vC(e,C_(a(t))):_C,bC=(e,t,n)=>{let r=typeof t==`string`&&n.startsWith(`text/csv`)?``:``,i=typeof t==`string`?new Blob([r+t],{type:n}):t,a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(a)},xC=(0,A.createContext)(_C),$=()=>(0,A.useContext)(xC),SC=8,CC=e=>{if(e!==void 0&&e!==0&&e!==1/0){if(typeof e==`number`)return Number.isFinite(e)&&e>0?`${e}px`:void 0;if(e!==`0`&&e!==`none`&&e!==`Infinity`)return e}},wC=(e,t,n)=>{let r=(0,A.useRef)(null),i=(0,A.useRef)(!0),a=(0,A.useRef)(!1),o=(0,A.useRef)(null);return(0,A.useEffect)(()=>{let e=r.current;if(!(e&&t))return;let n=()=>{let t=e.scrollHeight-e.scrollTop-e.clientHeight<SC;i.current=t};return e.addEventListener(`scroll`,n,{passive:!0}),()=>e.removeEventListener(`scroll`,n)},[t]),(0,A.useEffect)(()=>{e&&!a.current&&(i.current=!0),e||(i.current=!0),a.current=e},[e]),(0,A.useEffect)(()=>()=>{o.current!==null&&cancelAnimationFrame(o.current)},[]),(0,A.useEffect)(()=>{let n=r.current;!(n&&t&&e&&i.current)||o.current!==null||(o.current=requestAnimationFrame(()=>{o.current=null,i.current&&n.scrollTo({top:n.scrollHeight,behavior:`instant`})}))},[e,t,n]),r},TC=_C(`block`),EC=_C(`block`,`before:content-[counter(line)]`,`before:inline-block`,`before:[counter-increment:line]`,`before:w-6`,`before:mr-4`,`before:text-[13px]`,`before:text-right`,`before:text-muted-foreground/50`,`before:font-mono`,`before:select-none`),DC=e=>{let t={};for(let n of e.split(`;`)){let e=n.indexOf(`:`);if(e>0){let r=n.slice(0,e).trim(),i=n.slice(e+1).trim();r&&i&&(t[r]=i)}}return t},OC=(0,A.memo)(({children:e,result:t,language:n,className:r,maxHeight:i,startLine:a,lineNumbers:o=!0,...s})=>{let c=$(),{isAnimating:l}=(0,A.useContext)(GE),u=CC(i),d=wC(l,!!u,t),f=(0,A.useMemo)(()=>c(EC),[c]),p=(0,A.useMemo)(()=>c(TC),[c]),m=(0,A.useMemo)(()=>{let e={};return t.bg&&(e[`--sdm-bg`]=t.bg),t.fg&&(e[`--sdm-fg`]=t.fg),t.rootStyle&&Object.assign(e,DC(t.rootStyle)),e},[t.bg,t.fg,t.rootStyle]);return(0,X.jsx)(`div`,{className:c(r,u?`overflow-y-auto`:null,`overflow-x-auto rounded-md border border-border bg-background p-4 text-sm`),"data-language":n,"data-streamdown":`code-block-body`,ref:d,style:u?{maxHeight:u}:void 0,...s,children:(0,X.jsx)(`pre`,{className:c(r,`bg-[var(--sdm-bg,inherit)]`,`dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit))]`),style:m,children:(0,X.jsx)(`code`,{className:o?c(`[counter-increment:line_0] [counter-reset:line]`):void 0,style:o&&a&&a>1?{counterReset:`line ${a-1}`}:void 0,children:t.tokens.map((e,t)=>(0,X.jsx)(`span`,{className:o?f:p,children:e.length===0||e.length===1&&e[0].content===``?`
127
+ `:e.map((e,t)=>{let n={},r=!!e.bgColor;if(e.color&&(n[`--sdm-c`]=e.color),e.bgColor&&(n[`--sdm-tbg`]=e.bgColor),e.htmlStyle)for(let[t,i]of Object.entries(e.htmlStyle))t===`color`?n[`--sdm-c`]=i:t===`background-color`?(n[`--sdm-tbg`]=i,r=!0):n[t]=i;return(0,X.jsx)(`span`,{className:c(`text-[var(--sdm-c,inherit)]`,`dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]`,r&&`bg-[var(--sdm-tbg)]`,r&&`dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]`),style:n,...e.htmlAttrs,children:e.content},t)})},t))})})})}),kC=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let a=$();return(0,X.jsx)(`div`,{className:a(`relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":`code-block`,style:{contentVisibility:`auto`,containIntrinsicSize:`auto 200px`,...n},...i})},AC=(0,A.createContext)({code:``}),jC=()=>(0,A.useContext)(AC),MC=({language:e})=>{let t=$();return(0,X.jsx)(`div`,{className:t(`flex h-8 items-center text-muted-foreground text-xs`),"data-language":e,"data-streamdown":`code-block-header`,children:(0,X.jsx)(`span`,{className:t(`ml-1 font-mono lowercase`),children:e})})},NC=e=>{let t=e.length;for(;t>0&&e[t-1]===`
128
+ `;)t--;return e.slice(0,t)},PC=(0,A.lazy)(()=>d(()=>import(`./highlighted-body-JLMTFACH-Co7ss_Ht.js`).then(e=>({default:e.HighlightedCodeBlockBody})),__vite__mapDeps([0,1]))),FC=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:a,lineNumbers:o,...s})=>{let c=$(),{codeBlockMaxHeight:l}=(0,A.useContext)(GE),u=(0,A.useMemo)(()=>NC(e),[e]),d=(0,A.useMemo)(()=>({bg:`transparent`,fg:`inherit`,tokens:u.split(`
129
+ `).map(e=>[{content:e,color:`inherit`,bgColor:`transparent`,htmlStyle:{},offset:0}])}),[u]);return(0,X.jsx)(AC.Provider,{value:{code:e},children:(0,X.jsxs)(kC,{dir:`ltr`,isIncomplete:i,language:t,children:[(0,X.jsx)(MC,{language:t}),r?(0,X.jsx)(`div`,{className:c(`pointer-events-none absolute top-2 right-2 z-10 flex items-center`),children:(0,X.jsx)(`div`,{className:c(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`code-block-actions`,children:r})}):null,(0,X.jsx)(A.Suspense,{fallback:(0,X.jsx)(OC,{className:n,language:t,lineNumbers:o,maxHeight:l,result:d,startLine:a,...s}),children:(0,X.jsx)(PC,{className:n,code:u,isIncomplete:i,language:t,lineNumbers:o,maxHeight:l,raw:d,startLine:a,...s})})]})})},IC={CheckIcon:e=>(0,X.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,X.jsx)(`path`,{clipRule:`evenodd`,d:`M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z`,fill:`currentColor`,fillRule:`evenodd`})}),CopyIcon:e=>(0,X.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,X.jsx)(`path`,{clipRule:`evenodd`,d:`M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),DownloadIcon:e=>(0,X.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,X.jsx)(`path`,{clipRule:`evenodd`,d:`M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z`,fill:`currentColor`,fillRule:`evenodd`})}),ExternalLinkIcon:e=>(0,X.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,X.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z`,fill:`currentColor`,fillRule:`evenodd`})}),Loader2Icon:e=>(0,X.jsxs)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:[(0,X.jsx)(`path`,{d:`M8 0V4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,X.jsx)(`path`,{d:`M8 16V12`,opacity:`0.5`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,X.jsx)(`path`,{d:`M3.29773 1.52783L5.64887 4.7639`,opacity:`0.9`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,X.jsx)(`path`,{d:`M12.7023 1.52783L10.3511 4.7639`,opacity:`0.1`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,X.jsx)(`path`,{d:`M12.7023 14.472L10.3511 11.236`,opacity:`0.4`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,X.jsx)(`path`,{d:`M3.29773 14.472L5.64887 11.236`,opacity:`0.6`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,X.jsx)(`path`,{d:`M15.6085 5.52783L11.8043 6.7639`,opacity:`0.2`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,X.jsx)(`path`,{d:`M0.391602 10.472L4.19583 9.23598`,opacity:`0.7`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,X.jsx)(`path`,{d:`M15.6085 10.4722L11.8043 9.2361`,opacity:`0.3`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,X.jsx)(`path`,{d:`M0.391602 5.52783L4.19583 6.7639`,opacity:`0.8`,stroke:`currentColor`,strokeWidth:`1.5`})]}),Maximize2Icon:e=>(0,X.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,X.jsx)(`path`,{clipRule:`evenodd`,d:`M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z`,fill:`currentColor`,fillRule:`evenodd`})}),RotateCcwIcon:e=>(0,X.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,X.jsx)(`path`,{clipRule:`evenodd`,d:`M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z`,fill:`currentColor`,fillRule:`evenodd`})}),XIcon:e=>(0,X.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,X.jsx)(`path`,{clipRule:`evenodd`,d:`M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomInIcon:e=>(0,X.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,X.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})}),ZoomOutIcon:e=>(0,X.jsx)(`svg`,{"aria-hidden":`true`,color:`currentColor`,height:16,strokeLinejoin:`round`,viewBox:`0 0 16 16`,width:16,...e,children:(0,X.jsx)(`path`,{clipRule:`evenodd`,d:`M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z`,fill:`currentColor`,fillRule:`evenodd`})})},LC=(0,A.createContext)(IC),RC=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>e[n]===t[n])},zC=({icons:e,children:t})=>{let n=(0,A.useRef)(e),r=(0,A.useRef)(e?{...IC,...e}:IC);RC(n.current,e)||(n.current=e,r.current=e?{...IC,...e}:IC);let i=r.current;return(0,X.jsx)(LC.Provider,{value:i,children:t})},BC=()=>(0,A.useContext)(LC),VC={copyCode:`Copy Code`,downloadFile:`Download file`,downloadDiagram:`Download diagram`,downloadDiagramAsSvg:`Download diagram as SVG`,downloadDiagramAsPng:`Download diagram as PNG`,downloadDiagramAsMmd:`Download diagram as MMD`,viewFullscreen:`View fullscreen`,exitFullscreen:`Exit fullscreen`,mermaidFormatSvg:`SVG`,mermaidFormatPng:`PNG`,mermaidFormatMmd:`MMD`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,resetView:`Reset zoom and pan`,mermaidAriaLabel:`Mermaid chart`,errorMermaid:`Failed to render Mermaid chart`,copyTable:`Copy table`,copyTableAsMarkdown:`Copy table as Markdown`,copyTableAsCsv:`Copy table as CSV`,copyTableAsTsv:`Copy table as TSV`,downloadTable:`Download table`,downloadTableAsCsv:`Download table as CSV`,downloadTableAsMarkdown:`Download table as Markdown`,tableFormatMarkdown:`Markdown`,tableFormatCsv:`CSV`,tableFormatTsv:`TSV`,imageNotAvailable:`Image not available`,downloadImage:`Download image`,openExternalLink:`Open external link?`,externalLinkWarning:`You're about to visit an external website.`,close:`Close`,copyLink:`Copy link`,copied:`Copied`,openLink:`Open link`},HC=(0,A.createContext)(VC),UC=()=>(0,A.useContext)(HC),WC=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:a,...o})=>{let s=$(),[c,l]=(0,A.useState)(!1),u=(0,A.useRef)(0),{code:d}=jC(),{isAnimating:f}=(0,A.useContext)(GE),p=UC(),m=a??d,h=async()=>{var r;if(typeof window>`u`||!((r=navigator==null?void 0:navigator.clipboard)!=null&&r.writeText))t?.(Error(`Clipboard API not available`));else try{c||(await navigator.clipboard.writeText(m),l(!0),e?.(),u.current=window.setTimeout(()=>l(!1),n))}catch(e){t?.(e)}};(0,A.useEffect)(()=>()=>{window.clearTimeout(u.current)},[]);let g=BC(),_=c?g.CheckIcon:g.CopyIcon;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`button`,{"aria-label":p.copyCode,className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-copy-button`,disabled:f,onClick:h,title:p.copyCode,type:`button`,...o,children:r??(0,X.jsx)(_,{"aria-hidden":`true`,size:14})}),c&&(0,X.jsx)(`output`,{"aria-live":`polite`,className:`sr-only`,children:p.copied})]})},GC=(e,t,n)=>{if(typeof e==`boolean`)return n;let r=e[t];if(typeof r!=`object`)return n;let i=r.download;return typeof i==`object`&&i.filename||n},KC=(e,t)=>{if(typeof e==`boolean`)return{};let n=e[t];if(typeof n!=`object`)return{};let r=n.copy;return typeof r!=`object`||!r?{}:{onCopy:r.onCopy,onError:r.onError}},qC={"1c":`1c`,"1c-query":`1cq`,abap:`abap`,"actionscript-3":`as`,ada:`ada`,adoc:`adoc`,"angular-html":`html`,"angular-ts":`ts`,apache:`conf`,apex:`cls`,apl:`apl`,applescript:`applescript`,ara:`ara`,asciidoc:`adoc`,asm:`asm`,astro:`astro`,awk:`awk`,ballerina:`bal`,bash:`sh`,bat:`bat`,batch:`bat`,be:`be`,beancount:`beancount`,berry:`berry`,bibtex:`bib`,bicep:`bicep`,blade:`blade.php`,bsl:`bsl`,c:`c`,"c#":`cs`,"c++":`cpp`,cadence:`cdc`,cairo:`cairo`,cdc:`cdc`,clarity:`clar`,clj:`clj`,clojure:`clj`,"closure-templates":`soy`,cmake:`cmake`,cmd:`cmd`,cobol:`cob`,codeowners:`CODEOWNERS`,codeql:`ql`,coffee:`coffee`,coffeescript:`coffee`,"common-lisp":`lisp`,console:`sh`,coq:`v`,cpp:`cpp`,cql:`cql`,crystal:`cr`,cs:`cs`,csharp:`cs`,css:`css`,csv:`csv`,cue:`cue`,cypher:`cql`,d:`d`,dart:`dart`,dax:`dax`,desktop:`desktop`,diff:`diff`,docker:`dockerfile`,dockerfile:`dockerfile`,dotenv:`env`,"dream-maker":`dm`,edge:`edge`,elisp:`el`,elixir:`ex`,elm:`elm`,"emacs-lisp":`el`,erb:`erb`,erl:`erl`,erlang:`erl`,f:`f`,"f#":`fs`,f03:`f03`,f08:`f08`,f18:`f18`,f77:`f77`,f90:`f90`,f95:`f95`,fennel:`fnl`,fish:`fish`,fluent:`ftl`,for:`for`,"fortran-fixed-form":`f`,"fortran-free-form":`f90`,fs:`fs`,fsharp:`fs`,fsl:`fsl`,ftl:`ftl`,gdresource:`tres`,gdscript:`gd`,gdshader:`gdshader`,genie:`gs`,gherkin:`feature`,"git-commit":`gitcommit`,"git-rebase":`gitrebase`,gjs:`js`,gleam:`gleam`,"glimmer-js":`js`,"glimmer-ts":`ts`,glsl:`glsl`,gnuplot:`plt`,go:`go`,gql:`gql`,graphql:`graphql`,groovy:`groovy`,gts:`gts`,hack:`hack`,haml:`haml`,handlebars:`hbs`,haskell:`hs`,haxe:`hx`,hbs:`hbs`,hcl:`hcl`,hjson:`hjson`,hlsl:`hlsl`,hs:`hs`,html:`html`,"html-derivative":`html`,http:`http`,hxml:`hxml`,hy:`hy`,imba:`imba`,ini:`ini`,jade:`jade`,java:`java`,javascript:`js`,jinja:`jinja`,jison:`jison`,jl:`jl`,js:`js`,json:`json`,json5:`json5`,jsonc:`jsonc`,jsonl:`jsonl`,jsonnet:`jsonnet`,jssm:`jssm`,jsx:`jsx`,julia:`jl`,kotlin:`kt`,kql:`kql`,kt:`kt`,kts:`kts`,kusto:`kql`,latex:`tex`,lean:`lean`,lean4:`lean`,less:`less`,liquid:`liquid`,lisp:`lisp`,lit:`lit`,llvm:`ll`,log:`log`,logo:`logo`,lua:`lua`,luau:`luau`,make:`mak`,makefile:`mak`,markdown:`md`,marko:`marko`,matlab:`m`,md:`md`,mdc:`mdc`,mdx:`mdx`,mediawiki:`wiki`,mermaid:`mmd`,mips:`s`,mipsasm:`s`,mmd:`mmd`,mojo:`mojo`,move:`move`,nar:`nar`,narrat:`narrat`,nextflow:`nf`,nf:`nf`,nginx:`conf`,nim:`nim`,nix:`nix`,nu:`nu`,nushell:`nu`,objc:`m`,"objective-c":`m`,"objective-cpp":`mm`,ocaml:`ml`,pascal:`pas`,perl:`pl`,perl6:`p6`,php:`php`,plsql:`pls`,po:`po`,polar:`polar`,postcss:`pcss`,pot:`pot`,potx:`potx`,powerquery:`pq`,powershell:`ps1`,prisma:`prisma`,prolog:`pl`,properties:`properties`,proto:`proto`,protobuf:`proto`,ps:`ps`,ps1:`ps1`,pug:`pug`,puppet:`pp`,purescript:`purs`,py:`py`,python:`py`,ql:`ql`,qml:`qml`,qmldir:`qmldir`,qss:`qss`,r:`r`,racket:`rkt`,raku:`raku`,razor:`cshtml`,rb:`rb`,reg:`reg`,regex:`regex`,regexp:`regexp`,rel:`rel`,riscv:`s`,rs:`rs`,rst:`rst`,ruby:`rb`,rust:`rs`,sas:`sas`,sass:`sass`,scala:`scala`,scheme:`scm`,scss:`scss`,sdbl:`sdbl`,sh:`sh`,shader:`shader`,shaderlab:`shader`,shell:`sh`,shellscript:`sh`,shellsession:`sh`,smalltalk:`st`,solidity:`sol`,soy:`soy`,sparql:`rq`,spl:`spl`,splunk:`spl`,sql:`sql`,"ssh-config":`config`,stata:`do`,styl:`styl`,stylus:`styl`,svelte:`svelte`,swift:`swift`,"system-verilog":`sv`,systemd:`service`,talon:`talon`,talonscript:`talon`,tasl:`tasl`,tcl:`tcl`,templ:`templ`,terraform:`tf`,tex:`tex`,tf:`tf`,tfvars:`tfvars`,toml:`toml`,ts:`ts`,"ts-tags":`ts`,tsp:`tsp`,tsv:`tsv`,tsx:`tsx`,turtle:`ttl`,twig:`twig`,typ:`typ`,typescript:`ts`,typespec:`tsp`,typst:`typ`,v:`v`,vala:`vala`,vb:`vb`,verilog:`v`,vhdl:`vhdl`,vim:`vim`,viml:`vim`,vimscript:`vim`,vue:`vue`,"vue-html":`html`,"vue-vine":`vine`,vy:`vy`,vyper:`vy`,wasm:`wasm`,wenyan:`wy`,wgsl:`wgsl`,wiki:`wiki`,wikitext:`wiki`,wit:`wit`,wl:`wl`,wolfram:`wl`,xml:`xml`,xsl:`xsl`,yaml:`yaml`,yml:`yml`,zenscript:`zs`,zig:`zig`,zsh:`zsh`,文言:`wy`},JC=({onDownload:e,onError:t,language:n,children:r,className:i,code:a,...o})=>{let s=$(),{code:c}=jC(),{isAnimating:l,controls:u}=(0,A.useContext)(GE),d=UC(),f=BC(),p=a??c,m=n&&n in qC?qC[n]:`txt`,h=`${GC(u,`code`,`file`)}.${m}`;return(0,X.jsx)(`button`,{"aria-label":d.downloadFile,className:s(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),"data-streamdown":`code-block-download-button`,disabled:l,onClick:()=>{try{bC(h,p,`text/plain`),e?.()}catch(e){t?.(e)}},title:d.downloadFile,type:`button`,...o,children:r??(0,X.jsx)(f.DownloadIcon,{size:14})})},YC=()=>{let{Loader2Icon:e}=BC(),t=$();return(0,X.jsxs)(`div`,{className:t(`w-full divide-y divide-border overflow-hidden rounded-xl border border-border`),children:[(0,X.jsx)(`div`,{className:t(`h-[46px] w-full bg-muted/80`)}),(0,X.jsx)(`div`,{className:t(`flex w-full items-center justify-center p-4`),children:(0,X.jsx)(e,{className:t(`size-4 animate-spin`)})})]})},XC=/\.[^/.]+$/,ZC=({node:e,className:t,src:n,alt:r,onLoad:i,onError:a,showControls:o=!0,showDownloadControl:s=!0,...c})=>{let{DownloadIcon:l}=BC(),u=$(),d=(0,A.useRef)(null),[f,p]=(0,A.useState)(!1),[m,h]=(0,A.useState)(!1),g=UC(),_=c.width!=null||c.height!=null,v=(f||_)&&!m&&o&&s,y=m&&!_;(0,A.useEffect)(()=>{let e=d.current;if(e!=null&&e.complete){let t=e.naturalWidth>0;p(t),h(!t)}},[]);let b=(0,A.useCallback)(e=>{p(!0),h(!1),i?.(e)},[i]),x=(0,A.useCallback)(e=>{p(!1),h(!0),a?.(e)},[a]),ee=async()=>{if(n)try{let e=await(await fetch(n)).blob(),t=new URL(n,window.location.origin).pathname.split(`/`).pop()||``,i=t.split(`.`).pop(),a=t.includes(`.`)&&i!==void 0&&i.length<=4,o=``;if(a)o=t;else{let n=e.type,i=`png`;n.includes(`jpeg`)||n.includes(`jpg`)?i=`jpg`:n.includes(`png`)?i=`png`:n.includes(`svg`)?i=`svg`:n.includes(`gif`)?i=`gif`:n.includes(`webp`)&&(i=`webp`),o=`${(r||t||`image`).replace(XC,``)}.${i}`}bC(o,e,e.type)}catch{window.open(n,`_blank`)}};return n?n===`streamdown:incomplete-image`?(0,X.jsx)(`div`,{className:u(`group relative my-4 inline-block`),"data-incomplete":`true`,"data-streamdown":`image-wrapper`,children:(0,X.jsx)(`div`,{className:u(`h-24 w-48 animate-pulse rounded-lg bg-muted`),"data-streamdown":`image-placeholder`})}):(0,X.jsxs)(`div`,{className:u(`group relative my-4 inline-block`),"data-streamdown":`image-wrapper`,children:[(0,X.jsx)(`img`,{alt:r,className:u(`max-w-full rounded-lg`,y&&`hidden`,t),"data-streamdown":`image`,onError:x,onLoad:b,ref:d,src:n,...c}),y&&(0,X.jsx)(`span`,{className:u(`text-muted-foreground text-xs italic`),"data-streamdown":`image-fallback`,children:g.imageNotAvailable}),o&&(0,X.jsx)(`div`,{className:u(`pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block`),"data-streamdown":`image-overlay`}),v&&(0,X.jsx)(`button`,{className:u(`absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background`,`opacity-0 group-hover:opacity-100`),onClick:ee,title:g.downloadImage,type:`button`,children:(0,X.jsx)(l,{size:14})})]}):null},QC=e=>(typeof e==`function`?e():e)??document.body,$C=0,ew=()=>{$C+=1,$C===1&&(document.body.style.overflow=`hidden`)},tw=()=>{$C=Math.max(0,$C-1),$C===0&&(document.body.style.overflow=``)},nw=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:a,ExternalLinkIcon:o,XIcon:s}=BC(),c=$(),[l,u]=(0,A.useState)(!1),d=UC(),{portal:f}=(0,A.useContext)(GE),p=(0,A.useCallback)(async()=>{try{await navigator.clipboard.writeText(e),u(!0),setTimeout(()=>u(!1),2e3)}catch{}},[e]),m=(0,A.useCallback)(()=>{r(),n()},[r,n]);if((0,A.useEffect)(()=>{if(t){ew();let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),tw()}}},[t,n]),!t||typeof document>`u`)return null;let h=(0,X.jsx)(`div`,{className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm`),"data-streamdown":`link-safety-modal`,onClick:n,onKeyDown:e=>{e.key===`Escape`&&n()},role:`button`,tabIndex:0,children:(0,X.jsxs)(`div`,{className:c(`relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,X.jsx)(`button`,{className:c(`absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:n,title:d.close,type:`button`,children:(0,X.jsx)(s,{size:16})}),(0,X.jsxs)(`div`,{className:c(`flex flex-col gap-2`),children:[(0,X.jsxs)(`div`,{className:c(`flex items-center gap-2 font-semibold text-lg`),children:[(0,X.jsx)(o,{size:20}),(0,X.jsx)(`span`,{children:d.openExternalLink})]}),(0,X.jsx)(`p`,{className:c(`text-muted-foreground text-sm`),children:d.externalLinkWarning})]}),(0,X.jsx)(`div`,{className:c(`break-all rounded-md bg-muted p-3 font-mono text-sm`,e.length>100&&`max-h-32 overflow-y-auto`),children:e}),(0,X.jsxs)(`div`,{className:c(`flex gap-2`),children:[(0,X.jsx)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted`),onClick:p,type:`button`,children:l?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(i,{size:14}),(0,X.jsx)(`span`,{children:d.copied})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(a,{size:14}),(0,X.jsx)(`span`,{children:d.copyLink})]})}),(0,X.jsxs)(`button`,{className:c(`flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90`),onClick:m,type:`button`,children:[(0,X.jsx)(o,{size:14}),(0,X.jsx)(`span`,{children:d.openLink})]})]})]})});return(0,Vb.createPortal)(h,QC(f))},rw=(0,A.createContext)(null),iw=()=>(0,A.useContext)(rw),aw=()=>iw()?.code??null,ow=()=>iw()?.mermaid??null,sw=e=>{var t;let n=iw();return n!=null&&n.renderers&&e&&(t=n.renderers.find(t=>Array.isArray(t.language)?t.language.includes(e):t.language===e))!=null?t:null},cw=/<svg\b[^>]*>/i,lw=/\bviewBox=(['"])(.*?)\1/i,uw=/[\s,]+/,dw=/\swidth=(['"]).*?\1/gi,fw=/\sheight=(['"]).*?\1/gi,pw=/\sstyle=(['"])(.*?)\1/i,mw=/^width\s*:/i,hw=/^height\s*:/i,gw=/^max-width\s*:/i,_w=/^<svg/i,vw=e=>{let t=e.match(cw);if(!t)return null;let n=t[0].match(lw)?.[2];if(!n)return null;let r=n.trim().split(uw).map(e=>Number.parseFloat(e));if(r.length<4||r.slice(0,4).some(Number.isNaN))return null;let i=r[2],a=r[3];return i>0&&a>0?{height:a,width:i}:null},yw=e=>{let t=e.match(cw);if(!t)return e;try{let n=t[0],r=vw(e);if(!r)return e;let{width:i,height:a}=r,o=n.replace(dw,``).replace(fw,``),s=o.match(pw),c=`width:${i}px;height:${a}px;max-width:none;`;if(s){let e=s[1],t=s[2].split(`;`).map(e=>e.trim()).filter(Boolean).filter(e=>!(mw.test(e)||hw.test(e)||gw.test(e))).join(`;`),n=`${c}${t?`${t};`:``}`;o=o.replace(pw,` style=${e}${n}${e}`)}else o=o.replace(_w,`<svg style="${c}"`);return o=o.replace(_w,`<svg width="${i}" height="${a}"`),e.replace(n,o)}catch{return e}},bw=e=>{if(typeof DOMParser>`u`||typeof XMLSerializer>`u`)return e;let t=new DOMParser().parseFromString(e,`text/html`).querySelector(`svg`);return t?new XMLSerializer().serializeToString(t):e},xw=(e,t)=>new Promise((t,n)=>{let r=`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(e))),i=new Image;i.crossOrigin=`anonymous`,i.onload=()=>{let e=document.createElement(`canvas`),r=i.width*5,a=i.height*5;e.width=r,e.height=a;let o=e.getContext(`2d`);o?(o.drawImage(i,0,0,r,a),e.toBlob(e=>{e?t(e):n(Error(`Failed to create PNG blob`))},`image/png`)):n(Error(`Failed to create 2D canvas context for PNG export`))},i.onerror=()=>n(Error(`Failed to load SVG image`)),i.src=r}),Sw=({chart:e,children:t,className:n,onDownload:r,config:i,onError:a})=>{let o=$(),[s,c]=(0,A.useState)(!1),l=(0,A.useRef)(null),{isAnimating:u,controls:d}=(0,A.useContext)(GE),f=BC(),p=ow(),m=UC(),h=GC(d,`mermaid`,`diagram`),g=async t=>{try{if(t===`mmd`){bC(`${h}.mmd`,e,`text/plain`),c(!1),r?.(t);return}if(!p){a?.(Error(`Mermaid plugin not available`));return}let n=p.getMermaid(i),o=e.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),s=`mermaid-${Math.abs(o)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:l}=await n.render(s,e);if(!l){a?.(Error(`SVG not found. Please wait for the diagram to render.`));return}let u=bw(l);if(t===`svg`){bC(`${h}.svg`,u,`image/svg+xml`),c(!1),r?.(t);return}if(t===`png`){let e=await xw(u);bC(`${h}.png`,e,`image/png`),r?.(t),c(!1);return}}catch(e){a?.(e)}};return(0,A.useEffect)(()=>{let e=e=>{let t=e.composedPath();l.current&&!t.includes(l.current)&&c(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,X.jsxs)(`div`,{className:o(`relative`),ref:l,children:[(0,X.jsx)(`button`,{"aria-label":m.downloadDiagram,className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,n),disabled:u,onClick:()=>c(!s),title:m.downloadDiagram,type:`button`,children:t??(0,X.jsx)(f.DownloadIcon,{"aria-hidden":`true`,size:14})}),s?(0,X.jsxs)(`div`,{className:o(`absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,X.jsx)(`button`,{"aria-label":m.downloadDiagramAsSvg,className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>g(`svg`),title:m.downloadDiagramAsSvg,type:`button`,children:m.mermaidFormatSvg}),(0,X.jsx)(`button`,{"aria-label":m.downloadDiagramAsPng,className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>g(`png`),title:m.downloadDiagramAsPng,type:`button`,children:m.mermaidFormatPng}),(0,X.jsx)(`button`,{"aria-label":m.downloadDiagramAsMmd,className:o(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>g(`mmd`),title:m.downloadDiagramAsMmd,type:`button`,children:m.mermaidFormatMmd})]}):null]})},Cw=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...a})=>{let{Maximize2Icon:o,XIcon:s}=BC(),c=$(),[l,u]=(0,A.useState)(!1),{isAnimating:d,controls:f,portal:p}=(0,A.useContext)(GE),m=UC(),h=(()=>{if(typeof f==`boolean`)return f;let e=f.mermaid;return e===!1?!1:e===!0||e===void 0||e.panZoom!==!1})(),g=(()=>{if(typeof f==`boolean`)return f;let e=f.mermaid;return e===!1?!1:e===!0||e===void 0||e.download!==!1})(),_=(()=>{if(typeof f==`boolean`)return f;let e=f.mermaid;return e===!1?!1:e===!0||e===void 0||e.copy!==!1})(),v=()=>{u(!l)};return(0,A.useEffect)(()=>{if(l){ew();let e=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),tw()}}},[l]),(0,A.useEffect)(()=>{l?n?.():r&&r()},[l,n,r]),(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`button`,{className:c(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,i),disabled:d,onClick:v,title:m.viewFullscreen,type:`button`,...a,"aria-label":m.viewFullscreen,children:(0,X.jsx)(o,{"aria-hidden":`true`,size:14})}),l?(0,Vb.createPortal)((0,X.jsxs)(`div`,{"aria-label":m.viewFullscreen,"aria-modal":`true`,className:c(`fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm`),"data-streamdown":`mermaid-fullscreen`,onClick:v,onKeyDown:e=>{e.key===`Escape`&&v()},role:`dialog`,children:[(0,X.jsxs)(`div`,{className:c(`absolute top-4 right-4 z-10 flex items-center gap-1`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[g?(0,X.jsx)(Sw,{chart:e,config:t}):null,_?(0,X.jsx)(WC,{code:e}):null,(0,X.jsx)(`button`,{"aria-label":m.exitFullscreen,className:c(`rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:v,title:m.exitFullscreen,type:`button`,children:(0,X.jsx)(s,{"aria-hidden":`true`,size:20})})]}),(0,X.jsx)(`div`,{className:c(`flex size-full items-center justify-center p-4`),onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:(0,X.jsx)(aD,{chart:e,className:c(`size-full [&_svg]:h-auto [&_svg]:w-auto`),config:t,fullscreen:!0,showControls:h})})]}),QC(p)):null]})};function ww(e){if(e.nodeType===Node.TEXT_NODE)return e.textContent??``;if(e.nodeType!==Node.ELEMENT_NODE)return``;let t=e;return t.tagName===`BR`?`
130
+ `:Array.from(t.childNodes).map(ww).join(``)}var Tw=e=>{let t=[],n=[],r=e.querySelectorAll(`thead th`);for(let e of r)t.push(ww(e).trim());let i=e.querySelectorAll(`tbody tr`);for(let e of i){let t=[],r=e.querySelectorAll(`td`);for(let e of r)t.push(ww(e).trim());n.push(t)}return{headers:t,rows:n}},Ew=e=>{if(typeof e!=`object`)return`,`;let t=e.table;return typeof t==`object`?t.csvSeparator??`,`:`,`},Dw=(e,t=`,`)=>{let n;n=t===`auto`?Intl.NumberFormat().format(1.1).includes(`,`)?`;`:`,`:t;let{headers:r,rows:i}=e,a=e=>{let t=!1;for(let r of e)if(r===n||r===`"`||r===`
131
+ `||r===`\r`){t=!0;break}return t?`"${e.replace(/"/g,`""`)}"`:e},o=r.length>0?i.length+1:i.length,s=Array(o),c=0;r.length>0&&(s[c]=r.map(a).join(n),c+=1);for(let e of i)s[c]=e.map(a).join(n),c+=1;return s.join(`
132
+ `)},Ow=e=>{let{headers:t,rows:n}=e,r=e=>{let t=!1;for(let n of e)if(n===` `||n===`
133
+ `||n===`\r`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===` `?n.push(`\\t`):t===`
134
+ `?n.push(`\\n`):t===`\r`?n.push(`\\r`):n.push(t);return n.join(``)},i=t.length>0?n.length+1:n.length,a=Array(i),o=0;t.length>0&&(a[o]=t.map(r).join(` `),o+=1);for(let e of n)a[o]=e.map(r).join(` `),o+=1;return a.join(`
135
+ `)},kw=e=>{let t=!1;for(let n of e)if(n===`\\`||n===`|`||n===`
136
+ `||n===`&`||n===`<`||n===`>`){t=!0;break}if(!t)return e;let n=[];for(let t of e)t===`\\`?n.push(`\\\\`):t===`|`?n.push(`\\|`):t===`
137
+ `?n.push(`<br>`):t===`&`?n.push(`&amp;`):t===`<`?n.push(`&lt;`):t===`>`?n.push(`&gt;`):n.push(t);return n.join(``)},Aw=e=>{let{headers:t,rows:n}=e;if(t.length===0)return``;let r=Array(n.length+2),i=0,a=t.map(e=>kw(e));r[i]=`| ${a.join(` | `)} |`,i+=1;let o=Array(t.length);for(let e=0;e<t.length;e+=1)o[e]=`---`;r[i]=`| ${o.join(` | `)} |`,i+=1;for(let e of n)if(e.length<t.length){let n=Array(t.length);for(let r=0;r<t.length;r+=1)n[r]=r<e.length?kw(e[r]):``;r[i]=`| ${n.join(` | `)} |`,i+=1}else{let t=e.map(e=>kw(e));r[i]=`| ${t.join(` | `)} |`,i+=1}return r.join(`
138
+ `)},jw=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let a=$(),[o,s]=(0,A.useState)(!1),[c,l]=(0,A.useState)(!1),u=(0,A.useRef)(null),d=(0,A.useRef)(0),{isAnimating:f,controls:p}=(0,A.useContext)(GE),m=UC(),h=Ew(p),g=async e=>{var t;if(typeof window>`u`||!((t=navigator==null?void 0:navigator.clipboard)!=null&&t.write))r?.(Error(`Clipboard API not available`));else try{let t=(u.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let a=Tw(t),o=``;o=e===`csv`?Dw(a,h):e===`tsv`?Ow(a):Aw(a);let c=new ClipboardItem({"text/plain":new Blob([o],{type:`text/plain`}),"text/html":new Blob([t.outerHTML],{type:`text/html`})});await navigator.clipboard.write([c]),l(!0),s(!1),n?.(e),d.current=window.setTimeout(()=>l(!1),i)}catch(e){r?.(e)}};(0,A.useEffect)(()=>{let e=e=>{let t=e.composedPath();u.current&&!t.includes(u.current)&&s(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e),window.clearTimeout(d.current)}},[]);let _=BC(),v=c?_.CheckIcon:_.CopyIcon;return(0,X.jsxs)(`div`,{className:a(`relative`),ref:u,children:[(0,X.jsx)(`button`,{className:a(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:f,onClick:()=>s(!o),title:m.copyTable,type:`button`,children:e??(0,X.jsx)(v,{height:14,width:14})}),o?(0,X.jsxs)(`div`,{className:a(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,X.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>g(`md`),title:m.copyTableAsMarkdown,type:`button`,children:m.tableFormatMarkdown}),(0,X.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>g(`csv`),title:m.copyTableAsCsv,type:`button`,children:m.tableFormatCsv}),(0,X.jsx)(`button`,{className:a(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>g(`tsv`),title:m.copyTableAsTsv,type:`button`,children:m.tableFormatTsv})]}):null]})},Mw=({children:e,className:t,onDownload:n,onError:r})=>{let i=$(),[a,o]=(0,A.useState)(!1),s=(0,A.useRef)(null),{isAnimating:c,controls:l}=(0,A.useContext)(GE),u=UC(),d=BC(),f=Ew(l),p=e=>{try{let t=(s.current?.closest(`[data-streamdown="table-wrapper"]`))?.querySelector(`table`);if(!t){r?.(Error(`Table not found`));return}let i=Tw(t),a=e===`csv`?Dw(i,f):Aw(i),c=e===`csv`?`csv`:`md`;bC(`${GC(l,`table`,`table`)}.${c}`,a,e===`csv`?`text/csv`:`text/markdown`),o(!1),n?.(e)}catch(e){r?.(e)}};return(0,A.useEffect)(()=>{let e=e=>{let t=e.composedPath();s.current&&!t.includes(s.current)&&o(!1)};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,X.jsxs)(`div`,{className:i(`relative`),ref:s,children:[(0,X.jsx)(`button`,{className:i(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:c,onClick:()=>o(!a),title:u.downloadTable,type:`button`,children:e??(0,X.jsx)(d.DownloadIcon,{size:14})}),a?(0,X.jsxs)(`div`,{className:i(`absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg`),children:[(0,X.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>p(`csv`),title:u.downloadTableAsCsv,type:`button`,children:u.tableFormatCsv}),(0,X.jsx)(`button`,{className:i(`w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40`),onClick:()=>p(`markdown`),title:u.downloadTableAsMarkdown,type:`button`,children:u.tableFormatMarkdown})]}):null]})},Nw=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:a}=BC(),o=$(),[s,c]=(0,A.useState)(!1),{isAnimating:l,portal:u}=(0,A.useContext)(GE),d=UC(),f=()=>{c(!0)},p=()=>{c(!1)};return(0,A.useEffect)(()=>{if(s){ew();let e=e=>{e.key===`Escape`&&c(!1)};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e),tw()}}},[s]),(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`button`,{className:o(`cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`,t),disabled:l,onClick:f,title:d.viewFullscreen,type:`button`,children:(0,X.jsx)(i,{size:14})}),s?(0,Vb.createPortal)((0,X.jsx)(`div`,{"aria-label":d.viewFullscreen,"aria-modal":`true`,className:o(`fixed inset-0 z-50 flex flex-col bg-background`),"data-streamdown":`table-fullscreen`,onClick:p,onKeyDown:e=>{e.key===`Escape`&&p()},role:`dialog`,children:(0,X.jsxs)(`div`,{className:o(`flex h-full flex-col`),"data-streamdown":`table-wrapper`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),role:`presentation`,children:[(0,X.jsxs)(`div`,{className:o(`flex items-center justify-end gap-1 p-4`),children:[n?(0,X.jsx)(jw,{}):null,r?(0,X.jsx)(Mw,{}):null,(0,X.jsx)(`button`,{className:o(`rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground`),onClick:p,title:d.exitFullscreen,type:`button`,children:(0,X.jsx)(a,{size:20})})]}),(0,X.jsx)(`div`,{className:o(`flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10`),children:(0,X.jsx)(`table`,{className:o(`w-full border-collapse border border-border`),"data-streamdown":`table`,children:e})})]})}),QC(u)):null]})},Pw=({children:e,className:t,maxHeight:n,showControls:r,showCopy:i=!0,showDownload:a=!0,showFullscreen:o=!0,...s})=>{let c=$(),{isAnimating:l}=(0,A.useContext)(GE),u=CC(n),d=wC(l,!!u,e),f=r&&i,p=r&&a,m=r&&o,h=f||p||m;return(0,X.jsxs)(`div`,{className:c(`my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2`),"data-streamdown":`table-wrapper`,children:[h?(0,X.jsxs)(`div`,{className:c(`flex items-center justify-end gap-1`),children:[f?(0,X.jsx)(jw,{}):null,p?(0,X.jsx)(Mw,{}):null,m?(0,X.jsx)(Nw,{showCopy:f,showDownload:p,children:e}):null]}):null,(0,X.jsx)(`div`,{className:c(`border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background`),ref:d,style:u?{maxHeight:u}:void 0,children:(0,X.jsx)(`table`,{className:c(`w-full divide-y divide-border`,t),"data-streamdown":`table`,...s,children:e})})]})},Fw=/startLine=(\d+)/,Iw=/\bnoLineNumbers\b/,Lw=(0,A.lazy)(()=>d(()=>import(`./mermaid-WFAXDIZX-CYMnek4e.js`).then(e=>({default:e.Mermaid})),[])),Rw=/language-([^\s]+)/,zw=`node`;function Bw(e,t){let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;let r=e,i=t;for(let e of n)if(e!==zw&&!Object.is(r[e],i[e]))return!1;return!0}function Vw(e,t){return e?.properties?.metastring===t?.properties?.metastring}var Hw=(e,t)=>typeof e==`boolean`?e:e[t]!==!1,Uw=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.table;return n===!1?!1:n===!0||n===void 0||n[t]!==!1},Ww=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.code;return n===!1?!1:n===!0||n===void 0||n[t]!==!1},Gw=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0||n[t]!==!1},Kw=(e,t)=>{if(typeof e==`boolean`)return e;let n=e.image;return n===!1?!1:n===!0||n===void 0||n[t]!==!1},qw=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`ol`,{className:i(`list-inside list-decimal whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`ordered-list`,...r,children:e})},(e,t)=>Bw(e,t));qw.displayName=`MarkdownOl`;var Jw=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$(),a=Array.isArray(e)?e.filter(e=>e!==`
139
+ `&&e!==``):[e],o=a.length===1&&(0,A.isValidElement)(a[0])&&(a[0].type===_T||a[0].props.node?.tagname===`p`)?a[0].props.children:e;return(0,X.jsx)(`li`,{className:i(`py-1 [&>p]:inline`,t),"data-streamdown":`list-item`,...r,children:o})},(e,t)=>Bw(e,t));Jw.displayName=`MarkdownLi`;var Yw=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`ul`,{className:i(`list-inside list-disc whitespace-normal [li_&]:pl-6`,t),"data-streamdown":`unordered-list`,...r,children:e})},(e,t)=>Bw(e,t));Yw.displayName=`MarkdownUl`;var Xw=(0,A.memo)(({className:e,node:t,...n})=>{let r=$();return(0,X.jsx)(`hr`,{className:r(`my-6 border-border`,e),"data-streamdown":`horizontal-rule`,...n})},(e,t)=>Bw(e,t));Xw.displayName=`MarkdownHr`;var Zw=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`span`,{className:i(`font-semibold`,t),"data-streamdown":`strong`,...r,children:e})},(e,t)=>Bw(e,t));Zw.displayName=`MarkdownStrong`;var Qw=(0,A.memo)(({children:e,className:t,href:n,node:r,...i})=>{let a=$(),{linkSafety:o}=(0,A.useContext)(GE),[s,c]=(0,A.useState)(!1),l=n===`streamdown:incomplete-link`,u=(0,A.useCallback)(async e=>{if(o!=null&&o.enabled&&n&&!l){if(e.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,`_blank`,`noreferrer`);return}c(!0)}},[o,n,l]),d=(0,A.useCallback)(()=>{n&&window.open(n,`_blank`,`noreferrer`)},[n]),f=(0,A.useCallback)(()=>{c(!1)},[]),p={url:n??``,isOpen:s,onClose:f,onConfirm:d};return o!=null&&o.enabled&&n?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(`button`,{className:a(`wrap-anywhere appearance-none text-left font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,onClick:u,type:`button`,children:e}),o.renderModal?o.renderModal(p):(0,X.jsx)(nw,{...p})]}):(0,X.jsx)(`a`,{className:a(`wrap-anywhere font-medium text-primary underline`,t),"data-incomplete":l,"data-streamdown":`link`,href:n,rel:`noreferrer`,target:`_blank`,...i,children:e})},(e,t)=>Bw(e,t));Qw.displayName=`MarkdownA`;var $w=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`h1`,{className:i(`mt-6 mb-2 font-semibold text-3xl`,t),"data-streamdown":`heading-1`,...r,children:e})},(e,t)=>Bw(e,t));$w.displayName=`MarkdownH1`;var eT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`h2`,{className:i(`mt-6 mb-2 font-semibold text-2xl`,t),"data-streamdown":`heading-2`,...r,children:e})},(e,t)=>Bw(e,t));eT.displayName=`MarkdownH2`;var tT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`h3`,{className:i(`mt-6 mb-2 font-semibold text-xl`,t),"data-streamdown":`heading-3`,...r,children:e})},(e,t)=>Bw(e,t));tT.displayName=`MarkdownH3`;var nT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`h4`,{className:i(`mt-6 mb-2 font-semibold text-lg`,t),"data-streamdown":`heading-4`,...r,children:e})},(e,t)=>Bw(e,t));nT.displayName=`MarkdownH4`;var rT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`h5`,{className:i(`mt-6 mb-2 font-semibold text-base`,t),"data-streamdown":`heading-5`,...r,children:e})},(e,t)=>Bw(e,t));rT.displayName=`MarkdownH5`;var iT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`h6`,{className:i(`mt-6 mb-2 font-semibold text-sm`,t),"data-streamdown":`heading-6`,...r,children:e})},(e,t)=>Bw(e,t));iT.displayName=`MarkdownH6`;var aT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let{controls:i,tableMaxHeight:a}=(0,A.useContext)(GE),o=Hw(i,`table`),s=Uw(i,`copy`),c=Uw(i,`download`),l=Uw(i,`fullscreen`);return(0,X.jsx)(Pw,{className:t,maxHeight:a,showControls:o,showCopy:s,showDownload:c,showFullscreen:l,...r,children:e})},(e,t)=>Bw(e,t));aT.displayName=`MarkdownTable`;var oT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`thead`,{className:i(`bg-muted/80`,t),"data-streamdown":`table-header`,...r,children:e})},(e,t)=>Bw(e,t));oT.displayName=`MarkdownThead`;var sT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`tbody`,{className:i(`divide-y divide-border`,t),"data-streamdown":`table-body`,...r,children:e})},(e,t)=>Bw(e,t));sT.displayName=`MarkdownTbody`;var cT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`tr`,{className:i(`border-border`,t),"data-streamdown":`table-row`,...r,children:e})},(e,t)=>Bw(e,t));cT.displayName=`MarkdownTr`;var lT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`th`,{className:i(`whitespace-nowrap px-4 py-2 text-left font-semibold text-sm`,t),"data-streamdown":`table-header-cell`,...r,children:e})},(e,t)=>Bw(e,t));lT.displayName=`MarkdownTh`;var uT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`td`,{className:i(`px-4 py-2 text-sm`,t),"data-streamdown":`table-cell`,...r,children:e})},(e,t)=>Bw(e,t));uT.displayName=`MarkdownTd`;var dT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`blockquote`,{className:i(`my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic`,t),"data-streamdown":`blockquote`,...r,children:e})},(e,t)=>Bw(e,t));dT.displayName=`MarkdownBlockquote`;var fT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`sup`,{className:i(`text-sm`,t),"data-streamdown":`superscript`,...r,children:e})},(e,t)=>Bw(e,t));fT.displayName=`MarkdownSup`;var pT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{let i=$();return(0,X.jsx)(`sub`,{className:i(`text-sm`,t),"data-streamdown":`subscript`,...r,children:e})},(e,t)=>Bw(e,t));pT.displayName=`MarkdownSub`;var mT=(0,A.memo)(({children:e,className:t,node:n,...r})=>{if(`data-footnotes`in r){let n=e=>{if(!(0,A.isValidElement)(e))return!1;let t=Array.isArray(e.props.children)?e.props.children:[e.props.children],n=!1,r=!1;for(let e of t)if(e){if(typeof e==`string`)e.trim()!==``&&(n=!0);else if((0,A.isValidElement)(e)){if(e.props?.[`data-footnote-backref`]!==void 0)r=!0;else{let t=Array.isArray(e.props.children)?e.props.children:[e.props.children];for(let e of t)if(typeof e==`string`&&e.trim()!==``||(0,A.isValidElement)(e)&&e.props?.[`data-footnote-backref`]===void 0){n=!0;break}}}}return r&&!n},i=Array.isArray(e)?e.map(e=>{if(!(0,A.isValidElement)(e))return e;if(e.type===qw){let t=(Array.isArray(e.props.children)?e.props.children:[e.props.children]).filter(e=>!n(e));return t.length===0?null:{...e,props:{...e.props,children:t}}}return e}):e;return(Array.isArray(i)?i.some(e=>e!==null):i!==null)?(0,X.jsx)(`section`,{className:t,...r,children:i}):null}return(0,X.jsx)(`section`,{className:t,...r,children:e})},(e,t)=>Bw(e,t));mT.displayName=`MarkdownSection`;var hT=(0,A.memo)(({node:e,className:t,children:n,...r})=>{let i=$(),a=!(`data-block`in r),{mermaid:o,controls:s,lineNumbers:c}=(0,A.useContext)(GE),l=ow(),u=gC(),d=(t?.match(Rw))?.at(1)??``,f=sw(d);if(a)return(0,X.jsx)(`code`,{className:i(`rounded bg-muted px-1.5 py-0.5 font-mono text-sm`,t),"data-streamdown":`inline-code`,...r,children:n});let p=e?.properties?.metastring,m=p?.match(Fw),h=m?Number.parseInt(m[1],10):void 0,g=h!==void 0&&h>=1?h:void 0,_=!(p&&Iw.test(p))&&c!==!1,v=``;if((0,A.isValidElement)(n)&&n.props&&typeof n.props==`object`&&`children`in n.props&&typeof n.props.children==`string`?v=n.props.children:typeof n==`string`&&(v=n),f){let e=f.component;return(0,X.jsx)(A.Suspense,{fallback:(0,X.jsx)(YC,{}),children:(0,X.jsx)(e,{code:v,isIncomplete:u,language:d,meta:p})})}if(d===`mermaid`&&l){let e=Hw(s,`mermaid`),n=Gw(s,`download`),r=Gw(s,`copy`),a=Gw(s,`fullscreen`),c=Gw(s,`panZoom`),l=e&&(n||r||a);return(0,X.jsx)(A.Suspense,{fallback:(0,X.jsx)(YC,{}),children:(0,X.jsxs)(`div`,{className:i(`group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2`,t),"data-streamdown":`mermaid-block`,children:[(0,X.jsx)(`div`,{className:i(`flex h-8 items-center text-muted-foreground text-xs`),children:(0,X.jsx)(`span`,{className:i(`ml-1 font-mono lowercase`),children:`mermaid`})}),l?(0,X.jsx)(`div`,{className:i(`pointer-events-none absolute top-2 right-2 z-10 flex items-center`),children:(0,X.jsxs)(`div`,{className:i(`pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur`),"data-streamdown":`mermaid-block-actions`,children:[n?(0,X.jsx)(Sw,{chart:v,config:o?.config}):null,r?(0,X.jsx)(WC,{code:v,...KC(s,`mermaid`)}):null,a?(0,X.jsx)(Cw,{chart:v,config:o?.config}):null]})}):null,(0,X.jsx)(`div`,{className:i(`overflow-hidden rounded-md border border-border bg-background`),children:(0,X.jsx)(Lw,{chart:v,config:o?.config,showControls:c})})]})})}let y=Hw(s,`code`),b=Ww(s,`download`),x=Ww(s,`copy`),{"data-block":ee,...S}=r;return(0,X.jsx)(FC,{className:t,code:v,isIncomplete:u,language:d,lineNumbers:_,startLine:g,...S,children:y?(0,X.jsxs)(X.Fragment,{children:[b?(0,X.jsx)(JC,{code:v,language:d}):null,x?(0,X.jsx)(WC,{...KC(s,`code`)}):null]}):null})},(e,t)=>Bw(e,t)&&Vw(e.node,t.node));hT.displayName=`MarkdownCode`;var gT=(0,A.memo)(({node:e,className:t,...n})=>{let{controls:r}=(0,A.useContext)(GE),i=Hw(r,`image`),a=i&&Kw(r,`download`);return(0,X.jsx)(ZC,{className:t,node:e,showControls:i,showDownloadControl:a,...n})},(e,t)=>Bw(e,t));gT.displayName=`MarkdownImg`;var _T=(0,A.memo)(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(e=>e!=null&&e!==``);if(r.length===1&&(0,A.isValidElement)(r[0])){let t=r[0].props.node?.tagName;if(t===`img`||t===`code`&&`data-block`in r[0].props)return(0,X.jsx)(X.Fragment,{children:e})}return(0,X.jsx)(`p`,{...n,children:e})},(e,t)=>Bw(e,t));_T.displayName=`MarkdownParagraph`;var vT={ol:qw,li:Jw,ul:Yw,hr:Xw,strong:Zw,a:Qw,h1:$w,h2:eT,h3:tT,h4:nT,h5:rT,h6:iT,table:aT,thead:oT,tbody:sT,tr:cT,th:lT,td:uT,blockquote:dT,code:hT,img:gT,pre:({children:e})=>(0,A.isValidElement)(e)?(0,A.cloneElement)(e,{"data-block":`true`}):e,sup:fT,sub:pT,p:_T,section:mT},yT=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,bT=/\p{L}/u;function xT(e){let t=e.replace(/(```|~~~)[\s\S]*?\1/g,``).replace(/^#{1,6}\s+/gm,``).replace(/(\*{1,3}|_{1,3})/g,``).replace(/`[^`]*`/g,``).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/^[\s>*\-+\d.]+/gm,``),n,r=0,i=0;for(let e of t)yT.test(e)?(n??=`rtl`,i+=1):bT.test(e)&&(n??=`ltr`,r+=1);return i>r?`rtl`:r>i?`ltr`:n??`ltr`}var ST=/^[ \t]{0,3}(`{3,}|~{3,})/,CT=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,wT=e=>{let t=e.split(`
140
+ `),n=null,r=0;for(let e of t){let t=ST.exec(e);if(n===null){if(t){let e=t[1];n=e[0],r=e.length}}else if(t){let e=t[1],i=e[0],a=e.length;i===n&&a>=r&&(n=null,r=0)}}return n!==null},TT=e=>{let t=e.split(`
141
+ `);for(let e of t){let t=e.trim();if(t.length>0&&t.includes(`|`)&&CT.test(t))return!0}return!1},ET=()=>e=>{k(e,`html`,(e,t,n)=>{!n||typeof t!=`number`||(n.children[t]={type:`text`,value:e.value})})},DT=[],OT={allowDangerousHtml:!0},kT=new WeakMap,AT=new class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let t=`default`;return this.keyCache.set(e,t),t}let a=e=>{if(!e||e.length===0)return``;let t=``;for(let n=0;n<e.length;n+=1){let r=e[n];if(n>0&&(t+=`,`),Array.isArray(r)){let[e,n]=r;if(typeof e==`function`){let n=kT.get(e);n||(n=e.name,kT.set(e,n)),t+=n}else t+=String(e);t+=`:`,t+=JSON.stringify(n)}else if(typeof r==`function`){let e=kT.get(r);e||(e=r.name,kT.set(r,e)),t+=e}else t+=String(r)}return t},o=a(n),s=`${a(r)}::${o}::${i?JSON.stringify(i):``}`;return this.keyCache.set(e,s),s}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let e=this.cache.keys().next().value;e&&this.cache.delete(e)}this.cache.set(n,t)}clear(){this.cache.clear()}},jT=e=>{let t=MT(e),n=e.children||``;return zT(t.runSync(t.parse(n),n),e)},MT=e=>{let t=AT.get(e);if(t)return t;let n=PT(e);return AT.set(e,n),n},NT=e=>e.some(e=>Array.isArray(e)?e[0]===Os:e===Os),PT=e=>{let t=e.rehypePlugins||DT,n=e.remarkPlugins||DT,r=NT(t)?n:[...n,ET],i=e.remarkRehypeOptions?{...OT,...e.remarkRehypeOptions}:OT;return jb().use(fy).use(r).use(rb,i).use(t)},FT=e=>e,IT=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:`text`,value:r}},LT=(e,t)=>{for(let n in Dv)if(Object.hasOwn(Dv,n)&&Object.hasOwn(e.properties,n)){let r=e.properties[n],i=Dv[n];(i===null||i.includes(e.tagName))&&(e.properties[n]=t(String(r||``),n,e)??void 0)}},RT=(e,t,n,r,i,a)=>{let o=!1;return r?o=!r.includes(e.tagName):i&&(o=i.includes(e.tagName)),!o&&a&&typeof t==`number`&&(o=!a(e,t,n)),o},zT=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:a,unwrapDisallowed:o,urlTransform:s}=t;if(n||r||i||a||s){let t=s||FT;k(e,(e,s,c)=>{if(e.type===`raw`&&c&&typeof s==`number`)return IT(c,s,a,e.value),s;if(e.type===`element`&&(LT(e,t),RT(e,s,c,r,i,n)&&c&&typeof s==`number`))return o&&e.children?c.children.splice(s,1,...e.children):c.children.splice(s,1),s})}return iv(e,{Fragment:X.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:X.jsx,jsxs:X.jsxs,passKeys:!0,passNode:!0})},BT=/\[\^[\w-]{1,200}\](?!:)/,VT=/\[\^[\w-]{1,200}\]:/,HT=/<([A-Za-z][\w:-]*)[\s>/]/,UT=/^ {0,3}\[[^\]]+\]:/m,WT=new Set([`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`]),GT=new Map,KT=new Map,qT=e=>{let t=e.toLowerCase(),n=GT.get(t);if(n)return n;let r=RegExp(`<${t}(?=[\\s>/])[^>]*>`,`gi`);return GT.set(t,r),r},JT=e=>{let t=e.toLowerCase(),n=KT.get(t);if(n)return n;let r=RegExp(`</${t}(?=[\\s>])[^>]*>`,`gi`);return KT.set(t,r),r},YT=(e,t)=>{if(WT.has(t.toLowerCase()))return 0;let n=e.match(qT(t));if(!n)return 0;let r=0;for(let e of n)e.trimEnd().endsWith(`/>`)||(r+=1);return r},XT=(e,t)=>{let n=e.match(JT(t));return n?n.length:0},ZT=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]===`$`&&e[n+1]===`$`&&(t+=1,n+=1);return t},QT=/\r\n|\r/g,$T=e=>{let t=new ES({gfm:!0});return{tokens:t.blockTokens(e),hasLinkDefinitions:Object.keys(t.tokens.links).length>0}},eE=null,tE=`
142
+
143
+ `,nE=e=>{for(let t=e.length-3;t>=0;--t)if(e[t].endsWith(tE))return t+1;return 0},rE=e=>` ${e}`.slice(1),iE=e=>e.map(rE),aE=e=>{let t=[],n=[],r=!1;for(let i of e){let e=i.raw,a=t.length;if(n.length>0){t[a-1]+=e;let r=n.at(-1),i=YT(e,r),o=XT(e,r);for(let e=0;e<i;e+=1)n.push(r);for(let e=0;e<o;e+=1)n.length>0&&n.at(-1)===r&&n.pop()}else{if(i.type===`html`&&i.block){let t=e.match(HT);if(t){let r=t[1];YT(e,r)>XT(e,r)&&n.push(r)}}if(i.type===`space`&&a>0)t[a-1]+=e;else{if(a>0&&!r){let n=t[a-1];if(ZT(n)%2==1){t[a-1]=n+e;continue}}t.push(e),i.type!==`space`&&(r=i.type===`code`)}}}return t},oE=(e,t)=>{if(t.length<=e.input.length||t.slice(0,e.input.length)!==e.input||UT.test(t))return null;let n=nE(e.blocks);if(n===0)return null;let r=e.verifiedCount,i=e.verifiedLength;if(r>n){r=n,i=0;for(let t=0;t<r;t+=1)i+=e.blocks[t].length}for(;r<n&&t.startsWith(e.blocks[r],i);)i+=e.blocks[r].length,r+=1;if(r!==n)return null;let a=$T(t.slice(i));if(a.hasLinkDefinitions)return null;let o=iE(aE(a.tokens));return{input:t,blocks:e.blocks.slice(0,n).concat(o),verifiedCount:r,verifiedLength:i}},sE=e=>{let t=BT.test(e),n=VT.test(e);if(t||n)return[e];let r=e.includes(`\r`)?e.replace(QT,`
144
+ `):e;if(eE?.input===r)return eE.blocks;let i=eE?oE(eE,r):null;if(!i){let{tokens:e,hasLinkDefinitions:t}=$T(r);i={input:r,blocks:t?[rE(r)]:iE(aE(e)),verifiedCount:0,verifiedLength:0}}return eE=i,i.blocks},cE=/^\n*/,lE=/\n*$/,uE=/\n\n/g,dE=(e,t,n)=>t.includes(`
145
+ `)?`${e}${t.replace(uE,`
146
+ <!---->
147
+ `).replace(cE,`
148
+
149
+ `).replace(lE,`
150
+
151
+ `)}${n}
152
+
153
+ `:e+t+n,fE=(e,t)=>{let n=RegExp(`<(${t})(?=[\\s>/])([^>]*)>`,`gi`),r=``,i=0,a=n.exec(e);for(;a;){let t=a[0],o=a[1],s=a.index+t.length,c=e.slice(s);if(RegExp(`</${o}\\s*>`,`i`).test(c)){a=n.exec(e);continue}if(r+=e.slice(i,a.index),c.length===0){r+=t,i=s,a=n.exec(e);continue}if(c.startsWith(`
154
+
155
+ `)){let n=c.slice(2).replace(uE,`
156
+ <!---->
157
+ `);r+=`${t}
158
+
159
+ ${n}`,i=e.length;break}if(!c.startsWith(`
160
+ `)){r+=t,i=s,a=n.exec(e);continue}let l=c.slice(1);if(l.trim().length===0){r+=t,i=s,a=n.exec(e);continue}let u=l.replace(uE,`
161
+ <!---->
162
+ `);r+=`${t}
163
+
164
+ ${u}`,i=e.length;break}return i===0?e:r+e.slice(i)},pE=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>dE(t,n,r)),n=fE(n,e)}return n},mE=/([\\`*_~[\]|])/g,hE=e=>e.replace(mE,`\\$1`),gE=(e,t)=>{if(!t.length)return e;let n=e;for(let e of t){let t=RegExp(`(<${e}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${e}\\s*>)`,`gi`);n=n.replace(t,(e,t,n,r)=>t+hE(n).replace(/\n\n/g,`&#10;&#10;`)+r)}return n},_E=new Set([`blockquote`,`dd`,`dt`,`figcaption`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`li`,`p`,`td`,`th`]),vE=new Set([`code`,`kbd`,`pre`,`samp`,`var`]);function yE(e){return e.children.map(e=>e.type===`text`?e.value:e.type===`element`&&!vE.has(e.tagName)?yE(e):``).join(``)}function bE(){return e=>{k(e,`element`,e=>{vE.has(e.tagName)?(e.properties??={},e.properties.dir=`ltr`):_E.has(e.tagName)&&(e.properties??={},typeof e.properties.dir!=`string`&&(e.properties.dir=xT(yE(e))))})}}var xE=e=>e.type===`text`?e.value:`children`in e&&Array.isArray(e.children)?e.children.map(xE).join(``):``,SE=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(e=>e.toLowerCase()));k(t,`element`,e=>{if(n.has(e.tagName.toLowerCase())){let t=xE(e);e.children=t?[{type:`text`,value:t}]:[]}})},CE=()=>e=>{k(e,`code`,e=>{e.meta&&(e.data=e.data??{},e.data.hProperties={...e.data.hProperties??{},metastring:e.meta})})},wE=/^([a-zA-Z][a-zA-Z\d+\-.]*:)/,TE=e=>new Set(e.map(e=>e.trim().toLowerCase()).filter(e=>e.length>0).map(e=>e.endsWith(`:`)?e:`${e}:`));function EE(e,t,n){let r=e.position?.start?.offset;if(typeof r==`number`&&n.charCodeAt(r)===91||e.children.length!==1)return!1;let[i]=e.children;if(i.type!==`text`)return!1;let a=wE.exec(e.url);if(!a)return!1;let o=a[1].toLowerCase();return t.has(o)?o===`mailto:`?e.url===`mailto:${i.value}`:e.url===i.value||e.url===`${o}//${i.value}`:!1}var DE=(e=[])=>{let t=TE(e);return(e,n)=>{if(t.size===0)return;let r=String(n.value??``);k(e,`link`,(e,n,i)=>{if(i&&n!==void 0&&EE(e,t,r))return i.children.splice(n,1,...e.children),n})}},OE=`data-sd-caret-hidden`,kE=()=>{},AE=()=>kE,jE=e=>{let t=(0,A.useRef)(null),n=(0,A.useRef)(null),r=(0,A.useSyncExternalStore)(AE,()=>!0,()=>!1);return(0,A.useLayoutEffect)(()=>{var r;let i=e&&(r=t.current?.lastElementChild)!=null?r:null,a=n.current;a!==i&&(a?.removeAttribute(OE),i?.setAttribute(OE,``),n.current=i)}),{containerRef:t,showCaret:r||!e}},ME=vT,NE=/^[a-z]/,PE=/^[ \t]*<[\w!/?-]/,FE=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,IE=e=>typeof e!=`string`||e.length===0||!PE.test(e)?e:e.replace(FE,`$1`),LE={...As,clobberPrefix:``,protocols:{...As.protocols,href:[...As.protocols?.href??[],`tel`,`streamdown`],src:[...As.protocols?.src??[],`streamdown`]},attributes:{...As.attributes,code:[...As.attributes?.code??[],`metastring`]}},RE={raw:Os,sanitize:[qs,LE],harden:[ue,{allowedImagePrefixes:[`*`],allowedLinkPrefixes:[`*`],allowedProtocols:[`*`],defaultOrigin:void 0,allowDataImages:!0}]},zE={gfm:[Np,{}],codeMeta:CE},BE=Object.values(RE),VE=Object.values(zE),HE={block:` ▋`,circle:` ●`},UE=[`github-light`,`github-dark`],WE={enabled:!0},GE=(0,A.createContext)({codeBlockMaxHeight:400,shikiTheme:UE,controls:!0,isAnimating:!1,lineNumbers:!0,mode:`streaming`,mermaid:void 0,linkSafety:WE,portal:void 0,tableMaxHeight:300}),KE=(0,A.memo)(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:a,animatePlugin:o,...s})=>{(0,A.useLayoutEffect)(()=>{o?.commit()});let c=typeof e==`string`&&n?IE(e):e,l=(0,X.jsx)(jT,{...s,children:c});return(0,X.jsx)(hC.Provider,{value:i,children:a?(0,X.jsx)(`div`,{dir:a,style:{display:`contents`},children:l}):l})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(n=>e.components?.[n]!==t.components?.[n]))return!1}return e.rehypePlugins===t.rehypePlugins&&e.remarkPlugins===t.remarkPlugins&&!!e.animatePlugin==!!t.animatePlugin});KE.displayName=`Block`;var qE=e=>{let t={};for(let[n,r]of Object.entries(e))(n.startsWith(`data-`)||n.startsWith(`aria-`))&&(t[n]=r);return t},JE=(e,t)=>{let n=qE(e),r=qE(t),i=Object.keys(n);return i.length===Object.keys(r).length&&i.every(e=>Object.hasOwn(r,e)&&n[e]===r[e])},YE=(0,A.memo)(({children:e,mode:t=`streaming`,dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:a,rehypePlugins:o=BE,remarkPlugins:s=VE,className:c,shikiTheme:l,mermaid:u,codeBlockMaxHeight:d=400,controls:f=!0,isAnimating:p=!1,tableMaxHeight:m=300,animated:h,BlockComponent:g=KE,parseMarkdownIntoBlocksFn:_=sE,caret:v,plugins:y,remend:b,linkSafety:x=WE,portal:ee,lineNumbers:S=!0,allowedTags:C,fallbackComponent:w,literalTagContent:T,disableAutolinkProtocols:E,translations:D,icons:te,prefix:ne,onAnimationStart:re,onAnimationEnd:ie,...O})=>{let ae=(0,A.useId)(),oe=qE(O),k=(0,A.useMemo)(()=>yC(ne),[ne]),se=(0,A.useRef)(null),ce=(0,A.useRef)(re),le=(0,A.useRef)(ie);ce.current=re,le.current=ie,(0,A.useEffect)(()=>{var e,n,r;if(t===`static`)return;let i=se.current;se.current=p,i===null?p&&((e=ce.current)==null||e.call(ce)):p&&!i?(n=ce.current)==null||n.call(ce):!p&&i&&((r=le.current)==null||r.call(le))},[p,t]);let ue=(0,A.useMemo)(()=>C?Object.keys(C):[],[C]),de=(0,A.useMemo)(()=>{if(typeof e!=`string`)return``;let n=t===`streaming`&&r?Qh(e,b):e;return T&&T.length>0&&(n=gE(n,T)),ue.length>0&&(n=pE(n,ue)),n},[e,t,r,b,ue,T]),fe=(0,A.useMemo)(()=>_(de),[de,_]),pe=(0,A.useMemo)(()=>n===`auto`?fe.map(xT):void 0,[fe,n]),me=(0,A.useMemo)(()=>fe.map((e,t)=>`${ae}-${t}`),[fe.length,ae]),he=(0,A.useMemo)(()=>h===!0?`true`:h?JSON.stringify(h):``,[h]),ge=(0,A.useRef)(null),_e=(0,A.useRef)([]),ve=(0,A.useRef)([]),ye=(0,A.useRef)(null),be=(0,A.useRef)(``);he?(be.current===he?ge.current||=VS():(be.current=he,ge.current=VS({maxBacklogMs:he===`true`?void 0:h.maxBacklogMs}),_e.current=[],ve.current=[]),p&&ge.current&&ge.current.beginPass(ge.current.now())):(ge.current=null,_e.current=[],ve.current=[],be.current=``),(0,A.useLayoutEffect)(()=>{var e;p&&((e=ge.current)==null||e.commitPass())});let xe=(0,A.useMemo)(()=>({codeBlockMaxHeight:d,shikiTheme:l??(y?.code)?.getThemes()??UE,controls:f,isAnimating:p,lineNumbers:S,mode:t,mermaid:u,linkSafety:x,portal:ee,tableMaxHeight:m}),[d,l,f,p,S,t,u,x,ee,y?.code,m]),Se=(0,A.useMemo)(()=>D?JSON.stringify(D):``,[D]),Ce=(0,A.useMemo)(()=>({...VC,...D}),[Se]),we=(0,A.useMemo)(()=>{let{inlineCode:e,...t}=a??{},n={...vT,...t};if(e){let t=n.code;n.code=n=>`data-block`in n?t?(0,A.createElement)(t,n):null:(0,A.createElement)(e,n)}if(w){if(C)for(let e of Object.keys(C))Object.hasOwn(n,e)||(n[e]=w);let e={configurable:!0,enumerable:!1,value:w,writable:!1};return new Proxy(n,{getOwnPropertyDescriptor(t,n){let r=Object.getOwnPropertyDescriptor(t,n);if(r)return r;if(typeof n==`string`&&NE.test(n))return e},get(e,t,n){return typeof t==`string`&&NE.test(t)&&!Object.hasOwn(e,t)?w:Reflect.get(e,t,n)}})}return n},[a,w,C]),Te=(0,A.useMemo)(()=>{let e=[];return y!=null&&y.cjk&&(e=[...e,...y.cjk.remarkPluginsBefore]),e=[...e,...s],E&&E.length>0&&(e=[...e,[DE,E]]),y!=null&&y.cjk&&(e=[...e,...y.cjk.remarkPluginsAfter]),y!=null&&y.math&&(e=[...e,y.math.remarkPlugin]),e},[s,y?.math,y?.cjk,E]),Ee=(0,A.useMemo)(()=>{let e=o;if(C&&Object.keys(C).length>0&&o===BE){let t={...LE,tagNames:[...LE.tagNames??[],...Object.keys(C)],attributes:{...LE.attributes,...C}};e=[RE.raw,[qs,t],RE.harden]}return T&&T.length>0&&(e=[...e,[SE,T]]),y!=null&&y.math&&(e=[...e,y.math.rehypePlugin]),n===`auto`&&t===`static`&&(e=[...e,bE]),e},[o,y?.math,C,T,n,t]),De=(0,A.useMemo)(()=>v&&p?{"--streamdown-caret":`"${HE[v]}"`}:void 0,[v,p]),{containerRef:Oe,showCaret:ke}=jE((0,A.useMemo)(()=>{if(!p||fe.length===0)return!1;let e=fe.at(-1);return wT(e)||TT(e)},[p,fe])),Ae=e=>{let t=null;if(ge.current&&p){if(!_e.current[e]){let{maxBacklogMs:t,...n}=he&&he!==`true`?h:{};_e.current[e]=pC({...n,timeline:ge.current})}t=_e.current[e]}ye.current!==Ee&&(ve.current=[],ye.current=Ee),t&&!ve.current[e]&&(ve.current[e]=[...Ee,t.rehypePlugin]);let n=t&&ve.current[e]?ve.current[e]:Ee;return{blockAnimatePlugin:t,blockRehypePlugins:n}};return t===`static`?(0,X.jsx)(HC.Provider,{value:Ce,children:(0,X.jsx)(rw.Provider,{value:y??null,children:(0,X.jsx)(GE.Provider,{value:xe,children:(0,X.jsx)(zC,{icons:te,children:(0,X.jsx)(xC.Provider,{value:k,children:(0,X.jsx)(`div`,{...oe,className:k(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,c),dir:n===`auto`?void 0:n,children:(0,X.jsx)(jT,{components:we,rehypePlugins:Ee,remarkPlugins:Te,...O,children:de})})})})})})}):(0,X.jsx)(HC.Provider,{value:Ce,children:(0,X.jsx)(rw.Provider,{value:y??null,children:(0,X.jsx)(GE.Provider,{value:xe,children:(0,X.jsx)(zC,{icons:te,children:(0,X.jsx)(xC.Provider,{value:k,children:(0,X.jsxs)(`div`,{...oe,className:k(`space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0`,v&&ke?`[&>*:last-child:not([data-sd-caret-hidden])]:after:inline [&>*:last-child:not([data-sd-caret-hidden])]:after:align-baseline [&>*:last-child:not([data-sd-caret-hidden])]:after:content-[var(--streamdown-caret)]`:null,c),ref:Oe,style:De,children:[fe.length===0&&v&&p&&(0,X.jsx)(`span`,{}),fe.map((e,t)=>{let a=t===fe.length-1,o=p&&a&&wT(e),{blockAnimatePlugin:s,blockRehypePlugins:c}=Ae(t);return(0,X.jsx)(g,{animatePlugin:s,components:we,content:e,dir:pe?.[t]??(n===`auto`?void 0:n),index:t,isIncomplete:o,rehypePlugins:c,remarkPlugins:Te,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...O},me[t])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.codeBlockMaxHeight===t.codeBlockMaxHeight&&e.tableMaxHeight===t.tableMaxHeight&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&e.disableAutolinkProtocols===t.disableAutolinkProtocols&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir&&e.fallbackComponent===t.fallbackComponent&&JE(e,t));YE.displayName=`Streamdown`;var XE=e=>e>0?e:null,ZE=(e,t)=>{if(e.endsWith(`px`))return XE(Number.parseFloat(e));if(e.endsWith(`rem`)){let t=Number.parseFloat(getComputedStyle(document.documentElement).fontSize||`16`);return XE(Number.parseFloat(e)*t)}if(e.endsWith(`em`)){let n=Number.parseFloat(getComputedStyle(t).fontSize||`16`);return XE(Number.parseFloat(e)*n)}if(e.endsWith(`vh`))return XE(Number.parseFloat(e)/100*window.innerHeight);if(e.endsWith(`%`)){let n=t.parentElement;return n&&n.clientHeight>0?XE(Number.parseFloat(e)/100*n.clientHeight):null}return null},QE=(e,t)=>{let n=t.trim().toLowerCase();return!n||n===`none`||n===`auto`?null:ZE(n,e)},$E=/^min\(\s*([^,]+)\s*,\s*([^)]+)\s*\)$/i,eD=(e,t)=>{let n=QE(e,t);if(n!=null)return n;let r=t.trim().match($E);if(!r)return null;let i=QE(e,r[1].trim()),a=QE(e,r[2].trim());return i==null||a==null?null:Math.min(i,a)},tD=(e,t,n)=>{let r=t.clientWidth;if(!(r>0))return null;if(n){let n=t.clientHeight;if(!(n>0))return null;let i=Math.min(r/e.width,n/e.height,1);return!(i>0)||Number.isNaN(i)?null:{fitZoom:i,viewportHeight:null}}let i=Math.min(r/e.width,1);if(!(i>0)||Number.isNaN(i))return null;let a=e.height*i,o=null,s=t;for(;s&&o==null;){let e=getComputedStyle(s);o=eD(s,e.maxHeight),s=s.parentElement}let c=o==null?a:Math.min(a,o),l=Math.min(i,c/e.height,1);return!(l>0)||Number.isNaN(l)?null:{fitZoom:l,viewportHeight:c}},nD=({children:e,className:t,contentSize:n,fitKey:r,minZoom:i=.5,maxZoom:a=3,zoomStep:o=.1,showControls:s=!0,initialZoom:c=1,isAutoFit:l=!1,fullscreen:u=!1})=>{let{RotateCcwIcon:d,ZoomInIcon:f,ZoomOutIcon:p}=BC(),m=$(),h=UC(),g=(0,A.useRef)(null),_=(0,A.useRef)(null),v=(0,A.useRef)(!1),[y,b]=(0,A.useState)(c),[x,ee]=(0,A.useState)(i),[S,C]=(0,A.useState)(c),[w,T]=(0,A.useState)({x:0,y:0}),[E,D]=(0,A.useState)(!1),[te,ne]=(0,A.useState)({x:0,y:0}),[re,ie]=(0,A.useState)({x:0,y:0}),[O,ae]=(0,A.useState)(null),oe=(0,A.useCallback)(e=>{let t=g.current;if(!t)return;let n=tD(e,t,u);if(!n)return;let{fitZoom:r,viewportHeight:a}=n;ae(a),b(r),ee(Math.min(i,r)),v.current||(C(r),T({x:0,y:0}))},[u,i]),k=(0,A.useCallback)(e=>{C(t=>Math.max(x,Math.min(a,t+e))),v.current=!0},[x,a]),se=(0,A.useCallback)(()=>{k(o)},[k,o]),ce=(0,A.useCallback)(()=>{k(-o)},[k,o]),le=(0,A.useCallback)(()=>{C(y),T({x:0,y:0}),v.current=!1},[y]),ue=(0,A.useCallback)(e=>{e.preventDefault();let t=e.deltaY>0?-o:o;k(t)},[k,o]),de=(0,A.useCallback)(e=>{if(e.button!==0||e.isPrimary===!1)return;D(!0),v.current=!0,ne({x:e.clientX,y:e.clientY}),ie(w);let t=e.currentTarget;t instanceof HTMLElement&&t.setPointerCapture(e.pointerId)},[w]),fe=(0,A.useCallback)(e=>{if(!E)return;e.preventDefault();let t=e.clientX-te.x,n=e.clientY-te.y;T({x:re.x+t,y:re.y+n})},[E,te,re]),pe=(0,A.useCallback)(e=>{D(!1);let t=e.currentTarget;t instanceof HTMLElement&&t.releasePointerCapture(e.pointerId)},[]);(0,A.useEffect)(()=>{ee(i),l||(b(c),C(c),ae(null))},[c,l,i]),(0,A.useLayoutEffect)(()=>{if(!(l&&n))return;oe(n);let e=g.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>{oe(n)});return t.observe(e),()=>{t.disconnect()}},[oe,n,l]),(0,A.useEffect)(()=>{l&&(v.current=!1)},[r,l]),(0,A.useEffect)(()=>{let e=g.current;if(e)return e.addEventListener(`wheel`,ue,{passive:!1}),()=>{e.removeEventListener(`wheel`,ue)}},[ue]),(0,A.useEffect)(()=>{let e=_.current;if(e&&E)return document.body.style.userSelect=`none`,e.addEventListener(`pointermove`,fe,{passive:!1}),e.addEventListener(`pointerup`,pe),e.addEventListener(`pointercancel`,pe),()=>{document.body.style.userSelect=``,e.removeEventListener(`pointermove`,fe),e.removeEventListener(`pointerup`,pe),e.removeEventListener(`pointercancel`,pe)}},[E,fe,pe]);let me=!u&&l&&O!=null?{height:O}:void 0;return(0,X.jsxs)(`div`,{className:m(`relative flex flex-col`,u?`h-full w-full`:`min-h-28 w-full`,t),ref:g,style:{cursor:E?`grabbing`:`grab`,...me},children:[s?(0,X.jsxs)(`div`,{className:m(`absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm`,u?`bottom-4 left-4`:`bottom-2 left-2`),children:[(0,X.jsx)(`button`,{"aria-label":h.zoomIn,className:m(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:S>=a,onClick:se,title:h.zoomIn,type:`button`,children:(0,X.jsx)(f,{"aria-hidden":`true`,size:16})}),(0,X.jsx)(`button`,{"aria-label":h.zoomOut,className:m(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50`),disabled:S<=x,onClick:ce,title:h.zoomOut,type:`button`,children:(0,X.jsx)(p,{"aria-hidden":`true`,size:16})}),(0,X.jsx)(`button`,{"aria-label":h.resetView,className:m(`flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground`),onClick:le,title:h.resetView,type:`button`,children:(0,X.jsx)(d,{"aria-hidden":`true`,size:16})})]}):null,(0,X.jsx)(`div`,{className:m(`flex h-full w-full flex-1 origin-center items-center justify-center transition-transform duration-150 ease-out`),onPointerDown:de,ref:_,role:`application`,style:{transform:`translate(${w.x}px, ${w.y}px) scale(${S})`,transformOrigin:`center center`,touchAction:`none`,willChange:`transform`},children:e})]})},rD=(e,t)=>new Promise(n=>{let r=setTimeout(n,e);t(()=>{clearTimeout(r),n()})}),iD=async(e,{chart:t,config:n},r,i)=>{try{let i=e.getMermaid(n),a=t.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0),o=`mermaid-${Math.abs(a)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:s}=await i.render(o,t),c=vw(s);return{ok:!0,svg:r?s:yw(s),size:c}}catch(e){return{ok:!1,error:e instanceof Error?e.message:i}}},aD=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let a=$(),[o,s]=(0,A.useState)(null),[c,l]=(0,A.useState)(!1),[u,d]=(0,A.useState)(``),[f,p]=(0,A.useState)(null),m=UC(),[h,g]=(0,A.useState)(``),[_,v]=(0,A.useState)(0),{mermaid:y}=(0,A.useContext)(GE),b=ow(),x=y?.errorComponent,{shouldRender:ee,containerRef:S}=LS({immediate:r}),C=(0,A.useRef)(null),w=(0,A.useRef)(!1),T=(0,A.useRef)(!1),E=gC(),D=(0,A.useRef)(E),te=(0,A.useRef)(null);(0,A.useEffect)(()=>(T.current=!0,()=>{var e;T.current=!1,(e=te.current)==null||e.call(te)}),[]),(0,A.useEffect)(()=>{var e;D.current=E,E||(e=te.current)==null||e.call(te)},[E]);let ne=async e=>{D.current&&(await rD(e,e=>{te.current=e}),te.current=null)};if((0,A.useEffect)(()=>{if(!ee)return;if(!b){s(`Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.`);return}if(C.current={chart:e,config:n},w.current)return;let t=(e,t)=>{t.ok?(d(t.svg),p(t.size),g(t.svg)):e===C.current&&s(t.error)};(async()=>{w.current=!0,s(null),l(!0);try{let e=C.current;for(;e;){let n=performance.now(),i=await iD(b,e,r,m.errorMermaid);if(!T.current||(t(e,i),i.ok&&await ne(performance.now()-n),!T.current||e===C.current))return;e=C.current}}finally{w.current=!1,T.current&&l(!1)}})()},[e,n,_,ee,b]),!(ee||u||h))return(0,X.jsx)(`div`,{className:a(`my-4 min-h-[200px]`,t),ref:S});if(c&&!u&&!h)return(0,X.jsx)(`div`,{className:a(`my-4 flex justify-center p-4`,t),ref:S,children:(0,X.jsxs)(`div`,{className:a(`flex items-center space-x-2 text-muted-foreground`),children:[(0,X.jsx)(`div`,{className:a(`h-4 w-4 animate-spin rounded-full border-current border-b-2`)}),(0,X.jsx)(`span`,{className:a(`text-sm`),children:`Loading diagram...`})]})});if(o&&!u&&!h)return x?(0,X.jsx)(`div`,{ref:S,children:(0,X.jsx)(x,{chart:e,error:o,retry:()=>v(e=>e+1)})}):(0,X.jsxs)(`div`,{className:a(`rounded-md bg-red-50 p-4`,t),ref:S,children:[(0,X.jsxs)(`p`,{className:a(`font-mono text-red-700 text-sm`),children:[`Mermaid Error: `,o]}),(0,X.jsxs)(`details`,{className:a(`mt-2`),children:[(0,X.jsx)(`summary`,{className:a(`cursor-pointer text-red-600 text-xs`),children:`Show Code`}),(0,X.jsx)(`pre`,{className:a(`mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs`),children:e})]})]});let re=u||h;return(0,X.jsx)(`div`,{className:a(r?`size-full`:`max-h-[min(70vh,40rem)] w-full`,t),"data-streamdown":`mermaid`,ref:S,children:(0,X.jsx)(nD,{className:a(r?`size-full overflow-hidden`:`max-h-[min(70vh,40rem)] overflow-hidden`,t),contentSize:f,fitKey:e,fullscreen:r,isAutoFit:!0,maxZoom:3,minZoom:.1,showControls:i,zoomStep:.1,children:(0,X.jsx)(`div`,{"aria-label":m.mermaidAriaLabel,className:a(`flex justify-center`,r?`size-full items-center`:null),dangerouslySetInnerHTML:{__html:re},role:`img`})})})},oD=n({default:()=>bD}),sD=(e,t)=>({node:n,...r})=>(0,A.createElement)(e,{...r,className:l(r.className,t)}),cD=(0,A.lazy)(()=>d(()=>import(`./fence-BdtS5gi0.js`),__vite__mapDeps([2,1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40]))),lD=({node:e,className:t,children:n})=>{let r=typeof n==`string`?n.replace(/\n$/,``):void 0,i=(0,X.jsx)(g,{children:(0,X.jsx)(h,{className:t,children:r??n})});return r===void 0?i:(0,X.jsx)(s,{getResetKey:()=>`fence`,errorComponent:()=>i,children:(0,X.jsx)(A.Suspense,{fallback:i,children:(0,X.jsx)(cD,{text:r,language:t?.replace(`language-`,``)??``})})})},uD=ME.a;function dD({url:e,isOpen:t,onClose:n,onConfirm:r}){return(0,X.jsx)(S,{open:t,onOpenChange:e=>!e&&n(),children:(0,X.jsxs)(x,{children:[(0,X.jsxs)(b,{children:[(0,X.jsx)(ee,{children:`Open this link?`}),(0,X.jsx)(v,{children:`The agent wrote it. It opens in a new tab.`})]}),(0,X.jsx)(`p`,{className:`font-mono text-xs break-all`,children:e}),(0,X.jsxs)(_,{children:[(0,X.jsx)(y,{render:(0,X.jsx)(c,{variant:`outline`}),children:`Cancel`}),(0,X.jsx)(c,{onClick:()=>{r(),n()},children:`Open`})]})]})})}var fD={enabled:!0,renderModal:e=>(0,X.jsx)(dD,{...e})},{sanitize:pD,harden:mD}=RE;if(!pD||!mD)throw Error(`Streamdown no longer names its sanitize and harden plugins`);var hD=[pD,mD],gD=`mt-1 font-medium first:mt-0`,_D=sD(`h3`,`${gD} text-base`),vD=`h-auto border-b py-1 whitespace-normal`,yD={h1:_D,h2:_D,h3:sD(`h3`,gD),h4:sD(`h4`,gD),h5:sD(`h5`,gD),h6:sD(`h6`,gD),ul:sD(`ul`,`flex list-disc flex-col gap-1 pl-5`),ol:sD(`ol`,`flex list-decimal flex-col gap-1 pl-5`),li:`li`,strong:sD(`strong`,`font-medium`),a:({node:e,href:t,...n})=>t?t.startsWith(`#`)?(0,X.jsx)(`a`,{...n,href:t}):(0,X.jsx)(uD,{...n,href:t,className:`text-left font-normal text-current wrap-anywhere underline underline-offset-4`}):(0,X.jsx)(`span`,{children:n.children}),blockquote:sD(`blockquote`,`border-l pl-3 text-muted-foreground`),hr:()=>(0,X.jsx)(u,{}),inlineCode:sD(`code`,`rounded-sm bg-muted px-1 py-0.5 font-mono text-[0.875em]`),code:lD,table:({node:e,...t})=>(0,X.jsx)(m,{...t}),thead:`thead`,tbody:`tbody`,tr:`tr`,th:sD(f,vD),td:sD(p,vD)};function bD({text:e,live:t}){return(0,X.jsx)(YE,{className:`flex min-w-0 flex-col gap-3 space-y-0 text-reply wrap-break-word`,components:yD,disallowedElements:[`img`],isAnimating:t,linkSafety:fD,rehypePlugins:hD,children:e})}export{aD as a,rn as c,ht as d,bD as default,ft as f,aw as i,Ut as l,lt as m,OC as n,k_ as o,pt as p,GE as r,Js as s,oD as t,yt as u};