@ashwin_droid/notion-stream 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (730) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +418 -0
  3. package/dist/_baseUniq-CT-tc-CG.mjs +477 -0
  4. package/dist/_baseUniq-DSwfPiGC.js +1 -0
  5. package/dist/abap-DV7Q1lGP.js +1 -0
  6. package/dist/abap-Y8Dl9g_6.mjs +6 -0
  7. package/dist/actionscript-3-DXOxkRa2.js +1 -0
  8. package/dist/actionscript-3-DZzbMeqX.mjs +6 -0
  9. package/dist/ada-D46EKCNf.js +1 -0
  10. package/dist/ada-vP6ak0IW.mjs +6 -0
  11. package/dist/andromeeda-BIpZ7gaU.mjs +4 -0
  12. package/dist/andromeeda-DVDxRwp5.js +1 -0
  13. package/dist/angular-html-DxvPVw44.mjs +32 -0
  14. package/dist/angular-html-JXV_E8IE.js +1 -0
  15. package/dist/angular-ts-CV6bdmcc.mjs +21 -0
  16. package/dist/angular-ts-ul8EvQZm.js +1 -0
  17. package/dist/apache-BUjz-sD2.mjs +6 -0
  18. package/dist/apache-DL1xuH1f.js +1 -0
  19. package/dist/apex-6AM9YZbQ.js +1 -0
  20. package/dist/apex-OyTfjCYK.mjs +6 -0
  21. package/dist/apl-BdW4yp7x.js +1 -0
  22. package/dist/apl-Cl3ewf1P.mjs +16 -0
  23. package/dist/applescript-BPx7YFFu.mjs +6 -0
  24. package/dist/applescript-COilsSrZ.js +1 -0
  25. package/dist/ara-B6Lpq1YJ.js +1 -0
  26. package/dist/ara-Z2fSOxSw.mjs +6 -0
  27. package/dist/arc-BBnIBs2j.js +1 -0
  28. package/dist/arc-DmoYXidQ.mjs +83 -0
  29. package/dist/architecture-U656AL7Q-C0ZB2O9M.js +1 -0
  30. package/dist/architecture-U656AL7Q-CMPtJMZ-.mjs +5 -0
  31. package/dist/architectureDiagram-VXUJARFQ-BPQoZmaM.js +36 -0
  32. package/dist/architectureDiagram-VXUJARFQ-BYzpbF40.mjs +4665 -0
  33. package/dist/asciidoc-B-pCoB3G.mjs +6 -0
  34. package/dist/asciidoc-DcKqW72n.js +1 -0
  35. package/dist/asm-BTWLY5ym.mjs +6 -0
  36. package/dist/asm-DYMFy-sD.js +1 -0
  37. package/dist/astro-BAqad-WM.js +1 -0
  38. package/dist/astro-CMhPddqn.mjs +18 -0
  39. package/dist/aurora-x-BwoVEUWZ.mjs +4 -0
  40. package/dist/aurora-x-C5IpmIOG.js +1 -0
  41. package/dist/awk-Fb0P9dkn.mjs +6 -0
  42. package/dist/awk-IEszImW6.js +1 -0
  43. package/dist/ayu-dark-CDpQIJw4.js +1 -0
  44. package/dist/ayu-dark-DG7aLdHp.mjs +4 -0
  45. package/dist/ballerina-Dr6dU4hP.js +1 -0
  46. package/dist/ballerina-oZK-YekG.mjs +6 -0
  47. package/dist/bat-0FvbqU9S.mjs +6 -0
  48. package/dist/bat-DGkUhhn2.js +1 -0
  49. package/dist/beancount-Bv1Sweoy.js +1 -0
  50. package/dist/beancount-DqJEb89h.mjs +6 -0
  51. package/dist/berry-DEMs4LK_.js +1 -0
  52. package/dist/berry-DODBq_Ff.mjs +6 -0
  53. package/dist/bibtex-BgA36Z3k.js +1 -0
  54. package/dist/bibtex-EULQRLY5.mjs +6 -0
  55. package/dist/bicep-BorU73w0.mjs +6 -0
  56. package/dist/bicep-DL0zb-7W.js +1 -0
  57. package/dist/blade-Cg1_QHbH.mjs +20 -0
  58. package/dist/blade-CgjUlvXO.js +1 -0
  59. package/dist/blockDiagram-VD42YOAC-DPVTCHn5.mjs +2265 -0
  60. package/dist/blockDiagram-VD42YOAC-Z3Fc3Bew.js +122 -0
  61. package/dist/bsl-Dy8wYKq-.mjs +8 -0
  62. package/dist/bsl-MeEzPwnu.js +1 -0
  63. package/dist/c-CtlmKnPF.js +1 -0
  64. package/dist/c-eeMepfLm.mjs +6 -0
  65. package/dist/c3-Bt581sCe.mjs +6 -0
  66. package/dist/c3-DtfRRWXN.js +1 -0
  67. package/dist/c4Diagram-YG6GDRKO-C2Y4q08p.mjs +1581 -0
  68. package/dist/c4Diagram-YG6GDRKO-LzDuCZ2V.js +10 -0
  69. package/dist/cadence-02UX7mW8.mjs +6 -0
  70. package/dist/cadence-DcbmM5v3.js +1 -0
  71. package/dist/cairo-Bl3vCTfQ.js +1 -0
  72. package/dist/cairo-DRXAUnCM.mjs +8 -0
  73. package/dist/catppuccin-frappe-Bn4lgmUk.js +1 -0
  74. package/dist/catppuccin-frappe-D3cH2rXe.mjs +4 -0
  75. package/dist/catppuccin-latte-BPtsb8jD.js +1 -0
  76. package/dist/catppuccin-latte-C0LRGUW4.mjs +4 -0
  77. package/dist/catppuccin-macchiato-BLfpQWhT.js +1 -0
  78. package/dist/catppuccin-macchiato-c5wQ11TT.mjs +4 -0
  79. package/dist/catppuccin-mocha-COMta283.js +1 -0
  80. package/dist/catppuccin-mocha-WMD6Qvya.mjs +4 -0
  81. package/dist/channel-6dUO0MQi.js +1 -0
  82. package/dist/channel-DVpqhnow.mjs +5 -0
  83. package/dist/chunk-4BX2VUAB-BwubFldI.js +1 -0
  84. package/dist/chunk-4BX2VUAB-DldMXCTt.mjs +9 -0
  85. package/dist/chunk-55IACEB6-Du1Simcj.mjs +8 -0
  86. package/dist/chunk-55IACEB6-P_FVKIbW.js +1 -0
  87. package/dist/chunk-B4BG7PRW-BUKsa2yH.mjs +1376 -0
  88. package/dist/chunk-B4BG7PRW-CKX0VJ-S.js +165 -0
  89. package/dist/chunk-DI55MBZ5-C9h0qLVI.mjs +1382 -0
  90. package/dist/chunk-DI55MBZ5-CMq-O8k2.js +220 -0
  91. package/dist/chunk-FMBD7UC4-48-zdz-1.js +15 -0
  92. package/dist/chunk-FMBD7UC4-C08-zA06.mjs +19 -0
  93. package/dist/chunk-QN33PNHL-B0sO38bZ.js +1 -0
  94. package/dist/chunk-QN33PNHL-B_PGnTkk.mjs +20 -0
  95. package/dist/chunk-QZHKN3VN-DbO6TJSK.mjs +15 -0
  96. package/dist/chunk-QZHKN3VN-Dy2264ui.js +1 -0
  97. package/dist/chunk-TZMSLE5B-BPmI9i6R.mjs +64 -0
  98. package/dist/chunk-TZMSLE5B-COENnLAZ.js +1 -0
  99. package/dist/clarity-PKm5CwqM.mjs +6 -0
  100. package/dist/clarity-gPuvqtpF.js +1 -0
  101. package/dist/classDiagram-2ON5EDUG-CFFwYK87.js +1 -0
  102. package/dist/classDiagram-2ON5EDUG-mzvV1Ifg.mjs +16 -0
  103. package/dist/classDiagram-v2-WZHVMYZB-CFFwYK87.js +1 -0
  104. package/dist/classDiagram-v2-WZHVMYZB-mzvV1Ifg.mjs +16 -0
  105. package/dist/clojure-CXJfHrL3.mjs +6 -0
  106. package/dist/clojure-OUsr1SUl.js +1 -0
  107. package/dist/clone-B0UaPT2Z.js +1 -0
  108. package/dist/clone-KtLCwiKH.mjs +8 -0
  109. package/dist/cmake-BJz8BOTU.mjs +6 -0
  110. package/dist/cmake-jM6P58qY.js +1 -0
  111. package/dist/cobol-C86Guwll.mjs +10 -0
  112. package/dist/cobol-DReJOyN2.js +1 -0
  113. package/dist/code-block-37QAKDTI-CmykMxjQ.mjs +27 -0
  114. package/dist/code-block-37QAKDTI-sxlq94xm.js +2 -0
  115. package/dist/codeowners-Bt9yU6NX.mjs +6 -0
  116. package/dist/codeowners-QhPK6lIJ.js +1 -0
  117. package/dist/codeql-D9-TdUN8.js +1 -0
  118. package/dist/codeql-DHkodjjI.mjs +6 -0
  119. package/dist/coffee-CUyQUc3M.js +1 -0
  120. package/dist/coffee-Q-gFdR7e.mjs +8 -0
  121. package/dist/common-lisp-C77gR-8i.js +1 -0
  122. package/dist/common-lisp-EVqT9Zhp.mjs +6 -0
  123. package/dist/components/Block.d.ts +16 -0
  124. package/dist/components/FloatingToolbar.d.ts +8 -0
  125. package/dist/components/LinkModal.d.ts +8 -0
  126. package/dist/components/NotionStream.d.ts +3 -0
  127. package/dist/components/SlashMenu.d.ts +17 -0
  128. package/dist/components/blocks/BlockquoteBlock.d.ts +13 -0
  129. package/dist/components/blocks/CodeBlock.d.ts +14 -0
  130. package/dist/components/blocks/DividerBlock.d.ts +13 -0
  131. package/dist/components/blocks/HeadingBlock.d.ts +13 -0
  132. package/dist/components/blocks/ImageBlock.d.ts +13 -0
  133. package/dist/components/blocks/InlineEditableBlock.d.ts +18 -0
  134. package/dist/components/blocks/ListBlock.d.ts +13 -0
  135. package/dist/components/blocks/MathBlock.d.ts +14 -0
  136. package/dist/components/blocks/MermaidBlock.d.ts +14 -0
  137. package/dist/components/blocks/ParagraphBlock.d.ts +13 -0
  138. package/dist/components/blocks/TableBlock.d.ts +14 -0
  139. package/dist/components/blocks/index.d.ts +10 -0
  140. package/dist/coq-B0L9upzn.mjs +6 -0
  141. package/dist/coq-vlPdR5hP.js +1 -0
  142. package/dist/cose-bilkent-S5V4N54A-BCaAPmuF.js +1 -0
  143. package/dist/cose-bilkent-S5V4N54A-BXcldnso.mjs +2605 -0
  144. package/dist/cpp-CGueNrnV.mjs +18 -0
  145. package/dist/cpp-ChNdME6I.js +1 -0
  146. package/dist/crystal-CVTji_sR.js +1 -0
  147. package/dist/crystal-CrVA7iLE.mjs +18 -0
  148. package/dist/csharp-BUkAIRXW.js +1 -0
  149. package/dist/csharp-C7yUs7-w.mjs +6 -0
  150. package/dist/css-CECN5uSL.mjs +6 -0
  151. package/dist/css-Do0mp2lm.js +1 -0
  152. package/dist/csv-CmYOceLb.mjs +6 -0
  153. package/dist/csv-DiEdJzSJ.js +1 -0
  154. package/dist/cue-D1vJRJEx.js +1 -0
  155. package/dist/cue-ZzumE7IT.mjs +6 -0
  156. package/dist/cypher-atSM3NsM.js +1 -0
  157. package/dist/cypher-jpdmjtA6.mjs +6 -0
  158. package/dist/cytoscape.esm-DkGgpG6d.js +331 -0
  159. package/dist/cytoscape.esm-ZmItrg9y.mjs +18731 -0
  160. package/dist/d-2qe3NhmZ.js +1 -0
  161. package/dist/d-CBagWSwH.mjs +6 -0
  162. package/dist/dagre-6UL2VRFP-By42zbLA.mjs +446 -0
  163. package/dist/dagre-6UL2VRFP-DCwfkcWi.js +4 -0
  164. package/dist/dark-plus-Cd5emcYO.js +1 -0
  165. package/dist/dark-plus-pUHDTVV0.mjs +4 -0
  166. package/dist/dart-6ObCrKr9.mjs +6 -0
  167. package/dist/dart-Ds0_0fwe.js +1 -0
  168. package/dist/dax-CcDT-8dH.mjs +6 -0
  169. package/dist/dax-DbkQa40E.js +1 -0
  170. package/dist/defaultLocale-BgPVtth8.mjs +171 -0
  171. package/dist/defaultLocale-C4wbwF1n.js +1 -0
  172. package/dist/desktop-B93p9R9O.mjs +6 -0
  173. package/dist/desktop-tn3MFXCZ.js +1 -0
  174. package/dist/diagram-PSM6KHXK-DIV3jw9d.mjs +534 -0
  175. package/dist/diagram-PSM6KHXK-hjXN9n1N.js +24 -0
  176. package/dist/diagram-QEK2KX5R-B04ODMim.js +43 -0
  177. package/dist/diagram-QEK2KX5R-Q0M2_YtR.mjs +221 -0
  178. package/dist/diagram-S2PKOQOG-BmCs4MZE.js +24 -0
  179. package/dist/diagram-S2PKOQOG-_WGA6s2-.mjs +143 -0
  180. package/dist/diff-BxzP2J8R.mjs +6 -0
  181. package/dist/diff-CA31fCOg.js +1 -0
  182. package/dist/docker-CsHqm9tx.mjs +6 -0
  183. package/dist/docker-zJpMwmYa.js +1 -0
  184. package/dist/dotenv-BMjVjUL1.mjs +6 -0
  185. package/dist/dotenv-DpcNCNek.js +1 -0
  186. package/dist/dracula-BNgwAJ-d.js +1 -0
  187. package/dist/dracula-BtZx2Kac.mjs +4 -0
  188. package/dist/dracula-soft-BHZ7sHFu.js +1 -0
  189. package/dist/dracula-soft-BKa-aqBv.mjs +4 -0
  190. package/dist/dream-maker-BkijXDkm.js +1 -0
  191. package/dist/dream-maker-PAx17jaB.mjs +6 -0
  192. package/dist/edge-B28yp_Zk.js +1 -0
  193. package/dist/edge-CBKv6mfK.mjs +12 -0
  194. package/dist/elixir-D7-1KNL2.js +1 -0
  195. package/dist/elixir-rttMGqaI.mjs +8 -0
  196. package/dist/elm-BkJa-nJb.js +1 -0
  197. package/dist/elm-DCe9MkDR.mjs +8 -0
  198. package/dist/emacs-lisp-C1UCIjUO.js +1 -0
  199. package/dist/emacs-lisp-Cfxdx5D-.mjs +6 -0
  200. package/dist/erDiagram-Q2GNP2WA-4KtQUUuI.js +60 -0
  201. package/dist/erDiagram-Q2GNP2WA-CW0D_QGb.mjs +842 -0
  202. package/dist/erb-BTG3NMrz.mjs +10 -0
  203. package/dist/erb-DJ1tHjRo.js +1 -0
  204. package/dist/erlang-CxyQpgjh.mjs +8 -0
  205. package/dist/erlang-DztDLzIS.js +1 -0
  206. package/dist/everforest-dark-DMCBqXCK.mjs +4 -0
  207. package/dist/everforest-dark-_sBMomR1.js +1 -0
  208. package/dist/everforest-light-BbXl82Em.mjs +4 -0
  209. package/dist/everforest-light-H0xoYxl0.js +1 -0
  210. package/dist/fennel-Bz9-EMMc.js +1 -0
  211. package/dist/fennel-N4WcXuKx.mjs +6 -0
  212. package/dist/fish-BTDEUgqH.mjs +6 -0
  213. package/dist/fish-DwmQKRZi.js +1 -0
  214. package/dist/flowDiagram-NV44I4VS-BwpfJE0U.js +162 -0
  215. package/dist/flowDiagram-NV44I4VS-DVQ8Ntc4.mjs +1627 -0
  216. package/dist/fluent-BMXUxfv1.mjs +6 -0
  217. package/dist/fluent-CJtpNuaO.js +1 -0
  218. package/dist/fortran-fixed-form-CM5372im.js +1 -0
  219. package/dist/fortran-fixed-form-CYWf1Rx6.mjs +8 -0
  220. package/dist/fortran-free-form-Cs4ztolN.js +1 -0
  221. package/dist/fortran-free-form-CwqYvCLJ.mjs +6 -0
  222. package/dist/fsharp-C8GKou_e.js +1 -0
  223. package/dist/fsharp-DlcX35ZM.mjs +8 -0
  224. package/dist/ganttDiagram-JELNMOA3-Bk-dX6qT.mjs +2662 -0
  225. package/dist/ganttDiagram-JELNMOA3-D7rI7u8B.js +267 -0
  226. package/dist/gdresource-Bx-5U3z2.js +1 -0
  227. package/dist/gdresource-CyVuoaDS.mjs +10 -0
  228. package/dist/gdscript-BifyeYhI.mjs +6 -0
  229. package/dist/gdscript-DSegQKMB.js +1 -0
  230. package/dist/gdshader-Bk8fF6yr.mjs +6 -0
  231. package/dist/gdshader-DsmqQl4t.js +1 -0
  232. package/dist/genie-Dy2rU8CF.js +1 -0
  233. package/dist/genie-DzUvd7U9.mjs +6 -0
  234. package/dist/gherkin-BmiEVBJ1.js +1 -0
  235. package/dist/gherkin-DHRaV0YP.mjs +6 -0
  236. package/dist/git-commit-B0NDtut1.js +1 -0
  237. package/dist/git-commit-MKnTTyU-.mjs +8 -0
  238. package/dist/git-rebase-CMl42lXc.mjs +8 -0
  239. package/dist/git-rebase-lJEbayNx.js +1 -0
  240. package/dist/gitGraph-F6HP7TQM-CsdwxYUE.mjs +5 -0
  241. package/dist/gitGraph-F6HP7TQM-DvIgo2TM.js +1 -0
  242. package/dist/gitGraphDiagram-NY62KEGX-BDTsbSkO.mjs +712 -0
  243. package/dist/gitGraphDiagram-NY62KEGX-IQ8KriUw.js +65 -0
  244. package/dist/github-dark-BKL9xNgN.js +1 -0
  245. package/dist/github-dark-DenFmJkN.mjs +4 -0
  246. package/dist/github-dark-default-BJPUVz4H.mjs +4 -0
  247. package/dist/github-dark-default-Dsv5MuSi.js +1 -0
  248. package/dist/github-dark-dimmed-CtB9hz8U.js +1 -0
  249. package/dist/github-dark-dimmed-DUshB20C.mjs +4 -0
  250. package/dist/github-dark-high-contrast-BqZVM-jF.js +1 -0
  251. package/dist/github-dark-high-contrast-D3aGCnF8.mjs +4 -0
  252. package/dist/github-light-BFTOhCbz.js +1 -0
  253. package/dist/github-light-JYsPkUQd.mjs +4 -0
  254. package/dist/github-light-default-BZoWH9dH.js +1 -0
  255. package/dist/github-light-default-D99KPAby.mjs +4 -0
  256. package/dist/github-light-high-contrast-BbmZE-Mp.mjs +4 -0
  257. package/dist/github-light-high-contrast-Ks3kPGJU.js +1 -0
  258. package/dist/gleam-Bv284lvN.mjs +6 -0
  259. package/dist/gleam-DHVuTCr7.js +1 -0
  260. package/dist/glimmer-js-C360zq_P.mjs +14 -0
  261. package/dist/glimmer-js-CxLlFUHs.js +1 -0
  262. package/dist/glimmer-ts-C8Spe63v.js +1 -0
  263. package/dist/glimmer-ts-CfTSEFGl.mjs +14 -0
  264. package/dist/glsl-BcHRsW10.js +1 -0
  265. package/dist/glsl-CwleMY6T.mjs +8 -0
  266. package/dist/gn-0WGnAyGi.js +1 -0
  267. package/dist/gn-XtJxiLa4.mjs +6 -0
  268. package/dist/gnuplot-CDPKvI9X.js +1 -0
  269. package/dist/gnuplot-yPG9-sE_.mjs +6 -0
  270. package/dist/go-ChxJuLYK.mjs +6 -0
  271. package/dist/go-epHseFUa.js +1 -0
  272. package/dist/graph-BNpx6ebg.js +1 -0
  273. package/dist/graph-C_T4ZBuC.mjs +381 -0
  274. package/dist/graphql-BO3Jc_L3.js +1 -0
  275. package/dist/graphql-C2GhtI7U.mjs +14 -0
  276. package/dist/groovy-CJQTphOW.mjs +6 -0
  277. package/dist/groovy-D7VuDBXz.js +1 -0
  278. package/dist/gruvbox-dark-hard-C5HOtKIh.mjs +4 -0
  279. package/dist/gruvbox-dark-hard-CUGefKS6.js +1 -0
  280. package/dist/gruvbox-dark-medium-BoKPlKfz.js +1 -0
  281. package/dist/gruvbox-dark-medium-FVgwJHuz.mjs +4 -0
  282. package/dist/gruvbox-dark-soft-B46F314v.mjs +4 -0
  283. package/dist/gruvbox-dark-soft-DSrhOWeL.js +1 -0
  284. package/dist/gruvbox-light-hard-CJD38wDZ.mjs +4 -0
  285. package/dist/gruvbox-light-hard-De4IuseP.js +1 -0
  286. package/dist/gruvbox-light-medium-BlIhMYTA.mjs +4 -0
  287. package/dist/gruvbox-light-medium-CzMY3IEJ.js +1 -0
  288. package/dist/gruvbox-light-soft-DoPHyLVZ.mjs +4 -0
  289. package/dist/gruvbox-light-soft-U4iAIpWZ.js +1 -0
  290. package/dist/hack-CdSL77Ey.mjs +10 -0
  291. package/dist/hack-Dr4YFULU.js +1 -0
  292. package/dist/haml-C1VBSiBb.mjs +10 -0
  293. package/dist/haml-DjC-8E5i.js +1 -0
  294. package/dist/handlebars-oLCVaT_d.mjs +14 -0
  295. package/dist/handlebars-vZrL3oRU.js +1 -0
  296. package/dist/haskell-BShesV2P.js +1 -0
  297. package/dist/haskell-WeIwNIP6.mjs +6 -0
  298. package/dist/haxe-Bo5XuRS0.js +1 -0
  299. package/dist/haxe-TztHsm5T.mjs +6 -0
  300. package/dist/hcl-CrZnvm-1.js +1 -0
  301. package/dist/hcl-D438OF-I.mjs +6 -0
  302. package/dist/hjson-CEESwTUP.js +1 -0
  303. package/dist/hjson-DYBUbqOl.mjs +6 -0
  304. package/dist/hlsl-Bk8TCZNL.mjs +6 -0
  305. package/dist/hlsl-CyvYRIb9.js +1 -0
  306. package/dist/hooks/useBlockState.d.ts +14 -0
  307. package/dist/hooks/useDiffReview.d.ts +26 -0
  308. package/dist/hooks/useMarkdownShortcuts.d.ts +23 -0
  309. package/dist/hooks/useStreamParser.d.ts +10 -0
  310. package/dist/houston-BDYrDoDW.mjs +4 -0
  311. package/dist/houston-T57H3gQZ.js +1 -0
  312. package/dist/html-Cub4lUvx.js +1 -0
  313. package/dist/html-DyXkxE0I.mjs +10 -0
  314. package/dist/html-derivative-BFG_GIVT.mjs +8 -0
  315. package/dist/html-derivative-DbGZSkO4.js +1 -0
  316. package/dist/http-J4eraUTU.js +1 -0
  317. package/dist/http-Xl8ey4Mx.mjs +14 -0
  318. package/dist/hurl-1DL8OH_r.js +1 -0
  319. package/dist/hurl-BP6fZ4DX.mjs +12 -0
  320. package/dist/hxml-DrnMPCCd.js +1 -0
  321. package/dist/hxml-L6NLEKuJ.mjs +8 -0
  322. package/dist/hy-Brt5EZ7-.mjs +6 -0
  323. package/dist/hy-a1E2Ed6P.js +1 -0
  324. package/dist/imba-CR1Q6r17.js +1 -0
  325. package/dist/imba-CimUv-Uh.mjs +6 -0
  326. package/dist/index-CkYZRBYn.js +676 -0
  327. package/dist/index-oe4HpmeG.mjs +58831 -0
  328. package/dist/index.d.ts +11 -0
  329. package/dist/index.js +1 -0
  330. package/dist/index.mjs +37 -0
  331. package/dist/info-NVLQJR56-B5gDnSIT.mjs +5 -0
  332. package/dist/info-NVLQJR56-BwFQRguW.js +1 -0
  333. package/dist/infoDiagram-WHAUD3N6-C-gzsm95.mjs +24 -0
  334. package/dist/infoDiagram-WHAUD3N6-CCb5k_S7.js +2 -0
  335. package/dist/ini-BZIuRIvJ.mjs +6 -0
  336. package/dist/ini-Dpu3Xy2p.js +1 -0
  337. package/dist/init-CHZsXQcr.js +1 -0
  338. package/dist/init-DjUOC4st.mjs +16 -0
  339. package/dist/java--6gf61wy.js +1 -0
  340. package/dist/java-DY6VlHhP.mjs +6 -0
  341. package/dist/javascript-C25yR2R2.mjs +6 -0
  342. package/dist/javascript-DgmXW4Ha.js +1 -0
  343. package/dist/jinja-CJxRwHVK.js +1 -0
  344. package/dist/jinja-Y2BGSZfx.mjs +11 -0
  345. package/dist/jison-CH6PZfPk.js +1 -0
  346. package/dist/jison-Dpv9Qnty.mjs +8 -0
  347. package/dist/journeyDiagram-XKPGCS4Q-DzkUL_YG.mjs +836 -0
  348. package/dist/journeyDiagram-XKPGCS4Q-POnSekz9.js +139 -0
  349. package/dist/json-DxJze_jm.mjs +6 -0
  350. package/dist/json-YkPizm35.js +1 -0
  351. package/dist/json5-BT4Fjg39.mjs +6 -0
  352. package/dist/json5-CCgFZiQn.js +1 -0
  353. package/dist/jsonc-CHjZD8gR.mjs +6 -0
  354. package/dist/jsonc-CKPHIcXW.js +1 -0
  355. package/dist/jsonl-BGuvDmy9.mjs +6 -0
  356. package/dist/jsonl-Dq56Hab-.js +1 -0
  357. package/dist/jsonnet-Bx2cfsXg.mjs +6 -0
  358. package/dist/jsonnet-Csh7E68F.js +1 -0
  359. package/dist/jssm-BcADi6EI.mjs +6 -0
  360. package/dist/jssm-D0M9iZPY.js +1 -0
  361. package/dist/jsx-BtKADgXT.mjs +6 -0
  362. package/dist/jsx-DLX6UGgg.js +1 -0
  363. package/dist/julia-DOO7NZhy.js +1 -0
  364. package/dist/julia-QwvTXUPU.mjs +16 -0
  365. package/dist/kanagawa-dragon-BJZF7xDr.js +1 -0
  366. package/dist/kanagawa-dragon-CiKur4Hl.mjs +4 -0
  367. package/dist/kanagawa-lotus-BKu-smKu.mjs +4 -0
  368. package/dist/kanagawa-lotus-BhgzmRV4.js +1 -0
  369. package/dist/kanagawa-wave-BgJip59C.js +1 -0
  370. package/dist/kanagawa-wave-CQwozSzG.mjs +4 -0
  371. package/dist/kanban-definition-3W4ZIXB7-BPr0_7wG.mjs +720 -0
  372. package/dist/kanban-definition-3W4ZIXB7-Bm064qrf.js +89 -0
  373. package/dist/kdl-BNOv9TC3.mjs +6 -0
  374. package/dist/kdl-CDG1p2Qi.js +1 -0
  375. package/dist/kotlin-BHZjvNqT.js +1 -0
  376. package/dist/kotlin-ByBMgTeR.mjs +6 -0
  377. package/dist/kusto-C6kOQWT0.js +1 -0
  378. package/dist/kusto-DH_XitHS.mjs +6 -0
  379. package/dist/laserwave--izBLY1I.js +1 -0
  380. package/dist/laserwave-6a00oqik.mjs +4 -0
  381. package/dist/latex-BkUAME40.js +1 -0
  382. package/dist/latex-Dhl9FnIw.mjs +8 -0
  383. package/dist/layout-Cd98WJ7r.mjs +1441 -0
  384. package/dist/layout-CuWQnP5Y.js +1 -0
  385. package/dist/lean-BnVxaZxY.mjs +6 -0
  386. package/dist/lean-DvVQmxVK.js +1 -0
  387. package/dist/less-B1GLI2Di.mjs +6 -0
  388. package/dist/less-Dtg8mm6P.js +1 -0
  389. package/dist/light-plus-B5D0le0o.js +1 -0
  390. package/dist/light-plus-CZuVqSLX.mjs +4 -0
  391. package/dist/linear-DFDw13y6.js +1 -0
  392. package/dist/linear-SU4e8MRt.mjs +259 -0
  393. package/dist/liquid-D2h0MxA-.js +1 -0
  394. package/dist/liquid-nAv19oBv.mjs +14 -0
  395. package/dist/llvm-DcRvQ_r8.js +1 -0
  396. package/dist/llvm-co1rIKs3.mjs +6 -0
  397. package/dist/log-Al8wyEFV.mjs +6 -0
  398. package/dist/log-CjTZ0gSB.js +1 -0
  399. package/dist/logo-BAktp_5i.js +1 -0
  400. package/dist/logo-DBa4JDzV.mjs +6 -0
  401. package/dist/lua-7_7huFMq.js +1 -0
  402. package/dist/lua-CG3yDRXR.mjs +8 -0
  403. package/dist/luau-BMXmwtw0.js +1 -0
  404. package/dist/luau-UQyhudEE.mjs +6 -0
  405. package/dist/make-CsMclxtr.mjs +6 -0
  406. package/dist/make-NcdIe21U.js +1 -0
  407. package/dist/markdown-Byu9Sdmq.js +1 -0
  408. package/dist/markdown-CrScaQ96.mjs +6 -0
  409. package/dist/marko-BUUK5Bjn.js +1 -0
  410. package/dist/marko-BkS1PqTg.mjs +14 -0
  411. package/dist/material-theme-D6KBX41T.mjs +4 -0
  412. package/dist/material-theme-Dj0-OyRN.js +1 -0
  413. package/dist/material-theme-darker-CkRroheE.mjs +4 -0
  414. package/dist/material-theme-darker-Dvfs29ir.js +1 -0
  415. package/dist/material-theme-lighter-BUBw43Yz.mjs +4 -0
  416. package/dist/material-theme-lighter-EU3ZGl_r.js +1 -0
  417. package/dist/material-theme-ocean-ClGX14Ja.mjs +4 -0
  418. package/dist/material-theme-ocean-px_3Pwqa.js +1 -0
  419. package/dist/material-theme-palenight-38jxvsGX.js +1 -0
  420. package/dist/material-theme-palenight-C1RVm8K1.mjs +4 -0
  421. package/dist/matlab-BOAaUVP0.mjs +6 -0
  422. package/dist/matlab-CHTOL9Kx.js +1 -0
  423. package/dist/mdc-DYb1IR0A.js +1 -0
  424. package/dist/mdc-DjkQ6W2y.mjs +12 -0
  425. package/dist/mdx-BOhZZUJ8.mjs +6 -0
  426. package/dist/mdx-CjwI68TB.js +1 -0
  427. package/dist/mermaid-4DMBBIKO-BihEtyib.js +1 -0
  428. package/dist/mermaid-4DMBBIKO-DDxvQcE9.mjs +4 -0
  429. package/dist/mermaid-BXSwQYo5.js +1 -0
  430. package/dist/mermaid-C3rz4dYh.mjs +6 -0
  431. package/dist/mermaid-parser.core-BHAgLMGa.js +128 -0
  432. package/dist/mermaid-parser.core-C8Sxzqul.mjs +15138 -0
  433. package/dist/min-C2k771MZ.mjs +38 -0
  434. package/dist/min-CppMRDFn.js +1 -0
  435. package/dist/min-dark-C7ak0t6c.mjs +4 -0
  436. package/dist/min-dark-tt5o_I5e.js +1 -0
  437. package/dist/min-light-CKFxVcPp.mjs +4 -0
  438. package/dist/min-light-tmTHl_CQ.js +1 -0
  439. package/dist/mindmap-definition-VGOIOE7T-BUd354uH.mjs +786 -0
  440. package/dist/mindmap-definition-VGOIOE7T-CV7bD4HY.js +68 -0
  441. package/dist/mipsasm-BSlRcFIy.js +1 -0
  442. package/dist/mipsasm-CTx18fBl.mjs +6 -0
  443. package/dist/mojo-CgKe2b8g.mjs +6 -0
  444. package/dist/mojo-D2tXKFxS.js +1 -0
  445. package/dist/monokai-C1KBYcO0.mjs +4 -0
  446. package/dist/monokai-DMIxv6MM.js +1 -0
  447. package/dist/moonbit-BweIWWUc.js +1 -0
  448. package/dist/moonbit-NVPuhMCm.mjs +6 -0
  449. package/dist/move-Bm1vlCWg.js +1 -0
  450. package/dist/move-F-dICmj2.mjs +6 -0
  451. package/dist/narrat-CBeKHgTl.js +1 -0
  452. package/dist/narrat-DmhDCBs-.mjs +6 -0
  453. package/dist/nextflow-CM8Ed358.js +1 -0
  454. package/dist/nextflow-DmSVRGjG.mjs +6 -0
  455. package/dist/nginx-Cy_SAdKw.mjs +8 -0
  456. package/dist/nginx-F8v4LkHE.js +1 -0
  457. package/dist/night-owl-BN78kThQ.js +1 -0
  458. package/dist/night-owl-Bm2rzalh.mjs +4 -0
  459. package/dist/nim-B4StNpZz.mjs +20 -0
  460. package/dist/nim-Bz82v_0I.js +1 -0
  461. package/dist/nix-BOiBJUDf.js +1 -0
  462. package/dist/nix-fTRXMGic.mjs +9 -0
  463. package/dist/nord-CC5OiUXg.mjs +4 -0
  464. package/dist/nord-Ca5AGUWc.js +1 -0
  465. package/dist/nushell-D8j3dhT-.mjs +6 -0
  466. package/dist/nushell-nGrB_wpI.js +1 -0
  467. package/dist/objective-c-Itk8tzmv.mjs +6 -0
  468. package/dist/objective-c-RjkWwFge.js +1 -0
  469. package/dist/objective-cpp-DGt5UKRO.mjs +6 -0
  470. package/dist/objective-cpp-HnfhWwRe.js +1 -0
  471. package/dist/ocaml-Cx8ewW_A.js +1 -0
  472. package/dist/ocaml-eSVK32Eg.mjs +6 -0
  473. package/dist/one-dark-pro-C09VQHwB.js +1 -0
  474. package/dist/one-dark-pro-DTA3VF0_.mjs +4 -0
  475. package/dist/one-light-020-h_lv.js +1 -0
  476. package/dist/one-light-D9sNaUtq.mjs +4 -0
  477. package/dist/openscad-D7eUrVPv.js +1 -0
  478. package/dist/openscad-Sp5uZ6f2.mjs +6 -0
  479. package/dist/ordinal-C0oynhte.mjs +61 -0
  480. package/dist/ordinal-CPpcdEvZ.js +1 -0
  481. package/dist/packet-BFZMPI3H-CFx3kSkL.js +1 -0
  482. package/dist/packet-BFZMPI3H-Cz_A86d3.mjs +5 -0
  483. package/dist/pascal-DBu9vQ2o.js +1 -0
  484. package/dist/pascal-xy8pJNns.mjs +6 -0
  485. package/dist/perl-BGWXz6Sf.js +1 -0
  486. package/dist/perl-BHbGvfXZ.mjs +16 -0
  487. package/dist/php-B7ztg6tr.mjs +18 -0
  488. package/dist/php-BMqBbP55.js +1 -0
  489. package/dist/pie-7BOR55EZ-B0-atE_o.mjs +5 -0
  490. package/dist/pie-7BOR55EZ-_1MqisBd.js +1 -0
  491. package/dist/pieDiagram-ADFJNKIX-Bg0_gu43.js +30 -0
  492. package/dist/pieDiagram-ADFJNKIX-lRs_rpwI.mjs +161 -0
  493. package/dist/pkl-C-zSNmaA.mjs +6 -0
  494. package/dist/pkl-Dvyry4Rm.js +1 -0
  495. package/dist/plastic-CSTz3KZp.mjs +4 -0
  496. package/dist/plastic-r5piqq-S.js +1 -0
  497. package/dist/plsql-IJkoPJ9P.js +1 -0
  498. package/dist/plsql-pVbGZfOv.mjs +6 -0
  499. package/dist/po-BNfHvqmm.mjs +6 -0
  500. package/dist/po-Rhu6MvnX.js +1 -0
  501. package/dist/poimandres-BLP3NNjc.js +1 -0
  502. package/dist/poimandres-C-VADXHD.mjs +4 -0
  503. package/dist/polar-BtWqSUq2.js +1 -0
  504. package/dist/polar-CAZahv3u.mjs +6 -0
  505. package/dist/postcss-05aHdL-n.mjs +6 -0
  506. package/dist/postcss-Dh97DcaJ.js +1 -0
  507. package/dist/powerquery-BGL6VIw7.js +1 -0
  508. package/dist/powerquery-DI9HkTvs.mjs +6 -0
  509. package/dist/powershell-BiEPMjy-.js +1 -0
  510. package/dist/powershell-Clc4ydu-.mjs +6 -0
  511. package/dist/prisma-Dp473sn0.js +1 -0
  512. package/dist/prisma-FZjmVtSl.mjs +6 -0
  513. package/dist/prolog-C5-yg4TO.mjs +6 -0
  514. package/dist/prolog-N1U-3UeF.js +1 -0
  515. package/dist/proto-C7QgialS.mjs +6 -0
  516. package/dist/proto-DMjUErYA.js +1 -0
  517. package/dist/pug-I1IOsXt4.mjs +12 -0
  518. package/dist/pug-bTUJx3Z-.js +1 -0
  519. package/dist/puppet-CUJHmnxV.mjs +6 -0
  520. package/dist/puppet-cDQP_ZC_.js +1 -0
  521. package/dist/purescript-DMxb59gF.js +1 -0
  522. package/dist/purescript-rUfGld-4.mjs +6 -0
  523. package/dist/python-BFNSHbwJ.mjs +6 -0
  524. package/dist/python-s9jfVbew.js +1 -0
  525. package/dist/qml-BxN9rt5O.mjs +8 -0
  526. package/dist/qml-CDzfIfOz.js +1 -0
  527. package/dist/qmldir-BInDYbpo.mjs +6 -0
  528. package/dist/qmldir-DNF9H2ir.js +1 -0
  529. package/dist/qss-AeJTysr_.mjs +6 -0
  530. package/dist/qss-DwA_oiAM.js +1 -0
  531. package/dist/quadrantDiagram-AYHSOK5B-B4gVakRV.js +7 -0
  532. package/dist/quadrantDiagram-AYHSOK5B-D9kypJt6.mjs +1024 -0
  533. package/dist/r-CSmzDPi7.mjs +6 -0
  534. package/dist/r-DAqIyZhh.js +1 -0
  535. package/dist/racket-B83wSAja.mjs +6 -0
  536. package/dist/racket-D4laxZit.js +1 -0
  537. package/dist/radar-NHE76QYJ-B-PvZD0K.mjs +5 -0
  538. package/dist/radar-NHE76QYJ-CdtC4C8F.js +1 -0
  539. package/dist/raku-DHySPsLw.js +1 -0
  540. package/dist/raku-nEQ4ZJJ7.mjs +6 -0
  541. package/dist/razor-BW3hho9N.mjs +10 -0
  542. package/dist/razor-DqXh8oK-.js +1 -0
  543. package/dist/red-7y8PH7HH.mjs +4 -0
  544. package/dist/red-BQGOv1D5.js +1 -0
  545. package/dist/reg-CevkCKuZ.js +1 -0
  546. package/dist/reg-m_s_Kiip.mjs +6 -0
  547. package/dist/regexp-BazyLpPg.mjs +6 -0
  548. package/dist/regexp-DabTWNLE.js +1 -0
  549. package/dist/rel-BS5APza7.js +1 -0
  550. package/dist/rel-BcRfyd6Q.mjs +6 -0
  551. package/dist/requirementDiagram-UZGBJVZJ-0zMPj-SD.js +64 -0
  552. package/dist/requirementDiagram-UZGBJVZJ-B5ulaHjE.mjs +852 -0
  553. package/dist/riscv-BnGFr6V7.js +1 -0
  554. package/dist/riscv-Ce8MAQLP.mjs +6 -0
  555. package/dist/rose-pine-BKc3yVeu.mjs +4 -0
  556. package/dist/rose-pine-CfBWm6WX.js +1 -0
  557. package/dist/rose-pine-dawn-BulJcPZT.mjs +4 -0
  558. package/dist/rose-pine-dawn-CaZ5I2lt.js +1 -0
  559. package/dist/rose-pine-moon-Cql8LDLp.js +1 -0
  560. package/dist/rose-pine-moon-j6jiXKV8.mjs +4 -0
  561. package/dist/rosmsg-C7VSFzUC.js +1 -0
  562. package/dist/rosmsg-Cz0w1km8.mjs +6 -0
  563. package/dist/rst-CmsHU1oq.js +1 -0
  564. package/dist/rst-Don6TZad.mjs +22 -0
  565. package/dist/ruby-DZp7Kthb.js +1 -0
  566. package/dist/ruby-DkElldd8.mjs +30 -0
  567. package/dist/rust-CLzF9zIN.mjs +6 -0
  568. package/dist/rust-CNeTMPbB.js +1 -0
  569. package/dist/sankeyDiagram-TZEHDZUN-Cl8-L83T.js +10 -0
  570. package/dist/sankeyDiagram-TZEHDZUN-DprIPFbe.mjs +810 -0
  571. package/dist/sas-Dgv5I5OF.mjs +8 -0
  572. package/dist/sas-Du-NqkIN.js +1 -0
  573. package/dist/sass-DxHp5rTx.mjs +6 -0
  574. package/dist/sass-vyo-bUwh.js +1 -0
  575. package/dist/scala-D4grkFkl.mjs +6 -0
  576. package/dist/scala-ZSekD-8-.js +1 -0
  577. package/dist/scheme-BCRWuEm4.mjs +6 -0
  578. package/dist/scheme-vM0LdD-_.js +1 -0
  579. package/dist/scss-C9Hu3bmX.js +1 -0
  580. package/dist/scss-DGhQJWhB.mjs +8 -0
  581. package/dist/sdbl-B7T8abf4.mjs +6 -0
  582. package/dist/sdbl-DeWT5r4i.js +1 -0
  583. package/dist/sequenceDiagram-WL72ISMW-B4m4oag0.mjs +2518 -0
  584. package/dist/sequenceDiagram-WL72ISMW-DRQn7Fe4.js +145 -0
  585. package/dist/shaderlab-DFNHwaQA.js +1 -0
  586. package/dist/shaderlab-D_9jCtR2.mjs +8 -0
  587. package/dist/shellscript-DYWjN7qW.js +1 -0
  588. package/dist/shellscript-InADTalH.mjs +6 -0
  589. package/dist/shellsession-5qZnCWz3.js +1 -0
  590. package/dist/shellsession-DtcyY-Wh.mjs +8 -0
  591. package/dist/slack-dark-akqwQ7ED.js +1 -0
  592. package/dist/slack-dark-i7wN4OET.mjs +4 -0
  593. package/dist/slack-ochin-BoQQWmTv.js +1 -0
  594. package/dist/slack-ochin-ndHf0LoP.mjs +4 -0
  595. package/dist/smalltalk-BNs6hxu4.js +1 -0
  596. package/dist/smalltalk-BlI1_OkM.mjs +6 -0
  597. package/dist/snazzy-light-BlSJXAu4.mjs +4 -0
  598. package/dist/snazzy-light-D_IwRieF.js +1 -0
  599. package/dist/solarized-dark-UTmkh7lw.mjs +4 -0
  600. package/dist/solarized-dark-gmm-WbDC.js +1 -0
  601. package/dist/solarized-light-BheCkDPT.mjs +4 -0
  602. package/dist/solarized-light-DzcxRSZP.js +1 -0
  603. package/dist/solidity-DUWnFhS6.mjs +6 -0
  604. package/dist/solidity-uQuzgchP.js +1 -0
  605. package/dist/soy-BztBK6ie.js +1 -0
  606. package/dist/soy-DwpxgXXf.mjs +8 -0
  607. package/dist/sparql-B6tDvEgg.mjs +8 -0
  608. package/dist/sparql-Ds57h-sT.js +1 -0
  609. package/dist/splunk-CRXR8A9s.mjs +6 -0
  610. package/dist/splunk-CWPivao_.js +1 -0
  611. package/dist/sql-Cn_v3PB0.mjs +6 -0
  612. package/dist/sql-DhUUVgH1.js +1 -0
  613. package/dist/ssh-config-B93wBIBa.js +1 -0
  614. package/dist/ssh-config-DP-hNVbF.mjs +6 -0
  615. package/dist/stata-B-erP_01.js +1 -0
  616. package/dist/stata-CuK25SjT.mjs +8 -0
  617. package/dist/stateDiagram-FKZM4ZOC-BD4tnS-V.js +1 -0
  618. package/dist/stateDiagram-FKZM4ZOC-DjkdDbQ2.mjs +263 -0
  619. package/dist/stateDiagram-v2-4FDKWEC3-AK86F3i6.mjs +16 -0
  620. package/dist/stateDiagram-v2-4FDKWEC3-sybMoxOk.js +1 -0
  621. package/dist/stylus-B64Bt0D4.js +1 -0
  622. package/dist/stylus-CyKEU1Ej.mjs +6 -0
  623. package/dist/svelte-CPZ3YGr5.js +1 -0
  624. package/dist/svelte-DA_HkuHw.mjs +14 -0
  625. package/dist/swift-9UzSvamq.mjs +6 -0
  626. package/dist/swift-BMbGdc3j.js +1 -0
  627. package/dist/synthwave-84-BBRLOmNT.js +1 -0
  628. package/dist/synthwave-84-NU3C_KFZ.mjs +4 -0
  629. package/dist/system-verilog-BCm7smPJ.mjs +6 -0
  630. package/dist/system-verilog-BFclLo9e.js +1 -0
  631. package/dist/systemd-C-4qm6XH.mjs +6 -0
  632. package/dist/systemd-Dtw7P4tb.js +1 -0
  633. package/dist/talonscript-CFF3LF_O.mjs +6 -0
  634. package/dist/talonscript-D8SvZJVc.js +1 -0
  635. package/dist/tasl--DC4oX-L.js +1 -0
  636. package/dist/tasl-Cg_WBUAe.mjs +6 -0
  637. package/dist/tcl-0Q0H86Yn.js +1 -0
  638. package/dist/tcl-DN7buRTF.mjs +6 -0
  639. package/dist/templ-DADdpFDY.js +1 -0
  640. package/dist/templ-YBaeMuI7.mjs +12 -0
  641. package/dist/terraform-C0RDrmWi.js +1 -0
  642. package/dist/terraform-DGvcn9zM.mjs +6 -0
  643. package/dist/tex-3QW4GAT7.js +1 -0
  644. package/dist/tex-4CAOFrzL.mjs +8 -0
  645. package/dist/timeline-definition-IT6M3QCI-2X4dfyLj.js +61 -0
  646. package/dist/timeline-definition-IT6M3QCI-BFuQEeZP.mjs +801 -0
  647. package/dist/tokyo-night-DP4TmcQl.mjs +4 -0
  648. package/dist/tokyo-night-GOhjzM5y.js +1 -0
  649. package/dist/toml-DY62mUL_.mjs +6 -0
  650. package/dist/toml-Q64DoSvG.js +1 -0
  651. package/dist/treemap-KMMF4GRG-DTnRa789.js +1 -0
  652. package/dist/treemap-KMMF4GRG-gtrnY16v.mjs +5 -0
  653. package/dist/ts-tags-DAIOErdC.mjs +41 -0
  654. package/dist/ts-tags-DW4c6MY1.js +1 -0
  655. package/dist/tsv-BtvSkaG0.mjs +6 -0
  656. package/dist/tsv-DqNGnuVj.js +1 -0
  657. package/dist/tsx-B8rCNbgL.mjs +6 -0
  658. package/dist/tsx-DIpfUf9u.js +1 -0
  659. package/dist/turtle-DipIidr5.js +1 -0
  660. package/dist/turtle-_H59FV7D.mjs +6 -0
  661. package/dist/twig-CkOV7KOv.mjs +18 -0
  662. package/dist/twig-DE2P6STQ.js +1 -0
  663. package/dist/types/index.d.ts +163 -0
  664. package/dist/typescript-RycA9KXf.mjs +6 -0
  665. package/dist/typescript-b48wo4zk.js +1 -0
  666. package/dist/typespec-DWqp-kUU.mjs +6 -0
  667. package/dist/typespec-DqXOE4_L.js +1 -0
  668. package/dist/typst-Cqq4j4V-.js +1 -0
  669. package/dist/typst-D_1QKWns.mjs +6 -0
  670. package/dist/utils/cursor-utils.d.ts +28 -0
  671. package/dist/utils/diff.d.ts +74 -0
  672. package/dist/utils/format-selection.d.ts +8 -0
  673. package/dist/utils/markdown-parser.d.ts +3 -0
  674. package/dist/utils/span-dom.d.ts +21 -0
  675. package/dist/utils/spans.d.ts +18 -0
  676. package/dist/v-81C2s01-.js +1 -0
  677. package/dist/v-BPCNiyYe.mjs +6 -0
  678. package/dist/vala-CsAYdCD2.js +1 -0
  679. package/dist/vala-uxaPR7d1.mjs +6 -0
  680. package/dist/vb-AiTMb16X.js +1 -0
  681. package/dist/vb-D8_c5-KN.mjs +6 -0
  682. package/dist/verilog-AMohXZcN.js +1 -0
  683. package/dist/verilog-B-bybjPF.mjs +6 -0
  684. package/dist/vesper-B59Iw4gV.js +1 -0
  685. package/dist/vesper-BckBta1U.mjs +4 -0
  686. package/dist/vhdl-CUlNa8ac.mjs +6 -0
  687. package/dist/vhdl-DIdR1NA5.js +1 -0
  688. package/dist/viml-D01eKeA4.js +1 -0
  689. package/dist/viml-DsfA-sWm.mjs +6 -0
  690. package/dist/vitesse-black-BoGvW84i.mjs +4 -0
  691. package/dist/vitesse-black-MF-1S1MG.js +1 -0
  692. package/dist/vitesse-dark-Cym-eLtO.mjs +4 -0
  693. package/dist/vitesse-dark-SIffJYSe.js +1 -0
  694. package/dist/vitesse-light-CcmG315c.mjs +4 -0
  695. package/dist/vitesse-light-U63SkYGT.js +1 -0
  696. package/dist/vue-BHXwUkEL.js +1 -0
  697. package/dist/vue-Qp02Uakc.mjs +31 -0
  698. package/dist/vue-html-B4znhqmy.js +1 -0
  699. package/dist/vue-html-Cg0YpUCP.mjs +8 -0
  700. package/dist/vue-vine-CHNjSzYC.js +1 -0
  701. package/dist/vue-vine-PHeyj-D9.mjs +18 -0
  702. package/dist/vyper-CPQuu50u.mjs +6 -0
  703. package/dist/vyper-DTzyzn3a.js +1 -0
  704. package/dist/wasm-BBXxrAl7.mjs +6 -0
  705. package/dist/wasm-DQxwEHae.mjs +7 -0
  706. package/dist/wasm-Dp-QrJpp.js +1 -0
  707. package/dist/wasm-Dw4u1m6u.js +1 -0
  708. package/dist/wenyan-CRNx8UP3.js +1 -0
  709. package/dist/wenyan-pbVjoM9_.mjs +6 -0
  710. package/dist/wgsl-DF5qc9dd.js +1 -0
  711. package/dist/wgsl-DY4iK1q1.mjs +6 -0
  712. package/dist/wikitext-D7uzEIfK.js +1 -0
  713. package/dist/wikitext-Z-MoUasO.mjs +6 -0
  714. package/dist/wit-BjWgLsJj.js +1 -0
  715. package/dist/wit-CQMQOlTg.mjs +6 -0
  716. package/dist/wolfram-BR4t3Ffc.js +1 -0
  717. package/dist/wolfram-Dz4KXISs.mjs +6 -0
  718. package/dist/xml-Dwj6NfjK.mjs +8 -0
  719. package/dist/xml-Vhl3ZuN2.js +1 -0
  720. package/dist/xsl-B2ZJiKs2.js +1 -0
  721. package/dist/xsl-Pe9theme.mjs +8 -0
  722. package/dist/xychartDiagram-PRI3JC2R-BaFd1In8.js +7 -0
  723. package/dist/xychartDiagram-PRI3JC2R-CjXiy6m0.mjs +1340 -0
  724. package/dist/yaml-DaO7k5B1.mjs +6 -0
  725. package/dist/yaml-XVBmpKh-.js +1 -0
  726. package/dist/zenscript-CxBjpf9c.mjs +6 -0
  727. package/dist/zenscript-fNvwKexi.js +1 -0
  728. package/dist/zig-BAyIAcWK.js +1 -0
  729. package/dist/zig-Vm0PO9wB.mjs +6 -0
  730. package/package.json +73 -0
@@ -0,0 +1,676 @@
1
+ "use strict";var z_=Object.defineProperty;var H_=(t,e,r)=>e in t?z_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var te=(t,e,r)=>H_(t,typeof e!="symbol"?e+"":e,r);const S=require("react/jsx-runtime"),F=require("react"),q_="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Di=(t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=q_[r[t]&63];return e};const mc=function(t){if(t==null)return G_;if(typeof t=="function")return Q0(t);if(typeof t=="object")return Array.isArray(t)?j_(t):U_(t);if(typeof t=="string")return W_(t);throw new Error("Expected function, string, or object as test")};function j_(t){const e=[];let r=-1;for(;++r<t.length;)e[r]=mc(t[r]);return Q0(n);function n(...i){let a=-1;for(;++a<e.length;)if(e[a].apply(this,i))return!0;return!1}}function U_(t){const e=t;return Q0(r);function r(n){const i=n;let a;for(a in t)if(i[a]!==e[a])return!1;return!0}}function W_(t){return Q0(e);function e(r){return r&&r.type===t}}function Q0(t){return e;function e(r,n,i){return!!(Y_(r)&&t.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function G_(){return!0}function Y_(t){return t!==null&&typeof t=="object"&&"type"in t}const A4=[],cl=!0,Sf=!1,zu="skip";function ym(t,e,r,n){let i;typeof e=="function"&&typeof r!="function"?(n=r,r=e):i=e;const a=mc(i),s=n?-1:1;o(t,void 0,[])();function o(l,c,u){const h=l&&typeof l=="object"?l:{};if(typeof h.type=="string"){const f=typeof h.tagName=="string"?h.tagName:typeof h.name=="string"?h.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return d;function d(){let f=A4,p,m,y;if((!e||a(l,c,u[u.length-1]||void 0))&&(f=V_(r(l,u)),f[0]===Sf))return f;if("children"in l&&l.children){const b=l;if(b.children&&f[0]!==zu)for(m=(n?b.children.length:-1)+s,y=u.concat(b);m>-1&&m<b.children.length;){const v=b.children[m];if(p=o(v,m,y)(),p[0]===Sf)return p;m=typeof p[1]=="number"?p[1]:m+s}}return f}}}function V_(t){return Array.isArray(t)?t:typeof t=="number"?[cl,t]:t==null?A4:[t]}function io(t,e,r,n){let i,a,s;typeof e=="function"&&typeof r!="function"?(a=void 0,s=e,i=r):(a=e,s=r,i=n),ym(t,a,o,i);function o(l,c){const u=c[c.length-1],h=u?u.children.indexOf(l):void 0;return s(l,h,u)}}function X_({defaultOrigin:t="",allowedLinkPrefixes:e=[],allowedImagePrefixes:r=[],allowDataImages:n=!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:s="text-gray-500"}){const o=e.length&&!e.every(c=>c==="*"),l=r.length&&!r.every(c=>c==="*");if(!t&&(o||l))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return c=>{const u=J_(t,e,r,n,i,a,s);io(c,u)}}function Xg(t,e){if(typeof t!="string")return null;try{return new URL(t)}catch{if(e)try{return new URL(t,e)}catch{return null}if(t.startsWith("/")||t.startsWith("./")||t.startsWith("../"))try{return new URL(t,"http://example.com")}catch{return null}return null}}function K_(t){return typeof t!="string"?!1:t.startsWith("/")||t.startsWith("./")||t.startsWith("../")}const Q_=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),Z_=new Set(["javascript:","data:","file:","vbscript:"]);function Kg(t,e,r,n=!1,i=!1,a=[]){if(!t)return null;if(typeof t=="string"&&t.startsWith("#")&&!i)try{if(new URL(t,"http://example.com").hash===t)return t}catch{}if(typeof t=="string"&&t.startsWith("data:"))return i&&n&&t.startsWith("data:image/")?t:null;if(typeof t=="string"&&t.startsWith("blob:")){try{if(new URL(t).protocol==="blob:"&&t.length>5){const u=t.substring(5);if(u&&u.length>0&&u!=="invalid")return t}}catch{return null}return null}const s=Xg(t,r);if(!s||Z_.has(s.protocol)||!(Q_.has(s.protocol)||a.includes(s.protocol)||a.includes("*")))return null;if(s.protocol==="mailto:"||!s.protocol.match(/^https?:$/))return s.href;const l=K_(t);return s&&e.some(c=>{const u=Xg(c,r);return!u||u.origin!==s.origin?!1:s.href.startsWith(u.href)})?l?s.pathname+s.search+s.hash:s.href:e.includes("*")?s.protocol!=="https:"&&s.protocol!=="http:"?null:l?s.pathname+s.search+s.hash:s.href:null}const od=Symbol("node-seen"),J_=(t,e,r,n,i,a,s)=>{const o=(l,c,u)=>{if(l.type!=="element"||l[od])return cl;if(l.tagName==="a"){const h=Kg(l.properties.href,e,t,!1,!1,i);return h===null?(l[od]=!0,io(l,o),u&&typeof c=="number"&&(u.children[c]={type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(l.properties.href),class:s},children:[...l.children,{type:"text",value:" [blocked]"}]}),zu):(l.properties.href=h,l.properties.target="_blank",l.properties.rel="noopener noreferrer",cl)}if(l.tagName==="img"){const h=Kg(l.properties.src,r,t,n,!0,i);return h===null?(l[od]=!0,io(l,o),u&&typeof c=="number"&&(u.children[c]={type:"element",tagName:"span",properties:{class:a},children:[{type:"text",value:"[Image blocked: "+String(l.properties.alt||"No description")+"]"}]}),zu):(l.properties.src=h,cl)}return cl};return o},N4=-1,Z0=0,Cl=1,Hu=2,xm=3,vm=4,km=5,wm=6,L4=7,M4=8,Qg=typeof self=="object"?self:globalThis,eE=(t,e)=>{const r=(i,a)=>(t.set(a,i),i),n=i=>{if(t.has(i))return t.get(i);const[a,s]=e[i];switch(a){case Z0:case N4:return r(s,i);case Cl:{const o=r([],i);for(const l of s)o.push(n(l));return o}case Hu:{const o=r({},i);for(const[l,c]of s)o[n(l)]=n(c);return o}case xm:return r(new Date(s),i);case vm:{const{source:o,flags:l}=s;return r(new RegExp(o,l),i)}case km:{const o=r(new Map,i);for(const[l,c]of s)o.set(n(l),n(c));return o}case wm:{const o=r(new Set,i);for(const l of s)o.add(n(l));return o}case L4:{const{name:o,message:l}=s;return r(new Qg[o](l),i)}case M4:return r(BigInt(s),i);case"BigInt":return r(Object(BigInt(s)),i);case"ArrayBuffer":return r(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:o}=new Uint8Array(s);return r(new DataView(o),s)}}return r(new Qg[a](s),i)};return n},Zg=t=>eE(new Map,t)(0),As="",{toString:tE}={},{keys:rE}=Object,qo=t=>{const e=typeof t;if(e!=="object"||!t)return[Z0,e];const r=tE.call(t).slice(8,-1);switch(r){case"Array":return[Cl,As];case"Object":return[Hu,As];case"Date":return[xm,As];case"RegExp":return[vm,As];case"Map":return[km,As];case"Set":return[wm,As];case"DataView":return[Cl,r]}return r.includes("Array")?[Cl,r]:r.includes("Error")?[L4,r]:[Hu,r]},Oc=([t,e])=>t===Z0&&(e==="function"||e==="symbol"),nE=(t,e,r,n)=>{const i=(s,o)=>{const l=n.push(s)-1;return r.set(o,l),l},a=s=>{if(r.has(s))return r.get(s);let[o,l]=qo(s);switch(o){case Z0:{let u=s;switch(l){case"bigint":o=M4,u=s.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([N4],s)}return i([o,u],s)}case Cl:{if(l){let d=s;return l==="DataView"?d=new Uint8Array(s.buffer):l==="ArrayBuffer"&&(d=new Uint8Array(s)),i([l,[...d]],s)}const u=[],h=i([o,u],s);for(const d of s)u.push(a(d));return h}case Hu:{if(l)switch(l){case"BigInt":return i([l,s.toString()],s);case"Boolean":case"Number":case"String":return i([l,s.valueOf()],s)}if(e&&"toJSON"in s)return a(s.toJSON());const u=[],h=i([o,u],s);for(const d of rE(s))(t||!Oc(qo(s[d])))&&u.push([a(d),a(s[d])]);return h}case xm:return i([o,s.toISOString()],s);case vm:{const{source:u,flags:h}=s;return i([o,{source:u,flags:h}],s)}case km:{const u=[],h=i([o,u],s);for(const[d,f]of s)(t||!(Oc(qo(d))||Oc(qo(f))))&&u.push([a(d),a(f)]);return h}case wm:{const u=[],h=i([o,u],s);for(const d of s)(t||!Oc(qo(d)))&&u.push(a(d));return h}}const{message:c}=s;return i([o,{name:l,message:c}],s)};return a},Jg=(t,{json:e,lossy:r}={})=>{const n=[];return nE(!(e||r),!!e,new Map,n)(t),n},ts=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?Zg(Jg(t,e)):structuredClone(t):(t,e)=>Zg(Jg(t,e));class gc{constructor(e,r,n){this.normal=r,this.property=e,n&&(this.space=n)}}gc.prototype.normal={};gc.prototype.property={};gc.prototype.space=void 0;function I4(t,e){const r={},n={};for(const i of t)Object.assign(r,i.property),Object.assign(n,i.normal);return new gc(r,n,e)}function Ul(t){return t.toLowerCase()}class un{constructor(e,r){this.attribute=r,this.property=e}}un.prototype.attribute="";un.prototype.booleanish=!1;un.prototype.boolean=!1;un.prototype.commaOrSpaceSeparated=!1;un.prototype.commaSeparated=!1;un.prototype.defined=!1;un.prototype.mustUseProperty=!1;un.prototype.number=!1;un.prototype.overloadedBoolean=!1;un.prototype.property="";un.prototype.spaceSeparated=!1;un.prototype.space=void 0;let iE=0;const dt=fs(),ir=fs(),_f=fs(),_e=fs(),zt=fs(),qs=fs(),mn=fs();function fs(){return 2**++iE}const Ef=Object.freeze(Object.defineProperty({__proto__:null,boolean:dt,booleanish:ir,commaOrSpaceSeparated:mn,commaSeparated:qs,number:_e,overloadedBoolean:_f,spaceSeparated:zt},Symbol.toStringTag,{value:"Module"})),ld=Object.keys(Ef);class Tm extends un{constructor(e,r,n,i){let a=-1;if(super(e,r),e2(this,"space",i),typeof n=="number")for(;++a<ld.length;){const s=ld[a];e2(this,ld[a],(n&Ef[s])===Ef[s])}}}Tm.prototype.defined=!0;function e2(t,e,r){r&&(t[e]=r)}function ko(t){const e={},r={};for(const[n,i]of Object.entries(t.properties)){const a=new Tm(n,t.transform(t.attributes||{},n),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(n)&&(a.mustUseProperty=!0),e[n]=a,r[Ul(n)]=n,r[Ul(a.attribute)]=n}return new gc(e,r,t.space)}const R4=ko({properties:{ariaActiveDescendant:null,ariaAtomic:ir,ariaAutoComplete:null,ariaBusy:ir,ariaChecked:ir,ariaColCount:_e,ariaColIndex:_e,ariaColSpan:_e,ariaControls:zt,ariaCurrent:null,ariaDescribedBy:zt,ariaDetails:null,ariaDisabled:ir,ariaDropEffect:zt,ariaErrorMessage:null,ariaExpanded:ir,ariaFlowTo:zt,ariaGrabbed:ir,ariaHasPopup:null,ariaHidden:ir,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:zt,ariaLevel:_e,ariaLive:null,ariaModal:ir,ariaMultiLine:ir,ariaMultiSelectable:ir,ariaOrientation:null,ariaOwns:zt,ariaPlaceholder:null,ariaPosInSet:_e,ariaPressed:ir,ariaReadOnly:ir,ariaRelevant:null,ariaRequired:ir,ariaRoleDescription:zt,ariaRowCount:_e,ariaRowIndex:_e,ariaRowSpan:_e,ariaSelected:ir,ariaSetSize:_e,ariaSort:null,ariaValueMax:_e,ariaValueMin:_e,ariaValueNow:_e,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function B4(t,e){return e in t?t[e]:e}function D4(t,e){return B4(t,e.toLowerCase())}const aE=ko({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:qs,acceptCharset:zt,accessKey:zt,action:null,allow:null,allowFullScreen:dt,allowPaymentRequest:dt,allowUserMedia:dt,alt:null,as:null,async:dt,autoCapitalize:null,autoComplete:zt,autoFocus:dt,autoPlay:dt,blocking:zt,capture:null,charSet:null,checked:dt,cite:null,className:zt,cols:_e,colSpan:null,content:null,contentEditable:ir,controls:dt,controlsList:zt,coords:_e|qs,crossOrigin:null,data:null,dateTime:null,decoding:null,default:dt,defer:dt,dir:null,dirName:null,disabled:dt,download:_f,draggable:ir,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:dt,formTarget:null,headers:zt,height:_e,hidden:_f,high:_e,href:null,hrefLang:null,htmlFor:zt,httpEquiv:zt,id:null,imageSizes:null,imageSrcSet:null,inert:dt,inputMode:null,integrity:null,is:null,isMap:dt,itemId:null,itemProp:zt,itemRef:zt,itemScope:dt,itemType:zt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:dt,low:_e,manifest:null,max:null,maxLength:_e,media:null,method:null,min:null,minLength:_e,multiple:dt,muted:dt,name:null,nonce:null,noModule:dt,noValidate:dt,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:dt,optimum:_e,pattern:null,ping:zt,placeholder:null,playsInline:dt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:dt,referrerPolicy:null,rel:zt,required:dt,reversed:dt,rows:_e,rowSpan:_e,sandbox:zt,scope:null,scoped:dt,seamless:dt,selected:dt,shadowRootClonable:dt,shadowRootDelegatesFocus:dt,shadowRootMode:null,shape:null,size:_e,sizes:null,slot:null,span:_e,spellCheck:ir,src:null,srcDoc:null,srcLang:null,srcSet:null,start:_e,step:null,style:null,tabIndex:_e,target:null,title:null,translate:null,type:null,typeMustMatch:dt,useMap:null,value:ir,width:_e,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:zt,axis:null,background:null,bgColor:null,border:_e,borderColor:null,bottomMargin:_e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:dt,declare:dt,event:null,face:null,frame:null,frameBorder:null,hSpace:_e,leftMargin:_e,link:null,longDesc:null,lowSrc:null,marginHeight:_e,marginWidth:_e,noResize:dt,noHref:dt,noShade:dt,noWrap:dt,object:null,profile:null,prompt:null,rev:null,rightMargin:_e,rules:null,scheme:null,scrolling:ir,standby:null,summary:null,text:null,topMargin:_e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:_e,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:dt,disableRemotePlayback:dt,prefix:null,property:null,results:_e,security:null,unselectable:null},space:"html",transform:D4}),sE=ko({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",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:mn,accentHeight:_e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:_e,amplitude:_e,arabicForm:null,ascent:_e,attributeName:null,attributeType:null,azimuth:_e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:_e,by:null,calcMode:null,capHeight:_e,className:zt,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:_e,diffuseConstant:_e,direction:null,display:null,dur:null,divisor:_e,dominantBaseline:null,download:dt,dx:null,dy:null,edgeMode:null,editable:null,elevation:_e,enableBackground:null,end:null,event:null,exponent:_e,externalResourcesRequired:null,fill:null,fillOpacity:_e,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:qs,g2:qs,glyphName:qs,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:_e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:_e,horizOriginX:_e,horizOriginY:_e,id:null,ideographic:_e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:_e,k:_e,k1:_e,k2:_e,k3:_e,k4:_e,kernelMatrix:mn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:_e,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:_e,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:_e,overlineThickness:_e,paintOrder:null,panose1:null,path:null,pathLength:_e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:zt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:_e,pointsAtY:_e,pointsAtZ:_e,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:mn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:mn,rev:mn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:mn,requiredFeatures:mn,requiredFonts:mn,requiredFormats:mn,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:_e,specularExponent:_e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:_e,strikethroughThickness:_e,string:null,stroke:null,strokeDashArray:mn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:_e,strokeOpacity:_e,strokeWidth:null,style:null,surfaceScale:_e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:mn,tabIndex:_e,tableValues:null,target:null,targetX:_e,targetY:_e,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:mn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:_e,underlineThickness:_e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:_e,values:null,vAlphabetic:_e,vMathematical:_e,vectorEffect:null,vHanging:_e,vIdeographic:_e,version:null,vertAdvY:_e,vertOriginX:_e,vertOriginY:_e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:_e,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:B4}),O4=ko({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),P4=ko({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:D4}),F4=ko({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),oE={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"},lE=/[A-Z]/g,t2=/-[a-z]/g,cE=/^data[-\w.:]+$/i;function bc(t,e){const r=Ul(e);let n=e,i=un;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&cE.test(e)){if(e.charAt(4)==="-"){const a=e.slice(5).replace(t2,hE);n="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=e.slice(4);if(!t2.test(a)){let s=a.replace(lE,uE);s.charAt(0)!=="-"&&(s="-"+s),e="data"+s}}i=Tm}return new i(n,e)}function uE(t){return"-"+t.toLowerCase()}function hE(t){return t.charAt(1).toUpperCase()}const wo=I4([R4,aE,O4,P4,F4],"html"),yi=I4([R4,sE,O4,P4,F4],"svg");function r2(t){const e=[],r=String(t||"");let n=r.indexOf(","),i=0,a=!1;for(;!a;){n===-1&&(n=r.length,a=!0);const s=r.slice(i,n).trim();(s||!a)&&e.push(s),i=n+1,n=r.indexOf(",",i)}return e}function Cm(t,e){const r=e||{};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const n2=/[#.]/g;function dE(t,e){const r=t||"",n={};let i=0,a,s;for(;i<r.length;){n2.lastIndex=i;const o=n2.exec(r),l=r.slice(i,o?o.index:r.length);l&&(a?a==="#"?n.id=l:Array.isArray(n.className)?n.className.push(l):n.className=[l]:s=l,i+=l.length),o&&(a=o[0],i++)}return{type:"element",tagName:s||e||"div",properties:n,children:[]}}function i2(t){const e=String(t||"").trim();return e?e.split(/[ \t\n\r\f]+/g):[]}function Sm(t){return t.join(" ").trim()}function $4(t,e,r){const n=r?gE(r):void 0;function i(a,s,...o){let l;if(a==null){l={type:"root",children:[]};const c=s;o.unshift(c)}else{l=dE(a,e);const c=l.tagName.toLowerCase(),u=n?n.get(c):void 0;if(l.tagName=u||c,fE(s))o.unshift(s);else for(const[h,d]of Object.entries(s))pE(t,l.properties,h,d)}for(const c of o)Af(l.children,c);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function fE(t){if(t===null||typeof t!="object"||Array.isArray(t))return!0;if(typeof t.type!="string")return!1;const e=t,r=Object.keys(t);for(const n of r){const i=e[n];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const a=i;for(const s of a)if(typeof s!="number"&&typeof s!="string")return!0}}return!!("children"in t&&Array.isArray(t.children))}function pE(t,e,r,n){const i=bc(t,r);let a;if(n!=null){if(typeof n=="number"){if(Number.isNaN(n))return;a=n}else typeof n=="boolean"?a=n:typeof n=="string"?i.spaceSeparated?a=i2(n):i.commaSeparated?a=r2(n):i.commaOrSpaceSeparated?a=i2(r2(n).join(" ")):a=a2(i,i.property,n):Array.isArray(n)?a=[...n]:a=i.property==="style"?mE(n):String(n);if(Array.isArray(a)){const s=[];for(const o of a)s.push(a2(i,i.property,o));a=s}i.property==="className"&&Array.isArray(e.className)&&(a=e.className.concat(a)),e[i.property]=a}}function Af(t,e){if(e!=null)if(typeof e=="number"||typeof e=="string")t.push({type:"text",value:String(e)});else if(Array.isArray(e))for(const r of e)Af(t,r);else if(typeof e=="object"&&"type"in e)e.type==="root"?Af(t,e.children):t.push(e);else throw new Error("Expected node, nodes, or string, got `"+e+"`")}function a2(t,e,r){if(typeof r=="string"){if(t.number&&r&&!Number.isNaN(Number(r)))return Number(r);if((t.boolean||t.overloadedBoolean)&&(r===""||Ul(r)===Ul(e)))return!0}return r}function mE(t){const e=[];for(const[r,n]of Object.entries(t))e.push([r,n].join(": "));return e.join("; ")}function gE(t){const e=new Map;for(const r of t)e.set(r.toLowerCase(),r);return e}const bE=["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"],z4=$4(wo,"div"),H4=$4(yi,"g",bE);function yE(t){const e=String(t),r=[];return{toOffset:i,toPoint:n};function n(a){if(typeof a=="number"&&a>-1&&a<=e.length){let s=0;for(;;){let o=r[s];if(o===void 0){const l=s2(e,r[s-1]);o=l===-1?e.length+1:l+1,r[s]=o}if(o>a)return{line:s+1,column:a-(s>0?r[s-1]:0)+1,offset:a};s++}}}function i(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;r.length<a.line;){const o=r[r.length-1],l=s2(e,o),c=l===-1?e.length+1:l+1;if(o===c)break;r.push(c)}const s=(a.line>1?r[a.line-2]:0)+a.column-1;if(s<r[a.line-1])return s}}}function s2(t,e){const r=t.indexOf("\r",e),n=t.indexOf(`
2
+ `,e);return n===-1?r:r===-1||r+1===n?n:r<n?r:n}const di={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/"},q4={}.hasOwnProperty,xE=Object.prototype;function vE(t,e){const r=e||{};return _m({file:r.file||void 0,location:!1,schema:r.space==="svg"?yi:wo,verbose:r.verbose||!1},t)}function _m(t,e){let r;switch(e.nodeName){case"#comment":{const n=e;return r={type:"comment",value:n.data},vu(t,n,r),r}case"#document":case"#document-fragment":{const n=e,i="mode"in n?n.mode==="quirks"||n.mode==="limited-quirks":!1;if(r={type:"root",children:j4(t,e.childNodes),data:{quirksMode:i}},t.file&&t.location){const a=String(t.file),s=yE(a),o=s.toPoint(0),l=s.toPoint(a.length);r.position={start:o,end:l}}return r}case"#documentType":{const n=e;return r={type:"doctype"},vu(t,n,r),r}case"#text":{const n=e;return r={type:"text",value:n.value},vu(t,n,r),r}default:return r=kE(t,e),r}}function j4(t,e){let r=-1;const n=[];for(;++r<e.length;){const i=_m(t,e[r]);n.push(i)}return n}function kE(t,e){const r=t.schema;t.schema=e.namespaceURI===di.svg?yi:wo;let n=-1;const i={};for(;++n<e.attrs.length;){const o=e.attrs[n],l=(o.prefix?o.prefix+":":"")+o.name;q4.call(xE,l)||(i[l]=o.value)}const s=(t.schema.space==="svg"?H4:z4)(e.tagName,i,j4(t,e.childNodes));if(vu(t,e,s),s.tagName==="template"){const o=e,l=o.sourceCodeLocation,c=l&&l.startTag&&$s(l.startTag),u=l&&l.endTag&&$s(l.endTag),h=_m(t,o.content);c&&u&&t.file&&(h.position={start:c.end,end:u.start}),s.content=h}return t.schema=r,s}function vu(t,e,r){if("sourceCodeLocation"in e&&e.sourceCodeLocation&&t.file){const n=wE(t,r,e.sourceCodeLocation);n&&(t.location=!0,r.position=n)}}function wE(t,e,r){const n=$s(r);if(e.type==="element"){const i=e.children[e.children.length-1];if(n&&!r.endTag&&i&&i.position&&i.position.end&&(n.end=Object.assign({},i.position.end)),t.verbose){const a={};let s;if(r.attrs)for(s in r.attrs)q4.call(r.attrs,s)&&(a[bc(t.schema,s).property]=$s(r.attrs[s]));r.startTag;const o=$s(r.startTag),l=r.endTag?$s(r.endTag):void 0,c={opening:o};l&&(c.closing=l),c.properties=a,e.data={position:c}}}return n}function $s(t){const e=o2({line:t.startLine,column:t.startCol,offset:t.startOffset}),r=o2({line:t.endLine,column:t.endCol,offset:t.endOffset});return e||r?{start:e,end:r}:void 0}function o2(t){return t.line&&t.column?t:void 0}const l2={}.hasOwnProperty;function Em(t,e){const r=e||{};function n(i,...a){let s=n.invalid;const o=n.handlers;if(i&&l2.call(i,t)){const l=String(i[t]);s=l2.call(o,l)?o[l]:n.unknown}if(s)return s.call(this,i,...a)}return n.handlers=r.handlers||{},n.invalid=r.invalid,n.unknown=r.unknown,n}const TE={},CE={}.hasOwnProperty,U4=Em("type",{handlers:{root:_E,element:ME,text:NE,comment:LE,doctype:AE}});function SE(t,e){const n=(e||TE).space;return U4(t,n==="svg"?yi:wo)}function _E(t,e){const r={nodeName:"#document",mode:(t.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return r.childNodes=Am(t.children,r,e),To(t,r),r}function EE(t,e){const r={nodeName:"#document-fragment",childNodes:[]};return r.childNodes=Am(t.children,r,e),To(t,r),r}function AE(t){const e={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return To(t,e),e}function NE(t){const e={nodeName:"#text",value:t.value,parentNode:null};return To(t,e),e}function LE(t){const e={nodeName:"#comment",data:t.value,parentNode:null};return To(t,e),e}function ME(t,e){const r=e;let n=r;t.type==="element"&&t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(n=yi);const i=[];let a;if(t.properties){for(a in t.properties)if(a!=="children"&&CE.call(t.properties,a)){const l=IE(n,a,t.properties[a]);l&&i.push(l)}}const s=n.space,o={nodeName:t.tagName,tagName:t.tagName,attrs:i,namespaceURI:di[s],childNodes:[],parentNode:null};return o.childNodes=Am(t.children,o,n),To(t,o),t.tagName==="template"&&t.content&&(o.content=EE(t.content,n)),o}function IE(t,e,r){const n=bc(t,e);if(r===!1||r===null||r===void 0||typeof r=="number"&&Number.isNaN(r)||!r&&n.boolean)return;Array.isArray(r)&&(r=n.commaSeparated?Cm(r):Sm(r));const i={name:n.attribute,value:r===!0?"":String(r)};if(n.space&&n.space!=="html"&&n.space!=="svg"){const a=i.name.indexOf(":");a<0?i.prefix="":(i.name=i.name.slice(a+1),i.prefix=n.attribute.slice(0,a)),i.namespace=di[n.space]}return i}function Am(t,e,r){let n=-1;const i=[];if(t)for(;++n<t.length;){const a=U4(t[n],r);a.parentNode=e,i.push(a)}return i}function To(t,e){const r=t.position;r&&r.start&&r.end&&(r.start.offset,r.end.offset,e.sourceCodeLocation={startLine:r.start.line,startCol:r.start.column,startOffset:r.start.offset,endLine:r.end.line,endCol:r.end.column,endOffset:r.end.offset})}const W4=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],RE=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]),Gt="�";var B;(function(t){t[t.EOF=-1]="EOF",t[t.NULL=0]="NULL",t[t.TABULATION=9]="TABULATION",t[t.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",t[t.LINE_FEED=10]="LINE_FEED",t[t.FORM_FEED=12]="FORM_FEED",t[t.SPACE=32]="SPACE",t[t.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",t[t.QUOTATION_MARK=34]="QUOTATION_MARK",t[t.AMPERSAND=38]="AMPERSAND",t[t.APOSTROPHE=39]="APOSTROPHE",t[t.HYPHEN_MINUS=45]="HYPHEN_MINUS",t[t.SOLIDUS=47]="SOLIDUS",t[t.DIGIT_0=48]="DIGIT_0",t[t.DIGIT_9=57]="DIGIT_9",t[t.SEMICOLON=59]="SEMICOLON",t[t.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",t[t.EQUALS_SIGN=61]="EQUALS_SIGN",t[t.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",t[t.QUESTION_MARK=63]="QUESTION_MARK",t[t.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",t[t.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",t[t.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",t[t.GRAVE_ACCENT=96]="GRAVE_ACCENT",t[t.LATIN_SMALL_A=97]="LATIN_SMALL_A",t[t.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(B||(B={}));const rn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function G4(t){return t>=55296&&t<=57343}function BE(t){return t>=56320&&t<=57343}function DE(t,e){return(t-55296)*1024+9216+e}function Y4(t){return t!==32&&t!==10&&t!==13&&t!==9&&t!==12&&t>=1&&t<=31||t>=127&&t<=159}function V4(t){return t>=64976&&t<=65007||RE.has(t)}var le;(function(t){t.controlCharacterInInputStream="control-character-in-input-stream",t.noncharacterInInputStream="noncharacter-in-input-stream",t.surrogateInInputStream="surrogate-in-input-stream",t.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",t.endTagWithAttributes="end-tag-with-attributes",t.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",t.unexpectedSolidusInTag="unexpected-solidus-in-tag",t.unexpectedNullCharacter="unexpected-null-character",t.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",t.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",t.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",t.missingEndTagName="missing-end-tag-name",t.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",t.unknownNamedCharacterReference="unknown-named-character-reference",t.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",t.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",t.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",t.eofBeforeTagName="eof-before-tag-name",t.eofInTag="eof-in-tag",t.missingAttributeValue="missing-attribute-value",t.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",t.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",t.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",t.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",t.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",t.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",t.missingDoctypePublicIdentifier="missing-doctype-public-identifier",t.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",t.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",t.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",t.cdataInHtmlContent="cdata-in-html-content",t.incorrectlyOpenedComment="incorrectly-opened-comment",t.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",t.eofInDoctype="eof-in-doctype",t.nestedComment="nested-comment",t.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",t.eofInComment="eof-in-comment",t.incorrectlyClosedComment="incorrectly-closed-comment",t.eofInCdata="eof-in-cdata",t.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",t.nullCharacterReference="null-character-reference",t.surrogateCharacterReference="surrogate-character-reference",t.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",t.controlCharacterReference="control-character-reference",t.noncharacterCharacterReference="noncharacter-character-reference",t.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",t.missingDoctypeName="missing-doctype-name",t.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",t.duplicateAttribute="duplicate-attribute",t.nonConformingDoctype="non-conforming-doctype",t.missingDoctype="missing-doctype",t.misplacedDoctype="misplaced-doctype",t.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",t.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",t.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",t.openElementsLeftAfterEof="open-elements-left-after-eof",t.abandonedHeadElementChild="abandoned-head-element-child",t.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",t.nestedNoscriptInHead="nested-noscript-in-head",t.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(le||(le={}));const OE=65536;class PE{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=OE,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(e,r){const{line:n,col:i,offset:a}=this,s=i+r,o=a+r;return{code:e,startLine:n,endLine:n,startCol:s,endCol:s,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){const r=this.html.charCodeAt(this.pos+1);if(BE(r))return this.pos++,this._addGap(),DE(e,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,B.EOF;return this._err(le.surrogateInInputStream),e}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(e,r){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(e,r){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(e,this.pos);for(let n=0;n<e.length;n++)if((this.html.charCodeAt(this.pos+n)|32)!==e.charCodeAt(n))return!1;return!0}peek(e){const r=this.pos+e;if(r>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,B.EOF;const n=this.html.charCodeAt(r);return n===B.CARRIAGE_RETURN?B.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,B.EOF;let e=this.html.charCodeAt(this.pos);return e===B.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,B.LINE_FEED):e===B.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,G4(e)&&(e=this._processSurrogate(e)),this.handler.onParseError===null||e>31&&e<127||e===B.LINE_FEED||e===B.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){Y4(e)?this._err(le.controlCharacterInInputStream):V4(e)&&this._err(le.noncharacterInInputStream)}retreat(e){for(this.pos-=e;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var kt;(function(t){t[t.CHARACTER=0]="CHARACTER",t[t.NULL_CHARACTER=1]="NULL_CHARACTER",t[t.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",t[t.START_TAG=3]="START_TAG",t[t.END_TAG=4]="END_TAG",t[t.COMMENT=5]="COMMENT",t[t.DOCTYPE=6]="DOCTYPE",t[t.EOF=7]="EOF",t[t.HIBERNATION=8]="HIBERNATION"})(kt||(kt={}));function X4(t,e){for(let r=t.attrs.length-1;r>=0;r--)if(t.attrs[r].name===e)return t.attrs[r].value;return null}const FE=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(t=>t.charCodeAt(0))),$E=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function zE(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=$E.get(t))!==null&&e!==void 0?e:t}var vr;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(vr||(vr={}));const HE=32;var pa;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(pa||(pa={}));function Nf(t){return t>=vr.ZERO&&t<=vr.NINE}function qE(t){return t>=vr.UPPER_A&&t<=vr.UPPER_F||t>=vr.LOWER_A&&t<=vr.LOWER_F}function jE(t){return t>=vr.UPPER_A&&t<=vr.UPPER_Z||t>=vr.LOWER_A&&t<=vr.LOWER_Z||Nf(t)}function UE(t){return t===vr.EQUALS||jE(t)}var br;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(br||(br={}));var Fi;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(Fi||(Fi={}));class WE{constructor(e,r,n){this.decodeTree=e,this.emitCodePoint=r,this.errors=n,this.state=br.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Fi.Strict}startEntity(e){this.decodeMode=e,this.state=br.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,r){switch(this.state){case br.EntityStart:return e.charCodeAt(r)===vr.NUM?(this.state=br.NumericStart,this.consumed+=1,this.stateNumericStart(e,r+1)):(this.state=br.NamedEntity,this.stateNamedEntity(e,r));case br.NumericStart:return this.stateNumericStart(e,r);case br.NumericDecimal:return this.stateNumericDecimal(e,r);case br.NumericHex:return this.stateNumericHex(e,r);case br.NamedEntity:return this.stateNamedEntity(e,r)}}stateNumericStart(e,r){return r>=e.length?-1:(e.charCodeAt(r)|HE)===vr.LOWER_X?(this.state=br.NumericHex,this.consumed+=1,this.stateNumericHex(e,r+1)):(this.state=br.NumericDecimal,this.stateNumericDecimal(e,r))}addToNumericResult(e,r,n,i){if(r!==n){const a=n-r;this.result=this.result*Math.pow(i,a)+Number.parseInt(e.substr(r,a),i),this.consumed+=a}}stateNumericHex(e,r){const n=r;for(;r<e.length;){const i=e.charCodeAt(r);if(Nf(i)||qE(i))r+=1;else return this.addToNumericResult(e,n,r,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(e,n,r,16),-1}stateNumericDecimal(e,r){const n=r;for(;r<e.length;){const i=e.charCodeAt(r);if(Nf(i))r+=1;else return this.addToNumericResult(e,n,r,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(e,n,r,10),-1}emitNumericEntity(e,r){var n;if(this.consumed<=r)return(n=this.errors)===null||n===void 0||n.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===vr.SEMI)this.consumed+=1;else if(this.decodeMode===Fi.Strict)return 0;return this.emitCodePoint(zE(this.result),this.consumed),this.errors&&(e!==vr.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,r){const{decodeTree:n}=this;let i=n[this.treeIndex],a=(i&pa.VALUE_LENGTH)>>14;for(;r<e.length;r++,this.excess++){const s=e.charCodeAt(r);if(this.treeIndex=GE(n,i,this.treeIndex+Math.max(1,a),s),this.treeIndex<0)return this.result===0||this.decodeMode===Fi.Attribute&&(a===0||UE(s))?0:this.emitNotTerminatedNamedEntity();if(i=n[this.treeIndex],a=(i&pa.VALUE_LENGTH)>>14,a!==0){if(s===vr.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Fi.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:r,decodeTree:n}=this,i=(n[r]&pa.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,i,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,r,n){const{decodeTree:i}=this;return this.emitCodePoint(r===1?i[e]&~pa.VALUE_LENGTH:i[e+1],n),r===3&&this.emitCodePoint(i[e+2],n),n}end(){var e;switch(this.state){case br.NamedEntity:return this.result!==0&&(this.decodeMode!==Fi.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case br.NumericDecimal:return this.emitNumericEntity(0,2);case br.NumericHex:return this.emitNumericEntity(0,3);case br.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case br.EntityStart:return 0}}}function GE(t,e,r,n){const i=(e&pa.BRANCH_LENGTH)>>7,a=e&pa.JUMP_TABLE;if(i===0)return a!==0&&n===a?r:-1;if(a){const l=n-a;return l<0||l>=i?-1:t[r+l]-1}let s=r,o=s+i-1;for(;s<=o;){const l=s+o>>>1,c=t[l];if(c<n)s=l+1;else if(c>n)o=l-1;else return t[l+i]}return-1}var ge;(function(t){t.HTML="http://www.w3.org/1999/xhtml",t.MATHML="http://www.w3.org/1998/Math/MathML",t.SVG="http://www.w3.org/2000/svg",t.XLINK="http://www.w3.org/1999/xlink",t.XML="http://www.w3.org/XML/1998/namespace",t.XMLNS="http://www.w3.org/2000/xmlns/"})(ge||(ge={}));var Za;(function(t){t.TYPE="type",t.ACTION="action",t.ENCODING="encoding",t.PROMPT="prompt",t.NAME="name",t.COLOR="color",t.FACE="face",t.SIZE="size"})(Za||(Za={}));var Ln;(function(t){t.NO_QUIRKS="no-quirks",t.QUIRKS="quirks",t.LIMITED_QUIRKS="limited-quirks"})(Ln||(Ln={}));var ne;(function(t){t.A="a",t.ADDRESS="address",t.ANNOTATION_XML="annotation-xml",t.APPLET="applet",t.AREA="area",t.ARTICLE="article",t.ASIDE="aside",t.B="b",t.BASE="base",t.BASEFONT="basefont",t.BGSOUND="bgsound",t.BIG="big",t.BLOCKQUOTE="blockquote",t.BODY="body",t.BR="br",t.BUTTON="button",t.CAPTION="caption",t.CENTER="center",t.CODE="code",t.COL="col",t.COLGROUP="colgroup",t.DD="dd",t.DESC="desc",t.DETAILS="details",t.DIALOG="dialog",t.DIR="dir",t.DIV="div",t.DL="dl",t.DT="dt",t.EM="em",t.EMBED="embed",t.FIELDSET="fieldset",t.FIGCAPTION="figcaption",t.FIGURE="figure",t.FONT="font",t.FOOTER="footer",t.FOREIGN_OBJECT="foreignObject",t.FORM="form",t.FRAME="frame",t.FRAMESET="frameset",t.H1="h1",t.H2="h2",t.H3="h3",t.H4="h4",t.H5="h5",t.H6="h6",t.HEAD="head",t.HEADER="header",t.HGROUP="hgroup",t.HR="hr",t.HTML="html",t.I="i",t.IMG="img",t.IMAGE="image",t.INPUT="input",t.IFRAME="iframe",t.KEYGEN="keygen",t.LABEL="label",t.LI="li",t.LINK="link",t.LISTING="listing",t.MAIN="main",t.MALIGNMARK="malignmark",t.MARQUEE="marquee",t.MATH="math",t.MENU="menu",t.META="meta",t.MGLYPH="mglyph",t.MI="mi",t.MO="mo",t.MN="mn",t.MS="ms",t.MTEXT="mtext",t.NAV="nav",t.NOBR="nobr",t.NOFRAMES="noframes",t.NOEMBED="noembed",t.NOSCRIPT="noscript",t.OBJECT="object",t.OL="ol",t.OPTGROUP="optgroup",t.OPTION="option",t.P="p",t.PARAM="param",t.PLAINTEXT="plaintext",t.PRE="pre",t.RB="rb",t.RP="rp",t.RT="rt",t.RTC="rtc",t.RUBY="ruby",t.S="s",t.SCRIPT="script",t.SEARCH="search",t.SECTION="section",t.SELECT="select",t.SOURCE="source",t.SMALL="small",t.SPAN="span",t.STRIKE="strike",t.STRONG="strong",t.STYLE="style",t.SUB="sub",t.SUMMARY="summary",t.SUP="sup",t.TABLE="table",t.TBODY="tbody",t.TEMPLATE="template",t.TEXTAREA="textarea",t.TFOOT="tfoot",t.TD="td",t.TH="th",t.THEAD="thead",t.TITLE="title",t.TR="tr",t.TRACK="track",t.TT="tt",t.U="u",t.UL="ul",t.SVG="svg",t.VAR="var",t.WBR="wbr",t.XMP="xmp"})(ne||(ne={}));var g;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.A=1]="A",t[t.ADDRESS=2]="ADDRESS",t[t.ANNOTATION_XML=3]="ANNOTATION_XML",t[t.APPLET=4]="APPLET",t[t.AREA=5]="AREA",t[t.ARTICLE=6]="ARTICLE",t[t.ASIDE=7]="ASIDE",t[t.B=8]="B",t[t.BASE=9]="BASE",t[t.BASEFONT=10]="BASEFONT",t[t.BGSOUND=11]="BGSOUND",t[t.BIG=12]="BIG",t[t.BLOCKQUOTE=13]="BLOCKQUOTE",t[t.BODY=14]="BODY",t[t.BR=15]="BR",t[t.BUTTON=16]="BUTTON",t[t.CAPTION=17]="CAPTION",t[t.CENTER=18]="CENTER",t[t.CODE=19]="CODE",t[t.COL=20]="COL",t[t.COLGROUP=21]="COLGROUP",t[t.DD=22]="DD",t[t.DESC=23]="DESC",t[t.DETAILS=24]="DETAILS",t[t.DIALOG=25]="DIALOG",t[t.DIR=26]="DIR",t[t.DIV=27]="DIV",t[t.DL=28]="DL",t[t.DT=29]="DT",t[t.EM=30]="EM",t[t.EMBED=31]="EMBED",t[t.FIELDSET=32]="FIELDSET",t[t.FIGCAPTION=33]="FIGCAPTION",t[t.FIGURE=34]="FIGURE",t[t.FONT=35]="FONT",t[t.FOOTER=36]="FOOTER",t[t.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",t[t.FORM=38]="FORM",t[t.FRAME=39]="FRAME",t[t.FRAMESET=40]="FRAMESET",t[t.H1=41]="H1",t[t.H2=42]="H2",t[t.H3=43]="H3",t[t.H4=44]="H4",t[t.H5=45]="H5",t[t.H6=46]="H6",t[t.HEAD=47]="HEAD",t[t.HEADER=48]="HEADER",t[t.HGROUP=49]="HGROUP",t[t.HR=50]="HR",t[t.HTML=51]="HTML",t[t.I=52]="I",t[t.IMG=53]="IMG",t[t.IMAGE=54]="IMAGE",t[t.INPUT=55]="INPUT",t[t.IFRAME=56]="IFRAME",t[t.KEYGEN=57]="KEYGEN",t[t.LABEL=58]="LABEL",t[t.LI=59]="LI",t[t.LINK=60]="LINK",t[t.LISTING=61]="LISTING",t[t.MAIN=62]="MAIN",t[t.MALIGNMARK=63]="MALIGNMARK",t[t.MARQUEE=64]="MARQUEE",t[t.MATH=65]="MATH",t[t.MENU=66]="MENU",t[t.META=67]="META",t[t.MGLYPH=68]="MGLYPH",t[t.MI=69]="MI",t[t.MO=70]="MO",t[t.MN=71]="MN",t[t.MS=72]="MS",t[t.MTEXT=73]="MTEXT",t[t.NAV=74]="NAV",t[t.NOBR=75]="NOBR",t[t.NOFRAMES=76]="NOFRAMES",t[t.NOEMBED=77]="NOEMBED",t[t.NOSCRIPT=78]="NOSCRIPT",t[t.OBJECT=79]="OBJECT",t[t.OL=80]="OL",t[t.OPTGROUP=81]="OPTGROUP",t[t.OPTION=82]="OPTION",t[t.P=83]="P",t[t.PARAM=84]="PARAM",t[t.PLAINTEXT=85]="PLAINTEXT",t[t.PRE=86]="PRE",t[t.RB=87]="RB",t[t.RP=88]="RP",t[t.RT=89]="RT",t[t.RTC=90]="RTC",t[t.RUBY=91]="RUBY",t[t.S=92]="S",t[t.SCRIPT=93]="SCRIPT",t[t.SEARCH=94]="SEARCH",t[t.SECTION=95]="SECTION",t[t.SELECT=96]="SELECT",t[t.SOURCE=97]="SOURCE",t[t.SMALL=98]="SMALL",t[t.SPAN=99]="SPAN",t[t.STRIKE=100]="STRIKE",t[t.STRONG=101]="STRONG",t[t.STYLE=102]="STYLE",t[t.SUB=103]="SUB",t[t.SUMMARY=104]="SUMMARY",t[t.SUP=105]="SUP",t[t.TABLE=106]="TABLE",t[t.TBODY=107]="TBODY",t[t.TEMPLATE=108]="TEMPLATE",t[t.TEXTAREA=109]="TEXTAREA",t[t.TFOOT=110]="TFOOT",t[t.TD=111]="TD",t[t.TH=112]="TH",t[t.THEAD=113]="THEAD",t[t.TITLE=114]="TITLE",t[t.TR=115]="TR",t[t.TRACK=116]="TRACK",t[t.TT=117]="TT",t[t.U=118]="U",t[t.UL=119]="UL",t[t.SVG=120]="SVG",t[t.VAR=121]="VAR",t[t.WBR=122]="WBR",t[t.XMP=123]="XMP"})(g||(g={}));const YE=new Map([[ne.A,g.A],[ne.ADDRESS,g.ADDRESS],[ne.ANNOTATION_XML,g.ANNOTATION_XML],[ne.APPLET,g.APPLET],[ne.AREA,g.AREA],[ne.ARTICLE,g.ARTICLE],[ne.ASIDE,g.ASIDE],[ne.B,g.B],[ne.BASE,g.BASE],[ne.BASEFONT,g.BASEFONT],[ne.BGSOUND,g.BGSOUND],[ne.BIG,g.BIG],[ne.BLOCKQUOTE,g.BLOCKQUOTE],[ne.BODY,g.BODY],[ne.BR,g.BR],[ne.BUTTON,g.BUTTON],[ne.CAPTION,g.CAPTION],[ne.CENTER,g.CENTER],[ne.CODE,g.CODE],[ne.COL,g.COL],[ne.COLGROUP,g.COLGROUP],[ne.DD,g.DD],[ne.DESC,g.DESC],[ne.DETAILS,g.DETAILS],[ne.DIALOG,g.DIALOG],[ne.DIR,g.DIR],[ne.DIV,g.DIV],[ne.DL,g.DL],[ne.DT,g.DT],[ne.EM,g.EM],[ne.EMBED,g.EMBED],[ne.FIELDSET,g.FIELDSET],[ne.FIGCAPTION,g.FIGCAPTION],[ne.FIGURE,g.FIGURE],[ne.FONT,g.FONT],[ne.FOOTER,g.FOOTER],[ne.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[ne.FORM,g.FORM],[ne.FRAME,g.FRAME],[ne.FRAMESET,g.FRAMESET],[ne.H1,g.H1],[ne.H2,g.H2],[ne.H3,g.H3],[ne.H4,g.H4],[ne.H5,g.H5],[ne.H6,g.H6],[ne.HEAD,g.HEAD],[ne.HEADER,g.HEADER],[ne.HGROUP,g.HGROUP],[ne.HR,g.HR],[ne.HTML,g.HTML],[ne.I,g.I],[ne.IMG,g.IMG],[ne.IMAGE,g.IMAGE],[ne.INPUT,g.INPUT],[ne.IFRAME,g.IFRAME],[ne.KEYGEN,g.KEYGEN],[ne.LABEL,g.LABEL],[ne.LI,g.LI],[ne.LINK,g.LINK],[ne.LISTING,g.LISTING],[ne.MAIN,g.MAIN],[ne.MALIGNMARK,g.MALIGNMARK],[ne.MARQUEE,g.MARQUEE],[ne.MATH,g.MATH],[ne.MENU,g.MENU],[ne.META,g.META],[ne.MGLYPH,g.MGLYPH],[ne.MI,g.MI],[ne.MO,g.MO],[ne.MN,g.MN],[ne.MS,g.MS],[ne.MTEXT,g.MTEXT],[ne.NAV,g.NAV],[ne.NOBR,g.NOBR],[ne.NOFRAMES,g.NOFRAMES],[ne.NOEMBED,g.NOEMBED],[ne.NOSCRIPT,g.NOSCRIPT],[ne.OBJECT,g.OBJECT],[ne.OL,g.OL],[ne.OPTGROUP,g.OPTGROUP],[ne.OPTION,g.OPTION],[ne.P,g.P],[ne.PARAM,g.PARAM],[ne.PLAINTEXT,g.PLAINTEXT],[ne.PRE,g.PRE],[ne.RB,g.RB],[ne.RP,g.RP],[ne.RT,g.RT],[ne.RTC,g.RTC],[ne.RUBY,g.RUBY],[ne.S,g.S],[ne.SCRIPT,g.SCRIPT],[ne.SEARCH,g.SEARCH],[ne.SECTION,g.SECTION],[ne.SELECT,g.SELECT],[ne.SOURCE,g.SOURCE],[ne.SMALL,g.SMALL],[ne.SPAN,g.SPAN],[ne.STRIKE,g.STRIKE],[ne.STRONG,g.STRONG],[ne.STYLE,g.STYLE],[ne.SUB,g.SUB],[ne.SUMMARY,g.SUMMARY],[ne.SUP,g.SUP],[ne.TABLE,g.TABLE],[ne.TBODY,g.TBODY],[ne.TEMPLATE,g.TEMPLATE],[ne.TEXTAREA,g.TEXTAREA],[ne.TFOOT,g.TFOOT],[ne.TD,g.TD],[ne.TH,g.TH],[ne.THEAD,g.THEAD],[ne.TITLE,g.TITLE],[ne.TR,g.TR],[ne.TRACK,g.TRACK],[ne.TT,g.TT],[ne.U,g.U],[ne.UL,g.UL],[ne.SVG,g.SVG],[ne.VAR,g.VAR],[ne.WBR,g.WBR],[ne.XMP,g.XMP]]);function Co(t){var e;return(e=YE.get(t))!==null&&e!==void 0?e:g.UNKNOWN}const ve=g,VE={[ge.HTML]:new Set([ve.ADDRESS,ve.APPLET,ve.AREA,ve.ARTICLE,ve.ASIDE,ve.BASE,ve.BASEFONT,ve.BGSOUND,ve.BLOCKQUOTE,ve.BODY,ve.BR,ve.BUTTON,ve.CAPTION,ve.CENTER,ve.COL,ve.COLGROUP,ve.DD,ve.DETAILS,ve.DIR,ve.DIV,ve.DL,ve.DT,ve.EMBED,ve.FIELDSET,ve.FIGCAPTION,ve.FIGURE,ve.FOOTER,ve.FORM,ve.FRAME,ve.FRAMESET,ve.H1,ve.H2,ve.H3,ve.H4,ve.H5,ve.H6,ve.HEAD,ve.HEADER,ve.HGROUP,ve.HR,ve.HTML,ve.IFRAME,ve.IMG,ve.INPUT,ve.LI,ve.LINK,ve.LISTING,ve.MAIN,ve.MARQUEE,ve.MENU,ve.META,ve.NAV,ve.NOEMBED,ve.NOFRAMES,ve.NOSCRIPT,ve.OBJECT,ve.OL,ve.P,ve.PARAM,ve.PLAINTEXT,ve.PRE,ve.SCRIPT,ve.SECTION,ve.SELECT,ve.SOURCE,ve.STYLE,ve.SUMMARY,ve.TABLE,ve.TBODY,ve.TD,ve.TEMPLATE,ve.TEXTAREA,ve.TFOOT,ve.TH,ve.THEAD,ve.TITLE,ve.TR,ve.TRACK,ve.UL,ve.WBR,ve.XMP]),[ge.MATHML]:new Set([ve.MI,ve.MO,ve.MN,ve.MS,ve.MTEXT,ve.ANNOTATION_XML]),[ge.SVG]:new Set([ve.TITLE,ve.FOREIGN_OBJECT,ve.DESC]),[ge.XLINK]:new Set,[ge.XML]:new Set,[ge.XMLNS]:new Set},Lf=new Set([ve.H1,ve.H2,ve.H3,ve.H4,ve.H5,ve.H6]);ne.STYLE,ne.SCRIPT,ne.XMP,ne.IFRAME,ne.NOEMBED,ne.NOFRAMES,ne.PLAINTEXT;var O;(function(t){t[t.DATA=0]="DATA",t[t.RCDATA=1]="RCDATA",t[t.RAWTEXT=2]="RAWTEXT",t[t.SCRIPT_DATA=3]="SCRIPT_DATA",t[t.PLAINTEXT=4]="PLAINTEXT",t[t.TAG_OPEN=5]="TAG_OPEN",t[t.END_TAG_OPEN=6]="END_TAG_OPEN",t[t.TAG_NAME=7]="TAG_NAME",t[t.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",t[t.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",t[t.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",t[t.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",t[t.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",t[t.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",t[t.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",t[t.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",t[t.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",t[t.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",t[t.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",t[t.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",t[t.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",t[t.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",t[t.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",t[t.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",t[t.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",t[t.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",t[t.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",t[t.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",t[t.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",t[t.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",t[t.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",t[t.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",t[t.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",t[t.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",t[t.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",t[t.BOGUS_COMMENT=40]="BOGUS_COMMENT",t[t.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",t[t.COMMENT_START=42]="COMMENT_START",t[t.COMMENT_START_DASH=43]="COMMENT_START_DASH",t[t.COMMENT=44]="COMMENT",t[t.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",t[t.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",t[t.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",t[t.COMMENT_END_DASH=49]="COMMENT_END_DASH",t[t.COMMENT_END=50]="COMMENT_END",t[t.COMMENT_END_BANG=51]="COMMENT_END_BANG",t[t.DOCTYPE=52]="DOCTYPE",t[t.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",t[t.DOCTYPE_NAME=54]="DOCTYPE_NAME",t[t.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",t[t.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",t[t.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",t[t.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",t[t.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",t[t.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",t[t.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",t[t.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",t[t.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",t[t.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",t[t.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",t[t.CDATA_SECTION=68]="CDATA_SECTION",t[t.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",t[t.CDATA_SECTION_END=70]="CDATA_SECTION_END",t[t.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",t[t.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(O||(O={}));const er={DATA:O.DATA,RCDATA:O.RCDATA,RAWTEXT:O.RAWTEXT,SCRIPT_DATA:O.SCRIPT_DATA,PLAINTEXT:O.PLAINTEXT,CDATA_SECTION:O.CDATA_SECTION};function XE(t){return t>=B.DIGIT_0&&t<=B.DIGIT_9}function ul(t){return t>=B.LATIN_CAPITAL_A&&t<=B.LATIN_CAPITAL_Z}function KE(t){return t>=B.LATIN_SMALL_A&&t<=B.LATIN_SMALL_Z}function ca(t){return KE(t)||ul(t)}function c2(t){return ca(t)||XE(t)}function Pc(t){return t+32}function K4(t){return t===B.SPACE||t===B.LINE_FEED||t===B.TABULATION||t===B.FORM_FEED}function u2(t){return K4(t)||t===B.SOLIDUS||t===B.GREATER_THAN_SIGN}function QE(t){return t===B.NULL?le.nullCharacterReference:t>1114111?le.characterReferenceOutsideUnicodeRange:G4(t)?le.surrogateCharacterReference:V4(t)?le.noncharacterCharacterReference:Y4(t)||t===B.CARRIAGE_RETURN?le.controlCharacterReference:null}class ZE{constructor(e,r){this.options=e,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=O.DATA,this.returnState=O.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new PE(r),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new WE(FE,(n,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(n)},r.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(le.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(le.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{const i=QE(n);i&&this._err(i,1)}}:void 0)}_err(e,r=0){var n,i;(i=(n=this.handler).onParseError)===null||i===void 0||i.call(n,this.preprocessor.getError(e,r))}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;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}pause(){this.paused=!0}resume(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||e==null||e())}write(e,r,n){this.active=!0,this.preprocessor.write(e,r),this._runParsingLoop(),this.paused||n==null||n()}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}_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 r=0;r<e;r++)this.preprocessor.advance()}_consumeSequenceIfMatch(e,r){return this.preprocessor.startsWith(e,r)?(this._advanceBy(e.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:kt.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:kt.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(e){this.currentToken={type:kt.COMMENT,data:"",location:this.getCurrentLocation(e)}}_createDoctypeToken(e){this.currentToken={type:kt.DOCTYPE,name:e,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(e,r){this.currentCharacterToken={type:e,chars:r,location:this.currentLocation}}_createAttr(e){this.currentAttr={name:e,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var e,r;const n=this.currentToken;if(X4(n,this.currentAttr.name)===null){if(n.attrs.push(this.currentAttr),n.location&&this.currentLocation){const i=(e=(r=n.location).attrs)!==null&&e!==void 0?e:r.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(le.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}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(){const e=this.currentToken;this.prepareToken(e),e.tagID=Co(e.tagName),e.type===kt.START_TAG?(this.lastStartTagName=e.tagName,this.handler.onStartTag(e)):(e.attrs.length>0&&this._err(le.endTagWithAttributes),e.selfClosing&&this._err(le.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.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 kt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case kt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case kt.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:kt.EOF,location:e}),this.active=!1}_appendCharToCurrentCharacterToken(e,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type===e){this.currentCharacterToken.chars+=r;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(e,r)}_emitCodePoint(e){const r=K4(e)?kt.WHITESPACE_CHARACTER:e===B.NULL?kt.NULL_CHARACTER:kt.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(e))}_emitChars(e){this._appendCharToCurrentCharacterToken(kt.CHARACTER,e)}_startCharacterReference(){this.returnState=this.state,this.state=O.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Fi.Attribute:Fi.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===O.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}_callState(e){switch(this.state){case O.DATA:{this._stateData(e);break}case O.RCDATA:{this._stateRcdata(e);break}case O.RAWTEXT:{this._stateRawtext(e);break}case O.SCRIPT_DATA:{this._stateScriptData(e);break}case O.PLAINTEXT:{this._statePlaintext(e);break}case O.TAG_OPEN:{this._stateTagOpen(e);break}case O.END_TAG_OPEN:{this._stateEndTagOpen(e);break}case O.TAG_NAME:{this._stateTagName(e);break}case O.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(e);break}case O.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(e);break}case O.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(e);break}case O.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(e);break}case O.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(e);break}case O.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(e);break}case O.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(e);break}case O.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(e);break}case O.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(e);break}case O.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(e);break}case O.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(e);break}case O.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(e);break}case O.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(e);break}case O.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(e);break}case O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(e);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(e);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(e);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(e);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(e);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(e);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(e);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(e);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(e);break}case O.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(e);break}case O.ATTRIBUTE_NAME:{this._stateAttributeName(e);break}case O.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(e);break}case O.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(e);break}case O.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(e);break}case O.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(e);break}case O.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(e);break}case O.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(e);break}case O.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(e);break}case O.BOGUS_COMMENT:{this._stateBogusComment(e);break}case O.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(e);break}case O.COMMENT_START:{this._stateCommentStart(e);break}case O.COMMENT_START_DASH:{this._stateCommentStartDash(e);break}case O.COMMENT:{this._stateComment(e);break}case O.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(e);break}case O.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(e);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(e);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(e);break}case O.COMMENT_END_DASH:{this._stateCommentEndDash(e);break}case O.COMMENT_END:{this._stateCommentEnd(e);break}case O.COMMENT_END_BANG:{this._stateCommentEndBang(e);break}case O.DOCTYPE:{this._stateDoctype(e);break}case O.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(e);break}case O.DOCTYPE_NAME:{this._stateDoctypeName(e);break}case O.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(e);break}case O.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(e);break}case O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(e);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(e);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(e);break}case O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(e);break}case O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break}case O.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(e);break}case O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(e);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(e);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(e);break}case O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(e);break}case O.BOGUS_DOCTYPE:{this._stateBogusDoctype(e);break}case O.CDATA_SECTION:{this._stateCdataSection(e);break}case O.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(e);break}case O.CDATA_SECTION_END:{this._stateCdataSectionEnd(e);break}case O.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case O.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(e);break}default:throw new Error("Unknown state")}}_stateData(e){switch(e){case B.LESS_THAN_SIGN:{this.state=O.TAG_OPEN;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(le.unexpectedNullCharacter),this._emitCodePoint(e);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRcdata(e){switch(e){case B.AMPERSAND:{this._startCharacterReference();break}case B.LESS_THAN_SIGN:{this.state=O.RCDATA_LESS_THAN_SIGN;break}case B.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Gt);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateRawtext(e){switch(e){case B.LESS_THAN_SIGN:{this.state=O.RAWTEXT_LESS_THAN_SIGN;break}case B.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Gt);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptData(e){switch(e){case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_LESS_THAN_SIGN;break}case B.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Gt);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_statePlaintext(e){switch(e){case B.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Gt);break}case B.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateTagOpen(e){if(ca(e))this._createStartTagToken(),this.state=O.TAG_NAME,this._stateTagName(e);else switch(e){case B.EXCLAMATION_MARK:{this.state=O.MARKUP_DECLARATION_OPEN;break}case B.SOLIDUS:{this.state=O.END_TAG_OPEN;break}case B.QUESTION_MARK:{this._err(le.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=O.BOGUS_COMMENT,this._stateBogusComment(e);break}case B.EOF:{this._err(le.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(le.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=O.DATA,this._stateData(e)}}_stateEndTagOpen(e){if(ca(e))this._createEndTagToken(),this.state=O.TAG_NAME,this._stateTagName(e);else switch(e){case B.GREATER_THAN_SIGN:{this._err(le.missingEndTagName),this.state=O.DATA;break}case B.EOF:{this._err(le.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(le.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(e)}}_stateTagName(e){const r=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BEFORE_ATTRIBUTE_NAME;break}case B.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case B.NULL:{this._err(le.unexpectedNullCharacter),r.tagName+=Gt;break}case B.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:r.tagName+=String.fromCodePoint(ul(e)?Pc(e):e)}}_stateRcdataLessThanSign(e){e===B.SOLIDUS?this.state=O.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RCDATA,this._stateRcdata(e))}_stateRcdataEndTagOpen(e){ca(e)?(this.state=O.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(e)):(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(e))}handleSpecialEndTag(e){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const r=this.currentToken;switch(r.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=O.BEFORE_ATTRIBUTE_NAME,!1;case B.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=O.SELF_CLOSING_START_TAG,!1;case B.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=O.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(e))}_stateRawtextLessThanSign(e){e===B.SOLIDUS?this.state=O.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagOpen(e){ca(e)?(this.state=O.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(e)):(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(e))}_stateRawtextEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(e))}_stateScriptDataLessThanSign(e){switch(e){case B.SOLIDUS:{this.state=O.SCRIPT_DATA_END_TAG_OPEN;break}case B.EXCLAMATION_MARK:{this.state=O.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=O.SCRIPT_DATA,this._stateScriptData(e)}}_stateScriptDataEndTagOpen(e){ca(e)?(this.state=O.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(e)):(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStart(e){e===B.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscapeStartDash(e){e===B.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(e))}_stateScriptDataEscaped(e){switch(e){case B.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Gt);break}case B.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataEscapedDash(e){switch(e){case B.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.NULL:{this._err(le.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(Gt);break}case B.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedDashDash(e){switch(e){case B.HYPHEN_MINUS:{this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case B.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case B.NULL:{this._err(le.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(Gt);break}case B.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataEscapedLessThanSign(e){e===B.SOLIDUS?this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ca(e)?(this._emitChars("<"),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagOpen(e){ca(e)?(this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataEscapedEndTagName(e){this.handleSpecialEndTag(e)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscapeStart(e){if(this.preprocessor.startsWith(rn.SCRIPT,!1)&&u2(this.preprocessor.peek(rn.SCRIPT.length))){this._emitCodePoint(e);for(let r=0;r<rn.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}_stateScriptDataDoubleEscaped(e){switch(e){case B.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Gt);break}case B.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDash(e){switch(e){case B.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.NULL:{this._err(le.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Gt);break}case B.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedDashDash(e){switch(e){case B.HYPHEN_MINUS:{this._emitChars("-");break}case B.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case B.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case B.NULL:{this._err(le.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Gt);break}case B.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}_stateScriptDataDoubleEscapedLessThanSign(e){e===B.SOLIDUS?(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateScriptDataDoubleEscapeEnd(e){if(this.preprocessor.startsWith(rn.SCRIPT,!1)&&u2(this.preprocessor.peek(rn.SCRIPT.length))){this._emitCodePoint(e);for(let r=0;r<rn.SCRIPT.length;r++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}_stateBeforeAttributeName(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.SOLIDUS:case B.GREATER_THAN_SIGN:case B.EOF:{this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case B.EQUALS_SIGN:{this._err(le.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=O.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateAttributeName(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:case B.SOLIDUS:case B.GREATER_THAN_SIGN:case B.EOF:{this._leaveAttrName(),this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(e);break}case B.EQUALS_SIGN:{this._leaveAttrName(),this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case B.QUOTATION_MARK:case B.APOSTROPHE:case B.LESS_THAN_SIGN:{this._err(le.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(e);break}case B.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.name+=Gt;break}default:this.currentAttr.name+=String.fromCodePoint(ul(e)?Pc(e):e)}}_stateAfterAttributeName(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case B.EQUALS_SIGN:{this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(e)}}_stateBeforeAttributeValue(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{this.state=O.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this.state=O.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(le.missingAttributeValue),this.state=O.DATA,this.emitCurrentTagToken();break}default:this.state=O.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(e)}}_stateAttributeValueDoubleQuoted(e){switch(e){case B.QUOTATION_MARK:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Gt;break}case B.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueSingleQuoted(e){switch(e){case B.APOSTROPHE:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Gt;break}case B.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAttributeValueUnquoted(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case B.AMPERSAND:{this._startCharacterReference();break}case B.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case B.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Gt;break}case B.QUOTATION_MARK:case B.APOSTROPHE:case B.LESS_THAN_SIGN:case B.EQUALS_SIGN:case B.GRAVE_ACCENT:{this._err(le.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(e);break}case B.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(e)}}_stateAfterAttributeValueQuoted(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case B.SOLIDUS:{this._leaveAttrValue(),this.state=O.SELF_CLOSING_START_TAG;break}case B.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._err(le.missingWhitespaceBetweenAttributes),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateSelfClosingStartTag(e){switch(e){case B.GREATER_THAN_SIGN:{const r=this.currentToken;r.selfClosing=!0,this.state=O.DATA,this.emitCurrentTagToken();break}case B.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._err(le.unexpectedSolidusInTag),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(e)}}_stateBogusComment(e){const r=this.currentToken;switch(e){case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(r);break}case B.EOF:{this.emitCurrentComment(r),this._emitEOFToken();break}case B.NULL:{this._err(le.unexpectedNullCharacter),r.data+=Gt;break}default:r.data+=String.fromCodePoint(e)}}_stateMarkupDeclarationOpen(e){this._consumeSequenceIfMatch(rn.DASH_DASH,!0)?(this._createCommentToken(rn.DASH_DASH.length+1),this.state=O.COMMENT_START):this._consumeSequenceIfMatch(rn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(rn.DOCTYPE.length+1),this.state=O.DOCTYPE):this._consumeSequenceIfMatch(rn.CDATA_START,!0)?this.inForeignNode?this.state=O.CDATA_SECTION:(this._err(le.cdataInHtmlContent),this._createCommentToken(rn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=O.BOGUS_COMMENT):this._ensureHibernation()||(this._err(le.incorrectlyOpenedComment),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(e))}_stateCommentStart(e){switch(e){case B.HYPHEN_MINUS:{this.state=O.COMMENT_START_DASH;break}case B.GREATER_THAN_SIGN:{this._err(le.abruptClosingOfEmptyComment),this.state=O.DATA;const r=this.currentToken;this.emitCurrentComment(r);break}default:this.state=O.COMMENT,this._stateComment(e)}}_stateCommentStartDash(e){const r=this.currentToken;switch(e){case B.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case B.GREATER_THAN_SIGN:{this._err(le.abruptClosingOfEmptyComment),this.state=O.DATA,this.emitCurrentComment(r);break}case B.EOF:{this._err(le.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=O.COMMENT,this._stateComment(e)}}_stateComment(e){const r=this.currentToken;switch(e){case B.HYPHEN_MINUS:{this.state=O.COMMENT_END_DASH;break}case B.LESS_THAN_SIGN:{r.data+="<",this.state=O.COMMENT_LESS_THAN_SIGN;break}case B.NULL:{this._err(le.unexpectedNullCharacter),r.data+=Gt;break}case B.EOF:{this._err(le.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+=String.fromCodePoint(e)}}_stateCommentLessThanSign(e){const r=this.currentToken;switch(e){case B.EXCLAMATION_MARK:{r.data+="!",this.state=O.COMMENT_LESS_THAN_SIGN_BANG;break}case B.LESS_THAN_SIGN:{r.data+="<";break}default:this.state=O.COMMENT,this._stateComment(e)}}_stateCommentLessThanSignBang(e){e===B.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=O.COMMENT,this._stateComment(e))}_stateCommentLessThanSignBangDash(e){e===B.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=O.COMMENT_END_DASH,this._stateCommentEndDash(e))}_stateCommentLessThanSignBangDashDash(e){e!==B.GREATER_THAN_SIGN&&e!==B.EOF&&this._err(le.nestedComment),this.state=O.COMMENT_END,this._stateCommentEnd(e)}_stateCommentEndDash(e){const r=this.currentToken;switch(e){case B.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case B.EOF:{this._err(le.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="-",this.state=O.COMMENT,this._stateComment(e)}}_stateCommentEnd(e){const r=this.currentToken;switch(e){case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(r);break}case B.EXCLAMATION_MARK:{this.state=O.COMMENT_END_BANG;break}case B.HYPHEN_MINUS:{r.data+="-";break}case B.EOF:{this._err(le.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--",this.state=O.COMMENT,this._stateComment(e)}}_stateCommentEndBang(e){const r=this.currentToken;switch(e){case B.HYPHEN_MINUS:{r.data+="--!",this.state=O.COMMENT_END_DASH;break}case B.GREATER_THAN_SIGN:{this._err(le.incorrectlyClosedComment),this.state=O.DATA,this.emitCurrentComment(r);break}case B.EOF:{this._err(le.eofInComment),this.emitCurrentComment(r),this._emitEOFToken();break}default:r.data+="--!",this.state=O.COMMENT,this._stateComment(e)}}_stateDoctype(e){switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e);break}case B.EOF:{this._err(le.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(le.missingWhitespaceBeforeDoctypeName),this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(e)}}_stateBeforeDoctypeName(e){if(ul(e))this._createDoctypeToken(String.fromCharCode(Pc(e))),this.state=O.DOCTYPE_NAME;else switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.NULL:{this._err(le.unexpectedNullCharacter),this._createDoctypeToken(Gt),this.state=O.DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this._err(le.missingDoctypeName),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.EOF:{this._err(le.eofInDoctype),this._createDoctypeToken(null);const r=this.currentToken;r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(e)),this.state=O.DOCTYPE_NAME}}_stateDoctypeName(e){const r=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.AFTER_DOCTYPE_NAME;break}case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(r);break}case B.NULL:{this._err(le.unexpectedNullCharacter),r.name+=Gt;break}case B.EOF:{this._err(le.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.name+=String.fromCodePoint(ul(e)?Pc(e):e)}}_stateAfterDoctypeName(e){const r=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(r);break}case B.EOF:{this._err(le.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(rn.PUBLIC,!1)?this.state=O.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(rn.SYSTEM,!1)?this.state=O.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(le.invalidCharacterSequenceAfterDoctypeName),r.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(e))}}_stateAfterDoctypePublicKeyword(e){const r=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.QUOTATION_MARK:{this._err(le.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(le.missingWhitespaceAfterDoctypePublicKeyword),r.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(le.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(r);break}case B.EOF:{this._err(le.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypePublicIdentifier(e){const r=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{r.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{r.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(le.missingDoctypePublicIdentifier),r.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(r);break}case B.EOF:{this._err(le.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypePublicIdentifier),r.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypePublicIdentifierDoubleQuoted(e){const r=this.currentToken;switch(e){case B.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.NULL:{this._err(le.unexpectedNullCharacter),r.publicId+=Gt;break}case B.GREATER_THAN_SIGN:{this._err(le.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.EOF:{this._err(le.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(e)}}_stateDoctypePublicIdentifierSingleQuoted(e){const r=this.currentToken;switch(e){case B.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case B.NULL:{this._err(le.unexpectedNullCharacter),r.publicId+=Gt;break}case B.GREATER_THAN_SIGN:{this._err(le.abruptDoctypePublicIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.EOF:{this._err(le.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.publicId+=String.fromCodePoint(e)}}_stateAfterDoctypePublicIdentifier(e){const r=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case B.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(r);break}case B.QUOTATION_MARK:{this._err(le.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(le.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.EOF:{this._err(le.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBetweenDoctypePublicAndSystemIdentifiers(e){const r=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.QUOTATION_MARK:{r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.EOF:{this._err(le.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateAfterDoctypeSystemKeyword(e){const r=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.QUOTATION_MARK:{this._err(le.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{this._err(le.missingWhitespaceAfterDoctypeSystemKeyword),r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(le.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(r);break}case B.EOF:{this._err(le.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBeforeDoctypeSystemIdentifier(e){const r=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.QUOTATION_MARK:{r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case B.APOSTROPHE:{r.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case B.GREATER_THAN_SIGN:{this._err(le.missingDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(r);break}case B.EOF:{this._err(le.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),r.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateDoctypeSystemIdentifierDoubleQuoted(e){const r=this.currentToken;switch(e){case B.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.NULL:{this._err(le.unexpectedNullCharacter),r.systemId+=Gt;break}case B.GREATER_THAN_SIGN:{this._err(le.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.EOF:{this._err(le.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(e)}}_stateDoctypeSystemIdentifierSingleQuoted(e){const r=this.currentToken;switch(e){case B.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case B.NULL:{this._err(le.unexpectedNullCharacter),r.systemId+=Gt;break}case B.GREATER_THAN_SIGN:{this._err(le.abruptDoctypeSystemIdentifier),r.forceQuirks=!0,this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.EOF:{this._err(le.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:r.systemId+=String.fromCodePoint(e)}}_stateAfterDoctypeSystemIdentifier(e){const r=this.currentToken;switch(e){case B.SPACE:case B.LINE_FEED:case B.TABULATION:case B.FORM_FEED:break;case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.EOF:{this._err(le.eofInDoctype),r.forceQuirks=!0,this.emitCurrentDoctype(r),this._emitEOFToken();break}default:this._err(le.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(e)}}_stateBogusDoctype(e){const r=this.currentToken;switch(e){case B.GREATER_THAN_SIGN:{this.emitCurrentDoctype(r),this.state=O.DATA;break}case B.NULL:{this._err(le.unexpectedNullCharacter);break}case B.EOF:{this.emitCurrentDoctype(r),this._emitEOFToken();break}}}_stateCdataSection(e){switch(e){case B.RIGHT_SQUARE_BRACKET:{this.state=O.CDATA_SECTION_BRACKET;break}case B.EOF:{this._err(le.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(e)}}_stateCdataSectionBracket(e){e===B.RIGHT_SQUARE_BRACKET?this.state=O.CDATA_SECTION_END:(this._emitChars("]"),this.state=O.CDATA_SECTION,this._stateCdataSection(e))}_stateCdataSectionEnd(e){switch(e){case B.GREATER_THAN_SIGN:{this.state=O.DATA;break}case B.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=O.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(B.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&c2(this.preprocessor.peek(1))?O.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(e){c2(e)?this._flushCodePointConsumedAsCharacterReference(e):(e===B.SEMICOLON&&this._err(le.unknownNamedCharacterReference),this.state=this.returnState,this._callState(e))}}const Q4=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),h2=new Set([...Q4,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),qu=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),JE=new Set([...qu,g.OL,g.UL]),e9=new Set([...qu,g.BUTTON]),d2=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),f2=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),t9=new Set([g.TR,g.TEMPLATE,g.HTML]),r9=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),n9=new Set([g.TABLE,g.TEMPLATE,g.HTML]),i9=new Set([g.TD,g.TH]);class a9{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(e,r,n){this.treeAdapter=r,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=e}_indexOf(e){return this.items.lastIndexOf(e,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ge.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(e,r){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=r,this.currentTagId=r,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,r,!0)}pop(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}replace(e,r){const n=this._indexOf(e);this.items[n]=r,n===this.stackTop&&(this.current=r)}insertAfter(e,r,n){const i=this._indexOf(e)+1;this.items.splice(i,0,r),this.tagIDs.splice(i,0,n),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(e){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(e,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==ge.HTML);this.shortenToLength(Math.max(r,0))}shortenToLength(e){for(;this.stackTop>=e;){const r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop<e)}}popUntilElementPopped(e){const r=this._indexOf(e);this.shortenToLength(Math.max(r,0))}popUntilPopped(e,r){const n=this._indexOfTagNames(e,r);this.shortenToLength(Math.max(n,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Lf,ge.HTML)}popUntilTableCellPopped(){this.popUntilPopped(i9,ge.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(e,r){for(let n=this.stackTop;n>=0;n--)if(e.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===r)return n;return-1}clearBackTo(e,r){const n=this._indexOfTagNames(e,r);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(n9,ge.HTML)}clearBackToTableBodyContext(){this.clearBackTo(r9,ge.HTML)}clearBackToTableRowContext(){this.clearBackTo(t9,ge.HTML)}remove(e){const r=this._indexOf(e);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){const r=this._indexOf(e)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(e,r){for(let n=this.stackTop;n>=0;n--){const i=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case ge.HTML:{if(i===e)return!0;if(r.has(i))return!1;break}case ge.SVG:{if(f2.has(i))return!1;break}case ge.MATHML:{if(d2.has(i))return!1;break}}}return!0}hasInScope(e){return this.hasInDynamicScope(e,qu)}hasInListItemScope(e){return this.hasInDynamicScope(e,JE)}hasInButtonScope(e){return this.hasInDynamicScope(e,e9)}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const r=this.tagIDs[e];switch(this.treeAdapter.getNamespaceURI(this.items[e])){case ge.HTML:{if(Lf.has(r))return!0;if(qu.has(r))return!1;break}case ge.SVG:{if(f2.has(r))return!1;break}case ge.MATHML:{if(d2.has(r))return!1;break}}}return!0}hasInTableScope(e){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===ge.HTML)switch(this.tagIDs[r]){case e:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--)if(this.treeAdapter.getNamespaceURI(this.items[e])===ge.HTML)switch(this.tagIDs[e]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(e){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===ge.HTML)switch(this.tagIDs[r]){case e:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Q4.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&h2.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(e){for(;this.currentTagId!==void 0&&this.currentTagId!==e&&h2.has(this.currentTagId);)this.pop()}}const cd=3;var ci;(function(t){t[t.Marker=0]="Marker",t[t.Element=1]="Element"})(ci||(ci={}));const p2={type:ci.Marker};class s9{constructor(e){this.treeAdapter=e,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(e,r){const n=[],i=r.length,a=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e);for(let o=0;o<this.entries.length;o++){const l=this.entries[o];if(l.type===ci.Marker)break;const{element:c}=l;if(this.treeAdapter.getTagName(c)===a&&this.treeAdapter.getNamespaceURI(c)===s){const u=this.treeAdapter.getAttrList(c);u.length===i&&n.push({idx:o,attrs:u})}}return n}_ensureNoahArkCondition(e){if(this.entries.length<cd)return;const r=this.treeAdapter.getAttrList(e),n=this._getNoahArkConditionCandidates(e,r);if(n.length<cd)return;const i=new Map(r.map(s=>[s.name,s.value]));let a=0;for(let s=0;s<n.length;s++){const o=n[s];o.attrs.every(l=>i.get(l.name)===l.value)&&(a+=1,a>=cd&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift(p2)}pushElement(e,r){this._ensureNoahArkCondition(e),this.entries.unshift({type:ci.Element,element:e,token:r})}insertElementAfterBookmark(e,r){const n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:ci.Element,element:e,token:r})}removeEntry(e){const r=this.entries.indexOf(e);r!==-1&&this.entries.splice(r,1)}clearToLastMarker(){const e=this.entries.indexOf(p2);e===-1?this.entries.length=0:this.entries.splice(0,e+1)}getElementEntryInScopeWithTagName(e){const r=this.entries.find(n=>n.type===ci.Marker||this.treeAdapter.getTagName(n.element)===e);return r&&r.type===ci.Element?r:null}getElementEntry(e){return this.entries.find(r=>r.type===ci.Element&&r.element===e)}}const ua={createDocument(){return{nodeName:"#document",mode:Ln.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(t,e,r){return{nodeName:t,tagName:t,attrs:r,namespaceURI:e,childNodes:[],parentNode:null}},createCommentNode(t){return{nodeName:"#comment",data:t,parentNode:null}},createTextNode(t){return{nodeName:"#text",value:t,parentNode:null}},appendChild(t,e){t.childNodes.push(e),e.parentNode=t},insertBefore(t,e,r){const n=t.childNodes.indexOf(r);t.childNodes.splice(n,0,e),e.parentNode=t},setTemplateContent(t,e){t.content=e},getTemplateContent(t){return t.content},setDocumentType(t,e,r,n){const i=t.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=e,i.publicId=r,i.systemId=n;else{const a={nodeName:"#documentType",name:e,publicId:r,systemId:n,parentNode:null};ua.appendChild(t,a)}},setDocumentMode(t,e){t.mode=e},getDocumentMode(t){return t.mode},detachNode(t){if(t.parentNode){const e=t.parentNode.childNodes.indexOf(t);t.parentNode.childNodes.splice(e,1),t.parentNode=null}},insertText(t,e){if(t.childNodes.length>0){const r=t.childNodes[t.childNodes.length-1];if(ua.isTextNode(r)){r.value+=e;return}}ua.appendChild(t,ua.createTextNode(e))},insertTextBefore(t,e,r){const n=t.childNodes[t.childNodes.indexOf(r)-1];n&&ua.isTextNode(n)?n.value+=e:ua.insertBefore(t,ua.createTextNode(e),r)},adoptAttributes(t,e){const r=new Set(t.attrs.map(n=>n.name));for(let n=0;n<e.length;n++)r.has(e[n].name)||t.attrs.push(e[n])},getFirstChild(t){return t.childNodes[0]},getChildNodes(t){return t.childNodes},getParentNode(t){return t.parentNode},getAttrList(t){return t.attrs},getTagName(t){return t.tagName},getNamespaceURI(t){return t.namespaceURI},getTextNodeContent(t){return t.value},getCommentNodeContent(t){return t.data},getDocumentTypeNodeName(t){return t.name},getDocumentTypeNodePublicId(t){return t.publicId},getDocumentTypeNodeSystemId(t){return t.systemId},isTextNode(t){return t.nodeName==="#text"},isCommentNode(t){return t.nodeName==="#comment"},isDocumentTypeNode(t){return t.nodeName==="#documentType"},isElementNode(t){return Object.prototype.hasOwnProperty.call(t,"tagName")},setNodeSourceCodeLocation(t,e){t.sourceCodeLocation=e},getNodeSourceCodeLocation(t){return t.sourceCodeLocation},updateNodeSourceCodeLocation(t,e){t.sourceCodeLocation={...t.sourceCodeLocation,...e}}},Z4="html",o9="about:legacy-compat",l9="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",J4=["+//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//"],c9=[...J4,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],u9=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),e3=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],h9=[...e3,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function m2(t,e){return e.some(r=>t.startsWith(r))}function d9(t){return t.name===Z4&&t.publicId===null&&(t.systemId===null||t.systemId===o9)}function f9(t){if(t.name!==Z4)return Ln.QUIRKS;const{systemId:e}=t;if(e&&e.toLowerCase()===l9)return Ln.QUIRKS;let{publicId:r}=t;if(r!==null){if(r=r.toLowerCase(),u9.has(r))return Ln.QUIRKS;let n=e===null?c9:J4;if(m2(r,n))return Ln.QUIRKS;if(n=e===null?e3:h9,m2(r,n))return Ln.LIMITED_QUIRKS}return Ln.NO_QUIRKS}const g2={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},p9="definitionurl",m9="definitionURL",g9=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"].map(t=>[t.toLowerCase(),t])),b9=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ge.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ge.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ge.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ge.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ge.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ge.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ge.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ge.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ge.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ge.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ge.XMLNS}]]),y9=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"].map(t=>[t.toLowerCase(),t])),x9=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function v9(t){const e=t.tagID;return e===g.FONT&&t.attrs.some(({name:n})=>n===Za.COLOR||n===Za.SIZE||n===Za.FACE)||x9.has(e)}function t3(t){for(let e=0;e<t.attrs.length;e++)if(t.attrs[e].name===p9){t.attrs[e].name=m9;break}}function r3(t){for(let e=0;e<t.attrs.length;e++){const r=g9.get(t.attrs[e].name);r!=null&&(t.attrs[e].name=r)}}function Nm(t){for(let e=0;e<t.attrs.length;e++){const r=b9.get(t.attrs[e].name);r&&(t.attrs[e].prefix=r.prefix,t.attrs[e].name=r.name,t.attrs[e].namespace=r.namespace)}}function k9(t){const e=y9.get(t.tagName);e!=null&&(t.tagName=e,t.tagID=Co(t.tagName))}function w9(t,e){return e===ge.MATHML&&(t===g.MI||t===g.MO||t===g.MN||t===g.MS||t===g.MTEXT)}function T9(t,e,r){if(e===ge.MATHML&&t===g.ANNOTATION_XML){for(let n=0;n<r.length;n++)if(r[n].name===Za.ENCODING){const i=r[n].value.toLowerCase();return i===g2.TEXT_HTML||i===g2.APPLICATION_XML}}return e===ge.SVG&&(t===g.FOREIGN_OBJECT||t===g.DESC||t===g.TITLE)}function C9(t,e,r,n){return(!n||n===ge.HTML)&&T9(t,e,r)||(!n||n===ge.MATHML)&&w9(t,e)}const S9="hidden",_9=8,E9=3;var q;(function(t){t[t.INITIAL=0]="INITIAL",t[t.BEFORE_HTML=1]="BEFORE_HTML",t[t.BEFORE_HEAD=2]="BEFORE_HEAD",t[t.IN_HEAD=3]="IN_HEAD",t[t.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",t[t.AFTER_HEAD=5]="AFTER_HEAD",t[t.IN_BODY=6]="IN_BODY",t[t.TEXT=7]="TEXT",t[t.IN_TABLE=8]="IN_TABLE",t[t.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",t[t.IN_CAPTION=10]="IN_CAPTION",t[t.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",t[t.IN_TABLE_BODY=12]="IN_TABLE_BODY",t[t.IN_ROW=13]="IN_ROW",t[t.IN_CELL=14]="IN_CELL",t[t.IN_SELECT=15]="IN_SELECT",t[t.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",t[t.IN_TEMPLATE=17]="IN_TEMPLATE",t[t.AFTER_BODY=18]="AFTER_BODY",t[t.IN_FRAMESET=19]="IN_FRAMESET",t[t.AFTER_FRAMESET=20]="AFTER_FRAMESET",t[t.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",t[t.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(q||(q={}));const A9={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},n3=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),b2={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ua,onParseError:null};let y2=class{constructor(e,r,n=null,i=null){this.fragmentContext=n,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=q.INITIAL,this.originalInsertionMode=q.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={...b2,...e},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=r??this.treeAdapter.createDocument(),this.tokenizer=new ZE(this.options,this),this.activeFormattingElements=new s9(this.treeAdapter),this.fragmentContextID=n?Co(this.treeAdapter.getTagName(n)):g.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new a9(this.document,this.treeAdapter,this)}static parse(e,r){const n=new this(r);return n.tokenizer.write(e,!0),n.document}static getFragmentParser(e,r){const n={...b2,...r};e??(e=n.treeAdapter.createElement(ne.TEMPLATE,ge.HTML,[]));const i=n.treeAdapter.createElement("documentmock",ge.HTML,[]),a=new this(n,i,e);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(q.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const e=this.treeAdapter.getFirstChild(this.document),r=this.treeAdapter.createDocumentFragment();return this._adoptNodes(e,r),r}_err(e,r,n){var i;if(!this.onParseError)return;const a=(i=e.location)!==null&&i!==void 0?i:A9,s={code:r,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(s)}onItemPush(e,r,n){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,e),n&&this.openElements.stackTop>0&&this._setContextModes(e,r)}onItemPop(e,r){var n,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),(i=(n=this.treeAdapter).onItemPop)===null||i===void 0||i.call(n,e,this.openElements.current),r){let a,s;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,s=this.fragmentContextID):{current:a,currentTagId:s}=this.openElements,this._setContextModes(a,s)}}_setContextModes(e,r){const n=e===this.document||e&&this.treeAdapter.getNamespaceURI(e)===ge.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&e!==void 0&&r!==void 0&&!this._isIntegrationPoint(r,e)}_switchToTextParsing(e,r){this._insertElement(e,ge.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=q.TEXT}switchToPlaintextParsing(){this.insertionMode=q.TEXT,this.originalInsertionMode=q.IN_BODY,this.tokenizer.state=er.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)===ne.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ge.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=er.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=er.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=er.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=er.PLAINTEXT;break}}}_setDocumentType(e){const r=e.name||"",n=e.publicId||"",i=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,n,i),e.location){const s=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));s&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}}_attachElementToTree(e,r){if(this.options.sourceCodeLocationInfo){const n=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n??this.document,e)}}_appendElement(e,r){const n=this.treeAdapter.createElement(e.tagName,r,e.attrs);this._attachElementToTree(n,e.location)}_insertElement(e,r){const n=this.treeAdapter.createElement(e.tagName,r,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}_insertFakeElement(e,r){const n=this.treeAdapter.createElement(e,ge.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,r)}_insertTemplate(e){const r=this.treeAdapter.createElement(e.tagName,ge.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,n),this._attachElementToTree(r,e.location),this.openElements.push(r,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){const e=this.treeAdapter.createElement(ne.HTML,ge.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,g.HTML)}_appendCommentNode(e,r){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(r,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}_insertCharacters(e){let r,n;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(r,e.chars,n):this.treeAdapter.insertText(r,e.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,e.chars)),!e.location)return;const i=this.treeAdapter.getChildNodes(r),a=n?i.lastIndexOf(n):i.length,s=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(s)){const{endLine:l,endCol:c,endOffset:u}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(s,{endLine:l,endCol:c,endOffset:u})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(s,e.location)}_adoptNodes(e,r){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(r,n)}_setEndLocation(e,r){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&r.location){const n=r.location,i=this.treeAdapter.getTagName(e),a=r.type===kt.END_TAG&&i===r.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,a)}}shouldProcessStartTagTokenInForeignContent(e){if(!this.currentNotInHTML)return!1;let r,n;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,n=this.fragmentContextID):{current:r,currentTagId:n}=this.openElements,e.tagID===g.SVG&&this.treeAdapter.getTagName(r)===ne.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===ge.MATHML?!1:this.tokenizer.inForeignNode||(e.tagID===g.MGLYPH||e.tagID===g.MALIGNMARK)&&n!==void 0&&!this._isIntegrationPoint(n,r,ge.HTML)}_processToken(e){switch(e.type){case kt.CHARACTER:{this.onCharacter(e);break}case kt.NULL_CHARACTER:{this.onNullCharacter(e);break}case kt.COMMENT:{this.onComment(e);break}case kt.DOCTYPE:{this.onDoctype(e);break}case kt.START_TAG:{this._processStartTag(e);break}case kt.END_TAG:{this.onEndTag(e);break}case kt.EOF:{this.onEof(e);break}case kt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(e);break}}}_isIntegrationPoint(e,r,n){const i=this.treeAdapter.getNamespaceURI(r),a=this.treeAdapter.getAttrList(r);return C9(e,i,a,n)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.entries.length;if(e){const r=this.activeFormattingElements.entries.findIndex(i=>i.type===ci.Marker||this.openElements.contains(i.element)),n=r===-1?e-1:r-1;for(let i=n;i>=0;i--){const a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=q.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let e=this.openElements.stackTop;e>=0;e--)switch(e===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case g.TR:{this.insertionMode=q.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=q.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=q.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=q.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=q.IN_TABLE;return}case g.BODY:{this.insertionMode=q.IN_BODY;return}case g.FRAMESET:{this.insertionMode=q.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(e);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?q.AFTER_HEAD:q.BEFORE_HEAD;return}case g.TD:case g.TH:{if(e>0){this.insertionMode=q.IN_CELL;return}break}case g.HEAD:{if(e>0){this.insertionMode=q.IN_HEAD;return}break}}this.insertionMode=q.IN_BODY}_resetInsertionModeForSelect(e){if(e>0)for(let r=e-1;r>0;r--){const n=this.openElements.tagIDs[r];if(n===g.TEMPLATE)break;if(n===g.TABLE){this.insertionMode=q.IN_SELECT_IN_TABLE;return}}this.insertionMode=q.IN_SELECT}_isElementCausesFosterParenting(e){return n3.has(e)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let e=this.openElements.stackTop;e>=0;e--){const r=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===ge.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case g.TABLE:{const n=this.treeAdapter.getParentNode(r);return n?{parent:n,beforeElement:r}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(e){const r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,e,r.beforeElement):this.treeAdapter.appendChild(r.parent,e)}_isSpecialElement(e,r){const n=this.treeAdapter.getNamespaceURI(e);return VE[n].has(r)}onCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){iN(this,e);return}switch(this.insertionMode){case q.INITIAL:{jo(this,e);break}case q.BEFORE_HTML:{Sl(this,e);break}case q.BEFORE_HEAD:{_l(this,e);break}case q.IN_HEAD:{El(this,e);break}case q.IN_HEAD_NO_SCRIPT:{Al(this,e);break}case q.AFTER_HEAD:{Nl(this,e);break}case q.IN_BODY:case q.IN_CAPTION:case q.IN_CELL:case q.IN_TEMPLATE:{a3(this,e);break}case q.TEXT:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:{this._insertCharacters(e);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{ud(this,e);break}case q.IN_TABLE_TEXT:{h3(this,e);break}case q.IN_COLUMN_GROUP:{ju(this,e);break}case q.AFTER_BODY:{Uu(this,e);break}case q.AFTER_AFTER_BODY:{ku(this,e);break}}}onNullCharacter(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){nN(this,e);return}switch(this.insertionMode){case q.INITIAL:{jo(this,e);break}case q.BEFORE_HTML:{Sl(this,e);break}case q.BEFORE_HEAD:{_l(this,e);break}case q.IN_HEAD:{El(this,e);break}case q.IN_HEAD_NO_SCRIPT:{Al(this,e);break}case q.AFTER_HEAD:{Nl(this,e);break}case q.TEXT:{this._insertCharacters(e);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{ud(this,e);break}case q.IN_COLUMN_GROUP:{ju(this,e);break}case q.AFTER_BODY:{Uu(this,e);break}case q.AFTER_AFTER_BODY:{ku(this,e);break}}}onComment(e){if(this.skipNextNewLine=!1,this.currentNotInHTML){Mf(this,e);return}switch(this.insertionMode){case q.INITIAL:case q.BEFORE_HTML:case q.BEFORE_HEAD:case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:case q.IN_BODY:case q.IN_TABLE:case q.IN_CAPTION:case q.IN_COLUMN_GROUP:case q.IN_TABLE_BODY:case q.IN_ROW:case q.IN_CELL:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:case q.IN_TEMPLATE:case q.IN_FRAMESET:case q.AFTER_FRAMESET:{Mf(this,e);break}case q.IN_TABLE_TEXT:{Uo(this,e);break}case q.AFTER_BODY:{D9(this,e);break}case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{O9(this,e);break}}}onDoctype(e){switch(this.skipNextNewLine=!1,this.insertionMode){case q.INITIAL:{P9(this,e);break}case q.BEFORE_HEAD:case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:{this._err(e,le.misplacedDoctype);break}case q.IN_TABLE_TEXT:{Uo(this,e);break}}}onStartTag(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,le.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(e){this.shouldProcessStartTagTokenInForeignContent(e)?aN(this,e):this._startTagOutsideForeignContent(e)}_startTagOutsideForeignContent(e){switch(this.insertionMode){case q.INITIAL:{jo(this,e);break}case q.BEFORE_HTML:{F9(this,e);break}case q.BEFORE_HEAD:{z9(this,e);break}case q.IN_HEAD:{Qn(this,e);break}case q.IN_HEAD_NO_SCRIPT:{j9(this,e);break}case q.AFTER_HEAD:{W9(this,e);break}case q.IN_BODY:{Or(this,e);break}case q.IN_TABLE:{ao(this,e);break}case q.IN_TABLE_TEXT:{Uo(this,e);break}case q.IN_CAPTION:{HA(this,e);break}case q.IN_COLUMN_GROUP:{Im(this,e);break}case q.IN_TABLE_BODY:{th(this,e);break}case q.IN_ROW:{rh(this,e);break}case q.IN_CELL:{UA(this,e);break}case q.IN_SELECT:{p3(this,e);break}case q.IN_SELECT_IN_TABLE:{GA(this,e);break}case q.IN_TEMPLATE:{VA(this,e);break}case q.AFTER_BODY:{KA(this,e);break}case q.IN_FRAMESET:{QA(this,e);break}case q.AFTER_FRAMESET:{JA(this,e);break}case q.AFTER_AFTER_BODY:{tN(this,e);break}case q.AFTER_AFTER_FRAMESET:{rN(this,e);break}}}onEndTag(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?sN(this,e):this._endTagOutsideForeignContent(e)}_endTagOutsideForeignContent(e){switch(this.insertionMode){case q.INITIAL:{jo(this,e);break}case q.BEFORE_HTML:{$9(this,e);break}case q.BEFORE_HEAD:{H9(this,e);break}case q.IN_HEAD:{q9(this,e);break}case q.IN_HEAD_NO_SCRIPT:{U9(this,e);break}case q.AFTER_HEAD:{G9(this,e);break}case q.IN_BODY:{eh(this,e);break}case q.TEXT:{MA(this,e);break}case q.IN_TABLE:{Wl(this,e);break}case q.IN_TABLE_TEXT:{Uo(this,e);break}case q.IN_CAPTION:{qA(this,e);break}case q.IN_COLUMN_GROUP:{jA(this,e);break}case q.IN_TABLE_BODY:{If(this,e);break}case q.IN_ROW:{f3(this,e);break}case q.IN_CELL:{WA(this,e);break}case q.IN_SELECT:{m3(this,e);break}case q.IN_SELECT_IN_TABLE:{YA(this,e);break}case q.IN_TEMPLATE:{XA(this,e);break}case q.AFTER_BODY:{b3(this,e);break}case q.IN_FRAMESET:{ZA(this,e);break}case q.AFTER_FRAMESET:{eN(this,e);break}case q.AFTER_AFTER_BODY:{ku(this,e);break}}}onEof(e){switch(this.insertionMode){case q.INITIAL:{jo(this,e);break}case q.BEFORE_HTML:{Sl(this,e);break}case q.BEFORE_HEAD:{_l(this,e);break}case q.IN_HEAD:{El(this,e);break}case q.IN_HEAD_NO_SCRIPT:{Al(this,e);break}case q.AFTER_HEAD:{Nl(this,e);break}case q.IN_BODY:case q.IN_TABLE:case q.IN_CAPTION:case q.IN_COLUMN_GROUP:case q.IN_TABLE_BODY:case q.IN_ROW:case q.IN_CELL:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:{c3(this,e);break}case q.TEXT:{IA(this,e);break}case q.IN_TABLE_TEXT:{Uo(this,e);break}case q.IN_TEMPLATE:{g3(this,e);break}case q.AFTER_BODY:case q.IN_FRAMESET:case q.AFTER_FRAMESET:case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{Mm(this,e);break}}}onWhitespaceCharacter(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===B.LINE_FEED)){if(e.chars.length===1)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(e);return}switch(this.insertionMode){case q.IN_HEAD:case q.IN_HEAD_NO_SCRIPT:case q.AFTER_HEAD:case q.TEXT:case q.IN_COLUMN_GROUP:case q.IN_SELECT:case q.IN_SELECT_IN_TABLE:case q.IN_FRAMESET:case q.AFTER_FRAMESET:{this._insertCharacters(e);break}case q.IN_BODY:case q.IN_CAPTION:case q.IN_CELL:case q.IN_TEMPLATE:case q.AFTER_BODY:case q.AFTER_AFTER_BODY:case q.AFTER_AFTER_FRAMESET:{i3(this,e);break}case q.IN_TABLE:case q.IN_TABLE_BODY:case q.IN_ROW:{ud(this,e);break}case q.IN_TABLE_TEXT:{u3(this,e);break}}}};function N9(t,e){let r=t.activeFormattingElements.getElementEntryInScopeWithTagName(e.tagName);return r?t.openElements.contains(r.element)?t.openElements.hasInScope(e.tagID)||(r=null):(t.activeFormattingElements.removeEntry(r),r=null):l3(t,e),r}function L9(t,e){let r=null,n=t.openElements.stackTop;for(;n>=0;n--){const i=t.openElements.items[n];if(i===e.element)break;t._isSpecialElement(i,t.openElements.tagIDs[n])&&(r=i)}return r||(t.openElements.shortenToLength(Math.max(n,0)),t.activeFormattingElements.removeEntry(e)),r}function M9(t,e,r){let n=e,i=t.openElements.getCommonAncestor(e);for(let a=0,s=i;s!==r;a++,s=i){i=t.openElements.getCommonAncestor(s);const o=t.activeFormattingElements.getElementEntry(s),l=o&&a>=E9;!o||l?(l&&t.activeFormattingElements.removeEntry(o),t.openElements.remove(s)):(s=I9(t,o),n===e&&(t.activeFormattingElements.bookmark=o),t.treeAdapter.detachNode(n),t.treeAdapter.appendChild(s,n),n=s)}return n}function I9(t,e){const r=t.treeAdapter.getNamespaceURI(e.element),n=t.treeAdapter.createElement(e.token.tagName,r,e.token.attrs);return t.openElements.replace(e.element,n),e.element=n,n}function R9(t,e,r){const n=t.treeAdapter.getTagName(e),i=Co(n);if(t._isElementCausesFosterParenting(i))t._fosterParentElement(r);else{const a=t.treeAdapter.getNamespaceURI(e);i===g.TEMPLATE&&a===ge.HTML&&(e=t.treeAdapter.getTemplateContent(e)),t.treeAdapter.appendChild(e,r)}}function B9(t,e,r){const n=t.treeAdapter.getNamespaceURI(r.element),{token:i}=r,a=t.treeAdapter.createElement(i.tagName,n,i.attrs);t._adoptNodes(e,a),t.treeAdapter.appendChild(e,a),t.activeFormattingElements.insertElementAfterBookmark(a,i),t.activeFormattingElements.removeEntry(r),t.openElements.remove(r.element),t.openElements.insertAfter(e,a,i.tagID)}function Lm(t,e){for(let r=0;r<_9;r++){const n=N9(t,e);if(!n)break;const i=L9(t,n);if(!i)break;t.activeFormattingElements.bookmark=n;const a=M9(t,i,n.element),s=t.openElements.getCommonAncestor(n.element);t.treeAdapter.detachNode(a),s&&R9(t,s,a),B9(t,i,n)}}function Mf(t,e){t._appendCommentNode(e,t.openElements.currentTmplContentOrNode)}function D9(t,e){t._appendCommentNode(e,t.openElements.items[0])}function O9(t,e){t._appendCommentNode(e,t.document)}function Mm(t,e){if(t.stopped=!0,e.location){const r=t.fragmentContext?0:2;for(let n=t.openElements.stackTop;n>=r;n--)t._setEndLocation(t.openElements.items[n],e);if(!t.fragmentContext&&t.openElements.stackTop>=0){const n=t.openElements.items[0],i=t.treeAdapter.getNodeSourceCodeLocation(n);if(i&&!i.endTag&&(t._setEndLocation(n,e),t.openElements.stackTop>=1)){const a=t.openElements.items[1],s=t.treeAdapter.getNodeSourceCodeLocation(a);s&&!s.endTag&&t._setEndLocation(a,e)}}}}function P9(t,e){t._setDocumentType(e);const r=e.forceQuirks?Ln.QUIRKS:f9(e);d9(e)||t._err(e,le.nonConformingDoctype),t.treeAdapter.setDocumentMode(t.document,r),t.insertionMode=q.BEFORE_HTML}function jo(t,e){t._err(e,le.missingDoctype,!0),t.treeAdapter.setDocumentMode(t.document,Ln.QUIRKS),t.insertionMode=q.BEFORE_HTML,t._processToken(e)}function F9(t,e){e.tagID===g.HTML?(t._insertElement(e,ge.HTML),t.insertionMode=q.BEFORE_HEAD):Sl(t,e)}function $9(t,e){const r=e.tagID;(r===g.HTML||r===g.HEAD||r===g.BODY||r===g.BR)&&Sl(t,e)}function Sl(t,e){t._insertFakeRootElement(),t.insertionMode=q.BEFORE_HEAD,t._processToken(e)}function z9(t,e){switch(e.tagID){case g.HTML:{Or(t,e);break}case g.HEAD:{t._insertElement(e,ge.HTML),t.headElement=t.openElements.current,t.insertionMode=q.IN_HEAD;break}default:_l(t,e)}}function H9(t,e){const r=e.tagID;r===g.HEAD||r===g.BODY||r===g.HTML||r===g.BR?_l(t,e):t._err(e,le.endTagWithoutMatchingOpenElement)}function _l(t,e){t._insertFakeElement(ne.HEAD,g.HEAD),t.headElement=t.openElements.current,t.insertionMode=q.IN_HEAD,t._processToken(e)}function Qn(t,e){switch(e.tagID){case g.HTML:{Or(t,e);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{t._appendElement(e,ge.HTML),e.ackSelfClosing=!0;break}case g.TITLE:{t._switchToTextParsing(e,er.RCDATA);break}case g.NOSCRIPT:{t.options.scriptingEnabled?t._switchToTextParsing(e,er.RAWTEXT):(t._insertElement(e,ge.HTML),t.insertionMode=q.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{t._switchToTextParsing(e,er.RAWTEXT);break}case g.SCRIPT:{t._switchToTextParsing(e,er.SCRIPT_DATA);break}case g.TEMPLATE:{t._insertTemplate(e),t.activeFormattingElements.insertMarker(),t.framesetOk=!1,t.insertionMode=q.IN_TEMPLATE,t.tmplInsertionModeStack.unshift(q.IN_TEMPLATE);break}case g.HEAD:{t._err(e,le.misplacedStartTagForHeadElement);break}default:El(t,e)}}function q9(t,e){switch(e.tagID){case g.HEAD:{t.openElements.pop(),t.insertionMode=q.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{El(t,e);break}case g.TEMPLATE:{ps(t,e);break}default:t._err(e,le.endTagWithoutMatchingOpenElement)}}function ps(t,e){t.openElements.tmplCount>0?(t.openElements.generateImpliedEndTagsThoroughly(),t.openElements.currentTagId!==g.TEMPLATE&&t._err(e,le.closingOfElementWithOpenChildElements),t.openElements.popUntilTagNamePopped(g.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode()):t._err(e,le.endTagWithoutMatchingOpenElement)}function El(t,e){t.openElements.pop(),t.insertionMode=q.AFTER_HEAD,t._processToken(e)}function j9(t,e){switch(e.tagID){case g.HTML:{Or(t,e);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Qn(t,e);break}case g.NOSCRIPT:{t._err(e,le.nestedNoscriptInHead);break}default:Al(t,e)}}function U9(t,e){switch(e.tagID){case g.NOSCRIPT:{t.openElements.pop(),t.insertionMode=q.IN_HEAD;break}case g.BR:{Al(t,e);break}default:t._err(e,le.endTagWithoutMatchingOpenElement)}}function Al(t,e){const r=e.type===kt.EOF?le.openElementsLeftAfterEof:le.disallowedContentInNoscriptInHead;t._err(e,r),t.openElements.pop(),t.insertionMode=q.IN_HEAD,t._processToken(e)}function W9(t,e){switch(e.tagID){case g.HTML:{Or(t,e);break}case g.BODY:{t._insertElement(e,ge.HTML),t.framesetOk=!1,t.insertionMode=q.IN_BODY;break}case g.FRAMESET:{t._insertElement(e,ge.HTML),t.insertionMode=q.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{t._err(e,le.abandonedHeadElementChild),t.openElements.push(t.headElement,g.HEAD),Qn(t,e),t.openElements.remove(t.headElement);break}case g.HEAD:{t._err(e,le.misplacedStartTagForHeadElement);break}default:Nl(t,e)}}function G9(t,e){switch(e.tagID){case g.BODY:case g.HTML:case g.BR:{Nl(t,e);break}case g.TEMPLATE:{ps(t,e);break}default:t._err(e,le.endTagWithoutMatchingOpenElement)}}function Nl(t,e){t._insertFakeElement(ne.BODY,g.BODY),t.insertionMode=q.IN_BODY,J0(t,e)}function J0(t,e){switch(e.type){case kt.CHARACTER:{a3(t,e);break}case kt.WHITESPACE_CHARACTER:{i3(t,e);break}case kt.COMMENT:{Mf(t,e);break}case kt.START_TAG:{Or(t,e);break}case kt.END_TAG:{eh(t,e);break}case kt.EOF:{c3(t,e);break}}}function i3(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e)}function a3(t,e){t._reconstructActiveFormattingElements(),t._insertCharacters(e),t.framesetOk=!1}function Y9(t,e){t.openElements.tmplCount===0&&t.treeAdapter.adoptAttributes(t.openElements.items[0],e.attrs)}function V9(t,e){const r=t.openElements.tryPeekProperlyNestedBodyElement();r&&t.openElements.tmplCount===0&&(t.framesetOk=!1,t.treeAdapter.adoptAttributes(r,e.attrs))}function X9(t,e){const r=t.openElements.tryPeekProperlyNestedBodyElement();t.framesetOk&&r&&(t.treeAdapter.detachNode(r),t.openElements.popAllUpToHtmlElement(),t._insertElement(e,ge.HTML),t.insertionMode=q.IN_FRAMESET)}function K9(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,ge.HTML)}function Q9(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t.openElements.currentTagId!==void 0&&Lf.has(t.openElements.currentTagId)&&t.openElements.pop(),t._insertElement(e,ge.HTML)}function Z9(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,ge.HTML),t.skipNextNewLine=!0,t.framesetOk=!1}function J9(t,e){const r=t.openElements.tmplCount>0;(!t.formElement||r)&&(t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,ge.HTML),r||(t.formElement=t.openElements.current))}function eA(t,e){t.framesetOk=!1;const r=e.tagID;for(let n=t.openElements.stackTop;n>=0;n--){const i=t.openElements.tagIDs[n];if(r===g.LI&&i===g.LI||(r===g.DD||r===g.DT)&&(i===g.DD||i===g.DT)){t.openElements.generateImpliedEndTagsWithExclusion(i),t.openElements.popUntilTagNamePopped(i);break}if(i!==g.ADDRESS&&i!==g.DIV&&i!==g.P&&t._isSpecialElement(t.openElements.items[n],i))break}t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,ge.HTML)}function tA(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,ge.HTML),t.tokenizer.state=er.PLAINTEXT}function rA(t,e){t.openElements.hasInScope(g.BUTTON)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(g.BUTTON)),t._reconstructActiveFormattingElements(),t._insertElement(e,ge.HTML),t.framesetOk=!1}function nA(t,e){const r=t.activeFormattingElements.getElementEntryInScopeWithTagName(ne.A);r&&(Lm(t,e),t.openElements.remove(r.element),t.activeFormattingElements.removeEntry(r)),t._reconstructActiveFormattingElements(),t._insertElement(e,ge.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function iA(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,ge.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function aA(t,e){t._reconstructActiveFormattingElements(),t.openElements.hasInScope(g.NOBR)&&(Lm(t,e),t._reconstructActiveFormattingElements()),t._insertElement(e,ge.HTML),t.activeFormattingElements.pushElement(t.openElements.current,e)}function sA(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,ge.HTML),t.activeFormattingElements.insertMarker(),t.framesetOk=!1}function oA(t,e){t.treeAdapter.getDocumentMode(t.document)!==Ln.QUIRKS&&t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._insertElement(e,ge.HTML),t.framesetOk=!1,t.insertionMode=q.IN_TABLE}function s3(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,ge.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function o3(t){const e=X4(t,Za.TYPE);return e!=null&&e.toLowerCase()===S9}function lA(t,e){t._reconstructActiveFormattingElements(),t._appendElement(e,ge.HTML),o3(e)||(t.framesetOk=!1),e.ackSelfClosing=!0}function cA(t,e){t._appendElement(e,ge.HTML),e.ackSelfClosing=!0}function uA(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._appendElement(e,ge.HTML),t.framesetOk=!1,e.ackSelfClosing=!0}function hA(t,e){e.tagName=ne.IMG,e.tagID=g.IMG,s3(t,e)}function dA(t,e){t._insertElement(e,ge.HTML),t.skipNextNewLine=!0,t.tokenizer.state=er.RCDATA,t.originalInsertionMode=t.insertionMode,t.framesetOk=!1,t.insertionMode=q.TEXT}function fA(t,e){t.openElements.hasInButtonScope(g.P)&&t._closePElement(),t._reconstructActiveFormattingElements(),t.framesetOk=!1,t._switchToTextParsing(e,er.RAWTEXT)}function pA(t,e){t.framesetOk=!1,t._switchToTextParsing(e,er.RAWTEXT)}function x2(t,e){t._switchToTextParsing(e,er.RAWTEXT)}function mA(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,ge.HTML),t.framesetOk=!1,t.insertionMode=t.insertionMode===q.IN_TABLE||t.insertionMode===q.IN_CAPTION||t.insertionMode===q.IN_TABLE_BODY||t.insertionMode===q.IN_ROW||t.insertionMode===q.IN_CELL?q.IN_SELECT_IN_TABLE:q.IN_SELECT}function gA(t,e){t.openElements.currentTagId===g.OPTION&&t.openElements.pop(),t._reconstructActiveFormattingElements(),t._insertElement(e,ge.HTML)}function bA(t,e){t.openElements.hasInScope(g.RUBY)&&t.openElements.generateImpliedEndTags(),t._insertElement(e,ge.HTML)}function yA(t,e){t.openElements.hasInScope(g.RUBY)&&t.openElements.generateImpliedEndTagsWithExclusion(g.RTC),t._insertElement(e,ge.HTML)}function xA(t,e){t._reconstructActiveFormattingElements(),t3(e),Nm(e),e.selfClosing?t._appendElement(e,ge.MATHML):t._insertElement(e,ge.MATHML),e.ackSelfClosing=!0}function vA(t,e){t._reconstructActiveFormattingElements(),r3(e),Nm(e),e.selfClosing?t._appendElement(e,ge.SVG):t._insertElement(e,ge.SVG),e.ackSelfClosing=!0}function v2(t,e){t._reconstructActiveFormattingElements(),t._insertElement(e,ge.HTML)}function Or(t,e){switch(e.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{iA(t,e);break}case g.A:{nA(t,e);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{Q9(t,e);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{K9(t,e);break}case g.LI:case g.DD:case g.DT:{eA(t,e);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{s3(t,e);break}case g.HR:{uA(t,e);break}case g.RB:case g.RTC:{bA(t,e);break}case g.RT:case g.RP:{yA(t,e);break}case g.PRE:case g.LISTING:{Z9(t,e);break}case g.XMP:{fA(t,e);break}case g.SVG:{vA(t,e);break}case g.HTML:{Y9(t,e);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Qn(t,e);break}case g.BODY:{V9(t,e);break}case g.FORM:{J9(t,e);break}case g.NOBR:{aA(t,e);break}case g.MATH:{xA(t,e);break}case g.TABLE:{oA(t,e);break}case g.INPUT:{lA(t,e);break}case g.PARAM:case g.TRACK:case g.SOURCE:{cA(t,e);break}case g.IMAGE:{hA(t,e);break}case g.BUTTON:{rA(t,e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{sA(t,e);break}case g.IFRAME:{pA(t,e);break}case g.SELECT:{mA(t,e);break}case g.OPTION:case g.OPTGROUP:{gA(t,e);break}case g.NOEMBED:case g.NOFRAMES:{x2(t,e);break}case g.FRAMESET:{X9(t,e);break}case g.TEXTAREA:{dA(t,e);break}case g.NOSCRIPT:{t.options.scriptingEnabled?x2(t,e):v2(t,e);break}case g.PLAINTEXT:{tA(t,e);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:v2(t,e)}}function kA(t,e){if(t.openElements.hasInScope(g.BODY)&&(t.insertionMode=q.AFTER_BODY,t.options.sourceCodeLocationInfo)){const r=t.openElements.tryPeekProperlyNestedBodyElement();r&&t._setEndLocation(r,e)}}function wA(t,e){t.openElements.hasInScope(g.BODY)&&(t.insertionMode=q.AFTER_BODY,b3(t,e))}function TA(t,e){const r=e.tagID;t.openElements.hasInScope(r)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(r))}function CA(t){const e=t.openElements.tmplCount>0,{formElement:r}=t;e||(t.formElement=null),(r||e)&&t.openElements.hasInScope(g.FORM)&&(t.openElements.generateImpliedEndTags(),e?t.openElements.popUntilTagNamePopped(g.FORM):r&&t.openElements.remove(r))}function SA(t){t.openElements.hasInButtonScope(g.P)||t._insertFakeElement(ne.P,g.P),t._closePElement()}function _A(t){t.openElements.hasInListItemScope(g.LI)&&(t.openElements.generateImpliedEndTagsWithExclusion(g.LI),t.openElements.popUntilTagNamePopped(g.LI))}function EA(t,e){const r=e.tagID;t.openElements.hasInScope(r)&&(t.openElements.generateImpliedEndTagsWithExclusion(r),t.openElements.popUntilTagNamePopped(r))}function AA(t){t.openElements.hasNumberedHeaderInScope()&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilNumberedHeaderPopped())}function NA(t,e){const r=e.tagID;t.openElements.hasInScope(r)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(r),t.activeFormattingElements.clearToLastMarker())}function LA(t){t._reconstructActiveFormattingElements(),t._insertFakeElement(ne.BR,g.BR),t.openElements.pop(),t.framesetOk=!1}function l3(t,e){const r=e.tagName,n=e.tagID;for(let i=t.openElements.stackTop;i>0;i--){const a=t.openElements.items[i],s=t.openElements.tagIDs[i];if(n===s&&(n!==g.UNKNOWN||t.treeAdapter.getTagName(a)===r)){t.openElements.generateImpliedEndTagsWithExclusion(n),t.openElements.stackTop>=i&&t.openElements.shortenToLength(i);break}if(t._isSpecialElement(a,s))break}}function eh(t,e){switch(e.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{Lm(t,e);break}case g.P:{SA(t);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{TA(t,e);break}case g.LI:{_A(t);break}case g.DD:case g.DT:{EA(t,e);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{AA(t);break}case g.BR:{LA(t);break}case g.BODY:{kA(t,e);break}case g.HTML:{wA(t,e);break}case g.FORM:{CA(t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{NA(t,e);break}case g.TEMPLATE:{ps(t,e);break}default:l3(t,e)}}function c3(t,e){t.tmplInsertionModeStack.length>0?g3(t,e):Mm(t,e)}function MA(t,e){var r;e.tagID===g.SCRIPT&&((r=t.scriptHandler)===null||r===void 0||r.call(t,t.openElements.current)),t.openElements.pop(),t.insertionMode=t.originalInsertionMode}function IA(t,e){t._err(e,le.eofInElementThatCanContainOnlyText),t.openElements.pop(),t.insertionMode=t.originalInsertionMode,t.onEof(e)}function ud(t,e){if(t.openElements.currentTagId!==void 0&&n3.has(t.openElements.currentTagId))switch(t.pendingCharacterTokens.length=0,t.hasNonWhitespacePendingCharacterToken=!1,t.originalInsertionMode=t.insertionMode,t.insertionMode=q.IN_TABLE_TEXT,e.type){case kt.CHARACTER:{h3(t,e);break}case kt.WHITESPACE_CHARACTER:{u3(t,e);break}}else yc(t,e)}function RA(t,e){t.openElements.clearBackToTableContext(),t.activeFormattingElements.insertMarker(),t._insertElement(e,ge.HTML),t.insertionMode=q.IN_CAPTION}function BA(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,ge.HTML),t.insertionMode=q.IN_COLUMN_GROUP}function DA(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(ne.COLGROUP,g.COLGROUP),t.insertionMode=q.IN_COLUMN_GROUP,Im(t,e)}function OA(t,e){t.openElements.clearBackToTableContext(),t._insertElement(e,ge.HTML),t.insertionMode=q.IN_TABLE_BODY}function PA(t,e){t.openElements.clearBackToTableContext(),t._insertFakeElement(ne.TBODY,g.TBODY),t.insertionMode=q.IN_TABLE_BODY,th(t,e)}function FA(t,e){t.openElements.hasInTableScope(g.TABLE)&&(t.openElements.popUntilTagNamePopped(g.TABLE),t._resetInsertionMode(),t._processStartTag(e))}function $A(t,e){o3(e)?t._appendElement(e,ge.HTML):yc(t,e),e.ackSelfClosing=!0}function zA(t,e){!t.formElement&&t.openElements.tmplCount===0&&(t._insertElement(e,ge.HTML),t.formElement=t.openElements.current,t.openElements.pop())}function ao(t,e){switch(e.tagID){case g.TD:case g.TH:case g.TR:{PA(t,e);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Qn(t,e);break}case g.COL:{DA(t,e);break}case g.FORM:{zA(t,e);break}case g.TABLE:{FA(t,e);break}case g.TBODY:case g.TFOOT:case g.THEAD:{OA(t,e);break}case g.INPUT:{$A(t,e);break}case g.CAPTION:{RA(t,e);break}case g.COLGROUP:{BA(t,e);break}default:yc(t,e)}}function Wl(t,e){switch(e.tagID){case g.TABLE:{t.openElements.hasInTableScope(g.TABLE)&&(t.openElements.popUntilTagNamePopped(g.TABLE),t._resetInsertionMode());break}case g.TEMPLATE:{ps(t,e);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:yc(t,e)}}function yc(t,e){const r=t.fosterParentingEnabled;t.fosterParentingEnabled=!0,J0(t,e),t.fosterParentingEnabled=r}function u3(t,e){t.pendingCharacterTokens.push(e)}function h3(t,e){t.pendingCharacterTokens.push(e),t.hasNonWhitespacePendingCharacterToken=!0}function Uo(t,e){let r=0;if(t.hasNonWhitespacePendingCharacterToken)for(;r<t.pendingCharacterTokens.length;r++)yc(t,t.pendingCharacterTokens[r]);else for(;r<t.pendingCharacterTokens.length;r++)t._insertCharacters(t.pendingCharacterTokens[r]);t.insertionMode=t.originalInsertionMode,t._processToken(e)}const d3=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function HA(t,e){const r=e.tagID;d3.has(r)?t.openElements.hasInTableScope(g.CAPTION)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(g.CAPTION),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=q.IN_TABLE,ao(t,e)):Or(t,e)}function qA(t,e){const r=e.tagID;switch(r){case g.CAPTION:case g.TABLE:{t.openElements.hasInTableScope(g.CAPTION)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(g.CAPTION),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=q.IN_TABLE,r===g.TABLE&&Wl(t,e));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:eh(t,e)}}function Im(t,e){switch(e.tagID){case g.HTML:{Or(t,e);break}case g.COL:{t._appendElement(e,ge.HTML),e.ackSelfClosing=!0;break}case g.TEMPLATE:{Qn(t,e);break}default:ju(t,e)}}function jA(t,e){switch(e.tagID){case g.COLGROUP:{t.openElements.currentTagId===g.COLGROUP&&(t.openElements.pop(),t.insertionMode=q.IN_TABLE);break}case g.TEMPLATE:{ps(t,e);break}case g.COL:break;default:ju(t,e)}}function ju(t,e){t.openElements.currentTagId===g.COLGROUP&&(t.openElements.pop(),t.insertionMode=q.IN_TABLE,t._processToken(e))}function th(t,e){switch(e.tagID){case g.TR:{t.openElements.clearBackToTableBodyContext(),t._insertElement(e,ge.HTML),t.insertionMode=q.IN_ROW;break}case g.TH:case g.TD:{t.openElements.clearBackToTableBodyContext(),t._insertFakeElement(ne.TR,g.TR),t.insertionMode=q.IN_ROW,rh(t,e);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{t.openElements.hasTableBodyContextInTableScope()&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=q.IN_TABLE,ao(t,e));break}default:ao(t,e)}}function If(t,e){const r=e.tagID;switch(e.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{t.openElements.hasInTableScope(r)&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=q.IN_TABLE);break}case g.TABLE:{t.openElements.hasTableBodyContextInTableScope()&&(t.openElements.clearBackToTableBodyContext(),t.openElements.pop(),t.insertionMode=q.IN_TABLE,Wl(t,e));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:Wl(t,e)}}function rh(t,e){switch(e.tagID){case g.TH:case g.TD:{t.openElements.clearBackToTableRowContext(),t._insertElement(e,ge.HTML),t.insertionMode=q.IN_CELL,t.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{t.openElements.hasInTableScope(g.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=q.IN_TABLE_BODY,th(t,e));break}default:ao(t,e)}}function f3(t,e){switch(e.tagID){case g.TR:{t.openElements.hasInTableScope(g.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=q.IN_TABLE_BODY);break}case g.TABLE:{t.openElements.hasInTableScope(g.TR)&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=q.IN_TABLE_BODY,If(t,e));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(t.openElements.hasInTableScope(e.tagID)||t.openElements.hasInTableScope(g.TR))&&(t.openElements.clearBackToTableRowContext(),t.openElements.pop(),t.insertionMode=q.IN_TABLE_BODY,If(t,e));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:Wl(t,e)}}function UA(t,e){const r=e.tagID;d3.has(r)?(t.openElements.hasInTableScope(g.TD)||t.openElements.hasInTableScope(g.TH))&&(t._closeTableCell(),rh(t,e)):Or(t,e)}function WA(t,e){const r=e.tagID;switch(r){case g.TD:case g.TH:{t.openElements.hasInTableScope(r)&&(t.openElements.generateImpliedEndTags(),t.openElements.popUntilTagNamePopped(r),t.activeFormattingElements.clearToLastMarker(),t.insertionMode=q.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{t.openElements.hasInTableScope(r)&&(t._closeTableCell(),f3(t,e));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:eh(t,e)}}function p3(t,e){switch(e.tagID){case g.HTML:{Or(t,e);break}case g.OPTION:{t.openElements.currentTagId===g.OPTION&&t.openElements.pop(),t._insertElement(e,ge.HTML);break}case g.OPTGROUP:{t.openElements.currentTagId===g.OPTION&&t.openElements.pop(),t.openElements.currentTagId===g.OPTGROUP&&t.openElements.pop(),t._insertElement(e,ge.HTML);break}case g.HR:{t.openElements.currentTagId===g.OPTION&&t.openElements.pop(),t.openElements.currentTagId===g.OPTGROUP&&t.openElements.pop(),t._appendElement(e,ge.HTML),e.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{t.openElements.hasInSelectScope(g.SELECT)&&(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode(),e.tagID!==g.SELECT&&t._processStartTag(e));break}case g.SCRIPT:case g.TEMPLATE:{Qn(t,e);break}}}function m3(t,e){switch(e.tagID){case g.OPTGROUP:{t.openElements.stackTop>0&&t.openElements.currentTagId===g.OPTION&&t.openElements.tagIDs[t.openElements.stackTop-1]===g.OPTGROUP&&t.openElements.pop(),t.openElements.currentTagId===g.OPTGROUP&&t.openElements.pop();break}case g.OPTION:{t.openElements.currentTagId===g.OPTION&&t.openElements.pop();break}case g.SELECT:{t.openElements.hasInSelectScope(g.SELECT)&&(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode());break}case g.TEMPLATE:{ps(t,e);break}}}function GA(t,e){const r=e.tagID;r===g.CAPTION||r===g.TABLE||r===g.TBODY||r===g.TFOOT||r===g.THEAD||r===g.TR||r===g.TD||r===g.TH?(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode(),t._processStartTag(e)):p3(t,e)}function YA(t,e){const r=e.tagID;r===g.CAPTION||r===g.TABLE||r===g.TBODY||r===g.TFOOT||r===g.THEAD||r===g.TR||r===g.TD||r===g.TH?t.openElements.hasInTableScope(r)&&(t.openElements.popUntilTagNamePopped(g.SELECT),t._resetInsertionMode(),t.onEndTag(e)):m3(t,e)}function VA(t,e){switch(e.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Qn(t,e);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{t.tmplInsertionModeStack[0]=q.IN_TABLE,t.insertionMode=q.IN_TABLE,ao(t,e);break}case g.COL:{t.tmplInsertionModeStack[0]=q.IN_COLUMN_GROUP,t.insertionMode=q.IN_COLUMN_GROUP,Im(t,e);break}case g.TR:{t.tmplInsertionModeStack[0]=q.IN_TABLE_BODY,t.insertionMode=q.IN_TABLE_BODY,th(t,e);break}case g.TD:case g.TH:{t.tmplInsertionModeStack[0]=q.IN_ROW,t.insertionMode=q.IN_ROW,rh(t,e);break}default:t.tmplInsertionModeStack[0]=q.IN_BODY,t.insertionMode=q.IN_BODY,Or(t,e)}}function XA(t,e){e.tagID===g.TEMPLATE&&ps(t,e)}function g3(t,e){t.openElements.tmplCount>0?(t.openElements.popUntilTagNamePopped(g.TEMPLATE),t.activeFormattingElements.clearToLastMarker(),t.tmplInsertionModeStack.shift(),t._resetInsertionMode(),t.onEof(e)):Mm(t,e)}function KA(t,e){e.tagID===g.HTML?Or(t,e):Uu(t,e)}function b3(t,e){var r;if(e.tagID===g.HTML){if(t.fragmentContext||(t.insertionMode=q.AFTER_AFTER_BODY),t.options.sourceCodeLocationInfo&&t.openElements.tagIDs[0]===g.HTML){t._setEndLocation(t.openElements.items[0],e);const n=t.openElements.items[1];n&&!(!((r=t.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&t._setEndLocation(n,e)}}else Uu(t,e)}function Uu(t,e){t.insertionMode=q.IN_BODY,J0(t,e)}function QA(t,e){switch(e.tagID){case g.HTML:{Or(t,e);break}case g.FRAMESET:{t._insertElement(e,ge.HTML);break}case g.FRAME:{t._appendElement(e,ge.HTML),e.ackSelfClosing=!0;break}case g.NOFRAMES:{Qn(t,e);break}}}function ZA(t,e){e.tagID===g.FRAMESET&&!t.openElements.isRootHtmlElementCurrent()&&(t.openElements.pop(),!t.fragmentContext&&t.openElements.currentTagId!==g.FRAMESET&&(t.insertionMode=q.AFTER_FRAMESET))}function JA(t,e){switch(e.tagID){case g.HTML:{Or(t,e);break}case g.NOFRAMES:{Qn(t,e);break}}}function eN(t,e){e.tagID===g.HTML&&(t.insertionMode=q.AFTER_AFTER_FRAMESET)}function tN(t,e){e.tagID===g.HTML?Or(t,e):ku(t,e)}function ku(t,e){t.insertionMode=q.IN_BODY,J0(t,e)}function rN(t,e){switch(e.tagID){case g.HTML:{Or(t,e);break}case g.NOFRAMES:{Qn(t,e);break}}}function nN(t,e){e.chars=Gt,t._insertCharacters(e)}function iN(t,e){t._insertCharacters(e),t.framesetOk=!1}function y3(t){for(;t.treeAdapter.getNamespaceURI(t.openElements.current)!==ge.HTML&&t.openElements.currentTagId!==void 0&&!t._isIntegrationPoint(t.openElements.currentTagId,t.openElements.current);)t.openElements.pop()}function aN(t,e){if(v9(e))y3(t),t._startTagOutsideForeignContent(e);else{const r=t._getAdjustedCurrentElement(),n=t.treeAdapter.getNamespaceURI(r);n===ge.MATHML?t3(e):n===ge.SVG&&(k9(e),r3(e)),Nm(e),e.selfClosing?t._appendElement(e,n):t._insertElement(e,n),e.ackSelfClosing=!0}}function sN(t,e){if(e.tagID===g.P||e.tagID===g.BR){y3(t),t._endTagOutsideForeignContent(e);return}for(let r=t.openElements.stackTop;r>0;r--){const n=t.openElements.items[r];if(t.treeAdapter.getNamespaceURI(n)===ge.HTML){t._endTagOutsideForeignContent(e);break}const i=t.treeAdapter.getTagName(n);if(i.toLowerCase()===e.tagName){e.tagName=i,t.openElements.shortenToLength(r);break}}}ne.AREA,ne.BASE,ne.BASEFONT,ne.BGSOUND,ne.BR,ne.COL,ne.EMBED,ne.FRAME,ne.HR,ne.IMG,ne.INPUT,ne.KEYGEN,ne.LINK,ne.META,ne.PARAM,ne.SOURCE,ne.TRACK,ne.WBR;const nh=x3("end"),xi=x3("start");function x3(t){return e;function e(r){const n=r&&r.position&&r.position[t]||{};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 v3(t){const e=xi(t),r=nh(t);if(e&&r)return{start:e,end:r}}const oN=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,lN=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),k2={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function k3(t,e){const r=yN(t),n=Em("type",{handlers:{root:cN,element:uN,text:hN,comment:T3,doctype:dN,raw:pN},unknown:mN}),i={parser:r?new y2(k2):y2.getFragmentParser(void 0,k2),handle(o){n(o,i)},stitches:!1,options:e||{}};n(t,i),So(i,xi());const a=r?i.parser.document:i.parser.getFragment(),s=vE(a,{file:i.options.file});return i.stitches&&io(s,"comment",function(o,l,c){const u=o;if(u.value.stitch&&c&&l!==void 0){const h=c.children;return h[l]=u.value.stitch,l}}),s.type==="root"&&s.children.length===1&&s.children[0].type===t.type?s.children[0]:s}function w3(t,e){let r=-1;if(t)for(;++r<t.length;)e.handle(t[r])}function cN(t,e){w3(t.children,e)}function uN(t,e){gN(t,e),w3(t.children,e),bN(t,e)}function hN(t,e){e.parser.tokenizer.state>4&&(e.parser.tokenizer.state=0);const r={type:kt.CHARACTER,chars:t.value,location:xc(t)};So(e,xi(t)),e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)}function dN(t,e){const r={type:kt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:xc(t)};So(e,xi(t)),e.parser.currentToken=r,e.parser._processToken(e.parser.currentToken)}function fN(t,e){e.stitches=!0;const r=xN(t);if("children"in t&&"children"in r){const n=k3({type:"root",children:t.children},e.options);r.children=n.children}T3({type:"comment",value:{stitch:r}},e)}function T3(t,e){const r=t.value,n={type:kt.COMMENT,data:r,location:xc(t)};So(e,xi(t)),e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)}function pN(t,e){if(e.parser.tokenizer.preprocessor.html="",e.parser.tokenizer.preprocessor.pos=-1,e.parser.tokenizer.preprocessor.lastGapPos=-2,e.parser.tokenizer.preprocessor.gapStack=[],e.parser.tokenizer.preprocessor.skipNextNewLine=!1,e.parser.tokenizer.preprocessor.lastChunkWritten=!1,e.parser.tokenizer.preprocessor.endOfChunkHit=!1,e.parser.tokenizer.preprocessor.isEol=!1,C3(e,xi(t)),e.parser.tokenizer.write(e.options.tagfilter?t.value.replace(oN,"&lt;$1$2"):t.value,!1),e.parser.tokenizer._runParsingLoop(),e.parser.tokenizer.state===72||e.parser.tokenizer.state===78){e.parser.tokenizer.preprocessor.lastChunkWritten=!0;const r=e.parser.tokenizer._consume();e.parser.tokenizer._callState(r)}}function mN(t,e){const r=t;if(e.options.passThrough&&e.options.passThrough.includes(r.type))fN(r,e);else{let n="";throw lN.has(r.type)&&(n=". 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"),new Error("Cannot compile `"+r.type+"` node"+n)}}function So(t,e){C3(t,e);const r=t.parser.tokenizer.currentCharacterToken;r&&r.location&&(r.location.endLine=t.parser.tokenizer.preprocessor.line,r.location.endCol=t.parser.tokenizer.preprocessor.col+1,r.location.endOffset=t.parser.tokenizer.preprocessor.offset+1,t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)),t.parser.tokenizer.paused=!1,t.parser.tokenizer.inLoop=!1,t.parser.tokenizer.active=!1,t.parser.tokenizer.returnState=er.DATA,t.parser.tokenizer.charRefCode=-1,t.parser.tokenizer.consumedAfterSnapshot=-1,t.parser.tokenizer.currentLocation=null,t.parser.tokenizer.currentCharacterToken=null,t.parser.tokenizer.currentToken=null,t.parser.tokenizer.currentAttr={name:"",value:""}}function C3(t,e){if(e&&e.offset!==void 0){const r={startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:-1,endCol:-1,endOffset:-1};t.parser.tokenizer.preprocessor.lineStartPos=-e.column+1,t.parser.tokenizer.preprocessor.droppedBufferSize=e.offset,t.parser.tokenizer.preprocessor.line=e.line,t.parser.tokenizer.currentLocation=r}}function gN(t,e){const r=t.tagName.toLowerCase();if(e.parser.tokenizer.state===er.PLAINTEXT)return;So(e,xi(t));const n=e.parser.openElements.current;let i="namespaceURI"in n?n.namespaceURI:di.html;i===di.html&&r==="svg"&&(i=di.svg);const a=SE({...t,children:[]},{space:i===di.svg?"svg":"html"}),s={type:kt.START_TAG,tagName:r,tagID:Co(r),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:xc(t)};e.parser.currentToken=s,e.parser._processToken(e.parser.currentToken),e.parser.tokenizer.lastStartTagName=r}function bN(t,e){const r=t.tagName.toLowerCase();if(!e.parser.tokenizer.inForeignNode&&W4.includes(r)||e.parser.tokenizer.state===er.PLAINTEXT)return;So(e,nh(t));const n={type:kt.END_TAG,tagName:r,tagID:Co(r),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:xc(t)};e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken),r===e.parser.tokenizer.lastStartTagName&&(e.parser.tokenizer.state===er.RCDATA||e.parser.tokenizer.state===er.RAWTEXT||e.parser.tokenizer.state===er.SCRIPT_DATA)&&(e.parser.tokenizer.state=er.DATA)}function yN(t){const e=t.type==="root"?t.children[0]:t;return!!(e&&(e.type==="doctype"||e.type==="element"&&e.tagName.toLowerCase()==="html"))}function xc(t){const e=xi(t)||{line:void 0,column:void 0,offset:void 0},r=nh(t)||{line:void 0,column:void 0,offset:void 0};return{startLine:e.line,startCol:e.column,startOffset:e.offset,endLine:r.line,endCol:r.column,endOffset:r.offset}}function xN(t){return"children"in t?ts({...t,children:[]}):ts(t)}function vN(t){return function(e,r){return k3(e,{...t,file:r})}}const Oa=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],w2={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Oa,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Oa],h2:[["className","sr-only"]],img:[...Oa,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Oa,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Oa],table:[...Oa],ul:[...Oa,["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"]},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"]},fa={}.hasOwnProperty;function kN(t,e){let r={type:"root",children:[]};const n={schema:e?{...w2,...e}:w2,stack:[]},i=S3(n,t);return i&&(Array.isArray(i)?i.length===1?r=i[0]:r.children=i:r=i),r}function S3(t,e){if(e&&typeof e=="object"){const r=e;switch(typeof r.type=="string"?r.type:""){case"comment":return wN(t,r);case"doctype":return TN(t,r);case"element":return CN(t,r);case"root":return SN(t,r);case"text":return _N(t,r)}}}function wN(t,e){if(t.schema.allowComments){const r=typeof e.value=="string"?e.value:"",n=r.indexOf("-->"),a={type:"comment",value:n<0?r:r.slice(0,n)};return vc(a,e),a}}function TN(t,e){if(t.schema.allowDoctypes){const r={type:"doctype"};return vc(r,e),r}}function CN(t,e){const r=typeof e.tagName=="string"?e.tagName:"";t.stack.push(r);const n=_3(t,e.children),i=EN(t,e.properties);t.stack.pop();let a=!1;if(r&&r!=="*"&&(!t.schema.tagNames||t.schema.tagNames.includes(r))&&(a=!0,t.schema.ancestors&&fa.call(t.schema.ancestors,r))){const o=t.schema.ancestors[r];let l=-1;for(a=!1;++l<o.length;)t.stack.includes(o[l])&&(a=!0)}if(!a)return t.schema.strip&&!t.schema.strip.includes(r)?n:void 0;const s={type:"element",tagName:r,properties:i,children:n};return vc(s,e),s}function SN(t,e){const n={type:"root",children:_3(t,e.children)};return vc(n,e),n}function _N(t,e){const n={type:"text",value:typeof e.value=="string"?e.value:""};return vc(n,e),n}function _3(t,e){const r=[];if(Array.isArray(e)){const n=e;let i=-1;for(;++i<n.length;){const a=S3(t,n[i]);a&&(Array.isArray(a)?r.push(...a):r.push(a))}}return r}function EN(t,e){const r=t.stack[t.stack.length-1],n=t.schema.attributes,i=t.schema.required,a=n&&fa.call(n,r)?n[r]:void 0,s=n&&fa.call(n,"*")?n["*"]:void 0,o=e&&typeof e=="object"?e:{},l={};let c;for(c in o)if(fa.call(o,c)){const u=o[c];let h=T2(t,C2(a,c),c,u);h==null&&(h=T2(t,C2(s,c),c,u)),h!=null&&(l[c]=h)}if(i&&fa.call(i,r)){const u=i[r];for(c in u)fa.call(u,c)&&!fa.call(l,c)&&(l[c]=u[c])}return l}function T2(t,e,r,n){return e?Array.isArray(n)?AN(t,e,r,n):E3(t,e,r,n):void 0}function AN(t,e,r,n){let i=-1;const a=[];for(;++i<n.length;){const s=E3(t,e,r,n[i]);(typeof s=="number"||typeof s=="string")&&a.push(s)}return a}function E3(t,e,r,n){if(!(typeof n!="boolean"&&typeof n!="number"&&typeof n!="string")&&NN(t,r,n)){if(typeof e=="object"&&e.length>1){let i=!1,a=0;for(;++a<e.length;){const s=e[a];if(s&&typeof s=="object"&&"flags"in s){if(s.test(String(n))){i=!0;break}}else if(s===n){i=!0;break}}if(!i)return}return t.schema.clobber&&t.schema.clobberPrefix&&t.schema.clobber.includes(r)?t.schema.clobberPrefix+n:n}}function NN(t,e,r){const n=t.schema.protocols&&fa.call(t.schema.protocols,e)?t.schema.protocols[e]:void 0;if(!n||n.length===0)return!0;const i=String(r),a=i.indexOf(":"),s=i.indexOf("?"),o=i.indexOf("#"),l=i.indexOf("/");if(a<0||l>-1&&a>l||s>-1&&a>s||o>-1&&a>o)return!0;let c=-1;for(;++c<n.length;){const u=n[c];if(a===u.length&&i.slice(0,u.length)===u)return!0}return!1}function vc(t,e){const r=v3(e);e.data&&(t.data=ts(e.data)),r&&(t.position=r)}function C2(t,e){let r,n=-1;if(t)for(;++n<t.length;){const i=t[n],a=typeof i=="string"?i:i[0];if(a===e)return i;a==="data*"&&(r=i)}if(e.length>4&&e.slice(0,4).toLowerCase()==="data")return r}function LN(t){return function(e){return kN(e,t)}}function Wu(t,e){const r=String(t);if(typeof e!="string")throw new TypeError("Expected character");let n=0,i=r.indexOf(e);for(;i!==-1;)n++,i=r.indexOf(e,i+e.length);return n}const qr=Ea(/[A-Za-z]/),Rr=Ea(/[\dA-Za-z]/),MN=Ea(/[#-'*+\--9=?A-Z^-~]/);function Gu(t){return t!==null&&(t<32||t===127)}const Rf=Ea(/\d/),IN=Ea(/[\dA-Fa-f]/),RN=Ea(/[!-/:-@[-`{-~]/);function Ye(t){return t!==null&&t<-2}function Ft(t){return t!==null&&(t<0||t===32)}function Tt(t){return t===-2||t===-1||t===32}const ih=Ea(new RegExp("\\p{P}|\\p{S}","u")),rs=Ea(/\s/);function Ea(t){return e;function e(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function BN(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function DN(t,e,r){const i=mc((r||{}).ignore||[]),a=ON(e);let s=-1;for(;++s<a.length;)ym(t,"text",o);function o(c,u){let h=-1,d;for(;++h<u.length;){const f=u[h],p=d?d.children:void 0;if(i(f,p?p.indexOf(f):void 0,d))return;d=f}if(d)return l(c,u)}function l(c,u){const h=u[u.length-1],d=a[s][0],f=a[s][1];let p=0;const y=h.children.indexOf(c);let b=!1,v=[];d.lastIndex=0;let C=d.exec(c.value);for(;C;){const E=C.index,_={index:C.index,input:C.input,stack:[...u,c]};let k=f(...C,_);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?d.lastIndex=E+1:(p!==E&&v.push({type:"text",value:c.value.slice(p,E)}),Array.isArray(k)?v.push(...k):k&&v.push(k),p=E+C[0].length,b=!0),!d.global)break;C=d.exec(c.value)}return b?(p<c.value.length&&v.push({type:"text",value:c.value.slice(p)}),h.children.splice(y,1,...v)):v=[c],y+v.length}}function ON(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!t[0]||Array.isArray(t[0])?t:[t];let n=-1;for(;++n<r.length;){const i=r[n];e.push([PN(i[0]),FN(i[1])])}return e}function PN(t){return typeof t=="string"?new RegExp(BN(t),"g"):t}function FN(t){return typeof t=="function"?t:function(){return t}}const hd="phrasing",dd=["autolink","link","image","label"];function $N(){return{transforms:[GN],enter:{literalAutolink:HN,literalAutolinkEmail:fd,literalAutolinkHttp:fd,literalAutolinkWww:fd},exit:{literalAutolink:WN,literalAutolinkEmail:UN,literalAutolinkHttp:qN,literalAutolinkWww:jN}}}function zN(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:hd,notInConstruct:dd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:hd,notInConstruct:dd},{character:":",before:"[ps]",after:"\\/",inConstruct:hd,notInConstruct:dd}]}}function HN(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function fd(t){this.config.enter.autolinkProtocol.call(this,t)}function qN(t){this.config.exit.autolinkProtocol.call(this,t)}function jN(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function UN(t){this.config.exit.autolinkEmail.call(this,t)}function WN(t){this.exit(t)}function GN(t){DN(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,YN],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),VN]],{ignore:["link","linkReference"]})}function YN(t,e,r,n,i){let a="";if(!A3(i)||(/^w/i.test(e)&&(r=e+r,e="",a="http://"),!XN(r)))return!1;const s=KN(r+n);if(!s[0])return!1;const o={type:"link",title:null,url:a+e+s[0],children:[{type:"text",value:e+s[0]}]};return s[1]?[o,{type:"text",value:s[1]}]:o}function VN(t,e,r,n){return!A3(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+r,children:[{type:"text",value:e+"@"+r}]}}function XN(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function KN(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let r=e[0],n=r.indexOf(")");const i=Wu(t,"(");let a=Wu(t,")");for(;n!==-1&&i>a;)t+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),a++;return[t,r]}function A3(t,e){const r=t.input.charCodeAt(t.index-1);return(t.index===0||rs(r)||ih(r))&&(!e||r!==47)}function Yn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}N3.peek=aL;function QN(){this.buffer()}function ZN(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function JN(){this.buffer()}function eL(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function tL(t){const e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Yn(this.sliceSerialize(t)).toLowerCase(),r.label=e}function rL(t){this.exit(t)}function nL(t){const e=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Yn(this.sliceSerialize(t)).toLowerCase(),r.label=e}function iL(t){this.exit(t)}function aL(){return"["}function N3(t,e,r,n){const i=r.createTracker(n);let a=i.move("[^");const s=r.enter("footnoteReference"),o=r.enter("reference");return a+=i.move(r.safe(r.associationId(t),{after:"]",before:a})),o(),s(),a+=i.move("]"),a}function sL(){return{enter:{gfmFootnoteCallString:QN,gfmFootnoteCall:ZN,gfmFootnoteDefinitionLabelString:JN,gfmFootnoteDefinition:eL},exit:{gfmFootnoteCallString:tL,gfmFootnoteCall:rL,gfmFootnoteDefinitionLabelString:nL,gfmFootnoteDefinition:iL}}}function oL(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:r,footnoteReference:N3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(n,i,a,s){const o=a.createTracker(s);let l=o.move("[^");const c=a.enter("footnoteDefinition"),u=a.enter("label");return l+=o.move(a.safe(a.associationId(n),{before:l,after:"]"})),u(),l+=o.move("]:"),n.children&&n.children.length>0&&(o.shift(4),l+=o.move((e?`
3
+ `:" ")+a.indentLines(a.containerFlow(n,o.current()),e?L3:lL))),c(),l}}function lL(t,e,r){return e===0?t:L3(t,e,r)}function L3(t,e,r){return(r?"":" ")+t}const cL=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];M3.peek=pL;function uL(){return{canContainEols:["delete"],enter:{strikethrough:dL},exit:{strikethrough:fL}}}function hL(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:cL}],handlers:{delete:M3}}}function dL(t){this.enter({type:"delete",children:[]},t)}function fL(t){this.exit(t)}function M3(t,e,r,n){const i=r.createTracker(n),a=r.enter("strikethrough");let s=i.move("~~");return s+=r.containerPhrasing(t,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),a(),s}function pL(){return"~"}function mL(t){return t.length}function gL(t,e){const r=e||{},n=(r.align||[]).concat(),i=r.stringLength||mL,a=[],s=[],o=[],l=[];let c=0,u=-1;for(;++u<t.length;){const m=[],y=[];let b=-1;for(t[u].length>c&&(c=t[u].length);++b<t[u].length;){const v=bL(t[u][b]);if(r.alignDelimiters!==!1){const C=i(v);y[b]=C,(l[b]===void 0||C>l[b])&&(l[b]=C)}m.push(v)}s[u]=m,o[u]=y}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<c;)a[h]=S2(n[h]);else{const m=S2(n);for(;++h<c;)a[h]=m}h=-1;const d=[],f=[];for(;++h<c;){const m=a[h];let y="",b="";m===99?(y=":",b=":"):m===108?y=":":m===114&&(b=":");let v=r.alignDelimiters===!1?1:Math.max(1,l[h]-y.length-b.length);const C=y+"-".repeat(v)+b;r.alignDelimiters!==!1&&(v=y.length+v+b.length,v>l[h]&&(l[h]=v),f[h]=v),d[h]=C}s.splice(1,0,d),o.splice(1,0,f),u=-1;const p=[];for(;++u<s.length;){const m=s[u],y=o[u];h=-1;const b=[];for(;++h<c;){const v=m[h]||"";let C="",E="";if(r.alignDelimiters!==!1){const _=l[h]-(y[h]||0),k=a[h];k===114?C=" ".repeat(_):k===99?_%2?(C=" ".repeat(_/2+.5),E=" ".repeat(_/2-.5)):(C=" ".repeat(_/2),E=C):E=" ".repeat(_)}r.delimiterStart!==!1&&!h&&b.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&v==="")&&(r.delimiterStart!==!1||h)&&b.push(" "),r.alignDelimiters!==!1&&b.push(C),b.push(v),r.alignDelimiters!==!1&&b.push(E),r.padding!==!1&&b.push(" "),(r.delimiterEnd!==!1||h!==c-1)&&b.push("|")}p.push(r.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return p.join(`
4
+ `)}function bL(t){return t==null?"":String(t)}function S2(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function yL(t,e,r,n){const i=r.enter("blockquote"),a=r.createTracker(n);a.move("> "),a.shift(2);const s=r.indentLines(r.containerFlow(t,a.current()),xL);return i(),s}function xL(t,e,r){return">"+(r?"":" ")+t}function vL(t,e){return _2(t,e.inConstruct,!0)&&!_2(t,e.notInConstruct,!1)}function _2(t,e,r){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return r;let n=-1;for(;++n<e.length;)if(t.includes(e[n]))return!0;return!1}function E2(t,e,r,n){let i=-1;for(;++i<r.unsafe.length;)if(r.unsafe[i].character===`
5
+ `&&vL(r.stack,r.unsafe[i]))return/[ \t]/.test(n.before)?"":" ";return`\\
6
+ `}function I3(t,e){const r=String(t);let n=r.indexOf(e),i=n,a=0,s=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===i?++a>s&&(s=a):a=1,i=n+e.length,n=r.indexOf(e,i);return s}function kL(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function wL(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function TL(t,e,r,n){const i=wL(r),a=t.value||"",s=i==="`"?"GraveAccent":"Tilde";if(kL(t,r)){const h=r.enter("codeIndented"),d=r.indentLines(a,CL);return h(),d}const o=r.createTracker(n),l=i.repeat(Math.max(I3(a,i)+1,3)),c=r.enter("codeFenced");let u=o.move(l);if(t.lang){const h=r.enter(`codeFencedLang${s}`);u+=o.move(r.safe(t.lang,{before:u,after:" ",encode:["`"],...o.current()})),h()}if(t.lang&&t.meta){const h=r.enter(`codeFencedMeta${s}`);u+=o.move(" "),u+=o.move(r.safe(t.meta,{before:u,after:`
7
+ `,encode:["`"],...o.current()})),h()}return u+=o.move(`
8
+ `),a&&(u+=o.move(a+`
9
+ `)),u+=o.move(l),c(),u}function CL(t,e,r){return(r?"":" ")+t}function Rm(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function SL(t,e,r,n){const i=Rm(r),a=i==='"'?"Quote":"Apostrophe",s=r.enter("definition");let o=r.enter("label");const l=r.createTracker(n);let c=l.move("[");return c+=l.move(r.safe(r.associationId(t),{before:c,after:"]",...l.current()})),c+=l.move("]: "),o(),!t.url||/[\0- \u007F]/.test(t.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(t.url,{before:c,after:t.title?" ":`
10
+ `,...l.current()}))),o(),t.title&&(o=r.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(r.safe(t.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),s(),c}function _L(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function Gl(t){return"&#x"+t.toString(16).toUpperCase()+";"}function so(t){if(t===null||Ft(t)||rs(t))return 1;if(ih(t))return 2}function Yu(t,e,r){const n=so(t),i=so(e);return n===void 0?i===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:n===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}}R3.peek=EL;function R3(t,e,r,n){const i=_L(r),a=r.enter("emphasis"),s=r.createTracker(n),o=s.move(i);let l=s.move(r.containerPhrasing(t,{after:i,before:o,...s.current()}));const c=l.charCodeAt(0),u=Yu(n.before.charCodeAt(n.before.length-1),c,i);u.inside&&(l=Gl(c)+l.slice(1));const h=l.charCodeAt(l.length-1),d=Yu(n.after.charCodeAt(0),h,i);d.inside&&(l=l.slice(0,-1)+Gl(h));const f=s.move(i);return a(),r.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},o+l+f}function EL(t,e,r){return r.options.emphasis||"*"}const AL={};function Bm(t,e){const r=AL,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,i=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return B3(t,n,i)}function B3(t,e,r){if(NL(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return A2(t.children,e,r)}return Array.isArray(t)?A2(t,e,r):""}function A2(t,e,r){const n=[];let i=-1;for(;++i<t.length;)n[i]=B3(t[i],e,r);return n.join("")}function NL(t){return!!(t&&typeof t=="object")}function LL(t,e){let r=!1;return io(t,function(n){if("value"in n&&/\r?\n|\r/.test(n.value)||n.type==="break")return r=!0,Sf}),!!((!t.depth||t.depth<3)&&Bm(t)&&(e.options.setext||r))}function ML(t,e,r,n){const i=Math.max(Math.min(6,t.depth||1),1),a=r.createTracker(n);if(LL(t,r)){const u=r.enter("headingSetext"),h=r.enter("phrasing"),d=r.containerPhrasing(t,{...a.current(),before:`
11
+ `,after:`
12
+ `});return h(),u(),d+`
13
+ `+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
14
+ `))+1))}const s="#".repeat(i),o=r.enter("headingAtx"),l=r.enter("phrasing");a.move(s+" ");let c=r.containerPhrasing(t,{before:"# ",after:`
15
+ `,...a.current()});return/^[\t ]/.test(c)&&(c=Gl(c.charCodeAt(0))+c.slice(1)),c=c?s+" "+c:s,r.options.closeAtx&&(c+=" "+s),l(),o(),c}D3.peek=IL;function D3(t){return t.value||""}function IL(){return"<"}O3.peek=RL;function O3(t,e,r,n){const i=Rm(r),a=i==='"'?"Quote":"Apostrophe",s=r.enter("image");let o=r.enter("label");const l=r.createTracker(n);let c=l.move("![");return c+=l.move(r.safe(t.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),o(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(o=r.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(r.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=r.enter("destinationRaw"),c+=l.move(r.safe(t.url,{before:c,after:t.title?" ":")",...l.current()}))),o(),t.title&&(o=r.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(r.safe(t.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),c+=l.move(")"),s(),c}function RL(){return"!"}P3.peek=BL;function P3(t,e,r,n){const i=t.referenceType,a=r.enter("imageReference");let s=r.enter("label");const o=r.createTracker(n);let l=o.move("![");const c=r.safe(t.alt,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),s();const u=r.stack;r.stack=[],s=r.enter("reference");const h=r.safe(r.associationId(t),{before:l,after:"]",...o.current()});return s(),r.stack=u,a(),i==="full"||!c||c!==h?l+=o.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function BL(){return"!"}F3.peek=DL;function F3(t,e,r){let n=t.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(n);)i+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++a<r.unsafe.length;){const s=r.unsafe[a],o=r.compilePattern(s);let l;if(s.atBreak)for(;l=o.exec(n);){let c=l.index;n.charCodeAt(c)===10&&n.charCodeAt(c-1)===13&&c--,n=n.slice(0,c)+" "+n.slice(l.index+1)}}return i+n+i}function DL(){return"`"}function $3(t,e){const r=Bm(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}z3.peek=OL;function z3(t,e,r,n){const i=Rm(r),a=i==='"'?"Quote":"Apostrophe",s=r.createTracker(n);let o,l;if($3(t,r)){const u=r.stack;r.stack=[],o=r.enter("autolink");let h=s.move("<");return h+=s.move(r.containerPhrasing(t,{before:h,after:">",...s.current()})),h+=s.move(">"),o(),r.stack=u,h}o=r.enter("link"),l=r.enter("label");let c=s.move("[");return c+=s.move(r.containerPhrasing(t,{before:c,after:"](",...s.current()})),c+=s.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=r.enter("destinationLiteral"),c+=s.move("<"),c+=s.move(r.safe(t.url,{before:c,after:">",...s.current()})),c+=s.move(">")):(l=r.enter("destinationRaw"),c+=s.move(r.safe(t.url,{before:c,after:t.title?" ":")",...s.current()}))),l(),t.title&&(l=r.enter(`title${a}`),c+=s.move(" "+i),c+=s.move(r.safe(t.title,{before:c,after:i,...s.current()})),c+=s.move(i),l()),c+=s.move(")"),o(),c}function OL(t,e,r){return $3(t,r)?"<":"["}H3.peek=PL;function H3(t,e,r,n){const i=t.referenceType,a=r.enter("linkReference");let s=r.enter("label");const o=r.createTracker(n);let l=o.move("[");const c=r.containerPhrasing(t,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),s();const u=r.stack;r.stack=[],s=r.enter("reference");const h=r.safe(r.associationId(t),{before:l,after:"]",...o.current()});return s(),r.stack=u,a(),i==="full"||!c||c!==h?l+=o.move(h+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function PL(){return"["}function Dm(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function FL(t){const e=Dm(t),r=t.options.bulletOther;if(!r)return e==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+r+"`) to be different");return r}function $L(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function q3(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function zL(t,e,r,n){const i=r.enter("list"),a=r.bulletCurrent;let s=t.ordered?$L(r):Dm(r);const o=t.ordered?s==="."?")":".":FL(r);let l=e&&r.bulletLastUsed?s===r.bulletLastUsed:!1;if(!t.ordered){const u=t.children?t.children[0]:void 0;if((s==="*"||s==="-")&&u&&(!u.children||!u.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(l=!0),q3(r)===s&&u){let h=-1;for(;++h<t.children.length;){const d=t.children[h];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(s=o),r.bulletCurrent=s;const c=r.containerFlow(t,n);return r.bulletLastUsed=s,r.bulletCurrent=a,i(),c}function HL(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function qL(t,e,r,n){const i=HL(r);let a=r.bulletCurrent||Dm(r);e&&e.type==="list"&&e.ordered&&(a=(typeof e.start=="number"&&e.start>-1?e.start:1)+(r.options.incrementListMarker===!1?0:e.children.indexOf(t))+a);let s=a.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(s=Math.ceil(s/4)*4);const o=r.createTracker(n);o.move(a+" ".repeat(s-a.length)),o.shift(s);const l=r.enter("listItem"),c=r.indentLines(r.containerFlow(t,o.current()),u);return l(),c;function u(h,d,f){return d?(f?"":" ".repeat(s))+h:(f?a:a+" ".repeat(s-a.length))+h}}function jL(t,e,r,n){const i=r.enter("paragraph"),a=r.enter("phrasing"),s=r.containerPhrasing(t,n);return a(),i(),s}const UL=mc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function WL(t,e,r,n){return(t.children.some(function(s){return UL(s)})?r.containerPhrasing:r.containerFlow).call(r,t,n)}function GL(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}j3.peek=YL;function j3(t,e,r,n){const i=GL(r),a=r.enter("strong"),s=r.createTracker(n),o=s.move(i+i);let l=s.move(r.containerPhrasing(t,{after:i,before:o,...s.current()}));const c=l.charCodeAt(0),u=Yu(n.before.charCodeAt(n.before.length-1),c,i);u.inside&&(l=Gl(c)+l.slice(1));const h=l.charCodeAt(l.length-1),d=Yu(n.after.charCodeAt(0),h,i);d.inside&&(l=l.slice(0,-1)+Gl(h));const f=s.move(i+i);return a(),r.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},o+l+f}function YL(t,e,r){return r.options.strong||"*"}function VL(t,e,r,n){return r.safe(t.value,n)}function XL(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function KL(t,e,r){const n=(q3(r)+(r.options.ruleSpaces?" ":"")).repeat(XL(r));return r.options.ruleSpaces?n.slice(0,-1):n}const U3={blockquote:yL,break:E2,code:TL,definition:SL,emphasis:R3,hardBreak:E2,heading:ML,html:D3,image:O3,imageReference:P3,inlineCode:F3,link:z3,linkReference:H3,list:zL,listItem:qL,paragraph:jL,root:WL,strong:j3,text:VL,thematicBreak:KL},N2=document.createElement("i");function Om(t){const e="&"+t+";";N2.innerHTML=e;const r=N2.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===e?!1:r}function W3(t,e){const r=Number.parseInt(t,e);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}const QL=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ZL(t){return t.replace(QL,JL)}function JL(t,e,r){if(e)return e;if(r.charCodeAt(0)===35){const i=r.charCodeAt(1),a=i===120||i===88;return W3(r.slice(a?2:1),a?16:10)}return Om(r)||t}function eM(){return{enter:{table:tM,tableData:L2,tableHeader:L2,tableRow:nM},exit:{codeText:iM,table:rM,tableData:pd,tableHeader:pd,tableRow:pd}}}function tM(t){const e=t._align;this.enter({type:"table",align:e.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function rM(t){this.exit(t),this.data.inTable=void 0}function nM(t){this.enter({type:"tableRow",children:[]},t)}function pd(t){this.exit(t)}function L2(t){this.enter({type:"tableCell",children:[]},t)}function iM(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,aM));const r=this.stack[this.stack.length-1];r.type,r.value=e,this.exit(t)}function aM(t,e){return e==="|"?e:t}function sM(t){const e=t||{},r=e.tableCellPadding,n=e.tablePipeAlign,i=e.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
16
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:s,tableCell:l,tableRow:o}};function s(f,p,m,y){return c(u(f,m,y),f.align)}function o(f,p,m,y){const b=h(f,m,y),v=c([b]);return v.slice(0,v.indexOf(`
17
+ `))}function l(f,p,m,y){const b=m.enter("tableCell"),v=m.enter("phrasing"),C=m.containerPhrasing(f,{...y,before:a,after:a});return v(),b(),C}function c(f,p){return gL(f,{align:p,alignDelimiters:n,padding:r,stringLength:i})}function u(f,p,m){const y=f.children;let b=-1;const v=[],C=p.enter("table");for(;++b<y.length;)v[b]=h(y[b],p,m);return C(),v}function h(f,p,m){const y=f.children;let b=-1;const v=[],C=p.enter("tableRow");for(;++b<y.length;)v[b]=l(y[b],f,p,m);return C(),v}function d(f,p,m){let y=U3.inlineCode(f,p,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function oM(){return{exit:{taskListCheckValueChecked:M2,taskListCheckValueUnchecked:M2,paragraph:cM}}}function lM(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:uM}}}function M2(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function cM(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const i=e.children;let a=-1,s;for(;++a<i.length;){const o=i[a];if(o.type==="paragraph"){s=o;break}}s===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(t)}function uM(t,e,r,n){const i=t.children[0],a=typeof t.checked=="boolean"&&i&&i.type==="paragraph",s="["+(t.checked?"x":" ")+"] ",o=r.createTracker(n);a&&o.move(s);let l=U3.listItem(t,e,r,{...n,...o.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+s}}function hM(){return[$N(),sL(),uL(),eM(),oM()]}function dM(t){return{extensions:[zN(),oL(t),hL(),sM(t),lM()]}}function vn(t,e,r,n){const i=t.length;let a=0,s;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(e,r),t.splice(...s);else for(r&&t.splice(e,r);a<n.length;)s=n.slice(a,a+1e4),s.unshift(e,0),t.splice(...s),a+=1e4,e+=1e4}function Mn(t,e){return t.length>0?(vn(t,t.length,0,e),t):e}const I2={}.hasOwnProperty;function G3(t){const e={};let r=-1;for(;++r<t.length;)fM(e,t[r]);return e}function fM(t,e){let r;for(r in e){const i=(I2.call(t,r)?t[r]:void 0)||(t[r]={}),a=e[r];let s;if(a)for(s in a){I2.call(i,s)||(i[s]=[]);const o=a[s];pM(i[s],Array.isArray(o)?o:o?[o]:[])}}}function pM(t,e){let r=-1;const n=[];for(;++r<e.length;)(e[r].add==="after"?t:n).push(e[r]);vn(t,0,0,n)}const mM={tokenize:kM,partial:!0},Y3={tokenize:wM,partial:!0},V3={tokenize:TM,partial:!0},X3={tokenize:CM,partial:!0},gM={tokenize:SM,partial:!0},K3={name:"wwwAutolink",tokenize:xM,previous:Z3},Q3={name:"protocolAutolink",tokenize:vM,previous:J3},Qi={name:"emailAutolink",tokenize:yM,previous:e6},vi={};function bM(){return{text:vi}}let Pa=48;for(;Pa<123;)vi[Pa]=Qi,Pa++,Pa===58?Pa=65:Pa===91&&(Pa=97);vi[43]=Qi;vi[45]=Qi;vi[46]=Qi;vi[95]=Qi;vi[72]=[Qi,Q3];vi[104]=[Qi,Q3];vi[87]=[Qi,K3];vi[119]=[Qi,K3];function yM(t,e,r){const n=this;let i,a;return s;function s(h){return!Bf(h)||!e6.call(n,n.previous)||Pm(n.events)?r(h):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),o(h))}function o(h){return Bf(h)?(t.consume(h),o):h===64?(t.consume(h),l):r(h)}function l(h){return h===46?t.check(gM,u,c)(h):h===45||h===95||Rr(h)?(a=!0,t.consume(h),l):u(h)}function c(h){return t.consume(h),i=!0,l}function u(h){return a&&i&&qr(n.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(h)):r(h)}}function xM(t,e,r){const n=this;return i;function i(s){return s!==87&&s!==119||!Z3.call(n,n.previous)||Pm(n.events)?r(s):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(mM,t.attempt(Y3,t.attempt(V3,a),r),r)(s))}function a(s){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(s)}}function vM(t,e,r){const n=this;let i="",a=!1;return s;function s(h){return(h===72||h===104)&&J3.call(n,n.previous)&&!Pm(n.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(h),t.consume(h),o):r(h)}function o(h){if(qr(h)&&i.length<5)return i+=String.fromCodePoint(h),t.consume(h),o;if(h===58){const d=i.toLowerCase();if(d==="http"||d==="https")return t.consume(h),l}return r(h)}function l(h){return h===47?(t.consume(h),a?c:(a=!0,l)):r(h)}function c(h){return h===null||Gu(h)||Ft(h)||rs(h)||ih(h)?r(h):t.attempt(Y3,t.attempt(V3,u),r)(h)}function u(h){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(h)}}function kM(t,e,r){let n=0;return i;function i(s){return(s===87||s===119)&&n<3?(n++,t.consume(s),i):s===46&&n===3?(t.consume(s),a):r(s)}function a(s){return s===null?r(s):e(s)}}function wM(t,e,r){let n,i,a;return s;function s(c){return c===46||c===95?t.check(X3,l,o)(c):c===null||Ft(c)||rs(c)||c!==45&&ih(c)?l(c):(a=!0,t.consume(c),s)}function o(c){return c===95?n=!0:(i=n,n=void 0),t.consume(c),s}function l(c){return i||n||!a?r(c):e(c)}}function TM(t,e){let r=0,n=0;return i;function i(s){return s===40?(r++,t.consume(s),i):s===41&&n<r?a(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?t.check(X3,e,a)(s):s===null||Ft(s)||rs(s)?e(s):(t.consume(s),i)}function a(s){return s===41&&n++,t.consume(s),i}}function CM(t,e,r){return n;function n(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?(t.consume(o),n):o===38?(t.consume(o),a):o===93?(t.consume(o),i):o===60||o===null||Ft(o)||rs(o)?e(o):r(o)}function i(o){return o===null||o===40||o===91||Ft(o)||rs(o)?e(o):n(o)}function a(o){return qr(o)?s(o):r(o)}function s(o){return o===59?(t.consume(o),n):qr(o)?(t.consume(o),s):r(o)}}function SM(t,e,r){return n;function n(a){return t.consume(a),i}function i(a){return Rr(a)?r(a):e(a)}}function Z3(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Ft(t)}function J3(t){return!qr(t)}function e6(t){return!(t===47||Bf(t))}function Bf(t){return t===43||t===45||t===46||t===95||Rr(t)}function Pm(t){let e=t.length,r=!1;for(;e--;){const n=t[e][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}function _o(t){const e=[];let r=-1,n=0,i=0;for(;++r<t.length;){const a=t.charCodeAt(r);let s="";if(a===37&&Rr(t.charCodeAt(r+1))&&Rr(t.charCodeAt(r+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(s=String.fromCharCode(a));else if(a>55295&&a<57344){const o=t.charCodeAt(r+1);a<56320&&o>56319&&o<57344?(s=String.fromCharCode(a,o),i=1):s="�"}else s=String.fromCharCode(a);s&&(e.push(t.slice(n,r),encodeURIComponent(s)),n=r+i+1,s=""),i&&(r+=i,i=0)}return e.join("")+t.slice(n)}function ah(t,e,r){const n=[];let i=-1;for(;++i<t.length;){const a=t[i].resolveAll;a&&!n.includes(a)&&(e=a(e,r),n.push(a))}return e}const Df={name:"attention",resolveAll:_M,tokenize:EM};function _M(t,e){let r=-1,n,i,a,s,o,l,c,u;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(n=r;n--;)if(t[n][0]==="exit"&&t[n][1].type==="attentionSequence"&&t[n][1]._open&&e.sliceSerialize(t[n][1]).charCodeAt(0)===e.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[n][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[n][1].end.offset-t[n][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;l=t[n][1].end.offset-t[n][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const h={...t[n][1].end},d={...t[r][1].start};R2(h,-l),R2(d,l),s={type:l>1?"strongSequence":"emphasisSequence",start:h,end:{...t[n][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:d},a={type:l>1?"strongText":"emphasisText",start:{...t[n][1].end},end:{...t[r][1].start}},i={type:l>1?"strong":"emphasis",start:{...s.start},end:{...o.end}},t[n][1].end={...s.start},t[r][1].start={...o.end},c=[],t[n][1].end.offset-t[n][1].start.offset&&(c=Mn(c,[["enter",t[n][1],e],["exit",t[n][1],e]])),c=Mn(c,[["enter",i,e],["enter",s,e],["exit",s,e],["enter",a,e]]),c=Mn(c,ah(e.parser.constructs.insideSpan.null,t.slice(n+1,r),e)),c=Mn(c,[["exit",a,e],["enter",o,e],["exit",o,e],["exit",i,e]]),t[r][1].end.offset-t[r][1].start.offset?(u=2,c=Mn(c,[["enter",t[r][1],e],["exit",t[r][1],e]])):u=0,vn(t,n-1,r-n+3,c),r=n+c.length-u-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function EM(t,e){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,i=so(n);let a;return s;function s(l){return a=l,t.enter("attentionSequence"),o(l)}function o(l){if(l===a)return t.consume(l),o;const c=t.exit("attentionSequence"),u=so(l),h=!u||u===2&&i||r.includes(l),d=!i||i===2&&u||r.includes(n);return c._open=!!(a===42?h:h&&(i||!d)),c._close=!!(a===42?d:d&&(u||!h)),e(l)}}function R2(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const AM={name:"autolink",tokenize:NM};function NM(t,e,r){let n=0;return i;function i(f){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),a}function a(f){return qr(f)?(t.consume(f),s):f===64?r(f):c(f)}function s(f){return f===43||f===45||f===46||Rr(f)?(n=1,o(f)):c(f)}function o(f){return f===58?(t.consume(f),n=0,l):(f===43||f===45||f===46||Rr(f))&&n++<32?(t.consume(f),o):(n=0,c(f))}function l(f){return f===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.exit("autolink"),e):f===null||f===32||f===60||Gu(f)?r(f):(t.consume(f),l)}function c(f){return f===64?(t.consume(f),u):MN(f)?(t.consume(f),c):r(f)}function u(f){return Rr(f)?h(f):r(f)}function h(f){return f===46?(t.consume(f),n=0,u):f===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.exit("autolink"),e):d(f)}function d(f){if((f===45||Rr(f))&&n++<63){const p=f===45?d:h;return t.consume(f),p}return r(f)}}function wt(t,e,r,n){const i=n?n-1:Number.POSITIVE_INFINITY;let a=0;return s;function s(l){return Tt(l)?(t.enter(r),o(l)):e(l)}function o(l){return Tt(l)&&a++<i?(t.consume(l),o):(t.exit(r),e(l))}}const kc={partial:!0,tokenize:LM};function LM(t,e,r){return n;function n(a){return Tt(a)?wt(t,i,"linePrefix")(a):i(a)}function i(a){return a===null||Ye(a)?e(a):r(a)}}const t6={continuation:{tokenize:IM},exit:RM,name:"blockQuote",tokenize:MM};function MM(t,e,r){const n=this;return i;function i(s){if(s===62){const o=n.containerState;return o.open||(t.enter("blockQuote",{_container:!0}),o.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(s),t.exit("blockQuoteMarker"),a}return r(s)}function a(s){return Tt(s)?(t.enter("blockQuotePrefixWhitespace"),t.consume(s),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(s))}}function IM(t,e,r){const n=this;return i;function i(s){return Tt(s)?wt(t,a,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):a(s)}function a(s){return t.attempt(t6,e,r)(s)}}function RM(t){t.exit("blockQuote")}const r6={name:"characterEscape",tokenize:BM};function BM(t,e,r){return n;function n(a){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(a),t.exit("escapeMarker"),i}function i(a){return RN(a)?(t.enter("characterEscapeValue"),t.consume(a),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):r(a)}}const n6={name:"characterReference",tokenize:DM};function DM(t,e,r){const n=this;let i=0,a,s;return o;function o(h){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(h),t.exit("characterReferenceMarker"),l}function l(h){return h===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(h),t.exit("characterReferenceMarkerNumeric"),c):(t.enter("characterReferenceValue"),a=31,s=Rr,u(h))}function c(h){return h===88||h===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(h),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),a=6,s=IN,u):(t.enter("characterReferenceValue"),a=7,s=Rf,u(h))}function u(h){if(h===59&&i){const d=t.exit("characterReferenceValue");return s===Rr&&!Om(n.sliceSerialize(d))?r(h):(t.enter("characterReferenceMarker"),t.consume(h),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return s(h)&&i++<a?(t.consume(h),u):r(h)}}const B2={partial:!0,tokenize:PM},D2={concrete:!0,name:"codeFenced",tokenize:OM};function OM(t,e,r){const n=this,i={partial:!0,tokenize:_};let a=0,s=0,o;return l;function l(k){return c(k)}function c(k){const N=n.events[n.events.length-1];return a=N&&N[1].type==="linePrefix"?N[2].sliceSerialize(N[1],!0).length:0,o=k,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(k)}function u(k){return k===o?(s++,t.consume(k),u):s<3?r(k):(t.exit("codeFencedFenceSequence"),Tt(k)?wt(t,h,"whitespace")(k):h(k))}function h(k){return k===null||Ye(k)?(t.exit("codeFencedFence"),n.interrupt?e(k):t.check(B2,m,E)(k)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),d(k))}function d(k){return k===null||Ye(k)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),h(k)):Tt(k)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),wt(t,f,"whitespace")(k)):k===96&&k===o?r(k):(t.consume(k),d)}function f(k){return k===null||Ye(k)?h(k):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||Ye(k)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),h(k)):k===96&&k===o?r(k):(t.consume(k),p)}function m(k){return t.attempt(i,E,y)(k)}function y(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),b}function b(k){return a>0&&Tt(k)?wt(t,v,"linePrefix",a+1)(k):v(k)}function v(k){return k===null||Ye(k)?t.check(B2,m,E)(k):(t.enter("codeFlowValue"),C(k))}function C(k){return k===null||Ye(k)?(t.exit("codeFlowValue"),v(k)):(t.consume(k),C)}function E(k){return t.exit("codeFenced"),e(k)}function _(k,N,D){let $=0;return R;function R(U){return k.enter("lineEnding"),k.consume(U),k.exit("lineEnding"),P}function P(U){return k.enter("codeFencedFence"),Tt(U)?wt(k,G,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):G(U)}function G(U){return U===o?(k.enter("codeFencedFenceSequence"),ee(U)):D(U)}function ee(U){return U===o?($++,k.consume(U),ee):$>=s?(k.exit("codeFencedFenceSequence"),Tt(U)?wt(k,W,"whitespace")(U):W(U)):D(U)}function W(U){return U===null||Ye(U)?(k.exit("codeFencedFence"),N(U)):D(U)}}}function PM(t,e,r){const n=this;return i;function i(s){return s===null?r(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),a)}function a(s){return n.parser.lazy[n.now().line]?r(s):e(s)}}const md={name:"codeIndented",tokenize:$M},FM={partial:!0,tokenize:zM};function $M(t,e,r){const n=this;return i;function i(c){return t.enter("codeIndented"),wt(t,a,"linePrefix",5)(c)}function a(c){const u=n.events[n.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):r(c)}function s(c){return c===null?l(c):Ye(c)?t.attempt(FM,s,l)(c):(t.enter("codeFlowValue"),o(c))}function o(c){return c===null||Ye(c)?(t.exit("codeFlowValue"),s(c)):(t.consume(c),o)}function l(c){return t.exit("codeIndented"),e(c)}}function zM(t,e,r){const n=this;return i;function i(s){return n.parser.lazy[n.now().line]?r(s):Ye(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i):wt(t,a,"linePrefix",5)(s)}function a(s){const o=n.events[n.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?e(s):Ye(s)?i(s):r(s)}}const HM={name:"codeText",previous:jM,resolve:qM,tokenize:UM};function qM(t){let e=t.length-4,r=3,n,i;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(n=r;++n<e;)if(t[n][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[e][1].type="codeTextPadding",r+=2,e-=2;break}}for(n=r-1,e++;++n<=e;)i===void 0?n!==e&&t[n][1].type!=="lineEnding"&&(i=n):(n===e||t[n][1].type==="lineEnding")&&(t[i][1].type="codeTextData",n!==i+2&&(t[i][1].end=t[n-1][1].end,t.splice(i+2,n-i-2),e-=n-i-2,n=i+2),i=void 0);return t}function jM(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UM(t,e,r){let n=0,i,a;return s;function s(h){return t.enter("codeText"),t.enter("codeTextSequence"),o(h)}function o(h){return h===96?(t.consume(h),n++,o):(t.exit("codeTextSequence"),l(h))}function l(h){return h===null?r(h):h===32?(t.enter("space"),t.consume(h),t.exit("space"),l):h===96?(a=t.enter("codeTextSequence"),i=0,u(h)):Ye(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(h))}function c(h){return h===null||h===32||h===96||Ye(h)?(t.exit("codeTextData"),l(h)):(t.consume(h),c)}function u(h){return h===96?(t.consume(h),i++,u):i===n?(t.exit("codeTextSequence"),t.exit("codeText"),e(h)):(a.type="codeTextData",c(h))}}class WM{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new 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,r){const n=r??Number.POSITIVE_INFINITY;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,r,n){const i=r||0;this.setCursor(Math.trunc(e));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return n&&Wo(this.left,n),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Wo(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Wo(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){const r=this.left.splice(e,Number.POSITIVE_INFINITY);Wo(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Wo(this.left,r.reverse())}}}function Wo(t,e){let r=0;if(e.length<1e4)t.push(...e);else for(;r<e.length;)t.push(...e.slice(r,r+1e4)),r+=1e4}function i6(t){const e={};let r=-1,n,i,a,s,o,l,c;const u=new WM(t);for(;++r<u.length;){for(;r in e;)r=e[r];if(n=u.get(r),r&&n[1].type==="chunkFlow"&&u.get(r-1)[1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(n[0]==="enter")n[1].contentType&&(Object.assign(e,GM(u,r)),r=e[r],c=!0);else if(n[1]._container){for(a=r,i=void 0;a--;)if(s=u.get(a),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=a);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(n[1].end={...u.get(i)[1].start},o=u.slice(i,r),o.unshift(n),u.splice(i,r-i+1,o))}}return vn(t,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function GM(t,e){const r=t.get(e)[1],n=t.get(e)[2];let i=e-1;const a=[];let s=r._tokenizer;s||(s=n.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const o=s.events,l=[],c={};let u,h,d=-1,f=r,p=0,m=0;const y=[m];for(;f;){for(;t.get(++i)[1]!==f;);a.push(i),f._tokenizer||(u=n.sliceStream(f),f.next||u.push(null),h&&s.defineSkip(f.start),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),f._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),h=f,f=f.next}for(f=r;++d<o.length;)o[d][0]==="exit"&&o[d-1][0]==="enter"&&o[d][1].type===o[d-1][1].type&&o[d][1].start.line!==o[d][1].end.line&&(m=d+1,y.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(s.events=[],f?(f._tokenizer=void 0,f.previous=void 0):y.pop(),d=y.length;d--;){const b=o.slice(y[d],y[d+1]),v=a.pop();l.push([v,v+b.length-1]),t.splice(v,2,b)}for(l.reverse(),d=-1;++d<l.length;)c[p+l[d][0]]=p+l[d][1],p+=l[d][1]-l[d][0]-1;return c}const YM={resolve:XM,tokenize:KM},VM={partial:!0,tokenize:QM};function XM(t){return i6(t),t}function KM(t,e){let r;return n;function n(o){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?a(o):Ye(o)?t.check(VM,s,a)(o):(t.consume(o),i)}function a(o){return t.exit("chunkContent"),t.exit("content"),e(o)}function s(o){return t.consume(o),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,i}}function QM(t,e,r){const n=this;return i;function i(s){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),wt(t,a,"linePrefix")}function a(s){if(s===null||Ye(s))return r(s);const o=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?e(s):t.interrupt(n.parser.constructs.flow,r,e)(s)}}function a6(t,e,r,n,i,a,s,o,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return h;function h(b){return b===60?(t.enter(n),t.enter(i),t.enter(a),t.consume(b),t.exit(a),d):b===null||b===32||b===41||Gu(b)?r(b):(t.enter(n),t.enter(s),t.enter(o),t.enter("chunkString",{contentType:"string"}),m(b))}function d(b){return b===62?(t.enter(a),t.consume(b),t.exit(a),t.exit(i),t.exit(n),e):(t.enter(o),t.enter("chunkString",{contentType:"string"}),f(b))}function f(b){return b===62?(t.exit("chunkString"),t.exit(o),d(b)):b===null||b===60||Ye(b)?r(b):(t.consume(b),b===92?p:f)}function p(b){return b===60||b===62||b===92?(t.consume(b),f):f(b)}function m(b){return!u&&(b===null||b===41||Ft(b))?(t.exit("chunkString"),t.exit(o),t.exit(s),t.exit(n),e(b)):u<c&&b===40?(t.consume(b),u++,m):b===41?(t.consume(b),u--,m):b===null||b===32||b===40||Gu(b)?r(b):(t.consume(b),b===92?y:m)}function y(b){return b===40||b===41||b===92?(t.consume(b),m):m(b)}}function s6(t,e,r,n,i,a){const s=this;let o=0,l;return c;function c(f){return t.enter(n),t.enter(i),t.consume(f),t.exit(i),t.enter(a),u}function u(f){return o>999||f===null||f===91||f===93&&!l||f===94&&!o&&"_hiddenFootnoteSupport"in s.parser.constructs?r(f):f===93?(t.exit(a),t.enter(i),t.consume(f),t.exit(i),t.exit(n),e):Ye(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),h(f))}function h(f){return f===null||f===91||f===93||Ye(f)||o++>999?(t.exit("chunkString"),u(f)):(t.consume(f),l||(l=!Tt(f)),f===92?d:h)}function d(f){return f===91||f===92||f===93?(t.consume(f),o++,h):h(f)}}function o6(t,e,r,n,i,a){let s;return o;function o(d){return d===34||d===39||d===40?(t.enter(n),t.enter(i),t.consume(d),t.exit(i),s=d===40?41:d,l):r(d)}function l(d){return d===s?(t.enter(i),t.consume(d),t.exit(i),t.exit(n),e):(t.enter(a),c(d))}function c(d){return d===s?(t.exit(a),l(s)):d===null?r(d):Ye(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),wt(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===s||d===null||Ye(d)?(t.exit("chunkString"),c(d)):(t.consume(d),d===92?h:u)}function h(d){return d===s||d===92?(t.consume(d),u):u(d)}}function Ll(t,e){let r;return n;function n(i){return Ye(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),r=!0,n):Tt(i)?wt(t,n,r?"linePrefix":"lineSuffix")(i):e(i)}}const ZM={name:"definition",tokenize:eI},JM={partial:!0,tokenize:tI};function eI(t,e,r){const n=this;let i;return a;function a(f){return t.enter("definition"),s(f)}function s(f){return s6.call(n,t,o,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function o(f){return i=Yn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(t.enter("definitionMarker"),t.consume(f),t.exit("definitionMarker"),l):r(f)}function l(f){return Ft(f)?Ll(t,c)(f):c(f)}function c(f){return a6(t,u,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return t.attempt(JM,h,h)(f)}function h(f){return Tt(f)?wt(t,d,"whitespace")(f):d(f)}function d(f){return f===null||Ye(f)?(t.exit("definition"),n.parser.defined.push(i),e(f)):r(f)}}function tI(t,e,r){return n;function n(o){return Ft(o)?Ll(t,i)(o):r(o)}function i(o){return o6(t,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function a(o){return Tt(o)?wt(t,s,"whitespace")(o):s(o)}function s(o){return o===null||Ye(o)?e(o):r(o)}}const rI={name:"hardBreakEscape",tokenize:nI};function nI(t,e,r){return n;function n(a){return t.enter("hardBreakEscape"),t.consume(a),i}function i(a){return Ye(a)?(t.exit("hardBreakEscape"),e(a)):r(a)}}const iI={name:"headingAtx",resolve:aI,tokenize:sI};function aI(t,e){let r=t.length-2,n=3,i,a;return t[n][1].type==="whitespace"&&(n+=2),r-2>n&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&t[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(i={type:"atxHeadingText",start:t[n][1].start,end:t[r][1].end},a={type:"chunkText",start:t[n][1].start,end:t[r][1].end,contentType:"text"},vn(t,n,r-n+1,[["enter",i,e],["enter",a,e],["exit",a,e],["exit",i,e]])),t}function sI(t,e,r){let n=0;return i;function i(u){return t.enter("atxHeading"),a(u)}function a(u){return t.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&n++<6?(t.consume(u),s):u===null||Ft(u)?(t.exit("atxHeadingSequence"),o(u)):r(u)}function o(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||Ye(u)?(t.exit("atxHeading"),e(u)):Tt(u)?wt(t,o,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function l(u){return u===35?(t.consume(u),l):(t.exit("atxHeadingSequence"),o(u))}function c(u){return u===null||u===35||Ft(u)?(t.exit("atxHeadingText"),o(u)):(t.consume(u),c)}}const oI=["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"],O2=["pre","script","style","textarea"],lI={concrete:!0,name:"htmlFlow",resolveTo:hI,tokenize:dI},cI={partial:!0,tokenize:pI},uI={partial:!0,tokenize:fI};function hI(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function dI(t,e,r){const n=this;let i,a,s,o,l;return c;function c(I){return u(I)}function u(I){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(I),h}function h(I){return I===33?(t.consume(I),d):I===47?(t.consume(I),a=!0,m):I===63?(t.consume(I),i=3,n.interrupt?e:L):qr(I)?(t.consume(I),s=String.fromCharCode(I),y):r(I)}function d(I){return I===45?(t.consume(I),i=2,f):I===91?(t.consume(I),i=5,o=0,p):qr(I)?(t.consume(I),i=4,n.interrupt?e:L):r(I)}function f(I){return I===45?(t.consume(I),n.interrupt?e:L):r(I)}function p(I){const ye="CDATA[";return I===ye.charCodeAt(o++)?(t.consume(I),o===ye.length?n.interrupt?e:G:p):r(I)}function m(I){return qr(I)?(t.consume(I),s=String.fromCharCode(I),y):r(I)}function y(I){if(I===null||I===47||I===62||Ft(I)){const ye=I===47,Ee=s.toLowerCase();return!ye&&!a&&O2.includes(Ee)?(i=1,n.interrupt?e(I):G(I)):oI.includes(s.toLowerCase())?(i=6,ye?(t.consume(I),b):n.interrupt?e(I):G(I)):(i=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(I):a?v(I):C(I))}return I===45||Rr(I)?(t.consume(I),s+=String.fromCharCode(I),y):r(I)}function b(I){return I===62?(t.consume(I),n.interrupt?e:G):r(I)}function v(I){return Tt(I)?(t.consume(I),v):R(I)}function C(I){return I===47?(t.consume(I),R):I===58||I===95||qr(I)?(t.consume(I),E):Tt(I)?(t.consume(I),C):R(I)}function E(I){return I===45||I===46||I===58||I===95||Rr(I)?(t.consume(I),E):_(I)}function _(I){return I===61?(t.consume(I),k):Tt(I)?(t.consume(I),_):C(I)}function k(I){return I===null||I===60||I===61||I===62||I===96?r(I):I===34||I===39?(t.consume(I),l=I,N):Tt(I)?(t.consume(I),k):D(I)}function N(I){return I===l?(t.consume(I),l=null,$):I===null||Ye(I)?r(I):(t.consume(I),N)}function D(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||Ft(I)?_(I):(t.consume(I),D)}function $(I){return I===47||I===62||Tt(I)?C(I):r(I)}function R(I){return I===62?(t.consume(I),P):r(I)}function P(I){return I===null||Ye(I)?G(I):Tt(I)?(t.consume(I),P):r(I)}function G(I){return I===45&&i===2?(t.consume(I),j):I===60&&i===1?(t.consume(I),Q):I===62&&i===4?(t.consume(I),se):I===63&&i===3?(t.consume(I),L):I===93&&i===5?(t.consume(I),be):Ye(I)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(cI,ae,ee)(I)):I===null||Ye(I)?(t.exit("htmlFlowData"),ee(I)):(t.consume(I),G)}function ee(I){return t.check(uI,W,ae)(I)}function W(I){return t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),U}function U(I){return I===null||Ye(I)?ee(I):(t.enter("htmlFlowData"),G(I))}function j(I){return I===45?(t.consume(I),L):G(I)}function Q(I){return I===47?(t.consume(I),s="",Y):G(I)}function Y(I){if(I===62){const ye=s.toLowerCase();return O2.includes(ye)?(t.consume(I),se):G(I)}return qr(I)&&s.length<8?(t.consume(I),s+=String.fromCharCode(I),Y):G(I)}function be(I){return I===93?(t.consume(I),L):G(I)}function L(I){return I===62?(t.consume(I),se):I===45&&i===2?(t.consume(I),L):G(I)}function se(I){return I===null||Ye(I)?(t.exit("htmlFlowData"),ae(I)):(t.consume(I),se)}function ae(I){return t.exit("htmlFlow"),e(I)}}function fI(t,e,r){const n=this;return i;function i(s){return Ye(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),a):r(s)}function a(s){return n.parser.lazy[n.now().line]?r(s):e(s)}}function pI(t,e,r){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(kc,e,r)}}const mI={name:"htmlText",tokenize:gI};function gI(t,e,r){const n=this;let i,a,s;return o;function o(L){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(L),l}function l(L){return L===33?(t.consume(L),c):L===47?(t.consume(L),_):L===63?(t.consume(L),C):qr(L)?(t.consume(L),D):r(L)}function c(L){return L===45?(t.consume(L),u):L===91?(t.consume(L),a=0,p):qr(L)?(t.consume(L),v):r(L)}function u(L){return L===45?(t.consume(L),f):r(L)}function h(L){return L===null?r(L):L===45?(t.consume(L),d):Ye(L)?(s=h,Q(L)):(t.consume(L),h)}function d(L){return L===45?(t.consume(L),f):h(L)}function f(L){return L===62?j(L):L===45?d(L):h(L)}function p(L){const se="CDATA[";return L===se.charCodeAt(a++)?(t.consume(L),a===se.length?m:p):r(L)}function m(L){return L===null?r(L):L===93?(t.consume(L),y):Ye(L)?(s=m,Q(L)):(t.consume(L),m)}function y(L){return L===93?(t.consume(L),b):m(L)}function b(L){return L===62?j(L):L===93?(t.consume(L),b):m(L)}function v(L){return L===null||L===62?j(L):Ye(L)?(s=v,Q(L)):(t.consume(L),v)}function C(L){return L===null?r(L):L===63?(t.consume(L),E):Ye(L)?(s=C,Q(L)):(t.consume(L),C)}function E(L){return L===62?j(L):C(L)}function _(L){return qr(L)?(t.consume(L),k):r(L)}function k(L){return L===45||Rr(L)?(t.consume(L),k):N(L)}function N(L){return Ye(L)?(s=N,Q(L)):Tt(L)?(t.consume(L),N):j(L)}function D(L){return L===45||Rr(L)?(t.consume(L),D):L===47||L===62||Ft(L)?$(L):r(L)}function $(L){return L===47?(t.consume(L),j):L===58||L===95||qr(L)?(t.consume(L),R):Ye(L)?(s=$,Q(L)):Tt(L)?(t.consume(L),$):j(L)}function R(L){return L===45||L===46||L===58||L===95||Rr(L)?(t.consume(L),R):P(L)}function P(L){return L===61?(t.consume(L),G):Ye(L)?(s=P,Q(L)):Tt(L)?(t.consume(L),P):$(L)}function G(L){return L===null||L===60||L===61||L===62||L===96?r(L):L===34||L===39?(t.consume(L),i=L,ee):Ye(L)?(s=G,Q(L)):Tt(L)?(t.consume(L),G):(t.consume(L),W)}function ee(L){return L===i?(t.consume(L),i=void 0,U):L===null?r(L):Ye(L)?(s=ee,Q(L)):(t.consume(L),ee)}function W(L){return L===null||L===34||L===39||L===60||L===61||L===96?r(L):L===47||L===62||Ft(L)?$(L):(t.consume(L),W)}function U(L){return L===47||L===62||Ft(L)?$(L):r(L)}function j(L){return L===62?(t.consume(L),t.exit("htmlTextData"),t.exit("htmlText"),e):r(L)}function Q(L){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),Y}function Y(L){return Tt(L)?wt(t,be,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):be(L)}function be(L){return t.enter("htmlTextData"),s(L)}}const Fm={name:"labelEnd",resolveAll:vI,resolveTo:kI,tokenize:wI},bI={tokenize:TI},yI={tokenize:CI},xI={tokenize:SI};function vI(t){let e=-1;const r=[];for(;++e<t.length;){const n=t[e][1];if(r.push(t[e]),n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd"){const i=n.type==="labelImage"?4:2;n.type="data",e+=i}}return t.length!==r.length&&vn(t,0,t.length,r),t}function kI(t,e){let r=t.length,n=0,i,a,s,o;for(;r--;)if(i=t[r][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[r][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(t[r][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=r,i.type!=="labelLink")){n=2;break}}else i.type==="labelEnd"&&(s=r);const l={type:t[a][1].type==="labelLink"?"link":"image",start:{...t[a][1].start},end:{...t[t.length-1][1].end}},c={type:"label",start:{...t[a][1].start},end:{...t[s][1].end}},u={type:"labelText",start:{...t[a+n+2][1].end},end:{...t[s-2][1].start}};return o=[["enter",l,e],["enter",c,e]],o=Mn(o,t.slice(a+1,a+n+3)),o=Mn(o,[["enter",u,e]]),o=Mn(o,ah(e.parser.constructs.insideSpan.null,t.slice(a+n+4,s-3),e)),o=Mn(o,[["exit",u,e],t[s-2],t[s-1],["exit",c,e]]),o=Mn(o,t.slice(s+1)),o=Mn(o,[["exit",l,e]]),vn(t,a,t.length,o),t}function wI(t,e,r){const n=this;let i=n.events.length,a,s;for(;i--;)if((n.events[i][1].type==="labelImage"||n.events[i][1].type==="labelLink")&&!n.events[i][1]._balanced){a=n.events[i][1];break}return o;function o(d){return a?a._inactive?h(d):(s=n.parser.defined.includes(Yn(n.sliceSerialize({start:a.end,end:n.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelEnd"),l):r(d)}function l(d){return d===40?t.attempt(bI,u,s?u:h)(d):d===91?t.attempt(yI,u,s?c:h)(d):s?u(d):h(d)}function c(d){return t.attempt(xI,u,h)(d)}function u(d){return e(d)}function h(d){return a._balanced=!0,r(d)}}function TI(t,e,r){return n;function n(h){return t.enter("resource"),t.enter("resourceMarker"),t.consume(h),t.exit("resourceMarker"),i}function i(h){return Ft(h)?Ll(t,a)(h):a(h)}function a(h){return h===41?u(h):a6(t,s,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function s(h){return Ft(h)?Ll(t,l)(h):u(h)}function o(h){return r(h)}function l(h){return h===34||h===39||h===40?o6(t,c,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):u(h)}function c(h){return Ft(h)?Ll(t,u)(h):u(h)}function u(h){return h===41?(t.enter("resourceMarker"),t.consume(h),t.exit("resourceMarker"),t.exit("resource"),e):r(h)}}function CI(t,e,r){const n=this;return i;function i(o){return s6.call(n,t,a,s,"reference","referenceMarker","referenceString")(o)}function a(o){return n.parser.defined.includes(Yn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?e(o):r(o)}function s(o){return r(o)}}function SI(t,e,r){return n;function n(a){return t.enter("reference"),t.enter("referenceMarker"),t.consume(a),t.exit("referenceMarker"),i}function i(a){return a===93?(t.enter("referenceMarker"),t.consume(a),t.exit("referenceMarker"),t.exit("reference"),e):r(a)}}const _I={name:"labelStartImage",resolveAll:Fm.resolveAll,tokenize:EI};function EI(t,e,r){const n=this;return i;function i(o){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(o),t.exit("labelImageMarker"),a}function a(o){return o===91?(t.enter("labelMarker"),t.consume(o),t.exit("labelMarker"),t.exit("labelImage"),s):r(o)}function s(o){return o===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(o):e(o)}}const AI={name:"labelStartLink",resolveAll:Fm.resolveAll,tokenize:NI};function NI(t,e,r){const n=this;return i;function i(s){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(s),t.exit("labelMarker"),t.exit("labelLink"),a}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):e(s)}}const gd={name:"lineEnding",tokenize:LI};function LI(t,e){return r;function r(n){return t.enter("lineEnding"),t.consume(n),t.exit("lineEnding"),wt(t,e,"linePrefix")}}const wu={name:"thematicBreak",tokenize:MI};function MI(t,e,r){let n=0,i;return a;function a(c){return t.enter("thematicBreak"),s(c)}function s(c){return i=c,o(c)}function o(c){return c===i?(t.enter("thematicBreakSequence"),l(c)):n>=3&&(c===null||Ye(c))?(t.exit("thematicBreak"),e(c)):r(c)}function l(c){return c===i?(t.consume(c),n++,l):(t.exit("thematicBreakSequence"),Tt(c)?wt(t,o,"whitespace")(c):o(c))}}const an={continuation:{tokenize:DI},exit:PI,name:"list",tokenize:BI},II={partial:!0,tokenize:FI},RI={partial:!0,tokenize:OI};function BI(t,e,r){const n=this,i=n.events[n.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return o;function o(f){const p=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:Rf(f)){if(n.containerState.type||(n.containerState.type=p,t.enter(p,{_container:!0})),p==="listUnordered")return t.enter("listItemPrefix"),f===42||f===45?t.check(wu,r,c)(f):c(f);if(!n.interrupt||f===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(f)}return r(f)}function l(f){return Rf(f)&&++s<10?(t.consume(f),l):(!n.interrupt||s<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(t.exit("listItemValue"),c(f)):r(f)}function c(f){return t.enter("listItemMarker"),t.consume(f),t.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,t.check(kc,n.interrupt?r:u,t.attempt(II,d,h))}function u(f){return n.containerState.initialBlankLine=!0,a++,d(f)}function h(f){return Tt(f)?(t.enter("listItemPrefixWhitespace"),t.consume(f),t.exit("listItemPrefixWhitespace"),d):r(f)}function d(f){return n.containerState.size=a+n.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(f)}}function DI(t,e,r){const n=this;return n.containerState._closeFlow=void 0,t.check(kc,i,a);function i(o){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,wt(t,e,"listItemIndent",n.containerState.size+1)(o)}function a(o){return n.containerState.furtherBlankLines||!Tt(o)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(o)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,t.attempt(RI,e,s)(o))}function s(o){return n.containerState._closeFlow=!0,n.interrupt=void 0,wt(t,t.attempt(an,e,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function OI(t,e,r){const n=this;return wt(t,i,"listItemIndent",n.containerState.size+1);function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?e(a):r(a)}}function PI(t){t.exit(this.containerState.type)}function FI(t,e,r){const n=this;return wt(t,i,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const s=n.events[n.events.length-1];return!Tt(a)&&s&&s[1].type==="listItemPrefixWhitespace"?e(a):r(a)}}const P2={name:"setextUnderline",resolveTo:$I,tokenize:zI};function $I(t,e){let r=t.length,n,i,a;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){n=r;break}t[r][1].type==="paragraph"&&(i=r)}else t[r][1].type==="content"&&t.splice(r,1),!a&&t[r][1].type==="definition"&&(a=r);const s={type:"setextHeading",start:{...t[n][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",a?(t.splice(i,0,["enter",s,e]),t.splice(a+1,0,["exit",t[n][1],e]),t[n][1].end={...t[a][1].end}):t[n][1]=s,t.push(["exit",s,e]),t}function zI(t,e,r){const n=this;let i;return a;function a(c){let u=n.events.length,h;for(;u--;)if(n.events[u][1].type!=="lineEnding"&&n.events[u][1].type!=="linePrefix"&&n.events[u][1].type!=="content"){h=n.events[u][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||h)?(t.enter("setextHeadingLine"),i=c,s(c)):r(c)}function s(c){return t.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(t.consume(c),o):(t.exit("setextHeadingLineSequence"),Tt(c)?wt(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ye(c)?(t.exit("setextHeadingLine"),e(c)):r(c)}}const HI={tokenize:XI,partial:!0};function qI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:GI,continuation:{tokenize:YI},exit:VI}},text:{91:{name:"gfmFootnoteCall",tokenize:WI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:jI,resolveTo:UI}}}}function jI(t,e,r){const n=this;let i=n.events.length;const a=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let s;for(;i--;){const l=n.events[i][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!s||!s._balanced)return r(l);const c=Yn(n.sliceSerialize({start:s.end,end:n.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?r(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function UI(t,e){let r=t.length;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},o=[t[r+1],t[r+2],["enter",n,e],t[r+3],t[r+4],["enter",i,e],["exit",i,e],["enter",a,e],["enter",s,e],["exit",s,e],["exit",a,e],t[t.length-2],t[t.length-1],["exit",n,e]];return t.splice(r,t.length-r+1,...o),t}function WI(t,e,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a=0,s;return o;function o(h){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),l}function l(h){return h!==94?r(h):(t.enter("gfmFootnoteCallMarker"),t.consume(h),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",c)}function c(h){if(a>999||h===93&&!s||h===null||h===91||Ft(h))return r(h);if(h===93){t.exit("chunkString");const d=t.exit("gfmFootnoteCallString");return i.includes(Yn(n.sliceSerialize(d)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):r(h)}return Ft(h)||(s=!0),a++,t.consume(h),h===92?u:c}function u(h){return h===91||h===92||h===93?(t.consume(h),a++,c):c(h)}}function GI(t,e,r){const n=this,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a,s=0,o;return l;function l(p){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):r(p)}function u(p){if(s>999||p===93&&!o||p===null||p===91||Ft(p))return r(p);if(p===93){t.exit("chunkString");const m=t.exit("gfmFootnoteDefinitionLabelString");return a=Yn(n.sliceSerialize(m)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),d}return Ft(p)||(o=!0),s++,t.consume(p),p===92?h:u}function h(p){return p===91||p===92||p===93?(t.consume(p),s++,u):u(p)}function d(p){return p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),i.includes(a)||i.push(a),wt(t,f,"gfmFootnoteDefinitionWhitespace")):r(p)}function f(p){return e(p)}}function YI(t,e,r){return t.check(kc,e,t.attempt(HI,e,r))}function VI(t){t.exit("gfmFootnoteDefinition")}function XI(t,e,r){const n=this;return wt(t,i,"gfmFootnoteDefinitionIndent",5);function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?e(a):r(a)}}function KI(t){let r=(t||{}).singleTilde;const n={name:"strikethrough",tokenize:a,resolveAll:i};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function i(s,o){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let c=l;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[l][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[l][1].end)},h={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[l][1].start)},d=[["enter",u,o],["enter",s[c][1],o],["exit",s[c][1],o],["enter",h,o]],f=o.parser.constructs.insideSpan.null;f&&vn(d,d.length,0,ah(f,s.slice(c+1,l),o)),vn(d,d.length,0,[["exit",h,o],["enter",s[l][1],o],["exit",s[l][1],o],["exit",u,o]]),vn(s,c-1,l-c+3,d),l=c+d.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function a(s,o,l){const c=this.previous,u=this.events;let h=0;return d;function d(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(s.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const m=so(c);if(p===126)return h>1?l(p):(s.consume(p),h++,f);if(h<2&&!r)return l(p);const y=s.exit("strikethroughSequenceTemporary"),b=so(p);return y._open=!b||b===2&&!!m,y._close=!m||m===2&&!!b,o(p)}}}class QI{constructor(){this.map=[]}add(e,r,n){ZI(this,e,r,n)}consume(e){if(this.map.sort(function(a,s){return a[0]-s[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(e.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),e.length=this.map[r][0];n.push(e.slice()),e.length=0;let i=n.pop();for(;i;){for(const a of i)e.push(a);i=n.pop()}this.map.length=0}}function ZI(t,e,r,n){let i=0;if(!(r===0&&n.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=r,t.map[i][2].push(...n);return}i+=1}t.map.push([e,r,n])}}function JI(t,e){let r=!1;const n=[];for(;e<t.length;){const i=t[e];if(r){if(i[0]==="enter")i[1].type==="tableContent"&&n.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const a=n.length-1;n[a]=n[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(r=!0);e+=1}return n}function eR(){return{flow:{null:{name:"table",tokenize:tR,resolveAll:rR}}}}function tR(t,e,r){const n=this;let i=0,a=0,s;return o;function o(R){let P=n.events.length-1;for(;P>-1;){const W=n.events[P][1].type;if(W==="lineEnding"||W==="linePrefix")P--;else break}const G=P>-1?n.events[P][1].type:null,ee=G==="tableHead"||G==="tableRow"?k:l;return ee===k&&n.parser.lazy[n.now().line]?r(R):ee(R)}function l(R){return t.enter("tableHead"),t.enter("tableRow"),c(R)}function c(R){return R===124||(s=!0,a+=1),u(R)}function u(R){return R===null?r(R):Ye(R)?a>1?(a=0,n.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),f):r(R):Tt(R)?wt(t,u,"whitespace")(R):(a+=1,s&&(s=!1,i+=1),R===124?(t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),s=!0,u):(t.enter("data"),h(R)))}function h(R){return R===null||R===124||Ft(R)?(t.exit("data"),u(R)):(t.consume(R),R===92?d:h)}function d(R){return R===92||R===124?(t.consume(R),h):h(R)}function f(R){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(R):(t.enter("tableDelimiterRow"),s=!1,Tt(R)?wt(t,p,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):p(R))}function p(R){return R===45||R===58?y(R):R===124?(s=!0,t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),m):_(R)}function m(R){return Tt(R)?wt(t,y,"whitespace")(R):y(R)}function y(R){return R===58?(a+=1,s=!0,t.enter("tableDelimiterMarker"),t.consume(R),t.exit("tableDelimiterMarker"),b):R===45?(a+=1,b(R)):R===null||Ye(R)?E(R):_(R)}function b(R){return R===45?(t.enter("tableDelimiterFiller"),v(R)):_(R)}function v(R){return R===45?(t.consume(R),v):R===58?(s=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(R),t.exit("tableDelimiterMarker"),C):(t.exit("tableDelimiterFiller"),C(R))}function C(R){return Tt(R)?wt(t,E,"whitespace")(R):E(R)}function E(R){return R===124?p(R):R===null||Ye(R)?!s||i!==a?_(R):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(R)):_(R)}function _(R){return r(R)}function k(R){return t.enter("tableRow"),N(R)}function N(R){return R===124?(t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),N):R===null||Ye(R)?(t.exit("tableRow"),e(R)):Tt(R)?wt(t,N,"whitespace")(R):(t.enter("data"),D(R))}function D(R){return R===null||R===124||Ft(R)?(t.exit("data"),N(R)):(t.consume(R),R===92?$:D)}function $(R){return R===92||R===124?(t.consume(R),D):D(R)}}function rR(t,e){let r=-1,n=!0,i=0,a=[0,0,0,0],s=[0,0,0,0],o=!1,l=0,c,u,h;const d=new QI;for(;++r<t.length;){const f=t[r],p=f[1];f[0]==="enter"?p.type==="tableHead"?(o=!1,l!==0&&(F2(d,e,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(r,0,[["enter",c,e]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(n=!0,h=void 0,a=[0,0,0,0],s=[0,r+1,0,0],o&&(o=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(r,0,[["enter",u,e]])),i=p.type==="tableDelimiterRow"?2:u?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(n=!1,s[2]===0&&(a[1]!==0&&(s[0]=s[1],h=Fc(d,e,a,i,void 0,h),a=[0,0,0,0]),s[2]=r)):p.type==="tableCellDivider"&&(n?n=!1:(a[1]!==0&&(s[0]=s[1],h=Fc(d,e,a,i,void 0,h)),a=s,s=[a[1],r,0,0])):p.type==="tableHead"?(o=!0,l=r):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=r,a[1]!==0?(s[0]=s[1],h=Fc(d,e,a,i,r,h)):s[1]!==0&&(h=Fc(d,e,s,i,r,h)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(s[3]=r)}for(l!==0&&F2(d,e,l,c,u),d.consume(e.events),r=-1;++r<e.events.length;){const f=e.events[r];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=JI(e.events,r))}return t}function Fc(t,e,r,n,i,a){const s=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",o="tableContent";r[0]!==0&&(a.end=Object.assign({},Ds(e.events,r[0])),t.add(r[0],0,[["exit",a,e]]));const l=Ds(e.events,r[1]);if(a={type:s,start:Object.assign({},l),end:Object.assign({},l)},t.add(r[1],0,[["enter",a,e]]),r[2]!==0){const c=Ds(e.events,r[2]),u=Ds(e.events,r[3]),h={type:o,start:Object.assign({},c),end:Object.assign({},u)};if(t.add(r[2],0,[["enter",h,e]]),n!==2){const d=e.events[r[2]],f=e.events[r[3]];if(d[1].end=Object.assign({},f[1].end),d[1].type="chunkText",d[1].contentType="text",r[3]>r[2]+1){const p=r[2]+1,m=r[3]-r[2]-1;t.add(p,m,[])}}t.add(r[3]+1,0,[["exit",h,e]])}return i!==void 0&&(a.end=Object.assign({},Ds(e.events,i)),t.add(i,0,[["exit",a,e]]),a=void 0),a}function F2(t,e,r,n,i){const a=[],s=Ds(e.events,r);i&&(i.end=Object.assign({},s),a.push(["exit",i,e])),n.end=Object.assign({},s),a.push(["exit",n,e]),t.add(r+1,0,a)}function Ds(t,e){const r=t[e],n=r[0]==="enter"?"start":"end";return r[1][n]}const nR={name:"tasklistCheck",tokenize:aR};function iR(){return{text:{91:nR}}}function aR(t,e,r){const n=this;return i;function i(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),a)}function a(l){return Ft(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),s):r(l)}function s(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),o):r(l)}function o(l){return Ye(l)?e(l):Tt(l)?t.check({tokenize:sR},e,r)(l):r(l)}}function sR(t,e,r){return wt(t,n,"whitespace");function n(i){return i===null?r(i):e(i)}}function oR(t){return G3([bM(),qI(),KI(t),eR(),iR()])}const lR={};function cR(t){const e=this,r=t||lR,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(oR(r)),a.push(hM()),s.push(dM(r))}var uR=Object.defineProperty,hR=Object.defineProperties,dR=Object.getOwnPropertyDescriptors,$2=Object.getOwnPropertySymbols,fR=Object.prototype.hasOwnProperty,pR=Object.prototype.propertyIsEnumerable,z2=(t,e,r)=>e in t?uR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,l6=(t,e)=>{for(var r in e||(e={}))fR.call(e,r)&&z2(t,r,e[r]);if($2)for(var r of $2(e))pR.call(e,r)&&z2(t,r,e[r]);return t},c6=(t,e)=>hR(t,dR(e)),mR=/(\*\*)([^*]*\*?)$/,gR=/(__)([^_]*?)$/,bR=/(\*\*\*)([^*]*?)$/,yR=/(\*)([^*]*?)$/,xR=/(_)([^_]*?)$/,vR=/(`)([^`]*?)$/,kR=/(~~)([^~]*?)$/,ms=/^[\s_~*`]*$/,u6=/^[\s]*[-*+][\s]+$/,wR=/[\p{L}\p{N}_]/u,TR=/^```[^`\n]*```?$/,CR=/^\*{4,}$/,SR=/(__)([^_]+)_$/,_R=/(~~)([^~]+)~$/,ER=/__/g,H2=/~~/g,xa=t=>{if(!t)return!1;let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95?!0:wR.test(t)},oo=(t,e)=>{let r=!1;for(let n=0;n<e;n+=1)t[n]==="`"&&t[n+1]==="`"&&t[n+2]==="`"&&(r=!r,n+=2);return r},AR=(t,e)=>{let r=1;for(let n=e-1;n>=0;n-=1)if(t[n]==="]")r+=1;else if(t[n]==="["&&(r-=1,r===0))return n;return-1},h6=(t,e)=>{let r=1;for(let n=e+1;n<t.length;n+=1)if(t[n]==="[")r+=1;else if(t[n]==="]"&&(r-=1,r===0))return n;return-1},sh=(t,e)=>{let r=!1,n=!1;for(let i=0;i<t.length&&i<e;i+=1){if(t[i]==="\\"&&t[i+1]==="$"){i+=1;continue}t[i]==="$"&&(t[i+1]==="$"?(n=!n,i+=1,r=!1):n||(r=!r))}return r||n},NR=(t,e)=>{for(let r=e;r<t.length;r+=1){if(t[r]===")")return!0;if(t[r]===`
18
+ `)return!1}return!1},d6=(t,e)=>{for(let r=e-1;r>=0;r-=1){if(t[r]===")")return!1;if(t[r]==="(")return r>0&&t[r-1]==="]"?NR(t,e):!1;if(t[r]===`
19
+ `)return!1}return!1},$m=(t,e,r)=>{let n=0;for(let l=e-1;l>=0;l-=1)if(t[l]===`
20
+ `){n=l+1;break}let i=t.length;for(let l=e;l<t.length;l+=1)if(t[l]===`
21
+ `){i=l;break}let a=t.substring(n,i),s=0,o=!1;for(let l of a)if(l===r)s+=1;else if(l!==" "&&l!==" "){o=!0;break}return s>=3&&!o},LR=(t,e,r)=>{if(r!==" "&&r!==" ")return!1;let n=0;for(let i=e-1;i>=0;i-=1)if(t[i]===`
22
+ `){n=i+1;break}for(let i=n;i<e;i+=1)if(t[i]!==" "&&t[i]!==" ")return!1;return!0},MR=(t,e,r,n)=>r==="\\"||t.includes("$")&&sh(t,e)?!0:r!=="*"&&n==="*"?(e<t.length-2?t[e+2]:"")!=="*":!!(r==="*"||r&&n&&xa(r)&&xa(n)||LR(t,e,n)),f6=t=>{let e=0,r=t.length;for(let n=0;n<r;n+=1){if(t[n]!=="*")continue;let i=n>0?t[n-1]:"",a=n<r-1?t[n+1]:"";MR(t,n,i,a)||(e+=1)}return e},IR=(t,e,r,n)=>!!(r==="\\"||t.includes("$")&&sh(t,e)||d6(t,e)||r==="_"||n==="_"||r&&n&&xa(r)&&xa(n)),RR=t=>{let e=0,r=t.length;for(let n=0;n<r;n+=1){if(t[n]!=="_")continue;let i=n>0?t[n-1]:"",a=n<r-1?t[n+1]:"";IR(t,n,i,a)||(e+=1)}return e},BR=t=>{let e=0,r=0;for(let n=0;n<t.length;n+=1)t[n]==="*"?r+=1:(r>=3&&(e+=Math.floor(r/3)),r=0);return r>=3&&(e+=Math.floor(r/3)),e},DR=(t,e,r)=>{if(!e||ms.test(e))return!0;let n=t.substring(0,r).lastIndexOf(`
23
+ `),i=n===-1?0:n+1,a=t.substring(i,r);return u6.test(a)&&e.includes(`
24
+ `)?!0:$m(t,r,"*")},OR=t=>{let e=t.match(mR);if(!e)return t;let r=e[2],n=t.lastIndexOf(e[1]);return oo(t,n)||DR(t,r,n)?t:(t.match(/\*\*/g)||[]).length%2===1?r.endsWith("*")?`${t}*`:`${t}**`:t},PR=(t,e,r)=>{if(!e||ms.test(e))return!0;let n=t.substring(0,r).lastIndexOf(`
25
+ `),i=n===-1?0:n+1,a=t.substring(i,r);return u6.test(a)&&e.includes(`
26
+ `)?!0:$m(t,r,"_")},FR=t=>{let e=t.match(gR);if(!e){let i=t.match(SR);if(i){let a=t.lastIndexOf(i[1]);if(!oo(t,a)&&(t.match(ER)||[]).length%2===1)return`${t}_`}return t}let r=e[2],n=t.lastIndexOf(e[1]);return oo(t,n)||PR(t,r,n)?t:(t.match(/__/g)||[]).length%2===1?`${t}__`:t},$R=t=>{for(let e=0;e<t.length;e+=1)if(t[e]==="*"&&t[e-1]!=="*"&&t[e+1]!=="*"&&t[e-1]!=="\\"&&!sh(t,e)){let r=e>0?t[e-1]:"",n=e<t.length-1?t[e+1]:"";if(r&&n&&xa(r)&&xa(n))continue;return e}return-1},zR=t=>{if(!t.match(yR))return t;let e=$R(t);if(e===-1||oo(t,e))return t;let r=t.substring(e+1);return!r||ms.test(r)?t:f6(t)%2===1?`${t}*`:t},p6=t=>{for(let e=0;e<t.length;e+=1)if(t[e]==="_"&&t[e-1]!=="_"&&t[e+1]!=="_"&&t[e-1]!=="\\"&&!sh(t,e)&&!d6(t,e)){let r=e>0?t[e-1]:"",n=e<t.length-1?t[e+1]:"";if(r&&n&&xa(r)&&xa(n))continue;return e}return-1},HR=t=>{let e=t.length;for(;e>0&&t[e-1]===`
27
+ `;)e-=1;if(e<t.length){let r=t.slice(0,e),n=t.slice(e);return`${r}_${n}`}return`${t}_`},qR=t=>{if(!t.endsWith("**"))return null;let e=t.slice(0,-2);if((e.match(/\*\*/g)||[]).length%2!==1)return null;let r=e.indexOf("**"),n=p6(e);return r!==-1&&n!==-1&&r<n?`${e}_**`:null},jR=t=>{if(!t.match(xR))return t;let e=p6(t);if(e===-1||oo(t,e))return t;let r=t.substring(e+1);if(!r||ms.test(r))return t;if(RR(t)%2===1){let n=qR(t);return n!==null?n:HR(t)}return t},UR=t=>{let e=(t.match(/\*\*/g)||[]).length,r=f6(t);return e%2===0&&r%2===0},WR=(t,e,r)=>!e||ms.test(e)||oo(t,r)?!0:$m(t,r,"*"),GR=t=>{if(CR.test(t))return t;let e=t.match(bR);if(!e)return t;let r=e[2],n=t.lastIndexOf(e[1]);return WR(t,r,n)?t:BR(t)%2===1?UR(t)?t:`${t}***`:t},Vu=(t,e)=>{let r=!1,n=!1;for(let i=0;i<e;i+=1){if(t.substring(i,i+3)==="```"){n=!n,i+=2;continue}!n&&t[i]==="`"&&(r=!r)}return r||n},YR=(t,e)=>{let r=t.substring(e,e+3)==="```",n=e>0&&t.substring(e-1,e+2)==="```",i=e>1&&t.substring(e-2,e+1)==="```";return r||n||i},VR=t=>{let e=0;for(let r=0;r<t.length;r+=1)t[r]==="`"&&!YR(t,r)&&(e+=1);return e},XR=t=>!t.match(TR)||t.includes(`
28
+ `)?null:t.endsWith("``")&&!t.endsWith("```")?`${t}\``:t,KR=t=>(t.match(/```/g)||[]).length%2===1,QR=t=>{let e=XR(t);if(e!==null)return e;let r=t.match(vR);if(r&&!KR(t)){let n=r[2];if(!n||ms.test(n))return t;if(VR(t)%2===1)return`${t}\``}return t},ZR=(t,e)=>e>=2&&t.substring(e-2,e+1)==="```"||e>=1&&t.substring(e-1,e+2)==="```"||e<=t.length-3&&t.substring(e,e+3)==="```",JR=t=>{let e=0,r=!1;for(let n=0;n<t.length-1;n+=1)t[n]==="`"&&!ZR(t,n)&&(r=!r),!r&&t[n]==="$"&&t[n+1]==="$"&&(e+=1,n+=1);return e},eB=t=>{let e=t.indexOf("$$");return e!==-1&&t.indexOf(`
29
+ `,e)!==-1&&!t.endsWith(`
30
+ `)?`${t}
31
+ $$`:`${t}$$`},tB=t=>JR(t)%2===0?t:eB(t),rB=(t,e,r)=>{if(t.substring(e+2).includes(")"))return null;let n=AR(t,e);if(n===-1||Vu(t,n))return null;let i=n>0&&t[n-1]==="!",a=i?n-1:n,s=t.substring(0,a);if(i)return s;let o=t.substring(n+1,e);return r==="text-only"?`${s}${o}`:`${s}[${o}](streamdown:incomplete-link)`},q2=(t,e)=>{for(let r=0;r<=e;r++)if(t[r]==="["&&!Vu(t,r)){if(r>0&&t[r-1]==="!")continue;let n=h6(t,r);if(n===-1)return r;if(n+1<t.length&&t[n+1]==="("){let i=t.indexOf(")",n+2);i!==-1&&(r=i)}}return-1},nB=(t,e,r)=>{let n=e>0&&t[e-1]==="!",i=n?e-1:e,a=t.substring(e+1);if(!a.includes("]")){let s=t.substring(0,i);if(n)return s;if(r==="text-only"){let o=q2(t,e);return o!==-1?t.substring(0,o)+t.substring(o+1):`${s}${a}`}return`${t}](streamdown:incomplete-link)`}if(h6(t,e)===-1){let s=t.substring(0,i);if(n)return s;if(r==="text-only"){let o=q2(t,e);if(o!==-1)return t.substring(0,o)+t.substring(o+1);let l=t.substring(e+1);return`${s}${l}`}return`${t}](streamdown:incomplete-link)`}return null},m6=(t,e="protocol")=>{let r=t.lastIndexOf("](");if(r!==-1&&!Vu(t,r)){let n=rB(t,r,e);if(n!==null)return n}for(let n=t.length-1;n>=0;n-=1)if(t[n]==="["&&!Vu(t,n)){let i=nB(t,n,e);if(i!==null)return i}return t},iB=/^-{1,2}$/,aB=/^[\s]*-{1,2}[\s]+$/,sB=/^={1,2}$/,oB=/^[\s]*={1,2}[\s]+$/,lB=t=>{if(!t||typeof t!="string")return t;let e=t.lastIndexOf(`
32
+ `);if(e===-1)return t;let r=t.substring(e+1),n=t.substring(0,e),i=r.trim();if(iB.test(i)&&!r.match(aB)){let a=n.split(`
33
+ `).at(-1);if(a&&a.trim().length>0)return`${t}​`}if(sB.test(i)&&!r.match(oB)){let a=n.split(`
34
+ `).at(-1);if(a&&a.trim().length>0)return`${t}​`}return t},cB=t=>{let e=t.match(kR);if(e){let r=e[2];if(!r||ms.test(r))return t;if((t.match(H2)||[]).length%2===1)return`${t}~~`}else if(t.match(_R)&&(t.match(H2)||[]).length%2===1)return`${t}~`;return t},bd=t=>t!==!1,gn={SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},uB=[{handler:{name:"setextHeadings",handle:lB,priority:gn.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:m6,priority:gn.LINKS},optionKey:"links",earlyReturn:t=>t.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:GR,priority:gn.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:OR,priority:gn.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:FR,priority:gn.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:zR,priority:gn.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:jR,priority:gn.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:QR,priority:gn.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:cB,priority:gn.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:tB,priority:gn.KATEX},optionKey:"katex"}],hB=t=>{var e;let r=(e=t==null?void 0:t.linkMode)!=null?e:"protocol";return uB.filter(({handler:n,optionKey:i})=>n.name==="links"?bd(t==null?void 0:t.links)||bd(t==null?void 0:t.images):bd(t==null?void 0:t[i])).map(({handler:n,earlyReturn:i})=>n.name==="links"?{handler:c6(l6({},n),{handle:a=>m6(a,r)}),earlyReturn:r==="protocol"?i:void 0}:{handler:n,earlyReturn:i})},dB=(t,e)=>{var r;if(!t||typeof t!="string")return t;let n=t.endsWith(" ")&&!t.endsWith(" ")?t.slice(0,-1):t,i=hB(e),a=((r=e==null?void 0:e.handlers)!=null?r:[]).map(o=>{var l;return{handler:c6(l6({},o),{priority:(l=o.priority)!=null?l:gn.DEFAULT}),earlyReturn:void 0}}),s=[...i,...a].sort((o,l)=>{var c,u;return((c=o.handler.priority)!=null?c:gn.DEFAULT)-((u=l.handler.priority)!=null?u:gn.DEFAULT)});for(let{handler:o,earlyReturn:l}of s)if(n=o.handle(n),l!=null&&l(n))return n;return n},fB=dB;function g6(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=g6(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function pB(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=g6(t))&&(n&&(n+=" "),n+=e);return n}const mB=(t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r},gB=(t,e)=>({classGroupId:t,validator:e}),b6=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),Xu="-",j2=[],bB="arbitrary..",yB=t=>{const e=vB(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return xB(s);const o=s.split(Xu),l=o[0]===""&&o.length>1?1:0;return y6(o,l,e)},getConflictingClassGroupIds:(s,o)=>{if(o){const l=n[s],c=r[s];return l?c?mB(c,l):l:c||j2}return r[s]||j2}}},y6=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const i=t[e],a=r.nextPart.get(i);if(a){const c=y6(t,e+1,a);if(c)return c}const s=r.validators;if(s===null)return;const o=e===0?t.join(Xu):t.slice(e).join(Xu),l=s.length;for(let c=0;c<l;c++){const u=s[c];if(u.validator(o))return u.classGroupId}},xB=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?bB+n:void 0})(),vB=t=>{const{theme:e,classGroups:r}=t;return kB(r,e)},kB=(t,e)=>{const r=b6();for(const n in t){const i=t[n];zm(i,r,n,e)}return r},zm=(t,e,r,n)=>{const i=t.length;for(let a=0;a<i;a++){const s=t[a];wB(s,e,r,n)}},wB=(t,e,r,n)=>{if(typeof t=="string"){TB(t,e,r);return}if(typeof t=="function"){CB(t,e,r,n);return}SB(t,e,r,n)},TB=(t,e,r)=>{const n=t===""?e:x6(e,t);n.classGroupId=r},CB=(t,e,r,n)=>{if(_B(t)){zm(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push(gB(r,t))},SB=(t,e,r,n)=>{const i=Object.entries(t),a=i.length;for(let s=0;s<a;s++){const[o,l]=i[s];zm(l,x6(e,o),r,n)}},x6=(t,e)=>{let r=t;const n=e.split(Xu),i=n.length;for(let a=0;a<i;a++){const s=n[a];let o=r.nextPart.get(s);o||(o=b6(),r.nextPart.set(s,o)),r=o}return r},_B=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,EB=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),n=Object.create(null);const i=(a,s)=>{r[a]=s,e++,e>t&&(e=0,n=r,r=Object.create(null))};return{get(a){let s=r[a];if(s!==void 0)return s;if((s=n[a])!==void 0)return i(a,s),s},set(a,s){a in r?r[a]=s:i(a,s)}}},Of="!",U2=":",AB=[],W2=(t,e,r,n,i)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:i}),NB=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=i=>{const a=[];let s=0,o=0,l=0,c;const u=i.length;for(let m=0;m<u;m++){const y=i[m];if(s===0&&o===0){if(y===U2){a.push(i.slice(l,m)),l=m+1;continue}if(y==="/"){c=m;continue}}y==="["?s++:y==="]"?s--:y==="("?o++:y===")"&&o--}const h=a.length===0?i:i.slice(l);let d=h,f=!1;h.endsWith(Of)?(d=h.slice(0,-1),f=!0):h.startsWith(Of)&&(d=h.slice(1),f=!0);const p=c&&c>l?c-l:void 0;return W2(a,f,d,p)};if(e){const i=e+U2,a=n;n=s=>s.startsWith(i)?a(s.slice(i.length)):W2(AB,!1,s,void 0,!0)}if(r){const i=n;n=a=>r({className:a,parseClassName:i})}return n},LB=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,n)=>{e.set(r,1e6+n)}),r=>{const n=[];let i=[];for(let a=0;a<r.length;a++){const s=r[a],o=s[0]==="[",l=e.has(s);o||l?(i.length>0&&(i.sort(),n.push(...i),i=[]),n.push(s)):i.push(s)}return i.length>0&&(i.sort(),n.push(...i)),n}},MB=t=>({cache:EB(t.cacheSize),parseClassName:NB(t),sortModifiers:LB(t),...yB(t)}),IB=/\s+/,RB=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:i,sortModifiers:a}=e,s=[],o=t.trim().split(IB);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{isExternal:h,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=r(u);if(h){l=u+(l.length>0?" "+l:l);continue}let y=!!m,b=n(y?p.substring(0,m):p);if(!b){if(!y){l=u+(l.length>0?" "+l:l);continue}if(b=n(p),!b){l=u+(l.length>0?" "+l:l);continue}y=!1}const v=d.length===0?"":d.length===1?d[0]:a(d).join(":"),C=f?v+Of:v,E=C+b;if(s.indexOf(E)>-1)continue;s.push(E);const _=i(b,y);for(let k=0;k<_.length;++k){const N=_[k];s.push(C+N)}l=u+(l.length>0?" "+l:l)}return l},BB=(...t)=>{let e=0,r,n,i="";for(;e<t.length;)(r=t[e++])&&(n=v6(r))&&(i&&(i+=" "),i+=n);return i},v6=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=v6(t[n]))&&(r&&(r+=" "),r+=e);return r},DB=(t,...e)=>{let r,n,i,a;const s=l=>{const c=e.reduce((u,h)=>h(u),t());return r=MB(c),n=r.cache.get,i=r.cache.set,a=o,o(l)},o=l=>{const c=n(l);if(c)return c;const u=RB(l,r);return i(l,u),u};return a=s,(...l)=>a(BB(...l))},OB=[],hr=t=>{const e=r=>r[t]||OB;return e.isThemeGetter=!0,e},k6=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,w6=/^\((?:(\w[\w-]*):)?(.+)\)$/i,PB=/^\d+\/\d+$/,FB=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$B=/\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$/,zB=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,HB=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qB=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ns=t=>PB.test(t),xt=t=>!!t&&!Number.isNaN(Number(t)),aa=t=>!!t&&Number.isInteger(Number(t)),yd=t=>t.endsWith("%")&&xt(t.slice(0,-1)),Ai=t=>FB.test(t),jB=()=>!0,UB=t=>$B.test(t)&&!zB.test(t),T6=()=>!1,WB=t=>HB.test(t),GB=t=>qB.test(t),YB=t=>!Fe(t)&&!$e(t),VB=t=>Eo(t,_6,T6),Fe=t=>k6.test(t),Fa=t=>Eo(t,E6,UB),xd=t=>Eo(t,JB,xt),G2=t=>Eo(t,C6,T6),XB=t=>Eo(t,S6,GB),$c=t=>Eo(t,A6,WB),$e=t=>w6.test(t),Go=t=>Ao(t,E6),KB=t=>Ao(t,eD),Y2=t=>Ao(t,C6),QB=t=>Ao(t,_6),ZB=t=>Ao(t,S6),zc=t=>Ao(t,A6,!0),Eo=(t,e,r)=>{const n=k6.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},Ao=(t,e,r=!1)=>{const n=w6.exec(t);return n?n[1]?e(n[1]):r:!1},C6=t=>t==="position"||t==="percentage",S6=t=>t==="image"||t==="url",_6=t=>t==="length"||t==="size"||t==="bg-size",E6=t=>t==="length",JB=t=>t==="number",eD=t=>t==="family-name",A6=t=>t==="shadow",tD=()=>{const t=hr("color"),e=hr("font"),r=hr("text"),n=hr("font-weight"),i=hr("tracking"),a=hr("leading"),s=hr("breakpoint"),o=hr("container"),l=hr("spacing"),c=hr("radius"),u=hr("shadow"),h=hr("inset-shadow"),d=hr("text-shadow"),f=hr("drop-shadow"),p=hr("blur"),m=hr("perspective"),y=hr("aspect"),b=hr("ease"),v=hr("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...E(),$e,Fe],k=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],D=()=>[$e,Fe,l],$=()=>[Ns,"full","auto",...D()],R=()=>[aa,"none","subgrid",$e,Fe],P=()=>["auto",{span:["full",aa,$e,Fe]},aa,$e,Fe],G=()=>[aa,"auto",$e,Fe],ee=()=>["auto","min","max","fr",$e,Fe],W=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...D()],Q=()=>[Ns,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],Y=()=>[t,$e,Fe],be=()=>[...E(),Y2,G2,{position:[$e,Fe]}],L=()=>["no-repeat",{repeat:["","x","y","space","round"]}],se=()=>["auto","cover","contain",QB,VB,{size:[$e,Fe]}],ae=()=>[yd,Go,Fa],I=()=>["","none","full",c,$e,Fe],ye=()=>["",xt,Go,Fa],Ee=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>[xt,yd,Y2,G2],qe=()=>["","none",p,$e,Fe],Re=()=>["none",xt,$e,Fe],De=()=>["none",xt,$e,Fe],et=()=>[xt,$e,Fe],ot=()=>[Ns,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ai],breakpoint:[Ai],color:[jB],container:[Ai],"drop-shadow":[Ai],ease:["in","out","in-out"],font:[YB],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ai],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ai],shadow:[Ai],spacing:["px",xt],text:[Ai],"text-shadow":[Ai],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ns,Fe,$e,y]}],container:["container"],columns:[{columns:[xt,Fe,$e,o]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:_()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[aa,"auto",$e,Fe]}],basis:[{basis:[Ns,"full","auto",o,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[xt,Ns,"auto","initial","none",Fe]}],grow:[{grow:["",xt,$e,Fe]}],shrink:[{shrink:["",xt,$e,Fe]}],order:[{order:[aa,"first","last","none",$e,Fe]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...W(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...W()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":W()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],w:[{w:[o,"screen",...Q()]}],"min-w":[{"min-w":[o,"screen","none",...Q()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",r,Go,Fa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,$e,xd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",yd,Fe]}],"font-family":[{font:[KB,Fe,e]}],"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,$e,Fe]}],"line-clamp":[{"line-clamp":[xt,"none",$e,xd]}],leading:[{leading:[a,...D()]}],"list-image":[{"list-image":["none",$e,Fe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",$e,Fe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[xt,"from-font","auto",$e,Fa]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[xt,"auto",$e,Fe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",$e,Fe]}],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",$e,Fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:be()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:se()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},aa,$e,Fe],radial:["",$e,Fe],conic:[aa,$e,Fe]},ZB,XB]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:ye()}],"border-w-x":[{"border-x":ye()}],"border-w-y":[{"border-y":ye()}],"border-w-s":[{"border-s":ye()}],"border-w-e":[{"border-e":ye()}],"border-w-t":[{"border-t":ye()}],"border-w-r":[{"border-r":ye()}],"border-w-b":[{"border-b":ye()}],"border-w-l":[{"border-l":ye()}],"divide-x":[{"divide-x":ye()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ye()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ee(),"hidden","none"]}],"divide-style":[{divide:[...Ee(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...Ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[xt,$e,Fe]}],"outline-w":[{outline:["",xt,Go,Fa]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",u,zc,$c]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",h,zc,$c]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:ye()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[xt,Fa]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":ye()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",d,zc,$c]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[xt,$e,Fe]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"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":[xt]}],"mask-image-linear-from-pos":[{"mask-linear-from":we()}],"mask-image-linear-to-pos":[{"mask-linear-to":we()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":we()}],"mask-image-t-to-pos":[{"mask-t-to":we()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":we()}],"mask-image-r-to-pos":[{"mask-r-to":we()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":we()}],"mask-image-b-to-pos":[{"mask-b-to":we()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":we()}],"mask-image-l-to-pos":[{"mask-l-to":we()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":we()}],"mask-image-x-to-pos":[{"mask-x-to":we()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":we()}],"mask-image-y-to-pos":[{"mask-y-to":we()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[$e,Fe]}],"mask-image-radial-from-pos":[{"mask-radial-from":we()}],"mask-image-radial-to-pos":[{"mask-radial-to":we()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"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":E()}],"mask-image-conic-pos":[{"mask-conic":[xt]}],"mask-image-conic-from-pos":[{"mask-conic-from":we()}],"mask-image-conic-to-pos":[{"mask-conic-to":we()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:be()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:se()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",$e,Fe]}],filter:[{filter:["","none",$e,Fe]}],blur:[{blur:qe()}],brightness:[{brightness:[xt,$e,Fe]}],contrast:[{contrast:[xt,$e,Fe]}],"drop-shadow":[{"drop-shadow":["","none",f,zc,$c]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",xt,$e,Fe]}],"hue-rotate":[{"hue-rotate":[xt,$e,Fe]}],invert:[{invert:["",xt,$e,Fe]}],saturate:[{saturate:[xt,$e,Fe]}],sepia:[{sepia:["",xt,$e,Fe]}],"backdrop-filter":[{"backdrop-filter":["","none",$e,Fe]}],"backdrop-blur":[{"backdrop-blur":qe()}],"backdrop-brightness":[{"backdrop-brightness":[xt,$e,Fe]}],"backdrop-contrast":[{"backdrop-contrast":[xt,$e,Fe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",xt,$e,Fe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[xt,$e,Fe]}],"backdrop-invert":[{"backdrop-invert":["",xt,$e,Fe]}],"backdrop-opacity":[{"backdrop-opacity":[xt,$e,Fe]}],"backdrop-saturate":[{"backdrop-saturate":[xt,$e,Fe]}],"backdrop-sepia":[{"backdrop-sepia":["",xt,$e,Fe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",$e,Fe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[xt,"initial",$e,Fe]}],ease:[{ease:["linear","initial",b,$e,Fe]}],delay:[{delay:[xt,$e,Fe]}],animate:[{animate:["none",v,$e,Fe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,$e,Fe]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:De()}],"scale-x":[{"scale-x":De()}],"scale-y":[{"scale-y":De()}],"scale-z":[{"scale-z":De()}],"scale-3d":["scale-3d"],skew:[{skew:et()}],"skew-x":[{"skew-x":et()}],"skew-y":[{"skew-y":et()}],transform:[{transform:[$e,Fe,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ot()}],"translate-x":[{"translate-x":ot()}],"translate-y":[{"translate-y":ot()}],"translate-z":[{"translate-z":ot()}],"translate-none":["translate-none"],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"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",$e,Fe]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",$e,Fe]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[xt,Go,Fa,xd]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["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-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["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-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},rD=DB(tD),nD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iD=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,aD={};function V2(t,e){return(aD.jsx?iD:nD).test(t)}const sD=/[ \t\n\f\r]/g;function oh(t){return typeof t=="object"?t.type==="text"?X2(t.value):!1:X2(t)}function X2(t){return t.replace(sD,"")===""}var lo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function lh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Hm={},K2=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,oD=/\n/g,lD=/^\s*/,cD=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,uD=/^:\s*/,hD=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,dD=/^[;\s]*/,fD=/^\s+|\s+$/g,pD=`
35
+ `,Q2="/",Z2="*",Wa="",mD="comment",gD="declaration";function bD(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var r=1,n=1;function i(p){var m=p.match(oD);m&&(r+=m.length);var y=p.lastIndexOf(pD);n=~y?p.length-y:n+p.length}function a(){var p={line:r,column:n};return function(m){return m.position=new s(p),c(),m}}function s(p){this.start=p,this.end={line:r,column:n},this.source=e.source}s.prototype.content=t;function o(p){var m=new Error(e.source+":"+r+":"+n+": "+p);if(m.reason=p,m.filename=e.source,m.line=r,m.column=n,m.source=t,!e.silent)throw m}function l(p){var m=p.exec(t);if(m){var y=m[0];return i(y),t=t.slice(y.length),m}}function c(){l(lD)}function u(p){var m;for(p=p||[];m=h();)m!==!1&&p.push(m);return p}function h(){var p=a();if(!(Q2!=t.charAt(0)||Z2!=t.charAt(1))){for(var m=2;Wa!=t.charAt(m)&&(Z2!=t.charAt(m)||Q2!=t.charAt(m+1));)++m;if(m+=2,Wa===t.charAt(m-1))return o("End of comment missing");var y=t.slice(2,m-2);return n+=2,i(y),t=t.slice(m),n+=2,p({type:mD,comment:y})}}function d(){var p=a(),m=l(cD);if(m){if(h(),!l(uD))return o("property missing ':'");var y=l(hD),b=p({type:gD,property:J2(m[0].replace(K2,Wa)),value:y?J2(y[0].replace(K2,Wa)):Wa});return l(dD),b}}function f(){var p=[];u(p);for(var m;m=d();)m!==!1&&(p.push(m),u(p));return p}return c(),f()}function J2(t){return t?t.replace(fD,Wa):Wa}var yD=bD,xD=lo&&lo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Hm,"__esModule",{value:!0});Hm.default=kD;const vD=xD(yD);function kD(t,e){let r=null;if(!t||typeof t!="string")return r;const n=(0,vD.default)(t),i=typeof e=="function";return n.forEach(a=>{if(a.type!=="declaration")return;const{property:s,value:o}=a;i?e(s,o,a):o&&(r=r||{},r[s]=o)}),r}var ch={};Object.defineProperty(ch,"__esModule",{value:!0});ch.camelCase=void 0;var wD=/^--[a-zA-Z0-9_-]+$/,TD=/-([a-z])/g,CD=/^[^-]+$/,SD=/^-(webkit|moz|ms|o|khtml)-/,_D=/^-(ms)-/,ED=function(t){return!t||CD.test(t)||wD.test(t)},AD=function(t,e){return e.toUpperCase()},eb=function(t,e){return"".concat(e,"-")},ND=function(t,e){return e===void 0&&(e={}),ED(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace(_D,eb):t=t.replace(SD,eb),t.replace(TD,AD))};ch.camelCase=ND;var LD=lo&&lo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},MD=LD(Hm),ID=ch;function Pf(t,e){var r={};return!t||typeof t!="string"||(0,MD.default)(t,function(n,i){n&&i&&(r[(0,ID.camelCase)(n,e)]=i)}),r}Pf.default=Pf;var RD=Pf;const BD=lh(RD);function Ml(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?tb(t.position):"start"in t||"end"in t?tb(t):"line"in t||"column"in t?Ff(t):""}function Ff(t){return rb(t&&t.line)+":"+rb(t&&t.column)}function tb(t){return Ff(t&&t.start)+"-"+Ff(t&&t.end)}function rb(t){return t&&typeof t=="number"?t:1}class Pr extends Error{constructor(e,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let i="",a={},s=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof e=="string"?i=e:!a.cause&&e&&(s=!0,i=e.message,a.cause=e),!a.ruleId&&!a.source&&typeof n=="string"){const l=n.indexOf(":");l===-1?a.ruleId=n:(a.source=n.slice(0,l),a.ruleId=n.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const o=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Ml(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=s&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Pr.prototype.file="";Pr.prototype.name="";Pr.prototype.reason="";Pr.prototype.message="";Pr.prototype.stack="";Pr.prototype.column=void 0;Pr.prototype.line=void 0;Pr.prototype.ancestors=void 0;Pr.prototype.cause=void 0;Pr.prototype.fatal=void 0;Pr.prototype.place=void 0;Pr.prototype.ruleId=void 0;Pr.prototype.source=void 0;const qm={}.hasOwnProperty,DD=new Map,OD=/[A-Z]/g,PD=new Set(["table","tbody","thead","tfoot","tr"]),FD=new Set(["td","th"]),N6="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function $D(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=e.filePath||void 0;let n;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=YD(r,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=GD(r,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:n,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?yi:wo,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},a=L6(i,t,void 0);return a&&typeof a!="string"?a:i.create(t,i.Fragment,{children:a||void 0},void 0)}function L6(t,e,r){if(e.type==="element")return zD(t,e,r);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return HD(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return jD(t,e,r);if(e.type==="mdxjsEsm")return qD(t,e);if(e.type==="root")return UD(t,e,r);if(e.type==="text")return WD(t,e)}function zD(t,e,r){const n=t.schema;let i=n;e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(i=yi,t.schema=i),t.ancestors.push(e);const a=I6(t,e.tagName,!1),s=VD(t,e);let o=Um(t,e);return PD.has(e.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!oh(l):!0})),M6(t,s,a,e),jm(s,o),t.ancestors.pop(),t.schema=n,t.create(e,a,s,r)}function HD(t,e){if(e.data&&e.data.estree&&t.evaluater){const n=e.data.estree.body[0];return n.type,t.evaluater.evaluateExpression(n.expression)}Yl(t,e.position)}function qD(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);Yl(t,e.position)}function jD(t,e,r){const n=t.schema;let i=n;e.name==="svg"&&n.space==="html"&&(i=yi,t.schema=i),t.ancestors.push(e);const a=e.name===null?t.Fragment:I6(t,e.name,!0),s=XD(t,e),o=Um(t,e);return M6(t,s,a,e),jm(s,o),t.ancestors.pop(),t.schema=n,t.create(e,a,s,r)}function UD(t,e,r){const n={};return jm(n,Um(t,e)),t.create(e,t.Fragment,n,r)}function WD(t,e){return e.value}function M6(t,e,r,n){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(e.node=n)}function jm(t,e){if(e.length>0){const r=e.length>1?e:e[0];r&&(t.children=r)}}function GD(t,e,r){return n;function n(i,a,s,o){const c=Array.isArray(s.children)?r:e;return o?c(a,s,o):c(a,s)}}function YD(t,e){return r;function r(n,i,a,s){const o=Array.isArray(a.children),l=xi(n);return e(i,a,s,o,{columnNumber:l?l.column-1:void 0,fileName:t,lineNumber:l?l.line:void 0},void 0)}}function VD(t,e){const r={};let n,i;for(i in e.properties)if(i!=="children"&&qm.call(e.properties,i)){const a=KD(t,i,e.properties[i]);if(a){const[s,o]=a;t.tableCellAlignToStyle&&s==="align"&&typeof o=="string"&&FD.has(e.tagName)?n=o:r[s]=o}}if(n){const a=r.style||(r.style={});a[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function XD(t,e){const r={};for(const n of e.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&t.evaluater){const a=n.data.estree.body[0];a.type;const s=a.expression;s.type;const o=s.properties[0];o.type,Object.assign(r,t.evaluater.evaluateExpression(o.argument))}else Yl(t,e.position);else{const i=n.name;let a;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&t.evaluater){const o=n.value.data.estree.body[0];o.type,a=t.evaluater.evaluateExpression(o.expression)}else Yl(t,e.position);else a=n.value===null?!0:n.value;r[i]=a}return r}function Um(t,e){const r=[];let n=-1;const i=t.passKeys?new Map:DD;for(;++n<e.children.length;){const a=e.children[n];let s;if(t.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const c=i.get(l)||0;s=l+"-"+c,i.set(l,c+1)}}const o=L6(t,a,s);o!==void 0&&r.push(o)}return r}function KD(t,e,r){const n=bc(t.schema,e);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?Cm(r):Sm(r)),n.property==="style"){let i=typeof r=="object"?r:QD(t,String(r));return t.stylePropertyNameCase==="css"&&(i=ZD(i)),["style",i]}return[t.elementAttributeNameCase==="react"&&n.space?oE[n.property]||n.property:n.attribute,r]}}function QD(t,e){try{return BD(e,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const n=r,i=new Pr("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=N6+"#cannot-parse-style-attribute",i}}function I6(t,e,r){let n;if(!r)n={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let a=-1,s;for(;++a<i.length;){const o=V2(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};s=s?{type:"MemberExpression",object:s,property:o,computed:!!(a&&o.type==="Literal"),optional:!1}:o}n=s}else n=V2(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(n.type==="Literal"){const i=n.value;return qm.call(t.components,i)?t.components[i]:i}if(t.evaluater)return t.evaluater.evaluateExpression(n);Yl(t)}function Yl(t,e){const r=new Pr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=N6+"#cannot-handle-mdx-estrees-without-createevaluater",r}function ZD(t){const e={};let r;for(r in t)qm.call(t,r)&&(e[JD(r)]=t[r]);return e}function JD(t){let e=t.replace(OD,eO);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function eO(t){return"-"+t.toLowerCase()}const tO={tokenize:rO};function rO(t){const e=t.attempt(this.parser.constructs.contentInitial,n,i);let r;return e;function n(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),wt(t,e,"linePrefix")}function i(o){return t.enter("paragraph"),a(o)}function a(o){const l=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,s(o)}function s(o){if(o===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(o);return}return Ye(o)?(t.consume(o),t.exit("chunkText"),a):(t.consume(o),s)}}const nO={tokenize:iO},nb={tokenize:aO};function iO(t){const e=this,r=[];let n=0,i,a,s;return o;function o(C){if(n<r.length){const E=r[n];return e.containerState=E[1],t.attempt(E[0].continuation,l,c)(C)}return c(C)}function l(C){if(n++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&v();const E=e.events.length;let _=E,k;for(;_--;)if(e.events[_][0]==="exit"&&e.events[_][1].type==="chunkFlow"){k=e.events[_][1].end;break}b(n);let N=E;for(;N<e.events.length;)e.events[N][1].end={...k},N++;return vn(e.events,_+1,0,e.events.slice(E)),e.events.length=N,c(C)}return o(C)}function c(C){if(n===r.length){if(!i)return d(C);if(i.currentConstruct&&i.currentConstruct.concrete)return p(C);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(nb,u,h)(C)}function u(C){return i&&v(),b(n),d(C)}function h(C){return e.parser.lazy[e.now().line]=n!==r.length,s=e.now().offset,p(C)}function d(C){return e.containerState={},t.attempt(nb,f,p)(C)}function f(C){return n++,r.push([e.currentConstruct,e.containerState]),d(C)}function p(C){if(C===null){i&&v(),b(0),t.consume(C);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),m(C)}function m(C){if(C===null){y(t.exit("chunkFlow"),!0),b(0),t.consume(C);return}return Ye(C)?(t.consume(C),y(t.exit("chunkFlow")),n=0,e.interrupt=void 0,o):(t.consume(C),m)}function y(C,E){const _=e.sliceStream(C);if(E&&_.push(null),C.previous=a,a&&(a.next=C),a=C,i.defineSkip(C.start),i.write(_),e.parser.lazy[C.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<s&&(!i.events[k][1].end||i.events[k][1].end.offset>s))return;const N=e.events.length;let D=N,$,R;for(;D--;)if(e.events[D][0]==="exit"&&e.events[D][1].type==="chunkFlow"){if($){R=e.events[D][1].end;break}$=!0}for(b(n),k=N;k<e.events.length;)e.events[k][1].end={...R},k++;vn(e.events,D+1,0,e.events.slice(N)),e.events.length=k}}function b(C){let E=r.length;for(;E-- >C;){const _=r[E];e.containerState=_[1],_[0].exit.call(e,t)}r.length=C}function v(){i.write([null]),a=void 0,i=void 0,e.containerState._closeFlow=void 0}}function aO(t,e,r){return wt(t,t.attempt(this.parser.constructs.document,e,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const sO={tokenize:oO};function oO(t){const e=this,r=t.attempt(kc,n,t.attempt(this.parser.constructs.flowInitial,i,wt(t,t.attempt(this.parser.constructs.flow,i,t.attempt(YM,i)),"linePrefix")));return r;function n(a){if(a===null){t.consume(a);return}return t.enter("lineEndingBlank"),t.consume(a),t.exit("lineEndingBlank"),e.currentConstruct=void 0,r}function i(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),e.currentConstruct=void 0,r}}const lO={resolveAll:B6()},cO=R6("string"),uO=R6("text");function R6(t){return{resolveAll:B6(t==="text"?hO:void 0),tokenize:e};function e(r){const n=this,i=this.parser.constructs[t],a=r.attempt(i,s,o);return s;function s(u){return c(u)?a(u):o(u)}function o(u){if(u===null){r.consume(u);return}return r.enter("data"),r.consume(u),l}function l(u){return c(u)?(r.exit("data"),a(u)):(r.consume(u),l)}function c(u){if(u===null)return!0;const h=i[u];let d=-1;if(h)for(;++d<h.length;){const f=h[d];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function B6(t){return e;function e(r,n){let i=-1,a;for(;++i<=r.length;)a===void 0?r[i]&&r[i][1].type==="data"&&(a=i,i++):(!r[i]||r[i][1].type!=="data")&&(i!==a+2&&(r[a][1].end=r[i-1][1].end,r.splice(a+2,i-a-2),i=a+2),a=void 0);return t?t(r,n):r}}function hO(t,e){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const n=t[r-1][1],i=e.sliceStream(n);let a=i.length,s=-1,o=0,l;for(;a--;){const c=i[a];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)o++,s--;if(s)break;s=-1}else if(c===-2)l=!0,o++;else if(c!==-1){a++;break}}if(e._contentTypeTextTrailing&&r===t.length&&(o=0),o){const c={type:r===t.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:n.start._bufferIndex+s,_index:n.start._index+a,line:n.end.line,column:n.end.column-o,offset:n.end.offset-o},end:{...n.end}};n.end={...c.start},n.start.offset===n.end.offset?Object.assign(n,c):(t.splice(r,0,["enter",c,e],["exit",c,e]),r+=2)}r++}return t}const dO={42:an,43:an,45:an,48:an,49:an,50:an,51:an,52:an,53:an,54:an,55:an,56:an,57:an,62:t6},fO={91:ZM},pO={[-2]:md,[-1]:md,32:md},mO={35:iI,42:wu,45:[P2,wu],60:lI,61:P2,95:wu,96:D2,126:D2},gO={38:n6,92:r6},bO={[-5]:gd,[-4]:gd,[-3]:gd,33:_I,38:n6,42:Df,60:[AM,mI],91:AI,92:[rI,r6],93:Fm,95:Df,96:HM},yO={null:[Df,lO]},xO={null:[42,95]},vO={null:[]},kO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:xO,contentInitial:fO,disable:vO,document:dO,flow:mO,flowInitial:pO,insideSpan:yO,string:gO,text:bO},Symbol.toStringTag,{value:"Module"}));function wO(t,e,r){let n={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const i={},a=[];let s=[],o=[];const l={attempt:N(_),check:N(k),consume:v,enter:C,exit:E,interrupt:N(k,{interrupt:!0})},c={code:null,containerState:{},defineSkip:m,events:[],now:p,parser:t,previous:null,sliceSerialize:d,sliceStream:f,write:h};let u=e.tokenize.call(c,l);return e.resolveAll&&a.push(e),c;function h(P){return s=Mn(s,P),y(),s[s.length-1]!==null?[]:(D(e,0),c.events=ah(a,c.events,c),c.events)}function d(P,G){return CO(f(P),G)}function f(P){return TO(s,P)}function p(){const{_bufferIndex:P,_index:G,line:ee,column:W,offset:U}=n;return{_bufferIndex:P,_index:G,line:ee,column:W,offset:U}}function m(P){i[P.line]=P.column,R()}function y(){let P;for(;n._index<s.length;){const G=s[n._index];if(typeof G=="string")for(P=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===P&&n._bufferIndex<G.length;)b(G.charCodeAt(n._bufferIndex));else b(G)}}function b(P){u=u(P)}function v(P){Ye(P)?(n.line++,n.column=1,n.offset+=P===-3?2:1,R()):P!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++)),c.previous=P}function C(P,G){const ee=G||{};return ee.type=P,ee.start=p(),c.events.push(["enter",ee,c]),o.push(ee),ee}function E(P){const G=o.pop();return G.end=p(),c.events.push(["exit",G,c]),G}function _(P,G){D(P,G.from)}function k(P,G){G.restore()}function N(P,G){return ee;function ee(W,U,j){let Q,Y,be,L;return Array.isArray(W)?ae(W):"tokenize"in W?ae([W]):se(W);function se(de){return we;function we(qe){const Re=qe!==null&&de[qe],De=qe!==null&&de.null,et=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(De)?De:De?[De]:[]];return ae(et)(qe)}}function ae(de){return Q=de,Y=0,de.length===0?j:I(de[Y])}function I(de){return we;function we(qe){return L=$(),be=de,de.partial||(c.currentConstruct=de),de.name&&c.parser.constructs.disable.null.includes(de.name)?Ee():de.tokenize.call(G?Object.assign(Object.create(c),G):c,l,ye,Ee)(qe)}}function ye(de){return P(be,L),U}function Ee(de){return L.restore(),++Y<Q.length?I(Q[Y]):j}}}function D(P,G){P.resolveAll&&!a.includes(P)&&a.push(P),P.resolve&&vn(c.events,G,c.events.length-G,P.resolve(c.events.slice(G),c)),P.resolveTo&&(c.events=P.resolveTo(c.events,c))}function $(){const P=p(),G=c.previous,ee=c.currentConstruct,W=c.events.length,U=Array.from(o);return{from:W,restore:j};function j(){n=P,c.previous=G,c.currentConstruct=ee,c.events.length=W,o=U,R()}}function R(){n.line in i&&n.column<2&&(n.column=i[n.line],n.offset+=i[n.line]-1)}}function TO(t,e){const r=e.start._index,n=e.start._bufferIndex,i=e.end._index,a=e.end._bufferIndex;let s;if(r===i)s=[t[r].slice(n,a)];else{if(s=t.slice(r,i),n>-1){const o=s[0];typeof o=="string"?s[0]=o.slice(n):s.shift()}a>0&&s.push(t[i].slice(0,a))}return s}function CO(t,e){let r=-1;const n=[];let i;for(;++r<t.length;){const a=t[r];let s;if(typeof a=="string")s=a;else switch(a){case-5:{s="\r";break}case-4:{s=`
36
+ `;break}case-3:{s=`\r
37
+ `;break}case-2:{s=e?" ":" ";break}case-1:{if(!e&&i)continue;s=" ";break}default:s=String.fromCharCode(a)}i=a===-2,n.push(s)}return n.join("")}function SO(t){const n={constructs:G3([kO,...(t||{}).extensions||[]]),content:i(tO),defined:[],document:i(nO),flow:i(sO),lazy:{},string:i(cO),text:i(uO)};return n;function i(a){return s;function s(o){return wO(n,a,o)}}}function _O(t){for(;!i6(t););return t}const ib=/[\0\t\n\r]/g;function EO(){let t=1,e="",r=!0,n;return i;function i(a,s,o){const l=[];let c,u,h,d,f;for(a=e+(typeof a=="string"?a.toString():new TextDecoder(s||void 0).decode(a)),h=0,e="",r&&(a.charCodeAt(0)===65279&&h++,r=void 0);h<a.length;){if(ib.lastIndex=h,c=ib.exec(a),d=c&&c.index!==void 0?c.index:a.length,f=a.charCodeAt(d),!c){e=a.slice(h);break}if(f===10&&h===d&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),h<d&&(l.push(a.slice(h,d)),t+=d-h),f){case 0:{l.push(65533),t++;break}case 9:{for(u=Math.ceil(t/4)*4,l.push(-2);t++<u;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:n=!0,t=1}h=d+1}return o&&(n&&l.push(-5),e&&l.push(e),l.push(null)),l}}const D6={}.hasOwnProperty;function AO(t,e,r){return typeof e!="string"&&(r=e,e=void 0),NO(r)(_O(SO(r).document().write(EO()(t,e,!0))))}function NO(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(jt),autolinkProtocol:$,autolinkEmail:$,atxHeading:a(Me),blockQuote:a(De),characterEscape:$,characterReference:$,codeFenced:a(et),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:a(et,s),codeText:a(ot,s),codeTextData:$,data:$,codeFlowValue:$,definition:a(_t),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:a(Et),hardBreakEscape:a(fe),hardBreakTrailing:a(fe),htmlFlow:a(xe,s),htmlFlowData:$,htmlText:a(xe,s),htmlTextData:$,image:a(tt),label:s,link:a(jt),listItem:a(ra),listItemValue:d,listOrdered:a(En,h),listUnordered:a(En),paragraph:a(na),reference:I,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:a(Me),strong:a(Ho),thematicBreak:a(_i)},exit:{atxHeading:l(),atxHeadingSequence:_,autolink:l(),autolinkEmail:Re,autolinkProtocol:qe,blockQuote:l(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:de,characterReference:we,codeFenced:l(y),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:R,codeIndented:l(b),codeText:l(U),codeTextData:R,data:R,definition:l(),definitionDestinationString:E,definitionLabelString:v,definitionTitleString:C,emphasis:l(),hardBreakEscape:l(G),hardBreakTrailing:l(G),htmlFlow:l(ee),htmlFlowData:R,htmlText:l(W),htmlTextData:R,image:l(Q),label:be,labelText:Y,lineEnding:P,link:l(j),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ye,resourceDestinationString:L,resourceTitleString:se,resource:ae,setextHeading:l(D),setextHeadingLineSequence:N,setextHeadingText:k,strong:l(),thematicBreak:l()}};O6(e,(t||{}).mdastExtensions||[]);const r={};return n;function n(ue){let Ce={type:"root",children:[]};const at={stack:[Ce],tokenStack:[],config:e,enter:o,exit:c,buffer:s,resume:u,data:r},pt=[];let Lt=-1;for(;++Lt<ue.length;)if(ue[Lt][1].type==="listOrdered"||ue[Lt][1].type==="listUnordered")if(ue[Lt][0]==="enter")pt.push(Lt);else{const kr=pt.pop();Lt=i(ue,kr,Lt)}for(Lt=-1;++Lt<ue.length;){const kr=e[ue[Lt][0]];D6.call(kr,ue[Lt][1].type)&&kr[ue[Lt][1].type].call(Object.assign({sliceSerialize:ue[Lt][2].sliceSerialize},at),ue[Lt][1])}if(at.tokenStack.length>0){const kr=at.tokenStack[at.tokenStack.length-1];(kr[1]||ab).call(at,void 0,kr[0])}for(Ce.position={start:sa(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:sa(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},Lt=-1;++Lt<e.transforms.length;)Ce=e.transforms[Lt](Ce)||Ce;return Ce}function i(ue,Ce,at){let pt=Ce-1,Lt=-1,kr=!1,dn,J,X,V;for(;++pt<=at;){const oe=ue[pt];switch(oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{oe[0]==="enter"?Lt++:Lt--,V=void 0;break}case"lineEndingBlank":{oe[0]==="enter"&&(dn&&!V&&!Lt&&!X&&(X=pt),V=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:V=void 0}if(!Lt&&oe[0]==="enter"&&oe[1].type==="listItemPrefix"||Lt===-1&&oe[0]==="exit"&&(oe[1].type==="listUnordered"||oe[1].type==="listOrdered")){if(dn){let ce=pt;for(J=void 0;ce--;){const pe=ue[ce];if(pe[1].type==="lineEnding"||pe[1].type==="lineEndingBlank"){if(pe[0]==="exit")continue;J&&(ue[J][1].type="lineEndingBlank",kr=!0),pe[1].type="lineEnding",J=ce}else if(!(pe[1].type==="linePrefix"||pe[1].type==="blockQuotePrefix"||pe[1].type==="blockQuotePrefixWhitespace"||pe[1].type==="blockQuoteMarker"||pe[1].type==="listItemIndent"))break}X&&(!J||X<J)&&(dn._spread=!0),dn.end=Object.assign({},J?ue[J][1].start:oe[1].end),ue.splice(J||pt,0,["exit",dn,oe[2]]),pt++,at++}if(oe[1].type==="listItemPrefix"){const ce={type:"listItem",_spread:!1,start:Object.assign({},oe[1].start),end:void 0};dn=ce,ue.splice(pt,0,["enter",ce,oe[2]]),pt++,at++,X=void 0,V=!0}}}return ue[Ce][1]._spread=kr,at}function a(ue,Ce){return at;function at(pt){o.call(this,ue(pt),pt),Ce&&Ce.call(this,pt)}}function s(){this.stack.push({type:"fragment",children:[]})}function o(ue,Ce,at){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([Ce,at||void 0]),ue.position={start:sa(Ce.start),end:void 0}}function l(ue){return Ce;function Ce(at){ue&&ue.call(this,at),c.call(this,at)}}function c(ue,Ce){const at=this.stack.pop(),pt=this.tokenStack.pop();if(pt)pt[0].type!==ue.type&&(Ce?Ce.call(this,ue,pt[0]):(pt[1]||ab).call(this,ue,pt[0]));else throw new Error("Cannot close `"+ue.type+"` ("+Ml({start:ue.start,end:ue.end})+"): it’s not open");at.position.end=sa(ue.end)}function u(){return Bm(this.stack.pop())}function h(){this.data.expectingFirstListItemValue=!0}function d(ue){if(this.data.expectingFirstListItemValue){const Ce=this.stack[this.stack.length-2];Ce.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function f(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.lang=ue}function p(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.meta=ue}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ue.replace(/(\r?\n|\r)$/g,"")}function v(ue){const Ce=this.resume(),at=this.stack[this.stack.length-1];at.label=Ce,at.identifier=Yn(this.sliceSerialize(ue)).toLowerCase()}function C(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=ue}function E(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=ue}function _(ue){const Ce=this.stack[this.stack.length-1];if(!Ce.depth){const at=this.sliceSerialize(ue).length;Ce.depth=at}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function N(ue){const Ce=this.stack[this.stack.length-1];Ce.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function D(){this.data.setextHeadingSlurpLineEnding=void 0}function $(ue){const at=this.stack[this.stack.length-1].children;let pt=at[at.length-1];(!pt||pt.type!=="text")&&(pt=Ra(),pt.position={start:sa(ue.start),end:void 0},at.push(pt)),this.stack.push(pt)}function R(ue){const Ce=this.stack.pop();Ce.value+=this.sliceSerialize(ue),Ce.position.end=sa(ue.end)}function P(ue){const Ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const at=Ce.children[Ce.children.length-1];at.position.end=sa(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(Ce.type)&&($.call(this,ue),R.call(this,ue))}function G(){this.data.atHardBreak=!0}function ee(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ue}function W(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ue}function U(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ue}function j(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=Ce,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function Q(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=Ce,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function Y(ue){const Ce=this.sliceSerialize(ue),at=this.stack[this.stack.length-2];at.label=ZL(Ce),at.identifier=Yn(Ce).toLowerCase()}function be(){const ue=this.stack[this.stack.length-1],Ce=this.resume(),at=this.stack[this.stack.length-1];if(this.data.inReference=!0,at.type==="link"){const pt=ue.children;at.children=pt}else at.alt=Ce}function L(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=ue}function se(){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=ue}function ae(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function ye(ue){const Ce=this.resume(),at=this.stack[this.stack.length-1];at.label=Ce,at.identifier=Yn(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function Ee(ue){this.data.characterReferenceType=ue.type}function de(ue){const Ce=this.sliceSerialize(ue),at=this.data.characterReferenceType;let pt;at?(pt=W3(Ce,at==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):pt=Om(Ce);const Lt=this.stack[this.stack.length-1];Lt.value+=pt}function we(ue){const Ce=this.stack.pop();Ce.position.end=sa(ue.end)}function qe(ue){R.call(this,ue);const Ce=this.stack[this.stack.length-1];Ce.url=this.sliceSerialize(ue)}function Re(ue){R.call(this,ue);const Ce=this.stack[this.stack.length-1];Ce.url="mailto:"+this.sliceSerialize(ue)}function De(){return{type:"blockquote",children:[]}}function et(){return{type:"code",lang:null,meta:null,value:""}}function ot(){return{type:"inlineCode",value:""}}function _t(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Et(){return{type:"emphasis",children:[]}}function Me(){return{type:"heading",depth:0,children:[]}}function fe(){return{type:"break"}}function xe(){return{type:"html",value:""}}function tt(){return{type:"image",title:null,url:"",alt:null}}function jt(){return{type:"link",title:null,url:"",children:[]}}function En(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function ra(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function na(){return{type:"paragraph",children:[]}}function Ho(){return{type:"strong",children:[]}}function Ra(){return{type:"text",value:""}}function _i(){return{type:"thematicBreak"}}}function sa(t){return{line:t.line,column:t.column,offset:t.offset}}function O6(t,e){let r=-1;for(;++r<e.length;){const n=e[r];Array.isArray(n)?O6(t,n):LO(t,n)}}function LO(t,e){let r;for(r in e)if(D6.call(e,r))switch(r){case"canContainEols":{const n=e[r];n&&t[r].push(...n);break}case"transforms":{const n=e[r];n&&t[r].push(...n);break}case"enter":case"exit":{const n=e[r];n&&Object.assign(t[r],n);break}}}function ab(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Ml({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Ml({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Ml({start:e.start,end:e.end})+") is still open")}function MO(t){const e=this;e.parser=r;function r(n){return AO(n,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function IO(t,e){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,r),t.applyData(e,r)}function RO(t,e){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,r),[t.applyData(e,r),{type:"text",value:`
38
+ `}]}function BO(t,e){const r=e.value?e.value+`
39
+ `:"",n={},i=e.lang?e.lang.split(/\s+/):[];i.length>0&&(n.className=["language-"+i[0]]);let a={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return e.meta&&(a.data={meta:e.meta}),t.patch(e,a),a=t.applyData(e,a),a={type:"element",tagName:"pre",properties:{},children:[a]},t.patch(e,a),a}function DO(t,e){const r={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function OO(t,e){const r={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function PO(t,e){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=String(e.identifier).toUpperCase(),i=_o(n.toLowerCase()),a=t.footnoteOrder.indexOf(n);let s,o=t.footnoteCounts.get(n);o===void 0?(o=0,t.footnoteOrder.push(n),s=t.footnoteOrder.length):s=a+1,o+=1,t.footnoteCounts.set(n,o);const l={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+i,id:r+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};t.patch(e,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return t.patch(e,c),t.applyData(e,c)}function FO(t,e){const r={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function $O(t,e){if(t.options.allowDangerousHtml){const r={type:"raw",value:e.value};return t.patch(e,r),t.applyData(e,r)}}function P6(t,e){const r=e.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+n}];const i=t.all(e),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=n:i.push({type:"text",value:n}),i}function zO(t,e){const r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return P6(t,e);const i={src:_o(n.url||""),alt:e.alt};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,a),t.applyData(e,a)}function HO(t,e){const r={src:_o(e.url)};e.alt!==null&&e.alt!==void 0&&(r.alt=e.alt),e.title!==null&&e.title!==void 0&&(r.title=e.title);const n={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,n),t.applyData(e,n)}function qO(t,e){const r={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(e,n),t.applyData(e,n)}function jO(t,e){const r=String(e.identifier).toUpperCase(),n=t.definitionById.get(r);if(!n)return P6(t,e);const i={href:_o(n.url||"")};n.title!==null&&n.title!==void 0&&(i.title=n.title);const a={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,a),t.applyData(e,a)}function UO(t,e){const r={href:_o(e.url)};e.title!==null&&e.title!==void 0&&(r.title=e.title);const n={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function WO(t,e,r){const n=t.all(e),i=r?GO(r):F6(e),a={},s=[];if(typeof e.checked=="boolean"){const u=n[0];let h;u&&u.type==="element"&&u.tagName==="p"?h=u:(h={type:"element",tagName:"p",properties:{},children:[]},n.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let o=-1;for(;++o<n.length;){const u=n[o];(i||o!==0||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
40
+ `}),u.type==="element"&&u.tagName==="p"&&!i?s.push(...u.children):s.push(u)}const l=n[n.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
41
+ `});const c={type:"element",tagName:"li",properties:a,children:s};return t.patch(e,c),t.applyData(e,c)}function GO(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const r=t.children;let n=-1;for(;!e&&++n<r.length;)e=F6(r[n])}return e}function F6(t){const e=t.spread;return e??t.children.length>1}function YO(t,e){const r={},n=t.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(r.start=e.start);++i<n.length;){const s=n[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:e.ordered?"ol":"ul",properties:r,children:t.wrap(n,!0)};return t.patch(e,a),t.applyData(e,a)}function VO(t,e){const r={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function XO(t,e){const r={type:"root",children:t.wrap(t.all(e))};return t.patch(e,r),t.applyData(e,r)}function KO(t,e){const r={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function QO(t,e){const r=t.all(e),n=r.shift(),i=[];if(n){const s={type:"element",tagName:"thead",properties:{},children:t.wrap([n],!0)};t.patch(e.children[0],s),i.push(s)}if(r.length>0){const s={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},o=xi(e.children[1]),l=nh(e.children[e.children.length-1]);o&&l&&(s.position={start:o,end:l}),i.push(s)}const a={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,a),t.applyData(e,a)}function ZO(t,e,r){const n=r?r.children:void 0,a=(n?n.indexOf(e):1)===0?"th":"td",s=r&&r.type==="table"?r.align:void 0,o=s?s.length:e.children.length;let l=-1;const c=[];for(;++l<o;){const h=e.children[l],d={},f=s?s[l]:void 0;f&&(d.align=f);let p={type:"element",tagName:a,properties:d,children:[]};h&&(p.children=t.all(h),t.patch(h,p),p=t.applyData(h,p)),c.push(p)}const u={type:"element",tagName:"tr",properties:{},children:t.wrap(c,!0)};return t.patch(e,u),t.applyData(e,u)}function JO(t,e){const r={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}const sb=9,ob=32;function eP(t){const e=String(t),r=/\r?\n|\r/g;let n=r.exec(e),i=0;const a=[];for(;n;)a.push(lb(e.slice(i,n.index),i>0,!0),n[0]),i=n.index+n[0].length,n=r.exec(e);return a.push(lb(e.slice(i),i>0,!1)),a.join("")}function lb(t,e,r){let n=0,i=t.length;if(e){let a=t.codePointAt(n);for(;a===sb||a===ob;)n++,a=t.codePointAt(n)}if(r){let a=t.codePointAt(i-1);for(;a===sb||a===ob;)i--,a=t.codePointAt(i-1)}return i>n?t.slice(n,i):""}function tP(t,e){const r={type:"text",value:eP(String(e.value))};return t.patch(e,r),t.applyData(e,r)}function rP(t,e){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,r),t.applyData(e,r)}const nP={blockquote:IO,break:RO,code:BO,delete:DO,emphasis:OO,footnoteReference:PO,heading:FO,html:$O,imageReference:zO,image:HO,inlineCode:qO,linkReference:jO,link:UO,listItem:WO,list:YO,paragraph:VO,root:XO,strong:KO,table:QO,tableCell:JO,tableRow:ZO,text:tP,thematicBreak:rP,toml:Hc,yaml:Hc,definition:Hc,footnoteDefinition:Hc};function Hc(){}function iP(t,e){const r=[{type:"text",value:"↩"}];return e>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),r}function aP(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function sP(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||iP,n=t.options.footnoteBackLabel||aP,i=t.options.footnoteLabel||"Footnotes",a=t.options.footnoteLabelTagName||"h2",s=t.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<t.footnoteOrder.length;){const c=t.footnoteById.get(t.footnoteOrder[l]);if(!c)continue;const u=t.all(c),h=String(c.identifier).toUpperCase(),d=_o(h.toLowerCase());let f=0;const p=[],m=t.footnoteCounts.get(h);for(;m!==void 0&&++f<=m;){p.length>0&&p.push({type:"text",value:" "});let v=typeof r=="string"?r:r(l,f);typeof v=="string"&&(v={type:"text",value:v}),p.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+d+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof n=="string"?n:n(l,f),className:["data-footnote-backref"]},children:Array.isArray(v)?v:[v]})}const y=u[u.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const v=y.children[y.children.length-1];v&&v.type==="text"?v.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...p)}else u.push(...p);const b={type:"element",tagName:"li",properties:{id:e+"fn-"+d},children:t.wrap(u,!0)};t.patch(c,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...ts(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
42
+ `},{type:"element",tagName:"ol",properties:{},children:t.wrap(o,!0)},{type:"text",value:`
43
+ `}]}}const $f={}.hasOwnProperty,oP={};function lP(t,e){const r=e||oP,n=new Map,i=new Map,a=new Map,s={...nP,...r.handlers},o={all:c,applyData:uP,definitionById:n,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:s,one:l,options:r,patch:cP,wrap:dP};return io(t,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const h=u.type==="definition"?n:i,d=String(u.identifier).toUpperCase();h.has(d)||h.set(d,u)}}),o;function l(u,h){const d=u.type,f=o.handlers[d];if($f.call(o.handlers,d)&&f)return f(o,u,h);if(o.options.passThrough&&o.options.passThrough.includes(d)){if("children"in u){const{children:m,...y}=u,b=ts(y);return b.children=o.all(u),b}return ts(u)}return(o.options.unknownHandler||hP)(o,u,h)}function c(u){const h=[];if("children"in u){const d=u.children;let f=-1;for(;++f<d.length;){const p=o.one(d[f],u);if(p){if(f&&d[f-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=cb(p.value)),!Array.isArray(p)&&p.type==="element")){const m=p.children[0];m&&m.type==="text"&&(m.value=cb(m.value))}Array.isArray(p)?h.push(...p):h.push(p)}}}return h}}function cP(t,e){t.position&&(e.position=v3(t))}function uP(t,e){let r=e;if(t&&t.data){const n=t.data.hName,i=t.data.hChildren,a=t.data.hProperties;if(typeof n=="string")if(r.type==="element")r.tagName=n;else{const s="children"in r?r.children:[r];r={type:"element",tagName:n,properties:{},children:s}}r.type==="element"&&a&&Object.assign(r.properties,ts(a)),"children"in r&&r.children&&i!==null&&i!==void 0&&(r.children=i)}return r}function hP(t,e){const r=e.data||{},n="value"in e&&!($f.call(r,"hProperties")||$f.call(r,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function dP(t,e){const r=[];let n=-1;for(e&&r.push({type:"text",value:`
44
+ `});++n<t.length;)n&&r.push({type:"text",value:`
45
+ `}),r.push(t[n]);return e&&t.length>0&&r.push({type:"text",value:`
46
+ `}),r}function cb(t){let e=0,r=t.charCodeAt(e);for(;r===9||r===32;)e++,r=t.charCodeAt(e);return t.slice(e)}function ub(t,e){const r=lP(t,e),n=r.one(t,void 0),i=sP(r),a=Array.isArray(n)?{type:"root",children:n}:n||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
47
+ `},i),a}function fP(t,e){return t&&"run"in t?async function(r,n){const i=ub(r,{file:n,...e});await t.run(i,n)}:function(r,n){return ub(r,{file:n,...t||e})}}function hb(t){if(t)throw t}var Tu=Object.prototype.hasOwnProperty,$6=Object.prototype.toString,db=Object.defineProperty,fb=Object.getOwnPropertyDescriptor,pb=function(e){return typeof Array.isArray=="function"?Array.isArray(e):$6.call(e)==="[object Array]"},mb=function(e){if(!e||$6.call(e)!=="[object Object]")return!1;var r=Tu.call(e,"constructor"),n=e.constructor&&e.constructor.prototype&&Tu.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!r&&!n)return!1;var i;for(i in e);return typeof i>"u"||Tu.call(e,i)},gb=function(e,r){db&&r.name==="__proto__"?db(e,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):e[r.name]=r.newValue},bb=function(e,r){if(r==="__proto__")if(Tu.call(e,r)){if(fb)return fb(e,r).value}else return;return e[r]},pP=function t(){var e,r,n,i,a,s,o=arguments[0],l=1,c=arguments.length,u=!1;for(typeof o=="boolean"&&(u=o,o=arguments[1]||{},l=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});l<c;++l)if(e=arguments[l],e!=null)for(r in e)n=bb(o,r),i=bb(e,r),o!==i&&(u&&i&&(mb(i)||(a=pb(i)))?(a?(a=!1,s=n&&pb(n)?n:[]):s=n&&mb(n)?n:{},gb(o,{name:r,newValue:t(u,s,i)})):typeof i<"u"&&gb(o,{name:r,newValue:i}));return o};const vd=lh(pP);function zf(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function mP(){const t=[],e={run:r,use:n};return e;function r(...i){let a=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);o(null,...i);function o(l,...c){const u=t[++a];let h=-1;if(l){s(l);return}for(;++h<i.length;)(c[h]===null||c[h]===void 0)&&(c[h]=i[h]);i=c,u?gP(u,o)(...c):s(null,...c)}}function n(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function gP(t,e){let r;return n;function n(...s){const o=t.length>s.length;let l;o&&s.push(i);try{l=t.apply(this,s)}catch(c){const u=c;if(o&&r)throw u;return i(u)}o||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(s,...o){r||(r=!0,e(s,...o))}function a(s){i(null,s)}}const oi={basename:bP,dirname:yP,extname:xP,join:vP,sep:"/"};function bP(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');wc(t);let r=0,n=-1,i=t.length,a;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(a){r=i+1;break}}else n<0&&(a=!0,n=i+1);return n<0?"":t.slice(r,n)}if(e===t)return"";let s=-1,o=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(a){r=i+1;break}}else s<0&&(a=!0,s=i+1),o>-1&&(t.codePointAt(i)===e.codePointAt(o--)?o<0&&(n=i):(o=-1,n=s));return r===n?n=s:n<0&&(n=t.length),t.slice(r,n)}function yP(t){if(wc(t),t.length===0)return".";let e=-1,r=t.length,n;for(;--r;)if(t.codePointAt(r)===47){if(n){e=r;break}}else n||(n=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function xP(t){wc(t);let e=t.length,r=-1,n=0,i=-1,a=0,s;for(;e--;){const o=t.codePointAt(e);if(o===47){if(s){n=e+1;break}continue}r<0&&(s=!0,r=e+1),o===46?i<0?i=e:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||r<0||a===0||a===1&&i===r-1&&i===n+1?"":t.slice(i,r)}function vP(...t){let e=-1,r;for(;++e<t.length;)wc(t[e]),t[e]&&(r=r===void 0?t[e]:r+"/"+t[e]);return r===void 0?".":kP(r)}function kP(t){wc(t);const e=t.codePointAt(0)===47;let r=wP(t,!e);return r.length===0&&!e&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),e?"/"+r:r}function wP(t,e){let r="",n=0,i=-1,a=0,s=-1,o,l;for(;++s<=t.length;){if(s<t.length)o=t.codePointAt(s);else{if(o===47)break;o=47}if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(r.length<2||n!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),i=s,a=0;continue}}else if(r.length>0){r="",n=0,i=s,a=0;continue}}e&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+t.slice(i+1,s):r=t.slice(i+1,s),n=s-i-1;i=s,a=0}else o===46&&a>-1?a++:a=-1}return r}function wc(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const TP={cwd:CP};function CP(){return"/"}function Hf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function SP(t){if(typeof t=="string")t=new URL(t);else if(!Hf(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return _P(t)}function _P(t){if(t.hostname!==""){const n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}const e=t.pathname;let r=-1;for(;++r<e.length;)if(e.codePointAt(r)===37&&e.codePointAt(r+1)===50){const n=e.codePointAt(r+2);if(n===70||n===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const kd=["history","path","basename","stem","extname","dirname"];class EP{constructor(e){let r;e?Hf(e)?r={path:e}:typeof e=="string"||AP(e)?r={value:e}:r=e:r={},this.cwd="cwd"in r?"":TP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<kd.length;){const a=kd[n];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let i;for(i in r)kd.includes(i)||(this[i]=r[i])}get basename(){return typeof this.path=="string"?oi.basename(this.path):void 0}set basename(e){Td(e,"basename"),wd(e,"basename"),this.path=oi.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?oi.dirname(this.path):void 0}set dirname(e){yb(this.basename,"dirname"),this.path=oi.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?oi.extname(this.path):void 0}set extname(e){if(wd(e,"extname"),yb(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=oi.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Hf(e)&&(e=SP(e)),Td(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?oi.basename(this.path,this.extname):void 0}set stem(e){Td(e,"stem"),wd(e,"stem"),this.path=oi.join(this.dirname||"",e+(this.extname||""))}fail(e,r,n){const i=this.message(e,r,n);throw i.fatal=!0,i}info(e,r,n){const i=this.message(e,r,n);return i.fatal=void 0,i}message(e,r,n){const i=new Pr(e,r,n);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function wd(t,e){if(t&&t.includes(oi.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+oi.sep+"`")}function Td(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function yb(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function AP(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const NP=function(t){const n=this.constructor.prototype,i=n[t],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,n),a},LP={}.hasOwnProperty;class Wm extends NP{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=mP()}copy(){const e=new Wm;let r=-1;for(;++r<this.attachers.length;){const n=this.attachers[r];e.use(...n)}return e.data(vd(!0,{},this.namespace)),e}data(e,r){return typeof e=="string"?arguments.length===2?(_d("data",this.frozen),this.namespace[e]=r,this):LP.call(this.namespace,e)&&this.namespace[e]||void 0:e?(_d("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);const i=r.call(e,...n);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const r=qc(e),n=this.parser||this.Parser;return Cd("parse",n),n(String(r),r)}process(e,r){const n=this;return this.freeze(),Cd("process",this.parser||this.Parser),Sd("process",this.compiler||this.Compiler),r?i(void 0,r):new Promise(i);function i(a,s){const o=qc(e),l=n.parse(o);n.run(l,o,function(u,h,d){if(u||!h||!d)return c(u);const f=h,p=n.stringify(f,d);RP(p)?d.value=p:d.result=p,c(u,d)});function c(u,h){u||!h?s(u):a?a(h):r(void 0,h)}}}processSync(e){let r=!1,n;return this.freeze(),Cd("processSync",this.parser||this.Parser),Sd("processSync",this.compiler||this.Compiler),this.process(e,i),vb("processSync","process",r),n;function i(a,s){r=!0,hb(a),n=s}}run(e,r,n){xb(e),this.freeze();const i=this.transformers;return!n&&typeof r=="function"&&(n=r,r=void 0),n?a(void 0,n):new Promise(a);function a(s,o){const l=qc(r);i.run(e,l,c);function c(u,h,d){const f=h||e;u?o(u):s?s(f):n(void 0,f,d)}}}runSync(e,r){let n=!1,i;return this.run(e,r,a),vb("runSync","run",n),i;function a(s,o){hb(s),i=o,n=!0}}stringify(e,r){this.freeze();const n=qc(r),i=this.compiler||this.Compiler;return Sd("stringify",i),xb(e),i(e,n)}use(e,...r){const n=this.attachers,i=this.namespace;if(_d("use",this.frozen),e!=null)if(typeof e=="function")l(e,r);else if(typeof e=="object")Array.isArray(e)?o(e):s(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function a(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...h]=c;l(u,h)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))throw new 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(c.plugins),c.settings&&(i.settings=vd(!0,i.settings,c.settings))}function o(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const h=c[u];a(h)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let h=-1,d=-1;for(;++h<n.length;)if(n[h][0]===c){d=h;break}if(d===-1)n.push([c,...u]);else if(u.length>0){let[f,...p]=u;const m=n[d][1];zf(m)&&zf(f)&&(f=vd(!0,m,f)),n[d]=[c,f,...p]}}}}const MP=new Wm().freeze();function Cd(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Sd(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function _d(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function xb(t){if(!zf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function vb(t,e,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function qc(t){return IP(t)?t:new EP(t)}function IP(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function RP(t){return typeof t=="string"||BP(t)}function BP(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}function Gm(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var gs=Gm();function z6(t){gs=t}var Il={exec:()=>null};function It(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(jr.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,e)};return n}var DP=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),jr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,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,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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},OP=/^(?:[ \t]*(?:\n|$))+/,PP=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,FP=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Tc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,$P=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Ym=/(?:[*+-]|\d{1,9}[.)])/,H6=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,q6=It(H6).replace(/bull/g,Ym).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),zP=It(H6).replace(/bull/g,Ym).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Vm=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,HP=/^[^\n]+/,Xm=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,qP=It(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Xm).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),jP=It(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Ym).getRegex(),uh="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",Km=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,UP=It("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Km).replace("tag",uh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),j6=It(Vm).replace("hr",Tc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",uh).getRegex(),WP=It(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",j6).getRegex(),Qm={blockquote:WP,code:PP,def:qP,fences:FP,heading:$P,hr:Tc,html:UP,lheading:q6,list:jP,newline:OP,paragraph:j6,table:Il,text:HP},kb=It("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Tc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",uh).getRegex(),GP={...Qm,lheading:zP,table:kb,paragraph:It(Vm).replace("hr",Tc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",kb).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",uh).getRegex()},YP={...Qm,html:It(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Km).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:Il,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:It(Vm).replace("hr",Tc).replace("heading",` *#{1,6} *[^
48
+ ]`).replace("lheading",q6).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},VP=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,XP=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,U6=/^( {2,}|\\)\n(?!\s*$)/,KP=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,hh=/[\p{P}\p{S}]/u,Zm=/[\s\p{P}\p{S}]/u,W6=/[^\s\p{P}\p{S}]/u,QP=It(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zm).getRegex(),G6=/(?!~)[\p{P}\p{S}]/u,ZP=/(?!~)[\s\p{P}\p{S}]/u,JP=/(?:[^\s\p{P}\p{S}]|~)/u,eF=It(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",DP?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Y6=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,tF=It(Y6,"u").replace(/punct/g,hh).getRegex(),rF=It(Y6,"u").replace(/punct/g,G6).getRegex(),V6="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nF=It(V6,"gu").replace(/notPunctSpace/g,W6).replace(/punctSpace/g,Zm).replace(/punct/g,hh).getRegex(),iF=It(V6,"gu").replace(/notPunctSpace/g,JP).replace(/punctSpace/g,ZP).replace(/punct/g,G6).getRegex(),aF=It("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,W6).replace(/punctSpace/g,Zm).replace(/punct/g,hh).getRegex(),sF=It(/\\(punct)/,"gu").replace(/punct/g,hh).getRegex(),oF=It(/^<(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(),lF=It(Km).replace("(?:-->|$)","-->").getRegex(),cF=It("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",lF).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Ku=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,uF=It(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Ku).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),X6=It(/^!?\[(label)\]\[(ref)\]/).replace("label",Ku).replace("ref",Xm).getRegex(),K6=It(/^!?\[(ref)\](?:\[\])?/).replace("ref",Xm).getRegex(),hF=It("reflink|nolink(?!\\()","g").replace("reflink",X6).replace("nolink",K6).getRegex(),wb=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Jm={_backpedal:Il,anyPunctuation:sF,autolink:oF,blockSkip:eF,br:U6,code:XP,del:Il,emStrongLDelim:tF,emStrongRDelimAst:nF,emStrongRDelimUnd:aF,escape:VP,link:uF,nolink:K6,punctuation:QP,reflink:X6,reflinkSearch:hF,tag:cF,text:KP,url:Il},dF={...Jm,link:It(/^!?\[(label)\]\((.*?)\)/).replace("label",Ku).getRegex(),reflink:It(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Ku).getRegex()},qf={...Jm,emStrongRDelimAst:iF,emStrongLDelim:rF,url:It(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",wb).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:It(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",wb).getRegex()},fF={...qf,br:It(U6).replace("{2,}","*").getRegex(),text:It(qf.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},jc={normal:Qm,gfm:GP,pedantic:YP},Yo={normal:Jm,gfm:qf,breaks:fF,pedantic:dF},pF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Tb=t=>pF[t];function Ii(t,e){if(e){if(jr.escapeTest.test(t))return t.replace(jr.escapeReplace,Tb)}else if(jr.escapeTestNoEncode.test(t))return t.replace(jr.escapeReplaceNoEncode,Tb);return t}function Cb(t){try{t=encodeURI(t).replace(jr.percentDecode,"%")}catch{return null}return t}function Sb(t,e){var a;let r=t.replace(jr.findPipe,(s,o,l)=>{let c=!1,u=o;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),n=r.split(jr.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(jr.slashPipe,"|");return n}function Vo(t,e,r){let n=t.length;if(n===0)return"";let i=0;for(;i<n&&t.charAt(n-i-1)===e;)i++;return t.slice(0,n-i)}function mF(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function _b(t,e,r,n,i){let a=e.href,s=e.title||null,o=t[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function gF(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(`
49
+ `).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=i.length?a.slice(i.length):a}).join(`
50
+ `)}var Qu=class{constructor(e){te(this,"options");te(this,"rules");te(this,"lexer");this.options=e||gs}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Vo(n,`
51
+ `)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],i=gF(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let i=Vo(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:Vo(r[0],`
52
+ `)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=Vo(r[0],`
53
+ `).split(`
54
+ `),i="",a="",s=[];for(;n.length>0;){let o=!1,l=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))l.push(n[c]),o=!0;else if(!o)l.push(n[c]);else break;n=n.slice(c);let u=l.join(`
55
+ `),h=u.replace(this.rules.other.blockquoteSetextReplace,`
56
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
57
+ ${u}`:u,a=a?`${a}
58
+ ${h}`:h;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,s,!0),this.lexer.state.top=d,n.length===0)break;let f=s.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){let p=f,m=p.raw+`
59
+ `+n.join(`
60
+ `),y=this.blockquote(m);s[s.length-1]=y,i=i.substring(0,i.length-p.raw.length)+y.raw,a=a.substring(0,a.length-p.text.length)+y.text;break}else if((f==null?void 0:f.type)==="list"){let p=f,m=p.raw+`
61
+ `+n.join(`
62
+ `),y=this.list(m);s[s.length-1]=y,i=i.substring(0,i.length-f.raw.length)+y.raw,a=a.substring(0,a.length-p.raw.length)+y.raw,n=m.substring(s.at(-1).raw.length).split(`
63
+ `);continue}}return{type:"blockquote",raw:i,tokens:s,text:a}}}list(e){var n,i;let r=this.rules.block.list.exec(e);if(r){let a=r[1].trim(),s=a.length>1,o={type:"list",raw:"",ordered:s,start:s?+a.slice(0,-1):"",loose:!1,items:[]};a=s?`\\d{1,9}\\${a.slice(-1)}`:`\\${a}`,this.options.pedantic&&(a=s?a:"[*+-]");let l=this.rules.other.listItemRegex(a),c=!1;for(;e;){let h=!1,d="",f="";if(!(r=l.exec(e))||this.rules.block.hr.test(e))break;d=r[0],e=e.substring(d.length);let p=r[2].split(`
64
+ `,1)[0].replace(this.rules.other.listReplaceTabs,v=>" ".repeat(3*v.length)),m=e.split(`
65
+ `,1)[0],y=!p.trim(),b=0;if(this.options.pedantic?(b=2,f=p.trimStart()):y?b=r[1].length+1:(b=r[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,f=p.slice(b),b+=r[1].length),y&&this.rules.other.blankLine.test(m)&&(d+=m+`
66
+ `,e=e.substring(m.length+1),h=!0),!h){let v=this.rules.other.nextBulletRegex(b),C=this.rules.other.hrRegex(b),E=this.rules.other.fencesBeginRegex(b),_=this.rules.other.headingBeginRegex(b),k=this.rules.other.htmlBeginRegex(b);for(;e;){let N=e.split(`
67
+ `,1)[0],D;if(m=N,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),D=m):D=m.replace(this.rules.other.tabCharGlobal," "),E.test(m)||_.test(m)||k.test(m)||v.test(m)||C.test(m))break;if(D.search(this.rules.other.nonSpaceChar)>=b||!m.trim())f+=`
68
+ `+D.slice(b);else{if(y||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(p)||_.test(p)||C.test(p))break;f+=`
69
+ `+m}!y&&!m.trim()&&(y=!0),d+=N+`
70
+ `,e=e.substring(N.length+1),p=D.slice(b)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(c=!0)),o.items.push({type:"list_item",raw:d,task:!!this.options.gfm&&this.rules.other.listIsTask.test(f),loose:!1,text:f,tokens:[]}),o.raw+=d}let u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let h of o.items){if(this.lexer.state.top=!1,h.tokens=this.lexer.blockTokens(h.text,[]),h.task){if(h.text=h.text.replace(this.rules.other.listReplaceTask,""),((n=h.tokens[0])==null?void 0:n.type)==="text"||((i=h.tokens[0])==null?void 0:i.type)==="paragraph"){h.tokens[0].raw=h.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),h.tokens[0].text=h.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let f=this.lexer.inlineQueue.length-1;f>=0;f--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[f].src)){this.lexer.inlineQueue[f].src=this.lexer.inlineQueue[f].src.replace(this.rules.other.listReplaceTask,"");break}}let d=this.rules.other.listTaskCheckbox.exec(h.raw);if(d){let f={type:"checkbox",raw:d[0]+" ",checked:d[0]!=="[ ]"};h.checked=f.checked,o.loose?h.tokens[0]&&["paragraph","text"].includes(h.tokens[0].type)&&"tokens"in h.tokens[0]&&h.tokens[0].tokens?(h.tokens[0].raw=f.raw+h.tokens[0].raw,h.tokens[0].text=f.raw+h.tokens[0].text,h.tokens[0].tokens.unshift(f)):h.tokens.unshift({type:"paragraph",raw:f.raw,text:f.raw,tokens:[f]}):h.tokens.unshift(f)}}if(!o.loose){let d=h.tokens.filter(p=>p.type==="space"),f=d.length>0&&d.some(p=>this.rules.other.anyLine.test(p.raw));o.loose=f}}if(o.loose)for(let h of o.items){h.loose=!0;for(let d of h.tokens)d.type==="text"&&(d.type="paragraph")}return o}}html(e){let r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){let r=this.rules.block.def.exec(e);if(r){let n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(e){var o;let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=Sb(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(o=r[3])!=null&&o.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
71
+ `):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let l of i)this.rules.other.tableAlignRight.test(l)?s.align.push("right"):this.rules.other.tableAlignCenter.test(l)?s.align.push("center"):this.rules.other.tableAlignLeft.test(l)?s.align.push("left"):s.align.push(null);for(let l=0;l<n.length;l++)s.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:s.align[l]});for(let l of a)s.rows.push(Sb(l,s.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:s.align[u]})));return s}}lheading(e){let r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===`
72
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=Vo(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=mF(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),_b(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[i.toLowerCase()];if(!a){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return _b(n,a,n[0],this.lexer,this.rules)}}emStrong(e,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!n||this.rules.inline.punctuation.exec(n))){let a=[...i[0]].length-1,s,o,l=a,c=0,u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,r=r.slice(-1*e.length+a);(i=u.exec(r))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(o=[...s].length,i[3]||i[4]){l+=o;continue}else if((i[5]||i[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let h=[...i[0]][0].length,d=e.slice(0,a+i.index+h+o);if(Math.min(a,o)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,i;return r[2]==="@"?(n=r[1],i="mailto:"+n):(n=r[1],i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let r;if(r=this.rules.inline.url.exec(e)){let i,a;if(r[2]==="@")i=r[0],a="mailto:"+i;else{let s;do s=r[0],r[0]=((n=this.rules.inline._backpedal.exec(r[0]))==null?void 0:n[0])??"";while(s!==r[0]);i=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},In=class jf{constructor(e){te(this,"tokens");te(this,"options");te(this,"state");te(this,"inlineQueue");te(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||gs,this.options.tokenizer=this.options.tokenizer||new Qu,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:jr,block:jc.normal,inline:Yo.normal};this.options.pedantic?(r.block=jc.pedantic,r.inline=Yo.pedantic):this.options.gfm&&(r.block=jc.gfm,this.options.breaks?r.inline=Yo.breaks:r.inline=Yo.gfm),this.tokenizer.rules=r}static get rules(){return{block:jc,inline:Yo}}static lex(e,r){return new jf(r).lex(e)}static lexInline(e,r){return new jf(r).inlineTokens(e)}lex(e){e=e.replace(jr.carriageReturn,`
73
+ `),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var i,a,s;for(this.options.pedantic&&(e=e.replace(jr.tabCharGlobal," ").replace(jr.spaceLine,""));e;){let o;if((a=(i=this.options.extensions)==null?void 0:i.block)!=null&&a.some(c=>(o=c.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=r.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
74
+ `:r.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
75
+ `)?"":`
76
+ `)+o.raw,c.text+=`
77
+ `+o.text,this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
78
+ `)?"":`
79
+ `)+o.raw,c.text+=`
80
+ `+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),r.push(o);continue}let l=e;if((s=this.options.extensions)!=null&&s.startBlock){let c=1/0,u=e.slice(1),h;this.options.extensions.startBlock.forEach(d=>{h=d.call({lexer:this},u),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){let c=r.at(-1);n&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
81
+ `)?"":`
82
+ `)+o.raw,c.text+=`
83
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o),n=l.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
84
+ `)?"":`
85
+ `)+o.raw,c.text+=`
86
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var l,c,u,h,d;let n=e,i=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)f.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)a=i[2]?i[2].length:0,n=n.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},n))??n;let s=!1,o="";for(;e;){s||(o=""),s=!1;let f;if((h=(u=this.options.extensions)==null?void 0:u.inline)!=null&&h.some(m=>(f=m.call({lexer:this},e,r))?(e=e.substring(f.raw.length),r.push(f),!0):!1))continue;if(f=this.tokenizer.escape(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.tag(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.link(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(f.raw.length);let m=r.at(-1);f.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=f.raw,m.text+=f.text):r.push(f);continue}if(f=this.tokenizer.emStrong(e,n,o)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.codespan(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.br(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.del(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.autolink(e)){e=e.substring(f.raw.length),r.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(e))){e=e.substring(f.raw.length),r.push(f);continue}let p=e;if((d=this.options.extensions)!=null&&d.startInline){let m=1/0,y=e.slice(1),b;this.options.extensions.startInline.forEach(v=>{b=v.call({lexer:this},y),typeof b=="number"&&b>=0&&(m=Math.min(m,b))}),m<1/0&&m>=0&&(p=e.substring(0,m+1))}if(f=this.tokenizer.inlineText(p)){e=e.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(o=f.raw.slice(-1)),s=!0;let m=r.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=f.raw,m.text+=f.text):r.push(f);continue}if(e){let m="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return r}},Zu=class{constructor(e){te(this,"options");te(this,"parser");this.options=e||gs}space(e){return""}code({text:e,lang:r,escaped:n}){var s;let i=(s=(r||"").match(jr.notSpaceStart))==null?void 0:s[0],a=e.replace(jr.endingNewline,"")+`
87
+ `;return i?'<pre><code class="language-'+Ii(i)+'">'+(n?a:Ii(a,!0))+`</code></pre>
88
+ `:"<pre><code>"+(n?a:Ii(a,!0))+`</code></pre>
89
+ `}blockquote({tokens:e}){return`<blockquote>
90
+ ${this.parser.parse(e)}</blockquote>
91
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
92
+ `}hr(e){return`<hr>
93
+ `}list(e){let r=e.ordered,n=e.start,i="";for(let o=0;o<e.items.length;o++){let l=e.items[o];i+=this.listitem(l)}let a=r?"ol":"ul",s=r&&n!==1?' start="'+n+'"':"";return"<"+a+s+`>
94
+ `+i+"</"+a+`>
95
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
96
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
97
+ `}table(e){let r="",n="";for(let a=0;a<e.header.length;a++)n+=this.tablecell(e.header[a]);r+=this.tablerow({text:n});let i="";for(let a=0;a<e.rows.length;a++){let s=e.rows[a];n="";for(let o=0;o<s.length;o++)n+=this.tablecell(s[o]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
98
+ <thead>
99
+ `+r+`</thead>
100
+ `+i+`</table>
101
+ `}tablerow({text:e}){return`<tr>
102
+ ${e}</tr>
103
+ `}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
104
+ `}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>${Ii(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let i=this.parser.parseInline(n),a=Cb(e);if(a===null)return i;e=a;let s='<a href="'+e+'"';return r&&(s+=' title="'+Ii(r)+'"'),s+=">"+i+"</a>",s}image({href:e,title:r,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let a=Cb(e);if(a===null)return Ii(n);e=a;let s=`<img src="${e}" alt="${n}"`;return r&&(s+=` title="${Ii(r)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Ii(e.text)}},e1=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}},jn=class Uf{constructor(e){te(this,"options");te(this,"renderer");te(this,"textRenderer");this.options=e||gs,this.options.renderer=this.options.renderer||new Zu,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new e1}static parse(e,r){return new Uf(r).parse(e)}static parseInline(e,r){return new Uf(r).parseInline(e)}parse(e){var n,i;let r="";for(let a=0;a<e.length;a++){let s=e[a];if((i=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&i[s.type]){let l=s,c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){r+=c||"";continue}}let o=s;switch(o.type){case"space":{r+=this.renderer.space(o);break}case"hr":{r+=this.renderer.hr(o);break}case"heading":{r+=this.renderer.heading(o);break}case"code":{r+=this.renderer.code(o);break}case"table":{r+=this.renderer.table(o);break}case"blockquote":{r+=this.renderer.blockquote(o);break}case"list":{r+=this.renderer.list(o);break}case"checkbox":{r+=this.renderer.checkbox(o);break}case"html":{r+=this.renderer.html(o);break}case"def":{r+=this.renderer.def(o);break}case"paragraph":{r+=this.renderer.paragraph(o);break}case"text":{r+=this.renderer.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}parseInline(e,r=this.renderer){var i,a;let n="";for(let s=0;s<e.length;s++){let o=e[s];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[o.type]){let c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=c||"";continue}}let l=o;switch(l.type){case"escape":{n+=r.text(l);break}case"html":{n+=r.html(l);break}case"link":{n+=r.link(l);break}case"image":{n+=r.image(l);break}case"checkbox":{n+=r.checkbox(l);break}case"strong":{n+=r.strong(l);break}case"em":{n+=r.em(l);break}case"codespan":{n+=r.codespan(l);break}case"br":{n+=r.br(l);break}case"del":{n+=r.del(l);break}case"text":{n+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}},yu,hl=(yu=class{constructor(e){te(this,"options");te(this,"block");this.options=e||gs}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?In.lex:In.lexInline}provideParser(){return this.block?jn.parse:jn.parseInline}},te(yu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),te(yu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),yu),bF=class{constructor(...e){te(this,"defaults",Gm());te(this,"options",this.setOptions);te(this,"parse",this.parseMarkdown(!0));te(this,"parseInline",this.parseMarkdown(!1));te(this,"Parser",jn);te(this,"Renderer",Zu);te(this,"TextRenderer",e1);te(this,"Lexer",In);te(this,"Tokenizer",Qu);te(this,"Hooks",hl);this.use(...e)}walkTokens(e,r){var i,a;let n=[];for(let s of e)switch(n=n.concat(r.call(this,s)),s.type){case"table":{let o=s;for(let l of o.header)n=n.concat(this.walkTokens(l.tokens,r));for(let l of o.rows)for(let c of l)n=n.concat(this.walkTokens(c.tokens,r));break}case"list":{let o=s;n=n.concat(this.walkTokens(o.items,r));break}default:{let o=s;(a=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let c=o[l].flat(1/0);n=n.concat(this.walkTokens(c,r))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,r)))}}return n}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),i.extensions=r),n.renderer){let a=this.defaults.renderer||new Zu(this.defaults);for(let s in n.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=n.renderer[o],c=a[o];a[o]=(...u)=>{let h=l.apply(a,u);return h===!1&&(h=c.apply(a,u)),h||""}}i.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new Qu(this.defaults);for(let s in n.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=n.tokenizer[o],c=a[o];a[o]=(...u)=>{let h=l.apply(a,u);return h===!1&&(h=c.apply(a,u)),h}}i.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new hl;for(let s in n.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,l=n.hooks[o],c=a[o];hl.passThroughHooks.has(s)?a[o]=u=>{if(this.defaults.async&&hl.passThroughHooksRespectAsync.has(s))return(async()=>{let d=await l.call(a,u);return c.call(a,d)})();let h=l.call(a,u);return c.call(a,h)}:a[o]=(...u)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(a,u);return d===!1&&(d=await c.apply(a,u)),d})();let h=l.apply(a,u);return h===!1&&(h=c.apply(a,u)),h}}i.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,s=n.walkTokens;i.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return In.lex(e,r??this.defaults)}parser(e,r){return jn.parse(e,r??this.defaults)}parseMarkdown(e){return(r,n)=>{let i={...n},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new 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 r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=e),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():e?In.lex:In.lexInline)(o,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let u=await(a.hooks?await a.hooks.provideParser():e?jn.parse:jn.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(u):u})().catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():e?In.lex:In.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():e?jn.parse:jn.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return s(o)}}}onError(e,r){return n=>{if(n.message+=`
105
+ Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+Ii(n.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},ns=new bF;function Pt(t,e){return ns.parse(t,e)}Pt.options=Pt.setOptions=function(t){return ns.setOptions(t),Pt.defaults=ns.defaults,z6(Pt.defaults),Pt};Pt.getDefaults=Gm;Pt.defaults=gs;Pt.use=function(...t){return ns.use(...t),Pt.defaults=ns.defaults,z6(Pt.defaults),Pt};Pt.walkTokens=function(t,e){return ns.walkTokens(t,e)};Pt.parseInline=ns.parseInline;Pt.Parser=jn;Pt.parser=jn.parse;Pt.Renderer=Zu;Pt.TextRenderer=e1;Pt.Lexer=In;Pt.lexer=In.lex;Pt.Tokenizer=Qu;Pt.Hooks=hl;Pt.parse=Pt;Pt.options;Pt.setOptions;Pt.use;Pt.walkTokens;Pt.parseInline;jn.parse;In.lex;var yF=300,xF="300px",vF=500;function kF(t={}){let{immediate:e=!1,debounceDelay:r=yF,rootMargin:n=xF,idleTimeout:i=vF}=t,[a,s]=F.useState(!1),o=F.useRef(null),l=F.useRef(null),c=F.useRef(null),u=F.useMemo(()=>f=>{let p=Date.now();return window.setTimeout(()=>{f({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-p))})},1)},[]),h=F.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(f,p)=>window.requestIdleCallback(f,p):u,[u]),d=F.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?f=>window.cancelIdleCallback(f):f=>{clearTimeout(f)},[]);return F.useEffect(()=>{if(e){s(!0);return}let f=o.current;if(!f)return;l.current&&(clearTimeout(l.current),l.current=null),c.current&&(d(c.current),c.current=null);let p=()=>{l.current&&(clearTimeout(l.current),l.current=null),c.current&&(d(c.current),c.current=null)},m=C=>{c.current=h(E=>{E.timeRemaining()>0||E.didTimeout?(s(!0),C.disconnect()):c.current=h(()=>{s(!0),C.disconnect()},{timeout:i/2})},{timeout:i})},y=C=>{p(),l.current=window.setTimeout(()=>{var E,_;let k=C.takeRecords();(k.length===0||(_=(E=k.at(-1))==null?void 0:E.isIntersecting)!=null&&_)&&m(C)},r)},b=(C,E)=>{C.isIntersecting?y(E):p()},v=new IntersectionObserver(C=>{for(let E of C)b(E,v)},{rootMargin:n,threshold:0});return v.observe(f),()=>{l.current&&clearTimeout(l.current),c.current&&d(c.current),v.disconnect()}},[e,r,n,i,d,h]),{shouldRender:a,containerRef:o}}var t1=t=>S.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...t,children:S.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"})}),r1=t=>S.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...t,children:S.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"})}),dh=t=>S.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...t,children:S.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"})}),wF=t=>S.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...t,children:[S.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),S.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),S.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),S.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),S.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),S.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),S.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),S.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),S.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),S.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),TF=t=>S.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...t,children:S.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"})}),CF=t=>S.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...t,children:S.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"})}),Q6=t=>S.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...t,children:S.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"})}),Eb=t=>S.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...t,children:S.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"})}),SF=t=>S.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...t,children:S.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"})}),_F=t=>S.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...t,children:S.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"})}),ht=(...t)=>rD(pB(t)),js=(t,e,r)=>{let n=typeof e=="string"?new Blob([e],{type:r}):e,i=URL.createObjectURL(n),a=document.createElement("a");a.href=i,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(i)},Z6=F.createContext({code:""}),J6=()=>F.useContext(Z6),Ab=({onCopy:t,onError:e,timeout:r=2e3,children:n,className:i,code:a,...s})=>{let[o,l]=F.useState(!1),c=F.useRef(0),{code:u}=J6(),{isAnimating:h}=F.useContext(Tn),d=a??u,f=async()=>{var m;if(typeof window>"u"||!((m=navigator==null?void 0:navigator.clipboard)!=null&&m.writeText)){e==null||e(new Error("Clipboard API not available"));return}try{o||(await navigator.clipboard.writeText(d),l(!0),t==null||t(),c.current=window.setTimeout(()=>l(!1),r))}catch(y){e==null||e(y)}};F.useEffect(()=>()=>{window.clearTimeout(c.current)},[]);let p=o?t1:r1;return S.jsx("button",{className:ht("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:h,onClick:f,title:"Copy Code",type:"button",...s,children:n??S.jsx(p,{size:14})})},Nb={"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"},EF=({onDownload:t,onError:e,language:r,children:n,className:i,code:a,...s})=>{let{code:o}=J6(),{isAnimating:l}=F.useContext(Tn),c=a??o,u=`file.${r&&r in Nb?Nb[r]:"txt"}`,h="text/plain",d=()=>{try{js(u,c,h),t==null||t()}catch(f){e==null||e(f)}};return S.jsx("button",{className:ht("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:d,title:"Download file",type:"button",...s,children:n??S.jsx(dh,{size:14})})},Lb=()=>S.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[S.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),S.jsx("div",{className:"flex w-full items-center justify-center p-4",children:S.jsx(wF,{className:"size-4 animate-spin"})})]}),AF=/\.[^/.]+$/,NF=({node:t,className:e,src:r,alt:n,...i})=>{let a=async()=>{if(r)try{let s=await(await fetch(r)).blob(),o=new URL(r,window.location.origin).pathname.split("/").pop()||"",l=o.split(".").pop(),c=o.includes(".")&&l!==void 0&&l.length<=4,u="";if(c)u=o;else{let h=s.type,d="png";h.includes("jpeg")||h.includes("jpg")?d="jpg":h.includes("png")?d="png":h.includes("svg")?d="svg":h.includes("gif")?d="gif":h.includes("webp")&&(d="webp"),u=`${(n||o||"image").replace(AF,"")}.${d}`}js(u,s,s.type)}catch{window.open(r,"_blank")}};return r?S.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[S.jsx("img",{alt:n,className:ht("max-w-full rounded-lg",e),"data-streamdown":"image",src:r,...i}),S.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),S.jsx("button",{className:ht("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:a,title:"Download image",type:"button",children:S.jsx(dh,{size:14})})]}):null},Rl=0,LF=()=>{Rl+=1,Rl===1&&(document.body.style.overflow="hidden")},MF=()=>{Rl=Math.max(0,Rl-1),Rl===0&&(document.body.style.overflow="")},IF=({url:t,isOpen:e,onClose:r,onConfirm:n})=>{let[i,a]=F.useState(!1),s=F.useCallback(async()=>{try{await navigator.clipboard.writeText(t),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},[t]),o=F.useCallback(()=>{n(),r()},[n,r]);return F.useEffect(()=>{if(e){LF();let l=c=>{c.key==="Escape"&&r()};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l),MF()}}},[e,r]),e?S.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:r,onKeyDown:l=>{l.key==="Escape"&&r()},role:"button",tabIndex:0,children:S.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:l=>l.stopPropagation(),onKeyDown:l=>l.stopPropagation(),role:"presentation",children:[S.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:r,title:"Close",type:"button",children:S.jsx(Q6,{size:16})}),S.jsxs("div",{className:"flex flex-col gap-2",children:[S.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[S.jsx(Eb,{size:20}),S.jsx("span",{children:"Open external link?"})]}),S.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),S.jsx("div",{className:ht("break-all rounded-md bg-muted p-3 font-mono text-sm",t.length>100&&"max-h-32 overflow-y-auto"),children:t}),S.jsxs("div",{className:"flex gap-2",children:[S.jsx("button",{className:"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:s,type:"button",children:i?S.jsxs(S.Fragment,{children:[S.jsx(t1,{size:14}),S.jsx("span",{children:"Copied"})]}):S.jsxs(S.Fragment,{children:[S.jsx(r1,{size:14}),S.jsx("span",{children:"Copy link"})]})}),S.jsxs("button",{className:"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:o,type:"button",children:[S.jsx(Eb,{size:14}),S.jsx("span",{children:"Open link"})]})]})]})}):null},Wf=F.createContext(null),e5=()=>F.useContext(Wf),RF=()=>{var t;let e=e5();return(t=e==null?void 0:e.code)!=null?t:null},n1=()=>{var t;let e=e5();return(t=e==null?void 0:e.mermaid)!=null?t:null},BF=(t,e)=>{var r;let n=(r=void 0)!=null?r:5;return new Promise((i,a)=>{let s="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let l=document.createElement("canvas"),c=o.width*n,u=o.height*n;l.width=c,l.height=u;let h=l.getContext("2d");if(!h){a(new Error("Failed to create 2D canvas context for PNG export"));return}h.drawImage(o,0,0,c,u),l.toBlob(d=>{if(!d){a(new Error("Failed to create PNG blob"));return}i(d)},"image/png")},o.onerror=()=>a(new Error("Failed to load SVG image")),o.src=s})},DF=({chart:t,children:e,className:r,onDownload:n,config:i,onError:a})=>{let[s,o]=F.useState(!1),l=F.useRef(null),{isAnimating:c}=F.useContext(Tn),u=n1(),h=async d=>{try{if(d==="mmd"){js("diagram.mmd",t,"text/plain"),o(!1),n==null||n(d);return}if(!u){a==null||a(new Error("Mermaid plugin not available"));return}let f=u.getMermaid(i),p=t.split("").reduce((b,v)=>(b<<5)-b+v.charCodeAt(0)|0,0),m=`mermaid-${Math.abs(p)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:y}=await f.render(m,t);if(!y){a==null||a(new Error("SVG not found. Please wait for the diagram to render."));return}if(d==="svg"){js("diagram.svg",y,"image/svg+xml"),o(!1),n==null||n(d);return}if(d==="png"){let b=await BF(y);js("diagram.png",b,"image/png"),n==null||n(d),o(!1);return}}catch(f){a==null||a(f)}};return F.useEffect(()=>{let d=f=>{let p=f.composedPath();l.current&&!p.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[]),S.jsxs("div",{className:"relative",ref:l,children:[S.jsx("button",{className:ht("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",r),disabled:c,onClick:()=>o(!s),title:"Download diagram",type:"button",children:e??S.jsx(dh,{size:14})}),s?S.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[S.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),S.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),S.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},Bl=0,OF=()=>{Bl+=1,Bl===1&&(document.body.style.overflow="hidden")},PF=()=>{Bl=Math.max(0,Bl-1),Bl===0&&(document.body.style.overflow="")},FF=({chart:t,config:e,onFullscreen:r,onExit:n,className:i,...a})=>{let[s,o]=F.useState(!1),{isAnimating:l,controls:c}=F.useContext(Tn),u=(()=>{if(typeof c=="boolean")return c;let d=c.mermaid;return d===!1?!1:d===!0||d===void 0?!0:d.panZoom!==!1})(),h=()=>{o(!s)};return F.useEffect(()=>{if(s){OF();let d=f=>{f.key==="Escape"&&o(!1)};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d),PF()}}},[s]),F.useEffect(()=>{s?r==null||r():n&&n()},[s,r,n]),S.jsxs(S.Fragment,{children:[S.jsx("button",{className:ht("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:l,onClick:h,title:"View fullscreen",type:"button",...a,children:S.jsx(TF,{size:14})}),s?S.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:h,onKeyDown:d=>{d.key==="Escape"&&h()},role:"button",tabIndex:0,children:[S.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:h,title:"Exit fullscreen",type:"button",children:S.jsx(Q6,{size:20})}),S.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:d=>d.stopPropagation(),onKeyDown:d=>d.stopPropagation(),role:"presentation",children:S.jsx(N5,{chart:t,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:e,fullscreen:!0,showControls:u})})]}):null]})},t5=t=>{var e,r;let n=[],i=[],a=t.querySelectorAll("thead th");for(let o of a)n.push(((e=o.textContent)==null?void 0:e.trim())||"");let s=t.querySelectorAll("tbody tr");for(let o of s){let l=[],c=o.querySelectorAll("td");for(let u of c)l.push(((r=u.textContent)==null?void 0:r.trim())||"");i.push(l)}return{headers:n,rows:i}},r5=t=>{let{headers:e,rows:r}=t,n=o=>{let l=!1,c=!1;for(let u of o){if(u==='"'){l=!0,c=!0;break}(u===","||u===`
106
+ `)&&(l=!0)}return l?c?`"${o.replace(/"/g,'""')}"`:`"${o}"`:o},i=e.length>0?r.length+1:r.length,a=new Array(i),s=0;e.length>0&&(a[s]=e.map(n).join(","),s+=1);for(let o of r)a[s]=o.map(n).join(","),s+=1;return a.join(`
107
+ `)},$F=t=>{let{headers:e,rows:r}=t,n=o=>{let l=!1;for(let u of o)if(u===" "||u===`
108
+ `||u==="\r"){l=!0;break}if(!l)return o;let c=[];for(let u of o)u===" "?c.push("\\t"):u===`
109
+ `?c.push("\\n"):u==="\r"?c.push("\\r"):c.push(u);return c.join("")},i=e.length>0?r.length+1:r.length,a=new Array(i),s=0;e.length>0&&(a[s]=e.map(n).join(" "),s+=1);for(let o of r)a[s]=o.map(n).join(" "),s+=1;return a.join(`
110
+ `)},Ed=t=>{let e=!1;for(let n of t)if(n==="\\"||n==="|"){e=!0;break}if(!e)return t;let r=[];for(let n of t)n==="\\"?r.push("\\\\"):n==="|"?r.push("\\|"):r.push(n);return r.join("")},zF=t=>{let{headers:e,rows:r}=t;if(e.length===0)return"";let n=new Array(r.length+2),i=0,a=e.map(o=>Ed(o));n[i]=`| ${a.join(" | ")} |`,i+=1;let s=new Array(e.length);for(let o=0;o<e.length;o+=1)s[o]="---";n[i]=`| ${s.join(" | ")} |`,i+=1;for(let o of r)if(o.length<e.length){let l=new Array(e.length);for(let c=0;c<e.length;c+=1)l[c]=c<o.length?Ed(o[c]):"";n[i]=`| ${l.join(" | ")} |`,i+=1}else{let l=o.map(c=>Ed(c));n[i]=`| ${l.join(" | ")} |`,i+=1}return n.join(`
111
+ `)},HF=({children:t,className:e,onCopy:r,onError:n,timeout:i=2e3})=>{let[a,s]=F.useState(!1),[o,l]=F.useState(!1),c=F.useRef(null),u=F.useRef(0),{isAnimating:h}=F.useContext(Tn),d=async p=>{var m,y;if(typeof window>"u"||!((m=navigator==null?void 0:navigator.clipboard)!=null&&m.write)){n==null||n(new Error("Clipboard API not available"));return}try{let b=(y=c.current)==null?void 0:y.closest('[data-streamdown="table-wrapper"]'),v=b==null?void 0:b.querySelector("table");if(!v){n==null||n(new Error("Table not found"));return}let C=t5(v),E=p==="csv"?r5(C):$F(C),_=new ClipboardItem({"text/plain":new Blob([E],{type:"text/plain"}),"text/html":new Blob([v.outerHTML],{type:"text/html"})});await navigator.clipboard.write([_]),l(!0),s(!1),r==null||r(p),u.current=window.setTimeout(()=>l(!1),i)}catch(b){n==null||n(b)}};F.useEffect(()=>{let p=m=>{let y=m.composedPath();c.current&&!y.includes(c.current)&&s(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p),window.clearTimeout(u.current)}},[]);let f=o?t1:r1;return S.jsxs("div",{className:"relative",ref:c,children:[S.jsx("button",{className:ht("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",e),disabled:h,onClick:()=>s(!a),title:"Copy table",type:"button",children:t??S.jsx(f,{size:14})}),a?S.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[S.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),S.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>d("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},qF=({children:t,className:e,onDownload:r,onError:n})=>{let[i,a]=F.useState(!1),s=F.useRef(null),{isAnimating:o}=F.useContext(Tn),l=c=>{var u;try{let h=(u=s.current)==null?void 0:u.closest('[data-streamdown="table-wrapper"]'),d=h==null?void 0:h.querySelector("table");if(!d){n==null||n(new Error("Table not found"));return}let f=t5(d),p=c==="csv"?r5(f):zF(f);js(`table.${c==="csv"?"csv":"md"}`,p,c==="csv"?"text/csv":"text/markdown"),a(!1),r==null||r(c)}catch(h){n==null||n(h)}};return F.useEffect(()=>{let c=u=>{let h=u.composedPath();s.current&&!h.includes(s.current)&&a(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[]),S.jsxs("div",{className:"relative",ref:s,children:[S.jsx("button",{className:ht("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",e),disabled:o,onClick:()=>a(!i),title:"Download table",type:"button",children:t??S.jsx(dh,{size:14})}),i?S.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[S.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>l("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),S.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>l("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},jF=({children:t,className:e,showControls:r,...n})=>S.jsxs("div",{className:"my-4 flex flex-col space-y-2","data-streamdown":"table-wrapper",children:[r?S.jsxs("div",{className:"flex items-center justify-end gap-1",children:[S.jsx(HF,{}),S.jsx(qF,{})]}):null,S.jsx("div",{className:"overflow-x-auto",children:S.jsx("table",{className:ht("w-full border-collapse border border-border",e),"data-streamdown":"table",...n,children:t})})]}),UF=F.lazy(()=>Promise.resolve().then(()=>require("./code-block-37QAKDTI-sxlq94xm.js")).then(t=>({default:t.CodeBlock}))),WF=F.lazy(()=>Promise.resolve().then(()=>require("./mermaid-4DMBBIKO-BihEtyib.js")).then(t=>({default:t.Mermaid}))),GF=/language-([^\s]+)/;function fh(t,e){if(!(t!=null&&t.position||e!=null&&e.position))return!0;if(!(t!=null&&t.position&&e!=null&&e.position))return!1;let r=t.position.start,n=e.position.start,i=t.position.end,a=e.position.end;return(r==null?void 0:r.line)===(n==null?void 0:n.line)&&(r==null?void 0:r.column)===(n==null?void 0:n.column)&&(i==null?void 0:i.line)===(a==null?void 0:a.line)&&(i==null?void 0:i.column)===(a==null?void 0:a.column)}function Jt(t,e){return t.className===e.className&&fh(t.node,e.node)}var Gf=(t,e)=>typeof t=="boolean"?t:t[e]!==!1,Uc=(t,e)=>{if(typeof t=="boolean")return t;let r=t.mermaid;return r===!1?!1:r===!0||r===void 0?!0:r[e]!==!1},i1=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("ol",{className:ht("list-inside list-decimal whitespace-normal [li_&]:pl-6",e),"data-streamdown":"ordered-list",...n,children:t}),(t,e)=>Jt(t,e));i1.displayName="MarkdownOl";var n5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("li",{className:ht("py-1 [&>p]:inline",e),"data-streamdown":"list-item",...n,children:t}),(t,e)=>t.className===e.className&&fh(t.node,e.node));n5.displayName="MarkdownLi";var i5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("ul",{className:ht("list-inside list-disc whitespace-normal [li_&]:pl-6",e),"data-streamdown":"unordered-list",...n,children:t}),(t,e)=>Jt(t,e));i5.displayName="MarkdownUl";var a5=F.memo(({className:t,node:e,...r})=>S.jsx("hr",{className:ht("my-6 border-border",t),"data-streamdown":"horizontal-rule",...r}),(t,e)=>Jt(t,e));a5.displayName="MarkdownHr";var s5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("span",{className:ht("font-semibold",e),"data-streamdown":"strong",...n,children:t}),(t,e)=>Jt(t,e));s5.displayName="MarkdownStrong";var YF=({children:t,className:e,href:r,node:n,...i})=>{let{linkSafety:a}=F.useContext(Tn),[s,o]=F.useState(!1),l=r==="streamdown:incomplete-link",c=F.useCallback(async f=>{if(!(!(a!=null&&a.enabled&&r)||l)){if(f.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(r)){window.open(r,"_blank","noreferrer");return}o(!0)}},[a,r,l]),u=F.useCallback(()=>{r&&window.open(r,"_blank","noreferrer")},[r]),h=F.useCallback(()=>{o(!1)},[]),d={url:r??"",isOpen:s,onClose:h,onConfirm:u};return a!=null&&a.enabled&&r?S.jsxs(S.Fragment,{children:[S.jsx("button",{className:ht("wrap-anywhere appearance-none text-left font-medium text-primary underline",e),"data-incomplete":l,"data-streamdown":"link",onClick:c,type:"button",children:t}),a.renderModal?a.renderModal(d):S.jsx(IF,{...d})]}):S.jsx("a",{className:ht("wrap-anywhere font-medium text-primary underline",e),"data-incomplete":l,"data-streamdown":"link",href:r,rel:"noreferrer",target:"_blank",...i,children:t})},o5=F.memo(YF,(t,e)=>Jt(t,e)&&t.href===e.href);o5.displayName="MarkdownA";var l5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("h1",{className:ht("mt-6 mb-2 font-semibold text-3xl",e),"data-streamdown":"heading-1",...n,children:t}),(t,e)=>Jt(t,e));l5.displayName="MarkdownH1";var c5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("h2",{className:ht("mt-6 mb-2 font-semibold text-2xl",e),"data-streamdown":"heading-2",...n,children:t}),(t,e)=>Jt(t,e));c5.displayName="MarkdownH2";var u5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("h3",{className:ht("mt-6 mb-2 font-semibold text-xl",e),"data-streamdown":"heading-3",...n,children:t}),(t,e)=>Jt(t,e));u5.displayName="MarkdownH3";var h5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("h4",{className:ht("mt-6 mb-2 font-semibold text-lg",e),"data-streamdown":"heading-4",...n,children:t}),(t,e)=>Jt(t,e));h5.displayName="MarkdownH4";var d5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("h5",{className:ht("mt-6 mb-2 font-semibold text-base",e),"data-streamdown":"heading-5",...n,children:t}),(t,e)=>Jt(t,e));d5.displayName="MarkdownH5";var f5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("h6",{className:ht("mt-6 mb-2 font-semibold text-sm",e),"data-streamdown":"heading-6",...n,children:t}),(t,e)=>Jt(t,e));f5.displayName="MarkdownH6";var p5=F.memo(({children:t,className:e,node:r,...n})=>{let{controls:i}=F.useContext(Tn),a=Gf(i,"table");return S.jsx(jF,{className:e,showControls:a,...n,children:t})},(t,e)=>Jt(t,e));p5.displayName="MarkdownTable";var m5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("thead",{className:ht("bg-muted/80",e),"data-streamdown":"table-header",...n,children:t}),(t,e)=>Jt(t,e));m5.displayName="MarkdownThead";var g5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("tbody",{className:ht("divide-y divide-border bg-muted/40",e),"data-streamdown":"table-body",...n,children:t}),(t,e)=>Jt(t,e));g5.displayName="MarkdownTbody";var b5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("tr",{className:ht("border-border border-b",e),"data-streamdown":"table-row",...n,children:t}),(t,e)=>Jt(t,e));b5.displayName="MarkdownTr";var y5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("th",{className:ht("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",e),"data-streamdown":"table-header-cell",...n,children:t}),(t,e)=>Jt(t,e));y5.displayName="MarkdownTh";var x5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("td",{className:ht("px-4 py-2 text-sm",e),"data-streamdown":"table-cell",...n,children:t}),(t,e)=>Jt(t,e));x5.displayName="MarkdownTd";var v5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("blockquote",{className:ht("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",e),"data-streamdown":"blockquote",...n,children:t}),(t,e)=>Jt(t,e));v5.displayName="MarkdownBlockquote";var k5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("sup",{className:ht("text-sm",e),"data-streamdown":"superscript",...n,children:t}),(t,e)=>Jt(t,e));k5.displayName="MarkdownSup";var w5=F.memo(({children:t,className:e,node:r,...n})=>S.jsx("sub",{className:ht("text-sm",e),"data-streamdown":"subscript",...n,children:t}),(t,e)=>Jt(t,e));w5.displayName="MarkdownSub";var T5=F.memo(({children:t,className:e,node:r,...n})=>{if("data-footnotes"in n){let i=s=>{var o,l;if(!F.isValidElement(s))return!1;let c=Array.isArray(s.props.children)?s.props.children:[s.props.children],u=!1,h=!1;for(let d of c)if(d){if(typeof d=="string")d.trim()!==""&&(u=!0);else if(F.isValidElement(d))if(((o=d.props)==null?void 0:o["data-footnote-backref"])!==void 0)h=!0;else{let f=Array.isArray(d.props.children)?d.props.children:[d.props.children];for(let p of f){if(typeof p=="string"&&p.trim()!==""){u=!0;break}if(F.isValidElement(p)&&((l=p.props)==null?void 0:l["data-footnote-backref"])===void 0){u=!0;break}}}}return h&&!u},a=Array.isArray(t)?t.map(s=>{if(!F.isValidElement(s))return s;if(s.type===i1){let o=(Array.isArray(s.props.children)?s.props.children:[s.props.children]).filter(l=>!i(l));return o.length===0?null:{...s,props:{...s.props,children:o}}}return s}):t;return(Array.isArray(a)?a.some(s=>s!==null):a!==null)?S.jsx("section",{className:e,...n,children:a}):null}return S.jsx("section",{className:e,...n,children:t})},(t,e)=>Jt(t,e));T5.displayName="MarkdownSection";var VF=({node:t,className:e,children:r,...n})=>{var i,a,s;let o=((i=t==null?void 0:t.position)==null?void 0:i.start.line)===((a=t==null?void 0:t.position)==null?void 0:a.end.line),{mermaid:l,controls:c}=F.useContext(Tn),u=n1();if(o)return S.jsx("code",{className:ht("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",e),"data-streamdown":"inline-code",...n,children:r});let h=e==null?void 0:e.match(GF),d=(s=h==null?void 0:h.at(1))!=null?s:"",f="";if(F.isValidElement(r)&&r.props&&typeof r.props=="object"&&"children"in r.props&&typeof r.props.children=="string"?f=r.props.children:typeof r=="string"&&(f=r),d==="mermaid"&&u){let m=Gf(c,"mermaid"),y=Uc(c,"download"),b=Uc(c,"copy"),v=Uc(c,"fullscreen"),C=Uc(c,"panZoom"),E=m&&(y||b||v);return S.jsx(F.Suspense,{fallback:S.jsx(Lb,{}),children:S.jsxs("div",{className:ht("group relative my-4 h-auto rounded-xl border p-4",e),"data-streamdown":"mermaid-block",children:[E?S.jsxs("div",{className:"flex items-center justify-end gap-2",children:[y?S.jsx(DF,{chart:f,config:l==null?void 0:l.config}):null,b?S.jsx(Ab,{code:f}):null,v?S.jsx(FF,{chart:f,config:l==null?void 0:l.config}):null]}):null,S.jsx(WF,{chart:f,config:l==null?void 0:l.config,showControls:C})]})})}let p=Gf(c,"code");return S.jsx(F.Suspense,{fallback:S.jsx(Lb,{}),children:S.jsx(UF,{className:ht("overflow-x-auto border-border border-t",e),code:f,language:d,children:p?S.jsxs(S.Fragment,{children:[S.jsx(EF,{code:f,language:d}),S.jsx(Ab,{})]}):null})})},C5=F.memo(VF,(t,e)=>t.className===e.className&&fh(t.node,e.node));C5.displayName="MarkdownCode";var S5=F.memo(NF,(t,e)=>t.className===e.className&&fh(t.node,e.node));S5.displayName="MarkdownImg";var _5=F.memo(({children:t,className:e,node:r,...n})=>{var i,a;let s=(Array.isArray(t)?t:[t]).filter(o=>o!=null&&o!=="");if(s.length===1&&F.isValidElement(s[0])){let o=s[0].props.node,l=o==null?void 0:o.tagName;if(l==="img")return S.jsx(S.Fragment,{children:t});if(l==="code"&&((i=o==null?void 0:o.position)==null?void 0:i.start.line)!==((a=o==null?void 0:o.position)==null?void 0:a.end.line))return S.jsx(S.Fragment,{children:t})}return S.jsx("p",{className:e,...n,children:t})},(t,e)=>Jt(t,e));_5.displayName="MarkdownParagraph";var XF={ol:i1,li:n5,ul:i5,hr:a5,strong:s5,a:o5,h1:l5,h2:c5,h3:u5,h4:h5,h5:d5,h6:f5,table:p5,thead:m5,tbody:g5,tr:b5,th:y5,td:x5,blockquote:v5,code:C5,img:S5,pre:({children:t})=>t,sup:k5,sub:w5,p:_5,section:T5},Mb=[],Ib={allowDangerousHtml:!0},Wc=new WeakMap,KF=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let r=this.keyCache.get(e);if(r)return r;let n=e.rehypePlugins,i=e.remarkPlugins,a=e.remarkRehypeOptions;if(!(n||i||a)){let h="default";return this.keyCache.set(e,h),h}let s=h=>{if(!h||h.length===0)return"";let d="";for(let f=0;f<h.length;f+=1){let p=h[f];if(f>0&&(d+=","),Array.isArray(p)){let[m,y]=p;if(typeof m=="function"){let b=Wc.get(m);b||(b=m.name,Wc.set(m,b)),d+=b}else d+=String(m);d+=":",d+=JSON.stringify(y)}else if(typeof p=="function"){let m=Wc.get(p);m||(m=p.name,Wc.set(p,m)),d+=m}else d+=String(p)}return d},o=s(n),l=s(i),c=a?JSON.stringify(a):"",u=`${l}::${o}::${c}`;return this.keyCache.set(e,u),u}get(e){let r=this.generateCacheKey(e),n=this.cache.get(r);return n&&(this.cache.delete(r),this.cache.set(r,n)),n}set(e,r){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let i=this.cache.keys().next().value;i&&this.cache.delete(i)}this.cache.set(n,r)}clear(){this.cache.clear()}},Rb=new KF,E5=t=>{let e=QF(t),r=t.children||"";return JF(e.runSync(e.parse(r),r),t)},QF=t=>{let e=Rb.get(t);if(e)return e;let r=ZF(t);return Rb.set(t,r),r},ZF=t=>{let e=t.rehypePlugins||Mb,r=t.remarkPlugins||Mb,n=t.remarkRehypeOptions?{...Ib,...t.remarkRehypeOptions}:Ib;return MP().use(MO).use(r).use(fP,n).use(e)},JF=(t,e)=>$D(t,{Fragment:S.Fragment,components:e.components,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0}),e$=/\[\^[^\]\s]{1,200}\](?!:)/,t$=/\[\^[^\]\s]{1,200}\]:/,r$=/<\/(\w+)>/,n$=/<(\w+)[\s>]/,Ad=t=>{let e=0;for(;e<t.length&&(t[e]===" "||t[e]===" "||t[e]===`
112
+ `||t[e]==="\r");)e+=1;return e+1<t.length&&t[e]==="$"&&t[e+1]==="$"},i$=t=>{let e=t.length-1;for(;e>=0&&(t[e]===" "||t[e]===" "||t[e]===`
113
+ `||t[e]==="\r");)e-=1;return e>=1&&t[e]==="$"&&t[e-1]==="$"},Nd=t=>{let e=0;for(let r=0;r<t.length-1;r+=1)t[r]==="$"&&t[r+1]==="$"&&(e+=1,r+=1);return e},a$=t=>{let e=e$.test(t),r=t$.test(t);if(e||r)return[t];let n=In.lex(t,{gfm:!0}),i=[],a=[];for(let s of n){let o=s.raw,l=i.length;if(a.length>0){if(i[l-1]+=o,s.type==="html"){let c=o.match(r$);if(c){let u=c[1];a.at(-1)===u&&a.pop()}}continue}if(s.type==="html"&&s.block){let c=o.match(n$);if(c){let u=c[1];o.includes(`</${u}>`)||a.push(u)}}if(o.trim()==="$$"&&l>0){let c=i[l-1],u=Ad(c),h=Nd(c);if(u&&h%2===1){i[l-1]=c+o;continue}}if(l>0&&i$(o)){let c=i[l-1],u=Ad(c),h=Nd(c),d=Nd(o);if(u&&h%2===1&&!Ad(o)&&d===1){i[l-1]=c+o;continue}}i.push(o)}return i},s$={raw:vN,sanitize:[LN,{}],harden:[X_,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},o$={gfm:[cR,{}]},l$=Object.values(s$),c$=Object.values(o$),u$={block:" ▋",circle:" ●"},h$={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Tn=F.createContext(h$),A5=F.memo(({content:t,shouldParseIncompleteMarkdown:e,index:r,...n})=>S.jsx(E5,{...n,children:t}),(t,e)=>{if(t.content!==e.content||t.index!==e.index)return!1;if(t.components!==e.components){let r=Object.keys(t.components||{}),n=Object.keys(e.components||{});if(r.length!==n.length||r.some(i=>{var a,s;return((a=t.components)==null?void 0:a[i])!==((s=e.components)==null?void 0:s[i])}))return!1}return!(t.rehypePlugins!==e.rehypePlugins||t.remarkPlugins!==e.remarkPlugins)});A5.displayName="Block";var d$=["github-light","github-dark"],is=F.memo(({children:t,mode:e="streaming",parseIncompleteMarkdown:r=!0,components:n,rehypePlugins:i=l$,remarkPlugins:a=c$,className:s,shikiTheme:o=d$,mermaid:l,controls:c=!0,isAnimating:u=!1,BlockComponent:h=A5,parseMarkdownIntoBlocksFn:d=a$,caret:f,plugins:p,remend:m,linkSafety:y={enabled:!0},...b})=>{let v=F.useId(),[C,E]=F.useTransition(),_=F.useMemo(()=>typeof t!="string"?"":e==="streaming"&&r?fB(t,m):t,[t,e,r,m]),k=F.useMemo(()=>d(_),[_,d]),[N,D]=F.useState(k);F.useEffect(()=>{e==="streaming"?E(()=>{D(k)}):D(k)},[k,e]);let $=e==="streaming"?N:k,R=F.useMemo(()=>$.map((j,Q)=>`${v}-${Q}`),[$.length,v]),P=F.useMemo(()=>{var j,Q;return{shikiTheme:(Q=(j=p==null?void 0:p.code)==null?void 0:j.getThemes())!=null?Q:o,controls:c,isAnimating:u,mode:e,mermaid:l,linkSafety:y}},[o,c,u,e,l,y,p==null?void 0:p.code]),G=F.useMemo(()=>({...XF,...n}),[n]),ee=F.useMemo(()=>{let j=[];return p!=null&&p.cjk&&(j=[...j,...p.cjk.remarkPluginsBefore]),j=[...j,...a],p!=null&&p.cjk&&(j=[...j,...p.cjk.remarkPluginsAfter]),p!=null&&p.math&&(j=[...j,p.math.remarkPlugin]),j},[a,p==null?void 0:p.math,p==null?void 0:p.cjk]),W=F.useMemo(()=>p!=null&&p.math?[...i,p.math.rehypePlugin]:i,[i,p==null?void 0:p.math]),U=F.useMemo(()=>f&&u?{"--streamdown-caret":`"${u$[f]}"`}:void 0,[f,u]);return e==="static"?S.jsx(Wf.Provider,{value:p??null,children:S.jsx(Tn.Provider,{value:P,children:S.jsx("div",{className:ht("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",s),children:S.jsx(E5,{components:G,rehypePlugins:W,remarkPlugins:ee,...b,children:t})})})}):S.jsx(Wf.Provider,{value:p??null,children:S.jsx(Tn.Provider,{value:P,children:S.jsxs("div",{className:ht("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",f?"*:last:after:inline *:last:after:align-baseline *:last:after:content-(--streamdown-caret)":null,s),style:U,children:[$.length===0&&f&&u&&S.jsx("span",{}),$.map((j,Q)=>S.jsx(h,{components:G,content:j,index:Q,rehypePlugins:W,remarkPlugins:ee,shouldParseIncompleteMarkdown:r,...b},R[Q]))]})})})},(t,e)=>t.children===e.children&&t.shikiTheme===e.shikiTheme&&t.isAnimating===e.isAnimating&&t.mode===e.mode&&t.plugins===e.plugins&&t.className===e.className&&t.linkSafety===e.linkSafety);is.displayName="Streamdown";var f$=({children:t,className:e,minZoom:r=.5,maxZoom:n=3,zoomStep:i=.1,showControls:a=!0,initialZoom:s=1,fullscreen:o=!1})=>{let l=F.useRef(null),c=F.useRef(null),[u,h]=F.useState(s),[d,f]=F.useState({x:0,y:0}),[p,m]=F.useState(!1),[y,b]=F.useState({x:0,y:0}),[v,C]=F.useState({x:0,y:0}),E=F.useCallback(G=>{h(ee=>Math.max(r,Math.min(n,ee+G)))},[r,n]),_=F.useCallback(()=>{E(i)},[E,i]),k=F.useCallback(()=>{E(-i)},[E,i]),N=F.useCallback(()=>{h(s),f({x:0,y:0})},[s]),D=F.useCallback(G=>{G.preventDefault();let ee=G.deltaY>0?-i:i;E(ee)},[E,i]),$=F.useCallback(G=>{if(G.button!==0||G.isPrimary===!1)return;m(!0),b({x:G.clientX,y:G.clientY}),C(d);let ee=G.currentTarget;ee instanceof HTMLElement&&ee.setPointerCapture(G.pointerId)},[d]),R=F.useCallback(G=>{if(!p)return;G.preventDefault();let ee=G.clientX-y.x,W=G.clientY-y.y;f({x:v.x+ee,y:v.y+W})},[p,y,v]),P=F.useCallback(G=>{m(!1);let ee=G.currentTarget;ee instanceof HTMLElement&&ee.releasePointerCapture(G.pointerId)},[]);return F.useEffect(()=>{let G=l.current;if(G)return G.addEventListener("wheel",D,{passive:!1}),()=>{G.removeEventListener("wheel",D)}},[D]),F.useEffect(()=>{let G=c.current;if(G&&p)return document.body.style.userSelect="none",G.addEventListener("pointermove",R,{passive:!1}),G.addEventListener("pointerup",P),G.addEventListener("pointercancel",P),()=>{document.body.style.userSelect="",G.removeEventListener("pointermove",R),G.removeEventListener("pointerup",P),G.removeEventListener("pointercancel",P)}},[p,R,P]),S.jsxs("div",{className:ht("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",e),ref:l,style:{cursor:p?"grabbing":"grab"},children:[a?S.jsxs("div",{className:ht("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/90 p-1 shadow-sm backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[S.jsx("button",{className:"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:u>=n,onClick:_,title:"Zoom in",type:"button",children:S.jsx(SF,{size:16})}),S.jsx("button",{className:"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:u<=r,onClick:k,title:"Zoom out",type:"button",children:S.jsx(_F,{size:16})}),S.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:N,title:"Reset zoom and pan",type:"button",children:S.jsx(CF,{size:16})})]}):null,S.jsx("div",{className:ht("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:$,ref:c,role:"application",style:{transform:`translate(${d.x}px, ${d.y}px) scale(${u})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:t})]})},N5=({chart:t,className:e,config:r,fullscreen:n=!1,showControls:i=!0})=>{let[a,s]=F.useState(null),[o,l]=F.useState(!1),[c,u]=F.useState(""),[h,d]=F.useState(""),[f,p]=F.useState(0),{mermaid:m}=F.useContext(Tn),y=n1(),b=m==null?void 0:m.errorComponent,{shouldRender:v,containerRef:C}=kF({immediate:n});if(F.useEffect(()=>{if(v){if(!y){s("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{s(null),l(!0);let _=y.getMermaid(r),k=t.split("").reduce(($,R)=>($<<5)-$+R.charCodeAt(0)|0,0),N=`mermaid-${Math.abs(k)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:D}=await _.render(N,t);u(D),d(D)}catch(_){if(!(h||c)){let k=_ instanceof Error?_.message:"Failed to render Mermaid chart";s(k)}}finally{l(!1)}})()}},[t,r,f,v,y]),!(v||c||h))return S.jsx("div",{className:ht("my-4 min-h-[200px]",e),ref:C});if(o&&!c&&!h)return S.jsx("div",{className:ht("my-4 flex justify-center p-4",e),ref:C,children:S.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[S.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),S.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(a&&!c&&!h){let _=()=>p(k=>k+1);return b?S.jsx("div",{ref:C,children:S.jsx(b,{chart:t,error:a,retry:_})}):S.jsxs("div",{className:ht("rounded-lg border border-red-200 bg-red-50 p-4",e),ref:C,children:[S.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",a]}),S.jsxs("details",{className:"mt-2",children:[S.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),S.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:t})]})]})}let E=c||h;return S.jsx("div",{className:ht("size-full",e),"data-streamdown":"mermaid",ref:C,children:S.jsx(f$,{className:ht(n?"size-full overflow-hidden":"my-4 overflow-hidden",e),fullscreen:n,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:S.jsx("div",{"aria-label":"Mermaid chart",className:ht("flex justify-center",n?"size-full items-center":null),dangerouslySetInnerHTML:{__html:E},role:"img"})})})};let sr=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function p$(t){return a1(t)}function a1(t){return Array.isArray(t)?m$(t):t instanceof RegExp?t:typeof t=="object"?g$(t):t}function m$(t){let e=[];for(let r=0,n=t.length;r<n;r++)e[r]=a1(t[r]);return e}function g$(t){let e={};for(let r in t)e[r]=a1(t[r]);return e}function L5(t,...e){return e.forEach(r=>{for(let n in r)t[n]=r[n]}),t}function M5(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?M5(t.substring(0,t.length-1)):t.substr(~e+1)}var Ld=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Gc=class{static hasCaptures(t){return t===null?!1:(Ld.lastIndex=0,Ld.test(t))}static replaceCaptures(t,e,r){return t.replace(Ld,(n,i,a,s)=>{let o=r[parseInt(i||a,10)];if(o){let l=e.substring(o.start,o.end);for(;l[0]===".";)l=l.substring(1);switch(s){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return n})}};function I5(t,e){return t<e?-1:t>e?1:0}function R5(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let r=t.length,n=e.length;if(r===n){for(let i=0;i<r;i++){let a=I5(t[i],e[i]);if(a!==0)return a}return 0}return r-n}function Bb(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function B5(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var D5=class{constructor(t){te(this,"cache",new Map);this.fn=t}get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},Ju=class{constructor(e,r,n){te(this,"_cachedMatchRoot",new D5(e=>this._root.match(e)));this._colorMap=e,this._defaults=r,this._root=n}static createFromRawTheme(e,r){return this.createFromParsedTheme(x$(e),r)}static createFromParsedTheme(e,r){return k$(e,r)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const r=e.scopeName,i=this._cachedMatchRoot.get(r).find(a=>b$(e.parent,a.parentScopes));return i?new O5(i.fontStyle,i.foreground,i.background):null}},Md=class Cu{constructor(e,r){this.parent=e,this.scopeName=r}static push(e,r){for(const n of r)e=new Cu(e,n);return e}static from(...e){let r=null;for(let n=0;n<e.length;n++)r=new Cu(r,e[n]);return r}push(e){return new Cu(this,e)}getSegments(){let e=this;const r=[];for(;e;)r.push(e.scopeName),e=e.parent;return r.reverse(),r}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const r=[];let n=this;for(;n&&n!==e;)r.push(n.scopeName),n=n.parent;return n===e?r.reverse():void 0}};function b$(t,e){if(e.length===0)return!0;for(let r=0;r<e.length;r++){let n=e[r],i=!1;if(n===">"){if(r===e.length-1)return!1;n=e[++r],i=!0}for(;t&&!y$(t.scopeName,n);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function y$(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var O5=class{constructor(t,e,r){this.fontStyle=t,this.foregroundId=e,this.backgroundId=r}};function x$(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,r=[],n=0;for(let i=0,a=e.length;i<a;i++){let s=e[i];if(!s.settings)continue;let o;if(typeof s.scope=="string"){let h=s.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),o=h.split(",")}else Array.isArray(s.scope)?o=s.scope:o=[""];let l=-1;if(typeof s.settings.fontStyle=="string"){l=0;let h=s.settings.fontStyle.split(" ");for(let d=0,f=h.length;d<f;d++)switch(h[d]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let c=null;typeof s.settings.foreground=="string"&&Bb(s.settings.foreground)&&(c=s.settings.foreground);let u=null;typeof s.settings.background=="string"&&Bb(s.settings.background)&&(u=s.settings.background);for(let h=0,d=o.length;h<d;h++){let p=o[h].trim().split(" "),m=p[p.length-1],y=null;p.length>1&&(y=p.slice(0,p.length-1),y.reverse()),r[n++]=new v$(m,y,i,l,c,u)}}return r}var v$=class{constructor(t,e,r,n,i,a){this.scope=t,this.parentScopes=e,this.index=r,this.fontStyle=n,this.foreground=i,this.background=a}},Ir=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(Ir||{});function k$(t,e){t.sort((l,c)=>{let u=I5(l.scope,c.scope);return u!==0||(u=R5(l.parentScopes,c.parentScopes),u!==0)?u:l.index-c.index});let r=0,n="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let l=t.shift();l.fontStyle!==-1&&(r=l.fontStyle),l.foreground!==null&&(n=l.foreground),l.background!==null&&(i=l.background)}let a=new w$(e),s=new O5(r,a.getId(n),a.getId(i)),o=new C$(new Yf(0,null,-1,0,0),[]);for(let l=0,c=t.length;l<c;l++){let u=t[l];o.insert(0,u.scope,u.parentScopes,u.fontStyle,a.getId(u.foreground),a.getId(u.background))}return new Ju(a,s,o)}var w$=class{constructor(t){te(this,"_isFrozen");te(this,"_lastColorId");te(this,"_id2color");te(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,r=t.length;e<r;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},T$=Object.freeze([]),Yf=class P5{constructor(e,r,n,i,a){te(this,"scopeDepth");te(this,"parentScopes");te(this,"fontStyle");te(this,"foreground");te(this,"background");this.scopeDepth=e,this.parentScopes=r||T$,this.fontStyle=n,this.foreground=i,this.background=a}clone(){return new P5(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let r=[];for(let n=0,i=e.length;n<i;n++)r[n]=e[n].clone();return r}acceptOverwrite(e,r,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,r!==-1&&(this.fontStyle=r),n!==0&&(this.foreground=n),i!==0&&(this.background=i)}},C$=class Vf{constructor(e,r=[],n={}){te(this,"_rulesWithParentScopes");this._mainRule=e,this._children=n,this._rulesWithParentScopes=r}static _cmpBySpecificity(e,r){if(e.scopeDepth!==r.scopeDepth)return r.scopeDepth-e.scopeDepth;let n=0,i=0;for(;e.parentScopes[n]===">"&&n++,r.parentScopes[i]===">"&&i++,!(n>=e.parentScopes.length||i>=r.parentScopes.length);){const a=r.parentScopes[i].length-e.parentScopes[n].length;if(a!==0)return a;n++,i++}return r.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let n=e.indexOf("."),i,a;if(n===-1?(i=e,a=""):(i=e.substring(0,n),a=e.substring(n+1)),this._children.hasOwnProperty(i))return this._children[i].match(a)}const r=this._rulesWithParentScopes.concat(this._mainRule);return r.sort(Vf._cmpBySpecificity),r}insert(e,r,n,i,a,s){if(r===""){this._doInsertHere(e,n,i,a,s);return}let o=r.indexOf("."),l,c;o===-1?(l=r,c=""):(l=r.substring(0,o),c=r.substring(o+1));let u;this._children.hasOwnProperty(l)?u=this._children[l]:(u=new Vf(this._mainRule.clone(),Yf.cloneArr(this._rulesWithParentScopes)),this._children[l]=u),u.insert(e+1,c,n,i,a,s)}_doInsertHere(e,r,n,i,a){if(r===null){this._mainRule.acceptOverwrite(e,n,i,a);return}for(let s=0,o=this._rulesWithParentScopes.length;s<o;s++){let l=this._rulesWithParentScopes[s];if(R5(l.parentScopes,r)===0){l.acceptOverwrite(e,n,i,a);return}}n===-1&&(n=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),a===0&&(a=this._mainRule.background),this._rulesWithParentScopes.push(new Yf(e,r,n,i,a))}},co=class Nn{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const r=Nn.getLanguageId(e),n=Nn.getTokenType(e),i=Nn.getFontStyle(e),a=Nn.getForeground(e),s=Nn.getBackground(e);console.log({languageId:r,tokenType:n,fontStyle:i,foreground:a,background:s})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,r,n,i,a,s,o){let l=Nn.getLanguageId(e),c=Nn.getTokenType(e),u=Nn.containsBalancedBrackets(e)?1:0,h=Nn.getFontStyle(e),d=Nn.getForeground(e),f=Nn.getBackground(e);return r!==0&&(l=r),n!==8&&(c=n),i!==null&&(u=i?1:0),a!==-1&&(h=a),s!==0&&(d=s),o!==0&&(f=o),(l<<0|c<<8|u<<10|h<<11|d<<15|f<<24)>>>0}};function e0(t,e){const r=[],n=S$(t);let i=n.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=n.next()}let c=s();if(r.push({matcher:c,priority:l}),i!==",")break;i=n.next()}return r;function a(){if(i==="-"){i=n.next();const l=a();return c=>!!l&&!l(c)}if(i==="("){i=n.next();const l=o();return i===")"&&(i=n.next()),l}if(Db(i)){const l=[];do l.push(i),i=n.next();while(Db(i));return c=>e(l,c)}return null}function s(){const l=[];let c=a();for(;c;)l.push(c),c=a();return u=>l.every(h=>h(u))}function o(){const l=[];let c=s();for(;c&&(l.push(c),i==="|"||i===",");){do i=n.next();while(i==="|"||i===",");c=s()}return u=>l.some(h=>h(u))}}function Db(t){return!!t&&!!t.match(/[\w\.:]+/)}function S$(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,r=e.exec(t);return{next:()=>{if(!r)return null;const n=r[0];return r=e.exec(t),n}}}function F5(t){typeof t.dispose=="function"&&t.dispose()}var Vl=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},_$=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},E$=class{constructor(){te(this,"_references",[]);te(this,"_seenReferenceKeys",new Set);te(this,"visitedRule",new Set)}get references(){return this._references}add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},A$=class{constructor(t,e){te(this,"seenFullScopeRequests",new Set);te(this,"seenPartialScopeRequests",new Set);te(this,"Q");this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Vl(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new E$;for(const r of t)N$(r,this.initialScopeName,this.repo,e);for(const r of e.references)if(r instanceof Vl){if(this.seenFullScopeRequests.has(r.scopeName))continue;this.seenFullScopeRequests.add(r.scopeName),this.Q.push(r)}else{if(this.seenFullScopeRequests.has(r.scopeName)||this.seenPartialScopeRequests.has(r.toKey()))continue;this.seenPartialScopeRequests.add(r.toKey()),this.Q.push(r)}}};function N$(t,e,r,n){const i=r.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const a=r.lookup(e);t instanceof Vl?Su({baseGrammar:a,selfGrammar:i},n):Xf(t.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},n);const s=r.injections(t.scopeName);if(s)for(const o of s)n.add(new Vl(o))}function Xf(t,e,r){if(e.repository&&e.repository[t]){const n=e.repository[t];t0([n],e,r)}}function Su(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&t0(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&t0(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function t0(t,e,r){for(const n of t){if(r.visitedRule.has(n))continue;r.visitedRule.add(n);const i=n.repository?L5({},e.repository,n.repository):e.repository;Array.isArray(n.patterns)&&t0(n.patterns,{...e,repository:i},r);const a=n.include;if(!a)continue;const s=$5(a);switch(s.kind){case 0:Su({...e,selfGrammar:e.baseGrammar},r);break;case 1:Su(e,r);break;case 2:Xf(s.ruleName,{...e,repository:i},r);break;case 3:case 4:const o=s.scopeName===e.selfGrammar.scopeName?e.selfGrammar:s.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(o){const l={baseGrammar:e.baseGrammar,selfGrammar:o,repository:i};s.kind===4?Xf(s.ruleName,l,r):Su(l,r)}else s.kind===4?r.add(new _$(s.scopeName,s.ruleName)):r.add(new Vl(s.scopeName));break}}}var L$=class{constructor(){te(this,"kind",0)}},M$=class{constructor(){te(this,"kind",1)}},I$=class{constructor(t){te(this,"kind",2);this.ruleName=t}},R$=class{constructor(t){te(this,"kind",3);this.scopeName=t}},B$=class{constructor(t,e){te(this,"kind",4);this.scopeName=t,this.ruleName=e}};function $5(t){if(t==="$base")return new L$;if(t==="$self")return new M$;const e=t.indexOf("#");if(e===-1)return new R$(t);if(e===0)return new I$(t.substring(1));{const r=t.substring(0,e),n=t.substring(e+1);return new B$(r,n)}}var D$=/\\(\d+)/,Ob=/\\(\d+)/g,O$=-1,z5=-2;var Cc=class{constructor(t,e,r,n){te(this,"$location");te(this,"id");te(this,"_nameIsCapturing");te(this,"_name");te(this,"_contentNameIsCapturing");te(this,"_contentName");this.$location=t,this.id=e,this._name=r||null,this._nameIsCapturing=Gc.hasCaptures(this._name),this._contentName=n||null,this._contentNameIsCapturing=Gc.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${M5(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:Gc.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Gc.replaceCaptures(this._contentName,t,e)}},P$=class extends Cc{constructor(e,r,n,i,a){super(e,r,n,i);te(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=a}dispose(){}collectPatterns(e,r){throw new Error("Not supported!")}compile(e,r){throw new Error("Not supported!")}compileAG(e,r,n,i){throw new Error("Not supported!")}},F$=class extends Cc{constructor(e,r,n,i,a){super(e,r,n,null);te(this,"_match");te(this,"captures");te(this,"_cachedCompiledPatterns");this._match=new Xl(i,this.id),this.captures=a,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,r){r.push(this._match)}compile(e,r){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,r,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Kl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Pb=class extends Cc{constructor(e,r,n,i,a){super(e,r,n,i);te(this,"hasMissingPatterns");te(this,"patterns");te(this,"_cachedCompiledPatterns");this.patterns=a.patterns,this.hasMissingPatterns=a.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,r){for(const n of this.patterns)e.getRule(n).collectPatterns(e,r)}compile(e,r){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,r,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Kl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Kf=class extends Cc{constructor(e,r,n,i,a,s,o,l,c,u){super(e,r,n,i);te(this,"_begin");te(this,"beginCaptures");te(this,"_end");te(this,"endHasBackReferences");te(this,"endCaptures");te(this,"applyEndPatternLast");te(this,"hasMissingPatterns");te(this,"patterns");te(this,"_cachedCompiledPatterns");this._begin=new Xl(a,this.id),this.beginCaptures=s,this._end=new Xl(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=c||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,r){return this._end.resolveBackReferences(e,r)}collectPatterns(e,r){r.push(this._begin)}compile(e,r){return this._getCachedCompiledPatterns(e,r).compile(e)}compileAG(e,r,n,i){return this._getCachedCompiledPatterns(e,r).compileAG(e,n,i)}_getCachedCompiledPatterns(e,r){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Kl;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,r):this._cachedCompiledPatterns.setSource(0,r)),this._cachedCompiledPatterns}},r0=class extends Cc{constructor(e,r,n,i,a,s,o,l,c){super(e,r,n,i);te(this,"_begin");te(this,"beginCaptures");te(this,"whileCaptures");te(this,"_while");te(this,"whileHasBackReferences");te(this,"hasMissingPatterns");te(this,"patterns");te(this,"_cachedCompiledPatterns");te(this,"_cachedCompiledWhilePatterns");this._begin=new Xl(a,this.id),this.beginCaptures=s,this.whileCaptures=l,this._while=new Xl(o,z5),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,r){return this._while.resolveBackReferences(e,r)}collectPatterns(e,r){r.push(this._begin)}compile(e,r){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,r,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Kl;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,r){return this._getCachedCompiledWhilePatterns(e,r).compile(e)}compileWhileAG(e,r,n,i){return this._getCachedCompiledWhilePatterns(e,r).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,r){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Kl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,r||"￿"),this._cachedCompiledWhilePatterns}},H5=class Ar{static createCaptureRule(e,r,n,i,a){return e.registerRule(s=>new P$(r,s,n,i,a))}static getCompiledRuleId(e,r,n){return e.id||r.registerRule(i=>{if(e.id=i,e.match)return new F$(e.$vscodeTextmateLocation,e.id,e.name,e.match,Ar._compileCaptures(e.captures,r,n));if(typeof e.begin>"u"){e.repository&&(n=L5({},n,e.repository));let a=e.patterns;return typeof a>"u"&&e.include&&(a=[{include:e.include}]),new Pb(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,Ar._compilePatterns(a,r,n))}return e.while?new r0(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,Ar._compileCaptures(e.beginCaptures||e.captures,r,n),e.while,Ar._compileCaptures(e.whileCaptures||e.captures,r,n),Ar._compilePatterns(e.patterns,r,n)):new Kf(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,Ar._compileCaptures(e.beginCaptures||e.captures,r,n),e.end,Ar._compileCaptures(e.endCaptures||e.captures,r,n),e.applyEndPatternLast,Ar._compilePatterns(e.patterns,r,n))}),e.id}static _compileCaptures(e,r,n){let i=[];if(e){let a=0;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const o=parseInt(s,10);o>a&&(a=o)}for(let s=0;s<=a;s++)i[s]=null;for(const s in e){if(s==="$vscodeTextmateLocation")continue;const o=parseInt(s,10);let l=0;e[s].patterns&&(l=Ar.getCompiledRuleId(e[s],r,n)),i[o]=Ar.createCaptureRule(r,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,l)}}return i}static _compilePatterns(e,r,n){let i=[];if(e)for(let a=0,s=e.length;a<s;a++){const o=e[a];let l=-1;if(o.include){const c=$5(o.include);switch(c.kind){case 0:case 1:l=Ar.getCompiledRuleId(n[o.include],r,n);break;case 2:let u=n[c.ruleName];u&&(l=Ar.getCompiledRuleId(u,r,n));break;case 3:case 4:const h=c.scopeName,d=c.kind===4?c.ruleName:null,f=r.getExternalGrammar(h,n);if(f)if(d){let p=f.repository[d];p&&(l=Ar.getCompiledRuleId(p,r,f.repository))}else l=Ar.getCompiledRuleId(f.repository.$self,r,f.repository);break}}else l=Ar.getCompiledRuleId(o,r,n);if(l!==-1){const c=r.getRule(l);let u=!1;if((c instanceof Pb||c instanceof Kf||c instanceof r0)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},Xl=class q5{constructor(e,r){te(this,"source");te(this,"ruleId");te(this,"hasAnchor");te(this,"hasBackReferences");te(this,"_anchorCache");if(e&&typeof e=="string"){const n=e.length;let i=0,a=[],s=!1;for(let o=0;o<n;o++)if(e.charAt(o)==="\\"&&o+1<n){const c=e.charAt(o+1);c==="z"?(a.push(e.substring(i,o)),a.push("$(?!\\n)(?<!\\n)"),i=o+2):(c==="A"||c==="G")&&(s=!0),o++}this.hasAnchor=s,i===0?this.source=e:(a.push(e.substring(i,n)),this.source=a.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=r,typeof this.source=="string"?this.hasBackReferences=D$.test(this.source):this.hasBackReferences=!1}clone(){return new q5(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,r){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let n=r.map(i=>e.substring(i.start,i.end));return Ob.lastIndex=0,this.source.replace(Ob,(i,a)=>B5(n[parseInt(a,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],r=[],n=[],i=[],a,s,o,l;for(a=0,s=this.source.length;a<s;a++)o=this.source.charAt(a),e[a]=o,r[a]=o,n[a]=o,i[a]=o,o==="\\"&&a+1<s&&(l=this.source.charAt(a+1),l==="A"?(e[a+1]="￿",r[a+1]="￿",n[a+1]="A",i[a+1]="A"):l==="G"?(e[a+1]="￿",r[a+1]="G",n[a+1]="￿",i[a+1]="G"):(e[a+1]=l,r[a+1]=l,n[a+1]=l,i[a+1]=l),a++);return{A0_G0:e.join(""),A0_G1:r.join(""),A1_G0:n.join(""),A1_G1:i.join("")}}resolveAnchors(e,r){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?r?this._anchorCache.A1_G1:this._anchorCache.A1_G0:r?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Kl=class{constructor(){te(this,"_items");te(this,"_hasAnchors");te(this,"_cached");te(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(r=>r.source);this._cached=new Fb(t,e,this._items.map(r=>r.ruleId))}return this._cached}compileAG(t,e,r){return this._hasAnchors?e?r?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,r)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,r)),this._anchorCache.A1_G0):r?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,r)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,r)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,r){let n=this._items.map(i=>i.resolveAnchors(e,r));return new Fb(t,n,this._items.map(i=>i.ruleId))}},Fb=class{constructor(t,e,r){te(this,"scanner");this.regExps=e,this.rules=r,this.scanner=t.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,r=this.rules.length;e<r;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
114
+ `)}findNextMatchSync(t,e,r){const n=this.scanner.findNextMatchSync(t,e,r);return n?{ruleId:this.rules[n.index],captureIndices:n.captureIndices}:null}},Id=class{constructor(t,e){this.languageId=t,this.tokenType=e}},zi,$$=(zi=class{constructor(e,r){te(this,"_defaultAttributes");te(this,"_embeddedLanguagesMatcher");te(this,"_getBasicScopeAttributes",new D5(e=>{const r=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new Id(r,n)}));this._defaultAttributes=new Id(e,8),this._embeddedLanguagesMatcher=new z$(Object.entries(r||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?zi._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const r=e.match(zi.STANDARD_TOKEN_TYPE_REGEXP);if(!r)return 8;switch(r[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},te(zi,"_NULL_SCOPE_METADATA",new Id(0,0)),te(zi,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),zi),z$=class{constructor(t){te(this,"values");te(this,"scopesRegExp");if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([r,n])=>B5(r));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}};typeof process<"u"&&process.env.VSCODE_TEXTMATE_DEBUG;var $b=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function j5(t,e,r,n,i,a,s,o){const l=e.content.length;let c=!1,u=-1;if(s){const f=H$(t,e,r,n,i,a);i=f.stack,n=f.linePos,r=f.isFirstLine,u=f.anchorPosition}const h=Date.now();for(;!c;){if(o!==0&&Date.now()-h>o)return new $b(i,!0);d()}return new $b(i,!1);function d(){const f=q$(t,e,r,n,i,u);if(!f){a.produce(i,l),c=!0;return}const p=f.captureIndices,m=f.matchedRuleId,y=p&&p.length>0?p[0].end>n:!1;if(m===O$){const b=i.getRule(t);a.produce(i,p[0].start),i=i.withContentNameScopesList(i.nameScopesList),dl(t,e,r,i,a,b.endCaptures,p),a.produce(i,p[0].end);const v=i;if(i=i.parent,u=v.getAnchorPos(),!y&&v.getEnterPos()===n){i=v,a.produce(i,l),c=!0;return}}else{const b=t.getRule(m);a.produce(i,p[0].start);const v=i,C=b.getName(e.content,p),E=i.contentNameScopesList.pushAttributed(C,t);if(i=i.push(m,n,u,p[0].end===l,null,E,E),b instanceof Kf){const _=b;dl(t,e,r,i,a,_.beginCaptures,p),a.produce(i,p[0].end),u=p[0].end;const k=_.getContentName(e.content,p),N=E.pushAttributed(k,t);if(i=i.withContentNameScopesList(N),_.endHasBackReferences&&(i=i.withEndRule(_.getEndWithResolvedBackReferences(e.content,p))),!y&&v.hasSameRuleAs(i)){i=i.pop(),a.produce(i,l),c=!0;return}}else if(b instanceof r0){const _=b;dl(t,e,r,i,a,_.beginCaptures,p),a.produce(i,p[0].end),u=p[0].end;const k=_.getContentName(e.content,p),N=E.pushAttributed(k,t);if(i=i.withContentNameScopesList(N),_.whileHasBackReferences&&(i=i.withEndRule(_.getWhileWithResolvedBackReferences(e.content,p))),!y&&v.hasSameRuleAs(i)){i=i.pop(),a.produce(i,l),c=!0;return}}else if(dl(t,e,r,i,a,b.captures,p),a.produce(i,p[0].end),i=i.pop(),!y){i=i.safePop(),a.produce(i,l),c=!0;return}}p[0].end>n&&(n=p[0].end,r=!1)}}function H$(t,e,r,n,i,a){let s=i.beginRuleCapturedEOL?0:-1;const o=[];for(let l=i;l;l=l.pop()){const c=l.getRule(t);c instanceof r0&&o.push({rule:c,stack:l})}for(let l=o.pop();l;l=o.pop()){const{ruleScanner:c,findOptions:u}=W$(l.rule,t,l.stack.endRule,r,n===s),h=c.findNextMatchSync(e,n,u);if(h){if(h.ruleId!==z5){i=l.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(a.produce(l.stack,h.captureIndices[0].start),dl(t,e,r,l.stack,a,l.rule.whileCaptures,h.captureIndices),a.produce(l.stack,h.captureIndices[0].end),s=h.captureIndices[0].end,h.captureIndices[0].end>n&&(n=h.captureIndices[0].end,r=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:n,anchorPosition:s,isFirstLine:r}}function q$(t,e,r,n,i,a){const s=j$(t,e,r,n,i,a),o=t.getInjections();if(o.length===0)return s;const l=U$(o,t,e,r,n,i,a);if(!l)return s;if(!s)return l;const c=s.captureIndices[0].start,u=l.captureIndices[0].start;return u<c||l.priorityMatch&&u===c?l:s}function j$(t,e,r,n,i,a){const s=i.getRule(t),{ruleScanner:o,findOptions:l}=U5(s,t,i.endRule,r,n===a),c=o.findNextMatchSync(e,n,l);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function U$(t,e,r,n,i,a,s){let o=Number.MAX_VALUE,l=null,c,u=0;const h=a.contentNameScopesList.getScopeNames();for(let d=0,f=t.length;d<f;d++){const p=t[d];if(!p.matcher(h))continue;const m=e.getRule(p.ruleId),{ruleScanner:y,findOptions:b}=U5(m,e,null,n,i===s),v=y.findNextMatchSync(r,i,b);if(!v)continue;const C=v.captureIndices[0].start;if(!(C>=o)&&(o=C,l=v.captureIndices,c=v.ruleId,u=p.priority,o===i))break}return l?{priorityMatch:u===-1,captureIndices:l,matchedRuleId:c}:null}function U5(t,e,r,n,i){return{ruleScanner:t.compileAG(e,r,n,i),findOptions:0}}function W$(t,e,r,n,i){return{ruleScanner:t.compileWhileAG(e,r,n,i),findOptions:0}}function dl(t,e,r,n,i,a,s){if(a.length===0)return;const o=e.content,l=Math.min(a.length,s.length),c=[],u=s[0].end;for(let h=0;h<l;h++){const d=a[h];if(d===null)continue;const f=s[h];if(f.length===0)continue;if(f.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=f.start;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?i.produceFromScopes(c[c.length-1].scopes,f.start):i.produce(n,f.start),d.retokenizeCapturedWithRuleId){const m=d.getName(o,s),y=n.contentNameScopesList.pushAttributed(m,t),b=d.getContentName(o,s),v=y.pushAttributed(b,t),C=n.push(d.retokenizeCapturedWithRuleId,f.start,-1,!1,null,y,v),E=t.createOnigString(o.substring(0,f.end));j5(t,E,r&&f.start===0,f.start,C,i,!1,0),F5(E);continue}const p=d.getName(o,s);if(p!==null){const y=(c.length>0?c[c.length-1].scopes:n.contentNameScopesList).pushAttributed(p,t);c.push(new G$(y,f.end))}}for(;c.length>0;)i.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var G$=class{constructor(t,e){te(this,"scopes");te(this,"endPos");this.scopes=t,this.endPos=e}};function Y$(t,e,r,n,i,a,s,o){return new X$(t,e,r,n,i,a,s,o)}function zb(t,e,r,n,i){const a=e0(e,n0),s=H5.getCompiledRuleId(r,n,i.repository);for(const o of a)t.push({debugSelector:e,matcher:o.matcher,ruleId:s,grammar:i,priority:o.priority})}function n0(t,e){if(e.length<t.length)return!1;let r=0;return t.every(n=>{for(let i=r;i<e.length;i++)if(V$(e[i],n))return r=i+1,!0;return!1})}function V$(t,e){if(!t)return!1;if(t===e)return!0;const r=e.length;return t.length>r&&t.substr(0,r)===e&&t[r]==="."}var X$=class{constructor(t,e,r,n,i,a,s,o){te(this,"_rootId");te(this,"_lastRuleId");te(this,"_ruleId2desc");te(this,"_includedGrammars");te(this,"_grammarRepository");te(this,"_grammar");te(this,"_injections");te(this,"_basicScopeAttributesProvider");te(this,"_tokenTypeMatchers");if(this._rootScopeName=t,this.balancedBracketSelectors=a,this._onigLib=o,this._basicScopeAttributesProvider=new $$(r,n),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=s,this._grammar=Hb(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const c=e0(l,n0);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:i[l]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],r=this._rootScopeName,n=t.lookup(r);if(n){const i=n.injections;if(i)for(let s in i)zb(e,s,i[s],this,n);const a=this._grammarRepository.injections(r);a&&a.forEach(s=>{const o=this.getExternalGrammar(s);if(o){const l=o.injectionSelector;l&&zb(e,l,o,this,o)}})}return e.sort((i,a)=>i.priority-a.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,r=t(e);return this._ruleId2desc[e]=r,r}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const r=this._grammarRepository.lookup(t);if(r)return this._includedGrammars[t]=Hb(r,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,r=0){const n=this._tokenize(t,e,!1,r);return{tokens:n.lineTokens.getResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}tokenizeLine2(t,e,r=0){const n=this._tokenize(t,e,!0,r);return{tokens:n.lineTokens.getBinaryResult(n.ruleStack,n.lineLength),ruleStack:n.ruleStack,stoppedEarly:n.stoppedEarly}}_tokenize(t,e,r,n){this._rootId===-1&&(this._rootId=H5.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===Qf.NULL){i=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),h=co.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),d=this.getRule(this._rootId).getName(null,null);let f;d?f=Dl.createRootAndLookUpScopeName(d,h,this):f=Dl.createRoot("unknown",h),e=new Qf(null,this._rootId,-1,-1,!1,null,f,f)}else i=!1,e.reset();t=t+`
115
+ `;const a=this.createOnigString(t),s=a.content.length,o=new Q$(r,t,this._tokenTypeMatchers,this.balancedBracketSelectors),l=j5(this,a,i,0,e,o,!0,n);return F5(a),{lineLength:s,lineTokens:o,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Hb(t,e){return t=p$(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var Dl=class ri{constructor(e,r,n){this.parent=e,this.scopePath=r,this.tokenAttributes=n}static fromExtension(e,r){let n=e,i=(e==null?void 0:e.scopePath)??null;for(const a of r)i=Md.push(i,a.scopeNames),n=new ri(n,i,a.encodedTokenAttributes);return n}static createRoot(e,r){return new ri(null,new Md(null,e),r)}static createRootAndLookUpScopeName(e,r,n){const i=n.getMetadataForScope(e),a=new Md(null,e),s=n.themeProvider.themeMatch(a),o=ri.mergeAttributes(r,i,s);return new ri(null,a,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return ri.equals(this,e)}static equals(e,r){do{if(e===r||!e&&!r)return!0;if(!e||!r||e.scopeName!==r.scopeName||e.tokenAttributes!==r.tokenAttributes)return!1;e=e.parent,r=r.parent}while(!0)}static mergeAttributes(e,r,n){let i=-1,a=0,s=0;return n!==null&&(i=n.fontStyle,a=n.foregroundId,s=n.backgroundId),co.set(e,r.languageId,r.tokenType,null,i,a,s)}pushAttributed(e,r){if(e===null)return this;if(e.indexOf(" ")===-1)return ri._pushAttributed(this,e,r);const n=e.split(/ /g);let i=this;for(const a of n)i=ri._pushAttributed(i,a,r);return i}static _pushAttributed(e,r,n){const i=n.getMetadataForScope(r),a=e.scopePath.push(r),s=n.themeProvider.themeMatch(a),o=ri.mergeAttributes(e.tokenAttributes,i,s);return new ri(e,a,o)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var i;const r=[];let n=this;for(;n&&n!==e;)r.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(((i=n.parent)==null?void 0:i.scopePath)??null)}),n=n.parent;return n===e?r.reverse():void 0}},Rn,Qf=(Rn=class{constructor(e,r,n,i,a,s,o,l){te(this,"_stackElementBrand");te(this,"_enterPos");te(this,"_anchorPos");te(this,"depth");this.parent=e,this.ruleId=r,this.beginRuleCapturedEOL=a,this.endRule=s,this.nameScopesList=o,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}equals(e){return e===null?!1:Rn._equals(this,e)}static _equals(e,r){return e===r?!0:this._structuralEquals(e,r)?Dl.equals(e.contentNameScopesList,r.contentNameScopesList):!1}static _structuralEquals(e,r){do{if(e===r||!e&&!r)return!0;if(!e||!r||e.depth!==r.depth||e.ruleId!==r.ruleId||e.endRule!==r.endRule)return!1;e=e.parent,r=r.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){Rn._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,r,n,i,a,s,o){return new Rn(this,e,r,n,i,a,s,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,r){var n,i;return this.parent&&(r=this.parent._writeString(e,r)),e[r++]=`(${this.ruleId}, ${(n=this.nameScopesList)==null?void 0:n.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,r}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new Rn(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let r=this;for(;r&&r._enterPos===e._enterPos;){if(r.ruleId===e.ruleId)return!0;r=r.parent}return!1}toStateStackFrame(){var e,r,n;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((r=this.nameScopesList)==null?void 0:r.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((n=this.contentNameScopesList)==null?void 0:n.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,r){const n=Dl.fromExtension((e==null?void 0:e.nameScopesList)??null,r.nameScopesList);return new Rn(e,r.ruleId,r.enterPos??-1,r.anchorPos??-1,r.beginRuleCapturedEOL,r.endRule,n,Dl.fromExtension(n,r.contentNameScopesList))}},te(Rn,"NULL",new Rn(null,0,0,0,!1,null,null,null)),Rn),K$=class{constructor(t,e){te(this,"balancedBracketScopes");te(this,"unbalancedBracketScopes");te(this,"allowAny",!1);this.balancedBracketScopes=t.flatMap(r=>r==="*"?(this.allowAny=!0,[]):e0(r,n0).map(n=>n.matcher)),this.unbalancedBracketScopes=e.flatMap(r=>e0(r,n0).map(n=>n.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},Q$=class{constructor(t,e,r,n){te(this,"_emitBinaryTokens");te(this,"_lineText");te(this,"_tokens");te(this,"_binaryTokens");te(this,"_lastTokenEndIndex");te(this,"_tokenTypeOverrides");this.balancedBracketSelectors=n,this._emitBinaryTokens=t,this._tokenTypeOverrides=r,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){var n;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let i=(t==null?void 0:t.tokenAttributes)??0,a=!1;if((n=this.balancedBracketSelectors)!=null&&n.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const s=(t==null?void 0:t.getScopeNames())??[];for(const o of this._tokenTypeOverrides)o.matcher(s)&&(i=co.set(i,0,o.type,null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(s))}if(a&&(i=co.set(i,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=e;return}const r=(t==null?void 0:t.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:r}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const r=new Uint32Array(this._binaryTokens.length);for(let n=0,i=this._binaryTokens.length;n<i;n++)r[n]=this._binaryTokens[n];return r}},Z$=class{constructor(t,e){te(this,"_grammars",new Map);te(this,"_rawGrammars",new Map);te(this,"_injectionGrammars",new Map);te(this,"_theme");this._onigLib=e,this._theme=t}dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,r,n,i){if(!this._grammars.has(t)){let a=this._rawGrammars.get(t);if(!a)return null;this._grammars.set(t,Y$(t,a,e,r,n,i,this,this._onigLib))}return this._grammars.get(t)}},J$=class{constructor(e){te(this,"_options");te(this,"_syncRegistry");te(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new Z$(Ju.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,r){this._syncRegistry.setTheme(Ju.createFromRawTheme(e,r))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,r,n){return this.loadGrammarWithConfiguration(e,r,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,r,n){return this._loadGrammar(e,r,n.embeddedLanguages,n.tokenTypes,new K$(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,r,n,i,a){const s=new A$(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(o=>this._loadSingleGrammar(o.scopeName)),s.processQueue();return this._grammarForScopeName(e,r,n,i,a)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const r=this._options.loadGrammar(e);if(r){const n=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(r,n)}}addGrammar(e,r=[],n=0,i=null){return this._syncRegistry.addGrammar(e,r),this._grammarForScopeName(e.scopeName,n,i)}_grammarForScopeName(e,r=0,n=null,i=null,a=null){return this._syncRegistry.grammarForScopeName(e,r,n,i,a)}},Zf=Qf.NULL;const ez=/["&'<>`]/g,tz=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rz=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,nz=/[|\\{}()[\]^$+*?.]/g,qb=new WeakMap;function iz(t,e){if(t=t.replace(e.subset?az(e.subset):ez,n),e.subset||e.escapeOnly)return t;return t.replace(tz,r).replace(rz,n);function r(i,a,s){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,s.charCodeAt(a+2),e)}function n(i,a,s){return e.format(i.charCodeAt(0),s.charCodeAt(a+1),e)}}function az(t){let e=qb.get(t);return e||(e=sz(t),qb.set(t,e)),e}function sz(t){const e=[];let r=-1;for(;++r<t.length;)e.push(t[r].replace(nz,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const oz=/[\dA-Fa-f]/;function lz(t,e,r){const n="&#x"+t.toString(16).toUpperCase();return r&&e&&!oz.test(String.fromCharCode(e))?n:n+";"}const cz=/\d/;function uz(t,e,r){const n="&#"+String(t);return r&&e&&!cz.test(String.fromCharCode(e))?n:n+";"}const hz=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Rd={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},dz=["cent","copy","divide","gt","lt","not","para","times"],W5={}.hasOwnProperty,Jf={};let Yc;for(Yc in Rd)W5.call(Rd,Yc)&&(Jf[Rd[Yc]]=Yc);const fz=/[^\dA-Za-z]/;function pz(t,e,r,n){const i=String.fromCharCode(t);if(W5.call(Jf,i)){const a=Jf[i],s="&"+a;return r&&hz.includes(a)&&!dz.includes(a)&&(!n||e&&e!==61&&fz.test(String.fromCharCode(e)))?s:s+";"}return""}function mz(t,e,r){let n=lz(t,e,r.omitOptionalSemicolons),i;if((r.useNamedReferences||r.useShortestReferences)&&(i=pz(t,e,r.omitOptionalSemicolons,r.attribute)),(r.useShortestReferences||!i)&&r.useShortestReferences){const a=uz(t,e,r.omitOptionalSemicolons);a.length<n.length&&(n=a)}return i&&(!r.useShortestReferences||i.length<n.length)?i:n}function Us(t,e){return iz(t,Object.assign({format:mz},e))}const gz=/^>|^->|<!--|-->|--!>|<!-$/g,bz=[">"],yz=["<",">"];function xz(t,e,r,n){return n.settings.bogusComments?"<?"+Us(t.value,Object.assign({},n.settings.characterReferences,{subset:bz}))+">":"<!--"+t.value.replace(gz,i)+"-->";function i(a){return Us(a,Object.assign({},n.settings.characterReferences,{subset:yz}))}}function vz(t,e,r,n){return"<!"+(n.settings.upperDoctype?"DOCTYPE":"doctype")+(n.settings.tightDoctype?"":" ")+"html>"}const mr=Y5(1),G5=Y5(-1),kz=[];function Y5(t){return e;function e(r,n,i){const a=r?r.children:kz;let s=(n||0)+t,o=a[s];if(!i)for(;o&&oh(o);)s+=t,o=a[s];return o}}const wz={}.hasOwnProperty;function V5(t){return e;function e(r,n,i){return wz.call(t,r.tagName)&&t[r.tagName](r,n,i)}}const s1=V5({body:Cz,caption:Bd,colgroup:Bd,dd:Az,dt:Ez,head:Bd,html:Tz,li:_z,optgroup:Nz,option:Lz,p:Sz,rp:jb,rt:jb,tbody:Iz,td:Ub,tfoot:Rz,th:Ub,thead:Mz,tr:Bz});function Bd(t,e,r){const n=mr(r,e,!0);return!n||n.type!=="comment"&&!(n.type==="text"&&oh(n.value.charAt(0)))}function Tz(t,e,r){const n=mr(r,e);return!n||n.type!=="comment"}function Cz(t,e,r){const n=mr(r,e);return!n||n.type!=="comment"}function Sz(t,e,r){const n=mr(r,e);return n?n.type==="element"&&(n.tagName==="address"||n.tagName==="article"||n.tagName==="aside"||n.tagName==="blockquote"||n.tagName==="details"||n.tagName==="div"||n.tagName==="dl"||n.tagName==="fieldset"||n.tagName==="figcaption"||n.tagName==="figure"||n.tagName==="footer"||n.tagName==="form"||n.tagName==="h1"||n.tagName==="h2"||n.tagName==="h3"||n.tagName==="h4"||n.tagName==="h5"||n.tagName==="h6"||n.tagName==="header"||n.tagName==="hgroup"||n.tagName==="hr"||n.tagName==="main"||n.tagName==="menu"||n.tagName==="nav"||n.tagName==="ol"||n.tagName==="p"||n.tagName==="pre"||n.tagName==="section"||n.tagName==="table"||n.tagName==="ul"):!r||!(r.type==="element"&&(r.tagName==="a"||r.tagName==="audio"||r.tagName==="del"||r.tagName==="ins"||r.tagName==="map"||r.tagName==="noscript"||r.tagName==="video"))}function _z(t,e,r){const n=mr(r,e);return!n||n.type==="element"&&n.tagName==="li"}function Ez(t,e,r){const n=mr(r,e);return!!(n&&n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd"))}function Az(t,e,r){const n=mr(r,e);return!n||n.type==="element"&&(n.tagName==="dt"||n.tagName==="dd")}function jb(t,e,r){const n=mr(r,e);return!n||n.type==="element"&&(n.tagName==="rp"||n.tagName==="rt")}function Nz(t,e,r){const n=mr(r,e);return!n||n.type==="element"&&n.tagName==="optgroup"}function Lz(t,e,r){const n=mr(r,e);return!n||n.type==="element"&&(n.tagName==="option"||n.tagName==="optgroup")}function Mz(t,e,r){const n=mr(r,e);return!!(n&&n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot"))}function Iz(t,e,r){const n=mr(r,e);return!n||n.type==="element"&&(n.tagName==="tbody"||n.tagName==="tfoot")}function Rz(t,e,r){return!mr(r,e)}function Bz(t,e,r){const n=mr(r,e);return!n||n.type==="element"&&n.tagName==="tr"}function Ub(t,e,r){const n=mr(r,e);return!n||n.type==="element"&&(n.tagName==="td"||n.tagName==="th")}const Dz=V5({body:Fz,colgroup:$z,head:Pz,html:Oz,tbody:zz});function Oz(t){const e=mr(t,-1);return!e||e.type!=="comment"}function Pz(t){const e=new Set;for(const n of t.children)if(n.type==="element"&&(n.tagName==="base"||n.tagName==="title")){if(e.has(n.tagName))return!1;e.add(n.tagName)}const r=t.children[0];return!r||r.type==="element"}function Fz(t){const e=mr(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&oh(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function $z(t,e,r){const n=G5(r,e),i=mr(t,-1,!0);return r&&n&&n.type==="element"&&n.tagName==="colgroup"&&s1(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function zz(t,e,r){const n=G5(r,e),i=mr(t,-1);return r&&n&&n.type==="element"&&(n.tagName==="thead"||n.tagName==="tbody")&&s1(n,r.children.indexOf(n),r)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Vc={name:[[`
116
+ \f\r &/=>`.split(""),`
117
+ \f\r "&'/=>\``.split("")],[`\0
118
+ \f\r "&'/<=>`.split(""),`\0
119
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
120
+ \f\r &>`.split(""),`\0
121
+ \f\r "&'<=>\``.split("")],[`\0
122
+ \f\r "&'<=>\``.split(""),`\0
123
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function Hz(t,e,r,n){const i=n.schema,a=i.space==="svg"?!1:n.settings.omitOptionalTags;let s=i.space==="svg"?n.settings.closeEmptyElements:n.settings.voids.includes(t.tagName.toLowerCase());const o=[];let l;i.space==="html"&&t.tagName==="svg"&&(n.schema=yi);const c=qz(n,t.properties),u=n.all(i.space==="html"&&t.tagName==="template"?t.content:t);return n.schema=i,u&&(s=!1),(c||!a||!Dz(t,e,r))&&(o.push("<",t.tagName,c?" "+c:""),s&&(i.space==="svg"||n.settings.closeSelfClosing)&&(l=c.charAt(c.length-1),(!n.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(u),!s&&(!a||!s1(t,e,r))&&o.push("</"+t.tagName+">"),o.join("")}function qz(t,e){const r=[];let n=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const a=jz(t,i,e[i]);a&&r.push(a)}}for(;++n<r.length;){const a=t.settings.tightAttributes?r[n].charAt(r[n].length-1):void 0;n!==r.length-1&&a!=='"'&&a!=="'"&&(r[n]+=" ")}return r.join("")}function jz(t,e,r){const n=bc(t.schema,e),i=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,a=t.settings.allowDangerousCharacters?0:1;let s=t.quote,o;if(n.overloadedBoolean&&(r===n.attribute||r==="")?r=!0:(n.boolean||n.overloadedBoolean)&&(typeof r!="string"||r===n.attribute||r==="")&&(r=!!r),r==null||r===!1||typeof r=="number"&&Number.isNaN(r))return"";const l=Us(n.attribute,Object.assign({},t.settings.characterReferences,{subset:Vc.name[i][a]}));return r===!0||(r=Array.isArray(r)?(n.commaSeparated?Cm:Sm)(r,{padLeft:!t.settings.tightCommaSeparatedLists}):String(r),t.settings.collapseEmptyAttributes&&!r)?l:(t.settings.preferUnquoted&&(o=Us(r,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Vc.unquoted[i][a]}))),o!==r&&(t.settings.quoteSmart&&Wu(r,s)>Wu(r,t.alternative)&&(s=t.alternative),o=s+Us(r,Object.assign({},t.settings.characterReferences,{subset:(s==="'"?Vc.single:Vc.double)[i][a],attribute:!0}))+s),l+(o&&"="+o))}const Uz=["<","&"];function X5(t,e,r,n){return r&&r.type==="element"&&(r.tagName==="script"||r.tagName==="style")?t.value:Us(t.value,Object.assign({},n.settings.characterReferences,{subset:Uz}))}function Wz(t,e,r,n){return n.settings.allowDangerousHtml?t.value:X5(t,e,r,n)}function Gz(t,e,r,n){return n.all(t)}const Yz=Em("type",{invalid:Vz,unknown:Xz,handlers:{comment:xz,doctype:vz,element:Hz,raw:Wz,root:Gz,text:X5}});function Vz(t){throw new Error("Expected node, not `"+t+"`")}function Xz(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const Kz={},Qz={},Zz=[];function Jz(t,e){const r=e||Kz,n=r.quote||'"',i=n==='"'?"'":'"';if(n!=='"'&&n!=="'")throw new Error("Invalid quote `"+n+"`, expected `'` or `\"`");return{one:eH,all:tH,settings:{omitOptionalTags:r.omitOptionalTags||!1,allowParseErrors:r.allowParseErrors||!1,allowDangerousCharacters:r.allowDangerousCharacters||!1,quoteSmart:r.quoteSmart||!1,preferUnquoted:r.preferUnquoted||!1,tightAttributes:r.tightAttributes||!1,upperDoctype:r.upperDoctype||!1,tightDoctype:r.tightDoctype||!1,bogusComments:r.bogusComments||!1,tightCommaSeparatedLists:r.tightCommaSeparatedLists||!1,tightSelfClosing:r.tightSelfClosing||!1,collapseEmptyAttributes:r.collapseEmptyAttributes||!1,allowDangerousHtml:r.allowDangerousHtml||!1,voids:r.voids||W4,characterReferences:r.characterReferences||Qz,closeSelfClosing:r.closeSelfClosing||!1,closeEmptyElements:r.closeEmptyElements||!1},schema:r.space==="svg"?yi:wo,quote:n,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function eH(t,e,r){return Yz(t,e,r,this)}function tH(t){const e=[],r=t&&t.children||Zz;let n=-1;for(;++n<r.length;)e[n]=this.one(r[n],n,t);return e.join("")}function i0(t,e){const r=typeof t=="string"?{}:{...t.colorReplacements},n=typeof t=="string"?t:t.name;for(const[i,a]of Object.entries((e==null?void 0:e.colorReplacements)||{}))typeof a=="string"?r[i]=a:i===n&&Object.assign(r,a);return r}function ba(t,e){return t&&((e==null?void 0:e[t==null?void 0:t.toLowerCase()])||t)}function rH(t){return Array.isArray(t)?t:[t]}async function K5(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function o1(t){return!t||["plaintext","txt","text","plain"].includes(t)}function Q5(t){return t==="ansi"||o1(t)}function l1(t){return t==="none"}function Z5(t){return l1(t)}function J5(t,e){var n;if(!e)return t;t.properties||(t.properties={}),(n=t.properties).class||(n.class=[]),typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const r=Array.isArray(e)?e:e.split(/\s+/g);for(const i of r)i&&!t.properties.class.includes(i)&&t.properties.class.push(i);return t}function ph(t,e=!1){var a;if(t.length===0)return[["",0]];const r=t.split(/(\r?\n)/g);let n=0;const i=[];for(let s=0;s<r.length;s+=2){const o=e?r[s]+(r[s+1]||""):r[s];i.push([o,n]),n+=r[s].length,n+=((a=r[s+1])==null?void 0:a.length)||0}return i}function nH(t){const e=ph(t,!0).map(([i])=>i);function r(i){if(i===t.length)return{line:e.length-1,character:e[e.length-1].length};let a=i,s=0;for(const o of e){if(a<o.length)break;a-=o.length,s++}return{line:s,character:a}}function n(i,a){let s=0;for(let o=0;o<i;o++)s+=e[o].length;return s+=a,s}return{lines:e,indexToPos:r,posToIndex:n}}const c1="light-dark()",iH=["color","background-color"];function aH(t,e){let r=0;const n=[];for(const i of e)i>r&&n.push({...t,content:t.content.slice(r,i),offset:t.offset+r}),r=i;return r<t.content.length&&n.push({...t,content:t.content.slice(r),offset:t.offset+r}),n}function sH(t,e){const r=Array.from(e instanceof Set?e:new Set(e)).sort((n,i)=>n-i);return r.length?t.map(n=>n.flatMap(i=>{const a=r.filter(s=>i.offset<s&&s<i.offset+i.content.length).map(s=>s-i.offset).sort((s,o)=>s-o);return a.length?aH(i,a):i})):t}function oH(t,e,r,n,i="css-vars"){const a={content:t.content,explanation:t.explanation,offset:t.offset},s=e.map(u=>a0(t.variants[u])),o=new Set(s.flatMap(u=>Object.keys(u))),l={},c=(u,h)=>{const d=h==="color"?"":h==="background-color"?"-bg":`-${h}`;return r+e[u]+(h==="color"?"":d)};return s.forEach((u,h)=>{for(const d of o){const f=u[d]||"inherit";if(h===0&&n&&iH.includes(d))if(n===c1&&s.length>1){const p=e.findIndex(v=>v==="light"),m=e.findIndex(v=>v==="dark");if(p===-1||m===-1)throw new sr('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const y=s[p][d]||"inherit",b=s[m][d]||"inherit";l[d]=`light-dark(${y}, ${b})`,i==="css-vars"&&(l[c(h,d)]=f)}else l[d]=f;else i==="css-vars"&&(l[c(h,d)]=f)}}),a.htmlStyle=l,a}function a0(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&Ir.Italic&&(e["font-style"]="italic"),t.fontStyle&Ir.Bold&&(e["font-weight"]="bold");const r=[];t.fontStyle&Ir.Underline&&r.push("underline"),t.fontStyle&Ir.Strikethrough&&r.push("line-through"),r.length&&(e["text-decoration"]=r.join(" "))}return e}function ep(t){return typeof t=="string"?t:Object.entries(t).map(([e,r])=>`${e}:${r}`).join(";")}const ev=new WeakMap;function mh(t,e){ev.set(t,e)}function Ql(t){return ev.get(t)}class No{constructor(...e){te(this,"_stacks",{});te(this,"lang");if(e.length===2){const[r,n]=e;this.lang=n,this._stacks=r}else{const[r,n,i]=e;this.lang=n,this._stacks={[i]:r}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,r){return new No(Object.fromEntries(rH(r).map(n=>[n,Zf])),e)}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return lH(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function lH(t){const e=[],r=new Set;function n(i){var s;if(r.has(i))return;r.add(i);const a=(s=i==null?void 0:i.nameScopesList)==null?void 0:s.scopeName;a&&e.push(a),i.parent&&n(i.parent)}return n(t),e}function cH(t,e){if(!(t instanceof No))throw new sr("Invalid grammar state");return t.getInternalStack(e)}function uH(){const t=new WeakMap;function e(r){if(!t.has(r.meta)){let n=function(s){if(typeof s=="number"){if(s<0||s>r.source.length)throw new sr(`Invalid decoration offset: ${s}. Code length: ${r.source.length}`);return{...i.indexToPos(s),offset:s}}else{const o=i.lines[s.line];if(o===void 0)throw new sr(`Invalid decoration position ${JSON.stringify(s)}. Lines length: ${i.lines.length}`);let l=s.character;if(l<0&&(l=o.length+l),l<0||l>o.length)throw new sr(`Invalid decoration position ${JSON.stringify(s)}. Line ${s.line} length: ${o.length}`);return{...s,character:l,offset:i.posToIndex(s.line,l)}}};const i=nH(r.source),a=(r.options.decorations||[]).map(s=>({...s,start:n(s.start),end:n(s.end)}));hH(a),t.set(r.meta,{decorations:a,converter:i,source:r.source})}return t.get(r.meta)}return{name:"shiki:decorations",tokens(r){var s;if(!((s=this.options.decorations)!=null&&s.length))return;const i=e(this).decorations.flatMap(o=>[o.start.offset,o.end.offset]);return sH(r,i)},code(r){var u;if(!((u=this.options.decorations)!=null&&u.length))return;const n=e(this),i=Array.from(r.children).filter(h=>h.type==="element"&&h.tagName==="span");if(i.length!==n.converter.lines.length)throw new sr(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function a(h,d,f,p){const m=i[h];let y="",b=-1,v=-1;if(d===0&&(b=0),f===0&&(v=0),f===Number.POSITIVE_INFINITY&&(v=m.children.length),b===-1||v===-1)for(let E=0;E<m.children.length;E++)y+=tv(m.children[E]),b===-1&&y.length===d&&(b=E+1),v===-1&&y.length===f&&(v=E+1);if(b===-1)throw new sr(`Failed to find start index for decoration ${JSON.stringify(p.start)}`);if(v===-1)throw new sr(`Failed to find end index for decoration ${JSON.stringify(p.end)}`);const C=m.children.slice(b,v);if(!p.alwaysWrap&&C.length===m.children.length)o(m,p,"line");else if(!p.alwaysWrap&&C.length===1&&C[0].type==="element")o(C[0],p,"token");else{const E={type:"element",tagName:"span",properties:{},children:C};o(E,p,"wrapper"),m.children.splice(b,C.length,E)}}function s(h,d){i[h]=o(i[h],d,"line")}function o(h,d,f){var y;const p=d.properties||{},m=d.transform||(b=>b);return h.tagName=d.tagName||"span",h.properties={...h.properties,...p,class:h.properties.class},(y=d.properties)!=null&&y.class&&J5(h,d.properties.class),h=m(h,f)||h,h}const l=[],c=n.decorations.sort((h,d)=>d.start.offset-h.start.offset||h.end.offset-d.end.offset);for(const h of c){const{start:d,end:f}=h;if(d.line===f.line)a(d.line,d.character,f.character,h);else if(d.line<f.line){a(d.line,d.character,Number.POSITIVE_INFINITY,h);for(let p=d.line+1;p<f.line;p++)l.unshift(()=>s(p,h));a(f.line,0,f.character,h)}}l.forEach(h=>h())}}}function hH(t){for(let e=0;e<t.length;e++){const r=t[e];if(r.start.offset>r.end.offset)throw new sr(`Invalid decoration range: ${JSON.stringify(r.start)} - ${JSON.stringify(r.end)}`);for(let n=e+1;n<t.length;n++){const i=t[n],a=r.start.offset<=i.start.offset&&i.start.offset<r.end.offset,s=r.start.offset<i.end.offset&&i.end.offset<=r.end.offset,o=i.start.offset<=r.start.offset&&r.start.offset<i.end.offset,l=i.start.offset<r.end.offset&&r.end.offset<=i.end.offset;if(a||s||o||l){if(a&&s||o&&l||o&&r.start.offset===r.end.offset||s&&i.start.offset===i.end.offset)continue;throw new sr(`Decorations ${JSON.stringify(r.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function tv(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(tv).join(""):""}const dH=[uH()];function s0(t){const e=fH(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...dH]}function fH(t){const e=[],r=[],n=[];for(const i of t)switch(i.enforce){case"pre":e.push(i);break;case"post":r.push(i);break;default:n.push(i)}return{pre:e,post:r,normal:n}}var Ga=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Dd={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function pH(t,e){const r=t.indexOf("\x1B",e);if(r!==-1&&t[r+1]==="["){const n=t.indexOf("m",r);if(n!==-1)return{sequence:t.substring(r+2,n).split(";"),startPosition:r,position:n+1}}return{position:t.length}}function Wb(t){const e=t.shift();if(e==="2"){const r=t.splice(0,3).map(n=>Number.parseInt(n));return r.length!==3||r.some(n=>Number.isNaN(n))?void 0:{type:"rgb",rgb:r}}else if(e==="5"){const r=t.shift();if(r)return{type:"table",index:Number(r)}}}function mH(t){const e=[];for(;t.length>0;){const r=t.shift();if(!r)continue;const n=Number.parseInt(r);if(!Number.isNaN(n))if(n===0)e.push({type:"resetAll"});else if(n<=9)Dd[n]&&e.push({type:"setDecoration",value:Dd[n]});else if(n<=29){const i=Dd[n-20];i&&(e.push({type:"resetDecoration",value:i}),i==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(n<=37)e.push({type:"setForegroundColor",value:{type:"named",name:Ga[n-30]}});else if(n===38){const i=Wb(t);i&&e.push({type:"setForegroundColor",value:i})}else if(n===39)e.push({type:"resetForegroundColor"});else if(n<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:Ga[n-40]}});else if(n===48){const i=Wb(t);i&&e.push({type:"setBackgroundColor",value:i})}else n===49?e.push({type:"resetBackgroundColor"}):n===53?e.push({type:"setDecoration",value:"overline"}):n===55?e.push({type:"resetDecoration",value:"overline"}):n>=90&&n<=97?e.push({type:"setForegroundColor",value:{type:"named",name:Ga[n-90+8]}}):n>=100&&n<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:Ga[n-100+8]}})}return e}function gH(){let t=null,e=null,r=new Set;return{parse(n){const i=[];let a=0;do{const s=pH(n,a),o=s.sequence?n.substring(a,s.startPosition):n.substring(a);if(o.length>0&&i.push({value:o,foreground:t,background:e,decorations:new Set(r)}),s.sequence){const l=mH(s.sequence);for(const c of l)c.type==="resetAll"?(t=null,e=null,r.clear()):c.type==="resetForegroundColor"?t=null:c.type==="resetBackgroundColor"?e=null:c.type==="resetDecoration"&&r.delete(c.value);for(const c of l)c.type==="setForegroundColor"?t=c.value:c.type==="setBackgroundColor"?e=c.value:c.type==="setDecoration"&&r.add(c.value)}a=s.position}while(a<n.length);return i}}}var bH={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function yH(t=bH){function e(o){return t[o]}function r(o){return`#${o.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let n;function i(){if(n)return n;n=[];for(let c=0;c<Ga.length;c++)n.push(e(Ga[c]));let o=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let h=0;h<6;h++)n.push(r([o[c],o[u],o[h]]));let l=8;for(let c=0;c<24;c++,l+=10)n.push(r([l,l,l]));return n}function a(o){return i()[o]}function s(o){switch(o.type){case"named":return e(o.name);case"rgb":return r(o.rgb);case"table":return a(o.index)}}return{value:s}}const xH={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function vH(t,e,r){const n=i0(t,r),i=ph(e),a=Object.fromEntries(Ga.map(l=>{var h;const c=`terminal.ansi${l[0].toUpperCase()}${l.substring(1)}`,u=(h=t.colors)==null?void 0:h[c];return[l,u||xH[l]]})),s=yH(a),o=gH();return i.map(l=>o.parse(l[0]).map(c=>{let u,h;c.decorations.has("reverse")?(u=c.background?s.value(c.background):t.bg,h=c.foreground?s.value(c.foreground):t.fg):(u=c.foreground?s.value(c.foreground):t.fg,h=c.background?s.value(c.background):void 0),u=ba(u,n),h=ba(h,n),c.decorations.has("dim")&&(u=kH(u));let d=Ir.None;return c.decorations.has("bold")&&(d|=Ir.Bold),c.decorations.has("italic")&&(d|=Ir.Italic),c.decorations.has("underline")&&(d|=Ir.Underline),c.decorations.has("strikethrough")&&(d|=Ir.Strikethrough),{content:c.value,offset:l[1],color:u,bgColor:h,fontStyle:d}}))}function kH(t){const e=t.match(/#([0-9a-f]{3,8})/i);if(e){const n=e[1];if(n.length===8){const i=Math.round(Number.parseInt(n.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${n.slice(0,6)}${i}`}else{if(n.length===6)return`#${n}80`;if(n.length===4){const i=n[0],a=n[1],s=n[2],o=n[3],l=Math.round(Number.parseInt(`${o}${o}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${a}${a}${s}${s}${l}`}else if(n.length===3){const i=n[0],a=n[1],s=n[2];return`#${i}${i}${a}${a}${s}${s}80`}}}const r=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return r?`var(${r[1]}-dim)`:t}function u1(t,e,r={}){const{theme:n=t.getLoadedThemes()[0]}=r,i=t.resolveLangAlias(r.lang||"text");if(o1(i)||l1(n))return ph(e).map(l=>[{content:l[0],offset:l[1]}]);const{theme:a,colorMap:s}=t.setTheme(n);if(i==="ansi")return vH(a,e,r);const o=t.getLanguage(r.lang||"text");if(r.grammarState){if(r.grammarState.lang!==o.name)throw new sr(`Grammar state language "${r.grammarState.lang}" does not match highlight language "${o.name}"`);if(!r.grammarState.themes.includes(a.name))throw new sr(`Grammar state themes "${r.grammarState.themes}" do not contain highlight theme "${a.name}"`)}return TH(e,o,a,s,r)}function wH(...t){if(t.length===2)return Ql(t[1]);const[e,r,n={}]=t,{lang:i="text",theme:a=e.getLoadedThemes()[0]}=n;if(o1(i)||l1(a))throw new sr("Plain language does not have grammar state");if(i==="ansi")throw new sr("ANSI language does not have grammar state");const{theme:s,colorMap:o}=e.setTheme(a),l=e.getLanguage(i);return new No(h1(r,l,s,o,n).stateStack,l.name,s.name)}function TH(t,e,r,n,i){const a=h1(t,e,r,n,i),s=new No(a.stateStack,e.name,r.name);return mh(a.tokens,s),a.tokens}function h1(t,e,r,n,i){const a=i0(r,i),{tokenizeMaxLineLength:s=0,tokenizeTimeLimit:o=500}=i,l=ph(t);let c=i.grammarState?cH(i.grammarState,r.name)??Zf:i.grammarContextCode!=null?h1(i.grammarContextCode,e,r,n,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:Zf,u=[];const h=[];for(let d=0,f=l.length;d<f;d++){const[p,m]=l[d];if(p===""){u=[],h.push([]);continue}if(s>0&&p.length>=s){u=[],h.push([{content:p,offset:m,color:"",fontStyle:0}]);continue}let y,b,v;i.includeExplanation&&(y=e.tokenizeLine(p,c,o),b=y.tokens,v=0);const C=e.tokenizeLine2(p,c,o),E=C.tokens.length/2;for(let _=0;_<E;_++){const k=C.tokens[2*_],N=_+1<E?C.tokens[2*_+2]:p.length;if(k===N)continue;const D=C.tokens[2*_+1],$=ba(n[co.getForeground(D)],a),R=co.getFontStyle(D),P={content:p.substring(k,N),offset:m+k,color:$,fontStyle:R};if(i.includeExplanation){const G=[];if(i.includeExplanation!=="scopeName")for(const W of r.settings){let U;switch(typeof W.scope){case"string":U=W.scope.split(/,/).map(j=>j.trim());break;case"object":U=W.scope;break;default:continue}G.push({settings:W,selectors:U.map(j=>j.split(/ /))})}P.explanation=[];let ee=0;for(;k+ee<N;){const W=b[v],U=p.substring(W.startIndex,W.endIndex);ee+=U.length,P.explanation.push({content:U,scopes:i.includeExplanation==="scopeName"?CH(W.scopes):SH(G,W.scopes)}),v+=1}}u.push(P)}h.push(u),u=[],c=C.ruleStack}return{tokens:h,stateStack:c}}function CH(t){return t.map(e=>({scopeName:e}))}function SH(t,e){const r=[];for(let n=0,i=e.length;n<i;n++){const a=e[n];r[n]={scopeName:a,themeMatches:EH(t,a,e.slice(0,n))}}return r}function Gb(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function _H(t,e,r){if(!Gb(t[t.length-1],e))return!1;let n=t.length-2,i=r.length-1;for(;n>=0&&i>=0;)Gb(t[n],r[i])&&(n-=1),i-=1;return n===-1}function EH(t,e,r){const n=[];for(const{selectors:i,settings:a}of t)for(const s of i)if(_H(s,e,r)){n.push(a);break}return n}function rv(t,e,r){const n=Object.entries(r.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),i=n.map(l=>{const c=u1(t,e,{...r,theme:l.theme}),u=Ql(c),h=typeof l.theme=="string"?l.theme:l.theme.name;return{tokens:c,state:u,theme:h}}),a=AH(...i.map(l=>l.tokens)),s=a[0].map((l,c)=>l.map((u,h)=>{const d={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in r&&r.includeExplanation&&(d.explanation=u.explanation),a.forEach((f,p)=>{const{content:m,explanation:y,offset:b,...v}=f[c][h];d.variants[n[p].color]=v}),d})),o=i[0].state?new No(Object.fromEntries(i.map(l=>{var c;return[l.theme,(c=l.state)==null?void 0:c.getInternalStack(l.theme)]})),i[0].state.lang):void 0;return o&&mh(s,o),s}function AH(...t){const e=t.map(()=>[]),r=t.length;for(let n=0;n<t[0].length;n++){const i=t.map(l=>l[n]),a=e.map(()=>[]);e.forEach((l,c)=>l.push(a[c]));const s=i.map(()=>0),o=i.map(l=>l[0]);for(;o.every(l=>l);){const l=Math.min(...o.map(c=>c.content.length));for(let c=0;c<r;c++){const u=o[c];u.content.length===l?(a[c].push(u),s[c]+=1,o[c]=i[c][s[c]]):(a[c].push({...u,content:u.content.slice(0,l)}),o[c]={...u,content:u.content.slice(l),offset:u.offset+l})}}}return e}function o0(t,e,r){let n,i,a,s,o,l;if("themes"in r){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:h="css-vars"}=r,d=Object.entries(r.themes).filter(b=>b[1]).map(b=>({color:b[0],theme:b[1]})).sort((b,v)=>b.color===c?-1:v.color===c?1:0);if(d.length===0)throw new sr("`themes` option must not be empty");const f=rv(t,e,r);if(l=Ql(f),c&&c1!==c&&!d.find(b=>b.color===c))throw new sr(`\`themes\` option must contain the defaultColor key \`${c}\``);const p=d.map(b=>t.getTheme(b.theme)),m=d.map(b=>b.color);a=f.map(b=>b.map(v=>oH(v,m,u,c,h))),l&&mh(a,l);const y=d.map(b=>i0(b.theme,r));i=Yb(d,p,y,u,c,"fg",h),n=Yb(d,p,y,u,c,"bg",h),s=`shiki-themes ${p.map(b=>b.name).join(" ")}`,o=c?void 0:[i,n].join(";")}else if("theme"in r){const c=i0(r.theme,r);a=u1(t,e,r);const u=t.getTheme(r.theme);n=ba(u.bg,c),i=ba(u.fg,c),s=u.name,l=Ql(a)}else throw new sr("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:n,themeName:s,rootStyle:o,grammarState:l}}function Yb(t,e,r,n,i,a,s){return t.map((o,l)=>{const c=ba(e[l][a],r[l])||"inherit",u=`${n+o.color}${a==="bg"?"-bg":""}:${c}`;if(l===0&&i){if(i===c1&&t.length>1){const h=t.findIndex(m=>m.color==="light"),d=t.findIndex(m=>m.color==="dark");if(h===-1||d===-1)throw new sr('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const f=ba(e[h][a],r[h])||"inherit",p=ba(e[d][a],r[d])||"inherit";return`light-dark(${f}, ${p});${u}`}return c}return s==="css-vars"?u:null}).filter(o=>!!o).join(";")}function l0(t,e,r,n={meta:{},options:r,codeToHast:(i,a)=>l0(t,i,a),codeToTokens:(i,a)=>o0(t,i,a)}){var p,m;let i=e;for(const y of s0(r))i=((p=y.preprocess)==null?void 0:p.call(n,i,r))||i;let{tokens:a,fg:s,bg:o,themeName:l,rootStyle:c,grammarState:u}=o0(t,i,r);const{mergeWhitespaces:h=!0,mergeSameStyleTokens:d=!1}=r;h===!0?a=LH(a):h==="never"&&(a=MH(a)),d&&(a=IH(a));const f={...n,get source(){return i}};for(const y of s0(r))a=((m=y.tokens)==null?void 0:m.call(f,a))||a;return NH(a,{...r,fg:s,bg:o,themeName:l,rootStyle:r.rootStyle===!1?!1:r.rootStyle??c},f,u)}function NH(t,e,r,n=Ql(t)){var m,y,b,v;const i=s0(e),a=[],s={type:"root",children:[]},{structure:o="classic",tabindex:l="0"}=e,c={class:`shiki ${e.themeName||""}`};e.rootStyle!==!1&&(e.rootStyle!=null?c.style=e.rootStyle:c.style=`background-color:${e.bg};color:${e.fg}`),l!==!1&&l!=null&&(c.tabindex=l.toString());for(const[C,E]of Object.entries(e.meta||{}))C.startsWith("_")||(c[C]=E);let u={type:"element",tagName:"pre",properties:c,children:[],data:e.data},h={type:"element",tagName:"code",properties:{},children:a};const d=[],f={...r,structure:o,addClassToHast:J5,get source(){return r.source},get tokens(){return t},get options(){return e},get root(){return s},get pre(){return u},get code(){return h},get lines(){return d}};if(t.forEach((C,E)=>{var N,D;E&&(o==="inline"?s.children.push({type:"element",tagName:"br",properties:{},children:[]}):o==="classic"&&a.push({type:"text",value:`
124
+ `}));let _={type:"element",tagName:"span",properties:{class:"line"},children:[]},k=0;for(const $ of C){let R={type:"element",tagName:"span",properties:{...$.htmlAttrs},children:[{type:"text",value:$.content}]};const P=ep($.htmlStyle||a0($));P&&(R.properties.style=P);for(const G of i)R=((N=G==null?void 0:G.span)==null?void 0:N.call(f,R,E+1,k,_,$))||R;o==="inline"?s.children.push(R):o==="classic"&&_.children.push(R),k+=$.content.length}if(o==="classic"){for(const $ of i)_=((D=$==null?void 0:$.line)==null?void 0:D.call(f,_,E+1))||_;d.push(_),a.push(_)}else o==="inline"&&d.push(_)}),o==="classic"){for(const C of i)h=((m=C==null?void 0:C.code)==null?void 0:m.call(f,h))||h;u.children.push(h);for(const C of i)u=((y=C==null?void 0:C.pre)==null?void 0:y.call(f,u))||u;s.children.push(u)}else if(o==="inline"){const C=[];let E={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const N of s.children)N.type==="element"&&N.tagName==="br"?(C.push(E),E={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(N.type==="element"||N.type==="text")&&E.children.push(N);C.push(E);let k={type:"element",tagName:"code",properties:{},children:C};for(const N of i)k=((b=N==null?void 0:N.code)==null?void 0:b.call(f,k))||k;s.children=[];for(let N=0;N<k.children.length;N++){N>0&&s.children.push({type:"element",tagName:"br",properties:{},children:[]});const D=k.children[N];D.type==="element"&&s.children.push(...D.children)}}let p=s;for(const C of i)p=((v=C==null?void 0:C.root)==null?void 0:v.call(f,p))||p;return n&&mh(p,n),p}function LH(t){return t.map(e=>{const r=[];let n="",i;return e.forEach((a,s)=>{const l=!(a.fontStyle&&(a.fontStyle&Ir.Underline||a.fontStyle&Ir.Strikethrough));l&&a.content.match(/^\s+$/)&&e[s+1]?(i===void 0&&(i=a.offset),n+=a.content):n?(l?r.push({...a,offset:i,content:n+a.content}):r.push({content:n,offset:i},a),i=void 0,n=""):r.push(a)}),r})}function MH(t){return t.map(e=>e.flatMap(r=>{if(r.content.match(/^\s+$/))return r;const n=r.content.match(/^(\s*)(.*?)(\s*)$/);if(!n)return r;const[,i,a,s]=n;if(!i&&!s)return r;const o=[{...r,offset:r.offset+i.length,content:a}];return i&&o.unshift({content:i,offset:r.offset}),s&&o.push({content:s,offset:r.offset+i.length+a.length}),o}))}function IH(t){return t.map(e=>{const r=[];for(const n of e){if(r.length===0){r.push({...n});continue}const i=r[r.length-1],a=ep(i.htmlStyle||a0(i)),s=ep(n.htmlStyle||a0(n)),o=i.fontStyle&&(i.fontStyle&Ir.Underline||i.fontStyle&Ir.Strikethrough),l=n.fontStyle&&(n.fontStyle&Ir.Underline||n.fontStyle&Ir.Strikethrough);!o&&!l&&a===s?i.content+=n.content:r.push({...n})}return r})}const RH=Jz;function BH(t,e,r){var a;const n={meta:{},options:r,codeToHast:(s,o)=>l0(t,s,o),codeToTokens:(s,o)=>o0(t,s,o)};let i=RH(l0(t,e,r,n));for(const s of s0(r))i=((a=s.postprocess)==null?void 0:a.call(n,i,r))||i;return i}const Vb={light:"#333333",dark:"#bbbbbb"},Xb={light:"#fffffe",dark:"#1e1e1e"},Kb="__shiki_resolved";function d1(t){var o,l,c,u,h;if(t!=null&&t[Kb])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||(e.type="dark"),e.colorReplacements={...e.colorReplacements},e.settings||(e.settings=[]);let{bg:r,fg:n}=e;if(!r||!n){const d=e.settings?e.settings.find(f=>!f.name&&!f.scope):void 0;(o=d==null?void 0:d.settings)!=null&&o.foreground&&(n=d.settings.foreground),(l=d==null?void 0:d.settings)!=null&&l.background&&(r=d.settings.background),!n&&((c=e==null?void 0:e.colors)!=null&&c["editor.foreground"])&&(n=e.colors["editor.foreground"]),!r&&((u=e==null?void 0:e.colors)!=null&&u["editor.background"])&&(r=e.colors["editor.background"]),n||(n=e.type==="light"?Vb.light:Vb.dark),r||(r=e.type==="light"?Xb.light:Xb.dark),e.fg=n,e.bg=r}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let i=0;const a=new Map;function s(d){var p;if(a.has(d))return a.get(d);i+=1;const f=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(p=e.colorReplacements)!=null&&p[`#${f}`]?s(d):(a.set(d,f),f)}e.settings=e.settings.map(d=>{var y,b;const f=((y=d.settings)==null?void 0:y.foreground)&&!d.settings.foreground.startsWith("#"),p=((b=d.settings)==null?void 0:b.background)&&!d.settings.background.startsWith("#");if(!f&&!p)return d;const m={...d,settings:{...d.settings}};if(f){const v=s(d.settings.foreground);e.colorReplacements[v]=d.settings.foreground,m.settings.foreground=v}if(p){const v=s(d.settings.background);e.colorReplacements[v]=d.settings.background,m.settings.background=v}return m});for(const d of Object.keys(e.colors||{}))if((d==="editor.foreground"||d==="editor.background"||d.startsWith("terminal.ansi"))&&!((h=e.colors[d])!=null&&h.startsWith("#"))){const f=s(e.colors[d]);e.colorReplacements[f]=e.colors[d],e.colors[d]=f}return Object.defineProperty(e,Kb,{enumerable:!1,writable:!1,value:!0}),e}async function nv(t){return Array.from(new Set((await Promise.all(t.filter(e=>!Q5(e)).map(async e=>await K5(e).then(r=>Array.isArray(r)?r:[r])))).flat()))}async function iv(t){return(await Promise.all(t.map(async r=>Z5(r)?null:d1(await K5(r))))).filter(r=>!!r)}let DH=3;function OH(t,e=3){e>DH||console.trace(`[SHIKI DEPRECATE]: ${t}`)}let zs=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function av(t,e){if(!e)return t;if(e[t]){const r=new Set([t]);for(;e[t];){if(t=e[t],r.has(t))throw new zs(`Circular alias \`${Array.from(r).join(" -> ")} -> ${t}\``);r.add(t)}}return t}class PH extends J${constructor(r,n,i,a={}){super(r);te(this,"_resolvedThemes",new Map);te(this,"_resolvedGrammars",new Map);te(this,"_langMap",new Map);te(this,"_langGraph",new Map);te(this,"_textmateThemeCache",new WeakMap);te(this,"_loadedThemesCache",null);te(this,"_loadedLanguagesCache",null);this._resolver=r,this._themes=n,this._langs=i,this._alias=a,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(r){return typeof r=="string"?this._resolvedThemes.get(r):this.loadTheme(r)}loadTheme(r){const n=d1(r);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(r){let n=this._textmateThemeCache.get(r);n||(n=Ju.createFromRawTheme(r),this._textmateThemeCache.set(r,n)),this._syncRegistry.setTheme(n)}getGrammar(r){return r=av(r,this._alias),this._resolvedGrammars.get(r)}loadLanguage(r){var s,o,l,c;if(this.getGrammar(r.name))return;const n=new Set([...this._langMap.values()].filter(u=>{var h;return(h=u.embeddedLangsLazy)==null?void 0:h.includes(r.name)}));this._resolver.addLanguage(r);const i={balancedBracketSelectors:r.balancedBracketSelectors||["*"],unbalancedBracketSelectors:r.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(r.scopeName,r);const a=this.loadGrammarWithConfiguration(r.scopeName,1,i);if(a.name=r.name,this._resolvedGrammars.set(r.name,a),r.aliases&&r.aliases.forEach(u=>{this._alias[u]=r.name}),this._loadedLanguagesCache=null,n.size)for(const u of n)this._resolvedGrammars.delete(u.name),this._loadedLanguagesCache=null,(o=(s=this._syncRegistry)==null?void 0:s._injectionGrammars)==null||o.delete(u.scopeName),(c=(l=this._syncRegistry)==null?void 0:l._grammars)==null||c.delete(u.scopeName),this.loadLanguage(this._langMap.get(u.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(r){for(const a of r)this.resolveEmbeddedLanguages(a);const n=Array.from(this._langGraph.entries()),i=n.filter(([a,s])=>!s);if(i.length){const a=n.filter(([s,o])=>{if(!o)return!1;const l=o.embeddedLanguages||o.embeddedLangs;return l==null?void 0:l.some(c=>i.map(([u])=>u).includes(c))}).filter(s=>!i.includes(s));throw new zs(`Missing languages ${i.map(([s])=>`\`${s}\``).join(", ")}, required by ${a.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[a,s]of n)this._resolver.addLanguage(s);for(const[a,s]of n)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(r){this._langMap.set(r.name,r),this._langGraph.set(r.name,r);const n=r.embeddedLanguages??r.embeddedLangs;if(n)for(const i of n)this._langGraph.set(i,this._langMap.get(i))}}class FH{constructor(e,r){te(this,"_langs",new Map);te(this,"_scopeToLang",new Map);te(this,"_injections",new Map);te(this,"_onigLib");this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},r.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(r=>{this._langs.set(r,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(r=>{this._injections.get(r)||this._injections.set(r,[]),this._injections.get(r).push(e.scopeName)})}getInjections(e){const r=e.split(".");let n=[];for(let i=1;i<=r.length;i++){const a=r.slice(0,i).join(".");n=[...n,...this._injections.get(a)||[]]}return n}}let Xo=0;function $H(t){Xo+=1,t.warnings!==!1&&Xo>=10&&Xo%10===0&&console.warn(`[Shiki] ${Xo} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let e=!1;if(!t.engine)throw new zs("`engine` option is required for synchronous mode");const r=(t.langs||[]).flat(1),n=(t.themes||[]).flat(1).map(d1),i=new FH(t.engine,r),a=new PH(i,n,r,t.langAlias);let s;function o(C){return av(C,t.langAlias)}function l(C){b();const E=a.getGrammar(typeof C=="string"?C:C.name);if(!E)throw new zs(`Language \`${C}\` not found, you may need to load it first`);return E}function c(C){if(C==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const E=a.getTheme(C);if(!E)throw new zs(`Theme \`${C}\` not found, you may need to load it first`);return E}function u(C){b();const E=c(C);s!==C&&(a.setTheme(E),s=C);const _=a.getColorMap();return{theme:E,colorMap:_}}function h(){return b(),a.getLoadedThemes()}function d(){return b(),a.getLoadedLanguages()}function f(...C){b(),a.loadLanguages(C.flat(1))}async function p(...C){return f(await nv(C))}function m(...C){b();for(const E of C.flat(1))a.loadTheme(E)}async function y(...C){return b(),m(await iv(C))}function b(){if(e)throw new zs("Shiki instance has been disposed")}function v(){e||(e=!0,a.dispose(),Xo-=1)}return{setTheme:u,getTheme:c,getLanguage:l,getLoadedThemes:h,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:y,loadThemeSync:m,dispose:v,[Symbol.dispose]:v}}async function zH(t){t.engine||OH("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,r,n]=await Promise.all([iv(t.themes||[]),nv(t.langs||[]),t.engine]);return $H({...t,themes:e,langs:r,engine:n})}async function HH(t){const e=await zH(t);return{getLastGrammarState:(...r)=>wH(e,...r),codeToTokensBase:(r,n)=>u1(e,r,n),codeToTokensWithThemes:(r,n)=>rv(e,r,n),codeToTokens:(r,n)=>o0(e,r,n),codeToHast:(r,n)=>l0(e,r,n),codeToHtml:(r,n)=>BH(e,r,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function qH(t){const e=t.langs,r=t.themes,n=t.engine;async function i(a){function s(h){var d;if(typeof h=="string"){if(h=((d=a.langAlias)==null?void 0:d[h])||h,Q5(h))return[];const f=e[h];if(!f)throw new sr(`Language \`${h}\` is not included in this bundle. You may want to load it from external source.`);return f}return h}function o(h){if(Z5(h))return"none";if(typeof h=="string"){const d=r[h];if(!d)throw new sr(`Theme \`${h}\` is not included in this bundle. You may want to load it from external source.`);return d}return h}const l=(a.themes??[]).map(h=>o(h)),c=(a.langs??[]).map(h=>s(h)),u=await HH({engine:a.engine??n(),...a,themes:l,langs:c});return{...u,loadLanguage(...h){return u.loadLanguage(...h.map(s))},loadTheme(...h){return u.loadTheme(...h.map(o))},getBundledLanguages(){return e},getBundledThemes(){return r}}}return i}const sv=[{id:"abap",name:"ABAP",import:()=>Promise.resolve().then(()=>require("./abap-DV7Q1lGP.js"))},{id:"actionscript-3",name:"ActionScript",import:()=>Promise.resolve().then(()=>require("./actionscript-3-DXOxkRa2.js"))},{id:"ada",name:"Ada",import:()=>Promise.resolve().then(()=>require("./ada-D46EKCNf.js"))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.resolve().then(()=>require("./angular-html-JXV_E8IE.js")).then(t=>t.angularHtml)},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.resolve().then(()=>require("./angular-ts-ul8EvQZm.js"))},{id:"apache",name:"Apache Conf",import:()=>Promise.resolve().then(()=>require("./apache-DL1xuH1f.js"))},{id:"apex",name:"Apex",import:()=>Promise.resolve().then(()=>require("./apex-6AM9YZbQ.js"))},{id:"apl",name:"APL",import:()=>Promise.resolve().then(()=>require("./apl-BdW4yp7x.js"))},{id:"applescript",name:"AppleScript",import:()=>Promise.resolve().then(()=>require("./applescript-COilsSrZ.js"))},{id:"ara",name:"Ara",import:()=>Promise.resolve().then(()=>require("./ara-B6Lpq1YJ.js"))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>Promise.resolve().then(()=>require("./asciidoc-DcKqW72n.js"))},{id:"asm",name:"Assembly",import:()=>Promise.resolve().then(()=>require("./asm-DYMFy-sD.js"))},{id:"astro",name:"Astro",import:()=>Promise.resolve().then(()=>require("./astro-BAqad-WM.js"))},{id:"awk",name:"AWK",import:()=>Promise.resolve().then(()=>require("./awk-IEszImW6.js"))},{id:"ballerina",name:"Ballerina",import:()=>Promise.resolve().then(()=>require("./ballerina-Dr6dU4hP.js"))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>Promise.resolve().then(()=>require("./bat-DGkUhhn2.js"))},{id:"beancount",name:"Beancount",import:()=>Promise.resolve().then(()=>require("./beancount-Bv1Sweoy.js"))},{id:"berry",name:"Berry",aliases:["be"],import:()=>Promise.resolve().then(()=>require("./berry-DEMs4LK_.js"))},{id:"bibtex",name:"BibTeX",import:()=>Promise.resolve().then(()=>require("./bibtex-BgA36Z3k.js"))},{id:"bicep",name:"Bicep",import:()=>Promise.resolve().then(()=>require("./bicep-DL0zb-7W.js"))},{id:"blade",name:"Blade",import:()=>Promise.resolve().then(()=>require("./blade-CgjUlvXO.js"))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>Promise.resolve().then(()=>require("./bsl-MeEzPwnu.js"))},{id:"c",name:"C",import:()=>Promise.resolve().then(()=>require("./c-CtlmKnPF.js"))},{id:"c3",name:"C3",import:()=>Promise.resolve().then(()=>require("./c3-DtfRRWXN.js"))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>Promise.resolve().then(()=>require("./cadence-DcbmM5v3.js"))},{id:"cairo",name:"Cairo",import:()=>Promise.resolve().then(()=>require("./cairo-Bl3vCTfQ.js"))},{id:"clarity",name:"Clarity",import:()=>Promise.resolve().then(()=>require("./clarity-gPuvqtpF.js"))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>Promise.resolve().then(()=>require("./clojure-OUsr1SUl.js"))},{id:"cmake",name:"CMake",import:()=>Promise.resolve().then(()=>require("./cmake-jM6P58qY.js"))},{id:"cobol",name:"COBOL",import:()=>Promise.resolve().then(()=>require("./cobol-DReJOyN2.js"))},{id:"codeowners",name:"CODEOWNERS",import:()=>Promise.resolve().then(()=>require("./codeowners-QhPK6lIJ.js"))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>Promise.resolve().then(()=>require("./codeql-D9-TdUN8.js"))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.resolve().then(()=>require("./coffee-CUyQUc3M.js"))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>Promise.resolve().then(()=>require("./common-lisp-C77gR-8i.js"))},{id:"coq",name:"Coq",import:()=>Promise.resolve().then(()=>require("./coq-vlPdR5hP.js"))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.resolve().then(()=>require("./cpp-ChNdME6I.js"))},{id:"crystal",name:"Crystal",import:()=>Promise.resolve().then(()=>require("./crystal-CVTji_sR.js"))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>Promise.resolve().then(()=>require("./csharp-BUkAIRXW.js"))},{id:"css",name:"CSS",import:()=>Promise.resolve().then(()=>require("./css-Do0mp2lm.js"))},{id:"csv",name:"CSV",import:()=>Promise.resolve().then(()=>require("./csv-DiEdJzSJ.js"))},{id:"cue",name:"CUE",import:()=>Promise.resolve().then(()=>require("./cue-D1vJRJEx.js"))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>Promise.resolve().then(()=>require("./cypher-atSM3NsM.js"))},{id:"d",name:"D",import:()=>Promise.resolve().then(()=>require("./d-2qe3NhmZ.js"))},{id:"dart",name:"Dart",import:()=>Promise.resolve().then(()=>require("./dart-Ds0_0fwe.js"))},{id:"dax",name:"DAX",import:()=>Promise.resolve().then(()=>require("./dax-DbkQa40E.js"))},{id:"desktop",name:"Desktop",import:()=>Promise.resolve().then(()=>require("./desktop-tn3MFXCZ.js"))},{id:"diff",name:"Diff",import:()=>Promise.resolve().then(()=>require("./diff-CA31fCOg.js"))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>Promise.resolve().then(()=>require("./docker-zJpMwmYa.js"))},{id:"dotenv",name:"dotEnv",import:()=>Promise.resolve().then(()=>require("./dotenv-DpcNCNek.js"))},{id:"dream-maker",name:"Dream Maker",import:()=>Promise.resolve().then(()=>require("./dream-maker-BkijXDkm.js"))},{id:"edge",name:"Edge",import:()=>Promise.resolve().then(()=>require("./edge-B28yp_Zk.js"))},{id:"elixir",name:"Elixir",import:()=>Promise.resolve().then(()=>require("./elixir-D7-1KNL2.js"))},{id:"elm",name:"Elm",import:()=>Promise.resolve().then(()=>require("./elm-BkJa-nJb.js"))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>Promise.resolve().then(()=>require("./emacs-lisp-C1UCIjUO.js"))},{id:"erb",name:"ERB",import:()=>Promise.resolve().then(()=>require("./erb-DJ1tHjRo.js"))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.resolve().then(()=>require("./erlang-DztDLzIS.js"))},{id:"fennel",name:"Fennel",import:()=>Promise.resolve().then(()=>require("./fennel-Bz9-EMMc.js"))},{id:"fish",name:"Fish",import:()=>Promise.resolve().then(()=>require("./fish-DwmQKRZi.js"))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>Promise.resolve().then(()=>require("./fluent-CJtpNuaO.js"))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.resolve().then(()=>require("./fortran-fixed-form-CM5372im.js"))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>Promise.resolve().then(()=>require("./fortran-free-form-Cs4ztolN.js"))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.resolve().then(()=>require("./fsharp-C8GKou_e.js"))},{id:"gdresource",name:"GDResource",import:()=>Promise.resolve().then(()=>require("./gdresource-Bx-5U3z2.js"))},{id:"gdscript",name:"GDScript",import:()=>Promise.resolve().then(()=>require("./gdscript-DSegQKMB.js"))},{id:"gdshader",name:"GDShader",import:()=>Promise.resolve().then(()=>require("./gdshader-DsmqQl4t.js"))},{id:"genie",name:"Genie",import:()=>Promise.resolve().then(()=>require("./genie-Dy2rU8CF.js"))},{id:"gherkin",name:"Gherkin",import:()=>Promise.resolve().then(()=>require("./gherkin-BmiEVBJ1.js"))},{id:"git-commit",name:"Git Commit Message",import:()=>Promise.resolve().then(()=>require("./git-commit-B0NDtut1.js"))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.resolve().then(()=>require("./git-rebase-lJEbayNx.js"))},{id:"gleam",name:"Gleam",import:()=>Promise.resolve().then(()=>require("./gleam-DHVuTCr7.js"))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.resolve().then(()=>require("./glimmer-js-CxLlFUHs.js"))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.resolve().then(()=>require("./glimmer-ts-C8Spe63v.js"))},{id:"glsl",name:"GLSL",import:()=>Promise.resolve().then(()=>require("./glsl-BcHRsW10.js"))},{id:"gn",name:"GN",import:()=>Promise.resolve().then(()=>require("./gn-0WGnAyGi.js"))},{id:"gnuplot",name:"Gnuplot",import:()=>Promise.resolve().then(()=>require("./gnuplot-CDPKvI9X.js"))},{id:"go",name:"Go",import:()=>Promise.resolve().then(()=>require("./go-epHseFUa.js"))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.resolve().then(()=>require("./graphql-BO3Jc_L3.js"))},{id:"groovy",name:"Groovy",import:()=>Promise.resolve().then(()=>require("./groovy-D7VuDBXz.js"))},{id:"hack",name:"Hack",import:()=>Promise.resolve().then(()=>require("./hack-Dr4YFULU.js"))},{id:"haml",name:"Ruby Haml",import:()=>Promise.resolve().then(()=>require("./haml-DjC-8E5i.js"))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.resolve().then(()=>require("./handlebars-vZrL3oRU.js"))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>Promise.resolve().then(()=>require("./haskell-BShesV2P.js"))},{id:"haxe",name:"Haxe",import:()=>Promise.resolve().then(()=>require("./haxe-Bo5XuRS0.js"))},{id:"hcl",name:"HashiCorp HCL",import:()=>Promise.resolve().then(()=>require("./hcl-CrZnvm-1.js"))},{id:"hjson",name:"Hjson",import:()=>Promise.resolve().then(()=>require("./hjson-CEESwTUP.js"))},{id:"hlsl",name:"HLSL",import:()=>Promise.resolve().then(()=>require("./hlsl-CyvYRIb9.js"))},{id:"html",name:"HTML",import:()=>Promise.resolve().then(()=>require("./html-Cub4lUvx.js"))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.resolve().then(()=>require("./html-derivative-DbGZSkO4.js"))},{id:"http",name:"HTTP",import:()=>Promise.resolve().then(()=>require("./http-J4eraUTU.js"))},{id:"hurl",name:"Hurl",import:()=>Promise.resolve().then(()=>require("./hurl-1DL8OH_r.js"))},{id:"hxml",name:"HXML",import:()=>Promise.resolve().then(()=>require("./hxml-DrnMPCCd.js"))},{id:"hy",name:"Hy",import:()=>Promise.resolve().then(()=>require("./hy-a1E2Ed6P.js"))},{id:"imba",name:"Imba",import:()=>Promise.resolve().then(()=>require("./imba-CR1Q6r17.js"))},{id:"ini",name:"INI",aliases:["properties"],import:()=>Promise.resolve().then(()=>require("./ini-Dpu3Xy2p.js"))},{id:"java",name:"Java",import:()=>Promise.resolve().then(()=>require("./java--6gf61wy.js"))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>Promise.resolve().then(()=>require("./javascript-DgmXW4Ha.js"))},{id:"jinja",name:"Jinja",import:()=>Promise.resolve().then(()=>require("./jinja-CJxRwHVK.js"))},{id:"jison",name:"Jison",import:()=>Promise.resolve().then(()=>require("./jison-CH6PZfPk.js"))},{id:"json",name:"JSON",import:()=>Promise.resolve().then(()=>require("./json-YkPizm35.js"))},{id:"json5",name:"JSON5",import:()=>Promise.resolve().then(()=>require("./json5-CCgFZiQn.js"))},{id:"jsonc",name:"JSON with Comments",import:()=>Promise.resolve().then(()=>require("./jsonc-CKPHIcXW.js"))},{id:"jsonl",name:"JSON Lines",import:()=>Promise.resolve().then(()=>require("./jsonl-Dq56Hab-.js"))},{id:"jsonnet",name:"Jsonnet",import:()=>Promise.resolve().then(()=>require("./jsonnet-Csh7E68F.js"))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>Promise.resolve().then(()=>require("./jssm-D0M9iZPY.js"))},{id:"jsx",name:"JSX",import:()=>Promise.resolve().then(()=>require("./jsx-DLX6UGgg.js"))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.resolve().then(()=>require("./julia-DOO7NZhy.js"))},{id:"kdl",name:"KDL",import:()=>Promise.resolve().then(()=>require("./kdl-CDG1p2Qi.js"))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>Promise.resolve().then(()=>require("./kotlin-BHZjvNqT.js"))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>Promise.resolve().then(()=>require("./kusto-C6kOQWT0.js"))},{id:"latex",name:"LaTeX",import:()=>Promise.resolve().then(()=>require("./latex-BkUAME40.js"))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>Promise.resolve().then(()=>require("./lean-DvVQmxVK.js"))},{id:"less",name:"Less",import:()=>Promise.resolve().then(()=>require("./less-Dtg8mm6P.js"))},{id:"liquid",name:"Liquid",import:()=>Promise.resolve().then(()=>require("./liquid-D2h0MxA-.js"))},{id:"llvm",name:"LLVM IR",import:()=>Promise.resolve().then(()=>require("./llvm-DcRvQ_r8.js"))},{id:"log",name:"Log file",import:()=>Promise.resolve().then(()=>require("./log-CjTZ0gSB.js"))},{id:"logo",name:"Logo",import:()=>Promise.resolve().then(()=>require("./logo-BAktp_5i.js"))},{id:"lua",name:"Lua",import:()=>Promise.resolve().then(()=>require("./lua-7_7huFMq.js"))},{id:"luau",name:"Luau",import:()=>Promise.resolve().then(()=>require("./luau-BMXmwtw0.js"))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>Promise.resolve().then(()=>require("./make-NcdIe21U.js"))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>Promise.resolve().then(()=>require("./markdown-Byu9Sdmq.js"))},{id:"marko",name:"Marko",import:()=>Promise.resolve().then(()=>require("./marko-BUUK5Bjn.js"))},{id:"matlab",name:"MATLAB",import:()=>Promise.resolve().then(()=>require("./matlab-CHTOL9Kx.js"))},{id:"mdc",name:"MDC",import:()=>Promise.resolve().then(()=>require("./mdc-DYb1IR0A.js"))},{id:"mdx",name:"MDX",import:()=>Promise.resolve().then(()=>require("./mdx-CjwI68TB.js"))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>Promise.resolve().then(()=>require("./mermaid-BXSwQYo5.js"))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>Promise.resolve().then(()=>require("./mipsasm-BSlRcFIy.js"))},{id:"mojo",name:"Mojo",import:()=>Promise.resolve().then(()=>require("./mojo-D2tXKFxS.js"))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>Promise.resolve().then(()=>require("./moonbit-BweIWWUc.js"))},{id:"move",name:"Move",import:()=>Promise.resolve().then(()=>require("./move-Bm1vlCWg.js"))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>Promise.resolve().then(()=>require("./narrat-CBeKHgTl.js"))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>Promise.resolve().then(()=>require("./nextflow-CM8Ed358.js"))},{id:"nginx",name:"Nginx",import:()=>Promise.resolve().then(()=>require("./nginx-F8v4LkHE.js"))},{id:"nim",name:"Nim",import:()=>Promise.resolve().then(()=>require("./nim-Bz82v_0I.js"))},{id:"nix",name:"Nix",import:()=>Promise.resolve().then(()=>require("./nix-BOiBJUDf.js"))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>Promise.resolve().then(()=>require("./nushell-nGrB_wpI.js"))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>Promise.resolve().then(()=>require("./objective-c-RjkWwFge.js"))},{id:"objective-cpp",name:"Objective-C++",import:()=>Promise.resolve().then(()=>require("./objective-cpp-HnfhWwRe.js"))},{id:"ocaml",name:"OCaml",import:()=>Promise.resolve().then(()=>require("./ocaml-Cx8ewW_A.js"))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>Promise.resolve().then(()=>require("./openscad-D7eUrVPv.js"))},{id:"pascal",name:"Pascal",import:()=>Promise.resolve().then(()=>require("./pascal-DBu9vQ2o.js"))},{id:"perl",name:"Perl",import:()=>Promise.resolve().then(()=>require("./perl-BGWXz6Sf.js"))},{id:"php",name:"PHP",import:()=>Promise.resolve().then(()=>require("./php-BMqBbP55.js"))},{id:"pkl",name:"Pkl",import:()=>Promise.resolve().then(()=>require("./pkl-Dvyry4Rm.js"))},{id:"plsql",name:"PL/SQL",import:()=>Promise.resolve().then(()=>require("./plsql-IJkoPJ9P.js"))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>Promise.resolve().then(()=>require("./po-Rhu6MvnX.js"))},{id:"polar",name:"Polar",import:()=>Promise.resolve().then(()=>require("./polar-BtWqSUq2.js"))},{id:"postcss",name:"PostCSS",import:()=>Promise.resolve().then(()=>require("./postcss-Dh97DcaJ.js"))},{id:"powerquery",name:"PowerQuery",import:()=>Promise.resolve().then(()=>require("./powerquery-BGL6VIw7.js"))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>Promise.resolve().then(()=>require("./powershell-BiEPMjy-.js"))},{id:"prisma",name:"Prisma",import:()=>Promise.resolve().then(()=>require("./prisma-Dp473sn0.js"))},{id:"prolog",name:"Prolog",import:()=>Promise.resolve().then(()=>require("./prolog-N1U-3UeF.js"))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>Promise.resolve().then(()=>require("./proto-DMjUErYA.js"))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.resolve().then(()=>require("./pug-bTUJx3Z-.js"))},{id:"puppet",name:"Puppet",import:()=>Promise.resolve().then(()=>require("./puppet-cDQP_ZC_.js"))},{id:"purescript",name:"PureScript",import:()=>Promise.resolve().then(()=>require("./purescript-DMxb59gF.js"))},{id:"python",name:"Python",aliases:["py"],import:()=>Promise.resolve().then(()=>require("./python-s9jfVbew.js"))},{id:"qml",name:"QML",import:()=>Promise.resolve().then(()=>require("./qml-CDzfIfOz.js"))},{id:"qmldir",name:"QML Directory",import:()=>Promise.resolve().then(()=>require("./qmldir-DNF9H2ir.js"))},{id:"qss",name:"Qt Style Sheets",import:()=>Promise.resolve().then(()=>require("./qss-DwA_oiAM.js"))},{id:"r",name:"R",import:()=>Promise.resolve().then(()=>require("./r-DAqIyZhh.js"))},{id:"racket",name:"Racket",import:()=>Promise.resolve().then(()=>require("./racket-D4laxZit.js"))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>Promise.resolve().then(()=>require("./raku-DHySPsLw.js"))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.resolve().then(()=>require("./razor-DqXh8oK-.js"))},{id:"reg",name:"Windows Registry Script",import:()=>Promise.resolve().then(()=>require("./reg-CevkCKuZ.js"))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>Promise.resolve().then(()=>require("./regexp-DabTWNLE.js"))},{id:"rel",name:"Rel",import:()=>Promise.resolve().then(()=>require("./rel-BS5APza7.js"))},{id:"riscv",name:"RISC-V",import:()=>Promise.resolve().then(()=>require("./riscv-BnGFr6V7.js"))},{id:"rosmsg",name:"ROS Interface",import:()=>Promise.resolve().then(()=>require("./rosmsg-C7VSFzUC.js"))},{id:"rst",name:"reStructuredText",import:()=>Promise.resolve().then(()=>require("./rst-CmsHU1oq.js"))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.resolve().then(()=>require("./ruby-DZp7Kthb.js"))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>Promise.resolve().then(()=>require("./rust-CNeTMPbB.js"))},{id:"sas",name:"SAS",import:()=>Promise.resolve().then(()=>require("./sas-Du-NqkIN.js"))},{id:"sass",name:"Sass",import:()=>Promise.resolve().then(()=>require("./sass-vyo-bUwh.js"))},{id:"scala",name:"Scala",import:()=>Promise.resolve().then(()=>require("./scala-ZSekD-8-.js"))},{id:"scheme",name:"Scheme",import:()=>Promise.resolve().then(()=>require("./scheme-vM0LdD-_.js"))},{id:"scss",name:"SCSS",import:()=>Promise.resolve().then(()=>require("./scss-C9Hu3bmX.js"))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>Promise.resolve().then(()=>require("./sdbl-DeWT5r4i.js"))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>Promise.resolve().then(()=>require("./shaderlab-DFNHwaQA.js"))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>Promise.resolve().then(()=>require("./shellscript-DYWjN7qW.js"))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.resolve().then(()=>require("./shellsession-5qZnCWz3.js"))},{id:"smalltalk",name:"Smalltalk",import:()=>Promise.resolve().then(()=>require("./smalltalk-BNs6hxu4.js"))},{id:"solidity",name:"Solidity",import:()=>Promise.resolve().then(()=>require("./solidity-uQuzgchP.js"))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.resolve().then(()=>require("./soy-BztBK6ie.js"))},{id:"sparql",name:"SPARQL",import:()=>Promise.resolve().then(()=>require("./sparql-Ds57h-sT.js"))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>Promise.resolve().then(()=>require("./splunk-CWPivao_.js"))},{id:"sql",name:"SQL",import:()=>Promise.resolve().then(()=>require("./sql-DhUUVgH1.js"))},{id:"ssh-config",name:"SSH Config",import:()=>Promise.resolve().then(()=>require("./ssh-config-B93wBIBa.js"))},{id:"stata",name:"Stata",import:()=>Promise.resolve().then(()=>require("./stata-B-erP_01.js"))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>Promise.resolve().then(()=>require("./stylus-B64Bt0D4.js"))},{id:"svelte",name:"Svelte",import:()=>Promise.resolve().then(()=>require("./svelte-CPZ3YGr5.js"))},{id:"swift",name:"Swift",import:()=>Promise.resolve().then(()=>require("./swift-BMbGdc3j.js"))},{id:"system-verilog",name:"SystemVerilog",import:()=>Promise.resolve().then(()=>require("./system-verilog-BFclLo9e.js"))},{id:"systemd",name:"Systemd Units",import:()=>Promise.resolve().then(()=>require("./systemd-Dtw7P4tb.js"))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>Promise.resolve().then(()=>require("./talonscript-D8SvZJVc.js"))},{id:"tasl",name:"Tasl",import:()=>Promise.resolve().then(()=>require("./tasl--DC4oX-L.js"))},{id:"tcl",name:"Tcl",import:()=>Promise.resolve().then(()=>require("./tcl-0Q0H86Yn.js"))},{id:"templ",name:"Templ",import:()=>Promise.resolve().then(()=>require("./templ-DADdpFDY.js"))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>Promise.resolve().then(()=>require("./terraform-C0RDrmWi.js"))},{id:"tex",name:"TeX",import:()=>Promise.resolve().then(()=>require("./tex-3QW4GAT7.js"))},{id:"toml",name:"TOML",import:()=>Promise.resolve().then(()=>require("./toml-Q64DoSvG.js"))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.resolve().then(()=>require("./ts-tags-DW4c6MY1.js"))},{id:"tsv",name:"TSV",import:()=>Promise.resolve().then(()=>require("./tsv-DqNGnuVj.js"))},{id:"tsx",name:"TSX",import:()=>Promise.resolve().then(()=>require("./tsx-DIpfUf9u.js"))},{id:"turtle",name:"Turtle",import:()=>Promise.resolve().then(()=>require("./turtle-DipIidr5.js"))},{id:"twig",name:"Twig",import:()=>Promise.resolve().then(()=>require("./twig-DE2P6STQ.js"))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>Promise.resolve().then(()=>require("./typescript-b48wo4zk.js"))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>Promise.resolve().then(()=>require("./typespec-DqXOE4_L.js"))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>Promise.resolve().then(()=>require("./typst-Cqq4j4V-.js"))},{id:"v",name:"V",import:()=>Promise.resolve().then(()=>require("./v-81C2s01-.js"))},{id:"vala",name:"Vala",import:()=>Promise.resolve().then(()=>require("./vala-CsAYdCD2.js"))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>Promise.resolve().then(()=>require("./vb-AiTMb16X.js"))},{id:"verilog",name:"Verilog",import:()=>Promise.resolve().then(()=>require("./verilog-AMohXZcN.js"))},{id:"vhdl",name:"VHDL",import:()=>Promise.resolve().then(()=>require("./vhdl-DIdR1NA5.js"))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>Promise.resolve().then(()=>require("./viml-D01eKeA4.js"))},{id:"vue",name:"Vue",import:()=>Promise.resolve().then(()=>require("./vue-BHXwUkEL.js"))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.resolve().then(()=>require("./vue-html-B4znhqmy.js"))},{id:"vue-vine",name:"Vue Vine",import:()=>Promise.resolve().then(()=>require("./vue-vine-CHNjSzYC.js"))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>Promise.resolve().then(()=>require("./vyper-DTzyzn3a.js"))},{id:"wasm",name:"WebAssembly",import:()=>Promise.resolve().then(()=>require("./wasm-Dp-QrJpp.js"))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>Promise.resolve().then(()=>require("./wenyan-CRNx8UP3.js"))},{id:"wgsl",name:"WGSL",import:()=>Promise.resolve().then(()=>require("./wgsl-DF5qc9dd.js"))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>Promise.resolve().then(()=>require("./wikitext-D7uzEIfK.js"))},{id:"wit",name:"WebAssembly Interface Types",import:()=>Promise.resolve().then(()=>require("./wit-BjWgLsJj.js"))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>Promise.resolve().then(()=>require("./wolfram-BR4t3Ffc.js"))},{id:"xml",name:"XML",import:()=>Promise.resolve().then(()=>require("./xml-Vhl3ZuN2.js"))},{id:"xsl",name:"XSL",import:()=>Promise.resolve().then(()=>require("./xsl-B2ZJiKs2.js"))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>Promise.resolve().then(()=>require("./yaml-XVBmpKh-.js"))},{id:"zenscript",name:"ZenScript",import:()=>Promise.resolve().then(()=>require("./zenscript-fNvwKexi.js"))},{id:"zig",name:"Zig",import:()=>Promise.resolve().then(()=>require("./zig-BAyIAcWK.js"))}],jH=Object.fromEntries(sv.map(t=>[t.id,t.import])),UH=Object.fromEntries(sv.flatMap(t=>{var e;return((e=t.aliases)==null?void 0:e.map(r=>[r,t.import]))||[]})),ov={...jH,...UH},WH=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>Promise.resolve().then(()=>require("./andromeeda-DVDxRwp5.js"))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>Promise.resolve().then(()=>require("./aurora-x-C5IpmIOG.js"))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./ayu-dark-CDpQIJw4.js"))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-frappe-Bn4lgmUk.js"))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>Promise.resolve().then(()=>require("./catppuccin-latte-BPtsb8jD.js"))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-macchiato-BLfpQWhT.js"))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>Promise.resolve().then(()=>require("./catppuccin-mocha-COMta283.js"))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>Promise.resolve().then(()=>require("./dark-plus-Cd5emcYO.js"))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-BNgwAJ-d.js"))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>Promise.resolve().then(()=>require("./dracula-soft-BHZ7sHFu.js"))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./everforest-dark-_sBMomR1.js"))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>Promise.resolve().then(()=>require("./everforest-light-H0xoYxl0.js"))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-BKL9xNgN.js"))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-default-Dsv5MuSi.js"))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-dimmed-CtB9hz8U.js"))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>Promise.resolve().then(()=>require("./github-dark-high-contrast-BqZVM-jF.js"))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-BFTOhCbz.js"))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-default-BZoWH9dH.js"))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>Promise.resolve().then(()=>require("./github-light-high-contrast-Ks3kPGJU.js"))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>Promise.resolve().then(()=>require("./gruvbox-dark-hard-CUGefKS6.js"))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>Promise.resolve().then(()=>require("./gruvbox-dark-medium-BoKPlKfz.js"))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>Promise.resolve().then(()=>require("./gruvbox-dark-soft-DSrhOWeL.js"))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>Promise.resolve().then(()=>require("./gruvbox-light-hard-De4IuseP.js"))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>Promise.resolve().then(()=>require("./gruvbox-light-medium-CzMY3IEJ.js"))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>Promise.resolve().then(()=>require("./gruvbox-light-soft-U4iAIpWZ.js"))},{id:"houston",displayName:"Houston",type:"dark",import:()=>Promise.resolve().then(()=>require("./houston-T57H3gQZ.js"))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-dragon-BJZF7xDr.js"))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>Promise.resolve().then(()=>require("./kanagawa-lotus-BhgzmRV4.js"))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>Promise.resolve().then(()=>require("./kanagawa-wave-BgJip59C.js"))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>Promise.resolve().then(()=>require("./laserwave--izBLY1I.js"))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>Promise.resolve().then(()=>require("./light-plus-B5D0le0o.js"))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-Dj0-OyRN.js"))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-darker-Dvfs29ir.js"))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>Promise.resolve().then(()=>require("./material-theme-lighter-EU3ZGl_r.js"))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-ocean-px_3Pwqa.js"))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>Promise.resolve().then(()=>require("./material-theme-palenight-38jxvsGX.js"))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./min-dark-tt5o_I5e.js"))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>Promise.resolve().then(()=>require("./min-light-tmTHl_CQ.js"))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>Promise.resolve().then(()=>require("./monokai-DMIxv6MM.js"))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>Promise.resolve().then(()=>require("./night-owl-BN78kThQ.js"))},{id:"nord",displayName:"Nord",type:"dark",import:()=>Promise.resolve().then(()=>require("./nord-Ca5AGUWc.js"))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>Promise.resolve().then(()=>require("./one-dark-pro-C09VQHwB.js"))},{id:"one-light",displayName:"One Light",type:"light",import:()=>Promise.resolve().then(()=>require("./one-light-020-h_lv.js"))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>Promise.resolve().then(()=>require("./plastic-r5piqq-S.js"))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>Promise.resolve().then(()=>require("./poimandres-BLP3NNjc.js"))},{id:"red",displayName:"Red",type:"dark",import:()=>Promise.resolve().then(()=>require("./red-BQGOv1D5.js"))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-CfBWm6WX.js"))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>Promise.resolve().then(()=>require("./rose-pine-dawn-CaZ5I2lt.js"))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>Promise.resolve().then(()=>require("./rose-pine-moon-Cql8LDLp.js"))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./slack-dark-akqwQ7ED.js"))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>Promise.resolve().then(()=>require("./slack-ochin-BoQQWmTv.js"))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>Promise.resolve().then(()=>require("./snazzy-light-D_IwRieF.js"))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./solarized-dark-gmm-WbDC.js"))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>Promise.resolve().then(()=>require("./solarized-light-DzcxRSZP.js"))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>Promise.resolve().then(()=>require("./synthwave-84-BBRLOmNT.js"))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>Promise.resolve().then(()=>require("./tokyo-night-GOhjzM5y.js"))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>Promise.resolve().then(()=>require("./vesper-B59Iw4gV.js"))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-black-MF-1S1MG.js"))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>Promise.resolve().then(()=>require("./vitesse-dark-SIffJYSe.js"))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>Promise.resolve().then(()=>require("./vitesse-light-U63SkYGT.js"))}],GH=Object.fromEntries(WH.map(t=>[t.id,t.import]));class f1 extends Error{constructor(e){super(e),this.name="ShikiError"}}function YH(){return 2147483648}function VH(){return typeof performance<"u"?performance.now():Date.now()}const XH=(t,e)=>t+(e-t%e)%e;async function KH(t){let e,r;const n={};function i(f){r=f,n.HEAPU8=new Uint8Array(f),n.HEAPU32=new Uint32Array(f)}function a(f,p,m){n.HEAPU8.copyWithin(f,p,p+m)}function s(f){try{return e.grow(f-r.byteLength+65535>>>16),i(e.buffer),1}catch{}}function o(f){const p=n.HEAPU8.length;f=f>>>0;const m=YH();if(f>m)return!1;for(let y=1;y<=4;y*=2){let b=p*(1+.2/y);b=Math.min(b,f+100663296);const v=Math.min(m,XH(Math.max(f,b),65536));if(s(v))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(f,p,m=1024){const y=p+m;let b=p;for(;f[b]&&!(b>=y);)++b;if(b-p>16&&f.buffer&&l)return l.decode(f.subarray(p,b));let v="";for(;p<b;){let C=f[p++];if(!(C&128)){v+=String.fromCharCode(C);continue}const E=f[p++]&63;if((C&224)===192){v+=String.fromCharCode((C&31)<<6|E);continue}const _=f[p++]&63;if((C&240)===224?C=(C&15)<<12|E<<6|_:C=(C&7)<<18|E<<12|_<<6|f[p++]&63,C<65536)v+=String.fromCharCode(C);else{const k=C-65536;v+=String.fromCharCode(55296|k>>10,56320|k&1023)}}return v}function u(f,p){return f?c(n.HEAPU8,f,p):""}const h={emscripten_get_now:VH,emscripten_memcpy_big:a,emscripten_resize_heap:o,fd_write:()=>0};async function d(){const p=await t({env:h,wasi_snapshot_preview1:h});e=p.memory,i(e.buffer),Object.assign(n,p),n.UTF8ToString=u}return await d(),n}var QH=Object.defineProperty,ZH=(t,e,r)=>e in t?QH(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,dr=(t,e,r)=>ZH(t,typeof e!="symbol"?e+"":e,r);let yr=null;function JH(t){throw new f1(t.UTF8ToString(t.getLastOnigError()))}class gh{constructor(e){dr(this,"utf16Length"),dr(this,"utf8Length"),dr(this,"utf16Value"),dr(this,"utf8Value"),dr(this,"utf16OffsetToUtf8"),dr(this,"utf8OffsetToUtf16");const r=e.length,n=gh._utf8ByteLength(e),i=n!==r,a=i?new Uint32Array(r+1):null;i&&(a[r]=n);const s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const o=new Uint8Array(n);let l=0;for(let c=0;c<r;c++){const u=e.charCodeAt(c);let h=u,d=!1;if(u>=55296&&u<=56319&&c+1<r){const f=e.charCodeAt(c+1);f>=56320&&f<=57343&&(h=(u-55296<<10)+65536|f-56320,d=!0)}i&&(a[c]=l,d&&(a[c+1]=l),h<=127?s[l+0]=c:h<=2047?(s[l+0]=c,s[l+1]=c):h<=65535?(s[l+0]=c,s[l+1]=c,s[l+2]=c):(s[l+0]=c,s[l+1]=c,s[l+2]=c,s[l+3]=c)),h<=127?o[l++]=h:h<=2047?(o[l++]=192|(h&1984)>>>6,o[l++]=128|(h&63)>>>0):h<=65535?(o[l++]=224|(h&61440)>>>12,o[l++]=128|(h&4032)>>>6,o[l++]=128|(h&63)>>>0):(o[l++]=240|(h&1835008)>>>18,o[l++]=128|(h&258048)>>>12,o[l++]=128|(h&4032)>>>6,o[l++]=128|(h&63)>>>0),d&&c++}this.utf16Length=r,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=s}static _utf8ByteLength(e){let r=0;for(let n=0,i=e.length;n<i;n++){const a=e.charCodeAt(n);let s=a,o=!1;if(a>=55296&&a<=56319&&n+1<i){const l=e.charCodeAt(n+1);l>=56320&&l<=57343&&(s=(a-55296<<10)+65536|l-56320,o=!0)}s<=127?r+=1:s<=2047?r+=2:s<=65535?r+=3:r+=4,o&&n++}return r}createString(e){const r=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,r),r}}const bh=class ni{constructor(e){if(dr(this,"id",++ni.LAST_ID),dr(this,"_onigBinding"),dr(this,"content"),dr(this,"utf16Length"),dr(this,"utf8Length"),dr(this,"utf16OffsetToUtf8"),dr(this,"utf8OffsetToUtf16"),dr(this,"ptr"),!yr)throw new f1("Must invoke loadWasm first.");this._onigBinding=yr,this.content=e;const r=new gh(e);this.utf16Length=r.utf16Length,this.utf8Length=r.utf8Length,this.utf16OffsetToUtf8=r.utf16OffsetToUtf8,this.utf8OffsetToUtf16=r.utf8OffsetToUtf16,this.utf8Length<1e4&&!ni._sharedPtrInUse?(ni._sharedPtr||(ni._sharedPtr=yr.omalloc(1e4)),ni._sharedPtrInUse=!0,yr.HEAPU8.set(r.utf8Value,ni._sharedPtr),this.ptr=ni._sharedPtr):this.ptr=r.createString(yr)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===ni._sharedPtr?ni._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};dr(bh,"LAST_ID",0);dr(bh,"_sharedPtr",0);dr(bh,"_sharedPtrInUse",!1);let lv=bh;class eq{constructor(e){if(dr(this,"_onigBinding"),dr(this,"_ptr"),!yr)throw new f1("Must invoke loadWasm first.");const r=[],n=[];for(let o=0,l=e.length;o<l;o++){const c=new gh(e[o]);r[o]=c.createString(yr),n[o]=c.utf8Length}const i=yr.omalloc(4*e.length);yr.HEAPU32.set(r,i/4);const a=yr.omalloc(4*e.length);yr.HEAPU32.set(n,a/4);const s=yr.createOnigScanner(i,a,e.length);for(let o=0,l=e.length;o<l;o++)yr.ofree(r[o]);yr.ofree(a),yr.ofree(i),s===0&&JH(yr),this._onigBinding=yr,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,r,n){let i=0;if(typeof n=="number"&&(i=n),typeof e=="string"){e=new lv(e);const a=this._findNextMatchSync(e,r,!1,i);return e.dispose(),a}return this._findNextMatchSync(e,r,!1,i)}_findNextMatchSync(e,r,n,i){const a=this._onigBinding,s=a.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(r),i);if(s===0)return null;const o=a.HEAPU32;let l=s/4;const c=o[l++],u=o[l++],h=[];for(let d=0;d<u;d++){const f=e.convertUtf8OffsetToUtf16(o[l++]),p=e.convertUtf8OffsetToUtf16(o[l++]);h[d]={start:f,end:p,length:p-f}}return{index:c,captureIndices:h}}}function tq(t){return typeof t.instantiator=="function"}function rq(t){return typeof t.default=="function"}function nq(t){return typeof t.data<"u"}function iq(t){return typeof Response<"u"&&t instanceof Response}function aq(t){var e;return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&((e=Buffer.isBuffer)==null?void 0:e.call(Buffer,t))||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let Xc;function sq(t){if(Xc)return Xc;async function e(){yr=await KH(async r=>{let n=t;return n=await n,typeof n=="function"&&(n=await n(r)),typeof n=="function"&&(n=await n(r)),tq(n)?n=await n.instantiator(r):rq(n)?n=await n.default(r):(nq(n)&&(n=n.data),iq(n)?typeof WebAssembly.instantiateStreaming=="function"?n=await oq(n)(r):n=await lq(n)(r):aq(n)?n=await Od(n)(r):n instanceof WebAssembly.Module?n=await Od(n)(r):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await Od(n.default)(r))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}return Xc=e(),Xc}function Od(t){return e=>WebAssembly.instantiate(t,e)}function oq(t){return e=>WebAssembly.instantiateStreaming(t,e)}function lq(t){return async e=>{const r=await t.arrayBuffer();return WebAssembly.instantiate(r,e)}}async function cq(t){return t&&await sq(t),{createScanner(e){return new eq(e.map(r=>typeof r=="string"?r:r.source))},createString(e){return new lv(e)}}}const uq=qH({langs:ov,themes:GH,engine:()=>cq(Promise.resolve().then(()=>require("./wasm-Dw4u1m6u.js")))});var Qb=new Set(Object.keys(ov)),Pd=new Map,Fd=new Map,Ls=new Map,hq=(t,e)=>`${t}-${e[0]}-${e[1]}`,dq=(t,e,r)=>{let n=t.slice(0,100),i=t.length>100?t.slice(-100):"";return`${e}:${r[0]}:${r[1]}:${t.length}:${n}:${i}`},fq=(t,e)=>{let r=hq(t,e);if(Pd.has(r))return Pd.get(r);let n=uq({themes:e,langs:[t]});return Pd.set(r,n),n};function pq(t={}){var e;let r=(e=t.themes)!=null?e:["github-light","github-dark"];return{name:"shiki",type:"code-highlighter",supportsLanguage(n){return Qb.has(n)},getSupportedLanguages(){return Array.from(Qb)},getThemes(){return r},highlight({code:n,language:i,themes:a},s){let o=dq(n,i,a);return Fd.has(o)?Fd.get(o):(s&&(Ls.has(o)||Ls.set(o,new Set),Ls.get(o).add(s)),fq(i,a).then(l=>{let c=l.getLoadedLanguages().includes(i)?i:"text",u=l.codeToTokens(n,{lang:c,themes:{light:a[0],dark:a[1]}});Fd.set(o,u);let h=Ls.get(o);if(h){for(let d of h)d(u);Ls.delete(o)}}).catch(l=>{console.error("[Streamdown Code] Failed to highlight code:",l),Ls.delete(o)}),null)}}}var cv=pq();function mq(t,e){return uv(t,{})||{type:"root",children:[]}}function uv(t,e){const r=gq(t,e);return r&&e.afterTransform&&e.afterTransform(t,r),r}function gq(t,e){switch(t.nodeType){case 1:return vq(t,e);case 3:return yq(t);case 8:return xq(t);case 9:return Zb(t,e);case 10:return bq();case 11:return Zb(t,e);default:return}}function Zb(t,e){return{type:"root",children:hv(t,e)}}function bq(){return{type:"doctype"}}function yq(t){return{type:"text",value:t.nodeValue||""}}function xq(t){return{type:"comment",value:t.nodeValue||""}}function vq(t,e){const r=t.namespaceURI,n=r===di.svg?H4:z4,i=r===di.html?t.tagName.toLowerCase():t.tagName,a=r===di.html&&i==="template"?t.content:t,s=t.getAttributeNames(),o={};let l=-1;for(;++l<s.length;)o[s[l]]=t.getAttribute(s[l])||"";return n(i,o,hv(a,e))}function hv(t,e){const r=t.childNodes,n=[];let i=-1;for(;++i<r.length;){const a=uv(r[i],e);a!==void 0&&n.push(a)}return n}new DOMParser;function kq(t,e){const r=wq(t);return mq(r)}function wq(t){const e=document.createElement("template");return e.innerHTML=t,e.content}const Jb=function(t,e,r){const n=mc(r);if(!t||!t.type||!t.children)throw new Error("Expected parent node");if(typeof e=="number"){if(e<0||e===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(e=t.children.indexOf(e),e<0)throw new Error("Expected child node or index");for(;++e<t.children.length;)if(n(t.children[e],e,t))return t.children[e]},bs=function(t){if(t==null)return Sq;if(typeof t=="string")return Cq(t);if(typeof t=="object")return Tq(t);if(typeof t=="function")return p1(t);throw new Error("Expected function, string, or array as `test`")};function Tq(t){const e=[];let r=-1;for(;++r<t.length;)e[r]=bs(t[r]);return p1(n);function n(...i){let a=-1;for(;++a<e.length;)if(e[a].apply(this,i))return!0;return!1}}function Cq(t){return p1(e);function e(r){return r.tagName===t}}function p1(t){return e;function e(r,n,i){return!!(_q(r)&&t.call(this,r,typeof n=="number"?n:void 0,i||void 0))}}function Sq(t){return!!(t&&typeof t=="object"&&"type"in t&&t.type==="element"&&"tagName"in t&&typeof t.tagName=="string")}function _q(t){return t!==null&&typeof t=="object"&&"type"in t&&"tagName"in t}const ey=/\n/g,ty=/[\t ]+/g,tp=bs("br"),ry=bs(Bq),Eq=bs("p"),ny=bs("tr"),Aq=bs(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Rq,Dq]),dv=bs(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function Nq(t,e){const r=e||{},n="children"in t?t.children:[],i=dv(t),a=mv(t,{whitespace:r.whitespace||"normal"}),s=[];(t.type==="text"||t.type==="comment")&&s.push(...pv(t,{breakBefore:!0,breakAfter:!0}));let o=-1;for(;++o<n.length;)s.push(...fv(n[o],t,{whitespace:a,breakBefore:o?void 0:i,breakAfter:o<n.length-1?tp(n[o+1]):i}));const l=[];let c;for(o=-1;++o<s.length;){const u=s[o];typeof u=="number"?c!==void 0&&u>c&&(c=u):u&&(c!==void 0&&c>-1&&l.push(`
125
+ `.repeat(c)||" "),c=-1,l.push(u))}return l.join("")}function fv(t,e,r){return t.type==="element"?Lq(t,e,r):t.type==="text"?r.whitespace==="normal"?pv(t,r):Mq(t):[]}function Lq(t,e,r){const n=mv(t,r),i=t.children||[];let a=-1,s=[];if(Aq(t))return s;let o,l;for(tp(t)||ny(t)&&Jb(e,t,ny)?l=`
126
+ `:Eq(t)?(o=2,l=2):dv(t)&&(o=1,l=1);++a<i.length;)s=s.concat(fv(i[a],t,{whitespace:n,breakBefore:a?void 0:o,breakAfter:a<i.length-1?tp(i[a+1]):l}));return ry(t)&&Jb(e,t,ry)&&s.push(" "),o&&s.unshift(o),l&&s.push(l),s}function pv(t,e){const r=String(t.value),n=[],i=[];let a=0;for(;a<=r.length;){ey.lastIndex=a;const l=ey.exec(r),c=l&&"index"in l?l.index:r.length;n.push(Iq(r.slice(a,c).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?e.breakBefore:!0,c===r.length?e.breakAfter:!0)),a=c+1}let s=-1,o;for(;++s<n.length;)n[s].charCodeAt(n[s].length-1)===8203||s<n.length-1&&n[s+1].charCodeAt(0)===8203?(i.push(n[s]),o=void 0):n[s]?(typeof o=="number"&&i.push(o),i.push(n[s]),o=0):(s===0||s===n.length-1)&&i.push(0);return i}function Mq(t){return[String(t.value)]}function Iq(t,e,r){const n=[];let i=0,a;for(;i<t.length;){ty.lastIndex=i;const s=ty.exec(t);a=s?s.index:t.length,!i&&!a&&s&&!e&&n.push(""),i!==a&&n.push(t.slice(i,a)),i=s?a+s[0].length:a}return i!==a&&!r&&n.push(""),n.join(" ")}function mv(t,e){if(t.type==="element"){const r=t.properties||{};switch(t.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return r.wrap?"pre-wrap":"pre";case"td":case"th":return r.noWrap?"nowrap":e.whitespace;case"textarea":return"pre-wrap"}}return e.whitespace}function Rq(t){return!!(t.properties||{}).hidden}function Bq(t){return t.tagName==="td"||t.tagName==="th"}function Dq(t){return t.tagName==="dialog"&&!(t.properties||{}).open}class on{constructor(e,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=r,this.end=n}static range(e,r){return r?!e||!e.loc||!r.loc||e.loc.lexer!==r.loc.lexer?null:new on(e.loc.lexer,e.loc.start,r.loc.end):e&&e.loc}}class kn{constructor(e,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=r}range(e,r){return new kn(r,on.range(this,e))}}class Te{constructor(e,r){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var n="KaTeX parse error: "+e,i,a,s=r&&r.loc;if(s&&s.start<=s.end){var o=s.lexer.input;i=s.start,a=s.end,i===o.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var l=o.slice(i,a).replace(/[^]/g,"$&̲"),c;i>15?c="…"+o.slice(i-15,i):c=o.slice(0,i);var u;a+15<o.length?u=o.slice(a,a+15)+"…":u=o.slice(a),n+=c+l+u}var h=new Error(n);return h.name="ParseError",h.__proto__=Te.prototype,h.position=i,i!=null&&a!=null&&(h.length=a-i),h.rawMessage=e,h}}Te.prototype.__proto__=Error.prototype;var Oq=function(e,r){return e===void 0?r:e},Pq=/([A-Z])/g,Fq=function(e){return e.replace(Pq,"-$1").toLowerCase()},$q={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},zq=/[&><"']/g;function Hq(t){return String(t).replace(zq,e=>$q[e])}var gv=function t(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?t(e.body[0]):e:e.type==="font"?t(e.body):e},qq=function(e){var r=gv(e);return r.type==="mathord"||r.type==="textord"||r.type==="atom"},jq=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},Uq=function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},Mt={deflt:Oq,escape:Hq,hyphenate:Fq,getBaseElem:gv,isCharacterBox:qq,protocolFromUrl:Uq},Ol={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:t=>"#"+t},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(t,e)=>(e.push(t),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:t=>Math.max(0,t),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:t=>Math.max(0,t),cli:"-e, --max-expand <n>",cliProcessor:t=>t==="Infinity"?1/0:parseInt(t)},globalGroup:{type:"boolean",cli:!1}};function Wq(t){if(t.default)return t.default;var e=t.type,r=Array.isArray(e)?e[0]:e;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class m1{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var r in Ol)if(Ol.hasOwnProperty(r)){var n=Ol[r];this[r]=e[r]!==void 0?n.processor?n.processor(e[r]):e[r]:Wq(n)}}reportNonstrict(e,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(e,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new Te("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+e+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]"))}}useStrictBehavior(e,r,n){var i=this.strict;if(typeof i=="function")try{i=i(e,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var r=Mt.protocolFromUrl(e.url);if(r==null)return!1;e.protocol=r}var n=typeof this.trust=="function"?this.trust(e):this.trust;return!!n}}class oa{constructor(e,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=r,this.cramped=n}sup(){return ui[Gq[this.id]]}sub(){return ui[Yq[this.id]]}fracNum(){return ui[Vq[this.id]]}fracDen(){return ui[Xq[this.id]]}cramp(){return ui[Kq[this.id]]}text(){return ui[Qq[this.id]]}isTight(){return this.size>=2}}var g1=0,c0=1,Ws=2,qi=3,Zl=4,Dn=5,uo=6,Ur=7,ui=[new oa(g1,0,!1),new oa(c0,0,!0),new oa(Ws,1,!1),new oa(qi,1,!0),new oa(Zl,2,!1),new oa(Dn,2,!0),new oa(uo,3,!1),new oa(Ur,3,!0)],Gq=[Zl,Dn,Zl,Dn,uo,Ur,uo,Ur],Yq=[Dn,Dn,Dn,Dn,Ur,Ur,Ur,Ur],Vq=[Ws,qi,Zl,Dn,uo,Ur,uo,Ur],Xq=[qi,qi,Dn,Dn,Ur,Ur,Ur,Ur],Kq=[c0,c0,qi,qi,Dn,Dn,Ur,Ur],Qq=[g1,c0,Ws,qi,Ws,qi,Ws,qi],it={DISPLAY:ui[g1],TEXT:ui[Ws],SCRIPT:ui[Zl],SCRIPTSCRIPT:ui[uo]},rp=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Zq(t){for(var e=0;e<rp.length;e++)for(var r=rp[e],n=0;n<r.blocks.length;n++){var i=r.blocks[n];if(t>=i[0]&&t<=i[1])return r.name}return null}var _u=[];rp.forEach(t=>t.blocks.forEach(e=>_u.push(...e)));function bv(t){for(var e=0;e<_u.length;e+=2)if(t>=_u[e]&&t<=_u[e+1])return!0;return!1}var Ms=80,Jq=function(e,r){return"M95,"+(622+e+r)+`
127
+ c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
128
+ c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
129
+ c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
130
+ s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
131
+ c69,-144,104.5,-217.7,106.5,-221
132
+ l`+e/2.075+" -"+e+`
133
+ c5.3,-9.3,12,-14,20,-14
134
+ H400000v`+(40+e)+`H845.2724
135
+ s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
136
+ c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
137
+ M`+(834+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},ej=function(e,r){return"M263,"+(601+e+r)+`c0.7,0,18,39.7,52,119
138
+ c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
139
+ c340,-704.7,510.7,-1060.3,512,-1067
140
+ l`+e/2.084+" -"+e+`
141
+ c4.7,-7.3,11,-11,19,-11
142
+ H40000v`+(40+e)+`H1012.3
143
+ s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
144
+ c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
145
+ s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
146
+ c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
147
+ M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},tj=function(e,r){return"M983 "+(10+e+r)+`
148
+ l`+e/3.13+" -"+e+`
149
+ c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`
150
+ H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
151
+ s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
152
+ c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
153
+ c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
154
+ c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
155
+ c53.7,-170.3,84.5,-266.8,92.5,-289.5z
156
+ M`+(1001+e)+" "+r+"h400000v"+(40+e)+"h-400000z"},rj=function(e,r){return"M424,"+(2398+e+r)+`
157
+ c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
158
+ c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
159
+ s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
160
+ s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
161
+ l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000
162
+ v`+(40+e)+`H1014.6
163
+ s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
164
+ c-2,6,-10,9,-24,9
165
+ c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+r+`
166
+ h400000v`+(40+e)+"h-400000z"},nj=function(e,r){return"M473,"+(2713+e+r)+`
167
+ c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+`
168
+ c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7
169
+ s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
170
+ c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
171
+ c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
172
+ s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
173
+ 606zM`+(1001+e)+" "+r+"h400000v"+(40+e)+"H1017.7z"},ij=function(e){var r=e/2;return"M400000 "+e+" H0 L"+r+" 0 l65 45 L145 "+(e-80)+" H400000z"},aj=function(e,r,n){var i=n-54-r-e;return"M702 "+(e+r)+"H400000"+(40+e)+`
174
+ H742v`+i+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
175
+ h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
176
+ c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
177
+ 219 661 l218 661zM702 `+r+"H400000v"+(40+e)+"H742z"},sj=function(e,r,n){r=1e3*r;var i="";switch(e){case"sqrtMain":i=Jq(r,Ms);break;case"sqrtSize1":i=ej(r,Ms);break;case"sqrtSize2":i=tj(r,Ms);break;case"sqrtSize3":i=rj(r,Ms);break;case"sqrtSize4":i=nj(r,Ms);break;case"sqrtTall":i=aj(r,Ms,n)}return i},oj=function(e,r){switch(e){case"⎜":return"M291 0 H417 V"+r+" H291z M291 0 H417 V"+r+" H291z";case"∣":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z";case"∥":return"M145 0 H188 V"+r+" H145z M145 0 H188 V"+r+" H145z"+("M367 0 H410 V"+r+" H367z M367 0 H410 V"+r+" H367z");case"⎟":return"M457 0 H583 V"+r+" H457z M457 0 H583 V"+r+" H457z";case"⎢":return"M319 0 H403 V"+r+" H319z M319 0 H403 V"+r+" H319z";case"⎥":return"M263 0 H347 V"+r+" H263z M263 0 H347 V"+r+" H263z";case"⎪":return"M384 0 H504 V"+r+" H384z M384 0 H504 V"+r+" H384z";case"⏐":return"M312 0 H355 V"+r+" H312z M312 0 H355 V"+r+" H312z";case"‖":return"M257 0 H300 V"+r+" H257z M257 0 H300 V"+r+" H257z"+("M478 0 H521 V"+r+" H478z M478 0 H521 V"+r+" H478z");default:return""}},iy={doubleleftarrow:`M262 157
178
+ l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
179
+ 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
180
+ 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
181
+ c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
182
+ 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
183
+ -86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
184
+ -2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
185
+ m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
186
+ -10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
187
+ 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
188
+ -33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
189
+ -17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
190
+ -13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
191
+ c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
192
+ -107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
193
+ 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
194
+ -5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
195
+ c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
196
+ 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
197
+ 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
198
+ l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
199
+ -45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
200
+ 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
201
+ 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
202
+ 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
203
+ -331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
204
+ H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
205
+ 435 0h399565z`,leftgroupunder:`M400000 262
206
+ H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
207
+ 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
208
+ -3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
209
+ -18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
210
+ -196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
211
+ 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
212
+ -4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
213
+ -10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
214
+ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
215
+ 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
216
+ 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
217
+ -152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
218
+ 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
219
+ -2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
220
+ v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
221
+ -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
222
+ -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
223
+ 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
224
+ M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
225
+ M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
226
+ -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
227
+ c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
228
+ 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
229
+ M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
230
+ c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
231
+ -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
232
+ 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
233
+ 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
234
+ c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
235
+ 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
236
+ 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
237
+ -5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
238
+ -320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
239
+ m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
240
+ 60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
241
+ -451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
242
+ m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
243
+ c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
244
+ -480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
245
+ m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
246
+ 85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
247
+ -707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
248
+ m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
249
+ c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
250
+ -16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
251
+ 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
252
+ 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
253
+ -40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
254
+ -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
255
+ 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
256
+ -6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
257
+ s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
258
+ c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
259
+ 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
260
+ -174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
261
+ 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
262
+ 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
263
+ -3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
264
+ -10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
265
+ 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
266
+ -18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
267
+ 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
268
+ m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
269
+ 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
270
+ -7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
271
+ -27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
272
+ 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
273
+ 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
274
+ -64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
275
+ m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
276
+ 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
277
+ -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
278
+ 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
279
+ M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
280
+ 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
281
+ -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
282
+ -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
283
+ 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
284
+ -70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
285
+ -40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
286
+ -37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
287
+ 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
288
+ c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
289
+ 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
290
+ 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
291
+ -19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
292
+ 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
293
+ -2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
294
+ 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
295
+ 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
296
+ -68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
297
+ -8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
298
+ 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
299
+ c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
300
+ 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
301
+ -11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
302
+ 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
303
+ 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
304
+ -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
305
+ -11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
306
+ 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
307
+ 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
308
+ -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
309
+ 3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
310
+ 10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
311
+ -1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
312
+ -7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
313
+ H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
314
+ c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
315
+ c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
316
+ -11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
317
+ -11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
318
+ -11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
319
+ -5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
320
+ -11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
321
+ -11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
322
+ -11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
323
+ c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
324
+ c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
325
+ s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
326
+ 121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
327
+ s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
328
+ c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
329
+ M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
330
+ -27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
331
+ 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
332
+ -84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
333
+ -119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
334
+ -12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
335
+ 151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
336
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
337
+ c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
338
+ c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
339
+ c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
340
+ M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
341
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
342
+ -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
343
+ c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
344
+ M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
345
+ c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
346
+ 1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
347
+ -152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
348
+ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
349
+ c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
350
+ -231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
351
+ c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
352
+ M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},lj=function(e,r){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 h347 v-84
353
+ H403z M403 1759 V0 H319 V1759 v`+r+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z
354
+ M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
355
+ c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
356
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15
357
+ c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
358
+ c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z
359
+ M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15
360
+ c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15
361
+ c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z
362
+ MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z
363
+ MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z
364
+ M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z
365
+ M347 1759 V0 h-84 V1759 v`+r+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
366
+ c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
367
+ -36,557 l0,`+(r+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
368
+ 949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
369
+ c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
370
+ -544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
371
+ l0,-`+(r+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
372
+ -210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
373
+ 63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
374
+ c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(r+9)+`
375
+ c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
376
+ c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
377
+ c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
378
+ c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
379
+ l0,-`+(r+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
380
+ -470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class Sc{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),r=0;r<this.children.length;r++)e.appendChild(this.children[r].toNode());return e}toMarkup(){for(var e="",r=0;r<this.children.length;r++)e+=this.children[r].toMarkup();return e}toText(){var e=r=>r.toText();return this.children.map(e).join("")}}var fi={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Kc={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},ay={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function yv(t,e){fi[t]=e}function b1(t,e,r){if(!fi[e])throw new Error("Font metrics not found for font: "+e+".");var n=t.charCodeAt(0),i=fi[e][n];if(!i&&t[0]in ay&&(n=ay[t[0]].charCodeAt(0),i=fi[e][n]),!i&&r==="text"&&bv(n)&&(i=fi[e][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var $d={};function cj(t){var e;if(t>=5?e=0:t>=3?e=1:e=2,!$d[e]){var r=$d[e]={cssEmPerMu:Kc.quad[e]/18};for(var n in Kc)Kc.hasOwnProperty(n)&&(r[n]=Kc[n][e])}return $d[e]}var uj=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],sy=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],oy=function(e,r){return r.size<2?e:uj[e-1][r.size-1]};class Oi{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||Oi.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=sy[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);return new Oi(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:oy(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:sy[e-1]})}havingBaseStyle(e){e=e||this.style.text();var r=oy(Oi.BASESIZE,e);return this.size===r&&this.textSize===Oi.BASESIZE&&this.style===e?this:this.extend({style:e,size:r})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Oi.BASESIZE?["sizing","reset-size"+this.size,"size"+Oi.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=cj(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Oi.BASESIZE=6;var np={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},hj={ex:!0,em:!0,mu:!0},xv=function(e){return typeof e!="string"&&(e=e.unit),e in np||e in hj||e==="ex"},Kt=function(e,r){var n;if(e.unit in np)n=np[e.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(e.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,e.unit==="ex")n=i.fontMetrics().xHeight;else if(e.unit==="em")n=i.fontMetrics().quad;else throw new Te("Invalid unit: '"+e.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(e.number*n,r.maxSize)},Ae=function(e){return+e.toFixed(4)+"em"},va=function(e){return e.filter(r=>r).join(" ")},vv=function(e,r,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},kv=function(e){var r=document.createElement(e);r.className=va(this.classes);for(var n in this.style)this.style.hasOwnProperty(n)&&(r.style[n]=this.style[n]);for(var i in this.attributes)this.attributes.hasOwnProperty(i)&&r.setAttribute(i,this.attributes[i]);for(var a=0;a<this.children.length;a++)r.appendChild(this.children[a].toNode());return r},dj=/[\s"'>/=\x00-\x1f]/,wv=function(e){var r="<"+e;this.classes.length&&(r+=' class="'+Mt.escape(va(this.classes))+'"');var n="";for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=Mt.hyphenate(i)+":"+this.style[i]+";");n&&(r+=' style="'+Mt.escape(n)+'"');for(var a in this.attributes)if(this.attributes.hasOwnProperty(a)){if(dj.test(a))throw new Te("Invalid attribute name '"+a+"'");r+=" "+a+'="'+Mt.escape(this.attributes[a])+'"'}r+=">";for(var s=0;s<this.children.length;s++)r+=this.children[s].toMarkup();return r+="</"+e+">",r};class _c{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,vv.call(this,e,n,i),this.children=r||[]}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return this.classes.includes(e)}toNode(){return kv.call(this,"span")}toMarkup(){return wv.call(this,"span")}}class y1{constructor(e,r,n,i){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,vv.call(this,r,i),this.children=n||[],this.setAttribute("href",e)}setAttribute(e,r){this.attributes[e]=r}hasClass(e){return this.classes.includes(e)}toNode(){return kv.call(this,"a")}toMarkup(){return wv.call(this,"a")}}class fj{constructor(e,r,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=r,this.src=e,this.classes=["mord"],this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var r in this.style)this.style.hasOwnProperty(r)&&(e.style[r]=this.style[r]);return e}toMarkup(){var e='<img src="'+Mt.escape(this.src)+'"'+(' alt="'+Mt.escape(this.alt)+'"'),r="";for(var n in this.style)this.style.hasOwnProperty(n)&&(r+=Mt.hyphenate(n)+":"+this.style[n]+";");return r&&(e+=' style="'+Mt.escape(r)+'"'),e+="'/>",e}}var pj={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class On{constructor(e,r,n,i,a,s,o,l){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=r||0,this.depth=n||0,this.italic=i||0,this.skew=a||0,this.width=s||0,this.classes=o||[],this.style=l||{},this.maxFontSize=0;var c=Zq(this.text.charCodeAt(0));c&&this.classes.push(c+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=pj[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),r=null;this.italic>0&&(r=document.createElement("span"),r.style.marginRight=Ae(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=va(this.classes));for(var n in this.style)this.style.hasOwnProperty(n)&&(r=r||document.createElement("span"),r.style[n]=this.style[n]);return r?(r.appendChild(e),r):e}toMarkup(){var e=!1,r="<span";this.classes.length&&(e=!0,r+=' class="',r+=Mt.escape(va(this.classes)),r+='"');var n="";this.italic>0&&(n+="margin-right:"+this.italic+"em;");for(var i in this.style)this.style.hasOwnProperty(i)&&(n+=Mt.hyphenate(i)+":"+this.style[i]+";");n&&(e=!0,r+=' style="'+Mt.escape(n)+'"');var a=Mt.escape(this.text);return e?(r+=">",r+=a,r+="</span>",r):a}}class Gi{constructor(e,r){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=r||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"svg");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);for(var i=0;i<this.children.length;i++)r.appendChild(this.children[i].toNode());return r}toMarkup(){var e='<svg xmlns="http://www.w3.org/2000/svg"';for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+'="'+Mt.escape(this.attributes[r])+'"');e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</svg>",e}}class ka{constructor(e,r){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=r}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"path");return this.alternate?r.setAttribute("d",this.alternate):r.setAttribute("d",iy[this.pathName]),r}toMarkup(){return this.alternate?'<path d="'+Mt.escape(this.alternate)+'"/>':'<path d="'+Mt.escape(iy[this.pathName])+'"/>'}}class ip{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",r=document.createElementNS(e,"line");for(var n in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,n)&&r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var e="<line";for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+'="'+Mt.escape(this.attributes[r])+'"');return e+="/>",e}}function ly(t){if(t instanceof On)return t;throw new Error("Expected symbolNode but got "+String(t)+".")}function mj(t){if(t instanceof _c)return t;throw new Error("Expected span<HtmlDomNode> but got "+String(t)+".")}var gj={bin:1,close:1,inner:1,open:1,punct:1,rel:1},bj={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Ht={math:{},text:{}};function x(t,e,r,n,i,a){Ht[t][i]={font:e,group:r,replace:n},a&&n&&(Ht[t][n]=Ht[t][i])}var T="math",me="text",A="main",z="ams",Vt="accent-token",Oe="bin",Qr="close",Lo="inner",nt="mathord",ur="op-token",_n="open",yh="punct",H="rel",Zi="spacing",Z="textord";x(T,A,H,"≡","\\equiv",!0);x(T,A,H,"≺","\\prec",!0);x(T,A,H,"≻","\\succ",!0);x(T,A,H,"∼","\\sim",!0);x(T,A,H,"⊥","\\perp");x(T,A,H,"⪯","\\preceq",!0);x(T,A,H,"⪰","\\succeq",!0);x(T,A,H,"≃","\\simeq",!0);x(T,A,H,"∣","\\mid",!0);x(T,A,H,"≪","\\ll",!0);x(T,A,H,"≫","\\gg",!0);x(T,A,H,"≍","\\asymp",!0);x(T,A,H,"∥","\\parallel");x(T,A,H,"⋈","\\bowtie",!0);x(T,A,H,"⌣","\\smile",!0);x(T,A,H,"⊑","\\sqsubseteq",!0);x(T,A,H,"⊒","\\sqsupseteq",!0);x(T,A,H,"≐","\\doteq",!0);x(T,A,H,"⌢","\\frown",!0);x(T,A,H,"∋","\\ni",!0);x(T,A,H,"∝","\\propto",!0);x(T,A,H,"⊢","\\vdash",!0);x(T,A,H,"⊣","\\dashv",!0);x(T,A,H,"∋","\\owns");x(T,A,yh,".","\\ldotp");x(T,A,yh,"⋅","\\cdotp");x(T,A,Z,"#","\\#");x(me,A,Z,"#","\\#");x(T,A,Z,"&","\\&");x(me,A,Z,"&","\\&");x(T,A,Z,"ℵ","\\aleph",!0);x(T,A,Z,"∀","\\forall",!0);x(T,A,Z,"ℏ","\\hbar",!0);x(T,A,Z,"∃","\\exists",!0);x(T,A,Z,"∇","\\nabla",!0);x(T,A,Z,"♭","\\flat",!0);x(T,A,Z,"ℓ","\\ell",!0);x(T,A,Z,"♮","\\natural",!0);x(T,A,Z,"♣","\\clubsuit",!0);x(T,A,Z,"℘","\\wp",!0);x(T,A,Z,"♯","\\sharp",!0);x(T,A,Z,"♢","\\diamondsuit",!0);x(T,A,Z,"ℜ","\\Re",!0);x(T,A,Z,"♡","\\heartsuit",!0);x(T,A,Z,"ℑ","\\Im",!0);x(T,A,Z,"♠","\\spadesuit",!0);x(T,A,Z,"§","\\S",!0);x(me,A,Z,"§","\\S");x(T,A,Z,"¶","\\P",!0);x(me,A,Z,"¶","\\P");x(T,A,Z,"†","\\dag");x(me,A,Z,"†","\\dag");x(me,A,Z,"†","\\textdagger");x(T,A,Z,"‡","\\ddag");x(me,A,Z,"‡","\\ddag");x(me,A,Z,"‡","\\textdaggerdbl");x(T,A,Qr,"⎱","\\rmoustache",!0);x(T,A,_n,"⎰","\\lmoustache",!0);x(T,A,Qr,"⟯","\\rgroup",!0);x(T,A,_n,"⟮","\\lgroup",!0);x(T,A,Oe,"∓","\\mp",!0);x(T,A,Oe,"⊖","\\ominus",!0);x(T,A,Oe,"⊎","\\uplus",!0);x(T,A,Oe,"⊓","\\sqcap",!0);x(T,A,Oe,"∗","\\ast");x(T,A,Oe,"⊔","\\sqcup",!0);x(T,A,Oe,"◯","\\bigcirc",!0);x(T,A,Oe,"∙","\\bullet",!0);x(T,A,Oe,"‡","\\ddagger");x(T,A,Oe,"≀","\\wr",!0);x(T,A,Oe,"⨿","\\amalg");x(T,A,Oe,"&","\\And");x(T,A,H,"⟵","\\longleftarrow",!0);x(T,A,H,"⇐","\\Leftarrow",!0);x(T,A,H,"⟸","\\Longleftarrow",!0);x(T,A,H,"⟶","\\longrightarrow",!0);x(T,A,H,"⇒","\\Rightarrow",!0);x(T,A,H,"⟹","\\Longrightarrow",!0);x(T,A,H,"↔","\\leftrightarrow",!0);x(T,A,H,"⟷","\\longleftrightarrow",!0);x(T,A,H,"⇔","\\Leftrightarrow",!0);x(T,A,H,"⟺","\\Longleftrightarrow",!0);x(T,A,H,"↦","\\mapsto",!0);x(T,A,H,"⟼","\\longmapsto",!0);x(T,A,H,"↗","\\nearrow",!0);x(T,A,H,"↩","\\hookleftarrow",!0);x(T,A,H,"↪","\\hookrightarrow",!0);x(T,A,H,"↘","\\searrow",!0);x(T,A,H,"↼","\\leftharpoonup",!0);x(T,A,H,"⇀","\\rightharpoonup",!0);x(T,A,H,"↙","\\swarrow",!0);x(T,A,H,"↽","\\leftharpoondown",!0);x(T,A,H,"⇁","\\rightharpoondown",!0);x(T,A,H,"↖","\\nwarrow",!0);x(T,A,H,"⇌","\\rightleftharpoons",!0);x(T,z,H,"≮","\\nless",!0);x(T,z,H,"","\\@nleqslant");x(T,z,H,"","\\@nleqq");x(T,z,H,"⪇","\\lneq",!0);x(T,z,H,"≨","\\lneqq",!0);x(T,z,H,"","\\@lvertneqq");x(T,z,H,"⋦","\\lnsim",!0);x(T,z,H,"⪉","\\lnapprox",!0);x(T,z,H,"⊀","\\nprec",!0);x(T,z,H,"⋠","\\npreceq",!0);x(T,z,H,"⋨","\\precnsim",!0);x(T,z,H,"⪹","\\precnapprox",!0);x(T,z,H,"≁","\\nsim",!0);x(T,z,H,"","\\@nshortmid");x(T,z,H,"∤","\\nmid",!0);x(T,z,H,"⊬","\\nvdash",!0);x(T,z,H,"⊭","\\nvDash",!0);x(T,z,H,"⋪","\\ntriangleleft");x(T,z,H,"⋬","\\ntrianglelefteq",!0);x(T,z,H,"⊊","\\subsetneq",!0);x(T,z,H,"","\\@varsubsetneq");x(T,z,H,"⫋","\\subsetneqq",!0);x(T,z,H,"","\\@varsubsetneqq");x(T,z,H,"≯","\\ngtr",!0);x(T,z,H,"","\\@ngeqslant");x(T,z,H,"","\\@ngeqq");x(T,z,H,"⪈","\\gneq",!0);x(T,z,H,"≩","\\gneqq",!0);x(T,z,H,"","\\@gvertneqq");x(T,z,H,"⋧","\\gnsim",!0);x(T,z,H,"⪊","\\gnapprox",!0);x(T,z,H,"⊁","\\nsucc",!0);x(T,z,H,"⋡","\\nsucceq",!0);x(T,z,H,"⋩","\\succnsim",!0);x(T,z,H,"⪺","\\succnapprox",!0);x(T,z,H,"≆","\\ncong",!0);x(T,z,H,"","\\@nshortparallel");x(T,z,H,"∦","\\nparallel",!0);x(T,z,H,"⊯","\\nVDash",!0);x(T,z,H,"⋫","\\ntriangleright");x(T,z,H,"⋭","\\ntrianglerighteq",!0);x(T,z,H,"","\\@nsupseteqq");x(T,z,H,"⊋","\\supsetneq",!0);x(T,z,H,"","\\@varsupsetneq");x(T,z,H,"⫌","\\supsetneqq",!0);x(T,z,H,"","\\@varsupsetneqq");x(T,z,H,"⊮","\\nVdash",!0);x(T,z,H,"⪵","\\precneqq",!0);x(T,z,H,"⪶","\\succneqq",!0);x(T,z,H,"","\\@nsubseteqq");x(T,z,Oe,"⊴","\\unlhd");x(T,z,Oe,"⊵","\\unrhd");x(T,z,H,"↚","\\nleftarrow",!0);x(T,z,H,"↛","\\nrightarrow",!0);x(T,z,H,"⇍","\\nLeftarrow",!0);x(T,z,H,"⇏","\\nRightarrow",!0);x(T,z,H,"↮","\\nleftrightarrow",!0);x(T,z,H,"⇎","\\nLeftrightarrow",!0);x(T,z,H,"△","\\vartriangle");x(T,z,Z,"ℏ","\\hslash");x(T,z,Z,"▽","\\triangledown");x(T,z,Z,"◊","\\lozenge");x(T,z,Z,"Ⓢ","\\circledS");x(T,z,Z,"®","\\circledR");x(me,z,Z,"®","\\circledR");x(T,z,Z,"∡","\\measuredangle",!0);x(T,z,Z,"∄","\\nexists");x(T,z,Z,"℧","\\mho");x(T,z,Z,"Ⅎ","\\Finv",!0);x(T,z,Z,"⅁","\\Game",!0);x(T,z,Z,"‵","\\backprime");x(T,z,Z,"▲","\\blacktriangle");x(T,z,Z,"▼","\\blacktriangledown");x(T,z,Z,"■","\\blacksquare");x(T,z,Z,"⧫","\\blacklozenge");x(T,z,Z,"★","\\bigstar");x(T,z,Z,"∢","\\sphericalangle",!0);x(T,z,Z,"∁","\\complement",!0);x(T,z,Z,"ð","\\eth",!0);x(me,A,Z,"ð","ð");x(T,z,Z,"╱","\\diagup");x(T,z,Z,"╲","\\diagdown");x(T,z,Z,"□","\\square");x(T,z,Z,"□","\\Box");x(T,z,Z,"◊","\\Diamond");x(T,z,Z,"¥","\\yen",!0);x(me,z,Z,"¥","\\yen",!0);x(T,z,Z,"✓","\\checkmark",!0);x(me,z,Z,"✓","\\checkmark");x(T,z,Z,"ℶ","\\beth",!0);x(T,z,Z,"ℸ","\\daleth",!0);x(T,z,Z,"ℷ","\\gimel",!0);x(T,z,Z,"ϝ","\\digamma",!0);x(T,z,Z,"ϰ","\\varkappa");x(T,z,_n,"┌","\\@ulcorner",!0);x(T,z,Qr,"┐","\\@urcorner",!0);x(T,z,_n,"└","\\@llcorner",!0);x(T,z,Qr,"┘","\\@lrcorner",!0);x(T,z,H,"≦","\\leqq",!0);x(T,z,H,"⩽","\\leqslant",!0);x(T,z,H,"⪕","\\eqslantless",!0);x(T,z,H,"≲","\\lesssim",!0);x(T,z,H,"⪅","\\lessapprox",!0);x(T,z,H,"≊","\\approxeq",!0);x(T,z,Oe,"⋖","\\lessdot");x(T,z,H,"⋘","\\lll",!0);x(T,z,H,"≶","\\lessgtr",!0);x(T,z,H,"⋚","\\lesseqgtr",!0);x(T,z,H,"⪋","\\lesseqqgtr",!0);x(T,z,H,"≑","\\doteqdot");x(T,z,H,"≓","\\risingdotseq",!0);x(T,z,H,"≒","\\fallingdotseq",!0);x(T,z,H,"∽","\\backsim",!0);x(T,z,H,"⋍","\\backsimeq",!0);x(T,z,H,"⫅","\\subseteqq",!0);x(T,z,H,"⋐","\\Subset",!0);x(T,z,H,"⊏","\\sqsubset",!0);x(T,z,H,"≼","\\preccurlyeq",!0);x(T,z,H,"⋞","\\curlyeqprec",!0);x(T,z,H,"≾","\\precsim",!0);x(T,z,H,"⪷","\\precapprox",!0);x(T,z,H,"⊲","\\vartriangleleft");x(T,z,H,"⊴","\\trianglelefteq");x(T,z,H,"⊨","\\vDash",!0);x(T,z,H,"⊪","\\Vvdash",!0);x(T,z,H,"⌣","\\smallsmile");x(T,z,H,"⌢","\\smallfrown");x(T,z,H,"≏","\\bumpeq",!0);x(T,z,H,"≎","\\Bumpeq",!0);x(T,z,H,"≧","\\geqq",!0);x(T,z,H,"⩾","\\geqslant",!0);x(T,z,H,"⪖","\\eqslantgtr",!0);x(T,z,H,"≳","\\gtrsim",!0);x(T,z,H,"⪆","\\gtrapprox",!0);x(T,z,Oe,"⋗","\\gtrdot");x(T,z,H,"⋙","\\ggg",!0);x(T,z,H,"≷","\\gtrless",!0);x(T,z,H,"⋛","\\gtreqless",!0);x(T,z,H,"⪌","\\gtreqqless",!0);x(T,z,H,"≖","\\eqcirc",!0);x(T,z,H,"≗","\\circeq",!0);x(T,z,H,"≜","\\triangleq",!0);x(T,z,H,"∼","\\thicksim");x(T,z,H,"≈","\\thickapprox");x(T,z,H,"⫆","\\supseteqq",!0);x(T,z,H,"⋑","\\Supset",!0);x(T,z,H,"⊐","\\sqsupset",!0);x(T,z,H,"≽","\\succcurlyeq",!0);x(T,z,H,"⋟","\\curlyeqsucc",!0);x(T,z,H,"≿","\\succsim",!0);x(T,z,H,"⪸","\\succapprox",!0);x(T,z,H,"⊳","\\vartriangleright");x(T,z,H,"⊵","\\trianglerighteq");x(T,z,H,"⊩","\\Vdash",!0);x(T,z,H,"∣","\\shortmid");x(T,z,H,"∥","\\shortparallel");x(T,z,H,"≬","\\between",!0);x(T,z,H,"⋔","\\pitchfork",!0);x(T,z,H,"∝","\\varpropto");x(T,z,H,"◀","\\blacktriangleleft");x(T,z,H,"∴","\\therefore",!0);x(T,z,H,"∍","\\backepsilon");x(T,z,H,"▶","\\blacktriangleright");x(T,z,H,"∵","\\because",!0);x(T,z,H,"⋘","\\llless");x(T,z,H,"⋙","\\gggtr");x(T,z,Oe,"⊲","\\lhd");x(T,z,Oe,"⊳","\\rhd");x(T,z,H,"≂","\\eqsim",!0);x(T,A,H,"⋈","\\Join");x(T,z,H,"≑","\\Doteq",!0);x(T,z,Oe,"∔","\\dotplus",!0);x(T,z,Oe,"∖","\\smallsetminus");x(T,z,Oe,"⋒","\\Cap",!0);x(T,z,Oe,"⋓","\\Cup",!0);x(T,z,Oe,"⩞","\\doublebarwedge",!0);x(T,z,Oe,"⊟","\\boxminus",!0);x(T,z,Oe,"⊞","\\boxplus",!0);x(T,z,Oe,"⋇","\\divideontimes",!0);x(T,z,Oe,"⋉","\\ltimes",!0);x(T,z,Oe,"⋊","\\rtimes",!0);x(T,z,Oe,"⋋","\\leftthreetimes",!0);x(T,z,Oe,"⋌","\\rightthreetimes",!0);x(T,z,Oe,"⋏","\\curlywedge",!0);x(T,z,Oe,"⋎","\\curlyvee",!0);x(T,z,Oe,"⊝","\\circleddash",!0);x(T,z,Oe,"⊛","\\circledast",!0);x(T,z,Oe,"⋅","\\centerdot");x(T,z,Oe,"⊺","\\intercal",!0);x(T,z,Oe,"⋒","\\doublecap");x(T,z,Oe,"⋓","\\doublecup");x(T,z,Oe,"⊠","\\boxtimes",!0);x(T,z,H,"⇢","\\dashrightarrow",!0);x(T,z,H,"⇠","\\dashleftarrow",!0);x(T,z,H,"⇇","\\leftleftarrows",!0);x(T,z,H,"⇆","\\leftrightarrows",!0);x(T,z,H,"⇚","\\Lleftarrow",!0);x(T,z,H,"↞","\\twoheadleftarrow",!0);x(T,z,H,"↢","\\leftarrowtail",!0);x(T,z,H,"↫","\\looparrowleft",!0);x(T,z,H,"⇋","\\leftrightharpoons",!0);x(T,z,H,"↶","\\curvearrowleft",!0);x(T,z,H,"↺","\\circlearrowleft",!0);x(T,z,H,"↰","\\Lsh",!0);x(T,z,H,"⇈","\\upuparrows",!0);x(T,z,H,"↿","\\upharpoonleft",!0);x(T,z,H,"⇃","\\downharpoonleft",!0);x(T,A,H,"⊶","\\origof",!0);x(T,A,H,"⊷","\\imageof",!0);x(T,z,H,"⊸","\\multimap",!0);x(T,z,H,"↭","\\leftrightsquigarrow",!0);x(T,z,H,"⇉","\\rightrightarrows",!0);x(T,z,H,"⇄","\\rightleftarrows",!0);x(T,z,H,"↠","\\twoheadrightarrow",!0);x(T,z,H,"↣","\\rightarrowtail",!0);x(T,z,H,"↬","\\looparrowright",!0);x(T,z,H,"↷","\\curvearrowright",!0);x(T,z,H,"↻","\\circlearrowright",!0);x(T,z,H,"↱","\\Rsh",!0);x(T,z,H,"⇊","\\downdownarrows",!0);x(T,z,H,"↾","\\upharpoonright",!0);x(T,z,H,"⇂","\\downharpoonright",!0);x(T,z,H,"⇝","\\rightsquigarrow",!0);x(T,z,H,"⇝","\\leadsto");x(T,z,H,"⇛","\\Rrightarrow",!0);x(T,z,H,"↾","\\restriction");x(T,A,Z,"‘","`");x(T,A,Z,"$","\\$");x(me,A,Z,"$","\\$");x(me,A,Z,"$","\\textdollar");x(T,A,Z,"%","\\%");x(me,A,Z,"%","\\%");x(T,A,Z,"_","\\_");x(me,A,Z,"_","\\_");x(me,A,Z,"_","\\textunderscore");x(T,A,Z,"∠","\\angle",!0);x(T,A,Z,"∞","\\infty",!0);x(T,A,Z,"′","\\prime");x(T,A,Z,"△","\\triangle");x(T,A,Z,"Γ","\\Gamma",!0);x(T,A,Z,"Δ","\\Delta",!0);x(T,A,Z,"Θ","\\Theta",!0);x(T,A,Z,"Λ","\\Lambda",!0);x(T,A,Z,"Ξ","\\Xi",!0);x(T,A,Z,"Π","\\Pi",!0);x(T,A,Z,"Σ","\\Sigma",!0);x(T,A,Z,"Υ","\\Upsilon",!0);x(T,A,Z,"Φ","\\Phi",!0);x(T,A,Z,"Ψ","\\Psi",!0);x(T,A,Z,"Ω","\\Omega",!0);x(T,A,Z,"A","Α");x(T,A,Z,"B","Β");x(T,A,Z,"E","Ε");x(T,A,Z,"Z","Ζ");x(T,A,Z,"H","Η");x(T,A,Z,"I","Ι");x(T,A,Z,"K","Κ");x(T,A,Z,"M","Μ");x(T,A,Z,"N","Ν");x(T,A,Z,"O","Ο");x(T,A,Z,"P","Ρ");x(T,A,Z,"T","Τ");x(T,A,Z,"X","Χ");x(T,A,Z,"¬","\\neg",!0);x(T,A,Z,"¬","\\lnot");x(T,A,Z,"⊤","\\top");x(T,A,Z,"⊥","\\bot");x(T,A,Z,"∅","\\emptyset");x(T,z,Z,"∅","\\varnothing");x(T,A,nt,"α","\\alpha",!0);x(T,A,nt,"β","\\beta",!0);x(T,A,nt,"γ","\\gamma",!0);x(T,A,nt,"δ","\\delta",!0);x(T,A,nt,"ϵ","\\epsilon",!0);x(T,A,nt,"ζ","\\zeta",!0);x(T,A,nt,"η","\\eta",!0);x(T,A,nt,"θ","\\theta",!0);x(T,A,nt,"ι","\\iota",!0);x(T,A,nt,"κ","\\kappa",!0);x(T,A,nt,"λ","\\lambda",!0);x(T,A,nt,"μ","\\mu",!0);x(T,A,nt,"ν","\\nu",!0);x(T,A,nt,"ξ","\\xi",!0);x(T,A,nt,"ο","\\omicron",!0);x(T,A,nt,"π","\\pi",!0);x(T,A,nt,"ρ","\\rho",!0);x(T,A,nt,"σ","\\sigma",!0);x(T,A,nt,"τ","\\tau",!0);x(T,A,nt,"υ","\\upsilon",!0);x(T,A,nt,"ϕ","\\phi",!0);x(T,A,nt,"χ","\\chi",!0);x(T,A,nt,"ψ","\\psi",!0);x(T,A,nt,"ω","\\omega",!0);x(T,A,nt,"ε","\\varepsilon",!0);x(T,A,nt,"ϑ","\\vartheta",!0);x(T,A,nt,"ϖ","\\varpi",!0);x(T,A,nt,"ϱ","\\varrho",!0);x(T,A,nt,"ς","\\varsigma",!0);x(T,A,nt,"φ","\\varphi",!0);x(T,A,Oe,"∗","*",!0);x(T,A,Oe,"+","+");x(T,A,Oe,"−","-",!0);x(T,A,Oe,"⋅","\\cdot",!0);x(T,A,Oe,"∘","\\circ",!0);x(T,A,Oe,"÷","\\div",!0);x(T,A,Oe,"±","\\pm",!0);x(T,A,Oe,"×","\\times",!0);x(T,A,Oe,"∩","\\cap",!0);x(T,A,Oe,"∪","\\cup",!0);x(T,A,Oe,"∖","\\setminus",!0);x(T,A,Oe,"∧","\\land");x(T,A,Oe,"∨","\\lor");x(T,A,Oe,"∧","\\wedge",!0);x(T,A,Oe,"∨","\\vee",!0);x(T,A,Z,"√","\\surd");x(T,A,_n,"⟨","\\langle",!0);x(T,A,_n,"∣","\\lvert");x(T,A,_n,"∥","\\lVert");x(T,A,Qr,"?","?");x(T,A,Qr,"!","!");x(T,A,Qr,"⟩","\\rangle",!0);x(T,A,Qr,"∣","\\rvert");x(T,A,Qr,"∥","\\rVert");x(T,A,H,"=","=");x(T,A,H,":",":");x(T,A,H,"≈","\\approx",!0);x(T,A,H,"≅","\\cong",!0);x(T,A,H,"≥","\\ge");x(T,A,H,"≥","\\geq",!0);x(T,A,H,"←","\\gets");x(T,A,H,">","\\gt",!0);x(T,A,H,"∈","\\in",!0);x(T,A,H,"","\\@not");x(T,A,H,"⊂","\\subset",!0);x(T,A,H,"⊃","\\supset",!0);x(T,A,H,"⊆","\\subseteq",!0);x(T,A,H,"⊇","\\supseteq",!0);x(T,z,H,"⊈","\\nsubseteq",!0);x(T,z,H,"⊉","\\nsupseteq",!0);x(T,A,H,"⊨","\\models");x(T,A,H,"←","\\leftarrow",!0);x(T,A,H,"≤","\\le");x(T,A,H,"≤","\\leq",!0);x(T,A,H,"<","\\lt",!0);x(T,A,H,"→","\\rightarrow",!0);x(T,A,H,"→","\\to");x(T,z,H,"≱","\\ngeq",!0);x(T,z,H,"≰","\\nleq",!0);x(T,A,Zi," ","\\ ");x(T,A,Zi," ","\\space");x(T,A,Zi," ","\\nobreakspace");x(me,A,Zi," ","\\ ");x(me,A,Zi," "," ");x(me,A,Zi," ","\\space");x(me,A,Zi," ","\\nobreakspace");x(T,A,Zi,null,"\\nobreak");x(T,A,Zi,null,"\\allowbreak");x(T,A,yh,",",",");x(T,A,yh,";",";");x(T,z,Oe,"⊼","\\barwedge",!0);x(T,z,Oe,"⊻","\\veebar",!0);x(T,A,Oe,"⊙","\\odot",!0);x(T,A,Oe,"⊕","\\oplus",!0);x(T,A,Oe,"⊗","\\otimes",!0);x(T,A,Z,"∂","\\partial",!0);x(T,A,Oe,"⊘","\\oslash",!0);x(T,z,Oe,"⊚","\\circledcirc",!0);x(T,z,Oe,"⊡","\\boxdot",!0);x(T,A,Oe,"△","\\bigtriangleup");x(T,A,Oe,"▽","\\bigtriangledown");x(T,A,Oe,"†","\\dagger");x(T,A,Oe,"⋄","\\diamond");x(T,A,Oe,"⋆","\\star");x(T,A,Oe,"◃","\\triangleleft");x(T,A,Oe,"▹","\\triangleright");x(T,A,_n,"{","\\{");x(me,A,Z,"{","\\{");x(me,A,Z,"{","\\textbraceleft");x(T,A,Qr,"}","\\}");x(me,A,Z,"}","\\}");x(me,A,Z,"}","\\textbraceright");x(T,A,_n,"{","\\lbrace");x(T,A,Qr,"}","\\rbrace");x(T,A,_n,"[","\\lbrack",!0);x(me,A,Z,"[","\\lbrack",!0);x(T,A,Qr,"]","\\rbrack",!0);x(me,A,Z,"]","\\rbrack",!0);x(T,A,_n,"(","\\lparen",!0);x(T,A,Qr,")","\\rparen",!0);x(me,A,Z,"<","\\textless",!0);x(me,A,Z,">","\\textgreater",!0);x(T,A,_n,"⌊","\\lfloor",!0);x(T,A,Qr,"⌋","\\rfloor",!0);x(T,A,_n,"⌈","\\lceil",!0);x(T,A,Qr,"⌉","\\rceil",!0);x(T,A,Z,"\\","\\backslash");x(T,A,Z,"∣","|");x(T,A,Z,"∣","\\vert");x(me,A,Z,"|","\\textbar",!0);x(T,A,Z,"∥","\\|");x(T,A,Z,"∥","\\Vert");x(me,A,Z,"∥","\\textbardbl");x(me,A,Z,"~","\\textasciitilde");x(me,A,Z,"\\","\\textbackslash");x(me,A,Z,"^","\\textasciicircum");x(T,A,H,"↑","\\uparrow",!0);x(T,A,H,"⇑","\\Uparrow",!0);x(T,A,H,"↓","\\downarrow",!0);x(T,A,H,"⇓","\\Downarrow",!0);x(T,A,H,"↕","\\updownarrow",!0);x(T,A,H,"⇕","\\Updownarrow",!0);x(T,A,ur,"∐","\\coprod");x(T,A,ur,"⋁","\\bigvee");x(T,A,ur,"⋀","\\bigwedge");x(T,A,ur,"⨄","\\biguplus");x(T,A,ur,"⋂","\\bigcap");x(T,A,ur,"⋃","\\bigcup");x(T,A,ur,"∫","\\int");x(T,A,ur,"∫","\\intop");x(T,A,ur,"∬","\\iint");x(T,A,ur,"∭","\\iiint");x(T,A,ur,"∏","\\prod");x(T,A,ur,"∑","\\sum");x(T,A,ur,"⨂","\\bigotimes");x(T,A,ur,"⨁","\\bigoplus");x(T,A,ur,"⨀","\\bigodot");x(T,A,ur,"∮","\\oint");x(T,A,ur,"∯","\\oiint");x(T,A,ur,"∰","\\oiiint");x(T,A,ur,"⨆","\\bigsqcup");x(T,A,ur,"∫","\\smallint");x(me,A,Lo,"…","\\textellipsis");x(T,A,Lo,"…","\\mathellipsis");x(me,A,Lo,"…","\\ldots",!0);x(T,A,Lo,"…","\\ldots",!0);x(T,A,Lo,"⋯","\\@cdots",!0);x(T,A,Lo,"⋱","\\ddots",!0);x(T,A,Z,"⋮","\\varvdots");x(me,A,Z,"⋮","\\varvdots");x(T,A,Vt,"ˊ","\\acute");x(T,A,Vt,"ˋ","\\grave");x(T,A,Vt,"¨","\\ddot");x(T,A,Vt,"~","\\tilde");x(T,A,Vt,"ˉ","\\bar");x(T,A,Vt,"˘","\\breve");x(T,A,Vt,"ˇ","\\check");x(T,A,Vt,"^","\\hat");x(T,A,Vt,"⃗","\\vec");x(T,A,Vt,"˙","\\dot");x(T,A,Vt,"˚","\\mathring");x(T,A,nt,"","\\@imath");x(T,A,nt,"","\\@jmath");x(T,A,Z,"ı","ı");x(T,A,Z,"ȷ","ȷ");x(me,A,Z,"ı","\\i",!0);x(me,A,Z,"ȷ","\\j",!0);x(me,A,Z,"ß","\\ss",!0);x(me,A,Z,"æ","\\ae",!0);x(me,A,Z,"œ","\\oe",!0);x(me,A,Z,"ø","\\o",!0);x(me,A,Z,"Æ","\\AE",!0);x(me,A,Z,"Œ","\\OE",!0);x(me,A,Z,"Ø","\\O",!0);x(me,A,Vt,"ˊ","\\'");x(me,A,Vt,"ˋ","\\`");x(me,A,Vt,"ˆ","\\^");x(me,A,Vt,"˜","\\~");x(me,A,Vt,"ˉ","\\=");x(me,A,Vt,"˘","\\u");x(me,A,Vt,"˙","\\.");x(me,A,Vt,"¸","\\c");x(me,A,Vt,"˚","\\r");x(me,A,Vt,"ˇ","\\v");x(me,A,Vt,"¨",'\\"');x(me,A,Vt,"˝","\\H");x(me,A,Vt,"◯","\\textcircled");var Tv={"--":!0,"---":!0,"``":!0,"''":!0};x(me,A,Z,"–","--",!0);x(me,A,Z,"–","\\textendash");x(me,A,Z,"—","---",!0);x(me,A,Z,"—","\\textemdash");x(me,A,Z,"‘","`",!0);x(me,A,Z,"‘","\\textquoteleft");x(me,A,Z,"’","'",!0);x(me,A,Z,"’","\\textquoteright");x(me,A,Z,"“","``",!0);x(me,A,Z,"“","\\textquotedblleft");x(me,A,Z,"”","''",!0);x(me,A,Z,"”","\\textquotedblright");x(T,A,Z,"°","\\degree",!0);x(me,A,Z,"°","\\degree");x(me,A,Z,"°","\\textdegree",!0);x(T,A,Z,"£","\\pounds");x(T,A,Z,"£","\\mathsterling",!0);x(me,A,Z,"£","\\pounds");x(me,A,Z,"£","\\textsterling",!0);x(T,z,Z,"✠","\\maltese");x(me,z,Z,"✠","\\maltese");var cy='0123456789/@."';for(var zd=0;zd<cy.length;zd++){var uy=cy.charAt(zd);x(T,A,Z,uy,uy)}var hy='0123456789!@*()-=+";:?/.,';for(var Hd=0;Hd<hy.length;Hd++){var dy=hy.charAt(Hd);x(me,A,Z,dy,dy)}var u0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var qd=0;qd<u0.length;qd++){var Qc=u0.charAt(qd);x(T,A,nt,Qc,Qc),x(me,A,Z,Qc,Qc)}x(T,z,Z,"C","ℂ");x(me,z,Z,"C","ℂ");x(T,z,Z,"H","ℍ");x(me,z,Z,"H","ℍ");x(T,z,Z,"N","ℕ");x(me,z,Z,"N","ℕ");x(T,z,Z,"P","ℙ");x(me,z,Z,"P","ℙ");x(T,z,Z,"Q","ℚ");x(me,z,Z,"Q","ℚ");x(T,z,Z,"R","ℝ");x(me,z,Z,"R","ℝ");x(T,z,Z,"Z","ℤ");x(me,z,Z,"Z","ℤ");x(T,A,nt,"h","ℎ");x(me,A,nt,"h","ℎ");var ct="";for(var zr=0;zr<u0.length;zr++){var Zt=u0.charAt(zr);ct=String.fromCharCode(55349,56320+zr),x(T,A,nt,Zt,ct),x(me,A,Z,Zt,ct),ct=String.fromCharCode(55349,56372+zr),x(T,A,nt,Zt,ct),x(me,A,Z,Zt,ct),ct=String.fromCharCode(55349,56424+zr),x(T,A,nt,Zt,ct),x(me,A,Z,Zt,ct),ct=String.fromCharCode(55349,56580+zr),x(T,A,nt,Zt,ct),x(me,A,Z,Zt,ct),ct=String.fromCharCode(55349,56684+zr),x(T,A,nt,Zt,ct),x(me,A,Z,Zt,ct),ct=String.fromCharCode(55349,56736+zr),x(T,A,nt,Zt,ct),x(me,A,Z,Zt,ct),ct=String.fromCharCode(55349,56788+zr),x(T,A,nt,Zt,ct),x(me,A,Z,Zt,ct),ct=String.fromCharCode(55349,56840+zr),x(T,A,nt,Zt,ct),x(me,A,Z,Zt,ct),ct=String.fromCharCode(55349,56944+zr),x(T,A,nt,Zt,ct),x(me,A,Z,Zt,ct),zr<26&&(ct=String.fromCharCode(55349,56632+zr),x(T,A,nt,Zt,ct),x(me,A,Z,Zt,ct),ct=String.fromCharCode(55349,56476+zr),x(T,A,nt,Zt,ct),x(me,A,Z,Zt,ct))}ct="𝕜";x(T,A,nt,"k",ct);x(me,A,Z,"k",ct);for(var $a=0;$a<10;$a++){var la=$a.toString();ct=String.fromCharCode(55349,57294+$a),x(T,A,nt,la,ct),x(me,A,Z,la,ct),ct=String.fromCharCode(55349,57314+$a),x(T,A,nt,la,ct),x(me,A,Z,la,ct),ct=String.fromCharCode(55349,57324+$a),x(T,A,nt,la,ct),x(me,A,Z,la,ct),ct=String.fromCharCode(55349,57334+$a),x(T,A,nt,la,ct),x(me,A,Z,la,ct)}var ap="ÐÞþ";for(var jd=0;jd<ap.length;jd++){var Zc=ap.charAt(jd);x(T,A,nt,Zc,Zc),x(me,A,Z,Zc,Zc)}var Jc=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],fy=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],yj=function(e,r){var n=e.charCodeAt(0),i=e.charCodeAt(1),a=(n-55296)*1024+(i-56320)+65536,s=r==="math"?0:1;if(119808<=a&&a<120484){var o=Math.floor((a-119808)/26);return[Jc[o][2],Jc[o][s]]}else if(120782<=a&&a<=120831){var l=Math.floor((a-120782)/10);return[fy[l][2],fy[l][s]]}else{if(a===120485||a===120486)return[Jc[0][2],Jc[0][s]];if(120486<a&&a<120782)return["",""];throw new Te("Unsupported character: "+e)}},xh=function(e,r,n){return Ht[n][e]&&Ht[n][e].replace&&(e=Ht[n][e].replace),{value:e,metrics:b1(e,r,n)}},qn=function(e,r,n,i,a){var s=xh(e,r,n),o=s.metrics;e=s.value;var l;if(o){var c=o.italic;(n==="text"||i&&i.font==="mathit")&&(c=0),l=new On(e,o.height,o.depth,c,o.skew,o.width,a)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+e+"' in style '"+r+"' and mode '"+n+"'")),l=new On(e,0,0,0,0,0,a);if(i){l.maxFontSize=i.sizeMultiplier,i.style.isTight()&&l.classes.push("mtight");var u=i.getColor();u&&(l.style.color=u)}return l},xj=function(e,r,n,i){return i===void 0&&(i=[]),n.font==="boldsymbol"&&xh(e,"Main-Bold",r).metrics?qn(e,"Main-Bold",r,n,i.concat(["mathbf"])):e==="\\"||Ht[r][e].font==="main"?qn(e,"Main-Regular",r,n,i):qn(e,"AMS-Regular",r,n,i.concat(["amsrm"]))},vj=function(e,r,n,i,a){return a!=="textord"&&xh(e,"Math-BoldItalic",r).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},kj=function(e,r,n){var i=e.mode,a=e.text,s=["mord"],o=i==="math"||i==="text"&&r.font,l=o?r.font:r.fontFamily,c="",u="";if(a.charCodeAt(0)===55349&&([c,u]=yj(a,i)),c.length>0)return qn(a,c,i,r,s.concat(u));if(l){var h,d;if(l==="boldsymbol"){var f=vj(a,i,r,s,n);h=f.fontName,d=[f.fontClass]}else o?(h=_v[l].fontName,d=[l]):(h=eu(l,r.fontWeight,r.fontShape),d=[l,r.fontWeight,r.fontShape]);if(xh(a,h,i).metrics)return qn(a,h,i,r,s.concat(d));if(Tv.hasOwnProperty(a)&&h.slice(0,10)==="Typewriter"){for(var p=[],m=0;m<a.length;m++)p.push(qn(a[m],h,i,r,s.concat(d)));return Sv(p)}}if(n==="mathord")return qn(a,"Math-Italic",i,r,s.concat(["mathnormal"]));if(n==="textord"){var y=Ht[i][a]&&Ht[i][a].font;if(y==="ams"){var b=eu("amsrm",r.fontWeight,r.fontShape);return qn(a,b,i,r,s.concat("amsrm",r.fontWeight,r.fontShape))}else if(y==="main"||!y){var v=eu("textrm",r.fontWeight,r.fontShape);return qn(a,v,i,r,s.concat(r.fontWeight,r.fontShape))}else{var C=eu(y,r.fontWeight,r.fontShape);return qn(a,C,i,r,s.concat(C,r.fontWeight,r.fontShape))}}else throw new Error("unexpected type: "+n+" in makeOrd")},wj=(t,e)=>{if(va(t.classes)!==va(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(t.classes.length===1){var r=t.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},Tj=t=>{for(var e=0;e<t.length-1;e++){var r=t[e],n=t[e+1];r instanceof On&&n instanceof On&&wj(r,n)&&(r.text+=n.text,r.height=Math.max(r.height,n.height),r.depth=Math.max(r.depth,n.depth),r.italic=n.italic,t.splice(e+1,1),e--)}return t},x1=function(e){for(var r=0,n=0,i=0,a=0;a<e.children.length;a++){var s=e.children[a];s.height>r&&(r=s.height),s.depth>n&&(n=s.depth),s.maxFontSize>i&&(i=s.maxFontSize)}e.height=r,e.depth=n,e.maxFontSize=i},sn=function(e,r,n,i){var a=new _c(e,r,n,i);return x1(a),a},Cv=(t,e,r,n)=>new _c(t,e,r,n),Cj=function(e,r,n){var i=sn([e],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=Ae(i.height),i.maxFontSize=1,i},Sj=function(e,r,n,i){var a=new y1(e,r,n,i);return x1(a),a},Sv=function(e){var r=new Sc(e);return x1(r),r},_j=function(e,r){return e instanceof Sc?sn([],[e],r):e},Ej=function(e){if(e.positionType==="individualShift"){for(var r=e.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,s=1;s<r.length;s++){var o=-r[s].shift-a-r[s].elem.depth,l=o-(r[s-1].elem.height+r[s-1].elem.depth);a=a+o,n.push({type:"kern",size:l}),n.push(r[s])}return{children:n,depth:i}}var c;if(e.positionType==="top"){for(var u=e.positionData,h=0;h<e.children.length;h++){var d=e.children[h];u-=d.type==="kern"?d.size:d.elem.height+d.elem.depth}c=u}else if(e.positionType==="bottom")c=-e.positionData;else{var f=e.children[0];if(f.type!=="elem")throw new Error('First child must have type "elem".');if(e.positionType==="shift")c=-f.elem.depth-e.positionData;else if(e.positionType==="firstBaseline")c=-f.elem.depth;else throw new Error("Invalid positionType "+e.positionType+".")}return{children:e.children,depth:c}},Aj=function(e,r){for(var{children:n,depth:i}=Ej(e),a=0,s=0;s<n.length;s++){var o=n[s];if(o.type==="elem"){var l=o.elem;a=Math.max(a,l.maxFontSize,l.height)}}a+=2;var c=sn(["pstrut"],[]);c.style.height=Ae(a);for(var u=[],h=i,d=i,f=i,p=0;p<n.length;p++){var m=n[p];if(m.type==="kern")f+=m.size;else{var y=m.elem,b=m.wrapperClasses||[],v=m.wrapperStyle||{},C=sn(b,[c,y],void 0,v);C.style.top=Ae(-a-f-y.depth),m.marginLeft&&(C.style.marginLeft=m.marginLeft),m.marginRight&&(C.style.marginRight=m.marginRight),u.push(C),f+=y.height+y.depth}h=Math.min(h,f),d=Math.max(d,f)}var E=sn(["vlist"],u);E.style.height=Ae(d);var _;if(h<0){var k=sn([],[]),N=sn(["vlist"],[k]);N.style.height=Ae(-h);var D=sn(["vlist-s"],[new On("​")]);_=[sn(["vlist-r"],[E,D]),sn(["vlist-r"],[N])]}else _=[sn(["vlist-r"],[E])];var $=sn(["vlist-t"],_);return _.length===2&&$.classes.push("vlist-t2"),$.height=d,$.depth=-h,$},Nj=(t,e)=>{var r=sn(["mspace"],[],e),n=Kt(t,e);return r.style.marginRight=Ae(n),r},eu=function(e,r,n){var i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}var a;return r==="textbf"&&n==="textit"?a="BoldItalic":r==="textbf"?a="Bold":r==="textit"?a="Italic":a="Regular",i+"-"+a},_v={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ev={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Lj=function(e,r){var[n,i,a]=Ev[e],s=new ka(n),o=new Gi([s],{width:Ae(i),height:Ae(a),style:"width:"+Ae(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),l=Cv(["overlay"],[o],r);return l.height=a,l.style.height=Ae(a),l.style.width=Ae(i),l},ie={fontMap:_v,makeSymbol:qn,mathsym:xj,makeSpan:sn,makeSvgSpan:Cv,makeLineSpan:Cj,makeAnchor:Sj,makeFragment:Sv,wrapFragment:_j,makeVList:Aj,makeOrd:kj,makeGlue:Nj,staticSvg:Lj,svgData:Ev,tryCombineChars:Tj},Xt={number:3,unit:"mu"},za={number:4,unit:"mu"},Ni={number:5,unit:"mu"},Mj={mord:{mop:Xt,mbin:za,mrel:Ni,minner:Xt},mop:{mord:Xt,mop:Xt,mrel:Ni,minner:Xt},mbin:{mord:za,mop:za,mopen:za,minner:za},mrel:{mord:Ni,mop:Ni,mopen:Ni,minner:Ni},mopen:{},mclose:{mop:Xt,mbin:za,mrel:Ni,minner:Xt},mpunct:{mord:Xt,mop:Xt,mrel:Ni,mopen:Xt,mclose:Xt,mpunct:Xt,minner:Xt},minner:{mord:Xt,mop:Xt,mbin:za,mrel:Ni,mopen:Xt,mpunct:Xt,minner:Xt}},Ij={mord:{mop:Xt},mop:{mord:Xt,mop:Xt},mbin:{},mrel:{},mopen:{},mclose:{mop:Xt},mpunct:{},minner:{mop:Xt}},Av={},h0={},d0={};function Ie(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},l=0;l<r.length;++l)Av[r[l]]=o;e&&(a&&(h0[e]=a),s&&(d0[e]=s))}function ys(t){var{type:e,htmlBuilder:r,mathmlBuilder:n}=t;Ie({type:e,names:[],props:{numArgs:0},handler(){throw new Error("Should never be called.")},htmlBuilder:r,mathmlBuilder:n})}var f0=function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},rr=function(e){return e.type==="ordgroup"?e.body:[e]},Yi=ie.makeSpan,Rj=["leftmost","mbin","mopen","mrel","mop","mpunct"],Bj=["rightmost","mrel","mclose","mpunct"],Dj={display:it.DISPLAY,text:it.TEXT,script:it.SCRIPT,scriptscript:it.SCRIPTSCRIPT},Oj={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},pr=function(e,r,n,i){i===void 0&&(i=[null,null]);for(var a=[],s=0;s<e.length;s++){var o=Nt(e[s],r);if(o instanceof Sc){var l=o.children;a.push(...l)}else a.push(o)}if(ie.tryCombineChars(a),!n)return a;var c=r;if(e.length===1){var u=e[0];u.type==="sizing"?c=r.havingSize(u.size):u.type==="styling"&&(c=r.havingStyle(Dj[u.style]))}var h=Yi([i[0]||"leftmost"],[],r),d=Yi([i[1]||"rightmost"],[],r),f=n==="root";return py(a,(p,m)=>{var y=m.classes[0],b=p.classes[0];y==="mbin"&&Bj.includes(b)?m.classes[0]="mord":b==="mbin"&&Rj.includes(y)&&(p.classes[0]="mord")},{node:h},d,f),py(a,(p,m)=>{var y=sp(m),b=sp(p),v=y&&b?p.hasClass("mtight")?Ij[y][b]:Mj[y][b]:null;if(v)return ie.makeGlue(v,c)},{node:h},d,f),a},py=function t(e,r,n,i,a){i&&e.push(i);for(var s=0;s<e.length;s++){var o=e[s],l=Nv(o);if(l){t(l.children,r,n,null,a);continue}var c=!o.hasClass("mspace");if(c){var u=r(o,n.node);u&&(n.insertAfter?n.insertAfter(u):(e.unshift(u),s++))}c?n.node=o:a&&o.hasClass("newline")&&(n.node=Yi(["leftmost"])),n.insertAfter=(h=>d=>{e.splice(h+1,0,d),s++})(s)}i&&e.pop()},Nv=function(e){return e instanceof Sc||e instanceof y1||e instanceof _c&&e.hasClass("enclosing")?e:null},Pj=function t(e,r){var n=Nv(e);if(n){var i=n.children;if(i.length){if(r==="right")return t(i[i.length-1],"right");if(r==="left")return t(i[0],"left")}}return e},sp=function(e,r){return e?(r&&(e=Pj(e,r)),Oj[e.classes[0]]||null):null},Jl=function(e,r){var n=["nulldelimiter"].concat(e.baseSizingClasses());return Yi(r.concat(n))},Nt=function(e,r,n){if(!e)return Yi();if(h0[e.type]){var i=h0[e.type](e,r);if(n&&r.size!==n.size){i=Yi(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new Te("Got group of unknown type: '"+e.type+"'")};function tu(t,e){var r=Yi(["base"],t,e),n=Yi(["strut"]);return n.style.height=Ae(r.height+r.depth),r.depth&&(n.style.verticalAlign=Ae(-r.depth)),r.children.unshift(n),r}function op(t,e){var r=null;t.length===1&&t[0].type==="tag"&&(r=t[0].tag,t=t[0].body);var n=pr(t,e,"root"),i;n.length===2&&n[1].hasClass("tag")&&(i=n.pop());for(var a=[],s=[],o=0;o<n.length;o++)if(s.push(n[o]),n[o].hasClass("mbin")||n[o].hasClass("mrel")||n[o].hasClass("allowbreak")){for(var l=!1;o<n.length-1&&n[o+1].hasClass("mspace")&&!n[o+1].hasClass("newline");)o++,s.push(n[o]),n[o].hasClass("nobreak")&&(l=!0);l||(a.push(tu(s,e)),s=[])}else n[o].hasClass("newline")&&(s.pop(),s.length>0&&(a.push(tu(s,e)),s=[]),a.push(n[o]));s.length>0&&a.push(tu(s,e));var c;r?(c=tu(pr(r,e,!0)),c.classes=["tag"],a.push(c)):i&&a.push(i);var u=Yi(["katex-html"],a);if(u.setAttribute("aria-hidden","true"),c){var h=c.children[0];h.style.height=Ae(u.height+u.depth),u.depth&&(h.style.verticalAlign=Ae(-u.depth))}return u}function Lv(t){return new Sc(t)}class yn{constructor(e,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(e,r){this.attributes[e]=r}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&e.setAttribute(r,this.attributes[r]);this.classes.length>0&&(e.className=va(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof pi&&this.children[n+1]instanceof pi){for(var i=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof pi;)i+=this.children[++n].toText();e.appendChild(new pi(i).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e="<"+this.type;for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&(e+=" "+r+'="',e+=Mt.escape(this.attributes[r]),e+='"');this.classes.length>0&&(e+=' class ="'+Mt.escape(va(this.classes))+'"'),e+=">";for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+="</"+this.type+">",e}toText(){return this.children.map(e=>e.toText()).join("")}}class pi{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Mt.escape(this.toText())}toText(){return this.text}}class Fj{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character="  ":e>=-.05556&&e<=-.05555?this.character=" ⁣":e>=-.1667&&e<=-.1666?this.character=" ⁣":e>=-.2223&&e<=-.2222?this.character=" ⁣":e>=-.2778&&e<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",Ae(this.width)),e}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+Ae(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var ke={MathNode:yn,TextNode:pi,SpaceNode:Fj,newDocumentFragment:Lv},Pn=function(e,r,n){return Ht[r][e]&&Ht[r][e].replace&&e.charCodeAt(0)!==55349&&!(Tv.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(e=Ht[r][e].replace),new ke.TextNode(e)},v1=function(e){return e.length===1?e[0]:new ke.MathNode("mrow",e)},k1=function(e,r){if(r.fontFamily==="texttt")return"monospace";if(r.fontFamily==="textsf")return r.fontShape==="textit"&&r.fontWeight==="textbf"?"sans-serif-bold-italic":r.fontShape==="textit"?"sans-serif-italic":r.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(r.fontShape==="textit"&&r.fontWeight==="textbf")return"bold-italic";if(r.fontShape==="textit")return"italic";if(r.fontWeight==="textbf")return"bold";var n=r.font;if(!n||n==="mathnormal")return null;var i=e.mode;if(n==="mathit")return"italic";if(n==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(n==="mathbf")return"bold";if(n==="mathbb")return"double-struck";if(n==="mathsfit")return"sans-serif-italic";if(n==="mathfrak")return"fraktur";if(n==="mathscr"||n==="mathcal")return"script";if(n==="mathsf")return"sans-serif";if(n==="mathtt")return"monospace";var a=e.text;if(["\\imath","\\jmath"].includes(a))return null;Ht[i][a]&&Ht[i][a].replace&&(a=Ht[i][a].replace);var s=ie.fontMap[n].fontName;return b1(a,s,i)?ie.fontMap[n].variant:null};function Ud(t){if(!t)return!1;if(t.type==="mi"&&t.children.length===1){var e=t.children[0];return e instanceof pi&&e.text==="."}else if(t.type==="mo"&&t.children.length===1&&t.getAttribute("separator")==="true"&&t.getAttribute("lspace")==="0em"&&t.getAttribute("rspace")==="0em"){var r=t.children[0];return r instanceof pi&&r.text===","}else return!1}var hn=function(e,r,n){if(e.length===1){var i=$t(e[0],r);return n&&i instanceof yn&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],s,o=0;o<e.length;o++){var l=$t(e[o],r);if(l instanceof yn&&s instanceof yn){if(l.type==="mtext"&&s.type==="mtext"&&l.getAttribute("mathvariant")===s.getAttribute("mathvariant")){s.children.push(...l.children);continue}else if(l.type==="mn"&&s.type==="mn"){s.children.push(...l.children);continue}else if(Ud(l)&&s.type==="mn"){s.children.push(...l.children);continue}else if(l.type==="mn"&&Ud(s))l.children=[...s.children,...l.children],a.pop();else if((l.type==="msup"||l.type==="msub")&&l.children.length>=1&&(s.type==="mn"||Ud(s))){var c=l.children[0];c instanceof yn&&c.type==="mn"&&(c.children=[...s.children,...c.children],a.pop())}else if(s.type==="mi"&&s.children.length===1){var u=s.children[0];if(u instanceof pi&&u.text==="̸"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var h=l.children[0];h instanceof pi&&h.text.length>0&&(h.text=h.text.slice(0,1)+"̸"+h.text.slice(1),a.pop())}}}a.push(l),s=l}return a},wa=function(e,r,n){return v1(hn(e,r,n))},$t=function(e,r){if(!e)return new ke.MathNode("mrow");if(d0[e.type]){var n=d0[e.type](e,r);return n}else throw new Te("Got group of unknown type: '"+e.type+"'")};function my(t,e,r,n,i){var a=hn(t,r),s;a.length===1&&a[0]instanceof yn&&["mrow","mtable"].includes(a[0].type)?s=a[0]:s=new ke.MathNode("mrow",a);var o=new ke.MathNode("annotation",[new ke.TextNode(e)]);o.setAttribute("encoding","application/x-tex");var l=new ke.MathNode("semantics",[s,o]),c=new ke.MathNode("math",[l]);c.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&c.setAttribute("display","block");var u=i?"katex":"katex-mathml";return ie.makeSpan([u],[c])}var Mv=function(e){return new Oi({style:e.displayMode?it.DISPLAY:it.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Iv=function(e,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),e=ie.makeSpan(n,[e])}return e},$j=function(e,r,n){var i=Mv(n),a;if(n.output==="mathml")return my(e,r,i,n.displayMode,!0);if(n.output==="html"){var s=op(e,i);a=ie.makeSpan(["katex"],[s])}else{var o=my(e,r,i,n.displayMode,!1),l=op(e,i);a=ie.makeSpan(["katex"],[o,l])}return Iv(a,n)},zj=function(e,r,n){var i=Mv(n),a=op(e,i),s=ie.makeSpan(["katex"],[a]);return Iv(s,n)},Hj={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},qj=function(e){var r=new ke.MathNode("mo",[new ke.TextNode(Hj[e.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},jj={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Uj=function(e){return e.type==="ordgroup"?e.body.length:1},Wj=function(e,r){function n(){var o=4e5,l=e.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(l)){var c=e,u=Uj(c.base),h,d,f;if(u>5)l==="widehat"||l==="widecheck"?(h=420,o=2364,f=.42,d=l+"4"):(h=312,o=2340,f=.34,d="tilde4");else{var p=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(o=[0,1062,2364,2364,2364][p],h=[0,239,300,360,420][p],f=[0,.24,.3,.3,.36,.42][p],d=l+p):(o=[0,600,1033,2339,2340][p],h=[0,260,286,306,312][p],f=[0,.26,.286,.3,.306,.34][p],d="tilde"+p)}var m=new ka(d),y=new Gi([m],{width:"100%",height:Ae(f),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:ie.makeSvgSpan([],[y],r),minWidth:0,height:f}}else{var b=[],v=jj[l],[C,E,_]=v,k=_/1e3,N=C.length,D,$;if(N===1){var R=v[3];D=["hide-tail"],$=[R]}else if(N===2)D=["halfarrow-left","halfarrow-right"],$=["xMinYMin","xMaxYMin"];else if(N===3)D=["brace-left","brace-center","brace-right"],$=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
381
+ `+N+" children.");for(var P=0;P<N;P++){var G=new ka(C[P]),ee=new Gi([G],{width:"400em",height:Ae(k),viewBox:"0 0 "+o+" "+_,preserveAspectRatio:$[P]+" slice"}),W=ie.makeSvgSpan([D[P]],[ee],r);if(N===1)return{span:W,minWidth:E,height:k};W.style.height=Ae(k),b.push(W)}return{span:ie.makeSpan(["stretchy"],b,r),minWidth:E,height:k}}}var{span:i,minWidth:a,height:s}=n();return i.height=s,i.style.height=Ae(s),a>0&&(i.style.minWidth=Ae(a)),i},Gj=function(e,r,n,i,a){var s,o=e.height+e.depth+n+i;if(/fbox|color|angl/.test(r)){if(s=ie.makeSpan(["stretchy",r],[],a),r==="fbox"){var l=a.color&&a.getColor();l&&(s.style.borderColor=l)}}else{var c=[];/^[bx]cancel$/.test(r)&&c.push(new ip({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&c.push(new ip({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new Gi(c,{width:"100%",height:Ae(o)});s=ie.makeSvgSpan([],[u],a)}return s.height=o,s.style.height=Ae(o),s},Vi={encloseSpan:Gj,mathMLnode:qj,svgSpan:Wj};function ft(t,e){if(!t||t.type!==e)throw new Error("Expected node of type "+e+", but got "+(t?"node of type "+t.type:String(t)));return t}function w1(t){var e=vh(t);if(!e)throw new Error("Expected node of symbol group type, but got "+(t?"node of type "+t.type:String(t)));return e}function vh(t){return t&&(t.type==="atom"||bj.hasOwnProperty(t.type))?t:null}var T1=(t,e)=>{var r,n,i;t&&t.type==="supsub"?(n=ft(t.base,"accent"),r=n.base,t.base=r,i=mj(Nt(t,e)),t.base=n):(n=ft(t,"accent"),r=n.base);var a=Nt(r,e.havingCrampedStyle()),s=n.isShifty&&Mt.isCharacterBox(r),o=0;if(s){var l=Mt.getBaseElem(r),c=Nt(l,e.havingCrampedStyle());o=ly(c).skew}var u=n.label==="\\c",h=u?a.height+a.depth:Math.min(a.height,e.fontMetrics().xHeight),d;if(n.isStretchy)d=Vi.svgSpan(n,e),d=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:d,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+Ae(2*o)+")",marginLeft:Ae(2*o)}:void 0}]},e);else{var f,p;n.label==="\\vec"?(f=ie.staticSvg("vec",e),p=ie.svgData.vec[1]):(f=ie.makeOrd({mode:n.mode,text:n.label},e,"textord"),f=ly(f),f.italic=0,p=f.width,u&&(h+=f.depth)),d=ie.makeSpan(["accent-body"],[f]);var m=n.label==="\\textcircled";m&&(d.classes.push("accent-full"),h=a.height);var y=o;m||(y-=p/2),d.style.left=Ae(y),n.label==="\\textcircled"&&(d.style.top=".2em"),d=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-h},{type:"elem",elem:d}]},e)}var b=ie.makeSpan(["mord","accent"],[d],e);return i?(i.children[0]=b,i.height=Math.max(b.height,i.height),i.classes[0]="mord",i):b},Rv=(t,e)=>{var r=t.isStretchy?Vi.mathMLnode(t.label):new ke.MathNode("mo",[Pn(t.label,t.mode)]),n=new ke.MathNode("mover",[$t(t.base,e),r]);return n.setAttribute("accent","true"),n},Yj=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|"));Ie({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(t,e)=>{var r=f0(e[0]),n=!Yj.test(t.funcName),i=!n||t.funcName==="\\widehat"||t.funcName==="\\widetilde"||t.funcName==="\\widecheck";return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:n,isShifty:i,base:r}},htmlBuilder:T1,mathmlBuilder:Rv});Ie({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(t,e)=>{var r=e[0],n=t.parser.mode;return n==="math"&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:t.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:T1,mathmlBuilder:Rv});Ie({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},htmlBuilder:(t,e)=>{var r=Nt(t.base,e),n=Vi.svgSpan(t,e),i=t.label==="\\utilde"?.12:0,a=ie.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]},e);return ie.makeSpan(["mord","accentunder"],[a],e)},mathmlBuilder:(t,e)=>{var r=Vi.mathMLnode(t.label),n=new ke.MathNode("munder",[$t(t.base,e),r]);return n.setAttribute("accentunder","true"),n}});var ru=t=>{var e=new ke.MathNode("mpadded",t?[t]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};Ie({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n,funcName:i}=t;return{type:"xArrow",mode:n.mode,label:i,body:e[0],below:r[0]}},htmlBuilder(t,e){var r=e.style,n=e.havingStyle(r.sup()),i=ie.wrapFragment(Nt(t.body,n,e),e),a=t.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var s;t.below&&(n=e.havingStyle(r.sub()),s=ie.wrapFragment(Nt(t.below,n,e),e),s.classes.push(a+"-arrow-pad"));var o=Vi.svgSpan(t,e),l=-e.fontMetrics().axisHeight+.5*o.height,c=-e.fontMetrics().axisHeight-.5*o.height-.111;(i.depth>.25||t.label==="\\xleftequilibrium")&&(c-=i.depth);var u;if(s){var h=-e.fontMetrics().axisHeight+s.height+.5*o.height+.111;u=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:o,shift:l},{type:"elem",elem:s,shift:h}]},e)}else u=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:i,shift:c},{type:"elem",elem:o,shift:l}]},e);return u.children[0].children[0].children[1].classes.push("svg-align"),ie.makeSpan(["mrel","x-arrow"],[u],e)},mathmlBuilder(t,e){var r=Vi.mathMLnode(t.label);r.setAttribute("minsize",t.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(t.body){var i=ru($t(t.body,e));if(t.below){var a=ru($t(t.below,e));n=new ke.MathNode("munderover",[r,a,i])}else n=new ke.MathNode("mover",[r,i])}else if(t.below){var s=ru($t(t.below,e));n=new ke.MathNode("munder",[r,s])}else n=ru(),n=new ke.MathNode("mover",[r,n]);return n}});var Vj=ie.makeSpan;function Bv(t,e){var r=pr(t.body,e,!0);return Vj([t.mclass],r,e)}function Dv(t,e){var r,n=hn(t.body,e);return t.mclass==="minner"?r=new ke.MathNode("mpadded",n):t.mclass==="mord"?t.isCharacterBox?(r=n[0],r.type="mi"):r=new ke.MathNode("mi",n):(t.isCharacterBox?(r=n[0],r.type="mo"):r=new ke.MathNode("mo",n),t.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):t.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):t.mclass==="mopen"||t.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):t.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}Ie({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:rr(i),isCharacterBox:Mt.isCharacterBox(i)}},htmlBuilder:Bv,mathmlBuilder:Dv});var kh=t=>{var e=t.type==="ordgroup"&&t.body.length?t.body[0]:t;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};Ie({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){var{parser:r}=t;return{type:"mclass",mode:r.mode,mclass:kh(e[0]),body:rr(e[1]),isCharacterBox:Mt.isCharacterBox(e[1])}}});Ie({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:r,funcName:n}=t,i=e[1],a=e[0],s;n!=="\\stackrel"?s=kh(i):s="mrel";var o={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:rr(i)},l={type:"supsub",mode:a.mode,base:o,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:s,body:[l],isCharacterBox:Mt.isCharacterBox(l)}},htmlBuilder:Bv,mathmlBuilder:Dv});Ie({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"pmb",mode:r.mode,mclass:kh(e[0]),body:rr(e[0])}},htmlBuilder(t,e){var r=pr(t.body,e,!0),n=ie.makeSpan([t.mclass],r,e);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(t,e){var r=hn(t.body,e),n=new ke.MathNode("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});var Xj={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},gy=()=>({type:"styling",body:[],mode:"math",style:"display"}),by=t=>t.type==="textord"&&t.text==="@",Kj=(t,e)=>(t.type==="mathord"||t.type==="atom")&&t.text===e;function Qj(t,e,r){var n=Xj[t];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[e[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},s=r.callFunction("\\Big",[a],[]),o=r.callFunction("\\\\cdright",[e[1]],[]),l={type:"ordgroup",mode:"math",body:[i,s,o]};return r.callFunction("\\\\cdparent",[l],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var c={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[c],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Zj(t){var e=[];for(t.gullet.beginGroup(),t.gullet.macros.set("\\cr","\\\\\\relax"),t.gullet.beginGroup();;){e.push(t.parseExpression(!1,"\\\\")),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if(r==="&"||r==="\\\\")t.consume();else if(r==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new Te("Expected \\\\ or \\cr or \\end",t.nextToken)}for(var n=[],i=[n],a=0;a<e.length;a++){for(var s=e[a],o=gy(),l=0;l<s.length;l++)if(!by(s[l]))o.body.push(s[l]);else{n.push(o),l+=1;var c=w1(s[l]).text,u=new Array(2);if(u[0]={type:"ordgroup",mode:"math",body:[]},u[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(c)>-1))if("<>AV".indexOf(c)>-1)for(var h=0;h<2;h++){for(var d=!0,f=l+1;f<s.length;f++){if(Kj(s[f],c)){d=!1,l=f;break}if(by(s[f]))throw new Te("Missing a "+c+" character to complete a CD arrow.",s[f]);u[h].body.push(s[f])}if(d)throw new Te("Missing a "+c+" character to complete a CD arrow.",s[l])}else throw new Te('Expected one of "<>AV=|." after @',s[l]);var p=Qj(c,u,t),m={type:"styling",body:[p],mode:"math",style:"display"};n.push(m),o=gy()}a%2===0?n.push(o):n.shift(),n=[],i.push(n)}t.gullet.endGroup(),t.gullet.endGroup();var y=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:y,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}Ie({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup()),n=ie.wrapFragment(Nt(t.label,r,e),e);return n.classes.push("cd-label-"+t.side),n.style.bottom=Ae(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(t,e){var r=new ke.MathNode("mrow",[$t(t.label,e)]);return r=new ke.MathNode("mpadded",[r]),r.setAttribute("width","0"),t.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new ke.MathNode("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});Ie({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){var{parser:r}=t;return{type:"cdlabelparent",mode:r.mode,fragment:e[0]}},htmlBuilder(t,e){var r=ie.wrapFragment(Nt(t.fragment,e),e);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(t,e){return new ke.MathNode("mrow",[$t(t.fragment,e)])}});Ie({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var{parser:r}=t,n=ft(e[0],"ordgroup"),i=n.body,a="",s=0;s<i.length;s++){var o=ft(i[s],"textord");a+=o.text}var l=parseInt(a),c;if(isNaN(l))throw new Te("\\@char has non-numeric argument "+a);if(l<0||l>=1114111)throw new Te("\\@char with invalid code point "+a);return l<=65535?c=String.fromCharCode(l):(l-=65536,c=String.fromCharCode((l>>10)+55296,(l&1023)+56320)),{type:"textord",mode:r.mode,text:c}}});var Ov=(t,e)=>{var r=pr(t.body,e.withColor(t.color),!1);return ie.makeFragment(r)},Pv=(t,e)=>{var r=hn(t.body,e.withColor(t.color)),n=new ke.MathNode("mstyle",r);return n.setAttribute("mathcolor",t.color),n};Ie({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var{parser:r}=t,n=ft(e[0],"color-token").color,i=e[1];return{type:"color",mode:r.mode,color:n,body:rr(i)}},htmlBuilder:Ov,mathmlBuilder:Pv});Ie({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:r,breakOnTokenText:n}=t,i=ft(e[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:Ov,mathmlBuilder:Pv});Ie({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var{parser:n}=t,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&ft(i,"size").value}},htmlBuilder(t,e){var r=ie.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size&&(r.style.marginTop=Ae(Kt(t.size,e)))),r},mathmlBuilder(t,e){var r=new ke.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size&&r.setAttribute("height",Ae(Kt(t.size,e)))),r}});var lp={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Fv=t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new Te("Expected a control sequence",t);return e},Jj=t=>{var e=t.gullet.popToken();return e.text==="="&&(e=t.gullet.popToken(),e.text===" "&&(e=t.gullet.popToken())),e},$v=(t,e,r,n)=>{var i=t.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)};Ie({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:e,funcName:r}=t;e.consumeSpaces();var n=e.fetch();if(lp[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=lp[n.text]),ft(e.parseFunction(),"internal");throw new Te("Invalid token after macro prefix",n)}});Ie({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=e.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Te("Expected a control sequence",n);for(var a=0,s,o=[[]];e.gullet.future().text!=="{";)if(n=e.gullet.popToken(),n.text==="#"){if(e.gullet.future().text==="{"){s=e.gullet.future(),o[a].push("{");break}if(n=e.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new Te('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new Te('Argument number "'+n.text+'" out of order');a++,o.push([])}else{if(n.text==="EOF")throw new Te("Expected a macro definition");o[a].push(n.text)}var{tokens:l}=e.gullet.consumeArg();return s&&l.unshift(s),(r==="\\edef"||r==="\\xdef")&&(l=e.gullet.expandTokens(l),l.reverse()),e.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:o},r===lp[r]),{type:"internal",mode:e.mode}}});Ie({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=Fv(e.gullet.popToken());e.gullet.consumeSpaces();var i=Jj(e);return $v(e,n,i,r==="\\\\globallet"),{type:"internal",mode:e.mode}}});Ie({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:r}=t,n=Fv(e.gullet.popToken()),i=e.gullet.popToken(),a=e.gullet.popToken();return $v(e,n,a,r==="\\\\globalfuture"),e.gullet.pushToken(a),e.gullet.pushToken(i),{type:"internal",mode:e.mode}}});var fl=function(e,r,n){var i=Ht.math[e]&&Ht.math[e].replace,a=b1(i||e,r,n);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+r+".");return a},C1=function(e,r,n,i){var a=n.havingBaseStyle(r),s=ie.makeSpan(i.concat(a.sizingClasses(n)),[e],n),o=a.sizeMultiplier/n.sizeMultiplier;return s.height*=o,s.depth*=o,s.maxFontSize=a.sizeMultiplier,s},zv=function(e,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=Ae(a),e.height-=a,e.depth+=a},eU=function(e,r,n,i,a,s){var o=ie.makeSymbol(e,"Main-Regular",a,i),l=C1(o,r,i,s);return n&&zv(l,i,r),l},tU=function(e,r,n,i){return ie.makeSymbol(e,"Size"+r+"-Regular",n,i)},Hv=function(e,r,n,i,a,s){var o=tU(e,r,a,i),l=C1(ie.makeSpan(["delimsizing","size"+r],[o],i),it.TEXT,i,s);return n&&zv(l,i,it.TEXT),l},Wd=function(e,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=ie.makeSpan(["delimsizinginner",i],[ie.makeSpan([],[ie.makeSymbol(e,r,n)])]);return{type:"elem",elem:a}},Gd=function(e,r,n){var i=fi["Size4-Regular"][e.charCodeAt(0)]?fi["Size4-Regular"][e.charCodeAt(0)][4]:fi["Size1-Regular"][e.charCodeAt(0)][4],a=new ka("inner",oj(e,Math.round(1e3*r))),s=new Gi([a],{width:Ae(i),height:Ae(r),style:"width:"+Ae(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),o=ie.makeSvgSpan([],[s],n);return o.height=r,o.style.height=Ae(r),o.style.width=Ae(i),{type:"elem",elem:o}},cp=.008,nu={type:"kern",size:-1*cp},rU=["|","\\lvert","\\rvert","\\vert"],nU=["\\|","\\lVert","\\rVert","\\Vert"],qv=function(e,r,n,i,a,s){var o,l,c,u,h="",d=0;o=c=u=e,l=null;var f="Size1-Regular";e==="\\uparrow"?c=u="⏐":e==="\\Uparrow"?c=u="‖":e==="\\downarrow"?o=c="⏐":e==="\\Downarrow"?o=c="‖":e==="\\updownarrow"?(o="\\uparrow",c="⏐",u="\\downarrow"):e==="\\Updownarrow"?(o="\\Uparrow",c="‖",u="\\Downarrow"):rU.includes(e)?(c="∣",h="vert",d=333):nU.includes(e)?(c="∥",h="doublevert",d=556):e==="["||e==="\\lbrack"?(o="⎡",c="⎢",u="⎣",f="Size4-Regular",h="lbrack",d=667):e==="]"||e==="\\rbrack"?(o="⎤",c="⎥",u="⎦",f="Size4-Regular",h="rbrack",d=667):e==="\\lfloor"||e==="⌊"?(c=o="⎢",u="⎣",f="Size4-Regular",h="lfloor",d=667):e==="\\lceil"||e==="⌈"?(o="⎡",c=u="⎢",f="Size4-Regular",h="lceil",d=667):e==="\\rfloor"||e==="⌋"?(c=o="⎥",u="⎦",f="Size4-Regular",h="rfloor",d=667):e==="\\rceil"||e==="⌉"?(o="⎤",c=u="⎥",f="Size4-Regular",h="rceil",d=667):e==="("||e==="\\lparen"?(o="⎛",c="⎜",u="⎝",f="Size4-Regular",h="lparen",d=875):e===")"||e==="\\rparen"?(o="⎞",c="⎟",u="⎠",f="Size4-Regular",h="rparen",d=875):e==="\\{"||e==="\\lbrace"?(o="⎧",l="⎨",u="⎩",c="⎪",f="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(o="⎫",l="⎬",u="⎭",c="⎪",f="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(o="⎧",u="⎩",c="⎪",f="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(o="⎫",u="⎭",c="⎪",f="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(o="⎧",u="⎭",c="⎪",f="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(o="⎫",u="⎩",c="⎪",f="Size4-Regular");var p=fl(o,f,a),m=p.height+p.depth,y=fl(c,f,a),b=y.height+y.depth,v=fl(u,f,a),C=v.height+v.depth,E=0,_=1;if(l!==null){var k=fl(l,f,a);E=k.height+k.depth,_=2}var N=m+C+E,D=Math.max(0,Math.ceil((r-N)/(_*b))),$=N+D*_*b,R=i.fontMetrics().axisHeight;n&&(R*=i.sizeMultiplier);var P=$/2-R,G=[];if(h.length>0){var ee=$-m-C,W=Math.round($*1e3),U=lj(h,Math.round(ee*1e3)),j=new ka(h,U),Q=(d/1e3).toFixed(3)+"em",Y=(W/1e3).toFixed(3)+"em",be=new Gi([j],{width:Q,height:Y,viewBox:"0 0 "+d+" "+W}),L=ie.makeSvgSpan([],[be],i);L.height=W/1e3,L.style.width=Q,L.style.height=Y,G.push({type:"elem",elem:L})}else{if(G.push(Wd(u,f,a)),G.push(nu),l===null){var se=$-m-C+2*cp;G.push(Gd(c,se,i))}else{var ae=($-m-C-E)/2+2*cp;G.push(Gd(c,ae,i)),G.push(nu),G.push(Wd(l,f,a)),G.push(nu),G.push(Gd(c,ae,i))}G.push(nu),G.push(Wd(o,f,a))}var I=i.havingBaseStyle(it.TEXT),ye=ie.makeVList({positionType:"bottom",positionData:P,children:G},I);return C1(ie.makeSpan(["delimsizing","mult"],[ye],I),it.TEXT,i,s)},Yd=80,Vd=.08,Xd=function(e,r,n,i,a){var s=sj(e,i,n),o=new ka(e,s),l=new Gi([o],{width:"400em",height:Ae(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return ie.makeSvgSpan(["hide-tail"],[l],a)},iU=function(e,r){var n=r.havingBaseSizing(),i=Gv("\\surd",e*n.sizeMultiplier,Wv,n),a=n.sizeMultiplier,s=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),o,l=0,c=0,u=0,h;return i.type==="small"?(u=1e3+1e3*s+Yd,e<1?a=1:e<1.4&&(a=.7),l=(1+s+Vd)/a,c=(1+s)/a,o=Xd("sqrtMain",l,u,s,r),o.style.minWidth="0.853em",h=.833/a):i.type==="large"?(u=(1e3+Yd)*Pl[i.size],c=(Pl[i.size]+s)/a,l=(Pl[i.size]+s+Vd)/a,o=Xd("sqrtSize"+i.size,l,u,s,r),o.style.minWidth="1.02em",h=1/a):(l=e+s+Vd,c=e+s,u=Math.floor(1e3*e+s)+Yd,o=Xd("sqrtTall",l,u,s,r),o.style.minWidth="0.742em",h=1.056),o.height=c,o.style.height=Ae(l),{span:o,advanceWidth:h,ruleWidth:(r.fontMetrics().sqrtRuleThickness+s)*a}},jv=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],aU=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Uv=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Pl=[0,1.2,1.8,2.4,3],sU=function(e,r,n,i,a){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),jv.includes(e)||Uv.includes(e))return Hv(e,r,!1,n,i,a);if(aU.includes(e))return qv(e,Pl[r],!1,n,i,a);throw new Te("Illegal delimiter: '"+e+"'")},oU=[{type:"small",style:it.SCRIPTSCRIPT},{type:"small",style:it.SCRIPT},{type:"small",style:it.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],lU=[{type:"small",style:it.SCRIPTSCRIPT},{type:"small",style:it.SCRIPT},{type:"small",style:it.TEXT},{type:"stack"}],Wv=[{type:"small",style:it.SCRIPTSCRIPT},{type:"small",style:it.SCRIPT},{type:"small",style:it.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],cU=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Gv=function(e,r,n,i){for(var a=Math.min(2,3-i.style.size),s=a;s<n.length&&n[s].type!=="stack";s++){var o=fl(e,cU(n[s]),"math"),l=o.height+o.depth;if(n[s].type==="small"){var c=i.havingBaseStyle(n[s].style);l*=c.sizeMultiplier}if(l>r)return n[s]}return n[n.length-1]},Yv=function(e,r,n,i,a,s){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var o;Uv.includes(e)?o=oU:jv.includes(e)?o=Wv:o=lU;var l=Gv(e,r,o,i);return l.type==="small"?eU(e,l.style,n,i,a,s):l.type==="large"?Hv(e,l.size,n,i,a,s):qv(e,r,n,i,a,s)},uU=function(e,r,n,i,a,s){var o=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,c=5/i.fontMetrics().ptPerEm,u=Math.max(r-o,n+o),h=Math.max(u/500*l,2*u-c);return Yv(e,h,!0,i,a,s)},ji={sqrtImage:iU,sizedDelim:sU,sizeToMaxHeight:Pl,customSizedDelim:Yv,leftRightDelim:uU},yy={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},hU=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function wh(t,e){var r=vh(t);if(r&&hU.includes(r.text))return r;throw r?new Te("Invalid delimiter '"+r.text+"' after '"+e.funcName+"'",t):new Te("Invalid delimiter type '"+t.type+"'",t)}Ie({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(t,e)=>{var r=wh(e[0],t);return{type:"delimsizing",mode:t.parser.mode,size:yy[t.funcName].size,mclass:yy[t.funcName].mclass,delim:r.text}},htmlBuilder:(t,e)=>t.delim==="."?ie.makeSpan([t.mclass]):ji.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),mathmlBuilder:t=>{var e=[];t.delim!=="."&&e.push(Pn(t.delim,t.mode));var r=new ke.MathNode("mo",e);t.mclass==="mopen"||t.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=Ae(ji.sizeToMaxHeight[t.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r}});function xy(t){if(!t.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Ie({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new Te("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:wh(e[0],t).text,color:r}}});Ie({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=wh(e[0],t),n=t.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=ft(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},htmlBuilder:(t,e)=>{xy(t);for(var r=pr(t.body,e,!0,["mopen","mclose"]),n=0,i=0,a=!1,s=0;s<r.length;s++)r[s].isMiddle?a=!0:(n=Math.max(r[s].height,n),i=Math.max(r[s].depth,i));n*=e.sizeMultiplier,i*=e.sizeMultiplier;var o;if(t.left==="."?o=Jl(e,["mopen"]):o=ji.leftRightDelim(t.left,n,i,e,t.mode,["mopen"]),r.unshift(o),a)for(var l=1;l<r.length;l++){var c=r[l],u=c.isMiddle;u&&(r[l]=ji.leftRightDelim(u.delim,n,i,u.options,t.mode,[]))}var h;if(t.right===".")h=Jl(e,["mclose"]);else{var d=t.rightColor?e.withColor(t.rightColor):e;h=ji.leftRightDelim(t.right,n,i,d,t.mode,["mclose"])}return r.push(h),ie.makeSpan(["minner"],r,e)},mathmlBuilder:(t,e)=>{xy(t);var r=hn(t.body,e);if(t.left!=="."){var n=new ke.MathNode("mo",[Pn(t.left,t.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(t.right!=="."){var i=new ke.MathNode("mo",[Pn(t.right,t.mode)]);i.setAttribute("fence","true"),t.rightColor&&i.setAttribute("mathcolor",t.rightColor),r.push(i)}return v1(r)}});Ie({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var r=wh(e[0],t);if(!t.parser.leftrightDepth)throw new Te("\\middle without preceding \\left",r);return{type:"middle",mode:t.parser.mode,delim:r.text}},htmlBuilder:(t,e)=>{var r;if(t.delim===".")r=Jl(e,[]);else{r=ji.sizedDelim(t.delim,1,e,t.mode,[]);var n={delim:t.delim,options:e};r.isMiddle=n}return r},mathmlBuilder:(t,e)=>{var r=t.delim==="\\vert"||t.delim==="|"?Pn("|","text"):Pn(t.delim,t.mode),n=new ke.MathNode("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n}});var S1=(t,e)=>{var r=ie.wrapFragment(Nt(t.body,e),e),n=t.label.slice(1),i=e.sizeMultiplier,a,s=0,o=Mt.isCharacterBox(t.body);if(n==="sout")a=ie.makeSpan(["stretchy","sout"]),a.height=e.fontMetrics().defaultRuleThickness/i,s=-.5*e.fontMetrics().xHeight;else if(n==="phase"){var l=Kt({number:.6,unit:"pt"},e),c=Kt({number:.35,unit:"ex"},e),u=e.havingBaseSizing();i=i/u.sizeMultiplier;var h=r.height+r.depth+l+c;r.style.paddingLeft=Ae(h/2+l);var d=Math.floor(1e3*h*i),f=ij(d),p=new Gi([new ka("phase",f)],{width:"400em",height:Ae(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});a=ie.makeSvgSpan(["hide-tail"],[p],e),a.style.height=Ae(h),s=r.depth+l+c}else{/cancel/.test(n)?o||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var m=0,y=0,b=0;/box/.test(n)?(b=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),m=e.fontMetrics().fboxsep+(n==="colorbox"?0:b),y=m):n==="angl"?(b=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),m=4*b,y=Math.max(0,.25-r.depth)):(m=o?.2:0,y=m),a=Vi.encloseSpan(r,n,m,y,e),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=Ae(b)):n==="angl"&&b!==.049&&(a.style.borderTopWidth=Ae(b),a.style.borderRightWidth=Ae(b)),s=r.depth+y,t.backgroundColor&&(a.style.backgroundColor=t.backgroundColor,t.borderColor&&(a.style.borderColor=t.borderColor))}var v;if(t.backgroundColor)v=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:r,shift:0}]},e);else{var C=/cancel|phase/.test(n)?["svg-align"]:[];v=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:C}]},e)}return/cancel/.test(n)&&(v.height=r.height,v.depth=r.depth),/cancel/.test(n)&&!o?ie.makeSpan(["mord","cancel-lap"],[v],e):ie.makeSpan(["mord"],[v],e)},_1=(t,e)=>{var r=0,n=new ke.MathNode(t.label.indexOf("colorbox")>-1?"mpadded":"menclose",[$t(t.body,e)]);switch(t.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),t.label==="\\fcolorbox"){var i=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);n.setAttribute("style","border: "+i+"em solid "+String(t.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return t.backgroundColor&&n.setAttribute("mathbackground",t.backgroundColor),n};Ie({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=ft(e[0],"color-token").color,s=e[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:s}},htmlBuilder:S1,mathmlBuilder:_1});Ie({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(t,e,r){var{parser:n,funcName:i}=t,a=ft(e[0],"color-token").color,s=ft(e[1],"color-token").color,o=e[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:s,borderColor:a,body:o}},htmlBuilder:S1,mathmlBuilder:_1});Ie({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\fbox",body:e[0]}}});Ie({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:S1,mathmlBuilder:_1});Ie({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"enclose",mode:r.mode,label:"\\angl",body:e[0]}}});var Vv={};function ki(t){for(var{type:e,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:s}=t,o={type:e,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l<r.length;++l)Vv[r[l]]=o;a&&(h0[e]=a),s&&(d0[e]=s)}var Xv={};function M(t,e){Xv[t]=e}function vy(t){var e=[];t.consumeSpaces();var r=t.fetch().text;for(r==="\\relax"&&(t.consume(),t.consumeSpaces(),r=t.fetch().text);r==="\\hline"||r==="\\hdashline";)t.consume(),e.push(r==="\\hdashline"),t.consumeSpaces(),r=t.fetch().text;return e}var Th=t=>{var e=t.parser.settings;if(!e.displayMode)throw new Te("{"+t.envName+"} can be used only in display mode.")};function E1(t){if(t.indexOf("ed")===-1)return t.indexOf("*")===-1}function Aa(t,e,r){var{hskipBeforeAndAfter:n,addJot:i,cols:a,arraystretch:s,colSeparationType:o,autoTag:l,singleRow:c,emptySingleRow:u,maxNumCols:h,leqno:d}=e;if(t.gullet.beginGroup(),c||t.gullet.macros.set("\\cr","\\\\\\relax"),!s){var f=t.gullet.expandMacroAsText("\\arraystretch");if(f==null)s=1;else if(s=parseFloat(f),!s||s<0)throw new Te("Invalid \\arraystretch: "+f)}t.gullet.beginGroup();var p=[],m=[p],y=[],b=[],v=l!=null?[]:void 0;function C(){l&&t.gullet.macros.set("\\@eqnsw","1",!0)}function E(){v&&(t.gullet.macros.get("\\df@tag")?(v.push(t.subparse([new kn("\\df@tag")])),t.gullet.macros.set("\\df@tag",void 0,!0)):v.push(!!l&&t.gullet.macros.get("\\@eqnsw")==="1"))}for(C(),b.push(vy(t));;){var _=t.parseExpression(!1,c?"\\end":"\\\\");t.gullet.endGroup(),t.gullet.beginGroup(),_={type:"ordgroup",mode:t.mode,body:_},r&&(_={type:"styling",mode:t.mode,style:r,body:[_]}),p.push(_);var k=t.fetch().text;if(k==="&"){if(h&&p.length===h){if(c||o)throw new Te("Too many tab characters: &",t.nextToken);t.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}t.consume()}else if(k==="\\end"){E(),p.length===1&&_.type==="styling"&&_.body[0].body.length===0&&(m.length>1||!u)&&m.pop(),b.length<m.length+1&&b.push([]);break}else if(k==="\\\\"){t.consume();var N=void 0;t.gullet.future().text!==" "&&(N=t.parseSizeGroup(!0)),y.push(N?N.value:null),E(),b.push(vy(t)),p=[],m.push(p),C()}else throw new Te("Expected & or \\\\ or \\cr or \\end",t.nextToken)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:"array",mode:t.mode,addJot:i,arraystretch:s,body:m,cols:a,rowGaps:y,hskipBeforeAndAfter:n,hLinesBeforeRow:b,colSeparationType:o,tags:v,leqno:d}}function A1(t){return t.slice(0,1)==="d"?"display":"text"}var wi=function(e,r){var n,i,a=e.body.length,s=e.hLinesBeforeRow,o=0,l=new Array(a),c=[],u=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),h=1/r.fontMetrics().ptPerEm,d=5*h;if(e.colSeparationType&&e.colSeparationType==="small"){var f=r.havingStyle(it.SCRIPT).sizeMultiplier;d=.2778*(f/r.sizeMultiplier)}var p=e.colSeparationType==="CD"?Kt({number:3,unit:"ex"},r):12*h,m=3*h,y=e.arraystretch*p,b=.7*y,v=.3*y,C=0;function E(tt){for(var jt=0;jt<tt.length;++jt)jt>0&&(C+=.25),c.push({pos:C,isDashed:tt[jt]})}for(E(s[0]),n=0;n<e.body.length;++n){var _=e.body[n],k=b,N=v;o<_.length&&(o=_.length);var D=new Array(_.length);for(i=0;i<_.length;++i){var $=Nt(_[i],r);N<$.depth&&(N=$.depth),k<$.height&&(k=$.height),D[i]=$}var R=e.rowGaps[n],P=0;R&&(P=Kt(R,r),P>0&&(P+=v,N<P&&(N=P),P=0)),e.addJot&&(N+=m),D.height=k,D.depth=N,C+=k,D.pos=C,C+=N+P,l[n]=D,E(s[n+1])}var G=C/2+r.fontMetrics().axisHeight,ee=e.cols||[],W=[],U,j,Q=[];if(e.tags&&e.tags.some(tt=>tt))for(n=0;n<a;++n){var Y=l[n],be=Y.pos-G,L=e.tags[n],se=void 0;L===!0?se=ie.makeSpan(["eqn-num"],[],r):L===!1?se=ie.makeSpan([],[],r):se=ie.makeSpan([],pr(L,r,!0),r),se.depth=Y.depth,se.height=Y.height,Q.push({type:"elem",elem:se,shift:be})}for(i=0,j=0;i<o||j<ee.length;++i,++j){for(var ae=ee[j]||{},I=!0;ae.type==="separator";){if(I||(U=ie.makeSpan(["arraycolsep"],[]),U.style.width=Ae(r.fontMetrics().doubleRuleSep),W.push(U)),ae.separator==="|"||ae.separator===":"){var ye=ae.separator==="|"?"solid":"dashed",Ee=ie.makeSpan(["vertical-separator"],[],r);Ee.style.height=Ae(C),Ee.style.borderRightWidth=Ae(u),Ee.style.borderRightStyle=ye,Ee.style.margin="0 "+Ae(-u/2);var de=C-G;de&&(Ee.style.verticalAlign=Ae(-de)),W.push(Ee)}else throw new Te("Invalid separator type: "+ae.separator);j++,ae=ee[j]||{},I=!1}if(!(i>=o)){var we=void 0;(i>0||e.hskipBeforeAndAfter)&&(we=Mt.deflt(ae.pregap,d),we!==0&&(U=ie.makeSpan(["arraycolsep"],[]),U.style.width=Ae(we),W.push(U)));var qe=[];for(n=0;n<a;++n){var Re=l[n],De=Re[i];if(De){var et=Re.pos-G;De.depth=Re.depth,De.height=Re.height,qe.push({type:"elem",elem:De,shift:et})}}qe=ie.makeVList({positionType:"individualShift",children:qe},r),qe=ie.makeSpan(["col-align-"+(ae.align||"c")],[qe]),W.push(qe),(i<o-1||e.hskipBeforeAndAfter)&&(we=Mt.deflt(ae.postgap,d),we!==0&&(U=ie.makeSpan(["arraycolsep"],[]),U.style.width=Ae(we),W.push(U)))}}if(l=ie.makeSpan(["mtable"],W),c.length>0){for(var ot=ie.makeLineSpan("hline",r,u),_t=ie.makeLineSpan("hdashline",r,u),Et=[{type:"elem",elem:l,shift:0}];c.length>0;){var Me=c.pop(),fe=Me.pos-G;Me.isDashed?Et.push({type:"elem",elem:_t,shift:fe}):Et.push({type:"elem",elem:ot,shift:fe})}l=ie.makeVList({positionType:"individualShift",children:Et},r)}if(Q.length===0)return ie.makeSpan(["mord"],[l],r);var xe=ie.makeVList({positionType:"individualShift",children:Q},r);return xe=ie.makeSpan(["tag"],[xe],r),ie.makeFragment([l,xe])},dU={c:"center ",l:"left ",r:"right "},Ti=function(e,r){for(var n=[],i=new ke.MathNode("mtd",[],["mtr-glue"]),a=new ke.MathNode("mtd",[],["mml-eqn-num"]),s=0;s<e.body.length;s++){for(var o=e.body[s],l=[],c=0;c<o.length;c++)l.push(new ke.MathNode("mtd",[$t(o[c],r)]));e.tags&&e.tags[s]&&(l.unshift(i),l.push(i),e.leqno?l.unshift(a):l.push(a)),n.push(new ke.MathNode("mtr",l))}var u=new ke.MathNode("mtable",n),h=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);u.setAttribute("rowspacing",Ae(h));var d="",f="";if(e.cols&&e.cols.length>0){var p=e.cols,m="",y=!1,b=0,v=p.length;p[0].type==="separator"&&(d+="top ",b=1),p[p.length-1].type==="separator"&&(d+="bottom ",v-=1);for(var C=b;C<v;C++)p[C].type==="align"?(f+=dU[p[C].align],y&&(m+="none "),y=!0):p[C].type==="separator"&&y&&(m+=p[C].separator==="|"?"solid ":"dashed ",y=!1);u.setAttribute("columnalign",f.trim()),/[sd]/.test(m)&&u.setAttribute("columnlines",m.trim())}if(e.colSeparationType==="align"){for(var E=e.cols||[],_="",k=1;k<E.length;k++)_+=k%2?"0em ":"1em ";u.setAttribute("columnspacing",_.trim())}else e.colSeparationType==="alignat"||e.colSeparationType==="gather"?u.setAttribute("columnspacing","0em"):e.colSeparationType==="small"?u.setAttribute("columnspacing","0.2778em"):e.colSeparationType==="CD"?u.setAttribute("columnspacing","0.5em"):u.setAttribute("columnspacing","1em");var N="",D=e.hLinesBeforeRow;d+=D[0].length>0?"left ":"",d+=D[D.length-1].length>0?"right ":"";for(var $=1;$<D.length-1;$++)N+=D[$].length===0?"none ":D[$][0]?"dashed ":"solid ";return/[sd]/.test(N)&&u.setAttribute("rowlines",N.trim()),d!==""&&(u=new ke.MathNode("menclose",[u]),u.setAttribute("notation",d.trim())),e.arraystretch&&e.arraystretch<1&&(u=new ke.MathNode("mstyle",[u]),u.setAttribute("scriptlevel","1")),u},Kv=function(e,r){e.envName.indexOf("ed")===-1&&Th(e);var n=[],i=e.envName.indexOf("at")>-1?"alignat":"align",a=e.envName==="split",s=Aa(e.parser,{cols:n,addJot:!0,autoTag:a?void 0:E1(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:a?2:void 0,leqno:e.parser.settings.leqno},"display"),o,l=0,c={type:"ordgroup",mode:e.mode,body:[]};if(r[0]&&r[0].type==="ordgroup"){for(var u="",h=0;h<r[0].body.length;h++){var d=ft(r[0].body[h],"textord");u+=d.text}o=Number(u),l=o*2}var f=!l;s.body.forEach(function(b){for(var v=1;v<b.length;v+=2){var C=ft(b[v],"styling"),E=ft(C.body[0],"ordgroup");E.body.unshift(c)}if(f)l<b.length&&(l=b.length);else{var _=b.length/2;if(o<_)throw new Te("Too many math in a row: "+("expected "+o+", but got "+_),b[0])}});for(var p=0;p<l;++p){var m="r",y=0;p%2===1?m="l":p>0&&f&&(y=1),n[p]={type:"align",align:m,pregap:y,postgap:0}}return s.colSeparationType=f?"align":"alignat",s};ki({type:"array",names:["array","darray"],props:{numArgs:1},handler(t,e){var r=vh(e[0]),n=r?[e[0]]:ft(e[0],"ordgroup").body,i=n.map(function(s){var o=w1(s),l=o.text;if("lcr".indexOf(l)!==-1)return{type:"align",align:l};if(l==="|")return{type:"separator",separator:"|"};if(l===":")return{type:"separator",separator:":"};throw new Te("Unknown column alignment: "+l,s)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Aa(t.parser,a,A1(t.envName))},htmlBuilder:wi,mathmlBuilder:Ti});ki({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(t){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[t.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(t.envName.charAt(t.envName.length-1)==="*"){var i=t.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,"lcr".indexOf(r)===-1)throw new Te("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=Aa(t.parser,n,A1(t.envName)),s=Math.max(0,...a.body.map(o=>o.length));return a.cols=new Array(s).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[a],left:e[0],right:e[1],rightColor:void 0}:a},htmlBuilder:wi,mathmlBuilder:Ti});ki({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){var e={arraystretch:.5},r=Aa(t.parser,e,"script");return r.colSeparationType="small",r},htmlBuilder:wi,mathmlBuilder:Ti});ki({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){var r=vh(e[0]),n=r?[e[0]]:ft(e[0],"ordgroup").body,i=n.map(function(s){var o=w1(s),l=o.text;if("lc".indexOf(l)!==-1)return{type:"align",align:l};throw new Te("Unknown column alignment: "+l,s)});if(i.length>1)throw new Te("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if(a=Aa(t.parser,a,"script"),a.body.length>0&&a.body[0].length>1)throw new Te("{subarray} can contain only one column");return a},htmlBuilder:wi,mathmlBuilder:Ti});ki({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(t){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=Aa(t.parser,e,A1(t.envName));return{type:"leftright",mode:t.mode,body:[r],left:t.envName.indexOf("r")>-1?".":"\\{",right:t.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:wi,mathmlBuilder:Ti});ki({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Kv,htmlBuilder:wi,mathmlBuilder:Ti});ki({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(t){["gather","gather*"].includes(t.envName)&&Th(t);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:E1(t.envName),emptySingleRow:!0,leqno:t.parser.settings.leqno};return Aa(t.parser,e,"display")},htmlBuilder:wi,mathmlBuilder:Ti});ki({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Kv,htmlBuilder:wi,mathmlBuilder:Ti});ki({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(t){Th(t);var e={autoTag:E1(t.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:t.parser.settings.leqno};return Aa(t.parser,e,"display")},htmlBuilder:wi,mathmlBuilder:Ti});ki({type:"array",names:["CD"],props:{numArgs:0},handler(t){return Th(t),Zj(t.parser)},htmlBuilder:wi,mathmlBuilder:Ti});M("\\nonumber","\\gdef\\@eqnsw{0}");M("\\notag","\\nonumber");Ie({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,e){throw new Te(t.funcName+" valid only within array environment")}});var ky=Vv;Ie({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];if(i.type!=="ordgroup")throw new Te("Invalid environment name",i);for(var a="",s=0;s<i.body.length;++s)a+=ft(i.body[s],"textord").text;if(n==="\\begin"){if(!ky.hasOwnProperty(a))throw new Te("No such environment: "+a,i);var o=ky[a],{args:l,optArgs:c}=r.parseArguments("\\begin{"+a+"}",o),u={mode:r.mode,envName:a,parser:r},h=o.handler(u,l,c);r.expect("\\end",!1);var d=r.nextToken,f=ft(r.parseFunction(),"environment");if(f.name!==a)throw new Te("Mismatch: \\begin{"+a+"} matched by \\end{"+f.name+"}",d);return h}return{type:"environment",mode:r.mode,name:a,nameGroup:i}}});var Qv=(t,e)=>{var r=t.font,n=e.withFont(r);return Nt(t.body,n)},Zv=(t,e)=>{var r=t.font,n=e.withFont(r);return $t(t.body,n)},wy={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Ie({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=f0(e[0]),a=n;return a in wy&&(a=wy[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},htmlBuilder:Qv,mathmlBuilder:Zv});Ie({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(t,e)=>{var{parser:r}=t,n=e[0],i=Mt.isCharacterBox(n);return{type:"mclass",mode:r.mode,mclass:kh(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:i}}});Ie({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,breakOnTokenText:i}=t,{mode:a}=r,s=r.parseExpression(!0,i),o="math"+n.slice(1);return{type:"font",mode:a,font:o,body:{type:"ordgroup",mode:r.mode,body:s}}},htmlBuilder:Qv,mathmlBuilder:Zv});var Jv=(t,e)=>{var r=e;return t==="display"?r=r.id>=it.SCRIPT.id?r.text():it.DISPLAY:t==="text"&&r.size===it.DISPLAY.size?r=it.TEXT:t==="script"?r=it.SCRIPT:t==="scriptscript"&&(r=it.SCRIPTSCRIPT),r},N1=(t,e)=>{var r=Jv(t.size,e.style),n=r.fracNum(),i=r.fracDen(),a;a=e.havingStyle(n);var s=Nt(t.numer,a,e);if(t.continued){var o=8.5/e.fontMetrics().ptPerEm,l=3.5/e.fontMetrics().ptPerEm;s.height=s.height<o?o:s.height,s.depth=s.depth<l?l:s.depth}a=e.havingStyle(i);var c=Nt(t.denom,a,e),u,h,d;t.hasBarLine?(t.barSize?(h=Kt(t.barSize,e),u=ie.makeLineSpan("frac-line",e,h)):u=ie.makeLineSpan("frac-line",e),h=u.height,d=u.height):(u=null,h=0,d=e.fontMetrics().defaultRuleThickness);var f,p,m;r.size===it.DISPLAY.size||t.size==="display"?(f=e.fontMetrics().num1,h>0?p=3*d:p=7*d,m=e.fontMetrics().denom1):(h>0?(f=e.fontMetrics().num2,p=d):(f=e.fontMetrics().num3,p=3*d),m=e.fontMetrics().denom2);var y;if(u){var v=e.fontMetrics().axisHeight;f-s.depth-(v+.5*h)<p&&(f+=p-(f-s.depth-(v+.5*h))),v-.5*h-(c.height-m)<p&&(m+=p-(v-.5*h-(c.height-m)));var C=-(v-.5*h);y=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:m},{type:"elem",elem:u,shift:C},{type:"elem",elem:s,shift:-f}]},e)}else{var b=f-s.depth-(c.height-m);b<p&&(f+=.5*(p-b),m+=.5*(p-b)),y=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:m},{type:"elem",elem:s,shift:-f}]},e)}a=e.havingStyle(r),y.height*=a.sizeMultiplier/e.sizeMultiplier,y.depth*=a.sizeMultiplier/e.sizeMultiplier;var E;r.size===it.DISPLAY.size?E=e.fontMetrics().delim1:r.size===it.SCRIPTSCRIPT.size?E=e.havingStyle(it.SCRIPT).fontMetrics().delim2:E=e.fontMetrics().delim2;var _,k;return t.leftDelim==null?_=Jl(e,["mopen"]):_=ji.customSizedDelim(t.leftDelim,E,!0,e.havingStyle(r),t.mode,["mopen"]),t.continued?k=ie.makeSpan([]):t.rightDelim==null?k=Jl(e,["mclose"]):k=ji.customSizedDelim(t.rightDelim,E,!0,e.havingStyle(r),t.mode,["mclose"]),ie.makeSpan(["mord"].concat(a.sizingClasses(e)),[_,ie.makeSpan(["mfrac"],[y]),k],e)},L1=(t,e)=>{var r=new ke.MathNode("mfrac",[$t(t.numer,e),$t(t.denom,e)]);if(!t.hasBarLine)r.setAttribute("linethickness","0px");else if(t.barSize){var n=Kt(t.barSize,e);r.setAttribute("linethickness",Ae(n))}var i=Jv(t.size,e.style);if(i.size!==e.style.size){r=new ke.MathNode("mstyle",[r]);var a=i.size===it.DISPLAY.size?"true":"false";r.setAttribute("displaystyle",a),r.setAttribute("scriptlevel","0")}if(t.leftDelim!=null||t.rightDelim!=null){var s=[];if(t.leftDelim!=null){var o=new ke.MathNode("mo",[new ke.TextNode(t.leftDelim.replace("\\",""))]);o.setAttribute("fence","true"),s.push(o)}if(s.push(r),t.rightDelim!=null){var l=new ke.MathNode("mo",[new ke.TextNode(t.rightDelim.replace("\\",""))]);l.setAttribute("fence","true"),s.push(l)}return v1(s)}return r};Ie({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1],s,o=null,l=null,c="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,o="(",l=")";break;case"\\\\bracefrac":s=!1,o="\\{",l="\\}";break;case"\\\\brackfrac":s=!1,o="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":c="display";break;case"\\tfrac":case"\\tbinom":c="text";break}return{type:"genfrac",mode:r.mode,continued:!1,numer:i,denom:a,hasBarLine:s,leftDelim:o,rightDelim:l,size:c,barSize:null}},htmlBuilder:N1,mathmlBuilder:L1});Ie({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=e[1];return{type:"genfrac",mode:r.mode,continued:!0,numer:i,denom:a,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});Ie({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var{parser:e,funcName:r,token:n}=t,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:i,token:n}}});var Ty=["display","text","script","scriptscript"],Cy=function(e){var r=null;return e.length>0&&(r=e,r=r==="."?null:r),r};Ie({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(t,e){var{parser:r}=t,n=e[4],i=e[5],a=f0(e[0]),s=a.type==="atom"&&a.family==="open"?Cy(a.text):null,o=f0(e[1]),l=o.type==="atom"&&o.family==="close"?Cy(o.text):null,c=ft(e[2],"size"),u,h=null;c.isBlank?u=!0:(h=c.value,u=h.number>0);var d="auto",f=e[3];if(f.type==="ordgroup"){if(f.body.length>0){var p=ft(f.body[0],"textord");d=Ty[Number(p.text)]}}else f=ft(f,"textord"),d=Ty[Number(f.text)];return{type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:u,barSize:h,leftDelim:s,rightDelim:l,size:d}},htmlBuilder:N1,mathmlBuilder:L1});Ie({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(t,e){var{parser:r,funcName:n,token:i}=t;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:ft(e[0],"size").value,token:i}}});Ie({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0],a=jq(ft(e[1],"infix").size),s=e[2],o=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:s,continued:!1,hasBarLine:o,barSize:a,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:N1,mathmlBuilder:L1});var ek=(t,e)=>{var r=e.style,n,i;t.type==="supsub"?(n=t.sup?Nt(t.sup,e.havingStyle(r.sup()),e):Nt(t.sub,e.havingStyle(r.sub()),e),i=ft(t.base,"horizBrace")):i=ft(t,"horizBrace");var a=Nt(i.base,e.havingBaseStyle(it.DISPLAY)),s=Vi.svgSpan(i,e),o;if(i.isOver?(o=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},e),o.children[0].children[0].children[1].classes.push("svg-align")):(o=ie.makeVList({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},e),o.children[0].children[0].children[0].classes.push("svg-align")),n){var l=ie.makeSpan(["mord",i.isOver?"mover":"munder"],[o],e);i.isOver?o=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:n}]},e):o=ie.makeVList({positionType:"bottom",positionData:l.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:l}]},e)}return ie.makeSpan(["mord",i.isOver?"mover":"munder"],[o],e)},fU=(t,e)=>{var r=Vi.mathMLnode(t.label);return new ke.MathNode(t.isOver?"mover":"munder",[$t(t.base,e),r])};Ie({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:r,funcName:n}=t;return{type:"horizBrace",mode:r.mode,label:n,isOver:/^\\over/.test(n),base:e[0]}},htmlBuilder:ek,mathmlBuilder:fU});Ie({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[1],i=ft(e[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:rr(n)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(t,e)=>{var r=pr(t.body,e,!1);return ie.makeAnchor(t.href,[],r,e)},mathmlBuilder:(t,e)=>{var r=wa(t.body,e);return r instanceof yn||(r=new yn("mrow",[r])),r.setAttribute("href",t.href),r}});Ie({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=ft(e[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a<n.length;a++){var s=n[a];s==="~"&&(s="\\textasciitilde"),i.push({type:"textord",mode:"text",text:s})}var o={type:"text",mode:r.mode,font:"\\texttt",body:i};return{type:"href",mode:r.mode,href:n,body:rr(o)}}});Ie({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(t,e){var{parser:r}=t;return{type:"hbox",mode:r.mode,body:rr(e[0])}},htmlBuilder(t,e){var r=pr(t.body,e,!1);return ie.makeFragment(r)},mathmlBuilder(t,e){return new ke.MathNode("mrow",hn(t.body,e))}});Ie({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n,token:i}=t,a=ft(e[0],"raw").string,s=e[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var o,l={};switch(n){case"\\htmlClass":l.class=a,o={command:"\\htmlClass",class:a};break;case"\\htmlId":l.id=a,o={command:"\\htmlId",id:a};break;case"\\htmlStyle":l.style=a,o={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var c=a.split(","),u=0;u<c.length;u++){var h=c[u],d=h.indexOf("=");if(d<0)throw new Te("\\htmlData key/value '"+h+"' missing equals sign");var f=h.slice(0,d),p=h.slice(d+1);l["data-"+f.trim()]=p}o={command:"\\htmlData",attributes:l};break}default:throw new Error("Unrecognized html command")}return r.settings.isTrusted(o)?{type:"html",mode:r.mode,attributes:l,body:rr(s)}:r.formatUnsupportedCmd(n)},htmlBuilder:(t,e)=>{var r=pr(t.body,e,!1),n=["enclosing"];t.attributes.class&&n.push(...t.attributes.class.trim().split(/\s+/));var i=ie.makeSpan(n,r,e);for(var a in t.attributes)a!=="class"&&t.attributes.hasOwnProperty(a)&&i.setAttribute(a,t.attributes[a]);return i},mathmlBuilder:(t,e)=>wa(t.body,e)});Ie({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"htmlmathml",mode:r.mode,html:rr(e[0]),mathml:rr(e[1])}},htmlBuilder:(t,e)=>{var r=pr(t.html,e,!1);return ie.makeFragment(r)},mathmlBuilder:(t,e)=>wa(t.mathml,e)});var Kd=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!r)throw new Te("Invalid size: '"+e+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!xv(n))throw new Te("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n};Ie({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(t,e,r)=>{var{parser:n}=t,i={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},o="";if(r[0])for(var l=ft(r[0],"raw").string,c=l.split(","),u=0;u<c.length;u++){var h=c[u].split("=");if(h.length===2){var d=h[1].trim();switch(h[0].trim()){case"alt":o=d;break;case"width":i=Kd(d);break;case"height":a=Kd(d);break;case"totalheight":s=Kd(d);break;default:throw new Te("Invalid key: '"+h[0]+"' in \\includegraphics.")}}}var f=ft(e[0],"url").url;return o===""&&(o=f,o=o.replace(/^.*[\\/]/,""),o=o.substring(0,o.lastIndexOf("."))),n.settings.isTrusted({command:"\\includegraphics",url:f})?{type:"includegraphics",mode:n.mode,alt:o,width:i,height:a,totalheight:s,src:f}:n.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(t,e)=>{var r=Kt(t.height,e),n=0;t.totalheight.number>0&&(n=Kt(t.totalheight,e)-r);var i=0;t.width.number>0&&(i=Kt(t.width,e));var a={height:Ae(r+n)};i>0&&(a.width=Ae(i)),n>0&&(a.verticalAlign=Ae(-n));var s=new fj(t.src,t.alt,a);return s.height=r,s.depth=n,s},mathmlBuilder:(t,e)=>{var r=new ke.MathNode("mglyph",[]);r.setAttribute("alt",t.alt);var n=Kt(t.height,e),i=0;if(t.totalheight.number>0&&(i=Kt(t.totalheight,e)-n,r.setAttribute("valign",Ae(-i))),r.setAttribute("height",Ae(n+i)),t.width.number>0){var a=Kt(t.width,e);r.setAttribute("width",Ae(a))}return r.setAttribute("src",t.src),r}});Ie({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=ft(e[0],"size");if(r.settings.strict){var a=n[1]==="m",s=i.value.unit==="mu";a?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(t,e){return ie.makeGlue(t.dimension,e)},mathmlBuilder(t,e){var r=Kt(t.dimension,e);return new ke.SpaceNode(r)}});Ie({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},htmlBuilder:(t,e)=>{var r;t.alignment==="clap"?(r=ie.makeSpan([],[Nt(t.body,e)]),r=ie.makeSpan(["inner"],[r],e)):r=ie.makeSpan(["inner"],[Nt(t.body,e)]);var n=ie.makeSpan(["fix"],[]),i=ie.makeSpan([t.alignment],[r,n],e),a=ie.makeSpan(["strut"]);return a.style.height=Ae(i.height+i.depth),i.depth&&(a.style.verticalAlign=Ae(-i.depth)),i.children.unshift(a),i=ie.makeSpan(["thinbox"],[i],e),ie.makeSpan(["mord","vbox"],[i],e)},mathmlBuilder:(t,e)=>{var r=new ke.MathNode("mpadded",[$t(t.body,e)]);if(t.alignment!=="rlap"){var n=t.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r}});Ie({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:r,parser:n}=t,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",s=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",body:s}}});Ie({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new Te("Mismatched "+t.funcName)}});var Sy=(t,e)=>{switch(e.style.size){case it.DISPLAY.size:return t.display;case it.TEXT.size:return t.text;case it.SCRIPT.size:return t.script;case it.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}};Ie({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(t,e)=>{var{parser:r}=t;return{type:"mathchoice",mode:r.mode,display:rr(e[0]),text:rr(e[1]),script:rr(e[2]),scriptscript:rr(e[3])}},htmlBuilder:(t,e)=>{var r=Sy(t,e),n=pr(r,e,!1);return ie.makeFragment(n)},mathmlBuilder:(t,e)=>{var r=Sy(t,e);return wa(r,e)}});var tk=(t,e,r,n,i,a,s)=>{t=ie.makeSpan([],[t]);var o=r&&Mt.isCharacterBox(r),l,c;if(e){var u=Nt(e,n.havingStyle(i.sup()),n);c={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var h=Nt(r,n.havingStyle(i.sub()),n);l={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-h.height)}}var d;if(c&&l){var f=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+s;d=ie.makeVList({positionType:"bottom",positionData:f,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Ae(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:Ae(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(l){var p=t.height-s;d=ie.makeVList({positionType:"top",positionData:p,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:Ae(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n)}else if(c){var m=t.depth+s;d=ie.makeVList({positionType:"bottom",positionData:m,children:[{type:"elem",elem:t},{type:"kern",size:c.kern},{type:"elem",elem:c.elem,marginLeft:Ae(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else return t;var y=[d];if(l&&a!==0&&!o){var b=ie.makeSpan(["mspace"],[],n);b.style.marginRight=Ae(a),y.unshift(b)}return ie.makeSpan(["mop","op-limits"],y,n)},rk=["\\smallint"],Mo=(t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=ft(t.base,"op"),i=!0):a=ft(t,"op");var s=e.style,o=!1;s.size===it.DISPLAY.size&&a.symbol&&!rk.includes(a.name)&&(o=!0);var l;if(a.symbol){var c=o?"Size2-Regular":"Size1-Regular",u="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(u=a.name.slice(1),a.name=u==="oiint"?"\\iint":"\\iiint"),l=ie.makeSymbol(a.name,c,"math",e,["mop","op-symbol",o?"large-op":"small-op"]),u.length>0){var h=l.italic,d=ie.staticSvg(u+"Size"+(o?"2":"1"),e);l=ie.makeVList({positionType:"individualShift",children:[{type:"elem",elem:l,shift:0},{type:"elem",elem:d,shift:o?.08:0}]},e),a.name="\\"+u,l.classes.unshift("mop"),l.italic=h}}else if(a.body){var f=pr(a.body,e,!0);f.length===1&&f[0]instanceof On?(l=f[0],l.classes[0]="mop"):l=ie.makeSpan(["mop"],f,e)}else{for(var p=[],m=1;m<a.name.length;m++)p.push(ie.mathsym(a.name[m],a.mode,e));l=ie.makeSpan(["mop"],p,e)}var y=0,b=0;return(l instanceof On||a.name==="\\oiint"||a.name==="\\oiiint")&&!a.suppressBaseShift&&(y=(l.height-l.depth)/2-e.fontMetrics().axisHeight,b=l.italic),i?tk(l,r,n,e,s,b,y):(y&&(l.style.position="relative",l.style.top=Ae(y)),l)},Ec=(t,e)=>{var r;if(t.symbol)r=new yn("mo",[Pn(t.name,t.mode)]),rk.includes(t.name)&&r.setAttribute("largeop","false");else if(t.body)r=new yn("mo",hn(t.body,e));else{r=new yn("mi",[new pi(t.name.slice(1))]);var n=new yn("mo",[Pn("⁡","text")]);t.parentIsSupSub?r=new yn("mrow",[r,n]):r=Lv([r,n])}return r},pU={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};Ie({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=n;return i.length===1&&(i=pU[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Mo,mathmlBuilder:Ec});Ie({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:rr(n)}},htmlBuilder:Mo,mathmlBuilder:Ec});var mU={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};Ie({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Mo,mathmlBuilder:Ec});Ie({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:e,funcName:r}=t;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:Mo,mathmlBuilder:Ec});Ie({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(t){var{parser:e,funcName:r}=t,n=r;return n.length===1&&(n=mU[n]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:Mo,mathmlBuilder:Ec});var nk=(t,e)=>{var r,n,i=!1,a;t.type==="supsub"?(r=t.sup,n=t.sub,a=ft(t.base,"operatorname"),i=!0):a=ft(t,"operatorname");var s;if(a.body.length>0){for(var o=a.body.map(h=>{var d=h.text;return typeof d=="string"?{type:"textord",mode:h.mode,text:d}:h}),l=pr(o,e.withFont("mathrm"),!0),c=0;c<l.length;c++){var u=l[c];u instanceof On&&(u.text=u.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}s=ie.makeSpan(["mop"],l,e)}else s=ie.makeSpan(["mop"],[],e);return i?tk(s,r,n,e,e.style,0,0):s},gU=(t,e)=>{for(var r=hn(t.body,e.withFont("mathrm")),n=!0,i=0;i<r.length;i++){var a=r[i];if(!(a instanceof ke.SpaceNode))if(a instanceof ke.MathNode)switch(a.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var s=a.children[0];a.children.length===1&&s instanceof ke.TextNode?s.text=s.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):n=!1;break}default:n=!1}else n=!1}if(n){var o=r.map(u=>u.toText()).join("");r=[new ke.TextNode(o)]}var l=new ke.MathNode("mi",r);l.setAttribute("mathvariant","normal");var c=new ke.MathNode("mo",[Pn("⁡","text")]);return t.parentIsSupSub?new ke.MathNode("mrow",[l,c]):ke.newDocumentFragment([l,c])};Ie({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(t,e)=>{var{parser:r,funcName:n}=t,i=e[0];return{type:"operatorname",mode:r.mode,body:rr(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:nk,mathmlBuilder:gU});M("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");ys({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?ie.makeFragment(pr(t.body,e,!1)):ie.makeSpan(["mord"],pr(t.body,e,!0),e)},mathmlBuilder(t,e){return wa(t.body,e,!0)}});Ie({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){var{parser:r}=t,n=e[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(t,e){var r=Nt(t.body,e.havingCrampedStyle()),n=ie.makeLineSpan("overline-line",e),i=e.fontMetrics().defaultRuleThickness,a=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]},e);return ie.makeSpan(["mord","overline"],[a],e)},mathmlBuilder(t,e){var r=new ke.MathNode("mo",[new ke.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new ke.MathNode("mover",[$t(t.body,e),r]);return n.setAttribute("accent","true"),n}});Ie({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"phantom",mode:r.mode,body:rr(n)}},htmlBuilder:(t,e)=>{var r=pr(t.body,e.withPhantom(),!1);return ie.makeFragment(r)},mathmlBuilder:(t,e)=>{var r=hn(t.body,e);return new ke.MathNode("mphantom",r)}});Ie({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"hphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=ie.makeSpan([],[Nt(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n<r.children.length;n++)r.children[n].height=0,r.children[n].depth=0;return r=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e),ie.makeSpan(["mord"],[r],e)},mathmlBuilder:(t,e)=>{var r=hn(rr(t.body),e),n=new ke.MathNode("mphantom",r),i=new ke.MathNode("mpadded",[n]);return i.setAttribute("height","0px"),i.setAttribute("depth","0px"),i}});Ie({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(t,e)=>{var{parser:r}=t,n=e[0];return{type:"vphantom",mode:r.mode,body:n}},htmlBuilder:(t,e)=>{var r=ie.makeSpan(["inner"],[Nt(t.body,e.withPhantom())]),n=ie.makeSpan(["fix"],[]);return ie.makeSpan(["mord","rlap"],[r,n],e)},mathmlBuilder:(t,e)=>{var r=hn(rr(t.body),e),n=new ke.MathNode("mphantom",r),i=new ke.MathNode("mpadded",[n]);return i.setAttribute("width","0px"),i}});Ie({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var{parser:r}=t,n=ft(e[0],"size").value,i=e[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(t,e){var r=Nt(t.body,e),n=Kt(t.dy,e);return ie.makeVList({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){var r=new ke.MathNode("mpadded",[$t(t.body,e)]),n=t.dy.number+t.dy.unit;return r.setAttribute("voffset",n),r}});Ie({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(t){var{parser:e}=t;return{type:"internal",mode:e.mode}}});Ie({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(t,e,r){var{parser:n}=t,i=r[0],a=ft(e[0],"size"),s=ft(e[1],"size");return{type:"rule",mode:n.mode,shift:i&&ft(i,"size").value,width:a.value,height:s.value}},htmlBuilder(t,e){var r=ie.makeSpan(["mord","rule"],[],e),n=Kt(t.width,e),i=Kt(t.height,e),a=t.shift?Kt(t.shift,e):0;return r.style.borderRightWidth=Ae(n),r.style.borderTopWidth=Ae(i),r.style.bottom=Ae(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=Kt(t.width,e),n=Kt(t.height,e),i=t.shift?Kt(t.shift,e):0,a=e.color&&e.getColor()||"black",s=new ke.MathNode("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",Ae(r)),s.setAttribute("height",Ae(n));var o=new ke.MathNode("mpadded",[s]);return i>=0?o.setAttribute("height",Ae(i)):(o.setAttribute("height",Ae(i)),o.setAttribute("depth",Ae(-i))),o.setAttribute("voffset",Ae(i)),o}});function ik(t,e,r){for(var n=pr(t,e,!1),i=e.sizeMultiplier/r.sizeMultiplier,a=0;a<n.length;a++){var s=n[a].classes.indexOf("sizing");s<0?Array.prototype.push.apply(n[a].classes,e.sizingClasses(r)):n[a].classes[s+1]==="reset-size"+e.size&&(n[a].classes[s+1]="reset-size"+r.size),n[a].height*=i,n[a].depth*=i}return ie.makeFragment(n)}var _y=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],bU=(t,e)=>{var r=e.havingSize(t.size);return ik(t.body,r,e)};Ie({type:"sizing",names:_y,props:{numArgs:0,allowedInText:!0},handler:(t,e)=>{var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:_y.indexOf(n)+1,body:a}},htmlBuilder:bU,mathmlBuilder:(t,e)=>{var r=e.havingSize(t.size),n=hn(t.body,r),i=new ke.MathNode("mstyle",n);return i.setAttribute("mathsize",Ae(r.sizeMultiplier)),i}});Ie({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(t,e,r)=>{var{parser:n}=t,i=!1,a=!1,s=r[0]&&ft(r[0],"ordgroup");if(s)for(var o="",l=0;l<s.body.length;++l){var c=s.body[l];if(o=c.text,o==="t")i=!0;else if(o==="b")a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var u=e[0];return{type:"smash",mode:n.mode,body:u,smashHeight:i,smashDepth:a}},htmlBuilder:(t,e)=>{var r=ie.makeSpan([],[Nt(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n<r.children.length;n++)r.children[n].height=0;if(t.smashDepth&&(r.depth=0,r.children))for(var i=0;i<r.children.length;i++)r.children[i].depth=0;var a=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r}]},e);return ie.makeSpan(["mord"],[a],e)},mathmlBuilder:(t,e)=>{var r=new ke.MathNode("mpadded",[$t(t.body,e)]);return t.smashHeight&&r.setAttribute("height","0px"),t.smashDepth&&r.setAttribute("depth","0px"),r}});Ie({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:n}=t,i=r[0],a=e[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(t,e){var r=Nt(t.body,e.havingCrampedStyle());r.height===0&&(r.height=e.fontMetrics().xHeight),r=ie.wrapFragment(r,e);var n=e.fontMetrics(),i=n.defaultRuleThickness,a=i;e.style.id<it.TEXT.id&&(a=e.fontMetrics().xHeight);var s=i+a/4,o=r.height+r.depth+s+i,{span:l,ruleWidth:c,advanceWidth:u}=ji.sqrtImage(o,e),h=l.height-c;h>r.height+r.depth+s&&(s=(s+h-r.height-r.depth)/2);var d=l.height-r.height-s-c;r.style.paddingLeft=Ae(u);var f=ie.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+d)},{type:"elem",elem:l},{type:"kern",size:c}]},e);if(t.index){var p=e.havingStyle(it.SCRIPTSCRIPT),m=Nt(t.index,p,e),y=.6*(f.height-f.depth),b=ie.makeVList({positionType:"shift",positionData:-y,children:[{type:"elem",elem:m}]},e),v=ie.makeSpan(["root"],[b]);return ie.makeSpan(["mord","sqrt"],[v,f],e)}else return ie.makeSpan(["mord","sqrt"],[f],e)},mathmlBuilder(t,e){var{body:r,index:n}=t;return n?new ke.MathNode("mroot",[$t(r,e),$t(n,e)]):new ke.MathNode("msqrt",[$t(r,e)])}});var Ey={display:it.DISPLAY,text:it.TEXT,script:it.SCRIPT,scriptscript:it.SCRIPTSCRIPT};Ie({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:r,funcName:n,parser:i}=t,a=i.parseExpression(!0,r),s=n.slice(1,n.length-5);return{type:"styling",mode:i.mode,style:s,body:a}},htmlBuilder(t,e){var r=Ey[t.style],n=e.havingStyle(r).withFont("");return ik(t.body,n,e)},mathmlBuilder(t,e){var r=Ey[t.style],n=e.havingStyle(r),i=hn(t.body,n),a=new ke.MathNode("mstyle",i),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},o=s[t.style];return a.setAttribute("scriptlevel",o[0]),a.setAttribute("displaystyle",o[1]),a}});var yU=function(e,r){var n=e.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===it.DISPLAY.size||n.alwaysHandleSupSub);return i?Mo:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===it.DISPLAY.size||n.limits);return a?nk:null}else{if(n.type==="accent")return Mt.isCharacterBox(n.base)?T1:null;if(n.type==="horizBrace"){var s=!e.sub;return s===n.isOver?ek:null}else return null}else return null};ys({type:"supsub",htmlBuilder(t,e){var r=yU(t,e);if(r)return r(t,e);var{base:n,sup:i,sub:a}=t,s=Nt(n,e),o,l,c=e.fontMetrics(),u=0,h=0,d=n&&Mt.isCharacterBox(n);if(i){var f=e.havingStyle(e.style.sup());o=Nt(i,f,e),d||(u=s.height-f.fontMetrics().supDrop*f.sizeMultiplier/e.sizeMultiplier)}if(a){var p=e.havingStyle(e.style.sub());l=Nt(a,p,e),d||(h=s.depth+p.fontMetrics().subDrop*p.sizeMultiplier/e.sizeMultiplier)}var m;e.style===it.DISPLAY?m=c.sup1:e.style.cramped?m=c.sup3:m=c.sup2;var y=e.sizeMultiplier,b=Ae(.5/c.ptPerEm/y),v=null;if(l){var C=t.base&&t.base.type==="op"&&t.base.name&&(t.base.name==="\\oiint"||t.base.name==="\\oiiint");(s instanceof On||C)&&(v=Ae(-s.italic))}var E;if(o&&l){u=Math.max(u,m,o.depth+.25*c.xHeight),h=Math.max(h,c.sub2);var _=c.defaultRuleThickness,k=4*_;if(u-o.depth-(l.height-h)<k){h=k-(u-o.depth)+l.height;var N=.8*c.xHeight-(u-o.depth);N>0&&(u+=N,h-=N)}var D=[{type:"elem",elem:l,shift:h,marginRight:b,marginLeft:v},{type:"elem",elem:o,shift:-u,marginRight:b}];E=ie.makeVList({positionType:"individualShift",children:D},e)}else if(l){h=Math.max(h,c.sub1,l.height-.8*c.xHeight);var $=[{type:"elem",elem:l,marginLeft:v,marginRight:b}];E=ie.makeVList({positionType:"shift",positionData:h,children:$},e)}else if(o)u=Math.max(u,m,o.depth+.25*c.xHeight),E=ie.makeVList({positionType:"shift",positionData:-u,children:[{type:"elem",elem:o,marginRight:b}]},e);else throw new Error("supsub must have either sup or sub.");var R=sp(s,"right")||"mord";return ie.makeSpan([R],[s,ie.makeSpan(["msupsub"],[E])],e)},mathmlBuilder(t,e){var r=!1,n,i;t.base&&t.base.type==="horizBrace"&&(i=!!t.sup,i===t.base.isOver&&(r=!0,n=t.base.isOver)),t.base&&(t.base.type==="op"||t.base.type==="operatorname")&&(t.base.parentIsSupSub=!0);var a=[$t(t.base,e)];t.sub&&a.push($t(t.sub,e)),t.sup&&a.push($t(t.sup,e));var s;if(r)s=n?"mover":"munder";else if(t.sub)if(t.sup){var c=t.base;c&&c.type==="op"&&c.limits&&e.style===it.DISPLAY||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(e.style===it.DISPLAY||c.limits)?s="munderover":s="msubsup"}else{var l=t.base;l&&l.type==="op"&&l.limits&&(e.style===it.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||e.style===it.DISPLAY)?s="munder":s="msub"}else{var o=t.base;o&&o.type==="op"&&o.limits&&(e.style===it.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||e.style===it.DISPLAY)?s="mover":s="msup"}return new ke.MathNode(s,a)}});ys({type:"atom",htmlBuilder(t,e){return ie.mathsym(t.text,t.mode,e,["m"+t.family])},mathmlBuilder(t,e){var r=new ke.MathNode("mo",[Pn(t.text,t.mode)]);if(t.family==="bin"){var n=k1(t,e);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else t.family==="punct"?r.setAttribute("separator","true"):(t.family==="open"||t.family==="close")&&r.setAttribute("stretchy","false");return r}});var ak={mi:"italic",mn:"normal",mtext:"normal"};ys({type:"mathord",htmlBuilder(t,e){return ie.makeOrd(t,e,"mathord")},mathmlBuilder(t,e){var r=new ke.MathNode("mi",[Pn(t.text,t.mode,e)]),n=k1(t,e)||"italic";return n!==ak[r.type]&&r.setAttribute("mathvariant",n),r}});ys({type:"textord",htmlBuilder(t,e){return ie.makeOrd(t,e,"textord")},mathmlBuilder(t,e){var r=Pn(t.text,t.mode,e),n=k1(t,e)||"normal",i;return t.mode==="text"?i=new ke.MathNode("mtext",[r]):/[0-9]/.test(t.text)?i=new ke.MathNode("mn",[r]):t.text==="\\prime"?i=new ke.MathNode("mo",[r]):i=new ke.MathNode("mi",[r]),n!==ak[i.type]&&i.setAttribute("mathvariant",n),i}});var Qd={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Zd={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ys({type:"spacing",htmlBuilder(t,e){if(Zd.hasOwnProperty(t.text)){var r=Zd[t.text].className||"";if(t.mode==="text"){var n=ie.makeOrd(t,e,"textord");return n.classes.push(r),n}else return ie.makeSpan(["mspace",r],[ie.mathsym(t.text,t.mode,e)],e)}else{if(Qd.hasOwnProperty(t.text))return ie.makeSpan(["mspace",Qd[t.text]],[],e);throw new Te('Unknown type of space "'+t.text+'"')}},mathmlBuilder(t,e){var r;if(Zd.hasOwnProperty(t.text))r=new ke.MathNode("mtext",[new ke.TextNode(" ")]);else{if(Qd.hasOwnProperty(t.text))return new ke.MathNode("mspace");throw new Te('Unknown type of space "'+t.text+'"')}return r}});var Ay=()=>{var t=new ke.MathNode("mtd",[]);return t.setAttribute("width","50%"),t};ys({type:"tag",mathmlBuilder(t,e){var r=new ke.MathNode("mtable",[new ke.MathNode("mtr",[Ay(),new ke.MathNode("mtd",[wa(t.body,e)]),Ay(),new ke.MathNode("mtd",[wa(t.tag,e)])])]);return r.setAttribute("width","100%"),r}});var Ny={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Ly={"\\textbf":"textbf","\\textmd":"textmd"},xU={"\\textit":"textit","\\textup":"textup"},My=(t,e)=>{var r=t.font;if(r){if(Ny[r])return e.withTextFontFamily(Ny[r]);if(Ly[r])return e.withTextFontWeight(Ly[r]);if(r==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(xU[r])};Ie({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:r,funcName:n}=t,i=e[0];return{type:"text",mode:r.mode,body:rr(i),font:n}},htmlBuilder(t,e){var r=My(t,e),n=pr(t.body,r,!0);return ie.makeSpan(["mord","text"],n,r)},mathmlBuilder(t,e){var r=My(t,e);return wa(t.body,r)}});Ie({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){var{parser:r}=t;return{type:"underline",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Nt(t.body,e),n=ie.makeLineSpan("underline-line",e),i=e.fontMetrics().defaultRuleThickness,a=ie.makeVList({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]},e);return ie.makeSpan(["mord","underline"],[a],e)},mathmlBuilder(t,e){var r=new ke.MathNode("mo",[new ke.TextNode("‾")]);r.setAttribute("stretchy","true");var n=new ke.MathNode("munder",[$t(t.body,e),r]);return n.setAttribute("accentunder","true"),n}});Ie({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){var{parser:r}=t;return{type:"vcenter",mode:r.mode,body:e[0]}},htmlBuilder(t,e){var r=Nt(t.body,e),n=e.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return ie.makeVList({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return new ke.MathNode("mpadded",[$t(t.body,e)],["vcenter"])}});Ie({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new Te("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=Iy(t),n=[],i=e.havingStyle(e.style.text()),a=0;a<r.length;a++){var s=r[a];s==="~"&&(s="\\textasciitilde"),n.push(ie.makeSymbol(s,"Typewriter-Regular",t.mode,i,["mord","texttt"]))}return ie.makeSpan(["mord","text"].concat(i.sizingClasses(e)),ie.tryCombineChars(n),i)},mathmlBuilder(t,e){var r=new ke.TextNode(Iy(t)),n=new ke.MathNode("mtext",[r]);return n.setAttribute("mathvariant","monospace"),n}});var Iy=t=>t.body.replace(/ /g,t.star?"␣":" "),ma=Av,sk=`[ \r
382
+ ]`,vU="\\\\[a-zA-Z@]+",kU="\\\\[^\uD800-\uDFFF]",wU="("+vU+")"+sk+"*",TU=`\\\\(
383
+ |[ \r ]+
384
+ ?)[ \r ]*`,up="[̀-ͯ]",CU=new RegExp(up+"+$"),SU="("+sk+"+)|"+(TU+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(up+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(up+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+wU)+("|"+kU+")");class Ry{constructor(e,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=r,this.tokenRegex=new RegExp(SU,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,r){this.catcodes[e]=r}lex(){var e=this.input,r=this.tokenRegex.lastIndex;if(r===e.length)return new kn("EOF",new on(this,r,r));var n=this.tokenRegex.exec(e);if(n===null||n.index!==r)throw new Te("Unexpected character: '"+e[r]+"'",new kn(e[r],new on(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=e.indexOf(`
385
+ `,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=a+1,this.lex()}return new kn(i,new on(this,r,this.tokenRegex.lastIndex))}}class _U{constructor(e,r){e===void 0&&(e={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Te("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var r in e)e.hasOwnProperty(r)&&(e[r]==null?delete this.current[r]:this.current[r]=e[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i<this.undefStack.length;i++)delete this.undefStack[i][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(e)&&(a[e]=this.current[e])}r==null?delete this.current[e]:this.current[e]=r}}var EU=Xv;M("\\noexpand",function(t){var e=t.popToken();return t.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});M("\\expandafter",function(t){var e=t.popToken();return t.expandOnce(!0),{tokens:[e],numArgs:0}});M("\\@firstoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[0],numArgs:0}});M("\\@secondoftwo",function(t){var e=t.consumeArgs(2);return{tokens:e[1],numArgs:0}});M("\\@ifnextchar",function(t){var e=t.consumeArgs(3);t.consumeSpaces();var r=t.future();return e[0].length===1&&e[0][0].text===r.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});M("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");M("\\TextOrMath",function(t){var e=t.consumeArgs(2);return t.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var By={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};M("\\char",function(t){var e=t.popToken(),r,n="";if(e.text==="'")r=8,e=t.popToken();else if(e.text==='"')r=16,e=t.popToken();else if(e.text==="`")if(e=t.popToken(),e.text[0]==="\\")n=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new Te("\\char` missing argument");n=e.text.charCodeAt(0)}else r=10;if(r){if(n=By[e.text],n==null||n>=r)throw new Te("Invalid base-"+r+" digit "+e.text);for(var i;(i=By[t.future().text])!=null&&i<r;)n*=r,n+=i,t.popToken()}return"\\@char{"+n+"}"});var M1=(t,e,r,n)=>{var i=t.consumeArg().tokens;if(i.length!==1)throw new Te("\\newcommand's first argument must be a macro name");var a=i[0].text,s=t.isDefined(a);if(s&&!e)throw new Te("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!s&&!r)throw new Te("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var o=0;if(i=t.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var l="",c=t.expandNextToken();c.text!=="]"&&c.text!=="EOF";)l+=c.text,c=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Te("Invalid number of arguments: "+l);o=parseInt(l),i=t.consumeArg().tokens}return s&&n||t.macros.set(a,{tokens:i,numArgs:o}),""};M("\\newcommand",t=>M1(t,!1,!0,!1));M("\\renewcommand",t=>M1(t,!0,!1,!1));M("\\providecommand",t=>M1(t,!0,!0,!0));M("\\message",t=>{var e=t.consumeArgs(1)[0];return console.log(e.reverse().map(r=>r.text).join("")),""});M("\\errmessage",t=>{var e=t.consumeArgs(1)[0];return console.error(e.reverse().map(r=>r.text).join("")),""});M("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),ma[r],Ht.math[r],Ht.text[r]),""});M("\\bgroup","{");M("\\egroup","}");M("~","\\nobreakspace");M("\\lq","`");M("\\rq","'");M("\\aa","\\r a");M("\\AA","\\r A");M("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");M("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");M("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");M("ℬ","\\mathscr{B}");M("ℰ","\\mathscr{E}");M("ℱ","\\mathscr{F}");M("ℋ","\\mathscr{H}");M("ℐ","\\mathscr{I}");M("ℒ","\\mathscr{L}");M("ℳ","\\mathscr{M}");M("ℛ","\\mathscr{R}");M("ℭ","\\mathfrak{C}");M("ℌ","\\mathfrak{H}");M("ℨ","\\mathfrak{Z}");M("\\Bbbk","\\Bbb{k}");M("·","\\cdotp");M("\\llap","\\mathllap{\\textrm{#1}}");M("\\rlap","\\mathrlap{\\textrm{#1}}");M("\\clap","\\mathclap{\\textrm{#1}}");M("\\mathstrut","\\vphantom{(}");M("\\underbar","\\underline{\\text{#1}}");M("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');M("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");M("\\ne","\\neq");M("≠","\\neq");M("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");M("∉","\\notin");M("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");M("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");M("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");M("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");M("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");M("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");M("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");M("⟂","\\perp");M("‼","\\mathclose{!\\mkern-0.8mu!}");M("∌","\\notni");M("⌜","\\ulcorner");M("⌝","\\urcorner");M("⌞","\\llcorner");M("⌟","\\lrcorner");M("©","\\copyright");M("®","\\textregistered");M("️","\\textregistered");M("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');M("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');M("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');M("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');M("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");M("⋮","\\vdots");M("\\varGamma","\\mathit{\\Gamma}");M("\\varDelta","\\mathit{\\Delta}");M("\\varTheta","\\mathit{\\Theta}");M("\\varLambda","\\mathit{\\Lambda}");M("\\varXi","\\mathit{\\Xi}");M("\\varPi","\\mathit{\\Pi}");M("\\varSigma","\\mathit{\\Sigma}");M("\\varUpsilon","\\mathit{\\Upsilon}");M("\\varPhi","\\mathit{\\Phi}");M("\\varPsi","\\mathit{\\Psi}");M("\\varOmega","\\mathit{\\Omega}");M("\\substack","\\begin{subarray}{c}#1\\end{subarray}");M("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");M("\\boxed","\\fbox{$\\displaystyle{#1}$}");M("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");M("\\implies","\\DOTSB\\;\\Longrightarrow\\;");M("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");M("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");M("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Dy={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};M("\\dots",function(t){var e="\\dotso",r=t.expandAfterFuture().text;return r in Dy?e=Dy[r]:(r.slice(0,4)==="\\not"||r in Ht.math&&["bin","rel"].includes(Ht.math[r].group))&&(e="\\dotsb"),e});var I1={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};M("\\dotso",function(t){var e=t.future().text;return e in I1?"\\ldots\\,":"\\ldots"});M("\\dotsc",function(t){var e=t.future().text;return e in I1&&e!==","?"\\ldots\\,":"\\ldots"});M("\\cdots",function(t){var e=t.future().text;return e in I1?"\\@cdots\\,":"\\@cdots"});M("\\dotsb","\\cdots");M("\\dotsm","\\cdots");M("\\dotsi","\\!\\cdots");M("\\dotsx","\\ldots\\,");M("\\DOTSI","\\relax");M("\\DOTSB","\\relax");M("\\DOTSX","\\relax");M("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");M("\\,","\\tmspace+{3mu}{.1667em}");M("\\thinspace","\\,");M("\\>","\\mskip{4mu}");M("\\:","\\tmspace+{4mu}{.2222em}");M("\\medspace","\\:");M("\\;","\\tmspace+{5mu}{.2777em}");M("\\thickspace","\\;");M("\\!","\\tmspace-{3mu}{.1667em}");M("\\negthinspace","\\!");M("\\negmedspace","\\tmspace-{4mu}{.2222em}");M("\\negthickspace","\\tmspace-{5mu}{.277em}");M("\\enspace","\\kern.5em ");M("\\enskip","\\hskip.5em\\relax");M("\\quad","\\hskip1em\\relax");M("\\qquad","\\hskip2em\\relax");M("\\tag","\\@ifstar\\tag@literal\\tag@paren");M("\\tag@paren","\\tag@literal{({#1})}");M("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new Te("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});M("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");M("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");M("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");M("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");M("\\newline","\\\\\\relax");M("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var ok=Ae(fi["Main-Regular"][84][1]-.7*fi["Main-Regular"][65][1]);M("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+ok+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");M("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+ok+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");M("\\hspace","\\@ifstar\\@hspacer\\@hspace");M("\\@hspace","\\hskip #1\\relax");M("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");M("\\ordinarycolon",":");M("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");M("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');M("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');M("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');M("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');M("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');M("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');M("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');M("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');M("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');M("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');M("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');M("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');M("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');M("∷","\\dblcolon");M("∹","\\eqcolon");M("≔","\\coloneqq");M("≕","\\eqqcolon");M("⩴","\\Coloneqq");M("\\ratio","\\vcentcolon");M("\\coloncolon","\\dblcolon");M("\\colonequals","\\coloneqq");M("\\coloncolonequals","\\Coloneqq");M("\\equalscolon","\\eqqcolon");M("\\equalscoloncolon","\\Eqqcolon");M("\\colonminus","\\coloneq");M("\\coloncolonminus","\\Coloneq");M("\\minuscolon","\\eqcolon");M("\\minuscoloncolon","\\Eqcolon");M("\\coloncolonapprox","\\Colonapprox");M("\\coloncolonsim","\\Colonsim");M("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");M("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");M("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");M("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");M("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");M("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");M("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");M("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");M("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");M("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");M("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");M("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");M("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");M("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");M("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");M("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");M("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");M("\\nleqq","\\html@mathml{\\@nleqq}{≰}");M("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");M("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");M("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");M("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");M("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");M("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");M("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");M("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");M("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");M("\\imath","\\html@mathml{\\@imath}{ı}");M("\\jmath","\\html@mathml{\\@jmath}{ȷ}");M("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");M("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");M("⟦","\\llbracket");M("⟧","\\rrbracket");M("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");M("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");M("⦃","\\lBrace");M("⦄","\\rBrace");M("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");M("⦵","\\minuso");M("\\darr","\\downarrow");M("\\dArr","\\Downarrow");M("\\Darr","\\Downarrow");M("\\lang","\\langle");M("\\rang","\\rangle");M("\\uarr","\\uparrow");M("\\uArr","\\Uparrow");M("\\Uarr","\\Uparrow");M("\\N","\\mathbb{N}");M("\\R","\\mathbb{R}");M("\\Z","\\mathbb{Z}");M("\\alef","\\aleph");M("\\alefsym","\\aleph");M("\\Alpha","\\mathrm{A}");M("\\Beta","\\mathrm{B}");M("\\bull","\\bullet");M("\\Chi","\\mathrm{X}");M("\\clubs","\\clubsuit");M("\\cnums","\\mathbb{C}");M("\\Complex","\\mathbb{C}");M("\\Dagger","\\ddagger");M("\\diamonds","\\diamondsuit");M("\\empty","\\emptyset");M("\\Epsilon","\\mathrm{E}");M("\\Eta","\\mathrm{H}");M("\\exist","\\exists");M("\\harr","\\leftrightarrow");M("\\hArr","\\Leftrightarrow");M("\\Harr","\\Leftrightarrow");M("\\hearts","\\heartsuit");M("\\image","\\Im");M("\\infin","\\infty");M("\\Iota","\\mathrm{I}");M("\\isin","\\in");M("\\Kappa","\\mathrm{K}");M("\\larr","\\leftarrow");M("\\lArr","\\Leftarrow");M("\\Larr","\\Leftarrow");M("\\lrarr","\\leftrightarrow");M("\\lrArr","\\Leftrightarrow");M("\\Lrarr","\\Leftrightarrow");M("\\Mu","\\mathrm{M}");M("\\natnums","\\mathbb{N}");M("\\Nu","\\mathrm{N}");M("\\Omicron","\\mathrm{O}");M("\\plusmn","\\pm");M("\\rarr","\\rightarrow");M("\\rArr","\\Rightarrow");M("\\Rarr","\\Rightarrow");M("\\real","\\Re");M("\\reals","\\mathbb{R}");M("\\Reals","\\mathbb{R}");M("\\Rho","\\mathrm{P}");M("\\sdot","\\cdot");M("\\sect","\\S");M("\\spades","\\spadesuit");M("\\sub","\\subset");M("\\sube","\\subseteq");M("\\supe","\\supseteq");M("\\Tau","\\mathrm{T}");M("\\thetasym","\\vartheta");M("\\weierp","\\wp");M("\\Zeta","\\mathrm{Z}");M("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");M("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");M("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");M("\\bra","\\mathinner{\\langle{#1}|}");M("\\ket","\\mathinner{|{#1}\\rangle}");M("\\braket","\\mathinner{\\langle{#1}\\rangle}");M("\\Bra","\\left\\langle#1\\right|");M("\\Ket","\\left|#1\\right\\rangle");var lk=t=>e=>{var r=e.consumeArg().tokens,n=e.consumeArg().tokens,i=e.consumeArg().tokens,a=e.consumeArg().tokens,s=e.macros.get("|"),o=e.macros.get("\\|");e.macros.beginGroup();var l=h=>d=>{t&&(d.macros.set("|",s),i.length&&d.macros.set("\\|",o));var f=h;if(!h&&i.length){var p=d.future();p.text==="|"&&(d.popToken(),f=!0)}return{tokens:f?i:n,numArgs:0}};e.macros.set("|",l(!1)),i.length&&e.macros.set("\\|",l(!0));var c=e.consumeArg().tokens,u=e.expandTokens([...a,...c,...r]);return e.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};M("\\bra@ket",lk(!1));M("\\bra@set",lk(!0));M("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");M("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");M("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");M("\\angln","{\\angl n}");M("\\blue","\\textcolor{##6495ed}{#1}");M("\\orange","\\textcolor{##ffa500}{#1}");M("\\pink","\\textcolor{##ff00af}{#1}");M("\\red","\\textcolor{##df0030}{#1}");M("\\green","\\textcolor{##28ae7b}{#1}");M("\\gray","\\textcolor{gray}{#1}");M("\\purple","\\textcolor{##9d38bd}{#1}");M("\\blueA","\\textcolor{##ccfaff}{#1}");M("\\blueB","\\textcolor{##80f6ff}{#1}");M("\\blueC","\\textcolor{##63d9ea}{#1}");M("\\blueD","\\textcolor{##11accd}{#1}");M("\\blueE","\\textcolor{##0c7f99}{#1}");M("\\tealA","\\textcolor{##94fff5}{#1}");M("\\tealB","\\textcolor{##26edd5}{#1}");M("\\tealC","\\textcolor{##01d1c1}{#1}");M("\\tealD","\\textcolor{##01a995}{#1}");M("\\tealE","\\textcolor{##208170}{#1}");M("\\greenA","\\textcolor{##b6ffb0}{#1}");M("\\greenB","\\textcolor{##8af281}{#1}");M("\\greenC","\\textcolor{##74cf70}{#1}");M("\\greenD","\\textcolor{##1fab54}{#1}");M("\\greenE","\\textcolor{##0d923f}{#1}");M("\\goldA","\\textcolor{##ffd0a9}{#1}");M("\\goldB","\\textcolor{##ffbb71}{#1}");M("\\goldC","\\textcolor{##ff9c39}{#1}");M("\\goldD","\\textcolor{##e07d10}{#1}");M("\\goldE","\\textcolor{##a75a05}{#1}");M("\\redA","\\textcolor{##fca9a9}{#1}");M("\\redB","\\textcolor{##ff8482}{#1}");M("\\redC","\\textcolor{##f9685d}{#1}");M("\\redD","\\textcolor{##e84d39}{#1}");M("\\redE","\\textcolor{##bc2612}{#1}");M("\\maroonA","\\textcolor{##ffbde0}{#1}");M("\\maroonB","\\textcolor{##ff92c6}{#1}");M("\\maroonC","\\textcolor{##ed5fa6}{#1}");M("\\maroonD","\\textcolor{##ca337c}{#1}");M("\\maroonE","\\textcolor{##9e034e}{#1}");M("\\purpleA","\\textcolor{##ddd7ff}{#1}");M("\\purpleB","\\textcolor{##c6b9fc}{#1}");M("\\purpleC","\\textcolor{##aa87ff}{#1}");M("\\purpleD","\\textcolor{##7854ab}{#1}");M("\\purpleE","\\textcolor{##543b78}{#1}");M("\\mintA","\\textcolor{##f5f9e8}{#1}");M("\\mintB","\\textcolor{##edf2df}{#1}");M("\\mintC","\\textcolor{##e0e5cc}{#1}");M("\\grayA","\\textcolor{##f6f7f7}{#1}");M("\\grayB","\\textcolor{##f0f1f2}{#1}");M("\\grayC","\\textcolor{##e3e5e6}{#1}");M("\\grayD","\\textcolor{##d6d8da}{#1}");M("\\grayE","\\textcolor{##babec2}{#1}");M("\\grayF","\\textcolor{##888d93}{#1}");M("\\grayG","\\textcolor{##626569}{#1}");M("\\grayH","\\textcolor{##3b3e40}{#1}");M("\\grayI","\\textcolor{##21242c}{#1}");M("\\kaBlue","\\textcolor{##314453}{#1}");M("\\kaGreen","\\textcolor{##71B307}{#1}");var ck={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class AU{constructor(e,r,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=r,this.expansionCount=0,this.feed(e),this.macros=new _U(EU,r.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new Ry(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var r,n,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new kn("EOF",n.loc)),this.pushTokens(i),new kn("",on.range(r,n))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var r=[],n=e&&e.length>0;n||this.consumeSpaces();var i=this.future(),a,s=0,o=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++s;else if(a.text==="}"){if(--s,s===-1)throw new Te("Extra }",a)}else if(a.text==="EOF")throw new Te("Unexpected end of input in a macro argument, expected '"+(e&&n?e[o]:"}")+"'",a);if(e&&n)if((s===0||s===1&&e[o]==="{")&&a.text===e[o]){if(++o,o===e.length){r.splice(-o,o);break}}else o=0}while(s!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a}}consumeArgs(e,r){if(r){if(r.length!==e+1)throw new Te("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;i<n.length;i++){var a=this.popToken();if(n[i]!==a.text)throw new Te("Use of the macro doesn't match its definition",a)}}for(var s=[],o=0;o<e;o++)s.push(this.consumeArg(r&&r[o+1]).tokens);return s}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new Te("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||e&&i.unexpandable){if(e&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new Te("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,s=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var o=a.length-1;o>=0;--o){var l=a[o];if(l.text==="#"){if(o===0)throw new Te("Incomplete placeholder at end of macro body",l);if(l=a[--o],l.text==="#")a.splice(o+1,1);else if(/^[1-9]$/.test(l.text))a.splice(o,2,...s[+l.text-1]);else throw new Te("Not a valid argument number",l)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new kn(e)]):void 0}expandTokens(e){var r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(e){var r=this.expandMacro(e);return r&&r.map(n=>n.text).join("")}_getExpansion(e){var r=this.macros.get(e);if(r==null)return r;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.indexOf("#")!==-1)for(var s=i.replace(/##/g,"");s.indexOf("#"+(a+1))!==-1;)++a;for(var o=new Ry(i,this.settings),l=[],c=o.lex();c.text!=="EOF";)l.push(c),c=o.lex();l.reverse();var u={tokens:l,numArgs:a};return u}return i}isDefined(e){return this.macros.has(e)||ma.hasOwnProperty(e)||Ht.math.hasOwnProperty(e)||Ht.text.hasOwnProperty(e)||ck.hasOwnProperty(e)}isExpandable(e){var r=this.macros.get(e);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:ma.hasOwnProperty(e)&&!ma[e].primitive}}var Oy=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,iu=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),Jd={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},Py={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Ch{constructor(e,r){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new AU(e,r,this.mode),this.settings=r,this.leftrightDepth=0}expect(e,r){if(r===void 0&&(r=!0),this.fetch().text!==e)throw new Te("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var r=this.nextToken;this.consume(),this.gullet.pushToken(new kn("}")),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(e,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(Ch.endOfExpression.indexOf(i.text)!==-1||r&&i.text===r||e&&ma[i.text]&&ma[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(e){for(var r=-1,n,i=0;i<e.length;i++)if(e[i].type==="infix"){if(r!==-1)throw new Te("only one infix operator per group",e[i].token);r=i,n=e[i].replaceWith}if(r!==-1&&n){var a,s,o=e.slice(0,r),l=e.slice(r+1);o.length===1&&o[0].type==="ordgroup"?a=o[0]:a={type:"ordgroup",mode:this.mode,body:o},l.length===1&&l[0].type==="ordgroup"?s=l[0]:s={type:"ordgroup",mode:this.mode,body:l};var c;return n==="\\\\abovefrac"?c=this.callFunction(n,[a,e[r],s],[]):c=this.callFunction(n,[a,s],[]),[c]}else return e}handleSupSubscript(e){var r=this.fetch(),n=r.text;this.consume(),this.consumeSpaces();var i;do{var a;i=this.parseGroup(e)}while(((a=i)==null?void 0:a.type)==="internal");if(!i)throw new Te("Expected group after '"+n+"'",r);return i}formatUnsupportedCmd(e){for(var r=[],n=0;n<e.length;n++)r.push({type:"textord",mode:"text",text:e[n]});var i={type:"text",mode:this.mode,body:r},a={type:"color",mode:this.mode,color:this.settings.errorColor,body:[i]};return a}parseAtom(e){var r=this.parseGroup("atom",e);if((r==null?void 0:r.type)==="internal"||this.mode==="text")return r;for(var n,i;;){this.consumeSpaces();var a=this.fetch();if(a.text==="\\limits"||a.text==="\\nolimits"){if(r&&r.type==="op"){var s=a.text==="\\limits";r.limits=s,r.alwaysHandleSupSub=!0}else if(r&&r.type==="operatorname")r.alwaysHandleSupSub&&(r.limits=a.text==="\\limits");else throw new Te("Limit controls must follow a math operator",a);this.consume()}else if(a.text==="^"){if(n)throw new Te("Double superscript",a);n=this.handleSupSubscript("superscript")}else if(a.text==="_"){if(i)throw new Te("Double subscript",a);i=this.handleSupSubscript("subscript")}else if(a.text==="'"){if(n)throw new Te("Double superscript",a);var o={type:"textord",mode:this.mode,text:"\\prime"},l=[o];for(this.consume();this.fetch().text==="'";)l.push(o),this.consume();this.fetch().text==="^"&&l.push(this.handleSupSubscript("superscript")),n={type:"ordgroup",mode:this.mode,body:l}}else if(iu[a.text]){var c=Oy.test(a.text),u=[];for(u.push(new kn(iu[a.text])),this.consume();;){var h=this.fetch().text;if(!iu[h]||Oy.test(h)!==c)break;u.unshift(new kn(iu[h])),this.consume()}var d=this.subparse(u);c?i={type:"ordgroup",mode:"math",body:d}:n={type:"ordgroup",mode:"math",body:d}}else break}return n||i?{type:"supsub",mode:this.mode,base:r,sup:n,sub:i}:r}parseFunction(e,r){var n=this.fetch(),i=n.text,a=ma[i];if(!a)return null;if(this.consume(),r&&r!=="atom"&&!a.allowedInArgument)throw new Te("Got function '"+i+"' with no arguments"+(r?" as "+r:""),n);if(this.mode==="text"&&!a.allowedInText)throw new Te("Can't use function '"+i+"' in text mode",n);if(this.mode==="math"&&a.allowedInMath===!1)throw new Te("Can't use function '"+i+"' in math mode",n);var{args:s,optArgs:o}=this.parseArguments(i,a);return this.callFunction(i,s,o,n,e)}callFunction(e,r,n,i,a){var s={funcName:e,parser:this,token:i,breakOnTokenText:a},o=ma[e];if(o&&o.handler)return o.handler(s,r,n);throw new Te("No function handler for "+e)}parseArguments(e,r){var n=r.numArgs+r.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var i=[],a=[],s=0;s<n;s++){var o=r.argTypes&&r.argTypes[s],l=s<r.numOptionalArgs;(r.primitive&&o==null||r.type==="sqrt"&&s===1&&a[0]==null)&&(o="primitive");var c=this.parseGroupOfType("argument to '"+e+"'",o,l);if(l)a.push(c);else if(c!=null)i.push(c);else throw new Te("Null argument, please report this as a bug")}return{args:i,optArgs:a}}parseGroupOfType(e,r,n){switch(r){case"color":return this.parseColorGroup(n);case"size":return this.parseSizeGroup(n);case"url":return this.parseUrlGroup(n);case"math":case"text":return this.parseArgumentGroup(n,r);case"hbox":{var i=this.parseArgumentGroup(n,"text");return i!=null?{type:"styling",mode:i.mode,body:[i],style:"text"}:null}case"raw":{var a=this.parseStringGroup("raw",n);return a!=null?{type:"raw",mode:"text",string:a.text}:null}case"primitive":{if(n)throw new Te("A primitive argument cannot be optional");var s=this.parseGroup(e);if(s==null)throw new Te("Expected group as "+e,this.fetch());return s}case"original":case null:case void 0:return this.parseArgumentGroup(n);default:throw new Te("Unknown group type as "+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(e,r){var n=this.gullet.scanArgument(r);if(n==null)return null;for(var i="",a;(a=this.fetch()).text!=="EOF";)i+=a.text,this.consume();return this.consume(),n.text=i,n}parseRegexGroup(e,r){for(var n=this.fetch(),i=n,a="",s;(s=this.fetch()).text!=="EOF"&&e.test(a+s.text);)i=s,a+=i.text,this.consume();if(a==="")throw new Te("Invalid "+r+": '"+n.text+"'",n);return n.range(i,a)}parseColorGroup(e){var r=this.parseStringGroup("color",e);if(r==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(r.text);if(!n)throw new Te("Invalid color: '"+r.text+"'",r);var i=n[0];return/^[0-9a-f]{6}$/i.test(i)&&(i="#"+i),{type:"color-token",mode:this.mode,color:i}}parseSizeGroup(e){var r,n=!1;if(this.gullet.consumeSpaces(),!e&&this.gullet.future().text!=="{"?r=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):r=this.parseStringGroup("size",e),!r)return null;!e&&r.text.length===0&&(r.text="0pt",n=!0);var i=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(r.text);if(!i)throw new Te("Invalid size: '"+r.text+"'",r);var a={number:+(i[1]+i[2]),unit:i[3]};if(!xv(a))throw new Te("Invalid unit: '"+a.unit+"'",r);return{type:"size",mode:this.mode,value:a,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var r=this.parseStringGroup("url",e);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),r==null)return null;var n=r.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:n}}parseArgumentGroup(e,r){var n=this.gullet.scanArgument(e);if(n==null)return null;var i=this.mode;r&&this.switchMode(r),this.gullet.beginGroup();var a=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var s={type:"ordgroup",mode:this.mode,loc:n.loc,body:a};return r&&this.switchMode(i),s}parseGroup(e,r){var n=this.fetch(),i=n.text,a;if(i==="{"||i==="\\begingroup"){this.consume();var s=i==="{"?"}":"\\endgroup";this.gullet.beginGroup();var o=this.parseExpression(!1,s),l=this.fetch();this.expect(s),this.gullet.endGroup(),a={type:"ordgroup",mode:this.mode,loc:on.range(n,l),body:o,semisimple:i==="\\begingroup"||void 0}}else if(a=this.parseFunction(r,e)||this.parseSymbol(),a==null&&i[0]==="\\"&&!ck.hasOwnProperty(i)){if(this.settings.throwOnError)throw new Te("Undefined control sequence: "+i,n);a=this.formatUnsupportedCmd(i),this.consume()}return a}formLigatures(e){for(var r=e.length-1,n=0;n<r;++n){var i=e[n],a=i.text;a==="-"&&e[n+1].text==="-"&&(n+1<r&&e[n+2].text==="-"?(e.splice(n,3,{type:"textord",mode:"text",loc:on.range(i,e[n+2]),text:"---"}),r-=2):(e.splice(n,2,{type:"textord",mode:"text",loc:on.range(i,e[n+1]),text:"--"}),r-=1)),(a==="'"||a==="`")&&e[n+1].text===a&&(e.splice(n,2,{type:"textord",mode:"text",loc:on.range(i,e[n+1]),text:a+a}),r-=1)}}parseSymbol(){var e=this.fetch(),r=e.text;if(/^\\verb[^a-zA-Z]/.test(r)){this.consume();var n=r.slice(5),i=n.charAt(0)==="*";if(i&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new Te(`\\verb assertion failed --
386
+ please report what input caused this bug`);return n=n.slice(1,-1),{type:"verb",mode:"text",body:n,star:i}}Py.hasOwnProperty(r[0])&&!Ht[this.mode][r[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+r[0]+'" used in math mode',e),r=Py[r[0]]+r.slice(1));var a=CU.exec(r);a&&(r=r.substring(0,a.index),r==="i"?r="ı":r==="j"&&(r="ȷ"));var s;if(Ht[this.mode][r]){this.settings.strict&&this.mode==="math"&&ap.indexOf(r)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+r[0]+'" used in math mode',e);var o=Ht[this.mode][r].group,l=on.range(e),c;if(gj.hasOwnProperty(o)){var u=o;c={type:"atom",mode:this.mode,family:u,loc:l,text:r}}else c={type:o,mode:this.mode,loc:l,text:r};s=c}else if(r.charCodeAt(0)>=128)this.settings.strict&&(bv(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),e)),s={type:"textord",mode:"text",loc:on.range(e),text:r};else return null;if(this.consume(),a)for(var h=0;h<a[0].length;h++){var d=a[0][h];if(!Jd[d])throw new Te("Unknown accent ' "+d+"'",e);var f=Jd[d][this.mode]||Jd[d].text;if(!f)throw new Te("Accent "+d+" unsupported in "+this.mode+" mode",e);s={type:"accent",mode:this.mode,loc:on.range(e),label:f,isStretchy:!1,isShifty:!0,base:s}}return s}}Ch.endOfExpression=["}","\\endgroup","\\end","\\right","&"];var R1=function(e,r){if(!(typeof e=="string"||e instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var n=new Ch(e,r);delete n.gullet.macros.current["\\df@tag"];var i=n.parse();if(delete n.gullet.macros.current["\\current@color"],delete n.gullet.macros.current["\\color"],n.gullet.macros.get("\\df@tag")){if(!r.displayMode)throw new Te("\\tag works only in display equations");i=[{type:"tag",mode:"text",body:i,tag:n.subparse([new kn("\\df@tag")])}]}return i},B1=function(e,r,n){r.textContent="";var i=Sh(e,n).toNode();r.appendChild(i)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),B1=function(){throw new Te("KaTeX doesn't work in quirks mode.")});var uk=function(e,r){var n=Sh(e,r).toMarkup();return n},hk=function(e,r){var n=new m1(r);return R1(e,n)},dk=function(e,r,n){if(n.throwOnError||!(e instanceof Te))throw e;var i=ie.makeSpan(["katex-error"],[new On(r)]);return i.setAttribute("title",e.toString()),i.setAttribute("style","color:"+n.errorColor),i},Sh=function(e,r){var n=new m1(r);try{var i=R1(e,n);return $j(i,e,n)}catch(a){return dk(a,e,n)}},fk=function(e,r){var n=new m1(r);try{var i=R1(e,n);return zj(i,e,n)}catch(a){return dk(a,e,n)}},pk="0.16.27",mk={Span:_c,Anchor:y1,SymbolNode:On,SvgNode:Gi,PathNode:ka,LineNode:ip},hp={version:pk,render:B1,renderToString:uk,ParseError:Te,SETTINGS_SCHEMA:Ol,__parse:hk,__renderToDomTree:Sh,__renderToHTMLTree:fk,__setFontMetrics:yv,__defineSymbol:x,__defineFunction:Ie,__defineMacro:M,__domTree:mk};const NU=Object.freeze(Object.defineProperty({__proto__:null,ParseError:Te,SETTINGS_SCHEMA:Ol,__defineFunction:Ie,__defineMacro:M,__defineSymbol:x,__domTree:mk,__parse:hk,__renderToDomTree:Sh,__renderToHTMLTree:fk,__setFontMetrics:yv,default:hp,get render(){return B1},renderToString:uk,version:pk},Symbol.toStringTag,{value:"Module"})),LU={},MU=[];function IU(t){const e=t||LU;return function(r,n){ym(r,"element",function(i,a){const s=Array.isArray(i.properties.className)?i.properties.className:MU,o=s.includes("language-math"),l=s.includes("math-display"),c=s.includes("math-inline");let u=l;if(!o&&!l&&!c)return;let h=a[a.length-1],d=i;if(i.tagName==="code"&&o&&h&&h.type==="element"&&h.tagName==="pre"&&(d=h,h=a[a.length-2],u=!0),!h)return;const f=Nq(d,{whitespace:"pre"});let p;try{p=hp.renderToString(f,{...e,displayMode:u,throwOnError:!0})}catch(y){const b=y,v=b.name.toLowerCase();n.message("Could not render math with KaTeX",{ancestors:[...a,i],cause:b,place:i.position,ruleId:v,source:"rehype-katex"});try{p=hp.renderToString(f,{...e,displayMode:u,strict:"ignore",throwOnError:!1})}catch{p=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(e.errorColor||"#cc0000"),title:String(y)},children:[{type:"text",value:f}]}]}}typeof p=="string"&&(p=kq(p).children);const m=h.children.indexOf(d);return h.children.splice(m,1,...p),zu})}}function RU(){return{enter:{mathFlow:t,mathFlowFenceMeta:e,mathText:a},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:o,mathText:s,mathTextData:o}};function t(l){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},l)}function e(){this.buffer()}function r(){const l=this.resume(),c=this.stack[this.stack.length-1];c.type,c.meta=l}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(l){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),u=this.stack[this.stack.length-1];u.type,this.exit(l),u.value=c;const h=u.data.hChildren[0];h.type,h.tagName,h.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function a(l){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},l),this.buffer()}function s(l){const c=this.resume(),u=this.stack[this.stack.length-1];u.type,this.exit(l),u.value=c,u.data.hChildren.push({type:"text",value:c})}function o(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function BU(t){let e=(t||{}).singleDollarTextMath;return e==null&&(e=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
387
+ `,inConstruct:"mathFlowMeta"},{character:"$",after:e?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(a,s,o,l){const c=a.value||"",u=o.createTracker(l),h="$".repeat(Math.max(I3(c,"$")+1,2)),d=o.enter("mathFlow");let f=u.move(h);if(a.meta){const p=o.enter("mathFlowMeta");f+=u.move(o.safe(a.meta,{after:`
388
+ `,before:f,encode:["$"],...u.current()})),p()}return f+=u.move(`
389
+ `),c&&(f+=u.move(c+`
390
+ `)),f+=u.move(h),d(),f}function n(a,s,o){let l=a.value||"",c=1;for(e||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(l);)c++;const u="$".repeat(c);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let h=-1;for(;++h<o.unsafe.length;){const d=o.unsafe[h];if(!d.atBreak)continue;const f=o.compilePattern(d);let p;for(;p=f.exec(l);){let m=p.index;l.codePointAt(m)===10&&l.codePointAt(m-1)===13&&m--,l=l.slice(0,m)+" "+l.slice(p.index+1)}}return u+l+u}function i(){return"$"}}const DU={tokenize:OU,concrete:!0,name:"mathFlow"},Fy={tokenize:PU,partial:!0};function OU(t,e,r){const n=this,i=n.events[n.events.length-1],a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0;let s=0;return o;function o(v){return t.enter("mathFlow"),t.enter("mathFlowFence"),t.enter("mathFlowFenceSequence"),l(v)}function l(v){return v===36?(t.consume(v),s++,l):s<2?r(v):(t.exit("mathFlowFenceSequence"),wt(t,c,"whitespace")(v))}function c(v){return v===null||Ye(v)?h(v):(t.enter("mathFlowFenceMeta"),t.enter("chunkString",{contentType:"string"}),u(v))}function u(v){return v===null||Ye(v)?(t.exit("chunkString"),t.exit("mathFlowFenceMeta"),h(v)):v===36?r(v):(t.consume(v),u)}function h(v){return t.exit("mathFlowFence"),n.interrupt?e(v):t.attempt(Fy,d,y)(v)}function d(v){return t.attempt({tokenize:b,partial:!0},y,f)(v)}function f(v){return(a?wt(t,p,"linePrefix",a+1):p)(v)}function p(v){return v===null?y(v):Ye(v)?t.attempt(Fy,d,y)(v):(t.enter("mathFlowValue"),m(v))}function m(v){return v===null||Ye(v)?(t.exit("mathFlowValue"),p(v)):(t.consume(v),m)}function y(v){return t.exit("mathFlow"),e(v)}function b(v,C,E){let _=0;return wt(v,k,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function k($){return v.enter("mathFlowFence"),v.enter("mathFlowFenceSequence"),N($)}function N($){return $===36?(_++,v.consume($),N):_<s?E($):(v.exit("mathFlowFenceSequence"),wt(v,D,"whitespace")($))}function D($){return $===null||Ye($)?(v.exit("mathFlowFence"),C($)):E($)}}}function PU(t,e,r){const n=this;return i;function i(s){return s===null?e(s):(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),a)}function a(s){return n.parser.lazy[n.now().line]?r(s):e(s)}}function FU(t){let r=(t||{}).singleDollarTextMath;return r==null&&(r=!0),{tokenize:n,resolve:$U,previous:zU,name:"mathText"};function n(i,a,s){let o=0,l,c;return u;function u(m){return i.enter("mathText"),i.enter("mathTextSequence"),h(m)}function h(m){return m===36?(i.consume(m),o++,h):o<2&&!r?s(m):(i.exit("mathTextSequence"),d(m))}function d(m){return m===null?s(m):m===36?(c=i.enter("mathTextSequence"),l=0,p(m)):m===32?(i.enter("space"),i.consume(m),i.exit("space"),d):Ye(m)?(i.enter("lineEnding"),i.consume(m),i.exit("lineEnding"),d):(i.enter("mathTextData"),f(m))}function f(m){return m===null||m===32||m===36||Ye(m)?(i.exit("mathTextData"),d(m)):(i.consume(m),f)}function p(m){return m===36?(i.consume(m),l++,p):l===o?(i.exit("mathTextSequence"),i.exit("mathText"),a(m)):(c.type="mathTextData",f(m))}}}function $U(t){let e=t.length-4,r=3,n,i;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(n=r;++n<e;)if(t[n][1].type==="mathTextData"){t[e][1].type="mathTextPadding",t[r][1].type="mathTextPadding",r+=2,e-=2;break}}for(n=r-1,e++;++n<=e;)i===void 0?n!==e&&t[n][1].type!=="lineEnding"&&(i=n):(n===e||t[n][1].type==="lineEnding")&&(t[i][1].type="mathTextData",n!==i+2&&(t[i][1].end=t[n-1][1].end,t.splice(i+2,n-i-2),e-=n-i-2,n=i+2),i=void 0);return t}function zU(t){return t!==36||this.events[this.events.length-1][1].type==="characterEscape"}function HU(t){return{flow:{36:DU},text:{36:FU(t)}}}const qU={};function jU(t){const e=this,r=t||qU,n=e.data(),i=n.micromarkExtensions||(n.micromarkExtensions=[]),a=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),s=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);i.push(HU(r)),a.push(RU()),s.push(BU(r))}function UU(t={}){var e,r;let n=[jU,{singleDollarTextMath:(e=t.singleDollarTextMath)!=null?e:!1}],i=[IU,{errorColor:(r=t.errorColor)!=null?r:"var(--color-muted-foreground)"}];return{name:"katex",type:"math",remarkPlugin:n,rehypePlugin:i,getStyles(){return"katex/dist/katex.min.css"}}}var p0=UU(),dp={name:"mermaid",version:"11.12.2",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}},gk={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(lo,function(){var r=1e3,n=6e4,i=36e5,a="millisecond",s="second",o="minute",l="hour",c="day",u="week",h="month",d="quarter",f="year",p="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(W){var U=["th","st","nd","rd"],j=W%100;return"["+W+(U[(j-20)%10]||U[j]||U[0])+"]"}},C=function(W,U,j){var Q=String(W);return!Q||Q.length>=U?W:""+Array(U+1-Q.length).join(j)+W},E={s:C,z:function(W){var U=-W.utcOffset(),j=Math.abs(U),Q=Math.floor(j/60),Y=j%60;return(U<=0?"+":"-")+C(Q,2,"0")+":"+C(Y,2,"0")},m:function W(U,j){if(U.date()<j.date())return-W(j,U);var Q=12*(j.year()-U.year())+(j.month()-U.month()),Y=U.clone().add(Q,h),be=j-Y<0,L=U.clone().add(Q+(be?-1:1),h);return+(-(Q+(j-Y)/(be?Y-L:L-Y))||0)},a:function(W){return W<0?Math.ceil(W)||0:Math.floor(W)},p:function(W){return{M:h,y:f,w:u,d:c,D:p,h:l,m:o,s,ms:a,Q:d}[W]||String(W||"").toLowerCase().replace(/s$/,"")},u:function(W){return W===void 0}},_="en",k={};k[_]=v;var N="$isDayjsObject",D=function(W){return W instanceof G||!(!W||!W[N])},$=function W(U,j,Q){var Y;if(!U)return _;if(typeof U=="string"){var be=U.toLowerCase();k[be]&&(Y=be),j&&(k[be]=j,Y=be);var L=U.split("-");if(!Y&&L.length>1)return W(L[0])}else{var se=U.name;k[se]=U,Y=se}return!Q&&Y&&(_=Y),Y||!Q&&_},R=function(W,U){if(D(W))return W.clone();var j=typeof U=="object"?U:{};return j.date=W,j.args=arguments,new G(j)},P=E;P.l=$,P.i=D,P.w=function(W,U){return R(W,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var G=function(){function W(j){this.$L=$(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[N]=!0}var U=W.prototype;return U.parse=function(j){this.$d=function(Q){var Y=Q.date,be=Q.utc;if(Y===null)return new Date(NaN);if(P.u(Y))return new Date;if(Y instanceof Date)return new Date(Y);if(typeof Y=="string"&&!/Z$/i.test(Y)){var L=Y.match(y);if(L){var se=L[2]-1||0,ae=(L[7]||"0").substring(0,3);return be?new Date(Date.UTC(L[1],se,L[3]||1,L[4]||0,L[5]||0,L[6]||0,ae)):new Date(L[1],se,L[3]||1,L[4]||0,L[5]||0,L[6]||0,ae)}}return new Date(Y)}(j),this.init()},U.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},U.$utils=function(){return P},U.isValid=function(){return this.$d.toString()!==m},U.isSame=function(j,Q){var Y=R(j);return this.startOf(Q)<=Y&&Y<=this.endOf(Q)},U.isAfter=function(j,Q){return R(j)<this.startOf(Q)},U.isBefore=function(j,Q){return this.endOf(Q)<R(j)},U.$g=function(j,Q,Y){return P.u(j)?this[Q]:this.set(Y,j)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(j,Q){var Y=this,be=!!P.u(Q)||Q,L=P.p(j),se=function(Re,De){var et=P.w(Y.$u?Date.UTC(Y.$y,De,Re):new Date(Y.$y,De,Re),Y);return be?et:et.endOf(c)},ae=function(Re,De){return P.w(Y.toDate()[Re].apply(Y.toDate("s"),(be?[0,0,0,0]:[23,59,59,999]).slice(De)),Y)},I=this.$W,ye=this.$M,Ee=this.$D,de="set"+(this.$u?"UTC":"");switch(L){case f:return be?se(1,0):se(31,11);case h:return be?se(1,ye):se(0,ye+1);case u:var we=this.$locale().weekStart||0,qe=(I<we?I+7:I)-we;return se(be?Ee-qe:Ee+(6-qe),ye);case c:case p:return ae(de+"Hours",0);case l:return ae(de+"Minutes",1);case o:return ae(de+"Seconds",2);case s:return ae(de+"Milliseconds",3);default:return this.clone()}},U.endOf=function(j){return this.startOf(j,!1)},U.$set=function(j,Q){var Y,be=P.p(j),L="set"+(this.$u?"UTC":""),se=(Y={},Y[c]=L+"Date",Y[p]=L+"Date",Y[h]=L+"Month",Y[f]=L+"FullYear",Y[l]=L+"Hours",Y[o]=L+"Minutes",Y[s]=L+"Seconds",Y[a]=L+"Milliseconds",Y)[be],ae=be===c?this.$D+(Q-this.$W):Q;if(be===h||be===f){var I=this.clone().set(p,1);I.$d[se](ae),I.init(),this.$d=I.set(p,Math.min(this.$D,I.daysInMonth())).$d}else se&&this.$d[se](ae);return this.init(),this},U.set=function(j,Q){return this.clone().$set(j,Q)},U.get=function(j){return this[P.p(j)]()},U.add=function(j,Q){var Y,be=this;j=Number(j);var L=P.p(Q),se=function(ye){var Ee=R(be);return P.w(Ee.date(Ee.date()+Math.round(ye*j)),be)};if(L===h)return this.set(h,this.$M+j);if(L===f)return this.set(f,this.$y+j);if(L===c)return se(1);if(L===u)return se(7);var ae=(Y={},Y[o]=n,Y[l]=i,Y[s]=r,Y)[L]||1,I=this.$d.getTime()+j*ae;return P.w(I,this)},U.subtract=function(j,Q){return this.add(-1*j,Q)},U.format=function(j){var Q=this,Y=this.$locale();if(!this.isValid())return Y.invalidDate||m;var be=j||"YYYY-MM-DDTHH:mm:ssZ",L=P.z(this),se=this.$H,ae=this.$m,I=this.$M,ye=Y.weekdays,Ee=Y.months,de=Y.meridiem,we=function(De,et,ot,_t){return De&&(De[et]||De(Q,be))||ot[et].slice(0,_t)},qe=function(De){return P.s(se%12||12,De,"0")},Re=de||function(De,et,ot){var _t=De<12?"AM":"PM";return ot?_t.toLowerCase():_t};return be.replace(b,function(De,et){return et||function(ot){switch(ot){case"YY":return String(Q.$y).slice(-2);case"YYYY":return P.s(Q.$y,4,"0");case"M":return I+1;case"MM":return P.s(I+1,2,"0");case"MMM":return we(Y.monthsShort,I,Ee,3);case"MMMM":return we(Ee,I);case"D":return Q.$D;case"DD":return P.s(Q.$D,2,"0");case"d":return String(Q.$W);case"dd":return we(Y.weekdaysMin,Q.$W,ye,2);case"ddd":return we(Y.weekdaysShort,Q.$W,ye,3);case"dddd":return ye[Q.$W];case"H":return String(se);case"HH":return P.s(se,2,"0");case"h":return qe(1);case"hh":return qe(2);case"a":return Re(se,ae,!0);case"A":return Re(se,ae,!1);case"m":return String(ae);case"mm":return P.s(ae,2,"0");case"s":return String(Q.$s);case"ss":return P.s(Q.$s,2,"0");case"SSS":return P.s(Q.$ms,3,"0");case"Z":return L}return null}(De)||L.replace(":","")})},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(j,Q,Y){var be,L=this,se=P.p(Q),ae=R(j),I=(ae.utcOffset()-this.utcOffset())*n,ye=this-ae,Ee=function(){return P.m(L,ae)};switch(se){case f:be=Ee()/12;break;case h:be=Ee();break;case d:be=Ee()/3;break;case u:be=(ye-I)/6048e5;break;case c:be=(ye-I)/864e5;break;case l:be=ye/i;break;case o:be=ye/n;break;case s:be=ye/r;break;default:be=ye}return Y?be:P.a(be)},U.daysInMonth=function(){return this.endOf(h).$D},U.$locale=function(){return k[this.$L]},U.locale=function(j,Q){if(!j)return this.$L;var Y=this.clone(),be=$(j,Q,!0);return be&&(Y.$L=be),Y},U.clone=function(){return P.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},W}(),ee=G.prototype;return R.prototype=ee,[["$ms",a],["$s",s],["$m",o],["$H",l],["$W",c],["$M",h],["$y",f],["$D",p]].forEach(function(W){ee[W[1]]=function(U){return this.$g(U,W[0],W[1])}}),R.extend=function(W,U){return W.$i||(W(U,G,R),W.$i=!0),R},R.locale=$,R.isDayjs=D,R.unix=function(W){return R(1e3*W)},R.en=k[_],R.Ls=k,R.p={},R})})(gk);var WU=gk.exports;const bk=lh(WU);var yk=Object.defineProperty,w=(t,e)=>yk(t,"name",{value:e,configurable:!0}),xk=(t,e)=>{for(var r in e)yk(t,r,{get:e[r],enumerable:!0})},Li={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},he={trace:w((...t)=>{},"trace"),debug:w((...t)=>{},"debug"),info:w((...t)=>{},"info"),warn:w((...t)=>{},"warn"),error:w((...t)=>{},"error"),fatal:w((...t)=>{},"fatal")},D1=w(function(t="fatal"){let e=Li.fatal;typeof t=="string"?t.toLowerCase()in Li&&(e=Li[t]):typeof t=="number"&&(e=t),he.trace=()=>{},he.debug=()=>{},he.info=()=>{},he.warn=()=>{},he.error=()=>{},he.fatal=()=>{},e<=Li.fatal&&(he.fatal=console.error?console.error.bind(console,An("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",An("FATAL"))),e<=Li.error&&(he.error=console.error?console.error.bind(console,An("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",An("ERROR"))),e<=Li.warn&&(he.warn=console.warn?console.warn.bind(console,An("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",An("WARN"))),e<=Li.info&&(he.info=console.info?console.info.bind(console,An("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",An("INFO"))),e<=Li.debug&&(he.debug=console.debug?console.debug.bind(console,An("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",An("DEBUG"))),e<=Li.trace&&(he.trace=console.debug?console.debug.bind(console,An("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",An("TRACE")))},"setLogLevel"),An=w(t=>`%c${bk().format("ss.SSS")} : ${t} : `,"format");const Eu={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const i=r<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return Eu.hue2rgb(a,i,t+1/3)*255;case"g":return Eu.hue2rgb(a,i,t)*255;case"b":return Eu.hue2rgb(a,i,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if(n==="l")return s*100;if(i===a)return 0;const o=i-a,l=s>.5?o/(2-i-a):o/(i+a);if(n==="s")return l*100;switch(i){case t:return((e-r)/o+(e<r?6:0))*60;case e:return((r-t)/o+2)*60;case r:return((t-e)/o+4)*60;default:return-1}}},GU={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},YU={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},ut={channel:Eu,lang:GU,unit:YU},ha={};for(let t=0;t<=255;t++)ha[t]=ut.unit.dec2hex(t);const Nr={ALL:0,RGB:1,HSL:2};class VU{constructor(){this.type=Nr.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=Nr.ALL}is(e){return this.type===e}}class XU{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new VU}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=Nr.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=ut.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=ut.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=ut.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=ut.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=ut.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=ut.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(Nr.HSL)&&r!==void 0?r:(this._ensureHSL(),ut.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(Nr.HSL)&&r!==void 0?r:(this._ensureHSL(),ut.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(Nr.HSL)&&r!==void 0?r:(this._ensureHSL(),ut.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(Nr.RGB)&&r!==void 0?r:(this._ensureRGB(),ut.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(Nr.RGB)&&r!==void 0?r:(this._ensureRGB(),ut.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(Nr.RGB)&&r!==void 0?r:(this._ensureRGB(),ut.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Nr.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Nr.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Nr.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Nr.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Nr.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Nr.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const _h=new XU({r:0,g:0,b:0,a:0},"transparent"),Gs={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(Gs.re);if(!e)return;const r=e[1],n=parseInt(r,16),i=r.length,a=i%4===0,s=i>4,o=s?1:17,l=s?8:4,c=a?0:-1,u=s?255:15;return _h.set({r:(n>>l*(c+3)&u)*o,g:(n>>l*(c+2)&u)*o,b:(n>>l*(c+1)&u)*o,a:a?(n&u)*o/255:1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`#${ha[Math.round(e)]}${ha[Math.round(r)]}${ha[Math.round(n)]}${ha[Math.round(i*255)]}`:`#${ha[Math.round(e)]}${ha[Math.round(r)]}${ha[Math.round(n)]}`}},Ya={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(Ya.hueRe);if(e){const[,r,n]=e;switch(n){case"grad":return ut.channel.clamp.h(parseFloat(r)*.9);case"rad":return ut.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ut.channel.clamp.h(parseFloat(r)*360)}}return ut.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(Ya.re);if(!r)return;const[,n,i,a,s,o]=r;return _h.set({h:Ya._hue2deg(n),s:ut.channel.clamp.s(parseFloat(i)),l:ut.channel.clamp.l(parseFloat(a)),a:s?ut.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{const{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${ut.lang.round(e)}, ${ut.lang.round(r)}%, ${ut.lang.round(n)}%, ${i})`:`hsl(${ut.lang.round(e)}, ${ut.lang.round(r)}%, ${ut.lang.round(n)}%)`}},Fl={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=Fl.colors[t];if(e)return Gs.parse(e)},stringify:t=>{const e=Gs.stringify(t);for(const r in Fl.colors)if(Fl.colors[r]===e)return r}},pl={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(pl.re);if(!r)return;const[,n,i,a,s,o,l,c,u]=r;return _h.set({r:ut.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:ut.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:ut.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:c?ut.channel.clamp.a(u?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${ut.lang.round(e)}, ${ut.lang.round(r)}, ${ut.lang.round(n)}, ${ut.lang.round(i)})`:`rgb(${ut.lang.round(e)}, ${ut.lang.round(r)}, ${ut.lang.round(n)})`}},Kn={format:{keyword:Fl,hex:Gs,rgb:pl,rgba:pl,hsl:Ya,hsla:Ya},parse:t=>{if(typeof t!="string")return t;const e=Gs.parse(t)||pl.parse(t)||Ya.parse(t)||Fl.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(Nr.HSL)||t.data.r===void 0?Ya.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?pl.stringify(t):Gs.stringify(t)},vk=(t,e)=>{const r=Kn.parse(t);for(const n in e)r[n]=ut.channel.clamp[n](e[n]);return Kn.stringify(r)},Ys=(t,e,r=0,n=1)=>{if(typeof t!="number")return vk(t,{a:e});const i=_h.set({r:ut.channel.clamp.r(t),g:ut.channel.clamp.g(e),b:ut.channel.clamp.b(r),a:ut.channel.clamp.a(n)});return Kn.stringify(i)},KU=t=>{const{r:e,g:r,b:n}=Kn.parse(t),i=.2126*ut.channel.toLinear(e)+.7152*ut.channel.toLinear(r)+.0722*ut.channel.toLinear(n);return ut.lang.round(i)},QU=t=>KU(t)>=.5,Io=t=>!QU(t),kk=(t,e,r)=>{const n=Kn.parse(t),i=n[e],a=ut.channel.clamp[e](i+r);return i!==a&&(n[e]=a),Kn.stringify(n)},Pe=(t,e)=>kk(t,"l",e),Ze=(t,e)=>kk(t,"l",-e),re=(t,e)=>{const r=Kn.parse(t),n={};for(const i in e)e[i]&&(n[i]=r[i]+e[i]);return vk(t,n)},ZU=(t,e,r=50)=>{const{r:n,g:i,b:a,a:s}=Kn.parse(t),{r:o,g:l,b:c,a:u}=Kn.parse(e),h=r/100,d=h*2-1,f=s-u,m=((d*f===-1?d:(d+f)/(1+d*f))+1)/2,y=1-m,b=n*m+o*y,v=i*m+l*y,C=a*m+c*y,E=s*h+u*(1-h);return Ys(b,v,C,E)},Le=(t,e=100)=>{const r=Kn.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,ZU(r,t,e)};/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:wk,setPrototypeOf:$y,isFrozen:JU,getPrototypeOf:eW,getOwnPropertyDescriptor:tW}=Object;let{freeze:Xr,seal:Fn,create:fp}=Object,{apply:pp,construct:mp}=typeof Reflect<"u"&&Reflect;Xr||(Xr=function(e){return e});Fn||(Fn=function(e){return e});pp||(pp=function(e,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];return e.apply(r,i)});mp||(mp=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return new e(...n)});const au=Kr(Array.prototype.forEach),rW=Kr(Array.prototype.lastIndexOf),zy=Kr(Array.prototype.pop),Ko=Kr(Array.prototype.push),nW=Kr(Array.prototype.splice),Au=Kr(String.prototype.toLowerCase),ef=Kr(String.prototype.toString),tf=Kr(String.prototype.match),Qo=Kr(String.prototype.replace),iW=Kr(String.prototype.indexOf),aW=Kr(String.prototype.trim),Hn=Kr(Object.prototype.hasOwnProperty),Hr=Kr(RegExp.prototype.test),Zo=sW(TypeError);function Kr(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return pp(t,e,n)}}function sW(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return mp(t,r)}}function vt(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Au;$y&&$y(t,null);let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){const a=r(i);a!==i&&(JU(e)||(e[n]=a),i=a)}t[i]=!0}return t}function oW(t){for(let e=0;e<t.length;e++)Hn(t,e)||(t[e]=null);return t}function ii(t){const e=fp(null);for(const[r,n]of wk(t))Hn(t,r)&&(Array.isArray(n)?e[r]=oW(n):n&&typeof n=="object"&&n.constructor===Object?e[r]=ii(n):e[r]=n);return e}function Jo(t,e){for(;t!==null;){const n=tW(t,e);if(n){if(n.get)return Kr(n.get);if(typeof n.value=="function")return Kr(n.value)}t=eW(t)}function r(){return null}return r}const Hy=Xr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),rf=Xr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),nf=Xr(["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"]),lW=Xr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),af=Xr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),cW=Xr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),qy=Xr(["#text"]),jy=Xr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),sf=Xr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Uy=Xr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),su=Xr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),uW=Fn(/\{\{[\w\W]*|[\w\W]*\}\}/gm),hW=Fn(/<%[\w\W]*|[\w\W]*%>/gm),dW=Fn(/\$\{[\w\W]*/gm),fW=Fn(/^data-[\-\w.\u00B7-\uFFFF]+$/),pW=Fn(/^aria-[\-\w]+$/),Tk=Fn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mW=Fn(/^(?:\w+script|data):/i),gW=Fn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ck=Fn(/^html$/i),bW=Fn(/^[a-z][.\w]*(-[.\w]+)+$/i);var Wy=Object.freeze({__proto__:null,ARIA_ATTR:pW,ATTR_WHITESPACE:gW,CUSTOM_ELEMENT:bW,DATA_ATTR:fW,DOCTYPE_NAME:Ck,ERB_EXPR:hW,IS_ALLOWED_URI:Tk,IS_SCRIPT_OR_DATA:mW,MUSTACHE_EXPR:uW,TMPLIT_EXPR:dW});const el={element:1,text:3,progressingInstruction:7,comment:8,document:9},yW=function(){return typeof window>"u"?null:window},xW=function(e,r){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Gy=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Sk(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:yW();const e=Ke=>Sk(Ke);if(e.version="3.3.1",e.removed=[],!t||!t.document||t.document.nodeType!==el.document||!t.Element)return e.isSupported=!1,e;let{document:r}=t;const n=r,i=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:c,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:h,DOMParser:d,trustedTypes:f}=t,p=l.prototype,m=Jo(p,"cloneNode"),y=Jo(p,"remove"),b=Jo(p,"nextSibling"),v=Jo(p,"childNodes"),C=Jo(p,"parentNode");if(typeof s=="function"){const Ke=r.createElement("template");Ke.content&&Ke.content.ownerDocument&&(r=Ke.content.ownerDocument)}let E,_="";const{implementation:k,createNodeIterator:N,createDocumentFragment:D,getElementsByTagName:$}=r,{importNode:R}=n;let P=Gy();e.isSupported=typeof wk=="function"&&typeof C=="function"&&k&&k.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:G,ERB_EXPR:ee,TMPLIT_EXPR:W,DATA_ATTR:U,ARIA_ATTR:j,IS_SCRIPT_OR_DATA:Q,ATTR_WHITESPACE:Y,CUSTOM_ELEMENT:be}=Wy;let{IS_ALLOWED_URI:L}=Wy,se=null;const ae=vt({},[...Hy,...rf,...nf,...af,...qy]);let I=null;const ye=vt({},[...jy,...sf,...Uy,...su]);let Ee=Object.seal(fp(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),de=null,we=null;const qe=Object.seal(fp(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Re=!0,De=!0,et=!1,ot=!0,_t=!1,Et=!0,Me=!1,fe=!1,xe=!1,tt=!1,jt=!1,En=!1,ra=!0,na=!1;const Ho="user-content-";let Ra=!0,_i=!1,ue={},Ce=null;const at=vt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let pt=null;const Lt=vt({},["audio","video","img","source","image","track"]);let kr=null;const dn=vt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),J="http://www.w3.org/1998/Math/MathML",X="http://www.w3.org/2000/svg",V="http://www.w3.org/1999/xhtml";let oe=V,ce=!1,pe=null;const We=vt({},[J,X,V],ef);let Ve=vt({},["mi","mo","mn","ms","mtext"]),Xe=vt({},["annotation-xml"]);const mt=vt({},["title","style","font","a","script"]);let gt=null;const Ot=["application/xhtml+xml","text/html"],Qt="text/html";let Ut=null,Jn=null;const Zr=r.createElement("form"),ei=function(K){return K instanceof RegExp||K instanceof Function},Ba=function(){let K=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Jn&&Jn===K)){if((!K||typeof K!="object")&&(K={}),K=ii(K),gt=Ot.indexOf(K.PARSER_MEDIA_TYPE)===-1?Qt:K.PARSER_MEDIA_TYPE,Ut=gt==="application/xhtml+xml"?ef:Au,se=Hn(K,"ALLOWED_TAGS")?vt({},K.ALLOWED_TAGS,Ut):ae,I=Hn(K,"ALLOWED_ATTR")?vt({},K.ALLOWED_ATTR,Ut):ye,pe=Hn(K,"ALLOWED_NAMESPACES")?vt({},K.ALLOWED_NAMESPACES,ef):We,kr=Hn(K,"ADD_URI_SAFE_ATTR")?vt(ii(dn),K.ADD_URI_SAFE_ATTR,Ut):dn,pt=Hn(K,"ADD_DATA_URI_TAGS")?vt(ii(Lt),K.ADD_DATA_URI_TAGS,Ut):Lt,Ce=Hn(K,"FORBID_CONTENTS")?vt({},K.FORBID_CONTENTS,Ut):at,de=Hn(K,"FORBID_TAGS")?vt({},K.FORBID_TAGS,Ut):ii({}),we=Hn(K,"FORBID_ATTR")?vt({},K.FORBID_ATTR,Ut):ii({}),ue=Hn(K,"USE_PROFILES")?K.USE_PROFILES:!1,Re=K.ALLOW_ARIA_ATTR!==!1,De=K.ALLOW_DATA_ATTR!==!1,et=K.ALLOW_UNKNOWN_PROTOCOLS||!1,ot=K.ALLOW_SELF_CLOSE_IN_ATTR!==!1,_t=K.SAFE_FOR_TEMPLATES||!1,Et=K.SAFE_FOR_XML!==!1,Me=K.WHOLE_DOCUMENT||!1,tt=K.RETURN_DOM||!1,jt=K.RETURN_DOM_FRAGMENT||!1,En=K.RETURN_TRUSTED_TYPE||!1,xe=K.FORCE_BODY||!1,ra=K.SANITIZE_DOM!==!1,na=K.SANITIZE_NAMED_PROPS||!1,Ra=K.KEEP_CONTENT!==!1,_i=K.IN_PLACE||!1,L=K.ALLOWED_URI_REGEXP||Tk,oe=K.NAMESPACE||V,Ve=K.MATHML_TEXT_INTEGRATION_POINTS||Ve,Xe=K.HTML_INTEGRATION_POINTS||Xe,Ee=K.CUSTOM_ELEMENT_HANDLING||{},K.CUSTOM_ELEMENT_HANDLING&&ei(K.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ee.tagNameCheck=K.CUSTOM_ELEMENT_HANDLING.tagNameCheck),K.CUSTOM_ELEMENT_HANDLING&&ei(K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ee.attributeNameCheck=K.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),K.CUSTOM_ELEMENT_HANDLING&&typeof K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(Ee.allowCustomizedBuiltInElements=K.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),_t&&(De=!1),jt&&(tt=!0),ue&&(se=vt({},qy),I=[],ue.html===!0&&(vt(se,Hy),vt(I,jy)),ue.svg===!0&&(vt(se,rf),vt(I,sf),vt(I,su)),ue.svgFilters===!0&&(vt(se,nf),vt(I,sf),vt(I,su)),ue.mathMl===!0&&(vt(se,af),vt(I,Uy),vt(I,su))),K.ADD_TAGS&&(typeof K.ADD_TAGS=="function"?qe.tagCheck=K.ADD_TAGS:(se===ae&&(se=ii(se)),vt(se,K.ADD_TAGS,Ut))),K.ADD_ATTR&&(typeof K.ADD_ATTR=="function"?qe.attributeCheck=K.ADD_ATTR:(I===ye&&(I=ii(I)),vt(I,K.ADD_ATTR,Ut))),K.ADD_URI_SAFE_ATTR&&vt(kr,K.ADD_URI_SAFE_ATTR,Ut),K.FORBID_CONTENTS&&(Ce===at&&(Ce=ii(Ce)),vt(Ce,K.FORBID_CONTENTS,Ut)),K.ADD_FORBID_CONTENTS&&(Ce===at&&(Ce=ii(Ce)),vt(Ce,K.ADD_FORBID_CONTENTS,Ut)),Ra&&(se["#text"]=!0),Me&&vt(se,["html","head","body"]),se.table&&(vt(se,["tbody"]),delete de.tbody),K.TRUSTED_TYPES_POLICY){if(typeof K.TRUSTED_TYPES_POLICY.createHTML!="function")throw Zo('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof K.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Zo('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=K.TRUSTED_TYPES_POLICY,_=E.createHTML("")}else E===void 0&&(E=xW(f,i)),E!==null&&typeof _=="string"&&(_=E.createHTML(""));Xr&&Xr(K),Jn=K}},bt=vt({},[...rf,...nf,...lW]),Ne=vt({},[...af,...cW]),yt=function(K){let Se=C(K);(!Se||!Se.tagName)&&(Se={namespaceURI:oe,tagName:"template"});const Ge=Au(K.tagName),Wt=Au(Se.tagName);return pe[K.namespaceURI]?K.namespaceURI===X?Se.namespaceURI===V?Ge==="svg":Se.namespaceURI===J?Ge==="svg"&&(Wt==="annotation-xml"||Ve[Wt]):!!bt[Ge]:K.namespaceURI===J?Se.namespaceURI===V?Ge==="math":Se.namespaceURI===X?Ge==="math"&&Xe[Wt]:!!Ne[Ge]:K.namespaceURI===V?Se.namespaceURI===X&&!Xe[Wt]||Se.namespaceURI===J&&!Ve[Wt]?!1:!Ne[Ge]&&(mt[Ge]||!bt[Ge]):!!(gt==="application/xhtml+xml"&&pe[K.namespaceURI]):!1},Je=function(K){Ko(e.removed,{element:K});try{C(K).removeChild(K)}catch{y(K)}},St=function(K,Se){try{Ko(e.removed,{attribute:Se.getAttributeNode(K),from:Se})}catch{Ko(e.removed,{attribute:null,from:Se})}if(Se.removeAttribute(K),K==="is")if(tt||jt)try{Je(Se)}catch{}else try{Se.setAttribute(K,"")}catch{}},wr=function(K){let Se=null,Ge=null;if(xe)K="<remove></remove>"+K;else{const nr=tf(K,/^[\r\n\t ]+/);Ge=nr&&nr[0]}gt==="application/xhtml+xml"&&oe===V&&(K='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+K+"</body></html>");const Wt=E?E.createHTML(K):K;if(oe===V)try{Se=new d().parseFromString(Wt,gt)}catch{}if(!Se||!Se.documentElement){Se=k.createDocument(oe,"template",null);try{Se.documentElement.innerHTML=ce?_:Wt}catch{}}const Er=Se.body||Se.documentElement;return K&&Ge&&Er.insertBefore(r.createTextNode(Ge),Er.childNodes[0]||null),oe===V?$.call(Se,Me?"html":"body")[0]:Me?Se.documentElement:Er},gr=function(K){return N.call(K.ownerDocument||K,K,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Jr=function(K){return K instanceof h&&(typeof K.nodeName!="string"||typeof K.textContent!="string"||typeof K.removeChild!="function"||!(K.attributes instanceof u)||typeof K.removeAttribute!="function"||typeof K.setAttribute!="function"||typeof K.namespaceURI!="string"||typeof K.insertBefore!="function"||typeof K.hasChildNodes!="function")},en=function(K){return typeof o=="function"&&K instanceof o};function $r(Ke,K,Se){au(Ke,Ge=>{Ge.call(e,K,Se,Jn)})}const zn=function(K){let Se=null;if($r(P.beforeSanitizeElements,K,null),Jr(K))return Je(K),!0;const Ge=Ut(K.nodeName);if($r(P.uponSanitizeElement,K,{tagName:Ge,allowedTags:se}),Et&&K.hasChildNodes()&&!en(K.firstElementChild)&&Hr(/<[/\w!]/g,K.innerHTML)&&Hr(/<[/\w!]/g,K.textContent)||K.nodeType===el.progressingInstruction||Et&&K.nodeType===el.comment&&Hr(/<[/\w]/g,K.data))return Je(K),!0;if(!(qe.tagCheck instanceof Function&&qe.tagCheck(Ge))&&(!se[Ge]||de[Ge])){if(!de[Ge]&&ia(Ge)&&(Ee.tagNameCheck instanceof RegExp&&Hr(Ee.tagNameCheck,Ge)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(Ge)))return!1;if(Ra&&!Ce[Ge]){const Wt=C(K)||K.parentNode,Er=v(K)||K.childNodes;if(Er&&Wt){const nr=Er.length;for(let tn=nr-1;tn>=0;--tn){const Ei=m(Er[tn],!0);Ei.__removalCount=(K.__removalCount||0)+1,Wt.insertBefore(Ei,b(K))}}}return Je(K),!0}return K instanceof l&&!yt(K)||(Ge==="noscript"||Ge==="noembed"||Ge==="noframes")&&Hr(/<\/no(script|embed|frames)/i,K.innerHTML)?(Je(K),!0):(_t&&K.nodeType===el.text&&(Se=K.textContent,au([G,ee,W],Wt=>{Se=Qo(Se,Wt," ")}),K.textContent!==Se&&(Ko(e.removed,{element:K.cloneNode()}),K.textContent=Se)),$r(P.afterSanitizeElements,K,null),!1)},Da=function(K,Se,Ge){if(ra&&(Se==="id"||Se==="name")&&(Ge in r||Ge in Zr))return!1;if(!(De&&!we[Se]&&Hr(U,Se))){if(!(Re&&Hr(j,Se))){if(!(qe.attributeCheck instanceof Function&&qe.attributeCheck(Se,K))){if(!I[Se]||we[Se]){if(!(ia(K)&&(Ee.tagNameCheck instanceof RegExp&&Hr(Ee.tagNameCheck,K)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(K))&&(Ee.attributeNameCheck instanceof RegExp&&Hr(Ee.attributeNameCheck,Se)||Ee.attributeNameCheck instanceof Function&&Ee.attributeNameCheck(Se,K))||Se==="is"&&Ee.allowCustomizedBuiltInElements&&(Ee.tagNameCheck instanceof RegExp&&Hr(Ee.tagNameCheck,Ge)||Ee.tagNameCheck instanceof Function&&Ee.tagNameCheck(Ge))))return!1}else if(!kr[Se]){if(!Hr(L,Qo(Ge,Y,""))){if(!((Se==="src"||Se==="xlink:href"||Se==="href")&&K!=="script"&&iW(Ge,"data:")===0&&pt[K])){if(!(et&&!Hr(Q,Qo(Ge,Y,"")))){if(Ge)return!1}}}}}}}return!0},ia=function(K){return K!=="annotation-xml"&&tf(K,be)},Ss=function(K){$r(P.beforeSanitizeAttributes,K,null);const{attributes:Se}=K;if(!Se||Jr(K))return;const Ge={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:I,forceKeepAttr:void 0};let Wt=Se.length;for(;Wt--;){const Er=Se[Wt],{name:nr,namespaceURI:tn,value:Ei}=Er,Es=Ut(nr),sd=Ei;let Tr=nr==="value"?sd:aW(sd);if(Ge.attrName=Es,Ge.attrValue=Tr,Ge.keepAttr=!0,Ge.forceKeepAttr=void 0,$r(P.uponSanitizeAttribute,K,Ge),Tr=Ge.attrValue,na&&(Es==="id"||Es==="name")&&(St(nr,K),Tr=Ho+Tr),Et&&Hr(/((--!?|])>)|<\/(style|title|textarea)/i,Tr)){St(nr,K);continue}if(Es==="attributename"&&tf(Tr,"href")){St(nr,K);continue}if(Ge.forceKeepAttr)continue;if(!Ge.keepAttr){St(nr,K);continue}if(!ot&&Hr(/\/>/i,Tr)){St(nr,K);continue}_t&&au([G,ee,W],Vg=>{Tr=Qo(Tr,Vg," ")});const Yg=Ut(K.nodeName);if(!Da(Yg,Es,Tr)){St(nr,K);continue}if(E&&typeof f=="object"&&typeof f.getAttributeType=="function"&&!tn)switch(f.getAttributeType(Yg,Es)){case"TrustedHTML":{Tr=E.createHTML(Tr);break}case"TrustedScriptURL":{Tr=E.createScriptURL(Tr);break}}if(Tr!==sd)try{tn?K.setAttributeNS(tn,nr,Tr):K.setAttribute(nr,Tr),Jr(K)?Je(K):zy(e.removed)}catch{St(nr,K)}}$r(P.afterSanitizeAttributes,K,null)},_s=function Ke(K){let Se=null;const Ge=gr(K);for($r(P.beforeSanitizeShadowDOM,K,null);Se=Ge.nextNode();)$r(P.uponSanitizeShadowNode,Se,null),zn(Se),Ss(Se),Se.content instanceof a&&Ke(Se.content);$r(P.afterSanitizeShadowDOM,K,null)};return e.sanitize=function(Ke){let K=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Se=null,Ge=null,Wt=null,Er=null;if(ce=!Ke,ce&&(Ke="<!-->"),typeof Ke!="string"&&!en(Ke))if(typeof Ke.toString=="function"){if(Ke=Ke.toString(),typeof Ke!="string")throw Zo("dirty is not a string, aborting")}else throw Zo("toString is not a function");if(!e.isSupported)return Ke;if(fe||Ba(K),e.removed=[],typeof Ke=="string"&&(_i=!1),_i){if(Ke.nodeName){const Ei=Ut(Ke.nodeName);if(!se[Ei]||de[Ei])throw Zo("root node is forbidden and cannot be sanitized in-place")}}else if(Ke instanceof o)Se=wr("<!---->"),Ge=Se.ownerDocument.importNode(Ke,!0),Ge.nodeType===el.element&&Ge.nodeName==="BODY"||Ge.nodeName==="HTML"?Se=Ge:Se.appendChild(Ge);else{if(!tt&&!_t&&!Me&&Ke.indexOf("<")===-1)return E&&En?E.createHTML(Ke):Ke;if(Se=wr(Ke),!Se)return tt?null:En?_:""}Se&&xe&&Je(Se.firstChild);const nr=gr(_i?Ke:Se);for(;Wt=nr.nextNode();)zn(Wt),Ss(Wt),Wt.content instanceof a&&_s(Wt.content);if(_i)return Ke;if(tt){if(jt)for(Er=D.call(Se.ownerDocument);Se.firstChild;)Er.appendChild(Se.firstChild);else Er=Se;return(I.shadowroot||I.shadowrootmode)&&(Er=R.call(n,Er,!0)),Er}let tn=Me?Se.outerHTML:Se.innerHTML;return Me&&se["!doctype"]&&Se.ownerDocument&&Se.ownerDocument.doctype&&Se.ownerDocument.doctype.name&&Hr(Ck,Se.ownerDocument.doctype.name)&&(tn="<!DOCTYPE "+Se.ownerDocument.doctype.name+`>
391
+ `+tn),_t&&au([G,ee,W],Ei=>{tn=Qo(tn,Ei," ")}),E&&En?E.createHTML(tn):tn},e.setConfig=function(){let Ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ba(Ke),fe=!0},e.clearConfig=function(){Jn=null,fe=!1},e.isValidAttribute=function(Ke,K,Se){Jn||Ba({});const Ge=Ut(Ke),Wt=Ut(K);return Da(Ge,Wt,Se)},e.addHook=function(Ke,K){typeof K=="function"&&Ko(P[Ke],K)},e.removeHook=function(Ke,K){if(K!==void 0){const Se=rW(P[Ke],K);return Se===-1?void 0:nW(P[Ke],Se,1)[0]}return zy(P[Ke])},e.removeHooks=function(Ke){P[Ke]=[]},e.removeAllHooks=function(){P=Gy()},e}var ho=Sk(),_k=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,$l=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,vW=/\s*%%.*\n/gm,Ks,Ek=(Ks=class extends Error{constructor(e){super(e),this.name="UnknownDiagramError"}},w(Ks,"UnknownDiagramError"),Ks),as={},O1=w(function(t,e){t=t.replace(_k,"").replace($l,"").replace(vW,`
392
+ `);for(const[r,{detector:n}]of Object.entries(as))if(n(t,e))return r;throw new Ek(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),gp=w((...t)=>{for(const{id:e,detector:r,loader:n}of t)Ak(e,r,n)},"registerLazyLoadedDiagrams"),Ak=w((t,e,r)=>{as[t]&&he.warn(`Detector with key ${t} already exists. Overwriting.`),as[t]={detector:e,loader:r},he.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),kW=w(t=>as[t].loader,"getDiagramLoader"),bp=w((t,e,{depth:r=2,clobber:n=!1}={})=>{const i={depth:r,clobber:n};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>bp(t,a,i)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.includes(a)||t.push(a)}),t):t===void 0||r<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=bp(t[a],e[a],{depth:r-1,clobber:n})):(n||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)},"assignWithDepth"),lr=bp,Eh="#ffffff",Ah="#f2f2f2",Wr=w((t,e)=>e?re(t,{s:-40,l:10}):re(t,{s:-40,l:-10}),"mkBorder"),Qs,wW=(Qs=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){var r,n,i,a,s,o,l,c,u,h,d,f,p,m,y,b,v,C,E,_,k;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||re(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||re(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Wr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Le(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Le(this.tertiaryColor),this.lineColor=this.lineColor||Le(this.background),this.arrowheadColor=this.arrowheadColor||Le(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Ze(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Ze(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Le(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Pe(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||Ze(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Ze(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Pe(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Pe(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||re(this.primaryColor,{h:30}),this.cScale4=this.cScale4||re(this.primaryColor,{h:60}),this.cScale5=this.cScale5||re(this.primaryColor,{h:90}),this.cScale6=this.cScale6||re(this.primaryColor,{h:120}),this.cScale7=this.cScale7||re(this.primaryColor,{h:150}),this.cScale8=this.cScale8||re(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||re(this.primaryColor,{h:270}),this.cScale10=this.cScale10||re(this.primaryColor,{h:300}),this.cScale11=this.cScale11||re(this.primaryColor,{h:330}),this.darkMode)for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScale"+N]=Ze(this["cScale"+N],75);else for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScale"+N]=Ze(this["cScale"+N],25);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleInv"+N]=this["cScaleInv"+N]||Le(this["cScale"+N]);for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this.darkMode?this["cScalePeer"+N]=this["cScalePeer"+N]||Pe(this["cScale"+N],10):this["cScalePeer"+N]=this["cScalePeer"+N]||Ze(this["cScale"+N],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let N=0;N<this.THEME_COLOR_LIMIT;N++)this["cScaleLabel"+N]=this["cScaleLabel"+N]||this.scaleLabelColor;const e=this.darkMode?-4:-1;for(let N=0;N<5;N++)this["surface"+N]=this["surface"+N]||re(this.mainBkg,{h:180,s:-15,l:e*(5+N*3)}),this["surfacePeer"+N]=this["surfacePeer"+N]||re(this.mainBkg,{h:180,s:-15,l:e*(8+N*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||re(this.primaryColor,{h:64}),this.fillType3=this.fillType3||re(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||re(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||re(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||re(this.primaryColor,{h:128}),this.fillType7=this.fillType7||re(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||re(this.primaryColor,{l:-10}),this.pie5=this.pie5||re(this.secondaryColor,{l:-10}),this.pie6=this.pie6||re(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||re(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||re(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||re(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||re(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||re(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||re(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.radar={axisColor:((r=this.radar)==null?void 0:r.axisColor)||this.lineColor,axisStrokeWidth:((n=this.radar)==null?void 0:n.axisStrokeWidth)||2,axisLabelFontSize:((i=this.radar)==null?void 0:i.axisLabelFontSize)||12,curveOpacity:((a=this.radar)==null?void 0:a.curveOpacity)||.5,curveStrokeWidth:((s=this.radar)==null?void 0:s.curveStrokeWidth)||2,graticuleColor:((o=this.radar)==null?void 0:o.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((l=this.radar)==null?void 0:l.graticuleStrokeWidth)||1,graticuleOpacity:((c=this.radar)==null?void 0:c.graticuleOpacity)||.3,legendBoxSize:((u=this.radar)==null?void 0:u.legendBoxSize)||12,legendFontSize:((h=this.radar)==null?void 0:h.legendFontSize)||12},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||re(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||re(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||re(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||re(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||re(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||re(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Io(this.quadrant1Fill)?Pe(this.quadrant1Fill):Ze(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((d=this.xyChart)==null?void 0:d.backgroundColor)||this.background,titleColor:((f=this.xyChart)==null?void 0:f.titleColor)||this.primaryTextColor,xAxisTitleColor:((p=this.xyChart)==null?void 0:p.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((m=this.xyChart)==null?void 0:m.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((y=this.xyChart)==null?void 0:y.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((b=this.xyChart)==null?void 0:b.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((v=this.xyChart)==null?void 0:v.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((C=this.xyChart)==null?void 0:C.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((E=this.xyChart)==null?void 0:E.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((_=this.xyChart)==null?void 0:_.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((k=this.xyChart)==null?void 0:k.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Ze(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||re(this.primaryColor,{h:-30}),this.git4=this.git4||re(this.primaryColor,{h:-60}),this.git5=this.git5||re(this.primaryColor,{h:-90}),this.git6=this.git6||re(this.primaryColor,{h:60}),this.git7=this.git7||re(this.primaryColor,{h:120}),this.darkMode?(this.git0=Pe(this.git0,25),this.git1=Pe(this.git1,25),this.git2=Pe(this.git2,25),this.git3=Pe(this.git3,25),this.git4=Pe(this.git4,25),this.git5=Pe(this.git5,25),this.git6=Pe(this.git6,25),this.git7=Pe(this.git7,25)):(this.git0=Ze(this.git0,25),this.git1=Ze(this.git1,25),this.git2=Ze(this.git2,25),this.git3=Ze(this.git3,25),this.git4=Ze(this.git4,25),this.git5=Ze(this.git5,25),this.git6=Ze(this.git6,25),this.git7=Ze(this.git7,25)),this.gitInv0=this.gitInv0||Le(this.git0),this.gitInv1=this.gitInv1||Le(this.git1),this.gitInv2=this.gitInv2||Le(this.git2),this.gitInv3=this.gitInv3||Le(this.git3),this.gitInv4=this.gitInv4||Le(this.git4),this.gitInv5=this.gitInv5||Le(this.git5),this.gitInv6=this.gitInv6||Le(this.git6),this.gitInv7=this.gitInv7||Le(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Eh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ah}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},w(Qs,"Theme"),Qs),TW=w(t=>{const e=new wW;return e.calculate(t),e},"getThemeVariables"),Zs,CW=(Zs=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Pe(this.primaryColor,16),this.tertiaryColor=re(this.primaryColor,{h:-160}),this.primaryBorderColor=Le(this.background),this.secondaryBorderColor=Wr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Le(this.primaryColor),this.secondaryTextColor=Le(this.secondaryColor),this.tertiaryTextColor=Le(this.tertiaryColor),this.lineColor=Le(this.background),this.textColor=Le(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Pe(Le("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ys(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Ze("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Ze(this.sectionBkgColor,10),this.taskBorderColor=Ys(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ys(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||Pe(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Ze(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){var e,r,n,i,a,s,o,l,c,u,h,d,f,p,m,y,b,v,C,E,_;this.secondBkg=Pe(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Pe(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Pe(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=re(this.primaryColor,{h:64}),this.fillType3=re(this.secondaryColor,{h:64}),this.fillType4=re(this.primaryColor,{h:-64}),this.fillType5=re(this.secondaryColor,{h:-64}),this.fillType6=re(this.primaryColor,{h:128}),this.fillType7=re(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||re(this.primaryColor,{h:30}),this.cScale4=this.cScale4||re(this.primaryColor,{h:60}),this.cScale5=this.cScale5||re(this.primaryColor,{h:90}),this.cScale6=this.cScale6||re(this.primaryColor,{h:120}),this.cScale7=this.cScale7||re(this.primaryColor,{h:150}),this.cScale8=this.cScale8||re(this.primaryColor,{h:210}),this.cScale9=this.cScale9||re(this.primaryColor,{h:270}),this.cScale10=this.cScale10||re(this.primaryColor,{h:300}),this.cScale11=this.cScale11||re(this.primaryColor,{h:330});for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||Le(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScalePeer"+k]=this["cScalePeer"+k]||Pe(this["cScale"+k],10);for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||re(this.mainBkg,{h:30,s:-30,l:-(-10+k*4)}),this["surfacePeer"+k]=this["surfacePeer"+k]||re(this.mainBkg,{h:30,s:-30,l:-(-7+k*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["pie"+k]=this["cScale"+k];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||re(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||re(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||re(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||re(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||re(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||re(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Io(this.quadrant1Fill)?Pe(this.quadrant1Fill):Ze(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((o=this.xyChart)==null?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((h=this.xyChart)==null?void 0:h.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((f=this.radar)==null?void 0:f.axisStrokeWidth)||2,axisLabelFontSize:((p=this.radar)==null?void 0:p.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((v=this.radar)==null?void 0:v.graticuleStrokeWidth)||1,graticuleOpacity:((C=this.radar)==null?void 0:C.graticuleOpacity)||.3,legendBoxSize:((E=this.radar)==null?void 0:E.legendBoxSize)||12,legendFontSize:((_=this.radar)==null?void 0:_.legendFontSize)||12},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Ze(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Pe(this.secondaryColor,20),this.git1=Pe(this.pie2||this.secondaryColor,20),this.git2=Pe(this.pie3||this.tertiaryColor,20),this.git3=Pe(this.pie4||re(this.primaryColor,{h:-30}),20),this.git4=Pe(this.pie5||re(this.primaryColor,{h:-60}),20),this.git5=Pe(this.pie6||re(this.primaryColor,{h:-90}),10),this.git6=Pe(this.pie7||re(this.primaryColor,{h:60}),10),this.git7=Pe(this.pie8||re(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Le(this.git0),this.gitInv1=this.gitInv1||Le(this.git1),this.gitInv2=this.gitInv2||Le(this.git2),this.gitInv3=this.gitInv3||Le(this.git3),this.gitInv4=this.gitInv4||Le(this.git4),this.gitInv5=this.gitInv5||Le(this.git5),this.gitInv6=this.gitInv6||Le(this.git6),this.gitInv7=this.gitInv7||Le(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Le(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Le(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pe(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Pe(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},w(Zs,"Theme"),Zs),SW=w(t=>{const e=new CW;return e.calculate(t),e},"getThemeVariables"),Js,_W=(Js=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=re(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=re(this.primaryColor,{h:-160}),this.primaryBorderColor=Wr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Le(this.primaryColor),this.secondaryTextColor=Le(this.secondaryColor),this.tertiaryTextColor=Le(this.tertiaryColor),this.lineColor=Le(this.background),this.textColor=Le(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ys(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){var e,r,n,i,a,s,o,l,c,u,h,d,f,p,m,y,b,v,C,E,_;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||re(this.primaryColor,{h:30}),this.cScale4=this.cScale4||re(this.primaryColor,{h:60}),this.cScale5=this.cScale5||re(this.primaryColor,{h:90}),this.cScale6=this.cScale6||re(this.primaryColor,{h:120}),this.cScale7=this.cScale7||re(this.primaryColor,{h:150}),this.cScale8=this.cScale8||re(this.primaryColor,{h:210}),this.cScale9=this.cScale9||re(this.primaryColor,{h:270}),this.cScale10=this.cScale10||re(this.primaryColor,{h:300}),this.cScale11=this.cScale11||re(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ze(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ze(this.tertiaryColor,40);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=Ze(this["cScale"+k],10),this["cScalePeer"+k]=this["cScalePeer"+k]||Ze(this["cScale"+k],25);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||re(this["cScale"+k],{h:180});for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||re(this.mainBkg,{h:30,l:-(5+k*5)}),this["surfacePeer"+k]=this["surfacePeer"+k]||re(this.mainBkg,{h:30,l:-(7+k*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Le(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Le(this.labelTextColor);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=Pe(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Pe(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||Pe(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=re(this.primaryColor,{h:64}),this.fillType3=re(this.secondaryColor,{h:64}),this.fillType4=re(this.primaryColor,{h:-64}),this.fillType5=re(this.secondaryColor,{h:-64}),this.fillType6=re(this.primaryColor,{h:128}),this.fillType7=re(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||re(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||re(this.primaryColor,{l:-10}),this.pie5=this.pie5||re(this.secondaryColor,{l:-30}),this.pie6=this.pie6||re(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||re(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||re(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||re(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||re(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||re(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||re(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||re(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||re(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||re(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||re(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||re(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||re(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Io(this.quadrant1Fill)?Pe(this.quadrant1Fill):Ze(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((i=this.radar)==null?void 0:i.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((o=this.radar)==null?void 0:o.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},this.xyChart={backgroundColor:((h=this.xyChart)==null?void 0:h.backgroundColor)||this.background,titleColor:((d=this.xyChart)==null?void 0:d.titleColor)||this.primaryTextColor,xAxisTitleColor:((f=this.xyChart)==null?void 0:f.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((p=this.xyChart)==null?void 0:p.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((v=this.xyChart)==null?void 0:v.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((C=this.xyChart)==null?void 0:C.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((E=this.xyChart)==null?void 0:E.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||re(this.primaryColor,{h:-30}),this.git4=this.git4||re(this.primaryColor,{h:-60}),this.git5=this.git5||re(this.primaryColor,{h:-90}),this.git6=this.git6||re(this.primaryColor,{h:60}),this.git7=this.git7||re(this.primaryColor,{h:120}),this.darkMode?(this.git0=Pe(this.git0,25),this.git1=Pe(this.git1,25),this.git2=Pe(this.git2,25),this.git3=Pe(this.git3,25),this.git4=Pe(this.git4,25),this.git5=Pe(this.git5,25),this.git6=Pe(this.git6,25),this.git7=Pe(this.git7,25)):(this.git0=Ze(this.git0,25),this.git1=Ze(this.git1,25),this.git2=Ze(this.git2,25),this.git3=Ze(this.git3,25),this.git4=Ze(this.git4,25),this.git5=Ze(this.git5,25),this.git6=Ze(this.git6,25),this.git7=Ze(this.git7,25)),this.gitInv0=this.gitInv0||Ze(Le(this.git0),25),this.gitInv1=this.gitInv1||Le(this.git1),this.gitInv2=this.gitInv2||Le(this.git2),this.gitInv3=this.gitInv3||Le(this.git3),this.gitInv4=this.gitInv4||Le(this.git4),this.gitInv5=this.gitInv5||Le(this.git5),this.gitInv6=this.gitInv6||Le(this.git6),this.gitInv7=this.gitInv7||Le(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Le(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Le(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Eh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ah}calculate(e){if(Object.keys(this).forEach(n=>{this[n]==="calculated"&&(this[n]=void 0)}),typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},w(Js,"Theme"),Js),Nk=w(t=>{const e=new _W;return e.calculate(t),e},"getThemeVariables"),eo,EW=(eo=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Pe("#cde498",10),this.primaryBorderColor=Wr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Le(this.primaryColor),this.secondaryTextColor=Le(this.secondaryColor),this.tertiaryTextColor=Le(this.primaryColor),this.lineColor=Le(this.background),this.textColor=Le(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,r,n,i,a,s,o,l,c,u,h,d,f,p,m,y,b,v,C,E,_;this.actorBorder=Ze(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||re(this.primaryColor,{h:30}),this.cScale4=this.cScale4||re(this.primaryColor,{h:60}),this.cScale5=this.cScale5||re(this.primaryColor,{h:90}),this.cScale6=this.cScale6||re(this.primaryColor,{h:120}),this.cScale7=this.cScale7||re(this.primaryColor,{h:150}),this.cScale8=this.cScale8||re(this.primaryColor,{h:210}),this.cScale9=this.cScale9||re(this.primaryColor,{h:270}),this.cScale10=this.cScale10||re(this.primaryColor,{h:300}),this.cScale11=this.cScale11||re(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ze(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ze(this.tertiaryColor,40);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScale"+k]=Ze(this["cScale"+k],10),this["cScalePeer"+k]=this["cScalePeer"+k]||Ze(this["cScale"+k],25);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||re(this["cScale"+k],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||re(this.mainBkg,{h:30,s:-30,l:-(5+k*5)}),this["surfacePeer"+k]=this["surfacePeer"+k]||re(this.mainBkg,{h:30,s:-30,l:-(8+k*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Pe(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Pe(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=re(this.primaryColor,{h:64}),this.fillType3=re(this.secondaryColor,{h:64}),this.fillType4=re(this.primaryColor,{h:-64}),this.fillType5=re(this.secondaryColor,{h:-64}),this.fillType6=re(this.primaryColor,{h:128}),this.fillType7=re(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||re(this.primaryColor,{l:-30}),this.pie5=this.pie5||re(this.secondaryColor,{l:-30}),this.pie6=this.pie6||re(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||re(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||re(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||re(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||re(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||re(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||re(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||re(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||re(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||re(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||re(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||re(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||re(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Io(this.quadrant1Fill)?Pe(this.quadrant1Fill):Ze(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((e=this.radar)==null?void 0:e.axisColor)||this.lineColor,axisStrokeWidth:((r=this.radar)==null?void 0:r.axisStrokeWidth)||2,axisLabelFontSize:((n=this.radar)==null?void 0:n.axisLabelFontSize)||12,curveOpacity:((i=this.radar)==null?void 0:i.curveOpacity)||.5,curveStrokeWidth:((a=this.radar)==null?void 0:a.curveStrokeWidth)||2,graticuleColor:((s=this.radar)==null?void 0:s.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((o=this.radar)==null?void 0:o.graticuleStrokeWidth)||1,graticuleOpacity:((l=this.radar)==null?void 0:l.graticuleOpacity)||.3,legendBoxSize:((c=this.radar)==null?void 0:c.legendBoxSize)||12,legendFontSize:((u=this.radar)==null?void 0:u.legendFontSize)||12},this.xyChart={backgroundColor:((h=this.xyChart)==null?void 0:h.backgroundColor)||this.background,titleColor:((d=this.xyChart)==null?void 0:d.titleColor)||this.primaryTextColor,xAxisTitleColor:((f=this.xyChart)==null?void 0:f.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((p=this.xyChart)==null?void 0:p.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((m=this.xyChart)==null?void 0:m.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((y=this.xyChart)==null?void 0:y.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((b=this.xyChart)==null?void 0:b.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((v=this.xyChart)==null?void 0:v.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((C=this.xyChart)==null?void 0:C.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((E=this.xyChart)==null?void 0:E.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((_=this.xyChart)==null?void 0:_.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||re(this.primaryColor,{h:-30}),this.git4=this.git4||re(this.primaryColor,{h:-60}),this.git5=this.git5||re(this.primaryColor,{h:-90}),this.git6=this.git6||re(this.primaryColor,{h:60}),this.git7=this.git7||re(this.primaryColor,{h:120}),this.darkMode?(this.git0=Pe(this.git0,25),this.git1=Pe(this.git1,25),this.git2=Pe(this.git2,25),this.git3=Pe(this.git3,25),this.git4=Pe(this.git4,25),this.git5=Pe(this.git5,25),this.git6=Pe(this.git6,25),this.git7=Pe(this.git7,25)):(this.git0=Ze(this.git0,25),this.git1=Ze(this.git1,25),this.git2=Ze(this.git2,25),this.git3=Ze(this.git3,25),this.git4=Ze(this.git4,25),this.git5=Ze(this.git5,25),this.git6=Ze(this.git6,25),this.git7=Ze(this.git7,25)),this.gitInv0=this.gitInv0||Le(this.git0),this.gitInv1=this.gitInv1||Le(this.git1),this.gitInv2=this.gitInv2||Le(this.git2),this.gitInv3=this.gitInv3||Le(this.git3),this.gitInv4=this.gitInv4||Le(this.git4),this.gitInv5=this.gitInv5||Le(this.git5),this.gitInv6=this.gitInv6||Le(this.git6),this.gitInv7=this.gitInv7||Le(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Le(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Le(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Eh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ah}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},w(eo,"Theme"),eo),AW=w(t=>{const e=new EW;return e.calculate(t),e},"getThemeVariables"),to,NW=(to=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Pe(this.contrast,55),this.background="#ffffff",this.tertiaryColor=re(this.primaryColor,{h:-160}),this.primaryBorderColor=Wr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Le(this.primaryColor),this.secondaryTextColor=Le(this.secondaryColor),this.tertiaryTextColor=Le(this.tertiaryColor),this.lineColor=Le(this.background),this.textColor=Le(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||Pe(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){var e,r,n,i,a,s,o,l,c,u,h,d,f,p,m,y,b,v,C,E,_;this.secondBkg=Pe(this.contrast,55),this.border2=this.contrast,this.actorBorder=Pe(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleInv"+k]=this["cScaleInv"+k]||Le(this["cScale"+k]);for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this.darkMode?this["cScalePeer"+k]=this["cScalePeer"+k]||Pe(this["cScale"+k],10):this["cScalePeer"+k]=this["cScalePeer"+k]||Ze(this["cScale"+k],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["cScaleLabel"+k]=this["cScaleLabel"+k]||this.scaleLabelColor;for(let k=0;k<5;k++)this["surface"+k]=this["surface"+k]||re(this.mainBkg,{l:-(5+k*5)}),this["surfacePeer"+k]=this["surfacePeer"+k]||re(this.mainBkg,{l:-(8+k*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=Pe(this.contrast,30),this.sectionBkgColor2=Pe(this.contrast,30),this.taskBorderColor=Ze(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Pe(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Ze(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=re(this.primaryColor,{h:64}),this.fillType3=re(this.secondaryColor,{h:64}),this.fillType4=re(this.primaryColor,{h:-64}),this.fillType5=re(this.secondaryColor,{h:-64}),this.fillType6=re(this.primaryColor,{h:128}),this.fillType7=re(this.secondaryColor,{h:128});for(let k=0;k<this.THEME_COLOR_LIMIT;k++)this["pie"+k]=this["cScale"+k];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||re(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||re(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||re(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||re(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||re(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||re(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Io(this.quadrant1Fill)?Pe(this.quadrant1Fill):Ze(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((e=this.xyChart)==null?void 0:e.backgroundColor)||this.background,titleColor:((r=this.xyChart)==null?void 0:r.titleColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((i=this.xyChart)==null?void 0:i.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((a=this.xyChart)==null?void 0:a.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((s=this.xyChart)==null?void 0:s.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((o=this.xyChart)==null?void 0:o.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((c=this.xyChart)==null?void 0:c.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((h=this.xyChart)==null?void 0:h.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((d=this.radar)==null?void 0:d.axisColor)||this.lineColor,axisStrokeWidth:((f=this.radar)==null?void 0:f.axisStrokeWidth)||2,axisLabelFontSize:((p=this.radar)==null?void 0:p.axisLabelFontSize)||12,curveOpacity:((m=this.radar)==null?void 0:m.curveOpacity)||.5,curveStrokeWidth:((y=this.radar)==null?void 0:y.curveStrokeWidth)||2,graticuleColor:((b=this.radar)==null?void 0:b.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((v=this.radar)==null?void 0:v.graticuleStrokeWidth)||1,graticuleOpacity:((C=this.radar)==null?void 0:C.graticuleOpacity)||.3,legendBoxSize:((E=this.radar)==null?void 0:E.legendBoxSize)||12,legendFontSize:((_=this.radar)==null?void 0:_.legendFontSize)||12},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Ze(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||re(this.primaryColor,{h:-30}),this.git4=this.pie5||re(this.primaryColor,{h:-60}),this.git5=this.pie6||re(this.primaryColor,{h:-90}),this.git6=this.pie7||re(this.primaryColor,{h:60}),this.git7=this.pie8||re(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Le(this.git0),this.gitInv1=this.gitInv1||Le(this.git1),this.gitInv2=this.gitInv2||Le(this.git2),this.gitInv3=this.gitInv3||Le(this.git3),this.gitInv4=this.gitInv4||Le(this.git4),this.gitInv5=this.gitInv5||Le(this.git5),this.gitInv6=this.gitInv6||Le(this.git6),this.gitInv7=this.gitInv7||Le(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Eh,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Ah}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}},w(to,"Theme"),to),LW=w(t=>{const e=new NW;return e.calculate(t),e},"getThemeVariables"),Ui={base:{getThemeVariables:TW},dark:{getThemeVariables:SW},default:{getThemeVariables:Nk},forest:{getThemeVariables:AW},neutral:{getThemeVariables:LW}},ti={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Lk={...ti,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Ui.default.getThemeVariables(),sequence:{...ti.sequence,messageFont:w(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:w(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:w(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...ti.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ti.c4,useWidth:void 0,personFont:w(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...ti.flowchart,inheritDir:!1},external_personFont:w(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:w(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:w(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:w(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:w(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:w(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:w(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:w(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:w(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:w(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:w(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:w(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:w(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:w(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:w(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:w(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:w(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:w(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:w(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:w(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:w(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ti.pie,useWidth:984},xyChart:{...ti.xyChart,useWidth:void 0},requirement:{...ti.requirement,useWidth:void 0},packet:{...ti.packet},radar:{...ti.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Mk=w((t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...Mk(t[n],"")]:[...r,e+n],[]),"keyify"),MW=new Set(Mk(Lk,"")),P1=Lk,m0=w(t=>{if(he.debug("sanitizeDirective called with",t),!(typeof t!="object"||t==null)){if(Array.isArray(t)){t.forEach(e=>m0(e));return}for(const e of Object.keys(t)){if(he.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!MW.has(e)||t[e]==null){he.debug("sanitize deleting key: ",e),delete t[e];continue}if(typeof t[e]=="object"){he.debug("sanitizing object",e),m0(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(he.debug("sanitizing css option",e),t[e]=IW(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}he.debug("After sanitization",t)}},"sanitizeDirective"),IW=w(t=>{let e=0,r=0;for(const n of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";n==="{"?e++:n==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t},"sanitizeCss"),fo=Object.freeze(P1),ln=lr({},fo),g0,ss=[],zl=lr({},fo),Nh=w((t,e)=>{let r=lr({},t),n={};for(const i of e)Bk(i),n=lr(n,i);if(r=lr(r,n),n.theme&&n.theme in Ui){const i=lr({},g0),a=lr(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in Ui&&(r.themeVariables=Ui[r.theme].getThemeVariables(a))}return zl=r,Dk(zl),zl},"updateCurrentConfig"),RW=w(t=>(ln=lr({},fo),ln=lr(ln,t),t.theme&&Ui[t.theme]&&(ln.themeVariables=Ui[t.theme].getThemeVariables(t.themeVariables)),Nh(ln,ss),ln),"setSiteConfig"),BW=w(t=>{g0=lr({},t)},"saveConfigFromInitialize"),DW=w(t=>(ln=lr(ln,t),Nh(ln,ss),ln),"updateSiteConfig"),Ik=w(()=>lr({},ln),"getSiteConfig"),Rk=w(t=>(Dk(t),lr(zl,t),_r()),"setConfig"),_r=w(()=>lr({},zl),"getConfig"),Bk=w(t=>{t&&(["secure",...ln.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(he.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{typeof t[e]=="string"&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],typeof t[e]=="object"&&Bk(t[e])}))},"sanitize"),OW=w(t=>{var e;m0(t),t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),ss.push(t),Nh(ln,ss)},"addDirective"),b0=w((t=ln)=>{ss=[],Nh(t,ss)},"reset"),PW={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Yy={},FW=w(t=>{Yy[t]||(he.warn(PW[t]),Yy[t]=!0)},"issueWarning"),Dk=w(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&FW("LAZY_LOAD_DEPRECATED")},"checkConfig"),$W=w(()=>{let t={};g0&&(t=lr(t,g0));for(const e of ss)t=lr(t,e);return t},"getUserDefinedConfig"),Ro=/<br\s*\/?>/gi,zW=w(t=>t?Fk(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),HW=(()=>{let t=!1;return()=>{t||(Ok(),t=!0)}})();function Ok(){const t="data-temp-href-target";ho.addHook("beforeSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),ho.addHook("afterSanitizeAttributes",e=>{e.tagName==="A"&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),e.getAttribute("target")==="_blank"&&e.setAttribute("rel","noopener"))})}w(Ok,"setupDompurifyHooks");var Pk=w(t=>(HW(),ho.sanitize(t)),"removeScript"),Vy=w((t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const n=e.securityLevel;n==="antiscript"||n==="strict"?t=Pk(t):n!=="loose"&&(t=Fk(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=WW(t))}return t},"sanitizeMore"),Cn=w((t,e)=>t&&(e.dompurifyConfig?t=ho.sanitize(Vy(t,e),e.dompurifyConfig).toString():t=ho.sanitize(Vy(t,e),{FORBID_TAGS:["style"]}).toString(),t),"sanitizeText"),qW=w((t,e)=>typeof t=="string"?Cn(t,e):t.flat().map(r=>Cn(r,e)),"sanitizeTextOrArray"),jW=w(t=>Ro.test(t),"hasBreaks"),UW=w(t=>t.split(Ro),"splitBreaks"),WW=w(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Fk=w(t=>t.replace(Ro,"#br#"),"breakToPlaceholder"),$k=w(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),cr=w(t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),GW=w(function(...t){const e=t.filter(r=>!isNaN(r));return Math.max(...e)},"getMax"),YW=w(function(...t){const e=t.filter(r=>!isNaN(r));return Math.min(...e)},"getMin"),yp=w(function(t){const e=t.split(/(,)/),r=[];for(let n=0;n<e.length;n++){let i=e[n];if(i===","&&n>0&&n+1<e.length){const a=e[n-1],s=e[n+1];VW(a,s)&&(i=a+","+s,n++,r.pop())}r.push(XW(i))}return r.join("")},"parseGenericTypes"),xp=w((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),VW=w((t,e)=>{const r=xp(t,"~"),n=xp(e,"~");return r===1&&n===1},"shouldCombineSets"),XW=w(t=>{const e=xp(t,"~");let r=!1;if(e<=1)return t;e%2!==0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const n=[...t];let i=n.indexOf("~"),a=n.lastIndexOf("~");for(;i!==-1&&a!==-1&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),Xy=w(()=>window.MathMLElement!==void 0,"isMathMLSupported"),vp=/\$\$(.*)\$\$/g,os=w(t=>{var e;return(((e=t.match(vp))==null?void 0:e.length)??0)>0},"hasKatex"),KW=w(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Lh(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const n=document.querySelector("body");n==null||n.insertAdjacentElement("beforeend",r);const i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),QW=w(async(t,e)=>{if(!os(t))return t;if(!(Xy()||e.legacyMathML||e.forceLegacyMathML))return t.replace(vp,"MathML is unsupported in this environment.");{const{default:r}=await Promise.resolve().then(()=>NU),n=e.forceLegacyMathML||!Xy()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Ro).map(i=>os(i)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${i}</div>`:`<div>${i}</div>`).join("").replace(vp,(i,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Lh=w(async(t,e)=>Cn(await QW(t,e),e),"renderKatexSanitized"),xs={getRows:zW,sanitizeText:Cn,sanitizeTextOrArray:qW,hasBreaks:jW,splitBreaks:UW,lineBreakRegex:Ro,removeScript:Pk,getUrl:$k,evaluate:cr,getMax:GW,getMin:YW},ZW=w(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),JW=w(function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),F1=w(function(t,e,r,n){const i=JW(e,r,n);ZW(t,i)},"configureSvgSize"),zk=w(function(t,e,r,n){const i=e.node().getBBox(),a=i.width,s=i.height;he.info(`SVG bounds: ${a}x${s}`,i);let o=0,l=0;he.info(`Graph bounds: ${o}x${l}`,t),o=a+r*2,l=s+r*2,he.info(`Calculated bounds: ${o}x${l}`),F1(e,l,o,n);const c=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",c)},"setupGraphViewbox"),Nu={},eG=w((t,e,r)=>{let n="";return t in Nu&&Nu[t]?n=Nu[t](r):he.warn(`No theme found for ${t}`),` & {
393
+ font-family: ${r.fontFamily};
394
+ font-size: ${r.fontSize};
395
+ fill: ${r.textColor}
396
+ }
397
+ @keyframes edge-animation-frame {
398
+ from {
399
+ stroke-dashoffset: 0;
400
+ }
401
+ }
402
+ @keyframes dash {
403
+ to {
404
+ stroke-dashoffset: 0;
405
+ }
406
+ }
407
+ & .edge-animation-slow {
408
+ stroke-dasharray: 9,5 !important;
409
+ stroke-dashoffset: 900;
410
+ animation: dash 50s linear infinite;
411
+ stroke-linecap: round;
412
+ }
413
+ & .edge-animation-fast {
414
+ stroke-dasharray: 9,5 !important;
415
+ stroke-dashoffset: 900;
416
+ animation: dash 20s linear infinite;
417
+ stroke-linecap: round;
418
+ }
419
+ /* Classes common for multiple diagrams */
420
+
421
+ & .error-icon {
422
+ fill: ${r.errorBkgColor};
423
+ }
424
+ & .error-text {
425
+ fill: ${r.errorTextColor};
426
+ stroke: ${r.errorTextColor};
427
+ }
428
+
429
+ & .edge-thickness-normal {
430
+ stroke-width: 1px;
431
+ }
432
+ & .edge-thickness-thick {
433
+ stroke-width: 3.5px
434
+ }
435
+ & .edge-pattern-solid {
436
+ stroke-dasharray: 0;
437
+ }
438
+ & .edge-thickness-invisible {
439
+ stroke-width: 0;
440
+ fill: none;
441
+ }
442
+ & .edge-pattern-dashed{
443
+ stroke-dasharray: 3;
444
+ }
445
+ .edge-pattern-dotted {
446
+ stroke-dasharray: 2;
447
+ }
448
+
449
+ & .marker {
450
+ fill: ${r.lineColor};
451
+ stroke: ${r.lineColor};
452
+ }
453
+ & .marker.cross {
454
+ stroke: ${r.lineColor};
455
+ }
456
+
457
+ & svg {
458
+ font-family: ${r.fontFamily};
459
+ font-size: ${r.fontSize};
460
+ }
461
+ & p {
462
+ margin: 0
463
+ }
464
+
465
+ ${n}
466
+
467
+ ${e}
468
+ `},"getStyles"),tG=w((t,e)=>{e!==void 0&&(Nu[t]=e)},"addStylesForDiagram"),rG=eG,$1={};xk($1,{clear:()=>Hk,getAccDescription:()=>Wk,getAccTitle:()=>jk,getDiagramTitle:()=>Yk,setAccDescription:()=>Uk,setAccTitle:()=>qk,setDiagramTitle:()=>Gk});var z1="",H1="",q1="",j1=w(t=>Cn(t,_r()),"sanitizeText"),Hk=w(()=>{z1="",q1="",H1=""},"clear"),qk=w(t=>{z1=j1(t).replace(/^\s+/g,"")},"setAccTitle"),jk=w(()=>z1,"getAccTitle"),Uk=w(t=>{q1=j1(t).replace(/\n\s+/g,`
469
+ `)},"setAccDescription"),Wk=w(()=>q1,"getAccDescription"),Gk=w(t=>{H1=j1(t)},"setDiagramTitle"),Yk=w(()=>H1,"getDiagramTitle"),Ky=he,nG=D1,Bt=_r,iG=Rk,aG=fo,U1=w(t=>Cn(t,Bt()),"sanitizeText"),Vk=zk,sG=w(()=>$1,"getCommonDb"),y0={},x0=w((t,e,r)=>{var n;y0[t]&&Ky.warn(`Diagram with id ${t} already registered. Overwriting.`),y0[t]=e,r&&Ak(t,r),tG(t,e.styles),(n=e.injectUtils)==null||n.call(e,Ky,nG,Bt,U1,Vk,sG(),()=>{})},"registerDiagram"),kp=w(t=>{if(t in y0)return y0[t];throw new oG(t)},"getDiagram"),ro,oG=(ro=class extends Error{constructor(e){super(`Diagram ${e} not found.`)}},w(ro,"DiagramNotFoundError"),ro),lG={value:()=>{}};function Xk(){for(var t=0,e=arguments.length,r={},n;t<e;++t){if(!(n=arguments[t]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Lu(r)}function Lu(t){this._=t}function cG(t,e){return t.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Lu.prototype=Xk.prototype={constructor:Lu,on:function(t,e){var r=this._,n=cG(t+"",r),i,a=-1,s=n.length;if(arguments.length<2){for(;++a<s;)if((i=(t=n[a]).type)&&(i=uG(r[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<s;)if(i=(t=n[a]).type)r[i]=Qy(r[i],t.name,e);else if(e==null)for(i in r)r[i]=Qy(r[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new Lu(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,a;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],n=0,i=a.length;n<i;++n)a[n].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)}};function uG(t,e){for(var r=0,n=t.length,i;r<n;++r)if((i=t[r]).name===e)return i.value}function Qy(t,e,r){for(var n=0,i=t.length;n<i;++n)if(t[n].name===e){t[n]=lG,t=t.slice(0,n).concat(t.slice(n+1));break}return r!=null&&t.push({name:e,value:r}),t}var wp="http://www.w3.org/1999/xhtml";const Zy={svg:"http://www.w3.org/2000/svg",xhtml:wp,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Mh(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Zy.hasOwnProperty(e)?{space:Zy[e],local:t}:t}function hG(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===wp&&e.documentElement.namespaceURI===wp?e.createElement(t):e.createElementNS(r,t)}}function dG(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Kk(t){var e=Mh(t);return(e.local?dG:hG)(e)}function fG(){}function W1(t){return t==null?fG:function(){return this.querySelector(t)}}function pG(t){typeof t!="function"&&(t=W1(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,o=n[i]=new Array(s),l,c,u=0;u<s;++u)(l=a[u])&&(c=t.call(l,l.__data__,u,a))&&("__data__"in l&&(c.__data__=l.__data__),o[u]=c);return new Sn(n,this._parents)}function mG(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function gG(){return[]}function Qk(t){return t==null?gG:function(){return this.querySelectorAll(t)}}function bG(t){return function(){return mG(t.apply(this,arguments))}}function yG(t){typeof t=="function"?t=bG(t):t=Qk(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a<r;++a)for(var s=e[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&(n.push(t.call(l,l.__data__,c,s)),i.push(l));return new Sn(n,i)}function Zk(t){return function(){return this.matches(t)}}function Jk(t){return function(e){return e.matches(t)}}var xG=Array.prototype.find;function vG(t){return function(){return xG.call(this.children,t)}}function kG(){return this.firstElementChild}function wG(t){return this.select(t==null?kG:vG(typeof t=="function"?t:Jk(t)))}var TG=Array.prototype.filter;function CG(){return Array.from(this.children)}function SG(t){return function(){return TG.call(this.children,t)}}function _G(t){return this.selectAll(t==null?CG:SG(typeof t=="function"?t:Jk(t)))}function EG(t){typeof t!="function"&&(t=Zk(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,o=n[i]=[],l,c=0;c<s;++c)(l=a[c])&&t.call(l,l.__data__,c,a)&&o.push(l);return new Sn(n,this._parents)}function ew(t){return new Array(t.length)}function AG(){return new Sn(this._enter||this._groups.map(ew),this._parents)}function v0(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}v0.prototype={constructor:v0,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function NG(t){return function(){return t}}function LG(t,e,r,n,i,a){for(var s=0,o,l=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],n[s]=o):r[s]=new v0(t,a[s]);for(;s<l;++s)(o=e[s])&&(i[s]=o)}function MG(t,e,r,n,i,a,s){var o,l,c=new Map,u=e.length,h=a.length,d=new Array(u),f;for(o=0;o<u;++o)(l=e[o])&&(d[o]=f=s.call(l,l.__data__,o,e)+"",c.has(f)?i[o]=l:c.set(f,l));for(o=0;o<h;++o)f=s.call(t,a[o],o,a)+"",(l=c.get(f))?(n[o]=l,l.__data__=a[o],c.delete(f)):r[o]=new v0(t,a[o]);for(o=0;o<u;++o)(l=e[o])&&c.get(d[o])===l&&(i[o]=l)}function IG(t){return t.__data__}function RG(t,e){if(!arguments.length)return Array.from(this,IG);var r=e?MG:LG,n=this._parents,i=this._groups;typeof t!="function"&&(t=NG(t));for(var a=i.length,s=new Array(a),o=new Array(a),l=new Array(a),c=0;c<a;++c){var u=n[c],h=i[c],d=h.length,f=BG(t.call(u,u&&u.__data__,c,n)),p=f.length,m=o[c]=new Array(p),y=s[c]=new Array(p),b=l[c]=new Array(d);r(u,h,m,y,b,f,e);for(var v=0,C=0,E,_;v<p;++v)if(E=m[v]){for(v>=C&&(C=v+1);!(_=y[C])&&++C<p;);E._next=_||null}}return s=new Sn(s,n),s._enter=o,s._exit=l,s}function BG(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function DG(){return new Sn(this._exit||this._groups.map(ew),this._parents)}function OG(t,e,r){var n=this.enter(),i=this,a=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),r==null?a.remove():r(a),n&&i?n.merge(i).order():i}function PG(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,i=r.length,a=n.length,s=Math.min(i,a),o=new Array(i),l=0;l<s;++l)for(var c=r[l],u=n[l],h=c.length,d=o[l]=new Array(h),f,p=0;p<h;++p)(f=c[p]||u[p])&&(d[p]=f);for(;l<i;++l)o[l]=r[l];return new Sn(o,this._parents)}function FG(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n=t[e],i=n.length-1,a=n[i],s;--i>=0;)(s=n[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function $G(t){t||(t=zG);function e(h,d){return h&&d?t(h.__data__,d.__data__):!h-!d}for(var r=this._groups,n=r.length,i=new Array(n),a=0;a<n;++a){for(var s=r[a],o=s.length,l=i[a]=new Array(o),c,u=0;u<o;++u)(c=s[u])&&(l[u]=c);l.sort(e)}return new Sn(i,this._parents).order()}function zG(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function HG(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function qG(){return Array.from(this)}function jG(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length;i<a;++i){var s=n[i];if(s)return s}return null}function UG(){let t=0;for(const e of this)++t;return t}function WG(){return!this.node()}function GG(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var i=e[r],a=0,s=i.length,o;a<s;++a)(o=i[a])&&t.call(o,o.__data__,a,i);return this}function YG(t){return function(){this.removeAttribute(t)}}function VG(t){return function(){this.removeAttributeNS(t.space,t.local)}}function XG(t,e){return function(){this.setAttribute(t,e)}}function KG(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function QG(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function ZG(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function JG(t,e){var r=Mh(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?VG:YG:typeof e=="function"?r.local?ZG:QG:r.local?KG:XG)(r,e))}function tw(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function eY(t){return function(){this.style.removeProperty(t)}}function tY(t,e,r){return function(){this.style.setProperty(t,e,r)}}function rY(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function nY(t,e,r){return arguments.length>1?this.each((e==null?eY:typeof e=="function"?rY:tY)(t,e,r??"")):po(this.node(),t)}function po(t,e){return t.style.getPropertyValue(e)||tw(t).getComputedStyle(t,null).getPropertyValue(e)}function iY(t){return function(){delete this[t]}}function aY(t,e){return function(){this[t]=e}}function sY(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function oY(t,e){return arguments.length>1?this.each((e==null?iY:typeof e=="function"?sY:aY)(t,e)):this.node()[t]}function rw(t){return t.trim().split(/^|\s+/)}function G1(t){return t.classList||new nw(t)}function nw(t){this._node=t,this._names=rw(t.getAttribute("class")||"")}nw.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function iw(t,e){for(var r=G1(t),n=-1,i=e.length;++n<i;)r.add(e[n])}function aw(t,e){for(var r=G1(t),n=-1,i=e.length;++n<i;)r.remove(e[n])}function lY(t){return function(){iw(this,t)}}function cY(t){return function(){aw(this,t)}}function uY(t,e){return function(){(e.apply(this,arguments)?iw:aw)(this,t)}}function hY(t,e){var r=rw(t+"");if(arguments.length<2){for(var n=G1(this.node()),i=-1,a=r.length;++i<a;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof e=="function"?uY:e?lY:cY)(r,e))}function dY(){this.textContent=""}function fY(t){return function(){this.textContent=t}}function pY(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function mY(t){return arguments.length?this.each(t==null?dY:(typeof t=="function"?pY:fY)(t)):this.node().textContent}function gY(){this.innerHTML=""}function bY(t){return function(){this.innerHTML=t}}function yY(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function xY(t){return arguments.length?this.each(t==null?gY:(typeof t=="function"?yY:bY)(t)):this.node().innerHTML}function vY(){this.nextSibling&&this.parentNode.appendChild(this)}function kY(){return this.each(vY)}function wY(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function TY(){return this.each(wY)}function CY(t){var e=typeof t=="function"?t:Kk(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function SY(){return null}function _Y(t,e){var r=typeof t=="function"?t:Kk(t),n=e==null?SY:typeof e=="function"?e:W1(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function EY(){var t=this.parentNode;t&&t.removeChild(this)}function AY(){return this.each(EY)}function NY(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function LY(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function MY(t){return this.select(t?LY:NY)}function IY(t){return arguments.length?this.property("__data__",t):this.node().__data__}function RY(t){return function(e){t.call(this,e,this.__data__)}}function BY(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function DY(t){return function(){var e=this.__on;if(e){for(var r=0,n=-1,i=e.length,a;r<i;++r)a=e[r],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++n]=a;++n?e.length=n:delete this.__on}}}function OY(t,e,r){return function(){var n=this.__on,i,a=RY(e);if(n){for(var s=0,o=n.length;s<o;++s)if((i=n[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),i.value=e;return}}this.addEventListener(t.type,a,r),i={type:t.type,name:t.name,value:e,listener:a,options:r},n?n.push(i):this.__on=[i]}}function PY(t,e,r){var n=BY(t+""),i,a=n.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,c=o.length,u;l<c;++l)for(i=0,u=o[l];i<a;++i)if((s=n[i]).type===u.type&&s.name===u.name)return u.value}return}for(o=e?OY:DY,i=0;i<a;++i)this.each(o(n[i],e,r));return this}function sw(t,e,r){var n=tw(t),i=n.CustomEvent;typeof i=="function"?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function FY(t,e){return function(){return sw(this,t,e)}}function $Y(t,e){return function(){return sw(this,t,e.apply(this,arguments))}}function zY(t,e){return this.each((typeof e=="function"?$Y:FY)(t,e))}function*HY(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length,s;i<a;++i)(s=n[i])&&(yield s)}var ow=[null];function Sn(t,e){this._groups=t,this._parents=e}function Ac(){return new Sn([[document.documentElement]],ow)}function qY(){return this}Sn.prototype=Ac.prototype={constructor:Sn,select:pG,selectAll:yG,selectChild:wG,selectChildren:_G,filter:EG,data:RG,enter:AG,exit:DG,join:OG,merge:PG,selection:qY,order:FG,sort:$G,call:HG,nodes:qG,node:jG,size:UG,empty:WG,each:GG,attr:JG,style:nY,property:oY,classed:hY,text:mY,html:xY,raise:kY,lower:TY,append:CY,insert:_Y,remove:AY,clone:MY,datum:IY,on:PY,dispatch:zY,[Symbol.iterator]:HY};function At(t){return typeof t=="string"?new Sn([[document.querySelector(t)]],[document.documentElement]):new Sn([[t]],ow)}function Ih(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Y1(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function Bo(){}var ec=.7,k0=1/ec,Vs="\\s*([+-]?\\d+)\\s*",tc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jY=/^#([0-9a-f]{3,8})$/,UY=new RegExp(`^rgb\\(${Vs},${Vs},${Vs}\\)$`),WY=new RegExp(`^rgb\\(${mi},${mi},${mi}\\)$`),GY=new RegExp(`^rgba\\(${Vs},${Vs},${Vs},${tc}\\)$`),YY=new RegExp(`^rgba\\(${mi},${mi},${mi},${tc}\\)$`),VY=new RegExp(`^hsl\\(${tc},${mi},${mi}\\)$`),XY=new RegExp(`^hsla\\(${tc},${mi},${mi},${tc}\\)$`),Jy={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ih(Bo,mo,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ex,formatHex:ex,formatHex8:KY,formatHsl:QY,formatRgb:tx,toString:tx});function ex(){return this.rgb().formatHex()}function KY(){return this.rgb().formatHex8()}function QY(){return cw(this).formatHsl()}function tx(){return this.rgb().formatRgb()}function mo(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=jY.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?rx(e):r===3?new Gr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?ou(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?ou(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=UY.exec(t))?new Gr(e[1],e[2],e[3],1):(e=WY.exec(t))?new Gr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=GY.exec(t))?ou(e[1],e[2],e[3],e[4]):(e=YY.exec(t))?ou(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=VY.exec(t))?ax(e[1],e[2]/100,e[3]/100,1):(e=XY.exec(t))?ax(e[1],e[2]/100,e[3]/100,e[4]):Jy.hasOwnProperty(t)?rx(Jy[t]):t==="transparent"?new Gr(NaN,NaN,NaN,0):null}function rx(t){return new Gr(t>>16&255,t>>8&255,t&255,1)}function ou(t,e,r,n){return n<=0&&(t=e=r=NaN),new Gr(t,e,r,n)}function lw(t){return t instanceof Bo||(t=mo(t)),t?(t=t.rgb(),new Gr(t.r,t.g,t.b,t.opacity)):new Gr}function Tp(t,e,r,n){return arguments.length===1?lw(t):new Gr(t,e,r,n??1)}function Gr(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}Ih(Gr,Tp,Y1(Bo,{brighter(t){return t=t==null?k0:Math.pow(k0,t),new Gr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ec:Math.pow(ec,t),new Gr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Gr(Ja(this.r),Ja(this.g),Ja(this.b),w0(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nx,formatHex:nx,formatHex8:ZY,formatRgb:ix,toString:ix}));function nx(){return`#${Va(this.r)}${Va(this.g)}${Va(this.b)}`}function ZY(){return`#${Va(this.r)}${Va(this.g)}${Va(this.b)}${Va((isNaN(this.opacity)?1:this.opacity)*255)}`}function ix(){const t=w0(this.opacity);return`${t===1?"rgb(":"rgba("}${Ja(this.r)}, ${Ja(this.g)}, ${Ja(this.b)}${t===1?")":`, ${t})`}`}function w0(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ja(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Va(t){return t=Ja(t),(t<16?"0":"")+t.toString(16)}function ax(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Gn(t,e,r,n)}function cw(t){if(t instanceof Gn)return new Gn(t.h,t.s,t.l,t.opacity);if(t instanceof Bo||(t=mo(t)),!t)return new Gn;if(t instanceof Gn)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,o=a-i,l=(a+i)/2;return o?(e===a?s=(r-n)/o+(r<n)*6:r===a?s=(n-e)/o+2:s=(e-r)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new Gn(s,o,l,t.opacity)}function JY(t,e,r,n){return arguments.length===1?cw(t):new Gn(t,e,r,n??1)}function Gn(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}Ih(Gn,JY,Y1(Bo,{brighter(t){return t=t==null?k0:Math.pow(k0,t),new Gn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ec:Math.pow(ec,t),new Gn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new Gr(of(t>=240?t-240:t+120,i,n),of(t,i,n),of(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new Gn(sx(this.h),lu(this.s),lu(this.l),w0(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=w0(this.opacity);return`${t===1?"hsl(":"hsla("}${sx(this.h)}, ${lu(this.s)*100}%, ${lu(this.l)*100}%${t===1?")":`, ${t})`}`}}));function sx(t){return t=(t||0)%360,t<0?t+360:t}function lu(t){return Math.max(0,Math.min(1,t||0))}function of(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const Rh=t=>()=>t;function uw(t,e){return function(r){return t+r*e}}function eV(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function tV(t,e){var r=e-t;return r?uw(t,r>180||r<-180?r-360*Math.round(r/360):r):Rh(isNaN(t)?e:t)}function rV(t){return(t=+t)==1?V1:function(e,r){return r-e?eV(e,r,t):Rh(isNaN(e)?r:e)}}function V1(t,e){var r=e-t;return r?uw(t,r):Rh(isNaN(t)?e:t)}const Cp=function t(e){var r=rV(e);function n(i,a){var s=r((i=Tp(i)).r,(a=Tp(a)).r),o=r(i.g,a.g),l=r(i.b,a.b),c=V1(i.opacity,a.opacity);return function(u){return i.r=s(u),i.g=o(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=t,n}(1);function Pi(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var Sp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,lf=new RegExp(Sp.source,"g");function nV(t){return function(){return t}}function iV(t){return function(e){return t(e)+""}}function hw(t,e){var r=Sp.lastIndex=lf.lastIndex=0,n,i,a,s=-1,o=[],l=[];for(t=t+"",e=e+"";(n=Sp.exec(t))&&(i=lf.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:Pi(n,i)})),r=lf.lastIndex;return r<e.length&&(a=e.slice(r),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?iV(l[0].x):nV(e):(e=l.length,function(c){for(var u=0,h;u<e;++u)o[(h=l[u]).i]=h.x(c);return o.join("")})}var ox=180/Math.PI,_p={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function dw(t,e,r,n,i,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),t*n<e*r&&(t=-t,e=-e,l=-l,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*ox,skewX:Math.atan(l)*ox,scaleX:s,scaleY:o}}var cu;function aV(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?_p:dw(e.a,e.b,e.c,e.d,e.e,e.f)}function sV(t){return t==null||(cu||(cu=document.createElementNS("http://www.w3.org/2000/svg","g")),cu.setAttribute("transform",t),!(t=cu.transform.baseVal.consolidate()))?_p:(t=t.matrix,dw(t.a,t.b,t.c,t.d,t.e,t.f))}function fw(t,e,r,n){function i(c){return c.length?c.pop()+" ":""}function a(c,u,h,d,f,p){if(c!==h||u!==d){var m=f.push("translate(",null,e,null,r);p.push({i:m-4,x:Pi(c,h)},{i:m-2,x:Pi(u,d)})}else(h||d)&&f.push("translate("+h+e+d+r)}function s(c,u,h,d){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),d.push({i:h.push(i(h)+"rotate(",null,n)-2,x:Pi(c,u)})):u&&h.push(i(h)+"rotate("+u+n)}function o(c,u,h,d){c!==u?d.push({i:h.push(i(h)+"skewX(",null,n)-2,x:Pi(c,u)}):u&&h.push(i(h)+"skewX("+u+n)}function l(c,u,h,d,f,p){if(c!==h||u!==d){var m=f.push(i(f)+"scale(",null,",",null,")");p.push({i:m-4,x:Pi(c,h)},{i:m-2,x:Pi(u,d)})}else(h!==1||d!==1)&&f.push(i(f)+"scale("+h+","+d+")")}return function(c,u){var h=[],d=[];return c=t(c),u=t(u),a(c.translateX,c.translateY,u.translateX,u.translateY,h,d),s(c.rotate,u.rotate,h,d),o(c.skewX,u.skewX,h,d),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,d),c=u=null,function(f){for(var p=-1,m=d.length,y;++p<m;)h[(y=d[p]).i]=y.x(f);return h.join("")}}}var oV=fw(aV,"px, ","px)","deg)"),lV=fw(sV,", ",")",")"),go=0,ml=0,tl=0,pw=1e3,T0,gl,C0=0,ls=0,Bh=0,rc=typeof performance=="object"&&performance.now?performance:Date,mw=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function X1(){return ls||(mw(cV),ls=rc.now()+Bh)}function cV(){ls=0}function S0(){this._call=this._time=this._next=null}S0.prototype=gw.prototype={constructor:S0,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?X1():+r)+(e==null?0:+e),!this._next&&gl!==this&&(gl?gl._next=this:T0=this,gl=this),this._call=t,this._time=r,Ep()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ep())}};function gw(t,e,r){var n=new S0;return n.restart(t,e,r),n}function uV(){X1(),++go;for(var t=T0,e;t;)(e=ls-t._time)>=0&&t._call.call(void 0,e),t=t._next;--go}function lx(){ls=(C0=rc.now())+Bh,go=ml=0;try{uV()}finally{go=0,dV(),ls=0}}function hV(){var t=rc.now(),e=t-C0;e>pw&&(Bh-=e,C0=t)}function dV(){for(var t,e=T0,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:T0=r);gl=t,Ep(n)}function Ep(t){if(!go){ml&&(ml=clearTimeout(ml));var e=t-ls;e>24?(t<1/0&&(ml=setTimeout(lx,t-rc.now()-Bh)),tl&&(tl=clearInterval(tl))):(tl||(C0=rc.now(),tl=setInterval(hV,pw)),go=1,mw(lx))}}function cx(t,e,r){var n=new S0;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}var fV=Xk("start","end","cancel","interrupt"),pV=[],bw=0,ux=1,Ap=2,Mu=3,hx=4,Np=5,Iu=6;function Dh(t,e,r,n,i,a){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;mV(t,r,{name:e,index:n,group:i,on:fV,tween:pV,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:bw})}function K1(t,e){var r=Zn(t,e);if(r.state>bw)throw new Error("too late; already scheduled");return r}function Ci(t,e){var r=Zn(t,e);if(r.state>Mu)throw new Error("too late; already running");return r}function Zn(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function mV(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=gw(a,0,r.time);function a(c){r.state=ux,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var u,h,d,f;if(r.state!==ux)return l();for(u in n)if(f=n[u],f.name===r.name){if(f.state===Mu)return cx(s);f.state===hx?(f.state=Iu,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete n[u]):+u<e&&(f.state=Iu,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete n[u])}if(cx(function(){r.state===Mu&&(r.state=hx,r.timer.restart(o,r.delay,r.time),o(c))}),r.state=Ap,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Ap){for(r.state=Mu,i=new Array(d=r.tween.length),u=0,h=-1;u<d;++u)(f=r.tween[u].value.call(t,t.__data__,r.index,r.group))&&(i[++h]=f);i.length=h+1}}function o(c){for(var u=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=Np,1),h=-1,d=i.length;++h<d;)i[h].call(t,u);r.state===Np&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=Iu,r.timer.stop(),delete n[e];for(var c in n)return;delete t.__transition}}function gV(t,e){var r=t.__transition,n,i,a=!0,s;if(r){e=e==null?null:e+"";for(s in r){if((n=r[s]).name!==e){a=!1;continue}i=n.state>Ap&&n.state<Np,n.state=Iu,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete r[s]}a&&delete t.__transition}}function bV(t){return this.each(function(){gV(this,t)})}function yV(t,e){var r,n;return function(){var i=Ci(this,t),a=i.tween;if(a!==r){n=r=a;for(var s=0,o=n.length;s<o;++s)if(n[s].name===e){n=n.slice(),n.splice(s,1);break}}i.tween=n}}function xV(t,e,r){var n,i;if(typeof r!="function")throw new Error;return function(){var a=Ci(this,t),s=a.tween;if(s!==n){i=(n=s).slice();for(var o={name:e,value:r},l=0,c=i.length;l<c;++l)if(i[l].name===e){i[l]=o;break}l===c&&i.push(o)}a.tween=i}}function vV(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n=Zn(this.node(),r).tween,i=0,a=n.length,s;i<a;++i)if((s=n[i]).name===t)return s.value;return null}return this.each((e==null?yV:xV)(r,t,e))}function Q1(t,e,r){var n=t._id;return t.each(function(){var i=Ci(this,n);(i.value||(i.value={}))[e]=r.apply(this,arguments)}),function(i){return Zn(i,n).value[e]}}function yw(t,e){var r;return(typeof e=="number"?Pi:e instanceof mo?Cp:(r=mo(e))?(e=r,Cp):hw)(t,e)}function kV(t){return function(){this.removeAttribute(t)}}function wV(t){return function(){this.removeAttributeNS(t.space,t.local)}}function TV(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttribute(t);return s===i?null:s===n?a:a=e(n=s,r)}}function CV(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===n?a:a=e(n=s,r)}}function SV(t,e,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o)))}}function _V(t,e,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o)))}}function EV(t,e){var r=Mh(t),n=r==="transform"?lV:yw;return this.attrTween(t,typeof e=="function"?(r.local?_V:SV)(r,n,Q1(this,"attr."+t,e)):e==null?(r.local?wV:kV)(r):(r.local?CV:TV)(r,n,e))}function AV(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function NV(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function LV(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&NV(t,a)),r}return i._value=e,i}function MV(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&AV(t,a)),r}return i._value=e,i}function IV(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=Mh(t);return this.tween(r,(n.local?LV:MV)(n,e))}function RV(t,e){return function(){K1(this,t).delay=+e.apply(this,arguments)}}function BV(t,e){return e=+e,function(){K1(this,t).delay=e}}function DV(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?RV:BV)(e,t)):Zn(this.node(),e).delay}function OV(t,e){return function(){Ci(this,t).duration=+e.apply(this,arguments)}}function PV(t,e){return e=+e,function(){Ci(this,t).duration=e}}function FV(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?OV:PV)(e,t)):Zn(this.node(),e).duration}function $V(t,e){if(typeof e!="function")throw new Error;return function(){Ci(this,t).ease=e}}function zV(t){var e=this._id;return arguments.length?this.each($V(e,t)):Zn(this.node(),e).ease}function HV(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Ci(this,t).ease=r}}function qV(t){if(typeof t!="function")throw new Error;return this.each(HV(this._id,t))}function jV(t){typeof t!="function"&&(t=Zk(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,o=n[i]=[],l,c=0;c<s;++c)(l=a[c])&&t.call(l,l.__data__,c,a)&&o.push(l);return new Xi(n,this._parents,this._name,this._id)}function UV(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,i=r.length,a=Math.min(n,i),s=new Array(n),o=0;o<a;++o)for(var l=e[o],c=r[o],u=l.length,h=s[o]=new Array(u),d,f=0;f<u;++f)(d=l[f]||c[f])&&(h[f]=d);for(;o<n;++o)s[o]=e[o];return new Xi(s,this._parents,this._name,this._id)}function WV(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function GV(t,e,r){var n,i,a=WV(e)?K1:Ci;return function(){var s=a(this,t),o=s.on;o!==n&&(i=(n=o).copy()).on(e,r),s.on=i}}function YV(t,e){var r=this._id;return arguments.length<2?Zn(this.node(),r).on.on(t):this.each(GV(r,t,e))}function VV(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function XV(){return this.on("end.remove",VV(this._id))}function KV(t){var e=this._name,r=this._id;typeof t!="function"&&(t=W1(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s<i;++s)for(var o=n[s],l=o.length,c=a[s]=new Array(l),u,h,d=0;d<l;++d)(u=o[d])&&(h=t.call(u,u.__data__,d,o))&&("__data__"in u&&(h.__data__=u.__data__),c[d]=h,Dh(c[d],e,r,d,c,Zn(u,r)));return new Xi(a,this._parents,e,r)}function QV(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Qk(t));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o<i;++o)for(var l=n[o],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var d=t.call(u,u.__data__,h,l),f,p=Zn(u,r),m=0,y=d.length;m<y;++m)(f=d[m])&&Dh(f,e,r,m,d,p);a.push(d),s.push(u)}return new Xi(a,s,e,r)}var ZV=Ac.prototype.constructor;function JV(){return new ZV(this._groups,this._parents)}function eX(t,e){var r,n,i;return function(){var a=po(this,t),s=(this.style.removeProperty(t),po(this,t));return a===s?null:a===r&&s===n?i:i=e(r=a,n=s)}}function xw(t){return function(){this.style.removeProperty(t)}}function tX(t,e,r){var n,i=r+"",a;return function(){var s=po(this,t);return s===i?null:s===n?a:a=e(n=s,r)}}function rX(t,e,r){var n,i,a;return function(){var s=po(this,t),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(t),po(this,t))),s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o))}}function nX(t,e){var r,n,i,a="style."+e,s="end."+a,o;return function(){var l=Ci(this,t),c=l.on,u=l.value[a]==null?o||(o=xw(e)):void 0;(c!==r||i!==u)&&(n=(r=c).copy()).on(s,i=u),l.on=n}}function iX(t,e,r){var n=(t+="")=="transform"?oV:yw;return e==null?this.styleTween(t,eX(t,n)).on("end.style."+t,xw(t)):typeof e=="function"?this.styleTween(t,rX(t,n,Q1(this,"style."+t,e))).each(nX(this._id,t)):this.styleTween(t,tX(t,n,e),r).on("end.style."+t,null)}function aX(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function sX(t,e,r){var n,i;function a(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&aX(t,s,r)),n}return a._value=e,a}function oX(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,sX(t,e,r??""))}function lX(t){return function(){this.textContent=t}}function cX(t){return function(){var e=t(this);this.textContent=e??""}}function uX(t){return this.tween("text",typeof t=="function"?cX(Q1(this,"text",t)):lX(t==null?"":t+""))}function hX(t){return function(e){this.textContent=t.call(this,e)}}function dX(t){var e,r;function n(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&hX(i)),e}return n._value=t,n}function fX(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,dX(t))}function pX(){for(var t=this._name,e=this._id,r=vw(),n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],o=s.length,l,c=0;c<o;++c)if(l=s[c]){var u=Zn(l,e);Dh(l,t,r,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Xi(n,this._parents,t,r)}function mX(){var t,e,r=this,n=r._id,i=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--i===0&&a()}};r.each(function(){var c=Ci(this,n),u=c.on;u!==t&&(e=(t=u).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),c.on=e}),i===0&&a()})}var gX=0;function Xi(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function vw(){return++gX}var Mi=Ac.prototype;Xi.prototype={constructor:Xi,select:KV,selectAll:QV,selectChild:Mi.selectChild,selectChildren:Mi.selectChildren,filter:jV,merge:UV,selection:JV,transition:pX,call:Mi.call,nodes:Mi.nodes,node:Mi.node,size:Mi.size,empty:Mi.empty,each:Mi.each,on:YV,attr:EV,attrTween:IV,style:iX,styleTween:oX,text:uX,textTween:fX,remove:XV,tween:vV,delay:DV,duration:FV,ease:zV,easeVarying:qV,end:mX,[Symbol.iterator]:Mi[Symbol.iterator]};function bX(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var yX={time:null,delay:0,duration:250,ease:bX};function xX(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function vX(t){var e,r;t instanceof Xi?(e=t._id,t=t._name):(e=vw(),(r=yX).time=X1(),t=t==null?null:t+"");for(var n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],o=s.length,l,c=0;c<o;++c)(l=s[c])&&Dh(l,t,e,c,s,r||xX(l,e));return new Xi(n,this._parents,t,e)}Ac.prototype.interrupt=bV;Ac.prototype.transition=vX;const Lp=Math.PI,Mp=2*Lp,qa=1e-6,kX=Mp-qa;function kw(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function wX(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return kw;const r=10**e;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class TX{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?kw:wX(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,n,i){this._append`Q${+e},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(e,r,n,i,a,s){this._append`C${+e},${+r},${+n},${+i},${this._x1=+a},${this._y1=+s}`}arcTo(e,r,n,i,a){if(e=+e,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let s=this._x1,o=this._y1,l=n-e,c=i-r,u=s-e,h=o-r,d=u*u+h*h;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(d>qa)if(!(Math.abs(h*l-c*u)>qa)||!a)this._append`L${this._x1=e},${this._y1=r}`;else{let f=n-s,p=i-o,m=l*l+c*c,y=f*f+p*p,b=Math.sqrt(m),v=Math.sqrt(d),C=a*Math.tan((Lp-Math.acos((m+d-y)/(2*b*v)))/2),E=C/v,_=C/b;Math.abs(E-1)>qa&&this._append`L${e+E*u},${r+E*h}`,this._append`A${a},${a},0,0,${+(h*f>u*p)},${this._x1=e+_*l},${this._y1=r+_*c}`}}arc(e,r,n,i,a,s){if(e=+e,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(i),l=n*Math.sin(i),c=e+o,u=r+l,h=1^s,d=s?i-a:a-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>qa||Math.abs(this._y1-u)>qa)&&this._append`L${c},${u}`,n&&(d<0&&(d=d%Mp+Mp),d>kX?this._append`A${n},${n},0,1,${h},${e-o},${r-l}A${n},${n},0,1,${h},${this._x1=c},${this._y1=u}`:d>qa&&this._append`A${n},${n},0,${+(d>=Lp)},${h},${this._x1=e+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(e,r,n,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function ja(t){return function(){return t}}const CX=Math.abs,SX=Math.atan2,_X=Math.cos,EX=Math.max,AX=Math.min,NX=Math.sin,LX=Math.sqrt,Ip=1e-12,Oh=Math.PI,Rp=Oh/2,MX=2*Oh;function IX(t){return t>1?0:t<-1?Oh:Math.acos(t)}function RX(t){return t>=1?Rp:t<=-1?-Rp:Math.asin(t)}function ww(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);e=n}return t},()=>new TX(e)}function Tw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Cw(t){this._context=t}Cw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function _0(t){return new Cw(t)}function BX(t){return t[0]}function DX(t){return t[1]}function Sw(t,e){var r=ja(!0),n=null,i=_0,a=null,s=ww(o);t=typeof t=="function"?t:t===void 0?BX:ja(t),e=typeof e=="function"?e:e===void 0?DX:ja(e);function o(l){var c,u=(l=Tw(l)).length,h,d=!1,f;for(n==null&&(a=i(f=s())),c=0;c<=u;++c)!(c<u&&r(h=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(h,c,l),+e(h,c,l));if(f)return a=null,f+""||null}return o.x=function(l){return arguments.length?(t=typeof l=="function"?l:ja(+l),o):t},o.y=function(l){return arguments.length?(e=typeof l=="function"?l:ja(+l),o):e},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:ja(!!l),o):r},o.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),o):i},o.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),o):n},o}class _w{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}function Ew(t){return new _w(t,!0)}function Aw(t){return new _w(t,!1)}function Ta(){}function E0(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function Ph(t){this._context=t}Ph.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:E0(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:E0(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Hl(t){return new Ph(t)}function Nw(t){this._context=t}Nw.prototype={areaStart:Ta,areaEnd:Ta,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:E0(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function OX(t){return new Nw(t)}function Lw(t){this._context=t}Lw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:E0(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function PX(t){return new Lw(t)}function Mw(t,e){this._basis=new Ph(t),this._beta=e}Mw.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n=t[0],i=e[0],a=t[r]-n,s=e[r]-i,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*t[o]+(1-this._beta)*(n+l*a),this._beta*e[o]+(1-this._beta)*(i+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const FX=function t(e){function r(n){return e===1?new Ph(n):new Mw(n,e)}return r.beta=function(n){return t(+n)},r}(.85);function A0(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function Z1(t,e){this._context=t,this._k=(1-e)/6}Z1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:A0(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:A0(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Iw=function t(e){function r(n){return new Z1(n,e)}return r.tension=function(n){return t(+n)},r}(0);function J1(t,e){this._context=t,this._k=(1-e)/6}J1.prototype={areaStart:Ta,areaEnd:Ta,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:A0(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $X=function t(e){function r(n){return new J1(n,e)}return r.tension=function(n){return t(+n)},r}(0);function eg(t,e){this._context=t,this._k=(1-e)/6}eg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:A0(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zX=function t(e){function r(n){return new eg(n,e)}return r.tension=function(n){return t(+n)},r}(0);function tg(t,e,r){var n=t._x1,i=t._y1,a=t._x2,s=t._y2;if(t._l01_a>Ip){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Ip){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/u,s=(s*c+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(n,i,a,s,t._x2,t._y2)}function Rw(t,e){this._context=t,this._alpha=e}Rw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:tg(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Bw=function t(e){function r(n){return e?new Rw(n,e):new Z1(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function Dw(t,e){this._context=t,this._alpha=e}Dw.prototype={areaStart:Ta,areaEnd:Ta,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:tg(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const HX=function t(e){function r(n){return e?new Dw(n,e):new J1(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function Ow(t,e){this._context=t,this._alpha=e}Ow.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:tg(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const qX=function t(e){function r(n){return e?new Ow(n,e):new eg(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function Pw(t){this._context=t}Pw.prototype={areaStart:Ta,areaEnd:Ta,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function jX(t){return new Pw(t)}function dx(t){return t<0?-1:1}function fx(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),o=(a*i+s*n)/(n+i);return(dx(a)+dx(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function px(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function cf(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,o=(a-n)/3;t._context.bezierCurveTo(n+o,i+o*e,a-o,s-o*r,a,s)}function N0(t){this._context=t}N0.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:cf(this,this._t0,px(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,cf(this,px(this,r=fx(this,t,e)),r);break;default:cf(this,this._t0,r=fx(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function Fw(t){this._context=new $w(t)}(Fw.prototype=Object.create(N0.prototype)).point=function(t,e){N0.prototype.point.call(this,e,t)};function $w(t){this._context=t}$w.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}};function zw(t){return new N0(t)}function Hw(t){return new Fw(t)}function qw(t){this._context=t}qw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=mx(t),i=mx(e),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[s],e[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function mx(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,s[e]-=n*s[e-1];for(i[r-1]=s[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function jw(t){return new qw(t)}function Fh(t,e){this._context=t,this._t=e}Fh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function Uw(t){return new Fh(t,.5)}function Ww(t){return new Fh(t,0)}function Gw(t){return new Fh(t,1)}function bl(t,e,r){this.k=t,this.x=e,this.y=r}bl.prototype={constructor:bl,scale:function(t){return t===1?this:new bl(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new bl(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};bl.prototype;var Yw=w(t=>{var i;const{securityLevel:e}=Bt();let r=At("body");if(e==="sandbox"){const s=((i=At(`#i${t}`).node())==null?void 0:i.contentDocument)??document;r=At(s.body)}return r.select(`#${t}`)},"selectSvgElement");function rg(t){return typeof t>"u"||t===null}w(rg,"isNothing");function Vw(t){return typeof t=="object"&&t!==null}w(Vw,"isObject");function Xw(t){return Array.isArray(t)?t:rg(t)?[]:[t]}w(Xw,"toArray");function Kw(t,e){var r,n,i,a;if(e)for(a=Object.keys(e),r=0,n=a.length;r<n;r+=1)i=a[r],t[i]=e[i];return t}w(Kw,"extend");function Qw(t,e){var r="",n;for(n=0;n<e;n+=1)r+=t;return r}w(Qw,"repeat");function Zw(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}w(Zw,"isNegativeZero");var UX=rg,WX=Vw,GX=Xw,YX=Qw,VX=Zw,XX=Kw,fr={isNothing:UX,isObject:WX,toArray:GX,repeat:YX,isNegativeZero:VX,extend:XX};function ng(t,e){var r="",n=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
470
+
471
+ `+t.mark.snippet),n+" "+r):n}w(ng,"formatError");function bo(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=ng(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}w(bo,"YAMLException$1");bo.prototype=Object.create(Error.prototype);bo.prototype.constructor=bo;bo.prototype.toString=w(function(e){return this.name+": "+ng(this,e)},"toString");var cn=bo;function Ru(t,e,r,n,i){var a="",s="",o=Math.floor(i/2)-1;return n-e>o&&(a=" ... ",e=n-o+a.length),r-n>o&&(s=" ...",r=n+o-s.length),{str:a+t.slice(e,r).replace(/\t/g,"→")+s,pos:n-e+a.length}}w(Ru,"getLine");function Bu(t,e){return fr.repeat(" ",e-t.length)+t}w(Bu,"padStart");function Jw(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,n=[0],i=[],a,s=-1;a=r.exec(t.buffer);)i.push(a.index),n.push(a.index+a[0].length),t.position<=a.index&&s<0&&(s=n.length-2);s<0&&(s=n.length-1);var o="",l,c,u=Math.min(t.line+e.linesAfter,i.length).toString().length,h=e.maxLength-(e.indent+u+3);for(l=1;l<=e.linesBefore&&!(s-l<0);l++)c=Ru(t.buffer,n[s-l],i[s-l],t.position-(n[s]-n[s-l]),h),o=fr.repeat(" ",e.indent)+Bu((t.line-l+1).toString(),u)+" | "+c.str+`
472
+ `+o;for(c=Ru(t.buffer,n[s],i[s],t.position,h),o+=fr.repeat(" ",e.indent)+Bu((t.line+1).toString(),u)+" | "+c.str+`
473
+ `,o+=fr.repeat("-",e.indent+u+3+c.pos)+`^
474
+ `,l=1;l<=e.linesAfter&&!(s+l>=i.length);l++)c=Ru(t.buffer,n[s+l],i[s+l],t.position-(n[s]-n[s+l]),h),o+=fr.repeat(" ",e.indent)+Bu((t.line+l+1).toString(),u)+" | "+c.str+`
475
+ `;return o.replace(/\n$/,"")}w(Jw,"makeSnippet");var KX=Jw,QX=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],ZX=["scalar","sequence","mapping"];function e8(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(n){e[String(n)]=r})}),e}w(e8,"compileStyleAliases");function t8(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(QX.indexOf(r)===-1)throw new cn('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=e8(e.styleAliases||null),ZX.indexOf(this.kind)===-1)throw new cn('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}w(t8,"Type$1");var Br=t8;function Bp(t,e){var r=[];return t[e].forEach(function(n){var i=r.length;r.forEach(function(a,s){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(i=s)}),r[i]=n}),r}w(Bp,"compileList");function r8(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function n(i){i.multi?(t.multi[i.kind].push(i),t.multi.fallback.push(i)):t[i.kind][i.tag]=t.fallback[i.tag]=i}for(w(n,"collectType"),e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(n);return t}w(r8,"compileMap");function L0(t){return this.extend(t)}w(L0,"Schema$1");L0.prototype.extend=w(function(e){var r=[],n=[];if(e instanceof Br)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new cn("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof Br))throw new cn("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new cn("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new cn("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof Br))throw new cn("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(L0.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=Bp(i,"implicit"),i.compiledExplicit=Bp(i,"explicit"),i.compiledTypeMap=r8(i.compiledImplicit,i.compiledExplicit),i},"extend");var JX=L0,eK=new Br("tag:yaml.org,2002:str",{kind:"scalar",construct:w(function(t){return t!==null?t:""},"construct")}),tK=new Br("tag:yaml.org,2002:seq",{kind:"sequence",construct:w(function(t){return t!==null?t:[]},"construct")}),rK=new Br("tag:yaml.org,2002:map",{kind:"mapping",construct:w(function(t){return t!==null?t:{}},"construct")}),nK=new JX({explicit:[eK,tK,rK]});function n8(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}w(n8,"resolveYamlNull");function i8(){return null}w(i8,"constructYamlNull");function a8(t){return t===null}w(a8,"isNull");var iK=new Br("tag:yaml.org,2002:null",{kind:"scalar",resolve:n8,construct:i8,predicate:a8,represent:{canonical:w(function(){return"~"},"canonical"),lowercase:w(function(){return"null"},"lowercase"),uppercase:w(function(){return"NULL"},"uppercase"),camelcase:w(function(){return"Null"},"camelcase"),empty:w(function(){return""},"empty")},defaultStyle:"lowercase"});function s8(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}w(s8,"resolveYamlBoolean");function o8(t){return t==="true"||t==="True"||t==="TRUE"}w(o8,"constructYamlBoolean");function l8(t){return Object.prototype.toString.call(t)==="[object Boolean]"}w(l8,"isBoolean");var aK=new Br("tag:yaml.org,2002:bool",{kind:"scalar",resolve:s8,construct:o8,predicate:l8,represent:{lowercase:w(function(t){return t?"true":"false"},"lowercase"),uppercase:w(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:w(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"});function c8(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}w(c8,"isHexCode");function u8(t){return 48<=t&&t<=55}w(u8,"isOctCode");function h8(t){return 48<=t&&t<=57}w(h8,"isDecCode");function d8(t){if(t===null)return!1;var e=t.length,r=0,n=!1,i;if(!e)return!1;if(i=t[r],(i==="-"||i==="+")&&(i=t[++r]),i==="0"){if(r+1===e)return!0;if(i=t[++r],i==="b"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(i!=="0"&&i!=="1")return!1;n=!0}return n&&i!=="_"}if(i==="x"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!c8(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}if(i==="o"){for(r++;r<e;r++)if(i=t[r],i!=="_"){if(!u8(t.charCodeAt(r)))return!1;n=!0}return n&&i!=="_"}}if(i==="_")return!1;for(;r<e;r++)if(i=t[r],i!=="_"){if(!h8(t.charCodeAt(r)))return!1;n=!0}return!(!n||i==="_")}w(d8,"resolveYamlInteger");function f8(t){var e=t,r=1,n;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),n=e[0],(n==="-"||n==="+")&&(n==="-"&&(r=-1),e=e.slice(1),n=e[0]),e==="0")return 0;if(n==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}w(f8,"constructYamlInteger");function p8(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!fr.isNegativeZero(t)}w(p8,"isInteger");var sK=new Br("tag:yaml.org,2002:int",{kind:"scalar",resolve:d8,construct:f8,predicate:p8,represent:{binary:w(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:w(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:w(function(t){return t.toString(10)},"decimal"),hexadecimal:w(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),oK=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function m8(t){return!(t===null||!oK.test(t)||t[t.length-1]==="_")}w(m8,"resolveYamlFloat");function g8(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}w(g8,"constructYamlFloat");var lK=/^[-+]?[0-9]+e/;function b8(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(fr.isNegativeZero(t))return"-0.0";return r=t.toString(10),lK.test(r)?r.replace("e",".e"):r}w(b8,"representYamlFloat");function y8(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||fr.isNegativeZero(t))}w(y8,"isFloat");var cK=new Br("tag:yaml.org,2002:float",{kind:"scalar",resolve:m8,construct:g8,predicate:y8,represent:b8,defaultStyle:"lowercase"}),x8=nK.extend({implicit:[iK,aK,sK,cK]}),uK=x8,v8=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),k8=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function w8(t){return t===null?!1:v8.exec(t)!==null||k8.exec(t)!==null}w(w8,"resolveYamlTimestamp");function T8(t){var e,r,n,i,a,s,o,l=0,c=null,u,h,d;if(e=v8.exec(t),e===null&&(e=k8.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],n=+e[2]-1,i=+e[3],!e[4])return new Date(Date.UTC(r,n,i));if(a=+e[4],s=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],h=+(e[11]||0),c=(u*60+h)*6e4,e[9]==="-"&&(c=-c)),d=new Date(Date.UTC(r,n,i,a,s,o,l)),c&&d.setTime(d.getTime()-c),d}w(T8,"constructYamlTimestamp");function C8(t){return t.toISOString()}w(C8,"representYamlTimestamp");var hK=new Br("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:w8,construct:T8,instanceOf:Date,represent:C8});function S8(t){return t==="<<"||t===null}w(S8,"resolveYamlMerge");var dK=new Br("tag:yaml.org,2002:merge",{kind:"scalar",resolve:S8}),ig=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
476
+ \r`;function _8(t){if(t===null)return!1;var e,r,n=0,i=t.length,a=ig;for(r=0;r<i;r++)if(e=a.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;n+=6}return n%8===0}w(_8,"resolveYamlBinary");function E8(t){var e,r,n=t.replace(/[\r\n=]/g,""),i=n.length,a=ig,s=0,o=[];for(e=0;e<i;e++)e%4===0&&e&&(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(n.charAt(e));return r=i%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}w(E8,"constructYamlBinary");function A8(t){var e="",r=0,n,i,a=t.length,s=ig;for(n=0;n<a;n++)n%3===0&&n&&(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]),r=(r<<8)+t[n];return i=a%3,i===0?(e+=s[r>>18&63],e+=s[r>>12&63],e+=s[r>>6&63],e+=s[r&63]):i===2?(e+=s[r>>10&63],e+=s[r>>4&63],e+=s[r<<2&63],e+=s[64]):i===1&&(e+=s[r>>2&63],e+=s[r<<4&63],e+=s[64],e+=s[64]),e}w(A8,"representYamlBinary");function N8(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}w(N8,"isBinary");var fK=new Br("tag:yaml.org,2002:binary",{kind:"scalar",resolve:_8,construct:E8,predicate:N8,represent:A8}),pK=Object.prototype.hasOwnProperty,mK=Object.prototype.toString;function L8(t){if(t===null)return!0;var e=[],r,n,i,a,s,o=t;for(r=0,n=o.length;r<n;r+=1){if(i=o[r],s=!1,mK.call(i)!=="[object Object]")return!1;for(a in i)if(pK.call(i,a))if(!s)s=!0;else return!1;if(!s)return!1;if(e.indexOf(a)===-1)e.push(a);else return!1}return!0}w(L8,"resolveYamlOmap");function M8(t){return t!==null?t:[]}w(M8,"constructYamlOmap");var gK=new Br("tag:yaml.org,2002:omap",{kind:"sequence",resolve:L8,construct:M8}),bK=Object.prototype.toString;function I8(t){if(t===null)return!0;var e,r,n,i,a,s=t;for(a=new Array(s.length),e=0,r=s.length;e<r;e+=1){if(n=s[e],bK.call(n)!=="[object Object]"||(i=Object.keys(n),i.length!==1))return!1;a[e]=[i[0],n[i[0]]]}return!0}w(I8,"resolveYamlPairs");function R8(t){if(t===null)return[];var e,r,n,i,a,s=t;for(a=new Array(s.length),e=0,r=s.length;e<r;e+=1)n=s[e],i=Object.keys(n),a[e]=[i[0],n[i[0]]];return a}w(R8,"constructYamlPairs");var yK=new Br("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:I8,construct:R8}),xK=Object.prototype.hasOwnProperty;function B8(t){if(t===null)return!0;var e,r=t;for(e in r)if(xK.call(r,e)&&r[e]!==null)return!1;return!0}w(B8,"resolveYamlSet");function D8(t){return t!==null?t:{}}w(D8,"constructYamlSet");var vK=new Br("tag:yaml.org,2002:set",{kind:"mapping",resolve:B8,construct:D8}),O8=uK.extend({implicit:[hK,dK],explicit:[fK,gK,yK,vK]}),Ca=Object.prototype.hasOwnProperty,M0=1,P8=2,F8=3,I0=4,uf=1,kK=2,gx=3,wK=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,TK=/[\x85\u2028\u2029]/,CK=/[,\[\]\{\}]/,$8=/^(?:!|!!|![a-z\-]+!)$/i,z8=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Dp(t){return Object.prototype.toString.call(t)}w(Dp,"_class");function Vn(t){return t===10||t===13}w(Vn,"is_EOL");function ya(t){return t===9||t===32}w(ya,"is_WHITE_SPACE");function Yr(t){return t===9||t===32||t===10||t===13}w(Yr,"is_WS_OR_EOL");function Xa(t){return t===44||t===91||t===93||t===123||t===125}w(Xa,"is_FLOW_INDICATOR");function H8(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}w(H8,"fromHexCode");function q8(t){return t===120?2:t===117?4:t===85?8:0}w(q8,"escapedHexLen");function j8(t){return 48<=t&&t<=57?t-48:-1}w(j8,"fromDecimalCode");function Op(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
477
+ `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"…":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}w(Op,"simpleEscapeSequence");function U8(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}w(U8,"charFromCodepoint");var W8=new Array(256),G8=new Array(256);for(Ha=0;Ha<256;Ha++)W8[Ha]=Op(Ha)?1:0,G8[Ha]=Op(Ha);var Ha;function Y8(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||O8,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}w(Y8,"State$1");function ag(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=KX(r),new cn(e,r)}w(ag,"generateError");function Qe(t,e){throw ag(t,e)}w(Qe,"throwError");function nc(t,e){t.onWarning&&t.onWarning.call(null,ag(t,e))}w(nc,"throwWarning");var bx={YAML:w(function(e,r,n){var i,a,s;e.version!==null&&Qe(e,"duplication of %YAML directive"),n.length!==1&&Qe(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&Qe(e,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),s=parseInt(i[2],10),a!==1&&Qe(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=s<2,s!==1&&s!==2&&nc(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:w(function(e,r,n){var i,a;n.length!==2&&Qe(e,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],$8.test(i)||Qe(e,"ill-formed tag handle (first argument) of the TAG directive"),Ca.call(e.tagMap,i)&&Qe(e,'there is a previously declared suffix for "'+i+'" tag handle'),z8.test(a)||Qe(e,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Qe(e,"tag prefix is malformed: "+a)}e.tagMap[i]=a},"handleTagDirective")};function Wi(t,e,r,n){var i,a,s,o;if(e<r){if(o=t.input.slice(e,r),n)for(i=0,a=o.length;i<a;i+=1)s=o.charCodeAt(i),s===9||32<=s&&s<=1114111||Qe(t,"expected valid JSON character");else wK.test(o)&&Qe(t,"the stream contains non-printable characters");t.result+=o}}w(Wi,"captureSegment");function Pp(t,e,r,n){var i,a,s,o;for(fr.isObject(r)||Qe(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(r),s=0,o=i.length;s<o;s+=1)a=i[s],Ca.call(e,a)||(e[a]=r[a],n[a]=!0)}w(Pp,"mergeMappings");function Ka(t,e,r,n,i,a,s,o,l){var c,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),c=0,u=i.length;c<u;c+=1)Array.isArray(i[c])&&Qe(t,"nested arrays are not supported inside keys"),typeof i=="object"&&Dp(i[c])==="[object Object]"&&(i[c]="[object Object]");if(typeof i=="object"&&Dp(i)==="[object Object]"&&(i="[object Object]"),i=String(i),e===null&&(e={}),n==="tag:yaml.org,2002:merge")if(Array.isArray(a))for(c=0,u=a.length;c<u;c+=1)Pp(t,e,a[c],r);else Pp(t,e,a,r);else!t.json&&!Ca.call(r,i)&&Ca.call(e,i)&&(t.line=s||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,Qe(t,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(e,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):e[i]=a,delete r[i];return e}w(Ka,"storeMappingPair");function $h(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Qe(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}w($h,"readLineBreak");function tr(t,e,r){for(var n=0,i=t.input.charCodeAt(t.position);i!==0;){for(;ya(i);)i===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),i=t.input.charCodeAt(++t.position);if(e&&i===35)do i=t.input.charCodeAt(++t.position);while(i!==10&&i!==13&&i!==0);if(Vn(i))for($h(t),i=t.input.charCodeAt(t.position),n++,t.lineIndent=0;i===32;)t.lineIndent++,i=t.input.charCodeAt(++t.position);else break}return r!==-1&&n!==0&&t.lineIndent<r&&nc(t,"deficient indentation"),n}w(tr,"skipSeparationSpace");function Nc(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Yr(r)))}w(Nc,"testDocumentSeparator");function zh(t,e){e===1?t.result+=" ":e>1&&(t.result+=fr.repeat(`
478
+ `,e-1))}w(zh,"writeFoldedLines");function V8(t,e,r){var n,i,a,s,o,l,c,u,h=t.kind,d=t.result,f;if(f=t.input.charCodeAt(t.position),Yr(f)||Xa(f)||f===35||f===38||f===42||f===33||f===124||f===62||f===39||f===34||f===37||f===64||f===96||(f===63||f===45)&&(i=t.input.charCodeAt(t.position+1),Yr(i)||r&&Xa(i)))return!1;for(t.kind="scalar",t.result="",a=s=t.position,o=!1;f!==0;){if(f===58){if(i=t.input.charCodeAt(t.position+1),Yr(i)||r&&Xa(i))break}else if(f===35){if(n=t.input.charCodeAt(t.position-1),Yr(n))break}else{if(t.position===t.lineStart&&Nc(t)||r&&Xa(f))break;if(Vn(f))if(l=t.line,c=t.lineStart,u=t.lineIndent,tr(t,!1,-1),t.lineIndent>=e){o=!0,f=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=l,t.lineStart=c,t.lineIndent=u;break}}o&&(Wi(t,a,s,!1),zh(t,t.line-l),a=s=t.position,o=!1),ya(f)||(s=t.position+1),f=t.input.charCodeAt(++t.position)}return Wi(t,a,s,!1),t.result?!0:(t.kind=h,t.result=d,!1)}w(V8,"readPlainScalar");function X8(t,e){var r,n,i;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,n=i=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Wi(t,n,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)n=t.position,t.position++,i=t.position;else return!0;else Vn(r)?(Wi(t,n,i,!0),zh(t,tr(t,!1,e)),n=i=t.position):t.position===t.lineStart&&Nc(t)?Qe(t,"unexpected end of the document within a single quoted scalar"):(t.position++,i=t.position);Qe(t,"unexpected end of the stream within a single quoted scalar")}w(X8,"readSingleQuotedScalar");function K8(t,e){var r,n,i,a,s,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return Wi(t,r,t.position,!0),t.position++,!0;if(o===92){if(Wi(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),Vn(o))tr(t,!1,e);else if(o<256&&W8[o])t.result+=G8[o],t.position++;else if((s=q8(o))>0){for(i=s,a=0;i>0;i--)o=t.input.charCodeAt(++t.position),(s=H8(o))>=0?a=(a<<4)+s:Qe(t,"expected hexadecimal character");t.result+=U8(a),t.position++}else Qe(t,"unknown escape sequence");r=n=t.position}else Vn(o)?(Wi(t,r,n,!0),zh(t,tr(t,!1,e)),r=n=t.position):t.position===t.lineStart&&Nc(t)?Qe(t,"unexpected end of the document within a double quoted scalar"):(t.position++,n=t.position)}Qe(t,"unexpected end of the stream within a double quoted scalar")}w(K8,"readDoubleQuotedScalar");function Q8(t,e){var r=!0,n,i,a,s=t.tag,o,l=t.anchor,c,u,h,d,f,p=Object.create(null),m,y,b,v;if(v=t.input.charCodeAt(t.position),v===91)u=93,f=!1,o=[];else if(v===123)u=125,f=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),v=t.input.charCodeAt(++t.position);v!==0;){if(tr(t,!0,e),v=t.input.charCodeAt(t.position),v===u)return t.position++,t.tag=s,t.anchor=l,t.kind=f?"mapping":"sequence",t.result=o,!0;r?v===44&&Qe(t,"expected the node content, but found ','"):Qe(t,"missed comma between flow collection entries"),y=m=b=null,h=d=!1,v===63&&(c=t.input.charCodeAt(t.position+1),Yr(c)&&(h=d=!0,t.position++,tr(t,!0,e))),n=t.line,i=t.lineStart,a=t.position,cs(t,e,M0,!1,!0),y=t.tag,m=t.result,tr(t,!0,e),v=t.input.charCodeAt(t.position),(d||t.line===n)&&v===58&&(h=!0,v=t.input.charCodeAt(++t.position),tr(t,!0,e),cs(t,e,M0,!1,!0),b=t.result),f?Ka(t,o,p,y,m,b,n,i,a):h?o.push(Ka(t,null,p,y,m,b,n,i,a)):o.push(m),tr(t,!0,e),v=t.input.charCodeAt(t.position),v===44?(r=!0,v=t.input.charCodeAt(++t.position)):r=!1}Qe(t,"unexpected end of the stream within a flow collection")}w(Q8,"readFlowCollection");function Z8(t,e){var r,n,i=uf,a=!1,s=!1,o=e,l=0,c=!1,u,h;if(h=t.input.charCodeAt(t.position),h===124)n=!1;else if(h===62)n=!0;else return!1;for(t.kind="scalar",t.result="";h!==0;)if(h=t.input.charCodeAt(++t.position),h===43||h===45)uf===i?i=h===43?gx:kK:Qe(t,"repeat of a chomping mode identifier");else if((u=j8(h))>=0)u===0?Qe(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Qe(t,"repeat of an indentation width identifier"):(o=e+u-1,s=!0);else break;if(ya(h)){do h=t.input.charCodeAt(++t.position);while(ya(h));if(h===35)do h=t.input.charCodeAt(++t.position);while(!Vn(h)&&h!==0)}for(;h!==0;){for($h(t),t.lineIndent=0,h=t.input.charCodeAt(t.position);(!s||t.lineIndent<o)&&h===32;)t.lineIndent++,h=t.input.charCodeAt(++t.position);if(!s&&t.lineIndent>o&&(o=t.lineIndent),Vn(h)){l++;continue}if(t.lineIndent<o){i===gx?t.result+=fr.repeat(`
479
+ `,a?1+l:l):i===uf&&a&&(t.result+=`
480
+ `);break}for(n?ya(h)?(c=!0,t.result+=fr.repeat(`
481
+ `,a?1+l:l)):c?(c=!1,t.result+=fr.repeat(`
482
+ `,l+1)):l===0?a&&(t.result+=" "):t.result+=fr.repeat(`
483
+ `,l):t.result+=fr.repeat(`
484
+ `,a?1+l:l),a=!0,s=!0,l=0,r=t.position;!Vn(h)&&h!==0;)h=t.input.charCodeAt(++t.position);Wi(t,r,t.position,!1)}return!0}w(Z8,"readBlockScalar");function Fp(t,e){var r,n=t.tag,i=t.anchor,a=[],s,o=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=a),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Qe(t,"tab characters must not be used in indentation")),!(l!==45||(s=t.input.charCodeAt(t.position+1),!Yr(s))));){if(o=!0,t.position++,tr(t,!0,-1)&&t.lineIndent<=e){a.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,cs(t,e,F8,!1,!0),a.push(t.result),tr(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)Qe(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return o?(t.tag=n,t.anchor=i,t.kind="sequence",t.result=a,!0):!1}w(Fp,"readBlockSequence");function J8(t,e,r){var n,i,a,s,o,l,c=t.tag,u=t.anchor,h={},d=Object.create(null),f=null,p=null,m=null,y=!1,b=!1,v;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),v=t.input.charCodeAt(t.position);v!==0;){if(!y&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Qe(t,"tab characters must not be used in indentation")),n=t.input.charCodeAt(t.position+1),a=t.line,(v===63||v===58)&&Yr(n))v===63?(y&&(Ka(t,h,d,f,p,null,s,o,l),f=p=m=null),b=!0,y=!0,i=!0):y?(y=!1,i=!0):Qe(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,v=n;else{if(s=t.line,o=t.lineStart,l=t.position,!cs(t,r,P8,!1,!0))break;if(t.line===a){for(v=t.input.charCodeAt(t.position);ya(v);)v=t.input.charCodeAt(++t.position);if(v===58)v=t.input.charCodeAt(++t.position),Yr(v)||Qe(t,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(Ka(t,h,d,f,p,null,s,o,l),f=p=m=null),b=!0,y=!1,i=!1,f=t.tag,p=t.result;else if(b)Qe(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=c,t.anchor=u,!0}else if(b)Qe(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=c,t.anchor=u,!0}if((t.line===a||t.lineIndent>e)&&(y&&(s=t.line,o=t.lineStart,l=t.position),cs(t,e,I0,!0,i)&&(y?p=t.result:m=t.result),y||(Ka(t,h,d,f,p,m,s,o,l),f=p=m=null),tr(t,!0,-1),v=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&v!==0)Qe(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return y&&Ka(t,h,d,f,p,null,s,o,l),b&&(t.tag=c,t.anchor=u,t.kind="mapping",t.result=h),b}w(J8,"readBlockMapping");function eT(t){var e,r=!1,n=!1,i,a,s;if(s=t.input.charCodeAt(t.position),s!==33)return!1;if(t.tag!==null&&Qe(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),s===60?(r=!0,s=t.input.charCodeAt(++t.position)):s===33?(n=!0,i="!!",s=t.input.charCodeAt(++t.position)):i="!",e=t.position,r){do s=t.input.charCodeAt(++t.position);while(s!==0&&s!==62);t.position<t.length?(a=t.input.slice(e,t.position),s=t.input.charCodeAt(++t.position)):Qe(t,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Yr(s);)s===33&&(n?Qe(t,"tag suffix cannot contain exclamation marks"):(i=t.input.slice(e-1,t.position+1),$8.test(i)||Qe(t,"named tag handle cannot contain such characters"),n=!0,e=t.position+1)),s=t.input.charCodeAt(++t.position);a=t.input.slice(e,t.position),CK.test(a)&&Qe(t,"tag suffix cannot contain flow indicator characters")}a&&!z8.test(a)&&Qe(t,"tag name cannot contain such characters: "+a);try{a=decodeURIComponent(a)}catch{Qe(t,"tag name is malformed: "+a)}return r?t.tag=a:Ca.call(t.tagMap,i)?t.tag=t.tagMap[i]+a:i==="!"?t.tag="!"+a:i==="!!"?t.tag="tag:yaml.org,2002:"+a:Qe(t,'undeclared tag handle "'+i+'"'),!0}w(eT,"readTagProperty");function tT(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Qe(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Yr(r)&&!Xa(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Qe(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}w(tT,"readAnchorProperty");function rT(t){var e,r,n;if(n=t.input.charCodeAt(t.position),n!==42)return!1;for(n=t.input.charCodeAt(++t.position),e=t.position;n!==0&&!Yr(n)&&!Xa(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&Qe(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),Ca.call(t.anchorMap,r)||Qe(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],tr(t,!0,-1),!0}w(rT,"readAlias");function cs(t,e,r,n,i){var a,s,o,l=1,c=!1,u=!1,h,d,f,p,m,y;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,a=s=o=I0===r||F8===r,n&&tr(t,!0,-1)&&(c=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;eT(t)||tT(t);)tr(t,!0,-1)?(c=!0,o=a,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):o=!1;if(o&&(o=c||i),(l===1||I0===r)&&(M0===r||P8===r?m=e:m=e+1,y=t.position-t.lineStart,l===1?o&&(Fp(t,y)||J8(t,y,m))||Q8(t,m)?u=!0:(s&&Z8(t,m)||X8(t,m)||K8(t,m)?u=!0:rT(t)?(u=!0,(t.tag!==null||t.anchor!==null)&&Qe(t,"alias node should not have any properties")):V8(t,m,M0===r)&&(u=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(u=o&&Fp(t,y))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Qe(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),h=0,d=t.implicitTypes.length;h<d;h+=1)if(p=t.implicitTypes[h],p.resolve(t.result)){t.result=p.construct(t.result),t.tag=p.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(Ca.call(t.typeMap[t.kind||"fallback"],t.tag))p=t.typeMap[t.kind||"fallback"][t.tag];else for(p=null,f=t.typeMap.multi[t.kind||"fallback"],h=0,d=f.length;h<d;h+=1)if(t.tag.slice(0,f[h].tag.length)===f[h].tag){p=f[h];break}p||Qe(t,"unknown tag !<"+t.tag+">"),t.result!==null&&p.kind!==t.kind&&Qe(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+p.kind+'", not "'+t.kind+'"'),p.resolve(t.result,t.tag)?(t.result=p.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Qe(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||u}w(cs,"composeNode");function nT(t){var e=t.position,r,n,i,a=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(tr(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(a=!0,s=t.input.charCodeAt(++t.position),r=t.position;s!==0&&!Yr(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(r,t.position),i=[],n.length<1&&Qe(t,"directive name must not be less than one character in length");s!==0;){for(;ya(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!Vn(s));break}if(Vn(s))break;for(r=t.position;s!==0&&!Yr(s);)s=t.input.charCodeAt(++t.position);i.push(t.input.slice(r,t.position))}s!==0&&$h(t),Ca.call(bx,n)?bx[n](t,n,i):nc(t,'unknown document directive "'+n+'"')}if(tr(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,tr(t,!0,-1)):a&&Qe(t,"directives end mark is expected"),cs(t,t.lineIndent-1,I0,!1,!0),tr(t,!0,-1),t.checkLineBreaks&&TK.test(t.input.slice(e,t.position))&&nc(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Nc(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,tr(t,!0,-1));return}if(t.position<t.length-1)Qe(t,"end of the stream or a document separator is expected");else return}w(nT,"readDocument");function sg(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
485
+ `),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new Y8(t,e),n=t.indexOf("\0");for(n!==-1&&(r.position=n,Qe(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)nT(r);return r.documents}w(sg,"loadDocuments");function SK(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var n=sg(t,r);if(typeof e!="function")return n;for(var i=0,a=n.length;i<a;i+=1)e(n[i])}w(SK,"loadAll$1");function iT(t,e){var r=sg(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new cn("expected a single document in the stream, but found more")}}w(iT,"load$1");var _K=iT,EK={load:_K},aT=Object.prototype.toString,sT=Object.prototype.hasOwnProperty,og=65279,AK=9,ic=10,NK=13,LK=32,MK=33,IK=34,$p=35,RK=37,BK=38,DK=39,OK=42,oT=44,PK=45,R0=58,FK=61,$K=62,zK=63,HK=64,lT=91,cT=93,qK=96,uT=123,jK=124,hT=125,Fr={};Fr[0]="\\0";Fr[7]="\\a";Fr[8]="\\b";Fr[9]="\\t";Fr[10]="\\n";Fr[11]="\\v";Fr[12]="\\f";Fr[13]="\\r";Fr[27]="\\e";Fr[34]='\\"';Fr[92]="\\\\";Fr[133]="\\N";Fr[160]="\\_";Fr[8232]="\\L";Fr[8233]="\\P";var UK=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],WK=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function dT(t,e){var r,n,i,a,s,o,l;if(e===null)return{};for(r={},n=Object.keys(e),i=0,a=n.length;i<a;i+=1)s=n[i],o=String(e[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),l=t.compiledTypeMap.fallback[s],l&&sT.call(l.styleAliases,o)&&(o=l.styleAliases[o]),r[s]=o;return r}w(dT,"compileStyleMap");function fT(t){var e,r,n;if(e=t.toString(16).toUpperCase(),t<=255)r="x",n=2;else if(t<=65535)r="u",n=4;else if(t<=4294967295)r="U",n=8;else throw new cn("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+fr.repeat("0",n-e.length)+e}w(fT,"encodeHex");var GK=1,ac=2;function pT(t){this.schema=t.schema||O8,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=fr.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=dT(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?ac:GK,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}w(pT,"State");function zp(t,e){for(var r=fr.repeat(" ",e),n=0,i=-1,a="",s,o=t.length;n<o;)i=t.indexOf(`
486
+ `,n),i===-1?(s=t.slice(n),n=o):(s=t.slice(n,i+1),n=i+1),s.length&&s!==`
487
+ `&&(a+=r),a+=s;return a}w(zp,"indentString");function B0(t,e){return`
488
+ `+fr.repeat(" ",t.indent*e)}w(B0,"generateNextLine");function mT(t,e){var r,n,i;for(r=0,n=t.implicitTypes.length;r<n;r+=1)if(i=t.implicitTypes[r],i.resolve(e))return!0;return!1}w(mT,"testImplicitResolving");function sc(t){return t===LK||t===AK}w(sc,"isWhitespace");function yo(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==og||65536<=t&&t<=1114111}w(yo,"isPrintable");function Hp(t){return yo(t)&&t!==og&&t!==NK&&t!==ic}w(Hp,"isNsCharOrWhitespace");function qp(t,e,r){var n=Hp(t),i=n&&!sc(t);return(r?n:n&&t!==oT&&t!==lT&&t!==cT&&t!==uT&&t!==hT)&&t!==$p&&!(e===R0&&!i)||Hp(e)&&!sc(e)&&t===$p||e===R0&&i}w(qp,"isPlainSafe");function gT(t){return yo(t)&&t!==og&&!sc(t)&&t!==PK&&t!==zK&&t!==R0&&t!==oT&&t!==lT&&t!==cT&&t!==uT&&t!==hT&&t!==$p&&t!==BK&&t!==OK&&t!==MK&&t!==jK&&t!==FK&&t!==$K&&t!==DK&&t!==IK&&t!==RK&&t!==HK&&t!==qK}w(gT,"isPlainSafeFirst");function bT(t){return!sc(t)&&t!==R0}w(bT,"isPlainSafeLast");function Hs(t,e){var r=t.charCodeAt(e),n;return r>=55296&&r<=56319&&e+1<t.length&&(n=t.charCodeAt(e+1),n>=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}w(Hs,"codePointAt");function lg(t){var e=/^\n* /;return e.test(t)}w(lg,"needIndentIndicator");var yT=1,jp=2,xT=3,vT=4,Os=5;function kT(t,e,r,n,i,a,s,o){var l,c=0,u=null,h=!1,d=!1,f=n!==-1,p=-1,m=gT(Hs(t,0))&&bT(Hs(t,t.length-1));if(e||s)for(l=0;l<t.length;c>=65536?l+=2:l++){if(c=Hs(t,l),!yo(c))return Os;m=m&&qp(c,u,o),u=c}else{for(l=0;l<t.length;c>=65536?l+=2:l++){if(c=Hs(t,l),c===ic)h=!0,f&&(d=d||l-p-1>n&&t[p+1]!==" ",p=l);else if(!yo(c))return Os;m=m&&qp(c,u,o),u=c}d=d||f&&l-p-1>n&&t[p+1]!==" "}return!h&&!d?m&&!s&&!i(t)?yT:a===ac?Os:jp:r>9&&lg(t)?Os:s?a===ac?Os:jp:d?vT:xT}w(kT,"chooseScalarStyle");function wT(t,e,r,n,i){t.dump=function(){if(e.length===0)return t.quotingType===ac?'""':"''";if(!t.noCompatMode&&(UK.indexOf(e)!==-1||WK.test(e)))return t.quotingType===ac?'"'+e+'"':"'"+e+"'";var a=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),o=n||t.flowLevel>-1&&r>=t.flowLevel;function l(c){return mT(t,c)}switch(w(l,"testAmbiguity"),kT(e,o,t.indent,s,l,t.quotingType,t.forceQuotes&&!n,i)){case yT:return e;case jp:return"'"+e.replace(/'/g,"''")+"'";case xT:return"|"+Up(e,t.indent)+Wp(zp(e,a));case vT:return">"+Up(e,t.indent)+Wp(zp(TT(e,s),a));case Os:return'"'+CT(e)+'"';default:throw new cn("impossible error: invalid scalar style")}}()}w(wT,"writeScalar");function Up(t,e){var r=lg(t)?String(e):"",n=t[t.length-1]===`
489
+ `,i=n&&(t[t.length-2]===`
490
+ `||t===`
491
+ `),a=i?"+":n?"":"-";return r+a+`
492
+ `}w(Up,"blockHeader");function Wp(t){return t[t.length-1]===`
493
+ `?t.slice(0,-1):t}w(Wp,"dropEndingNewline");function TT(t,e){for(var r=/(\n+)([^\n]*)/g,n=function(){var c=t.indexOf(`
494
+ `);return c=c!==-1?c:t.length,r.lastIndex=c,Gp(t.slice(0,c),e)}(),i=t[0]===`
495
+ `||t[0]===" ",a,s;s=r.exec(t);){var o=s[1],l=s[2];a=l[0]===" ",n+=o+(!i&&!a&&l!==""?`
496
+ `:"")+Gp(l,e),i=a}return n}w(TT,"foldString");function Gp(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,n,i=0,a,s=0,o=0,l="";n=r.exec(t);)o=n.index,o-i>e&&(a=s>i?s:o,l+=`
497
+ `+t.slice(i,a),i=a+1),s=o;return l+=`
498
+ `,t.length-i>e&&s>i?l+=t.slice(i,s)+`
499
+ `+t.slice(s+1):l+=t.slice(i),l.slice(1)}w(Gp,"foldLine");function CT(t){for(var e="",r=0,n,i=0;i<t.length;r>=65536?i+=2:i++)r=Hs(t,i),n=Fr[r],!n&&yo(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||fT(r);return e}w(CT,"escapeString");function ST(t,e,r){var n="",i=t.tag,a,s,o;for(a=0,s=r.length;a<s;a+=1)o=r[a],t.replacer&&(o=t.replacer.call(r,String(a),o)),(gi(t,e,o,!1,!1)||typeof o>"u"&&gi(t,e,null,!1,!1))&&(n!==""&&(n+=","+(t.condenseFlow?"":" ")),n+=t.dump);t.tag=i,t.dump="["+n+"]"}w(ST,"writeFlowSequence");function Yp(t,e,r,n){var i="",a=t.tag,s,o,l;for(s=0,o=r.length;s<o;s+=1)l=r[s],t.replacer&&(l=t.replacer.call(r,String(s),l)),(gi(t,e+1,l,!0,!0,!1,!0)||typeof l>"u"&&gi(t,e+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=B0(t,e)),t.dump&&ic===t.dump.charCodeAt(0)?i+="-":i+="- ",i+=t.dump);t.tag=a,t.dump=i||"[]"}w(Yp,"writeBlockSequence");function _T(t,e,r){var n="",i=t.tag,a=Object.keys(r),s,o,l,c,u;for(s=0,o=a.length;s<o;s+=1)u="",n!==""&&(u+=", "),t.condenseFlow&&(u+='"'),l=a[s],c=r[l],t.replacer&&(c=t.replacer.call(r,l,c)),gi(t,e,l,!1,!1)&&(t.dump.length>1024&&(u+="? "),u+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),gi(t,e,c,!1,!1)&&(u+=t.dump,n+=u));t.tag=i,t.dump="{"+n+"}"}w(_T,"writeFlowMapping");function ET(t,e,r,n){var i="",a=t.tag,s=Object.keys(r),o,l,c,u,h,d;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new cn("sortKeys must be a boolean or a function");for(o=0,l=s.length;o<l;o+=1)d="",(!n||i!=="")&&(d+=B0(t,e)),c=s[o],u=r[c],t.replacer&&(u=t.replacer.call(r,c,u)),gi(t,e+1,c,!0,!0,!0)&&(h=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,h&&(t.dump&&ic===t.dump.charCodeAt(0)?d+="?":d+="? "),d+=t.dump,h&&(d+=B0(t,e)),gi(t,e+1,u,!0,h)&&(t.dump&&ic===t.dump.charCodeAt(0)?d+=":":d+=": ",d+=t.dump,i+=d));t.tag=a,t.dump=i||"{}"}w(ET,"writeBlockMapping");function Vp(t,e,r){var n,i,a,s,o,l;for(i=r?t.explicitTypes:t.implicitTypes,a=0,s=i.length;a<s;a+=1)if(o=i[a],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof e=="object"&&e instanceof o.instanceOf)&&(!o.predicate||o.predicate(e))){if(r?o.multi&&o.representName?t.tag=o.representName(e):t.tag=o.tag:t.tag="?",o.represent){if(l=t.styleMap[o.tag]||o.defaultStyle,aT.call(o.represent)==="[object Function]")n=o.represent(e,l);else if(sT.call(o.represent,l))n=o.represent[l](e,l);else throw new cn("!<"+o.tag+'> tag resolver accepts not "'+l+'" style');t.dump=n}return!0}return!1}w(Vp,"detectType");function gi(t,e,r,n,i,a,s){t.tag=null,t.dump=r,Vp(t,r,!1)||Vp(t,r,!0);var o=aT.call(t.dump),l=n,c;n&&(n=t.flowLevel<0||t.flowLevel>e);var u=o==="[object Object]"||o==="[object Array]",h,d;if(u&&(h=t.duplicates.indexOf(r),d=h!==-1),(t.tag!==null&&t.tag!=="?"||d||t.indent!==2&&e>0)&&(i=!1),d&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(u&&d&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),o==="[object Object]")n&&Object.keys(t.dump).length!==0?(ET(t,e,t.dump,i),d&&(t.dump="&ref_"+h+t.dump)):(_T(t,e,t.dump),d&&(t.dump="&ref_"+h+" "+t.dump));else if(o==="[object Array]")n&&t.dump.length!==0?(t.noArrayIndent&&!s&&e>0?Yp(t,e-1,t.dump,i):Yp(t,e,t.dump,i),d&&(t.dump="&ref_"+h+t.dump)):(ST(t,e,t.dump),d&&(t.dump="&ref_"+h+" "+t.dump));else if(o==="[object String]")t.tag!=="?"&&wT(t,t.dump,e,a,l);else{if(o==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new cn("unacceptable kind of an object to dump "+o)}t.tag!==null&&t.tag!=="?"&&(c=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",t.dump=c+" "+t.dump)}return!0}w(gi,"writeNode");function AT(t,e){var r=[],n=[],i,a;for(D0(t,r,n),i=0,a=n.length;i<a;i+=1)e.duplicates.push(r[n[i]]);e.usedDuplicates=new Array(a)}w(AT,"getDuplicateReferences");function D0(t,e,r){var n,i,a;if(t!==null&&typeof t=="object")if(i=e.indexOf(t),i!==-1)r.indexOf(i)===-1&&r.push(i);else if(e.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)D0(t[i],e,r);else for(n=Object.keys(t),i=0,a=n.length;i<a;i+=1)D0(t[n[i]],e,r)}w(D0,"inspectNode");function YK(t,e){e=e||{};var r=new pT(e);r.noRefs||AT(t,r);var n=t;return r.replacer&&(n=r.replacer.call({"":n},"",n)),gi(r,0,n,!0,!0)?r.dump+`
500
+ `:""}w(YK,"dump$1");function VK(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}w(VK,"renamed");var NT=x8,LT=EK.load;/*! Bundled license information:
501
+
502
+ js-yaml/dist/js-yaml.mjs:
503
+ (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
504
+ */var Mr={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},yx={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function yl(t,e){if(t===void 0||e===void 0)return{angle:0,deltaX:0,deltaY:0};t=Yt(t),e=Yt(e);const[r,n]=[t.x,t.y],[i,a]=[e.x,e.y],s=i-r,o=a-n;return{angle:Math.atan(o/s),deltaX:s,deltaY:o}}w(yl,"calculateDeltaAndAngle");var Yt=w(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),MT=w(t=>({x:w(function(e,r,n){let i=0;const a=Yt(n[0]).x<Yt(n[n.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Mr,t.arrowTypeStart)){const{angle:f,deltaX:p}=yl(n[0],n[1]);i=Mr[t.arrowTypeStart]*Math.cos(f)*(p>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Mr,t.arrowTypeEnd)){const{angle:f,deltaX:p}=yl(n[n.length-1],n[n.length-2]);i=Mr[t.arrowTypeEnd]*Math.cos(f)*(p>=0?1:-1)}const s=Math.abs(Yt(e).x-Yt(n[n.length-1]).x),o=Math.abs(Yt(e).y-Yt(n[n.length-1]).y),l=Math.abs(Yt(e).x-Yt(n[0]).x),c=Math.abs(Yt(e).y-Yt(n[0]).y),u=Mr[t.arrowTypeStart],h=Mr[t.arrowTypeEnd],d=1;if(s<h&&s>0&&o<h){let f=h+d-s;f*=a==="right"?-1:1,i-=f}if(l<u&&l>0&&c<u){let f=u+d-l;f*=a==="right"?-1:1,i+=f}return Yt(e).x+i},"x"),y:w(function(e,r,n){let i=0;const a=Yt(n[0]).y<Yt(n[n.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Mr,t.arrowTypeStart)){const{angle:f,deltaY:p}=yl(n[0],n[1]);i=Mr[t.arrowTypeStart]*Math.abs(Math.sin(f))*(p>=0?1:-1)}else if(r===n.length-1&&Object.hasOwn(Mr,t.arrowTypeEnd)){const{angle:f,deltaY:p}=yl(n[n.length-1],n[n.length-2]);i=Mr[t.arrowTypeEnd]*Math.abs(Math.sin(f))*(p>=0?1:-1)}const s=Math.abs(Yt(e).y-Yt(n[n.length-1]).y),o=Math.abs(Yt(e).x-Yt(n[n.length-1]).x),l=Math.abs(Yt(e).y-Yt(n[0]).y),c=Math.abs(Yt(e).x-Yt(n[0]).x),u=Mr[t.arrowTypeStart],h=Mr[t.arrowTypeEnd],d=1;if(s<h&&s>0&&o<h){let f=h+d-s;f*=a==="up"?-1:1,i-=f}if(l<u&&l>0&&c<u){let f=u+d-l;f*=a==="up"?-1:1,i+=f}return Yt(e).y+i},"y")}),"getLineFunctionsWithOffset"),Hh=w(({flowchart:t})=>{var i,a;const e=((i=t==null?void 0:t.subGraphTitleMargin)==null?void 0:i.top)??0,r=((a=t==null?void 0:t.subGraphTitleMargin)==null?void 0:a.bottom)??0,n=e+r;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins"),XK=w(t=>{const{handDrawnSeed:e}=Bt();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),Do=w(t=>{const e=KK([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),KK=w(t=>{const e=new Map;return t.forEach(r=>{const[n,i]=r.split(":");e.set(n.trim(),i==null?void 0:i.trim())}),e},"styles2Map"),cg=w(t=>t==="color"||t==="font-size"||t==="font-family"||t==="font-weight"||t==="font-style"||t==="text-decoration"||t==="text-align"||t==="text-transform"||t==="line-height"||t==="letter-spacing"||t==="word-spacing"||t==="text-shadow"||t==="text-overflow"||t==="white-space"||t==="word-wrap"||t==="word-break"||t==="overflow-wrap"||t==="hyphens","isLabelStyle"),ze=w(t=>{const{stylesArray:e}=Do(t),r=[],n=[],i=[],a=[];return e.forEach(s=>{const o=s[0];cg(o)?r.push(s.join(":")+" !important"):(n.push(s.join(":")+" !important"),o.includes("stroke")&&i.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),je=w((t,e)=>{var l;const{themeVariables:r,handDrawnSeed:n}=Bt(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:s}=Do(t);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||i,seed:n,strokeWidth:((l=s.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:QK(s.get("stroke-dasharray"))},e)},"userNodeOverrides"),QK=w(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(e.length===1){const i=isNaN(e[0])?0:e[0];return[i,i]}const r=isNaN(e[0])?0:e[0],n=isNaN(e[1])?0:e[1];return[r,n]},"getStrokeDashArray"),ug={},xr={};Object.defineProperty(xr,"__esModule",{value:!0});xr.BLANK_URL=xr.relativeFirstCharacters=xr.whitespaceEscapeCharsRegex=xr.urlSchemeRegex=xr.ctrlCharactersRegex=xr.htmlCtrlEntityRegex=xr.htmlEntitiesRegex=xr.invalidProtocolRegex=void 0;xr.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;xr.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;xr.htmlCtrlEntityRegex=/&(newline|tab);/gi;xr.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;xr.urlSchemeRegex=/^.+(:|&colon;)/gim;xr.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;xr.relativeFirstCharacters=[".","/"];xr.BLANK_URL="about:blank";Object.defineProperty(ug,"__esModule",{value:!0});exports.sanitizeUrl_1=ug.sanitizeUrl=void 0;var Lr=xr;function ZK(t){return Lr.relativeFirstCharacters.indexOf(t[0])>-1}function JK(t){var e=t.replace(Lr.ctrlCharactersRegex,"");return e.replace(Lr.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}function eQ(t){return URL.canParse(t)}function xx(t){try{return decodeURIComponent(t)}catch{return t}}function tQ(t){if(!t)return Lr.BLANK_URL;var e,r=xx(t.trim());do r=JK(r).replace(Lr.htmlCtrlEntityRegex,"").replace(Lr.ctrlCharactersRegex,"").replace(Lr.whitespaceEscapeCharsRegex,"").trim(),r=xx(r),e=r.match(Lr.ctrlCharactersRegex)||r.match(Lr.htmlEntitiesRegex)||r.match(Lr.htmlCtrlEntityRegex)||r.match(Lr.whitespaceEscapeCharsRegex);while(e&&e.length>0);var n=r;if(!n)return Lr.BLANK_URL;if(ZK(n))return n;var i=n.trimStart(),a=i.match(Lr.urlSchemeRegex);if(!a)return n;var s=a[0].toLowerCase().trim();if(Lr.invalidProtocolRegex.test(s))return Lr.BLANK_URL;var o=i.replace(/\\/g,"/");if(s==="mailto:"||s.includes("://"))return o;if(s==="http:"||s==="https:"){if(!eQ(o))return Lr.BLANK_URL;var l=new URL(o);return l.protocol=l.protocol.toLowerCase(),l.hostname=l.hostname.toLowerCase(),l.toString()}return o}exports.sanitizeUrl_1=ug.sanitizeUrl=tQ;var IT=typeof global=="object"&&global&&global.Object===Object&&global,rQ=typeof self=="object"&&self&&self.Object===Object&&self,Si=IT||rQ||Function("return this")(),oc=Si.Symbol,RT=Object.prototype,nQ=RT.hasOwnProperty,iQ=RT.toString,rl=oc?oc.toStringTag:void 0;function aQ(t){var e=nQ.call(t,rl),r=t[rl];try{t[rl]=void 0;var n=!0}catch{}var i=iQ.call(t);return n&&(e?t[rl]=r:delete t[rl]),i}var sQ=Object.prototype,oQ=sQ.toString;function lQ(t){return oQ.call(t)}var cQ="[object Null]",uQ="[object Undefined]",vx=oc?oc.toStringTag:void 0;function vs(t){return t==null?t===void 0?uQ:cQ:vx&&vx in Object(t)?aQ(t):lQ(t)}function Na(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var hQ="[object AsyncFunction]",dQ="[object Function]",fQ="[object GeneratorFunction]",pQ="[object Proxy]";function qh(t){if(!Na(t))return!1;var e=vs(t);return e==dQ||e==fQ||e==hQ||e==pQ}var hf=Si["__core-js_shared__"],kx=function(){var t=/[^.]+$/.exec(hf&&hf.keys&&hf.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function mQ(t){return!!kx&&kx in t}var gQ=Function.prototype,bQ=gQ.toString;function ks(t){if(t!=null){try{return bQ.call(t)}catch{}try{return t+""}catch{}}return""}var yQ=/[\\^$.*+?()[\]{}|]/g,xQ=/^\[object .+?Constructor\]$/,vQ=Function.prototype,kQ=Object.prototype,wQ=vQ.toString,TQ=kQ.hasOwnProperty,CQ=RegExp("^"+wQ.call(TQ).replace(yQ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function SQ(t){if(!Na(t)||mQ(t))return!1;var e=qh(t)?CQ:xQ;return e.test(ks(t))}function _Q(t,e){return t==null?void 0:t[e]}function ws(t,e){var r=_Q(t,e);return SQ(r)?r:void 0}var lc=ws(Object,"create");function EQ(){this.__data__=lc?lc(null):{},this.size=0}function AQ(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var NQ="__lodash_hash_undefined__",LQ=Object.prototype,MQ=LQ.hasOwnProperty;function IQ(t){var e=this.__data__;if(lc){var r=e[t];return r===NQ?void 0:r}return MQ.call(e,t)?e[t]:void 0}var RQ=Object.prototype,BQ=RQ.hasOwnProperty;function DQ(t){var e=this.__data__;return lc?e[t]!==void 0:BQ.call(e,t)}var OQ="__lodash_hash_undefined__";function PQ(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=lc&&e===void 0?OQ:e,this}function us(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}us.prototype.clear=EQ;us.prototype.delete=AQ;us.prototype.get=IQ;us.prototype.has=DQ;us.prototype.set=PQ;function FQ(){this.__data__=[],this.size=0}function Lc(t,e){return t===e||t!==t&&e!==e}function jh(t,e){for(var r=t.length;r--;)if(Lc(t[r][0],e))return r;return-1}var $Q=Array.prototype,zQ=$Q.splice;function HQ(t){var e=this.__data__,r=jh(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():zQ.call(e,r,1),--this.size,!0}function qQ(t){var e=this.__data__,r=jh(e,t);return r<0?void 0:e[r][1]}function jQ(t){return jh(this.__data__,t)>-1}function UQ(t,e){var r=this.__data__,n=jh(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function Ji(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ji.prototype.clear=FQ;Ji.prototype.delete=HQ;Ji.prototype.get=qQ;Ji.prototype.has=jQ;Ji.prototype.set=UQ;var cc=ws(Si,"Map");function WQ(){this.size=0,this.__data__={hash:new us,map:new(cc||Ji),string:new us}}function GQ(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Uh(t,e){var r=t.__data__;return GQ(e)?r[typeof e=="string"?"string":"hash"]:r.map}function YQ(t){var e=Uh(this,t).delete(t);return this.size-=e?1:0,e}function VQ(t){return Uh(this,t).get(t)}function XQ(t){return Uh(this,t).has(t)}function KQ(t,e){var r=Uh(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function ea(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ea.prototype.clear=WQ;ea.prototype.delete=YQ;ea.prototype.get=VQ;ea.prototype.has=XQ;ea.prototype.set=KQ;var QQ="Expected a function";function Oo(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(QQ);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(Oo.Cache||ea),r}Oo.Cache=ea;function ZQ(){this.__data__=new Ji,this.size=0}function JQ(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function eZ(t){return this.__data__.get(t)}function tZ(t){return this.__data__.has(t)}var rZ=200;function nZ(t,e){var r=this.__data__;if(r instanceof Ji){var n=r.__data__;if(!cc||n.length<rZ-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ea(n)}return r.set(t,e),this.size=r.size,this}function Ts(t){var e=this.__data__=new Ji(t);this.size=e.size}Ts.prototype.clear=ZQ;Ts.prototype.delete=JQ;Ts.prototype.get=eZ;Ts.prototype.has=tZ;Ts.prototype.set=nZ;var O0=function(){try{var t=ws(Object,"defineProperty");return t({},"",{}),t}catch{}}();function Wh(t,e,r){e=="__proto__"&&O0?O0(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Xp(t,e,r){(r!==void 0&&!Lc(t[e],r)||r===void 0&&!(e in t))&&Wh(t,e,r)}function iZ(t){return function(e,r,n){for(var i=-1,a=Object(e),s=n(e),o=s.length;o--;){var l=s[++i];if(r(a[l],l,a)===!1)break}return e}}var BT=iZ(),DT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wx=DT&&typeof module=="object"&&module&&!module.nodeType&&module,aZ=wx&&wx.exports===DT,Tx=aZ?Si.Buffer:void 0,Cx=Tx?Tx.allocUnsafe:void 0;function OT(t,e){if(e)return t.slice();var r=t.length,n=Cx?Cx(r):new t.constructor(r);return t.copy(n),n}var Kp=Si.Uint8Array;function PT(t){var e=new t.constructor(t.byteLength);return new Kp(e).set(new Kp(t)),e}function FT(t,e){var r=e?PT(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function $T(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var Sx=Object.create,sZ=function(){function t(){}return function(e){if(!Na(e))return{};if(Sx)return Sx(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function zT(t,e){return function(r){return t(e(r))}}var hg=zT(Object.getPrototypeOf,Object),oZ=Object.prototype;function Gh(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||oZ;return t===r}function HT(t){return typeof t.constructor=="function"&&!Gh(t)?sZ(hg(t)):{}}function Po(t){return t!=null&&typeof t=="object"}var lZ="[object Arguments]";function _x(t){return Po(t)&&vs(t)==lZ}var qT=Object.prototype,cZ=qT.hasOwnProperty,uZ=qT.propertyIsEnumerable,uc=_x(function(){return arguments}())?_x:function(t){return Po(t)&&cZ.call(t,"callee")&&!uZ.call(t,"callee")},hc=Array.isArray,hZ=9007199254740991;function dg(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=hZ}function Mc(t){return t!=null&&dg(t.length)&&!qh(t)}function jT(t){return Po(t)&&Mc(t)}function dZ(){return!1}var UT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ex=UT&&typeof module=="object"&&module&&!module.nodeType&&module,fZ=Ex&&Ex.exports===UT,Ax=fZ?Si.Buffer:void 0,pZ=Ax?Ax.isBuffer:void 0,Yh=pZ||dZ,mZ="[object Object]",gZ=Function.prototype,bZ=Object.prototype,WT=gZ.toString,yZ=bZ.hasOwnProperty,xZ=WT.call(Object);function vZ(t){if(!Po(t)||vs(t)!=mZ)return!1;var e=hg(t);if(e===null)return!0;var r=yZ.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&WT.call(r)==xZ}var kZ="[object Arguments]",wZ="[object Array]",TZ="[object Boolean]",CZ="[object Date]",SZ="[object Error]",_Z="[object Function]",EZ="[object Map]",AZ="[object Number]",NZ="[object Object]",LZ="[object RegExp]",MZ="[object Set]",IZ="[object String]",RZ="[object WeakMap]",BZ="[object ArrayBuffer]",DZ="[object DataView]",OZ="[object Float32Array]",PZ="[object Float64Array]",FZ="[object Int8Array]",$Z="[object Int16Array]",zZ="[object Int32Array]",HZ="[object Uint8Array]",qZ="[object Uint8ClampedArray]",jZ="[object Uint16Array]",UZ="[object Uint32Array]",qt={};qt[OZ]=qt[PZ]=qt[FZ]=qt[$Z]=qt[zZ]=qt[HZ]=qt[qZ]=qt[jZ]=qt[UZ]=!0;qt[kZ]=qt[wZ]=qt[BZ]=qt[TZ]=qt[DZ]=qt[CZ]=qt[SZ]=qt[_Z]=qt[EZ]=qt[AZ]=qt[NZ]=qt[LZ]=qt[MZ]=qt[IZ]=qt[RZ]=!1;function WZ(t){return Po(t)&&dg(t.length)&&!!qt[vs(t)]}function GT(t){return function(e){return t(e)}}var YT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ql=YT&&typeof module=="object"&&module&&!module.nodeType&&module,GZ=ql&&ql.exports===YT,df=GZ&&IT.process,Qp=function(){try{var t=ql&&ql.require&&ql.require("util").types;return t||df&&df.binding&&df.binding("util")}catch{}}(),Nx=Qp&&Qp.isTypedArray,Vh=Nx?GT(Nx):WZ;function Zp(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var YZ=Object.prototype,VZ=YZ.hasOwnProperty;function VT(t,e,r){var n=t[e];(!(VZ.call(t,e)&&Lc(n,r))||r===void 0&&!(e in t))&&Wh(t,e,r)}function XT(t,e,r,n){var i=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var o=e[a],l=void 0;l===void 0&&(l=t[o]),i?Wh(r,o,l):VT(r,o,l)}return r}function XZ(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var KZ=9007199254740991,QZ=/^(?:0|[1-9]\d*)$/;function fg(t,e){var r=typeof t;return e=e??KZ,!!e&&(r=="number"||r!="symbol"&&QZ.test(t))&&t>-1&&t%1==0&&t<e}var ZZ=Object.prototype,JZ=ZZ.hasOwnProperty;function KT(t,e){var r=hc(t),n=!r&&uc(t),i=!r&&!n&&Yh(t),a=!r&&!n&&!i&&Vh(t),s=r||n||i||a,o=s?XZ(t.length,String):[],l=o.length;for(var c in t)(e||JZ.call(t,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||fg(c,l)))&&o.push(c);return o}function eJ(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var tJ=Object.prototype,rJ=tJ.hasOwnProperty;function nJ(t){if(!Na(t))return eJ(t);var e=Gh(t),r=[];for(var n in t)n=="constructor"&&(e||!rJ.call(t,n))||r.push(n);return r}function pg(t){return Mc(t)?KT(t,!0):nJ(t)}function iJ(t){return XT(t,pg(t))}function aJ(t,e,r,n,i,a,s){var o=Zp(t,r),l=Zp(e,r),c=s.get(l);if(c){Xp(t,r,c);return}var u=a?a(o,l,r+"",t,e,s):void 0,h=u===void 0;if(h){var d=hc(l),f=!d&&Yh(l),p=!d&&!f&&Vh(l);u=l,d||f||p?hc(o)?u=o:jT(o)?u=$T(o):f?(h=!1,u=OT(l,!0)):p?(h=!1,u=FT(l,!0)):u=[]:vZ(l)||uc(l)?(u=o,uc(o)?u=iJ(o):(!Na(o)||qh(o))&&(u=HT(l))):h=!1}h&&(s.set(l,u),i(u,l,n,a,s),s.delete(l)),Xp(t,r,u)}function QT(t,e,r,n,i){t!==e&&BT(e,function(a,s){if(i||(i=new Ts),Na(a))aJ(t,e,s,r,QT,n,i);else{var o=n?n(Zp(t,s),a,s+"",t,e,i):void 0;o===void 0&&(o=a),Xp(t,s,o)}},pg)}function mg(t){return t}function sJ(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var Lx=Math.max;function ZT(t,e,r){return e=Lx(e===void 0?t.length-1:e,0),function(){for(var n=arguments,i=-1,a=Lx(n.length-e,0),s=Array(a);++i<a;)s[i]=n[e+i];i=-1;for(var o=Array(e+1);++i<e;)o[i]=n[i];return o[e]=r(s),sJ(t,this,o)}}function JT(t){return function(){return t}}var oJ=O0?function(t,e){return O0(t,"toString",{configurable:!0,enumerable:!1,value:JT(e),writable:!0})}:mg,lJ=800,cJ=16,uJ=Date.now;function hJ(t){var e=0,r=0;return function(){var n=uJ(),i=cJ-(n-r);if(r=n,i>0){if(++e>=lJ)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var e7=hJ(oJ);function t7(t,e){return e7(ZT(t,e,mg),t+"")}function r7(t,e,r){if(!Na(r))return!1;var n=typeof e;return(n=="number"?Mc(r)&&fg(e,r.length):n=="string"&&e in r)?Lc(r[e],t):!1}function dJ(t){return t7(function(e,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(i--,a):void 0,s&&r7(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var o=r[n];o&&t(e,o,n,a)}return e})}var n7=dJ(function(t,e,r){QT(t,e,r)}),i7="​",fJ={curveBasis:Hl,curveBasisClosed:OX,curveBasisOpen:PX,curveBumpX:Ew,curveBumpY:Aw,curveBundle:FX,curveCardinalClosed:$X,curveCardinalOpen:zX,curveCardinal:Iw,curveCatmullRomClosed:HX,curveCatmullRomOpen:qX,curveCatmullRom:Bw,curveLinear:_0,curveLinearClosed:jX,curveMonotoneX:zw,curveMonotoneY:Hw,curveNatural:jw,curveStep:Uw,curveStepAfter:Gw,curveStepBefore:Ww},pJ=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,mJ=w(function(t,e){const r=a7(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const s=r.map(o=>o.args);m0(s),n=lr(n,[...s])}else n=r.args;if(!n)return;let i=O1(t,e);const a="config";return n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a]),n},"detectInit"),a7=w(function(t,e=null){var r,n;try{const i=new RegExp(`[%]{2}(?![{]${pJ.source})(?=[}][%]{2}).*
505
+ `,"ig");t=t.trim().replace(i,"").replace(/'/gm,'"'),he.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let a;const s=[];for(;(a=$l.exec(t))!==null;)if(a.index===$l.lastIndex&&$l.lastIndex++,a&&!e||e&&((r=a[1])!=null&&r.match(e))||e&&((n=a[2])!=null&&n.match(e))){const o=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;s.push({type:o,args:l})}return s.length===0?{type:t,args:null}:s.length===1?s[0]:s}catch(i){return he.error(`ERROR: ${i.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),gJ=w(function(t){return t.replace($l,"")},"removeDirectives"),bJ=w(function(t,e){for(const[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray");function gg(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return fJ[r]??e}w(gg,"interpolateToCurve");function s7(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?exports.sanitizeUrl_1(r):r}w(s7,"formatUrl");var yJ=w((t,...e)=>{const r=t.split("."),n=r.length-1,i=r[n];let a=window;for(let s=0;s<n;s++)if(a=a[r[s]],!a){he.error(`Function name: ${t} not found in window`);return}a[i](...e)},"runFunc");function bg(t,e){return!t||!e?0:Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}w(bg,"distance");function o7(t){let e,r=0;t.forEach(i=>{r+=bg(i,e),e=i});const n=r/2;return yg(t,n)}w(o7,"traverseEdge");function l7(t){return t.length===1?t[0]:o7(t)}w(l7,"calcLabelPosition");var Mx=w((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),yg=w((t,e)=>{let r,n=e;for(const i of t){if(r){const a=bg(i,r);if(a===0)return r;if(a<n)n-=a;else{const s=n/a;if(s<=0)return r;if(s>=1)return{x:i.x,y:i.y};if(s>0&&s<1)return{x:Mx((1-s)*r.x+s*i.x,5),y:Mx((1-s)*r.y+s*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),xJ=w((t,e,r)=>{he.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=yg(e,25),a=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(e[0].x+i.x)/2,o.y=-Math.cos(s)*a+(e[0].y+i.y)/2,o},"calcCardinalityPosition");function c7(t,e,r){const n=structuredClone(r);he.info("our points",n),e!=="start_left"&&e!=="start_right"&&n.reverse();const i=25+t,a=yg(n,i),s=10+t*.5,o=Math.atan2(n[0].y-a.y,n[0].x-a.x),l={x:0,y:0};return e==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(n[0].y+a.y)/2):e==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(n[0].y+a.y)/2-5):e==="end_left"?(l.x=Math.sin(o)*s+(n[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(n[0].x+a.x)/2,l.y=-Math.cos(o)*s+(n[0].y+a.y)/2),l}w(c7,"calcTerminalLabelPosition");function xg(t){let e="",r="";for(const n of t)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}w(xg,"getStylesFromArray");var Ix=0,u7=w(()=>(Ix++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Ix),"generateId");function h7(t){let e="";const r="0123456789abcdef",n=r.length;for(let i=0;i<t;i++)e+=r.charAt(Math.floor(Math.random()*n));return e}w(h7,"makeRandomHex");var d7=w(t=>h7(t.length),"random"),vJ=w(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),kJ=w(function(t,e){const r=e.text.replace(xs.lineBreakRegex," "),[,n]=Ic(e.fontSize),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",n),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);const a=i.append("tspan");return a.attr("x",e.x+e.textMargin*2),a.attr("fill",e.fill),a.text(r),i},"drawSimpleText"),f7=Oo((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),xs.lineBreakRegex.test(t)))return t;const n=t.split(" ").filter(Boolean),i=[];let a="";return n.forEach((s,o)=>{const l=bi(`${s} `,r),c=bi(a,r);if(l>e){const{hyphenatedStrings:d,remainingWord:f}=wJ(s,e,"-",r);i.push(a,...d),a=f}else c+l>=e?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),wJ=Oo((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=[...t],a=[];let s="";return i.forEach((o,l)=>{const c=`${s}${o}`;if(bi(c,n)>=e){const h=l+1,d=i.length===h,f=`${c}${r}`;a.push(d?c:f),s=""}else s=c}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);function vg(t,e){return kg(t,e).height}w(vg,"calculateTextHeight");function bi(t,e){return kg(t,e).width}w(bi,"calculateTextWidth");var kg=Oo((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=e;if(!t)return{width:0,height:0};const[,a]=Ic(r),s=["sans-serif",n],o=t.split(xs.lineBreakRegex),l=[],c=At("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const u=c.append("svg");for(const d of s){let f=0;const p={width:0,height:0,lineHeight:0};for(const m of o){const y=vJ();y.text=m||i7;const b=kJ(u,y).style("font-size",a).style("font-weight",i).style("font-family",d),v=(b._groups||b)[0][0].getBBox();if(v.width===0&&v.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,v.width)),f=Math.round(v.height),p.height+=f,p.lineHeight=Math.round(Math.max(p.lineHeight,f))}l.push(p)}u.remove();const h=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[h]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),no,TJ=(no=class{constructor(e=!1,r){this.count=0,this.count=r?r.length:0,this.next=e?()=>this.count++:()=>Date.now()}},w(no,"InitIDGenerator"),no),uu,CJ=w(function(t){return uu=uu||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),uu.innerHTML=t,unescape(uu.textContent)},"entityDecode");function wg(t){return"str"in t}w(wg,"isDetailedError");var SJ=w((t,e,r,n)=>{var a;if(!n)return;const i=(a=t.node())==null?void 0:a.getBBox();i&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),Ic=w(t=>{if(typeof t=="number")return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function Xh(t,e){return n7({},t,e)}w(Xh,"cleanAndMerge");var Bn={assignWithDepth:lr,wrapLabel:f7,calculateTextHeight:vg,calculateTextWidth:bi,calculateTextDimensions:kg,cleanAndMerge:Xh,detectInit:mJ,detectDirective:a7,isSubstringInArray:bJ,interpolateToCurve:gg,calcLabelPosition:l7,calcCardinalityPosition:xJ,calcTerminalLabelPosition:c7,formatUrl:s7,getStylesFromArray:xg,generateId:u7,random:d7,runFunc:yJ,entityDecode:CJ,insertTitle:SJ,isLabelCoordinateInPath:p7,parseFontSize:Ic,InitIDGenerator:TJ},_J=w(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"}),e},"encodeEntities"),La=w(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),EJ=w((t,e,{counter:r=0,prefix:n,suffix:i},a)=>a||`${n?`${n}_`:""}${t}_${e}_${r}${i?`_${i}`:""}`,"getEdgeId");function Dr(t){return t??null}w(Dr,"handleUndefinedAttr");function p7(t,e){const r=Math.round(t.x),n=Math.round(t.y),i=e.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return i.includes(r.toString())||i.includes(n.toString())}w(p7,"isLabelCoordinateInPath");const AJ=Object.freeze({left:0,top:0,width:16,height:16}),P0=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),m7=Object.freeze({...AJ,...P0}),NJ=Object.freeze({...m7,body:"",hidden:!1}),LJ=Object.freeze({width:null,height:null}),MJ=Object.freeze({...LJ,...P0}),IJ=(t,e,r,n="")=>{const i=t.split(":");if(t.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const o=i.pop(),l=i.pop(),c={provider:i.length>0?i[0]:n,prefix:l,name:o};return ff(c)?c:null}const a=i[0],s=a.split("-");if(s.length>1){const o={provider:n,prefix:s.shift(),name:s.join("-")};return ff(o)?o:null}if(r&&n===""){const o={provider:n,prefix:"",name:a};return ff(o,r)?o:null}return null},ff=(t,e)=>t?!!((e&&t.prefix===""||t.prefix)&&t.name):!1;function RJ(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const n=((t.rotate||0)+(e.rotate||0))%4;return n&&(r.rotate=n),r}function Rx(t,e){const r=RJ(t,e);for(const n in NJ)n in P0?n in t&&!(n in r)&&(r[n]=P0[n]):n in e?r[n]=e[n]:n in t&&(r[n]=t[n]);return r}function BJ(t,e){const r=t.icons,n=t.aliases||Object.create(null),i=Object.create(null);function a(s){if(r[s])return i[s]=[];if(!(s in i)){i[s]=null;const o=n[s]&&n[s].parent,l=o&&a(o);l&&(i[s]=[o].concat(l))}return i[s]}return(e||Object.keys(r).concat(Object.keys(n))).forEach(a),i}function Bx(t,e,r){const n=t.icons,i=t.aliases||Object.create(null);let a={};function s(o){a=Rx(n[o]||i[o],a)}return s(e),r.forEach(s),Rx(t,a)}function DJ(t,e){if(t.icons[e])return Bx(t,e,[]);const r=BJ(t,[e])[e];return r?Bx(t,e,r):null}const OJ=/(-?[0-9.]*[0-9]+[0-9.]*)/g,PJ=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Dx(t,e,r){if(e===1)return t;if(r=r||100,typeof t=="number")return Math.ceil(t*e*r)/r;if(typeof t!="string")return t;const n=t.split(OJ);if(n===null||!n.length)return t;const i=[];let a=n.shift(),s=PJ.test(a);for(;;){if(s){const o=parseFloat(a);isNaN(o)?i.push(a):i.push(Math.ceil(o*e*r)/r)}else i.push(a);if(a=n.shift(),a===void 0)return i.join("");s=!s}}function FJ(t,e="defs"){let r="";const n=t.indexOf("<"+e);for(;n>=0;){const i=t.indexOf(">",n),a=t.indexOf("</"+e);if(i===-1||a===-1)break;const s=t.indexOf(">",a);if(s===-1)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}function $J(t,e){return t?"<defs>"+t+"</defs>"+e:e}function zJ(t,e,r){const n=FJ(t);return $J(n.defs,e+n.content+r)}const HJ=t=>t==="unset"||t==="undefined"||t==="none";function qJ(t,e){const r={...m7,...t},n={...MJ,...e},i={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,n].forEach(m=>{const y=[],b=m.hFlip,v=m.vFlip;let C=m.rotate;b?v?C+=2:(y.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),y.push("scale(-1 1)"),i.top=i.left=0):v&&(y.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),y.push("scale(1 -1)"),i.top=i.left=0);let E;switch(C<0&&(C-=Math.floor(C/4)*4),C=C%4,C){case 1:E=i.height/2+i.top,y.unshift("rotate(90 "+E.toString()+" "+E.toString()+")");break;case 2:y.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:E=i.width/2+i.left,y.unshift("rotate(-90 "+E.toString()+" "+E.toString()+")");break}C%2===1&&(i.left!==i.top&&(E=i.left,i.left=i.top,i.top=E),i.width!==i.height&&(E=i.width,i.width=i.height,i.height=E)),y.length&&(a=zJ(a,'<g transform="'+y.join(" ")+'">',"</g>"))});const s=n.width,o=n.height,l=i.width,c=i.height;let u,h;s===null?(h=o===null?"1em":o==="auto"?c:o,u=Dx(h,l/c)):(u=s==="auto"?l:s,h=o===null?Dx(u,c/l):o==="auto"?c:o);const d={},f=(m,y)=>{HJ(y)||(d[m]=y.toString())};f("width",u),f("height",h);const p=[i.left,i.top,l,c];return d.viewBox=p.join(" "),{attributes:d,viewBox:p,body:a}}const jJ=/\sid="(\S+)"/g,Ox=new Map;function UJ(t){t=t.replace(/[0-9]+$/,"")||"a";const e=Ox.get(t)||0;return Ox.set(t,e+1),e?`${t}${e}`:t}function WJ(t){const e=[];let r;for(;r=jJ.exec(t);)e.push(r[1]);if(!e.length)return t;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return e.forEach(i=>{const a=UJ(i),s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+n+"$3")}),t=t.replace(new RegExp(n,"g"),""),t}function GJ(t,e){let r=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in e)r+=" "+n+'="'+e[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}function Tg(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Cs=Tg();function g7(t){Cs=t}var jl={exec:()=>null};function Rt(t,e=""){let r=typeof t=="string"?t:t.source,n={replace:(i,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Vr.caret,"$1"),r=r.replace(i,s),n},getRegex:()=>new RegExp(r,e)};return n}var YJ=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Vr={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ 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,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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},VJ=/^(?:[ \t]*(?:\n|$))+/,XJ=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,KJ=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Rc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,QJ=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Cg=/(?:[*+-]|\d{1,9}[.)])/,b7=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,y7=Rt(b7).replace(/bull/g,Cg).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ZJ=Rt(b7).replace(/bull/g,Cg).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Sg=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,JJ=/^[^\n]+/,_g=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,eee=Rt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_g).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),tee=Rt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Cg).getRegex(),Kh="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",Eg=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ree=Rt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Eg).replace("tag",Kh).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),x7=Rt(Sg).replace("hr",Rc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kh).getRegex(),nee=Rt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",x7).getRegex(),Ag={blockquote:nee,code:XJ,def:eee,fences:KJ,heading:QJ,hr:Rc,html:ree,lheading:y7,list:tee,newline:VJ,paragraph:x7,table:jl,text:JJ},Px=Rt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Rc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kh).getRegex(),iee={...Ag,lheading:ZJ,table:Px,paragraph:Rt(Sg).replace("hr",Rc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Px).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Kh).getRegex()},aee={...Ag,html:Rt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Eg).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:jl,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Rt(Sg).replace("hr",Rc).replace("heading",` *#{1,6} *[^
506
+ ]`).replace("lheading",y7).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},see=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,oee=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,v7=/^( {2,}|\\)\n(?!\s*$)/,lee=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Qh=/[\p{P}\p{S}]/u,Ng=/[\s\p{P}\p{S}]/u,k7=/[^\s\p{P}\p{S}]/u,cee=Rt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ng).getRegex(),w7=/(?!~)[\p{P}\p{S}]/u,uee=/(?!~)[\s\p{P}\p{S}]/u,hee=/(?:[^\s\p{P}\p{S}]|~)/u,dee=Rt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",YJ?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),T7=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,fee=Rt(T7,"u").replace(/punct/g,Qh).getRegex(),pee=Rt(T7,"u").replace(/punct/g,w7).getRegex(),C7="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",mee=Rt(C7,"gu").replace(/notPunctSpace/g,k7).replace(/punctSpace/g,Ng).replace(/punct/g,Qh).getRegex(),gee=Rt(C7,"gu").replace(/notPunctSpace/g,hee).replace(/punctSpace/g,uee).replace(/punct/g,w7).getRegex(),bee=Rt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,k7).replace(/punctSpace/g,Ng).replace(/punct/g,Qh).getRegex(),yee=Rt(/\\(punct)/,"gu").replace(/punct/g,Qh).getRegex(),xee=Rt(/^<(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(),vee=Rt(Eg).replace("(?:-->|$)","-->").getRegex(),kee=Rt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",vee).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),F0=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,wee=Rt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",F0).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),S7=Rt(/^!?\[(label)\]\[(ref)\]/).replace("label",F0).replace("ref",_g).getRegex(),_7=Rt(/^!?\[(ref)\](?:\[\])?/).replace("ref",_g).getRegex(),Tee=Rt("reflink|nolink(?!\\()","g").replace("reflink",S7).replace("nolink",_7).getRegex(),Fx=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Lg={_backpedal:jl,anyPunctuation:yee,autolink:xee,blockSkip:dee,br:v7,code:oee,del:jl,emStrongLDelim:fee,emStrongRDelimAst:mee,emStrongRDelimUnd:bee,escape:see,link:wee,nolink:_7,punctuation:cee,reflink:S7,reflinkSearch:Tee,tag:kee,text:lee,url:jl},Cee={...Lg,link:Rt(/^!?\[(label)\]\((.*?)\)/).replace("label",F0).getRegex(),reflink:Rt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",F0).getRegex()},Jp={...Lg,emStrongRDelimAst:gee,emStrongLDelim:pee,url:Rt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Fx).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Rt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Fx).getRegex()},See={...Jp,br:Rt(v7).replace("{2,}","*").getRegex(),text:Rt(Jp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},hu={normal:Ag,gfm:iee,pedantic:aee},nl={normal:Lg,gfm:Jp,breaks:See,pedantic:Cee},_ee={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$x=t=>_ee[t];function ai(t,e){if(e){if(Vr.escapeTest.test(t))return t.replace(Vr.escapeReplace,$x)}else if(Vr.escapeTestNoEncode.test(t))return t.replace(Vr.escapeReplaceNoEncode,$x);return t}function zx(t){try{t=encodeURI(t).replace(Vr.percentDecode,"%")}catch{return null}return t}function Hx(t,e){var a;let r=t.replace(Vr.findPipe,(s,o,l)=>{let c=!1,u=o;for(;--u>=0&&l[u]==="\\";)c=!c;return c?"|":" |"}),n=r.split(Vr.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!((a=n.at(-1))!=null&&a.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;i<n.length;i++)n[i]=n[i].trim().replace(Vr.slashPipe,"|");return n}function il(t,e,r){let n=t.length;if(n===0)return"";let i=0;for(;i<n&&t.charAt(n-i-1)===e;)i++;return t.slice(0,n-i)}function Eee(t,e){if(t.indexOf(e[1])===-1)return-1;let r=0;for(let n=0;n<t.length;n++)if(t[n]==="\\")n++;else if(t[n]===e[0])r++;else if(t[n]===e[1]&&(r--,r<0))return n;return r>0?-2:-1}function qx(t,e,r,n,i){let a=e.href,s=e.title||null,o=t[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let l={type:t[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:n.inlineTokens(o)};return n.state.inLink=!1,l}function Aee(t,e,r){let n=t.match(r.other.indentCodeCompensation);if(n===null)return e;let i=n[1];return e.split(`
507
+ `).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=i.length?a.slice(i.length):a}).join(`
508
+ `)}var $0=class{constructor(e){te(this,"options");te(this,"rules");te(this,"lexer");this.options=e||Cs}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let n=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:il(n,`
509
+ `)}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],i=Aee(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let i=il(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:il(r[0],`
510
+ `)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=il(r[0],`
511
+ `).split(`
512
+ `),i="",a="",s=[];for(;n.length>0;){let o=!1,l=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))l.push(n[c]),o=!0;else if(!o)l.push(n[c]);else break;n=n.slice(c);let u=l.join(`
513
+ `),h=u.replace(this.rules.other.blockquoteSetextReplace,`
514
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
515
+ ${u}`:u,a=a?`${a}
516
+ ${h}`:h;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,s,!0),this.lexer.state.top=d,n.length===0)break;let f=s.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){let p=f,m=p.raw+`
517
+ `+n.join(`
518
+ `),y=this.blockquote(m);s[s.length-1]=y,i=i.substring(0,i.length-p.raw.length)+y.raw,a=a.substring(0,a.length-p.text.length)+y.text;break}else if((f==null?void 0:f.type)==="list"){let p=f,m=p.raw+`
519
+ `+n.join(`
520
+ `),y=this.list(m);s[s.length-1]=y,i=i.substring(0,i.length-f.raw.length)+y.raw,a=a.substring(0,a.length-p.raw.length)+y.raw,n=m.substring(s.at(-1).raw.length).split(`
521
+ `);continue}}return{type:"blockquote",raw:i,tokens:s,text:a}}}list(e){let r=this.rules.block.list.exec(e);if(r){let n=r[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let s=this.rules.other.listItemRegex(n),o=!1;for(;e;){let c=!1,u="",h="";if(!(r=s.exec(e))||this.rules.block.hr.test(e))break;u=r[0],e=e.substring(u.length);let d=r[2].split(`
522
+ `,1)[0].replace(this.rules.other.listReplaceTabs,v=>" ".repeat(3*v.length)),f=e.split(`
523
+ `,1)[0],p=!d.trim(),m=0;if(this.options.pedantic?(m=2,h=d.trimStart()):p?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,h=d.slice(m),m+=r[1].length),p&&this.rules.other.blankLine.test(f)&&(u+=f+`
524
+ `,e=e.substring(f.length+1),c=!0),!c){let v=this.rules.other.nextBulletRegex(m),C=this.rules.other.hrRegex(m),E=this.rules.other.fencesBeginRegex(m),_=this.rules.other.headingBeginRegex(m),k=this.rules.other.htmlBeginRegex(m);for(;e;){let N=e.split(`
525
+ `,1)[0],D;if(f=N,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),D=f):D=f.replace(this.rules.other.tabCharGlobal," "),E.test(f)||_.test(f)||k.test(f)||v.test(f)||C.test(f))break;if(D.search(this.rules.other.nonSpaceChar)>=m||!f.trim())h+=`
526
+ `+D.slice(m);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(d)||_.test(d)||C.test(d))break;h+=`
527
+ `+f}!p&&!f.trim()&&(p=!0),u+=N+`
528
+ `,e=e.substring(N.length+1),d=D.slice(m)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(o=!0));let y=null,b;this.options.gfm&&(y=this.rules.other.listIsTask.exec(h),y&&(b=y[0]!=="[ ] ",h=h.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:u,task:!!y,checked:b,loose:!1,text:h,tokens:[]}),a.raw+=u}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;c<a.items.length;c++)if(this.lexer.state.top=!1,a.items[c].tokens=this.lexer.blockTokens(a.items[c].text,[]),!a.loose){let u=a.items[c].tokens.filter(d=>d.type==="space"),h=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw));a.loose=h}if(a.loose)for(let c=0;c<a.items.length;c++)a.items[c].loose=!0;return a}}html(e){let r=this.rules.block.html.exec(e);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(e){let r=this.rules.block.def.exec(e);if(r){let n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(e){var o;let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=Hx(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(o=r[3])!=null&&o.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
529
+ `):[],s={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let l of i)this.rules.other.tableAlignRight.test(l)?s.align.push("right"):this.rules.other.tableAlignCenter.test(l)?s.align.push("center"):this.rules.other.tableAlignLeft.test(l)?s.align.push("left"):s.align.push(null);for(let l=0;l<n.length;l++)s.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:s.align[l]});for(let l of a)s.rows.push(Hx(l,s.header.length).map((c,u)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:s.align[u]})));return s}}lheading(e){let r=this.rules.block.lheading.exec(e);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===`
530
+ `?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let s=il(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{let s=Eee(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),qx(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[i.toLowerCase()];if(!a){let s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return qx(n,a,n[0],this.lexer,this.rules)}}emStrong(e,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!n||this.rules.inline.punctuation.exec(n))){let a=[...i[0]].length-1,s,o,l=a,c=0,u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,r=r.slice(-1*e.length+a);(i=u.exec(r))!=null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(o=[...s].length,i[3]||i[4]){l+=o;continue}else if((i[5]||i[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let h=[...i[0]][0].length,d=e.slice(0,a+i.index+h+o);if(Math.min(a,o)%2){let p=d.slice(1,-1);return{type:"em",raw:d,text:p,tokens:this.lexer.inlineTokens(p)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),a=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&a&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e){let r=this.rules.inline.del.exec(e);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,i;return r[2]==="@"?(n=r[1],i="mailto:"+n):(n=r[1],i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let r;if(r=this.rules.inline.url.exec(e)){let i,a;if(r[2]==="@")i=r[0],a="mailto:"+i;else{let s;do s=r[0],r[0]=((n=this.rules.inline._backpedal.exec(r[0]))==null?void 0:n[0])??"";while(s!==r[0]);i=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:i,href:a,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},Un=class em{constructor(e){te(this,"tokens");te(this,"options");te(this,"state");te(this,"tokenizer");te(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Cs,this.options.tokenizer=this.options.tokenizer||new $0,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Vr,block:hu.normal,inline:nl.normal};this.options.pedantic?(r.block=hu.pedantic,r.inline=nl.pedantic):this.options.gfm&&(r.block=hu.gfm,this.options.breaks?r.inline=nl.breaks:r.inline=nl.gfm),this.tokenizer.rules=r}static get rules(){return{block:hu,inline:nl}}static lex(e,r){return new em(r).lex(e)}static lexInline(e,r){return new em(r).inlineTokens(e)}lex(e){e=e.replace(Vr.carriageReturn,`
531
+ `),this.blockTokens(e,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let n=this.inlineQueue[r];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,r=[],n=!1){var i,a,s;for(this.options.pedantic&&(e=e.replace(Vr.tabCharGlobal," ").replace(Vr.spaceLine,""));e;){let o;if((a=(i=this.options.extensions)==null?void 0:i.block)!=null&&a.some(c=>(o=c.call({lexer:this},e,r))?(e=e.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(e)){e=e.substring(o.raw.length);let c=r.at(-1);o.raw.length===1&&c!==void 0?c.raw+=`
532
+ `:r.push(o);continue}if(o=this.tokenizer.code(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
533
+ `)?"":`
534
+ `)+o.raw,c.text+=`
535
+ `+o.text,this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(o=this.tokenizer.fences(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
536
+ `)?"":`
537
+ `)+o.raw,c.text+=`
538
+ `+o.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(e)){e=e.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(e)){e=e.substring(o.raw.length),r.push(o);continue}let l=e;if((s=this.options.extensions)!=null&&s.startBlock){let c=1/0,u=e.slice(1),h;this.options.extensions.startBlock.forEach(d=>{h=d.call({lexer:this},u),typeof h=="number"&&h>=0&&(c=Math.min(c,h))}),c<1/0&&c>=0&&(l=e.substring(0,c+1))}if(this.state.top&&(o=this.tokenizer.paragraph(l))){let c=r.at(-1);n&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
539
+ `)?"":`
540
+ `)+o.raw,c.text+=`
541
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o),n=l.length!==e.length,e=e.substring(o.raw.length);continue}if(o=this.tokenizer.text(e)){e=e.substring(o.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
542
+ `)?"":`
543
+ `)+o.raw,c.text+=`
544
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(e,r=[]){return this.inlineQueue.push({src:e,tokens:r}),r}inlineTokens(e,r=[]){var l,c,u,h,d;let n=e,i=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)f.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)a=i[2]?i[2].length:0,n=n.slice(0,i.index+a)+"["+"a".repeat(i[0].length-a-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=((c=(l=this.options.hooks)==null?void 0:l.emStrongMask)==null?void 0:c.call({lexer:this},n))??n;let s=!1,o="";for(;e;){s||(o=""),s=!1;let f;if((h=(u=this.options.extensions)==null?void 0:u.inline)!=null&&h.some(m=>(f=m.call({lexer:this},e,r))?(e=e.substring(f.raw.length),r.push(f),!0):!1))continue;if(f=this.tokenizer.escape(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.tag(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.link(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(f.raw.length);let m=r.at(-1);f.type==="text"&&(m==null?void 0:m.type)==="text"?(m.raw+=f.raw,m.text+=f.text):r.push(f);continue}if(f=this.tokenizer.emStrong(e,n,o)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.codespan(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.br(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.del(e)){e=e.substring(f.raw.length),r.push(f);continue}if(f=this.tokenizer.autolink(e)){e=e.substring(f.raw.length),r.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(e))){e=e.substring(f.raw.length),r.push(f);continue}let p=e;if((d=this.options.extensions)!=null&&d.startInline){let m=1/0,y=e.slice(1),b;this.options.extensions.startInline.forEach(v=>{b=v.call({lexer:this},y),typeof b=="number"&&b>=0&&(m=Math.min(m,b))}),m<1/0&&m>=0&&(p=e.substring(0,m+1))}if(f=this.tokenizer.inlineText(p)){e=e.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(o=f.raw.slice(-1)),s=!0;let m=r.at(-1);(m==null?void 0:m.type)==="text"?(m.raw+=f.raw,m.text+=f.text):r.push(f);continue}if(e){let m="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(m);break}else throw new Error(m)}}return r}},z0=class{constructor(e){te(this,"options");te(this,"parser");this.options=e||Cs}space(e){return""}code({text:e,lang:r,escaped:n}){var s;let i=(s=(r||"").match(Vr.notSpaceStart))==null?void 0:s[0],a=e.replace(Vr.endingNewline,"")+`
545
+ `;return i?'<pre><code class="language-'+ai(i)+'">'+(n?a:ai(a,!0))+`</code></pre>
546
+ `:"<pre><code>"+(n?a:ai(a,!0))+`</code></pre>
547
+ `}blockquote({tokens:e}){return`<blockquote>
548
+ ${this.parser.parse(e)}</blockquote>
549
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`<h${r}>${this.parser.parseInline(e)}</h${r}>
550
+ `}hr(e){return`<hr>
551
+ `}list(e){let r=e.ordered,n=e.start,i="";for(let o=0;o<e.items.length;o++){let l=e.items[o];i+=this.listitem(l)}let a=r?"ol":"ul",s=r&&n!==1?' start="'+n+'"':"";return"<"+a+s+`>
552
+ `+i+"</"+a+`>
553
+ `}listitem(e){var n;let r="";if(e.task){let i=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=i+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=i+" "+ai(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(e.tokens,!!e.loose),`<li>${r}</li>
554
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
555
+ `}table(e){let r="",n="";for(let a=0;a<e.header.length;a++)n+=this.tablecell(e.header[a]);r+=this.tablerow({text:n});let i="";for(let a=0;a<e.rows.length;a++){let s=e.rows[a];n="";for(let o=0;o<s.length;o++)n+=this.tablecell(s[o]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
556
+ <thead>
557
+ `+r+`</thead>
558
+ `+i+`</table>
559
+ `}tablerow({text:e}){return`<tr>
560
+ ${e}</tr>
561
+ `}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+`</${n}>
562
+ `}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>${ai(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:r,tokens:n}){let i=this.parser.parseInline(n),a=zx(e);if(a===null)return i;e=a;let s='<a href="'+e+'"';return r&&(s+=' title="'+ai(r)+'"'),s+=">"+i+"</a>",s}image({href:e,title:r,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let a=zx(e);if(a===null)return ai(n);e=a;let s=`<img src="${e}" alt="${n}"`;return r&&(s+=` title="${ai(r)}"`),s+=">",s}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:ai(e.text)}},Mg=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""}},Wn=class tm{constructor(e){te(this,"options");te(this,"renderer");te(this,"textRenderer");this.options=e||Cs,this.options.renderer=this.options.renderer||new z0,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Mg}static parse(e,r){return new tm(r).parse(e)}static parseInline(e,r){return new tm(r).parseInline(e)}parse(e,r=!0){var i,a;let n="";for(let s=0;s<e.length;s++){let o=e[s];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[o.type]){let c=o,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){n+=u||"";continue}}let l=o;switch(l.type){case"space":{n+=this.renderer.space(l);continue}case"hr":{n+=this.renderer.hr(l);continue}case"heading":{n+=this.renderer.heading(l);continue}case"code":{n+=this.renderer.code(l);continue}case"table":{n+=this.renderer.table(l);continue}case"blockquote":{n+=this.renderer.blockquote(l);continue}case"list":{n+=this.renderer.list(l);continue}case"html":{n+=this.renderer.html(l);continue}case"def":{n+=this.renderer.def(l);continue}case"paragraph":{n+=this.renderer.paragraph(l);continue}case"text":{let c=l,u=this.renderer.text(c);for(;s+1<e.length&&e[s+1].type==="text";)c=e[++s],u+=`
563
+ `+this.renderer.text(c);r?n+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):n+=u;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}parseInline(e,r=this.renderer){var i,a;let n="";for(let s=0;s<e.length;s++){let o=e[s];if((a=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&a[o.type]){let c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){n+=c||"";continue}}let l=o;switch(l.type){case"escape":{n+=r.text(l);break}case"html":{n+=r.html(l);break}case"link":{n+=r.link(l);break}case"image":{n+=r.image(l);break}case"strong":{n+=r.strong(l);break}case"em":{n+=r.em(l);break}case"codespan":{n+=r.codespan(l);break}case"br":{n+=r.br(l);break}case"del":{n+=r.del(l);break}case"text":{n+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return n}},xu,xl=(xu=class{constructor(e){te(this,"options");te(this,"block");this.options=e||Cs}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Un.lex:Un.lexInline}provideParser(){return this.block?Wn.parse:Wn.parseInline}},te(xu,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),te(xu,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),xu),Nee=class{constructor(...e){te(this,"defaults",Tg());te(this,"options",this.setOptions);te(this,"parse",this.parseMarkdown(!0));te(this,"parseInline",this.parseMarkdown(!1));te(this,"Parser",Wn);te(this,"Renderer",z0);te(this,"TextRenderer",Mg);te(this,"Lexer",Un);te(this,"Tokenizer",$0);te(this,"Hooks",xl);this.use(...e)}walkTokens(e,r){var i,a;let n=[];for(let s of e)switch(n=n.concat(r.call(this,s)),s.type){case"table":{let o=s;for(let l of o.header)n=n.concat(this.walkTokens(l.tokens,r));for(let l of o.rows)for(let c of l)n=n.concat(this.walkTokens(c.tokens,r));break}case"list":{let o=s;n=n.concat(this.walkTokens(o.items,r));break}default:{let o=s;(a=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let c=o[l].flat(1/0);n=n.concat(this.walkTokens(c,r))}):o.tokens&&(n=n.concat(this.walkTokens(o.tokens,r)))}}return n}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),i.extensions=r),n.renderer){let a=this.defaults.renderer||new z0(this.defaults);for(let s in n.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=n.renderer[o],c=a[o];a[o]=(...u)=>{let h=l.apply(a,u);return h===!1&&(h=c.apply(a,u)),h||""}}i.renderer=a}if(n.tokenizer){let a=this.defaults.tokenizer||new $0(this.defaults);for(let s in n.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=n.tokenizer[o],c=a[o];a[o]=(...u)=>{let h=l.apply(a,u);return h===!1&&(h=c.apply(a,u)),h}}i.tokenizer=a}if(n.hooks){let a=this.defaults.hooks||new xl;for(let s in n.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,l=n.hooks[o],c=a[o];xl.passThroughHooks.has(s)?a[o]=u=>{if(this.defaults.async&&xl.passThroughHooksRespectAsync.has(s))return(async()=>{let d=await l.call(a,u);return c.call(a,d)})();let h=l.call(a,u);return c.call(a,h)}:a[o]=(...u)=>{if(this.defaults.async)return(async()=>{let d=await l.apply(a,u);return d===!1&&(d=await c.apply(a,u)),d})();let h=l.apply(a,u);return h===!1&&(h=c.apply(a,u)),h}}i.hooks=a}if(n.walkTokens){let a=this.defaults.walkTokens,s=n.walkTokens;i.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return Un.lex(e,r??this.defaults)}parser(e,r){return Wn.parse(e,r??this.defaults)}parseMarkdown(e){return(r,n)=>{let i={...n},a={...this.defaults,...i},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&i.async===!1)return s(new 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 r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=e),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():e?Un.lex:Un.lexInline)(o,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let u=await(a.hooks?await a.hooks.provideParser():e?Wn.parse:Wn.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(u):u})().catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():e?Un.lex:Un.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():e?Wn.parse:Wn.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return s(o)}}}onError(e,r){return n=>{if(n.message+=`
564
+ Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+ai(n.message+"",!0)+"</pre>";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},hs=new Nee;function Dt(t,e){return hs.parse(t,e)}Dt.options=Dt.setOptions=function(t){return hs.setOptions(t),Dt.defaults=hs.defaults,g7(Dt.defaults),Dt};Dt.getDefaults=Tg;Dt.defaults=Cs;Dt.use=function(...t){return hs.use(...t),Dt.defaults=hs.defaults,g7(Dt.defaults),Dt};Dt.walkTokens=function(t,e){return hs.walkTokens(t,e)};Dt.parseInline=hs.parseInline;Dt.Parser=Wn;Dt.parser=Wn.parse;Dt.Renderer=z0;Dt.TextRenderer=Mg;Dt.Lexer=Un;Dt.lexer=Un.lex;Dt.Tokenizer=$0;Dt.Hooks=xl;Dt.parse=Dt;Dt.options;Dt.setOptions;Dt.use;Dt.walkTokens;Dt.parseInline;Wn.parse;Un.lex;function E7(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Array.from(typeof t=="string"?[t]:t);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var i=n.reduce(function(o,l){var c=l.match(/\n([\t ]+|(?!\s).)/g);return c?o.concat(c.map(function(u){var h,d;return(d=(h=u.match(/[\t ]/g))===null||h===void 0?void 0:h.length)!==null&&d!==void 0?d:0})):o},[]);if(i.length){var a=new RegExp(`
565
+ [ ]{`+Math.min.apply(Math,i)+"}","g");n=n.map(function(o){return o.replace(a,`
566
+ `)})}n[0]=n[0].replace(/^\r?\n/,"");var s=n[0];return e.forEach(function(o,l){var c=s.match(/(?:^|\n)( *)$/),u=c?c[1]:"",h=o;typeof o=="string"&&o.includes(`
567
+ `)&&(h=String(o).split(`
568
+ `).map(function(d,f){return f===0?d:""+u+d}).join(`
569
+ `)),s+=h+n[l+1]}),s}var A7={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},rm=new Map,N7=new Map,L7=w(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(he.debug("Registering icon pack:",e.name),"loader"in e)N7.set(e.name,e.loader);else if("icons"in e)rm.set(e.name,e.icons);else throw he.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),M7=w(async(t,e)=>{const r=IJ(t,!0,e!==void 0);if(!r)throw new Error(`Invalid icon name: ${t}`);const n=r.prefix||e;if(!n)throw new Error(`Icon name must contain a prefix: ${t}`);let i=rm.get(n);if(!i){const s=N7.get(n);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await s(),prefix:n},rm.set(n,i)}catch(o){throw he.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=DJ(i,r.name);if(!a)throw new Error(`Icon not found: ${t}`);return a},"getRegisteredIconData"),Lee=w(async t=>{try{return await M7(t),!0}catch{return!1}},"isIconAvailable"),Fo=w(async(t,e,r)=>{let n;try{n=await M7(t,e==null?void 0:e.fallbackPrefix)}catch(s){he.error(s),n=A7}const i=qJ(n,e),a=GJ(WJ(i.body),{...i.attributes,...r});return Cn(a,_r())},"getIconSVG");function I7(t,{markdownAutoWrap:e}){const n=t.replace(/<br\/>/g,`
570
+ `).replace(/\n{2,}/g,`
571
+ `),i=E7(n);return e===!1?i.replace(/ /g,"&nbsp;"):i}w(I7,"preprocessMarkdown");function R7(t,e={}){const r=I7(t,e),n=Dt.lexer(r),i=[[]];let a=0;function s(o,l="normal"){o.type==="text"?o.text.split(`
572
+ `).forEach((u,h)=>{h!==0&&(a++,i.push([])),u.split(" ").forEach(d=>{d=d.replace(/&#39;/g,"'"),d&&i[a].push({content:d,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{s(c,o.type)}):o.type==="html"&&i[a].push({content:o.text,type:"normal"})}return w(s,"processNode"),n.forEach(o=>{var l;o.type==="paragraph"?(l=o.tokens)==null||l.forEach(c=>{s(c)}):o.type==="html"?i[a].push({content:o.text,type:"normal"}):i[a].push({content:o.raw,type:"normal"})}),i}w(R7,"markdownToLines");function B7(t,{markdownAutoWrap:e}={}){const r=Dt.lexer(t);function n(i){var a,s,o;return i.type==="text"?e===!1?i.text.replace(/\n */g,"<br/>").replace(/ /g,"&nbsp;"):i.text.replace(/\n */g,"<br/>"):i.type==="strong"?`<strong>${(a=i.tokens)==null?void 0:a.map(n).join("")}</strong>`:i.type==="em"?`<em>${(s=i.tokens)==null?void 0:s.map(n).join("")}</em>`:i.type==="paragraph"?`<p>${(o=i.tokens)==null?void 0:o.map(n).join("")}</p>`:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:(he.warn(`Unsupported markdown: ${i.type}`),i.raw)}return w(n,"output"),r.map(n).join("")}w(B7,"markdownToHTML");function D7(t){return Intl.Segmenter?[...new Intl.Segmenter().segment(t)].map(e=>e.segment):[...t]}w(D7,"splitTextToChars");function O7(t,e){const r=D7(e.content);return Ig(t,[],r,e.type)}w(O7,"splitWordToFitWidth");function Ig(t,e,r,n){if(r.length===0)return[{content:e.join(""),type:n},{content:"",type:n}];const[i,...a]=r,s=[...e,i];return t([{content:s.join(""),type:n}])?Ig(t,s,a,n):(e.length===0&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}])}w(Ig,"splitWordToFitWidthRecursion");function P7(t,e){if(t.some(({content:r})=>r.includes(`
573
+ `)))throw new Error("splitLineToFitWidth does not support newlines in the line");return H0(t,e)}w(P7,"splitLineToFitWidth");function H0(t,e,r=[],n=[]){if(t.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";t[0].content===" "&&(i=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},s=[...n];if(i!==""&&s.push({content:i,type:"normal"}),s.push(a),e(s))return H0(t,e,r,s);if(n.length>0)r.push(n),t.unshift(a);else if(a.content){const[o,l]=O7(e,a);r.push([o]),l.content&&t.unshift(l)}return H0(t,e,r)}w(H0,"splitLineToFitWidthRecursion");function nm(t,e){e&&t.attr("style",e)}w(nm,"applyStyle");async function F7(t,e,r,n,i=!1,a=_r()){const s=t.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);const o=s.append("xhtml:div"),l=os(e.label)?await Lh(e.label.replace(xs.lineBreakRegex,`
574
+ `),a):Cn(e.label,a),c=e.isNode?"nodeLabel":"edgeLabel",u=o.append("span");u.html(l),nm(u,e.labelStyle),u.attr("class",`${c} ${n}`),nm(o,e.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&o.attr("class","labelBkg");let h=o.node().getBoundingClientRect();return h.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),h=o.node().getBoundingClientRect()),s.node()}w(F7,"addHtmlSpan");function Zh(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}w(Zh,"createTspan");function $7(t,e,r){const n=t.append("text"),i=Zh(n,1,e);Jh(i,r);const a=i.node().getComputedTextLength();return n.remove(),a}w($7,"computeWidthOfText");function z7(t,e,r){var s;const n=t.append("text"),i=Zh(n,1,e);Jh(i,[{content:r,type:"normal"}]);const a=(s=i.node())==null?void 0:s.getBoundingClientRect();return a&&n.remove(),a}w(z7,"computeDimensionOfText");function H7(t,e,r,n=!1){const a=e.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const u=w(d=>$7(a,1.1,d)<=t,"checkWidth"),h=u(c)?[c]:P7(c,u);for(const d of h){const f=Zh(o,l,1.1);Jh(f,d),l++}}if(n){const c=o.node().getBBox(),u=2;return s.attr("x",c.x-u).attr("y",c.y-u).attr("width",c.width+2*u).attr("height",c.height+2*u),a.node()}else return o.node()}w(H7,"createFormattedText");function Jh(t,e){t.text(""),e.forEach((r,n)=>{const i=t.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(r.content):i.text(" "+r.content)})}w(Jh,"updateTextContentAndStyles");async function Rg(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,a,s)=>(r.push((async()=>{const o=`${a}:${s}`;return await Lee(o)?await Fo(o,void 0,{class:"label-icon"}):`<i class='${Cn(i,e).replace(":"," ")}'></i>`})()),i));const n=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}w(Rg,"replaceIconSubstring");var ta=w(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>{if(he.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",l),a){const u=B7(e,c),h=await Rg(La(u),c),d=e.replace(/\\\\/g,"\\"),f={isNode:s,label:os(e)?d:h,labelStyle:r.replace("fill:","color:")};return await F7(t,f,o,i,l,c)}else{const u=e.replace(/<br\s*\/?>/g,"<br/>"),h=R7(u.replace("<br>","<br/>"),c),d=H7(o,t,h,e?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");At(d).attr("style",f)}else{const f=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");At(d).select("rect").attr("style",f.replace(/background:/g,"fill:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");At(d).select("text").attr("style",p)}return d}},"createText");function pf(t,e,r){if(t&&t.length){const[n,i]=e,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(const l of t){const[c,u]=l;l[0]=(c-n)*s-(u-i)*o+n,l[1]=(c-n)*o+(u-i)*s+i}}}function Mee(t,e){return t[0]===e[0]&&t[1]===e[1]}function Iee(t,e,r,n=1){const i=r,a=Math.max(e,.1),s=t[0]&&t[0][0]&&typeof t[0][0]=="number"?[t]:t,o=[0,0];if(i)for(const c of s)pf(c,o,i);const l=function(c,u,h){const d=[];for(const v of c){const C=[...v];Mee(C[0],C[C.length-1])||C.push([C[0][0],C[0][1]]),C.length>2&&d.push(C)}const f=[];u=Math.max(u,.1);const p=[];for(const v of d)for(let C=0;C<v.length-1;C++){const E=v[C],_=v[C+1];if(E[1]!==_[1]){const k=Math.min(E[1],_[1]);p.push({ymin:k,ymax:Math.max(E[1],_[1]),x:k===E[1]?E[0]:_[0],islope:(_[0]-E[0])/(_[1]-E[1])})}}if(p.sort((v,C)=>v.ymin<C.ymin?-1:v.ymin>C.ymin?1:v.x<C.x?-1:v.x>C.x?1:v.ymax===C.ymax?0:(v.ymax-C.ymax)/Math.abs(v.ymax-C.ymax)),!p.length)return f;let m=[],y=p[0].ymin,b=0;for(;m.length||p.length;){if(p.length){let v=-1;for(let C=0;C<p.length&&!(p[C].ymin>y);C++)v=C;p.splice(0,v+1).forEach(C=>{m.push({s:y,edge:C})})}if(m=m.filter(v=>!(v.edge.ymax<=y)),m.sort((v,C)=>v.edge.x===C.edge.x?0:(v.edge.x-C.edge.x)/Math.abs(v.edge.x-C.edge.x)),(h!==1||b%u==0)&&m.length>1)for(let v=0;v<m.length;v+=2){const C=v+1;if(C>=m.length)break;const E=m[v].edge,_=m[C].edge;f.push([[Math.round(E.x),y],[Math.round(_.x),y]])}y+=h,m.forEach(v=>{v.edge.x=v.edge.x+h*v.edge.islope}),b++}return f}(s,a,n);if(i){for(const c of s)pf(c,o,-i);(function(c,u,h){const d=[];c.forEach(f=>d.push(...f)),pf(d,u,h)})(l,o,-i)}return l}function Bc(t,e){var r;const n=e.hachureAngle+90;let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return e.roughness>=1&&(((r=e.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=i),Iee(t,i,n,a||1)}let Bg=class{constructor(e){this.helper=e}fillPolygons(e,r){return this._fillPolygons(e,r)}_fillPolygons(e,r){const n=Bc(e,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(e,r){const n=[];for(const i of e)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};function ed(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class Ree extends Bg{fillPolygons(e,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);const i=Bc(e,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*n*Math.cos(a),l=.5*n*Math.sin(a);for(const[c,u]of i)ed([c,u])&&s.push([[c[0]-o,c[1]+l],[...u]],[[c[0]+o,c[1]-l],[...u]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class Bee extends Bg{fillPolygons(e,r){const n=this._fillPolygons(e,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(e,i);return n.ops=n.ops.concat(a.ops),n}}class Dee{constructor(e){this.helper=e}fillPolygons(e,r){const n=Bc(e,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(e,r){const n=[];let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const s=i/4;for(const o of e){const l=ed(o),c=l/i,u=Math.ceil(c)-1,h=l-u*i,d=(o[0][0]+o[1][0])/2-i/4,f=Math.min(o[0][1],o[1][1]);for(let p=0;p<u;p++){const m=f+h+p*i,y=d-s+2*Math.random()*s,b=m-s+2*Math.random()*s,v=this.helper.ellipse(y,b,a,a,r);n.push(...v.ops)}}return{type:"fillSketch",ops:n}}}class Oee{constructor(e){this.helper=e}fillPolygons(e,r){const n=Bc(e,r);return{type:"fillSketch",ops:this.dashedLine(n,r)}}dashedLine(e,r){const n=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,i=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return e.forEach(s=>{const o=ed(s),l=Math.floor(o/(n+i)),c=(o+i-l*(n+i))/2;let u=s[0],h=s[1];u[0]>h[0]&&(u=s[1],h=s[0]);const d=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let f=0;f<l;f++){const p=f*(n+i),m=p+n,y=[u[0]+p*Math.cos(d)+c*Math.cos(d),u[1]+p*Math.sin(d)+c*Math.sin(d)],b=[u[0]+m*Math.cos(d)+c*Math.cos(d),u[1]+m*Math.sin(d)+c*Math.sin(d)];a.push(...this.helper.doubleLineOps(y[0],y[1],b[0],b[1],r))}}),a}}class Pee{constructor(e){this.helper=e}fillPolygons(e,r){const n=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,i=r.zigzagOffset<0?n:r.zigzagOffset,a=Bc(e,r=Object.assign({},r,{hachureGap:n+i}));return{type:"fillSketch",ops:this.zigzagLines(a,i,r)}}zigzagLines(e,r,n){const i=[];return e.forEach(a=>{const s=ed(a),o=Math.round(s/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const u=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let h=0;h<o;h++){const d=2*h*r,f=2*(h+1)*r,p=Math.sqrt(2*Math.pow(r,2)),m=[l[0]+d*Math.cos(u),l[1]+d*Math.sin(u)],y=[l[0]+f*Math.cos(u),l[1]+f*Math.sin(u)],b=[m[0]+p*Math.cos(u+Math.PI/4),m[1]+p*Math.sin(u+Math.PI/4)];i.push(...this.helper.doubleLineOps(m[0],m[1],b[0],b[1],n),...this.helper.doubleLineOps(b[0],b[1],y[0],y[1],n))}}),i}}const nn={};class Fee{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const $ee=0,mf=1,jx=2,du={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function gf(t,e){return t.type===e}function Dg(t){const e=[],r=function(s){const o=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:$ee,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:mf,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return o[o.length]={type:jx,text:""},o}(t);let n="BOD",i=0,a=r[i];for(;!gf(a,jx);){let s=0;const o=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return Dg("M0,0"+t);i++,s=du[a.text],n=a.text}else gf(a,mf)?s=du[n]:(i++,s=du[a.text],n=a.text);if(!(i+s<r.length))throw new Error("Path data ended short");for(let l=i;l<i+s;l++){const c=r[l];if(!gf(c,mf))throw new Error("Param not a number: "+n+","+c.text);o[o.length]=+c.text}if(typeof du[n]!="number")throw new Error("Bad segment: "+n);{const l={key:n,data:o};e.push(l),i+=s,a=r[i],n==="M"&&(n="L"),n==="m"&&(n="l")}}return e}function q7(t){let e=0,r=0,n=0,i=0;const a=[];for(const{key:s,data:o}of t)switch(s){case"M":a.push({key:"M",data:[...o]}),[e,r]=o,[n,i]=o;break;case"m":e+=o[0],r+=o[1],a.push({key:"M",data:[e,r]}),n=e,i=r;break;case"L":a.push({key:"L",data:[...o]}),[e,r]=o;break;case"l":e+=o[0],r+=o[1],a.push({key:"L",data:[e,r]});break;case"C":a.push({key:"C",data:[...o]}),e=o[4],r=o[5];break;case"c":{const l=o.map((c,u)=>u%2?c+r:c+e);a.push({key:"C",data:l}),e=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),e=o[2],r=o[3];break;case"q":{const l=o.map((c,u)=>u%2?c+r:c+e);a.push({key:"Q",data:l}),e=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),e=o[5],r=o[6];break;case"a":e+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],e,r]});break;case"H":a.push({key:"H",data:[...o]}),e=o[0];break;case"h":e+=o[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),e=o[2],r=o[3];break;case"s":{const l=o.map((c,u)=>u%2?c+r:c+e);a.push({key:"S",data:l}),e=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),e=o[0],r=o[1];break;case"t":e+=o[0],r+=o[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=n,r=i}return a}function j7(t){const e=[];let r="",n=0,i=0,a=0,s=0,o=0,l=0;for(const{key:c,data:u}of t){switch(c){case"M":e.push({key:"M",data:[...u]}),[n,i]=u,[a,s]=u;break;case"C":e.push({key:"C",data:[...u]}),n=u[4],i=u[5],o=u[2],l=u[3];break;case"L":e.push({key:"L",data:[...u]}),[n,i]=u;break;case"H":n=u[0],e.push({key:"L",data:[n,i]});break;case"V":i=u[0],e.push({key:"L",data:[n,i]});break;case"S":{let h=0,d=0;r==="C"||r==="S"?(h=n+(n-o),d=i+(i-l)):(h=n,d=i),e.push({key:"C",data:[h,d,...u]}),o=u[0],l=u[1],n=u[2],i=u[3];break}case"T":{const[h,d]=u;let f=0,p=0;r==="Q"||r==="T"?(f=n+(n-o),p=i+(i-l)):(f=n,p=i);const m=n+2*(f-n)/3,y=i+2*(p-i)/3,b=h+2*(f-h)/3,v=d+2*(p-d)/3;e.push({key:"C",data:[m,y,b,v,h,d]}),o=f,l=p,n=h,i=d;break}case"Q":{const[h,d,f,p]=u,m=n+2*(h-n)/3,y=i+2*(d-i)/3,b=f+2*(h-f)/3,v=p+2*(d-p)/3;e.push({key:"C",data:[m,y,b,v,f,p]}),o=h,l=d,n=f,i=p;break}case"A":{const h=Math.abs(u[0]),d=Math.abs(u[1]),f=u[2],p=u[3],m=u[4],y=u[5],b=u[6];h===0||d===0?(e.push({key:"C",data:[n,i,y,b,y,b]}),n=y,i=b):(n!==y||i!==b)&&(U7(n,i,y,b,h,d,f,p,m).forEach(function(v){e.push({key:"C",data:v})}),n=y,i=b);break}case"Z":e.push({key:"Z",data:[]}),n=a,i=s}r=c}return e}function al(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function U7(t,e,r,n,i,a,s,o,l,c){const u=(h=s,Math.PI*h/180);var h;let d=[],f=0,p=0,m=0,y=0;if(c)[f,p,m,y]=c;else{[t,e]=al(t,e,-u),[r,n]=al(r,n,-u);const ee=(t-r)/2,W=(e-n)/2;let U=ee*ee/(i*i)+W*W/(a*a);U>1&&(U=Math.sqrt(U),i*=U,a*=U);const j=i*i,Q=a*a,Y=j*Q-j*W*W-Q*ee*ee,be=j*W*W+Q*ee*ee,L=(o===l?-1:1)*Math.sqrt(Math.abs(Y/be));m=L*i*W/a+(t+r)/2,y=L*-a*ee/i+(e+n)/2,f=Math.asin(parseFloat(((e-y)/a).toFixed(9))),p=Math.asin(parseFloat(((n-y)/a).toFixed(9))),t<m&&(f=Math.PI-f),r<m&&(p=Math.PI-p),f<0&&(f=2*Math.PI+f),p<0&&(p=2*Math.PI+p),l&&f>p&&(f-=2*Math.PI),!l&&p>f&&(p-=2*Math.PI)}let b=p-f;if(Math.abs(b)>120*Math.PI/180){const ee=p,W=r,U=n;p=l&&p>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=U7(r=m+i*Math.cos(p),n=y+a*Math.sin(p),W,U,i,a,s,0,l,[p,ee,m,y])}b=p-f;const v=Math.cos(f),C=Math.sin(f),E=Math.cos(p),_=Math.sin(p),k=Math.tan(b/4),N=4/3*i*k,D=4/3*a*k,$=[t,e],R=[t+N*C,e-D*v],P=[r+N*_,n-D*E],G=[r,n];if(R[0]=2*$[0]-R[0],R[1]=2*$[1]-R[1],c)return[R,P,G].concat(d);{d=[R,P,G].concat(d);const ee=[];for(let W=0;W<d.length;W+=3){const U=al(d[W][0],d[W][1],u),j=al(d[W+1][0],d[W+1][1],u),Q=al(d[W+2][0],d[W+2][1],u);ee.push([U[0],U[1],j[0],j[1],Q[0],Q[1]])}return ee}}const zee={randOffset:function(t,e){return lt(t,e)},randOffsetWithRange:function(t,e,r){return q0(t,e,r)},ellipse:function(t,e,r,n,i){const a=G7(r,n,i);return im(t,e,i,a).opset},doubleLineOps:function(t,e,r,n,i){return Sa(t,e,r,n,i,!0)}};function W7(t,e,r,n,i){return{type:"path",ops:Sa(t,e,r,n,i)}}function Du(t,e,r){const n=(t||[]).length;if(n>2){const i=[];for(let a=0;a<n-1;a++)i.push(...Sa(t[a][0],t[a][1],t[a+1][0],t[a+1][1],r));return e&&i.push(...Sa(t[n-1][0],t[n-1][1],t[0][0],t[0][1],r)),{type:"path",ops:i}}return n===2?W7(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function Hee(t,e,r,n,i){return function(a,s){return Du(a,!0,s)}([[t,e],[t+r,e],[t+r,e+n],[t,e+n]],i)}function Ux(t,e){if(t.length){const r=typeof t[0][0]=="number"?[t]:t,n=fu(r[0],1*(1+.2*e.roughness),e),i=e.disableMultiStroke?[]:fu(r[0],1.5*(1+.22*e.roughness),Yx(e));for(let a=1;a<r.length;a++){const s=r[a];if(s.length){const o=fu(s,1*(1+.2*e.roughness),e),l=e.disableMultiStroke?[]:fu(s,1.5*(1+.22*e.roughness),Yx(e));for(const c of o)c.op!=="move"&&n.push(c);for(const c of l)c.op!=="move"&&i.push(c)}}return{type:"path",ops:n.concat(i)}}return{type:"path",ops:[]}}function G7(t,e,r){const n=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),i=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*n)),a=2*Math.PI/i;let s=Math.abs(t/2),o=Math.abs(e/2);const l=1-r.curveFitting;return s+=lt(s*l,r),o+=lt(o*l,r),{increment:a,rx:s,ry:o}}function im(t,e,r,n){const[i,a]=Vx(n.increment,t,e,n.rx,n.ry,1,n.increment*q0(.1,q0(.4,1,r),r),r);let s=j0(i,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=Vx(n.increment,t,e,n.rx,n.ry,1.5,0,r),l=j0(o,null,r);s=s.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:s}}}function Wx(t,e,r,n,i,a,s,o,l){const c=t,u=e;let h=Math.abs(r/2),d=Math.abs(n/2);h+=lt(.01*h,l),d+=lt(.01*d,l);let f=i,p=a;for(;f<0;)f+=2*Math.PI,p+=2*Math.PI;p-f>2*Math.PI&&(f=0,p=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(p-f)/2),b=Xx(y,c,u,h,d,f,p,1,l);if(!l.disableMultiStroke){const v=Xx(y,c,u,h,d,f,p,1.5,l);b.push(...v)}return s&&(o?b.push(...Sa(c,u,c+h*Math.cos(f),u+d*Math.sin(f),l),...Sa(c,u,c+h*Math.cos(p),u+d*Math.sin(p),l)):b.push({op:"lineTo",data:[c,u]},{op:"lineTo",data:[c+h*Math.cos(f),u+d*Math.sin(f)]})),{type:"path",ops:b}}function Gx(t,e){const r=j7(q7(Dg(t))),n=[];let i=[0,0],a=[0,0];for(const{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...Sa(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":{const[l,c,u,h,d,f]=o;n.push(...qee(l,c,u,h,d,f,a,e)),a=[d,f];break}case"Z":n.push(...Sa(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function bf(t,e){const r=[];for(const n of t)if(n.length){const i=e.maxRandomnessOffset||0,a=n.length;if(a>2){r.push({op:"move",data:[n[0][0]+lt(i,e),n[0][1]+lt(i,e)]});for(let s=1;s<a;s++)r.push({op:"lineTo",data:[n[s][0]+lt(i,e),n[s][1]+lt(i,e)]})}}return{type:"fillPath",ops:r}}function Is(t,e){return function(r,n){let i=r.fillStyle||"hachure";if(!nn[i])switch(i){case"zigzag":nn[i]||(nn[i]=new Ree(n));break;case"cross-hatch":nn[i]||(nn[i]=new Bee(n));break;case"dots":nn[i]||(nn[i]=new Dee(n));break;case"dashed":nn[i]||(nn[i]=new Oee(n));break;case"zigzag-line":nn[i]||(nn[i]=new Pee(n));break;default:i="hachure",nn[i]||(nn[i]=new Bg(n))}return nn[i]}(e,zee).fillPolygons(t,e)}function Yx(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function Y7(t){return t.randomizer||(t.randomizer=new Fee(t.seed||0)),t.randomizer.next()}function q0(t,e,r,n=1){return r.roughness*n*(Y7(r)*(e-t)+t)}function lt(t,e,r=1){return q0(-t,t,e,r)}function Sa(t,e,r,n,i,a=!1){const s=a?i.disableMultiStrokeFill:i.disableMultiStroke,o=am(t,e,r,n,i,!0,!1);if(s)return o;const l=am(t,e,r,n,i,!0,!0);return o.concat(l)}function am(t,e,r,n,i,a,s){const o=Math.pow(t-r,2)+Math.pow(e-n,2),l=Math.sqrt(o);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>o&&(u=l/10);const h=u/2,d=.2+.2*Y7(i);let f=i.bowing*i.maxRandomnessOffset*(n-e)/200,p=i.bowing*i.maxRandomnessOffset*(t-r)/200;f=lt(f,i,c),p=lt(p,i,c);const m=[],y=()=>lt(h,i,c),b=()=>lt(u,i,c),v=i.preserveVertices;return s?m.push({op:"move",data:[t+(v?0:y()),e+(v?0:y())]}):m.push({op:"move",data:[t+(v?0:lt(u,i,c)),e+(v?0:lt(u,i,c))]}),s?m.push({op:"bcurveTo",data:[f+t+(r-t)*d+y(),p+e+(n-e)*d+y(),f+t+2*(r-t)*d+y(),p+e+2*(n-e)*d+y(),r+(v?0:y()),n+(v?0:y())]}):m.push({op:"bcurveTo",data:[f+t+(r-t)*d+b(),p+e+(n-e)*d+b(),f+t+2*(r-t)*d+b(),p+e+2*(n-e)*d+b(),r+(v?0:b()),n+(v?0:b())]}),m}function fu(t,e,r){if(!t.length)return[];const n=[];n.push([t[0][0]+lt(e,r),t[0][1]+lt(e,r)]),n.push([t[0][0]+lt(e,r),t[0][1]+lt(e,r)]);for(let i=1;i<t.length;i++)n.push([t[i][0]+lt(e,r),t[i][1]+lt(e,r)]),i===t.length-1&&n.push([t[i][0]+lt(e,r),t[i][1]+lt(e,r)]);return j0(n,null,r)}function j0(t,e,r){const n=t.length,i=[];if(n>3){const a=[],s=1-r.curveTightness;i.push({op:"move",data:[t[1][0],t[1][1]]});for(let o=1;o+2<n;o++){const l=t[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*t[o+1][0]-s*t[o-1][0])/6,l[1]+(s*t[o+1][1]-s*t[o-1][1])/6],a[2]=[t[o+1][0]+(s*t[o][0]-s*t[o+2][0])/6,t[o+1][1]+(s*t[o][1]-s*t[o+2][1])/6],a[3]=[t[o+1][0],t[o+1][1]],i.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else n===3?(i.push({op:"move",data:[t[1][0],t[1][1]]}),i.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):n===2&&i.push(...am(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return i}function Vx(t,e,r,n,i,a,s,o){const l=[],c=[];if(o.roughness===0){t/=4,c.push([e+n*Math.cos(-t),r+i*Math.sin(-t)]);for(let u=0;u<=2*Math.PI;u+=t){const h=[e+n*Math.cos(u),r+i*Math.sin(u)];l.push(h),c.push(h)}c.push([e+n*Math.cos(0),r+i*Math.sin(0)]),c.push([e+n*Math.cos(t),r+i*Math.sin(t)])}else{const u=lt(.5,o)-Math.PI/2;c.push([lt(a,o)+e+.9*n*Math.cos(u-t),lt(a,o)+r+.9*i*Math.sin(u-t)]);const h=2*Math.PI+u-.01;for(let d=u;d<h;d+=t){const f=[lt(a,o)+e+n*Math.cos(d),lt(a,o)+r+i*Math.sin(d)];l.push(f),c.push(f)}c.push([lt(a,o)+e+n*Math.cos(u+2*Math.PI+.5*s),lt(a,o)+r+i*Math.sin(u+2*Math.PI+.5*s)]),c.push([lt(a,o)+e+.98*n*Math.cos(u+s),lt(a,o)+r+.98*i*Math.sin(u+s)]),c.push([lt(a,o)+e+.9*n*Math.cos(u+.5*s),lt(a,o)+r+.9*i*Math.sin(u+.5*s)])}return[c,l]}function Xx(t,e,r,n,i,a,s,o,l){const c=a+lt(.1,l),u=[];u.push([lt(o,l)+e+.9*n*Math.cos(c-t),lt(o,l)+r+.9*i*Math.sin(c-t)]);for(let h=c;h<=s;h+=t)u.push([lt(o,l)+e+n*Math.cos(h),lt(o,l)+r+i*Math.sin(h)]);return u.push([e+n*Math.cos(s),r+i*Math.sin(s)]),u.push([e+n*Math.cos(s),r+i*Math.sin(s)]),j0(u,null,l)}function qee(t,e,r,n,i,a,s,o){const l=[],c=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let u=[0,0];const h=o.disableMultiStroke?1:2,d=o.preserveVertices;for(let f=0;f<h;f++)f===0?l.push({op:"move",data:[s[0],s[1]]}):l.push({op:"move",data:[s[0]+(d?0:lt(c[0],o)),s[1]+(d?0:lt(c[0],o))]}),u=d?[i,a]:[i+lt(c[f],o),a+lt(c[f],o)],l.push({op:"bcurveTo",data:[t+lt(c[f],o),e+lt(c[f],o),r+lt(c[f],o),n+lt(c[f],o),u[0],u[1]]});return l}function sl(t){return[...t]}function Kx(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const n=[];if(r===3)n.push(sl(t[0]),sl(t[1]),sl(t[2]),sl(t[2]));else{const i=[];i.push(t[0],t[0]);for(let o=1;o<t.length;o++)i.push(t[o]),o===t.length-1&&i.push(t[o]);const a=[],s=1-e;n.push(sl(i[0]));for(let o=1;o+2<i.length;o++){const l=i[o];a[0]=[l[0],l[1]],a[1]=[l[0]+(s*i[o+1][0]-s*i[o-1][0])/6,l[1]+(s*i[o+1][1]-s*i[o-1][1])/6],a[2]=[i[o+1][0]+(s*i[o][0]-s*i[o+2][0])/6,i[o+1][1]+(s*i[o][1]-s*i[o+2][1])/6],a[3]=[i[o+1][0],i[o+1][1]],n.push(a[1],a[2],a[3])}}return n}function Ou(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function jee(t,e,r){const n=Ou(e,r);if(n===0)return Ou(t,e);let i=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/n;return i=Math.max(0,Math.min(1,i)),Ou(t,Ua(e,r,i))}function Ua(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function sm(t,e,r,n){const i=n||[];if(function(o,l){const c=o[l+0],u=o[l+1],h=o[l+2],d=o[l+3];let f=3*u[0]-2*c[0]-d[0];f*=f;let p=3*u[1]-2*c[1]-d[1];p*=p;let m=3*h[0]-2*d[0]-c[0];m*=m;let y=3*h[1]-2*d[1]-c[1];return y*=y,f<m&&(f=m),p<y&&(p=y),f+p}(t,e)<r){const o=t[e+0];i.length?(a=i[i.length-1],s=o,Math.sqrt(Ou(a,s))>1&&i.push(o)):i.push(o),i.push(t[e+3])}else{const l=t[e+0],c=t[e+1],u=t[e+2],h=t[e+3],d=Ua(l,c,.5),f=Ua(c,u,.5),p=Ua(u,h,.5),m=Ua(d,f,.5),y=Ua(f,p,.5),b=Ua(m,y,.5);sm([l,d,m,b],0,r,i),sm([b,y,p,h],0,r,i)}var a,s;return i}function Uee(t,e){return U0(t,0,t.length,e)}function U0(t,e,r,n,i){const a=i||[],s=t[e],o=t[r-1];let l=0,c=1;for(let u=e+1;u<r-1;++u){const h=jee(t[u],s,o);h>l&&(l=h,c=u)}return Math.sqrt(l)>n?(U0(t,e,c+1,n,a),U0(t,c,r,n,a)):(a.length||a.push(s),a.push(o)),a}function yf(t,e=.15,r){const n=[],i=(t.length-1)/3;for(let a=0;a<i;a++)sm(t,3*a,e,n);return r&&r>0?U0(n,0,n.length,r):n}const fn="none";class W0{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,r,n){return{shape:e,sets:r||[],options:n||this.defaultOptions}}line(e,r,n,i,a){const s=this._o(a);return this._d("line",[W7(e,r,n,i,s)],s)}rectangle(e,r,n,i,a){const s=this._o(a),o=[],l=Hee(e,r,n,i,s);if(s.fill){const c=[[e,r],[e+n,r],[e+n,r+i],[e,r+i]];s.fillStyle==="solid"?o.push(bf([c],s)):o.push(Is([c],s))}return s.stroke!==fn&&o.push(l),this._d("rectangle",o,s)}ellipse(e,r,n,i,a){const s=this._o(a),o=[],l=G7(n,i,s),c=im(e,r,s,l);if(s.fill)if(s.fillStyle==="solid"){const u=im(e,r,s,l).opset;u.type="fillPath",o.push(u)}else o.push(Is([c.estimatedPoints],s));return s.stroke!==fn&&o.push(c.opset),this._d("ellipse",o,s)}circle(e,r,n,i){const a=this.ellipse(e,r,n,n,i);return a.shape="circle",a}linearPath(e,r){const n=this._o(r);return this._d("linearPath",[Du(e,!1,n)],n)}arc(e,r,n,i,a,s,o=!1,l){const c=this._o(l),u=[],h=Wx(e,r,n,i,a,s,o,!0,c);if(o&&c.fill)if(c.fillStyle==="solid"){const d=Object.assign({},c);d.disableMultiStroke=!0;const f=Wx(e,r,n,i,a,s,!0,!1,d);f.type="fillPath",u.push(f)}else u.push(function(d,f,p,m,y,b,v){const C=d,E=f;let _=Math.abs(p/2),k=Math.abs(m/2);_+=lt(.01*_,v),k+=lt(.01*k,v);let N=y,D=b;for(;N<0;)N+=2*Math.PI,D+=2*Math.PI;D-N>2*Math.PI&&(N=0,D=2*Math.PI);const $=(D-N)/v.curveStepCount,R=[];for(let P=N;P<=D;P+=$)R.push([C+_*Math.cos(P),E+k*Math.sin(P)]);return R.push([C+_*Math.cos(D),E+k*Math.sin(D)]),R.push([C,E]),Is([R],v)}(e,r,n,i,a,s,c));return c.stroke!==fn&&u.push(h),this._d("arc",u,c)}curve(e,r){const n=this._o(r),i=[],a=Ux(e,n);if(n.fill&&n.fill!==fn)if(n.fillStyle==="solid"){const s=Ux(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],o=e;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...yf(Kx([c[0],c[0],c[1],c[2]]),10,(1+n.roughness)/2)):s.push(...yf(Kx(c),10,(1+n.roughness)/2))}s.length&&i.push(Is([s],n))}return n.stroke!==fn&&i.push(a),this._d("curve",i,n)}polygon(e,r){const n=this._o(r),i=[],a=Du(e,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(bf([e],n)):i.push(Is([e],n))),n.stroke!==fn&&i.push(a),this._d("polygon",i,n)}path(e,r){const n=this._o(r),i=[];if(!e)return this._d("path",i,n);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=n.fill&&n.fill!=="transparent"&&n.fill!==fn,s=n.stroke!==fn,o=!!(n.simplification&&n.simplification<1),l=function(u,h,d){const f=j7(q7(Dg(u))),p=[];let m=[],y=[0,0],b=[];const v=()=>{b.length>=4&&m.push(...yf(b,h)),b=[]},C=()=>{v(),m.length&&(p.push(m),m=[])};for(const{key:_,data:k}of f)switch(_){case"M":C(),y=[k[0],k[1]],m.push(y);break;case"L":v(),m.push([k[0],k[1]]);break;case"C":if(!b.length){const N=m.length?m[m.length-1]:y;b.push([N[0],N[1]])}b.push([k[0],k[1]]),b.push([k[2],k[3]]),b.push([k[4],k[5]]);break;case"Z":v(),m.push([y[0],y[1]])}if(C(),!d)return p;const E=[];for(const _ of p){const k=Uee(_,d);k.length&&E.push(k)}return E}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),c=Gx(e,n);if(a)if(n.fillStyle==="solid")if(l.length===1){const u=Gx(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(u.ops)})}else i.push(bf(l,n));else i.push(Is(l,n));return s&&(o?l.forEach(u=>{i.push(Du(u,!1,n))}):i.push(c)),this._d("path",i,n)}opsToPath(e,r){let n="";for(const i of e.ops){const a=typeof r=="number"&&r>=0?i.data.map(s=>+s.toFixed(r)):i.data;switch(i.op){case"move":n+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":n+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":n+=`L${a[0]} ${a[1]} `}}return n.trim()}toPaths(e){const r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(const a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:fn};break;case"fillPath":s={d:this.opsToPath(a),stroke:fn,strokeWidth:0,fill:n.fill||fn};break;case"fillSketch":s=this.fillSketch(a,n)}s&&i.push(s)}return i}fillSketch(e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(e),stroke:r.fill||fn,strokeWidth:n,fill:fn}}_mergedShape(e){return e.filter((r,n)=>n===0||r.op!=="move")}}class Wee{constructor(e,r){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new W0(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(const s of r)switch(s.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,s,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";const o=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,s,a,o),i.restore();break}case"fillSketch":this.fillSketch(i,s,n)}}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||"",e.lineWidth=i,this._drawToContext(e,r,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,r,n,i="nonzero"){e.beginPath();for(const a of r.ops){const s=typeof n=="number"&&n>=0?a.data.map(o=>+o.toFixed(n)):a.data;switch(a.op){case"move":e.moveTo(s[0],s[1]);break;case"bcurveTo":e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":e.lineTo(s[0],s[1])}}r.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,r,n,i,a){const s=this.gen.line(e,r,n,i,a);return this.draw(s),s}rectangle(e,r,n,i,a){const s=this.gen.rectangle(e,r,n,i,a);return this.draw(s),s}ellipse(e,r,n,i,a){const s=this.gen.ellipse(e,r,n,i,a);return this.draw(s),s}circle(e,r,n,i){const a=this.gen.circle(e,r,n,i);return this.draw(a),a}linearPath(e,r){const n=this.gen.linearPath(e,r);return this.draw(n),n}polygon(e,r){const n=this.gen.polygon(e,r);return this.draw(n),n}arc(e,r,n,i,a,s,o=!1,l){const c=this.gen.arc(e,r,n,i,a,s,o,l);return this.draw(c),c}curve(e,r){const n=this.gen.curve(e,r);return this.draw(n),n}path(e,r){const n=this.gen.path(e,r);return this.draw(n),n}}const pu="http://www.w3.org/2000/svg";class Gee{constructor(e,r){this.svg=e,this.gen=new W0(r)}draw(e){const r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(pu,"g"),s=e.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=i.createElementNS(pu,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke",n.stroke),l.setAttribute("stroke-width",n.strokeWidth+""),l.setAttribute("fill","none"),n.strokeLineDash&&l.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(pu,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",n.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,o,n)}l&&a.appendChild(l)}return a}fillSketch(e,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);const a=e.createElementNS(pu,"path");return a.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),a.setAttribute("stroke",n.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),n.fillLineDash&&a.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,r){return this.gen.opsToPath(e,r)}line(e,r,n,i,a){const s=this.gen.line(e,r,n,i,a);return this.draw(s)}rectangle(e,r,n,i,a){const s=this.gen.rectangle(e,r,n,i,a);return this.draw(s)}ellipse(e,r,n,i,a){const s=this.gen.ellipse(e,r,n,i,a);return this.draw(s)}circle(e,r,n,i){const a=this.gen.circle(e,r,n,i);return this.draw(a)}linearPath(e,r){const n=this.gen.linearPath(e,r);return this.draw(n)}polygon(e,r){const n=this.gen.polygon(e,r);return this.draw(n)}arc(e,r,n,i,a,s,o=!1,l){const c=this.gen.arc(e,r,n,i,a,s,o,l);return this.draw(c)}curve(e,r){const n=this.gen.curve(e,r);return this.draw(n)}path(e,r){const n=this.gen.path(e,r);return this.draw(n)}}var He={canvas:(t,e)=>new Wee(t,e),svg:(t,e)=>new Gee(t,e),generator:t=>new W0(t),newSeed:()=>W0.newSeed()},st=w(async(t,e,r)=>{var h,d;let n;const i=e.useHtmlLabels||cr((h=Bt())==null?void 0:h.htmlLabels);r?n=r:n="node default";const a=t.insert("g").attr("class",n).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",Dr(e.labelStyle));let o;e.label===void 0?o="":o=typeof e.label=="string"?e.label:e.label[0];const l=await ta(s,Cn(La(o),Bt()),{useHtmlLabels:i,width:e.width||((d=Bt().flowchart)==null?void 0:d.wrappingWidth),cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let c=l.getBBox();const u=((e==null?void 0:e.padding)??0)/2;if(i){const f=l.children[0],p=At(l),m=f.getElementsByTagName("img");if(m){const y=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...m].map(b=>new Promise(v=>{function C(){if(b.style.display="flex",b.style.flexDirection="column",y){const E=Bt().fontSize?Bt().fontSize:window.getComputedStyle(document.body).fontSize,_=5,[k=P1.fontSize]=Ic(E),N=k*_+"px";b.style.minWidth=N,b.style.maxWidth=N}else b.style.width="100%";v(b)}w(C,"setupImage"),setTimeout(()=>{b.complete&&C()}),b.addEventListener("error",C),b.addEventListener("load",C)})))}c=f.getBoundingClientRect(),p.attr("width",c.width),p.attr("height",c.height)}return i?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:u,label:s}},"labelHelper"),xf=w(async(t,e,r)=>{var l,c,u,h,d,f;const n=r.useHtmlLabels||cr((c=(l=Bt())==null?void 0:l.flowchart)==null?void 0:c.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await ta(i,Cn(La(e),Bt()),{useHtmlLabels:n,width:r.width||((h=(u=Bt())==null?void 0:u.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=a.getBBox();const o=r.padding/2;if(cr((f=(d=Bt())==null?void 0:d.flowchart)==null?void 0:f.htmlLabels)){const p=a.children[0],m=At(a);s=p.getBoundingClientRect(),m.attr("width",s.width),m.attr("height",s.height)}return n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:i}},"insertLabel"),Ue=w((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),rt=w((t,e)=>(t.look==="handDrawn"?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function Ct(t){const e=t.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return e.push("Z"),e.join(" ")}w(Ct,"createPathFromPoints");function _a(t,e,r,n,i,a){const s=[],l=r-t,c=n-e,u=l/a,h=2*Math.PI/u,d=e+c/2;for(let f=0;f<=50;f++){const p=f/50,m=t+p*l,y=d+i*Math.sin(h*(m-t));s.push({x:m,y})}return s}w(_a,"generateFullSineWavePoints");function dc(t,e,r,n,i,a){const s=[],o=i*Math.PI/180,u=(a*Math.PI/180-o)/(n-1);for(let h=0;h<n;h++){const d=o+h*u,f=t+r*Math.cos(d),p=e+r*Math.sin(d);s.push({x:-f,y:-p})}return s}w(dc,"generateCirclePoints");var Yee=w((t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2,l,c;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,c=o):(i<0&&(s=-s),l=s,c=i===0?0:s*a/i),{x:r+l,y:n+c}},"intersectRect"),$o=Yee;function V7(t,e){e&&t.attr("style",e)}w(V7,"applyStyle");async function X7(t){const e=At(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=Bt();let i=t.label;t.label&&os(t.label)&&(i=await Lh(t.label.replace(xs.lineBreakRegex,`
575
+ `),n));const s='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>";return r.html(Cn(s,n)),V7(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}w(X7,"addHtmlLabel");var Vee=w(async(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),cr(Bt().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),he.info("vertexText"+i);const a={isNode:n,label:La(i).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:e&&e.replace("fill:","color:")};return await X7(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?s=i:s=[];for(const o of s){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),Qa=Vee,Ma=w((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD"),K7=w(async(t,e)=>{he.info("Creating subgraph rect for ",e.id,e);const r=Bt(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:u}=ze(e),h=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=cr(r.flowchart.htmlLabels),f=h.insert("g").attr("class","cluster-label "),p=await ta(f,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0});let m=p.getBBox();if(cr(r.flowchart.htmlLabels)){const N=p.children[0],D=At(p);m=N.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const b=e.height,v=e.x-y/2,C=e.y-b/2;he.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){const N=He.svg(h),D=je(e,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),$=N.path(Ma(v,C,y,b,0),D);E=h.insert(()=>(he.debug("Rough node insert CXC",$),$),":first-child"),E.select("path:nth-child(2)").attr("style",c.join(";")),E.select("path").attr("style",u.join(";").replace("fill","stroke"))}else E=h.insert("rect",":first-child"),E.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",C).attr("width",y).attr("height",b);const{subGraphTitleTopMargin:_}=Hh(r);if(f.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+_})`),o){const N=f.select("span");N&&N.attr("style",o)}const k=E.node().getBBox();return e.offsetX=0,e.width=k.width,e.height=k.height,e.offsetY=m.height-e.padding/2,e.intersect=function(N){return $o(e,N)},{cluster:h,labelBBox:m}},"rect"),Xee=w((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(o){return $o(e,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Kee=w(async(t,e)=>{const r=Bt(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=n,c=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),u=c.insert("g",":first-child"),h=c.insert("g").attr("class","cluster-label");let d=c.append("rect");const f=h.node().appendChild(await Qa(e.label,e.labelStyle,void 0,!0));let p=f.getBBox();if(cr(r.flowchart.htmlLabels)){const $=f.children[0],R=At(f);p=$.getBoundingClientRect(),R.attr("width",p.width),R.attr("height",p.height)}const m=0*e.padding,y=m/2,b=(e.width<=p.width+e.padding?p.width+e.padding:e.width)+m;e.width<=p.width+e.padding?e.diff=(b-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height+m,C=e.height+m-p.height-6,E=e.x-b/2,_=e.y-v/2;e.width=b;const k=e.y-e.height/2-y+p.height+2;let N;if(e.look==="handDrawn"){const $=e.cssClasses.includes("statediagram-cluster-alt"),R=He.svg(c),P=e.rx||e.ry?R.path(Ma(E,_,b,v,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:i}):R.rectangle(E,_,b,v,{seed:i});N=c.insert(()=>P,":first-child");const G=R.rectangle(E,k,b,C,{fill:$?a:s,fillStyle:$?"hachure":"solid",stroke:l,seed:i});N=c.insert(()=>P,":first-child"),d=c.insert(()=>G)}else N=u.insert("rect",":first-child"),N.attr("class","outer").attr("x",E).attr("y",_).attr("width",b).attr("height",v).attr("data-look",e.look),d.attr("class","inner").attr("x",E).attr("y",k).attr("width",b).attr("height",C);h.attr("transform",`translate(${e.x-p.width/2}, ${_+1-(cr(r.flowchart.htmlLabels)?0:3)})`);const D=N.node().getBBox();return e.height=D.height,e.offsetX=0,e.offsetY=p.height-e.padding/2,e.labelBBox=p,e.intersect=function($){return $o(e,$)},{cluster:c,labelBBox:p}},"roundedWithTitle"),Qee=w(async(t,e)=>{he.info("Creating subgraph rect for ",e.id,e);const r=Bt(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:s}=n,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:u}=ze(e),h=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),d=cr(r.flowchart.htmlLabels),f=h.insert("g").attr("class","cluster-label "),p=await ta(f,e.label,{style:e.labelStyle,useHtmlLabels:d,isNode:!0,width:e.width});let m=p.getBBox();if(cr(r.flowchart.htmlLabels)){const N=p.children[0],D=At(p);m=N.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=e.width<=m.width+e.padding?m.width+e.padding:e.width;e.width<=m.width+e.padding?e.diff=(y-e.width)/2-e.padding:e.diff=-e.padding;const b=e.height,v=e.x-y/2,C=e.y-b/2;he.trace("Data ",e,JSON.stringify(e));let E;if(e.look==="handDrawn"){const N=He.svg(h),D=je(e,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:i}),$=N.path(Ma(v,C,y,b,e.rx),D);E=h.insert(()=>(he.debug("Rough node insert CXC",$),$),":first-child"),E.select("path:nth-child(2)").attr("style",c.join(";")),E.select("path").attr("style",u.join(";").replace("fill","stroke"))}else E=h.insert("rect",":first-child"),E.attr("style",l).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",C).attr("width",y).attr("height",b);const{subGraphTitleTopMargin:_}=Hh(r);if(f.attr("transform",`translate(${e.x-m.width/2}, ${e.y-e.height/2+_})`),o){const N=f.select("span");N&&N.attr("style",o)}const k=E.node().getBBox();return e.offsetX=0,e.width=k.width,e.height=k.height,e.offsetY=m.height-e.padding/2,e.intersect=function(N){return $o(e,N)},{cluster:h,labelBBox:m}},"kanbanSection"),Zee=w((t,e)=>{const r=Bt(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),o=s.insert("g",":first-child"),l=0*e.padding,c=e.width+l;e.diff=-e.padding;const u=e.height+l,h=e.x-c/2,d=e.y-u/2;e.width=c;let f;if(e.look==="handDrawn"){const y=He.svg(s).rectangle(h,d,c,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});f=s.insert(()=>y,":first-child")}else f=o.insert("rect",":first-child"),f.attr("class","divider").attr("x",h).attr("y",d).attr("width",c).attr("height",u).attr("data-look",e.look);const p=f.node().getBBox();return e.height=p.height,e.offsetX=0,e.offsetY=0,e.intersect=function(m){return $o(e,m)},{cluster:s,labelBBox:{}}},"divider"),Jee=K7,ete={rect:K7,squareRect:Jee,roundedWithTitle:Kee,noteGroup:Xee,divider:Zee,kanbanSection:Qee},Q7=new Map,Z7=w(async(t,e)=>{const r=e.shape||"rect",n=await ete[r](t,e);return Q7.set(e.id,n),n},"insertCluster"),tte=w(()=>{Q7=new Map},"clear");function J7(t,e){return t.intersect(e)}w(J7,"intersectNode");var rte=J7;function eC(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),c=Math.abs(e*r*s/l);n.x<i&&(c=-c);var u=Math.abs(e*r*o/l);return n.y<a&&(u=-u),{x:i+c,y:a+u}}w(eC,"intersectEllipse");var tC=eC;function rC(t,e,r){return tC(t,e,e,r)}w(rC,"intersectCircle");var nte=rC;function nC(t,e,r,n){{const i=e.y-t.y,a=t.x-e.x,s=e.x*t.y-t.x*e.y,o=i*r.x+a*r.y+s,l=i*n.x+a*n.y+s,c=1e-6;if(o!==0&&l!==0&&om(o,l))return;const u=n.y-r.y,h=r.x-n.x,d=n.x*r.y-r.x*n.y,f=u*t.x+h*t.y+d,p=u*e.x+h*e.y+d;if(Math.abs(f)<c&&Math.abs(p)<c&&om(f,p))return;const m=i*h-u*a;if(m===0)return;const y=Math.abs(m/2);let b=a*d-h*s;const v=b<0?(b-y)/m:(b+y)/m;b=u*s-i*d;const C=b<0?(b-y)/m:(b+y)/m;return{x:v,y:C}}}w(nC,"intersectLine");function om(t,e){return t*e>0}w(om,"sameSign");var ite=nC;function iC(t,e,r){let n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(u){s=Math.min(s,u.x),o=Math.min(o,u.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));let l=n-t.width/2-s,c=i-t.height/2-o;for(let u=0;u<e.length;u++){let h=e[u],d=e[u<e.length-1?u+1:0],f=ite(t,r,{x:l+h.x,y:c+h.y},{x:l+d.x,y:c+d.y});f&&a.push(f)}return a.length?(a.length>1&&a.sort(function(u,h){let d=u.x-r.x,f=u.y-r.y,p=Math.sqrt(d*d+f*f),m=h.x-r.x,y=h.y-r.y,b=Math.sqrt(m*m+y*y);return p<b?-1:p===b?0:1}),a[0]):t}w(iC,"intersectPolygon");var ate=iC,Be={node:rte,circle:nte,ellipse:tC,polygon:ate,rect:$o};function aC(t,e){const{labelStyles:r}=ze(e);e.labelStyle=r;const n=rt(e);let i=n;n||(i="anchor");const a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=1,{cssStyles:o}=e,l=He.svg(a),c=je(e,{fill:"black",stroke:"none",fillStyle:"solid"});e.look!=="handDrawn"&&(c.roughness=0);const u=l.circle(0,0,s*2,c),h=a.insert(()=>u,":first-child");return h.attr("class","anchor").attr("style",Dr(o)),Ue(e,h),e.intersect=function(d){return he.info("Circle intersect",e,s,d),Be.circle(e,s,d)},a}w(aC,"anchor");function lm(t,e,r,n,i,a,s){const l=(t+r)/2,c=(e+n)/2,u=Math.atan2(n-e,r-t),h=(r-t)/2,d=(n-e)/2,f=h/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),b=l+y*a*Math.sin(u)*(s?-1:1),v=c-y*i*Math.cos(u)*(s?-1:1),C=Math.atan2((e-v)/a,(t-b)/i);let _=Math.atan2((n-v)/a,(r-b)/i)-C;s&&_<0&&(_+=2*Math.PI),!s&&_>0&&(_-=2*Math.PI);const k=[];for(let N=0;N<20;N++){const D=N/19,$=C+D*_,R=b+i*Math.cos($),P=v+a*Math.sin($);k.push({x:R,y:P})}return k}w(lm,"generateArcPoints");async function sC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=a.width+e.padding+20,o=a.height+e.padding,l=o/2,c=l/(2.5+o/50),{cssStyles:u}=e,h=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...lm(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...lm(s/2,o/2,s/2,-o/2,c,l,!0)],d=He.svg(i),f=je(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=Ct(h),m=d.path(p,f),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",u),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),y.attr("transform",`translate(${c/2}, 0)`),Ue(e,y),e.intersect=function(b){return Be.polygon(e,h,b)},i}w(sC,"bowTieRect");function Ia(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}w(Ia,"insertPolygonShape");async function oC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=a.height+e.padding,o=12,l=a.width+e.padding+o,c=0,u=l,h=-s,d=0,f=[{x:c+o,y:h},{x:u,y:h},{x:u,y:d},{x:c,y:d},{x:c,y:h+o},{x:c+o,y:h}];let p;const{cssStyles:m}=e;if(e.look==="handDrawn"){const y=He.svg(i),b=je(e,{}),v=Ct(f),C=y.path(v,b);p=i.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&p.attr("style",m)}else p=Ia(i,l,s,f);return n&&p.attr("style",n),Ue(e,p),e.intersect=function(y){return Be.polygon(e,f,y)},i}w(oC,"card");function lC(t,e){const{nodeStyles:r}=ze(e);e.label="";const n=t.insert("g").attr("class",rt(e)).attr("id",e.domId??e.id),{cssStyles:i}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=He.svg(n),l=je(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Ct(s),u=o.path(c,l),h=n.insert(()=>u,":first-child");return i&&e.look!=="handDrawn"&&h.selectAll("path").attr("style",i),r&&e.look!=="handDrawn"&&h.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(d){return Be.polygon(e,s,d)},n}w(lC,"choice");async function Og(t,e,r){const{labelStyles:n,nodeStyles:i}=ze(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,halfPadding:o}=await st(t,e,rt(e)),l=(r==null?void 0:r.padding)??o,c=s.width/2+l;let u;const{cssStyles:h}=e;if(e.look==="handDrawn"){const d=He.svg(a),f=je(e,{}),p=d.circle(0,0,c*2,f);u=a.insert(()=>p,":first-child"),u.attr("class","basic label-container").attr("style",Dr(h))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0);return Ue(e,u),e.calcIntersect=function(d,f){const p=d.width/2;return Be.circle(d,p,f)},e.intersect=function(d){return he.info("Circle intersect",e,c,d),Be.circle(e,c,d)},a}w(Og,"circle");function cC(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=t*2,i={x:n/2*e,y:n/2*r},a={x:-(n/2)*e,y:n/2*r},s={x:-(n/2)*e,y:-(n/2)*r},o={x:n/2*e,y:-(n/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
576
+ M ${i.x},${i.y} L ${s.x},${s.y}`}w(cC,"createLine");function uC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r,e.label="";const i=t.insert("g").attr("class",rt(e)).attr("id",e.domId??e.id),a=Math.max(30,(e==null?void 0:e.width)??0),{cssStyles:s}=e,o=He.svg(i),l=je(e,{});e.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,a*2,l),u=cC(a),h=o.path(u,l),d=i.insert(()=>c,":first-child");return d.insert(()=>h),s&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",s),n&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",n),Ue(e,d),e.intersect=function(f){return he.info("crossedCircle intersect",e,{radius:a,point:f}),Be.circle(e,a,f)},i}w(uC,"crossedCircle");function Ri(t,e,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,u=(a*Math.PI/180-o)/(n-1);for(let h=0;h<n;h++){const d=o+h*u,f=t+r*Math.cos(d),p=e+r*Math.sin(d);s.push({x:-f,y:-p})}return s}w(Ri,"generateCirclePoints");async function hC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=a.width+(e.padding??0),l=a.height+(e.padding??0),c=Math.max(5,l*.1),{cssStyles:u}=e,h=[...Ri(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...Ri(o/2+c*2,-c,c,20,-180,-270),...Ri(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...Ri(o/2,l/2,c,20,0,90)],d=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...Ri(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...Ri(o/2+o*.1,-c,c,20,-180,-270),...Ri(o/2+o*.1,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...Ri(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2,y:l/2+c}],f=He.svg(i),p=je(e,{fill:"none"});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const y=Ct(h).replace("Z",""),b=f.path(y,p),v=Ct(d),C=f.path(v,{...p}),E=i.insert("g",":first-child");return E.insert(()=>C,":first-child").attr("stroke-opacity",0),E.insert(()=>b,":first-child"),E.attr("class","text"),u&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",u),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Ue(e,E),e.intersect=function(_){return Be.polygon(e,d,_)},i}w(hC,"curlyBraceLeft");function Bi(t,e,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,u=(a*Math.PI/180-o)/(n-1);for(let h=0;h<n;h++){const d=o+h*u,f=t+r*Math.cos(d),p=e+r*Math.sin(d);s.push({x:f,y:p})}return s}w(Bi,"generateCirclePoints");async function dC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=a.width+(e.padding??0),l=a.height+(e.padding??0),c=Math.max(5,l*.1),{cssStyles:u}=e,h=[...Bi(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...Bi(o/2+c*2,-c,c,20,-180,-270),...Bi(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...Bi(o/2,l/2,c,20,0,90)],d=[{x:-o/2,y:-l/2-c},{x:o/2,y:-l/2-c},...Bi(o/2,-l/2,c,20,-90,0),{x:o/2+c,y:-c},...Bi(o/2+c*2,-c,c,20,-180,-270),...Bi(o/2+c*2,c,c,20,-90,-180),{x:o/2+c,y:l/2},...Bi(o/2,l/2,c,20,0,90),{x:o/2,y:l/2+c},{x:-o/2,y:l/2+c}],f=He.svg(i),p=je(e,{fill:"none"});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const y=Ct(h).replace("Z",""),b=f.path(y,p),v=Ct(d),C=f.path(v,{...p}),E=i.insert("g",":first-child");return E.insert(()=>C,":first-child").attr("stroke-opacity",0),E.insert(()=>b,":first-child"),E.attr("class","text"),u&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",u),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Ue(e,E),e.intersect=function(_){return Be.polygon(e,d,_)},i}w(dC,"curlyBraceRight");function Cr(t,e,r,n=100,i=0,a=180){const s=[],o=i*Math.PI/180,u=(a*Math.PI/180-o)/(n-1);for(let h=0;h<n;h++){const d=o+h*u,f=t+r*Math.cos(d),p=e+r*Math.sin(d);s.push({x:-f,y:-p})}return s}w(Cr,"generateCirclePoints");async function fC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=a.width+(e.padding??0),l=a.height+(e.padding??0),c=Math.max(5,l*.1),{cssStyles:u}=e,h=[...Cr(o/2,-l/2,c,30,-90,0),{x:-o/2-c,y:c},...Cr(o/2+c*2,-c,c,20,-180,-270),...Cr(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:-l/2},...Cr(o/2,l/2,c,20,0,90)],d=[...Cr(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...Cr(-o/2-c/2,-c,c,20,0,90),...Cr(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...Cr(-o/2+c+c/2,l/2,c,30,-180,-270)],f=[{x:o/2,y:-l/2-c},{x:-o/2,y:-l/2-c},...Cr(o/2,-l/2,c,20,-90,0),{x:-o/2-c,y:-c},...Cr(o/2+c*2,-c,c,20,-180,-270),...Cr(o/2+c*2,c,c,20,-90,-180),{x:-o/2-c,y:l/2},...Cr(o/2,l/2,c,20,0,90),{x:-o/2,y:l/2+c},{x:o/2-c-c/2,y:l/2+c},...Cr(-o/2+c+c/2,-l/2,c,20,-90,-180),{x:o/2-c/2,y:c},...Cr(-o/2-c/2,-c,c,20,0,90),...Cr(-o/2-c/2,c,c,20,-90,0),{x:o/2-c/2,y:-c},...Cr(-o/2+c+c/2,l/2,c,30,-180,-270)],p=He.svg(i),m=je(e,{fill:"none"});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const b=Ct(h).replace("Z",""),v=p.path(b,m),E=Ct(d).replace("Z",""),_=p.path(E,m),k=Ct(f),N=p.path(k,{...m}),D=i.insert("g",":first-child");return D.insert(()=>N,":first-child").attr("stroke-opacity",0),D.insert(()=>v,":first-child"),D.insert(()=>_,":first-child"),D.attr("class","text"),u&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",u),n&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",n),D.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Ue(e,D),e.intersect=function($){return Be.polygon(e,f,$)},i}w(fC,"curlyBraces");async function pC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=80,o=20,l=Math.max(s,(a.width+(e.padding??0)*2)*1.25,(e==null?void 0:e.width)??0),c=Math.max(o,a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),u=c/2,{cssStyles:h}=e,d=He.svg(i),f=je(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=l,m=c,y=p-u,b=m/4,v=[{x:y,y:0},{x:b,y:0},{x:0,y:m/2},{x:b,y:m},{x:y,y:m},...dc(-y,-m/2,u,50,270,90)],C=Ct(v),E=d.path(C,f),_=i.insert(()=>E,":first-child");return _.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&_.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&_.selectChildren("path").attr("style",n),_.attr("transform",`translate(${-l/2}, ${-c/2})`),Ue(e,_),e.intersect=function(k){return Be.polygon(e,v,k)},i}w(pC,"curvedTrapezoid");var ste=w((t,e,r,n,i,a)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),ote=w((t,e,r,n,i,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),lte=w((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function mC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=Math.max(a.width+e.padding,e.width??0),l=o/2,c=l/(2.5+o/50),u=Math.max(a.height+c+e.padding,e.height??0);let h;const{cssStyles:d}=e;if(e.look==="handDrawn"){const f=He.svg(i),p=ote(0,0,o,u,l,c),m=lte(0,c,o,u,l,c),y=f.path(p,je(e,{})),b=f.path(m,je(e,{fill:"none"}));h=i.insert(()=>b,":first-child"),h=i.insert(()=>y,":first-child"),h.attr("class","basic label-container"),d&&h.attr("style",d)}else{const f=ste(0,0,o,u,l,c);h=i.insert("path",":first-child").attr("d",f).attr("class","basic label-container").attr("style",Dr(d)).attr("style",n)}return h.attr("label-offset-y",c),h.attr("transform",`translate(${-o/2}, ${-(u/2+c)})`),Ue(e,h),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(e.padding??0)/1.5-(a.y-(a.top??0))})`),e.intersect=function(f){const p=Be.rect(e,f),m=p.x-(e.x??0);if(l!=0&&(Math.abs(m)<(e.width??0)/2||Math.abs(m)==(e.width??0)/2&&Math.abs(p.y-(e.y??0))>(e.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,f.y-(e.y??0)>0&&(y=-y),p.y+=y}return p},i}w(mC,"cylinder");async function gC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=a.width+e.padding,l=a.height+e.padding,c=l*.2,u=-o/2,h=-l/2-c/2,{cssStyles:d}=e,f=He.svg(i),p=je(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:u,y:h+c},{x:-u,y:h+c},{x:-u,y:-h},{x:u,y:-h},{x:u,y:h},{x:-u,y:h},{x:-u,y:h+c}],y=f.polygon(m.map(v=>[v.x,v.y]),p),b=i.insert(()=>y,":first-child");return b.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${u+(e.padding??0)/2-(a.x-(a.left??0))}, ${h+c+(e.padding??0)/2-(a.y-(a.top??0))})`),Ue(e,b),e.intersect=function(v){return Be.rect(e,v)},i}w(gC,"dividedRectangle");async function bC(t,e){var d,f;const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:s}=await st(t,e,rt(e)),l=a.width/2+s+5,c=a.width/2+s;let u;const{cssStyles:h}=e;if(e.look==="handDrawn"){const p=He.svg(i),m=je(e,{roughness:.2,strokeWidth:2.5}),y=je(e,{roughness:.2,strokeWidth:1.5}),b=p.circle(0,0,l*2,m),v=p.circle(0,0,c*2,y);u=i.insert("g",":first-child"),u.attr("class",Dr(e.cssClasses)).attr("style",Dr(h)),(d=u.node())==null||d.appendChild(b),(f=u.node())==null||f.appendChild(v)}else{u=i.insert("g",":first-child");const p=u.insert("circle",":first-child"),m=u.insert("circle");u.attr("class","basic label-container").attr("style",n),p.attr("class","outer-circle").attr("style",n).attr("r",l).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0)}return Ue(e,u),e.intersect=function(p){return he.info("DoubleCircle intersect",e,l,p),Be.circle(e,l,p)},i}w(bC,"doublecircle");function yC(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=ze(e);e.label="",e.labelStyle=n;const a=t.insert("g").attr("class",rt(e)).attr("id",e.domId??e.id),s=7,{cssStyles:o}=e,l=He.svg(a),{nodeBorder:c}=r,u=je(e,{fillStyle:"solid"});e.look!=="handDrawn"&&(u.roughness=0);const h=l.circle(0,0,s*2,u),d=a.insert(()=>h,":first-child");return d.selectAll("path").attr("style",`fill: ${c} !important;`),o&&o.length>0&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",o),i&&e.look!=="handDrawn"&&d.selectAll("path").attr("style",i),Ue(e,d),e.intersect=function(f){return he.info("filledCircle intersect",e,{radius:s,point:f}),Be.circle(e,s,f)},a}w(yC,"filledCircle");async function xC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=a.width+(e.padding??0),l=o+a.height,c=o+a.height,u=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:h}=e,d=He.svg(i),f=je(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=Ct(u),m=d.path(p,f),y=i.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return h&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),e.width=o,e.height=l,Ue(e,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(b){return he.info("Triangle intersect",e,u,b),Be.polygon(e,u,b)},i}w(xC,"flippedTriangle");function vC(t,e,{dir:r,config:{state:n,themeVariables:i}}){const{nodeStyles:a}=ze(e);e.label="";const s=t.insert("g").attr("class",rt(e)).attr("id",e.domId??e.id),{cssStyles:o}=e;let l=Math.max(70,(e==null?void 0:e.width)??0),c=Math.max(10,(e==null?void 0:e.height)??0);r==="LR"&&(l=Math.max(10,(e==null?void 0:e.width)??0),c=Math.max(70,(e==null?void 0:e.height)??0));const u=-1*l/2,h=-1*c/2,d=He.svg(s),f=je(e,{stroke:i.lineColor,fill:i.lineColor});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=d.rectangle(u,h,l,c,f),m=s.insert(()=>p,":first-child");o&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&e.look!=="handDrawn"&&m.selectAll("path").attr("style",a),Ue(e,m);const y=(n==null?void 0:n.padding)??0;return e.width&&e.height&&(e.width+=y/2||0,e.height+=y/2||0),e.intersect=function(b){return Be.rect(e,b)},s}w(vC,"forkJoin");async function kC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const i=80,a=50,{shapeSvg:s,bbox:o}=await st(t,e,rt(e)),l=Math.max(i,o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(a,o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),u=c/2,{cssStyles:h}=e,d=He.svg(s),f=je(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:-l/2,y:-c/2},{x:l/2-u,y:-c/2},...dc(-l/2+u,0,u,50,90,270),{x:l/2-u,y:c/2},{x:-l/2,y:c/2}],m=Ct(p),y=d.path(m,f),b=s.insert(()=>y,":first-child");return b.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),Ue(e,b),e.intersect=function(v){return he.info("Pill intersect",e,{radius:u,point:v}),Be.polygon(e,p,v)},s}w(kC,"halfRoundedRectangle");async function wC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=a.height+(e.padding??0),o=a.width+(e.padding??0)*2.5,{cssStyles:l}=e,c=He.svg(i),u=je(e,{});e.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=o/2;const d=h/6;h=h+d;const f=s/2,p=f/2,m=h-p,y=[{x:-m,y:-f},{x:0,y:-f},{x:m,y:-f},{x:h,y:0},{x:m,y:f},{x:0,y:f},{x:-m,y:f},{x:-h,y:0}],b=Ct(y),v=c.path(b,u),C=i.insert(()=>v,":first-child");return C.attr("class","basic label-container"),l&&e.look!=="handDrawn"&&C.selectChildren("path").attr("style",l),n&&e.look!=="handDrawn"&&C.selectChildren("path").attr("style",n),e.width=o,e.height=s,Ue(e,C),e.intersect=function(E){return Be.polygon(e,y,E)},i}w(wC,"hexagon");async function TC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.label="",e.labelStyle=r;const{shapeSvg:i}=await st(t,e,rt(e)),a=Math.max(30,(e==null?void 0:e.width)??0),s=Math.max(30,(e==null?void 0:e.height)??0),{cssStyles:o}=e,l=He.svg(i),c=je(e,{});e.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const u=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],h=Ct(u),d=l.path(h,c),f=i.insert(()=>d,":first-child");return f.attr("class","basic label-container"),o&&e.look!=="handDrawn"&&f.selectChildren("path").attr("style",o),n&&e.look!=="handDrawn"&&f.selectChildren("path").attr("style",n),f.attr("transform",`translate(${-a/2}, ${-s/2})`),Ue(e,f),e.intersect=function(p){return he.info("Pill intersect",e,{points:u}),Be.polygon(e,u,p)},i}w(TC,"hourglass");async function CC(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=ze(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n==null?void 0:n.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:u,label:h}=await st(t,e,"icon-shape default"),d=e.pos==="t",f=o,p=o,{nodeBorder:m}=r,{stylesMap:y}=Do(e),b=-p/2,v=-f/2,C=e.label?8:0,E=He.svg(c),_=je(e,{stroke:"none",fill:"none"});e.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=E.rectangle(b,v,p,f,_),N=Math.max(p,u.width),D=f+u.height+C,$=E.rectangle(-N/2,-D/2,N,D,{..._,fill:"transparent",stroke:"none"}),R=c.insert(()=>k,":first-child"),P=c.insert(()=>$);if(e.icon){const G=c.append("g");G.html(`<g>${await Fo(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const ee=G.node().getBBox(),W=ee.width,U=ee.height,j=ee.x,Q=ee.y;G.attr("transform",`translate(${-W/2-j},${d?u.height/2+C/2-U/2-Q:-u.height/2-C/2-U/2-Q})`),G.attr("style",`color: ${y.get("stroke")??m};`)}return h.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${d?-D/2:D/2-u.height})`),R.attr("transform",`translate(0,${d?u.height/2+C/2:-u.height/2-C/2})`),Ue(e,P),e.intersect=function(G){if(he.info("iconSquare intersect",e,G),!e.label)return Be.rect(e,G);const ee=e.x??0,W=e.y??0,U=e.height??0;let j=[];return d?j=[{x:ee-u.width/2,y:W-U/2},{x:ee+u.width/2,y:W-U/2},{x:ee+u.width/2,y:W-U/2+u.height+C},{x:ee+p/2,y:W-U/2+u.height+C},{x:ee+p/2,y:W+U/2},{x:ee-p/2,y:W+U/2},{x:ee-p/2,y:W-U/2+u.height+C},{x:ee-u.width/2,y:W-U/2+u.height+C}]:j=[{x:ee-p/2,y:W-U/2},{x:ee+p/2,y:W-U/2},{x:ee+p/2,y:W-U/2+f},{x:ee+u.width/2,y:W-U/2+f},{x:ee+u.width/2/2,y:W+U/2},{x:ee-u.width/2,y:W+U/2},{x:ee-u.width/2,y:W-U/2+f},{x:ee-p/2,y:W-U/2+f}],Be.polygon(e,j,G)},c}w(CC,"icon");async function SC(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=ze(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n==null?void 0:n.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:u,label:h}=await st(t,e,"icon-shape default"),d=20,f=e.label?8:0,p=e.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:b}=Do(e),v=He.svg(c),C=je(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const E=b.get("fill");C.stroke=E??y;const _=c.append("g");e.icon&&_.html(`<g>${await Fo(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const k=_.node().getBBox(),N=k.width,D=k.height,$=k.x,R=k.y,P=Math.max(N,D)*Math.SQRT2+d*2,G=v.circle(0,0,P,C),ee=Math.max(P,u.width),W=P+u.height+f,U=v.rectangle(-ee/2,-W/2,ee,W,{...C,fill:"transparent",stroke:"none"}),j=c.insert(()=>G,":first-child"),Q=c.insert(()=>U);return _.attr("transform",`translate(${-N/2-$},${p?u.height/2+f/2-D/2-R:-u.height/2-f/2-D/2-R})`),_.attr("style",`color: ${b.get("stroke")??m};`),h.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-W/2:W/2-u.height})`),j.attr("transform",`translate(0,${p?u.height/2+f/2:-u.height/2-f/2})`),Ue(e,Q),e.intersect=function(Y){return he.info("iconSquare intersect",e,Y),Be.rect(e,Y)},c}w(SC,"iconCircle");async function _C(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=ze(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n==null?void 0:n.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:u,halfPadding:h,label:d}=await st(t,e,"icon-shape default"),f=e.pos==="t",p=o+h*2,m=o+h*2,{nodeBorder:y,mainBkg:b}=r,{stylesMap:v}=Do(e),C=-m/2,E=-p/2,_=e.label?8:0,k=He.svg(c),N=je(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const D=v.get("fill");N.stroke=D??b;const $=k.path(Ma(C,E,m,p,5),N),R=Math.max(m,u.width),P=p+u.height+_,G=k.rectangle(-R/2,-P/2,R,P,{...N,fill:"transparent",stroke:"none"}),ee=c.insert(()=>$,":first-child").attr("class","icon-shape2"),W=c.insert(()=>G);if(e.icon){const U=c.append("g");U.html(`<g>${await Fo(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const j=U.node().getBBox(),Q=j.width,Y=j.height,be=j.x,L=j.y;U.attr("transform",`translate(${-Q/2-be},${f?u.height/2+_/2-Y/2-L:-u.height/2-_/2-Y/2-L})`),U.attr("style",`color: ${v.get("stroke")??y};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${f?-P/2:P/2-u.height})`),ee.attr("transform",`translate(0,${f?u.height/2+_/2:-u.height/2-_/2})`),Ue(e,W),e.intersect=function(U){if(he.info("iconSquare intersect",e,U),!e.label)return Be.rect(e,U);const j=e.x??0,Q=e.y??0,Y=e.height??0;let be=[];return f?be=[{x:j-u.width/2,y:Q-Y/2},{x:j+u.width/2,y:Q-Y/2},{x:j+u.width/2,y:Q-Y/2+u.height+_},{x:j+m/2,y:Q-Y/2+u.height+_},{x:j+m/2,y:Q+Y/2},{x:j-m/2,y:Q+Y/2},{x:j-m/2,y:Q-Y/2+u.height+_},{x:j-u.width/2,y:Q-Y/2+u.height+_}]:be=[{x:j-m/2,y:Q-Y/2},{x:j+m/2,y:Q-Y/2},{x:j+m/2,y:Q-Y/2+p},{x:j+u.width/2,y:Q-Y/2+p},{x:j+u.width/2/2,y:Q+Y/2},{x:j-u.width/2,y:Q+Y/2},{x:j-u.width/2,y:Q-Y/2+p},{x:j-m/2,y:Q-Y/2+p}],Be.polygon(e,be,U)},c}w(_C,"iconRounded");async function EC(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:i}=ze(e);e.labelStyle=i;const a=e.assetHeight??48,s=e.assetWidth??48,o=Math.max(a,s),l=n==null?void 0:n.wrappingWidth;e.width=Math.max(o,l??0);const{shapeSvg:c,bbox:u,halfPadding:h,label:d}=await st(t,e,"icon-shape default"),f=e.pos==="t",p=o+h*2,m=o+h*2,{nodeBorder:y,mainBkg:b}=r,{stylesMap:v}=Do(e),C=-m/2,E=-p/2,_=e.label?8:0,k=He.svg(c),N=je(e,{});e.look!=="handDrawn"&&(N.roughness=0,N.fillStyle="solid");const D=v.get("fill");N.stroke=D??b;const $=k.path(Ma(C,E,m,p,.1),N),R=Math.max(m,u.width),P=p+u.height+_,G=k.rectangle(-R/2,-P/2,R,P,{...N,fill:"transparent",stroke:"none"}),ee=c.insert(()=>$,":first-child"),W=c.insert(()=>G);if(e.icon){const U=c.append("g");U.html(`<g>${await Fo(e.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const j=U.node().getBBox(),Q=j.width,Y=j.height,be=j.x,L=j.y;U.attr("transform",`translate(${-Q/2-be},${f?u.height/2+_/2-Y/2-L:-u.height/2-_/2-Y/2-L})`),U.attr("style",`color: ${v.get("stroke")??y};`)}return d.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${f?-P/2:P/2-u.height})`),ee.attr("transform",`translate(0,${f?u.height/2+_/2:-u.height/2-_/2})`),Ue(e,W),e.intersect=function(U){if(he.info("iconSquare intersect",e,U),!e.label)return Be.rect(e,U);const j=e.x??0,Q=e.y??0,Y=e.height??0;let be=[];return f?be=[{x:j-u.width/2,y:Q-Y/2},{x:j+u.width/2,y:Q-Y/2},{x:j+u.width/2,y:Q-Y/2+u.height+_},{x:j+m/2,y:Q-Y/2+u.height+_},{x:j+m/2,y:Q+Y/2},{x:j-m/2,y:Q+Y/2},{x:j-m/2,y:Q-Y/2+u.height+_},{x:j-u.width/2,y:Q-Y/2+u.height+_}]:be=[{x:j-m/2,y:Q-Y/2},{x:j+m/2,y:Q-Y/2},{x:j+m/2,y:Q-Y/2+p},{x:j+u.width/2,y:Q-Y/2+p},{x:j+u.width/2/2,y:Q+Y/2},{x:j-u.width/2,y:Q+Y/2},{x:j-u.width/2,y:Q-Y/2+p},{x:j-m/2,y:Q-Y/2+p}],Be.polygon(e,be,U)},c}w(EC,"iconSquare");async function AC(t,e,{config:{flowchart:r}}){const n=new Image;n.src=(e==null?void 0:e.img)??"",await n.decode();const i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/a;const{labelStyles:s}=ze(e);e.labelStyle=s;const o=r==null?void 0:r.wrappingWidth;e.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(e.label?o??0:0,(e==null?void 0:e.assetWidth)??i),c=e.constraint==="on"&&e!=null&&e.assetHeight?e.assetHeight*e.imageAspectRatio:l,u=e.constraint==="on"?c/e.imageAspectRatio:(e==null?void 0:e.assetHeight)??a;e.width=Math.max(c,o??0);const{shapeSvg:h,bbox:d,label:f}=await st(t,e,"image-shape default"),p=e.pos==="t",m=-c/2,y=-u/2,b=e.label?8:0,v=He.svg(h),C=je(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const E=v.rectangle(m,y,c,u,C),_=Math.max(c,d.width),k=u+d.height+b,N=v.rectangle(-_/2,-k/2,_,k,{...C,fill:"none",stroke:"none"}),D=h.insert(()=>E,":first-child"),$=h.insert(()=>N);if(e.img){const R=h.append("image");R.attr("href",e.img),R.attr("width",c),R.attr("height",u),R.attr("preserveAspectRatio","none"),R.attr("transform",`translate(${-c/2},${p?k/2-u:-k/2})`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${p?-u/2-d.height/2-b/2:u/2-d.height/2+b/2})`),D.attr("transform",`translate(0,${p?d.height/2+b/2:-d.height/2-b/2})`),Ue(e,$),e.intersect=function(R){if(he.info("iconSquare intersect",e,R),!e.label)return Be.rect(e,R);const P=e.x??0,G=e.y??0,ee=e.height??0;let W=[];return p?W=[{x:P-d.width/2,y:G-ee/2},{x:P+d.width/2,y:G-ee/2},{x:P+d.width/2,y:G-ee/2+d.height+b},{x:P+c/2,y:G-ee/2+d.height+b},{x:P+c/2,y:G+ee/2},{x:P-c/2,y:G+ee/2},{x:P-c/2,y:G-ee/2+d.height+b},{x:P-d.width/2,y:G-ee/2+d.height+b}]:W=[{x:P-c/2,y:G-ee/2},{x:P+c/2,y:G-ee/2},{x:P+c/2,y:G-ee/2+u},{x:P+d.width/2,y:G-ee/2+u},{x:P+d.width/2/2,y:G+ee/2},{x:P-d.width/2,y:G+ee/2},{x:P-d.width/2,y:G-ee/2+u},{x:P-c/2,y:G-ee/2+u}],Be.polygon(e,W,R)},h}w(AC,"imageSquare");async function NC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),o=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:u}=e;if(e.look==="handDrawn"){const h=He.svg(i),d=je(e,{}),f=Ct(l),p=h.path(f,d);c=i.insert(()=>p,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&c.attr("style",u)}else c=Ia(i,s,o,l);return n&&c.attr("style",n),e.width=s,e.height=o,Ue(e,c),e.intersect=function(h){return Be.polygon(e,l,h)},i}w(NC,"inv_trapezoid");async function td(t,e,r){const{labelStyles:n,nodeStyles:i}=ze(e);e.labelStyle=n;const{shapeSvg:a,bbox:s}=await st(t,e,rt(e)),o=Math.max(s.width+r.labelPaddingX*2,(e==null?void 0:e.width)||0),l=Math.max(s.height+r.labelPaddingY*2,(e==null?void 0:e.height)||0),c=-o/2,u=-l/2;let h,{rx:d,ry:f}=e;const{cssStyles:p}=e;if(r!=null&&r.rx&&r.ry&&(d=r.rx,f=r.ry),e.look==="handDrawn"){const m=He.svg(a),y=je(e,{}),b=d||f?m.path(Ma(c,u,o,l,d||0),y):m.rectangle(c,u,o,l,y);h=a.insert(()=>b,":first-child"),h.attr("class","basic label-container").attr("style",Dr(p))}else h=a.insert("rect",":first-child"),h.attr("class","basic label-container").attr("style",i).attr("rx",Dr(d)).attr("ry",Dr(f)).attr("x",c).attr("y",u).attr("width",o).attr("height",l);return Ue(e,h),e.calcIntersect=function(m,y){return Be.rect(m,y)},e.intersect=function(m){return Be.rect(e,m)},a}w(td,"drawRect");async function LC(t,e){const{shapeSvg:r,bbox:n,label:i}=await st(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Ue(e,a),e.intersect=function(l){return Be.rect(e,l)},r}w(LC,"labelRect");async function MC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=Math.max(a.width+(e.padding??0),(e==null?void 0:e.width)??0),o=Math.max(a.height+(e.padding??0),(e==null?void 0:e.height)??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}];let c;const{cssStyles:u}=e;if(e.look==="handDrawn"){const h=He.svg(i),d=je(e,{}),f=Ct(l),p=h.path(f,d);c=i.insert(()=>p,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&c.attr("style",u)}else c=Ia(i,s,o,l);return n&&c.attr("style",n),e.width=s,e.height=o,Ue(e,c),e.intersect=function(h){return Be.polygon(e,l,h)},i}w(MC,"lean_left");async function IC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=Math.max(a.width+(e.padding??0),(e==null?void 0:e.width)??0),o=Math.max(a.height+(e.padding??0),(e==null?void 0:e.height)??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}];let c;const{cssStyles:u}=e;if(e.look==="handDrawn"){const h=He.svg(i),d=je(e,{}),f=Ct(l),p=h.path(f,d);c=i.insert(()=>p,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&c.attr("style",u)}else c=Ia(i,s,o,l);return n&&c.attr("style",n),e.width=s,e.height=o,Ue(e,c),e.intersect=function(h){return Be.polygon(e,l,h)},i}w(IC,"lean_right");function RC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.label="",e.labelStyle=r;const i=t.insert("g").attr("class",rt(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,(e==null?void 0:e.width)??0),o=Math.max(35,(e==null?void 0:e.height)??0),l=7,c=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],u=He.svg(i),h=je(e,{});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=Ct(c),f=u.path(d,h),p=i.insert(()=>f,":first-child");return a&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",a),n&&e.look!=="handDrawn"&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(-${s/2},${-o})`),Ue(e,p),e.intersect=function(m){return he.info("lightningBolt intersect",e,m),Be.polygon(e,c,m)},i}w(RC,"lightningBolt");var cte=w((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),ute=w((t,e,r,n,i,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${t},${e+a+s}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),hte=w((t,e,r,n,i,a)=>[`M${t-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function BC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=Math.max(a.width+(e.padding??0),e.width??0),l=o/2,c=l/(2.5+o/50),u=Math.max(a.height+c+(e.padding??0),e.height??0),h=u*.1;let d;const{cssStyles:f}=e;if(e.look==="handDrawn"){const p=He.svg(i),m=ute(0,0,o,u,l,c,h),y=hte(0,c,o,u,l,c),b=je(e,{}),v=p.path(m,b),C=p.path(y,b);i.insert(()=>C,":first-child").attr("class","line"),d=i.insert(()=>v,":first-child"),d.attr("class","basic label-container"),f&&d.attr("style",f)}else{const p=cte(0,0,o,u,l,c,h);d=i.insert("path",":first-child").attr("d",p).attr("class","basic label-container").attr("style",Dr(f)).attr("style",n)}return d.attr("label-offset-y",c),d.attr("transform",`translate(${-o/2}, ${-(u/2+c)})`),Ue(e,d),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),e.intersect=function(p){const m=Be.rect(e,p),y=m.x-(e.x??0);if(l!=0&&(Math.abs(y)<(e.width??0)/2||Math.abs(y)==(e.width??0)/2&&Math.abs(m.y-(e.y??0))>(e.height??0)/2-c)){let b=c*c*(1-y*y/(l*l));b>0&&(b=Math.sqrt(b)),b=c-b,p.y-(e.y??0)>0&&(b=-b),m.y+=b}return m},i}w(BC,"linedCylinder");async function DC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=l/4,u=l+c,{cssStyles:h}=e,d=He.svg(i),f=je(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:-o/2-o/2*.1,y:-u/2},{x:-o/2-o/2*.1,y:u/2},..._a(-o/2-o/2*.1,u/2,o/2+o/2*.1,u/2,c,.8),{x:o/2+o/2*.1,y:-u/2},{x:-o/2-o/2*.1,y:-u/2},{x:-o/2,y:-u/2},{x:-o/2,y:u/2*1.1},{x:-o/2,y:-u/2}],m=d.polygon(p.map(b=>[b.x,b.y]),f),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&y.selectAll("path").attr("style",n),y.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c/2-(a.y-(a.top??0))})`),Ue(e,y),e.intersect=function(b){return Be.polygon(e,p,b)},i}w(DC,"linedWaveEdgedRect");async function OC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=5,u=-o/2,h=-l/2,{cssStyles:d}=e,f=He.svg(i),p=je(e,{}),m=[{x:u-c,y:h+c},{x:u-c,y:h+l+c},{x:u+o-c,y:h+l+c},{x:u+o-c,y:h+l},{x:u+o,y:h+l},{x:u+o,y:h+l-c},{x:u+o+c,y:h+l-c},{x:u+o+c,y:h-c},{x:u+c,y:h-c},{x:u+c,y:h},{x:u,y:h},{x:u,y:h+c}],y=[{x:u,y:h+c},{x:u+o-c,y:h+c},{x:u+o-c,y:h+l},{x:u+o,y:h+l},{x:u+o,y:h},{x:u,y:h}];e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const b=Ct(m),v=f.path(b,p),C=Ct(y),E=f.path(C,{...p,fill:"none"}),_=i.insert(()=>E,":first-child");return _.insert(()=>v,":first-child"),_.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),Ue(e,_),e.intersect=function(k){return Be.polygon(e,m,k)},i}w(OC,"multiRect");async function PC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=l/4,u=l+c,h=-o/2,d=-u/2,f=5,{cssStyles:p}=e,m=_a(h-f,d+u+f,h+o-f,d+u+f,c,.8),y=m==null?void 0:m[m.length-1],b=[{x:h-f,y:d+f},{x:h-f,y:d+u+f},...m,{x:h+o-f,y:y.y-f},{x:h+o,y:y.y-f},{x:h+o,y:y.y-2*f},{x:h+o+f,y:y.y-2*f},{x:h+o+f,y:d-f},{x:h+f,y:d-f},{x:h+f,y:d},{x:h,y:d},{x:h,y:d+f}],v=[{x:h,y:d+f},{x:h+o-f,y:d+f},{x:h+o-f,y:y.y-f},{x:h+o,y:y.y-f},{x:h+o,y:d},{x:h,y:d}],C=He.svg(i),E=je(e,{});e.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const _=Ct(b),k=C.path(_,E),N=Ct(v),D=C.path(N,E),$=i.insert(()=>k,":first-child");return $.insert(()=>D),$.attr("class","basic label-container"),p&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",p),n&&e.look!=="handDrawn"&&$.selectAll("path").attr("style",n),$.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-(a.width/2)-f-(a.x-(a.left??0))}, ${-(a.height/2)+f-c/2-(a.y-(a.top??0))})`),Ue(e,$),e.intersect=function(R){return Be.polygon(e,b,R)},i}w(PC,"multiWaveEdgedRectangle");async function FC(t,e,{config:{themeVariables:r}}){var v;const{labelStyles:n,nodeStyles:i}=ze(e);e.labelStyle=n,e.useHtmlLabels||((v=_r().flowchart)==null?void 0:v.htmlLabels)!==!1||(e.centerLabel=!0);const{shapeSvg:s,bbox:o,label:l}=await st(t,e,rt(e)),c=Math.max(o.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),u=Math.max(o.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),h=-c/2,d=-u/2,{cssStyles:f}=e,p=He.svg(s),m=je(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=p.rectangle(h,d,c,u,m),b=s.insert(()=>y,":first-child");return b.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",i),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Ue(e,b),e.intersect=function(C){return Be.rect(e,C)},s}w(FC,"note");var dte=w((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function $C(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=a.width+e.padding,o=a.height+e.padding,l=s+o,c=.5,u=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let h;const{cssStyles:d}=e;if(e.look==="handDrawn"){const f=He.svg(i),p=je(e,{}),m=dte(0,0,l),y=f.path(m,p);h=i.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),d&&h.attr("style",d)}else h=Ia(i,l,l,u),h.attr("transform",`translate(${-l/2+c}, ${l/2})`);return n&&h.attr("style",n),Ue(e,h),e.calcIntersect=function(f,p){const m=f.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],b=Be.polygon(f,y,p);return{x:b.x-.5,y:b.y-.5}},e.intersect=function(f){return this.calcIntersect(e,f)},i}w($C,"question");async function zC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=Math.max(a.width+(e.padding??0),(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0),(e==null?void 0:e.height)??0),c=-o/2,u=-l/2,h=u/2,d=[{x:c+h,y:u},{x:c,y:0},{x:c+h,y:-u},{x:-c,y:-u},{x:-c,y:u}],{cssStyles:f}=e,p=He.svg(i),m=je(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=Ct(d),b=p.path(y,m),v=i.insert(()=>b,":first-child");return v.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${-h/2},0)`),s.attr("transform",`translate(${-h/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Ue(e,v),e.intersect=function(C){return Be.polygon(e,d,C)},i}w(zC,"rect_left_inv_arrow");async function HC(t,e){var D,$;const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;let i;e.cssClasses?i="node "+e.cssClasses:i="node default";const a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",n),l=e.description,c=e.label,u=o.node().appendChild(await Qa(c,e.labelStyle,!0,!0));let h={width:0,height:0};if(cr(($=(D=Bt())==null?void 0:D.flowchart)==null?void 0:$.htmlLabels)){const R=u.children[0],P=At(u);h=R.getBoundingClientRect(),P.attr("width",h.width),P.attr("height",h.height)}he.info("Text 2",l);const d=l||[],f=u.getBBox(),p=o.node().appendChild(await Qa(d.join?d.join("<br/>"):d,e.labelStyle,!0,!0)),m=p.children[0],y=At(p);h=m.getBoundingClientRect(),y.attr("width",h.width),y.attr("height",h.height);const b=(e.padding||0)/2;At(p).attr("transform","translate( "+(h.width>f.width?0:(f.width-h.width)/2)+", "+(f.height+b+5)+")"),At(u).attr("transform","translate( "+(h.width<f.width?0:-(f.width-h.width)/2)+", 0)"),h=o.node().getBBox(),o.attr("transform","translate("+-h.width/2+", "+(-h.height/2-b+3)+")");const v=h.width+(e.padding||0),C=h.height+(e.padding||0),E=-h.width/2-b,_=-h.height/2-b;let k,N;if(e.look==="handDrawn"){const R=He.svg(a),P=je(e,{}),G=R.path(Ma(E,_,v,C,e.rx||0),P),ee=R.line(-h.width/2-b,-h.height/2-b+f.height+b,h.width/2+b,-h.height/2-b+f.height+b,P);N=a.insert(()=>(he.debug("Rough node insert CXC",G),ee),":first-child"),k=a.insert(()=>(he.debug("Rough node insert CXC",G),G),":first-child")}else k=s.insert("rect",":first-child"),N=s.insert("line"),k.attr("class","outer title-state").attr("style",n).attr("x",-h.width/2-b).attr("y",-h.height/2-b).attr("width",h.width+(e.padding||0)).attr("height",h.height+(e.padding||0)),N.attr("class","divider").attr("x1",-h.width/2-b).attr("x2",h.width/2+b).attr("y1",-h.height/2-b+f.height+b).attr("y2",-h.height/2-b+f.height+b);return Ue(e,k),e.intersect=function(R){return Be.rect(e,R)},a}w(HC,"rectWithTitle");function vl(t,e,r,n,i,a,s){const l=(t+r)/2,c=(e+n)/2,u=Math.atan2(n-e,r-t),h=(r-t)/2,d=(n-e)/2,f=h/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),b=l+y*a*Math.sin(u)*(s?-1:1),v=c-y*i*Math.cos(u)*(s?-1:1),C=Math.atan2((e-v)/a,(t-b)/i);let _=Math.atan2((n-v)/a,(r-b)/i)-C;s&&_<0&&(_+=2*Math.PI),!s&&_>0&&(_-=2*Math.PI);const k=[];for(let N=0;N<20;N++){const D=N/19,$=C+D*_,R=b+i*Math.cos($),P=v+a*Math.sin($);k.push({x:R,y:P})}return k}w(vl,"generateArcPoints");async function qC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=(e==null?void 0:e.padding)??0,o=(e==null?void 0:e.padding)??0,l=(e!=null&&e.width?e==null?void 0:e.width:a.width)+s*2,c=(e!=null&&e.height?e==null?void 0:e.height:a.height)+o*2,u=e.radius||5,h=e.taper||5,{cssStyles:d}=e,f=He.svg(i),p=je(e,{});e.stroke&&(p.stroke=e.stroke),e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:-l/2+h,y:-c/2},{x:l/2-h,y:-c/2},...vl(l/2-h,-c/2,l/2,-c/2+h,u,u,!0),{x:l/2,y:-c/2+h},{x:l/2,y:c/2-h},...vl(l/2,c/2-h,l/2-h,c/2,u,u,!0),{x:l/2-h,y:c/2},{x:-l/2+h,y:c/2},...vl(-l/2+h,c/2,-l/2,c/2-h,u,u,!0),{x:-l/2,y:c/2-h},{x:-l/2,y:-c/2+h},...vl(-l/2,-c/2+h,-l/2+h,-c/2,u,u,!0)],y=Ct(m),b=f.path(y,p),v=i.insert(()=>b,":first-child");return v.attr("class","basic label-container outer-path"),d&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&v.selectChildren("path").attr("style",n),Ue(e,v),e.intersect=function(C){return Be.polygon(e,m,C)},i}w(qC,"roundedRect");async function jC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=(e==null?void 0:e.padding)??0,l=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),u=-a.width/2-o,h=-a.height/2-o,{cssStyles:d}=e,f=He.svg(i),p=je(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=[{x:u,y:h},{x:u+l+8,y:h},{x:u+l+8,y:h+c},{x:u-8,y:h+c},{x:u-8,y:h},{x:u,y:h},{x:u,y:h+c}],y=f.polygon(m.map(v=>[v.x,v.y]),p),b=i.insert(()=>y,":first-child");return b.attr("class","basic label-container").attr("style",Dr(d)),n&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),d&&e.look!=="handDrawn"&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-l/2+4+(e.padding??0)-(a.x-(a.left??0))},${-c/2+(e.padding??0)-(a.y-(a.top??0))})`),Ue(e,b),e.intersect=function(v){return Be.rect(e,v)},i}w(jC,"shadedProcess");async function UC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=-o/2,u=-l/2,{cssStyles:h}=e,d=He.svg(i),f=je(e,{});e.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const p=[{x:c,y:u},{x:c,y:u+l},{x:c+o,y:u+l},{x:c+o,y:u-l/2}],m=Ct(p),y=d.path(m,f),b=i.insert(()=>y,":first-child");return b.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",h),n&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),b.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))}, ${-l/4+(e.padding??0)-(a.y-(a.top??0))})`),Ue(e,b),e.intersect=function(v){return Be.polygon(e,p,v)},i}w(UC,"slopedRect");async function WC(t,e){const r={rx:0,ry:0,labelPaddingX:e.labelPaddingX??((e==null?void 0:e.padding)||0)*2,labelPaddingY:((e==null?void 0:e.padding)||0)*1};return td(t,e,r)}w(WC,"squareRect");async function GC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=a.height+e.padding,o=a.width+s/4+e.padding,l=s/2,{cssStyles:c}=e,u=He.svg(i),h=je(e,{});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=[{x:-o/2+l,y:-s/2},{x:o/2-l,y:-s/2},...dc(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},...dc(o/2-l,0,l,50,270,450)],f=Ct(d),p=u.path(f,h),m=i.insert(()=>p,":first-child");return m.attr("class","basic label-container outer-path"),c&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),n&&e.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),Ue(e,m),e.intersect=function(y){return Be.polygon(e,d,y)},i}w(GC,"stadium");async function YC(t,e){return td(t,e,{rx:5,ry:5})}w(YC,"state");function VC(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:i}=ze(e);e.labelStyle=n;const{cssStyles:a}=e,{lineColor:s,stateBorder:o,nodeBorder:l}=r,c=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),u=He.svg(c),h=je(e,{});e.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const d=u.circle(0,0,14,{...h,stroke:s,strokeWidth:2}),f=o??l,p=u.circle(0,0,5,{...h,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>d,":first-child");return m.insert(()=>p),a&&m.selectAll("path").attr("style",a),i&&m.selectAll("path").attr("style",i),Ue(e,m),e.intersect=function(y){return Be.circle(e,7,y)},c}w(VC,"stateEnd");function XC(t,e,{config:{themeVariables:r}}){const{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let a;if(e.look==="handDrawn"){const o=He.svg(i).circle(0,0,14,XK(n));a=i.insert(()=>o),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=i.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Ue(e,a),e.intersect=function(s){return Be.circle(e,7,s)},i}w(XC,"stateStart");async function KC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=((e==null?void 0:e.padding)||0)/2,o=a.width+e.padding,l=a.height+e.padding,c=-a.width/2-s,u=-a.height/2-s,h=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(e.look==="handDrawn"){const d=He.svg(i),f=je(e,{}),p=d.rectangle(c-8,u,o+16,l,f),m=d.line(c,u,c,u+l,f),y=d.line(c+o,u,c+o,u+l,f);i.insert(()=>m,":first-child"),i.insert(()=>y,":first-child");const b=i.insert(()=>p,":first-child"),{cssStyles:v}=e;b.attr("class","basic label-container").attr("style",Dr(v)),Ue(e,b)}else{const d=Ia(i,o,l,h);n&&d.attr("style",n),Ue(e,d)}return e.intersect=function(d){return Be.polygon(e,h,d)},i}w(KC,"subroutine");async function QC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),o=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),l=-s/2,c=-o/2,u=.2*o,h=.2*o,{cssStyles:d}=e,f=He.svg(i),p=je(e,{}),m=[{x:l-u/2,y:c},{x:l+s+u/2,y:c},{x:l+s+u/2,y:c+o},{x:l-u/2,y:c+o}],y=[{x:l+s-u/2,y:c+o},{x:l+s+u/2,y:c+o},{x:l+s+u/2,y:c+o-h}];e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const b=Ct(m),v=f.path(b,p),C=Ct(y),E=f.path(C,{...p,fillStyle:"solid"}),_=i.insert(()=>E,":first-child");return _.insert(()=>v,":first-child"),_.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",n),Ue(e,_),e.intersect=function(k){return Be.polygon(e,m,k)},i}w(QC,"taggedRect");async function ZC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=l/4,u=.2*o,h=.2*l,d=l+c,{cssStyles:f}=e,p=He.svg(i),m=je(e,{});e.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-o/2-o/2*.1,y:d/2},..._a(-o/2-o/2*.1,d/2,o/2+o/2*.1,d/2,c,.8),{x:o/2+o/2*.1,y:-d/2},{x:-o/2-o/2*.1,y:-d/2}],b=-o/2+o/2*.1,v=-d/2-h*.4,C=[{x:b+o-u,y:(v+l)*1.4},{x:b+o,y:v+l-h},{x:b+o,y:(v+l)*.9},..._a(b+o,(v+l)*1.3,b+o-u,(v+l)*1.5,-l*.03,.5)],E=Ct(y),_=p.path(E,m),k=Ct(C),N=p.path(k,{...m,fillStyle:"solid"}),D=i.insert(()=>N,":first-child");return D.insert(()=>_,":first-child"),D.attr("class","basic label-container"),f&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",f),n&&e.look!=="handDrawn"&&D.selectAll("path").attr("style",n),D.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c/2-(a.y-(a.top??0))})`),Ue(e,D),e.intersect=function($){return Be.polygon(e,y,$)},i}w(ZC,"taggedWaveEdgedRectangle");async function JC(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=Math.max(a.width+e.padding,(e==null?void 0:e.width)||0),o=Math.max(a.height+e.padding,(e==null?void 0:e.height)||0),l=-s/2,c=-o/2,u=i.insert("rect",":first-child");return u.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",s).attr("height",o),Ue(e,u),e.intersect=function(h){return Be.rect(e,h)},i}w(JC,"text");var fte=w((t,e,r,n,i,a)=>`M${t},${e}
577
+ a${i},${a} 0,0,1 0,${-n}
578
+ l${r},0
579
+ a${i},${a} 0,0,1 0,${n}
580
+ M${r},${-n}
581
+ a${i},${a} 0,0,0 0,${n}
582
+ l${-r},0`,"createCylinderPathD"),pte=w((t,e,r,n,i,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),mte=w((t,e,r,n,i,a)=>[`M${t+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD");async function eS(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s,halfPadding:o}=await st(t,e,rt(e)),l=e.look==="neo"?o*2:o,c=a.height+l,u=c/2,h=u/(2.5+c/50),d=a.width+h+l,{cssStyles:f}=e;let p;if(e.look==="handDrawn"){const m=He.svg(i),y=pte(0,0,d,c,h,u),b=mte(0,0,d,c,h,u),v=m.path(y,je(e,{})),C=m.path(b,je(e,{fill:"none"}));p=i.insert(()=>C,":first-child"),p=i.insert(()=>v,":first-child"),p.attr("class","basic label-container"),f&&p.attr("style",f)}else{const m=fte(0,0,d,c,h,u);p=i.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",Dr(f)).attr("style",n),p.attr("class","basic label-container"),f&&p.selectAll("path").attr("style",f),n&&p.selectAll("path").attr("style",n)}return p.attr("label-offset-x",h),p.attr("transform",`translate(${-d/2}, ${c/2} )`),s.attr("transform",`translate(${-(a.width/2)-h-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),Ue(e,p),e.intersect=function(m){const y=Be.rect(e,m),b=y.y-(e.y??0);if(u!=0&&(Math.abs(b)<(e.height??0)/2||Math.abs(b)==(e.height??0)/2&&Math.abs(y.x-(e.x??0))>(e.width??0)/2-h)){let v=h*h*(1-b*b/(u*u));v!=0&&(v=Math.sqrt(Math.abs(v))),v=h-v,m.x-(e.x??0)>0&&(v=-v),y.x+=v}return y},i}w(eS,"tiltedCylinder");async function tS(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=a.width+e.padding,o=a.height+e.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}];let c;const{cssStyles:u}=e;if(e.look==="handDrawn"){const h=He.svg(i),d=je(e,{}),f=Ct(l),p=h.path(f,d);c=i.insert(()=>p,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),u&&c.attr("style",u)}else c=Ia(i,s,o,l);return n&&c.attr("style",n),e.width=s,e.height=o,Ue(e,c),e.intersect=function(h){return Be.polygon(e,l,h)},i}w(tS,"trapezoid");async function rS(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=60,o=20,l=Math.max(s,a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(o,a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),{cssStyles:u}=e,h=He.svg(i),d=je(e,{});e.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const f=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],p=Ct(f),m=h.path(p,d),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),n&&e.look!=="handDrawn"&&y.selectChildren("path").attr("style",n),Ue(e,y),e.intersect=function(b){return Be.polygon(e,f,b)},i}w(rS,"trapezoidalPentagon");async function nS(t,e){var v;const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=cr((v=Bt().flowchart)==null?void 0:v.htmlLabels),l=a.width+(e.padding??0),c=l+a.height,u=l+a.height,h=[{x:0,y:0},{x:u,y:0},{x:u/2,y:-c}],{cssStyles:d}=e,f=He.svg(i),p=je(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=Ct(h),y=f.path(m,p),b=i.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",d),n&&e.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),e.width=l,e.height=c,Ue(e,b),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(e.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(C){return he.info("Triangle intersect",e,h,C),Be.polygon(e,h,C)},i}w(nS,"triangle");async function iS(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=l/8,u=l+c,{cssStyles:h}=e,f=70-o,p=f>0?f/2:0,m=He.svg(i),y=je(e,{});e.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=[{x:-o/2-p,y:u/2},..._a(-o/2-p,u/2,o/2+p,u/2,c,.8),{x:o/2+p,y:-u/2},{x:-o/2-p,y:-u/2}],v=Ct(b),C=m.path(v,y),E=i.insert(()=>C,":first-child");return E.attr("class","basic label-container"),h&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",h),n&&e.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(a.x-(a.left??0))},${-l/2+(e.padding??0)-c-(a.y-(a.top??0))})`),Ue(e,E),e.intersect=function(_){return Be.polygon(e,b,_)},i}w(iS,"waveEdgedRectangle");async function aS(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a}=await st(t,e,rt(e)),s=100,o=50,l=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),c=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),u=l/c;let h=l,d=c;h>d*u?d=h/u:h=d*u,h=Math.max(h,s),d=Math.max(d,o);const f=Math.min(d*.2,d/4),p=d+f*2,{cssStyles:m}=e,y=He.svg(i),b=je(e,{});e.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const v=[{x:-h/2,y:p/2},..._a(-h/2,p/2,h/2,p/2,f,1),{x:h/2,y:-p/2},..._a(h/2,-p/2,-h/2,-p/2,f,-1)],C=Ct(v),E=y.path(C,b),_=i.insert(()=>E,":first-child");return _.attr("class","basic label-container"),m&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",m),n&&e.look!=="handDrawn"&&_.selectAll("path").attr("style",n),Ue(e,_),e.intersect=function(k){return Be.polygon(e,v,k)},i}w(aS,"waveRectangle");async function sS(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,label:s}=await st(t,e,rt(e)),o=Math.max(a.width+(e.padding??0)*2,(e==null?void 0:e.width)??0),l=Math.max(a.height+(e.padding??0)*2,(e==null?void 0:e.height)??0),c=5,u=-o/2,h=-l/2,{cssStyles:d}=e,f=He.svg(i),p=je(e,{}),m=[{x:u-c,y:h-c},{x:u-c,y:h+l},{x:u+o,y:h+l},{x:u+o,y:h-c}],y=`M${u-c},${h-c} L${u+o},${h-c} L${u+o},${h+l} L${u-c},${h+l} L${u-c},${h-c}
583
+ M${u-c},${h} L${u+o},${h}
584
+ M${u},${h-c} L${u},${h+l}`;e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const b=f.path(y,p),v=i.insert(()=>b,":first-child");return v.attr("transform",`translate(${c/2}, ${c/2})`),v.attr("class","basic label-container"),d&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",d),n&&e.look!=="handDrawn"&&v.selectAll("path").attr("style",n),s.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),Ue(e,v),e.intersect=function(C){return Be.polygon(e,m,C)},i}w(sS,"windowPane");async function Pg(t,e){var ae,I,ye,Ee;const r=e;if(r.alias&&(e.label=r.alias),e.look==="handDrawn"){const{themeVariables:de}=_r(),{background:we}=de,qe={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${we}`]};await Pg(t,qe)}const n=_r();e.useHtmlLabels=n.htmlLabels;let i=((ae=n.er)==null?void 0:ae.diagramPadding)??10,a=((I=n.er)==null?void 0:I.entityPadding)??6;const{cssStyles:s}=e,{labelStyles:o,nodeStyles:l}=ze(e);if(r.attributes.length===0&&e.label){const de={rx:0,ry:0,labelPaddingX:i,labelPaddingY:i*1.5};bi(e.label,n)+de.labelPaddingX*2<n.er.minEntityWidth&&(e.width=n.er.minEntityWidth);const we=await td(t,e,de);if(!cr(n.htmlLabels)){const qe=we.select("text"),Re=(ye=qe.node())==null?void 0:ye.getBBox();qe.attr("transform",`translate(${-Re.width/2}, 0)`)}return we}n.htmlLabels||(i*=1.25,a*=1.25);let c=rt(e);c||(c="node default");const u=t.insert("g").attr("class",c).attr("id",e.domId||e.id),h=await Ps(u,e.label??"",n,0,0,["name"],o);h.height+=a;let d=0;const f=[],p=[];let m=0,y=0,b=0,v=0,C=!0,E=!0;for(const de of r.attributes){const we=await Ps(u,de.type,n,0,d,["attribute-type"],o);m=Math.max(m,we.width+i);const qe=await Ps(u,de.name,n,0,d,["attribute-name"],o);y=Math.max(y,qe.width+i);const Re=await Ps(u,de.keys.join(),n,0,d,["attribute-keys"],o);b=Math.max(b,Re.width+i);const De=await Ps(u,de.comment,n,0,d,["attribute-comment"],o);v=Math.max(v,De.width+i);const et=Math.max(we.height,qe.height,Re.height,De.height)+a;p.push({yOffset:d,rowHeight:et}),d+=et}let _=4;b<=i&&(C=!1,b=0,_--),v<=i&&(E=!1,v=0,_--);const k=u.node().getBBox();if(h.width+i*2-(m+y+b+v)>0){const de=h.width+i*2-(m+y+b+v);m+=de/_,y+=de/_,b>0&&(b+=de/_),v>0&&(v+=de/_)}const N=m+y+b+v,D=He.svg(u),$=je(e,{});e.look!=="handDrawn"&&($.roughness=0,$.fillStyle="solid");let R=0;p.length>0&&(R=p.reduce((de,we)=>de+((we==null?void 0:we.rowHeight)??0),0));const P=Math.max(k.width+i*2,(e==null?void 0:e.width)||0,N),G=Math.max((R??0)+h.height,(e==null?void 0:e.height)||0),ee=-P/2,W=-G/2;u.selectAll("g:not(:first-child)").each((de,we,qe)=>{const Re=At(qe[we]),De=Re.attr("transform");let et=0,ot=0;if(De){const Et=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(De);Et&&(et=parseFloat(Et[1]),ot=parseFloat(Et[2]),Re.attr("class").includes("attribute-name")?et+=m:Re.attr("class").includes("attribute-keys")?et+=m+y:Re.attr("class").includes("attribute-comment")&&(et+=m+y+b))}Re.attr("transform",`translate(${ee+i/2+et}, ${ot+W+h.height+a/2})`)}),u.select(".name").attr("transform","translate("+-h.width/2+", "+(W+a/2)+")");const U=D.rectangle(ee,W,P,G,$),j=u.insert(()=>U,":first-child").attr("style",s.join("")),{themeVariables:Q}=_r(),{rowEven:Y,rowOdd:be,nodeBorder:L}=Q;f.push(0);for(const[de,we]of p.entries()){const Re=(de+1)%2===0&&we.yOffset!==0,De=D.rectangle(ee,h.height+W+(we==null?void 0:we.yOffset),P,we==null?void 0:we.rowHeight,{...$,fill:Re?Y:be,stroke:L});u.insert(()=>De,"g.label").attr("style",s.join("")).attr("class",`row-rect-${Re?"even":"odd"}`)}let se=D.line(ee,h.height+W,P+ee,h.height+W,$);u.insert(()=>se).attr("class","divider"),se=D.line(m+ee,h.height+W,m+ee,G+W,$),u.insert(()=>se).attr("class","divider"),C&&(se=D.line(m+y+ee,h.height+W,m+y+ee,G+W,$),u.insert(()=>se).attr("class","divider")),E&&(se=D.line(m+y+b+ee,h.height+W,m+y+b+ee,G+W,$),u.insert(()=>se).attr("class","divider"));for(const de of f)se=D.line(ee,h.height+W+de,P+ee,h.height+W+de,$),u.insert(()=>se).attr("class","divider");if(Ue(e,j),l&&e.look!=="handDrawn"){const de=l.split(";"),we=(Ee=de==null?void 0:de.filter(qe=>qe.includes("stroke")))==null?void 0:Ee.map(qe=>`${qe}`).join("; ");u.selectAll("path").attr("style",we??""),u.selectAll(".row-rect-even path").attr("style",l)}return e.intersect=function(de){return Be.rect(e,de)},u}w(Pg,"erBox");async function Ps(t,e,r,n=0,i=0,a=[],s=""){const o=t.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",s);e!==yp(e)&&(e=yp(e),e=e.replaceAll("<","&lt;").replaceAll(">","&gt;"));const l=o.node().appendChild(await ta(o,e,{width:bi(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(e.includes("&lt;")||e.includes("&gt;")){let u=l.children[0];for(u.textContent=u.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");u.childNodes[0];)u=u.childNodes[0],u.textContent=u.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let c=l.getBBox();if(cr(r.htmlLabels)){const u=l.children[0];u.style.textAlign="start";const h=At(l);c=u.getBoundingClientRect(),h.attr("width",c.width),h.attr("height",c.height)}return c}w(Ps,"addText");async function oS(t,e,r,n,i=r.class.padding??12){const a=n?0:3,s=t.insert("g").attr("class",rt(e)).attr("id",e.domId||e.id);let o=null,l=null,c=null,u=null,h=0,d=0,f=0;if(o=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const v=e.annotations[0];await kl(o,{text:`«${v}»`},0),h=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await kl(l,e,0,["font-weight: bolder"]);const p=l.node().getBBox();d=p.height,c=s.insert("g").attr("class","members-group text");let m=0;for(const v of e.members){const C=await kl(c,v,m,[v.parseClassifier()]);m+=C+a}f=c.node().getBBox().height,f<=0&&(f=i/2),u=s.insert("g").attr("class","methods-group text");let y=0;for(const v of e.methods){const C=await kl(u,v,y,[v.parseClassifier()]);y+=C+a}let b=s.node().getBBox();if(o!==null){const v=o.node().getBBox();o.attr("transform",`translate(${-v.width/2})`)}return l.attr("transform",`translate(${-p.width/2}, ${h})`),b=s.node().getBBox(),c.attr("transform",`translate(0, ${h+d+i*2})`),b=s.node().getBBox(),u.attr("transform",`translate(0, ${h+d+(f?f+i*4:i*2)})`),b=s.node().getBBox(),{shapeSvg:s,bbox:b}}w(oS,"textHelper");async function kl(t,e,r,n=[]){const i=t.insert("g").attr("class","label").attr("style",n.join("; ")),a=_r();let s="useHtmlLabels"in e?e.useHtmlLabels:cr(a.htmlLabels)??!0,o="";"text"in e?o=e.text:o=e.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),os(o)&&(s=!0);const l=await ta(i,U1(La(o)),{width:bi(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let c,u=1;if(s){const h=l.children[0],d=At(l);u=h.innerHTML.split("<br>").length,h.innerHTML.includes("</math>")&&(u+=h.innerHTML.split("<mrow>").length-1);const f=h.getElementsByTagName("img");if(f){const p=o.replace(/<img[^>]*>/g,"").trim()==="";await Promise.all([...f].map(m=>new Promise(y=>{function b(){var v;if(m.style.display="flex",m.style.flexDirection="column",p){const C=((v=a.fontSize)==null?void 0:v.toString())??window.getComputedStyle(document.body).fontSize,_=parseInt(C,10)*5+"px";m.style.minWidth=_,m.style.maxWidth=_}else m.style.width="100%";y(m)}w(b,"setupImage"),setTimeout(()=>{m.complete&&b()}),m.addEventListener("error",b),m.addEventListener("load",b)})))}c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{n.includes("font-weight: bolder")&&At(l).selectAll("tspan").attr("font-weight",""),u=l.children.length;const h=l.children[0];(l.textContent===""||l.textContent.includes("&gt"))&&(h.textContent=o[0]+o.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim(),o[1]===" "&&(h.textContent=h.textContent[0]+" "+h.textContent.substring(1))),h.textContent==="undefined"&&(h.textContent=""),c=l.getBBox()}return i.attr("transform","translate(0,"+(-c.height/(2*u)+r)+")"),c.height}w(kl,"addText");async function lS(t,e){var $,R;const r=Bt(),n=r.class.padding??12,i=n,a=e.useHtmlLabels??cr(r.htmlLabels)??!0,s=e;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:o,bbox:l}=await oS(t,e,r,a,i),{labelStyles:c,nodeStyles:u}=ze(e);e.labelStyle=c,e.cssStyles=s.styles||"";const h=(($=s.styles)==null?void 0:$.join(";"))||u||"";e.cssStyles||(e.cssStyles=h.replaceAll("!important","").split(";"));const d=s.members.length===0&&s.methods.length===0&&!((R=r.class)!=null&&R.hideEmptyMembersBox),f=He.svg(o),p=je(e,{});e.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const m=l.width;let y=l.height;s.members.length===0&&s.methods.length===0?y+=i:s.members.length>0&&s.methods.length===0&&(y+=i*2);const b=-m/2,v=-y/2,C=f.rectangle(b-n,v-n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0),m+2*n,y+2*n+(d?n*2:s.members.length===0&&s.methods.length===0?-n:0),p),E=o.insert(()=>C,":first-child");E.attr("class","basic label-container");const _=E.node().getBBox();o.selectAll(".text").each((P,G,ee)=>{var be;const W=At(ee[G]),U=W.attr("transform");let j=0;if(U){const se=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(U);se&&(j=parseFloat(se[2]))}let Q=j+v+n-(d?n:s.members.length===0&&s.methods.length===0?-n/2:0);a||(Q-=4);let Y=b;(W.attr("class").includes("label-group")||W.attr("class").includes("annotation-group"))&&(Y=-((be=W.node())==null?void 0:be.getBBox().width)/2||0,o.selectAll("text").each(function(L,se,ae){window.getComputedStyle(ae[se]).textAnchor==="middle"&&(Y=0)})),W.attr("transform",`translate(${Y}, ${Q})`)});const k=o.select(".annotation-group").node().getBBox().height-(d?n/2:0)||0,N=o.select(".label-group").node().getBBox().height-(d?n/2:0)||0,D=o.select(".members-group").node().getBBox().height-(d?n/2:0)||0;if(s.members.length>0||s.methods.length>0||d){const P=f.line(_.x,k+N+v+n,_.x+_.width,k+N+v+n,p);o.insert(()=>P).attr("class","divider").attr("style",h)}if(d||s.members.length>0||s.methods.length>0){const P=f.line(_.x,k+N+D+v+i*2+n,_.x+_.width,k+N+D+v+n+i*2,p);o.insert(()=>P).attr("class","divider").attr("style",h)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",h),E.select(":nth-child(2)").attr("style",h),o.selectAll(".divider").select("path").attr("style",h),e.labelStyle?o.selectAll("span").attr("style",e.labelStyle):o.selectAll("span").attr("style",h),!a){const P=RegExp(/color\s*:\s*([^;]*)/),G=P.exec(h);if(G){const ee=G[0].replace("color","fill");o.selectAll("tspan").attr("style",ee)}else if(c){const ee=P.exec(c);if(ee){const W=ee[0].replace("color","fill");o.selectAll("tspan").attr("style",W)}}}return Ue(e,E),e.intersect=function(P){return Be.rect(e,P)},o}w(lS,"classBox");async function cS(t,e){var k,N;const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const i=e,a=e,s=20,o=20,l="verifyMethod"in e,c=rt(e),u=t.insert("g").attr("class",c).attr("id",e.domId??e.id);let h;l?h=await si(u,`&lt;&lt;${i.type}&gt;&gt;`,0,e.labelStyle):h=await si(u,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle);let d=h;const f=await si(u,i.name,d,e.labelStyle+"; font-weight: bold;");if(d+=f+o,l){const D=await si(u,`${i.requirementId?`ID: ${i.requirementId}`:""}`,d,e.labelStyle);d+=D;const $=await si(u,`${i.text?`Text: ${i.text}`:""}`,d,e.labelStyle);d+=$;const R=await si(u,`${i.risk?`Risk: ${i.risk}`:""}`,d,e.labelStyle);d+=R,await si(u,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,d,e.labelStyle)}else{const D=await si(u,`${a.type?`Type: ${a.type}`:""}`,d,e.labelStyle);d+=D,await si(u,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,d,e.labelStyle)}const p=(((k=u.node())==null?void 0:k.getBBox().width)??200)+s,m=(((N=u.node())==null?void 0:N.getBBox().height)??200)+s,y=-p/2,b=-m/2,v=He.svg(u),C=je(e,{});e.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const E=v.rectangle(y,b,p,m,C),_=u.insert(()=>E,":first-child");if(_.attr("class","basic label-container").attr("style",n),u.selectAll(".label").each((D,$,R)=>{const P=At(R[$]),G=P.attr("transform");let ee=0,W=0;if(G){const Y=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(G);Y&&(ee=parseFloat(Y[1]),W=parseFloat(Y[2]))}const U=W-m/2;let j=y+s/2;($===0||$===1)&&(j=ee),P.attr("transform",`translate(${j}, ${U+s})`)}),d>h+f+o){const D=v.line(y,b+h+f+o,y+p,b+h+f+o,C);u.insert(()=>D).attr("style",n)}return Ue(e,_),e.intersect=function(D){return Be.rect(e,D)},u}w(cS,"requirementBox");async function si(t,e,r,n=""){if(e==="")return 0;const i=t.insert("g").attr("class","label").attr("style",n),a=Bt(),s=a.htmlLabels??!0,o=await ta(i,U1(La(e)),{width:bi(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a);let l;if(s){const c=o.children[0],u=At(o);l=c.getBoundingClientRect(),u.attr("width",l.width),u.attr("height",l.height)}else{const c=o.children[0];for(const u of c.children)u.textContent=u.textContent.replaceAll("&gt;",">").replaceAll("&lt;","<"),n&&u.setAttribute("style",n);l=o.getBBox(),l.height+=6}return i.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}w(si,"addText");var gte=w(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function uS(t,e,{config:r}){var G,ee;const{labelStyles:n,nodeStyles:i}=ze(e);e.labelStyle=n||"";const a=10,s=e.width;e.width=(e.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await st(t,e,rt(e)),u=e.padding||10;let h="",d;"ticket"in e&&e.ticket&&((G=r==null?void 0:r.kanban)!=null&&G.ticketBaseUrl)&&(h=(ee=r==null?void 0:r.kanban)==null?void 0:ee.ticketBaseUrl.replace("#TICKET#",e.ticket),d=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",h).attr("target","_blank"));const f={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let p,m;d?{label:p,bbox:m}=await xf(d,"ticket"in e&&e.ticket||"",f):{label:p,bbox:m}=await xf(o,"ticket"in e&&e.ticket||"",f);const{label:y,bbox:b}=await xf(o,"assigned"in e&&e.assigned||"",f);e.width=s;const v=10,C=(e==null?void 0:e.width)||0,E=Math.max(m.height,b.height)/2,_=Math.max(l.height+v*2,(e==null?void 0:e.height)||0)+E,k=-C/2,N=-_/2;c.attr("transform","translate("+(u-C/2)+", "+(-E-l.height/2)+")"),p.attr("transform","translate("+(u-C/2)+", "+(-E+l.height/2)+")"),y.attr("transform","translate("+(u+C/2-b.width-2*a)+", "+(-E+l.height/2)+")");let D;const{rx:$,ry:R}=e,{cssStyles:P}=e;if(e.look==="handDrawn"){const W=He.svg(o),U=je(e,{}),j=$||R?W.path(Ma(k,N,C,_,$||0),U):W.rectangle(k,N,C,_,U);D=o.insert(()=>j,":first-child"),D.attr("class","basic label-container").attr("style",P||null)}else{D=o.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",i).attr("rx",$??5).attr("ry",R??5).attr("x",k).attr("y",N).attr("width",C).attr("height",_);const W="priority"in e&&e.priority;if(W){const U=o.append("line"),j=k+2,Q=N+Math.floor(($??0)/2),Y=N+_-Math.floor(($??0)/2);U.attr("x1",j).attr("y1",Q).attr("x2",j).attr("y2",Y).attr("stroke-width","4").attr("stroke",gte(W))}}return Ue(e,D),e.height=_,e.intersect=function(W){return Be.rect(e,W)},o}w(uS,"kanbanItem");async function hS(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await st(t,e,rt(e)),l=a.width+10*s,c=a.height+8*s,u=.15*l,{cssStyles:h}=e,d=a.width+20,f=a.height+20,p=Math.max(l,d),m=Math.max(c,f);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const b=`M0 0
585
+ a${u},${u} 1 0,0 ${p*.25},${-1*m*.1}
586
+ a${u},${u} 1 0,0 ${p*.25},0
587
+ a${u},${u} 1 0,0 ${p*.25},0
588
+ a${u},${u} 1 0,0 ${p*.25},${m*.1}
589
+
590
+ a${u},${u} 1 0,0 ${p*.15},${m*.33}
591
+ a${u*.8},${u*.8} 1 0,0 0,${m*.34}
592
+ a${u},${u} 1 0,0 ${-1*p*.15},${m*.33}
593
+
594
+ a${u},${u} 1 0,0 ${-1*p*.25},${m*.15}
595
+ a${u},${u} 1 0,0 ${-1*p*.25},0
596
+ a${u},${u} 1 0,0 ${-1*p*.25},0
597
+ a${u},${u} 1 0,0 ${-1*p*.25},${-1*m*.15}
598
+
599
+ a${u},${u} 1 0,0 ${-1*p*.1},${-1*m*.33}
600
+ a${u*.8},${u*.8} 1 0,0 0,${-1*m*.34}
601
+ a${u},${u} 1 0,0 ${p*.1},${-1*m*.33}
602
+ H0 V0 Z`;if(e.look==="handDrawn"){const v=He.svg(i),C=je(e,{}),E=v.path(b,C);y=i.insert(()=>E,":first-child"),y.attr("class","basic label-container").attr("style",Dr(h))}else y=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",b);return y.attr("transform",`translate(${-p/2}, ${-m/2})`),Ue(e,y),e.calcIntersect=function(v,C){return Be.rect(v,C)},e.intersect=function(v){return he.info("Bang intersect",e,v),Be.rect(e,v)},i}w(hS,"bang");async function dS(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await st(t,e,rt(e)),l=a.width+2*s,c=a.height+2*s,u=.15*l,h=.25*l,d=.35*l,f=.2*l,{cssStyles:p}=e;let m;const y=`M0 0
603
+ a${u},${u} 0 0,1 ${l*.25},${-1*l*.1}
604
+ a${d},${d} 1 0,1 ${l*.4},${-1*l*.1}
605
+ a${h},${h} 1 0,1 ${l*.35},${l*.2}
606
+
607
+ a${u},${u} 1 0,1 ${l*.15},${c*.35}
608
+ a${f},${f} 1 0,1 ${-1*l*.15},${c*.65}
609
+
610
+ a${h},${u} 1 0,1 ${-1*l*.25},${l*.15}
611
+ a${d},${d} 1 0,1 ${-1*l*.5},0
612
+ a${u},${u} 1 0,1 ${-1*l*.25},${-1*l*.15}
613
+
614
+ a${u},${u} 1 0,1 ${-1*l*.1},${-1*c*.35}
615
+ a${f},${f} 1 0,1 ${l*.1},${-1*c*.65}
616
+ H0 V0 Z`;if(e.look==="handDrawn"){const b=He.svg(i),v=je(e,{}),C=b.path(y,v);m=i.insert(()=>C,":first-child"),m.attr("class","basic label-container").attr("style",Dr(p))}else m=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",y);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),Ue(e,m),e.calcIntersect=function(b,v){return Be.rect(b,v)},e.intersect=function(b){return he.info("Cloud intersect",e,b),Be.rect(e,b)},i}w(dS,"cloud");async function fS(t,e){const{labelStyles:r,nodeStyles:n}=ze(e);e.labelStyle=r;const{shapeSvg:i,bbox:a,halfPadding:s,label:o}=await st(t,e,rt(e)),l=a.width+8*s,c=a.height+2*s,u=5,h=`
617
+ M${-l/2} ${c/2-u}
618
+ v${-c+2*u}
619
+ q0,-${u} ${u},-${u}
620
+ h${l-2*u}
621
+ q${u},0 ${u},${u}
622
+ v${c-2*u}
623
+ q0,${u} -${u},${u}
624
+ h${-l+2*u}
625
+ q-${u},0 -${u},-${u}
626
+ Z
627
+ `,d=i.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",h);return i.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>o.node()),Ue(e,d),e.calcIntersect=function(f,p){return Be.rect(f,p)},e.intersect=function(f){return Be.rect(e,f)},i}w(fS,"defaultMindmapNode");async function pS(t,e){const r={padding:e.padding??0};return Og(t,e,r)}w(pS,"mindmapCircle");var bte=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:WC},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:qC},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:GC},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:KC},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:mC},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Og},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:hS},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:dS},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:$C},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:wC},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:IC},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:MC},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:tS},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:NC},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:bC},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:JC},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:oC},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:jC},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:XC},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:VC},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:vC},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:TC},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:hC},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:dC},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:fC},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:RC},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:iS},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:kC},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:eS},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:BC},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:pC},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:gC},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:nS},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:sS},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:yC},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:rS},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:xC},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:UC},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:PC},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:OC},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:sC},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:uC},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:ZC},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:QC},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:aS},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:zC},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:DC}],yte=w(()=>{const e=[...Object.entries({state:YC,choice:lC,note:FC,rectWithTitle:HC,labelRect:LC,iconSquare:EC,iconCircle:SC,icon:CC,iconRounded:_C,imageSquare:AC,anchor:aC,kanbanItem:uS,mindmapCircle:pS,defaultMindmapNode:fS,classBox:lS,erBox:Pg,requirementBox:cS}),...bte.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(e)},"generateShapeMap"),mS=yte();function gS(t){return t in mS}w(gS,"isValidShape");var rd=new Map;async function Fg(t,e,r){let n,i;e.shape==="rect"&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?mS[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;r.config.securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),i=await a(n,e,r)}else i=await a(t,e,r),n=i;return e.tooltip&&i.attr("title",e.tooltip),rd.set(e.id,n),e.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}w(Fg,"insertNode");var xte=w((t,e)=>{rd.set(e.id,t)},"setNodeElem"),vte=w(()=>{rd.clear()},"clear"),kte=w(t=>{const e=rd.get(t.id);he.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},"positionNode"),wte=w((t,e,r,n,i,a)=>{e.arrowTypeStart&&Qx(t,"start",e.arrowTypeStart,r,n,i,a),e.arrowTypeEnd&&Qx(t,"end",e.arrowTypeEnd,r,n,i,a)},"addEdgeMarkers"),Tte={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},Qx=w((t,e,r,n,i,a,s)=>{var h;const o=Tte[r];if(!o){he.warn(`Unknown arrow type: ${r}`);return}const l=o.type,u=`${i}_${a}-${l}${e==="start"?"Start":"End"}`;if(s&&s.trim()!==""){const d=s.replace(/[^\dA-Za-z]/g,"_"),f=`${u}_${d}`;if(!document.getElementById(f)){const p=document.getElementById(u);if(p){const m=p.cloneNode(!0);m.id=f,m.querySelectorAll("path, circle, line").forEach(b=>{b.setAttribute("stroke",s),o.fill&&b.setAttribute("fill",s)}),(h=p.parentNode)==null||h.appendChild(m)}}t.attr(`marker-${e}`,`url(${n}#${f})`)}else t.attr(`marker-${e}`,`url(${n}#${u})`)},"addEdgeMarker"),G0=new Map,Sr=new Map,Cte=w(()=>{G0.clear(),Sr.clear()},"clear"),mu=w(t=>t?t.reduce((r,n)=>r+";"+n,""):"","getLabelStyles"),bS=w(async(t,e)=>{let r=cr(Bt().flowchart.htmlLabels);const{labelStyles:n}=ze(e);e.labelStyle=n;const i=await ta(t,e.label,{style:e.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});he.info("abc82",e,e.labelType);const a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",e.id);s.node().appendChild(i);let o=i.getBBox();if(r){const c=i.children[0],u=At(i);o=c.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),G0.set(e.id,a),e.width=o.width,e.height=o.height;let l;if(e.startLabelLeft){const c=await Qa(e.startLabelLeft,mu(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");l=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Sr.get(e.id)||Sr.set(e.id,{}),Sr.get(e.id).startLeft=u,wl(l,e.startLabelLeft)}if(e.startLabelRight){const c=await Qa(e.startLabelRight,mu(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");l=u.node().appendChild(c),h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),Sr.get(e.id)||Sr.set(e.id,{}),Sr.get(e.id).startRight=u,wl(l,e.startLabelRight)}if(e.endLabelLeft){const c=await Qa(e.endLabelLeft,mu(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");l=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),u.node().appendChild(c),Sr.get(e.id)||Sr.set(e.id,{}),Sr.get(e.id).endLeft=u,wl(l,e.endLabelLeft)}if(e.endLabelRight){const c=await Qa(e.endLabelRight,mu(e.labelStyle)),u=t.insert("g").attr("class","edgeTerminals"),h=u.insert("g").attr("class","inner");l=h.node().appendChild(c);const d=c.getBBox();h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),u.node().appendChild(c),Sr.get(e.id)||Sr.set(e.id,{}),Sr.get(e.id).endRight=u,wl(l,e.endLabelRight)}return i},"insertEdgeLabel");function wl(t,e){Bt().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}w(wl,"setTerminalWidth");var yS=w((t,e)=>{he.debug("Moving label abc88 ",t.id,t.label,G0.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=Bt(),{subGraphTitleTotalMargin:i}=Hh(n);if(t.label){const a=G0.get(t.id);let s=t.x,o=t.y;if(r){const l=Bn.calcLabelPosition(r);he.debug("Moving label "+t.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),e.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+i/2})`)}if(t.startLabelLeft){const a=Sr.get(t.id).startLeft;let s=t.x,o=t.y;if(r){const l=Bn.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.startLabelRight){const a=Sr.get(t.id).startRight;let s=t.x,o=t.y;if(r){const l=Bn.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelLeft){const a=Sr.get(t.id).endLeft;let s=t.x,o=t.y;if(r){const l=Bn.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(t.endLabelRight){const a=Sr.get(t.id).endRight;let s=t.x,o=t.y;if(r){const l=Bn.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),Ste=w((t,e)=>{const r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o},"outsideNode"),_te=w((t,e,r)=>{he.debug(`intersection calc abc89:
628
+ outsidePoint: ${JSON.stringify(e)}
629
+ insidePoint : ${JSON.stringify(r)}
630
+ node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2;let o=r.x<e.x?s-a:s+a;const l=t.height/2,c=Math.abs(e.y-r.y),u=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*s>Math.abs(n-e.x)*l){let h=r.y<e.y?e.y-l-i:i-l-e.y;o=u*h/c;const d={x:r.x<e.x?r.x+o:r.x-u+o,y:r.y<e.y?r.y+c-h:r.y-c+h};return o===0&&(d.x=e.x,d.y=e.y),u===0&&(d.x=e.x),c===0&&(d.y=e.y),he.debug(`abc89 top/bottom calc, Q ${c}, q ${h}, R ${u}, r ${o}`,d),d}else{r.x<e.x?o=e.x-s-n:o=n-s-e.x;let h=c*o/u,d=r.x<e.x?r.x+u-o:r.x-u+o,f=r.y<e.y?r.y+h:r.y-h;return he.debug(`sides calc abc89, Q ${c}, q ${h}, R ${u}, r ${o}`,{_x:d,_y:f}),o===0&&(d=e.x,f=e.y),u===0&&(d=e.x),c===0&&(f=e.y),{x:d,y:f}}},"intersection"),Zx=w((t,e)=>{he.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(he.info("abc88 checking point",a,e),!Ste(e,a)&&!i){const s=_te(e,n,a);he.debug("abc88 inside",a,n,s),he.debug("abc88 intersection",s,e);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?he.warn("abc88 no intersect",s,r):r.push(s),i=!0}else he.warn("abc88 outside",a,n),n=a,i||r.push(a)}),he.debug("returning points",r),r},"cutPathAtIntersect");function xS(t){const e=[],r=[];for(let n=1;n<t.length-1;n++){const i=t[n-1],a=t[n],s=t[n+1];(i.x===a.x&&a.y===s.y&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===s.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(n))}return{cornerPoints:e,cornerPointPositions:r}}w(xS,"extractCornerPoints");var Jx=w(function(t,e,r){const n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),s=r/a;return{x:e.x-s*n,y:e.y-s*i}},"findAdjacentPoint"),Ete=w(function(t){const{cornerPointPositions:e}=xS(t),r=[];for(let n=0;n<t.length;n++)if(e.includes(n)){const i=t[n-1],a=t[n+1],s=t[n],o=Jx(i,s,5),l=Jx(a,s,5),c=l.x-o.x,u=l.y-o.y;r.push(o);const h=Math.sqrt(2)*2;let d={x:s.x,y:s.y};if(Math.abs(a.x-i.x)>10&&Math.abs(a.y-i.y)>=10){he.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));const f=5;s.x===o.x?d={x:c<0?o.x-f+h:o.x+f-h,y:u<0?o.y-h:o.y+h}:d={x:c<0?o.x-h:o.x+h,y:u<0?o.y-f+h:o.y+f-h}}else he.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(d,l)}else r.push(t[n]);return r},"fixCorners"),Ate=w((t,e,r)=>{const n=t-e-r,i=2,a=2,s=i+a,o=Math.floor(n/s),l=Array(o).fill(`${i} ${a}`).join(" ");return`0 ${e} ${l} ${r}`},"generateDashArray"),vS=w(function(t,e,r,n,i,a,s,o=!1){var W;const{handDrawnSeed:l}=Bt();let c=e.points,u=!1;const h=i;var d=a;const f=[];for(const U in e.cssCompiledStyles)cg(U)||f.push(e.cssCompiledStyles[U]);he.debug("UIO intersect check",e.points,d.x,h.x),d.intersect&&h.intersect&&!o&&(c=c.slice(1,e.points.length-1),c.unshift(h.intersect(c[0])),he.debug("Last point UIO",e.start,"-->",e.end,c[c.length-1],d,d.intersect(c[c.length-1])),c.push(d.intersect(c[c.length-1])));const p=btoa(JSON.stringify(c));e.toCluster&&(he.info("to cluster abc88",r.get(e.toCluster)),c=Zx(e.points,r.get(e.toCluster).node),u=!0),e.fromCluster&&(he.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(c,null,2)),c=Zx(c.reverse(),r.get(e.fromCluster).node).reverse(),u=!0);let m=c.filter(U=>!Number.isNaN(U.y));m=Ete(m);let y=Hl;switch(y=_0,e.curve){case"linear":y=_0;break;case"basis":y=Hl;break;case"cardinal":y=Iw;break;case"bumpX":y=Ew;break;case"bumpY":y=Aw;break;case"catmullRom":y=Bw;break;case"monotoneX":y=zw;break;case"monotoneY":y=Hw;break;case"natural":y=jw;break;case"step":y=Uw;break;case"stepAfter":y=Gw;break;case"stepBefore":y=Ww;break;default:y=Hl}const{x:b,y:v}=MT(e),C=Sw().x(b).y(v).curve(y);let E;switch(e.thickness){case"normal":E="edge-thickness-normal";break;case"thick":E="edge-thickness-thick";break;case"invisible":E="edge-thickness-invisible";break;default:E="edge-thickness-normal"}switch(e.pattern){case"solid":E+=" edge-pattern-solid";break;case"dotted":E+=" edge-pattern-dotted";break;case"dashed":E+=" edge-pattern-dashed";break;default:E+=" edge-pattern-solid"}let _,k=e.curve==="rounded"?kS(wS(m,e),5):C(m);const N=Array.isArray(e.style)?e.style:[e.style];let D=N.find(U=>U==null?void 0:U.startsWith("stroke:")),$=!1;if(e.look==="handDrawn"){const U=He.svg(t);Object.assign([],m);const j=U.path(k,{roughness:.3,seed:l});E+=" transition",_=At(j).select("path").attr("id",e.id).attr("class"," "+E+(e.classes?" "+e.classes:"")).attr("style",N?N.reduce((Y,be)=>Y+";"+be,""):"");let Q=_.attr("d");_.attr("d",Q),t.node().appendChild(_.node())}else{const U=f.join(";"),j=N?N.reduce((I,ye)=>I+ye+";",""):"";let Q="";e.animate&&(Q=" edge-animation-fast"),e.animation&&(Q=" edge-animation-"+e.animation);const Y=(U?U+";"+j+";":j)+";"+(N?N.reduce((I,ye)=>I+";"+ye,""):"");_=t.append("path").attr("d",k).attr("id",e.id).attr("class"," "+E+(e.classes?" "+e.classes:"")+(Q??"")).attr("style",Y),D=(W=Y.match(/stroke:([^;]+)/))==null?void 0:W[1],$=e.animate===!0||!!e.animation||U.includes("animation");const be=_.node(),L=typeof be.getTotalLength=="function"?be.getTotalLength():0,se=yx[e.arrowTypeStart]||0,ae=yx[e.arrowTypeEnd]||0;if(e.look==="neo"&&!$){const ye=`stroke-dasharray: ${e.pattern==="dotted"||e.pattern==="dashed"?Ate(L,se,ae):`0 ${se} ${L-se-ae} ${ae}`}; stroke-dashoffset: 0;`;_.attr("style",ye+_.attr("style"))}}_.attr("data-edge",!0),_.attr("data-et","edge"),_.attr("data-id",e.id),_.attr("data-points",p),e.showPoints&&m.forEach(U=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",U.x).attr("cy",U.y)});let R="";(Bt().flowchart.arrowMarkerAbsolute||Bt().state.arrowMarkerAbsolute)&&(R=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,R=R.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),he.info("arrowTypeStart",e.arrowTypeStart),he.info("arrowTypeEnd",e.arrowTypeEnd),wte(_,e,R,s,n,D);const P=Math.floor(c.length/2),G=c[P];Bn.isLabelCoordinateInPath(G,_.attr("d"))||(u=!0);let ee={};return u&&(ee.updatedPath=c),ee.originalPath=e.points,ee},"insertEdge");function kS(t,e){if(t.length<2)return"";let r="";const n=t.length,i=1e-5;for(let a=0;a<n;a++){const s=t[a],o=t[a-1],l=t[a+1];if(a===0)r+=`M${s.x},${s.y}`;else if(a===n-1)r+=`L${s.x},${s.y}`;else{const c=s.x-o.x,u=s.y-o.y,h=l.x-s.x,d=l.y-s.y,f=Math.hypot(c,u),p=Math.hypot(h,d);if(f<i||p<i){r+=`L${s.x},${s.y}`;continue}const m=c/f,y=u/f,b=h/p,v=d/p,C=m*b+y*v,E=Math.max(-1,Math.min(1,C)),_=Math.acos(E);if(_<i||Math.abs(Math.PI-_)<i){r+=`L${s.x},${s.y}`;continue}const k=Math.min(e/Math.sin(_/2),f/2,p/2),N=s.x-m*k,D=s.y-y*k,$=s.x+b*k,R=s.y+v*k;r+=`L${N},${D}`,r+=`Q${s.x},${s.y} ${$},${R}`}}return r}w(kS,"generateRoundedPath");function cm(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,n=e.y-t.y;return{angle:Math.atan2(n,r),deltaX:r,deltaY:n}}w(cm,"calculateDeltaAndAngle");function wS(t,e){const r=t.map(i=>({...i}));if(t.length>=2&&Mr[e.arrowTypeStart]){const i=Mr[e.arrowTypeStart],a=t[0],s=t[1],{angle:o}=cm(a,s),l=i*Math.cos(o),c=i*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+c}const n=t.length;if(n>=2&&Mr[e.arrowTypeEnd]){const i=Mr[e.arrowTypeEnd],a=t[n-1],s=t[n-2],{angle:o}=cm(s,a),l=i*Math.cos(o),c=i*Math.sin(o);r[n-1].x=a.x-l,r[n-1].y=a.y-c}return r}w(wS,"applyMarkerOffsetsToPoints");var Nte=w((t,e,r,n)=>{e.forEach(i=>{Wte[i](t,r,n)})},"insertMarkers"),Lte=w((t,e,r)=>{he.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Mte=w((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Ite=w((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Rte=w((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Bte=w((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Dte=w((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),Ote=w((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),Pte=w((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),Fte=w((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),$te=w((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),zte=w((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Hte=w((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),qte=w((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),jte=w((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
631
+ L20,10
632
+ M20,10
633
+ L0,20`)},"requirement_arrow"),Ute=w((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Wte={extension:Lte,composition:Mte,aggregation:Ite,dependency:Rte,lollipop:Bte,point:Dte,circle:Ote,cross:Pte,barb:Fte,only_one:$te,zero_or_one:zte,one_or_more:Hte,zero_or_more:qte,requirement_arrow:jte,requirement_contains:Ute},TS=Nte,Gte={common:xs,getConfig:_r,insertCluster:Z7,insertEdge:vS,insertEdgeLabel:bS,insertMarkers:TS,insertNode:Fg,interpolateToCurve:gg,labelHelper:st,log:he,positionEdgeLabel:yS},fc={},CS=w(t=>{for(const e of t)fc[e.name]=e},"registerLayoutLoaders"),Yte=w(()=>{CS([{name:"dagre",loader:w(async()=>await Promise.resolve().then(()=>require("./dagre-6UL2VRFP-DCwfkcWi.js")),"loader")},{name:"cose-bilkent",loader:w(async()=>await Promise.resolve().then(()=>require("./cose-bilkent-S5V4N54A-BCaAPmuF.js")),"loader")}])},"registerDefaultLayoutLoaders");Yte();var Vte=w(async(t,e)=>{if(!(t.layoutAlgorithm in fc))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=fc[t.layoutAlgorithm];return(await r.loader()).render(t,e,Gte,{algorithm:r.algorithm})},"render"),Xte=w((t="",{fallback:e="dagre"}={})=>{if(t in fc)return t;if(e in fc)return he.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),SS="comm",_S="rule",ES="decl",Kte="@import",Qte="@namespace",Zte="@keyframes",Jte="@layer",AS=Math.abs,$g=String.fromCharCode;function NS(t){return t.trim()}function Pu(t,e,r){return t.replace(e,r)}function ere(t,e,r){return t.indexOf(e,r)}function Xs(t,e){return t.charCodeAt(e)|0}function xo(t,e,r){return t.slice(e,r)}function li(t){return t.length}function tre(t){return t.length}function gu(t,e){return e.push(t),t}var nd=1,vo=1,LS=0,$n=0,or=0,zo="";function zg(t,e,r,n,i,a,s,o){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:nd,column:vo,length:s,return:"",siblings:o}}function rre(){return or}function nre(){return or=$n>0?Xs(zo,--$n):0,vo--,or===10&&(vo=1,nd--),or}function Xn(){return or=$n<LS?Xs(zo,$n++):0,vo++,or===10&&(vo=1,nd++),or}function ga(){return Xs(zo,$n)}function Fu(){return $n}function id(t,e){return xo(zo,t,e)}function pc(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ire(t){return nd=vo=1,LS=li(zo=t),$n=0,[]}function are(t){return zo="",t}function vf(t){return NS(id($n-1,um(t===91?t+2:t===40?t+1:t)))}function sre(t){for(;(or=ga())&&or<33;)Xn();return pc(t)>2||pc(or)>3?"":" "}function ore(t,e){for(;--e&&Xn()&&!(or<48||or>102||or>57&&or<65||or>70&&or<97););return id(t,Fu()+(e<6&&ga()==32&&Xn()==32))}function um(t){for(;Xn();)switch(or){case t:return $n;case 34:case 39:t!==34&&t!==39&&um(or);break;case 40:t===41&&um(t);break;case 92:Xn();break}return $n}function lre(t,e){for(;Xn()&&t+or!==57;)if(t+or===84&&ga()===47)break;return"/*"+id(e,$n-1)+"*"+$g(t===47?t:Xn())}function cre(t){for(;!pc(ga());)Xn();return id(t,$n)}function ure(t){return are($u("",null,null,null,[""],t=ire(t),0,[0],t))}function $u(t,e,r,n,i,a,s,o,l){for(var c=0,u=0,h=s,d=0,f=0,p=0,m=1,y=1,b=1,v=0,C="",E=i,_=a,k=n,N=C;y;)switch(p=v,v=Xn()){case 40:if(p!=108&&Xs(N,h-1)==58){ere(N+=Pu(vf(v),"&","&\f"),"&\f",AS(c?o[c-1]:0))!=-1&&(b=-1);break}case 34:case 39:case 91:N+=vf(v);break;case 9:case 10:case 13:case 32:N+=sre(p);break;case 92:N+=ore(Fu()-1,7);continue;case 47:switch(ga()){case 42:case 47:gu(hre(lre(Xn(),Fu()),e,r,l),l),(pc(p||1)==5||pc(ga()||1)==5)&&li(N)&&xo(N,-1,void 0)!==" "&&(N+=" ");break;default:N+="/"}break;case 123*m:o[c++]=li(N)*b;case 125*m:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+u:b==-1&&(N=Pu(N,/\f/g,"")),f>0&&(li(N)-h||m===0&&p===47)&&gu(f>32?t4(N+";",n,r,h-1,l):t4(Pu(N," ","")+";",n,r,h-2,l),l);break;case 59:N+=";";default:if(gu(k=e4(N,e,r,c,u,i,o,C,E=[],_=[],h,a),a),v===123)if(u===0)$u(N,e,k,k,E,a,h,o,_);else{switch(d){case 99:if(Xs(N,3)===110)break;case 108:if(Xs(N,2)===97)break;default:u=0;case 100:case 109:case 115:}u?$u(t,k,k,n&&gu(e4(t,k,k,0,0,i,o,C,i,E=[],h,_),_),i,_,h,o,n?E:_):$u(N,k,k,k,[""],_,0,o,_)}}c=u=f=0,m=b=1,C=N="",h=s;break;case 58:h=1+li(N),f=p;default:if(m<1){if(v==123)--m;else if(v==125&&m++==0&&nre()==125)continue}switch(N+=$g(v),v*m){case 38:b=u>0?1:(N+="\f",-1);break;case 44:o[c++]=(li(N)-1)*b,b=1;break;case 64:ga()===45&&(N+=vf(Xn())),d=ga(),u=h=li(C=N+=cre(Fu())),v++;break;case 45:p===45&&li(N)==2&&(m=0)}}return a}function e4(t,e,r,n,i,a,s,o,l,c,u,h){for(var d=i-1,f=i===0?a:[""],p=tre(f),m=0,y=0,b=0;m<n;++m)for(var v=0,C=xo(t,d+1,d=AS(y=s[m])),E=t;v<p;++v)(E=NS(y>0?f[v]+" "+C:Pu(C,/&\f/g,f[v])))&&(l[b++]=E);return zg(t,e,r,i===0?_S:o,l,c,u,h)}function hre(t,e,r,n){return zg(t,e,r,SS,$g(rre()),xo(t,2,-2),0,n)}function t4(t,e,r,n,i){return zg(t,e,r,ES,xo(t,0,n),xo(t,n+1,-1),n,i)}function hm(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}function dre(t,e,r,n){switch(t.type){case Jte:if(t.children.length)break;case Kte:case Qte:case ES:return t.return=t.return||t.value;case SS:return"";case Zte:return t.return=t.value+"{"+hm(t.children,n)+"}";case _S:if(!li(t.value=t.props.join(",")))return""}return li(r=hm(t.children,n))?t.return=t.value+"{"+r+"}":""}var fre=zT(Object.keys,Object),pre=Object.prototype,mre=pre.hasOwnProperty;function MS(t){if(!Gh(t))return fre(t);var e=[];for(var r in Object(t))mre.call(t,r)&&r!="constructor"&&e.push(r);return e}var dm=ws(Si,"DataView"),fm=ws(Si,"Promise"),Y0=ws(Si,"Set"),pm=ws(Si,"WeakMap"),r4="[object Map]",gre="[object Object]",n4="[object Promise]",i4="[object Set]",a4="[object WeakMap]",s4="[object DataView]",bre=ks(dm),yre=ks(cc),xre=ks(fm),vre=ks(Y0),kre=ks(pm);exports.getTag=vs;(dm&&exports.getTag(new dm(new ArrayBuffer(1)))!=s4||cc&&exports.getTag(new cc)!=r4||fm&&exports.getTag(fm.resolve())!=n4||Y0&&exports.getTag(new Y0)!=i4||pm&&exports.getTag(new pm)!=a4)&&(exports.getTag=function(t){var e=vs(t),r=e==gre?t.constructor:void 0,n=r?ks(r):"";if(n)switch(n){case bre:return s4;case yre:return r4;case xre:return n4;case vre:return i4;case kre:return a4}return e});var wre="[object Map]",Tre="[object Set]",Cre=Object.prototype,Sre=Cre.hasOwnProperty;function mm(t){if(t==null)return!0;if(Mc(t)&&(hc(t)||typeof t=="string"||typeof t.splice=="function"||Yh(t)||Vh(t)||uc(t)))return!t.length;var e=exports.getTag(t);if(e==wre||e==Tre)return!t.size;if(Gh(t))return!MS(t).length;for(var r in t)if(Sre.call(t,r))return!1;return!0}var IS="c4",_re=w(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),Ere=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./c4Diagram-YG6GDRKO-LzDuCZ2V.js"));return{id:IS,diagram:t}},"loader"),Are={id:IS,detector:_re,loader:Ere},Nre=Are,RS="flowchart",Lre=w((t,e)=>{var r,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},"detector"),Mre=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-BwpfJE0U.js"));return{id:RS,diagram:t}},"loader"),Ire={id:RS,detector:Lre,loader:Mre},Rre=Ire,BS="flowchart-v2",Bre=w((t,e)=>{var r,n,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t))},"detector"),Dre=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-BwpfJE0U.js"));return{id:BS,diagram:t}},"loader"),Ore={id:BS,detector:Bre,loader:Dre},Pre=Ore,DS="er",Fre=w(t=>/^\s*erDiagram/.test(t),"detector"),$re=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./erDiagram-Q2GNP2WA-4KtQUUuI.js"));return{id:DS,diagram:t}},"loader"),zre={id:DS,detector:Fre,loader:$re},Hre=zre,OS="gitGraph",qre=w(t=>/^\s*gitGraph/.test(t),"detector"),jre=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./gitGraphDiagram-NY62KEGX-IQ8KriUw.js"));return{id:OS,diagram:t}},"loader"),Ure={id:OS,detector:qre,loader:jre},Wre=Ure,PS="gantt",Gre=w(t=>/^\s*gantt/.test(t),"detector"),Yre=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./ganttDiagram-JELNMOA3-D7rI7u8B.js"));return{id:PS,diagram:t}},"loader"),Vre={id:PS,detector:Gre,loader:Yre},Xre=Vre,FS="info",Kre=w(t=>/^\s*info/.test(t),"detector"),Qre=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./infoDiagram-WHAUD3N6-CCb5k_S7.js"));return{id:FS,diagram:t}},"loader"),Zre={id:FS,detector:Kre,loader:Qre},$S="pie",Jre=w(t=>/^\s*pie/.test(t),"detector"),ene=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./pieDiagram-ADFJNKIX-Bg0_gu43.js"));return{id:$S,diagram:t}},"loader"),tne={id:$S,detector:Jre,loader:ene},zS="quadrantChart",rne=w(t=>/^\s*quadrantChart/.test(t),"detector"),nne=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./quadrantDiagram-AYHSOK5B-B4gVakRV.js"));return{id:zS,diagram:t}},"loader"),ine={id:zS,detector:rne,loader:nne},ane=ine,HS="xychart",sne=w(t=>/^\s*xychart(-beta)?/.test(t),"detector"),one=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./xychartDiagram-PRI3JC2R-BaFd1In8.js"));return{id:HS,diagram:t}},"loader"),lne={id:HS,detector:sne,loader:one},cne=lne,qS="requirement",une=w(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),hne=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./requirementDiagram-UZGBJVZJ-0zMPj-SD.js"));return{id:qS,diagram:t}},"loader"),dne={id:qS,detector:une,loader:hne},fne=dne,jS="sequence",pne=w(t=>/^\s*sequenceDiagram/.test(t),"detector"),mne=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./sequenceDiagram-WL72ISMW-DRQn7Fe4.js"));return{id:jS,diagram:t}},"loader"),gne={id:jS,detector:pne,loader:mne},bne=gne,US="class",yne=w((t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},"detector"),xne=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./classDiagram-2ON5EDUG-CFFwYK87.js"));return{id:US,diagram:t}},"loader"),vne={id:US,detector:yne,loader:xne},kne=vne,WS="classDiagram",wne=w((t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},"detector"),Tne=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./classDiagram-v2-WZHVMYZB-CFFwYK87.js"));return{id:WS,diagram:t}},"loader"),Cne={id:WS,detector:wne,loader:Tne},Sne=Cne,GS="state",_ne=w((t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},"detector"),Ene=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./stateDiagram-FKZM4ZOC-BD4tnS-V.js"));return{id:GS,diagram:t}},"loader"),Ane={id:GS,detector:_ne,loader:Ene},Nne=Ane,YS="stateDiagram",Lne=w((t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),Mne=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./stateDiagram-v2-4FDKWEC3-sybMoxOk.js"));return{id:YS,diagram:t}},"loader"),Ine={id:YS,detector:Lne,loader:Mne},Rne=Ine,VS="journey",Bne=w(t=>/^\s*journey/.test(t),"detector"),Dne=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./journeyDiagram-XKPGCS4Q-POnSekz9.js"));return{id:VS,diagram:t}},"loader"),One={id:VS,detector:Bne,loader:Dne},Pne=One,Fne=w((t,e,r)=>{he.debug(`rendering svg for syntax error
634
+ `);const n=Yw(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),F1(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),XS={draw:Fne},$ne=XS,zne={db:{},renderer:XS,parser:{parse:w(()=>{},"parse")}},Hne=zne,KS="flowchart-elk",qne=w((t,e={})=>{var r;return/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),jne=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./flowDiagram-NV44I4VS-BwpfJE0U.js"));return{id:KS,diagram:t}},"loader"),Une={id:KS,detector:qne,loader:jne},Wne=Une,QS="timeline",Gne=w(t=>/^\s*timeline/.test(t),"detector"),Yne=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./timeline-definition-IT6M3QCI-2X4dfyLj.js"));return{id:QS,diagram:t}},"loader"),Vne={id:QS,detector:Gne,loader:Yne},Xne=Vne,ZS="mindmap",Kne=w(t=>/^\s*mindmap/.test(t),"detector"),Qne=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./mindmap-definition-VGOIOE7T-CV7bD4HY.js"));return{id:ZS,diagram:t}},"loader"),Zne={id:ZS,detector:Kne,loader:Qne},Jne=Zne,JS="kanban",eie=w(t=>/^\s*kanban/.test(t),"detector"),tie=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./kanban-definition-3W4ZIXB7-Bm064qrf.js"));return{id:JS,diagram:t}},"loader"),rie={id:JS,detector:eie,loader:tie},nie=rie,e_="sankey",iie=w(t=>/^\s*sankey(-beta)?/.test(t),"detector"),aie=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./sankeyDiagram-TZEHDZUN-Cl8-L83T.js"));return{id:e_,diagram:t}},"loader"),sie={id:e_,detector:iie,loader:aie},oie=sie,t_="packet",lie=w(t=>/^\s*packet(-beta)?/.test(t),"detector"),cie=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./diagram-S2PKOQOG-BmCs4MZE.js"));return{id:t_,diagram:t}},"loader"),uie={id:t_,detector:lie,loader:cie},r_="radar",hie=w(t=>/^\s*radar-beta/.test(t),"detector"),die=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./diagram-QEK2KX5R-B04ODMim.js"));return{id:r_,diagram:t}},"loader"),fie={id:r_,detector:hie,loader:die},n_="block",pie=w(t=>/^\s*block(-beta)?/.test(t),"detector"),mie=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./blockDiagram-VD42YOAC-Z3Fc3Bew.js"));return{id:n_,diagram:t}},"loader"),gie={id:n_,detector:pie,loader:mie},bie=gie,i_="architecture",yie=w(t=>/^\s*architecture/.test(t),"detector"),xie=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./architectureDiagram-VXUJARFQ-BPQoZmaM.js"));return{id:i_,diagram:t}},"loader"),vie={id:i_,detector:yie,loader:xie},kie=vie,a_="treemap",wie=w(t=>/^\s*treemap/.test(t),"detector"),Tie=w(async()=>{const{diagram:t}=await Promise.resolve().then(()=>require("./diagram-PSM6KHXK-hjXN9n1N.js"));return{id:a_,diagram:t}},"loader"),Cie={id:a_,detector:wie,loader:Tie},o4=!1,ad=w(()=>{o4||(o4=!0,x0("error",Hne,t=>t.toLowerCase().trim()==="error"),x0("---",{db:{clear:w(()=>{},"clear")},styles:{},renderer:{draw:w(()=>{},"draw")},parser:{parse:w(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:w(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),gp(Wne,Jne,kie),gp(Nre,nie,Sne,kne,Hre,Xre,Zre,tne,fne,bne,Pre,Rre,Xne,Wre,Rne,Nne,Pne,ane,oie,uie,cne,bie,fie,Cie))},"addDiagrams"),Sie=w(async()=>{he.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(as).map(async([r,{detector:n,loader:i}])=>{if(i)try{kp(r)}catch{try{const{diagram:a,id:s}=await i();x0(s,a,n)}catch(a){throw he.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete as[r],a}}}))).filter(r=>r.status==="rejected");if(e.length>0){he.error(`Failed to load ${e.length} external diagrams`);for(const r of e)he.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),_ie="graphics-document document";function s_(t,e){t.attr("role",_ie),e!==""&&t.attr("aria-roledescription",e)}w(s_,"setA11yDiagramInfo");function o_(t,e,r,n){if(t.insert!==void 0){if(r){const i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){const i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}w(o_,"addSVGa11yTitleDescription");var es,gm=(es=class{constructor(e,r,n,i,a){this.type=e,this.text=r,this.db=n,this.parser=i,this.renderer=a}static async fromText(e,r={}){var c,u;const n=_r(),i=O1(e,n);e=_J(e)+`
635
+ `;try{kp(i)}catch{const h=kW(i);if(!h)throw new Ek(`Diagram ${i} not found.`);const{id:d,diagram:f}=await h();x0(d,f)}const{db:a,parser:s,renderer:o,init:l}=kp(i);return s.parser&&(s.parser.yy=a),(c=a.clear)==null||c.call(a),l==null||l(n),r.title&&((u=a.setDiagramTitle)==null||u.call(a,r.title)),await s.parse(e),new es(i,e,a,s,o)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},w(es,"Diagram"),es),l4=[],Eie=w(()=>{l4.forEach(t=>{t()}),l4=[]},"attachFunctions"),Aie=w(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function l_(t){const e=t.match(_k);if(!e)return{text:t,metadata:{}};let r=LT(e[1],{schema:NT})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:t.slice(e[0].length),metadata:n}}w(l_,"extractFrontMatter");var Nie=w(t=>t.replace(/\r\n?/g,`
636
+ `).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Lie=w(t=>{const{text:e,metadata:r}=l_(t),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:e}},"processFrontmatter"),Mie=w(t=>{const e=Bn.detectInit(t)??{},r=Bn.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:gJ(t),directive:e}},"processDirectives");function Hg(t){const e=Nie(t),r=Lie(e),n=Mie(r.text),i=Xh(r.config,n.directive);return t=Aie(n.text),{code:t,title:r.title,config:i}}w(Hg,"preprocessDiagram");function c_(t){const e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}w(c_,"toBase64");var Iie=5e4,Rie="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Bie="sandbox",Die="loose",Oie="http://www.w3.org/2000/svg",Pie="http://www.w3.org/1999/xlink",Fie="http://www.w3.org/1999/xhtml",$ie="100%",zie="100%",Hie="border:0;margin:0;",qie="margin:0",jie="allow-top-navigation-by-user-activation allow-popups",Uie='The "iframe" tag is not supported by your browser.',Wie=["foreignobject"],Gie=["dominant-baseline"];function qg(t){const e=Hg(t);return b0(),OW(e.config??{}),e}w(qg,"processAndSetConfigs");async function u_(t,e){ad();try{const{code:r,config:n}=qg(t);return{diagramType:(await d_(r)).type,config:n}}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}}w(u_,"parse");var c4=w((t,e,r=[])=>`
637
+ .${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),Yie=w((t,e=new Map)=>{var n;let r="";if(t.themeCSS!==void 0&&(r+=`
638
+ ${t.themeCSS}`),t.fontFamily!==void 0&&(r+=`
639
+ :root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(r+=`
640
+ :root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const o=t.htmlLabels??((n=t.flowchart)==null?void 0:n.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(l=>{mm(l.styles)||o.forEach(c=>{r+=c4(l.id,c,l.styles)}),mm(l.textStyles)||(r+=c4(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))))})}return r},"createCssStyles"),Vie=w((t,e,r,n)=>{const i=Yie(t,r),a=rG(e,i,t.themeVariables);return hm(ure(`${n}{${a}}`),dre)},"createUserStyles"),Xie=w((t="",e,r)=>{let n=t;return!r&&!e&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=La(n),n=n.replace(/<br>/g,"<br/>"),n},"cleanUpSvgCode"),Kie=w((t="",e)=>{var i,a;const r=(a=(i=e==null?void 0:e.viewBox)==null?void 0:i.baseVal)!=null&&a.height?e.viewBox.baseVal.height+"px":zie,n=c_(`<body style="${qie}">${t}</body>`);return`<iframe style="width:${$ie};height:${r};${Hie}" src="data:text/html;charset=UTF-8;base64,${n}" sandbox="${jie}">
641
+ ${Uie}
642
+ </iframe>`},"putIntoIFrame"),u4=w((t,e,r,n,i)=>{const a=t.append("div");a.attr("id",r),n&&a.attr("style",n);const s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns",Oie);return i&&s.attr("xmlns:xlink",i),s.append("g"),t},"appendDivSvgG");function bm(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}w(bm,"sandboxedIframe");var Qie=w((t,e,r,n)=>{var i,a,s;(i=t.getElementById(e))==null||i.remove(),(a=t.getElementById(r))==null||a.remove(),(s=t.getElementById(n))==null||s.remove()},"removeExistingElements"),Zie=w(async function(t,e,r){var G,ee,W,U,j,Q;ad();const n=qg(e);e=n.code;const i=_r();he.debug(i),e.length>((i==null?void 0:i.maxTextSize)??Iie)&&(e=Rie);const a="#"+t,s="i"+t,o="#"+s,l="d"+t,c="#"+l,u=w(()=>{const be=At(d?o:c).node();be&&"remove"in be&&be.remove()},"removeTempElements");let h=At("body");const d=i.securityLevel===Bie,f=i.securityLevel===Die,p=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),d){const Y=bm(At(r),s);h=At(Y.nodes()[0].contentDocument.body),h.node().style.margin=0}else h=At(r);u4(h,t,l,`font-family: ${p}`,Pie)}else{if(Qie(document,t,l,s),d){const Y=bm(At("body"),s);h=At(Y.nodes()[0].contentDocument.body),h.node().style.margin=0}else h=At("body");u4(h,t,l)}let m,y;try{m=await gm.fromText(e,{title:n.title})}catch(Y){if(i.suppressErrorRendering)throw u(),Y;m=await gm.fromText("error"),y=Y}const b=h.select(c).node(),v=m.type,C=b.firstChild,E=C.firstChild,_=(ee=(G=m.renderer).getClasses)==null?void 0:ee.call(G,e,m),k=Vie(i,v,_,a),N=document.createElement("style");N.innerHTML=k,C.insertBefore(N,E);try{await m.renderer.draw(e,t,dp.version,m)}catch(Y){throw i.suppressErrorRendering?u():$ne.draw(e,t,dp.version),Y}const D=h.select(`${c} svg`),$=(U=(W=m.db).getAccTitle)==null?void 0:U.call(W),R=(Q=(j=m.db).getAccDescription)==null?void 0:Q.call(j);f_(v,D,$,R),h.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",Fie);let P=h.select(c).node().innerHTML;if(he.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),P=Xie(P,d,cr(i.arrowMarkerAbsolute)),d){const Y=h.select(c+" svg").node();P=Kie(P,Y)}else f||(P=ho.sanitize(P,{ADD_TAGS:Wie,ADD_ATTR:Gie,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Eie(),y)throw y;return u(),{diagramType:v,svg:P,bindFunctions:m.db.bindFunctions}},"render");function h_(t={}){var n;const e=lr({},t);e!=null&&e.fontFamily&&!((n=e.themeVariables)!=null&&n.fontFamily)&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),BW(e),e!=null&&e.theme&&e.theme in Ui?e.themeVariables=Ui[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=Ui.default.getThemeVariables(e.themeVariables));const r=typeof e=="object"?RW(e):Ik();D1(r.logLevel),ad()}w(h_,"initialize");var d_=w((t,e={})=>{const{code:r}=Hg(t);return gm.fromText(r,e)},"getDiagramFromText");function f_(t,e,r,n){s_(e,t),o_(e,r,n,e.attr("id"))}w(f_,"addA11yInfo");var ds=Object.freeze({render:Zie,parse:u_,getDiagramFromText:d_,initialize:h_,getConfig:_r,setConfig:Rk,getSiteConfig:Ik,updateSiteConfig:DW,reset:w(()=>{b0()},"reset"),globalReset:w(()=>{b0(fo)},"globalReset"),defaultConfig:fo});D1(_r().logLevel);b0(_r());var Jie=w((t,e,r)=>{he.warn(t),wg(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),p_=w(async function(t={querySelector:".mermaid"}){try{await eae(t)}catch(e){if(wg(e)&&he.error(e.str),wn.parseError&&wn.parseError(e),!t.suppressErrors)throw he.error("Use the suppressErrors option to suppress these errors"),e}},"run"),eae=w(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const n=ds.getConfig();he.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else if(e)i=document.querySelectorAll(e);else throw new Error("Nodes and querySelector are both undefined");he.debug(`Found ${i.length} diagrams`),(n==null?void 0:n.startOnLoad)!==void 0&&(he.debug("Start On Load: "+(n==null?void 0:n.startOnLoad)),ds.updateSiteConfig({startOnLoad:n==null?void 0:n.startOnLoad}));const a=new Bn.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed);let s;const o=[];for(const l of Array.from(i)){if(he.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;s=l.innerHTML,s=E7(Bn.entityDecode(s)).trim().replace(/<br\s*\/?>/gi,"<br/>");const u=Bn.detectInit(s);u&&he.debug("Detected early reinit: ",u);try{const{svg:h,bindFunctions:d}=await y_(c,s,l);l.innerHTML=h,t&&await t(c),d&&d(l)}catch(h){Jie(h,o,wn.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),m_=w(function(t){ds.initialize(t)},"initialize"),tae=w(async function(t,e,r){he.warn("mermaid.init is deprecated. Please use run instead."),t&&m_(t);const n={postRenderCallback:r,querySelector:".mermaid"};typeof e=="string"?n.querySelector=e:e&&(e instanceof HTMLElement?n.nodes=[e]:n.nodes=e),await p_(n)},"init"),rae=w(async(t,{lazyLoad:e=!0}={})=>{ad(),gp(...t),e===!1&&await Sie()},"registerExternalDiagrams"),g_=w(function(){if(wn.startOnLoad){const{startOnLoad:t}=ds.getConfig();t&&wn.run().catch(e=>he.error("Mermaid failed to initialize",e))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",g_,!1);var nae=w(function(t){wn.parseError=t},"setParseErrorHandler"),V0=[],kf=!1,b_=w(async()=>{if(!kf){for(kf=!0;V0.length>0;){const t=V0.shift();if(t)try{await t()}catch(e){he.error("Error executing queue",e)}}kf=!1}},"executeQueue"),iae=w(async(t,e)=>new Promise((r,n)=>{const i=w(()=>new Promise((a,s)=>{ds.parse(t,e).then(o=>{a(o),r(o)},o=>{var l;he.error("Error parsing",o),(l=wn.parseError)==null||l.call(wn,o),s(o),n(o)})}),"performCall");V0.push(i),b_().catch(n)}),"parse"),y_=w((t,e,r)=>new Promise((n,i)=>{const a=w(()=>new Promise((s,o)=>{ds.render(t,e,r).then(l=>{s(l),n(l)},l=>{var c;he.error("Error parsing",l),(c=wn.parseError)==null||c.call(wn,l),o(l),i(l)})}),"performCall");V0.push(a),b_().catch(i)}),"render"),aae=w(()=>Object.keys(as).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),wn={startOnLoad:!0,mermaidAPI:ds,parse:iae,render:y_,init:tae,run:p_,registerExternalDiagrams:rae,registerLayoutLoaders:CS,initialize:m_,parseError:void 0,contentLoaded:g_,setParseErrorHandler:nae,detectType:O1,registerIconPacks:L7,getRegisteredDiagramsMetadata:aae},wf=wn;/*! Check if previously processed *//*!
643
+ * Wait for document loaded before starting the execution
644
+ */var h4={startOnLoad:!1,theme:"default",securityLevel:"strict",fontFamily:"monospace",suppressErrorRendering:!0};function sae(t={}){let e=!1,r={...h4,...t.config},n={initialize(i){r={...h4,...t.config,...i},wf.initialize(r),e=!0},async render(i,a){return e||(wf.initialize(r),e=!0),await wf.render(i,a)}};return{name:"mermaid",type:"diagram",language:"mermaid",getMermaid(i){return i&&n.initialize(i),n}}}var x_=sae();function jg(t){const{bold:e,italic:r,strike:n}=t;return e&&r&&n?"boldItalicStrikethrough":e&&r?"boldItalic":e&&n?"boldStrikethrough":r&&n?"italicStrikethrough":e?"bold":r?"italic":n?"strikethrough":"plain"}function v_(t){switch(t){case"bold":return{bold:!0,italic:!1,strike:!1};case"italic":return{bold:!1,italic:!0,strike:!1};case"strikethrough":return{bold:!1,italic:!1,strike:!0};case"boldItalic":return{bold:!0,italic:!0,strike:!1};case"boldStrikethrough":return{bold:!0,italic:!1,strike:!0};case"italicStrikethrough":return{bold:!1,italic:!0,strike:!0};case"boldItalicStrikethrough":return{bold:!0,italic:!0,strike:!0};case"plain":case"code":case"link":case"math":default:return{bold:!1,italic:!1,strike:!1}}}function Hi(t){const e=[];for(const r of t){if(!r.text)continue;const n=e[e.length-1];if(n&&n.style===r.style&&(n.style!=="link"||n.href===r.href)){n.text+=r.text;continue}e.push({...r})}return e}function k_(t,e){let r=0;for(let n=e-1;n>=0&&t[n]==="\\";n--)r++;return r%2===1}function bu(t,e,r){let n=r;for(;n<=t.length-e.length;){const i=t.indexOf(e,n);if(i===-1)return-1;if(!k_(t,i))return i;n=i+1}return-1}function w_(t,e){const r=[];let n=0,i="";const a=()=>{i&&(r.push({text:i,style:jg(e)}),i="")};for(;n<t.length;){if(t[n]==="\\"&&n+1<t.length){i+=t[n+1],n+=2;continue}if(t[n]==="["){const l=bu(t,"]",n+1);if(l!==-1&&t[l+1]==="("){const c=bu(t,")",l+2);if(c!==-1){a();const u=t.slice(n+1,l),h=t.slice(l+2,c);r.push({text:u,style:"link",href:h}),n=c+1;continue}}}if(t[n]==="`"){const l=bu(t,"`",n+1);if(l!==-1){a(),r.push({text:t.slice(n+1,l),style:"code"}),n=l+1;continue}}if(t[n]==="$"&&t[n+1]!=="$"){const l=(()=>{for(let c=n+1;c<t.length;c++)if(t[c]==="$"&&!k_(t,c)&&t[c-1]!=="$")return c;return-1})();if(l!==-1){a(),r.push({text:t.slice(n+1,l),style:"math"}),n=l+1;continue}}const s=[{marker:"***",apply:l=>({...l,bold:!0,italic:!0})},{marker:"**",apply:l=>({...l,bold:!0})},{marker:"*",apply:l=>({...l,italic:!0})},{marker:"~~",apply:l=>({...l,strike:!0})}];let o=!1;for(const{marker:l,apply:c}of s)if(t.startsWith(l,n)){const u=bu(t,l,n+l.length);if(u!==-1){a();const h=t.slice(n+l.length,u);r.push(...w_(h,c(e))),n=u+l.length,o=!0}break}o||(i+=t[n],n++)}return a(),r}function hi(t){return Hi(w_(t,{bold:!1,italic:!1,strike:!1}))}function Tf(t){return t.map(e=>e.text).join("")}function oae(t,e){if(t==="code"||t==="link"||t==="math")return t;const r=v_(t),n={...r};return e==="bold"&&(n.bold=!r.bold),e==="italic"&&(n.italic=!r.italic),e==="strikethrough"&&(n.strike=!r.strike),jg(n)}function lae(t){return t==="plain"?{open:"",close:""}:t==="italic"?{open:"*",close:"*"}:t==="bold"?{open:"**",close:"**"}:t==="strikethrough"?{open:"~~",close:"~~"}:t==="boldItalic"?{open:"***",close:"***"}:t==="boldStrikethrough"?{open:"~~**",close:"**~~"}:t==="italicStrikethrough"?{open:"~~*",close:"*~~"}:t==="boldItalicStrikethrough"?{open:"~~***",close:"***~~"}:{open:"",close:""}}function d4(t){return t.replace(/\\/g,"\\\\").replace(/\n/g,"\\n")}function cae(t){let e=0,r=0;for(let n=0;n<t.length;n++)t[n]==="`"?(r++,e=Math.max(e,r)):r=0;return"`".repeat(Math.max(1,e+1))}function xn(t,e={}){const{forParsing:r=!1}=e;return t.map(n=>{if(n.style==="code"){const o=cae(n.text);return o+n.text+o}if(n.style==="math")return`$${r?n.text:n.text.replace(/\$/g,"\\$")}$`;if(n.style==="link"){const o=r?n.text:d4(n.text),l=n.href||"";return`[${o}](${l})`}const{open:i,close:a}=lae(n.style),s=r?n.text:d4(n.text);return i+s+a}).join("")}function Ug(t){if(!t.length)return null;let e=0;return t.map((r,n)=>{const i=e,a=r.text.length;e+=a;const s=`${n}-${r.style}`,o=i,l=a,c=r.style;switch(r.style){case"bold":return S.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:S.jsx("strong",{className:"font-semibold",children:r.text})},s);case"italic":return S.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:S.jsx("em",{className:"italic",children:r.text})},s);case"strikethrough":return S.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:S.jsx("s",{className:"line-through",children:r.text})},s);case"boldItalic":return S.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:S.jsx("strong",{className:"font-semibold",children:S.jsx("em",{className:"italic",children:r.text})})},s);case"boldStrikethrough":return S.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:S.jsx("strong",{className:"font-semibold",children:S.jsx("s",{className:"line-through",children:r.text})})},s);case"italicStrikethrough":return S.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:S.jsx("em",{className:"italic",children:S.jsx("s",{className:"line-through",children:r.text})})},s);case"boldItalicStrikethrough":return S.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:S.jsx("strong",{className:"font-semibold",children:S.jsx("em",{className:"italic",children:S.jsx("s",{className:"line-through",children:r.text})})})},s);case"code":return S.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:S.jsx("code",{className:"px-1.5 py-0.5 bg-notion-code-bg text-red-600 rounded text-sm font-mono",children:r.text})},s);case"link":return S.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:S.jsx("a",{href:r.href,className:"text-blue-600 underline hover:text-blue-800",target:"_blank",rel:"noopener noreferrer",children:r.text})},s);case"math":return S.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,"data-math":"1",className:"inline-block align-middle [&_.katex-display]:!m-0 [&_.katex-display]:!inline",children:S.jsx(is,{plugins:{math:p0},isAnimating:!1,children:`$$${r.text}$$`})},s);case"plain":default:return S.jsx("span",{"data-span-start":o,"data-span-len":l,"data-span-style":c,children:r.text},s)}})}function f4(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Fs(t,e){return t.map(r=>{const n=f4(r.text);switch(r.style){case"bold":return`<strong class="font-semibold">${n}</strong>`;case"italic":return`<em class="italic">${n}</em>`;case"strikethrough":return`<s class="line-through">${n}</s>`;case"boldItalic":return`<strong class="font-semibold"><em class="italic">${n}</em></strong>`;case"boldStrikethrough":return`<strong class="font-semibold"><s class="line-through">${n}</s></strong>`;case"italicStrikethrough":return`<em class="italic"><s class="line-through">${n}</s></em>`;case"boldItalicStrikethrough":return`<strong class="font-semibold"><em class="italic"><s class="line-through">${n}</s></em></strong>`;case"code":return`<code class="px-1.5 py-0.5 bg-notion-code-bg text-red-600 rounded text-sm font-mono">${n}</code>`;case"link":return`<a href="${f4(r.href||"")}" class="text-blue-600 underline hover:text-blue-800" target="_blank" rel="noopener noreferrer">${n}</a>`;case"math":return`<span data-math="1" class="font-mono text-notion-text bg-notion-code-bg px-1 rounded border border-notion-border"><span data-math-delim="1" class="text-notion-text-secondary select-none" contenteditable="false">$</span>${n}<span data-math-delim="1" class="text-notion-text-secondary select-none" contenteditable="false">$</span></span>`;case"plain":default:return n}}).join("")}function p4(t,e){return[{...t,text:t.text.slice(0,e)},{...t,text:t.text.slice(e)}]}function T_(t,e){return e==="bold"?t==="bold"||t==="boldItalic"||t==="boldStrikethrough"||t==="boldItalicStrikethrough":e==="italic"?t==="italic"||t==="boldItalic"||t==="italicStrikethrough"||t==="boldItalicStrikethrough":e==="strikethrough"?t==="strikethrough"||t==="boldStrikethrough"||t==="italicStrikethrough"||t==="boldItalicStrikethrough":e==="code"?t==="code":e==="link"?t==="link":e==="math"?t==="math":!1}function C_(t,e,r){const n=[];let i=0;for(const a of t){const s=i,o=i+a.text.length;o>e&&s<r&&n.push(a),i=o}return n}function uae(t,e,r,n){const i=C_(t,e,r);return i.length===0?!1:i.every(a=>T_(a.style,n))}function hae(t,e,r,n){return C_(t,e,r).some(a=>T_(a.style,n))}function Tl(t,e,r,n,i={}){const a=Math.max(0,Math.min(e,r)),s=Math.max(0,Math.max(e,r));if(a===s)return t;const o=n==="math"?hae(t,a,s,n):uae(t,a,s,n);if(n==="math"&&o){const u=[];let h=0;for(const d of t){const f=h,p=h+d.text.length;p>a&&f<s&&d.style==="math"?u.push({...d,style:"plain"}):u.push({...d}),h=p}return Hi(u)}const l=[];let c=0;for(const u of t){const h=c,d=c+u.text.length;if(d<=a||h>=s){l.push({...u}),c=d;continue}const f=Math.max(0,a-h),p=Math.min(u.text.length,s-h);if(f>0){const[m,y]=p4(u,f);l.push(m),u.text=y.text}if(p-f<u.text.length){const[m,y]=p4(u,p-f),b=m4(m,n,o,i);l.push(b),l.push(y)}else{const m=m4(u,n,o,i);l.push(m)}c=d}return Hi(l)}function m4(t,e,r,n){return e==="bold"||e==="italic"||e==="strikethrough"?{...t,style:dae(t.style,e,!r)}:e==="code"?r?{...t,style:"plain"}:{...t,style:"code",href:void 0}:e==="link"?r?{...t,style:"plain",href:void 0}:{...t,style:"link",href:n.href||""}:e==="math"?r?{...t,style:"plain"}:{...t,style:"math"}:t}function dae(t,e,r){if(t==="code"||t==="link"||t==="math")return t;const n=v_(t);return e==="bold"&&(n.bold=r),e==="italic"&&(n.italic=r),e==="strikethrough"&&(n.strike=r),jg(n)}const fae=()=>({inCodeBlock:!1,codeBlockLanguage:"",codeBlockContent:"",inMathBlock:!1,mathBlockContent:"",inMermaidBlock:!1,mermaidContent:""}),pae=/^```(\w*)?$/,mae=/^```$/,gae=/^\$\$$/,bae=/^\$\$$/,yae=/^(#{1,6})\s+(.*)$/,xae=/^(\s*)[-*]\s+(.*)$/,vae=/^(\s*)(\d+)\.\s+(.*)$/,kae=/^>\s?(.*)$/,wae=/^(?:---|\*\*\*|___)$/,Tae=/^!\[([^\]]*)\]\(([^)]+)\)$/;function Cae(t){const e=t.trim();return e?/^:?-{3,}:?$/.test(e):!1}function Sae(t){const e=t.trim(),r=e.startsWith(":"),n=e.endsWith(":");return r&&n?"center":n?"right":"left"}function Cf(t){const e=[];let r="",n=!1;for(let i=0;i<t.length;i++){const a=t[i];if(n){r+=a,n=!1;continue}if(a==="\\"){n=!0,r+=a;continue}if(a==="|"){e.push(r),r="";continue}r+=a}return e.push(r),t.trimStart().startsWith("|")&&e.shift(),t.trimEnd().endsWith("|")&&e.pop(),e.map(i=>i.trim())}function g4(t){return t.replace(/<br\s*\/?>/gi,`
645
+ `).replace(/\\\|/g,"|")}function _ae(t){return t.replace(/\n/g,"<br>").replace(/\|/g,"\\|")}function Eae(t){const e=xn(t,{forParsing:!0});return _ae(e)}function b4(t){let e=0,r=0;for(let n=0;n<t.length;n++)t[n]==="`"?(r++,r>e&&(e=r)):r=0;return"`".repeat(Math.max(3,e+1))}function Aae(t){if(wae.test(t))return{type:"divider",content:"",isComplete:!0};const e=t.match(yae);if(e)return{type:"heading",content:e[2],level:e[1].length,isComplete:!0};const r=t.match(Tae);if(r)return{type:"image",content:r[2],isComplete:!0};const n=t.match(xae);if(n)return{type:"list",content:n[2],listType:"unordered",depth:n[1].replace(/\t/g," ").length,isComplete:!0};const i=t.match(vae);if(i)return{type:"list",content:i[3],listType:"ordered",depth:i[1].replace(/\t/g," ").length,isComplete:!0};const a=t.match(kae);return a?{type:"blockquote",content:a[1],isComplete:!0}:null}function Ki(t,e=!1,r=[]){const n=t.split(`
646
+ `),i=[],a=fae();let s=[],o=0;const l=(c,u,h={})=>{const d=r[o],f=d&&d.type===c?d.id:Di(10);if(o++,c==="paragraph"||c==="heading"||c==="list"||c==="blockquote")return{id:f,type:c,spans:hi(u),level:h.level,listType:h.listType,depth:h.depth,isStreaming:h.isStreaming??!1,metadata:{dirty:!1}};if(c==="divider")return{id:f,type:c,isStreaming:h.isStreaming??!1,metadata:{dirty:!1}};if(c==="table"){const p=h.table;return{id:f,type:"table",header:((p==null?void 0:p.header)||[]).map(m=>m),rows:((p==null?void 0:p.rows)||[]).map(m=>m.map(y=>y)),align:p==null?void 0:p.align,isStreaming:h.isStreaming??!1,metadata:{dirty:!1}}}return{id:f,type:c,content:u,level:h.level,language:h.language,listType:h.listType,isStreaming:h.isStreaming??!1,metadata:{dirty:!1}}};for(let c=0;c<n.length;c++){const u=n[c],h=c===n.length-1;if(a.inCodeBlock){mae.test(u)&&a.codeBlockContent.length>0?(a.codeBlockLanguage.toLowerCase()==="mermaid"?i.push(l("mermaid",a.codeBlockContent.trimEnd(),{isStreaming:!1})):i.push(l("code",a.codeBlockContent.trimEnd(),{language:a.codeBlockLanguage||"text",isStreaming:!1})),a.inCodeBlock=!1,a.codeBlockLanguage="",a.codeBlockContent=""):(a.codeBlockContent+=(a.codeBlockContent?`
647
+ `:"")+u,e&&h&&(a.codeBlockLanguage.toLowerCase()==="mermaid"?i.push(l("mermaid",a.codeBlockContent,{isStreaming:!0})):i.push(l("code",a.codeBlockContent,{language:a.codeBlockLanguage||"text",isStreaming:!0}))));continue}if(a.inMathBlock){bae.test(u)&&a.mathBlockContent.length>0?(i.push(l("math",a.mathBlockContent.trimEnd(),{isStreaming:!1})),a.inMathBlock=!1,a.mathBlockContent=""):(a.mathBlockContent+=(a.mathBlockContent?`
648
+ `:"")+u,e&&h&&i.push(l("math",a.mathBlockContent,{isStreaming:!0})));continue}const d=u.match(pae);if(d){a.inCodeBlock=!0,a.codeBlockLanguage=d[1]||"",a.codeBlockContent="";continue}if(gae.test(u)){a.inMathBlock=!0,a.mathBlockContent="";continue}if(u.trim()===""){s=[];continue}const p=u.trim().startsWith("|");if(c+1<n.length){const y=Cf(u),b=Cf(n[c+1]),v=y.length>=1&&y.some(E=>E.length>0),C=b.length===y.length&&b.length>=1&&b.every(E=>Cae(E));if(v&&C){s=[];const E=b.map(Sae),_=y.map($=>hi(g4($))),k=[];let N=c+2;for(;N<n.length;N++){const $=n[N];if($.trim()===""||!$.includes("|"))break;const R=Cf($);if(R.length!==y.length)break;k.push(R.map(P=>hi(g4(P))))}const D=e;i.push(l("table","",{table:{header:_,rows:k,align:E},isStreaming:D})),c=N-1;continue}if(e&&p&&v){const _=n[c+1].trim(),k=_.startsWith("|");if(k&&(_.includes("-")||_==="|"||c+1===n.length-1)||k&&c+1>=n.length-2){s=[];let D=c;const $=[];for(;D<n.length;D++){const R=n[D].trim();if(R===""&&D>c+1||!R.startsWith("|")&&R!=="")break;$.push(n[D])}i.push(l("paragraph",$.join(`
649
+ `),{isStreaming:!0})),c=D-1;continue}}}if(e&&h&&p){s=[],i.push(l("paragraph",u,{isStreaming:!0}));continue}const m=Aae(u);if(m){if(m.type==="list"){const y=m.depth??0;if(s.length===0)s=[y],m.depth=0;else{let b=-1;for(let v=s.length-1;v>=0;v--)if(s[v]<=y){b=v;break}b===-1?(s=[y],m.depth=0):s[b]===y?(s=s.slice(0,b+1),m.depth=b):(s=s.slice(0,b+1),s.push(y),m.depth=b+1)}}else s=[];i.push(l(m.type,m.content,{level:m.level,listType:m.listType,depth:m.depth,isStreaming:e&&h}))}else s=[],i.push(l("paragraph",u,{isStreaming:e&&h}))}return i}function ar(t){const e=[];let r=[];const n=()=>{r=[]},i=s=>{var l;const o=!!((l=s.metadata)!=null&&l.dirty);switch(s.type){case"heading":return n(),"#".repeat(s.level||1)+" "+xn(s.spans);case"code":if(n(),o){const c=b4(s.content),u=s.language||"";return c+u+`
650
+ `+s.content+`
651
+ `+c}return"```"+(s.language||"")+`
652
+ `+s.content+"\n```";case"mermaid":if(n(),o){const c=b4(s.content);return c+`mermaid
653
+ `+s.content+`
654
+ `+c}return"```mermaid\n"+s.content+"\n```";case"math":return n(),`$$
655
+ `+s.content+`
656
+ $$`;case"image":return n(),"![image]("+s.content+")";case"table":{n();const c=s.header||[],u=s.rows||[],h=Math.max(c.length,...u.map(b=>b.length)),d=(s.align||[]).slice(0,h),f=b=>b?Eae(b):"",p="| "+Array.from({length:h},(b,v)=>f(c[v])).join(" | ")+" |",m="| "+Array.from({length:h},(b,v)=>{const C=d[v]||"left";return C==="center"?":---:":C==="right"?"---:":"---"}).join(" | ")+" |",y=u.map(b=>"| "+Array.from({length:h},(v,C)=>f(b[C])).join(" | ")+" |");return[p,m,...y].join(`
657
+ `)}case"list":{const c=s.depth||0,u=" ".repeat(c),h=xn(s.spans);if(s.listType==="ordered"){for(;r.length<=c;)r.push(0);r[c]=(r[c]||0)+1;for(let d=c+1;d<r.length;d++)r[d]=0;return`${u}${r[c]}. ${h}`}return`${u}- ${h}`}case"blockquote":return n(),`> ${xn(s.spans)}`;case"divider":return n(),"---";case"paragraph":return n(),xn(s.spans);default:return n(),s.content??""}};let a=null;for(const s of t){const o=i(s);if(e.length>0){const l=a==="list"&&s.type==="list"?`
658
+ `:`
659
+
660
+ `;e.push(l)}e.push(o),a=s.type}return e.join("")}function S_({markdown:t,isStreaming:e}){const r=F.useRef([]);return{blocks:F.useMemo(()=>{const i=Ki(t,e,r.current);return r.current=i,i},[t,e])}}const Nae={"# ":1,"## ":2,"### ":3,"#### ":4,"##### ":5,"###### ":6},Lae={"- ":"unordered","* ":"unordered","1. ":"ordered"},y4={"\\* ":"* ","\\- ":"- ","\\> ":"> "};function __({onBlockTypeChange:t}={}){const e=F.useCallback(i=>{for(const[a,s]of Object.entries(y4))if(i===a)return s;return null},[]),r=F.useCallback(i=>{for(const s of Object.keys(y4))if(i===s)return null;for(const[s,o]of Object.entries(Nae))if(i.startsWith(s))return{newType:"heading",newContent:i.slice(s.length),level:o};for(const[s,o]of Object.entries(Lae))if(i.startsWith(s))return{newType:"list",newContent:i.slice(s.length),listType:o};if(i.startsWith("> "))return{newType:"blockquote",newContent:i.slice(2)};if(i==="---"||i==="***"||i==="___")return{newType:"divider",newContent:""};const a=i.match(/^```([\w-]*)\s$/);return a?{newType:"code",newContent:"",language:a[1]||"text"}:null},[]),n=F.useCallback((i,a,s,o)=>{if(i.key===" "&&o===s.length){const l=s+" ";if(e(l)&&a.type==="paragraph")return!1;const u=r(l);if(u&&a.type==="paragraph")return i.preventDefault(),t==null||t(a.id,u.newType,u.newContent,{level:u.level,listType:u.listType,language:u.language}),!0;if(u&&u.newType==="list"&&a.type==="list"&&u.listType!==a.listType)return i.preventDefault(),t==null||t(a.id,"list",u.newContent,{listType:u.listType,depth:a.depth??0}),!0}if(i.key==="Enter"&&o===s.length){const l=s+" ",c=r(l);if((c==null?void 0:c.newType)==="code"&&a.type==="paragraph")return i.preventDefault(),t==null||t(a.id,c.newType,c.newContent,{language:c.language}),!0}return i.key==="Backspace"&&o===0&&a.type!=="paragraph"&&s===""?(i.preventDefault(),t==null||t(a.id,"paragraph",""),!0):(i.key==="Enter"&&a.type==="code",!1)},[r,e,t]);return{detectShortcut:r,detectEscape:e,handleKeyDown:n}}function Mae(t){const{bold:e,italic:r,strike:n}=t;return e&&r&&n?"boldItalicStrikethrough":e&&r?"boldItalic":e&&n?"boldStrikethrough":r&&n?"italicStrikethrough":e?"bold":r?"italic":n?"strikethrough":"plain"}function Iae(t){const e={bold:!1,italic:!1,strike:!1};let r,n=!1,i=!1,a=!1,s=t.parentNode;for(;s&&s.nodeType===Node.ELEMENT_NODE;){const o=s,l=o.tagName.toLowerCase();l==="code"&&(n=!0),l==="a"&&(i=!0,r=o.getAttribute("href")||""),(l==="strong"||l==="b")&&(e.bold=!0),(l==="em"||l==="i")&&(e.italic=!0),(l==="s"||l==="del"||l==="strike")&&(e.strike=!0),l==="span"&&o.getAttribute("data-math")==="1"&&(a=!0),s=s.parentNode}return n?{style:"code"}:a?{style:"math"}:i?{style:"link",href:r}:{style:Mae(e)}}function Wg(t){let e=t.parentNode;for(;e&&e.nodeType===Node.ELEMENT_NODE;){if(e.getAttribute("data-math-delim")==="1")return!0;e=e.parentNode}return!1}function E_(t,e){let r=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;for(;r&&r!==e;){if(r.getAttribute("data-math")==="1")return r;r=r.parentElement}return null}function Rae(t){const e=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null);let r=null,n;for(;n=e.nextNode();)Wg(n)||(r=n);return r}function Bae(t,e,r){if(e.nodeType===Node.ELEMENT_NODE){const i=e;if(r>0)return i.childNodes[r-1]||null}if(e.nodeType===Node.TEXT_NODE&&r>0)return null;let n=e;for(;n&&n!==t;){if(n.previousSibling)return n.previousSibling;n=n.parentNode}return null}function x4(t,e,r){const n=E_(e,t);if(n){if(e.nodeType===Node.ELEMENT_NODE&&e===n){const a=n.childNodes.length;if(r>=a)return"afterMath"}return"insideMath"}const i=Bae(t,e,r);if(i&&i.nodeType===Node.ELEMENT_NODE&&i.getAttribute("data-math")==="1")return"afterMath"}function da(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null);let n;for(;n=r.nextNode();){const i=n.textContent||"";if(!i||Wg(n))continue;const a=Iae(n);if(a.style==="link"){e.push({text:i,style:"link",href:a.href});continue}if(a.style==="math"){e.push({text:i,style:"math"});continue}e.push({text:i,style:a.style})}return Hi(e)}function bn(t){const e=window.getSelection();if(!e||e.rangeCount===0)return null;const r=e.getRangeAt(0);if(!t.contains(r.startContainer)||!t.contains(r.endContainer))return null;const n=v4(t,r.startContainer,r.startOffset),i=v4(t,r.endContainer,r.endOffset);return n===null||i===null?null:{start:n,end:i,startAffinity:x4(t,r.startContainer,r.startOffset),endAffinity:x4(t,r.endContainer,r.endOffset)}}function v4(t,e,r){var a,s;const n=document.createRange();try{n.selectNodeContents(t),n.setEnd(e,r)}catch{return null}const i=n.cloneContents();return(a=i.querySelectorAll)==null||a.call(i,'[data-math-delim="1"]').forEach(o=>o.remove()),((s=i.textContent)==null?void 0:s.length)??0}function $i(t,e,r,n={}){const i=k4(t,e,n.startAffinity),a=k4(t,r,n.endAffinity);if(!i||!a)return;const s=document.createRange();s.setStart(i.node,i.offset),s.setEnd(a.node,a.offset);const o=window.getSelection();o==null||o.removeAllRanges(),o==null||o.addRange(s)}function k4(t,e,r){var s;const n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null);let i=0,a;for(;a=n.nextNode();){if(Wg(a))continue;const o=((s=a.textContent)==null?void 0:s.length)||0;if(i+o>e)return{node:a,offset:Math.max(0,e-i)};if(i+o===e){const l=E_(a,t);if(l){const c=Rae(l);if(c&&c===a&&r==="afterMath"){const u=l.parentNode;if(u){const h=Array.prototype.indexOf.call(u.childNodes,l);if(h!==-1)return{node:u,offset:h+1}}}}return{node:a,offset:o}}i+=o}return{node:t,offset:t.childNodes.length}}const Dae=220,w4=8;function Oae({containerRef:t,onFormat:e,isMathSelection:r}){const[n,i]=F.useState(!1),[a,s]=F.useState({top:0,left:0}),[o,l]=F.useState(!1),c=F.useRef(null),u=F.useCallback(()=>{var _,k;const d=window.getSelection();if(!d||d.isCollapsed||!d.rangeCount){i(!1),l(!1);return}const f=d.getRangeAt(0);if(!((_=t.current)!=null&&_.contains(f.commonAncestorContainer))){i(!1),l(!1);return}l(!!(r!=null&&r(f)));const p=f.getBoundingClientRect(),y=(((k=c.current)==null?void 0:k.offsetWidth)||Dae)/2,b=p.left+p.width/2,v=y+w4,C=window.innerWidth-y-w4,E=Math.max(v,Math.min(C,b));s({top:p.top-45,left:E}),i(!0)},[t,r]);F.useEffect(()=>{const d=()=>{requestAnimationFrame(u)};return document.addEventListener("selectionchange",d),()=>{document.removeEventListener("selectionchange",d)}},[u]),F.useEffect(()=>{const d=f=>{f.target.closest(".floating-toolbar")};return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[]);const h=F.useCallback(d=>{o&&d!=="math"||e(d)},[e,o]);return n?S.jsxs("div",{ref:c,className:"floating-toolbar fixed z-[100] flex items-center gap-1 px-2 py-1.5 bg-notion-bg-elevated rounded-lg shadow-lg border border-notion-border",style:{top:a.top,left:a.left,transform:"translateX(-50%)"},onMouseDown:d=>d.preventDefault(),children:[S.jsx(Rs,{onClick:()=>h("bold"),title:"Bold (⌘B)",disabled:o,children:S.jsx(Pae,{})}),S.jsx(Rs,{onClick:()=>h("italic"),title:"Italic (⌘I)",disabled:o,children:S.jsx(Fae,{})}),S.jsx(Rs,{onClick:()=>h("strikethrough"),title:"Strikethrough",disabled:o,children:S.jsx($ae,{})}),S.jsx(Rs,{onClick:()=>h("code"),title:"Code (⌘E)",disabled:o,children:S.jsx(zae,{})}),S.jsx(Rs,{onClick:()=>h("math"),title:"Math (LaTeX) (⌘M)",disabled:!1,children:S.jsx(qae,{})}),S.jsx("div",{className:"w-px h-5 bg-notion-border mx-1"}),S.jsx(Rs,{onClick:()=>h("link"),title:"Link (⌘K)",disabled:o,children:S.jsx(Hae,{})})]}):null}function Rs({children:t,onClick:e,title:r,disabled:n}){return S.jsx("button",{type:"button",onClick:e,title:r,disabled:n,className:`p-1.5 rounded text-notion-text-secondary transition-colors ${n?"opacity-40 cursor-not-allowed":"hover:bg-notion-bg-hover hover:text-notion-text"}`,children:t})}function Pae(){return S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),S.jsx("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]})}function Fae(){return S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),S.jsx("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),S.jsx("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]})}function $ae(){return S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M16 4H9a3 3 0 0 0-3 3v1a3 3 0 0 0 3 3h6a3 3 0 0 1 3 3v1a3 3 0 0 1-3 3H8"}),S.jsx("line",{x1:"4",y1:"12",x2:"20",y2:"12"})]})}function zae(){return S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("polyline",{points:"16 18 22 12 16 6"}),S.jsx("polyline",{points:"8 6 2 12 8 18"})]})}function Hae(){return S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),S.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}function qae(){return S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M4 4h6l4 16h6"}),S.jsx("path",{d:"M4 12h16"})]})}function jae({isOpen:t,onSubmit:e,onCancel:r,initialHref:n=""}){const[i,a]=F.useState(n),s=F.useRef(null),o=F.useRef(null);F.useEffect(()=>{t&&(a(n),requestAnimationFrame(()=>{var u,h;(u=s.current)==null||u.focus(),(h=s.current)==null||h.select()}))},[t,n]);const l=F.useCallback(u=>{u.preventDefault();const h=i.trim();if(h){const d=h.match(/^https?:\/\//)?h:`https://${h}`;e(d)}},[i,e]),c=F.useCallback(u=>{u.key==="Escape"&&(u.preventDefault(),u.stopPropagation(),r())},[r]);return t?S.jsxs("div",{className:"link-modal fixed inset-0 z-[100] flex items-center justify-center",onKeyDown:c,children:[S.jsx("div",{className:"absolute inset-0 bg-black/20 backdrop-blur-[1px]",onClick:r}),S.jsxs("div",{ref:o,className:"relative bg-notion-bg-elevated rounded-xl shadow-2xl border border-notion-border/60 w-full max-w-md mx-4 overflow-hidden animate-in fade-in zoom-in-95 duration-150",style:{boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05)"},children:[S.jsx("div",{className:"px-5 pt-5 pb-3",children:S.jsxs("div",{className:"flex items-center gap-3",children:[S.jsx("div",{className:"w-9 h-9 rounded-lg bg-gradient-to-br from-blue-500 to-blue-600 flex items-center justify-center shadow-sm",children:S.jsx(Uae,{className:"w-4.5 h-4.5 text-white"})}),S.jsxs("div",{children:[S.jsx("h3",{className:"text-[15px] font-semibold text-notion-text tracking-[-0.01em]",children:"Insert link"}),S.jsx("p",{className:"text-xs text-notion-text-secondary mt-0.5",children:"Enter a URL for the selected text"})]})]})}),S.jsxs("form",{onSubmit:l,className:"px-5 pb-5",children:[S.jsxs("div",{className:"relative",children:[S.jsx("div",{className:"absolute inset-y-0 left-0 pl-3.5 flex items-center pointer-events-none",children:S.jsx(Wae,{className:"w-4 h-4 text-notion-text-secondary"})}),S.jsx("input",{ref:s,type:"text",value:i,onChange:u=>a(u.target.value),placeholder:"https://example.com",className:"w-full pl-10 pr-4 py-2.5 text-sm bg-notion-hover/50 border border-notion-border/60 rounded-lg text-notion-text placeholder:text-notion-text-secondary/60 focus:outline-none focus:ring-2 focus:ring-blue-500/30 focus:border-blue-500/50 transition-all duration-150",autoComplete:"url",spellCheck:!1})]}),S.jsxs("div",{className:"flex items-center justify-end gap-2 mt-4",children:[S.jsx("button",{type:"button",onClick:r,className:"px-3.5 py-1.5 text-sm font-medium text-notion-text-secondary hover:text-notion-text hover:bg-notion-hover rounded-lg transition-colors duration-150",children:"Cancel"}),S.jsx("button",{type:"submit",disabled:!i.trim(),className:"px-4 py-1.5 text-sm font-medium text-white bg-blue-500 hover:bg-blue-600 disabled:opacity-40 disabled:cursor-not-allowed rounded-lg shadow-sm transition-all duration-150 hover:shadow",children:"Apply"})]})]}),S.jsx("div",{className:"px-5 py-2.5 bg-notion-hover/30 border-t border-notion-border/40",children:S.jsxs("div",{className:"flex items-center justify-between text-[11px] text-notion-text-secondary",children:[S.jsxs("span",{className:"flex items-center gap-1.5",children:[S.jsx("kbd",{className:"px-1.5 py-0.5 bg-notion-bg-elevated rounded border border-notion-border/60 font-mono text-[10px] shadow-sm",children:"Enter"}),S.jsx("span",{children:"to apply"})]}),S.jsxs("span",{className:"flex items-center gap-1.5",children:[S.jsx("kbd",{className:"px-1.5 py-0.5 bg-notion-bg-elevated rounded border border-notion-border/60 font-mono text-[10px] shadow-sm",children:"Esc"}),S.jsx("span",{children:"to cancel"})]})]})})]})]}):null}function Uae({className:t}){return S.jsxs("svg",{className:t,width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),S.jsx("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"})]})}function Wae({className:t}){return S.jsxs("svg",{className:t,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("circle",{cx:"12",cy:"12",r:"10"}),S.jsx("path",{d:"M2 12h20"}),S.jsx("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}const Gae=400;function Dc({block:t,isEditing:e,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,className:s="",editingClassName:o="",viewClassName:l="",placeholder:c="Type something...",renderWrapper:u,readonly:h=!1}){const d=F.useRef(null),f=F.useRef(null),p=F.useRef(null),m=F.useRef(t.spans),y=F.useRef(null),[b,v]=F.useState(!1),C=F.useRef(null),E=F.useRef(null),_=F.useCallback(()=>e?d.current:f.current,[e]);F.useEffect(()=>()=>{y.current&&clearTimeout(y.current)},[]),F.useEffect(()=>{if(e&&d.current){d.current.innerHTML=Fs(t.spans),m.current=t.spans,d.current.focus();const L=E.current;if(E.current=null,L)$i(d.current,L.start,L.end,{startAffinity:L.startAffinity,endAffinity:L.endAffinity});else{const se=document.createRange(),ae=window.getSelection();se.selectNodeContents(d.current),se.collapse(!1),ae==null||ae.removeAllRanges(),ae==null||ae.addRange(se)}}},[e]),F.useEffect(()=>{if(!e||!d.current)return;const L=d.current,se=Fs(t.spans),ae=L.innerHTML;if(se===ae)return;const I=bn(L);L.innerHTML=se,I&&$i(L,I.start,I.end,{startAffinity:I.startAffinity,endAffinity:I.endAffinity}),m.current=t.spans},[t.spans,e]);const k=F.useCallback(()=>{if(!d.current)return;const L=bn(d.current),se=da(d.current);m.current=se,r(se);const I=Array.from(d.current.querySelectorAll('[data-math="1"]')).every(Ee=>Ee.querySelectorAll('[data-math-delim="1"]').length===2);y.current&&clearTimeout(y.current);const ye=()=>{if(!d.current)return;const Ee=da(d.current),de=Fs(Ee),we=d.current.innerHTML;de!==we&&(d.current.innerHTML=de,L&&$i(d.current,L.start,L.end,{startAffinity:L.startAffinity,endAffinity:L.endAffinity}))};I?y.current=setTimeout(ye,Gae):ye()},[r]),N=F.useCallback(L=>{var se,ae;if(!((se=L.relatedTarget)!=null&&se.closest(".floating-toolbar"))&&!((ae=L.relatedTarget)!=null&&ae.closest(".link-modal"))){if(d.current){const I=da(d.current);r(I)}i()}},[r,i]),D=F.useCallback(()=>{!e&&!h&&n()},[e,n,h]),$=F.useCallback(()=>{if(!f.current)return;const L=f.current,se=window.getSelection();if(!se||se.rangeCount===0)return;const ae=se.getRangeAt(0);if(!L.contains(ae.startContainer)||!L.contains(ae.endContainer))return;const I=Re=>{const De=Re.nodeType===Node.ELEMENT_NODE?Re:Re.parentElement;return De==null?void 0:De.closest("[data-span-start]")},ye=(Re,De,et)=>{if(Re.nodeType!==Node.ELEMENT_NODE)return null;const ot=Re,_t=ot.childNodes[De]||null,Et=De>0&&ot.childNodes[De-1]||null,Me=fe=>fe&&fe.nodeType===Node.ELEMENT_NODE?fe.closest("[data-span-start]"):null;return et==="start"?Me(_t)||Me(Et):Me(Et)||Me(_t)},Ee=(Re,De,et)=>{let ot=I(Re);if(ot||(ot=ye(Re,De,et)),!ot)return null;const _t=ot.getAttribute("data-span-start"),Et=ot.getAttribute("data-span-len");if(!_t||!Et)return null;const Me=Number(_t),fe=Number(Et);if(ot.getAttribute("data-span-style")==="math")return{pos:et==="start"?Me:Me+fe,affinity:"insideMath"};try{const tt=document.createRange();tt.selectNodeContents(ot),tt.setEnd(Re,De);const jt=tt.toString().length;return{pos:Me+jt}}catch{return{pos:et==="start"?Me:Me+fe}}},de=I(ae.startContainer)||ye(ae.startContainer,ae.startOffset,"start");if(ae.collapsed&&(de==null?void 0:de.getAttribute("data-span-style"))==="math"){const Re=Number(de.getAttribute("data-span-start")||"0");E.current={start:Re,end:Re,startAffinity:"insideMath",endAffinity:"insideMath"};return}const we=Ee(ae.startContainer,ae.startOffset,"start"),qe=Ee(ae.endContainer,ae.endOffset,"end");!we||!qe||(E.current={start:we.pos,end:qe.pos,startAffinity:we.affinity,endAffinity:qe.affinity})},[]),R=F.useCallback((L,se)=>{var ye;const ae=_();if(!ae)return;const I=bn(ae);if(!(!I||I.start===I.end))if(e&&d.current){const Ee=da(d.current),de=Tl(Ee,I.start,I.end,L,se);d.current.innerHTML=Fs(de),$i(d.current,I.start,I.end,{startAffinity:I.startAffinity,endAffinity:I.endAffinity}),m.current=de,r(de)}else{const Ee=Tl(t.spans,I.start,I.end,L,se);r(Ee),(ye=window.getSelection())==null||ye.removeAllRanges()}},[e,t.spans,r,_]),P=F.useCallback(L=>{var se;if((L.key==="ArrowRight"||L.key==="ArrowLeft")&&d.current){const ae=d.current,I=window.getSelection();if(I&&I.rangeCount>0){const ye=I.getRangeAt(0);if(ye.collapsed&&ae.contains(ye.startContainer)){const Ee=Me=>{let fe=Me.nodeType===Node.ELEMENT_NODE?Me:Me.parentElement;for(;fe&&fe!==ae;){if(fe.getAttribute("data-math")==="1")return fe;fe=fe.parentElement}return null},de=Me=>{let fe=Me.parentNode;for(;fe&&fe.nodeType===Node.ELEMENT_NODE;){if(fe.getAttribute("data-math-delim")==="1")return!0;fe=fe.parentNode}return!1},we=Me=>{const fe=document.createTreeWalker(Me,NodeFilter.SHOW_TEXT,null);let xe;for(;xe=fe.nextNode();)if(!de(xe))return xe;return null},qe=Me=>{const fe=document.createTreeWalker(Me,NodeFilter.SHOW_TEXT,null);let xe=null,tt;for(;tt=fe.nextNode();)de(tt)||(xe=tt);return xe},Re=Me=>{const fe=Me.parentNode;if(!fe)return;const xe=Array.prototype.indexOf.call(fe.childNodes,Me);if(xe===-1)return;const tt=document.createRange();tt.setStart(fe,xe+1),tt.collapse(!0),I.removeAllRanges(),I.addRange(tt)},De=Me=>{const fe=Me.parentNode;if(!fe)return;const xe=Array.prototype.indexOf.call(fe.childNodes,Me);if(xe===-1)return;const tt=document.createRange();tt.setStart(fe,xe),tt.collapse(!0),I.removeAllRanges(),I.addRange(tt)},et=Me=>{const fe=we(Me),xe=document.createRange();fe?xe.setStart(fe,0):xe.setStart(Me,1),xe.collapse(!0),I.removeAllRanges(),I.addRange(xe)},ot=Me=>{var tt;const fe=qe(Me),xe=document.createRange();fe?xe.setStart(fe,((tt=fe.textContent)==null?void 0:tt.length)??0):xe.setStart(Me,1),xe.collapse(!0),I.removeAllRanges(),I.addRange(xe)},_t=()=>{const Me=ye.startContainer,fe=ye.startOffset;if(Me.nodeType===Node.ELEMENT_NODE){const tt=Me;if(fe>0)return tt.childNodes[fe-1]||null}if(Me.nodeType===Node.TEXT_NODE&&fe>0)return null;let xe=Me;for(;xe&&xe!==ae;){if(xe.previousSibling)return xe.previousSibling;xe=xe.parentNode}return null},Et=()=>{const Me=ye.startContainer,fe=ye.startOffset;if(Me.nodeType===Node.ELEMENT_NODE)return Me.childNodes[fe]||null;if(Me.nodeType===Node.TEXT_NODE){const tt=Me.textContent||"";if(fe<tt.length)return null}let xe=Me;for(;xe&&xe!==ae;){if(xe.nextSibling)return xe.nextSibling;xe=xe.parentNode}return null};if(L.key==="ArrowRight"){const Me=Ee(ye.startContainer);if(Me){const xe=qe(Me);if(xe&&ye.startContainer===xe&&ye.startOffset===(((se=xe.textContent)==null?void 0:se.length)??0)){L.preventDefault(),Re(Me);return}}const fe=Et();if(fe&&fe.nodeType===Node.ELEMENT_NODE){const xe=fe;if(xe.getAttribute("data-math")==="1"){L.preventDefault(),et(xe);return}}}if(L.key==="ArrowLeft"){const Me=_t();if(Me&&Me.nodeType===Node.ELEMENT_NODE){const xe=Me;if(xe.getAttribute("data-math")==="1"){L.preventDefault(),ot(xe);return}}const fe=Ee(ye.startContainer);if(fe){const xe=we(fe);if(xe&&ye.startContainer===xe&&ye.startOffset===0){L.preventDefault(),De(fe);return}}}}}}if((L.metaKey||L.ctrlKey)&&d.current)switch(L.key.toLowerCase()){case"b":L.preventDefault(),R("bold");return;case"i":L.preventDefault(),R("italic");return;case"e":L.preventDefault(),R("code");return;case"m":L.preventDefault(),R("math");return;case"k":L.preventDefault();const ae=bn(d.current);ae&&ae.start!==ae.end&&(C.current=ae,v(!0));return}if(L.key==="Escape"){if(d.current){const ae=da(d.current);r(ae)}i();return}a(L)},[R,r,i,a]),G=F.useCallback(L=>{const se=_();if(se){if(L==="link"){const ae=bn(se);ae&&ae.start!==ae.end&&(C.current=ae,v(!0));return}R(L)}},[R,_]),ee=F.useCallback(L=>{var ae;if(v(!1),!C.current)return;const se=C.current;if(C.current=null,e&&d.current){const I=da(d.current),ye=Tl(I,se.start,se.end,"link",{href:L});d.current.innerHTML=Fs(ye),$i(d.current,se.start,se.end,{startAffinity:se.startAffinity,endAffinity:se.endAffinity}),m.current=ye,r(ye),d.current.focus()}else{const I=Tl(t.spans,se.start,se.end,"link",{href:L});r(I),(ae=window.getSelection())==null||ae.removeAllRanges()}},[e,t.spans,r]),W=F.useCallback(()=>{var L;v(!1),C.current=null,e&&((L=d.current)==null||L.focus())},[e]),U=F.useCallback(L=>{if(e&&d.current){const se=bn(d.current);if(!se||se.start===se.end)return!1;const ae=da(d.current);let I=0;for(const ye of ae){const Ee=I,de=I+ye.text.length;if(de>se.start&&Ee<se.end&&ye.style==="math")return!0;I=de}return!1}if(!e&&f.current){const se=f.current,ae=Array.from(se.querySelectorAll('[data-span-style="math"]'));for(const I of ae)try{if(L.intersectsNode(I))return!0}catch{}}return!1},[e]),j=F.useCallback(L=>{var Me;const ae=L.nativeEvent.inputType,I=ae==="deleteContentBackward"||ae==="deleteContentForward",ye=ae==="insertText"||ae==="insertCompositionText"||ae==="insertFromPaste";if(!I&&!ye)return;const Ee=d.current;if(!Ee)return;const de=window.getSelection();if(!de||de.rangeCount===0)return;const we=de.getRangeAt(0),qe=fe=>{let xe=fe.nodeType===Node.ELEMENT_NODE?fe:fe.parentElement;for(;xe&&xe!==Ee;){if(xe.getAttribute("data-math")==="1")return xe;xe=xe.parentElement}return null},Re=fe=>{const xe=fe.parentNode;if(!xe)return;const tt=Array.prototype.indexOf.call(xe.childNodes,fe);if(tt===-1)return;const jt=document.createRange();jt.setStart(xe,tt+1),jt.collapse(!0),de.removeAllRanges(),de.addRange(jt)},De=fe=>{if(!fe)return!1;if(fe.nodeType===Node.ELEMENT_NODE){const tt=fe;return tt.getAttribute("data-math-delim")==="1"?!0:!!tt.querySelector('[data-math-delim="1"]')}const xe=fe.parentElement;return!!xe&&xe.getAttribute("data-math-delim")==="1"},et=fe=>{let xe=fe;for(;xe&&xe!==Ee;){if(xe.previousSibling)return xe.previousSibling;xe=xe.parentNode}return null},ot=fe=>{let xe=fe;for(;xe&&xe!==Ee;){if(xe.nextSibling)return xe.nextSibling;xe=xe.parentNode}return null},_t=(fe,xe)=>{if(fe.nodeType===Node.ELEMENT_NODE){const tt=fe;return xe>0?tt.childNodes[xe-1]||null:et(fe)}return fe.nodeType===Node.TEXT_NODE&&xe>0?null:et(fe)},Et=(fe,xe)=>{if(fe.nodeType===Node.ELEMENT_NODE)return fe.childNodes[xe]||ot(fe);if(fe.nodeType===Node.TEXT_NODE){const tt=fe.textContent||"";return xe<tt.length?null:ot(fe)}return ot(fe)};if(!we.collapsed){const fe=we.cloneContents();(Me=fe.querySelector)!=null&&Me.call(fe,'[data-math-delim="1"]')&&I&&L.preventDefault();return}if(ye){const fe=qe(we.startContainer);if(fe&&we.startContainer===fe&&we.startOffset>=fe.childNodes.length){Re(fe);return}}if(I){const fe=ae==="deleteContentBackward"?_t(we.startContainer,we.startOffset):Et(we.startContainer,we.startOffset);De(fe)&&L.preventDefault()}},[]),Q=S.jsx("div",{ref:d,className:`outline-none cursor-text ${s} ${o}`,contentEditable:!0,suppressContentEditableWarning:!0,onMouseDown:L=>{var et,ot,_t;const se=L.target,ae=(et=se.closest)==null?void 0:et.call(se,'[data-math-delim="1"]');if(!ae||!d.current)return;const I=(ot=ae.closest)==null?void 0:ot.call(ae,'[data-math="1"]');if(!I)return;L.preventDefault();const ye=window.getSelection();if(!ye)return;const Ee=I.firstElementChild===ae,de=document.createTreeWalker(I,NodeFilter.SHOW_TEXT,null);let we=null,qe=null,Re;for(;Re=de.nextNode();){const Et=Re.parentElement;(Et==null?void 0:Et.getAttribute("data-math-delim"))!=="1"&&(we||(we=Re),qe=Re)}const De=document.createRange();Ee?we?De.setStart(we,0):De.setStart(I,1):qe?De.setStart(qe,((_t=qe.textContent)==null?void 0:_t.length)??0):De.setStart(I,1),De.collapse(!0),ye.removeAllRanges(),ye.addRange(De)},onBeforeInput:j,onInput:k,onBlur:N,onKeyDown:P},"editing"),Y=S.jsxs("div",{ref:f,className:`outline-none ${h?"cursor-default":"cursor-text"} ${s} ${l}`,onMouseUp:h?void 0:$,onClick:h?void 0:D,children:[t.spans.length>0?Ug(t.spans):!h&&S.jsx("span",{className:"text-notion-text-secondary",children:c}),t.isStreaming&&S.jsx("span",{className:"inline-block w-0.5 h-4 bg-notion-text animate-pulse ml-0.5"})]},"viewing"),be=e?u?u(Q,!0):Q:u?u(Y,!1):Y;return S.jsxs("div",{ref:p,className:"relative",children:[!h&&S.jsxs(S.Fragment,{children:[S.jsx(Oae,{containerRef:p,onFormat:G,isMathSelection:U}),S.jsx(jae,{isOpen:b,onSubmit:ee,onCancel:W})]}),be]})}function A_({block:t,isEditing:e,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,readonly:s=!1}){return S.jsx(Dc,{block:t,isEditing:e,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,className:"notion-paragraph text-notion-text leading-relaxed min-h-[1.5em]",placeholder:"Type something...",readonly:s})}const T4={1:"text-3xl font-bold",2:"text-2xl font-bold",3:"text-xl font-semibold",4:"text-lg font-semibold",5:"text-base font-semibold",6:"text-sm font-semibold"};function N_({block:t,isEditing:e,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,readonly:s=!1}){const o=t.level||1,l=T4[o]||T4[1];return S.jsx(Dc,{block:t,isEditing:e,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,className:`notion-heading ${l} text-notion-text`,placeholder:`Heading ${o}`,readonly:s,renderWrapper:(c,u)=>S.jsx("div",{role:"heading","aria-level":o,children:c})})}function L_(t){const{block:e,isEditing:r,onContentChange:n,onStartEdit:i,onEndEdit:a,onKeyDown:s,readonly:o=!1}=t,l=F.useRef(null);F.useEffect(()=>{r&&l.current&&(l.current.focus(),l.current.selectionStart=l.current.value.length,l.current.selectionEnd=l.current.value.length)},[r]);const c=f=>{n(f.target.value)},u=()=>{a()},h=f=>{if(f.key==="Tab"){f.preventDefault();const p=f.currentTarget,m=p.selectionStart,y=p.selectionEnd,b=p.value,v=b.substring(0,m)+" "+b.substring(y);n(v),setTimeout(()=>{p.selectionStart=p.selectionEnd=m+2},0);return}if(f.key==="Escape"){a();return}s(f)},d="```"+(e.language||"")+`
661
+ `+e.content+"\n```";return r?S.jsxs("div",{className:"notion-code-block rounded-md bg-notion-code-bg border border-notion-border overflow-hidden",children:[S.jsx("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-notion-border bg-notion-hover",children:S.jsx("span",{className:"text-xs text-notion-text-secondary font-mono",children:e.language||"text"})}),S.jsx("textarea",{ref:l,className:"w-full p-3 font-mono text-sm bg-transparent text-notion-text outline-none resize-none",value:e.content,onChange:c,onBlur:u,onKeyDown:h,rows:Math.max(3,e.content.split(`
662
+ `).length),spellCheck:!1})]}):S.jsxs("div",{className:`notion-code-block ${o?"cursor-default":"cursor-text"}`,onClick:o?void 0:i,children:[S.jsx(is,{plugins:{code:cv},shikiTheme:["min-light","min-dark"],isAnimating:e.isStreaming,children:d}),e.isStreaming&&S.jsx("div",{className:"flex justify-end px-3 py-1",children:S.jsx("span",{className:"inline-block w-0.5 h-4 bg-notion-text animate-pulse"})})]})}function M_({block:t,isEditing:e,onContentChange:r,onStartEdit:n,onEndEdit:i,readonly:a=!1}){const[s,o]=F.useState(!1),[l,c]=F.useState(!0),u=()=>{c(!1),o(!1)},h=()=>{c(!1),o(!0)},d=f=>{r(f.target.value),o(!1),c(!0)};return e?S.jsxs("div",{className:"notion-image-block space-y-2",children:[S.jsx("input",{type:"text",className:"w-full px-3 py-2 text-sm border border-notion-border rounded bg-notion-bg-elevated text-notion-text outline-none focus:border-blue-500",value:t.content,onChange:d,onBlur:i,placeholder:"Enter image URL...",autoFocus:!0}),t.content&&!s&&S.jsx("img",{src:t.content,alt:"Preview",className:"max-w-full h-auto rounded",onLoad:u,onError:h})]}):t.content?s?S.jsxs("div",{className:`notion-image-block border border-red-200 bg-red-50 rounded-lg p-4 ${a?"cursor-default":"cursor-pointer"}`,onClick:a?void 0:n,children:[S.jsx("p",{className:"text-sm text-red-600",children:"Failed to load image"}),S.jsx("p",{className:"text-xs text-red-400 truncate",children:t.content})]}):S.jsxs("div",{className:`notion-image-block relative group ${a?"":"cursor-pointer"}`,onClick:a?void 0:n,children:[l&&S.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-notion-hover rounded",children:S.jsx("div",{className:"w-6 h-6 border-2 border-notion-text-secondary border-t-transparent rounded-full animate-spin"})}),S.jsx("img",{src:t.content,alt:"Image",className:`max-w-full h-auto rounded ${a?"cursor-default":"cursor-pointer"} transition-opacity ${l?"opacity-0":"opacity-100"}`,onLoad:u,onError:h}),t.isStreaming&&S.jsx("div",{className:"absolute bottom-2 right-2 px-2 py-1 bg-black/50 text-white text-xs rounded",children:"Loading..."})]}):a?null:S.jsx("div",{className:"notion-image-block border-2 border-dashed border-notion-border rounded-lg p-8 text-center cursor-pointer hover:bg-notion-hover transition-colors",onClick:n,children:S.jsxs("div",{className:"text-notion-text-secondary",children:[S.jsx("svg",{className:"w-12 h-12 mx-auto mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),S.jsx("p",{className:"text-sm",children:"Click to add image URL"})]})})}function I_(t){const{block:e,isEditing:r,onContentChange:n,onStartEdit:i,onEndEdit:a,onKeyDown:s,readonly:o=!1}=t,l=F.useRef(null);F.useEffect(()=>{r&&l.current&&(l.current.focus(),l.current.selectionStart=l.current.value.length,l.current.selectionEnd=l.current.value.length)},[r]);const c=f=>{n(f.target.value)},u=()=>{a()},h=f=>{if(f.key==="Escape"){a();return}s(f)},d=`$$
663
+ ${e.content}
664
+ $$`;return r?S.jsxs("div",{className:"notion-math-block space-y-2",children:[S.jsx("div",{className:"text-xs text-notion-text-secondary mb-1",children:"LaTeX"}),S.jsx("textarea",{ref:l,className:"w-full px-3 py-2 font-mono text-sm border border-notion-border rounded bg-notion-code-bg text-notion-text outline-none focus:border-blue-500 resize-none",value:e.content,onChange:c,onBlur:u,onKeyDown:h,rows:Math.max(2,e.content.split(`
665
+ `).length),placeholder:"Enter LaTeX...",spellCheck:!1}),e.content&&S.jsxs("div",{className:"p-3 bg-notion-bg-elevated border border-notion-border rounded text-notion-text",children:[S.jsx("div",{className:"text-xs text-notion-text-secondary mb-1",children:"Preview"}),S.jsx("div",{className:"text-center",children:S.jsx(is,{plugins:{math:p0},isAnimating:!1,children:d})})]})]}):e.content?S.jsxs("div",{className:`notion-math-block py-4 px-6 bg-notion-code-bg rounded-lg ${o?"cursor-default":"cursor-pointer hover:bg-notion-hover"} transition-colors`,onClick:o?void 0:i,children:[S.jsx("div",{className:"text-center",children:S.jsx(is,{plugins:{math:p0},isAnimating:e.isStreaming,children:d})}),e.isStreaming&&S.jsx("div",{className:"flex justify-center mt-2",children:S.jsx("span",{className:"inline-block w-0.5 h-4 bg-notion-text animate-pulse"})})]}):o?null:S.jsx("div",{className:"notion-math-block border-2 border-dashed border-notion-border rounded-lg p-6 text-center cursor-pointer hover:bg-notion-hover transition-colors",onClick:i,children:S.jsxs("div",{className:"text-notion-text-secondary",children:[S.jsx("span",{className:"text-2xl mb-2 block",children:"∑"}),S.jsx("p",{className:"text-sm",children:"Click to add LaTeX equation"})]})})}function R_({block:t,isEditing:e,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,theme:s="light",readonly:o=!1}){const l=s==="dark",c=F.useRef(null);F.useEffect(()=>{e&&c.current&&(c.current.focus(),c.current.selectionStart=c.current.value.length,c.current.selectionEnd=c.current.value.length)},[e]);const u=m=>{r(m.target.value)},h=()=>{i()},d=m=>{if(m.key==="Escape"){i();return}if(m.key==="Tab"){m.preventDefault();const y=m.currentTarget,b=y.selectionStart,v=y.selectionEnd,C=y.value,E=C.substring(0,b)+" "+C.substring(v);r(E),setTimeout(()=>{y.selectionStart=y.selectionEnd=b+2},0);return}a(m)},f="```mermaid\n"+t.content+"\n```";if(e)return S.jsxs("div",{className:"notion-mermaid-block space-y-2",children:[S.jsx("div",{className:"text-xs text-notion-text-secondary mb-1",children:"Mermaid Diagram"}),S.jsx("textarea",{ref:c,className:"w-full px-3 py-2 font-mono text-sm border border-notion-border rounded bg-notion-code-bg text-notion-text outline-none focus:border-blue-500 resize-none",value:t.content,onChange:u,onBlur:h,onKeyDown:d,rows:Math.max(5,t.content.split(`
666
+ `).length),placeholder:"Enter Mermaid diagram code...",spellCheck:!1})]});if(!t.content)return o?null:S.jsx("div",{className:"notion-mermaid-block border-2 border-dashed border-notion-border rounded-lg p-6 text-center cursor-pointer hover:bg-notion-hover transition-colors",onClick:n,children:S.jsxs("div",{className:"text-notion-text-secondary",children:[S.jsx("svg",{className:"w-12 h-12 mx-auto mb-2 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:S.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01"})}),S.jsx("p",{className:"text-sm",children:"Click to add Mermaid diagram"})]})});if(t.isStreaming)return S.jsxs("div",{className:"notion-mermaid-block p-6 bg-notion-code-bg rounded-lg",children:[S.jsxs("div",{className:"flex items-center justify-center space-x-2 text-notion-text-secondary",children:[S.jsx("div",{className:"w-4 h-4 border-2 border-notion-text-secondary border-t-transparent rounded-full animate-spin"}),S.jsx("span",{className:"text-sm",children:"Receiving diagram..."})]}),S.jsx("pre",{className:"mt-3 text-xs text-notion-text-secondary font-mono whitespace-pre-wrap",children:t.content})]});const p=m=>{if(o)return;const y=m.target;y&&(y.closest("button")||y.closest("a")||n())};return S.jsx("div",{className:`notion-mermaid-block ${o?"cursor-default":"cursor-pointer"}`,onClick:p,children:S.jsx(is,{plugins:{mermaid:x_},controls:{mermaid:{fullscreen:!1,download:!0,copy:!0}},mermaid:{config:{theme:l?"dark":"default",themeVariables:{background:"transparent"}}},isAnimating:!1,children:f},l?"dark":"light")})}function Yae(t,e){return`${t}:${e}`}function Vae(t){return t.reduce((e,r)=>e+r.text.length,0)}function Xae(t){return t.replace(/\n/g,"<br>").replace(/\|/g,"\\|")}function C4(t){return!t||t.length===0?"":Xae(xn(t,{forParsing:!0}))}function Kae(t,e){const r=Math.max(t.length,...e.map(a=>a.length),1),n=Array.from({length:r},(a,s)=>t[s]??[]),i=e.map(a=>Array.from({length:r},(s,o)=>a[o]??[]));return{header:n,rows:i,cols:r}}function Qae({block:t,isEditing:e,onContentChange:r,onStartEdit:n,onEndEdit:i,onExitTable:a,readonly:s=!1}){const o=F.useRef(null),[l,c]=F.useState(null),[u,h]=F.useState(null);F.useEffect(()=>{e&&(l||c({r:0,c:0}))},[l,e]);const d=F.useMemo(()=>Kae(t.header||[],t.rows||[]),[t.header,t.rows]),f=F.useMemo(()=>{const _=d.cols;return Array.from({length:_},(N,D)=>{var $;return(($=t.align)==null?void 0:$[D])||"left"})},[t.align,d.cols]),p=F.useCallback((_,k,N)=>{const D=d.header.map((P,G)=>G===k&&_===0?N:P),$=d.rows.map((P,G)=>P.map((ee,W)=>G===_-1&&W===k?N:ee)),R={...t,header:D,rows:$,align:f};r(pn(R))},[f,t,d.header,d.rows,r]),m=F.useCallback(()=>{try{if(document.execCommand("insertText",!1,`
667
+ `))return}catch{}const _=window.getSelection();if(!_||_.rangeCount===0)return;const k=_.getRangeAt(0);k.deleteContents();const N=document.createTextNode(`
668
+ `);k.insertNode(N),k.setStartAfter(N),k.setEndAfter(N),_.removeAllRanges(),_.addRange(k)},[]),y=F.useCallback((_,k,N,D)=>{const $=d.cols,R=d.rows.length;let P=_+N,G=k+D;if(D!==0&&(G<0&&(G=$-1,P-=1),G>=$&&(G=0,P+=1)),P<0){c({r:0,c:0});return}if(P>R){a==null||a(t.id);return}c({r:P,c:G})},[t.id,d.cols,d.rows.length,a]),b=F.useCallback((_,k,N)=>{if(N.stopPropagation(),N.key==="Enter"&&N.shiftKey){N.preventDefault(),m();return}if(N.key==="Enter"&&!N.shiftKey){N.preventDefault();const D=d.rows.length,$=d.cols,R=_===D,P=k===$-1;if(R&&P){a==null||a(t.id);return}c({r:Math.min(_+1,D),c:k});return}if(N.key==="Tab"){N.preventDefault(),y(_,k,0,N.shiftKey?-1:1);return}if(N.key==="ArrowLeft"){const D=N.currentTarget,$=bn(D);$&&$.start===0&&$.end===0&&(N.preventDefault(),y(_,k,0,-1));return}if(N.key==="ArrowRight"){const D=N.currentTarget,$=_===0?d.header[k]:d.rows[_-1][k],R=Vae($),P=bn(D);P&&P.start===R&&P.end===R&&(N.preventDefault(),y(_,k,0,1));return}},[t.id,bn,d.cols,d.header,d.rows,m,y,a]),v=(_,k,N,D)=>{const $=Yae(_,k),R=!!(!s&&e&&(l==null?void 0:l.r)===_&&(l==null?void 0:l.c)===k),P=f[k]||"left",G=`px-3 py-2 min-w-[140px] border border-notion-border/70 whitespace-pre-wrap break-words align-top ${D?"bg-notion-hover font-semibold":"bg-notion-bg"} ${R?"ring-2 ring-blue-200 ring-inset":!s&&e?"hover:bg-notion-hover/50":""} ${s?"cursor-default":"cursor-text"}`,ee={textAlign:P,verticalAlign:"top"},W=D?"th":"td";if(!R)return S.jsx(W,{"data-cell-rc":$,className:G,style:ee,scope:D?"col":void 0,onMouseDown:s?void 0:j=>{j.preventDefault(),e||n(),c({r:_,c:k})},children:N.length?Ug(N):S.jsx("span",{className:"text-notion-text-secondary",children:" "})},$);const U={id:`${t.id}:${$}`,type:"paragraph",spans:N,isStreaming:!1};return S.jsx(W,{"data-cell-rc":$,className:G,style:ee,scope:D?"col":void 0,children:S.jsx(Dc,{block:U,isEditing:!0,onContentChange:j=>p(_,k,j),onStartEdit:()=>{},onEndEdit:()=>{},onKeyDown:j=>b(_,k,j),className:"w-full whitespace-pre-wrap break-words",placeholder:"",readonly:s})},$)};F.useEffect(()=>{if(!u)return;const _=()=>h(null);return window.addEventListener("mousedown",_,!0),window.addEventListener("scroll",_,!0),()=>{window.removeEventListener("mousedown",_,!0),window.removeEventListener("scroll",_,!0)}},[u]);const C=S.jsx("thead",{children:S.jsx("tr",{children:d.header.map((_,k)=>v(0,k,_,!0))})}),E=S.jsx("tbody",{children:d.rows.length?d.rows.map((_,k)=>S.jsx("tr",{children:_.map((N,D)=>v(k+1,D,N,!1))},`row-${k+1}`)):S.jsx("tr",{children:S.jsx("td",{colSpan:d.cols,className:"px-3 py-4 text-sm text-notion-text-secondary border border-notion-border/70",children:"No rows yet"})})});return S.jsxs("div",{ref:o,className:`notion-table-block relative ${!s&&e?"w-full":"inline-block max-w-full"}`,onClick:s?void 0:()=>{e||n()},onContextMenu:s?void 0:_=>{var j,Q;if(!e)return;const k=_.target,N=(j=k==null?void 0:k.closest)==null?void 0:j.call(k,"[data-cell-rc]");if(!N)return;_.preventDefault();const D=N.getAttribute("data-cell-rc")||"",[$,R]=D.split(":"),P=Number($),G=Number(R);if(!Number.isFinite(P)||!Number.isFinite(G))return;const ee=(Q=o.current)==null?void 0:Q.getBoundingClientRect(),W=ee?_.clientX-ee.left:_.clientX,U=ee?_.clientY-ee.top:_.clientY;h({x:W,y:U,r:P,c:G})},children:[!s&&e&&u&&S.jsx("div",{className:"absolute z-[70]",style:{top:u.y,left:u.x},onMouseDown:_=>_.preventDefault(),children:S.jsxs("div",{className:"rounded-xl border border-notion-border bg-notion-bg-elevated shadow-[0_16px_40px_rgba(15,23,42,0.14)] overflow-hidden w-[220px]",children:[S.jsx("div",{className:"px-3 py-2 border-b border-notion-border bg-gradient-to-b from-notion-hover/70 to-transparent",children:S.jsx("div",{className:"text-[11px] uppercase tracking-[0.12em] text-notion-text-secondary select-none",children:"Table"})}),S.jsxs("div",{className:"p-1",children:[[{id:"row-above",label:"Add row above",run:()=>{const _=u.r,k=Math.max(0,_===0?0:_-1),N=Array.from({length:d.cols},()=>[]),D=d.rows.slice(0,k).concat([N],d.rows.slice(k));r(pn({...t,header:d.header,rows:D,align:f})),c({r:Math.max(1,k+1),c:u.c})}},{id:"row-below",label:"Add row below",run:()=>{const _=Math.max(1,u.r),k=Math.min(d.rows.length,_),N=Array.from({length:d.cols},()=>[]),D=d.rows.slice(0,k).concat([N],d.rows.slice(k));r(pn({...t,header:d.header,rows:D,align:f})),c({r:k+1,c:u.c})}},{id:"col-left",label:"Add column left",run:()=>{const _=u.c,k=d.header.slice();k.splice(_,0,[]);const N=d.rows.map($=>{const R=$.slice();return R.splice(_,0,[]),R}),D=f.slice();D.splice(_,0,"left"),r(pn({...t,header:k,rows:N,align:D})),c({r:u.r,c:_})}},{id:"col-right",label:"Add column right",run:()=>{const k=u.c+1,N=d.header.slice();N.splice(k,0,[]);const D=d.rows.map(R=>{const P=R.slice();return P.splice(k,0,[]),P}),$=f.slice();$.splice(k,0,"left"),r(pn({...t,header:N,rows:D,align:$})),c({r:u.r,c:k})}}].map(_=>S.jsx("button",{type:"button",className:"w-full text-left px-2 py-2 rounded-md hover:bg-notion-hover text-sm",onClick:()=>{_.run(),h(null)},children:_.label},_.id)),S.jsx("div",{className:"my-1 h-px bg-notion-border/70"}),S.jsx("button",{type:"button",className:`w-full text-left px-2 py-2 rounded-md text-sm ${u.r===0||d.rows.length===0?"opacity-50 cursor-not-allowed":"hover:bg-notion-hover"}`,disabled:u.r===0||d.rows.length===0,onClick:()=>{const _=u.r;if(_===0)return;const k=_-1;if(k<0||k>=d.rows.length)return;const N=d.rows.slice(0,k).concat(d.rows.slice(k+1));r(pn({...t,header:d.header,rows:N,align:f})),h(null)},children:"Delete row"}),S.jsx("button",{type:"button",className:`w-full text-left px-2 py-2 rounded-md text-sm ${d.cols<=1?"opacity-50 cursor-not-allowed":"hover:bg-notion-hover"}`,disabled:d.cols<=1,onClick:()=>{if(d.cols<=1)return;const _=u.c,k=d.header.slice(0,_).concat(d.header.slice(_+1)),N=d.rows.map($=>$.slice(0,_).concat($.slice(_+1))),D=f.slice(0,_).concat(f.slice(_+1));r(pn({...t,header:k,rows:N,align:D})),h(null)},children:"Delete column"})]})]})}),S.jsxs("div",{className:`rounded-xl border border-notion-border bg-notion-bg overflow-hidden ${!s&&e?"w-full":"inline-block max-w-full"}`,children:[!s&&e&&S.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-notion-border bg-notion-hover/40",children:[S.jsx("div",{className:"text-xs text-notion-text-secondary uppercase tracking-[0.12em]",children:"Table"}),S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded-md border border-notion-border bg-notion-bg hover:bg-notion-hover",onMouseDown:_=>_.preventDefault(),onClick:()=>{const _=Math.max(1,(l==null?void 0:l.r)??1),k=Math.max(0,_-1),N=Array.from({length:d.cols},()=>[]),D=d.rows.slice(0,k).concat([N],d.rows.slice(k));r(pn({...t,header:d.header,rows:D,align:f})),c({r:_,c:(l==null?void 0:l.c)??0})},children:"+ Row Above"}),S.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded-md border border-notion-border bg-notion-bg hover:bg-notion-hover",onMouseDown:_=>_.preventDefault(),onClick:()=>{const _=Math.max(1,(l==null?void 0:l.r)??1),k=Math.max(1,_),N=Array.from({length:d.cols},()=>[]),D=d.rows.slice(0,k-1).concat([N],d.rows.slice(k-1));r(pn({...t,header:d.header,rows:D,align:f})),c({r:k,c:(l==null?void 0:l.c)??0})},children:"+ Row Below"}),S.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded-md border border-notion-border bg-notion-bg hover:bg-notion-hover",onMouseDown:_=>_.preventDefault(),disabled:((l==null?void 0:l.r)??1)===0||d.rows.length===0,onClick:()=>{const _=(l==null?void 0:l.r)??1;if(_===0)return;const k=_-1;if(k<0||k>=d.rows.length)return;const N=d.rows.slice(0,k).concat(d.rows.slice(k+1));r(pn({...t,header:d.header,rows:N,align:f}));const D=Math.min(_,N.length);c({r:Math.max(1,D),c:(l==null?void 0:l.c)??0})},children:"- Row"}),S.jsx("div",{className:"w-px h-6 bg-notion-border/70 mx-0.5"}),S.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded-md border border-notion-border bg-notion-bg hover:bg-notion-hover",onMouseDown:_=>_.preventDefault(),onClick:()=>{const _=Math.max(0,(l==null?void 0:l.c)??0),k=Math.min(d.cols,_),N=d.header.slice();N.splice(k,0,[]);const D=d.rows.map(R=>{const P=R.slice();return P.splice(k,0,[]),P}),$=f.slice();$.splice(k,0,"left"),r(pn({...t,header:N,rows:D,align:$})),c({r:(l==null?void 0:l.r)??0,c:k})},children:"+ Col Left"}),S.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded-md border border-notion-border bg-notion-bg hover:bg-notion-hover",onMouseDown:_=>_.preventDefault(),onClick:()=>{const _=(l==null?void 0:l.c)??d.cols,k=Math.min(d.cols,Math.max(0,_+1)),N=d.header.slice();N.splice(k,0,[]);const D=d.rows.map(R=>{const P=R.slice();return P.splice(k,0,[]),P}),$=f.slice();$.splice(k,0,"left"),r(pn({...t,header:N,rows:D,align:$})),c({r:(l==null?void 0:l.r)??0,c:k})},children:"+ Col Right"}),S.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded-md border border-notion-border bg-notion-bg hover:bg-notion-hover",onMouseDown:_=>_.preventDefault(),disabled:d.cols<=1,onClick:()=>{const _=Math.max(0,Math.min(d.cols-1,(l==null?void 0:l.c)??0));if(d.cols<=1)return;const k=d.header.slice(0,_).concat(d.header.slice(_+1)),N=d.rows.map(R=>R.slice(0,_).concat(R.slice(_+1))),D=f.slice(0,_).concat(f.slice(_+1));r(pn({...t,header:k,rows:N,align:D}));const $=Math.max(0,Math.min(_,k.length-1));c({r:(l==null?void 0:l.r)??0,c:$})},children:"- Col"}),S.jsx("button",{type:"button",className:"text-xs px-2 py-1 rounded-md border border-notion-border bg-notion-bg hover:bg-notion-hover",onMouseDown:_=>_.preventDefault(),onClick:()=>i(),children:"Done"})]})]}),S.jsx("div",{className:"overflow-x-auto max-w-full",children:S.jsxs("table",{className:"min-w-max border-collapse",children:[C,E]})})]})]})}function pn(t){const e=t.header||[],r=t.rows||[],n=Math.max(e.length,...r.map(l=>l.length),1),i=Array.from({length:n},(l,c)=>{var u;return((u=t.align)==null?void 0:u[c])||"left"}),a="| "+Array.from({length:n},(l,c)=>C4(e[c])).join(" | ")+" |",s="| "+Array.from({length:n},(l,c)=>{const u=i[c];return u==="center"?":---:":u==="right"?"---:":"---"}).join(" | ")+" |",o=r.map(l=>"| "+Array.from({length:n},(c,u)=>C4(l[u])).join(" | ")+" |");return[a,s,...o].join(`
669
+ `)}function B_({block:t,isEditing:e,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,readonly:s=!1}){var h;const o=t.listType==="ordered",l=t.depth??0,c=(h=t.metadata)==null?void 0:h.displayNumber,u=o?`${c??1}.`:"•";return S.jsx(Dc,{block:t,isEditing:e,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,className:"flex-1",placeholder:"Empty item",readonly:s,renderWrapper:(d,f)=>S.jsxs("div",{className:`notion-list-block flex items-start gap-2 py-0.5 ${s?"cursor-default":"cursor-text"}`,style:{paddingLeft:l*24},children:[S.jsx("span",{className:"text-notion-text select-none flex-shrink-0 w-5",children:u}),d]})})}function D_({block:t,isEditing:e,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,readonly:s=!1}){return S.jsx(Dc,{block:t,isEditing:e,onContentChange:r,onStartEdit:n,onEndEdit:i,onKeyDown:a,className:"text-notion-text italic leading-relaxed",placeholder:"Empty quote",readonly:s,renderWrapper:(o,l)=>S.jsx("div",{className:`notion-blockquote border-l-4 border-notion-quote-border pl-4 py-0.5 ${s?"cursor-default":"cursor-text"}`,children:o})})}function O_({block:t}){return S.jsxs("div",{className:"notion-divider py-3",children:[S.jsx("hr",{className:"border-t border-notion-border"}),t.isStreaming&&S.jsx("div",{className:"flex justify-center mt-1",children:S.jsx("span",{className:"inline-block w-0.5 h-2 bg-notion-text animate-pulse"})})]})}function Zae({block:t,isEditing:e,onStartEdit:r,onEndEdit:n,onContentChange:i,onKeyDown:a,hooks:s,onExitTable:o,theme:l="light",readonly:c=!1}){const u=()=>{if(t.type==="paragraph"||t.type==="heading"||t.type==="list"||t.type==="blockquote"){const p={block:t,isEditing:e,onStartEdit:r,onEndEdit:n,onContentChange:i,onKeyDown:a,readonly:c};switch(t.type){case"paragraph":return S.jsx(A_,{...p});case"heading":return S.jsx(N_,{...p});case"list":return S.jsx(B_,{...p});case"blockquote":return S.jsx(D_,{...p})}}if(t.type==="table")return S.jsx(Qae,{block:t,isEditing:e,onStartEdit:r,onEndEdit:n,onContentChange:i,onKeyDown:a,onExitTable:o,readonly:c});const d={block:t,isEditing:e,onStartEdit:r,onEndEdit:n,onContentChange:i,onKeyDown:a,readonly:c};switch(t.type){case"code":return S.jsx(L_,{...d,theme:l});case"image":return S.jsx(M_,{...d});case"math":return S.jsx(I_,{...d,theme:l});case"mermaid":return S.jsx(R_,{...d,theme:l});case"divider":return S.jsx(O_,{...d});default:return null}},h=`notion-block relative py-1 px-1 -mx-1 rounded ${c?"":"hover:bg-notion-hover/50"} transition-colors`;if(s!=null&&s.renderBlock){const d=s.renderBlock(t,u);if(d!==null)return S.jsx("div",{className:h,"data-block-id":t.id,"data-block-type":t.type,children:d})}return S.jsx("div",{className:h,"data-block-id":t.id,"data-block-type":t.type,children:u()})}function Jae(t,e,r){return Math.max(e,Math.min(r,t))}function ese({isOpen:t,position:e,query:r,commands:n,activeIndex:i,onClose:a,onSelect:s,onHoverIndex:o}){const l=F.useRef(null);F.useEffect(()=>{if(!t)return;const u=h=>{const d=l.current;d&&(d.contains(h.target)||a())};return document.addEventListener("mousedown",u,!0),()=>document.removeEventListener("mousedown",u,!0)},[t,a]);const c=F.useMemo(()=>n.length?Jae(i,0,n.length-1):0,[i,n.length]);return t?S.jsx("div",{ref:l,className:"notion-slash-menu absolute z-[60] w-[360px] max-w-[calc(100vw-24px)] overflow-x-hidden",style:{top:e.top,left:e.left},role:"dialog","aria-label":"Slash commands",children:S.jsxs("div",{className:"rounded-xl border border-notion-border bg-notion-bg-elevated shadow-[0_16px_40px_rgba(15,23,42,0.14)] overflow-hidden",children:[S.jsxs("div",{className:"px-3 py-2 border-b border-notion-border bg-gradient-to-b from-notion-hover/70 to-transparent",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("span",{className:"text-[11px] uppercase tracking-[0.12em] text-notion-text-secondary select-none",children:"Insert"}),S.jsxs("span",{className:"text-xs font-mono text-notion-text-secondary",children:["/",r||""]})]}),S.jsx("div",{className:"mt-1 text-xs text-notion-text-secondary",children:n.length?"Type to filter, Enter to apply, Esc to close":"No matches"})]}),S.jsx("div",{className:"max-h-[320px] overflow-y-auto overflow-x-hidden py-1 px-1",children:n.map((u,h)=>{const d=h===c;return S.jsxs("button",{type:"button",onMouseEnter:()=>o==null?void 0:o(h),onMouseDown:f=>f.preventDefault(),onClick:()=>s(u),className:`w-full text-left px-2 py-2 rounded-md transition-colors flex items-start gap-2 ${d?"bg-notion-hover text-notion-text":"hover:bg-notion-hover/70 text-notion-text"}`,children:[S.jsx("div",{className:"mt-0.5 w-8 h-8 rounded-lg border border-notion-border bg-notion-bg flex items-center justify-center flex-shrink-0",children:u.icon?S.jsx("div",{className:"text-notion-text-secondary",children:u.icon}):S.jsx("div",{className:"text-notion-text-secondary text-xs font-mono",children:u.title.slice(0,2)})}),S.jsxs("div",{className:"min-w-0 flex-1",children:[S.jsxs("div",{className:"flex items-baseline gap-2",children:[S.jsx("div",{className:"font-medium text-sm truncate",children:u.title}),u.group?S.jsx("div",{className:"text-[11px] text-notion-text-secondary truncate",children:u.group}):null]}),u.description?S.jsx("div",{className:"text-xs text-notion-text-secondary mt-0.5 whitespace-normal break-words",children:u.description}):null]})]},u.id)})})]})}):null}function S4(t,e,r){return Math.max(e,Math.min(r,t))}function Bs(t){const e=new Set;let r=!1;const n=t.map(i=>{if(!e.has(i.id))return e.add(i.id),i;r=!0;let a=Di(10);for(;e.has(a);)a=Di(10);return e.add(a),{...i,id:a}});return r?n:t}const tse=360,rse=F.forwardRef(function({markdown:e,isStreaming:r=!1,hooks:n,onMarkdownChange:i,className:a="",theme:s,readonly:o=!1},l){const c=()=>{if(typeof window>"u")return"light";const J=document.documentElement,X=document.body;return J&&J.classList.contains("dark")||X&&X.classList.contains("dark")||window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"},[u,h]=F.useState(()=>s==="dark"||s==="light"?s:s==="system"?typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":c());F.useEffect(()=>{if(s==="dark"||s==="light"){h(s);return}if(typeof window>"u"){h("light");return}const J=()=>{if(s==="system"){if(!window.matchMedia){h("light");return}h(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");return}h(c())};J();const X=[];if(s!=="system"&&typeof MutationObserver<"u"){const ce=pe=>{if(!pe)return;const We=new MutationObserver(()=>J());We.observe(pe,{attributes:!0,attributeFilter:["class"]}),X.push(We)};ce(document.documentElement),ce(document.body)}const V=window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null,oe=()=>J();return V&&V.addEventListener("change",oe),()=>{for(const ce of X)ce.disconnect();V&&V.removeEventListener("change",oe)}},[s]);const d=F.useRef(null),{blocks:f}=S_({markdown:e,isStreaming:r}),[p,m]=F.useState(f),[y,b]=F.useState([]),[v,C]=F.useState(null),[E,_]=F.useState(null),k=F.useRef(p);F.useEffect(()=>{k.current=p},[p]);const N=F.useRef([]);F.useEffect(()=>{N.current=y},[y]);const D=F.useCallback(J=>{N.current=J,b(J)},[]),$=F.useRef(null),R=F.useRef(!1),P=F.useRef(!1),G=F.useRef(0),ee=F.useRef([]),W=F.useRef(new Set),U=F.useRef(null),j=F.useCallback(J=>k.current.find(X=>X.id===J)||null,[]),Q=F.useCallback(J=>({...J,metadata:{...J.metadata||{},dirty:!0}}),[]),Y=F.useCallback(J=>({...J,metadata:{...J.metadata||{},dirty:!1}}),[]),be=F.useCallback(()=>{_(null)},[]),L=F.useCallback(J=>{const X=d.current;if(!X)return;let V=0,oe=0;const ce=document.querySelector(`[data-block-id="${J}"]`),pe=X.getBoundingClientRect(),We=window.getSelection(),Ve=We&&We.rangeCount>0?We.getRangeAt(0):null,Xe=Ve?Ve.getBoundingClientRect():null;if(Xe&&Xe.width+Xe.height>0)V=Xe.bottom-pe.top+8,oe=Xe.left-pe.left;else if(ce){const Ot=ce.getBoundingClientRect();V=Ot.top-pe.top+28,oe=Ot.left-pe.left+28}const mt=8,gt=Math.max(mt,pe.width-tse-8);oe=S4(oe,mt,gt),_({blockId:J,query:"",activeIndex:0,position:{top:V,left:oe}})},[]);F.useEffect(()=>{const J=P.current;if(P.current=r,!R.current&&!r){W.current.clear();const V=Bs(f);k.current=V,m(V),D([]),G.current=0,ee.current=[],R.current=!0;return}if(r){if(R.current=!0,J||(G.current=0,ee.current=[],D([]),e.trim()===""&&(W.current.clear(),m([]))),f.length===0){D([]);return}let V=f.length;for(let Ve=f.length-1;Ve>=0&&f[Ve].isStreaming;Ve--)V=Ve;const oe=f.slice(0,V),ce=f.slice(V),pe=W.current,We=G.current;if(pe.size===0){const Ve=oe.map(gt=>Y({...gt,isStreaming:!1})),Xe=k.current,mt=Ve.length!==Xe.length||Ve.some((gt,Ot)=>{const Qt=Xe[Ot];return!Qt||gt.type!==Qt.type||gt.id!==Qt.id});if(mt){const gt=Bs(Ve);k.current=gt,m(gt)}ee.current=(mt?k.current:Xe).map(gt=>gt.id),G.current=oe.length}else{const Ve=oe.length,Xe=Ne=>{if(Ne.type==="paragraph"||Ne.type==="heading"||Ne.type==="list"||Ne.type==="blockquote"){const yt=Ne.level??"",Je=Ne.listType??"",St=Ne.depth??"";return`${Ne.type}|${yt}|${Je}|${St}|${xn(Ne.spans||[],{forParsing:!0})}`}return Ne.type==="table"?`table|${ar([Ne])}`:Ne.type==="code"?`code|${Ne.language||""}|${Ne.content||""}`:Ne.type==="mermaid"?`mermaid|${Ne.content||""}`:Ne.type==="math"?`math|${Ne.content||""}`:Ne.type==="image"?`image|${Ne.content||""}`:Ne.type==="divider"?"divider":`${Ne.type}|${Ne.content||""}`},mt=Ne=>{var yt;return!!((yt=Ne==null?void 0:Ne.metadata)!=null&&yt.dirty)||pe.has(Ne.id)},gt=k.current;let Ot=gt.slice(),Qt=!1;const Ut=gt.slice(0,We).map(Ne=>Ne.id);let Zr=ee.current.length>0?ee.current.slice(0,We):Ut;if(Ve<We){const Ne=Zr.slice(Ve,We);if(Ne.length>0){const yt=new Set(Ne),Je=Ot.filter(St=>yt.has(St.id)?mt(St):!0);Je.length!==Ot.length&&(Ot=Je,Qt=!0)}Zr=Zr.slice(0,Ve)}const ei=Math.min(Ve,Zr.length),bt=Math.max(0,ei-64);for(let Ne=bt;Ne<ei;Ne++){const yt=Zr[Ne];if(!yt)continue;const Je=Ot.findIndex(gr=>gr.id===yt);if(Je===-1)continue;const St=Ot[Je];if(mt(St))continue;const wr=Y({...oe[Ne],isStreaming:!1});Xe(St)!==Xe(wr)&&(Ot[Je]=wr,Zr[Ne]=wr.id,Qt=!0)}if(Ve>We){const Ne=oe.slice(We).map(yt=>Y({...yt,isStreaming:!1}));Ot=Ot.concat(Ne),Zr=Zr.concat(Ne.map(yt=>yt.id)),Qt=!0}if(G.current=Ve,ee.current=Zr,Qt){const Ne=Bs(Ot);k.current=Ne,m(Ne)}}ce.length===0&&(G.current=oe.length),D(ce.map(Ve=>Y({...Ve,isStreaming:!0})));return}if(J&&!r){m(V=>{const oe=V.slice(),ce=N.current;for(const We of ce)oe.push(Y({...We,isStreaming:!1}));const pe=Bs(oe.length>0?oe:[{id:Di(10),type:"paragraph",spans:[],isStreaming:!1}]);return k.current=pe,pe}),D([]),G.current=0,ee.current=[];return}if($.current!==null&&e===$.current)return;W.current.clear();const X=Bs(f.map(V=>Y(V)));k.current=X,m(X),D([]),G.current=0,ee.current=[]},[e,r,f,Y]);const se=F.useCallback(J=>{const X=y.length>0?J.concat(y.map(oe=>({...oe,isStreaming:!1}))):J,V=ar(X);$.current=V,i==null||i(V)},[i,y]),ae=F.useCallback(J=>{const X=Bs(J);k.current=X,m(X),se(X)},[se]),I=J=>J.type==="paragraph"||J.type==="heading"||J.type==="list"||J.type==="blockquote",ye=J=>{var X,V;if(I(J))return J.spans.every(oe=>oe.text.trim()==="");if(J.type==="divider")return!1;if(J.type==="table"){const oe=J.header||[],ce=J.rows||[],pe=We=>!!Tf(We||[]).trim();return!(oe.some(pe)||ce.some(We=>We.some(pe)))}return((V=(X=J.content)==null?void 0:X.trim)==null?void 0:V.call(X))===""},Ee=F.useCallback(J=>{var V;const X=(V=n==null?void 0:n.getBlockPolicy)==null?void 0:V.call(n,J);return X||(I(J)?{atomic:!1,mergeable:!0,deleteOnBlurWhenEmpty:!1,enterBehavior:"newBlock"}:J.type==="table"?{atomic:!0,mergeable:!1,deleteOnBlurWhenEmpty:!1,enterBehavior:"stayInBlock"}:J.type==="image"?{atomic:!0,mergeable:!1,deleteOnBlurWhenEmpty:!0,enterBehavior:"ignore"}:{atomic:!0,mergeable:!1,deleteOnBlurWhenEmpty:!0,enterBehavior:"stayInBlock"})},[n]),de=F.useCallback((J,X,V)=>{U.current={blockId:J,start:X,end:V},C(J)},[]);F.useEffect(()=>{const J=U.current;if(!J)return;U.current=null;const{blockId:X,start:V,end:oe}=J;requestAnimationFrame(()=>{const ce=document.querySelector(`[data-block-id="${X}"]`);if(!ce)return;const pe=ce.querySelector('[contenteditable="true"]');if(pe){pe.focus(),$i(pe,V,oe);return}const We=ce.querySelector("textarea");We&&(We.focus(),We.setSelectionRange(V,oe))})},[p,v]);const we=F.useCallback((J,X,V,oe)=>{W.current.add(J),ae(k.current.map(pe=>pe.id!==J?pe:X==="paragraph"?Q({id:pe.id,type:"paragraph",spans:hi(V),isStreaming:!1}):X==="heading"?Q({id:pe.id,type:"heading",spans:hi(V),level:(oe==null?void 0:oe.level)??1,isStreaming:!1}):X==="blockquote"?Q({id:pe.id,type:"blockquote",spans:hi(V),isStreaming:!1}):X==="list"?Q({id:pe.id,type:"list",spans:hi(V),listType:(oe==null?void 0:oe.listType)??"unordered",depth:(oe==null?void 0:oe.depth)??0,isStreaming:!1}):X==="code"?Q({id:pe.id,type:"code",content:"",language:(oe==null?void 0:oe.language)||"text",isStreaming:!1}):X==="divider"?Q({id:pe.id,type:"divider",isStreaming:!1}):pe));const ce=j(J);ce&&(n!=null&&n.onBlockChange)&&n.onBlockChange(J,V,ce)},[ae,n,j,Q]),{handleKeyDown:qe}=__({onBlockTypeChange:we}),Re=F.useCallback((J,X)=>{W.current.add(J);const V=k.current.map(ce=>{if(ce.id!==J)return ce;if(I(ce)){const pe=typeof X=="string"?hi(X):X;return Q({...ce,spans:pe})}if(ce.type==="table"){if(typeof X!="string")return ce;const pe=Ki(X,!1,[ce]).find(We=>We.type==="table");return!pe||pe.type!=="table"?ce:Q({...pe,isStreaming:!1})}return"content"in ce?Q({...ce,content:typeof X=="string"?X:xn(X)}):ce});ae(V);const oe=V.find(ce=>ce.id===J);oe&&(n!=null&&n.onBlockChange)&&n.onBlockChange(J,X,oe)},[n,ae,Q]),De=F.useCallback((J,X)=>{const V=Di(10);W.current.add(V);const oe=Q((()=>{switch(X.type){case"paragraph":return{id:V,type:"paragraph",spans:X.spans??[],isStreaming:!1};case"heading":return{id:V,type:"heading",spans:X.spans??[],level:X.level??1,isStreaming:!1};case"blockquote":return{id:V,type:"blockquote",spans:X.spans??[],isStreaming:!1};case"list":return{id:V,type:"list",spans:X.spans??[],listType:X.listType??"unordered",depth:X.depth??0,isStreaming:!1};case"code":return{id:V,type:"code",content:X.content??"",language:X.language??"text",isStreaming:!1};case"math":return{id:V,type:"math",content:X.content??"",isStreaming:!1};case"mermaid":return{id:V,type:"mermaid",content:X.content??"",isStreaming:!1};case"image":return{id:V,type:"image",content:X.content??"",isStreaming:!1};case"table":{const Xe=Math.max(1,X.cols??3),mt=Math.max(0,X.rows??2);return{id:V,type:"table",header:Array.from({length:Xe},()=>[]),rows:Array.from({length:mt},()=>Array.from({length:Xe},()=>[])),align:Array.from({length:Xe},()=>"left"),isStreaming:!1}}case"divider":return{id:V,type:"divider",isStreaming:!1}}})()),ce=k.current,pe=J?ce.findIndex(Xe=>Xe.id===J):ce.length-1,We=pe===-1?ce.length:pe+1,Ve=ce.slice(0,We).concat([oe],ce.slice(We));return ae(Ve),V},[ae,Q]),et=F.useCallback(J=>{var Xe;W.current.delete(J);const X=k.current,V=X.findIndex(mt=>mt.id===J);if(V===-1)return;const oe=X.slice(0,V).concat(X.slice(V+1)),ce=oe.length===0?[{id:Di(10),type:"paragraph",spans:[],isStreaming:!1}]:oe;ae(ce);const pe=Math.max(0,Math.min(V-1,ce.length-1)),We=ce[pe],Ve=I(We)?We.spans.reduce((mt,gt)=>mt+gt.text.length,0):((Xe=We.content)==null?void 0:Xe.length)??0;de(We.id,Ve,Ve)},[ae,de]),ot=F.useCallback((J,X,V)=>{W.current.add(J);const oe=k.current,ce=oe.find(Ve=>Ve.id===J);if(!ce)return;const pe=I(ce)?ce.spans:[],We=(()=>{if(X==="paragraph")return{id:ce.id,type:"paragraph",spans:pe,isStreaming:!1};if(X==="heading")return{id:ce.id,type:"heading",spans:pe,level:(V==null?void 0:V.level)??1,isStreaming:!1};if(X==="blockquote")return{id:ce.id,type:"blockquote",spans:pe,isStreaming:!1};if(X==="list")return{id:ce.id,type:"list",spans:pe,listType:(V==null?void 0:V.listType)??"unordered",depth:(V==null?void 0:V.depth)??0,isStreaming:!1};if(X==="table"){const mt=Array.from({length:3},(gt,Ot)=>Ot===0?pe:[]);return{id:ce.id,type:"table",header:mt,rows:Array.from({length:2},()=>Array.from({length:3},()=>[])),align:Array.from({length:3},()=>"left"),isStreaming:!1}}return ce})();ae(oe.map(Ve=>Ve.id===J?Q(We):Ve))},[ae,Q]),_t=F.useCallback((J,X=!1)=>{W.current.add(J);const V=k.current,oe=V.findIndex(gt=>gt.id===J),ce=V[oe],pe=oe>0?V[oe-1]:null;if(!ce||ce.type!=="list"||!pe||pe.type!=="list")return;const We=ce.depth??0,Ve=(pe.depth??0)+1,Xe=Math.min(We+1,Ve);if(Xe===We)return;const mt=X?ce.listType:pe.listType;ae(V.map(gt=>gt.id===J?Q({...ce,depth:Xe,listType:mt}):gt))},[ae,Q]),Et=F.useCallback((J,X=!1)=>{W.current.add(J);const V=k.current,oe=V.findIndex(We=>We.id===J),ce=V[oe];if(!ce||ce.type!=="list")return;const pe=ce.depth??0;if(pe>0){const We=pe-1;let Ve=ce.listType;if(!X)for(let Xe=oe-1;Xe>=0;Xe--){const mt=V[Xe];if(mt.type!=="list")break;if((mt.depth??0)===We){Ve=mt.listType;break}}ae(V.map(Xe=>Xe.id===J?Q({...ce,depth:We,listType:Ve}):Xe))}else ot(J,"paragraph")},[ae,ot,Q]),Me=F.useMemo(()=>{const J=y.length>0?k.current.concat(y):k.current;return{updateBlock:(X,V)=>Re(X,V),getBlock:X=>j(X),getAllBlocks:()=>J,getMarkdown:()=>ar(J),insertBlockAfter:(X,V)=>De(X,V),deleteBlock:X=>et(X),setBlockType:(X,V,oe)=>ot(X,V,oe),indentListItem:X=>_t(X),outdentListItem:X=>Et(X)}},[Re,j,p,y,De,et,ot,_t,Et]),fe=F.useMemo(()=>{const J=S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M4 6h16"}),S.jsx("path",{d:"M4 12h10"}),S.jsx("path",{d:"M4 18h16"})]}),X=S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M6 4v16"}),S.jsx("path",{d:"M18 4v16"}),S.jsx("path",{d:"M6 12h12"})]}),V=S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M8 6h13"}),S.jsx("path",{d:"M8 12h13"}),S.jsx("path",{d:"M8 18h13"}),S.jsx("path",{d:"M3 6h.01"}),S.jsx("path",{d:"M3 12h.01"}),S.jsx("path",{d:"M3 18h.01"})]}),oe=S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M10 6h11"}),S.jsx("path",{d:"M10 12h11"}),S.jsx("path",{d:"M10 18h11"}),S.jsx("path",{d:"M3 7h1"}),S.jsx("path",{d:"M3 12h1"}),S.jsx("path",{d:"M3 18h1"})]}),ce=S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M10 11H6c-1.1 0-2 .9-2 2v5h6v-7z"}),S.jsx("path",{d:"M20 11h-4c-1.1 0-2 .9-2 2v5h6v-7z"}),S.jsx("path",{d:"M4 11V9a5 5 0 0 1 5-5"}),S.jsx("path",{d:"M14 11V9a5 5 0 0 1 5-5"})]}),pe=S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M16 18l6-6-6-6"}),S.jsx("path",{d:"M8 6l-6 6 6 6"})]}),We=S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M7 7h10"}),S.jsx("path",{d:"M7 17h10"}),S.jsx("path",{d:"M7 7v10"}),S.jsx("path",{d:"M17 7v10"})]}),Ve=S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M4 4h6l4 16h6"}),S.jsx("path",{d:"M4 12h16"})]}),Xe=S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("path",{d:"M3 12h18"}),S.jsx("path",{d:"M8 8h.01"}),S.jsx("path",{d:"M8 16h.01"}),S.jsx("path",{d:"M16 8h.01"}),S.jsx("path",{d:"M16 16h.01"})]}),mt=S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),S.jsx("path",{d:"M3 16l5-5a2 2 0 0 1 3 0l5 5"}),S.jsx("path",{d:"M14 14l2-2a2 2 0 0 1 3 0l2 2"}),S.jsx("path",{d:"M8 8h.01"})]}),gt=S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),S.jsx("path",{d:"M3 10h18"}),S.jsx("path",{d:"M9 4v16"}),S.jsx("path",{d:"M15 4v16"})]}),Ot=Qt=>({id:`heading-${Qt}`,title:`Heading ${Qt}`,description:`Section heading (H${Qt})`,group:"Text",aliases:[`h${Qt}`],keywords:["heading","title",`h${Qt}`],icon:X,block:{type:"heading",level:Qt,spans:[]}});return[{id:"paragraph",title:"Text",description:"Plain paragraph",group:"Text",aliases:["p","text"],keywords:["paragraph"],icon:J,block:{type:"paragraph",spans:[]}},Ot(1),Ot(2),Ot(3),{id:"blockquote",title:"Quote",description:"Blockquote",group:"Text",aliases:["quote","bq"],keywords:["blockquote"],icon:ce,block:{type:"blockquote",spans:[]}},{id:"bulleted-list",title:"Bulleted list",description:"Unordered list item",group:"Lists",aliases:["ul","bullet","list"],keywords:["unordered"],icon:V,block:{type:"list",listType:"unordered",depth:0,spans:[]}},{id:"numbered-list",title:"Numbered list",description:"Ordered list item",group:"Lists",aliases:["ol","number","ordered"],keywords:["ordered"],icon:oe,block:{type:"list",listType:"ordered",depth:0,spans:[]}},{id:"code",title:"Code",description:"Fenced code block",group:"Media",aliases:["codeblock","```"],keywords:["snippet"],icon:pe,block:{type:"code",language:"text",content:""}},{id:"mermaid",title:"Mermaid",description:"Mermaid diagram block",group:"Media",aliases:["diagram","flow"],keywords:["graph","sequence"],icon:We,block:{type:"mermaid",content:""}},{id:"math",title:"Math (block)",description:"LaTeX block equation",group:"Media",aliases:["latex","equation"],keywords:["katex"],icon:Ve,block:{type:"math",content:""}},{id:"image",title:"Image",description:"Image block (URL)",group:"Media",aliases:["img","photo","picture"],keywords:["media"],icon:mt,block:{type:"image",content:""}},{id:"table",title:"Table",description:"Spreadsheet-style table",group:"Layout",aliases:["tbl","grid"],keywords:["rows","columns","sheet"],icon:gt,block:{type:"table",rows:2,cols:3}},{id:"divider",title:"Divider",description:"Horizontal divider",group:"Layout",aliases:["hr","line","---"],keywords:["separator"],icon:Xe,block:{type:"divider"},insertParagraphAfter:!0}]},[]),xe=F.useCallback(J=>{const X=k.current,V=X.findIndex(pe=>pe.id===J);if(V===-1)return;const oe=V+1<X.length?X[V+1]:null;if(oe&&oe.type==="paragraph"&&Tf(oe.spans).trim()===""&&!oe.isStreaming){de(oe.id,0,0);return}const ce=De(J,{type:"paragraph",spans:[]});de(ce,0,0)},[De,de]),tt=F.useCallback(J=>{const X=n!=null&&n.getSlashCommands?n.getSlashCommands({block:J}):[];return fe.concat(X||[])},[fe,n]),jt=F.useCallback((J,X)=>{const V=X.trim().toLowerCase();return V?J.map(oe=>{const ce=[oe.title,...oe.aliases||[],...oe.keywords||[]].join(" ").toLowerCase(),pe=(oe.aliases||[]).some(Xe=>Xe.toLowerCase().startsWith(V))||oe.title.toLowerCase().startsWith(V),We=ce.includes(V);return{cmd:oe,score:pe?3:We?1:0}}).filter(oe=>oe.score>0).sort((oe,ce)=>ce.score-oe.score||oe.cmd.title.localeCompare(ce.cmd.title)).map(oe=>oe.cmd):J},[]),En=F.useMemo(()=>{if(!E)return[];const J=k.current.find(X=>X.id===E.blockId);return J?jt(tt(J),E.query):[]},[E,jt,tt]),ra=F.useCallback((J,X)=>{switch(X.type){case"paragraph":return{id:J,type:"paragraph",spans:X.spans??[],isStreaming:!1};case"heading":return{id:J,type:"heading",spans:X.spans??[],level:X.level??1,isStreaming:!1};case"blockquote":return{id:J,type:"blockquote",spans:X.spans??[],isStreaming:!1};case"list":return{id:J,type:"list",spans:X.spans??[],listType:X.listType??"unordered",depth:X.depth??0,isStreaming:!1};case"code":return{id:J,type:"code",content:X.content??"",language:X.language??"text",isStreaming:!1};case"math":return{id:J,type:"math",content:X.content??"",isStreaming:!1};case"mermaid":return{id:J,type:"mermaid",content:X.content??"",isStreaming:!1};case"image":return{id:J,type:"image",content:X.content??"",isStreaming:!1};case"table":{const V=Math.max(1,X.cols??3),oe=Math.max(0,X.rows??2);return{id:J,type:"table",header:Array.from({length:V},()=>[]),rows:Array.from({length:oe},()=>Array.from({length:V},()=>[])),align:Array.from({length:V},()=>"left"),isStreaming:!1}}case"divider":return{id:J,type:"divider",isStreaming:!1}}},[]),na=F.useCallback((J,X,V)=>{const oe=k.current.find(mt=>mt.id===J);if(!oe)return;if(X.execute){X.execute(Me,{blockId:J,block:oe,query:V});return}if(!X.block)return;const ce=k.current,pe=ce.findIndex(mt=>mt.id===J);if(pe===-1)return;let We=X.block;X.block.type==="list"&&oe.type==="list"&&(We={...X.block,depth:oe.depth??0}),W.current.add(J);const Ve=Q(ra(J,We));let Xe=ce.slice(0,pe).concat([Ve],ce.slice(pe+1));if(X.insertParagraphAfter){const mt=Di(10);W.current.add(mt);const gt=Q(ra(mt,{type:"paragraph",spans:[]}));Xe=Xe.slice(0,pe+1).concat([gt],Xe.slice(pe+1)),ae(Xe),de(mt,0,0);return}ae(Xe),de(J,0,0)},[Me,Q,ra,ae,de]);F.useImperativeHandle(l,()=>Me,[Me]),F.useEffect(()=>{n!=null&&n.ref&&"current"in n.ref&&(n.ref.current=Me)},[n==null?void 0:n.ref,Me]);const Ho=F.useCallback(J=>{const X=k.current.find(V=>V.id===J);X!=null&&X.isStreaming||C(J)},[]),Ra=F.useCallback(J=>{const X=k.current.find(oe=>oe.id===J);if(!X){C(null);return}if(Ee(X).deleteOnBlurWhenEmpty&&ye(X)){et(J);return}C(null)},[et,Ee]),_i=F.useCallback((J,X)=>{Re(J,X)},[Re]),ue=(J,X)=>{const V=[],oe=[];let ce=0;for(const pe of J){const We=ce,Ve=ce+pe.text.length;if(Ve<=X)V.push({...pe});else if(We>=X)oe.push({...pe});else{const Xe=X-We;Xe>0&&V.push({...pe,text:pe.text.slice(0,Xe)}),Xe<pe.text.length&&oe.push({...pe,text:pe.text.slice(Xe)})}ce=Ve}return[Hi(V),Hi(oe)]},Ce=(J,X,V)=>{if(X===V)return J;const oe=Math.min(X,V),ce=Math.max(X,V),pe=[];let We=0;for(const Ve of J){const Xe=We,mt=We+Ve.text.length;if(mt<=oe||Xe>=ce)pe.push({...Ve});else{const gt=Math.max(0,oe-Xe),Ot=Math.max(0,ce-Xe);gt>0&&pe.push({...Ve,text:Ve.text.slice(0,gt)}),Ot<Ve.text.length&&pe.push({...Ve,text:Ve.text.slice(Ot)})}We=mt}return Hi(pe)},at=(J,X)=>{if(J.length===0)return X;if(X.length===0)return J;const V=J[J.length-1],oe=X[0],pe=V.text.length>0&&oe.text.length>0&&!/\s$/.test(V.text)&&!/^\s/.test(oe.text)?J.concat([{text:" ",style:"plain"}],X):J.concat(X);return Hi(pe)},pt=F.useCallback((J,X)=>{var mt,gt,Ot,Qt,Ut,Jn,Zr,ei,Ba;const V=k.current.find(bt=>bt.id===J);if(!V)return;const oe=bt=>{if(!(V.type==="paragraph"||V.type==="heading"||V.type==="list"||V.type==="blockquote"))return;Re(J,bt?[{text:bt,style:"plain"}]:[]);const Ne=document.querySelector(`[data-block-id="${J}"]`),yt=Ne==null?void 0:Ne.querySelector('[contenteditable="true"]');if(yt){yt.textContent=bt;const Je=bt.length;$i(yt,Je,Je);return}de(J,bt.length,bt.length)};if(E&&E.blockId===J){X.preventDefault();const bt=E.query,Ne=X.key;if(Ne==="Escape"){be();const Je="/"+bt;oe(Je);return}const yt=Math.max(0,En.length-1);if(Ne==="ArrowDown"||Ne==="Tab"){_({...E,activeIndex:Math.min(E.activeIndex+1,yt)});return}if(Ne==="ArrowUp"){_({...E,activeIndex:Math.max(E.activeIndex-1,0)});return}if(Ne==="Backspace"){if(bt.length===0){be(),oe("");return}const Je=bt.slice(0,-1),St=jt(tt(V),Je);_({...E,query:Je,activeIndex:0}),oe("/"+Je),St.length===0&&be();return}if(Ne==="Enter"){const Je=En[S4(E.activeIndex,0,yt)];be(),Je&&na(J,Je,bt);return}if(Ne.length===1&&!X.metaKey&&!X.ctrlKey&&!X.altKey){const Je=bt+Ne,St=jt(tt(V),Je);_({...E,query:Je,activeIndex:0}),oe("/"+Je),St.length===0&&be();return}return}if((X.key==="Backspace"||X.key==="Delete")&&((mt=X.target)!=null&&mt.isContentEditable)){const bt=window.getSelection();if(bt&&bt.rangeCount>0){const Ne=bt.getRangeAt(0);if(!Ne.collapsed){const yt=(Ot=(gt=Ne.startContainer.parentElement)==null?void 0:gt.closest)==null?void 0:Ot.call(gt,"[data-block-id]"),Je=(Ut=(Qt=Ne.endContainer.parentElement)==null?void 0:Qt.closest)==null?void 0:Ut.call(Qt,"[data-block-id]"),St=yt==null?void 0:yt.getAttribute("data-block-id"),wr=Je==null?void 0:Je.getAttribute("data-block-id");if(St&&wr&&St!==wr){X.preventDefault();const gr=k.current.findIndex(K=>K.id===St),Jr=k.current.findIndex(K=>K.id===wr);if(gr===-1||Jr===-1)return;const en=Math.min(gr,Jr),$r=Math.max(gr,Jr),zn=k.current,Da=zn.slice(0,en).concat(zn.slice($r+1)),ia=Da.length===0?[{id:Di(10),type:"paragraph",spans:[],isStreaming:!1}]:Da;ae(ia);const Ss=Math.max(0,Math.min(en-1,ia.length-1)),_s=ia[Ss],Ke=I(_s)?_s.spans.reduce((K,Se)=>K+Se.text.length,0):((Jn=_s.content)==null?void 0:Jn.length)??0;de(_s.id,Ke,Ke);return}}}}const ce=X.currentTarget;let pe=0;if(ce instanceof HTMLTextAreaElement)pe=ce.selectionStart;else if(ce!=null&&ce.isContentEditable){const bt=bn(ce);bt&&(pe=bt.start)}const We="spans"in V?xn(V.spans):"content"in V?V.content:"";if(qe(X,V,We,pe))return;if(X.key==="/"&&pe===0){const bt=!!((Zr=V.metadata)!=null&&Zr.dirty),Ne=V.type==="paragraph"||V.type==="heading"||V.type==="list"||V.type==="blockquote"?Tf(V.spans).trim()==="":V.type==="divider"?!1:((Ba=(ei=V.content)==null?void 0:ei.trim)==null?void 0:Ba.call(ei))==="";if(bt&&Ne&&!V.isStreaming){X.preventDefault(),L(J),Re(J,[{text:"/",style:"plain"}]);const yt=document.querySelector(`[data-block-id="${J}"]`),Je=yt==null?void 0:yt.querySelector('[contenteditable="true"]');Je?(Je.textContent="/",$i(Je,1,1)):de(J,1,1);return}}const Xe=Ee(V);if(X.key==="Enter"&&Xe.enterBehavior==="newBlock"&&I(V)&&ce!=null&&ce.isContentEditable){X.preventDefault();const bt=bn(ce),Ne=(bt==null?void 0:bt.start)??0,yt=(bt==null?void 0:bt.end)??Ne;if(V.type==="list"&&ye(V)){ot(V.id,"paragraph"),de(V.id,0,0);return}const Je=Ce(V.spans,Ne,yt),[St,wr]=ue(Je,Ne),gr=k.current,Jr=gr.findIndex(Ss=>Ss.id===V.id),en=Di(10);W.current.add(V.id),W.current.add(en);let $r=V.type,zn;(V.type==="heading"||V.type==="blockquote")&&($r="paragraph"),V.type==="list"&&($r="list");const Da=Q({...V,spans:St});$r==="list"&&V.type==="list"?zn={id:en,type:"list",spans:wr,listType:V.listType,depth:V.depth??0,isStreaming:!1}:zn={id:en,type:"paragraph",spans:wr,isStreaming:!1},zn=Q(zn);const ia=gr.slice(0,Jr).concat([Da,zn],gr.slice(Jr+1));ae(ia),de(en,0,0);return}if(X.key==="Tab"&&I(V)&&V.type==="list"&&(ce!=null&&ce.isContentEditable)){X.preventDefault(),X.shiftKey?Et(V.id):_t(V.id);return}if(X.altKey&&(X.key==="]"||X.key==="[")&&I(V)&&V.type==="list"&&(ce!=null&&ce.isContentEditable)){X.preventDefault(),X.key==="["?Et(V.id,!0):_t(V.id,!0);return}if(X.key==="Backspace"){if(I(V)&&(ce!=null&&ce.isContentEditable)){const bt=bn(ce);if(!bt||bt.start!==bt.end)return;if(bt.start===0){if(V.type==="heading"){X.preventDefault(),ot(V.id,"paragraph"),de(V.id,0,0);return}if(V.type==="list"){if(X.preventDefault(),(V.depth??0)>0){Et(V.id),de(V.id,0,0);return}ot(V.id,"paragraph"),de(V.id,0,0);return}if(ye(V)){X.preventDefault(),et(V.id);return}X.preventDefault();const Ne=k.current,yt=Ne.findIndex(St=>St.id===V.id),Je=yt>0?Ne[yt-1]:null;if(Je&&Je.type==="list"&&(V.type==="paragraph"||V.type==="blockquote")){const St={...Je,spans:at(Je.spans,V.spans)},wr=Ne.slice(0,yt-1).concat([Q(St)],Ne.slice(yt+1));ae(wr);const gr=St.spans.reduce((Jr,en)=>Jr+en.text.length,0);de(St.id,gr,gr);return}if(Je&&I(Je)&&I(V)&&Je.type!=="list"){const St={...Je,spans:at(Je.spans,V.spans)},wr=Ne.slice(0,yt-1).concat([Q(St)],Ne.slice(yt+1));ae(wr);const gr=St.spans.reduce((Jr,en)=>Jr+en.text.length,0);de(St.id,gr,gr);return}}return}if(ce instanceof HTMLTextAreaElement&&pe===0&&ye(V)){X.preventDefault(),et(V.id);return}}},[qe,E,be,_,En,na,L,Re,jt,tt,Ee,ye,et,ae,de,ue,Ce,at,ot,_t,Et]),Lt=F.useMemo(()=>{const J=[],X=[];for(const V of p)if(V.type==="list"&&V.listType==="ordered"){const oe=V.depth??0;for(;X.length<=oe;)X.push(0);X[oe]=(X[oe]||0)+1;for(let ce=oe+1;ce<X.length;ce++)X[ce]=0;J.push({...V,metadata:{...V.metadata||{},displayNumber:X[oe]}})}else V.type==="list"||(X.length=0),J.push(V);return J},[p]),kr=F.useMemo(()=>{if(y.length===0)return"";const J=y[y.length-1],X=y.slice(0,-1),V=X.length>0?ar(X)+`
670
+
671
+ `:"";if(J.type==="code"){const ce="```"+(J.language||"")+`
672
+ `,pe=J.content||"";return V+ce+pe}if(J.type==="mermaid"){const oe="```mermaid\n",ce=J.content||"";return V+oe+ce}if(J.type==="math"){const oe=`$$
673
+ `,ce=J.content||"";return V+oe+ce}return ar(y)},[y]),dn=u==="dark";return S.jsxs("div",{ref:d,className:`notion-stream ${dn?"dark":""} ${a} relative overflow-x-hidden bg-notion-bg text-notion-text`,children:[S.jsx(ese,{isOpen:!!E,position:(E==null?void 0:E.position)||{top:0,left:0},query:(E==null?void 0:E.query)||"",commands:En,activeIndex:(E==null?void 0:E.activeIndex)||0,onClose:be,onHoverIndex:J=>{E&&_({...E,activeIndex:J})},onSelect:J=>{E&&(be(),na(E.blockId,J,E.query))}}),S.jsxs("div",{className:"notion-stream-content space-y-1 relative overflow-x-hidden",children:[Lt.map(J=>S.jsx("div",{"data-block-id":J.id,className:"relative",children:S.jsx(Zae,{block:J,isEditing:!o&&v===J.id,onStartEdit:()=>Ho(J.id),onEndEdit:()=>Ra(J.id),onContentChange:X=>_i(J.id,X),onKeyDown:X=>pt(J.id,X),hooks:n,onExitTable:xe,theme:u,readonly:o})},J.id)),r&&y.length>0&&S.jsx("div",{className:"relative notion-stream-virtual-block",children:S.jsx(is,{plugins:{code:cv,math:p0,mermaid:x_},shikiTheme:["min-light","min-dark"],mermaid:{config:{theme:dn?"dark":"default",themeVariables:{background:"transparent"}}},isAnimating:!0,controls:!1,children:kr})})]}),p.length===0&&!r&&S.jsx("div",{className:"text-notion-text-secondary text-center py-8",children:"No content yet"}),p.length===0&&r&&S.jsxs("div",{className:"flex items-center space-x-2 text-notion-text-secondary py-4",children:[S.jsx("span",{className:"inline-block w-0.5 h-4 bg-notion-text animate-pulse"}),S.jsx("span",{className:"text-sm",children:"Receiving content..."})]})]})});function ol(t,e){if(t.type==="paragraph"||t.type==="heading"||t.type==="list"||t.type==="blockquote"){const r=typeof e=="string"?hi(e):e;return{...t,spans:r}}if("content"in t){const r=typeof e=="string"?e:ar([{...t,...t,spans:e}]);return{...t,content:r}}return t}function nse({blocks:t,onMarkdownChange:e}){const[r,n]=F.useState(null),[i,a]=F.useState(new Map),s=F.useRef(t);s.current=t;const o=F.useMemo(()=>t.map(u=>{const h=i.get(u.id);return h===void 0?u:ol(u,h)}),[t,i]),l=F.useCallback((u,h)=>{if(a(d=>{const f=new Map(d);return f.set(u,h),f}),e){const d=s.current.map(f=>{const p=f.id===u?h:i.get(f.id);return p===void 0?f:ol(f,p)});e(ar(d))}},[e,i]),c=F.useCallback(()=>({updateBlock:(u,h)=>{l(u,h)},getBlock:u=>{const h=s.current.find(f=>f.id===u);if(!h)return null;const d=i.get(u);return d===void 0?h:ol(h,d)},getAllBlocks:()=>s.current.map(u=>{const h=i.get(u.id);return h===void 0?u:ol(u,h)}),getMarkdown:()=>{const u=s.current.map(h=>{const d=i.get(h.id);return d===void 0?h:ol(h,d)});return ar(u)},insertBlockAfter:()=>{throw new Error("insertBlockAfter is only available on NotionStream ref")},deleteBlock:()=>{throw new Error("deleteBlock is only available on NotionStream ref")},setBlockType:()=>{throw new Error("setBlockType is only available on NotionStream ref")},indentListItem:()=>{throw new Error("indentListItem is only available on NotionStream ref")},outdentListItem:()=>{throw new Error("outdentListItem is only available on NotionStream ref")}}),[l,i]);return{mergedBlocks:o,editingBlockId:r,setEditingBlockId:n,updateBlockValue:l,getRef:c}}function P_(t,e){const r=Ki(t,!1),n=Ki(e,!1),i=Gg(r,n);if(i.length===0)return[];const a=[];let s=[],o=[],l=0;const c=p=>p.type==="code",u=()=>{if(!(s.length===0&&o.length===0)){if(s.length===1&&o.length===1&&c(s[0])&&c(o[0])){const p=[...s],m=[...o];a.push({id:ll(l,"modified",p,m),type:"modified",beforeBlocks:p,afterBlocks:m,beforeMarkdown:ar(p),afterMarkdown:ar(m),codeDiff:{language:(o[0].language||s[0].language||"text").toString(),lines:X0(s[0].content||"",o[0].content||"")}})}else if(s.length>0&&o.length>0){const p=[...s],m=[...o];a.push({id:ll(l,"modified",p,m),type:"modified",beforeBlocks:p,afterBlocks:m,beforeMarkdown:ar(p),afterMarkdown:ar(m)})}else if(s.length>0){const p=[...s],m=ar(p);m.trim()&&a.push({id:ll(l,"removed",p,[]),type:"removed",blocks:p,markdown:m})}else if(o.length>0){const p=[...o],m=ar(p);m.trim()&&a.push({id:ll(l,"added",p,[]),type:"added",blocks:p,markdown:m})}s=[],o=[]}};let h=[],d=0;const f=()=>{if(h.length===0)return;const p=ar(h);p.trim()&&a.push({id:ll(d,"unchanged",[...h],[]),type:"unchanged",blocks:[...h],markdown:p}),h=[]};for(let p=0;p<i.length;p++){const m=i[p];m.type==="unchanged"?(u(),h.length===0&&(d=p),h.push(m.block)):m.type==="removed"?(f(),s.length===0&&o.length===0&&(l=p),s.push(m.block)):m.type==="added"&&(f(),s.length===0&&o.length===0&&(l=p),o.push(m.block))}return f(),u(),a}function F_(t,e,r={}){var a;const n=r.defaultDecision??"reject",i=[];for(const s of t){if(s.type==="unchanged"){i.push(...s.blocks);continue}const o=e[s.id]??n,l=o==="unset"?n:o;if(s.type==="added"){l==="accept"&&i.push(...s.blocks);continue}if(s.type==="removed"){l==="reject"&&i.push(...s.blocks);continue}if(s.type==="modified")if(l==="accept"){const c=(a=s.afterBlocks)!=null&&a.length?s.afterBlocks:s.beforeBlocks;i.push(...c)}else i.push(...s.beforeBlocks)}return ar(i)}function $_(t,e){const r=_4(t),n=_4(e);if(r.length===0&&n.length===0)return[];if(r.length===0)return n.map(u=>({text:u,type:"added"}));if(n.length===0)return r.map(u=>({text:u,type:"removed"}));const i=r.length,a=n.length,s=Array(i+1).fill(null).map(()=>Array(a+1).fill(0));for(let u=1;u<=i;u++)for(let h=1;h<=a;h++)r[u-1]===n[h-1]?s[u][h]=s[u-1][h-1]+1:s[u][h]=Math.max(s[u-1][h],s[u][h-1]);const o=[];let l=i,c=a;for(;l>0||c>0;)l>0&&c>0&&r[l-1]===n[c-1]?(o.unshift({text:r[l-1],type:"unchanged"}),l--,c--):c>0&&(l===0||s[l][c-1]>=s[l-1][c])?(o.unshift({text:n[c-1],type:"added"}),c--):(o.unshift({text:r[l-1],type:"removed"}),l--);return lse(o)}function ise(t,e,r={}){const{mergeAdjacent:n=!0}=r,i=Ki(t,!1),a=Ki(e,!1),s=Gg(i,a);if(s.length===0)return[];const l=(n?ose(s):s.map(c=>({type:c.type,blocks:[c.block]}))).map(c=>({type:c.type,markdown:ar(c.blocks)})).filter(c=>c.markdown.trim()!=="");return n?cse(l):l}function ase(t,e){const r=Ki(t,!1),n=Ki(e,!1),i=Gg(r,n);if(i.length===0)return[];const a=[];let s=null,o=[];const l=()=>{if(!s||o.length===0)return;const u=ar(o);u.trim()&&a.push({type:s,markdown:u}),s=null,o=[]},c=u=>u.type==="code";for(let u=0;u<i.length;u++){const h=i[u],d=i[u+1];if(h.type==="removed"&&(d==null?void 0:d.type)==="added"&&c(h.block)&&c(d.block)){l(),a.push({type:"modified",codeDiff:{language:(d.block.language||h.block.language||"text").toString(),lines:X0(h.block.content||"",d.block.content||"")}}),u++;continue}if(h.type==="added"&&(d==null?void 0:d.type)==="removed"&&c(h.block)&&c(d.block)){l(),a.push({type:"modified",codeDiff:{language:(h.block.language||d.block.language||"text").toString(),lines:X0(d.block.content||"",h.block.content||"")}}),u++;continue}s===h.type?o.push(h.block):(l(),s=h.type,o=[h.block])}return l(),a}function X0(t,e){const r=E4(t),n=E4(e),i=r.length,a=n.length,s=Array(i+1).fill(null).map(()=>Array(a+1).fill(0));for(let u=1;u<=i;u++)for(let h=1;h<=a;h++)r[u-1]===n[h-1]?s[u][h]=s[u-1][h-1]+1:s[u][h]=Math.max(s[u-1][h],s[u][h-1]);const o=[];let l=i,c=a;for(;l>0||c>0;)l>0&&c>0&&r[l-1]===n[c-1]?(o.unshift({type:"unchanged",text:r[l-1]}),l--,c--):c>0&&(l===0||s[l][c-1]>=s[l-1][c])?(o.unshift({type:"added",text:n[c-1]}),c--):(o.unshift({type:"removed",text:r[l-1]}),l--);for(let u=0;u<o.length-1;u++){const h=o[u],d=o[u+1];if(h.type==="removed"&&d.type==="added"){const f=$_(h.text,d.text);h.inline=f.filter(p=>p.type!=="added"),d.inline=f.filter(p=>p.type!=="removed"),u++}}return o}function _4(t){const e=[];let r="",n=!1;for(const i of t){const a=/\s/.test(i);a!==n&&r&&(e.push(r),r=""),r+=i,n=a}return r&&e.push(r),e}function E4(t){return t.split(`
674
+ `)}function ll(t,e,r,n){const i=r.map(K0).join("||"),a=n.map(K0).join("||");return"d_"+sse(`${t}|${e}|${i}|->|${a}`).toString(36)}function sse(t){let e=2166136261;for(let r=0;r<t.length;r++)e^=t.charCodeAt(r),e=e+((e<<1)+(e<<4)+(e<<7)+(e<<8)+(e<<24))>>>0;return e>>>0}function K0(t){return t.type==="paragraph"||t.type==="blockquote"?`${t.type}|${xn(t.spans,{forParsing:!0})}`:t.type==="heading"?`heading|${t.level||1}|${xn(t.spans,{forParsing:!0})}`:t.type==="list"?`list|${t.listType||"unordered"}|${t.depth||0}|${xn(t.spans,{forParsing:!0})}`:t.type==="table"?`table|${ar([t])}`:t.type==="code"?`code|${t.language||""}|${t.content||""}`:t.type==="mermaid"?`mermaid|${t.content||""}`:t.type==="math"?`math|${t.content||""}`:t.type==="image"?`image|${t.content||""}`:t.type==="divider"?"divider":`${t.type}|${t.content||""}`}function Gg(t,e){if(t.length===0&&e.length===0)return[];const r=t.map(K0),n=e.map(K0),i=r.length,a=n.length,s=Array(i+1).fill(null).map(()=>Array(a+1).fill(0));for(let u=1;u<=i;u++)for(let h=1;h<=a;h++)r[u-1]===n[h-1]?s[u][h]=s[u-1][h-1]+1:s[u][h]=Math.max(s[u-1][h],s[u][h-1]);const o=[];let l=i,c=a;for(;l>0||c>0;)l>0&&c>0&&r[l-1]===n[c-1]?(o.unshift({type:"unchanged",block:t[l-1]}),l--,c--):c>0&&(l===0||s[l][c-1]>=s[l-1][c])?(o.unshift({type:"added",block:e[c-1]}),c--):(o.unshift({type:"removed",block:t[l-1]}),l--);return o}function ose(t){if(t.length===0)return[];const e=[];let r=t[0].type,n=[t[0].block];for(let i=1;i<t.length;i++){const a=t[i];a.type===r?n.push(a.block):(e.push({type:r,blocks:n}),r=a.type,n=[a.block])}return e.push({type:r,blocks:n}),e}function lse(t){if(t.length===0)return[];const e=[];let r={...t[0]};for(let n=1;n<t.length;n++)t[n].type===r.type?r.text+=t[n].text:(e.push(r),r={...t[n]});return e.push(r),e}function cse(t){if(t.length===0)return[];const e=[];let r={...t[0]};for(let n=1;n<t.length;n++)t[n].type===r.type?r.markdown+=`
675
+
676
+ `+t[n].markdown:(e.push(r),r={...t[n]});return e.push(r),e}function use(t){const{baseMarkdown:e,nextMarkdown:r,defaultDecision:n="unset",applyFallback:i="reject"}=t,a=F.useMemo(()=>P_(e,r),[e,r]),s=F.useMemo(()=>a.map(m=>m.id).join("|"),[a]),[o,l]=F.useState({});F.useEffect(()=>{l(m=>{const y={};for(const b of a)b.type!=="unchanged"&&(y[b.id]=m[b.id]??n);return y})},[s,n,a]);const c=F.useCallback(m=>{l(y=>({...y,[m]:"accept"}))},[]),u=F.useCallback(m=>{l(y=>({...y,[m]:"reject"}))},[]),h=F.useCallback(m=>{l(y=>({...y,[m]:"unset"}))},[]),d=F.useCallback(()=>{l(()=>{const m={};for(const y of a)y.type!=="unchanged"&&(m[y.id]=n);return m})},[a,n]),f=F.useMemo(()=>F_(a,o,{defaultDecision:i}),[a,o,i]),p=F.useMemo(()=>{let m=0,y=0,b=0,v=0,C=0,E=0,_=0;for(const k of a){if(k.type==="unchanged"){m++;continue}k.type==="added"?y++:k.type==="removed"?b++:k.type==="modified"&&v++;const N=o[k.id]??n;N==="unset"?_++:N==="accept"?C++:E++}return{unchangedItems:m,addedItems:y,removedItems:b,modifiedItems:v,totalChangeItems:y+b+v,accepted:C,rejected:E,pending:_}},[a,o,n]);return{items:a,decisions:o,accept:c,reject:u,unset:h,resetAll:d,resultMarkdown:f,stats:p}}exports.BlockquoteBlock=D_;exports.CodeBlock=L_;exports.Color=Kn;exports.Color$1=Bo;exports.DividerBlock=O_;exports.HeadingBlock=N_;exports.ImageBlock=M_;exports.JSON_SCHEMA=NT;exports.ListBlock=B_;exports.MapCache=ea;exports.MathBlock=I_;exports.MermaidBlock=R_;exports.N=Tn;exports.NotionStream=rse;exports.ParagraphBlock=A_;exports.Rgb=Gr;exports.Set=Y0;exports.Stack=Ts;exports.Symbol=oc;exports.Uint8Array=Kp;exports.Utils=ut;exports.ZERO_WIDTH_SPACE=i7;exports.__export=xk;exports.__name=w;exports.abs=CX;exports.acos=IX;exports.ao=Z6;exports.applyMarkdownDiffReview=F_;exports.applyStyleToRange=Tl;exports.array=Tw;exports.arrayLikeKeys=KT;exports.asin=RX;exports.assignValue=VT;exports.assignWithDepth_default=lr;exports.atan2=SX;exports.b=ht;exports.baseAssignValue=Wh;exports.baseFor=BT;exports.baseGetTag=vs;exports.baseKeys=MS;exports.baseRest=t7;exports.baseUnary=GT;exports.blocksToMarkdown=ar;exports.calculateMathMLDimensions=KW;exports.calculateTextHeight=vg;exports.calculateTextWidth=bi;exports.cleanAndMerge=Xh;exports.clear=Hk;exports.clear$1=Cte;exports.clear$2=tte;exports.clear2=vte;exports.cloneArrayBuffer=PT;exports.cloneBuffer=OT;exports.cloneTypedArray=FT;exports.color=mo;exports.commonDb_exports=$1;exports.common_default=xs;exports.commonjsGlobal=lo;exports.computeCodeDiff=X0;exports.computeDiff=$_;exports.computeDimensionOfText=z7;exports.computeMarkdownBlockDiff=ise;exports.computeMarkdownDiffReviewItems=P_;exports.computeMarkdownRenderDiff=ase;exports.configureSvgSize=F1;exports.constant=ja;exports.constant$1=Rh;exports.constant$2=JT;exports.copyArray=$T;exports.copyObject=XT;exports.cos=_X;exports.cr=RF;exports.createText=ta;exports.curveBasis=Hl;exports.darken=Ze;exports.dayjs2=bk;exports.decodeEntities=La;exports.defaultConfig2=aG;exports.defaultConfig_default=P1;exports.define=Ih;exports.domToSpans=da;exports.epsilon=Ip;exports.eq=Lc;exports.evaluate=cr;exports.extend=Y1;exports.generateId=u7;exports.getAccDescription=Wk;exports.getAccTitle=jk;exports.getConfig=_r;exports.getConfig2=Bt;exports.getDefaultExportFromCjs=lh;exports.getDiagramTitle=Yk;exports.getEdgeId=EJ;exports.getIconSVG=Fo;exports.getLineFunctionsWithOffset=MT;exports.getPrototype=hg;exports.getRegisteredLayoutAlgorithm=Xte;exports.getSelectionTextOffsets=bn;exports.getStylesFromArray=xg;exports.getSubGraphTitleMargins=Hh;exports.getThemeVariables3=Nk;exports.getUrl=$k;exports.getUserDefinedConfig=$W;exports.halfPi=Rp;exports.hasKatex=os;exports.hue=tV;exports.identity=mg;exports.initCloneObject=HT;exports.insertCluster=Z7;exports.insertEdge=vS;exports.insertEdgeLabel=bS;exports.insertNode=Fg;exports.interpolateNumber=Pi;exports.interpolateRgb=Cp;exports.interpolateString=hw;exports.isArguments=uc;exports.isArray=hc;exports.isArrayLike=Mc;exports.isArrayLikeObject=jT;exports.isBuffer=Yh;exports.isDark=Io;exports.isEmpty=mm;exports.isFunction=qh;exports.isIndex=fg;exports.isIterateeCall=r7;exports.isLabelStyle=cg;exports.isLength=dg;exports.isObject=Na;exports.isObjectLike=Po;exports.isTypedArray=Vh;exports.isValidShape=gS;exports.keysIn=pg;exports.lighten=Pe;exports.line=Sw;exports.lineBreakRegex=Ro;exports.load=LT;exports.log=he;exports.markers_default=TS;exports.max=EX;exports.memoize=Oo;exports.merge=n7;exports.mergeAdjacentSpans=Hi;exports.min=AX;exports.nodeUtil=Qp;exports.nogamma=V1;exports.overRest=ZT;exports.package_default=dp;exports.parseFontSize=Ic;exports.parseGenericTypes=yp;exports.parseMarkdown=Ki;exports.parseMarkdownToSpans=hi;exports.pi=Oh;exports.positionEdgeLabel=yS;exports.positionNode=kte;exports.random=d7;exports.registerIconPacks=L7;exports.render=Vte;exports.renderKatexSanitized=Lh;exports.renderSpans=Ug;exports.replaceIconSubstring=Rg;exports.rgbConvert=lw;exports.rgba=Ys;exports.sanitizeText=Cn;exports.select=At;exports.selectSvgElement=Yw;exports.setAccDescription=Uk;exports.setAccTitle=qk;exports.setConfig2=iG;exports.setDiagramTitle=Gk;exports.setNodeElem=xte;exports.setSelectionTextOffsets=$i;exports.setToString=e7;exports.setupGraphViewbox=zk;exports.setupGraphViewbox2=Vk;exports.sin=NX;exports.spansToHtml=Fs;exports.spansToMarkdown=xn;exports.sqrt=LX;exports.styles2String=ze;exports.tau=MX;exports.toggleStyle=oae;exports.tt=N5;exports.unknownIcon=A7;exports.updateNodeBounds=Ue;exports.useBlockState=nse;exports.useDiffReview=use;exports.useMarkdownShortcuts=__;exports.useStreamParser=S_;exports.utils_default=Bn;exports.withPath=ww;exports.wrapLabel=f7;