@hachej/boring-ui-cli 0.1.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 (666) hide show
  1. package/README.md +42 -0
  2. package/dist/index.js +110 -0
  3. package/package.json +28 -0
  4. package/public/assets/CodeEditor-DQqOn4xz-DE6QMowf.js +31 -0
  5. package/public/assets/FileTree-DRq_bfue-ZuPGj1Ap.js +21 -0
  6. package/public/assets/MarkdownEditor-DjiHxnRv-X5i-P50h.js +278 -0
  7. package/public/assets/_baseUniq-Csqk7RFj.js +1 -0
  8. package/public/assets/abap-BXYWi5l2.js +1 -0
  9. package/public/assets/abap-BdImnpbu.js +1 -0
  10. package/public/assets/actionscript-3-CRLSHa9e.js +1 -0
  11. package/public/assets/actionscript-3-CoDkCxhg.js +1 -0
  12. package/public/assets/ada-DeReRNhg.js +1 -0
  13. package/public/assets/ada-bCR0ucgS.js +1 -0
  14. package/public/assets/andromeeda-C4gqWexZ.js +1 -0
  15. package/public/assets/andromeeda-CF6_y_Qj.js +1 -0
  16. package/public/assets/angular-html-CU67Zn6k.js +1 -0
  17. package/public/assets/angular-html-DA-rfuFy.js +1 -0
  18. package/public/assets/angular-ts-BrjP3tb8.js +1 -0
  19. package/public/assets/angular-ts-BwZT4LLn.js +1 -0
  20. package/public/assets/apache-CCUDgqAf.js +1 -0
  21. package/public/assets/apache-Pmp26Uib.js +1 -0
  22. package/public/assets/apex-Bh6oOW3o.js +1 -0
  23. package/public/assets/apex-D8_7TLub.js +1 -0
  24. package/public/assets/apl-CORt7UWP.js +1 -0
  25. package/public/assets/apl-dKokRX4l.js +1 -0
  26. package/public/assets/applescript-Co6uUVPk.js +1 -0
  27. package/public/assets/applescript-Dd26Nb5t.js +1 -0
  28. package/public/assets/ara-BRHolxvo.js +1 -0
  29. package/public/assets/ara-D6vCOKVX.js +1 -0
  30. package/public/assets/arc-Lqsm_RTH.js +1 -0
  31. package/public/assets/architectureDiagram-Q4EWVU46-CCiB3xEy.js +36 -0
  32. package/public/assets/asciidoc-DSG2rbEP.js +1 -0
  33. package/public/assets/asciidoc-Ve4PFQV2.js +1 -0
  34. package/public/assets/asm-CbVMAfFB.js +1 -0
  35. package/public/assets/asm-D_Q5rh1f.js +1 -0
  36. package/public/assets/astro-CbQHKStN.js +1 -0
  37. package/public/assets/astro-HNnZUWAn.js +1 -0
  38. package/public/assets/aurora-x-D-2ljcwZ.js +1 -0
  39. package/public/assets/aurora-x-DOuLBLNn.js +1 -0
  40. package/public/assets/awk-DMzUqQB5.js +1 -0
  41. package/public/assets/awk-UmR4Ublb.js +1 -0
  42. package/public/assets/ayu-dark-BXQCOcka.js +1 -0
  43. package/public/assets/ayu-dark-DYE7WIF3.js +1 -0
  44. package/public/assets/ayu-light-BA47KaF1.js +1 -0
  45. package/public/assets/ayu-light-McBaoK3Y.js +1 -0
  46. package/public/assets/ayu-mirage-32ctXXKs.js +1 -0
  47. package/public/assets/ayu-mirage-urwrJgdN.js +1 -0
  48. package/public/assets/ballerina-BFfxhgS-.js +1 -0
  49. package/public/assets/ballerina-BMbY-1wP.js +1 -0
  50. package/public/assets/bat-BkioyH1T.js +1 -0
  51. package/public/assets/bat-Dcnh2ot_.js +1 -0
  52. package/public/assets/beancount-B92nBv9q.js +1 -0
  53. package/public/assets/beancount-k_qm7-4y.js +1 -0
  54. package/public/assets/berry-C9fz7p0n.js +1 -0
  55. package/public/assets/berry-uYugtg8r.js +1 -0
  56. package/public/assets/bibtex-CHM0blh-.js +1 -0
  57. package/public/assets/bibtex-DELXwv0g.js +1 -0
  58. package/public/assets/bicep-Bmn6On1c.js +1 -0
  59. package/public/assets/bicep-D2njIRU5.js +1 -0
  60. package/public/assets/bird2-BIv1doCn.js +1 -0
  61. package/public/assets/bird2-DPOp833l.js +1 -0
  62. package/public/assets/blade-BjGOyj-B.js +1 -0
  63. package/public/assets/blade-D4QpJJKB.js +1 -0
  64. package/public/assets/blockDiagram-DXYQGD6D-BiQNJMSk.js +132 -0
  65. package/public/assets/bsl-BO_Y6i37.js +1 -0
  66. package/public/assets/bsl-C4qeDxuX.js +1 -0
  67. package/public/assets/c-BIGW1oBm.js +1 -0
  68. package/public/assets/c-CyUOlKFr.js +1 -0
  69. package/public/assets/c3-B1fh2zee.js +1 -0
  70. package/public/assets/c3-eo99z4R2.js +1 -0
  71. package/public/assets/c4Diagram-AHTNJAMY-DXwnbpJk.js +10 -0
  72. package/public/assets/cadence-Bv_4Rxtq.js +1 -0
  73. package/public/assets/cadence-bIHbUj02.js +1 -0
  74. package/public/assets/cairo-C_mOTUpN.js +1 -0
  75. package/public/assets/cairo-KRGpt6FW.js +1 -0
  76. package/public/assets/catppuccin-frappe-BCqV45_h.js +1 -0
  77. package/public/assets/catppuccin-frappe-DFWUc33u.js +1 -0
  78. package/public/assets/catppuccin-latte-BWlfbWlw.js +1 -0
  79. package/public/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
  80. package/public/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
  81. package/public/assets/catppuccin-macchiato-L0ooYkqX.js +1 -0
  82. package/public/assets/catppuccin-mocha-CPxVXonm.js +1 -0
  83. package/public/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
  84. package/public/assets/channel-B6owvTmI.js +1 -0
  85. package/public/assets/chunk-4BX2VUAB-rej0HxGx.js +1 -0
  86. package/public/assets/chunk-4TB4RGXK-Oz8udOU1.js +206 -0
  87. package/public/assets/chunk-55IACEB6-C9NQTjVk.js +1 -0
  88. package/public/assets/chunk-EDXVE4YY-DG17mBgq.js +1 -0
  89. package/public/assets/chunk-FMBD7UC4-BPJRLwW4.js +15 -0
  90. package/public/assets/chunk-OYMX7WX6-DQW7gaA4.js +231 -0
  91. package/public/assets/chunk-QZHKN3VN-Cbz87wiP.js +1 -0
  92. package/public/assets/chunk-YZCP3GAM-D4MkKjGq.js +1 -0
  93. package/public/assets/clarity-A4x-rz24.js +1 -0
  94. package/public/assets/clarity-D53aC0YG.js +1 -0
  95. package/public/assets/classDiagram-6PBFFD2Q-Cd35f-vx.js +1 -0
  96. package/public/assets/classDiagram-v2-HSJHXN6E-Cd35f-vx.js +1 -0
  97. package/public/assets/clojure-Bb2-3A0I.js +1 -0
  98. package/public/assets/clojure-P80f7IUj.js +1 -0
  99. package/public/assets/clone-CLvQ-vFE.js +1 -0
  100. package/public/assets/cmake-Cv5ljclQ.js +1 -0
  101. package/public/assets/cmake-D1j8_8rp.js +1 -0
  102. package/public/assets/cobol-nBiQ_Alo.js +1 -0
  103. package/public/assets/cobol-nwyudZeR.js +1 -0
  104. package/public/assets/codeowners-Bp6g37R7.js +1 -0
  105. package/public/assets/codeowners-CKT8dJip.js +1 -0
  106. package/public/assets/codeql-DXd8ggn3.js +1 -0
  107. package/public/assets/codeql-DsOJ9woJ.js +1 -0
  108. package/public/assets/coffee-CSg58a7P.js +1 -0
  109. package/public/assets/coffee-Ch7k5sss.js +1 -0
  110. package/public/assets/common-lisp-Cg-RD9OK.js +1 -0
  111. package/public/assets/common-lisp-v102bg8X.js +1 -0
  112. package/public/assets/coq-CxCehFeR.js +1 -0
  113. package/public/assets/coq-DkFqJrB1.js +1 -0
  114. package/public/assets/cose-bilkent-S5V4N54A-CvSFKdyd.js +1 -0
  115. package/public/assets/cpp-C28rag7_.js +1 -0
  116. package/public/assets/cpp-CofmeUqb.js +1 -0
  117. package/public/assets/crystal-DNxU26gB.js +1 -0
  118. package/public/assets/crystal-tKQVLTB8.js +1 -0
  119. package/public/assets/csharp-COcwbKMJ.js +1 -0
  120. package/public/assets/csharp-DieIJxYJ.js +1 -0
  121. package/public/assets/css-CLj8gQPS.js +1 -0
  122. package/public/assets/css-DPfMkruS.js +1 -0
  123. package/public/assets/csv-AZNL9t8Q.js +1 -0
  124. package/public/assets/csv-fuZLfV_i.js +1 -0
  125. package/public/assets/cue-D82EKSYY.js +1 -0
  126. package/public/assets/cue-nzsbQn5T.js +1 -0
  127. package/public/assets/cypher-BM7Pwunj.js +1 -0
  128. package/public/assets/cypher-COkxafJQ.js +1 -0
  129. package/public/assets/cytoscape.esm-DxGcaOPV.js +331 -0
  130. package/public/assets/d-85-TOEBH.js +1 -0
  131. package/public/assets/d-TG9YRPoI.js +1 -0
  132. package/public/assets/dagre-KV5264BT-BhJL3crJ.js +4 -0
  133. package/public/assets/dark-plus-C3mMm8J8.js +1 -0
  134. package/public/assets/dark-plus-DNUujdjh.js +1 -0
  135. package/public/assets/dart-CF10PKvl.js +1 -0
  136. package/public/assets/dart-bE4Kk8sk.js +1 -0
  137. package/public/assets/dax-B28Cho4e.js +1 -0
  138. package/public/assets/dax-CEL-wOlO.js +1 -0
  139. package/public/assets/defaultLocale-DX6XiGOO.js +1 -0
  140. package/public/assets/desktop-BmXAJ9_W.js +1 -0
  141. package/public/assets/desktop-Z9LhWKWr.js +1 -0
  142. package/public/assets/diagram-5BDNPKRD-CGitJbl7.js +10 -0
  143. package/public/assets/diagram-G4DWMVQ6-CIC0rOTX.js +24 -0
  144. package/public/assets/diagram-MMDJMWI5-C8PmQhJz.js +43 -0
  145. package/public/assets/diagram-TYMM5635-R2jpBCYA.js +24 -0
  146. package/public/assets/diff-BlzBhZx2.js +1 -0
  147. package/public/assets/diff-D97Zzqfu.js +1 -0
  148. package/public/assets/docker-BcOcwvcX.js +1 -0
  149. package/public/assets/docker-DIG_IqVK.js +1 -0
  150. package/public/assets/dotenv-Bf0GLMGc.js +1 -0
  151. package/public/assets/dotenv-Da5cRb03.js +1 -0
  152. package/public/assets/dracula-BzJJZx-M.js +1 -0
  153. package/public/assets/dracula-Dl-8puSV.js +1 -0
  154. package/public/assets/dracula-soft-BXkSAIEj.js +1 -0
  155. package/public/assets/dracula-soft-CSMZw4vz.js +1 -0
  156. package/public/assets/dream-maker-BtqSS_iP.js +1 -0
  157. package/public/assets/dream-maker-DBhfoDN-.js +1 -0
  158. package/public/assets/edge-BkV0erSs.js +1 -0
  159. package/public/assets/edge-FbVlp4U3.js +1 -0
  160. package/public/assets/elixir-CDX3lj18.js +1 -0
  161. package/public/assets/elixir-CkH2-t6x.js +1 -0
  162. package/public/assets/elm-BX_9EnK8.js +1 -0
  163. package/public/assets/elm-DbKCFpqz.js +1 -0
  164. package/public/assets/emacs-lisp-C9XAeP06.js +1 -0
  165. package/public/assets/emacs-lisp-CXvaQtF9.js +1 -0
  166. package/public/assets/erDiagram-SMLLAGMA-C9JF8cU5.js +85 -0
  167. package/public/assets/erb-B12qg9BL.js +1 -0
  168. package/public/assets/erb-BYCe7drp.js +1 -0
  169. package/public/assets/erlang-Dh270pQQ.js +1 -0
  170. package/public/assets/erlang-DsQrWhSR.js +1 -0
  171. package/public/assets/everforest-dark-BgDCqdQA.js +1 -0
  172. package/public/assets/everforest-dark-BxQkAq-6.js +1 -0
  173. package/public/assets/everforest-light-C8M2exoo.js +1 -0
  174. package/public/assets/everforest-light-CcLVmqFl.js +1 -0
  175. package/public/assets/fennel-BYunw83y.js +1 -0
  176. package/public/assets/fennel-CKW7gc4E.js +1 -0
  177. package/public/assets/fish-BiaFC76h.js +1 -0
  178. package/public/assets/fish-BvzEVeQv.js +1 -0
  179. package/public/assets/flowDiagram-DWJPFMVM-W_7hQEvE.js +162 -0
  180. package/public/assets/fluent-C1VbA1FI.js +1 -0
  181. package/public/assets/fluent-C4IJs8-o.js +1 -0
  182. package/public/assets/fortran-fixed-form-B5hFr6Yn.js +1 -0
  183. package/public/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
  184. package/public/assets/fortran-free-form-BuX3zftO.js +1 -0
  185. package/public/assets/fortran-free-form-BxgE0vQu.js +1 -0
  186. package/public/assets/fsharp-B6CigNpP.js +1 -0
  187. package/public/assets/fsharp-CXgrBDvD.js +1 -0
  188. package/public/assets/ganttDiagram-T4ZO3ILL-DPkQluIe.js +292 -0
  189. package/public/assets/gdresource-BOOCDP_w.js +1 -0
  190. package/public/assets/gdresource-ChoLB09i.js +1 -0
  191. package/public/assets/gdscript-BajwJ0jS.js +1 -0
  192. package/public/assets/gdscript-C5YyOfLZ.js +1 -0
  193. package/public/assets/gdshader-DkwncUOv.js +1 -0
  194. package/public/assets/gdshader-MbeiIFWW.js +1 -0
  195. package/public/assets/genie-CTXGoN_z.js +1 -0
  196. package/public/assets/genie-D0YGMca9.js +1 -0
  197. package/public/assets/gherkin-DQeIZrj7.js +1 -0
  198. package/public/assets/gherkin-DyxjwDmM.js +1 -0
  199. package/public/assets/git-commit-BicZTByO.js +1 -0
  200. package/public/assets/git-commit-F4YmCXRG.js +1 -0
  201. package/public/assets/git-rebase-Bzlpfr7M.js +1 -0
  202. package/public/assets/git-rebase-r7XF79zn.js +1 -0
  203. package/public/assets/gitGraphDiagram-UUTBAWPF-D9zpe2q8.js +106 -0
  204. package/public/assets/github-dark-DHJKELXO.js +1 -0
  205. package/public/assets/github-dark-default-BuB7GGZr.js +1 -0
  206. package/public/assets/github-dark-default-Cuk6v7N8.js +1 -0
  207. package/public/assets/github-dark-dimmed-CQQ2kH1a.js +1 -0
  208. package/public/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
  209. package/public/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
  210. package/public/assets/github-dark-high-contrast-fZoHxlg3.js +1 -0
  211. package/public/assets/github-dark-vbPMK5nw.js +1 -0
  212. package/public/assets/github-light-CBO01_j6.js +1 -0
  213. package/public/assets/github-light-DAi9KRSo.js +1 -0
  214. package/public/assets/github-light-default-D7oLnXFd.js +1 -0
  215. package/public/assets/github-light-default-DNniaknl.js +1 -0
  216. package/public/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
  217. package/public/assets/github-light-high-contrast-Kh_Z1r_U.js +1 -0
  218. package/public/assets/gleam-B-IqXlZK.js +1 -0
  219. package/public/assets/gleam-BspZqrRM.js +1 -0
  220. package/public/assets/glimmer-js-ByusRIyA.js +1 -0
  221. package/public/assets/glimmer-js-Rg0-pVw9.js +1 -0
  222. package/public/assets/glimmer-ts-BfAWNZQY.js +1 -0
  223. package/public/assets/glimmer-ts-U6CK756n.js +1 -0
  224. package/public/assets/glsl-Bk7TyU8J.js +1 -0
  225. package/public/assets/glsl-DplSGwfg.js +1 -0
  226. package/public/assets/gn-deNdZ1en.js +1 -0
  227. package/public/assets/gn-n2N0HUVH.js +1 -0
  228. package/public/assets/gnuplot-BBjkHhdK.js +1 -0
  229. package/public/assets/gnuplot-DdkO51Og.js +1 -0
  230. package/public/assets/go-C27-OAKa.js +1 -0
  231. package/public/assets/go-CxLEBnE3.js +1 -0
  232. package/public/assets/graph-DUmXvpf5.js +1 -0
  233. package/public/assets/graphql-By4-2MiP.js +1 -0
  234. package/public/assets/graphql-ChdNCCLP.js +1 -0
  235. package/public/assets/groovy-DjMbfbx0.js +1 -0
  236. package/public/assets/groovy-gcz8RCvz.js +1 -0
  237. package/public/assets/gruvbox-dark-hard-B-lrt2RD.js +1 -0
  238. package/public/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
  239. package/public/assets/gruvbox-dark-medium-DqRMfHwY.js +1 -0
  240. package/public/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
  241. package/public/assets/gruvbox-dark-soft-0cd3aJ5k.js +1 -0
  242. package/public/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
  243. package/public/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
  244. package/public/assets/gruvbox-light-hard-CdMyBl7-.js +1 -0
  245. package/public/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
  246. package/public/assets/gruvbox-light-medium-k_NbMmjL.js +1 -0
  247. package/public/assets/gruvbox-light-soft-B_wmbOPu.js +1 -0
  248. package/public/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
  249. package/public/assets/hack-CaT9iCJl.js +1 -0
  250. package/public/assets/hack-i7_Ulhet.js +1 -0
  251. package/public/assets/haml-B8DHNrY2.js +1 -0
  252. package/public/assets/haml-D5jkg6IW.js +1 -0
  253. package/public/assets/handlebars-BL8al0AC.js +1 -0
  254. package/public/assets/handlebars-BpdQsYii.js +1 -0
  255. package/public/assets/haskell-Df6bDoY_.js +1 -0
  256. package/public/assets/haskell-DtebQ3Kv.js +1 -0
  257. package/public/assets/haxe-CzTSHFRz.js +1 -0
  258. package/public/assets/haxe-n0Q_eay_.js +1 -0
  259. package/public/assets/hcl-BWvSN4gD.js +1 -0
  260. package/public/assets/hcl-shhv74hy.js +1 -0
  261. package/public/assets/highlighted-body-OFNGDK62-BST6Q9yR.js +1 -0
  262. package/public/assets/hjson-BEMFYqr7.js +1 -0
  263. package/public/assets/hjson-D5-asLiD.js +1 -0
  264. package/public/assets/hlsl-D3lLCCz7.js +1 -0
  265. package/public/assets/hlsl-Pefxhtaj.js +1 -0
  266. package/public/assets/horizon-BUw7H-hv.js +1 -0
  267. package/public/assets/horizon-Dr-pOaOB.js +1 -0
  268. package/public/assets/horizon-bright-CUuTKBJd.js +1 -0
  269. package/public/assets/horizon-bright-Cn-bp-IR.js +1 -0
  270. package/public/assets/houston-D7pTNItX.js +1 -0
  271. package/public/assets/houston-DnULxvSX.js +1 -0
  272. package/public/assets/html-GMplVEZG.js +1 -0
  273. package/public/assets/html-derivative-BFtXZ54Q.js +1 -0
  274. package/public/assets/html-derivative-DlHx6ybY.js +1 -0
  275. package/public/assets/html-pp8916En.js +1 -0
  276. package/public/assets/http-D0p2QOuJ.js +1 -0
  277. package/public/assets/http-jrhK8wxY.js +1 -0
  278. package/public/assets/hurl-CeF7EoTQ.js +1 -0
  279. package/public/assets/hurl-irOxFIW8.js +1 -0
  280. package/public/assets/hxml-B_SuSTPP.js +1 -0
  281. package/public/assets/hxml-Bvhsp5Yf.js +1 -0
  282. package/public/assets/hy-CTpXmg0M.js +1 -0
  283. package/public/assets/hy-DFXneXwc.js +1 -0
  284. package/public/assets/imba-DGztddWO.js +1 -0
  285. package/public/assets/imba-z_cUhu9e.js +1 -0
  286. package/public/assets/index-BXfnL1ab.js +9 -0
  287. package/public/assets/index-COPUsXMu.css +1 -0
  288. package/public/assets/index-Vcq4gwWv.js +1 -0
  289. package/public/assets/index-aPYQAwiI.js +1343 -0
  290. package/public/assets/infoDiagram-42DDH7IO-BXLixX0j.js +2 -0
  291. package/public/assets/ini-BEwlwnbL.js +1 -0
  292. package/public/assets/ini-DOGW4-0C.js +1 -0
  293. package/public/assets/init-Gi6I4Gst.js +1 -0
  294. package/public/assets/ishikawaDiagram-UXIWVN3A-Ckic91J4.js +70 -0
  295. package/public/assets/java-B2AjWfgk.js +1 -0
  296. package/public/assets/java-CylS5w8V.js +1 -0
  297. package/public/assets/javascript-XPxc2APE.js +1 -0
  298. package/public/assets/javascript-wDzz0qaB.js +1 -0
  299. package/public/assets/jinja-4LBKfQ-Z.js +1 -0
  300. package/public/assets/jinja-f2NsQr07.js +1 -0
  301. package/public/assets/jison-DRGa8fbr.js +1 -0
  302. package/public/assets/jison-wvAkD_A8.js +1 -0
  303. package/public/assets/journeyDiagram-VCZTEJTY-CoLwYeU7.js +139 -0
  304. package/public/assets/json-CjLXzM_z.js +1 -0
  305. package/public/assets/json-Cp-IABpG.js +1 -0
  306. package/public/assets/json5-C9tS-k6U.js +1 -0
  307. package/public/assets/json5-DE06a0U2.js +1 -0
  308. package/public/assets/jsonc-BYi4HS05.js +1 -0
  309. package/public/assets/jsonc-Des-eS-w.js +1 -0
  310. package/public/assets/jsonl-CuhIcKDk.js +1 -0
  311. package/public/assets/jsonl-DcaNXYhu.js +1 -0
  312. package/public/assets/jsonnet-DFQXde-d.js +1 -0
  313. package/public/assets/jsonnet-DtQdHwK-.js +1 -0
  314. package/public/assets/jssm-BlhucWo7.js +1 -0
  315. package/public/assets/jssm-C2t-YnRu.js +1 -0
  316. package/public/assets/jsx-BGEKFWBk.js +1 -0
  317. package/public/assets/jsx-g9-lgVsj.js +1 -0
  318. package/public/assets/julia-BxjEHQ54.js +1 -0
  319. package/public/assets/julia-CxzCAyBv.js +1 -0
  320. package/public/assets/just-Cw27pwNe.js +1 -0
  321. package/public/assets/just-VxiPbLrw.js +1 -0
  322. package/public/assets/kanagawa-dragon-9xlKYyML.js +1 -0
  323. package/public/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
  324. package/public/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
  325. package/public/assets/kanagawa-lotus-D7R2-rgR.js +1 -0
  326. package/public/assets/kanagawa-wave-DWedfzmr.js +1 -0
  327. package/public/assets/kanagawa-wave-DXzwPY55.js +1 -0
  328. package/public/assets/kanban-definition-6JOO6SKY-Cng1Wsl7.js +89 -0
  329. package/public/assets/kdl-DJsF4U57.js +1 -0
  330. package/public/assets/kdl-DV7GczEv.js +1 -0
  331. package/public/assets/kotlin-BdnUsdx6.js +1 -0
  332. package/public/assets/kotlin-DwKqsDKK.js +1 -0
  333. package/public/assets/kusto-DZf3V79B.js +1 -0
  334. package/public/assets/kusto-wEQ09or8.js +1 -0
  335. package/public/assets/laserwave-Crdg5MSq.js +1 -0
  336. package/public/assets/laserwave-DUszq2jm.js +1 -0
  337. package/public/assets/latex-C-qBiGC3.js +1 -0
  338. package/public/assets/latex-CWtU0Tv5.js +1 -0
  339. package/public/assets/layout-CcKWGr67.js +1 -0
  340. package/public/assets/lean-BZvkOJ9d.js +1 -0
  341. package/public/assets/lean-QIsVZaRF.js +1 -0
  342. package/public/assets/less-B1dDrJ26.js +1 -0
  343. package/public/assets/less-C76OjOdF.js +1 -0
  344. package/public/assets/light-plus-B7mTdjB0.js +1 -0
  345. package/public/assets/light-plus-Keeg-hmX.js +1 -0
  346. package/public/assets/linear-a5JrtNla.js +1 -0
  347. package/public/assets/liquid-C0sCDyMI.js +1 -0
  348. package/public/assets/liquid-DYVedYrR.js +1 -0
  349. package/public/assets/llvm-ByOMZdUC.js +1 -0
  350. package/public/assets/llvm-DjAJT7YJ.js +1 -0
  351. package/public/assets/log-2UxHyX5q.js +1 -0
  352. package/public/assets/log-CbW7hOWU.js +1 -0
  353. package/public/assets/logo-BbooMuDm.js +1 -0
  354. package/public/assets/logo-BtOb2qkB.js +1 -0
  355. package/public/assets/lua-BaeVxFsk.js +1 -0
  356. package/public/assets/lua-JmSlR1pZ.js +1 -0
  357. package/public/assets/luau-C-HG3fhB.js +1 -0
  358. package/public/assets/luau-lY4yXJyn.js +1 -0
  359. package/public/assets/make-CHLpvVh8.js +1 -0
  360. package/public/assets/make-s9FKP0VE.js +1 -0
  361. package/public/assets/markdown-CKXSK5AY.js +1 -0
  362. package/public/assets/markdown-Cvjx9yec.js +1 -0
  363. package/public/assets/marko-CnJfTvn9.js +1 -0
  364. package/public/assets/marko-DjSrsDqO.js +1 -0
  365. package/public/assets/material-theme-BjSij5jK.js +1 -0
  366. package/public/assets/material-theme-D5KoaKCx.js +1 -0
  367. package/public/assets/material-theme-darker-BfHTSMKl.js +1 -0
  368. package/public/assets/material-theme-darker-Ci314V8G.js +1 -0
  369. package/public/assets/material-theme-lighter-B0m2ddpp.js +1 -0
  370. package/public/assets/material-theme-lighter-BsHhGFQr.js +1 -0
  371. package/public/assets/material-theme-ocean-CyktbL80.js +1 -0
  372. package/public/assets/material-theme-ocean-DcalBkIS.js +1 -0
  373. package/public/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
  374. package/public/assets/material-theme-palenight-GGCMgrXw.js +1 -0
  375. package/public/assets/matlab-BQKM-LA_.js +1 -0
  376. package/public/assets/matlab-D7o27uSR.js +1 -0
  377. package/public/assets/mdc-BMNejdWA.js +1 -0
  378. package/public/assets/mdc-DTYItulj.js +1 -0
  379. package/public/assets/mdx-BWRhHdFl.js +1 -0
  380. package/public/assets/mdx-Cmh6b_Ma.js +1 -0
  381. package/public/assets/mermaid-COhksqSL.js +1 -0
  382. package/public/assets/mermaid-mWjccvbQ.js +1 -0
  383. package/public/assets/min-BULvLLty.js +1 -0
  384. package/public/assets/min-dark-CDSXMz5a.js +1 -0
  385. package/public/assets/min-dark-CafNBF8u.js +1 -0
  386. package/public/assets/min-light-CM5JNFAA.js +1 -0
  387. package/public/assets/min-light-CTRr51gU.js +1 -0
  388. package/public/assets/mindmap-definition-QFDTVHPH-wq6dP3Ik.js +96 -0
  389. package/public/assets/mipsasm-BElnB_7Q.js +1 -0
  390. package/public/assets/mipsasm-CKIfxQSi.js +1 -0
  391. package/public/assets/mojo-CsmCHy7A.js +1 -0
  392. package/public/assets/mojo-rZm6bMo-.js +1 -0
  393. package/public/assets/monokai-D4h5O-jR.js +1 -0
  394. package/public/assets/monokai-O2TR9gDo.js +1 -0
  395. package/public/assets/moonbit-B8hphrHK.js +1 -0
  396. package/public/assets/moonbit-_H4v1dQx.js +1 -0
  397. package/public/assets/move-Ccg_HAOv.js +1 -0
  398. package/public/assets/move-IF9eRakj.js +1 -0
  399. package/public/assets/narrat-Cy2k80UN.js +1 -0
  400. package/public/assets/narrat-DRg8JJMk.js +1 -0
  401. package/public/assets/nextflow-C-mBbutL.js +1 -0
  402. package/public/assets/nextflow-Zz6hmt5N.js +1 -0
  403. package/public/assets/nextflow-groovy-BeH2EWoN.js +1 -0
  404. package/public/assets/nextflow-groovy-vE_lwT2v.js +1 -0
  405. package/public/assets/nginx-BpAMiNFr.js +1 -0
  406. package/public/assets/nginx-bBKbG2uI.js +1 -0
  407. package/public/assets/night-owl-C39BiMTA.js +1 -0
  408. package/public/assets/night-owl-NZdGqbHT.js +1 -0
  409. package/public/assets/night-owl-light-CMTm3GFP.js +1 -0
  410. package/public/assets/night-owl-light-Dx-BWqtN.js +1 -0
  411. package/public/assets/nim-BIad80T-.js +1 -0
  412. package/public/assets/nim-CVrawwO9.js +1 -0
  413. package/public/assets/nix-CwoSXNpI.js +1 -0
  414. package/public/assets/nix-DFZZLjuC.js +1 -0
  415. package/public/assets/nord-BNMOv-tL.js +1 -0
  416. package/public/assets/nord-Ddv68eIx.js +1 -0
  417. package/public/assets/nushell-BaAZo4zx.js +1 -0
  418. package/public/assets/nushell-Cz2AlsmD.js +1 -0
  419. package/public/assets/objective-c-DXmwc3jG.js +1 -0
  420. package/public/assets/objective-c-sgtl-PdD.js +1 -0
  421. package/public/assets/objective-cpp-BTQ37cYs.js +1 -0
  422. package/public/assets/objective-cpp-CLxacb5B.js +1 -0
  423. package/public/assets/ocaml-BvBP9Lm0.js +1 -0
  424. package/public/assets/ocaml-C0hk2d4L.js +1 -0
  425. package/public/assets/odin-BBf5iR-q.js +1 -0
  426. package/public/assets/odin-BTnrxC4P.js +1 -0
  427. package/public/assets/one-dark-pro-DVMEJ2y_.js +1 -0
  428. package/public/assets/one-dark-pro-DnMjqbdW.js +1 -0
  429. package/public/assets/one-light-C3Wv6jpd.js +1 -0
  430. package/public/assets/one-light-dsKzgxTn.js +1 -0
  431. package/public/assets/openscad-C4EeE6gA.js +1 -0
  432. package/public/assets/openscad-Dmi2c_42.js +1 -0
  433. package/public/assets/ordinal-Cboi1Yqb.js +1 -0
  434. package/public/assets/pascal-D93ZcfNL.js +1 -0
  435. package/public/assets/pascal-DYjw0AuS.js +1 -0
  436. package/public/assets/perl-C0TMdlhV.js +1 -0
  437. package/public/assets/perl-NvoQZIq0.js +1 -0
  438. package/public/assets/php-Dhbhpdrm.js +1 -0
  439. package/public/assets/php-R6g_5hLQ.js +1 -0
  440. package/public/assets/pieDiagram-DEJITSTG-BHdPBhai.js +30 -0
  441. package/public/assets/pkl-Cij4Vm9z.js +1 -0
  442. package/public/assets/pkl-u5AG7uiY.js +1 -0
  443. package/public/assets/plastic-3e1v2bzS.js +1 -0
  444. package/public/assets/plastic-Ckcm5hoS.js +1 -0
  445. package/public/assets/plsql-Bd6NdBJI.js +1 -0
  446. package/public/assets/plsql-ChMvpjG-.js +1 -0
  447. package/public/assets/po-BTJTHyun.js +1 -0
  448. package/public/assets/po-CUhVi7la.js +1 -0
  449. package/public/assets/poimandres-BbcZclLp.js +1 -0
  450. package/public/assets/poimandres-CS3Unz2-.js +1 -0
  451. package/public/assets/polar-B-qJ3AIy.js +1 -0
  452. package/public/assets/polar-C0HS_06l.js +1 -0
  453. package/public/assets/postcss-BSGhOJ4k.js +1 -0
  454. package/public/assets/postcss-CXtECtnM.js +1 -0
  455. package/public/assets/powerquery-CC1XieQO.js +1 -0
  456. package/public/assets/powerquery-CEu0bR-o.js +1 -0
  457. package/public/assets/powershell-DdRAnR4Z.js +1 -0
  458. package/public/assets/powershell-Dpen1YoG.js +1 -0
  459. package/public/assets/prisma-C0hJlfqX.js +1 -0
  460. package/public/assets/prisma-Dd19v3D-.js +1 -0
  461. package/public/assets/prolog-CbFg5uaA.js +1 -0
  462. package/public/assets/prolog-bSi0SE3D.js +1 -0
  463. package/public/assets/proto-BZ_yZy5q.js +1 -0
  464. package/public/assets/proto-C7zT0LnQ.js +1 -0
  465. package/public/assets/pug-CGlum2m_.js +1 -0
  466. package/public/assets/pug-DKIMFp6K.js +1 -0
  467. package/public/assets/puppet-BMWR74SV.js +1 -0
  468. package/public/assets/puppet-ja2MI9-b.js +1 -0
  469. package/public/assets/purescript-CklMAg4u.js +1 -0
  470. package/public/assets/purescript-CxgsQa43.js +1 -0
  471. package/public/assets/python-B6aJPvgy.js +1 -0
  472. package/public/assets/python-DgE28U1V.js +1 -0
  473. package/public/assets/qml-3beO22l8.js +1 -0
  474. package/public/assets/qml-BEkX6VoX.js +1 -0
  475. package/public/assets/qmldir-C8lEn-DE.js +1 -0
  476. package/public/assets/qmldir-DNYHzgow.js +1 -0
  477. package/public/assets/qss-BZsEMKxJ.js +1 -0
  478. package/public/assets/qss-IeuSbFQv.js +1 -0
  479. package/public/assets/quadrantDiagram-34T5L4WZ-DTP7Koy0.js +7 -0
  480. package/public/assets/r-BcofxrH1.js +1 -0
  481. package/public/assets/r-Dspwwk_N.js +1 -0
  482. package/public/assets/racket-BqYA7rlc.js +1 -0
  483. package/public/assets/racket-CzHBKLyy.js +1 -0
  484. package/public/assets/raku-CPccoUN1.js +1 -0
  485. package/public/assets/raku-DXvB9xmW.js +1 -0
  486. package/public/assets/razor-BDqjjVU7.js +1 -0
  487. package/public/assets/razor-Uh8Bk_45.js +1 -0
  488. package/public/assets/red-BQzOET_I.js +1 -0
  489. package/public/assets/red-bN70gL4F.js +1 -0
  490. package/public/assets/reg-C-SQnVFl.js +1 -0
  491. package/public/assets/reg-DkqHJyC0.js +1 -0
  492. package/public/assets/regexp-BW_zLBm-.js +1 -0
  493. package/public/assets/regexp-CDVJQ6XC.js +1 -0
  494. package/public/assets/rel-BIqKdwke.js +1 -0
  495. package/public/assets/rel-C3B-1QV4.js +1 -0
  496. package/public/assets/requirementDiagram-MS252O5E-DnE1YmWx.js +84 -0
  497. package/public/assets/riscv-BM1_JUlF.js +1 -0
  498. package/public/assets/riscv-s6spwTFp.js +1 -0
  499. package/public/assets/ron-CloI94uS.js +1 -0
  500. package/public/assets/ron-D8l8udqQ.js +1 -0
  501. package/public/assets/rose-pine-B3EY3h2-.js +1 -0
  502. package/public/assets/rose-pine-dawn-6WQi5eS6.js +1 -0
  503. package/public/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
  504. package/public/assets/rose-pine-moon-BTPbmVvF.js +1 -0
  505. package/public/assets/rose-pine-moon-D4_iv3hh.js +1 -0
  506. package/public/assets/rose-pine-qdsjHGoJ.js +1 -0
  507. package/public/assets/rosmsg-BJDFO7_C.js +1 -0
  508. package/public/assets/rosmsg-TcL_zzr8.js +1 -0
  509. package/public/assets/rst-BrH8l1NY.js +1 -0
  510. package/public/assets/rst-CRjBmOyv.js +1 -0
  511. package/public/assets/ruby-Dw2BHqvy.js +1 -0
  512. package/public/assets/ruby-Wjq7vjNf.js +1 -0
  513. package/public/assets/rust-B1yitclQ.js +1 -0
  514. package/public/assets/rust-DJErdhjk.js +1 -0
  515. package/public/assets/sankeyDiagram-XADWPNL6-DTu_METj.js +10 -0
  516. package/public/assets/sas-BZeeyq_z.js +1 -0
  517. package/public/assets/sas-cz2c8ADy.js +1 -0
  518. package/public/assets/sass-CIfQ9yqV.js +1 -0
  519. package/public/assets/sass-Cj5Yp3dK.js +1 -0
  520. package/public/assets/scala-C151Ov-r.js +1 -0
  521. package/public/assets/scala-CWwlNtab.js +1 -0
  522. package/public/assets/scheme-ByM66cy_.js +1 -0
  523. package/public/assets/scheme-C98Dy4si.js +1 -0
  524. package/public/assets/scss-D5BDwBP9.js +1 -0
  525. package/public/assets/scss-OYdSNvt2.js +1 -0
  526. package/public/assets/sdbl-C5Q1usnU.js +1 -0
  527. package/public/assets/sdbl-DVxCFoDh.js +1 -0
  528. package/public/assets/sequenceDiagram-FGHM5R23-DaOA9kqw.js +157 -0
  529. package/public/assets/shaderlab-DNkMdb2B.js +1 -0
  530. package/public/assets/shaderlab-Dg9Lc6iA.js +1 -0
  531. package/public/assets/shellscript-CE-5zpiL.js +1 -0
  532. package/public/assets/shellscript-Yzrsuije.js +1 -0
  533. package/public/assets/shellsession-BADoaaVG.js +1 -0
  534. package/public/assets/shellsession-BhddCRKA.js +1 -0
  535. package/public/assets/slack-dark-BthQWCQV.js +1 -0
  536. package/public/assets/slack-dark-DBfAPHjY.js +1 -0
  537. package/public/assets/slack-ochin-DqwNpetd.js +1 -0
  538. package/public/assets/slack-ochin-szRk-9hG.js +1 -0
  539. package/public/assets/smalltalk-BERRCDM3.js +1 -0
  540. package/public/assets/smalltalk-GKfhTxrk.js +1 -0
  541. package/public/assets/snazzy-light-Bw305WKR.js +1 -0
  542. package/public/assets/snazzy-light-CBYPMa6b.js +1 -0
  543. package/public/assets/solarized-dark-DXbdFlpD.js +1 -0
  544. package/public/assets/solarized-dark-Tf4Pofl7.js +1 -0
  545. package/public/assets/solarized-light-L9t79GZl.js +1 -0
  546. package/public/assets/solarized-light-n46tpZ2s.js +1 -0
  547. package/public/assets/solidity-DanOLEvk.js +1 -0
  548. package/public/assets/solidity-rGO070M0.js +1 -0
  549. package/public/assets/soy-8wufbnw4.js +1 -0
  550. package/public/assets/soy-Brmx7dQM.js +1 -0
  551. package/public/assets/sparql-CHK3vDkL.js +1 -0
  552. package/public/assets/sparql-rVzFXLq3.js +1 -0
  553. package/public/assets/splunk-BtCnVYZw.js +1 -0
  554. package/public/assets/splunk-YU1HCmJX.js +1 -0
  555. package/public/assets/sql-BLtJtn59.js +1 -0
  556. package/public/assets/sql-CKXjX23X.js +1 -0
  557. package/public/assets/ssh-config-Cpnw3KEt.js +1 -0
  558. package/public/assets/ssh-config-_ykCGR6B.js +1 -0
  559. package/public/assets/stata-BH5u7GGu.js +1 -0
  560. package/public/assets/stata-BJqnY-gO.js +1 -0
  561. package/public/assets/stateDiagram-FHFEXIEX-BBAo_5ES.js +1 -0
  562. package/public/assets/stateDiagram-v2-QKLJ7IA2-CnXRtVuf.js +1 -0
  563. package/public/assets/stylus-BEDo0Tqx.js +1 -0
  564. package/public/assets/stylus-CHekGIgu.js +1 -0
  565. package/public/assets/surrealql-Bq5Q-fJD.js +1 -0
  566. package/public/assets/surrealql-CYeReaNr.js +1 -0
  567. package/public/assets/svelte-C_ipcX3V.js +1 -0
  568. package/public/assets/svelte-Cy7k_4gC.js +1 -0
  569. package/public/assets/swift-D82vCrfD.js +1 -0
  570. package/public/assets/swift-DjrYMa62.js +1 -0
  571. package/public/assets/synthwave-84-CNQ9Fj-_.js +1 -0
  572. package/public/assets/synthwave-84-CbfX1IO0.js +1 -0
  573. package/public/assets/system-verilog-CnnmHF94.js +1 -0
  574. package/public/assets/system-verilog-rKNYENrf.js +1 -0
  575. package/public/assets/systemd-4A_iFExJ.js +1 -0
  576. package/public/assets/systemd-C1FfcI00.js +1 -0
  577. package/public/assets/talonscript-CkByrt1z.js +1 -0
  578. package/public/assets/talonscript-bksoRmW6.js +1 -0
  579. package/public/assets/tasl-Bl4tsGRM.js +1 -0
  580. package/public/assets/tasl-QIJgUcNo.js +1 -0
  581. package/public/assets/tcl-B2_VAYrd.js +1 -0
  582. package/public/assets/tcl-dwOrl1Do.js +1 -0
  583. package/public/assets/templ-DhtptRzy.js +1 -0
  584. package/public/assets/templ-P3uqSqPl.js +1 -0
  585. package/public/assets/terraform-BETggiCN.js +1 -0
  586. package/public/assets/terraform-Ba94thAr.js +1 -0
  587. package/public/assets/tex-BLPnQt1V.js +1 -0
  588. package/public/assets/tex-idrVyKtj.js +1 -0
  589. package/public/assets/timeline-definition-GMOUNBTQ-BsVidy2_.js +120 -0
  590. package/public/assets/tokyo-night-J9jDJp4U.js +1 -0
  591. package/public/assets/tokyo-night-hegEt444.js +1 -0
  592. package/public/assets/toml-Btlk-g9G.js +1 -0
  593. package/public/assets/toml-vGWfd6FD.js +1 -0
  594. package/public/assets/ts-tags-DQrlYJgV.js +1 -0
  595. package/public/assets/ts-tags-zn1MmPIZ.js +1 -0
  596. package/public/assets/tsv-B_m7g4N7.js +1 -0
  597. package/public/assets/tsv-DYfmKMIW.js +1 -0
  598. package/public/assets/tsx-COt5Ahok.js +1 -0
  599. package/public/assets/tsx-Dio8iE-N.js +1 -0
  600. package/public/assets/turtle-BsS91CYL.js +1 -0
  601. package/public/assets/turtle-whXsfw69.js +1 -0
  602. package/public/assets/twig-DNn4PbVi.js +1 -0
  603. package/public/assets/twig-xg9kU7Mw.js +1 -0
  604. package/public/assets/typescript-BPQ3VLAy.js +1 -0
  605. package/public/assets/typescript-DttGkNCf.js +1 -0
  606. package/public/assets/typespec-BGHnOYBU.js +1 -0
  607. package/public/assets/typespec-CAFt9gP4.js +1 -0
  608. package/public/assets/typst-D2RORpaG.js +1 -0
  609. package/public/assets/typst-DHCkPAjA.js +1 -0
  610. package/public/assets/v-BcVCzyr7.js +1 -0
  611. package/public/assets/v-CvM42WIw.js +1 -0
  612. package/public/assets/vala-B_5xOBNr.js +1 -0
  613. package/public/assets/vala-CsfeWuGM.js +1 -0
  614. package/public/assets/vb-BVDm3zBt.js +1 -0
  615. package/public/assets/vb-D17OF-Vu.js +1 -0
  616. package/public/assets/vennDiagram-DHZGUBPP-CFku-V_7.js +34 -0
  617. package/public/assets/verilog-BQ8w6xss.js +1 -0
  618. package/public/assets/verilog-D5iownw6.js +1 -0
  619. package/public/assets/vesper-C5GDOJD3.js +1 -0
  620. package/public/assets/vesper-DU1UobuO.js +1 -0
  621. package/public/assets/vhdl-Bmgbkl_-.js +1 -0
  622. package/public/assets/vhdl-CeAyd5Ju.js +1 -0
  623. package/public/assets/viml-3ZODU9FQ.js +1 -0
  624. package/public/assets/viml-CJc9bBzg.js +1 -0
  625. package/public/assets/vitesse-black-BeJXV_f5.js +1 -0
  626. package/public/assets/vitesse-black-Bkuqu6BP.js +1 -0
  627. package/public/assets/vitesse-dark-D0r3Knsf.js +1 -0
  628. package/public/assets/vitesse-dark-mzFqOv-V.js +1 -0
  629. package/public/assets/vitesse-light-BoFwUIac.js +1 -0
  630. package/public/assets/vitesse-light-CVO1_9PV.js +1 -0
  631. package/public/assets/vue-D2xRrEX4.js +1 -0
  632. package/public/assets/vue-DN_0RTcg.js +1 -0
  633. package/public/assets/vue-html-AaS7Mt5G.js +1 -0
  634. package/public/assets/vue-html-BM4TQ0nH.js +1 -0
  635. package/public/assets/vue-vine-BoDAl6tE.js +1 -0
  636. package/public/assets/vue-vine-CQOfvN7w.js +1 -0
  637. package/public/assets/vyper-B6NKdirK.js +1 -0
  638. package/public/assets/vyper-CDx5xZoG.js +1 -0
  639. package/public/assets/wardley-RL74JXVD-2Hng9RWd.js +162 -0
  640. package/public/assets/wardleyDiagram-NUSXRM2D-Cb_ICeFe.js +20 -0
  641. package/public/assets/wasm-CG6Dc4jp.js +1 -0
  642. package/public/assets/wasm-Ck_ssClF.js +1 -0
  643. package/public/assets/wasm-LUzQYg3H.js +1 -0
  644. package/public/assets/wasm-MzD3tlZU.js +1 -0
  645. package/public/assets/wenyan-8fXatRyt.js +1 -0
  646. package/public/assets/wenyan-BV7otONQ.js +1 -0
  647. package/public/assets/wgsl-CECC3vJ5.js +1 -0
  648. package/public/assets/wgsl-Dx-B1_4e.js +1 -0
  649. package/public/assets/wikitext-BaRWL9sq.js +1 -0
  650. package/public/assets/wikitext-BhOHFoWU.js +1 -0
  651. package/public/assets/wit-5i3qLPDT.js +1 -0
  652. package/public/assets/wit-MEd50GYB.js +1 -0
  653. package/public/assets/wolfram-CmMaIVaG.js +1 -0
  654. package/public/assets/wolfram-lXgVvXCa.js +1 -0
  655. package/public/assets/xml-DtyAt_xK.js +1 -0
  656. package/public/assets/xml-sdJ4AIDG.js +1 -0
  657. package/public/assets/xsl-Btrj9DhN.js +1 -0
  658. package/public/assets/xsl-CtQFsRM5.js +1 -0
  659. package/public/assets/xychartDiagram-5P7HB3ND-h-zOi7ca.js +7 -0
  660. package/public/assets/yaml-B92AUxDB.js +1 -0
  661. package/public/assets/yaml-Buea-lGh.js +1 -0
  662. package/public/assets/zenscript-DVFEvuxE.js +1 -0
  663. package/public/assets/zenscript-Dja4fBOE.js +1 -0
  664. package/public/assets/zig-LhWa2ADv.js +1 -0
  665. package/public/assets/zig-VOosw3JB.js +1 -0
  666. package/public/index.html +19 -0
@@ -0,0 +1,278 @@
1
+ import{bM as Be,aK as zm,r as ne,bN as Pn,j as I,bS as $m,bT as Hm,aP as of,bl as Qi,bU as Um,bV as qm,bR as Wm,bW as Vm,bX as Km}from"./index-aPYQAwiI.js";import{r as Gm,s as af}from"./index-BXfnL1ab.js";import{k as jm,b as Zm}from"./index-Vcq4gwWv.js";/**
2
+ * @license lucide-react v1.8.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const Ym=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],Jm=Be("bold",Ym);/**
7
+ * @license lucide-react v1.8.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const Xm=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Qm=Be("code",Xm);/**
12
+ * @license lucide-react v1.8.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const eg=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]],tg=Be("heading-1",eg);/**
17
+ * @license lucide-react v1.8.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const ng=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]],rg=Be("heading-2",ng);/**
22
+ * @license lucide-react v1.8.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const ig=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]],sg=Be("heading-3",ig);/**
27
+ * @license lucide-react v1.8.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const og=[["path",{d:"m9 11-6 6v3h9l3-3",key:"1a3l36"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4",key:"14a9rk"}]],ag=Be("highlighter",og);/**
32
+ * @license lucide-react v1.8.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const lg=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],ug=Be("italic",lg);/**
37
+ * @license lucide-react v1.8.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const cg=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],dg=Be("link",cg);/**
42
+ * @license lucide-react v1.8.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const fg=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],hg=Be("list-checks",fg);/**
47
+ * @license lucide-react v1.8.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const pg=[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]],mg=Be("list-ordered",pg);/**
52
+ * @license lucide-react v1.8.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const gg=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],bg=Be("list",gg);/**
57
+ * @license lucide-react v1.8.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const yg=[["path",{d:"M5 12h14",key:"1ays0h"}]],Eg=Be("minus",yg);/**
62
+ * @license lucide-react v1.8.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const kg=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],xg=Be("quote",kg);/**
67
+ * @license lucide-react v1.8.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const _g=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],wg=Be("strikethrough",_g);/**
72
+ * @license lucide-react v1.8.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const Cg=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]],Sg=Be("text-align-center",Cg);/**
77
+ * @license lucide-react v1.8.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const vg=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]],Ag=Be("text-align-end",vg);/**
82
+ * @license lucide-react v1.8.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const Tg=[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]],Mg=Be("text-align-start",Tg);/**
87
+ * @license lucide-react v1.8.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const Ng=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],Og=Be("underline",Ng);function He(t){this.content=t}He.prototype={constructor:He,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),s=r.content.slice();return i==-1?s.push(n||t,e):(s[i+1]=e,n&&(s[i]=n)),new He(s)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new He(n)},addToStart:function(t,e){return new He([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new He(n)},addBefore:function(t,e,n){var r=this.remove(e),i=r.content.slice(),s=r.find(t);return i.splice(s==-1?i.length:s,0,e,n),new He(i)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=He.from(t),t.size?new He(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=He.from(t),t.size?new He(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=He.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};He.from=function(t){if(t instanceof He)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new He(e)};function lf(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),s=e.child(r);if(i==s){n+=i.nodeSize;continue}if(!i.sameMarkup(s))return n;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)n++;return n}if(i.content.size||s.content.size){let o=lf(i.content,s.content,n+1);if(o!=null)return o}n+=i.nodeSize}}function uf(t,e,n,r){for(let i=t.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:n,b:r};let o=t.child(--i),a=e.child(--s),l=o.nodeSize;if(o==a){n-=l,r-=l;continue}if(!o.sameMarkup(a))return{a:n,b:r};if(o.isText&&o.text!=a.text){let u=0,c=Math.min(o.text.length,a.text.length);for(;u<c&&o.text[o.text.length-u-1]==a.text[a.text.length-u-1];)u++,n--,r--;return{a:n,b:r}}if(o.content.size||a.content.size){let u=uf(o.content,a.content,n-1,r-1);if(u)return u}n-=l,r-=l}}class v{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,s){for(let o=0,a=0;a<n;o++){let l=this.content[o],u=a+l.nodeSize;if(u>e&&r(l,i+a,s||null,o)!==!1&&l.content.size){let c=a+1;l.nodesBetween(Math.max(0,e-c),Math.min(l.content.size,n-c),r,i+c)}a=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let s="",o=!0;return this.nodesBetween(e,n,(a,l)=>{let u=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&u||a.isTextblock)&&r&&(o?o=!1:s+=r),s+=u},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new v(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let s=0,o=0;o<n;s++){let a=this.content[s],l=o+a.nodeSize;l>e&&((o<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-o),Math.min(a.text.length,n-o)):a=a.cut(Math.max(0,e-o-1),Math.min(a.content.size,n-o-1))),r.push(a),i+=a.nodeSize),o=l}return new v(r,i)}cutByIndex(e,n){return e==n?v.empty:e==0&&n==this.content.length?this:new v(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),s=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new v(i,s)}addToStart(e){return new v([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new v(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return lf(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return uf(this,e,n,r)}findIndex(e){if(e==0)return _i(0,e);if(e==this.size)return _i(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),s=r+i.nodeSize;if(s>=e)return s==e?_i(n+1,s):_i(n,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return v.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new v(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return v.empty;let n,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(n||(n=e.slice(0,i)),n[n.length-1]=s.withText(n[n.length-1].text+s.text)):n&&n.push(s)}return new v(n||e,r)}static from(e){if(!e)return v.empty;if(e instanceof v)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new v([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}v.empty=new v([],0);const Io={index:0,offset:0};function _i(t,e){return Io.index=t,Io.offset=e,Io}function es(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!es(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!es(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let te=class Sa{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))n||(n=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(s)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&es(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Sa.none;if(e instanceof Sa)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};te.none=[];class ts extends Error{}class N{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=df(this.content,e+this.openStart,n);return r&&new N(r,this.openStart,this.openEnd)}removeBetween(e,n){return new N(cf(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return N.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new N(v.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(n||!s.type.spec.isolating);s=s.lastChild)i++;return new N(e,r,i)}}N.empty=new N(v.empty,0,0);function cf(t,e,n){let{index:r,offset:i}=t.findIndex(e),s=t.maybeChild(r),{index:o,offset:a}=t.findIndex(n);if(i==e||s.isText){if(a!=n&&!t.child(o).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=o)throw new RangeError("Removing non-flat range");return t.replaceChild(r,s.copy(cf(s.content,e-i-1,n-i-1)))}function df(t,e,n,r){let{index:i,offset:s}=t.findIndex(e),o=t.maybeChild(i);if(s==e||o.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=df(o.content,e-s-1,n,o);return a&&t.replaceChild(i,o.copy(a))}function Dg(t,e,n){if(n.openStart>t.depth)throw new ts("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new ts("Inconsistent open depths");return ff(t,e,n,0)}function ff(t,e,n,r){let i=t.index(r),s=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let o=ff(t,e,n,r+1);return s.copy(s.content.replaceChild(i,o))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let o=t.parent,a=o.content;return Dn(o,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:o,end:a}=Rg(n,t);return Dn(s,pf(t,o,a,e,r))}else return Dn(s,ns(t,e,r))}function hf(t,e){if(!e.type.compatibleContent(t.type))throw new ts("Cannot join "+e.type.name+" onto "+t.type.name)}function va(t,e,n){let r=t.node(n);return hf(r,e.node(n)),r}function On(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Rr(t,e,n,r){let i=(e||t).node(n),s=0,o=e?e.index(n):i.childCount;t&&(s=t.index(n),t.depth>n?s++:t.textOffset&&(On(t.nodeAfter,r),s++));for(let a=s;a<o;a++)On(i.child(a),r);e&&e.depth==n&&e.textOffset&&On(e.nodeBefore,r)}function Dn(t,e){return t.type.checkContent(e),t.copy(e)}function pf(t,e,n,r,i){let s=t.depth>i&&va(t,e,i+1),o=r.depth>i&&va(n,r,i+1),a=[];return Rr(null,t,i,a),s&&o&&e.index(i)==n.index(i)?(hf(s,o),On(Dn(s,pf(t,e,n,r,i+1)),a)):(s&&On(Dn(s,ns(t,e,i+1)),a),Rr(e,n,i,a),o&&On(Dn(o,ns(n,r,i+1)),a)),Rr(r,null,i,a),new v(a)}function ns(t,e,n){let r=[];if(Rr(null,t,n,r),t.depth>n){let i=va(t,e,n+1);On(Dn(i,ns(t,e,n+1)),r)}return Rr(e,null,n,r),new v(r)}function Rg(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let s=n-1;s>=0;s--)i=e.node(s).copy(v.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Wr{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return te.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let a=r;r=i,i=a}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new rs(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,s=n;for(let o=e;;){let{index:a,offset:l}=o.content.findIndex(s),u=s-l;if(r.push(o,a,i+l),!u||(o=o.child(a),o.isText))break;s=u-1,i+=l+1}return new Wr(n,r,s)}static resolveCached(e,n){let r=Mu.get(e);if(r)for(let s=0;s<r.elts.length;s++){let o=r.elts[s];if(o.pos==n)return o}else Mu.set(e,r=new Ig);let i=r.elts[r.i]=Wr.resolve(e,n);return r.i=(r.i+1)%Lg,i}}class Ig{constructor(){this.elts=[],this.i=0}}const Lg=12,Mu=new WeakMap;class rs{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Pg=Object.create(null);let fn=class Aa{constructor(e,n,r,i=te.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||v.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&es(this.attrs,n||e.defaultAttrs||Pg)&&te.sameSet(this.marks,r||te.none)}copy(e=null){return e==this.content?this:new Aa(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Aa(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return N.empty;let i=this.resolve(e),s=this.resolve(n),o=r?0:i.sharedDepth(n),a=i.start(o),u=i.node(o).content.cut(i.pos-a,s.pos-a);return new N(u,i.depth-o,s.depth-o)}replace(e,n,r){return Dg(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Wr.resolveCached(this,e)}resolveNoCache(e){return Wr.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),mf(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=v.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),a=o&&o.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<s;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,n);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=te.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!te.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=v.fromJSON(e,n.content),s=e.nodeType(n.type).create(n.attrs,i,r);return s.type.checkAttrs(s.attrs),s}};fn.prototype.text=void 0;class is extends fn{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):mf(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new is(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new is(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function mf(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Bn{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Bg(e,n);if(r.next==null)return Bn.empty;let i=gf(r);r.next&&r.err("Unexpected trailing text");let s=Wg(qg(i));return Vg(s,r),s}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let s=n;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function s(o,a){let l=o.matchFragment(e,r);if(l&&(!n||l.validEnd))return v.from(a.map(u=>u.createAndFill()));for(let u=0;u<o.next.length;u++){let{type:c,next:d}=o.next[u];if(!(c.isText||c.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,a.concat(c));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let a=i;a.type;a=a.via)o.push(a.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:a,next:l}=s.next[o];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
92
+ `)}}Bn.empty=new Bn(!0);class Bg{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function gf(t){let e=[];do e.push(Fg(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Fg(t){let e=[];do e.push(zg(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function zg(t){let e=Ug(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=$g(t,e);else break;return e}function Nu(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function $g(t,e){let n=Nu(t),r=n;return t.eat(",")&&(t.next!="}"?r=Nu(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function Hg(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let s in n){let o=n[s];o.isInGroup(e)&&i.push(o)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function Ug(t){if(t.eat("(")){let e=gf(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=Hg(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function qg(t){let e=[[]];return i(s(t,0),n()),e;function n(){return e.push([])-1}function r(o,a,l){let u={term:l,to:a};return e[o].push(u),u}function i(o,a){o.forEach(l=>l.to=a)}function s(o,a){if(o.type=="choice")return o.exprs.reduce((l,u)=>l.concat(s(u,a)),[]);if(o.type=="seq")for(let l=0;;l++){let u=s(o.exprs[l],a);if(l==o.exprs.length-1)return u;i(u,a=n())}else if(o.type=="star"){let l=n();return r(a,l),i(s(o.expr,l),l),[r(l)]}else if(o.type=="plus"){let l=n();return i(s(o.expr,a),l),i(s(o.expr,l),l),[r(l)]}else{if(o.type=="opt")return[r(a)].concat(s(o.expr,a));if(o.type=="range"){let l=a;for(let u=0;u<o.min;u++){let c=n();i(s(o.expr,l),c),l=c}if(o.max==-1)i(s(o.expr,l),l);else for(let u=o.min;u<o.max;u++){let c=n();r(l,c),i(s(o.expr,l),c),l=c}return[r(l)]}else{if(o.type=="name")return[r(a,void 0,o.value)];throw new Error("Unknown expr type")}}}}function bf(t,e){return e-t}function Ou(t,e){let n=[];return r(e),n.sort(bf);function r(i){let s=t[i];if(s.length==1&&!s[0].term)return r(s[0].to);n.push(i);for(let o=0;o<s.length;o++){let{term:a,to:l}=s[o];!a&&n.indexOf(l)==-1&&r(l)}}}function Wg(t){let e=Object.create(null);return n(Ou(t,0));function n(r){let i=[];r.forEach(o=>{t[o].forEach(({term:a,to:l})=>{if(!a)return;let u;for(let c=0;c<i.length;c++)i[c][0]==a&&(u=i[c][1]);Ou(t,l).forEach(c=>{u||i.push([a,u=[]]),u.indexOf(c)==-1&&u.push(c)})})});let s=e[r.join(",")]=new Bn(r.indexOf(t.length-1)>-1);for(let o=0;o<i.length;o++){let a=i[o][1].sort(bf);s.next.push({type:i[o][0],next:e[a.join(",")]||n(a)})}return s}}function Vg(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],s=!i.validEnd,o=[];for(let a=0;a<i.next.length;a++){let{type:l,next:u}=i.next[a];o.push(l.name),s&&!(l.isText||l.hasRequiredAttrs())&&(s=!1),r.indexOf(u)==-1&&r.push(u)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function yf(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function Ef(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let s=t[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function kf(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let s=t[i];s.validate&&s.validate(e[i])}}function xf(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Gg(t,r,e[r]);return n}let Du=class _f{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=xf(e,r.attrs),this.defaultAttrs=yf(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Bn.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Ef(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new fn(this,this.computeAttrs(e),v.from(n),te.setFrom(r))}createChecked(e=null,n,r){return n=v.from(n),this.checkContent(n),new fn(this,this.computeAttrs(e),n,te.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=v.from(n),n.size){let o=this.contentMatch.fillBefore(n);if(!o)return null;n=o.append(n)}let i=this.contentMatch.matchFragment(n),s=i&&i.fillBefore(v.empty,!0);return s?new fn(this,e,n.append(s),te.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){kf(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:te.none:e}static compile(e,n){let r=Object.create(null);e.forEach((s,o)=>r[s]=new _f(s,n,o));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Kg(t,e,n){let r=n.split("|");return i=>{let s=i===null?"null":typeof i;if(r.indexOf(s)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${s}`)}}class Gg{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Kg(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Js{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=xf(e,i.attrs),this.excluded=null;let s=yf(this.attrs);this.instance=s?new te(this,s):null}create(e=null){return!e&&this.instance?this.instance:new te(this,Ef(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new Js(s,i++,n,o)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){kf(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class hl{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=He.from(e.nodes),n.marks=He.from(e.marks||{}),this.nodes=Du.compile(this.spec.nodes,this),this.marks=Js.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",a=s.spec.marks;if(s.contentMatch=r[o]||(r[o]=Bn.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!s.isInline||!s.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=s}s.markSet=a=="_"?null:a?Ru(this,a.split(" ")):a==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:Ru(this,o.split(" "))}this.nodeFromJSON=i=>fn.fromJSON(this,i),this.markFromJSON=i=>te.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Du){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,i)}text(e,n){let r=this.nodes.text;return new is(r,r.defaultAttrs,e,te.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function Ru(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],s=t.marks[i],o=s;if(s)n.push(s);else for(let a in t.marks){let l=t.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=l)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function jg(t){return t.tag!=null}function Zg(t){return t.style!=null}class Vt{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(jg(i))this.tags.push(i);else if(Zg(i)){let s=/[^=]*/.exec(i.style)[0];r.indexOf(s)<0&&r.push(s),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let s=e.nodes[i.node];return s.contentMatch.matchType(s)})}parse(e,n={}){let r=new Lu(this,n,!1);return r.addAll(e,te.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Lu(this,n,!0);return r.addAll(e,te.none,n.from,n.to),N.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(Xg(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||n.matchesContext(s.context))){if(s.getAttrs){let o=s.getAttrs(e);if(o===!1)continue;s.attrs=o||void 0}return s}}}matchStyle(e,n,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let o=this.styles[s],a=o.style;if(!(a.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(o.getAttrs){let l=o.getAttrs(n);if(l===!1)continue;o.attrs=l||void 0}return o}}}static schemaRules(e){let n=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o<n.length;o++){let a=n[o];if((a.priority==null?50:a.priority)<s)break}n.splice(o,0,i)}for(let i in e.marks){let s=e.marks[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Pu(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Pu(o)),o.node||o.ignore||o.mark||(o.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Vt(e,Vt.schemaRules(e)))}}const wf={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Yg={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Cf={ol:!0,ul:!0},Vr=1,Ta=2,Ir=4;function Iu(t,e,n){return e!=null?(e?Vr:0)|(e==="full"?Ta:0):t&&t.whitespace=="pre"?Vr|Ta:n&~Ir}class wi{constructor(e,n,r,i,s,o){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=o,this.content=[],this.activeMarks=te.none,this.match=s||(o&Ir?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(v.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Vr)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let n=v.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(v.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!wf.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Lu{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,s,o=Iu(null,n.preserveWhitespace,0)|(r?Ir:0);i?s=new wi(i.type,i.attrs,te.none,!0,n.topMatch||i.type.contentMatch,o):r?s=new wi(null,null,te.none,!0,null,o):s=new wi(e.schema.topNodeType,null,te.none,!0,null,o),this.nodes=[s],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,s=i.options&Ta?"full":this.localPreserveWS||(i.options&Vr)>0,{schema:o}=this.parser;if(s==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(s)if(s==="full")r=r.replace(/\r\n?/g,`
93
+ `);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(o.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(o.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],l=e.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,s=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),a;Cf.hasOwnProperty(o)&&this.parser.normalizeLists&&Jg(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(a=this.parser.matchTag(e,this,r));e:if(l?l.ignore:Yg.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let u,c=this.needsBlock;if(wf.hasOwnProperty(o))s.content.length&&s.content[0].isInline&&this.open&&(this.open--,s=this.top),u=!0,s.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let d=l&&l.skip?n:this.readStyles(e,n);d&&this.addAll(e,d),u&&this.sync(s),this.needsBlock=c}else{let u=this.readStyles(e,n);u&&this.addElementByRule(e,l,u,l.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
94
+ `),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let s=this.parser.matchedStyles[i],o=r.getPropertyValue(s);if(o)for(let a=void 0;;){let l=this.parser.matchStyle(s,o,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(u=>!l.clearMark(u)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,r,i){let s,o;if(n.node)if(o=this.parser.schema.nodes[n.node],o.isLeaf)this.insertNode(o.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(o,n.attrs||null,r,n.preserveWhitespace);l&&(s=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(o&&o.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}s&&this.sync(a)&&this.open--}addAll(e,n,r,i){let s=r||0;for(let o=r?e.childNodes[r]:e.firstChild,a=i==null?null:e.childNodes[i];o!=a;o=o.nextSibling,++s)this.findAtPoint(e,s),this.addDOM(o,n);this.findAtPoint(e,s)}findPlace(e,n,r){let i,s;for(let o=this.open,a=0;o>=0;o--){let l=this.nodes[o],u=l.findWrapping(e);if(u&&(!i||i.length>u.length+a)&&(i=u,s=l,!u.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(s);for(let o=0;o<i.length;o++)n=this.enterInner(i[o],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(n=this.enterInner(s,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let o=te.none;for(let a of i.concat(e.marks))(s.type?s.type.allowsMarkType(a.type):Bu(a.type,e.type))&&(o=a.addToSet(o));return s.content.push(e.mark(o)),!0}return!1}enter(e,n,r,i){let s=this.findPlace(e.create(n),r,!1);return s&&(s=this.enterInner(e,n,r,!0,i)),s}enterInner(e,n,r,i=!1,s){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let a=Iu(e,s,o.options);o.options&Ir&&o.content.length==0&&(a|=Ir);let l=te.none;return r=r.filter(u=>(o.type?o.type.allowsMarkType(u.type):Bu(u.type,e))?(l=u.addToSet(l),!1):!0),this.nodes.push(new wi(e,n,l,i,null,a)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Vr)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(a,l)=>{for(;a>=0;a--){let u=n[a];if(u==""){if(a==n.length-1||a==0)continue;for(;l>=s;l--)if(o(a-1,l))return!0;return!1}else{let c=l>0||l==0&&i?this.nodes[l].type:r&&l>=s?r.node(l-s).type:null;if(!c||c.name!=u&&!c.isInGroup(u))return!1;l--}}return!0};return o(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function Jg(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Cf.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function Xg(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function Pu(t){let e={};for(let n in t)e[n]=t[n];return e}function Bu(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let s=[],o=a=>{s.push(a);for(let l=0;l<a.edgeCount;l++){let{type:u,next:c}=a.edge(l);if(u==e||s.indexOf(c)<0&&o(c))return!0}};if(o(i.contentMatch))return!0}}class Wn{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Lo(n).createDocumentFragment());let i=r,s=[];return e.forEach(o=>{if(s.length||o.marks.length){let a=0,l=0;for(;a<s.length&&l<o.marks.length;){let u=o.marks[l];if(!this.marks[u.type.name]){l++;continue}if(!u.eq(s[a][0])||u.type.spec.spanning===!1)break;a++,l++}for(;a<s.length;)i=s.pop()[1];for(;l<o.marks.length;){let u=o.marks[l++],c=this.serializeMark(u,o.isInline,n);c&&(s.push([u,i]),i.appendChild(c.dom),i=c.contentDOM||c.dom)}}i.appendChild(this.serializeNodeInner(o,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=Ki(Lo(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,n);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&Ki(Lo(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return Ki(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Wn(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=Fu(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return Fu(e.marks)}}function Fu(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Lo(t){return t.document||window.document}const zu=new WeakMap;function Qg(t){let e=zu.get(t);return e===void 0&&zu.set(t,e=eb(t)),e}function eb(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(t),e}function Ki(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],s;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(s=Qg(r))&&s.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=i.indexOf(" ");o>0&&(n=i.slice(0,o),i=i.slice(o+1));let a,l=n?t.createElementNS(n,i):t.createElement(i),u=e[1],c=1;if(u&&typeof u=="object"&&u.nodeType==null&&!Array.isArray(u)){c=2;for(let d in u)if(u[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),u[d]):d=="style"&&l.style?l.style.cssText=u[d]:l.setAttribute(d,u[d])}}for(let d=c;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:p}=Ki(t,f,n,r);if(l.appendChild(h),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const Sf=65535,vf=Math.pow(2,16);function tb(t,e){return t+e*vf}function $u(t){return t&Sf}function nb(t){return(t-(t&Sf))/vf}const Af=1,Tf=2,Gi=4,Mf=8;class Ma{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Mf)>0}get deletedBefore(){return(this.delInfo&(Af|Gi))>0}get deletedAfter(){return(this.delInfo&(Tf|Gi))>0}get deletedAcross(){return(this.delInfo&Gi)>0}}class at{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&at.empty)return at.empty}recover(e){let n=0,r=$u(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+nb(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let u=this.ranges[a+s],c=this.ranges[a+o],d=l+u;if(e<=d){let f=u?e==l?-1:e==d?1:n:n,h=l+i+(f<0?0:c);if(r)return h;let p=e==(n<0?l:d)?null:tb(a/3,e-l),m=e==l?Tf:e==d?Af:Gi;return(n<0?e!=l:e!=d)&&(m|=Mf),new Ma(h,m,p)}i+=c-u}return r?e+i:new Ma(e+i,0,null)}touches(e,n){let r=0,i=$u(n),s=this.inverted?2:1,o=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>e)break;let u=this.ranges[a+s],c=l+u;if(e<=c&&a==i*3)return!0;r+=this.ranges[a+o]-u}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i<this.ranges.length;i+=3){let o=this.ranges[i],a=o-(this.inverted?s:0),l=o+(this.inverted?0:s),u=this.ranges[i+n],c=this.ranges[i+r];e(a,a+u,l,l+c),s+=c-u}}invert(){return new at(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?at.empty:new at(e<0?[0,-e,0]:[0,0,e])}}at.empty=new at([]);class Kr{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Kr(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new Kr;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let s=this.from;s<this.to;s++){let o=this._maps[s],a=o.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(s);if(l!=null&&l>s&&l<this.to){s=l,e=this._maps[l].recover(a.recover);continue}}i|=a.delInfo,e=a.pos}return r?e:new Ma(e,i,null)}}const Po=Object.create(null);class Ze{getMap(){return at.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Po[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Po)throw new RangeError("Duplicate use of step JSON ID "+e);return Po[e]=n,n.prototype.jsonID=e,n}}class Ae{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Ae(e,null)}static fail(e){return new Ae(null,e)}static fromReplace(e,n,r,i){try{return Ae.ok(e.replace(n,r,i))}catch(s){if(s instanceof ts)return Ae.fail(s.message);throw s}}}function pl(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let s=t.child(i);s.content.size&&(s=s.copy(pl(s.content,e,s))),s.isInline&&(s=e(s,n,i)),r.push(s)}return v.fromArray(r)}class ln extends Ze{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new N(pl(n.content,(o,a)=>!o.isAtom||!a.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),n.openStart,n.openEnd);return Ae.fromReplace(e,this.from,this.to,s)}invert(){return new Et(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new ln(n.pos,r.pos,this.mark)}merge(e){return e instanceof ln&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new ln(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new ln(n.from,n.to,e.markFromJSON(n.mark))}}Ze.jsonID("addMark",ln);class Et extends Ze{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new N(pl(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return Ae.fromReplace(e,this.from,this.to,r)}invert(){return new ln(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Et(n.pos,r.pos,this.mark)}merge(e){return e instanceof Et&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Et(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Et(n.from,n.to,e.markFromJSON(n.mark))}}Ze.jsonID("removeMark",Et);class un extends Ze{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ae.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ae.fromReplace(e,this.pos,this.pos+1,new N(v.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new un(this.pos,n.marks[i]);return new un(this.pos,this.mark)}}return new Fn(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new un(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new un(n.pos,e.markFromJSON(n.mark))}}Ze.jsonID("addNodeMark",un);class Fn extends Ze{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ae.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ae.fromReplace(e,this.pos,this.pos+1,new N(v.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new un(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Fn(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Fn(n.pos,e.markFromJSON(n.mark))}}Ze.jsonID("removeNodeMark",Fn);class ve extends Ze{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&Na(e,this.from,this.to)?Ae.fail("Structure replace would overwrite content"):Ae.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new at([this.from,this.to-this.from,this.slice.size])}invert(e){return new ve(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.to,-1),r=this.from==this.to&&ve.MAP_BIAS<0?n:e.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new ve(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(e){if(!(e instanceof ve)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?N.empty:new N(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new ve(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?N.empty:new N(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new ve(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new ve(n.from,n.to,N.fromJSON(e,n.slice),!!n.structure)}}ve.MAP_BIAS=1;Ze.jsonID("replace",ve);class Le extends Ze{constructor(e,n,r,i,s,o,a=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=o,this.structure=a}apply(e){if(this.structure&&(Na(e,this.from,this.gapFrom)||Na(e,this.gapTo,this.to)))return Ae.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ae.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?Ae.fromReplace(e,this.from,this.to,r):Ae.fail("Content does not fit in gap")}getMap(){return new at([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new Le(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),s=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||s>r.pos?null:new Le(n.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Le(n.from,n.to,n.gapFrom,n.gapTo,N.fromJSON(e,n.slice),n.insert,!!n.structure)}}Ze.jsonID("replaceAround",Le);function Na(t,e,n){let r=t.resolve(e),i=n-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function rb(t,e,n,r){let i=[],s=[],o,a;t.doc.nodesBetween(e,n,(l,u,c)=>{if(!l.isInline)return;let d=l.marks;if(!r.isInSet(d)&&c.type.allowsMarkType(r.type)){let f=Math.max(u,e),h=Math.min(u+l.nodeSize,n),p=r.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[m])?o.to=h:i.push(o=new Et(f,h,d[m])));a&&a.to==f?a.to=h:s.push(a=new ln(f,h,r))}}),i.forEach(l=>t.step(l)),s.forEach(l=>t.step(l))}function ib(t,e,n,r){let i=[],s=0;t.doc.nodesBetween(e,n,(o,a)=>{if(!o.isInline)return;s++;let l=null;if(r instanceof Js){let u=o.marks,c;for(;c=r.isInSet(u);)(l||(l=[])).push(c),u=c.removeFromSet(u)}else r?r.isInSet(o.marks)&&(l=[r]):l=o.marks;if(l&&l.length){let u=Math.min(a+o.nodeSize,n);for(let c=0;c<l.length;c++){let d=l[c],f;for(let h=0;h<i.length;h++){let p=i[h];p.step==s-1&&d.eq(i[h].style)&&(f=p)}f?(f.to=u,f.step=s):i.push({style:d,from:Math.max(a,e),to:u,step:s})}}}),i.forEach(o=>t.step(new Et(o.from,o.to,o.style)))}function ml(t,e,n,r=n.contentMatch,i=!0){let s=t.doc.nodeAt(e),o=[],a=e+1;for(let l=0;l<s.childCount;l++){let u=s.child(l),c=a+u.nodeSize,d=r.matchType(u.type);if(!d)o.push(new ve(a,c,N.empty));else{r=d;for(let f=0;f<u.marks.length;f++)n.allowsMarkType(u.marks[f].type)||t.step(new Et(a,c,u.marks[f]));if(i&&u.isText&&n.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(u.text);)p||(p=new N(v.from(n.schema.text(" ",n.allowedMarks(u.marks))),0,0)),o.push(new ve(a+f.index,a+f.index+f[0].length,p))}}a=c}if(!r.validEnd){let l=r.fillBefore(v.empty,!0);t.replace(a,a,new N(l,0,0))}for(let l=o.length-1;l>=0;l--)t.step(o[l])}function sb(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function br(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,s=0;;--r){let o=t.$from.node(r),a=t.$from.index(r)+i,l=t.$to.indexAfter(r)-s;if(r<t.depth&&o.canReplace(a,l,n))return r;if(r==0||o.type.spec.isolating||!sb(o,a,l))break;a&&(i=1),l<o.childCount&&(s=1)}return null}function ob(t,e,n){let{$from:r,$to:i,depth:s}=e,o=r.before(s+1),a=i.after(s+1),l=o,u=a,c=v.empty,d=0;for(let p=s,m=!1;p>n;p--)m||r.index(p)>0?(m=!0,c=v.from(r.node(p).copy(c)),d++):l--;let f=v.empty,h=0;for(let p=s,m=!1;p>n;p--)m||i.after(p+1)<i.end(p)?(m=!0,f=v.from(i.node(p).copy(f)),h++):u++;t.step(new Le(l,u,o,a,new N(c.append(f),d,h),c.size-d,!0))}function gl(t,e,n=null,r=t){let i=ab(t,e),s=i&&lb(r,e);return s?i.map(Hu).concat({type:e,attrs:n}).concat(s.map(Hu)):null}function Hu(t){return{type:t,attrs:null}}function ab(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.contentMatchAt(r).findWrapping(e);if(!s)return null;let o=s.length?s[0]:e;return n.canReplaceWith(r,i,o)?s:null}function lb(t,e){let{parent:n,startIndex:r,endIndex:i}=t,s=n.child(r),o=e.contentMatch.findWrapping(s.type);if(!o)return null;let l=(o.length?o[o.length-1]:e).contentMatch;for(let u=r;l&&u<i;u++)l=l.matchType(n.child(u).type);return!l||!l.validEnd?null:o}function ub(t,e,n){let r=v.empty;for(let o=n.length-1;o>=0;o--){if(r.size){let a=n[o].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=v.from(n[o].type.create(n[o].attrs,r))}let i=e.start,s=e.end;t.step(new Le(i,s,i,s,new N(r,0,0),n.length,!0))}function cb(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=t.steps.length;t.doc.nodesBetween(e,n,(o,a)=>{let l=typeof i=="function"?i(o):i;if(o.isTextblock&&!o.hasMarkup(r,l)&&db(t.doc,t.mapping.slice(s).map(a),r)){let u=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?u=!1:!h&&p&&(u=!0)}u===!1&&Of(t,o,a,s),ml(t,t.mapping.slice(s).map(a,1),r,void 0,u===null);let c=t.mapping.slice(s),d=c.map(a,1),f=c.map(a+o.nodeSize,1);return t.step(new Le(d,f,d+1,f-1,new N(v.from(r.create(l,null,o.marks)),0,0),1,!0)),u===!0&&Nf(t,o,a,s),!1}})}function Nf(t,e,n,r){e.forEach((i,s)=>{if(i.isText){let o,a=/\r?\n|\r/g;for(;o=a.exec(i.text);){let l=t.mapping.slice(r).map(n+1+s+o.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function Of(t,e,n,r){e.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let o=t.mapping.slice(r).map(n+1+s);t.replaceWith(o,o+1,e.type.schema.text(`
95
+ `))}})}function db(t,e,n){let r=t.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function fb(t,e,n,r,i){let s=t.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");n||(n=s.type);let o=n.create(r,null,i||s.marks);if(s.isLeaf)return t.replaceWith(e,e+s.nodeSize,o);if(!n.validContent(s.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new Le(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new N(v.from(o),0,0),1,!0))}function Kt(t,e,n=1,r){let i=t.resolve(e),s=i.depth-n,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let u=i.depth-1,c=n-2;u>s;u--,c--){let d=i.node(u),f=i.index(u);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),p=r&&r[c+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[c]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(h))return!1}let a=i.indexAfter(s),l=r&&r[0];return i.node(s).canReplaceWith(a,a,l?l.type:i.node(s+1).type)}function hb(t,e,n=1,r){let i=t.doc.resolve(e),s=v.empty,o=v.empty;for(let a=i.depth,l=i.depth-n,u=n-1;a>l;a--,u--){s=v.from(i.node(a).copy(s));let c=r&&r[u];o=v.from(c?c.type.create(c.attrs,o):i.node(a).copy(o))}t.step(new ve(e,e,new N(s.append(o),n,n),!0))}function En(t,e){let n=t.resolve(e),r=n.index();return Df(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function pb(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let i=0;i<e.childCount;i++){let s=e.child(i),o=s.type==r?t.type.schema.nodes.text:s.type;if(n=n.matchType(o),!n||!t.type.allowsMarks(s.marks))return!1}return n.validEnd}function Df(t,e){return!!(t&&e&&!t.isLeaf&&pb(t,e))}function Xs(t,e,n=-1){let r=t.resolve(e);for(let i=r.depth;;i--){let s,o,a=r.index(i);if(i==r.depth?(s=r.nodeBefore,o=r.nodeAfter):n>0?(s=r.node(i+1),a++,o=r.node(i).maybeChild(a)):(s=r.node(i).maybeChild(a-1),o=r.node(i+1)),s&&!s.isTextblock&&Df(s,o)&&r.node(i).canReplace(a,a+1))return e;if(i==0)break;e=n<0?r.before(i):r.after(i)}}function mb(t,e,n){let r=null,{linebreakReplacement:i}=t.doc.type.schema,s=t.doc.resolve(e-n),o=s.node().type;if(i&&o.inlineContent){let c=o.whitespace=="pre",d=!!o.contentMatch.matchType(i);c&&!d?r=!1:!c&&d&&(r=!0)}let a=t.steps.length;if(r===!1){let c=t.doc.resolve(e+n);Of(t,c.node(),c.before(),a)}o.inlineContent&&ml(t,e+n-1,o,s.node().contentMatchAt(s.index()),r==null);let l=t.mapping.slice(a),u=l.map(e-n);if(t.step(new ve(u,l.map(e+n,-1),N.empty,!0)),r===!0){let c=t.doc.resolve(u);Nf(t,c.node(),c.before(),t.steps.length)}return t}function gb(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let s=r.index(i);if(r.node(i).canReplaceWith(s,s,n))return r.before(i+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let s=r.indexAfter(i);if(r.node(i).canReplaceWith(s,s,n))return r.after(i+1);if(s<r.node(i).childCount)return null}return null}function Rf(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let s=0;s<n.openStart;s++)i=i.firstChild.content;for(let s=1;s<=(n.openStart==0&&n.size?2:1);s++)for(let o=r.depth;o>=0;o--){let a=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,l=r.index(o)+(a>0?1:0),u=r.node(o),c=!1;if(s==1)c=u.canReplace(l,l,i);else{let d=u.contentMatchAt(l).findWrapping(i.firstChild.type);c=d&&u.canReplaceWith(l,l,d[0])}if(c)return a==0?r.pos:a<0?r.before(o+1):r.after(o+1)}return null}function Qs(t,e,n=e,r=N.empty){if(e==n&&!r.size)return null;let i=t.resolve(e),s=t.resolve(n);return If(i,s,r)?new ve(e,n,r):new bb(i,s,r).fit()}function If(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class bb{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=v.empty;for(let i=0;i<=e.depth;i++){let s=e.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=v.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let s=this.placed,o=r.depth,a=i.depth;for(;o&&a&&s.childCount==1;)s=s.firstChild.content,o--,a--;let l=new N(s,o,a);return e>-1?new Le(r.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new ve(r.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let s=n.firstChild;if(n.childCount>1&&(i=0),s.type.spec.isolating&&i<=r){e=r;break}n=s.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let i,s=null;r?(s=Bo(this.unplaced.content,r-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:u}=this.frontier[a],c,d=null;if(n==1&&(o?u.matchType(o.type)||(d=u.fillBefore(v.from(o),!1)):s&&l.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:a,parent:s,inject:d};if(n==2&&o&&(c=u.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:a,parent:s,wrap:c};if(s&&u.matchType(s.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=Bo(e,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new N(e,n+1,Math.max(r,i.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,i=Bo(e,n);if(i.childCount<=1&&n>0){let s=e.size-n<=n+i.size;this.unplaced=new N(Tr(e,n-1,1),n-1,s?n-1:r)}else this.unplaced=new N(Tr(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:i,wrap:s}){for(;this.depth>n;)this.closeFrontierNode();if(s)for(let m=0;m<s.length;m++)this.openFrontierNode(s[m]);let o=this.unplaced,a=r?r.content:o.content,l=o.openStart-e,u=0,c=[],{match:d,type:f}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)c.push(i.child(m));d=d.matchFragment(i)}let h=a.size+e-(o.content.size-o.openEnd);for(;u<a.childCount;){let m=a.child(u),g=d.matchType(m.type);if(!g)break;u++,(u>1||l==0||m.content.size)&&(d=g,c.push(Lf(m.mark(f.allowedMarks(m.marks)),u==1?l:0,u==a.childCount?h:-1)))}let p=u==a.childCount;p||(h=-1),this.placed=Mr(this.placed,n,v.from(c)),this.frontier[n].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=a;m<h;m++){let b=g.lastChild;this.frontier.push({type:b.type,match:b.contentMatchAt(b.childCount)}),g=b.content}this.unplaced=p?e==0?N.empty:new N(Tr(o.content,e-1,1),e-1,h<0?o.openEnd:e-1):new N(Tr(o.content,e,u),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!Fo(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],s=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),o=Fo(e,n,i,r,s);if(o){for(let a=n-1;a>=0;a--){let{match:l,type:u}=this.frontier[a],c=Fo(e,a,u,l,!0);if(!c||c.childCount)continue e}return{depth:n,fit:o,move:s?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Mr(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let i=e.node(r),s=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,s)}return e}openFrontierNode(e,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Mr(this.placed,this.depth,v.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(v.empty,!0);n.childCount&&(this.placed=Mr(this.placed,this.frontier.length,n))}}function Tr(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Tr(t.firstChild.content,e-1,n)))}function Mr(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Mr(t.lastChild.content,e-1,n)))}function Bo(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function Lf(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,Lf(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(v.empty,!0)))),t.copy(r)}function Fo(t,e,n,r,i){let s=t.node(e),o=i?t.indexAfter(e):t.index(e);if(o==s.childCount&&!n.compatibleContent(s.type))return null;let a=r.fillBefore(s.content,!0,o);return a&&!yb(n,s.content,o)?a:null}function yb(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function Eb(t){return t.spec.defining||t.spec.definingForContent}function kb(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),s=t.doc.resolve(n);if(If(i,s,r))return t.step(new ve(e,n,r));let o=Bf(i,s);o[o.length-1]==0&&o.pop();let a=-(i.depth+1);o.unshift(a);for(let f=i.depth,h=i.pos-1;f>0;f--,h--){let p=i.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(f)>-1?a=f:i.before(f)==h&&o.splice(1,0,-f)}let l=o.indexOf(a),u=[],c=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(u.push(p),h==r.openStart)break;f=p.content}for(let f=c-1;f>=0;f--){let h=u[f],p=Eb(h.type);if(p&&!h.sameMarkup(i.node(Math.abs(a)-1)))c=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+c+1)%(r.openStart+1),p=u[h];if(p)for(let m=0;m<o.length;m++){let g=o[(m+l)%o.length],b=!0;g<0&&(b=!1,g=-g);let y=i.node(g-1),k=i.index(g-1);if(y.canReplaceWith(k,k,p.type,p.marks))return t.replace(i.before(g),b?s.after(g):n,new N(Pf(r.content,0,r.openStart,h),h,r.openEnd))}}let d=t.steps.length;for(let f=o.length-1;f>=0&&(t.replace(e,n,r),!(t.steps.length>d));f--){let h=o[f];h<0||(e=i.before(h),n=s.after(h))}}function Pf(t,e,n,r,i){if(e<n){let s=t.firstChild;t=t.replaceChild(0,s.copy(Pf(s.content,e+1,n,r,s)))}if(e>r){let s=i.contentMatchAt(0),o=s.fillBefore(t).append(t);t=o.append(s.matchFragment(o).fillBefore(v.empty,!0))}return t}function xb(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=gb(t.doc,e,r.type);i!=null&&(e=n=i)}t.replaceRange(e,n,new N(v.from(r),0,0))}function _b(t,e,n){let r=t.doc.resolve(e),i=t.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let o=r.sharedDepth(n),a=!1;for(let l=r.depth;l>o;l--)r.node(l).type.spec.isolating&&(a=!0);for(let l=i.depth;l>o;l--)i.node(l).type.spec.isolating&&(a=!0);if(!a){for(let l=r.depth;l>0&&e==r.start(l);l--)e=r.before(l);for(let l=i.depth;l>0&&n==i.start(l);l--)n=i.before(l);r=t.doc.resolve(e),i=t.doc.resolve(n)}}let s=Bf(r,i);for(let o=0;o<s.length;o++){let a=s[o],l=o==s.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return t.delete(r.start(a),i.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return t.delete(r.before(a),i.after(a))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(e-r.start(o)==r.depth-o&&n>r.end(o)&&i.end(o)-n!=i.depth-o&&r.start(o-1)==i.start(o-1)&&r.node(o-1).canReplace(r.index(o-1),i.index(o-1)))return t.delete(r.before(o),n);t.delete(e,n)}function Bf(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let i=r;i>=0;i--){let s=t.start(i);if(s<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(s==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==s-1)&&n.push(i)}return n}class sr extends Ze{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ae.fail("No node at attribute step's position");let r=Object.create(null);for(let s in n.attrs)r[s]=n.attrs[s];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return Ae.fromReplace(e,this.pos,this.pos+1,new N(v.from(i),0,n.isLeaf?0:1))}getMap(){return at.empty}invert(e){return new sr(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new sr(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new sr(n.pos,n.attr,n.value)}}Ze.jsonID("attr",sr);class Gr extends Ze{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let i in e.attrs)n[i]=e.attrs[i];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return Ae.ok(r)}getMap(){return at.empty}invert(e){return new Gr(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Gr(n.attr,n.value)}}Ze.jsonID("docAttr",Gr);let lr=class extends Error{};lr=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};lr.prototype=Object.create(Error.prototype);lr.prototype.constructor=lr;lr.prototype.name="TransformError";class bl{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Kr}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new lr(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let i=this.mapping.maps[r];r&&(e=i.map(e,1),n=i.map(n,-1)),i.forEach((s,o,a,l)=>{e=Math.min(e,a),n=Math.max(n,l)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=N.empty){let i=Qs(this.doc,e,n,r);return i&&this.step(i),this}replaceWith(e,n,r){return this.replace(e,n,new N(v.from(r),0,0))}delete(e,n){return this.replace(e,n,N.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return kb(this,e,n,r),this}replaceRangeWith(e,n,r){return xb(this,e,n,r),this}deleteRange(e,n){return _b(this,e,n),this}lift(e,n){return ob(this,e,n),this}join(e,n=1){return mb(this,e,n),this}wrap(e,n){return ub(this,e,n),this}setBlockType(e,n=e,r,i=null){return cb(this,e,n,r,i),this}setNodeMarkup(e,n,r=null,i){return fb(this,e,n,r,i),this}setNodeAttribute(e,n,r){return this.step(new sr(e,n,r)),this}setDocAttribute(e,n){return this.step(new Gr(e,n)),this}addNodeMark(e,n){return this.step(new un(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof te)n.isInSet(r.marks)&&this.step(new Fn(e,n));else{let i=r.marks,s,o=[];for(;s=n.isInSet(i);)o.push(new Fn(e,s)),i=s.removeFromSet(i);for(let a=o.length-1;a>=0;a--)this.step(o[a])}return this}split(e,n=1,r){return hb(this,e,n,r),this}addMark(e,n,r){return rb(this,e,n,r),this}removeMark(e,n,r){return ib(this,e,n,r),this}clearIncompatible(e,n,r){return ml(this,e,n,r),this}}const zo=Object.create(null);class U{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new Ff(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=N.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let s=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:l,$to:u}=o[a],c=e.mapping.slice(s);e.replaceRange(c.map(l.pos),c.map(u.pos),a?N.empty:n),a==0&&Wu(e,s,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:o,$to:a}=i[s],l=e.mapping.slice(r),u=l.map(o.pos),c=l.map(a.pos);s?e.deleteRange(u,c):(e.replaceRangeWith(u,c,n),Wu(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let i=e.parent.inlineContent?new $(e):Qn(e.node(0),e.parent,e.pos,e.index(),n,r);if(i)return i;for(let s=e.depth-1;s>=0;s--){let o=n<0?Qn(e.node(0),e.node(s),e.before(s+1),e.index(s),n,r):Qn(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,n,r);if(o)return o}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new ut(e.node(0))}static atStart(e){return Qn(e,e,0,0,1)||new ut(e)}static atEnd(e){return Qn(e,e,e.content.size,e.childCount,-1)||new ut(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=zo[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in zo)throw new RangeError("Duplicate use of selection JSON ID "+e);return zo[e]=n,n.prototype.jsonID=e,n}getBookmark(){return $.between(this.$anchor,this.$head).getBookmark()}}U.prototype.visible=!0;class Ff{constructor(e,n){this.$from=e,this.$to=n}}let Uu=!1;function qu(t){!Uu&&!t.parent.inlineContent&&(Uu=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class $ extends U{constructor(e,n=e){qu(e),qu(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return U.near(r);let i=e.resolve(n.map(this.anchor));return new $(i.parent.inlineContent?i:r,r)}replace(e,n=N.empty){if(super.replace(e,n),n==N.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof $&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new eo(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new $(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let i=e.resolve(n);return new this(i,r==n?i:e.resolve(r))}static between(e,n,r){let i=e.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let s=U.findFrom(n,r,!0)||U.findFrom(n,-r,!0);if(s)n=s.$head;else return U.near(n,r)}return e.parent.inlineContent||(i==0?e=n:(e=(U.findFrom(e,-r,!0)||U.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=i<0&&(e=n))),new $(e,n)}}U.jsonID("text",$);class eo{constructor(e,n){this.anchor=e,this.head=n}map(e){return new eo(e.map(this.anchor),e.map(this.head))}resolve(e){return $.between(e.resolve(this.anchor),e.resolve(this.head))}}class z extends U{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),s=e.resolve(i);return r?U.near(s):new z(s)}content(){return new N(v.from(this.node),0,0)}eq(e){return e instanceof z&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new yl(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new z(e.resolve(n.anchor))}static create(e,n){return new z(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}z.prototype.visible=!1;U.jsonID("node",z);class yl{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new eo(r,r):new yl(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&z.isSelectable(r)?new z(n):U.near(n)}}class ut extends U{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=N.empty){if(n==N.empty){e.delete(0,e.doc.content.size);let r=U.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new ut(e)}map(e){return new ut(e)}eq(e){return e instanceof ut}getBookmark(){return wb}}U.jsonID("all",ut);const wb={map(){return this},resolve(t){return new ut(t)}};function Qn(t,e,n,r,i,s=!1){if(e.inlineContent)return $.create(t,n);for(let o=r-(i>0?0:1);i>0?o<e.childCount:o>=0;o+=i){let a=e.child(o);if(a.isAtom){if(!s&&z.isSelectable(a))return z.create(t,n-(i<0?a.nodeSize:0))}else{let l=Qn(t,a,n+i,i<0?a.childCount:0,i,s);if(l)return l}n+=a.nodeSize*i}return null}function Wu(t,e,n){let r=t.steps.length-1;if(r<e)return;let i=t.steps[r];if(!(i instanceof ve||i instanceof Le))return;let s=t.mapping.maps[r],o;s.forEach((a,l,u,c)=>{o==null&&(o=c)}),t.setSelection(U.near(t.doc.resolve(o),n))}const Vu=1,Ci=2,Ku=4;class Cb extends bl{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Vu)&~Ci,this.storedMarks=null,this}get selectionSet(){return(this.updated&Vu)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Ci,this}ensureMarks(e){return te.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Ci)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Ci,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||te.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let i=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let s=this.storedMarks;if(!s){let o=this.doc.resolve(n);s=r==n?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(e,s)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(U.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Ku,this}get scrolledIntoView(){return(this.updated&Ku)>0}}function Gu(t,e){return!e||!t?t:t.bind(e)}class Nr{constructor(e,n,r){this.name=e,this.init=Gu(n.init,r),this.apply=Gu(n.apply,r)}}const Sb=[new Nr("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Nr("selection",{init(t,e){return t.selection||U.atStart(e.doc)},apply(t){return t.selection}}),new Nr("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Nr("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class $o{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Sb.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Nr(r.key,r.spec.state,r))})}}class ir{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),i=null;for(;;){let s=!1;for(let o=0;o<this.config.plugins.length;o++){let a=this.config.plugins[o];if(a.spec.appendTransaction){let l=i?i[o].n:0,u=i?i[o].state:this,c=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,u,r);if(c&&r.filterTransaction(c,o)){if(c.setMeta("appendedTransaction",e),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<o?{state:r,n:n.length}:{state:this,n:0})}n.push(c),r=r.applyInner(c),s=!0}i&&(i[o]={state:r,n:n.length})}}if(!s)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new ir(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let s=r[i];n[s.name]=s.apply(e,this[s.name],this,n)}return n}get tr(){return new Cb(this)}static create(e){let n=new $o(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new ir(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(e,r);return r}reconfigure(e){let n=new $o(this.schema,e.plugins),r=n.fields,i=new ir(n);for(let s=0;s<r.length;s++){let o=r[s].name;i[o]=this.hasOwnProperty(o)?this[o]:r[s].init(e,i)}return i}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],s=i.spec.state;s&&s.toJSON&&(n[r]=s.toJSON.call(i,this[i.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new $o(e.schema,e.plugins),s=new ir(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=fn.fromJSON(e.schema,n.doc);else if(o.name=="selection")s.selection=U.fromJSON(s.doc,n.selection);else if(o.name=="storedMarks")n.storedMarks&&(s.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],u=l.spec.state;if(l.key==o.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){s[o.name]=u.fromJSON.call(l,e,n[a],s);return}}s[o.name]=o.init(e,s)}}),s}}function zf(t,e,n){for(let r in t){let i=t[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=zf(i,e,{})),n[r]=i}return n}class le{constructor(e){this.spec=e,this.props={},e.props&&zf(e.props,this,this.props),this.key=e.key?e.key.key:$f("plugin")}getState(e){return e[this.key]}}const Ho=Object.create(null);function $f(t){return t in Ho?t+"$"+ ++Ho[t]:(Ho[t]=0,t+"$")}class Ee{constructor(e="key"){this.key=$f(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const El=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function Hf(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const Uf=(t,e,n)=>{let r=Hf(t,n);if(!r)return!1;let i=kl(r);if(!i){let o=r.blockRange(),a=o&&br(o);return a==null?!1:(e&&e(t.tr.lift(o,a).scrollIntoView()),!0)}let s=i.nodeBefore;if(Jf(t,i,e,-1))return!0;if(r.parent.content.size==0&&(ur(s,"end")||z.isSelectable(s)))for(let o=r.depth;;o--){let a=Qs(t.doc,r.before(o),r.after(o),N.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(ur(s,"end")?U.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):z.create(l.doc,i.pos-s.nodeSize)),e(l.scrollIntoView())}return!0}if(o==1||r.node(o-1).childCount>1)break}return s.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos-s.nodeSize,i.pos).scrollIntoView()),!0):!1},vb=(t,e,n)=>{let r=Hf(t,n);if(!r)return!1;let i=kl(r);return i?qf(t,i,e):!1},Ab=(t,e,n)=>{let r=Vf(t,n);if(!r)return!1;let i=xl(r);return i?qf(t,i,e):!1};function qf(t,e,n){let r=e.nodeBefore,i=r,s=e.pos-1;for(;!i.isTextblock;s--){if(i.type.spec.isolating)return!1;let c=i.lastChild;if(!c)return!1;i=c}let o=e.nodeAfter,a=o,l=e.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let c=a.firstChild;if(!c)return!1;a=c}let u=Qs(t.doc,s,l,N.empty);if(!u||u.from!=s||u instanceof ve&&u.slice.size>=l-s)return!1;if(n){let c=t.tr.step(u);c.setSelection($.create(c.doc,s)),n(c.scrollIntoView())}return!0}function ur(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const Wf=(t,e,n)=>{let{$head:r,empty:i}=t.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;s=kl(r)}let o=s&&s.nodeBefore;return!o||!z.isSelectable(o)?!1:(e&&e(t.tr.setSelection(z.create(t.doc,s.pos-o.nodeSize)).scrollIntoView()),!0)};function kl(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function Vf(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const Kf=(t,e,n)=>{let r=Vf(t,n);if(!r)return!1;let i=xl(r);if(!i)return!1;let s=i.nodeAfter;if(Jf(t,i,e,1))return!0;if(r.parent.content.size==0&&(ur(s,"start")||z.isSelectable(s))){let o=Qs(t.doc,r.before(),r.after(),N.empty);if(o&&o.slice.size<o.to-o.from){if(e){let a=t.tr.step(o);a.setSelection(ur(s,"start")?U.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):z.create(a.doc,a.mapping.map(i.pos))),e(a.scrollIntoView())}return!0}}return s.isAtom&&i.depth==r.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+s.nodeSize).scrollIntoView()),!0):!1},Gf=(t,e,n)=>{let{$head:r,empty:i}=t.selection,s=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;s=xl(r)}let o=s&&s.nodeAfter;return!o||!z.isSelectable(o)?!1:(e&&e(t.tr.setSelection(z.create(t.doc,s.pos)).scrollIntoView()),!0)};function xl(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const Tb=(t,e)=>{let n=t.selection,r=n instanceof z,i;if(r){if(n.node.isTextblock||!En(t.doc,n.from))return!1;i=n.from}else if(i=Xs(t.doc,n.from,-1),i==null)return!1;if(e){let s=t.tr.join(i);r&&s.setSelection(z.create(s.doc,i-t.doc.resolve(i).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},Mb=(t,e)=>{let n=t.selection,r;if(n instanceof z){if(n.node.isTextblock||!En(t.doc,n.to))return!1;r=n.to}else if(r=Xs(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},Nb=(t,e)=>{let{$from:n,$to:r}=t.selection,i=n.blockRange(r),s=i&&br(i);return s==null?!1:(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)},jf=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
96
+ `).scrollIntoView()),!0)};function _l(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Ob=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),s=n.indexAfter(-1),o=_l(i.contentMatchAt(s));if(!o||!i.canReplaceWith(s,s,o))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,o.createAndFill());l.setSelection(U.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},Zf=(t,e)=>{let n=t.selection,{$from:r,$to:i}=n;if(n instanceof ut||r.parent.inlineContent||i.parent.inlineContent)return!1;let s=_l(i.parent.contentMatchAt(i.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let o=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=t.tr.insert(o,s.createAndFill());a.setSelection($.create(a.doc,o+1)),e(a.scrollIntoView())}return!0},Yf=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let s=n.before();if(Kt(t.doc,s))return e&&e(t.tr.split(s).scrollIntoView()),!0}let r=n.blockRange(),i=r&&br(r);return i==null?!1:(e&&e(t.tr.lift(r,i).scrollIntoView()),!0)};function Db(t){return(e,n)=>{let{$from:r,$to:i}=e.selection;if(e.selection instanceof z&&e.selection.node.isBlock)return!r.parentOffset||!Kt(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let s=[],o,a,l=!1,u=!1;for(let h=r.depth;;h--)if(r.node(h).isBlock){l=r.end(h)==r.pos+(r.depth-h),u=r.start(h)==r.pos-(r.depth-h),a=_l(r.node(h-1).contentMatchAt(r.indexAfter(h-1))),s.unshift(l&&a?{type:a}:null),o=h;break}else{if(h==1)return!1;s.unshift(null)}let c=e.tr;(e.selection instanceof $||e.selection instanceof ut)&&c.deleteSelection();let d=c.mapping.map(r.pos),f=Kt(c.doc,d,s.length,s);if(f||(s[0]=a?{type:a}:null,f=Kt(c.doc,d,s.length,s)),!f)return!1;if(c.split(d,s.length,s),!l&&u&&r.node(o).type!=a){let h=c.mapping.map(r.before(o)),p=c.doc.resolve(h);a&&r.node(o-1).canReplaceWith(p.index(),p.index()+1,a)&&c.setNodeMarkup(c.mapping.map(r.before(o)),a)}return n&&n(c.scrollIntoView()),!0}}const Rb=Db(),Ib=(t,e)=>{let{$from:n,to:r}=t.selection,i,s=n.sharedDepth(r);return s==0?!1:(i=n.before(s),e&&e(t.tr.setSelection(z.create(t.doc,i))),!0)};function Lb(t,e,n){let r=e.nodeBefore,i=e.nodeAfter,s=e.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(i.isTextblock||En(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function Jf(t,e,n,r){let i=e.nodeBefore,s=e.nodeAfter,o,a,l=i.type.spec.isolating||s.type.spec.isolating;if(!l&&Lb(t,e,n))return!0;let u=!l&&e.parent.canReplace(e.index(),e.index()+1);if(u&&(o=(a=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&a.matchType(o[0]||s.type).validEnd){if(n){let h=e.pos+s.nodeSize,p=v.empty;for(let b=o.length-1;b>=0;b--)p=v.from(o[b].create(null,p));p=v.from(i.copy(p));let m=t.tr.step(new Le(e.pos-1,h,e.pos,h,new N(p,1,0),o.length,!0)),g=m.doc.resolve(h+2*o.length);g.nodeAfter&&g.nodeAfter.type==i.type&&En(m.doc,g.pos)&&m.join(g.pos),n(m.scrollIntoView())}return!0}let c=s.type.spec.isolating||r>0&&l?null:U.findFrom(e,1),d=c&&c.$from.blockRange(c.$to),f=d&&br(d);if(f!=null&&f>=e.depth)return n&&n(t.tr.lift(d,f).scrollIntoView()),!0;if(u&&ur(s,"start",!0)&&ur(i,"end")){let h=i,p=[];for(;p.push(h),!h.isTextblock;)h=h.lastChild;let m=s,g=1;for(;!m.isTextblock;m=m.firstChild)g++;if(h.canReplace(h.childCount,h.childCount,m.content)){if(n){let b=v.empty;for(let k=p.length-1;k>=0;k--)b=v.from(p[k].copy(b));let y=t.tr.step(new Le(e.pos-p.length,e.pos+s.nodeSize,e.pos+g,e.pos+s.nodeSize-g,new N(b,p.length,0),0,!0));n(y.scrollIntoView())}return!0}}return!1}function Xf(t){return function(e,n){let r=e.selection,i=t<0?r.$from:r.$to,s=i.depth;for(;i.node(s).isInline;){if(!s)return!1;s--}return i.node(s).isTextblock?(n&&n(e.tr.setSelection($.create(e.doc,t<0?i.start(s):i.end(s)))),!0):!1}}const Pb=Xf(-1),Bb=Xf(1);function Fb(t,e=null){return function(n,r){let{$from:i,$to:s}=n.selection,o=i.blockRange(s),a=o&&gl(o,t,e);return a?(r&&r(n.tr.wrap(o,a).scrollIntoView()),!0):!1}}function ju(t,e=null){return function(n,r){let i=!1;for(let s=0;s<n.selection.ranges.length&&!i;s++){let{$from:{pos:o},$to:{pos:a}}=n.selection.ranges[s];n.doc.nodesBetween(o,a,(l,u)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)i=!0;else{let c=n.doc.resolve(u),d=c.index();i=c.parent.canReplaceWith(d,d+1,t)}})}if(!i)return!1;if(r){let s=n.tr;for(let o=0;o<n.selection.ranges.length;o++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[o];s.setBlockType(a,l,t,e)}r(s.scrollIntoView())}return!0}}function wl(...t){return function(e,n,r){for(let i=0;i<t.length;i++)if(t[i](e,n,r))return!0;return!1}}wl(El,Uf,Wf);wl(El,Kf,Gf);wl(jf,Zf,Yf,Rb);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function zb(t,e=null){return function(n,r){let{$from:i,$to:s}=n.selection,o=i.blockRange(s);if(!o)return!1;let a=r?n.tr:null;return $b(a,o,t,e)?(r&&r(a.scrollIntoView()),!0):!1}}function $b(t,e,n,r=null){let i=!1,s=e,o=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let l=o.resolve(e.start-2);s=new rs(l,l,e.depth),e.endIndex<e.parent.childCount&&(e=new rs(e.$from,o.resolve(e.$to.end(e.depth)),e.depth)),i=!0}let a=gl(s,n,r,e);return a?(t&&Hb(t,e,a,i,n),!0):!1}function Hb(t,e,n,r,i){let s=v.empty;for(let c=n.length-1;c>=0;c--)s=v.from(n[c].type.create(n[c].attrs,s));t.step(new Le(e.start-(r?2:0),e.end,e.start,e.end,new N(s,0,0),n.length,!0));let o=0;for(let c=0;c<n.length;c++)n[c].type==i&&(o=c+1);let a=n.length-o,l=e.start+n.length-(r?2:0),u=e.parent;for(let c=e.startIndex,d=e.endIndex,f=!0;c<d;c++,f=!1)!f&&Kt(t.doc,l,a)&&(t.split(l,a),l+=2*a),l+=u.child(c).nodeSize;return t}function Ub(t){return function(e,n){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,o=>o.childCount>0&&o.firstChild.type==t);return s?n?r.node(s.depth-1).type==t?qb(e,n,t,s):Wb(e,n,s):!0:!1}}function qb(t,e,n,r){let i=t.tr,s=r.end,o=r.$to.end(r.depth);s<o&&(i.step(new Le(s-1,o,s,o,new N(v.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new rs(i.doc.resolve(r.$from.pos),i.doc.resolve(o),r.depth));const a=br(r);if(a==null)return!1;i.lift(r,a);let l=i.doc.resolve(i.mapping.map(s,-1)-1);return En(i.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&i.join(l.pos),e(i.scrollIntoView()),!0}function Wb(t,e,n){let r=t.tr,i=n.parent;for(let h=n.end,p=n.endIndex-1,m=n.startIndex;p>m;p--)h-=i.child(p).nodeSize,r.delete(h-1,h+1);let s=r.doc.resolve(n.start),o=s.nodeAfter;if(r.mapping.map(n.end)!=n.start+s.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==i.childCount,u=s.node(-1),c=s.index(-1);if(!u.canReplace(c+(a?0:1),c+1,o.content.append(l?v.empty:v.from(i))))return!1;let d=s.pos,f=d+o.nodeSize;return r.step(new Le(d-(a?1:0),f+(l?1:0),d+1,f-1,new N((a?v.empty:v.from(i.copy(v.empty))).append(l?v.empty:v.from(i.copy(v.empty))),a?0:1,l?0:1),a?0:1)),e(r.scrollIntoView()),!0}function Vb(t){return function(e,n){let{$from:r,$to:i}=e.selection,s=r.blockRange(i,u=>u.childCount>0&&u.firstChild.type==t);if(!s)return!1;let o=s.startIndex;if(o==0)return!1;let a=s.parent,l=a.child(o-1);if(l.type!=t)return!1;if(n){let u=l.lastChild&&l.lastChild.type==a.type,c=v.from(u?t.create():null),d=new N(v.from(t.create(null,v.from(a.type.create(null,c)))),u?3:1,0),f=s.start,h=s.end;n(e.tr.step(new Le(f-(u?3:1),h,f,h,d,1,!0)).scrollIntoView())}return!0}}const Ue=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},cr=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let Oa=null;const qt=function(t,e,n){let r=Oa||(Oa=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},Kb=function(){Oa=null},zn=function(t,e,n,r){return n&&(Zu(t,e,n,r,-1)||Zu(t,e,n,r,1))},Gb=/^(img|br|input|textarea|hr)$/i;function Zu(t,e,n,r,i){for(var s;;){if(t==n&&e==r)return!0;if(e==(i<0?0:pt(t))){let o=t.parentNode;if(!o||o.nodeType!=1||oi(t)||Gb.test(t.nodeName)||t.contentEditable=="false")return!1;e=Ue(t)+(i<0?0:1),t=o}else if(t.nodeType==1){let o=t.childNodes[e+(i<0?-1:0)];if(o.nodeType==1&&o.contentEditable=="false")if(!((s=o.pmViewDesc)===null||s===void 0)&&s.ignoreForSelection)e+=i;else return!1;else t=o,e=i<0?pt(t):0}else return!1}}function pt(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function jb(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=pt(t)}else if(t.parentNode&&!oi(t))e=Ue(t),t=t.parentNode;else return null}}function Zb(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!oi(t))e=Ue(t)+1,t=t.parentNode;else return null}}function Yb(t,e,n){for(let r=e==0,i=e==pt(t);r||i;){if(t==n)return!0;let s=Ue(t);if(t=t.parentNode,!t)return!1;r=r&&s==0,i=i&&s==pt(t)}}function oi(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const to=function(t){return t.focusNode&&zn(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function vn(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function Jb(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Xb(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(pt(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(pt(r.startContainer),r.startOffset)}}}const Nt=typeof navigator<"u"?navigator:null,Yu=typeof document<"u"?document:null,kn=Nt&&Nt.userAgent||"",Da=/Edge\/(\d+)/.exec(kn),Qf=/MSIE \d/.exec(kn),Ra=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(kn),nt=!!(Qf||Ra||Da),hn=Qf?document.documentMode:Ra?+Ra[1]:Da?+Da[1]:0,mt=!nt&&/gecko\/(\d+)/i.test(kn);mt&&+(/Firefox\/(\d+)/.exec(kn)||[0,0])[1];const Ia=!nt&&/Chrome\/(\d+)/.exec(kn),qe=!!Ia,eh=Ia?+Ia[1]:0,Ge=!nt&&!!Nt&&/Apple Computer/.test(Nt.vendor),dr=Ge&&(/Mobile\/\w+/.test(kn)||!!Nt&&Nt.maxTouchPoints>2),ht=dr||(Nt?/Mac/.test(Nt.platform):!1),th=Nt?/Win/.test(Nt.platform):!1,Wt=/Android \d/.test(kn),ai=!!Yu&&"webkitFontSmoothing"in Yu.documentElement.style,Qb=ai?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function e1(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Ft(t,e){return typeof t=="number"?t:t[e]}function t1(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function Ju(t,e,n){let r=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,s=t.dom.ownerDocument;for(let o=n||t.dom;o;){if(o.nodeType!=1){o=cr(o);continue}let a=o,l=a==s.body,u=l?e1(s):t1(a),c=0,d=0;if(e.top<u.top+Ft(r,"top")?d=-(u.top-e.top+Ft(i,"top")):e.bottom>u.bottom-Ft(r,"bottom")&&(d=e.bottom-e.top>u.bottom-u.top?e.top+Ft(i,"top")-u.top:e.bottom-u.bottom+Ft(i,"bottom")),e.left<u.left+Ft(r,"left")?c=-(u.left-e.left+Ft(i,"left")):e.right>u.right-Ft(r,"right")&&(c=e.right-u.right+Ft(i,"right")),c||d)if(l)s.defaultView.scrollBy(c,d);else{let h=a.scrollLeft,p=a.scrollTop;d&&(a.scrollTop+=d),c&&(a.scrollLeft+=c);let m=a.scrollLeft-h,g=a.scrollTop-p;e={left:e.left-m,top:e.top-g,right:e.right-m,bottom:e.bottom-g}}let f=l?"fixed":getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(f))break;o=f=="absolute"?o.offsetParent:cr(o)}}function n1(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,i;for(let s=(e.left+e.right)/2,o=n+1;o<Math.min(innerHeight,e.bottom);o+=5){let a=t.root.elementFromPoint(s,o);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,i=l.top;break}}return{refDOM:r,refTop:i,stack:nh(t.dom)}}function nh(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=cr(r));return e}function r1({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;rh(n,r==0?0:r-e)}function rh(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:i,left:s}=t[n];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=s&&(r.scrollLeft=s)}}let Yn=null;function i1(t){if(t.setActive)return t.setActive();if(Yn)return t.focus(Yn);let e=nh(t);t.focus(Yn==null?{get preventScroll(){return Yn={preventScroll:!0},!0}}:void 0),Yn||(Yn=!1,rh(e,0))}function ih(t,e){let n,r=2e8,i,s=0,o=e.top,a=e.top,l,u;for(let c=t.firstChild,d=0;c;c=c.nextSibling,d++){let f;if(c.nodeType==1)f=c.getClientRects();else if(c.nodeType==3)f=qt(c).getClientRects();else continue;for(let h=0;h<f.length;h++){let p=f[h];if(p.top<=o&&p.bottom>=a){o=Math.max(p.bottom,o),a=Math.min(p.top,a);let m=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(m<r){n=c,r=m,i=m&&n.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,c.nodeType==1&&m&&(s=d+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!l&&p.left<=e.left&&p.right>=e.left&&(l=c,u={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(s=d+1)}}return!n&&l&&(n=l,i=u,r=0),n&&n.nodeType==3?s1(n,i):!n||r&&n.nodeType==1?{node:t,offset:s}:ih(n,i)}function s1(t,e){let n=t.nodeValue.length,r=document.createRange(),i;for(let s=0;s<n;s++){r.setEnd(t,s+1),r.setStart(t,s);let o=Xt(r,1);if(o.top!=o.bottom&&Cl(e,o)){i={node:t,offset:s+(e.left>=(o.left+o.right)/2?1:0)};break}}return r.detach(),i||{node:t,offset:0}}function Cl(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function o1(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function a1(t,e,n){let{node:r,offset:i}=ih(e,n),s=-1;if(r.nodeType==1&&!r.firstChild){let o=r.getBoundingClientRect();s=o.left!=o.right&&n.left>(o.left+o.right)/2?1:-1}return t.docView.posFromDOM(r,i,s)}function l1(t,e,n,r){let i=-1;for(let s=e,o=!1;s!=t.dom;){let a=t.docView.nearestDesc(s,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(a.dom.nodeName)&&(!o&&l.left>r.left||l.top>r.top?i=a.posBefore:(!o&&l.right<r.left||l.bottom<r.top)&&(i=a.posAfter),o=!0),!a.contentDOM&&i<0&&!a.node.isText))return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;s=a.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}function sh(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),s=i;;){let o=t.childNodes[s];if(o.nodeType==1){let a=o.getClientRects();for(let l=0;l<a.length;l++){let u=a[l];if(Cl(e,u))return sh(o,e,u)}}if((s=(s+1)%r)==i)break}return t}function u1(t,e){let n=t.dom.ownerDocument,r,i=0,s=Xb(n,e.left,e.top);s&&({node:r,offset:i}=s);let o=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!o||!t.dom.contains(o.nodeType!=1?o.parentNode:o)){let u=t.dom.getBoundingClientRect();if(!Cl(e,u)||(o=sh(t.dom,e,u),!o))return null}if(Ge)for(let u=o;r&&u;u=cr(u))u.draggable&&(r=void 0);if(o=o1(o,e),r){if(mt&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let c=r.childNodes[i],d;c.nodeName=="IMG"&&(d=c.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&i++}let u;ai&&i&&r.nodeType==1&&(u=r.childNodes[i-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&i--,r==t.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=l1(t,r,i,e))}a==null&&(a=a1(t,o,e));let l=t.docView.nearestDesc(o,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function Xu(t){return t.top<t.bottom||t.left<t.right}function Xt(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(Xu(r))return r}return Array.prototype.find.call(n,Xu)||t.getBoundingClientRect()}const c1=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function oh(t,e,n){let{node:r,offset:i,atom:s}=t.docView.domFromPos(e,n<0?-1:1),o=ai||mt;if(r.nodeType==3)if(o&&(c1.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let l=Xt(qt(r,i,i),n);if(mt&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let u=Xt(qt(r,i-1,i-1),-1);if(u.top==l.top){let c=Xt(qt(r,i,i+1),-1);if(c.top!=l.top)return xr(c,c.left<u.left)}}return l}else{let l=i,u=i,c=n<0?1:-1;return n<0&&!i?(u++,c=-1):n>=0&&i==r.nodeValue.length?(l--,c=1):n<0?l--:u++,xr(Xt(qt(r,l,u),c),c<0)}if(!t.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(n<0||i==pt(r))){let l=r.childNodes[i-1];if(l.nodeType==1)return Uo(l.getBoundingClientRect(),!1)}if(s==null&&i<pt(r)){let l=r.childNodes[i];if(l.nodeType==1)return Uo(l.getBoundingClientRect(),!0)}return Uo(r.getBoundingClientRect(),n>=0)}if(s==null&&i&&(n<0||i==pt(r))){let l=r.childNodes[i-1],u=l.nodeType==3?qt(l,pt(l)-(o?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(u)return xr(Xt(u,1),!1)}if(s==null&&i<pt(r)){let l=r.childNodes[i];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let u=l?l.nodeType==3?qt(l,0,o?0:1):l.nodeType==1?l:null:null;if(u)return xr(Xt(u,-1),!0)}return xr(Xt(r.nodeType==3?qt(r):r,-n),n>=0)}function xr(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Uo(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function ah(t,e,n){let r=t.state,i=t.root.activeElement;r!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),i!=t.dom&&i&&i.focus()}}function d1(t,e,n){let r=e.selection,i=n=="up"?r.$from:r.$to;return ah(t,e,()=>{let{node:s}=t.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(s,!0);if(!a)break;if(a.node.isBlock){s=a.contentDOM||a.dom;break}s=a.dom.parentNode}let o=oh(t,i.pos,1);for(let a=s.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=qt(a,0,a.nodeValue.length).getClientRects();else continue;for(let u=0;u<l.length;u++){let c=l[u];if(c.bottom>c.top+1&&(n=="up"?o.top-c.top>(c.bottom-o.top)*2:c.bottom-o.bottom>(o.bottom-c.top)*2))return!1}}return!0})}const f1=/[\u0590-\u08ac]/;function h1(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,s=!i,o=i==r.parent.content.size,a=t.domSelection();return a?!f1.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?s:o:ah(t,e,()=>{let{focusNode:l,focusOffset:u,anchorNode:c,anchorOffset:d}=t.domSelectionRange(),f=a.caretBidiLevel;a.modify("move",n,"character");let h=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:p,focusOffset:m}=t.domSelectionRange(),g=p&&!h.contains(p.nodeType==1?p:p.parentNode)||l==p&&u==m;try{a.collapse(c,d),l&&(l!=c||u!=d)&&a.extend&&a.extend(l,u)}catch{}return f!=null&&(a.caretBidiLevel=f),g}):r.pos==r.start()||r.pos==r.end()}let Qu=null,ec=null,tc=!1;function p1(t,e,n){return Qu==e&&ec==n?tc:(Qu=e,ec=n,tc=n=="up"||n=="down"?d1(t,e,n):h1(t,e,n))}const gt=0,nc=1,An=2,Ot=3;class li{constructor(e,n,r,i){this.parent=e,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=gt,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==e)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let s,o;if(e==this.contentDOM)s=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((o=s.pmViewDesc)&&o.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(o)+o.size:this.posAtStart}else{let s,o;if(e==this.contentDOM)s=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((o=s.pmViewDesc)&&o.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(o):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=n>Ue(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,i=e;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!n||s.node))if(r&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return s}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let i=e;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],s=r+i.size;if(r==e&&s!=r){for(;!i.border&&i.children.length;)for(let o=0;o<i.children.length;o++){let a=i.children[o];if(a.size){i=a;break}}return i}if(e<s)return i.descAt(e-r-i.border);r=s}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let s=0;r<this.children.length;r++){let o=this.children[r],a=s+o.size;if(a>e||o instanceof uh){i=e-s;break}s=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof lh&&s.side>=0;r--);if(n<=0){let s,o=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,o=!1);return s&&n&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,n):{node:this.contentDOM,offset:s?Ue(s.dom)+1:0}}else{let s,o=!0;for(;s=r<this.children.length?this.children[r]:null,!(!s||s.dom.parentNode==this.contentDOM);r++,o=!1);return s&&o&&!s.border&&!s.domAtom?s.domFromPos(0,n):{node:this.contentDOM,offset:s?Ue(s.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,s=-1;for(let o=r,a=0;;a++){let l=this.children[a],u=o+l.size;if(i==-1&&e<=u){let c=o+l.border;if(e>=c&&n<=u-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,c);e=o;for(let d=a;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){i=Ue(f.dom)+1;break}e-=f.size}i==-1&&(i=0)}if(i>-1&&(u>n||a==this.children.length-1)){n=u;for(let c=a+1;c<this.children.length;c++){let d=this.children[c];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){s=Ue(d.dom);break}n+=d.size}s==-1&&(s=this.contentDOM.childNodes.length);break}o=u}return{node:this.contentDOM,from:e,to:n,fromOffset:i,toOffset:s}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,i=!1){let s=Math.min(e,n),o=Math.max(e,n);for(let h=0,p=0;h<this.children.length;h++){let m=this.children[h],g=p+m.size;if(s>p&&o<g)return m.setSelection(e-p-m.border,n-p-m.border,r,i);p=g}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),u=r.root.getSelection(),c=r.domSelectionRange(),d=!1;if((mt||Ge)&&e==n){let{node:h,offset:p}=a;if(h.nodeType==3){if(d=!!(p&&h.nodeValue[p-1]==`
97
+ `),d&&p==h.nodeValue.length)for(let m=h,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(a=l={node:g.parentNode,offset:Ue(g)+1});break}let b=m.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let m=h.childNodes[p-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(mt&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let h=c.focusNode.childNodes[c.focusOffset];h&&h.contentEditable=="false"&&(i=!0)}if(!(i||d&&Ge)&&zn(a.node,a.offset,c.anchorNode,c.anchorOffset)&&zn(l.node,l.offset,c.focusNode,c.focusOffset))return;let f=!1;if((u.extend||e==n)&&!(d&&mt)){u.collapse(a.node,a.offset);try{e!=n&&u.extend(l.node,l.offset),f=!0}catch{}}if(!f){if(e>n){let p=a;a=l,l=p}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(a.node,a.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,i=0;i<this.children.length;i++){let s=this.children[i],o=r+s.size;if(r==o?e<=o&&n>=r:e<o&&n>r){let a=r+s.border,l=o-s.border;if(e>=a&&n<=l){this.dirty=e==r||n==o?An:nc,e==a&&n==l&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Ot:s.markDirty(e-a,n-a);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?An:Ot}r=o}this.dirty=An}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?An:nc;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class lh extends li{constructor(e,n,r,i){let s,o=n.type.toDOM;if(typeof o=="function"&&(o=o(r,()=>{if(!s)return i;if(s.parent)return s.parent.posBeforeChild(s)})),!n.type.spec.raw){if(o.nodeType!=1){let a=document.createElement("span");a.appendChild(o),o=a}o.contentEditable="false",o.classList.add("ProseMirror-widget")}super(e,[],o,null),this.widget=n,this.widget=n,s=this}matchesWidget(e){return this.dirty==gt&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class m1 extends li{constructor(e,n,r,i){super(e,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class $n extends li{constructor(e,n,r,i,s){super(e,[],r,i),this.mark=n,this.spec=s}static create(e,n,r,i){let s=i.nodeViews[n.type.name],o=s&&s(n,i,r);return(!o||!o.dom)&&(o=Wn.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new $n(e,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&Ot||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ot&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=gt){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=gt}}slice(e,n,r){let i=$n.create(this.parent,this.mark,!0,r),s=this.children,o=this.size;n<o&&(s=Pa(s,n,o,r)),e>0&&(s=Pa(s,0,e,r));for(let a=0;a<s.length;a++)s[a].parent=i;return i.children=s,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class pn extends li{constructor(e,n,r,i,s,o,a,l,u){super(e,[],s,o),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(e,n,r,i,s,o){let a=s.nodeViews[n.type.name],l,u=a&&a(n,s,()=>{if(!l)return o;if(l.parent)return l.parent.posBeforeChild(l)},r,i),c=u&&u.dom,d=u&&u.contentDOM;if(n.isText){if(!c)c=document.createTextNode(n.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:d}=Wn.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),n.type.spec.draggable&&(c.draggable=!0));let f=c;return c=fh(c,r,n),u?l=new g1(e,n,r,i,c,d||null,f,u,s,o+1):n.isText?new no(e,n,r,i,c,f,s):new pn(e,n,r,i,c,d||null,f,s,o+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>v.empty)}return e}matchesNode(e,n,r){return this.dirty==gt&&e.eq(this.node)&&ss(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,i=n,s=e.composing?this.localCompositionInfo(e,n):null,o=s&&s.pos>-1?s:null,a=s&&s.pos<0,l=new y1(this,o&&o.node,e);x1(this.node,this.innerDeco,(u,c,d)=>{u.spec.marks?l.syncToMarks(u.spec.marks,r,e,c):u.type.side>=0&&!d&&l.syncToMarks(c==this.node.childCount?te.none:this.node.child(c).marks,r,e,c),l.placeWidget(u,e,i)},(u,c,d,f)=>{l.syncToMarks(u.marks,r,e,f);let h;l.findNodeMatch(u,c,d,f)||a&&e.state.selection.from>i&&e.state.selection.to<i+u.nodeSize&&(h=l.findIndexWithChild(s.node))>-1&&l.updateNodeAt(u,c,d,h,e)||l.updateNextNode(u,c,d,e,f,i)||l.addNode(u,c,d,e,i),i+=u.nodeSize}),l.syncToMarks([],r,e,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==An)&&(o&&this.protectLocalComposition(e,o),ch(this.contentDOM,this.children,e),dr&&_1(this.dom))}localCompositionInfo(e,n){let{from:r,to:i}=e.state.selection;if(!(e.state.selection instanceof $)||r<n||i>n+this.node.content.size)return null;let s=e.input.compositionNode;if(!s||!this.dom.contains(s.parentNode))return null;if(this.node.inlineContent){let o=s.nodeValue,a=w1(this.node.content,o,r-n,i-n);return a<0?null:{node:s,pos:a,text:o}}else return{node:s,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let s=n;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let o=new m1(this,s,n,i);e.input.compositionNodes.push(o),this.children=Pa(this.children,r,r+i.length,e,o)}update(e,n,r,i){return this.dirty==Ot||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,i),!0)}updateInner(e,n,r,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=gt}updateOuterDeco(e){if(ss(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=dh(this.dom,this.nodeDOM,La(this.outerDeco,this.node,n),La(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function rc(t,e,n,r,i){fh(r,e,t);let s=new pn(void 0,t,e,n,r,r,r,i,0);return s.contentDOM&&s.updateChildren(i,0),s}class no extends pn{constructor(e,n,r,i,s,o,a){super(e,n,r,i,s,null,o,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,i){return this.dirty==Ot||this.dirty!=gt&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=gt||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=gt,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let i=this.node.cut(e,n),s=document.createTextNode(i.text);return new no(this.parent,i,this.outerDeco,this.innerDeco,s,s,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ot)}get domAtom(){return!1}isText(e){return this.node.text==e}}class uh extends li{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==gt&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class g1 extends pn{constructor(e,n,r,i,s,o,a,l,u,c){super(e,n,r,i,s,o,a,u,c),this.spec=l}update(e,n,r,i){if(this.dirty==Ot)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let s=this.spec.update(e,n,r);return s&&this.updateInner(e,n,r,i),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,i){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function ch(t,e,n){let r=t.firstChild,i=!1;for(let s=0;s<e.length;s++){let o=e[s],a=o.dom;if(a.parentNode==t){for(;a!=r;)r=ic(r),i=!0;r=r.nextSibling}else i=!0,t.insertBefore(a,r);if(o instanceof $n){let l=r?r.previousSibling:t.lastChild;ch(o.contentDOM,o.children,n),r=l?l.nextSibling:t.firstChild}}for(;r;)r=ic(r),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const Lr=function(t){t&&(this.nodeName=t)};Lr.prototype=Object.create(null);const Tn=[new Lr];function La(t,e,n){if(t.length==0)return Tn;let r=n?Tn[0]:new Lr,i=[r];for(let s=0;s<t.length;s++){let o=t[s].type.attrs;if(o){o.nodeName&&i.push(r=new Lr(o.nodeName));for(let a in o){let l=o[a];l!=null&&(n&&i.length==1&&i.push(r=new Lr(e.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return i}function dh(t,e,n,r){if(n==Tn&&r==Tn)return e;let i=e;for(let s=0;s<r.length;s++){let o=r[s],a=n[s];if(s){let l;a&&a.nodeName==o.nodeName&&i!=t&&(l=i.parentNode)&&l.nodeName.toLowerCase()==o.nodeName||(l=document.createElement(o.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=Tn[0]),i=l}b1(i,a||Tn[0],o)}return i}function b1(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let s=0;s<r.length;s++)i.indexOf(r[s])==-1&&t.classList.remove(r[s]);for(let s=0;s<i.length;s++)r.indexOf(i[s])==-1&&t.classList.add(i[s]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(e.style);)t.style.removeProperty(i[1])}n.style&&(t.style.cssText+=n.style)}}function fh(t,e,n){return dh(t,t,Tn,La(e,n,t.nodeType!=1))}function ss(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function ic(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class y1{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=E1(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,i){let s=0,o=this.stack.length>>1,a=Math.min(o,e.length);for(;s<a&&(s==o-1?this.top:this.stack[s+1<<1]).matchesMark(e[s])&&e[s].type.spec.spanning!==!1;)s++;for(;s<o;)this.destroyRest(),this.top.dirty=gt,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let l=-1,u=this.top.children.length;i<this.preMatch.index&&(u=Math.min(this.index+3,u));for(let c=this.index;c<u;c++){let d=this.top.children[c];if(d.matchesMark(e[o])&&!this.isLocked(d.dom)){l=c;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let c=$n.create(this.top,e[o],n,r);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}}findNodeMatch(e,n,r,i){let s=-1,o;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(e,n,r))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let u=this.top.children[a];if(u.matchesNode(e,n,r)&&!this.preMatch.matched.has(u)){s=a;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,n,r,i,s){let o=this.top.children[i];return o.dirty==Ot&&o.dom==o.contentDOM&&(o.dirty=An),o.update(e,n,r,s)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}e=n}}updateNextNode(e,n,r,i,s,o){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof pn){let u=this.preMatch.matched.get(l);if(u!=null&&u!=s)return!1;let c=l.dom,d,f=this.isLocked(c)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=Ot&&ss(n,l.outerDeco));if(!f&&l.update(e,n,r,i))return this.destroyBetween(this.index,a),l.dom!=c&&(this.changed=!0),this.index++,!0;if(!f&&(d=this.recreateWrapper(l,e,n,r,i,o)))return this.destroyBetween(this.index,a),this.top.children[this.index]=d,d.contentDOM&&(d.dirty=An,d.updateChildren(i,o+1),d.dirty=gt),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,i,s,o){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!ss(r,e.outerDeco)||!i.eq(e.innerDeco))return null;let a=pn.create(this.top,n,r,i,s,o);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,r,i,s){let o=pn.create(this.top,e,n,r,i,s);o.contentDOM&&o.updateChildren(i,s+1),this.top.children.splice(this.index++,0,o),this.changed=!0}placeWidget(e,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let s=new lh(this.top,e,n,r);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof $n;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof no)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Ge||qe)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new uh(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function E1(t,e){let n=e,r=n.children.length,i=t.childCount,s=new Map,o=[];e:for(;i>0;){let a;for(;;)if(r){let u=n.children[r-1];if(u instanceof $n)n=u,r=u.children.length;else{a=u,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(i-1))break;--i,s.set(a,i),o.push(a)}}return{index:i,matched:s,matches:o.reverse()}}function k1(t,e){return t.type.side-e.type.side}function x1(t,e,n,r){let i=e.locals(t),s=0;if(i.length==0){for(let u=0;u<t.childCount;u++){let c=t.child(u);r(c,i,e.forChild(s,c),u),s+=c.nodeSize}return}let o=0,a=[],l=null;for(let u=0;;){let c,d;for(;o<i.length&&i[o].to==s;){let g=i[o++];g.widget&&(c?(d||(d=[c])).push(g):c=g)}if(c)if(d){d.sort(k1);for(let g=0;g<d.length;g++)n(d[g],u,!!l)}else n(c,u,!!l);let f,h;if(l)h=-1,f=l,l=null;else if(u<t.childCount)h=u,f=t.child(u++);else break;for(let g=0;g<a.length;g++)a[g].to<=s&&a.splice(g--,1);for(;o<i.length&&i[o].from<=s&&i[o].to>s;)a.push(i[o++]);let p=s+f.nodeSize;if(f.isText){let g=p;o<i.length&&i[o].from<g&&(g=i[o].from);for(let b=0;b<a.length;b++)a[b].to<g&&(g=a[b].to);g<p&&(l=f.cut(g-s),f=f.cut(0,g-s),p=g,h=-1)}else for(;o<i.length&&i[o].to<p;)o++;let m=f.isInline&&!f.isLeaf?a.filter(g=>!g.inline):a.slice();r(f,m,e.forChild(s,f),h),s=p}}function _1(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function w1(t,e,n,r){for(let i=0,s=0;i<t.childCount&&s<=r;){let o=t.child(i++),a=s;if(s+=o.nodeSize,!o.isText)continue;let l=o.text;for(;i<t.childCount;){let u=t.child(i++);if(s+=u.nodeSize,!u.isText)break;l+=u.text}if(s>=n){if(s>=r&&l.slice(r-e.length-a,r-a)==e)return r-e.length;let u=a<r?l.lastIndexOf(e,r-a-1):-1;if(u>=0&&u+e.length+a>=n)return a+u;if(n==r&&l.length>=r+e.length-a&&l.slice(r-a,r-a+e.length)==e)return r}}return-1}function Pa(t,e,n,r,i){let s=[];for(let o=0,a=0;o<t.length;o++){let l=t[o],u=a,c=a+=l.size;u>=n||c<=e?s.push(l):(u<e&&s.push(l.slice(0,e-u,r)),i&&(s.push(i),i=void 0),c>n&&s.push(l.slice(n-u,l.size,r)))}return s}function Sl(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),s=i&&i.size==0,o=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let a=r.resolve(o),l,u;if(to(n)){for(l=o;i&&!i.node;)i=i.parent;let d=i.node;if(i&&d.isAtom&&z.isSelectable(d)&&i.parent&&!(d.isInline&&Yb(n.focusNode,n.focusOffset,i.dom))){let f=i.posBefore;u=new z(o==f?a:r.resolve(f))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let d=o,f=o;for(let h=0;h<n.rangeCount;h++){let p=n.getRangeAt(h);d=Math.min(d,t.docView.posFromDOM(p.startContainer,p.startOffset,1)),f=Math.max(f,t.docView.posFromDOM(p.endContainer,p.endOffset,-1))}if(d<0)return null;[l,o]=f==t.state.selection.anchor?[f,d]:[d,f],a=r.resolve(o)}else l=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let c=r.resolve(l);if(!u){let d=e=="pointer"||t.state.selection.head<a.pos&&!s?1:-1;u=vl(t,c,a,d)}return u}function hh(t){return t.editable?t.hasFocus():mh(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function Gt(t,e=!1){let n=t.state.selection;if(ph(t,n),!!hh(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&qe){let r=t.domSelectionRange(),i=t.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&zn(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)S1(t);else{let{anchor:r,head:i}=n,s,o;sc&&!(n instanceof $)&&(n.$from.parent.inlineContent||(s=oc(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=oc(t,n.to))),t.docView.setSelection(r,i,t,e),sc&&(s&&ac(s),o&&ac(o)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&C1(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const sc=Ge||qe&&eh<63;function oc(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),i=r<n.childNodes.length?n.childNodes[r]:null,s=r?n.childNodes[r-1]:null;if(Ge&&i&&i.contentEditable=="false")return qo(i);if((!i||i.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(i)return qo(i);if(s)return qo(s)}}function qo(t){return t.contentEditable="true",Ge&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function ac(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function C1(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!hh(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function S1(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,Ue(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&nt&&hn<=11&&(n.disabled=!0,n.disabled=!1)}function ph(t,e){if(e instanceof z){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(lc(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else lc(t)}function lc(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function vl(t,e,n,r){return t.someProp("createSelectionBetween",i=>i(t,e,n))||$.between(e,n,r)}function uc(t){return t.editable&&!t.hasFocus()?!1:mh(t)}function mh(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function v1(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return zn(e.node,e.offset,n.anchorNode,n.anchorOffset)}function Ba(t,e){let{$anchor:n,$head:r}=t.selection,i=e>0?n.max(r):n.min(r),s=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return s&&U.findFrom(s,e)}function Qt(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function cc(t,e,n){let r=t.state.selection;if(r instanceof $)if(n.indexOf("s")>-1){let{$head:i}=r,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let o=t.state.doc.resolve(i.pos+s.nodeSize*(e<0?-1:1));return Qt(t,new $(r.$anchor,o))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=Ba(t.state,e);return i&&i instanceof z?Qt(t,i):!1}else if(!(ht&&n.indexOf("m")>-1)){let i=r.$head,s=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,o;if(!s||s.isText)return!1;let a=e<0?i.pos-s.nodeSize:i.pos;return s.isAtom||(o=t.docView.descAt(a))&&!o.contentDOM?z.isSelectable(s)?Qt(t,new z(e<0?t.state.doc.resolve(i.pos-s.nodeSize):i)):ai?Qt(t,new $(t.state.doc.resolve(e<0?a:a+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof z&&r.node.isInline)return Qt(t,new $(e>0?r.$to:r.$from));{let i=Ba(t.state,e);return i?Qt(t,i):!1}}}function as(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Pr(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Jn(t,e){return e<0?A1(t):T1(t)}function A1(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i,s,o=!1;for(mt&&n.nodeType==1&&r<as(n)&&Pr(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(Pr(a,-1))i=n,s=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(gh(n))break;{let a=n.previousSibling;for(;a&&Pr(a,-1);)i=n.parentNode,s=Ue(a),a=a.previousSibling;if(a)n=a,r=as(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}o?Fa(t,n,r):i&&Fa(t,i,s)}function T1(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let i=as(n),s,o;for(;;)if(r<i){if(n.nodeType!=1)break;let a=n.childNodes[r];if(Pr(a,1))s=n,o=++r;else break}else{if(gh(n))break;{let a=n.nextSibling;for(;a&&Pr(a,1);)s=a.parentNode,o=Ue(a)+1,a=a.nextSibling;if(a)n=a,r=0,i=as(n);else{if(n=n.parentNode,n==t.dom)break;r=i=0}}}s&&Fa(t,s,o)}function gh(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function M1(t,e){for(;t&&e==t.childNodes.length&&!oi(t);)e=Ue(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function N1(t,e){for(;t&&!e&&!oi(t);)e=Ue(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function Fa(t,e,n){if(e.nodeType!=3){let s,o;(o=M1(e,n))?(e=o,n=0):(s=N1(e,n))&&(e=s,n=s.nodeValue.length)}let r=t.domSelection();if(!r)return;if(to(r)){let s=document.createRange();s.setEnd(e,n),s.setStart(e,n),r.removeAllRanges(),r.addRange(s)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&Gt(t)},50)}function dc(t,e){let n=t.state.doc.resolve(e);if(!(qe||th)&&n.parent.inlineContent){let i=t.coordsAtPos(e);if(e>n.start()){let s=t.coordsAtPos(e-1),o=(s.top+s.bottom)/2;if(o>i.top&&o<i.bottom&&Math.abs(s.left-i.left)>1)return s.left<i.left?"ltr":"rtl"}if(e<n.end()){let s=t.coordsAtPos(e+1),o=(s.top+s.bottom)/2;if(o>i.top&&o<i.bottom&&Math.abs(s.left-i.left)>1)return s.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function fc(t,e,n){let r=t.state.selection;if(r instanceof $&&!r.empty||n.indexOf("s")>-1||ht&&n.indexOf("m")>-1)return!1;let{$from:i,$to:s}=r;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let o=Ba(t.state,e);if(o&&o instanceof z)return Qt(t,o)}if(!i.parent.inlineContent){let o=e<0?i:s,a=r instanceof ut?U.near(o,e):U.findFrom(o,e);return a?Qt(t,a):!1}return!1}function hc(t,e){if(!(t.state.selection instanceof $))return!0;let{$head:n,$anchor:r,empty:i}=t.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(s&&!s.isText){let o=t.state.tr;return e<0?o.delete(n.pos-s.nodeSize,n.pos):o.delete(n.pos,n.pos+s.nodeSize),t.dispatch(o),!0}return!1}function pc(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function O1(t){if(!Ge||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;pc(t,r,"true"),setTimeout(()=>pc(t,r,"false"),20)}return!1}function D1(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function R1(t,e){let n=e.keyCode,r=D1(e);if(n==8||ht&&n==72&&r=="c")return hc(t,-1)||Jn(t,-1);if(n==46&&!e.shiftKey||ht&&n==68&&r=="c")return hc(t,1)||Jn(t,1);if(n==13||n==27)return!0;if(n==37||ht&&n==66&&r=="c"){let i=n==37?dc(t,t.state.selection.from)=="ltr"?-1:1:-1;return cc(t,i,r)||Jn(t,i)}else if(n==39||ht&&n==70&&r=="c"){let i=n==39?dc(t,t.state.selection.from)=="ltr"?1:-1:1;return cc(t,i,r)||Jn(t,i)}else{if(n==38||ht&&n==80&&r=="c")return fc(t,-1,r)||Jn(t,-1);if(n==40||ht&&n==78&&r=="c")return O1(t)||fc(t,1,r)||Jn(t,1);if(r==(ht?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Al(t,e){t.someProp("transformCopied",h=>{e=h(e,t)});let n=[],{content:r,openStart:i,openEnd:s}=e;for(;i>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,s--;let h=r.firstChild;n.push(h.type.name,h.attrs!=h.type.defaultAttrs?h.attrs:null),r=h.content}let o=t.someProp("clipboardSerializer")||Wn.fromSchema(t.state.schema),a=_h(),l=a.createElement("div");l.appendChild(o.serializeFragment(r,{document:a}));let u=l.firstChild,c,d=0;for(;u&&u.nodeType==1&&(c=xh[u.nodeName.toLowerCase()]);){for(let h=c.length-1;h>=0;h--){let p=a.createElement(c[h]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${s}${d?` -${d}`:""} ${JSON.stringify(n)}`);let f=t.someProp("clipboardTextSerializer",h=>h(e,t))||e.content.textBetween(0,e.content.size,`
98
+
99
+ `);return{dom:l,text:f,slice:e}}function bh(t,e,n,r,i){let s=i.parent.type.spec.code,o,a;if(!n&&!e)return null;let l=!!e&&(r||s||!n);if(l){if(t.someProp("transformPastedText",f=>{e=f(e,s||r,t)}),s)return a=new N(v.from(t.state.schema.text(e.replace(/\r\n?/g,`
100
+ `))),0,0),t.someProp("transformPasted",f=>{a=f(a,t,!0)}),a;let d=t.someProp("clipboardTextParser",f=>f(e,i,r,t));if(d)a=d;else{let f=i.marks(),{schema:h}=t.state,p=Wn.fromSchema(h);o=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let g=o.appendChild(document.createElement("p"));m&&g.appendChild(p.serializeNode(h.text(m,f)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),o=B1(n),ai&&F1(o);let u=o&&o.querySelector("[data-pm-slice]"),c=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let d=+c[3];d>0;d--){let f=o.firstChild;for(;f&&f.nodeType!=1;)f=f.nextSibling;if(!f)break;o=f}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||Vt.fromSchema(t.state.schema)).parseSlice(o,{preserveWhitespace:!!(l||c),context:i,ruleFromNode(f){return f.nodeName=="BR"&&!f.nextSibling&&f.parentNode&&!I1.test(f.parentNode.nodeName)?{ignore:!0}:null}})),c)a=z1(mc(a,+c[1],+c[2]),c[4]);else if(a=N.maxOpen(L1(a.content,i),!0),a.openStart||a.openEnd){let d=0,f=0;for(let h=a.content.firstChild;d<a.openStart&&!h.type.spec.isolating;d++,h=h.firstChild);for(let h=a.content.lastChild;f<a.openEnd&&!h.type.spec.isolating;f++,h=h.lastChild);a=mc(a,d,f)}return t.someProp("transformPasted",d=>{a=d(a,t,l)}),a}const I1=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function L1(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.index(n)),s,o=[];if(t.forEach(a=>{if(!o)return;let l=i.findWrapping(a.type),u;if(!l)return o=null;if(u=o.length&&s.length&&Eh(l,s,a,o[o.length-1],0))o[o.length-1]=u;else{o.length&&(o[o.length-1]=kh(o[o.length-1],s.length));let c=yh(a,l);o.push(c),i=i.matchType(c.type),s=l}}),o)return v.from(o)}return t}function yh(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,v.from(t));return t}function Eh(t,e,n,r,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let s=Eh(t,e,n,r.lastChild,i+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(i==t.length-1?n.type:t[i+1]))return r.copy(r.content.append(v.from(yh(n,t,i+1))))}}function kh(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,kh(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(v.empty,!0);return t.copy(n.append(r))}function za(t,e,n,r,i,s){let o=e<0?t.firstChild:t.lastChild,a=o.content;return t.childCount>1&&(s=0),i<r-1&&(a=za(a,e,n,r,i+1,s)),i>=n&&(a=e<0?o.contentMatchAt(0).fillBefore(a,s<=i).append(a):a.append(o.contentMatchAt(o.childCount).fillBefore(v.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,o.copy(a))}function mc(t,e,n){return e<t.openStart&&(t=new N(za(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new N(za(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const xh={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let gc=null;function _h(){return gc||(gc=document.implementation.createHTMLDocument("title"))}let Wo=null;function P1(t){let e=window.trustedTypes;return e?(Wo||(Wo=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Wo.createHTML(t)):t}function B1(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=_h().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),i;if((i=r&&xh[r[1].toLowerCase()])&&(t=i.map(s=>"<"+s+">").join("")+t+i.map(s=>"</"+s+">").reverse().join("")),n.innerHTML=P1(t),i)for(let s=0;s<i.length;s++)n=n.querySelector(i[s])||n;return n}function F1(t){let e=t.querySelectorAll(qe?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function z1(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:i,openStart:s,openEnd:o}=t;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=v.from(l.create(r[a+1],i)),s++,o++}return new N(i,s,o)}const Qe={},et={},$1={touchstart:!0,touchmove:!0};class H1{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function U1(t){for(let e in Qe){let n=Qe[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{W1(t,r)&&!Tl(t,r)&&(t.editable||!(r.type in et))&&n(t,r)},$1[e]?{passive:!0}:void 0)}Ge&&t.dom.addEventListener("input",()=>null),$a(t)}function cn(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function q1(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function $a(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>Tl(t,r))})}function Tl(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function W1(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function V1(t,e){!Tl(t,e)&&Qe[e.type]&&(t.editable||!(e.type in et))&&Qe[e.type](t,e)}et.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Ch(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Wt&&qe&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),dr&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",i=>i(t,vn(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||R1(t,n)?n.preventDefault():cn(t,"key")};et.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};et.keypress=(t,e)=>{let n=e;if(Ch(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||ht&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof $)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode),s=()=>t.state.tr.insertText(i).scrollIntoView();!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",o=>o(t,r.$from.pos,r.$to.pos,i,s))&&t.dispatch(s()),n.preventDefault()}};function ro(t){return{left:t.clientX,top:t.clientY}}function K1(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Ml(t,e,n,r,i){if(r==-1)return!1;let s=t.state.doc.resolve(r);for(let o=s.depth+1;o>0;o--)if(t.someProp(e,a=>o>s.depth?a(t,n,s.nodeAfter,s.before(o),i,!0):a(t,n,s.node(o),s.before(o),i,!1)))return!0;return!1}function or(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function G1(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&z.isSelectable(r)?(or(t,new z(n)),!0):!1}function j1(t,e){if(e==-1)return!1;let n=t.state.selection,r,i;n instanceof z&&(r=n.node);let s=t.state.doc.resolve(e);for(let o=s.depth+1;o>0;o--){let a=o>s.depth?s.nodeAfter:s.node(o);if(z.isSelectable(a)){r&&n.$from.depth>0&&o>=n.$from.depth&&s.before(n.$from.depth+1)==n.$from.pos?i=s.before(n.$from.depth):i=s.before(o);break}}return i!=null?(or(t,z.create(t.state.doc,i)),!0):!1}function Z1(t,e,n,r,i){return Ml(t,"handleClickOn",e,n,r)||t.someProp("handleClick",s=>s(t,e,r))||(i?j1(t,n):G1(t,n))}function Y1(t,e,n,r){return Ml(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",i=>i(t,e,r))}function J1(t,e,n,r){return Ml(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",i=>i(t,e,r))||X1(t,n,r)}function X1(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(or(t,$.create(r,0,r.content.size)),!0):!1;let i=r.resolve(e);for(let s=i.depth+1;s>0;s--){let o=s>i.depth?i.nodeAfter:i.node(s),a=i.before(s);if(o.inlineContent)or(t,$.create(r,a+1,a+1+o.content.size));else if(z.isSelectable(o))or(t,z.create(r,a));else continue;return!0}}function Nl(t){return ls(t)}const wh=ht?"metaKey":"ctrlKey";Qe.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Nl(t),i=Date.now(),s="singleClick";i-t.input.lastClick.time<500&&K1(n,t.input.lastClick)&&!n[wh]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?s="doubleClick":t.input.lastClick.type=="doubleClick"&&(s="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:s,button:n.button};let o=t.posAtCoords(ro(n));o&&(s=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Q1(t,o,n,!!r)):(s=="doubleClick"?Y1:J1)(t,o.pos,o.inside,n)?n.preventDefault():cn(t,"pointer"))};class Q1{constructor(e,n,r,i){this.view=e,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[wh],this.allowDefault=r.shiftKey;let s,o;if(n.inside>-1)s=e.state.doc.nodeAt(n.inside),o=n.inside;else{let c=e.state.doc.resolve(n.pos);s=c.parent,o=c.depth?c.before():0}const a=i?null:r.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:u}=e.state;r.button==0&&(s.type.spec.draggable&&s.type.spec.selectable!==!1||u instanceof z&&u.from<=o&&u.to>o)&&(this.mightDrag={node:s,pos:o,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&mt&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),cn(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Gt(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(ro(e))),this.updateAllowDefault(e),this.allowDefault||!n?cn(this.view,"pointer"):Z1(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Ge&&this.mightDrag&&!this.mightDrag.node.isAtom||qe&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(or(this.view,U.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):cn(this.view,"pointer")}move(e){this.updateAllowDefault(e),cn(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Qe.touchstart=t=>{t.input.lastTouch=Date.now(),Nl(t),cn(t,"pointer")};Qe.touchmove=t=>{t.input.lastTouch=Date.now(),cn(t,"pointer")};Qe.contextmenu=t=>Nl(t);function Ch(t,e){return t.composing?!0:Ge&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const ey=Wt?5e3:-1;et.compositionstart=et.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof $&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||qe&&th&&ty(t)))t.markCursor=t.state.storedMarks||n.marks(),ls(t,!0),t.markCursor=null;else if(ls(t,!e.selection.empty),mt&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let i=r.focusNode,s=r.focusOffset;i&&i.nodeType==1&&s!=0;){let o=s<0?i.lastChild:i.childNodes[s-1];if(!o)break;if(o.nodeType==3){let a=t.domSelection();a&&a.collapse(o,o.nodeValue.length);break}else i=o,s=-1}}t.input.composing=!0}Sh(t,ey)};function ty(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}et.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,Sh(t,20))};function Sh(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>ls(t),e))}function vh(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=ry());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function ny(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=jb(e.focusNode,e.focusOffset),r=Zb(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,s=t.domObserver.lastChangedTextNode;if(n==s||r==s)return s;if(!i||!i.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let o=n.pmViewDesc;if(!(!o||!o.isText(n.nodeValue)))return r}}return n||r}function ry(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function ls(t,e=!1){if(!(Wt&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),vh(t),e||t.docView&&t.docView.dirty){let n=Sl(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function iy(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const jr=nt&&hn<15||dr&&Qb<604;Qe.copy=et.cut=(t,e)=>{let n=e,r=t.state.selection,i=n.type=="cut";if(r.empty)return;let s=jr?null:n.clipboardData,o=r.content(),{dom:a,text:l}=Al(t,o);s?(n.preventDefault(),s.clearData(),s.setData("text/html",a.innerHTML),s.setData("text/plain",l)):iy(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function sy(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function oy(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Zr(t,r.value,null,i,e):Zr(t,r.textContent,r.innerHTML,i,e)},50)}function Zr(t,e,n,r,i){let s=bh(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,s||N.empty)))return!0;if(!s)return!1;let o=sy(s),a=o?t.state.tr.replaceSelectionWith(o,r):t.state.tr.replaceSelection(s);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Ah(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}et.paste=(t,e)=>{let n=e;if(t.composing&&!Wt)return;let r=jr?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&Zr(t,Ah(r),r.getData("text/html"),i,n)?n.preventDefault():oy(t,n)};class Th{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const ay=ht?"altKey":"ctrlKey";function Mh(t,e){let n;return t.someProp("dragCopies",r=>{n=n||r(e)}),n!=null?!n:!e[ay]}Qe.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=t.state.selection,s=i.empty?null:t.posAtCoords(ro(n)),o;if(!(s&&s.pos>=i.from&&s.pos<=(i instanceof z?i.to-1:i.to))){if(r&&r.mightDrag)o=z.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(o=z.create(t.state.doc,d.posBefore))}}let a=(o||t.state.selection).content(),{dom:l,text:u,slice:c}=Al(t,a);(!n.dataTransfer.files.length||!qe||eh>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(jr?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",jr||n.dataTransfer.setData("text/plain",u),t.dragging=new Th(c,Mh(t,n),o)};Qe.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};et.dragover=et.dragenter=(t,e)=>e.preventDefault();et.drop=(t,e)=>{try{ly(t,e,t.dragging)}finally{t.dragging=null}};function ly(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(ro(e));if(!r)return;let i=t.state.doc.resolve(r.pos),s=n&&n.slice;s?t.someProp("transformPasted",h=>{s=h(s,t,!1)}):s=bh(t,Ah(e.dataTransfer),jr?null:e.dataTransfer.getData("text/html"),!1,i);let o=!!(n&&Mh(t,e));if(t.someProp("handleDrop",h=>h(t,e,s||N.empty,o))){e.preventDefault();return}if(!s)return;e.preventDefault();let a=s?Rf(t.state.doc,i.pos,s):i.pos;a==null&&(a=i.pos);let l=t.state.tr;if(o){let{node:h}=n;h?h.replace(l):l.deleteSelection()}let u=l.mapping.map(a),c=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,d=l.doc;if(c?l.replaceRangeWith(u,u,s.content.firstChild):l.replaceRange(u,u,s),l.doc.eq(d))return;let f=l.doc.resolve(u);if(c&&z.isSelectable(s.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(s.content.firstChild))l.setSelection(new z(f));else{let h=l.mapping.map(a);l.mapping.maps[l.mapping.maps.length-1].forEach((p,m,g,b)=>h=b),l.setSelection(vl(t,f,l.doc.resolve(h)))}t.focus(),t.dispatch(l.setMeta("uiEvent","drop"))}Qe.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&Gt(t)},20))};Qe.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};Qe.beforeinput=(t,e)=>{if(qe&&Wt&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",s=>s(t,vn(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in et)Qe[t]=et[t];function Yr(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class us{constructor(e,n){this.toDOM=e,this.spec=n||Rn,this.side=this.spec.side||0}map(e,n,r,i){let{pos:s,deleted:o}=e.mapResult(n.from+i,this.side<0?-1:1);return o?null:new Oe(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof us&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Yr(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class mn{constructor(e,n){this.attrs=e,this.spec=n||Rn}map(e,n,r,i){let s=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,o=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return s>=o?null:new Oe(s,o,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof mn&&Yr(this.attrs,e.attrs)&&Yr(this.spec,e.spec)}static is(e){return e.type instanceof mn}destroy(){}}class Ol{constructor(e,n){this.attrs=e,this.spec=n||Rn}map(e,n,r,i){let s=e.mapResult(n.from+i,1);if(s.deleted)return null;let o=e.mapResult(n.to+i,-1);return o.deleted||o.pos<=s.pos?null:new Oe(s.pos-r,o.pos-r,this)}valid(e,n){let{index:r,offset:i}=e.content.findIndex(n.from),s;return i==n.from&&!(s=e.child(r)).isText&&i+s.nodeSize==n.to}eq(e){return this==e||e instanceof Ol&&Yr(this.attrs,e.attrs)&&Yr(this.spec,e.spec)}destroy(){}}class Oe{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new Oe(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new Oe(e,e,new us(n,r))}static inline(e,n,r,i){return new Oe(e,n,new mn(r,i))}static node(e,n,r,i){return new Oe(e,n,new Ol(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof mn}get widget(){return this.type instanceof us}}const er=[],Rn={};class ae{constructor(e,n){this.local=e.length?e:er,this.children=n.length?n:er}static create(e,n){return n.length?cs(n,e,0,Rn):Ke}find(e,n,r){let i=[];return this.findInner(e??0,n??1e9,i,0,r),i}findInner(e,n,r,i,s){for(let o=0;o<this.local.length;o++){let a=this.local[o];a.from<=n&&a.to>=e&&(!s||s(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let o=0;o<this.children.length;o+=3)if(this.children[o]<n&&this.children[o+1]>e){let a=this.children[o]+1;this.children[o+2].findInner(e-a,n-a,r,i+a,s)}}map(e,n,r){return this==Ke||e.maps.length==0?this:this.mapInner(e,n,0,0,r||Rn)}mapInner(e,n,r,i,s){let o;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,r,i);l&&l.type.valid(n,l)?(o||(o=[])).push(l):s.onRemove&&s.onRemove(this.local[a].spec)}return this.children.length?uy(this.children,o||[],e,n,r,i,s):o?new ae(o.sort(In),er):Ke}add(e,n){return n.length?this==Ke?ae.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let i,s=0;e.forEach((a,l)=>{let u=l+r,c;if(c=Oh(n,a,u)){for(i||(i=this.children.slice());s<i.length&&i[s]<l;)s+=3;i[s]==l?i[s+2]=i[s+2].addInner(a,c,u+1):i.splice(s,0,l,l+a.nodeSize,cs(c,a,u+1,Rn)),s+=3}});let o=Nh(s?Dh(n):n,-r);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||o.splice(a--,1);return new ae(o.length?this.local.concat(o).sort(In):this.local,i||this.children)}remove(e){return e.length==0||this==Ke?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,i=this.local;for(let s=0;s<r.length;s+=3){let o,a=r[s]+n,l=r[s+1]+n;for(let c=0,d;c<e.length;c++)(d=e[c])&&d.from>a&&d.to<l&&(e[c]=null,(o||(o=[])).push(d));if(!o)continue;r==this.children&&(r=this.children.slice());let u=r[s+2].removeInner(o,a+1);u!=Ke?r[s+2]=u:(r.splice(s,3),s-=3)}if(i.length){for(let s=0,o;s<e.length;s++)if(o=e[s])for(let a=0;a<i.length;a++)i[a].eq(o,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new ae(i,r):Ke}forChild(e,n){if(this==Ke)return this;if(n.isLeaf)return ae.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(r=this.children[a+2]);break}let s=e+1,o=s+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<o&&l.to>s&&l.type instanceof mn){let u=Math.max(s,l.from)-s,c=Math.min(o,l.to)-s;u<c&&(i||(i=[])).push(l.copy(u,c))}}if(i){let a=new ae(i.sort(In),er);return r?new rn([a,r]):a}return r||Ke}eq(e){if(this==e)return!0;if(!(e instanceof ae)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Dl(this.localsInner(e))}localsInner(e){if(this==Ke)return er;if(e.inlineContent||!this.local.some(mn.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof mn||n.push(this.local[r]);return n}forEachSet(e){e(this)}}ae.empty=new ae([],[]);ae.removeOverlap=Dl;const Ke=ae.empty;class rn{constructor(e){this.members=e}map(e,n){const r=this.members.map(i=>i.map(e,n,Rn));return rn.from(r)}forChild(e,n){if(n.isLeaf)return ae.empty;let r=[];for(let i=0;i<this.members.length;i++){let s=this.members[i].forChild(e,n);s!=Ke&&(s instanceof rn?r=r.concat(s.members):r.push(s))}return rn.from(r)}eq(e){if(!(e instanceof rn)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let i=0;i<this.members.length;i++){let s=this.members[i].localsInner(e);if(s.length)if(!n)n=s;else{r&&(n=n.slice(),r=!1);for(let o=0;o<s.length;o++)n.push(s[o])}}return n?Dl(r?n:n.sort(In)):er}static from(e){switch(e.length){case 0:return Ke;case 1:return e[0];default:return new rn(e.every(n=>n instanceof ae)?e:e.reduce((n,r)=>n.concat(r instanceof ae?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function uy(t,e,n,r,i,s,o){let a=t.slice();for(let u=0,c=s;u<n.maps.length;u++){let d=0;n.maps[u].forEach((f,h,p,m)=>{let g=m-p-(h-f);for(let b=0;b<a.length;b+=3){let y=a[b+1];if(y<0||f>y+c-d)continue;let k=a[b]+c-d;h>=k?a[b+1]=f<=k?-2:-1:f>=c&&g&&(a[b]+=g,a[b+1]+=g)}d+=g}),c=n.maps[u].map(c,-1)}let l=!1;for(let u=0;u<a.length;u+=3)if(a[u+1]<0){if(a[u+1]==-2){l=!0,a[u+1]=-1;continue}let c=n.map(t[u]+s),d=c-i;if(d<0||d>=r.content.size){l=!0;continue}let f=n.map(t[u+1]+s,-1),h=f-i,{index:p,offset:m}=r.content.findIndex(d),g=r.maybeChild(p);if(g&&m==d&&m+g.nodeSize==h){let b=a[u+2].mapInner(n,g,c+1,t[u]+s+1,o);b!=Ke?(a[u]=d,a[u+1]=h,a[u+2]=b):(a[u+1]=-2,l=!0)}else l=!0}if(l){let u=cy(a,t,e,n,i,s,o),c=cs(u,r,0,o);e=c.local;for(let d=0;d<a.length;d+=3)a[d+1]<0&&(a.splice(d,3),d-=3);for(let d=0,f=0;d<c.children.length;d+=3){let h=c.children[d];for(;f<a.length&&a[f]<h;)f+=3;a.splice(f,0,c.children[d],c.children[d+1],c.children[d+2])}}return new ae(e.sort(In),a)}function Nh(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let i=t[r];n.push(new Oe(i.from+e,i.to+e,i.type))}return n}function cy(t,e,n,r,i,s,o){function a(l,u){for(let c=0;c<l.local.length;c++){let d=l.local[c].map(r,i,u);d?n.push(d):o.onRemove&&o.onRemove(l.local[c].spec)}for(let c=0;c<l.children.length;c+=3)a(l.children[c+2],l.children[c]+u+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+s+1);return n}function Oh(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,i=null;for(let s=0,o;s<t.length;s++)(o=t[s])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),t[s]=null);return i}function Dh(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function cs(t,e,n,r){let i=[],s=!1;e.forEach((a,l)=>{let u=Oh(t,a,l+n);if(u){s=!0;let c=cs(u,a,n+l+1,r);c!=Ke&&i.push(l,l+a.nodeSize,c)}});let o=Nh(s?Dh(t):t,-n).sort(In);for(let a=0;a<o.length;a++)o[a].type.valid(e,o[a])||(r.onRemove&&r.onRemove(o[a].spec),o.splice(a--,1));return o.length||i.length?new ae(o,i):Ke}function In(t,e){return t.from-e.from||t.to-e.to}function Dl(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let i=n+1;i<e.length;i++){let s=e[i];if(s.from==r.from){s.to!=r.to&&(e==t&&(e=t.slice()),e[i]=s.copy(s.from,r.to),bc(e,i+1,s.copy(r.to,s.to)));continue}else{s.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,s.from),bc(e,i,r.copy(s.from,r.to)));break}}}return e}function bc(t,e,n){for(;e<t.length&&In(n,t[e])>0;)e++;t.splice(e,0,n)}function Vo(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Ke&&e.push(r)}),t.cursorWrapper&&e.push(ae.create(t.state.doc,[t.cursorWrapper.deco])),rn.from(e)}const dy={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},fy=nt&&hn<=11;class hy{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class py{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new hy,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);nt&&hn<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():Ge&&e.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),fy&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,dy)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(uc(this.view)){if(this.suppressingSelectionUpdates)return Gt(this.view);if(nt&&hn<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&zn(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let s=e.focusNode;s;s=cr(s))n.add(s);for(let s=e.anchorNode;s;s=cr(s))if(n.has(s)){r=s;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&uc(e)&&!this.ignoreSelectionChange(r),s=-1,o=-1,a=!1,l=[];if(e.editable)for(let c=0;c<n.length;c++){let d=this.registerMutation(n[c],l);d&&(s=s<0?d.from:Math.min(d.from,s),o=o<0?d.to:Math.max(d.to,o),d.typeOver&&(a=!0))}if(l.some(c=>c.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let c of l)if(c.nodeName=="BR"&&c.parentNode){let d=c.nextSibling;for(;d&&d.nodeType==1;){if(d.contentEditable=="false"){c.parentNode.removeChild(c);break}d=d.firstChild}}}else if(mt&&l.length){let c=l.filter(d=>d.nodeName=="BR");if(c.length==2){let[d,f]=c;d.parentNode&&d.parentNode.parentNode==f.parentNode?f.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let f of c){let h=f.parentNode;h&&h.nodeName=="LI"&&(!d||by(e,d)!=h)&&f.remove()}}}let u=null;s<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&to(r)&&(u=Sl(e))&&u.eq(U.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,Gt(e),this.currentSelection.set(r),e.scrollToSelection()):(s>-1||i)&&(s>-1&&(e.docView.markDirty(s,o),my(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,yy(e,l)),this.handleDOMChange(s,o,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||Gt(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let c=0;c<e.addedNodes.length;c++){let d=e.addedNodes[c];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let i=e.previousSibling,s=e.nextSibling;if(nt&&hn<=11&&e.addedNodes.length)for(let c=0;c<e.addedNodes.length;c++){let{previousSibling:d,nextSibling:f}=e.addedNodes[c];(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(i=d),(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(s=f)}let o=i&&i.parentNode==e.target?Ue(i)+1:0,a=r.localPosFromDOM(e.target,o,-1),l=s&&s.parentNode==e.target?Ue(s):e.target.childNodes.length,u=r.localPosFromDOM(e.target,l,1);return{from:a,to:u}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let yc=new WeakMap,Ec=!1;function my(t){if(!yc.has(t)&&(yc.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=mt,Ec)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),Ec=!0}}function kc(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=t.domAtPos(t.state.selection.anchor);return zn(o.node,o.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}function gy(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return kc(t,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?kc(t,n):null}function by(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function yy(t,e){var n;let{focusNode:r,focusOffset:i}=t.domSelectionRange();for(let s of e)if(((n=s.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let o=s.nextSibling;for(;o&&o.nodeName!="TD"&&o.nodeName!="TH";)o=o.nextSibling;if(o){let a=o;for(;;){let l=a.firstChild;if(!l||l.nodeType!=1||l.contentEditable=="false"||/^(BR|IMG)$/.test(l.nodeName))break;a=l}a.insertBefore(s,a.firstChild),r==s&&t.domSelection().collapse(s,i)}else s.parentNode.removeChild(s)}}function Ey(t,e,n){let{node:r,fromOffset:i,toOffset:s,from:o,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),u,c=l.anchorNode;if(c&&t.dom.contains(c.nodeType==1?c:c.parentNode)&&(u=[{node:c,offset:l.anchorOffset}],to(l)||u.push({node:l.focusNode,offset:l.focusOffset})),qe&&t.input.lastKeyCode===8)for(let g=s;g>i;g--){let b=r.childNodes[g-1],y=b.pmViewDesc;if(b.nodeName=="BR"&&!y){s=g;break}if(!y||y.size)break}let d=t.state.doc,f=t.someProp("domParser")||Vt.fromSchema(t.state.schema),h=d.resolve(o),p=null,m=f.parse(r,{topNode:h.parent,topMatch:h.parent.contentMatchAt(h.index()),topOpen:!0,from:i,to:s,preserveWhitespace:h.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:ky,context:h});if(u&&u[0].pos!=null){let g=u[0].pos,b=u[1]&&u[1].pos;b==null&&(b=g),p={anchor:g+o,head:b+o}}return{doc:m,sel:p,from:o,to:a}}function ky(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Ge&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||Ge&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const xy=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function _y(t,e,n,r,i){let s=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let C=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,M=Sl(t,C);if(M&&!t.state.selection.eq(M)){if(qe&&Wt&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",j=>j(t,vn(13,"Enter"))))return;let R=t.state.tr.setSelection(M);C=="pointer"?R.setMeta("pointer",!0):C=="key"&&R.scrollIntoView(),s&&R.setMeta("composition",s),t.dispatch(R)}return}let o=t.state.doc.resolve(e),a=o.sharedDepth(n);e=o.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,u=Ey(t,e,n),c=t.state.doc,d=c.slice(u.from,u.to),f,h;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(f=t.state.selection.to,h="end"):(f=t.state.selection.from,h="start"),t.input.lastKeyCode=null;let p=Sy(d.content,u.doc.content,u.from,f,h);if(p&&t.input.domChangeCount++,(dr&&t.input.lastIOSEnter>Date.now()-225||Wt)&&i.some(C=>C.nodeType==1&&!xy.test(C.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",C=>C(t,vn(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!p)if(r&&l instanceof $&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(u.sel){let C=xc(t,t.state.doc,u.sel);if(C&&!C.eq(t.state.selection)){let M=t.state.tr.setSelection(C);s&&M.setMeta("composition",s),t.dispatch(M)}}return}t.state.selection.from<t.state.selection.to&&p.start==p.endB&&t.state.selection instanceof $&&(p.start>t.state.selection.from&&p.start<=t.state.selection.from+2&&t.state.selection.from>=u.from?p.start=t.state.selection.from:p.endA<t.state.selection.to&&p.endA>=t.state.selection.to-2&&t.state.selection.to<=u.to&&(p.endB+=t.state.selection.to-p.endA,p.endA=t.state.selection.to)),nt&&hn<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>u.from&&u.doc.textBetween(p.start-u.from-1,p.start-u.from+1)=="  "&&(p.start--,p.endA--,p.endB--);let m=u.doc.resolveNoCache(p.start-u.from),g=u.doc.resolveNoCache(p.endB-u.from),b=c.resolve(p.start),y=m.sameParent(g)&&m.parent.inlineContent&&b.end()>=p.endA;if((dr&&t.input.lastIOSEnter>Date.now()-225&&(!y||i.some(C=>C.nodeName=="DIV"||C.nodeName=="P"))||!y&&m.pos<u.doc.content.size&&(!m.sameParent(g)||!m.parent.inlineContent)&&m.pos<g.pos&&!/\S/.test(u.doc.textBetween(m.pos,g.pos,"","")))&&t.someProp("handleKeyDown",C=>C(t,vn(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&Cy(c,p.start,p.endA,m,g)&&t.someProp("handleKeyDown",C=>C(t,vn(8,"Backspace")))){Wt&&qe&&t.domObserver.suppressSelectionUpdates();return}qe&&p.endB==p.start&&(t.input.lastChromeDelete=Date.now()),Wt&&!y&&m.start()!=g.start()&&g.parentOffset==0&&m.depth==g.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==p.endA&&(p.endB-=2,g=u.doc.resolveNoCache(p.endB-u.from),setTimeout(()=>{t.someProp("handleKeyDown",function(C){return C(t,vn(13,"Enter"))})},20));let k=p.start,_=p.endA,x=C=>{let M=C||t.state.tr.replace(k,_,u.doc.slice(p.start-u.from,p.endB-u.from));if(u.sel){let R=xc(t,M.doc,u.sel);R&&!(qe&&t.composing&&R.empty&&(p.start!=p.endB||t.input.lastChromeDelete<Date.now()-100)&&(R.head==k||R.head==M.mapping.map(_)-1)||nt&&R.empty&&R.head==k)&&M.setSelection(R)}return s&&M.setMeta("composition",s),M.scrollIntoView()},w;if(y)if(m.pos==g.pos){nt&&hn<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>Gt(t),20));let C=x(t.state.tr.delete(k,_)),M=c.resolve(p.start).marksAcross(c.resolve(p.endA));M&&C.ensureMarks(M),t.dispatch(C)}else if(p.endA==p.endB&&(w=wy(m.parent.content.cut(m.parentOffset,g.parentOffset),b.parent.content.cut(b.parentOffset,p.endA-b.start())))){let C=x(t.state.tr);w.type=="add"?C.addMark(k,_,w.mark):C.removeMark(k,_,w.mark),t.dispatch(C)}else if(m.parent.child(m.index()).isText&&m.index()==g.index()-(g.textOffset?0:1)){let C=m.parent.textBetween(m.parentOffset,g.parentOffset),M=()=>x(t.state.tr.insertText(C,k,_));t.someProp("handleTextInput",R=>R(t,k,_,C,M))||t.dispatch(M())}else t.dispatch(x());else t.dispatch(x())}function xc(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:vl(t,e.resolve(n.anchor),e.resolve(n.head))}function wy(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,i=n,s=r,o,a,l;for(let c=0;c<r.length;c++)i=r[c].removeFromSet(i);for(let c=0;c<n.length;c++)s=n[c].removeFromSet(s);if(i.length==1&&s.length==0)a=i[0],o="add",l=c=>c.mark(a.addToSet(c.marks));else if(i.length==0&&s.length==1)a=s[0],o="remove",l=c=>c.mark(a.removeFromSet(c.marks));else return null;let u=[];for(let c=0;c<e.childCount;c++)u.push(l(e.child(c)));if(v.from(u).eq(t))return{mark:a,type:o}}function Cy(t,e,n,r,i){if(n-e<=i.pos-r.pos||Ko(r,!0,!1)<i.pos)return!1;let s=t.resolve(e);if(!r.parent.isTextblock){let a=s.nodeAfter;return a!=null&&n==e+a.nodeSize}if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let o=t.resolve(Ko(s,!0,!0));return!o.parent.isTextblock||o.pos>n||Ko(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function Ko(t,e,n){let r=t.depth,i=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,i++,e=!1;if(n){let s=t.node(r).maybeChild(t.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,i++}return i}function Sy(t,e,n,r,i){let s=t.findDiffStart(e,n);if(s==null)return null;let{a:o,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(i=="end"){let l=Math.max(0,s-Math.min(o,a));r-=o+l-s}if(o<s&&t.size<e.size){let l=r<=s&&r>=o?s-r:0;s-=l,s&&s<e.size&&_c(e.textBetween(s-1,s+1))&&(s+=l?1:-1),a=s+(a-o),o=s}else if(a<s){let l=r<=s&&r>=a?s-r:0;s-=l,s&&s<t.size&&_c(t.textBetween(s-1,s+1))&&(s+=l?1:-1),o=s+(o-a),a=s}return{start:s,endA:o,endB:a}}function _c(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class Rh{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new H1,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Ac),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=Sc(this),Cc(this),this.nodeViews=vc(this),this.docView=rc(this.state.doc,wc(this),Vo(this),this.dom,this),this.domObserver=new py(this,(r,i,s,o)=>_y(this,r,i,s,o)),this.domObserver.start(),U1(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&$a(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Ac),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let i=this.state,s=!1,o=!1;e.storedMarks&&this.composing&&(vh(this),o=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let h=vc(this);Ay(h,this.nodeViews)&&(this.nodeViews=h,s=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&$a(this),this.editable=Sc(this),Cc(this);let l=Vo(this),u=wc(this),c=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=s||!this.docView.matchesNode(e.doc,u,l);(d||!e.selection.eq(i.selection))&&(o=!0);let f=c=="preserve"&&o&&this.dom.style.overflowAnchor==null&&n1(this);if(o){this.domObserver.stop();let h=d&&(nt||qe)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&vy(i.selection,e.selection);if(d){let p=qe?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=ny(this)),(s||!this.docView.update(e.doc,u,l,this))&&(this.docView.updateOuterDeco(u),this.docView.destroy(),this.docView=rc(e.doc,u,l,this.dom,this)),p&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(h=!0)}h||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&v1(this))?Gt(this,h):(ph(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():f&&r1(f)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof z){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Ju(this,n.getBoundingClientRect(),e)}else Ju(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,i=-1;if(r.from<this.state.doc.content.size&&this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let s=r.from+(this.state.doc.content.size-n.doc.content.size);(s>0&&s<this.state.doc.content.size&&this.state.doc.nodeAt(s))==r.node&&(i=s)}this.dragging=new Th(e.slice,e.move,i<0?void 0:z.create(this.state.doc,i))}someProp(e,n){let r=this._props&&this._props[e],i;if(r!=null&&(i=n?n(r):r))return i;for(let o=0;o<this.directPlugins.length;o++){let a=this.directPlugins[o].props[e];if(a!=null&&(i=n?n(a):a))return i}let s=this.state.plugins;if(s)for(let o=0;o<s.length;o++){let a=s[o].props[e];if(a!=null&&(i=n?n(a):a))return i}}hasFocus(){if(nt){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&i1(this.dom),Gt(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return u1(this,e)}coordsAtPos(e,n=1){return oh(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let i=this.docView.posFromDOM(e,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return p1(this,n||this.state,e)}pasteHTML(e,n){return Zr(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Zr(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Al(this,e)}destroy(){this.docView&&(q1(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Vo(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Kb())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return V1(this,e)}domSelectionRange(){let e=this.domSelection();return e?Ge&&this.root.nodeType===11&&Jb(this.dom.ownerDocument)==this.dom&&gy(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}Rh.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function wc(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[Oe.node(0,t.state.doc.content.size,e)]}function Cc(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Oe.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function Sc(t){return!t.someProp("editable",e=>e(t.state)===!1)}function vy(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function vc(t){let e=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=r[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function Ay(t,e){let n=0,r=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let i in e)r++;return n!=r}function Ac(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}const Ty=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),My=typeof navigator<"u"&&/Win/.test(navigator.platform);function Ny(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,i,s,o;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))Ty?o=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),o&&(n="Meta-"+n),s&&(n="Shift-"+n),n}function Oy(t){let e=Object.create(null);for(let n in t)e[Ny(n)]=t[n];return e}function Go(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function Dy(t){return new le({props:{handleKeyDown:Rl(t)}})}function Rl(t){let e=Oy(t);return function(n,r){let i=jm(r),s,o=e[Go(i,r)];if(o&&o(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let a=e[Go(i,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(My&&r.ctrlKey&&r.altKey)&&(s=Zm[r.keyCode])&&s!=i){let a=e[Go(s,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var Ry=Object.defineProperty,Il=(t,e)=>{for(var n in e)Ry(t,n,{get:e[n],enumerable:!0})};function io(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:i}=n,{storedMarks:s}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,s=n.storedMarks,n}}}var so=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:i}=n,s=this.buildProps(i);return Object.fromEntries(Object.entries(t).map(([o,a])=>[o,(...u)=>{const c=a(...u)(s);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(i),c}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:s}=r,o=[],a=!!t,l=t||i.tr,u=()=>(!a&&e&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(l),o.every(d=>d===!0)),c={...Object.fromEntries(Object.entries(n).map(([d,f])=>[d,(...p)=>{const m=this.buildProps(l,e),g=f(...p)(m);return o.push(g),c}])),run:u};return c}createCan(t){const{rawCommands:e,state:n}=this,r=!1,i=t||n.tr,s=this.buildProps(i,r);return{...Object.fromEntries(Object.entries(e).map(([a,l])=>[a,(...u)=>l(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(i,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:i}=this,{view:s}=r,o={tr:t,editor:r,view:s,state:io({state:i,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...u)=>l(...u)(o)]))}};return o}},Ih={};Il(Ih,{blur:()=>Iy,clearContent:()=>Ly,clearNodes:()=>Py,command:()=>By,createParagraphNear:()=>Fy,cut:()=>zy,deleteCurrentNode:()=>$y,deleteNode:()=>Hy,deleteRange:()=>Uy,deleteSelection:()=>qy,enter:()=>Wy,exitCode:()=>Vy,extendMarkRange:()=>Ky,first:()=>Gy,focus:()=>Zy,forEach:()=>Yy,insertContent:()=>Jy,insertContentAt:()=>eE,joinBackward:()=>rE,joinDown:()=>nE,joinForward:()=>iE,joinItemBackward:()=>sE,joinItemForward:()=>oE,joinTextblockBackward:()=>aE,joinTextblockForward:()=>lE,joinUp:()=>tE,keyboardShortcut:()=>cE,lift:()=>dE,liftEmptyBlock:()=>fE,liftListItem:()=>hE,newlineInCode:()=>pE,resetAttributes:()=>mE,scrollIntoView:()=>gE,selectAll:()=>bE,selectNodeBackward:()=>yE,selectNodeForward:()=>EE,selectParentNode:()=>kE,selectTextblockEnd:()=>xE,selectTextblockStart:()=>_E,setContent:()=>wE,setMark:()=>qE,setMeta:()=>WE,setNode:()=>VE,setNodeSelection:()=>KE,setTextDirection:()=>GE,setTextSelection:()=>jE,sinkListItem:()=>ZE,splitBlock:()=>YE,splitListItem:()=>JE,toggleList:()=>QE,toggleMark:()=>ek,toggleNode:()=>tk,toggleWrap:()=>nk,undoInputRule:()=>rk,unsetAllMarks:()=>ik,unsetMark:()=>sk,unsetTextDirection:()=>ok,updateAttributes:()=>ak,wrapIn:()=>lk,wrapInList:()=>uk});var Iy=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),Ly=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),Py=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:i}=r;return n&&i.forEach(({$from:s,$to:o})=>{t.doc.nodesBetween(s.pos,o.pos,(a,l)=>{if(a.type.isText)return;const{doc:u,mapping:c}=e,d=u.resolve(c.map(l)),f=u.resolve(c.map(l+a.nodeSize)),h=d.blockRange(f);if(!h)return;const p=br(h);if(a.type.isTextblock){const{defaultType:m}=d.parent.contentMatchAt(d.index());e.setNodeMarkup(h.start,m)}(p||p===0)&&e.lift(h,p)})}),!0},By=t=>e=>t(e),Fy=()=>({state:t,dispatch:e})=>Zf(t,e),zy=(t,e)=>({editor:n,tr:r})=>{const{state:i}=n,s=i.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const o=r.mapping.map(e);return r.insert(o,s.content),r.setSelection(new $(r.doc.resolve(Math.max(o-1,0)))),!0},$y=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const i=t.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===r.type){if(e){const a=i.before(s),l=i.after(s);t.delete(a,l).scrollIntoView()}return!0}return!1};function Te(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var Hy=t=>({tr:e,state:n,dispatch:r})=>{const i=Te(t,n.schema),s=e.selection.$anchor;for(let o=s.depth;o>0;o-=1)if(s.node(o).type===i){if(r){const l=s.before(o),u=s.after(o);e.delete(l,u).scrollIntoView()}return!0}return!1},Uy=t=>({tr:e,dispatch:n})=>{const{from:r,to:i}=t;return n&&e.delete(r,i),!0},qy=()=>({state:t,dispatch:e})=>El(t,e),Wy=()=>({commands:t})=>t.keyboardShortcut("Enter"),Vy=()=>({state:t,dispatch:e})=>Ob(t,e);function Ll(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function ds(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(i=>n.strict?e[i]===t[i]:Ll(e[i])?e[i].test(t[i]):e[i]===t[i]):!0}function Lh(t,e,n={}){return t.find(r=>r.type===e&&ds(Object.fromEntries(Object.keys(n).map(i=>[i,r.attrs[i]])),n))}function Tc(t,e,n={}){return!!Lh(t,e,n)}function Pl(t,e,n){if(!t||!e)return;let r=t.parent.childAfter(t.parentOffset);if((!r.node||!r.node.marks.some(u=>u.type===e))&&(r=t.parent.childBefore(t.parentOffset)),!r.node||!r.node.marks.some(u=>u.type===e))return;if(!n){const u=r.node.marks.find(c=>c.type===e);u&&(n=u.attrs)}if(!Lh([...r.node.marks],e,n))return;let s=r.index,o=t.start()+r.offset,a=s+1,l=o+r.node.nodeSize;for(;s>0&&Tc([...t.parent.child(s-1).marks],e,n);)s-=1,o-=t.parent.child(s).nodeSize;for(;a<t.parent.childCount&&Tc([...t.parent.child(a).marks],e,n);)l+=t.parent.child(a).nodeSize,a+=1;return{from:o,to:l}}function jt(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var Ky=(t,e)=>({tr:n,state:r,dispatch:i})=>{const s=jt(t,r.schema),{doc:o,selection:a}=n,{$from:l,from:u,to:c}=a;if(i){const d=Pl(l,s,e);if(d&&d.from<=u&&d.to>=c){const f=$.create(o,d.from,d.to);n.setSelection(f)}}return!0},Gy=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function Ph(t){return t instanceof $}function Mn(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function Bh(t,e=null){if(!e)return null;const n=U.atStart(t),r=U.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const i=n.from,s=r.to;return e==="all"?$.create(t,Mn(0,i,s),Mn(t.content.size,i,s)):$.create(t,Mn(e,i,s),Mn(e,i,s))}function Ha(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Jr(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function jy(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var Zy=(t=null,e={})=>({editor:n,view:r,tr:i,dispatch:s})=>{e={scrollIntoView:!0,...e};const o=()=>{(Jr()||Ha())&&r.dom.focus(),jy()&&!Jr()&&!Ha()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(s&&t===null&&!Ph(n.state.selection))return o(),!0;const a=Bh(i.doc,t)||n.state.selection,l=n.state.selection.eq(a);return s&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},Yy=(t,e)=>n=>t.every((r,i)=>e(r,{...n,index:i})),Jy=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),Fh=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&Fh(r)}return t};function Si(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return Fh(n)}function Xr(t,e,n){if(t instanceof fn||t instanceof v)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,i=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return v.fromArray(t.map(a=>e.nodeFromJSON(a)));const o=e.nodeFromJSON(t);return n.errorOnInvalidContent&&o.check(),o}catch(s){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:s});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",s),Xr("",e,n)}if(i){if(n.errorOnInvalidContent){let o=!1,a="";const l=new hl({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:u=>(o=!0,a=typeof u=="string"?u:u.outerHTML,null)}]}})});if(n.slice?Vt.fromSchema(l).parseSlice(Si(t),n.parseOptions):Vt.fromSchema(l).parse(Si(t),n.parseOptions),n.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const s=Vt.fromSchema(e);return n.slice?s.parseSlice(Si(t),n.parseOptions).content:s.parse(Si(t),n.parseOptions)}return Xr("",e,n)}function Xy(t,e,n){const r=t.steps.length-1;if(r<e)return;const i=t.steps[r];if(!(i instanceof ve||i instanceof Le))return;const s=t.mapping.maps[r];let o=0;s.forEach((a,l,u,c)=>{o===0&&(o=c)}),t.setSelection(U.near(t.doc.resolve(o),n))}var Qy=t=>!("type"in t),eE=(t,e,n)=>({tr:r,dispatch:i,editor:s})=>{var o;if(i){n={parseOptions:s.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;const l=g=>{s.emit("contentError",{editor:s,error:g,disableCollaboration:()=>{"collaboration"in s.storage&&typeof s.storage.collaboration=="object"&&s.storage.collaboration&&(s.storage.collaboration.isDisabled=!0)}})},u={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!s.options.enableContentCheck&&s.options.emitContentError)try{Xr(e,s.schema,{parseOptions:u,errorOnInvalidContent:!0})}catch(g){l(g)}try{a=Xr(e,s.schema,{parseOptions:u,errorOnInvalidContent:(o=n.errorOnInvalidContent)!=null?o:s.options.enableContentCheck})}catch(g){return l(g),!1}let{from:c,to:d}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},f=!0,h=!0;if((Qy(a)?a:[a]).forEach(g=>{g.check(),f=f?g.isText&&g.marks.length===0:!1,h=h?g.isBlock:!1}),c===d&&h){const{parent:g}=r.doc.resolve(c);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(c-=1,d+=1)}let m;if(f){if(Array.isArray(e))m=e.map(g=>g.text||"").join("");else if(e instanceof v){let g="";e.forEach(b=>{b.text&&(g+=b.text)}),m=g}else typeof e=="object"&&e&&e.text?m=e.text:m=e;r.insertText(m,c,d)}else{m=a;const g=r.doc.resolve(c),b=g.node(),y=g.parentOffset===0,k=b.isText||b.isTextblock,_=b.content.size>0;y&&k&&_&&h&&(c=Math.max(0,c-1)),r.replaceWith(c,d,m)}n.updateSelection&&Xy(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:c,text:m}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:c,text:m})}return!0},tE=()=>({state:t,dispatch:e})=>Tb(t,e),nE=()=>({state:t,dispatch:e})=>Mb(t,e),rE=()=>({state:t,dispatch:e})=>Uf(t,e),iE=()=>({state:t,dispatch:e})=>Kf(t,e),sE=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Xs(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},oE=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Xs(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},aE=()=>({state:t,dispatch:e})=>vb(t,e),lE=()=>({state:t,dispatch:e})=>Ab(t,e);function zh(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function uE(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,i,s,o;for(let a=0;a<e.length-1;a+=1){const l=e[a];if(/^(cmd|meta|m)$/i.test(l))o=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))s=!0;else if(/^mod$/i.test(l))Jr()||zh()?o=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),s&&(n=`Shift-${n}`),n}var cE=t=>({editor:e,view:n,tr:r,dispatch:i})=>{const s=uE(t).split(/-(?!$)/),o=s.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),a=new KeyboardEvent("keydown",{key:o==="Space"?" ":o,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),l=e.captureTransaction(()=>{n.someProp("handleKeyDown",u=>u(n,a))});return l==null||l.steps.forEach(u=>{const c=u.map(r.mapping);c&&i&&r.maybeStep(c)}),!0};function gn(t,e,n={}){const{from:r,to:i,empty:s}=t.selection,o=e?Te(e,t.schema):null,a=[];t.doc.nodesBetween(r,i,(d,f)=>{if(d.isText)return;const h=Math.max(r,f),p=Math.min(i,f+d.nodeSize);a.push({node:d,from:h,to:p})});const l=i-r,u=a.filter(d=>o?o.name===d.node.type.name:!0).filter(d=>ds(d.node.attrs,n,{strict:!1}));return s?!!u.length:u.reduce((d,f)=>d+f.to-f.from,0)>=l}var dE=(t,e={})=>({state:n,dispatch:r})=>{const i=Te(t,n.schema);return gn(n,i,e)?Nb(n,r):!1},fE=()=>({state:t,dispatch:e})=>Yf(t,e),hE=t=>({state:e,dispatch:n})=>{const r=Te(t,e.schema);return Ub(r)(e,n)},pE=()=>({state:t,dispatch:e})=>jf(t,e);function oo(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function Mc(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,i)=>(n.includes(i)||(r[i]=t[i]),r),{})}var mE=(t,e)=>({tr:n,state:r,dispatch:i})=>{let s=null,o=null;const a=oo(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(s=Te(t,r.schema)),a==="mark"&&(o=jt(t,r.schema));let l=!1;return n.selection.ranges.forEach(u=>{r.doc.nodesBetween(u.$from.pos,u.$to.pos,(c,d)=>{s&&s===c.type&&(l=!0,i&&n.setNodeMarkup(d,void 0,Mc(c.attrs,e))),o&&c.marks.length&&c.marks.forEach(f=>{o===f.type&&(l=!0,i&&n.addMark(d,d+c.nodeSize,o.create(Mc(f.attrs,e))))})})}),l},gE=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),bE=()=>({tr:t,dispatch:e})=>{if(e){const n=new ut(t.doc);t.setSelection(n)}return!0},yE=()=>({state:t,dispatch:e})=>Wf(t,e),EE=()=>({state:t,dispatch:e})=>Gf(t,e),kE=()=>({state:t,dispatch:e})=>Ib(t,e),xE=()=>({state:t,dispatch:e})=>Bb(t,e),_E=()=>({state:t,dispatch:e})=>Pb(t,e);function Ua(t,e,n={},r={}){return Xr(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var wE=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:s,dispatch:o,commands:a})=>{const{doc:l}=s;if(r.preserveWhitespace!=="full"){const u=Ua(t,i.schema,r,{errorOnInvalidContent:e??i.options.enableContentCheck});return o&&s.replaceWith(0,l.content.size,u).setMeta("preventUpdate",!n),!0}return o&&s.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},t,{parseOptions:r,errorOnInvalidContent:e??i.options.enableContentCheck})};function $h(t,e){const n=jt(e,t.schema),{from:r,to:i,empty:s}=t.selection,o=[];s?(t.storedMarks&&o.push(...t.storedMarks),o.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,i,l=>{o.push(...l.marks)});const a=o.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function Hh(t,e){const n=new bl(t);return e.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function CE(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function qa(t,e){const n=[];return t.descendants((r,i)=>{e(r)&&n.push({node:r,pos:i})}),n}function SE(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(i,s)=>{n(i)&&r.push({node:i,pos:s})}),r}function Uh(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function ao(t){return e=>Uh(e.$from,t)}function B(t,e,n){return t.config[e]===void 0&&t.parent?B(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?B(t.parent,e,n):null}):t.config[e]}function Bl(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=B(e,"addExtensions",n);return r?[e,...Bl(r())]:e}).flat(10)}function ui(t,e){const n=Wn.fromSchema(e).serializeFragment(t),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function qh(t){return typeof t=="function"}function ee(t,e=void 0,...n){return qh(t)?e?t.bind(e)(...n):t(...n):t}function vE(t={}){return Object.keys(t).length===0&&t.constructor===Object}function fr(t){const e=t.filter(i=>i.type==="extension"),n=t.filter(i=>i.type==="node"),r=t.filter(i=>i.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function Wh(t){const e=[],{nodeExtensions:n,markExtensions:r}=fr(t),i=[...n,...r],s={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=n.filter(u=>u.name!=="text").map(u=>u.name),a=r.map(u=>u.name),l=[...o,...a];return t.forEach(u=>{const c={name:u.name,options:u.options,storage:u.storage,extensions:i},d=B(u,"addGlobalAttributes",c);if(!d)return;d().forEach(h=>{let p;Array.isArray(h.types)?p=h.types:h.types==="*"?p=l:h.types==="nodes"?p=o:h.types==="marks"?p=a:p=[],p.forEach(m=>{Object.entries(h.attributes).forEach(([g,b])=>{e.push({type:m,name:g,attribute:{...s,...b}})})})})}),i.forEach(u=>{const c={name:u.name,options:u.options,storage:u.storage},d=B(u,"addAttributes",c);if(!d)return;const f=d();Object.entries(f).forEach(([h,p])=>{const m={...s,...p};typeof(m==null?void 0:m.default)=="function"&&(m.default=m.default()),m!=null&&m.isRequired&&(m==null?void 0:m.default)===void 0&&delete m.default,e.push({type:u.name,name:h,attribute:m})})}),e}function AE(t){const e=[];let n="",r=!1,i=!1,s=0;const o=t.length;for(let a=0;a<o;a+=1){const l=t[a];if(l==="'"&&!i){r=!r,n+=l;continue}if(l==='"'&&!r){i=!i,n+=l;continue}if(!r&&!i){if(l==="("){s+=1,n+=l;continue}if(l===")"&&s>0){s-=1,n+=l;continue}if(l===";"&&s===0){e.push(n),n="";continue}}n+=l}return n&&e.push(n),e}function Nc(t){const e=[],n=AE(t||""),r=n.length;for(let i=0;i<r;i+=1){const s=n[i],o=s.indexOf(":");if(o===-1)continue;const a=s.slice(0,o).trim(),l=s.slice(o+1).trim();a&&l&&e.push([a,l])}return e}function pe(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([i,s])=>{if(!r[i]){r[i]=s;return}if(i==="class"){const a=s?String(s).split(" "):[],l=r[i]?r[i].split(" "):[],u=a.filter(c=>!l.includes(c));r[i]=[...l,...u].join(" ")}else if(i==="style"){const a=new Map([...Nc(r[i]),...Nc(s)]);r[i]=Array.from(a.entries()).map(([l,u])=>`${l}: ${u}`).join("; ")}else r[i]=s}),r},{})}function hr(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>pe(n,r),{})}function TE(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function Oc(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const i=e.reduce((s,o)=>{const a=o.attribute.parseHTML?o.attribute.parseHTML(n):TE(n.getAttribute(o.name));return a==null?s:{...s,[o.name]:a}},{});return{...r,...i}}}}function Dc(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&vE(n)?!1:n!=null))}function Rc(t){var e,n;const r={};return!((e=t==null?void 0:t.attribute)!=null&&e.isRequired)&&"default"in((t==null?void 0:t.attribute)||{})&&(r.default=t.attribute.default),((n=t==null?void 0:t.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function ME(t,e){var n;const r=Wh(t),{nodeExtensions:i,markExtensions:s}=fr(t),o=(n=i.find(u=>B(u,"topNode")))==null?void 0:n.name,a=Object.fromEntries(i.map(u=>{const c=r.filter(b=>b.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:e},f=t.reduce((b,y)=>{const k=B(y,"extendNodeSchema",d);return{...b,...k?k(u):{}}},{}),h=Dc({...f,content:ee(B(u,"content",d)),marks:ee(B(u,"marks",d)),group:ee(B(u,"group",d)),inline:ee(B(u,"inline",d)),atom:ee(B(u,"atom",d)),selectable:ee(B(u,"selectable",d)),draggable:ee(B(u,"draggable",d)),code:ee(B(u,"code",d)),whitespace:ee(B(u,"whitespace",d)),linebreakReplacement:ee(B(u,"linebreakReplacement",d)),defining:ee(B(u,"defining",d)),isolating:ee(B(u,"isolating",d)),attrs:Object.fromEntries(c.map(Rc))}),p=ee(B(u,"parseHTML",d));p&&(h.parseDOM=p.map(b=>Oc(b,c)));const m=B(u,"renderHTML",d);m&&(h.toDOM=b=>m({node:b,HTMLAttributes:hr(b,c)}));const g=B(u,"renderText",d);return g&&(h.toText=g),[u.name,h]})),l=Object.fromEntries(s.map(u=>{const c=r.filter(g=>g.type===u.name),d={name:u.name,options:u.options,storage:u.storage,editor:e},f=t.reduce((g,b)=>{const y=B(b,"extendMarkSchema",d);return{...g,...y?y(u):{}}},{}),h=Dc({...f,inclusive:ee(B(u,"inclusive",d)),excludes:ee(B(u,"excludes",d)),group:ee(B(u,"group",d)),spanning:ee(B(u,"spanning",d)),code:ee(B(u,"code",d)),attrs:Object.fromEntries(c.map(Rc))}),p=ee(B(u,"parseHTML",d));p&&(h.parseDOM=p.map(g=>Oc(g,c)));const m=B(u,"renderHTML",d);return m&&(h.toDOM=g=>m({mark:g,HTMLAttributes:hr(g,c)})),[u.name,h]}));return new hl({topNode:o,nodes:a,marks:l})}function NE(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function Br(t){return t.sort((n,r)=>{const i=B(n,"priority")||100,s=B(r,"priority")||100;return i>s?-1:i<s?1:0})}function Vh(t){const e=Br(Bl(t)),n=NE(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function Kh(t,e,n){const{from:r,to:i}=e,{blockSeparator:s=`
101
+
102
+ `,textSerializers:o={}}=n||{};let a="";return t.nodesBetween(r,i,(l,u,c,d)=>{var f;l.isBlock&&u>r&&(a+=s);const h=o==null?void 0:o[l.type.name];if(h)return c&&(a+=h({node:l,pos:u,parent:c,index:d,range:e})),!1;l.isText&&(a+=(f=l==null?void 0:l.text)==null?void 0:f.slice(Math.max(r,u)-u,i-u))}),a}function OE(t,e){const n={from:0,to:t.content.size};return Kh(t,n,e)}function Gh(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function DE(t,e){const n=Te(e,t.schema),{from:r,to:i}=t.selection,s=[];t.doc.nodesBetween(r,i,a=>{s.push(a)});const o=s.reverse().find(a=>a.type.name===n.name);return o?{...o.attrs}:{}}function jh(t,e){const n=oo(typeof e=="string"?e:e.name,t.schema);return n==="node"?DE(t,e):n==="mark"?$h(t,e):{}}function RE(t,e=JSON.stringify){const n={};return t.filter(r=>{const i=e(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function IE(t){const e=RE(t);return e.length===1?e:e.filter((n,r)=>!e.filter((s,o)=>o!==r).some(s=>n.oldRange.from>=s.oldRange.from&&n.oldRange.to<=s.oldRange.to&&n.newRange.from>=s.newRange.from&&n.newRange.to<=s.newRange.to))}function Zh(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((i,s)=>{const o=[];if(i.ranges.length)i.forEach((a,l)=>{o.push({from:a,to:l})});else{const{from:a,to:l}=n[s];if(a===void 0||l===void 0)return;o.push({from:a,to:l})}o.forEach(({from:a,to:l})=>{const u=e.slice(s).map(a,-1),c=e.slice(s).map(l),d=e.invert().map(u,-1),f=e.invert().map(c);r.push({oldRange:{from:d,to:f},newRange:{from:u,to:c}})})}),IE(r)}function Fl(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(i=>{const s=n.resolve(t),o=Pl(s,i.type);o&&r.push({mark:i,...o})}):n.nodesBetween(t,e,(i,s)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(o=>({from:s,to:s+i.nodeSize,mark:o})))}),r}var LE=(t,e,n,r=20)=>{const i=t.doc.resolve(n);let s=r,o=null;for(;s>0&&o===null;){const a=i.node(s);(a==null?void 0:a.type.name)===e?o=a:s-=1}return[o,s]};function _r(t,e){return e.nodes[t]||e.marks[t]||null}function ji(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=t.find(s=>s.type===e&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}var PE=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(i,s,o,a)=>{var l,u;const c=((u=(l=i.type.spec).toText)==null?void 0:u.call(l,{node:i,pos:s,parent:o,index:a}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?c:c.slice(0,Math.max(0,r-s))}),n};function Wa(t,e,n={}){const{empty:r,ranges:i}=t.selection,s=e?jt(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(d=>s?s.name===d.type.name:!0).find(d=>ds(d.attrs,n,{strict:!1}));let o=0;const a=[];if(i.forEach(({$from:d,$to:f})=>{const h=d.pos,p=f.pos;t.doc.nodesBetween(h,p,(m,g)=>{if(s&&m.inlineContent&&!m.type.allowsMarkType(s))return!1;if(!m.isText&&!m.marks.length)return;const b=Math.max(h,g),y=Math.min(p,g+m.nodeSize),k=y-b;o+=k,a.push(...m.marks.map(_=>({mark:_,from:b,to:y})))})}),o===0)return!1;const l=a.filter(d=>s?s.name===d.mark.type.name:!0).filter(d=>ds(d.mark.attrs,n,{strict:!1})).reduce((d,f)=>d+f.to-f.from,0),u=a.filter(d=>s?d.mark.type!==s&&d.mark.type.excludes(s):!0).reduce((d,f)=>d+f.to-f.from,0);return(l>0?l+u:l)>=o}function BE(t,e,n={}){if(!e)return gn(t,null,n)||Wa(t,null,n);const r=oo(e,t.schema);return r==="node"?gn(t,e,n):r==="mark"?Wa(t,e,n):!1}var FE=(t,e)=>{const{$from:n,$to:r,$anchor:i}=t.selection;if(e){const s=ao(a=>a.type.name===e)(t.selection);if(!s)return!1;const o=t.doc.resolve(s.pos+1);return i.pos+1===o.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},zE=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function Ic(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function jo(t,e){const{nodeExtensions:n}=fr(e),r=n.find(o=>o.name===t);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},s=ee(B(r,"group",i));return typeof s!="string"?!1:s.split(" ").includes("list")}function lo(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return!/\S/.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let i=!0;return t.content.forEach(s=>{i!==!1&&(lo(s,{ignoreWhitespace:n,checkChildren:e})||(i=!1))}),i}return!1}function Yh(t){return t instanceof z}var Jh=class Xh{constructor(e){this.position=e}static fromJSON(e){return new Xh(e.position)}toJSON(){return{position:this.position}}};function $E(t,e){const n=e.mapping.mapResult(t.position);return{position:new Jh(n.pos),mapResult:n}}function HE(t){return new Jh(t)}function UE(t,e,n){var r;const{selection:i}=e;let s=null;if(Ph(i)&&(s=i.$cursor),s){const a=(r=t.storedMarks)!=null?r:s.marks();return s.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(u=>u.type.excludes(n)))}const{ranges:o}=i;return o.some(({$from:a,$to:l})=>{let u=a.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(a.pos,l.pos,(c,d,f)=>{if(u)return!1;if(c.isInline){const h=!f||f.type.allowsMarkType(n),p=!!n.isInSet(c.marks)||!c.marks.some(m=>m.type.excludes(n));u=h&&p}return!u}),u})}var qE=(t,e={})=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=n,{empty:o,ranges:a}=s,l=jt(t,r.schema);if(i)if(o){const u=$h(r,l);n.addStoredMark(l.create({...u,...e}))}else a.forEach(u=>{const c=u.$from.pos,d=u.$to.pos;r.doc.nodesBetween(c,d,(f,h)=>{const p=Math.max(h,c),m=Math.min(h+f.nodeSize,d);f.marks.find(b=>b.type===l)?f.marks.forEach(b=>{l===b.type&&n.addMark(p,m,l.create({...b.attrs,...e}))}):n.addMark(p,m,l.create(e))})});return UE(r,n,l)},WE=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),VE=(t,e={})=>({state:n,dispatch:r,chain:i})=>{const s=Te(t,n.schema);let o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),s.isTextblock?i().command(({commands:a})=>ju(s,{...o,...e})(n)?!0:a.clearNodes()).command(({state:a})=>ju(s,{...o,...e})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},KE=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,i=Mn(t,0,r.content.size),s=z.create(r,i);e.setSelection(s)}return!0},GE=(t,e)=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=r;let o,a;return typeof e=="number"?(o=e,a=e):e&&"from"in e&&"to"in e?(o=e.from,a=e.to):(o=s.from,a=s.to),i&&n.doc.nodesBetween(o,a,(l,u)=>{l.isText||n.setNodeMarkup(u,void 0,{...l.attrs,dir:t})}),!0},jE=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:i,to:s}=typeof t=="number"?{from:t,to:t}:t,o=$.atStart(r).from,a=$.atEnd(r).to,l=Mn(i,o,a),u=Mn(s,o,a),c=$.create(r,l,u);e.setSelection(c)}return!0},ZE=t=>({state:e,dispatch:n})=>{const r=Te(t,e.schema);return Vb(r)(e,n)};function Lc(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(i=>e==null?void 0:e.includes(i.type.name));t.tr.ensureMarks(r)}}var YE=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:i})=>{const{selection:s,doc:o}=e,{$from:a,$to:l}=s,u=i.extensionManager.attributes,c=ji(u,a.node().type.name,a.node().attrs);if(s instanceof z&&s.node.isBlock)return!a.parentOffset||!Kt(o,a.pos)?!1:(r&&(t&&Lc(n,i.extensionManager.splittableMarks),e.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const d=l.parentOffset===l.parent.content.size,f=a.depth===0?void 0:CE(a.node(-1).contentMatchAt(a.indexAfter(-1)));let h=d&&f?[{type:f,attrs:c}]:void 0,p=Kt(e.doc,e.mapping.map(a.pos),1,h);if(!h&&!p&&Kt(e.doc,e.mapping.map(a.pos),1,f?[{type:f}]:void 0)&&(p=!0,h=f?[{type:f,attrs:c}]:void 0),r){if(p&&(s instanceof $&&e.deleteSelection(),e.split(e.mapping.map(a.pos),1,h),f&&!d&&!a.parentOffset&&a.parent.type!==f)){const m=e.mapping.map(a.before()),g=e.doc.resolve(m);a.node(-1).canReplaceWith(g.index(),g.index()+1,f)&&e.setNodeMarkup(e.mapping.map(a.before()),f)}t&&Lc(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return p},JE=(t,e={})=>({tr:n,state:r,dispatch:i,editor:s})=>{var o;const a=Te(t,r.schema),{$from:l,$to:u}=r.selection,c=r.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(u))return!1;const d=l.node(-1);if(d.type!==a)return!1;const f=s.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let b=v.empty;const y=l.index(-1)?1:l.index(-2)?2:3;for(let M=l.depth-y;M>=l.depth-3;M-=1)b=v.from(l.node(M).copy(b));const k=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,_={...ji(f,l.node().type.name,l.node().attrs),...e},x=((o=a.contentMatch.defaultType)==null?void 0:o.createAndFill(_))||void 0;b=b.append(v.from(a.createAndFill(null,x)||void 0));const w=l.before(l.depth-(y-1));n.replace(w,l.after(-k),new N(b,4-y,0));let C=-1;n.doc.nodesBetween(w,n.doc.content.size,(M,R)=>{if(C>-1)return!1;M.isTextblock&&M.content.size===0&&(C=R+1)}),C>-1&&n.setSelection($.near(n.doc.resolve(C))),n.scrollIntoView()}return!0}const h=u.pos===l.end()?d.contentMatchAt(0).defaultType:null,p={...ji(f,d.type.name,d.attrs),...e},m={...ji(f,l.node().type.name,l.node().attrs),...e};n.delete(l.pos,u.pos);const g=h?[{type:a,attrs:p},{type:h,attrs:m}]:[{type:a,attrs:p}];if(!Kt(n.doc,l.pos,2))return!1;if(i){const{selection:b,storedMarks:y}=r,{splittableMarks:k}=s.extensionManager,_=y||b.$to.parentOffset&&b.$from.marks();if(n.split(l.pos,2,g).scrollIntoView(),!_||!i)return!0;const x=_.filter(w=>k.includes(w.type.name));n.ensureMarks(x)}return!0},Zo=(t,e)=>{const n=ao(o=>o.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=t.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&En(t.doc,n.pos)&&t.join(n.pos),!0},Yo=(t,e)=>{const n=ao(o=>o.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=t.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&En(t.doc,r)&&t.join(r),!0};function XE(t){const e=t.doc,n=e.firstChild;if(!n)return null;const r=e.resolve(1),i=e.resolve(n.nodeSize-1);return $.between(r,i)}var QE=(t,e,n,r={})=>({editor:i,tr:s,state:o,dispatch:a,chain:l,commands:u,can:c})=>{const{extensions:d,splittableMarks:f}=i.extensionManager,h=Te(t,o.schema),p=Te(e,o.schema),{selection:m,storedMarks:g}=o,{$from:b,$to:y}=m,k=b.blockRange(y),_=g||m.$to.parentOffset&&m.$from.marks();if(!k)return!1;const x=ao(re=>jo(re.type.name,d))(m),w=m.from===0&&m.to===o.doc.content.size,C=o.doc.content.content,M=C.length===1?C[0]:null,R=w&&M&&jo(M.type.name,d)?{node:M,pos:0}:null,j=x??R,be=!!x&&k.depth>=1&&k.depth-x.depth<=1,ue=!!R;if((be||ue)&&j){if(j.node.type===h)return w&&ue?l().command(({tr:re,dispatch:G})=>{const q=XE(re);return q?(re.setSelection(q),G&&G(re),!0):!1}).liftListItem(p).run():u.liftListItem(p);if(jo(j.node.type.name,d)&&h.validContent(j.node.content))return l().command(()=>(s.setNodeMarkup(j.pos,h),!0)).command(()=>Zo(s,h)).command(()=>Yo(s,h)).run()}return!n||!_||!a?l().command(()=>c().wrapInList(h,r)?!0:u.clearNodes()).wrapInList(h,r).command(()=>Zo(s,h)).command(()=>Yo(s,h)).run():l().command(()=>{const re=c().wrapInList(h,r),G=_.filter(q=>f.includes(q.type.name));return s.ensureMarks(G),re?!0:u.clearNodes()}).wrapInList(h,r).command(()=>Zo(s,h)).command(()=>Yo(s,h)).run()},ek=(t,e={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:s=!1}=n,o=jt(t,r.schema);return Wa(r,o,e)?i.unsetMark(o,{extendEmptyMarkRange:s}):i.setMark(o,e)},tk=(t,e,n={})=>({state:r,commands:i})=>{const s=Te(t,r.schema),o=Te(e,r.schema),a=gn(r,s,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?i.setNode(o,l):i.setNode(s,{...l,...n})},nk=(t,e={})=>({state:n,commands:r})=>{const i=Te(t,n.schema);return gn(n,i,e)?r.lift(i):r.wrapIn(i,e)},rk=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let s;if(i.spec.isInputRules&&(s=i.getState(t))){if(e){const o=t.tr,a=s.transform;for(let l=a.steps.length-1;l>=0;l-=1)o.step(a.steps[l].invert(a.docs[l]));if(s.text){const l=o.doc.resolve(s.from).marks();o.replaceWith(s.from,s.to,t.schema.text(s.text,l))}else o.delete(s.from,s.to)}return!0}}return!1},ik=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:i}=n;return r||e&&i.forEach(s=>{t.removeMark(s.$from.pos,s.$to.pos)}),!0},sk=(t,e={})=>({tr:n,state:r,dispatch:i})=>{var s;const{extendEmptyMarkRange:o=!1}=e,{selection:a}=n,l=jt(t,r.schema),{$from:u,empty:c,ranges:d}=a;if(!i)return!0;if(c&&o){let{from:f,to:h}=a;const p=(s=u.marks().find(g=>g.type===l))==null?void 0:s.attrs,m=Pl(u,l,p);m&&(f=m.from,h=m.to),n.removeMark(f,h,l)}else d.forEach(f=>{n.removeMark(f.$from.pos,f.$to.pos,l)});return n.removeStoredMark(l),!0},ok=t=>({tr:e,state:n,dispatch:r})=>{const{selection:i}=n;let s,o;return typeof t=="number"?(s=t,o=t):t&&"from"in t&&"to"in t?(s=t.from,o=t.to):(s=i.from,o=i.to),r&&e.doc.nodesBetween(s,o,(a,l)=>{if(a.isText)return;const u={...a.attrs};delete u.dir,e.setNodeMarkup(l,void 0,u)}),!0},ak=(t,e={})=>({tr:n,state:r,dispatch:i})=>{let s=null,o=null;const a=oo(typeof t=="string"?t:t.name,r.schema);if(!a)return!1;a==="node"&&(s=Te(t,r.schema)),a==="mark"&&(o=jt(t,r.schema));let l=!1;return n.selection.ranges.forEach(u=>{const c=u.$from.pos,d=u.$to.pos;let f,h,p,m;n.selection.empty?r.doc.nodesBetween(c,d,(g,b)=>{s&&s===g.type&&(l=!0,p=Math.max(b,c),m=Math.min(b+g.nodeSize,d),f=b,h=g)}):r.doc.nodesBetween(c,d,(g,b)=>{b<c&&s&&s===g.type&&(l=!0,p=Math.max(b,c),m=Math.min(b+g.nodeSize,d),f=b,h=g),b>=c&&b<=d&&(s&&s===g.type&&(l=!0,i&&n.setNodeMarkup(b,void 0,{...g.attrs,...e})),o&&g.marks.length&&g.marks.forEach(y=>{if(o===y.type&&(l=!0,i)){const k=Math.max(b,c),_=Math.min(b+g.nodeSize,d);n.addMark(k,_,o.create({...y.attrs,...e}))}}))}),h&&(f!==void 0&&i&&n.setNodeMarkup(f,void 0,{...h.attrs,...e}),o&&h.marks.length&&h.marks.forEach(g=>{o===g.type&&i&&n.addMark(p,m,o.create({...g.attrs,...e}))}))}),l},lk=(t,e={})=>({state:n,dispatch:r})=>{const i=Te(t,n.schema);return Fb(i,e)(n,r)},uk=(t,e={})=>({state:n,dispatch:r})=>{const i=Te(t,n.schema);return zb(i,e)(n,r)},ck=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},uo=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},dk=(t,e)=>{if(Ll(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function vi(t){var e;const{editor:n,from:r,to:i,text:s,rules:o,plugin:a}=t,{view:l}=n;if(l.composing)return!1;const u=l.state.doc.resolve(r);if(u.parent.type.spec.code||(e=u.nodeBefore||u.nodeAfter)!=null&&e.marks.find(f=>f.type.spec.code))return!1;let c=!1;const d=PE(u)+s;return o.forEach(f=>{if(c)return;const h=dk(d,f.find);if(!h)return;const p=l.state.tr,m=io({state:l.state,transaction:p}),g={from:r-(h[0].length-s.length),to:i},{commands:b,chain:y,can:k}=new so({editor:n,state:m});f.handler({state:m,range:g,match:h,commands:b,chain:y,can:k})===null||!p.steps.length||(f.undoable&&p.setMeta(a,{transform:p,from:r,to:i,text:s}),l.dispatch(p),c=!0)}),c}function fk(t){const{editor:e,rules:n}=t,r=new le({state:{init(){return null},apply(i,s,o){const a=i.getMeta(r);if(a)return a;const l=i.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:c}=l;typeof c=="string"?c=c:c=ui(v.from(c),o.schema);const{from:d}=l,f=d+c.length;vi({editor:e,from:d,to:f,text:c,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:s}},props:{handleTextInput(i,s,o,a){return vi({editor:e,from:s,to:o,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:s}=i.state.selection;s&&vi({editor:e,from:s.pos,to:s.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,s){if(s.key!=="Enter")return!1;const{$cursor:o}=i.state.selection;return o?vi({editor:e,from:o.pos,to:o.pos,text:`
103
+ `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function hk(t){return Object.prototype.toString.call(t).slice(8,-1)}function Ai(t){return hk(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function Qh(t,e){const n={...t};return Ai(t)&&Ai(e)&&Object.keys(e).forEach(r=>{Ai(e[r])&&Ai(t[r])?n[r]=Qh(t[r],e[r]):n[r]=e[r]}),n}var zl=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...ee(B(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...ee(B(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>Qh(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},st=class ep extends zl{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new ep(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,i=e.state.selection.$from;if(i.pos===i.end()){const o=i.marks();if(!!!o.find(u=>(u==null?void 0:u.type.name)===n.name))return!1;const l=o.find(u=>(u==null?void 0:u.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",i.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function pk(t){return typeof t=="number"}var mk=class{constructor(t){this.find=t.find,this.handler=t.handler}},gk=(t,e,n)=>{if(Ll(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(i=>{const s=[i.text];return s.index=i.index,s.input=t,s.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),s.push(i.replaceWith)),s}):[]};function bk(t){const{editor:e,state:n,from:r,to:i,rule:s,pasteEvent:o,dropEvent:a}=t,{commands:l,chain:u,can:c}=new so({editor:e,state:n}),d=[];return n.doc.nodesBetween(r,i,(h,p)=>{var m,g,b,y,k;if((g=(m=h.type)==null?void 0:m.spec)!=null&&g.code||!(h.isText||h.isTextblock||h.isInline))return;const _=(k=(y=(b=h.content)==null?void 0:b.size)!=null?y:h.nodeSize)!=null?k:0,x=Math.max(r,p),w=Math.min(i,p+_);if(x>=w)return;const C=h.isText?h.text||"":h.textBetween(x-p,w-p,void 0,"");gk(C,s.find,o).forEach(R=>{if(R.index===void 0)return;const j=x+R.index+1,be=j+R[0].length,ue={from:n.tr.mapping.map(j),to:n.tr.mapping.map(be)},re=s.handler({state:n,range:ue,match:R,commands:l,chain:u,can:c,pasteEvent:o,dropEvent:a});d.push(re)})}),d.every(h=>h!==null)}var Ti=null,yk=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function Ek(t){const{editor:e,rules:n}=t;let r=null,i=!1,s=!1,o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:c,from:d,to:f,rule:h,pasteEvt:p})=>{const m=c.tr,g=io({state:c,transaction:m});if(!(!bk({editor:e,state:g,from:Math.max(d-1,0),to:f.b-1,rule:h,pasteEvent:p,dropEvent:a})||!m.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return o=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,m}};return n.map(c=>new le({view(d){const f=p=>{var m;r=(m=d.dom.parentElement)!=null&&m.contains(p.target)?d.dom.parentElement:null,r&&(Ti=e)},h=()=>{Ti&&(Ti=null)};return window.addEventListener("dragstart",f),window.addEventListener("dragend",h),{destroy(){window.removeEventListener("dragstart",f),window.removeEventListener("dragend",h)}}},props:{handleDOMEvents:{drop:(d,f)=>{if(s=r===d.dom.parentElement,a=f,!s){const h=Ti;h!=null&&h.isEditable&&setTimeout(()=>{const p=h.state.selection;p&&h.commands.deleteRange({from:p.from,to:p.to})},10)}return!1},paste:(d,f)=>{var h;const p=(h=f.clipboardData)==null?void 0:h.getData("text/html");return o=f,i=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,h)=>{const p=d[0],m=p.getMeta("uiEvent")==="paste"&&!i,g=p.getMeta("uiEvent")==="drop"&&!s,b=p.getMeta("applyPasteRules"),y=!!b;if(!m&&!g&&!y)return;if(y){let{text:x}=b;typeof x=="string"?x=x:x=ui(v.from(x),h.schema);const{from:w}=b,C=w+x.length,M=yk(x);return l({rule:c,state:h,from:w,to:{b:C},pasteEvt:M})}const k=f.doc.content.findDiffStart(h.doc.content),_=f.doc.content.findDiffEnd(h.doc.content);if(!(!pk(k)||!_||k===_.b))return l({rule:c,state:h,from:k,to:_,pasteEvt:o})}}))}var co=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=Vh(t),this.schema=ME(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:_r(e.name,this.schema)},r=B(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return Br([...this.extensions].reverse()).flatMap(r=>{const i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:_r(r.name,this.schema)},s=[],o=B(r,"addKeyboardShortcuts",i);let a={};if(r.type==="mark"&&B(r,"exitable",i)&&(a.ArrowRight=()=>st.handleExit({editor:t,mark:r})),o){const f=Object.fromEntries(Object.entries(o()).map(([h,p])=>[h,()=>p({editor:t})]));a={...a,...f}}const l=Dy(a);s.push(l);const u=B(r,"addInputRules",i);if(Ic(r,t.options.enableInputRules)&&u){const f=u();if(f&&f.length){const h=fk({editor:t,rules:f}),p=Array.isArray(h)?h:[h];s.push(...p)}}const c=B(r,"addPasteRules",i);if(Ic(r,t.options.enablePasteRules)&&c){const f=c();if(f&&f.length){const h=Ek({editor:t,rules:f});s.push(...h)}}const d=B(r,"addProseMirrorPlugins",i);if(d){const f=d();s.push(...f)}return s})}get attributes(){return Wh(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=fr(this.extensions);return Object.fromEntries(e.filter(n=>!!B(n,"addNodeView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Te(n.name,this.schema)},s=B(n,"addNodeView",i);if(!s)return[];const o=s();if(!o)return[];const a=(l,u,c,d,f)=>{const h=hr(l,r);return o({node:l,view:u,getPos:c,decorations:d,innerDecorations:f,editor:t,extension:n,HTMLAttributes:h})};return[n.name,a]}))}dispatchTransaction(t){const{editor:e}=this;return Br([...this.extensions].reverse()).reduceRight((r,i)=>{const s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:_r(i.name,this.schema)},o=B(i,"dispatchTransaction",s);return o?a=>{o.call(s,{transaction:a,next:r})}:r},t)}transformPastedHTML(t){const{editor:e}=this;return Br([...this.extensions]).reduce((r,i)=>{const s={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:e,type:_r(i.name,this.schema)},o=B(i,"transformPastedHTML",s);return o?(a,l)=>{const u=r(a,l);return o.call(s,u)}:r},t||(r=>r))}get markViews(){const{editor:t}=this,{markExtensions:e}=fr(this.extensions);return Object.fromEntries(e.filter(n=>!!B(n,"addMarkView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:jt(n.name,this.schema)},s=B(n,"addMarkView",i);if(!s)return[];const o=(a,l,u)=>{const c=hr(a,r);return s()({mark:a,view:l,inline:u,editor:t,extension:n,HTMLAttributes:c,updateAttributes:d=>{Lk(a,t,d)}})};return[n.name,o]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:_r(e.name,this.schema)};e.type==="mark"&&((n=ee(B(e,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(e.name);const i=B(e,"onBeforeCreate",r),s=B(e,"onCreate",r),o=B(e,"onUpdate",r),a=B(e,"onSelectionUpdate",r),l=B(e,"onTransaction",r),u=B(e,"onFocus",r),c=B(e,"onBlur",r),d=B(e,"onDestroy",r);i&&this.editor.on("beforeCreate",i),s&&this.editor.on("create",s),o&&this.editor.on("update",o),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),u&&this.editor.on("focus",u),c&&this.editor.on("blur",c),d&&this.editor.on("destroy",d)})}};co.resolve=Vh;co.sort=Br;co.flatten=Bl;var tp={};Il(tp,{ClipboardTextSerializer:()=>rp,Commands:()=>ip,Delete:()=>sp,Drop:()=>op,Editable:()=>ap,FocusEvents:()=>up,Keymap:()=>cp,Paste:()=>dp,Tabindex:()=>fp,TextDirection:()=>hp,focusEventsPluginKey:()=>lp});var me=class np extends zl{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new np(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},rp=me.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new le({key:new Ee("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:i}=e,{ranges:s}=i,o=Math.min(...s.map(c=>c.$from.pos)),a=Math.max(...s.map(c=>c.$to.pos)),l=Gh(n);return Kh(r,{from:o,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),ip=me.create({name:"commands",addCommands(){return{...Ih}}}),sp=me.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,i;const s=()=>{var o,a,l,u;if((u=(l=(a=(o=this.editor.options.coreExtensionOptions)==null?void 0:o.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,t))!=null?u:t.getMeta("y-sync$"))return;const c=Hh(t.before,[t,...e]);Zh(c).forEach(h=>{c.mapping.mapResult(h.oldRange.from).deletedAfter&&c.mapping.mapResult(h.oldRange.to).deletedBefore&&c.before.nodesBetween(h.oldRange.from,h.oldRange.to,(p,m)=>{const g=m+p.nodeSize-2,b=h.oldRange.from<=m&&g<=h.oldRange.to;this.editor.emit("delete",{type:"node",node:p,from:m,to:g,newFrom:c.mapping.map(m),newTo:c.mapping.map(g),deletedRange:h.oldRange,newRange:h.newRange,partial:!b,editor:this.editor,transaction:t,combinedTransform:c})})});const f=c.mapping;c.steps.forEach((h,p)=>{var m,g;if(h instanceof Et){const b=f.slice(p).map(h.from,-1),y=f.slice(p).map(h.to),k=f.invert().map(b,-1),_=f.invert().map(y),x=b>0?(m=c.doc.nodeAt(b-1))==null?void 0:m.marks.some(C=>C.eq(h.mark)):!1,w=(g=c.doc.nodeAt(y))==null?void 0:g.marks.some(C=>C.eq(h.mark));this.editor.emit("delete",{type:"mark",mark:h.mark,from:h.from,to:h.to,deletedRange:{from:k,to:_},newRange:{from:b,to:y},partial:!!(w||x),editor:this.editor,transaction:t,combinedTransform:c})}})};(i=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||i?setTimeout(s,0):s()}}),op=me.create({name:"drop",addProseMirrorPlugins(){return[new le({key:new Ee("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),ap=me.create({name:"editable",addProseMirrorPlugins(){return[new le({key:new Ee("editable"),props:{editable:()=>this.editor.options.editable}})]}}),lp=new Ee("focusEvents"),up=me.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new le({key:lp,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),cp=me.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:o})=>[()=>o.undoInputRule(),()=>o.command(({tr:a})=>{const{selection:l,doc:u}=a,{empty:c,$anchor:d}=l,{pos:f,parent:h}=d,p=d.parent.isTextblock&&f>0?a.doc.resolve(f-1):d,m=p.parent.type.spec.isolating,g=d.pos-d.parentOffset,b=m&&p.parent.childCount===1?g===d.pos:U.atStart(u).from===f;return!c||!h.type.isTextblock||h.textContent.length||!b||b&&d.parent.type.name==="paragraph"?!1:o.clearNodes()}),()=>o.deleteSelection(),()=>o.joinBackward(),()=>o.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.deleteCurrentNode(),()=>o.joinForward(),()=>o.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.newlineInCode(),()=>o.createParagraphNear(),()=>o.liftEmptyBlock(),()=>o.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},s={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Jr()||zh()?s:i},addProseMirrorPlugins(){return[new le({key:new Ee("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(m=>m.getMeta("composition")))return;const r=t.some(m=>m.docChanged)&&!e.doc.eq(n.doc),i=t.some(m=>m.getMeta("preventClearDocument"));if(!r||i)return;const{empty:s,from:o,to:a}=e.selection,l=U.atStart(e.doc).from,u=U.atEnd(e.doc).to;if(s||!(o===l&&a===u)||!lo(n.doc))return;const f=n.tr,h=io({state:n,transaction:f}),{commands:p}=new so({editor:this.editor,state:h});if(p.clearNodes(),!!f.steps.length)return f}})]}}),dp=me.create({name:"paste",addProseMirrorPlugins(){return[new le({key:new Ee("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),fp=me.create({name:"tabindex",addProseMirrorPlugins(){return[new le({key:new Ee("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),hp=me.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=fr(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new le({key:new Ee("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),kk=class Or{constructor(e,n,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new Or(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new Or(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new Or(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const i=n.isBlock&&!n.isTextblock,s=n.isAtom&&!n.isText,o=n.isInline,a=this.pos+r+(s?0:1);if(a<0||a>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(a);if(!i&&!o&&l.depth<=this.depth)return;const u=new Or(l,this.editor,i,i||o?n:null);i&&(u.actualDepth=this.depth+1),e.push(u)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===e)if(Object.keys(n).length>0){const s=i.node.attrs,o=Object.keys(n);for(let a=0;a<o.length;a+=1){const l=o[a];if(s[l]!==n[l])break}}else r=i;i=i.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let i=[];if(!this.children||this.children.length===0)return i;const s=Object.keys(n);return this.children.forEach(o=>{r&&i.length>0||(o.node.type.name===e&&s.every(l=>n[l]===o.node.attrs[l])&&i.push(o),!(r&&i.length>0)&&(i=i.concat(o.querySelectorAll(e,n,r))))}),i}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},xk=`.ProseMirror {
104
+ position: relative;
105
+ }
106
+
107
+ .ProseMirror {
108
+ word-wrap: break-word;
109
+ white-space: pre-wrap;
110
+ white-space: break-spaces;
111
+ -webkit-font-variant-ligatures: none;
112
+ font-variant-ligatures: none;
113
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
114
+ }
115
+
116
+ .ProseMirror [contenteditable="false"] {
117
+ white-space: normal;
118
+ }
119
+
120
+ .ProseMirror [contenteditable="false"] [contenteditable="true"] {
121
+ white-space: pre-wrap;
122
+ }
123
+
124
+ .ProseMirror pre {
125
+ white-space: pre-wrap;
126
+ }
127
+
128
+ img.ProseMirror-separator {
129
+ display: inline !important;
130
+ border: none !important;
131
+ margin: 0 !important;
132
+ width: 0 !important;
133
+ height: 0 !important;
134
+ }
135
+
136
+ .ProseMirror-gapcursor {
137
+ display: none;
138
+ pointer-events: none;
139
+ position: absolute;
140
+ margin: 0;
141
+ }
142
+
143
+ .ProseMirror-gapcursor:after {
144
+ content: "";
145
+ display: block;
146
+ position: absolute;
147
+ top: -2px;
148
+ width: 20px;
149
+ border-top: 1px solid black;
150
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
151
+ }
152
+
153
+ @keyframes ProseMirror-cursor-blink {
154
+ to {
155
+ visibility: hidden;
156
+ }
157
+ }
158
+
159
+ .ProseMirror-hideselection *::selection {
160
+ background: transparent;
161
+ }
162
+
163
+ .ProseMirror-hideselection *::-moz-selection {
164
+ background: transparent;
165
+ }
166
+
167
+ .ProseMirror-hideselection * {
168
+ caret-color: transparent;
169
+ }
170
+
171
+ .ProseMirror-focused .ProseMirror-gapcursor {
172
+ display: block;
173
+ }`;function _k(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return e&&i.setAttribute("nonce",e),i.setAttribute("data-tiptap-style",""),i.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(i),i}var wk=class extends ck{constructor(t={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:$E,createMappablePosition:HE},this.setOptions(t),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:i,moved:s})=>this.options.onDrop(r,i,s)),this.on("paste",({event:r,slice:i})=>this.options.onPaste(r,i)),this.on("delete",this.options.onDelete);const e=this.createDoc(),n=Bh(e,this.options.autofocus);this.editorState=ir.create({doc:e,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(t){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(t),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const t=this.editorView.dom;t!=null&&t.editor&&delete t.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(t){console.warn("Failed to remove CSS element:",t)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=_k(xk,this.options.injectNonce))}setOptions(t={}){this.options={...this.options,...t},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(t,e=!0){this.setOptions({editable:t}),e&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:t=>{this.editorState=t},dispatch:t=>{this.dispatchTransaction(t)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(t,e)=>{if(this.editorView)return this.editorView[e];if(e==="state")return this.editorState;if(e in t)return Reflect.get(t,e);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${e}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(t,e){const n=qh(e)?e(t,[...this.state.plugins]):[...this.state.plugins,t],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(t){if(this.isDestroyed)return;const e=this.state.plugins;let n=e;if([].concat(t).forEach(i=>{const s=typeof i=="string"?`${i}$`:i.key;n=n.filter(o=>!o.key.startsWith(s))}),e.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var t,e;const r=[...this.options.enableCoreExtensions?[ap,rp.configure({blockSeparator:(e=(t=this.options.coreExtensionOptions)==null?void 0:t.clipboardTextSerializer)==null?void 0:e.blockSeparator}),ip,up,cp,fp,op,dp,sp,hp.configure({direction:this.options.textDirection})].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new co(r,this)}createCommandManager(){this.commandManager=new so({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let t;try{t=Ua(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(e.message))throw e;this.emit("contentError",{editor:this,error:e,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),t=Ua(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return t}createView(t){const{editorProps:e,enableExtensionDispatchTransaction:n}=this.options,r=e.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,s=e.transformPastedHTML,o=this.extensionManager.transformPastedHTML(s);this.editorView=new Rh(t,{...e,attributes:{role:"textbox",...e==null?void 0:e.attributes},dispatchTransaction:i,transformPastedHTML:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const a=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(a),this.prependClass(),this.injectCSS();const l=this.view.dom;l.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(t){this.isCapturingTransaction=!0,t(),this.isCapturingTransaction=!1;const e=this.capturedTransaction;return this.capturedTransaction=null,e}dispatchTransaction(t){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=t;return}t.steps.forEach(u=>{var c;return(c=this.capturedTransaction)==null?void 0:c.step(u)});return}const{state:e,transactions:n}=this.state.applyTransaction(t),r=!this.state.selection.eq(e.selection),i=n.includes(t),s=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:t,nextState:e}),!i)return;this.view.updateState(e),this.emit("transaction",{editor:this,transaction:t,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:t});const o=n.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),a=o==null?void 0:o.getMeta("focus"),l=o==null?void 0:o.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:o}),l&&this.emit("blur",{editor:this,event:l.event,transaction:o}),!(t.getMeta("preventUpdate")||!n.some(u=>u.docChanged)||s.doc.eq(e.doc))&&this.emit("update",{editor:this,transaction:t,appendedTransactions:n.slice(1)})}getAttributes(t){return jh(this.state,t)}isActive(t,e){const n=typeof t=="string"?t:null,r=typeof t=="string"?e:t;return BE(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return ui(this.state.doc.content,this.schema)}getText(t){const{blockSeparator:e=`
174
+
175
+ `,textSerializers:n={}}=t||{};return OE(this.state.doc,{blockSeparator:e,textSerializers:{...Gh(this.schema),...n}})}get isEmpty(){return lo(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var t,e;return(e=(t=this.editorView)==null?void 0:t.isDestroyed)!=null?e:!0}$node(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelector(t,e))||null}$nodes(t,e){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(t,e))||null}$pos(t){const e=this.state.doc.resolve(t);return new kk(e,this)}get $doc(){return this.$pos(0)}};function Hn(t){return new uo({find:t.find,handler:({state:e,range:n,match:r})=>{const i=ee(t.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:s}=e,o=r[r.length-1],a=r[0];if(o){const l=a.search(/\S/),u=n.from+a.indexOf(o),c=u+o.length;if(Fl(n.from,n.to,e.doc).filter(h=>h.mark.type.excluded.find(m=>m===t.type&&m!==h.mark.type)).filter(h=>h.to>u).length)return null;c<n.to&&s.delete(c,n.to),u>n.from&&s.delete(n.from+l,u);const f=n.from+l+o.length;s.addMark(n.from+l,f,t.type.create(i||{})),s.removeStoredMark(t.type)}},undoable:t.undoable})}function pp(t){return new uo({find:t.find,handler:({state:e,range:n,match:r})=>{const i=ee(t.getAttributes,void 0,r)||{},{tr:s}=e,o=n.from;let a=n.to;const l=t.type.create(i);if(r[1]){const u=r[0].lastIndexOf(r[1]);let c=o+u;c>a?c=a:a=c+r[1].length;const d=r[0][r[0].length-1];s.insertText(d,o+r[0].length-1),s.replaceWith(c,a,l)}else if(r[0]){const u=t.type.isInline?o:o-1;s.insert(u,t.type.create(i)).delete(s.mapping.map(o),s.mapping.map(a))}s.scrollIntoView()},undoable:t.undoable})}function Va(t){return new uo({find:t.find,handler:({state:e,range:n,match:r})=>{const i=e.doc.resolve(n.from),s=ee(t.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,s)},undoable:t.undoable})}function pr(t){return new uo({find:t.find,handler:({state:e,range:n,match:r,chain:i})=>{const s=ee(t.getAttributes,void 0,r)||{},o=e.tr.delete(n.from,n.to),l=o.doc.resolve(n.from).blockRange(),u=l&&gl(l,t.type,s);if(!u)return null;if(o.wrap(l,u),t.keepMarks&&t.editor){const{selection:d,storedMarks:f}=e,{splittableMarks:h}=t.editor.extensionManager,p=f||d.$to.parentOffset&&d.$from.marks();if(p){const m=p.filter(g=>h.includes(g.type.name));o.ensureMarks(m)}}if(t.keepAttributes){const d=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(d,s).run()}const c=o.doc.resolve(n.from-1).nodeBefore;c&&c.type===t.type&&En(o.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,c))&&o.join(n.from-1)},undoable:t.undoable})}var Ck=t=>"touches"in t,Sk=class{constructor(t){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=a=>{if(!this.isResizing||!this.activeHandle)return;const l=a.clientX-this.startX,u=a.clientY-this.startY;this.handleResize(l,u)},this.handleTouchMove=a=>{if(!this.isResizing||!this.activeHandle)return;const l=a.touches[0];if(!l)return;const u=l.clientX-this.startX,c=l.clientY-this.startY;this.handleResize(u,c)},this.handleMouseUp=()=>{if(!this.isResizing)return;const a=this.element.offsetWidth,l=this.element.offsetHeight;this.onCommit(a,l),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,n,r,i,s,o;this.node=t.node,this.editor=t.editor,this.element=t.element,this.contentElement=t.contentElement,this.getPos=t.getPos,this.onResize=t.onResize,this.onCommit=t.onCommit,this.onUpdate=t.onUpdate,(e=t.options)!=null&&e.min&&(this.minSize={...this.minSize,...t.options.min}),(n=t.options)!=null&&n.max&&(this.maxSize=t.options.max),(r=t==null?void 0:t.options)!=null&&r.directions&&(this.directions=t.options.directions),(i=t.options)!=null&&i.preserveAspectRatio&&(this.preserveAspectRatio=t.options.preserveAspectRatio),(s=t.options)!=null&&s.className&&(this.classNames={container:t.options.className.container||"",wrapper:t.options.className.wrapper||"",handle:t.options.className.handle||"",resizing:t.options.className.resizing||""}),(o=t.options)!=null&&o.createCustomHandle&&(this.createCustomHandle=t.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var t;return(t=this.contentElement)!=null?t:null}handleEditorUpdate(){const t=this.editor.isEditable;t!==this.lastEditableState&&(this.lastEditableState=t,t?t&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(t,e,n){return t.type!==this.node.type?!1:(this.node=t,this.onUpdate?this.onUpdate(t,e,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){const t=document.createElement("div");return t.dataset.resizeContainer="",t.dataset.node=this.node.type.name,t.style.display=this.node.type.isInline?"inline-flex":"flex",this.classNames.container&&(t.className=this.classNames.container),t.appendChild(this.wrapper),t}createWrapper(){const t=document.createElement("div");return t.style.position="relative",t.style.display="block",t.dataset.resizeWrapper="",this.classNames.wrapper&&(t.className=this.classNames.wrapper),t.appendChild(this.element),t}createHandle(t){const e=document.createElement("div");return e.dataset.resizeHandle=t,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(t,e){const n=e.includes("top"),r=e.includes("bottom"),i=e.includes("left"),s=e.includes("right");n&&(t.style.top="0"),r&&(t.style.bottom="0"),i&&(t.style.left="0"),s&&(t.style.right="0"),(e==="top"||e==="bottom")&&(t.style.left="0",t.style.right="0"),(e==="left"||e==="right")&&(t.style.top="0",t.style.bottom="0")}attachHandles(){this.directions.forEach(t=>{let e;this.createCustomHandle?e=this.createCustomHandle(t):e=this.createHandle(t),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${t}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(t)),this.createCustomHandle||this.positionHandle(e,t),e.addEventListener("mousedown",n=>this.handleResizeStart(n,t)),e.addEventListener("touchstart",n=>this.handleResizeStart(n,t)),this.handleMap.set(t,e),this.wrapper.appendChild(e)})}removeHandles(){this.handleMap.forEach(t=>t.remove()),this.handleMap.clear()}applyInitialSize(){const t=this.node.attrs.width,e=this.node.attrs.height;t?(this.element.style.width=`${t}px`,this.initialWidth=t):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.activeHandle=e,Ck(t)?(this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY):(this.startX=t.clientX,this.startY=t.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(t,e){if(!this.activeHandle)return;const n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:i}=this.calculateNewDimensions(this.activeHandle,t,e),s=this.applyConstraints(r,i,n);this.element.style.width=`${s.width}px`,this.element.style.height=`${s.height}px`,this.onResize&&this.onResize(s.width,s.height)}calculateNewDimensions(t,e,n){let r=this.startWidth,i=this.startHeight;const s=t.includes("right"),o=t.includes("left"),a=t.includes("bottom"),l=t.includes("top");return s?r=this.startWidth+e:o&&(r=this.startWidth-e),a?i=this.startHeight+n:l&&(i=this.startHeight-n),(t==="right"||t==="left")&&(r=this.startWidth+(s?e:-e)),(t==="top"||t==="bottom")&&(i=this.startHeight+(a?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,i,t):{width:r,height:i}}applyConstraints(t,e,n){var r,i,s,o;if(!n){let u=Math.max(this.minSize.width,t),c=Math.max(this.minSize.height,e);return(r=this.maxSize)!=null&&r.width&&(u=Math.min(this.maxSize.width,u)),(i=this.maxSize)!=null&&i.height&&(c=Math.min(this.maxSize.height,c)),{width:u,height:c}}let a=t,l=e;return a<this.minSize.width&&(a=this.minSize.width,l=a/this.aspectRatio),l<this.minSize.height&&(l=this.minSize.height,a=l*this.aspectRatio),(s=this.maxSize)!=null&&s.width&&a>this.maxSize.width&&(a=this.maxSize.width,l=a/this.aspectRatio),(o=this.maxSize)!=null&&o.height&&l>this.maxSize.height&&(l=this.maxSize.height,a=l*this.aspectRatio),{width:a,height:l}}applyAspectRatio(t,e,n){const r=n==="left"||n==="right",i=n==="top"||n==="bottom";return r?{width:t,height:t/this.aspectRatio}:i?{width:e*this.aspectRatio,height:e}:{width:t,height:t/this.aspectRatio}}};function vk(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof z){const s=r.index();return r.parent.canReplaceWith(s,s+1,e)}let i=r.depth;for(;i>=0;){const s=r.index(i);if(r.node(i).contentMatchAt(s).matchType(e))return!0;i-=1}return!1}var Ak={};Il(Ak,{createAtomBlockMarkdownSpec:()=>Tk,createBlockMarkdownSpec:()=>Mk,createInlineMarkdownSpec:()=>Dk,parseAttributes:()=>$l,parseIndentedBlocks:()=>Ka,renderNestedMarkdownContent:()=>Ul,serializeAttributes:()=>Hl});function $l(t){if(!(t!=null&&t.trim()))return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,u=>(n.push(u),`__QUOTED_${n.length-1}__`)),i=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(i){const u=i.map(c=>c.trim().slice(1));e.class=u.join(" ")}const s=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);s&&(e.id=s[1]);const o=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(o)).forEach(([,u,c])=>{var d;const f=parseInt(((d=c.match(/__QUOTED_(\d+)__/))==null?void 0:d[1])||"0",10),h=n[f];h&&(e[u]=h.slice(1,-1))});const l=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(c=>{c.match(/^[a-zA-Z][\w-]*$/)&&(e[c]=!0)}),e}function Hl(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function Tk(t){const{nodeName:e,name:n,parseAttributes:r=$l,serializeAttributes:i=Hl,defaultAttributes:s={},requiredAttributes:o=[],allowedAttributes:a}=t,l=n||e,u=c=>{if(!a)return c;const d={};return a.forEach(f=>{f in c&&(d[f]=c[f])}),d};return{parseMarkdown:(c,d)=>{const f={...s,...c.attributes};return d.createNode(e,f,[])},markdownTokenizer:{name:e,level:"block",start(c){var d;const f=new RegExp(`^:::${l}(?:\\s|$)`,"m"),h=(d=c.match(f))==null?void 0:d.index;return h!==void 0?h:-1},tokenize(c,d,f){const h=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),p=c.match(h);if(!p)return;const m=p[1]||"",g=r(m);if(!o.find(y=>!(y in g)))return{type:e,raw:p[0],attributes:g}}},renderMarkdown:c=>{const d=u(c.attrs||{}),f=i(d),h=f?` {${f}}`:"";return`:::${l}${h} :::`}}}function Mk(t){const{nodeName:e,name:n,getContent:r,parseAttributes:i=$l,serializeAttributes:s=Hl,defaultAttributes:o={},content:a="block",allowedAttributes:l}=t,u=n||e,c=d=>{if(!l)return d;const f={};return l.forEach(h=>{h in d&&(f[h]=d[h])}),f};return{parseMarkdown:(d,f)=>{let h;if(r){const m=r(d);h=typeof m=="string"?[{type:"text",text:m}]:m}else a==="block"?h=f.parseChildren(d.tokens||[]):h=f.parseInline(d.tokens||[]);const p={...o,...d.attributes};return f.createNode(e,p,h)},markdownTokenizer:{name:e,level:"block",start(d){var f;const h=new RegExp(`^:::${u}`,"m"),p=(f=d.match(h))==null?void 0:f.index;return p!==void 0?p:-1},tokenize(d,f,h){var p;const m=new RegExp(`^:::${u}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),g=d.match(m);if(!g)return;const[b,y=""]=g,k=i(y);let _=1;const x=b.length;let w="";const C=/^:::([\w-]*)(\s.*)?/gm,M=d.slice(x);for(C.lastIndex=0;;){const R=C.exec(M);if(R===null)break;const j=R.index,be=R[1];if(!((p=R[2])!=null&&p.endsWith(":::"))){if(be)_+=1;else if(_-=1,_===0){const ue=M.slice(0,j);w=ue.trim();const re=d.slice(0,x+j+R[0].length);let G=[];if(w)if(a==="block")for(G=h.blockTokens(ue),G.forEach(q=>{q.text&&(!q.tokens||q.tokens.length===0)&&(q.tokens=h.inlineTokens(q.text))});G.length>0;){const q=G[G.length-1];if(q.type==="paragraph"&&(!q.text||q.text.trim()===""))G.pop();else break}else G=h.inlineTokens(w);return{type:e,raw:re,attributes:k,content:w,tokens:G}}}}}},renderMarkdown:(d,f)=>{const h=c(d.attrs||{}),p=s(h),m=p?` {${p}}`:"",g=f.renderChildren(d.content||[],`
176
+
177
+ `);return`:::${u}${m}
178
+
179
+ ${g}
180
+
181
+ :::`}}}function Nk(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,i,s,o]=r;e[i]=s||o,r=n.exec(t)}return e}function Ok(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function Dk(t){const{nodeName:e,name:n,getContent:r,parseAttributes:i=Nk,serializeAttributes:s=Ok,defaultAttributes:o={},selfClosing:a=!1,allowedAttributes:l}=t,u=n||e,c=f=>{if(!l)return f;const h={};return l.forEach(p=>{const m=typeof p=="string"?p:p.name,g=typeof p=="string"?void 0:p.skipIfDefault;if(m in f){const b=f[m];if(g!==void 0&&b===g)return;h[m]=b}}),h},d=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(f,h)=>{const p={...o,...f.attributes};if(a)return h.createNode(e,p);const m=r?r(f):f.content||"";return m?h.createNode(e,p,[h.createTextNode(m)]):h.createNode(e,p,[])},markdownTokenizer:{name:e,level:"inline",start(f){const h=a?new RegExp(`\\[${d}\\s*[^\\]]*\\]`):new RegExp(`\\[${d}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${d}\\]`),p=f.match(h),m=p==null?void 0:p.index;return m!==void 0?m:-1},tokenize(f,h,p){const m=a?new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`),g=f.match(m);if(!g)return;let b="",y="";if(a){const[,_]=g;y=_}else{const[,_,x]=g;y=_,b=x||""}const k=i(y.trim());return{type:e,raw:g[0],content:b.trim(),attributes:k}}},renderMarkdown:f=>{let h="";r?h=r(f):f.content&&f.content.length>0&&(h=f.content.filter(b=>b.type==="text").map(b=>b.text).join(""));const p=c(f.attrs||{}),m=s(p),g=m?` ${m}`:"";return a?`[${u}${g}]`:`[${u}${g}]${h}[/${u}]`}}}function Ka(t,e,n){var r,i,s,o;const a=t.split(`
182
+ `),l=[];let u="",c=0;const d=e.baseIndentSize||2;for(;c<a.length;){const f=a[c],h=f.match(e.itemPattern);if(!h){if(l.length>0)break;if(f.trim()===""){c+=1,u=`${u}${f}
183
+ `;continue}else return}const p=e.extractItemData(h),{indentLevel:m,mainContent:g}=p;u=`${u}${f}
184
+ `;const b=[g];for(c+=1;c<a.length;){const x=a[c];if(x.trim()===""){const C=a.slice(c+1).findIndex(j=>j.trim()!=="");if(C===-1)break;if((((i=(r=a[c+1+C].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:i.length)||0)>m){b.push(x),u=`${u}${x}
185
+ `,c+=1;continue}else break}if((((o=(s=x.match(/^(\s*)/))==null?void 0:s[1])==null?void 0:o.length)||0)>m)b.push(x),u=`${u}${x}
186
+ `,c+=1;else break}let y;const k=b.slice(1);if(k.length>0){const x=k.map(w=>w.slice(m+d)).join(`
187
+ `);x.trim()&&(e.customNestedParser?y=e.customNestedParser(x):y=n.blockTokens(x))}const _=e.createToken(p,y);l.push(_)}if(l.length!==0)return{items:l,raw:u}}function Ul(t,e,n,r){if(!t||!Array.isArray(t.content))return"";const i=typeof n=="function"?n(r):n,[s,...o]=t.content,a=e.renderChildren([s]);let l=`${i}${a}`;return o&&o.length>0&&o.forEach((u,c)=>{var d,f;const h=(f=(d=e.renderChild)==null?void 0:d.call(e,u,c+1))!=null?f:e.renderChildren([u]);if(h!=null){const p=h.split(`
188
+ `).map(m=>m?e.indent(m):e.indent("")).join(`
189
+ `);l+=u.type==="paragraph"?`
190
+
191
+ ${p}`:`
192
+ ${p}`}}),l}var fs=new WeakMap;function Rk(t,e){let n=fs.get(t);if(!n){const r={callbacks:new Set,rafId:null,handler:()=>{r.rafId!==null&&cancelAnimationFrame(r.rafId),r.rafId=requestAnimationFrame(()=>{r.rafId=null,r.callbacks.forEach(i=>i())})}};fs.set(t,r),t.on("update",r.handler),n=r}n.callbacks.add(e)}function Ik(t,e){const n=fs.get(t);n&&(n.callbacks.delete(e),n.callbacks.size===0&&(n.rafId!==null&&cancelAnimationFrame(n.rafId),t.off("update",n.handler),fs.delete(t)))}function Lk(t,e,n={}){const{state:r}=e,{doc:i,tr:s}=r,o=t;i.descendants((a,l)=>{const u=s.mapping.map(l),c=s.mapping.map(l)+a.nodeSize;let d=null;if(a.marks.forEach(h=>{if(h!==o)return!1;d=h}),!d)return;let f=!1;if(Object.keys(n).forEach(h=>{n[h]!==d.attrs[h]&&(f=!0)}),f){const h=t.type.create({...t.attrs,...n});s.removeMark(u,c,t.type),s.addMark(u,c,h)}}),s.docChanged&&e.view.dispatch(s)}var X=class mp extends zl{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new mp(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},Pk=class{constructor(t,e,n){this.isDragging=!1,this.component=t,this.editor=e.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=e.extension,this.node=e.node,this.decorations=e.decorations,this.innerDecorations=e.innerDecorations,this.view=e.view,this.HTMLAttributes=e.HTMLAttributes,this.getPos=e.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(t){var e,n,r,i,s,o,a;const{view:l}=this.editor,u=t.target,c=u.nodeType===3?(e=u.parentElement)==null?void 0:e.closest("[data-drag-handle]"):u.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(u)||!c)return;let d=0,f=0;if(this.dom!==c){const y=this.dom.getBoundingClientRect(),k=c.getBoundingClientRect(),_=(i=t.offsetX)!=null?i:(r=t.nativeEvent)==null?void 0:r.offsetX,x=(o=t.offsetY)!=null?o:(s=t.nativeEvent)==null?void 0:s.offsetY;d=k.x-y.x+_,f=k.y-y.y+x}const h=this.dom.cloneNode(!0);try{const y=this.dom.getBoundingClientRect();h.style.width=`${Math.round(y.width)}px`,h.style.height=`${Math.round(y.height)}px`,h.style.boxSizing="border-box",h.style.pointerEvents="none"}catch{}let p=null;try{p=document.createElement("div"),p.style.position="absolute",p.style.top="-9999px",p.style.left="-9999px",p.style.pointerEvents="none",p.appendChild(h),document.body.appendChild(p),(a=t.dataTransfer)==null||a.setDragImage(h,d,f)}finally{p&&setTimeout(()=>{try{p==null||p.remove()}catch{}},0)}const m=this.getPos();if(typeof m!="number")return;const g=z.create(l.state.doc,m),b=l.state.tr.setSelection(g);l.dispatch(b)}stopEvent(t){var e;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:t});const n=t.target;if(!(this.dom.contains(n)&&!((e=this.contentDOM)!=null&&e.contains(n))))return!1;const i=t.type.startsWith("drag"),s=t.type==="dragover"||t.type==="dragenter",o=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o&&!i)return!0;const{isEditable:l}=this.editor,{isDragging:u}=this,c=!!this.node.type.spec.draggable,d=z.isSelectable(this.node),f=t.type==="copy",h=t.type==="paste",p=t.type==="cut",m=t.type==="mousedown";if(!c&&d&&i&&t.target===this.dom&&t.preventDefault(),c&&i&&!u&&t.target===this.dom)return t.preventDefault(),!1;if(c&&l&&!u&&m){const g=n.closest("[data-drag-handle]");g&&(this.dom===g||this.dom.contains(g))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(u||s||o||f||h||p||m&&d)}ignoreMutation(t){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:t}):this.node.isLeaf||this.node.isAtom?!0:t.type==="selection"||this.dom.contains(t.target)&&t.type==="childList"&&(Jr()||Ha())&&this.editor.isFocused&&[...Array.from(t.addedNodes),...Array.from(t.removedNodes)].every(n=>n.isContentEditable)?!1:this.contentDOM===t.target&&t.type==="attributes"?!0:!this.contentDOM.contains(t.target)}updateAttributes(t){this.editor.commands.command(({tr:e})=>{const n=this.getPos();return typeof n!="number"?!1:(e.setNodeMarkup(n,void 0,{...this.node.attrs,...t}),!0)})}deleteNode(){const t=this.getPos();if(typeof t!="number")return;const e=t+this.node.nodeSize;this.editor.commands.deleteRange({from:t,to:e})}};function bn(t){return new mk({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:i})=>{const s=ee(t.getAttributes,void 0,r,i);if(s===!1||s===null)return null;const{tr:o}=e,a=r[r.length-1],l=r[0];let u=n.to;if(a){const c=l.search(/\S/),d=n.from+l.indexOf(a),f=d+a.length;if(Fl(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(b=>b===t.type&&b!==m.mark.type)).filter(m=>m.to>d).length)return null;f<n.to&&o.delete(f,n.to),d>n.from&&o.delete(n.from+c,d),u=n.from+c+a.length,o.addMark(n.from+c,u,t.type.create(s||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(t.type)}}})}const{getOwnPropertyNames:Bk,getOwnPropertySymbols:Fk}=Object,{hasOwnProperty:zk}=Object.prototype;function Jo(t,e){return function(r,i,s){return t(r,i,s)&&e(r,i,s)}}function Mi(t){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return t(n,r,i);const{cache:s}=i,o=s.get(n),a=s.get(r);if(o&&a)return o===r&&a===n;s.set(n,r),s.set(r,n);const l=t(n,r,i);return s.delete(n),s.delete(r),l}}function $k(t){return t!=null?t[Symbol.toStringTag]:void 0}function Pc(t){return Bk(t).concat(Fk(t))}const Hk=Object.hasOwn||((t,e)=>zk.call(t,e));function Vn(t,e){return t===e||!t&&!e&&t!==t&&e!==e}const Uk="__v",qk="__o",Wk="_owner",{getOwnPropertyDescriptor:Bc,keys:Fc}=Object;function Vk(t,e){return t.byteLength===e.byteLength&&hs(new Uint8Array(t),new Uint8Array(e))}function Kk(t,e,n){let r=t.length;if(e.length!==r)return!1;for(;r-- >0;)if(!n.equals(t[r],e[r],r,r,t,e,n))return!1;return!0}function Gk(t,e){return t.byteLength===e.byteLength&&hs(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function jk(t,e){return Vn(t.getTime(),e.getTime())}function Zk(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function Yk(t,e){return t===e}function zc(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.entries();let o,a,l=0;for(;(o=s.next())&&!o.done;){const u=e.entries();let c=!1,d=0;for(;(a=u.next())&&!a.done;){if(i[d]){d++;continue}const f=o.value,h=a.value;if(n.equals(f[0],h[0],l,d,t,e,n)&&n.equals(f[1],h[1],f[0],h[0],t,e,n)){c=i[d]=!0;break}d++}if(!c)return!1;l++}return!0}const Jk=Vn;function Xk(t,e,n){const r=Fc(t);let i=r.length;if(Fc(e).length!==i)return!1;for(;i-- >0;)if(!gp(t,e,n,r[i]))return!1;return!0}function wr(t,e,n){const r=Pc(t);let i=r.length;if(Pc(e).length!==i)return!1;let s,o,a;for(;i-- >0;)if(s=r[i],!gp(t,e,n,s)||(o=Bc(t,s),a=Bc(e,s),(o||a)&&(!o||!a||o.configurable!==a.configurable||o.enumerable!==a.enumerable||o.writable!==a.writable)))return!1;return!0}function Qk(t,e){return Vn(t.valueOf(),e.valueOf())}function ex(t,e){return t.source===e.source&&t.flags===e.flags}function $c(t,e,n){const r=t.size;if(r!==e.size)return!1;if(!r)return!0;const i=new Array(r),s=t.values();let o,a;for(;(o=s.next())&&!o.done;){const l=e.values();let u=!1,c=0;for(;(a=l.next())&&!a.done;){if(!i[c]&&n.equals(o.value,a.value,o.value,a.value,t,e,n)){u=i[c]=!0;break}c++}if(!u)return!1}return!0}function hs(t,e){let n=t.byteLength;if(e.byteLength!==n||t.byteOffset!==e.byteOffset)return!1;for(;n-- >0;)if(t[n]!==e[n])return!1;return!0}function tx(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function gp(t,e,n,r){return(r===Wk||r===qk||r===Uk)&&(t.$$typeof||e.$$typeof)?!0:Hk(e,r)&&n.equals(t[r],e[r],r,r,t,e,n)}const nx="[object ArrayBuffer]",rx="[object Arguments]",ix="[object Boolean]",sx="[object DataView]",ox="[object Date]",ax="[object Error]",lx="[object Map]",ux="[object Number]",cx="[object Object]",dx="[object RegExp]",fx="[object Set]",hx="[object String]",px={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},mx="[object URL]",gx=Object.prototype.toString;function bx({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:u,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:h,unknownTagComparators:p}){return function(g,b,y){if(g===b)return!0;if(g==null||b==null)return!1;const k=typeof g;if(k!==typeof b)return!1;if(k!=="object")return k==="number"?a(g,b,y):k==="function"?s(g,b,y):!1;const _=g.constructor;if(_!==b.constructor)return!1;if(_===Object)return l(g,b,y);if(Array.isArray(g))return e(g,b,y);if(_===Date)return r(g,b,y);if(_===RegExp)return c(g,b,y);if(_===Map)return o(g,b,y);if(_===Set)return d(g,b,y);const x=gx.call(g);if(x===ox)return r(g,b,y);if(x===dx)return c(g,b,y);if(x===lx)return o(g,b,y);if(x===fx)return d(g,b,y);if(x===cx)return typeof g.then!="function"&&typeof b.then!="function"&&l(g,b,y);if(x===mx)return h(g,b,y);if(x===ax)return i(g,b,y);if(x===rx)return l(g,b,y);if(px[x])return f(g,b,y);if(x===nx)return t(g,b,y);if(x===sx)return n(g,b,y);if(x===ix||x===ux||x===hx)return u(g,b,y);if(p){let w=p[x];if(!w){const C=$k(g);C&&(w=p[C])}if(w)return w(g,b,y)}return!1}}function yx({circular:t,createCustomConfig:e,strict:n}){let r={areArrayBuffersEqual:Vk,areArraysEqual:n?wr:Kk,areDataViewsEqual:Gk,areDatesEqual:jk,areErrorsEqual:Zk,areFunctionsEqual:Yk,areMapsEqual:n?Jo(zc,wr):zc,areNumbersEqual:Jk,areObjectsEqual:n?wr:Xk,arePrimitiveWrappersEqual:Qk,areRegExpsEqual:ex,areSetsEqual:n?Jo($c,wr):$c,areTypedArraysEqual:n?Jo(hs,wr):hs,areUrlsEqual:tx,unknownTagComparators:void 0};if(e&&(r=Object.assign({},r,e(r))),t){const i=Mi(r.areArraysEqual),s=Mi(r.areMapsEqual),o=Mi(r.areObjectsEqual),a=Mi(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:a})}return r}function Ex(t){return function(e,n,r,i,s,o,a){return t(e,n,a)}}function kx({circular:t,comparator:e,createState:n,equals:r,strict:i}){if(n)return function(a,l){const{cache:u=t?new WeakMap:void 0,meta:c}=n();return e(a,l,{cache:u,equals:r,meta:c,strict:i})};if(t)return function(a,l){return e(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const s={cache:void 0,equals:r,meta:void 0,strict:i};return function(a,l){return e(a,l,s)}}const xx=xn();xn({strict:!0});xn({circular:!0});xn({circular:!0,strict:!0});xn({createInternalComparator:()=>Vn});xn({strict:!0,createInternalComparator:()=>Vn});xn({circular:!0,createInternalComparator:()=>Vn});xn({circular:!0,createInternalComparator:()=>Vn,strict:!0});function xn(t={}){const{circular:e=!1,createInternalComparator:n,createState:r,strict:i=!1}=t,s=yx(t),o=bx(s),a=n?n(o):Ex(o);return kx({circular:e,comparator:o,createState:r,equals:a,strict:i})}var Xo={exports:{}},Qo={};/**
193
+ * @license React
194
+ * use-sync-external-store-shim/with-selector.production.js
195
+ *
196
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
197
+ *
198
+ * This source code is licensed under the MIT license found in the
199
+ * LICENSE file in the root directory of this source tree.
200
+ */var Hc;function _x(){if(Hc)return Qo;Hc=1;var t=zm(),e=Gm();function n(u,c){return u===c&&(u!==0||1/u===1/c)||u!==u&&c!==c}var r=typeof Object.is=="function"?Object.is:n,i=e.useSyncExternalStore,s=t.useRef,o=t.useEffect,a=t.useMemo,l=t.useDebugValue;return Qo.useSyncExternalStoreWithSelector=function(u,c,d,f,h){var p=s(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function b(w){if(!y){if(y=!0,k=w,w=f(w),h!==void 0&&m.hasValue){var C=m.value;if(h(C,w))return _=C}return _=w}if(C=_,r(k,w))return C;var M=f(w);return h!==void 0&&h(C,M)?(k=w,C):(k=w,_=M)}var y=!1,k,_,x=d===void 0?null:d;return[function(){return b(c())},x===null?void 0:function(){return b(x())}]},[c,d,f,h]);var g=i(u,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=g},[g]),l(g),g},Qo}var Uc;function wx(){return Uc||(Uc=1,Xo.exports=_x()),Xo.exports}var Cx=wx(),Sx=(...t)=>e=>{t.forEach(n=>{typeof n=="function"?n(e):n&&(n.current=e)})},vx=({contentComponent:t})=>{const e=af.useSyncExternalStore(t.subscribe,t.getSnapshot,t.getServerSnapshot);return I.jsx(I.Fragment,{children:Object.values(e)})};function Ax(){const t=new Set;let e={};return{subscribe(n){return t.add(n),()=>{t.delete(n)}},getSnapshot(){return e},getServerSnapshot(){return e},setRenderer(n,r){e={...e,[n]:$m.createPortal(r.reactElement,r.element,n)},t.forEach(i=>i())},removeRenderer(n){const r={...e};delete r[n],e=r,t.forEach(i=>i())}}}var Tx=class extends Pn.Component{constructor(t){super(t),this.editorContentRef=Pn.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var t;const e=this.props.editor;if(e&&!e.isDestroyed&&((t=e.view.dom)!=null&&t.parentNode)){if(e.contentComponent)return;const n=this.editorContentRef.current;n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n}),e.contentComponent=Ax(),e.createNodeViews(),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){var t;const e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{if(!((t=e.view.dom)!=null&&t.parentNode))return;const n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch{}}}render(){const{editor:t,innerRef:e,...n}=this.props;return I.jsxs(I.Fragment,{children:[I.jsx("div",{ref:Sx(e,this.editorContentRef),...n}),(t==null?void 0:t.contentComponent)&&I.jsx(vx,{contentComponent:t.contentComponent})]})}},Mx=ne.forwardRef((t,e)=>{const n=Pn.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[t.editor]);return Pn.createElement(Tx,{key:n,innerRef:e,...t})}),bp=Pn.memo(Mx),Nx=typeof window<"u"?ne.useLayoutEffect:ne.useEffect,Ox=class{constructor(t){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=t,this.lastSnapshot={editor:t,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(t){return this.subscribers.add(t),()=>{this.subscribers.delete(t)}}watch(t){if(this.editor=t,this.editor){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",e),()=>{n.off("transaction",e)}}}};function yp(t){var e;const[n]=ne.useState(()=>new Ox(t.editor)),r=Cx.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,t.selector,(e=t.equalityFn)!=null?e:xx);return Nx(()=>n.watch(t.editor),[t.editor,n]),ne.useDebugValue(r),r}var Dx=!1,Ga=typeof window>"u",Rx=Ga||!!(typeof window<"u"&&window.next),Ix=class Ep{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){return this.options.current.immediatelyRender===void 0?Ga||Rx?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){const e={...this.options.current,onBeforeCreate:(...r)=>{var i,s;return(s=(i=this.options.current).onBeforeCreate)==null?void 0:s.call(i,...r)},onBlur:(...r)=>{var i,s;return(s=(i=this.options.current).onBlur)==null?void 0:s.call(i,...r)},onCreate:(...r)=>{var i,s;return(s=(i=this.options.current).onCreate)==null?void 0:s.call(i,...r)},onDestroy:(...r)=>{var i,s;return(s=(i=this.options.current).onDestroy)==null?void 0:s.call(i,...r)},onFocus:(...r)=>{var i,s;return(s=(i=this.options.current).onFocus)==null?void 0:s.call(i,...r)},onSelectionUpdate:(...r)=>{var i,s;return(s=(i=this.options.current).onSelectionUpdate)==null?void 0:s.call(i,...r)},onTransaction:(...r)=>{var i,s;return(s=(i=this.options.current).onTransaction)==null?void 0:s.call(i,...r)},onUpdate:(...r)=>{var i,s;return(s=(i=this.options.current).onUpdate)==null?void 0:s.call(i,...r)},onContentError:(...r)=>{var i,s;return(s=(i=this.options.current).onContentError)==null?void 0:s.call(i,...r)},onDrop:(...r)=>{var i,s;return(s=(i=this.options.current).onDrop)==null?void 0:s.call(i,...r)},onPaste:(...r)=>{var i,s;return(s=(i=this.options.current).onPaste)==null?void 0:s.call(i,...r)},onDelete:(...r)=>{var i,s;return(s=(i=this.options.current).onDelete)==null?void 0:s.call(i,...r)}};return new wk(e)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,n){return Object.keys(e).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&e.extensions&&n.extensions?e.extensions.length!==n.extensions.length?!1:e.extensions.every((i,s)=>{var o;return i===((o=n.extensions)==null?void 0:o[s])}):e[r]===n[r])}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&e.length===0?Ep.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((r,i)=>r===e[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){const e=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function Lx(t={},e=[]){const n=ne.useRef(t);n.current=t;const[r]=ne.useState(()=>new Ix(n)),i=af.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return ne.useDebugValue(i),ne.useEffect(r.onRender(e)),yp({editor:i,selector:({transactionNumber:s})=>t.shouldRerenderOnTransaction===!1||t.shouldRerenderOnTransaction===void 0?null:t.immediatelyRender&&s===0?0:s+1}),i}var kp=ne.createContext({editor:null});kp.Consumer;var xp=ne.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Px=()=>ne.useContext(xp),Bx=Pn.forwardRef((t,e)=>{const{onDragStart:n}=Px(),r=t.as||"div";return I.jsx(r,{...t,ref:e,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...t.style}})});function qc(t){return!!(typeof t=="function"&&t.prototype&&t.prototype.isReactComponent)}function Wc(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.forward_ref)"||t.$$typeof.description==="react.forward_ref"))}function Fx(t){return!!(typeof t=="object"&&t.$$typeof&&(t.$$typeof.toString()==="Symbol(react.memo)"||t.$$typeof.description==="react.memo"))}function zx(t){if(qc(t)||Wc(t))return!0;if(Fx(t)){const e=t.type;if(e)return qc(e)||Wc(e)}return!1}function $x(){try{if(ne.version)return parseInt(ne.version.split(".")[0],10)>=19}catch{}return!1}var Hx=class{constructor(t,{editor:e,props:n={},as:r="div",className:i=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=t,this.editor=e,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isEditorContentInitialized?Hm.flushSync(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var t;if(this.destroyed)return;const e=this.component,n=this.props,r=this.editor,i=$x(),s=zx(e),o={...n};o.ref&&!(i||s)&&delete o.ref,!o.ref&&(i||s)&&(o.ref=a=>{this.ref=a}),this.reactElement=I.jsx(e,{...o}),(t=r==null?void 0:r.contentComponent)==null||t.setRenderer(this.id,this)}updateProps(t={}){this.destroyed||(this.props={...this.props,...t},this.render())}destroy(){var t;this.destroyed=!0;const e=this.editor;(t=e==null?void 0:e.contentComponent)==null||t.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(t){Object.keys(t).forEach(e=>{this.element.setAttribute(e,t[e])})}};Pn.createContext({markViewContentRef:()=>{}});var Ux=class extends Pk{constructor(t,e,n){if(super(t,e,n),this.selectionRafId=null,this.positionCheckCallback=null,this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";const r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){const t=this.editor,e=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(e,{get(n,r,i){var s;return r==="storage"?(s=t.storage[e.name])!=null?s:{}:Reflect.get(n,r,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){const t={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(l={})=>this.updateAttributes(l),deleteNode:()=>this.deleteNode(),ref:ne.createRef()};if(!this.component.displayName){const l=u=>u.charAt(0).toUpperCase()+u.substring(1);this.component.displayName=l(this.extension.name)}const r={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:l=>{l&&this.contentDOMElement&&l.firstChild!==this.contentDOMElement&&(l.hasAttribute("data-node-view-wrapper")&&l.removeAttribute("data-node-view-wrapper"),l.appendChild(this.contentDOMElement))}},i=this.component,s=ne.memo(l=>I.jsx(xp.Provider,{value:r,children:ne.createElement(i,l)}));s.displayName="ReactNodeView";let o=this.node.isInline?"span":"div";this.options.as&&(o=this.options.as);const{className:a=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new Hx(s,{editor:this.editor,props:t,as:o,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes(),this.currentPos=this.getPos(),this.positionCheckCallback=()=>{const l=this.getPos();typeof l!="number"||l===this.currentPos||(this.currentPos=l,this.renderer.updateProps({getPos:()=>this.getPos()}),typeof this.options.attrs=="function"&&this.updateElementAttributes())},Rk(this.editor,this.positionCheckCallback)}get dom(){var t;if(this.renderer.element.firstElementChild&&!((t=this.renderer.element.firstElementChild)!=null&&t.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;const{from:t,to:e}=this.editor.state.selection,n=this.currentPos;if(typeof n=="number")if(t<=n&&e>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(t,e,n){const r=s=>{this.renderer.updateProps(s),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(t.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const s=this.node,o=this.decorations,a=this.innerDecorations;return this.node=t,this.decorations=e,this.innerDecorations=n,this.currentPos=this.getPos(),this.options.update({oldNode:s,oldDecorations:o,newNode:t,newDecorations:e,oldInnerDecorations:a,innerDecorations:n,updateProps:()=>r({node:t,decorations:e,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}const i=this.getPos();return t===this.node&&this.decorations===e&&this.innerDecorations===n?(i===this.currentPos||(this.currentPos=i,r({node:t,decorations:e,innerDecorations:n,extension:this.extensionWithSyncedStorage,getPos:()=>this.getPos()})),!0):(this.node=t,this.decorations=e,this.innerDecorations=n,this.currentPos=i,r({node:t,decorations:e,innerDecorations:n,extension:this.extensionWithSyncedStorage}),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.positionCheckCallback&&(Ik(this.editor,this.positionCheckCallback),this.positionCheckCallback=null),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let t={};if(typeof this.options.attrs=="function"){const e=this.editor.extensionManager.attributes,n=hr(this.node,e);t=this.options.attrs({node:this.node,HTMLAttributes:n})}else t=this.options.attrs;this.renderer.updateAttributes(t)}}};function qx(t,e){return n=>n.editor.contentComponent?new Ux(t,n,e):{}}var ql=ne.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});ql.displayName="TiptapContext";var Wx=()=>ne.useContext(ql);function _p({editor:t,instance:e,children:n}){const r=t??e;if(!r)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const i=ne.useMemo(()=>({editor:r}),[r]),s=ne.useMemo(()=>({editor:r}),[r]);return I.jsx(kp.Provider,{value:s,children:I.jsx(ql.Provider,{value:i,children:n})})}_p.displayName="Tiptap";function wp({...t}){const{editor:e}=Wx();return I.jsx(bp,{editor:e,...t})}wp.displayName="Tiptap.Content";Object.assign(_p,{Content:wp});var ps=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},Vx=/^\s*>\s$/,Kx=X.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return ps("blockquote",{...pe(this.options.HTMLAttributes,t),children:ps("slot",{})})},parseMarkdown:(t,e)=>{var n;const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;return e.createNode("blockquote",void 0,r(t.tokens||[]))},renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach((i,s)=>{var o,a;const c=((a=(o=e.renderChild)==null?void 0:o.call(e,i,s))!=null?a:e.renderChildren([i])).split(`
201
+ `).map(d=>d.trim()===""?n:`${n} ${d}`);r.push(c.join(`
202
+ `))}),r.join(`
203
+ ${n}
204
+ `)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[pr({find:Vx,type:this.type})]}}),Gx=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,jx=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Zx=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Yx=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Jx=st.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return ps("strong",{...pe(this.options.HTMLAttributes,t),children:ps("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Hn({find:Gx,type:this.type}),Hn({find:Zx,type:this.type})]},addPasteRules(){return[bn({find:jx,type:this.type}),bn({find:Yx,type:this.type})]}}),Xx=/(^|[^`])`([^`]+)`(?!`)$/,Qx=/(^|[^`])`([^`]+)`(?!`)/g,e_=st.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",pe(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Hn({find:Xx,type:this.type})]},addPasteRules(){return[bn({find:Qx,type:this.type})]}}),ea=4,t_=/^```([a-z]+)?[\s\n]$/,n_=/^~~~([a-z]+)?[\s\n]$/,Cp=X.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:ea,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const s=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(o=>o.startsWith(n)).map(o=>o.replace(n,""))[0];return s||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",pe(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&((r=t.raw)==null?void 0:r.startsWith("~~~"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const i=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${i}`,e.renderChildren(t.content),"```"].join(`
205
+ `):r=`\`\`\`${i}
206
+
207
+ \`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:ea,{state:r}=t,{selection:i}=r,{$from:s,empty:o}=i;if(s.parent.type!==this.type)return!1;const a=" ".repeat(n);return o?t.commands.insertContent(a):t.commands.command(({tr:l})=>{const{from:u,to:c}=i,h=r.doc.textBetween(u,c,`
208
+ `,`
209
+ `).split(`
210
+ `).map(p=>a+p).join(`
211
+ `);return l.replaceWith(u,c,r.schema.text(h)),!0})},"Shift-Tab":({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:ea,{state:r}=t,{selection:i}=r,{$from:s,empty:o}=i;return s.parent.type!==this.type?!1:o?t.commands.command(({tr:a})=>{var l;const{pos:u}=s,c=s.start(),d=s.end(),h=r.doc.textBetween(c,d,`
212
+ `,`
213
+ `).split(`
214
+ `);let p=0,m=0;const g=u-c;for(let w=0;w<h.length;w+=1){if(m+h[w].length>=g){p=w;break}m+=h[w].length+1}const y=((l=h[p].match(/^ */))==null?void 0:l[0])||"",k=Math.min(y.length,n);if(k===0)return!0;let _=c;for(let w=0;w<p;w+=1)_+=h[w].length+1;return a.delete(_,_+k),u-_<=k&&a.setSelection($.create(a.doc,_)),!0}):t.commands.command(({tr:a})=>{const{from:l,to:u}=i,f=r.doc.textBetween(l,u,`
215
+ `,`
216
+ `).split(`
217
+ `).map(h=>{var p;const m=((p=h.match(/^ */))==null?void 0:p[0])||"",g=Math.min(m.length,n);return h.slice(g)}).join(`
218
+ `);return a.replaceWith(l,u,r.schema.text(f)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const s=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(`
219
+
220
+ `);return!s||!o?!1:t.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:s}=n;if(!s||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0?!1:r.nodeAt(a)?t.commands.command(({tr:u})=>(u.setSelection(U.near(r.resolve(a))),!0)):t.commands.exitCode()}}},addInputRules(){return[Va({find:t_,type:this.type,getAttributes:t=>({language:t[1]})}),Va({find:n_,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new le({key:new Ee("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=i==null?void 0:i.mode;if(!n||!s)return!1;const{tr:o,schema:a}=t.state,l=a.text(n.replace(/\r\n?/g,`
221
+ `));return o.replaceSelectionWith(this.type.create({language:s},l)),o.selection.$from.parent.type!==this.type&&o.setSelection($.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.setMeta("paste",!0),t.dispatch(o),!0}}})]}}),r_=X.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
222
+
223
+ `):""}),i_=X.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",pe(this.options.HTMLAttributes,t)]},renderText(){return`
224
+ `},renderMarkdown:()=>`
225
+ `,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:s}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:a}=r.extensionManager,l=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:c})=>{if(c&&l&&o){const d=l.filter(f=>a.includes(f.type.name));u.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),s_=X.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,pe(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,i="#".repeat(r);return t.content?`${i} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>Va({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),o_=X.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",pe(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!vk(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,i=t();return Yh(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:s,tr:o,dispatch:a})=>{if(a){const{$to:l}=o.selection,u=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?o.setSelection($.create(o.doc,l.pos+1)):l.nodeAfter.isBlock?o.setSelection(z.create(o.doc,l.pos)):o.setSelection($.create(o.doc,l.pos));else{const c=s.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,d=c==null?void 0:c.create();d&&(o.insert(u,d),o.setSelection($.create(o.doc,u+1)))}o.scrollIntoView()}return!0}).run()}}},addInputRules(){return[pp({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),a_=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,l_=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,u_=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,c_=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,d_=st.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",pe(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Hn({find:a_,type:this.type}),Hn({find:u_,type:this.type})]},addPasteRules(){return[bn({find:l_,type:this.type}),bn({find:c_,type:this.type})]}});const f_="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",h_="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",ja="numeric",Za="ascii",Ya="alpha",Fr="asciinumeric",Dr="alphanumeric",Ja="domain",Sp="emoji",p_="scheme",m_="slashscheme",ta="whitespace";function g_(t,e){return t in e||(e[t]=[]),e[t]}function Nn(t,e,n){e[ja]&&(e[Fr]=!0,e[Dr]=!0),e[Za]&&(e[Fr]=!0,e[Ya]=!0),e[Fr]&&(e[Dr]=!0),e[Ya]&&(e[Dr]=!0),e[Dr]&&(e[Ja]=!0),e[Sp]&&(e[Ja]=!0);for(const r in e){const i=g_(r,n);i.indexOf(t)<0&&i.push(t)}}function b_(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function tt(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}tt.groups={};tt.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const i=e.jr[r][0],s=e.jr[r][1];if(s&&i.test(t))return s}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){r=r||tt.groups;let i;return e&&e.j?i=e:(i=new tt(e),n&&r&&Nn(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this;const s=t.length;if(!s)return i;for(let o=0;o<s-1;o++)i=i.tt(t[o]);return i.tt(t[s-1],e,n,r)},tt(t,e,n,r){r=r||tt.groups;const i=this;if(e&&e.j)return i.j[t]=e,e;const s=e;let o,a=i.go(t);if(a?(o=new tt,Object.assign(o.j,a.j),o.jr.push.apply(o.jr,a.jr),o.jd=a.jd,o.t=a.t):o=new tt,s){if(r)if(o.t&&typeof o.t=="string"){const l=Object.assign(b_(o.t,r),n);Nn(s,l,r)}else n&&Nn(s,n,r);o.t=s}return i.j[t]=o,o}};const Z=(t,e,n,r,i)=>t.ta(e,n,r,i),ke=(t,e,n,r,i)=>t.tr(e,n,r,i),Vc=(t,e,n,r,i)=>t.ts(e,n,r,i),A=(t,e,n,r,i)=>t.tt(e,n,r,i),Ht="WORD",Xa="UWORD",vp="ASCIINUMERICAL",Ap="ALPHANUMERICAL",Qr="LOCALHOST",Qa="TLD",el="UTLD",Zi="SCHEME",tr="SLASH_SCHEME",Wl="NUM",tl="WS",Vl="NL",zr="OPENBRACE",$r="CLOSEBRACE",ms="OPENBRACKET",gs="CLOSEBRACKET",bs="OPENPAREN",ys="CLOSEPAREN",Es="OPENANGLEBRACKET",ks="CLOSEANGLEBRACKET",xs="FULLWIDTHLEFTPAREN",_s="FULLWIDTHRIGHTPAREN",ws="LEFTCORNERBRACKET",Cs="RIGHTCORNERBRACKET",Ss="LEFTWHITECORNERBRACKET",vs="RIGHTWHITECORNERBRACKET",As="FULLWIDTHLESSTHAN",Ts="FULLWIDTHGREATERTHAN",Ms="AMPERSAND",Ns="APOSTROPHE",Os="ASTERISK",en="AT",Ds="BACKSLASH",Rs="BACKTICK",Is="CARET",sn="COLON",Kl="COMMA",Ls="DOLLAR",St="DOT",Ps="EQUALS",Gl="EXCLAMATION",ft="HYPHEN",Hr="PERCENT",Bs="PIPE",Fs="PLUS",zs="POUND",Ur="QUERY",jl="QUOTE",Tp="FULLWIDTHMIDDLEDOT",Zl="SEMI",vt="SLASH",qr="TILDE",$s="UNDERSCORE",Mp="EMOJI",Hs="SYM";var Np=Object.freeze({__proto__:null,ALPHANUMERICAL:Ap,AMPERSAND:Ms,APOSTROPHE:Ns,ASCIINUMERICAL:vp,ASTERISK:Os,AT:en,BACKSLASH:Ds,BACKTICK:Rs,CARET:Is,CLOSEANGLEBRACKET:ks,CLOSEBRACE:$r,CLOSEBRACKET:gs,CLOSEPAREN:ys,COLON:sn,COMMA:Kl,DOLLAR:Ls,DOT:St,EMOJI:Mp,EQUALS:Ps,EXCLAMATION:Gl,FULLWIDTHGREATERTHAN:Ts,FULLWIDTHLEFTPAREN:xs,FULLWIDTHLESSTHAN:As,FULLWIDTHMIDDLEDOT:Tp,FULLWIDTHRIGHTPAREN:_s,HYPHEN:ft,LEFTCORNERBRACKET:ws,LEFTWHITECORNERBRACKET:Ss,LOCALHOST:Qr,NL:Vl,NUM:Wl,OPENANGLEBRACKET:Es,OPENBRACE:zr,OPENBRACKET:ms,OPENPAREN:bs,PERCENT:Hr,PIPE:Bs,PLUS:Fs,POUND:zs,QUERY:Ur,QUOTE:jl,RIGHTCORNERBRACKET:Cs,RIGHTWHITECORNERBRACKET:vs,SCHEME:Zi,SEMI:Zl,SLASH:vt,SLASH_SCHEME:tr,SYM:Hs,TILDE:qr,TLD:Qa,UNDERSCORE:$s,UTLD:el,UWORD:Xa,WORD:Ht,WS:tl});const zt=/[a-z]/,Cr=new RegExp("\\p{L}","u"),na=new RegExp("\\p{Emoji}","u"),$t=/\d/,ra=/\s/,Kc="\r",ia=`
226
+ `,y_="️",E_="‍",sa="";let Ni=null,Oi=null;function k_(t=[]){const e={};tt.groups=e;const n=new tt;Ni==null&&(Ni=Gc(f_)),Oi==null&&(Oi=Gc(h_)),A(n,"'",Ns),A(n,"{",zr),A(n,"}",$r),A(n,"[",ms),A(n,"]",gs),A(n,"(",bs),A(n,")",ys),A(n,"<",Es),A(n,">",ks),A(n,"(",xs),A(n,")",_s),A(n,"「",ws),A(n,"」",Cs),A(n,"『",Ss),A(n,"』",vs),A(n,"<",As),A(n,">",Ts),A(n,"&",Ms),A(n,"*",Os),A(n,"@",en),A(n,"`",Rs),A(n,"^",Is),A(n,":",sn),A(n,",",Kl),A(n,"$",Ls),A(n,".",St),A(n,"=",Ps),A(n,"!",Gl),A(n,"-",ft),A(n,"%",Hr),A(n,"|",Bs),A(n,"+",Fs),A(n,"#",zs),A(n,"?",Ur),A(n,'"',jl),A(n,"/",vt),A(n,";",Zl),A(n,"~",qr),A(n,"_",$s),A(n,"\\",Ds),A(n,"・",Tp);const r=ke(n,$t,Wl,{[ja]:!0});ke(r,$t,r);const i=ke(r,zt,vp,{[Fr]:!0}),s=ke(r,Cr,Ap,{[Dr]:!0}),o=ke(n,zt,Ht,{[Za]:!0});ke(o,$t,i),ke(o,zt,o),ke(i,$t,i),ke(i,zt,i);const a=ke(n,Cr,Xa,{[Ya]:!0});ke(a,zt),ke(a,$t,s),ke(a,Cr,a),ke(s,$t,s),ke(s,zt),ke(s,Cr,s);const l=A(n,ia,Vl,{[ta]:!0}),u=A(n,Kc,tl,{[ta]:!0}),c=ke(n,ra,tl,{[ta]:!0});A(n,sa,c),A(u,ia,l),A(u,sa,c),ke(u,ra,c),A(c,Kc),A(c,ia),ke(c,ra,c),A(c,sa,c);const d=ke(n,na,Mp,{[Sp]:!0});A(d,"#"),ke(d,na,d),A(d,y_,d);const f=A(d,E_);A(f,"#"),ke(f,na,d);const h=[[zt,o],[$t,i]],p=[[zt,null],[Cr,a],[$t,s]];for(let m=0;m<Ni.length;m++)Jt(n,Ni[m],Qa,Ht,h);for(let m=0;m<Oi.length;m++)Jt(n,Oi[m],el,Xa,p);Nn(Qa,{tld:!0,ascii:!0},e),Nn(el,{utld:!0,alpha:!0},e),Jt(n,"file",Zi,Ht,h),Jt(n,"mailto",Zi,Ht,h),Jt(n,"http",tr,Ht,h),Jt(n,"https",tr,Ht,h),Jt(n,"ftp",tr,Ht,h),Jt(n,"ftps",tr,Ht,h),Nn(Zi,{scheme:!0,ascii:!0},e),Nn(tr,{slashscheme:!0,ascii:!0},e),t=t.sort((m,g)=>m[0]>g[0]?1:-1);for(let m=0;m<t.length;m++){const g=t[m][0],y=t[m][1]?{[p_]:!0}:{[m_]:!0};g.indexOf("-")>=0?y[Ja]=!0:zt.test(g)?$t.test(g)?y[Fr]=!0:y[Za]=!0:y[ja]=!0,Vc(n,g,g,y)}return Vc(n,"localhost",Qr,{ascii:!0}),n.jd=new tt(Hs),{start:n,tokens:Object.assign({groups:e},Np)}}function Op(t,e){const n=x_(e.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,i=[];let s=0,o=0;for(;o<r;){let a=t,l=null,u=0,c=null,d=-1,f=-1;for(;o<r&&(l=a.go(n[o]));)a=l,a.accepts()?(d=0,f=0,c=a):d>=0&&(d+=n[o].length,f++),u+=n[o].length,s+=n[o].length,o++;s-=d,o-=f,u-=d,i.push({t:c.t,v:e.slice(s-u,s),s:s-u,e:s})}return i}function x_(t){const e=[],n=t.length;let r=0;for(;r<n;){let i=t.charCodeAt(r),s,o=i<55296||i>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?t[r]:t.slice(r,r+2);e.push(o),r+=o.length}return e}function Jt(t,e,n,r,i){let s;const o=e.length;for(let a=0;a<o-1;a++){const l=e[a];t.j[l]?s=t.j[l]:(s=new tt(r),s.jr=i.slice(),t.j[l]=s),t=s}return s=new tt(n),s.jr=i.slice(),t.j[e[o-1]]=s,s}function Gc(t){const e=[],n=[];let r=0,i="0123456789";for(;r<t.length;){let s=0;for(;i.indexOf(t[r+s])>=0;)s++;if(s>0){e.push(n.join(""));for(let o=parseInt(t.substring(r,r+s),10);o>0;o--)n.pop();r+=s}else n.push(t[r]),r++}return e}const ei={defaultProtocol:"http",events:null,format:jc,formatHref:jc,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Yl(t,e=null){let n=Object.assign({},ei);t&&(n=Object.assign(n,t instanceof Yl?t.o:t));const r=n.ignoreTags,i=[];for(let s=0;s<r.length;s++)i.push(r[s].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=i}Yl.prototype={o:ei,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let i=this.o[t];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:ei[t],typeof i=="function"&&r&&(i=i(e,n))):typeof i=="function"&&r&&(i=i(e,n.t,n)),i)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function jc(t){return t}function Dp(t,e){this.t="token",this.v=t,this.tk=e}Dp.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=ei.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),i=t.get("tagName",n,e),s=this.toFormattedString(t),o={},a=t.get("className",n,e),l=t.get("target",n,e),u=t.get("rel",n,e),c=t.getObj("attributes",n,e),d=t.getObj("events",n,e);return o.href=r,a&&(o.class=a),l&&(o.target=l),u&&(o.rel=u),c&&Object.assign(o,c),{tagName:i,attributes:o,content:s,eventListeners:d}}};function fo(t,e){class n extends Dp{constructor(i,s){super(i,s),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const Zc=fo("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Yc=fo("text"),__=fo("nl"),Di=fo("url",{isLink:!0,toHref(t=ei.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Qr&&t[1].t===sn}}),dt=t=>new tt(t);function w_({groups:t}){const e=t.domain.concat([Ms,Os,en,Ds,Rs,Is,Ls,Ps,ft,Wl,Hr,Bs,Fs,zs,vt,Hs,qr,$s]),n=[Ns,sn,Kl,St,Gl,Hr,Ur,jl,Zl,Es,ks,zr,$r,gs,ms,bs,ys,xs,_s,ws,Cs,Ss,vs,As,Ts],r=[Ms,Ns,Os,Ds,Rs,Is,Ls,Ps,ft,zr,$r,Hr,Bs,Fs,zs,Ur,vt,Hs,qr,$s],i=dt(),s=A(i,qr);Z(s,r,s),Z(s,t.domain,s);const o=dt(),a=dt(),l=dt();Z(i,t.domain,o),Z(i,t.scheme,a),Z(i,t.slashscheme,l),Z(o,r,s),Z(o,t.domain,o);const u=A(o,en);A(s,en,u),A(a,en,u),A(l,en,u);const c=A(s,St);Z(c,r,s),Z(c,t.domain,s);const d=dt();Z(u,t.domain,d),Z(d,t.domain,d);const f=A(d,St);Z(f,t.domain,d);const h=dt(Zc);Z(f,t.tld,h),Z(f,t.utld,h),A(u,Qr,h);const p=A(d,ft);A(p,ft,p),Z(p,t.domain,d),Z(h,t.domain,d),A(h,St,f),A(h,ft,p);const m=A(h,sn);Z(m,t.numeric,Zc);const g=A(o,ft),b=A(o,St);A(g,ft,g),Z(g,t.domain,o),Z(b,r,s),Z(b,t.domain,o);const y=dt(Di);Z(b,t.tld,y),Z(b,t.utld,y),Z(y,t.domain,o),Z(y,r,s),A(y,St,b),A(y,ft,g),A(y,en,u);const k=A(y,sn),_=dt(Di);Z(k,t.numeric,_);const x=dt(Di),w=dt();Z(x,e,x),Z(x,n,w),Z(w,e,x),Z(w,n,w),A(y,vt,x),A(_,vt,x);const C=A(a,sn),M=A(l,sn),R=A(M,vt),j=A(R,vt);Z(a,t.domain,o),A(a,St,b),A(a,ft,g),Z(l,t.domain,o),A(l,St,b),A(l,ft,g),Z(C,t.domain,x),A(C,vt,x),A(C,Ur,x),Z(j,t.domain,x),Z(j,e,x),A(j,vt,x);const be=[[zr,$r],[ms,gs],[bs,ys],[Es,ks],[xs,_s],[ws,Cs],[Ss,vs],[As,Ts]];for(let ue=0;ue<be.length;ue++){const[re,G]=be[ue],q=A(x,re);A(w,re,q),A(q,G,x);const ye=dt(Di);Z(q,e,ye);const Ye=dt();Z(q,n),Z(ye,e,ye),Z(ye,n,Ye),Z(Ye,e,ye),Z(Ye,n,Ye),A(ye,G,x),A(Ye,G,x)}return A(i,Qr,y),A(i,Vl,__),{start:i,tokens:Np}}function C_(t,e,n){let r=n.length,i=0,s=[],o=[];for(;i<r;){let a=t,l=null,u=null,c=0,d=null,f=-1;for(;i<r&&!(l=a.go(n[i].t));)o.push(n[i++]);for(;i<r&&(u=l||a.go(n[i].t));)l=null,a=u,a.accepts()?(f=0,d=a):f>=0&&f++,i++,c++;if(f<0)i-=c,i<r&&(o.push(n[i]),i++);else{o.length>0&&(s.push(oa(Yc,e,o)),o=[]),i-=f,c-=f;const h=d.t,p=n.slice(i-c,i);s.push(oa(h,e,p))}}return o.length>0&&s.push(oa(Yc,e,o)),s}function oa(t,e,n){const r=n[0].s,i=n[n.length-1].e,s=e.slice(r,i);return new t(s,n)}const S_=typeof console<"u"&&console&&console.warn||(()=>{}),v_="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",ge={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function A_(){return tt.groups={},ge.scanner=null,ge.parser=null,ge.tokenQueue=[],ge.pluginQueue=[],ge.customSchemes=[],ge.initialized=!1,ge}function Jc(t,e=!1){if(ge.initialized&&S_(`linkifyjs: already initialized - will not register custom scheme "${t}" ${v_}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
227
+ 1. Must only contain digits, lowercase ASCII letters or "-"
228
+ 2. Cannot start or end with "-"
229
+ 3. "-" cannot repeat`);ge.customSchemes.push([t,e])}function T_(){ge.scanner=k_(ge.customSchemes);for(let t=0;t<ge.tokenQueue.length;t++)ge.tokenQueue[t][1]({scanner:ge.scanner});ge.parser=w_(ge.scanner.tokens);for(let t=0;t<ge.pluginQueue.length;t++)ge.pluginQueue[t][1]({scanner:ge.scanner,parser:ge.parser});return ge.initialized=!0,ge}function Jl(t){return ge.initialized||T_(),C_(ge.parser.start,t,Op(ge.scanner.start,t))}Jl.scan=Op;function Rp(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Yl(n),i=Jl(t),s=[];for(let o=0;o<i.length;o++){const a=i[o];a.isLink&&(!e||a.t===e)&&r.check(a)&&s.push(a.toFormattedObject(r))}return s}var Xl="[\0-   ᠎ -\u2029  ]",M_=new RegExp(Xl),N_=new RegExp(`${Xl}$`),O_=new RegExp(Xl,"g");function D_(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function R_(t){return new le({key:new Ee("autolink"),appendTransaction:(e,n,r)=>{const i=e.some(u=>u.docChanged)&&!n.doc.eq(r.doc),s=e.some(u=>u.getMeta("preventAutolink"));if(!i||s)return;const{tr:o}=r,a=Hh(n.doc,[...e]);if(Zh(a).forEach(({newRange:u})=>{const c=SE(r.doc,u,h=>h.isTextblock);let d,f;if(c.length>1)d=c[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ");else if(c.length){const h=r.doc.textBetween(u.from,u.to," "," ");if(!N_.test(h))return;d=c[0],f=r.doc.textBetween(d.pos,u.to,void 0," ")}if(d&&f){const h=f.split(M_).filter(Boolean);if(h.length<=0)return!1;const p=h[h.length-1],m=d.pos+f.lastIndexOf(p);if(!p)return!1;const g=Jl(p).map(b=>b.toObject(t.defaultProtocol));if(!D_(g))return!1;g.filter(b=>b.isLink).map(b=>({...b,from:m+b.start+1,to:m+b.end+1})).filter(b=>r.schema.marks.code?!r.doc.rangeHasMark(b.from,b.to,r.schema.marks.code):!0).filter(b=>t.validate(b.value)).filter(b=>t.shouldAutoLink(b.value)).forEach(b=>{Fl(b.from,b.to,r.doc).some(y=>y.mark.type===t.type)||o.addMark(b.from,b.to,t.type.create({href:b.href}))})}}),!!o.steps.length)return o}})}function I_(t){return new le({key:new Ee("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,s;if(r.button!==0||!e.editable)return!1;let o=null;if(r.target instanceof HTMLAnchorElement)o=r.target;else{const l=r.target;if(!l)return!1;const u=t.editor.view.dom;o=l.closest("a"),o&&!u.contains(o)&&(o=null)}if(!o)return!1;let a=!1;if(t.enableClickSelection&&(a=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const l=jh(e.state,t.type.name),u=(i=o.href)!=null?i:l.href,c=(s=o.target)!=null?s:l.target;u&&(window.open(u,c),a=!0)}return a}}})}function L_(t){return new le({key:new Ee("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:i}=t,{state:s}=e,{selection:o}=s,{empty:a}=o;if(a)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});const u=Rp(l,{defaultProtocol:t.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!u||i!==void 0&&!i(u.value)?!1:t.editor.commands.setMark(t.type,{href:u.href})}}})}function Sn(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!t||t.replace(O_,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var Ip=st.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){Jc(t);return}Jc(t.scheme,t.optionalSlashes)})},onDestroy(){A_()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Sn(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const i=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(i)||!/\./.test(i))}}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!Sn(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Sn(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",pe(this.options.HTMLAttributes,t),0]:["a",pe(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,i,s;const o=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",a=(s=(i=t.attrs)==null?void 0:i.title)!=null?s:"",l=e.renderChildren(t);return a?`[${l}](${o} "${a}")`:`[${l}](${o})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Sn(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Sn(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[bn({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,i=Rp(t).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:o=>!!Sn(o,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(s=>{this.options.shouldAutoLink(s.value)&&e.push({text:s.value,data:{href:s.href},index:s.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(R_({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!Sn(i,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(I_({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(L_({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),P_=Ip,B_=Object.defineProperty,F_=(t,e)=>{for(var n in e)B_(t,n,{get:e[n],enumerable:!0})},z_="listItem",Xc="textStyle",Qc=/^\s*([-+*])\s$/,Lp=X.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",pe(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
230
+ `):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(z_,this.editor.getAttributes(Xc)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=pr({find:Qc,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=pr({find:Qc,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Xc),editor:this.editor})),[t]}}),Pp=X.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",pe(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{var n;if(t.type!=="list_item")return[];const r=(n=e.parseBlockChildren)!=null?n:e.parseChildren;let i=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(o=>o.type==="paragraph"))i=r(t.tokens);else{const o=t.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(i=[{type:"paragraph",content:e.parseInline(o.tokens)}],t.tokens.length>1){const l=t.tokens.slice(1),u=r(l);i.push(...u)}}else i=r(t.tokens)}return i.length===0&&(i=[{type:"paragraph",content:[]}]),{type:"listItem",content:i}},renderMarkdown:(t,e,n)=>Ul(t,e,r=>{var i,s;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((s=(i=r.meta)==null?void 0:i.parentAttrs)==null?void 0:s.start)||1)+r.index}. `:"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),$_={};F_($_,{findListItemPos:()=>ci,getNextListDepth:()=>Ql,handleBackspace:()=>nl,handleDelete:()=>rl,hasListBefore:()=>Bp,hasListItemAfter:()=>H_,hasListItemBefore:()=>Fp,listItemHasSubList:()=>zp,nextListIsDeeper:()=>$p,nextListIsHigher:()=>Hp});var ci=(t,e)=>{const{$from:n}=e.selection,r=Te(t,e.schema);let i=null,s=n.depth,o=n.pos,a=null;for(;s>0&&a===null;)i=n.node(s),i.type===r?a=s:(s-=1,o-=1);return a===null?null:{$pos:e.doc.resolve(o),depth:a}},Ql=(t,e)=>{const n=ci(t,e);if(!n)return!1;const[,r]=LE(e,t,n.$pos.pos+4);return r},Bp=(t,e,n)=>{const{$anchor:r}=t.selection,i=Math.max(0,r.pos-2),s=t.doc.resolve(i).node();return!(!s||!n.includes(s.type.name))},Fp=(t,e)=>{var n;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-2);return!(i.index()===0||((n=i.nodeBefore)==null?void 0:n.type.name)!==t)},zp=(t,e,n)=>{if(!n)return!1;const r=Te(t,e.schema);let i=!1;return n.descendants(s=>{s.type===r&&(i=!0)}),i},nl=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!gn(t.state,e)&&Bp(t.state,e,n)){const{$anchor:a}=t.state.selection,l=t.state.doc.resolve(a.before()-1),u=[];l.node().descendants((f,h)=>{f.type.name===e&&u.push({node:f,pos:h})});const c=u.at(-1);if(!c)return!1;const d=t.state.doc.resolve(l.start()+c.pos+1);return t.chain().cut({from:a.start()-1,to:a.end()+1},d.end()).joinForward().run()}if(!gn(t.state,e)||!zE(t.state))return!1;const r=ci(e,t.state);if(!r)return!1;const s=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),o=zp(e,t.state,s);return Fp(e,t.state)&&!o?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},$p=(t,e)=>{const n=Ql(t,e),r=ci(t,e);return!r||!n?!1:n>r.depth},Hp=(t,e)=>{const n=Ql(t,e),r=ci(t,e);return!r||!n?!1:n<r.depth},rl=(t,e)=>{if(!gn(t.state,e)||!FE(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:$p(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():Hp(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},H_=(t,e)=>{var n;const{$anchor:r}=e.selection,i=e.doc.resolve(r.pos-r.parentOffset-2);return!(i.index()===i.parent.childCount-1||((n=i.nodeAfter)==null?void 0:n.type.name)!==t)},Up=me.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&rl(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&rl(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&nl(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&nl(t,n,r)&&(e=!0)}),e}}}}),ed=/^(\s*)(\d+)\.\s+(.*)$/,U_=/^\s/;function q_(t){const e=t.trimStart();return/^[-+*]\s+/.test(e)||/^\d+\.\s+/.test(e)||/^>\s?/.test(e)||/^```/.test(e)||/^~~~/.test(e)}function W_(t){const e=[],n=[];let r=!1;return t.forEach(i=>{if(r){n.push(i);return}if(i.trim()===""){r=!0,n.push(i);return}if(e.length>0&&q_(i)){r=!0,n.push(i);return}e.push(i)}),{paragraphLines:e,blockLines:n}}function V_(t){const e=[];let n=0,r=0;for(;n<t.length;){const i=t[n],s=i.match(ed);if(!s)break;const[,o,a,l]=s,u=o.length,c=[l];let d=n+1;const f=[i];let h=!1;for(;d<t.length;){const p=t[d];if(p.match(ed))break;if(p.trim()==="")f.push(p),c.push(""),h=!0,d+=1;else if(p.match(U_))f.push(p),c.push(p.slice(u+2)),d+=1;else{if(h)break;f.push(p),c.push(p),d+=1}}e.push({indent:u,number:parseInt(a,10),content:c.join(`
231
+ `).trim(),contentLines:c,raw:f.join(`
232
+ `)}),r=d,n=d}return[e,r]}function qp(t,e,n){const r=[];let i=0;for(;i<t.length;){const s=t[i];if(s.indent===e){const{paragraphLines:o,blockLines:a}=W_(s.contentLines),l=o.join(`
233
+ `).trim(),u=[];l&&u.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});const c=a.join(`
234
+ `).trim();if(c){const h=n.blockTokens(c);u.push(...h)}let d=i+1;const f=[];for(;d<t.length&&t[d].indent>e;)f.push(t[d]),d+=1;if(f.length>0){const h=Math.min(...f.map(m=>m.indent)),p=qp(f,h,n);u.push({type:"list",ordered:!0,start:f[0].number,items:p,raw:f.map(m=>m.raw).join(`
235
+ `)})}r.push({type:"list_item",raw:s.raw,tokens:u}),i=d}else i+=1}return r}function K_(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(i=>{if(i.type==="paragraph"||i.type==="list"||i.type==="blockquote"||i.type==="code")r.push(...e.parseChildren([i]));else if(i.type==="text"&&i.tokens){const s=e.parseChildren([i]);r.push({type:"paragraph",content:s})}else{const s=e.parseChildren([i]);s.length>0&&r.push(...s)}}),{type:"listItem",content:r}})}var G_="listItem",td="textStyle",nd=/^(\d+)\.\s$/,Wp=X.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",pe(this.options.HTMLAttributes,n),0]:["ol",pe(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.items?K_(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
236
+ `):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=e==null?void 0:e.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;const i=t.split(`
237
+ `),[s,o]=V_(i);if(s.length===0)return;const a=qp(s,0,n);return a.length===0?void 0:{type:"list",ordered:!0,start:((r=s[0])==null?void 0:r.number)||1,items:a,raw:i.slice(0,o).join(`
238
+ `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(G_,this.editor.getAttributes(td)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=pr({find:nd,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=pr({find:nd,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(td)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),j_=/^\s*(\[([( |x])?\])\s$/,Vp=X.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",pe(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const i=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return Ul(t,e,i)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const i=document.createElement("li"),s=document.createElement("label"),o=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),u=d=>{var f,h;a.ariaLabel=((h=(f=this.options.a11y)==null?void 0:f.checkboxLabel)==null?void 0:h.call(f,d,a.checked))||`Task item checkbox for ${d.textContent||"empty task item"}`};u(t),s.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",d=>d.preventDefault()),a.addEventListener("change",d=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:f}=d.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:h})=>{const p=n();if(typeof p!="number")return!1;const m=h.doc.nodeAt(p);return h.setNodeMarkup(p,void 0,{...m==null?void 0:m.attrs,checked:f}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,f)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([d,f])=>{i.setAttribute(d,f)}),i.dataset.checked=t.attrs.checked,a.checked=t.attrs.checked,s.append(a,o),i.append(s,l),Object.entries(e).forEach(([d,f])=>{i.setAttribute(d,f)});let c=new Set(Object.keys(e));return{dom:i,contentDOM:l,update:d=>{if(d.type!==this.type)return!1;i.dataset.checked=d.attrs.checked,a.checked=d.attrs.checked,u(d);const f=r.extensionManager.attributes,h=hr(d,f),p=new Set(Object.keys(h)),m=this.options.HTMLAttributes;return c.forEach(g=>{p.has(g)||(g in m?i.setAttribute(g,m[g]):i.removeAttribute(g))}),Object.entries(h).forEach(([g,b])=>{b==null?g in m?i.setAttribute(g,m[g]):i.removeAttribute(g):i.setAttribute(g,b)}),c=p,!0}}}},addInputRules(){return[pr({find:j_,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),Kp=X.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",pe(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
239
+ `):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=s=>{const o=Ka(s,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);return o?[{type:"taskList",raw:o.raw,items:o.items}]:n.blockTokens(s)},i=Ka(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:s=>({indentLevel:s[1].length,mainContent:s[4],checked:s[3].toLowerCase()==="x"}),createToken:(s,o)=>({type:"taskItem",raw:"",mainContent:s.mainContent,indentLevel:s.indentLevel,checked:s.checked,text:s.mainContent,tokens:n.inlineTokens(s.mainContent),nestedTokens:o}),customNestedParser:r},n);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});me.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(Lp.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(Pp.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(Up.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(Wp.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(Vp.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(Kp.configure(this.options.taskList)),t}});var Ri="&nbsp;",aa=" ",Z_=X.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",pe(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return n.length===1&&n[0].type==="text"&&(n[0].raw===Ri||n[0].text===Ri||n[0].raw===aa||n[0].text===aa)&&r.length===1&&r[0].type==="text"&&(r[0].text===Ri||r[0].text===aa)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e,n)=>{var r,i;if(!t)return"";const s=Array.isArray(t.content)?t.content:[];if(s.length===0){const o=Array.isArray((r=n==null?void 0:n.previousNode)==null?void 0:r.content)?n.previousNode.content:[];return((i=n==null?void 0:n.previousNode)==null?void 0:i.type)==="paragraph"&&o.length===0?Ri:""}return e.renderChildren(s)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Y_=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,J_=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,X_=st.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",pe(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Hn({find:Y_,type:this.type})]},addPasteRules(){return[bn({find:J_,type:this.type})]}}),Q_=X.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),Gp=st.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",pe(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!i)return;const s=i[2].trim();return{type:"underline",raw:i[0],text:s,tokens:n.inlineTokens(s)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),e2=Gp;function t2(t={}){return new le({view(e){return new n2(e,t)}})}class n2{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=o=>{this[i](o)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,i=this.editorView.dom,s=i.getBoundingClientRect(),o=s.width/i.offsetWidth,a=s.height/i.offsetHeight;if(n){let d=e.nodeBefore,f=e.nodeAfter;if(d||f){let h=this.editorView.nodeDOM(this.cursorPos-(d?d.nodeSize:0));if(h){let p=h.getBoundingClientRect(),m=d?p.bottom:p.top;d&&f&&(m=(m+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let g=this.width/2*a;r={left:p.left,right:p.right,top:m-g,bottom:m+g}}}}if(!r){let d=this.editorView.coordsAtPos(this.cursorPos),f=this.width/2*o;r={left:d.left-f,right:d.left+f,top:d.top,bottom:d.bottom}}let l=this.editorView.dom.offsetParent;this.element||(this.element=l.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let u,c;if(!l||l==document.body&&getComputedStyle(l).position=="static")u=-pageXOffset,c=-pageYOffset;else{let d=l.getBoundingClientRect(),f=d.width/l.offsetWidth,h=d.height/l.offsetHeight;u=d.left-l.scrollLeft*f,c=d.top-l.scrollTop*h}this.element.style.left=(r.left-u)/o+"px",this.element.style.top=(r.top-c)/a+"px",this.element.style.width=(r.right-r.left)/o+"px",this.element.style.height=(r.bottom-r.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,n,e):i;if(n&&!s){let o=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Rf(this.editorView.state.doc,o,this.editorView.dragging.slice);a!=null&&(o=a)}this.setCursor(o),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class xe extends U{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return xe.valid(r)?new xe(r):U.near(r)}content(){return N.empty}eq(e){return e instanceof xe&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new xe(e.resolve(n.pos))}getBookmark(){return new eu(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!r2(e)||!i2(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&xe.valid(e))return e;let i=e.pos,s=null;for(let o=e.depth;;o--){let a=e.node(o);if(n>0?e.indexAfter(o)<a.childCount:e.index(o)>0){s=a.child(n>0?e.indexAfter(o):e.index(o)-1);break}else if(o==0)return null;i+=n;let l=e.doc.resolve(i);if(xe.valid(l))return l}for(;;){let o=n>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!z.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*n),r=!1;continue e}break}s=o,i+=n;let a=e.doc.resolve(i);if(xe.valid(a))return a}return null}}}xe.prototype.visible=!1;xe.findFrom=xe.findGapCursorFrom;U.jsonID("gapcursor",xe);class eu{constructor(e){this.pos=e}map(e){return new eu(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return xe.valid(n)?new xe(n):U.near(n)}}function jp(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function r2(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||jp(i.type))return!0;if(i.inlineContent)return!1}}return!0}function i2(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||jp(i.type))return!0;if(i.inlineContent)return!1}}return!0}function s2(){return new le({props:{decorations:u2,createSelectionBetween(t,e,n){return e.pos==n.pos&&xe.valid(n)?new xe(n):null},handleClick:a2,handleKeyDown:o2,handleDOMEvents:{beforeinput:l2}}})}const o2=Rl({ArrowLeft:Ii("horiz",-1),ArrowRight:Ii("horiz",1),ArrowUp:Ii("vert",-1),ArrowDown:Ii("vert",1)});function Ii(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,s){let o=r.selection,a=e>0?o.$to:o.$from,l=o.empty;if(o instanceof $){if(!s.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(e>0?a.after():a.before())}let u=xe.findGapCursorFrom(a,e,l);return u?(i&&i(r.tr.setSelection(new xe(u))),!0):!1}}function a2(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!xe.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&z.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new xe(r))),!0)}function l2(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof xe))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=v.empty;for(let o=r.length-1;o>=0;o--)i=v.from(r[o].createAndFill(null,i));let s=t.state.tr.replace(n.pos,n.pos,new N(i,0,0));return s.setSelection($.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function u2(t){if(!(t.selection instanceof xe))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",ae.create(t.doc,[Oe.widget(t.selection.head,e,{key:"gapcursor"})])}var Us=200,Pe=function(){};Pe.prototype.append=function(e){return e.length?(e=Pe.from(e),!this.length&&e||e.length<Us&&this.leafAppend(e)||this.length<Us&&e.leafPrepend(this)||this.appendInner(e)):this};Pe.prototype.prepend=function(e){return e.length?Pe.from(e).append(this):this};Pe.prototype.appendInner=function(e){return new c2(this,e)};Pe.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Pe.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Pe.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Pe.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};Pe.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,o){return i.push(e(s,o))},n,r),i};Pe.from=function(e){return e instanceof Pe?e:e&&e.length?new Zp(e):Pe.empty};var Zp=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,o,a){for(var l=s;l<o;l++)if(i(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(i,s,o,a){for(var l=s-1;l>=o;l--)if(i(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=Us)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=Us)return new e(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(Pe);Pe.empty=new Zp([]);var c2=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,s,o){var a=this.left.length;if(i<a&&this.left.forEachInner(r,i,Math.min(s,a),o)===!1||s>a&&this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,s)-a,o+a)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,s,o){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(r,i-a,Math.max(s,a)-a,o+a)===!1||s<a&&this.left.forEachInvertedInner(r,Math.min(i,a),s,o)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var s=this.left.length;return i<=s?this.left.slice(r,i):r>=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(Pe);const d2=500;class yt{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;n&&(i=this.remapping(r,this.items.length),s=i.maps.length);let o=e.tr,a,l,u=[],c=[];return this.items.forEach((d,f)=>{if(!d.step){i||(i=this.remapping(r,f+1),s=i.maps.length),s--,c.push(d);return}if(i){c.push(new At(d.map));let h=d.step.map(i.slice(s)),p;h&&o.maybeStep(h).doc&&(p=o.mapping.maps[o.mapping.maps.length-1],u.push(new At(p,void 0,void 0,u.length+c.length))),s--,p&&i.appendMap(p,s)}else o.maybeStep(d.step);if(d.selection)return a=i?d.selection.map(i.slice(s)):d.selection,l=new yt(this.items.slice(0,r).append(c.reverse().concat(u)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:o,selection:a}}addTransform(e,n,r,i){let s=[],o=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let c=0;c<e.steps.length;c++){let d=e.steps[c].invert(e.docs[c]),f=new At(e.mapping.maps[c],d,n),h;(h=l&&l.merge(f))&&(f=h,c?s.pop():a=a.slice(0,a.length-1)),s.push(f),n&&(o++,n=void 0),i||(l=f)}let u=o-r.depth;return u>h2&&(a=f2(a,u),o-=u),new yt(a.append(s),o)}remapping(e,n){let r=new Kr;return this.items.forEach((i,s)=>{let o=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,o)},e,n),r}addMaps(e){return this.eventCount==0?this:new yt(this.items.append(e.map(n=>new At(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),s=e.mapping,o=e.steps.length,a=this.eventCount;this.items.forEach(f=>{f.selection&&a--},i);let l=n;this.items.forEach(f=>{let h=s.getMirror(--l);if(h==null)return;o=Math.min(o,h);let p=s.maps[h];if(f.step){let m=e.steps[h].invert(e.docs[h]),g=f.selection&&f.selection.map(s.slice(l+1,h));g&&a++,r.push(new At(p,m,g))}else r.push(new At(p))},i);let u=[];for(let f=n;f<o;f++)u.push(new At(s.maps[f]));let c=this.items.slice(0,i).append(u).append(r),d=new yt(c,a);return d.emptyItemCount()>d2&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],s=0;return this.items.forEach((o,a)=>{if(a>=e)i.push(o),o.selection&&s++;else if(o.step){let l=o.step.map(n.slice(r)),u=l&&l.getMap();if(r--,u&&n.appendMap(u,r),l){let c=o.selection&&o.selection.map(n.slice(r));c&&s++;let d=new At(u.invert(),l,c),f,h=i.length-1;(f=i.length&&i[h].merge(d))?i[h]=f:i.push(d)}}else o.map&&r--},this.items.length,0),new yt(Pe.from(i.reverse()),s)}}yt.empty=new yt(Pe.empty,0);function f2(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class At{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new At(n.getMap().invert(),n,this.selection)}}}class tn{constructor(e,n,r,i,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}}const h2=20;function p2(t,e,n,r){let i=n.getMeta(Ln),s;if(i)return i.historyState;n.getMeta(b2)&&(t=new tn(t.done,t.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(o&&o.getMeta(Ln))return o.getMeta(Ln).redo?new tn(t.done.addTransform(n,void 0,r,Yi(e)),t.undone,rd(n.mapping.maps),t.prevTime,t.prevComposition):new tn(t.done,t.undone.addTransform(n,void 0,r,Yi(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(o&&o.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!o&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-r.newGroupDelay||!m2(n,t.prevRanges)),u=o?la(t.prevRanges,n.mapping):rd(n.mapping.maps);return new tn(t.done.addTransform(n,l?e.selection.getBookmark():void 0,r,Yi(e)),yt.empty,u,n.time,a??t.prevComposition)}else return(s=n.getMeta("rebased"))?new tn(t.done.rebased(n,s),t.undone.rebased(n,s),la(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new tn(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),la(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function m2(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&i>=e[s]&&(n=!0)}),n}function rd(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,s,o)=>e.push(s,o));return e}function la(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),s=e.map(t[r+1],-1);i<=s&&n.push(i,s)}return n}function g2(t,e,n){let r=Yi(e),i=Ln.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let o=s.selection.resolve(s.transform.doc),a=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),i,r),l=new tn(n?a:s.remaining,n?s.remaining:a,null,0,-1);return s.transform.setSelection(o).setMeta(Ln,{redo:n,historyState:l})}let ua=!1,id=null;function Yi(t){let e=t.plugins;if(id!=e){ua=!1,id=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){ua=!0;break}}return ua}const Ln=new Ee("history"),b2=new Ee("closeHistory");function y2(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new le({key:Ln,state:{init(){return new tn(yt.empty,yt.empty,null,0,-1)},apply(e,n,r){return p2(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?Jp:r=="historyRedo"?Xp:null;return!i||!e.editable?!1:(n.preventDefault(),i(e.state,e.dispatch))}}}})}function Yp(t,e){return(n,r)=>{let i=Ln.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let s=g2(i,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const Jp=Yp(!1,!0),Xp=Yp(!0,!0);me.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new le({key:new Ee("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const i=this.options.limit;if(i==null||i===0){t=!0;return}const s=this.storage.characters({node:r.doc});if(s>i){const o=s-i,a=0,l=o;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const u=r.tr.deleteRange(a,l);return t=!0,u}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:n.doc}),s=this.storage.characters({node:e.doc});if(s<=r||i>r&&s>r&&s<=i)return!0;if(i>r&&s>r&&s>i||!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,l=s-r,u=a-l,c=a;return e.deleteRange(u,c),!(this.storage.characters({node:e.doc})>r)}})]}});var E2=me.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[t2(this.options)]}});me.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new le({key:new Ee("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=e,s=[];if(!n||!r)return ae.create(t,[]);let o=0;this.options.mode==="deepest"&&t.descendants((l,u)=>{if(l.isText)return;if(!(i>=u&&i<=u+l.nodeSize-1))return!1;o+=1});let a=0;return t.descendants((l,u)=>{if(l.isText||!(i>=u&&i<=u+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&o-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";s.push(Oe.node(u,u+l.nodeSize,{class:this.options.className}))}),ae.create(t,s)}}})]}});var k2=me.create({name:"gapCursor",addProseMirrorPlugins(){return[s2()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=ee(B(t,"allowGapCursor",n)))!=null?e:null}}}),sd="placeholder";function x2(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var _2=me.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:sd,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const t=this.options.dataAttribute?`data-${x2(this.options.dataAttribute)}`:`data-${sd}`;return[new le({key:new Ee("placeholder"),props:{decorations:({doc:e,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,s=[];if(!r)return null;const o=this.editor.isEmpty;return e.descendants((a,l)=>{const u=i>=l&&i<=l+a.nodeSize,c=!a.isLeaf&&lo(a);if(!a.type.isTextblock)return this.options.includeChildren;if((u||!this.options.showOnlyCurrent)&&c){const d=[this.options.emptyNodeClass];o&&d.push(this.options.emptyEditorClass);const f=Oe.node(l,l+a.nodeSize,{class:d.join(" "),[t]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:u}):this.options.placeholder});s.push(f)}return this.options.includeChildren}),ae.create(e,s)}}})]}});me.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new le({key:new Ee("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||Yh(n.selection)||t.view.dragging?null:ae.create(n.doc,[Oe.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});var w2="skipTrailingNode";function od({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var C2=me.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new Ee(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter(i=>(this.options.notAfter||[]).concat(n).includes(i.name));return[new le({key:e,appendTransaction:(i,s,o)=>{const{doc:a,tr:l,schema:u}=o,c=e.getState(o),d=a.content.size,f=u.nodes[n];if(!i.some(h=>h.getMeta(w2))&&c)return l.insert(d,f.create())},state:{init:(i,s)=>{const o=s.tr.doc.lastChild;return!od({node:o,types:r})},apply:(i,s)=>{if(!i.docChanged||i.getMeta("__uniqueIDTransaction"))return s;const o=i.doc.lastChild;return!od({node:o,types:r})}}})]}}),S2=me.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>Jp(t,e),redo:()=>({state:t,dispatch:e})=>Xp(t,e)}},addProseMirrorPlugins(){return[y2(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),v2=me.create({name:"starterKit",addExtensions(){var t,e,n,r;const i=[];return this.options.bold!==!1&&i.push(Jx.configure(this.options.bold)),this.options.blockquote!==!1&&i.push(Kx.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push(Lp.configure(this.options.bulletList)),this.options.code!==!1&&i.push(e_.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(Cp.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(r_.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(E2.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(k2.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(i_.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(s_.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(S2.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(o_.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(d_.configure(this.options.italic)),this.options.listItem!==!1&&i.push(Pp.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(Up.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&i.push(Ip.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&i.push(Wp.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push(Z_.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(X_.configure(this.options.strike)),this.options.text!==!1&&i.push(Q_.configure(this.options.text)),this.options.underline!==!1&&i.push(Gp.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&i.push(C2.configure((r=this.options)==null?void 0:r.trailingNode)),i}}),A2=v2,Qp=_2,T2=Kp,M2=Vp,N2=me.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).some(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),O2=N2,D2=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,R2=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,I2=st.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",pe(this.options.HTMLAttributes,t),0]},renderMarkdown:(t,e)=>`==${e.renderChildren(t)}==`,parseMarkdown:(t,e)=>e.applyMark("highlight",e.parseInline(t.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:t=>t.indexOf("=="),tokenize(t,e,n){const i=/^(==)([^=]+)(==)/.exec(t);if(i){const s=i[2].trim(),o=n.inlineTokens(s);return{type:"highlight",raw:i[0],text:s,tokens:o}}}},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Hn({find:D2,type:this.type})]},addPasteRules(){return[bn({find:R2,type:this.type})]}}),L2=I2;let il,sl;if(typeof WeakMap<"u"){let t=new WeakMap;il=e=>t.get(e),sl=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;il=r=>{for(let i=0;i<t.length;i+=2)if(t[i]==r)return t[i+1]},sl=(r,i)=>(n==10&&(n=0),t[n++]=r,t[n++]=i)}var _e=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,i=e/this.width|0;let s=r+1,o=i+1;for(let a=1;s<this.width&&this.map[e+a]==n;a++)s++;for(let a=1;o<this.height&&this.map[e+this.width*a]==n;a++)o++;return{left:r,top:i,right:s,bottom:o}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:i,top:s,bottom:o}=this.findCell(t);return e=="horiz"?(n<0?r==0:i==this.width)?null:this.map[s*this.width+(n<0?r-1:i)]:(n<0?s==0:o==this.height)?null:this.map[r+this.width*(n<0?s-1:o)]}rectBetween(t,e){const{left:n,right:r,top:i,bottom:s}=this.findCell(t),{left:o,right:a,top:l,bottom:u}=this.findCell(e);return{left:Math.min(n,o),top:Math.min(i,l),right:Math.max(r,a),bottom:Math.max(s,u)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let i=t.left;i<t.right;i++){const s=r*this.width+i,o=this.map[s];n[o]||(n[o]=!0,!(i==t.left&&i&&this.map[s-1]==o||r==t.top&&r&&this.map[s-this.width]==o)&&e.push(o))}return e}positionAt(t,e,n){for(let r=0,i=0;;r++){const s=i+n.child(r).nodeSize;if(r==t){let o=e+t*this.width;const a=(t+1)*this.width;for(;o<a&&this.map[o]<i;)o++;return o==a?s-1:this.map[o]}i=s}}static get(t){return il(t)||sl(t,P2(t))}};function P2(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=B2(t),n=t.childCount,r=[];let i=0,s=null;const o=[];for(let u=0,c=e*n;u<c;u++)r[u]=0;for(let u=0,c=0;u<n;u++){const d=t.child(u);c++;for(let p=0;;p++){for(;i<r.length&&r[i]!=0;)i++;if(p==d.childCount)break;const m=d.child(p),{colspan:g,rowspan:b,colwidth:y}=m.attrs;for(let k=0;k<b;k++){if(k+u>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:c,n:b-k});break}const _=i+k*e;for(let x=0;x<g;x++){r[_+x]==0?r[_+x]=c:(s||(s=[])).push({type:"collision",row:u,pos:c,n:g-x});const w=y&&y[x];if(w){const C=(_+x)%e*2,M=o[C];M==null||M!=w&&o[C+1]==1?(o[C]=w,o[C+1]=1):M==w&&o[C+1]++}}}i+=g,c+=m.nodeSize}const f=(u+1)*e;let h=0;for(;i<f;)r[i++]==0&&h++;h&&(s||(s=[])).push({type:"missing",row:u,n:h}),c++}(e===0||n===0)&&(s||(s=[])).push({type:"zero_sized"});const a=new _e(e,n,r,s);let l=!1;for(let u=0;!l&&u<o.length;u+=2)o[u]!=null&&o[u+1]<n&&(l=!0);return l&&F2(a,o,t),a}function B2(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const i=t.child(r);let s=0;if(n)for(let o=0;o<r;o++){const a=t.child(o);for(let l=0;l<a.childCount;l++){const u=a.child(l);o+u.attrs.rowspan>r&&(s+=u.attrs.colspan)}}for(let o=0;o<i.childCount;o++){const a=i.child(o);s+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}e==-1?e=s:e!=s&&(e=Math.max(e,s))}return e}function F2(t,e,n){t.problems||(t.problems=[]);const r={};for(let i=0;i<t.map.length;i++){const s=t.map[i];if(r[s])continue;r[s]=!0;const o=n.nodeAt(s);if(!o)throw new RangeError(`No cell with offset ${s} found`);let a=null;const l=o.attrs;for(let u=0;u<l.colspan;u++){const c=e[(i+u)%t.width*2];c!=null&&(!l.colwidth||l.colwidth[u]!=c)&&((a||(a=z2(l)))[u]=c)}a&&t.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:a})}}function z2(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function je(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],i=r.spec.tableRole;i&&(e[i]=r)}}return e}const on=new Ee("selectingCells");function Un(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function $2(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function kt(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function ho(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=Un(e.$head)||H2(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function H2(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function ol(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function U2(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function tu(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function e0(t,e,n){const r=t.node(-1),i=_e.get(r),s=t.start(-1),o=i.nextCell(t.pos-s,e,n);return o==null?null:t.node(0).resolve(s+o)}function qn(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function t0(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<n;i++)r.colwidth.splice(e,0,0)}return r}function q2(t,e,n){const r=je(e.type.schema).header_cell;for(let i=0;i<t.height;i++)if(e.nodeAt(t.map[n+i*t.width]).type!=r)return!1;return!0}var he=class Ut extends U{constructor(e,n=e){const r=e.node(-1),i=_e.get(r),s=e.start(-1),o=i.rectBetween(e.pos-s,n.pos-s),a=e.node(0),l=i.cellsInRect(o).filter(c=>c!=n.pos-s);l.unshift(n.pos-s);const u=l.map(c=>{const d=r.nodeAt(c);if(!d)throw new RangeError(`No cell with offset ${c} found`);const f=s+c+1;return new Ff(a.resolve(f),a.resolve(f+d.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),i=e.resolve(n.map(this.$headCell.pos));if(ol(r)&&ol(i)&&tu(r,i)){const s=this.$anchorCell.node(-1)!=r.node(-1);return s&&this.isRowSelection()?Ut.rowSelection(r,i):s&&this.isColSelection()?Ut.colSelection(r,i):new Ut(r,i)}return $.between(r,i)}content(){const e=this.$anchorCell.node(-1),n=_e.get(e),r=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),s={},o=[];for(let l=i.top;l<i.bottom;l++){const u=[];for(let c=l*n.width+i.left,d=i.left;d<i.right;d++,c++){const f=n.map[c];if(s[f])continue;s[f]=!0;const h=n.findCell(f);let p=e.nodeAt(f);if(!p)throw new RangeError(`No cell with offset ${f} found`);const m=i.left-h.left,g=h.right-i.right;if(m>0||g>0){let b=p.attrs;if(m>0&&(b=qn(b,0,m)),g>0&&(b=qn(b,b.colspan-g,g)),h.left<i.left){if(p=p.type.createAndFill(b),!p)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(b)}`)}else p=p.type.create(b,p.content)}if(h.top<i.top||h.bottom>i.bottom){const b={...p.attrs,rowspan:Math.min(h.bottom,i.bottom)-Math.max(h.top,i.top)};h.top<i.top?p=p.type.createAndFill(b):p=p.type.create(b,p.content)}u.push(p)}o.push(e.child(l).copy(v.from(u)))}const a=this.isColSelection()&&this.isRowSelection()?e:o;return new N(v.from(a),1,1)}replace(e,n=N.empty){const r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){const{$from:a,$to:l}=i[o],u=e.mapping.slice(r);e.replace(u.map(a.pos),u.map(l.pos),o?N.empty:n)}const s=U.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);s&&e.setSelection(s)}replaceWith(e,n){this.replace(e,new N(v.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=_e.get(n),i=this.$anchorCell.start(-1),s=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let o=0;o<s.length;o++)e(n.nodeAt(s[o]),i+s[o])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),i=_e.get(r),s=e.start(-1),o=i.findCell(e.pos-s),a=i.findCell(n.pos-s),l=e.node(0);return o.top<=a.top?(o.top>0&&(e=l.resolve(s+i.map[o.left])),a.bottom<i.height&&(n=l.resolve(s+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(s+i.map[a.left])),o.bottom<i.height&&(e=l.resolve(s+i.map[i.width*(i.height-1)+o.right-1]))),new Ut(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=_e.get(e),r=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-r),s=n.colCount(this.$headCell.pos-r);if(Math.min(i,s)>0)return!1;const o=i+this.$anchorCell.nodeAfter.attrs.colspan,a=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,a)==n.width}eq(e){return e instanceof Ut&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),i=_e.get(r),s=e.start(-1),o=i.findCell(e.pos-s),a=i.findCell(n.pos-s),l=e.node(0);return o.left<=a.left?(o.left>0&&(e=l.resolve(s+i.map[o.top*i.width])),a.right<i.width&&(n=l.resolve(s+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(s+i.map[a.top*i.width])),o.right<i.width&&(e=l.resolve(s+i.map[i.width*(o.top+1)-1]))),new Ut(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Ut(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new Ut(e.resolve(n),e.resolve(r))}getBookmark(){return new W2(this.$anchorCell.pos,this.$headCell.pos)}};he.prototype.visible=!1;U.jsonID("cell",he);var W2=class n0{constructor(e,n){this.anchor=e,this.head=n}map(e){return new n0(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&tu(n,r)?new he(n,r):U.near(r,1)}};function V2(t){if(!(t.selection instanceof he))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Oe.node(r,r+n.nodeSize,{class:"selectedCell"}))}),ae.create(t.doc,e)}function K2({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,i=t.depth;for(;i>=0&&!(t.after(i+1)<t.end(i));i--,n++);for(let s=e.depth;s>=0&&!(e.before(s+1)>e.start(s));s--,r--);return n==r&&/row|table/.test(t.node(i).type.spec.tableRole)}function G2({$from:t,$to:e}){let n,r;for(let i=t.depth;i>0;i--){const s=t.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){n=s;break}}for(let i=e.depth;i>0;i--){const s=e.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){r=s;break}}return n!==r&&e.parentOffset===0}function j2(t,e,n){const r=(e||t).selection,i=(e||t).doc;let s,o;if(r instanceof z&&(o=r.node.type.spec.tableRole)){if(o=="cell"||o=="header_cell")s=he.create(i,r.from);else if(o=="row"){const a=i.resolve(r.from+1);s=he.rowSelection(a,a)}else if(!n){const a=_e.get(r.node),l=r.from+1,u=l+a.map[a.width*a.height-1];s=he.create(i,l+1,u)}}else r instanceof $&&K2(r)?s=$.create(i,r.from):r instanceof $&&G2(r)&&(s=$.create(i,r.$from.start(),r.$from.end()));return s&&(e||(e=t.tr)).setSelection(s),e}const Z2=new Ee("fix-tables");function r0(t,e,n,r){const i=t.childCount,s=e.childCount;e:for(let o=0,a=0;o<s;o++){const l=e.child(o);for(let u=a,c=Math.min(i,o+3);u<c;u++)if(t.child(u)==l){a=u+1,n+=l.nodeSize;continue e}r(l,n),a<i&&t.child(a).sameMarkup(l)?r0(t.child(a),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function i0(t,e){let n;const r=(i,s)=>{i.type.spec.tableRole=="table"&&(n=Y2(t,i,s,n))};return e?e.doc!=t.doc&&r0(e.doc,t.doc,0,r):t.doc.descendants(r),n}function Y2(t,e,n,r){const i=_e.get(e);if(!i.problems)return r;r||(r=t.tr);const s=[];for(let l=0;l<i.height;l++)s.push(0);for(let l=0;l<i.problems.length;l++){const u=i.problems[l];if(u.type=="collision"){const c=e.nodeAt(u.pos);if(!c)continue;const d=c.attrs;for(let f=0;f<d.rowspan;f++)s[u.row+f]+=u.n;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,qn(d,d.colspan-u.n,u.n))}else if(u.type=="missing")s[u.row]+=u.n;else if(u.type=="overlong_rowspan"){const c=e.nodeAt(u.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){const c=e.nodeAt(u.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(n+1+u.pos),null,{...c.attrs,colwidth:u.colwidth})}else if(u.type=="zero_sized"){const c=r.mapping.map(n);r.delete(c,c+e.nodeSize)}}let o,a;for(let l=0;l<s.length;l++)s[l]&&(o==null&&(o=l),a=l);for(let l=0,u=n+1;l<i.height;l++){const c=e.child(l),d=u+c.nodeSize,f=s[l];if(f>0){let h="cell";c.firstChild&&(h=c.firstChild.type.spec.tableRole);const p=[];for(let g=0;g<f;g++){const b=je(t.schema)[h].createAndFill();b&&p.push(b)}const m=(l==0||o==l-1)&&a==l?u+1:d-1;r.insert(r.mapping.map(m),p)}u=d}return r.setMeta(Z2,{fixTables:!0})}function Dt(t){const e=t.selection,n=ho(t),r=n.node(-1),i=n.start(-1),s=_e.get(r);return{...e instanceof he?s.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):s.findCell(n.pos-i),tableStart:i,map:s,table:r}}function s0(t,{map:e,tableStart:n,table:r},i){let s=i>0?-1:0;q2(e,r,i+s)&&(s=i==0||i==e.width?null:0);for(let o=0;o<e.height;o++){const a=o*e.width+i;if(i>0&&i<e.width&&e.map[a-1]==e.map[a]){const l=e.map[a],u=r.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,t0(u.attrs,i-e.colCount(l))),o+=u.attrs.rowspan-1}else{const l=s==null?je(r.type.schema).cell:r.nodeAt(e.map[a+s]).type,u=e.positionAt(o,i,r);t.insert(t.mapping.map(n+u),l.createAndFill())}}return t}function J2(t,e){if(!kt(t))return!1;if(e){const n=Dt(t);e(s0(t.tr,n,n.left))}return!0}function X2(t,e){if(!kt(t))return!1;if(e){const n=Dt(t);e(s0(t.tr,n,n.right))}return!0}function Q2(t,{map:e,table:n,tableStart:r},i){const s=t.mapping.maps.length;for(let o=0;o<e.height;){const a=o*e.width+i,l=e.map[a],u=n.nodeAt(l),c=u.attrs;if(i>0&&e.map[a-1]==l||i<e.width-1&&e.map[a+1]==l)t.setNodeMarkup(t.mapping.slice(s).map(r+l),null,qn(c,i-e.colCount(l)));else{const d=t.mapping.slice(s).map(r+l);t.delete(d,d+u.nodeSize)}o+=c.rowspan}}function ew(t,e){if(!kt(t))return!1;if(e){const n=Dt(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;Q2(r,n,i),i!=n.left;i--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw new RangeError("No table found");n.table=s,n.map=_e.get(s)}e(r)}return!0}function tw(t,e,n){var r;const i=je(e.type.schema).header_cell;for(let s=0;s<t.width;s++)if(((r=e.nodeAt(t.map[s+n*t.width]))===null||r===void 0?void 0:r.type)!=i)return!1;return!0}function o0(t,{map:e,tableStart:n,table:r},i){let s=n;for(let u=0;u<i;u++)s+=r.child(u).nodeSize;const o=[];let a=i>0?-1:0;tw(e,r,i+a)&&(a=i==0||i==e.height?null:0);for(let u=0,c=e.width*i;u<e.width;u++,c++)if(i>0&&i<e.height&&e.map[c]==e.map[c-e.width]){const d=e.map[c],f=r.nodeAt(d).attrs;t.setNodeMarkup(n+d,null,{...f,rowspan:f.rowspan+1}),u+=f.colspan-1}else{var l;const d=a==null?je(r.type.schema).cell:(l=r.nodeAt(e.map[c+a*e.width]))===null||l===void 0?void 0:l.type,f=d==null?void 0:d.createAndFill();f&&o.push(f)}return t.insert(s,je(r.type.schema).row.create(null,o)),t}function nw(t,e){if(!kt(t))return!1;if(e){const n=Dt(t);e(o0(t.tr,n,n.top))}return!0}function rw(t,e){if(!kt(t))return!1;if(e){const n=Dt(t);e(o0(t.tr,n,n.bottom))}return!0}function iw(t,{map:e,table:n,tableStart:r},i){let s=0;for(let u=0;u<i;u++)s+=n.child(u).nodeSize;const o=s+n.child(i).nodeSize,a=t.mapping.maps.length;t.delete(s+r,o+r);const l=new Set;for(let u=0,c=i*e.width;u<e.width;u++,c++){const d=e.map[c];if(!l.has(d)){if(l.add(d),i>0&&d==e.map[c-e.width]){const f=n.nodeAt(d).attrs;t.setNodeMarkup(t.mapping.slice(a).map(d+r),null,{...f,rowspan:f.rowspan-1}),u+=f.colspan-1}else if(i<e.height&&d==e.map[c+e.width]){const f=n.nodeAt(d),h=f.attrs,p=f.type.create({...h,rowspan:f.attrs.rowspan-1},f.content),m=e.positionAt(i+1,u,n);t.insert(t.mapping.slice(a).map(r+m),p),u+=h.colspan-1}}}}function sw(t,e){if(!kt(t))return!1;if(e){const n=Dt(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;iw(r,n,i),i!=n.top;i--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw new RangeError("No table found");n.table=s,n.map=_e.get(n.table)}e(r)}return!0}function ad(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function ow({width:t,height:e,map:n},r){let i=r.top*t+r.left,s=i,o=(r.bottom-1)*t+r.left,a=i+(r.right-r.left-1);for(let l=r.top;l<r.bottom;l++){if(r.left>0&&n[s]==n[s-1]||r.right<t&&n[a]==n[a+1])return!0;s+=t,a+=t}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[i]==n[i-t]||r.bottom<e&&n[o]==n[o+t])return!0;i++,o++}return!1}function ld(t,e){const n=t.selection;if(!(n instanceof he)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=Dt(t),{map:i}=r;if(ow(i,r))return!1;if(e){const s=t.tr,o={};let a=v.empty,l,u;for(let c=r.top;c<r.bottom;c++)for(let d=r.left;d<r.right;d++){const f=i.map[c*i.width+d],h=r.table.nodeAt(f);if(!(o[f]||!h))if(o[f]=!0,l==null)l=f,u=h;else{ad(h)||(a=a.append(h.content));const p=s.mapping.map(f+r.tableStart);s.delete(p,p+h.nodeSize)}}if(l==null||u==null)return!0;if(s.setNodeMarkup(l+r.tableStart,null,{...t0(u.attrs,u.attrs.colspan,r.right-r.left-u.attrs.colspan),rowspan:r.bottom-r.top}),a.size>0){const c=l+1+u.content.size,d=ad(u)?l+1:c;s.replaceWith(d+r.tableStart,c+r.tableStart,a)}s.setSelection(new he(s.doc.resolve(l+r.tableStart))),e(s)}return!0}function ud(t,e){const n=je(t.schema);return aw(({node:r})=>n[r.type.spec.tableRole])(t,e)}function aw(t){return(e,n)=>{const r=e.selection;let i,s;if(r instanceof he){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;i=r.$anchorCell.nodeAfter,s=r.$anchorCell.pos}else{var o;if(i=$2(r.$from),!i)return!1;s=(o=Un(r.$from))===null||o===void 0?void 0:o.pos}if(i==null||s==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let a=i.attrs;const l=[],u=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const c=Dt(e),d=e.tr;for(let h=0;h<c.right-c.left;h++)l.push(u?{...a,colwidth:u&&u[h]?[u[h]]:null}:a);let f;for(let h=c.top;h<c.bottom;h++){let p=c.map.positionAt(h,c.left,c.table);h==c.top&&(p+=i.nodeSize);for(let m=c.left,g=0;m<c.right;m++,g++)m==c.left&&h==c.top||d.insert(f=d.mapping.map(p+c.tableStart,1),t({node:i,row:h,col:m}).createAndFill(l[g]))}d.setNodeMarkup(s,t({node:i,row:c.top,col:c.left}),l[0]),r instanceof he&&d.setSelection(new he(d.doc.resolve(r.$anchorCell.pos),f?d.doc.resolve(f):void 0)),n(d)}return!0}}function lw(t,e){return function(n,r){if(!kt(n))return!1;const i=ho(n);if(i.nodeAfter.attrs[t]===e)return!1;if(r){const s=n.tr;n.selection instanceof he?n.selection.forEachCell((o,a)=>{o.attrs[t]!==e&&s.setNodeMarkup(a,null,{...o.attrs,[t]:e})}):s.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[t]:e}),r(s)}return!0}}function uw(t){return function(e,n){if(!kt(e))return!1;if(n){const r=je(e.schema),i=Dt(e),s=e.tr,o=i.map.cellsInRect(t=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:t=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=o.map(l=>i.table.nodeAt(l));for(let l=0;l<o.length;l++)a[l].type==r.header_cell&&s.setNodeMarkup(i.tableStart+o[l],r.cell,a[l].attrs);if(s.steps.length===0)for(let l=0;l<o.length;l++)s.setNodeMarkup(i.tableStart+o[l],r.header_cell,a[l].attrs);n(s)}return!0}}function cd(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let i=0;i<r.length;i++){const s=e.table.nodeAt(r[i]);if(s&&s.type!==n.header_cell)return!1}return!0}function ti(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?uw(t):function(n,r){if(!kt(n))return!1;if(r){const i=je(n.schema),s=Dt(n),o=n.tr,a=cd("row",s,i),l=cd("column",s,i),u=(t==="column"?a:t==="row"&&l)?1:0,c=t=="column"?{left:0,top:u,right:1,bottom:s.map.height}:t=="row"?{left:u,top:0,right:s.map.width,bottom:1}:s,d=t=="column"?l?i.cell:i.header_cell:t=="row"?a?i.cell:i.header_cell:i.cell;s.map.cellsInRect(c).forEach(f=>{const h=f+s.tableStart,p=o.doc.nodeAt(h);p&&o.setNodeMarkup(h,d,p.attrs)}),r(o)}return!0}}ti("row",{useDeprecatedLogic:!0});ti("column",{useDeprecatedLogic:!0});const cw=ti("cell",{useDeprecatedLogic:!0});function dw(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,i=t.before();r>=0;r--){const s=t.node(-1).child(r),o=s.lastChild;if(o)return i-1-o.nodeSize;i-=s.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),i=t.after();r<n.childCount;r++){const s=n.child(r);if(s.childCount)return i+1;i+=s.nodeSize}}return null}function dd(t){return function(e,n){if(!kt(e))return!1;const r=dw(ho(e),t);if(r==null)return!1;if(n){const i=e.doc.resolve(r);n(e.tr.setSelection($.between(i,U2(i))).scrollIntoView())}return!0}}function fw(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Li(t,e){const n=t.selection;if(!(n instanceof he))return!1;if(e){const r=t.tr,i=je(t.schema).cell.createAndFill().content;n.forEachCell((s,o)=>{s.content.eq(i)||r.replace(r.mapping.map(o+1),r.mapping.map(o+s.nodeSize-1),new N(i,0,0))}),r.docChanged&&e(r)}return!0}function hw(t){if(t.size===0)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const i=e.child(0),s=i.type.spec.tableRole,o=i.type.schema,a=[];if(s=="row")for(let l=0;l<e.childCount;l++){let u=e.child(l).content;const c=l?0:Math.max(0,n-1),d=l<e.childCount-1?0:Math.max(0,r-1);(c||d)&&(u=al(je(o).row,new N(u,c,d)).content),a.push(u)}else if(s=="cell"||s=="header_cell")a.push(n||r?al(je(o).row,new N(e,n,r)).content:e);else return null;return pw(o,a)}function pw(t,e){const n=[];for(let i=0;i<e.length;i++){const s=e[i];for(let o=s.childCount-1;o>=0;o--){const{rowspan:a,colspan:l}=s.child(o).attrs;for(let u=i;u<i+a;u++)n[u]=(n[u]||0)+l}}let r=0;for(let i=0;i<n.length;i++)r=Math.max(r,n[i]);for(let i=0;i<n.length;i++)if(i>=e.length&&e.push(v.empty),n[i]<r){const s=je(t).cell.createAndFill(),o=[];for(let a=n[i];a<r;a++)o.push(s);e[i]=e[i].append(v.from(o))}return{height:e.length,width:r,rows:e}}function al(t,e){const n=t.createAndFill();return new bl(n).replace(0,n.content.size,e).doc}function mw({width:t,height:e,rows:n},r,i){if(t!=r){const s=[],o=[];for(let a=0;a<n.length;a++){const l=n[a],u=[];for(let c=s[a]||0,d=0;c<r;d++){let f=l.child(d%l.childCount);c+f.attrs.colspan>r&&(f=f.type.createChecked(qn(f.attrs,f.attrs.colspan,c+f.attrs.colspan-r),f.content)),u.push(f),c+=f.attrs.colspan;for(let h=1;h<f.attrs.rowspan;h++)s[a+h]=(s[a+h]||0)+f.attrs.colspan}o.push(v.from(u))}n=o,t=r}if(e!=i){const s=[];for(let o=0,a=0;o<i;o++,a++){const l=[],u=n[a%e];for(let c=0;c<u.childCount;c++){let d=u.child(c);o+d.attrs.rowspan>i&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,i-d.attrs.rowspan)},d.content)),l.push(d)}s.push(v.from(l))}n=s,e=i}return{width:t,height:e,rows:n}}function gw(t,e,n,r,i,s,o){const a=t.doc.type.schema,l=je(a);let u,c;if(i>e.width)for(let d=0,f=0;d<e.height;d++){const h=n.child(d);f+=h.nodeSize;const p=[];let m;h.lastChild==null||h.lastChild.type==l.cell?m=u||(u=l.cell.createAndFill()):m=c||(c=l.header_cell.createAndFill());for(let g=e.width;g<i;g++)p.push(m);t.insert(t.mapping.slice(o).map(f-1+r),p)}if(s>e.height){const d=[];for(let p=0,m=(e.height-1)*e.width;p<Math.max(e.width,i);p++){const g=p>=e.width?!1:n.nodeAt(e.map[m+p]).type==l.header_cell;d.push(g?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}const f=l.row.create(null,v.from(d)),h=[];for(let p=e.height;p<s;p++)h.push(f);t.insert(t.mapping.slice(o).map(r+n.nodeSize-2),h)}return!!(u||c)}function fd(t,e,n,r,i,s,o,a){if(o==0||o==e.height)return!1;let l=!1;for(let u=i;u<s;u++){const c=o*e.width+u,d=e.map[c];if(e.map[c-e.width]==d){l=!0;const f=n.nodeAt(d),{top:h,left:p}=e.findCell(d);t.setNodeMarkup(t.mapping.slice(a).map(d+r),null,{...f.attrs,rowspan:o-h}),t.insert(t.mapping.slice(a).map(e.positionAt(o,p,n)),f.type.createAndFill({...f.attrs,rowspan:h+f.attrs.rowspan-o})),u+=f.attrs.colspan-1}}return l}function hd(t,e,n,r,i,s,o,a){if(o==0||o==e.width)return!1;let l=!1;for(let u=i;u<s;u++){const c=u*e.width+o,d=e.map[c];if(e.map[c-1]==d){l=!0;const f=n.nodeAt(d),h=e.colCount(d),p=t.mapping.slice(a).map(d+r);t.setNodeMarkup(p,null,qn(f.attrs,o-h,f.attrs.colspan-(o-h))),t.insert(p+f.nodeSize,f.type.createAndFill(qn(f.attrs,0,o-h))),u+=f.attrs.rowspan-1}}return l}function pd(t,e,n,r,i){let s=n?t.doc.nodeAt(n-1):t.doc;if(!s)throw new Error("No table found");let o=_e.get(s);const{top:a,left:l}=r,u=l+i.width,c=a+i.height,d=t.tr;let f=0;function h(){if(s=n?d.doc.nodeAt(n-1):d.doc,!s)throw new Error("No table found");o=_e.get(s),f=d.mapping.maps.length}gw(d,o,s,n,u,c,f)&&h(),fd(d,o,s,n,l,u,a,f)&&h(),fd(d,o,s,n,l,u,c,f)&&h(),hd(d,o,s,n,a,c,l,f)&&h(),hd(d,o,s,n,a,c,u,f)&&h();for(let p=a;p<c;p++){const m=o.positionAt(p,l,s),g=o.positionAt(p,u,s);d.replace(d.mapping.slice(f).map(m+n),d.mapping.slice(f).map(g+n),new N(i.rows[p-a],0,0))}h(),d.setSelection(new he(d.doc.resolve(n+o.positionAt(a,l,s)),d.doc.resolve(n+o.positionAt(c-1,u-1,s)))),e(d)}const bw=Rl({ArrowLeft:Pi("horiz",-1),ArrowRight:Pi("horiz",1),ArrowUp:Pi("vert",-1),ArrowDown:Pi("vert",1),"Shift-ArrowLeft":Bi("horiz",-1),"Shift-ArrowRight":Bi("horiz",1),"Shift-ArrowUp":Bi("vert",-1),"Shift-ArrowDown":Bi("vert",1),Backspace:Li,"Mod-Backspace":Li,Delete:Li,"Mod-Delete":Li});function Ji(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Pi(t,e){return(n,r,i)=>{if(!i)return!1;const s=n.selection;if(s instanceof he)return Ji(n,r,U.near(s.$headCell,e));if(t!="horiz"&&!s.empty)return!1;const o=a0(i,t,e);if(o==null)return!1;if(t=="horiz")return Ji(n,r,U.near(n.doc.resolve(s.head+e),e));{const a=n.doc.resolve(o),l=e0(a,t,e);let u;return l?u=U.near(l,1):e<0?u=U.near(n.doc.resolve(a.before(-1)),-1):u=U.near(n.doc.resolve(a.after(-1)),1),Ji(n,r,u)}}}function Bi(t,e){return(n,r,i)=>{if(!i)return!1;const s=n.selection;let o;if(s instanceof he)o=s;else{const l=a0(i,t,e);if(l==null)return!1;o=new he(n.doc.resolve(l))}const a=e0(o.$headCell,t,e);return a?Ji(n,r,new he(o.$anchorCell,a)):!1}}function yw(t,e){const n=t.state.doc,r=Un(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new he(r))),!0):!1}function Ew(t,e,n){if(!kt(t.state))return!1;let r=hw(n);const i=t.state.selection;if(i instanceof he){r||(r={width:1,height:1,rows:[v.from(al(je(t.state.schema).cell,n))]});const s=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),a=_e.get(s).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return r=mw(r,a.right-a.left,a.bottom-a.top),pd(t.state,t.dispatch,o,a,r),!0}else if(r){const s=ho(t.state),o=s.start(-1);return pd(t.state,t.dispatch,o,_e.get(s.node(-1)).findCell(s.pos-o),r),!0}else return!1}function kw(t,e){var n;if(e.button!=0||e.ctrlKey||e.metaKey)return;const r=md(t,e.target);let i;if(e.shiftKey&&t.state.selection instanceof he)s(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(i=Un(t.state.selection.$anchor))!=null&&((n=ca(t,e))===null||n===void 0?void 0:n.pos)!=i.pos)s(i,e),e.preventDefault();else if(!r)return;function s(l,u){let c=ca(t,u);const d=on.getState(t.state)==null;if(!c||!tu(l,c))if(d)c=l;else return;const f=new he(l,c);if(d||!t.state.selection.eq(f)){const h=t.state.tr.setSelection(f);d&&h.setMeta(on,l.pos),t.dispatch(h)}}function o(){t.root.removeEventListener("mouseup",o),t.root.removeEventListener("dragstart",o),t.root.removeEventListener("mousemove",a),on.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(on,-1))}function a(l){const u=l,c=on.getState(t.state);let d;if(c!=null)d=t.state.doc.resolve(c);else if(md(t,u.target)!=r&&(d=ca(t,e),!d))return o();d&&s(d,u)}t.root.addEventListener("mouseup",o),t.root.addEventListener("dragstart",o),t.root.addEventListener("mousemove",a)}function a0(t,e,n){if(!(t.state.selection instanceof $))return null;const{$head:r}=t.state.selection;for(let i=r.depth-1;i>=0;i--){const s=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const o=r.before(i),a=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(a)?o:null}}return null}function md(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function ca(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&Un(t.state.doc.resolve(r))||Un(t.state.doc.resolve(i))}var xw=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ll(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,ll(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function ll(t,e,n,r,i,s){let o=0,a=!0,l=e.firstChild;const u=t.firstChild;if(u){for(let d=0,f=0;d<u.childCount;d++){const{colspan:h,colwidth:p}=u.child(d).attrs;for(let m=0;m<h;m++,f++){const g=i==f?s:p&&p[m],b=g?g+"px":"";if(o+=g||r,g||(a=!1),l)l.style.width!=b&&(l.style.width=b),l=l.nextSibling;else{const y=document.createElement("col");y.style.width=b,e.appendChild(y)}}}for(;l;){var c;const d=l.nextSibling;(c=l.parentNode)===null||c===void 0||c.removeChild(l),l=d}a?(n.style.width=o+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=o+"px")}}const lt=new Ee("tableColumnResizing");function _w({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=xw,lastColumnResizable:i=!0}={}){const s=new le({key:lt,state:{init(o,a){var l;const u=(l=s.spec)===null||l===void 0||(l=l.props)===null||l===void 0?void 0:l.nodeViews,c=je(a.schema).table.name;return r&&u&&(u[c]=(d,f)=>new r(d,n,f)),new ww(-1,!1)},apply(o,a){return a.apply(o)}},props:{attributes:o=>{const a=lt.getState(o);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,a)=>{Cw(o,a,t,i)},mouseleave:o=>{Sw(o)},mousedown:(o,a)=>{vw(o,a,e,n)}},decorations:o=>{const a=lt.getState(o);if(a&&a.activeHandle>-1)return Ow(o,a.activeHandle)},nodeViews:{}}});return s}var ww=class Xi{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(lt);if(r&&r.setHandle!=null)return new Xi(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Xi(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let i=e.mapping.map(n.activeHandle,-1);return ol(e.doc.resolve(i))||(i=-1),new Xi(i,n.dragging)}return n}};function Cw(t,e,n,r){if(!t.editable)return;const i=lt.getState(t.state);if(i&&!i.dragging){const s=Tw(e.target);let o=-1;if(s){const{left:a,right:l}=s.getBoundingClientRect();e.clientX-a<=n?o=gd(t,e,"left",n):l-e.clientX<=n&&(o=gd(t,e,"right",n))}if(o!=i.activeHandle){if(!r&&o!==-1){const a=t.state.doc.resolve(o),l=a.node(-1),u=_e.get(l),c=a.start(-1);if(u.colCount(a.pos-c)+a.nodeAfter.attrs.colspan-1==u.width-1)return}l0(t,o)}}}function Sw(t){if(!t.editable)return;const e=lt.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&l0(t,-1)}function vw(t,e,n,r){var i;if(!t.editable)return!1;const s=(i=t.dom.ownerDocument.defaultView)!==null&&i!==void 0?i:window,o=lt.getState(t.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const a=t.state.doc.nodeAt(o.activeHandle),l=Aw(t,o.activeHandle,a.attrs);t.dispatch(t.state.tr.setMeta(lt,{setDragging:{startX:e.clientX,startWidth:l}}));function u(d){s.removeEventListener("mouseup",u),s.removeEventListener("mousemove",c);const f=lt.getState(t.state);f!=null&&f.dragging&&(Mw(t,f.activeHandle,bd(f.dragging,d,n)),t.dispatch(t.state.tr.setMeta(lt,{setDragging:null})))}function c(d){if(!d.which)return u(d);const f=lt.getState(t.state);if(f&&f.dragging){const h=bd(f.dragging,d,n);yd(t,f.activeHandle,h,r)}}return yd(t,o.activeHandle,l,r),s.addEventListener("mouseup",u),s.addEventListener("mousemove",c),e.preventDefault(),!0}function Aw(t,e,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const s=t.domAtPos(e);let o=s.node.childNodes[s.offset].offsetWidth,a=n;if(r)for(let l=0;l<n;l++)r[l]&&(o-=r[l],a--);return o/a}function Tw(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function gd(t,e,n,r){const i=n=="right"?-r:r,s=t.posAtCoords({left:e.clientX+i,top:e.clientY});if(!s)return-1;const{pos:o}=s,a=Un(t.state.doc.resolve(o));if(!a)return-1;if(n=="right")return a.pos;const l=_e.get(a.node(-1)),u=a.start(-1),c=l.map.indexOf(a.pos-u);return c%l.width==0?-1:u+l.map[c-1]}function bd(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function l0(t,e){t.dispatch(t.state.tr.setMeta(lt,{setHandle:e}))}function Mw(t,e,n){const r=t.state.doc.resolve(e),i=r.node(-1),s=_e.get(i),o=r.start(-1),a=s.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let u=0;u<s.height;u++){const c=u*s.width+a;if(u&&s.map[c]==s.map[c-s.width])continue;const d=s.map[c],f=i.nodeAt(d).attrs,h=f.colspan==1?0:a-s.colCount(d);if(f.colwidth&&f.colwidth[h]==n)continue;const p=f.colwidth?f.colwidth.slice():Nw(f.colspan);p[h]=n,l.setNodeMarkup(o+d,null,{...f,colwidth:p})}l.docChanged&&t.dispatch(l)}function yd(t,e,n,r){const i=t.state.doc.resolve(e),s=i.node(-1),o=i.start(-1),a=_e.get(s).colCount(i.pos-o)+i.nodeAfter.attrs.colspan-1;let l=t.domAtPos(i.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&ll(s,l.firstChild,l,r,a,n)}function Nw(t){return Array(t).fill(0)}function Ow(t,e){const n=[],r=t.doc.resolve(e),i=r.node(-1);if(!i)return ae.empty;const s=_e.get(i),o=r.start(-1),a=s.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1;for(let u=0;u<s.height;u++){const c=a+u*s.width;if((a==s.width-1||s.map[c]!=s.map[c+1])&&(u==0||s.map[c]!=s.map[c-s.width])){var l;const d=s.map[c],f=o+d+i.nodeAt(d).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",!((l=lt.getState(t))===null||l===void 0)&&l.dragging&&n.push(Oe.node(o+d,o+d+i.nodeAt(d).nodeSize,{class:"column-resize-dragging"})),n.push(Oe.widget(f,h))}}return ae.create(t.doc,n)}function Dw({allowTableNodeSelection:t=!1}={}){return new le({key:on,state:{init(){return null},apply(e,n){const r=e.getMeta(on);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:i,pos:s}=e.mapping.mapResult(n);return i?null:s}},props:{decorations:V2,handleDOMEvents:{mousedown:kw},createSelectionBetween(e){return on.getState(e.state)!=null?e.state.selection:null},handleTripleClick:yw,handleKeyDown:bw,handlePaste:Ew},appendTransaction(e,n,r){return j2(r,i0(r,n),t)}})}function qs(t){return t==="left"||t==="right"||t==="center"?t:null}function Rw(t){const e=(t.style.textAlign||"").trim().toLowerCase(),n=(t.getAttribute("align")||"").trim().toLowerCase();return qs(e||n)}function Iw(t){return qs(t==null?void 0:t.align)}function u0(){return{default:null,parseHTML:t=>Rw(t),renderHTML:t=>t.align?{style:`text-align: ${t.align}`}:{}}}var c0=X.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{var e,n;const r=t.getAttribute("colwidth"),i=r?r.split(",").map(s=>parseInt(s,10)):null;if(!i){const s=(e=t.closest("table"))==null?void 0:e.querySelectorAll("colgroup > col"),o=Array.from(((n=t.parentElement)==null?void 0:n.children)||[]).indexOf(t);if(o&&o>-1&&s&&s[o]){const a=s[o].getAttribute("width");return a?[parseInt(a,10)]:null}}return i}},align:u0()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",pe(this.options.HTMLAttributes,t),0]}}),d0=X.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}},align:u0()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",pe(this.options.HTMLAttributes,t),0]}}),f0=X.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",pe(this.options.HTMLAttributes,t),0]}});function ul(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function Ed(t,e,n,r,i,s){var o;let a=0,l=!0,u=e.firstChild;const c=t.firstChild;if(c!==null)for(let f=0,h=0;f<c.childCount;f+=1){const{colspan:p,colwidth:m}=c.child(f).attrs;for(let g=0;g<p;g+=1,h+=1){const b=i===h?s:m&&m[g],y=b?`${b}px`:"";if(a+=b||r,b||(l=!1),u){if(u.style.width!==y){const[k,_]=ul(r,b);u.style.setProperty(k,_)}u=u.nextSibling}else{const k=document.createElement("col"),[_,x]=ul(r,b);k.style.setProperty(_,x),e.appendChild(k)}}}for(;u;){const f=u.nextSibling;(o=u.parentNode)==null||o.removeChild(u),u=f}const d=t.attrs.style&&typeof t.attrs.style=="string"&&/\bwidth\s*:/i.test(t.attrs.style);l&&!d?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}var Lw=class{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),t.attrs.style&&(this.table.style.cssText=t.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Ed(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,Ed(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){const e=t.target,n=this.dom.contains(e),r=this.contentDOM.contains(e);return!!(n&&!r&&(t.type==="attributes"||t.type==="childList"||t.type==="characterData"))}};function Pw(t,e,n,r){let i=0,s=!0;const o=[],a=t.firstChild;if(!a)return{};for(let d=0,f=0;d<a.childCount;d+=1){const{colspan:h,colwidth:p}=a.child(d).attrs;for(let m=0;m<h;m+=1,f+=1){const g=n===f?r:p&&p[m];i+=g||e,g||(s=!1);const[b,y]=ul(e,g);o.push(["col",{style:`${b}: ${y}`}])}}const l=s?`${i}px`:"",u=s?"":`${i}px`;return{colgroup:["colgroup",{},...o],tableWidth:l,tableMinWidth:u}}function kd(t,e){return t.createAndFill()}function Bw(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function Fw(t,e,n,r,i){const s=Bw(t),o=[],a=[];for(let u=0;u<n;u+=1){const c=kd(s.cell);if(c&&a.push(c),r){const d=kd(s.header_cell);d&&o.push(d)}}const l=[];for(let u=0;u<e;u+=1)l.push(s.row.createChecked(null,r&&u===0?o:a));return s.table.createChecked(null,l)}function zw(t){return t instanceof he}var Fi=({editor:t})=>{const{selection:e}=t.state;if(!zw(e))return!1;let n=0;const r=Uh(e.ranges[0].$from,s=>s.type.name==="table");return r==null||r.node.descendants(s=>{if(s.type.name==="table")return!1;["tableCell","tableHeader"].includes(s.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},$w="";function Hw(t){return(t||"").replace(/\s+/g," ").trim()}function Uw(t,e,n={}){var r;const i=(r=n.cellLineSeparator)!=null?r:$w;if(!t||!t.content||t.content.length===0)return"";const s=[];t.content.forEach(m=>{const g=[];m.content&&m.content.forEach(b=>{let y="";b.content&&Array.isArray(b.content)&&b.content.length>1?y=b.content.map(C=>e.renderChildren(C)).join(i):y=b.content?e.renderChildren(b.content):"";const k=Hw(y),_=b.type==="tableHeader",x=Iw(b.attrs);g.push({text:k,isHeader:_,align:x})}),s.push(g)});const o=s.reduce((m,g)=>Math.max(m,g.length),0);if(o===0)return"";const a=new Array(o).fill(0);s.forEach(m=>{var g;for(let b=0;b<o;b+=1){const k=(((g=m[b])==null?void 0:g.text)||"").length;k>a[b]&&(a[b]=k),a[b]<3&&(a[b]=3)}});const l=(m,g)=>m+" ".repeat(Math.max(0,g-m.length)),u=s[0],c=u.some(m=>m.isHeader),d=new Array(o).fill(null);s.forEach(m=>{var g;for(let b=0;b<o;b+=1)!d[b]&&((g=m[b])!=null&&g.align)&&(d[b]=m[b].align)});let f=`
240
+ `;const h=new Array(o).fill(0).map((m,g)=>c&&u[g]&&u[g].text||"");return f+=`| ${h.map((m,g)=>l(m,a[g])).join(" | ")} |
241
+ `,f+=`| ${a.map((m,g)=>{const b=Math.max(3,m),y=d[g];return y==="left"?`:${"-".repeat(b)}`:y==="right"?`${"-".repeat(b)}:`:y==="center"?`:${"-".repeat(b)}:`:"-".repeat(b)}).join(" | ")} |
242
+ `,(c?s.slice(1):s).forEach(m=>{f+=`| ${new Array(o).fill(0).map((g,b)=>l(m[b]&&m[b].text||"",a[b])).join(" | ")} |
243
+ `}),f}var qw=Uw,h0=X.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:Lw,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:i}=Pw(t,this.options.cellMinWidth),s=e.style;function o(){return s||(r?`width: ${r}`:`min-width: ${i}`)}const a=["table",pe(this.options.HTMLAttributes,e,{style:o()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},a]:a},parseMarkdown:(t,e)=>{const n=[],r=Array.isArray(t.align)?t.align:[];if(t.header){const i=[];t.header.forEach((s,o)=>{var a;const l=qs((a=r[o])!=null?a:s.align),u=l?{align:l}:{};i.push(e.createNode("tableHeader",u,[{type:"paragraph",content:e.parseInline(s.tokens)}]))}),n.push(e.createNode("tableRow",{},i))}return t.rows&&t.rows.forEach(i=>{const s=[];i.forEach((o,a)=>{var l;const u=qs((l=r[a])!=null?l:o.align),c=u?{align:u}:{};s.push(e.createNode("tableCell",c,[{type:"paragraph",content:e.parseInline(o.tokens)}]))}),n.push(e.createNode("tableRow",{},s))}),e.createNode("table",void 0,n)},renderMarkdown:(t,e)=>qw(t,e),addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:s})=>{const o=Fw(s.schema,t,e,n);if(i){const a=r.selection.from+1;r.replaceSelectionWith(o).scrollIntoView().setSelection($.near(r.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>J2(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>X2(t,e),deleteColumn:()=>({state:t,dispatch:e})=>ew(t,e),addRowBefore:()=>({state:t,dispatch:e})=>nw(t,e),addRowAfter:()=>({state:t,dispatch:e})=>rw(t,e),deleteRow:()=>({state:t,dispatch:e})=>sw(t,e),deleteTable:()=>({state:t,dispatch:e})=>fw(t,e),mergeCells:()=>({state:t,dispatch:e})=>ld(t,e),splitCell:()=>({state:t,dispatch:e})=>ud(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>ti("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>ti("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>cw(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>ld(t,e)?!0:ud(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>lw(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>dd(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>dd(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&i0(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=he.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Fi,"Mod-Backspace":Fi,Delete:Fi,"Mod-Delete":Fi}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[_w({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Dw({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:ee(B(t,"tableRole",e))}}});me.create({name:"tableKit",addExtensions(){const t=[];return this.options.table!==!1&&t.push(h0.configure(this.options.table)),this.options.tableCell!==!1&&t.push(c0.configure(this.options.tableCell)),this.options.tableHeader!==!1&&t.push(d0.configure(this.options.tableHeader)),this.options.tableRow!==!1&&t.push(f0.configure(this.options.tableRow)),t}});var Ww=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Vw=X.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",pe(this.options.HTMLAttributes,t)]},parseMarkdown:(t,e)=>e.createNode("image",{src:t.href,title:t.title,alt:t.text}),renderMarkdown:t=>{var e,n,r,i,s,o;const a=(n=(e=t.attrs)==null?void 0:e.src)!=null?n:"",l=(i=(r=t.attrs)==null?void 0:r.alt)!=null?i:"",u=(o=(s=t.attrs)==null?void 0:s.title)!=null?o:"";return u?`![${l}](${a} "${u}")`:`![${l}](${a})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:t,minWidth:e,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:i,getPos:s,HTMLAttributes:o,editor:a})=>{const l=document.createElement("img");Object.entries(o).forEach(([d,f])=>{if(f!=null)switch(d){case"width":case"height":break;default:l.setAttribute(d,f);break}}),l.src=o.src;const u=new Sk({element:l,editor:a,node:i,getPos:s,onResize:(d,f)=>{l.style.width=`${d}px`,l.style.height=`${f}px`},onCommit:(d,f)=>{const h=s();h!==void 0&&this.editor.chain().setNodeSelection(h).updateAttributes(this.name,{width:d,height:f}).run()},onUpdate:(d,f,h)=>d.type===i.type,options:{directions:t,min:{width:e,height:n},preserveAspectRatio:r===!0}}),c=u.dom;return c.style.visibility="hidden",c.style.pointerEvents="none",l.onload=()=>{c.style.visibility="",c.style.pointerEvents=""},u}},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[pp({find:Ww,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),Kw=Vw,da,xd;function Gw(){if(xd)return da;xd=1;function t(E){return E instanceof Map?E.clear=E.delete=E.set=function(){throw new Error("map is read-only")}:E instanceof Set&&(E.add=E.clear=E.delete=function(){throw new Error("set is read-only")}),Object.freeze(E),Object.getOwnPropertyNames(E).forEach(S=>{const O=E[S],V=typeof O;(V==="object"||V==="function")&&!Object.isFrozen(O)&&t(O)}),E}class e{constructor(S){S.data===void 0&&(S.data={}),this.data=S.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(E){return E.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(E,...S){const O=Object.create(null);for(const V in E)O[V]=E[V];return S.forEach(function(V){for(const we in V)O[we]=V[we]}),O}const i="</span>",s=E=>!!E.scope,o=(E,{prefix:S})=>{if(E.startsWith("language:"))return E.replace("language:","language-");if(E.includes(".")){const O=E.split(".");return[`${S}${O.shift()}`,...O.map((V,we)=>`${V}${"_".repeat(we+1)}`)].join(" ")}return`${S}${E}`};class a{constructor(S,O){this.buffer="",this.classPrefix=O.classPrefix,S.walk(this)}addText(S){this.buffer+=n(S)}openNode(S){if(!s(S))return;const O=o(S.scope,{prefix:this.classPrefix});this.span(O)}closeNode(S){s(S)&&(this.buffer+=i)}value(){return this.buffer}span(S){this.buffer+=`<span class="${S}">`}}const l=(E={})=>{const S={children:[]};return Object.assign(S,E),S};class u{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(S){this.top.children.push(S)}openNode(S){const O=l({scope:S});this.add(O),this.stack.push(O)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(S){return this.constructor._walk(S,this.rootNode)}static _walk(S,O){return typeof O=="string"?S.addText(O):O.children&&(S.openNode(O),O.children.forEach(V=>this._walk(S,V)),S.closeNode(O)),S}static _collapse(S){typeof S!="string"&&S.children&&(S.children.every(O=>typeof O=="string")?S.children=[S.children.join("")]:S.children.forEach(O=>{u._collapse(O)}))}}class c extends u{constructor(S){super(),this.options=S}addText(S){S!==""&&this.add(S)}startScope(S){this.openNode(S)}endScope(){this.closeNode()}__addSublanguage(S,O){const V=S.root;O&&(V.scope=`language:${O}`),this.add(V)}toHTML(){return new a(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(E){return E?typeof E=="string"?E:E.source:null}function f(E){return m("(?=",E,")")}function h(E){return m("(?:",E,")*")}function p(E){return m("(?:",E,")?")}function m(...E){return E.map(O=>d(O)).join("")}function g(E){const S=E[E.length-1];return typeof S=="object"&&S.constructor===Object?(E.splice(E.length-1,1),S):{}}function b(...E){return"("+(g(E).capture?"":"?:")+E.map(V=>d(V)).join("|")+")"}function y(E){return new RegExp(E.toString()+"|").exec("").length-1}function k(E,S){const O=E&&E.exec(S);return O&&O.index===0}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function x(E,{joinWith:S}){let O=0;return E.map(V=>{O+=1;const we=O;let Ce=d(V),P="";for(;Ce.length>0;){const L=_.exec(Ce);if(!L){P+=Ce;break}P+=Ce.substring(0,L.index),Ce=Ce.substring(L.index+L[0].length),L[0][0]==="\\"&&L[1]?P+="\\"+String(Number(L[1])+we):(P+=L[0],L[0]==="("&&O++)}return P}).map(V=>`(${V})`).join(S)}const w=/\b\B/,C="[a-zA-Z]\\w*",M="[a-zA-Z_]\\w*",R="\\b\\d+(\\.\\d+)?",j="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",be="\\b(0b[01]+)",ue="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",re=(E={})=>{const S=/^#![ ]*\//;return E.binary&&(E.begin=m(S,/.*\b/,E.binary,/\b.*/)),r({scope:"meta",begin:S,end:/$/,relevance:0,"on:begin":(O,V)=>{O.index!==0&&V.ignoreMatch()}},E)},G={begin:"\\\\[\\s\\S]",relevance:0},q={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[G]},ye={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[G]},Ye={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Q=function(E,S,O={}){const V=r({scope:"comment",begin:E,end:S,contains:[]},O);V.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const we=b("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return V.contains.push({begin:m(/[ ]+/,"(",we,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),V},Fe=Q("//","$"),Je=Q("/\\*","\\*/"),We=Q("#","$"),ze={scope:"number",begin:R,relevance:0},Pt={scope:"number",begin:j,relevance:0},Eo={scope:"number",begin:be,relevance:0},pi={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[G,{begin:/\[/,end:/\]/,relevance:0,contains:[G]}]},Er={scope:"title",begin:C,relevance:0},ko={scope:"title",begin:M,relevance:0},mi={begin:"\\.\\s*"+M,relevance:0};var Kn=Object.freeze({__proto__:null,APOS_STRING_MODE:q,BACKSLASH_ESCAPE:G,BINARY_NUMBER_MODE:Eo,BINARY_NUMBER_RE:be,COMMENT:Q,C_BLOCK_COMMENT_MODE:Je,C_LINE_COMMENT_MODE:Fe,C_NUMBER_MODE:Pt,C_NUMBER_RE:j,END_SAME_AS_BEGIN:function(E){return Object.assign(E,{"on:begin":(S,O)=>{O.data._beginMatch=S[1]},"on:end":(S,O)=>{O.data._beginMatch!==S[1]&&O.ignoreMatch()}})},HASH_COMMENT_MODE:We,IDENT_RE:C,MATCH_NOTHING_RE:w,METHOD_GUARD:mi,NUMBER_MODE:ze,NUMBER_RE:R,PHRASAL_WORDS_MODE:Ye,QUOTE_STRING_MODE:ye,REGEXP_MODE:pi,RE_STARTERS_RE:ue,SHEBANG:re,TITLE_MODE:Er,UNDERSCORE_IDENT_RE:M,UNDERSCORE_TITLE_MODE:ko});function xo(E,S){E.input[E.index-1]==="."&&S.ignoreMatch()}function _o(E,S){E.className!==void 0&&(E.scope=E.className,delete E.className)}function wo(E,S){S&&E.beginKeywords&&(E.begin="\\b("+E.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",E.__beforeBegin=xo,E.keywords=E.keywords||E.beginKeywords,delete E.beginKeywords,E.relevance===void 0&&(E.relevance=0))}function Co(E,S){Array.isArray(E.illegal)&&(E.illegal=b(...E.illegal))}function So(E,S){if(E.match){if(E.begin||E.end)throw new Error("begin & end are not supported with match");E.begin=E.match,delete E.match}}function se(E,S){E.relevance===void 0&&(E.relevance=1)}const Gn=(E,S)=>{if(!E.beforeMatch)return;if(E.starts)throw new Error("beforeMatch cannot be used with starts");const O=Object.assign({},E);Object.keys(E).forEach(V=>{delete E[V]}),E.keywords=O.keywords,E.begin=m(O.beforeMatch,f(O.begin)),E.starts={relevance:0,contains:[Object.assign(O,{endsParent:!0})]},E.relevance=0,delete O.beforeMatch},_n=["of","and","for","in","not","or","if","then","parent","list","value"],vo="keyword";function hu(E,S,O=vo){const V=Object.create(null);return typeof E=="string"?we(O,E.split(" ")):Array.isArray(E)?we(O,E):Object.keys(E).forEach(function(Ce){Object.assign(V,hu(E[Ce],S,Ce))}),V;function we(Ce,P){S&&(P=P.map(L=>L.toLowerCase())),P.forEach(function(L){const W=L.split("|");V[W[0]]=[Ce,cm(W[0],W[1])]})}}function cm(E,S){return S?Number(S):dm(E)?0:1}function dm(E){return _n.includes(E.toLowerCase())}const pu={},wn=E=>{console.error(E)},mu=(E,...S)=>{console.log(`WARN: ${E}`,...S)},jn=(E,S)=>{pu[`${E}/${S}`]||(console.log(`Deprecated as of ${E}. ${S}`),pu[`${E}/${S}`]=!0)},gi=new Error;function gu(E,S,{key:O}){let V=0;const we=E[O],Ce={},P={};for(let L=1;L<=S.length;L++)P[L+V]=we[L],Ce[L+V]=!0,V+=y(S[L-1]);E[O]=P,E[O]._emit=Ce,E[O]._multi=!0}function fm(E){if(Array.isArray(E.begin)){if(E.skip||E.excludeBegin||E.returnBegin)throw wn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),gi;if(typeof E.beginScope!="object"||E.beginScope===null)throw wn("beginScope must be object"),gi;gu(E,E.begin,{key:"beginScope"}),E.begin=x(E.begin,{joinWith:""})}}function hm(E){if(Array.isArray(E.end)){if(E.skip||E.excludeEnd||E.returnEnd)throw wn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),gi;if(typeof E.endScope!="object"||E.endScope===null)throw wn("endScope must be object"),gi;gu(E,E.end,{key:"endScope"}),E.end=x(E.end,{joinWith:""})}}function pm(E){E.scope&&typeof E.scope=="object"&&E.scope!==null&&(E.beginScope=E.scope,delete E.scope)}function mm(E){pm(E),typeof E.beginScope=="string"&&(E.beginScope={_wrap:E.beginScope}),typeof E.endScope=="string"&&(E.endScope={_wrap:E.endScope}),fm(E),hm(E)}function gm(E){function S(P,L){return new RegExp(d(P),"m"+(E.case_insensitive?"i":"")+(E.unicodeRegex?"u":"")+(L?"g":""))}class O{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(L,W){W.position=this.position++,this.matchIndexes[this.matchAt]=W,this.regexes.push([W,L]),this.matchAt+=y(L)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const L=this.regexes.map(W=>W[1]);this.matcherRe=S(x(L,{joinWith:"|"}),!0),this.lastIndex=0}exec(L){this.matcherRe.lastIndex=this.lastIndex;const W=this.matcherRe.exec(L);if(!W)return null;const De=W.findIndex((kr,To)=>To>0&&kr!==void 0),Se=this.matchIndexes[De];return W.splice(0,De),Object.assign(W,Se)}}class V{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(L){if(this.multiRegexes[L])return this.multiRegexes[L];const W=new O;return this.rules.slice(L).forEach(([De,Se])=>W.addRule(De,Se)),W.compile(),this.multiRegexes[L]=W,W}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(L,W){this.rules.push([L,W]),W.type==="begin"&&this.count++}exec(L){const W=this.getMatcher(this.regexIndex);W.lastIndex=this.lastIndex;let De=W.exec(L);if(this.resumingScanAtSamePosition()&&!(De&&De.index===this.lastIndex)){const Se=this.getMatcher(0);Se.lastIndex=this.lastIndex+1,De=Se.exec(L)}return De&&(this.regexIndex+=De.position+1,this.regexIndex===this.count&&this.considerAll()),De}}function we(P){const L=new V;return P.contains.forEach(W=>L.addRule(W.begin,{rule:W,type:"begin"})),P.terminatorEnd&&L.addRule(P.terminatorEnd,{type:"end"}),P.illegal&&L.addRule(P.illegal,{type:"illegal"}),L}function Ce(P,L){const W=P;if(P.isCompiled)return W;[_o,So,mm,Gn].forEach(Se=>Se(P,L)),E.compilerExtensions.forEach(Se=>Se(P,L)),P.__beforeBegin=null,[wo,Co,se].forEach(Se=>Se(P,L)),P.isCompiled=!0;let De=null;return typeof P.keywords=="object"&&P.keywords.$pattern&&(P.keywords=Object.assign({},P.keywords),De=P.keywords.$pattern,delete P.keywords.$pattern),De=De||/\w+/,P.keywords&&(P.keywords=hu(P.keywords,E.case_insensitive)),W.keywordPatternRe=S(De,!0),L&&(P.begin||(P.begin=/\B|\b/),W.beginRe=S(W.begin),!P.end&&!P.endsWithParent&&(P.end=/\B|\b/),P.end&&(W.endRe=S(W.end)),W.terminatorEnd=d(W.end)||"",P.endsWithParent&&L.terminatorEnd&&(W.terminatorEnd+=(P.end?"|":"")+L.terminatorEnd)),P.illegal&&(W.illegalRe=S(P.illegal)),P.contains||(P.contains=[]),P.contains=[].concat(...P.contains.map(function(Se){return bm(Se==="self"?P:Se)})),P.contains.forEach(function(Se){Ce(Se,W)}),P.starts&&Ce(P.starts,L),W.matcher=we(W),W}if(E.compilerExtensions||(E.compilerExtensions=[]),E.contains&&E.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return E.classNameAliases=r(E.classNameAliases||{}),Ce(E)}function bu(E){return E?E.endsWithParent||bu(E.starts):!1}function bm(E){return E.variants&&!E.cachedVariants&&(E.cachedVariants=E.variants.map(function(S){return r(E,{variants:null},S)})),E.cachedVariants?E.cachedVariants:bu(E)?r(E,{starts:E.starts?r(E.starts):null}):Object.isFrozen(E)?r(E):E}var ym="11.11.1";class Em extends Error{constructor(S,O){super(S),this.name="HTMLInjectionError",this.html=O}}const Ao=n,yu=r,Eu=Symbol("nomatch"),km=7,ku=function(E){const S=Object.create(null),O=Object.create(null),V=[];let we=!0;const Ce="Could not find the language '{}', did you forget to load/include a language module?",P={disableAutodetect:!0,name:"Plain text",contains:[]};let L={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:c};function W(T){return L.noHighlightRe.test(T)}function De(T){let H=T.className+" ";H+=T.parentNode?T.parentNode.className:"";const J=L.languageDetectRe.exec(H);if(J){const ce=Zt(J[1]);return ce||(mu(Ce.replace("{}",J[1])),mu("Falling back to no-highlight mode for this block.",T)),ce?J[1]:"no-highlight"}return H.split(/\s+/).find(ce=>W(ce)||Zt(ce))}function Se(T,H,J){let ce="",Me="";typeof H=="object"?(ce=T,J=H.ignoreIllegals,Me=H.language):(jn("10.7.0","highlight(lang, code, ...args) has been deprecated."),jn("10.7.0",`Please use highlight(code, options) instead.
244
+ https://github.com/highlightjs/highlight.js/issues/2277`),Me=T,ce=H),J===void 0&&(J=!0);const bt={code:ce,language:Me};yi("before:highlight",bt);const Yt=bt.result?bt.result:kr(bt.language,bt.code,J);return Yt.code=bt.code,yi("after:highlight",Yt),Yt}function kr(T,H,J,ce){const Me=Object.create(null);function bt(D,F){return D.keywords[F]}function Yt(){if(!K.keywords){$e.addText(de);return}let D=0;K.keywordPatternRe.lastIndex=0;let F=K.keywordPatternRe.exec(de),Y="";for(;F;){Y+=de.substring(D,F.index);const ie=wt.case_insensitive?F[0].toLowerCase():F[0],Ve=bt(K,ie);if(Ve){const[Bt,Bm]=Ve;if($e.addText(Y),Y="",Me[ie]=(Me[ie]||0)+1,Me[ie]<=km&&(xi+=Bm),Bt.startsWith("_"))Y+=F[0];else{const Fm=wt.classNameAliases[Bt]||Bt;_t(F[0],Fm)}}else Y+=F[0];D=K.keywordPatternRe.lastIndex,F=K.keywordPatternRe.exec(de)}Y+=de.substring(D),$e.addText(Y)}function Ei(){if(de==="")return;let D=null;if(typeof K.subLanguage=="string"){if(!S[K.subLanguage]){$e.addText(de);return}D=kr(K.subLanguage,de,!0,Tu[K.subLanguage]),Tu[K.subLanguage]=D._top}else D=Mo(de,K.subLanguage.length?K.subLanguage:null);K.relevance>0&&(xi+=D.relevance),$e.__addSublanguage(D._emitter,D.language)}function ot(){K.subLanguage!=null?Ei():Yt(),de=""}function _t(D,F){D!==""&&($e.startScope(F),$e.addText(D),$e.endScope())}function Cu(D,F){let Y=1;const ie=F.length-1;for(;Y<=ie;){if(!D._emit[Y]){Y++;continue}const Ve=wt.classNameAliases[D[Y]]||D[Y],Bt=F[Y];Ve?_t(Bt,Ve):(de=Bt,Yt(),de=""),Y++}}function Su(D,F){return D.scope&&typeof D.scope=="string"&&$e.openNode(wt.classNameAliases[D.scope]||D.scope),D.beginScope&&(D.beginScope._wrap?(_t(de,wt.classNameAliases[D.beginScope._wrap]||D.beginScope._wrap),de=""):D.beginScope._multi&&(Cu(D.beginScope,F),de="")),K=Object.create(D,{parent:{value:K}}),K}function vu(D,F,Y){let ie=k(D.endRe,Y);if(ie){if(D["on:end"]){const Ve=new e(D);D["on:end"](F,Ve),Ve.isMatchIgnored&&(ie=!1)}if(ie){for(;D.endsParent&&D.parent;)D=D.parent;return D}}if(D.endsWithParent)return vu(D.parent,F,Y)}function Dm(D){return K.matcher.regexIndex===0?(de+=D[0],1):(Ro=!0,0)}function Rm(D){const F=D[0],Y=D.rule,ie=new e(Y),Ve=[Y.__beforeBegin,Y["on:begin"]];for(const Bt of Ve)if(Bt&&(Bt(D,ie),ie.isMatchIgnored))return Dm(F);return Y.skip?de+=F:(Y.excludeBegin&&(de+=F),ot(),!Y.returnBegin&&!Y.excludeBegin&&(de=F)),Su(Y,D),Y.returnBegin?0:F.length}function Im(D){const F=D[0],Y=H.substring(D.index),ie=vu(K,D,Y);if(!ie)return Eu;const Ve=K;K.endScope&&K.endScope._wrap?(ot(),_t(F,K.endScope._wrap)):K.endScope&&K.endScope._multi?(ot(),Cu(K.endScope,D)):Ve.skip?de+=F:(Ve.returnEnd||Ve.excludeEnd||(de+=F),ot(),Ve.excludeEnd&&(de=F));do K.scope&&$e.closeNode(),!K.skip&&!K.subLanguage&&(xi+=K.relevance),K=K.parent;while(K!==ie.parent);return ie.starts&&Su(ie.starts,D),Ve.returnEnd?0:F.length}function Lm(){const D=[];for(let F=K;F!==wt;F=F.parent)F.scope&&D.unshift(F.scope);D.forEach(F=>$e.openNode(F))}let ki={};function Au(D,F){const Y=F&&F[0];if(de+=D,Y==null)return ot(),0;if(ki.type==="begin"&&F.type==="end"&&ki.index===F.index&&Y===""){if(de+=H.slice(F.index,F.index+1),!we){const ie=new Error(`0 width match regex (${T})`);throw ie.languageName=T,ie.badRule=ki.rule,ie}return 1}if(ki=F,F.type==="begin")return Rm(F);if(F.type==="illegal"&&!J){const ie=new Error('Illegal lexeme "'+Y+'" for mode "'+(K.scope||"<unnamed>")+'"');throw ie.mode=K,ie}else if(F.type==="end"){const ie=Im(F);if(ie!==Eu)return ie}if(F.type==="illegal"&&Y==="")return de+=`
245
+ `,1;if(Do>1e5&&Do>F.index*3)throw new Error("potential infinite loop, way more iterations than matches");return de+=Y,Y.length}const wt=Zt(T);if(!wt)throw wn(Ce.replace("{}",T)),new Error('Unknown language: "'+T+'"');const Pm=gm(wt);let Oo="",K=ce||Pm;const Tu={},$e=new L.__emitter(L);Lm();let de="",xi=0,Cn=0,Do=0,Ro=!1;try{if(wt.__emitTokens)wt.__emitTokens(H,$e);else{for(K.matcher.considerAll();;){Do++,Ro?Ro=!1:K.matcher.considerAll(),K.matcher.lastIndex=Cn;const D=K.matcher.exec(H);if(!D)break;const F=H.substring(Cn,D.index),Y=Au(F,D);Cn=D.index+Y}Au(H.substring(Cn))}return $e.finalize(),Oo=$e.toHTML(),{language:T,value:Oo,relevance:xi,illegal:!1,_emitter:$e,_top:K}}catch(D){if(D.message&&D.message.includes("Illegal"))return{language:T,value:Ao(H),illegal:!0,relevance:0,_illegalBy:{message:D.message,index:Cn,context:H.slice(Cn-100,Cn+100),mode:D.mode,resultSoFar:Oo},_emitter:$e};if(we)return{language:T,value:Ao(H),illegal:!1,relevance:0,errorRaised:D,_emitter:$e,_top:K};throw D}}function To(T){const H={value:Ao(T),illegal:!1,relevance:0,_top:P,_emitter:new L.__emitter(L)};return H._emitter.addText(T),H}function Mo(T,H){H=H||L.languages||Object.keys(S);const J=To(T),ce=H.filter(Zt).filter(wu).map(ot=>kr(ot,T,!1));ce.unshift(J);const Me=ce.sort((ot,_t)=>{if(ot.relevance!==_t.relevance)return _t.relevance-ot.relevance;if(ot.language&&_t.language){if(Zt(ot.language).supersetOf===_t.language)return 1;if(Zt(_t.language).supersetOf===ot.language)return-1}return 0}),[bt,Yt]=Me,Ei=bt;return Ei.secondBest=Yt,Ei}function xm(T,H,J){const ce=H&&O[H]||J;T.classList.add("hljs"),T.classList.add(`language-${ce}`)}function No(T){let H=null;const J=De(T);if(W(J))return;if(yi("before:highlightElement",{el:T,language:J}),T.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",T);return}if(T.children.length>0&&(L.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(T)),L.throwUnescapedHTML))throw new Em("One of your code blocks includes unescaped HTML.",T.innerHTML);H=T;const ce=H.textContent,Me=J?Se(ce,{language:J,ignoreIllegals:!0}):Mo(ce);T.innerHTML=Me.value,T.dataset.highlighted="yes",xm(T,J,Me.language),T.result={language:Me.language,re:Me.relevance,relevance:Me.relevance},Me.secondBest&&(T.secondBest={language:Me.secondBest.language,relevance:Me.secondBest.relevance}),yi("after:highlightElement",{el:T,result:Me,text:ce})}function _m(T){L=yu(L,T)}const wm=()=>{bi(),jn("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Cm(){bi(),jn("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let xu=!1;function bi(){function T(){bi()}if(document.readyState==="loading"){xu||window.addEventListener("DOMContentLoaded",T,!1),xu=!0;return}document.querySelectorAll(L.cssSelector).forEach(No)}function Sm(T,H){let J=null;try{J=H(E)}catch(ce){if(wn("Language definition for '{}' could not be registered.".replace("{}",T)),we)wn(ce);else throw ce;J=P}J.name||(J.name=T),S[T]=J,J.rawDefinition=H.bind(null,E),J.aliases&&_u(J.aliases,{languageName:T})}function vm(T){delete S[T];for(const H of Object.keys(O))O[H]===T&&delete O[H]}function Am(){return Object.keys(S)}function Zt(T){return T=(T||"").toLowerCase(),S[T]||S[O[T]]}function _u(T,{languageName:H}){typeof T=="string"&&(T=[T]),T.forEach(J=>{O[J.toLowerCase()]=H})}function wu(T){const H=Zt(T);return H&&!H.disableAutodetect}function Tm(T){T["before:highlightBlock"]&&!T["before:highlightElement"]&&(T["before:highlightElement"]=H=>{T["before:highlightBlock"](Object.assign({block:H.el},H))}),T["after:highlightBlock"]&&!T["after:highlightElement"]&&(T["after:highlightElement"]=H=>{T["after:highlightBlock"](Object.assign({block:H.el},H))})}function Mm(T){Tm(T),V.push(T)}function Nm(T){const H=V.indexOf(T);H!==-1&&V.splice(H,1)}function yi(T,H){const J=T;V.forEach(function(ce){ce[J]&&ce[J](H)})}function Om(T){return jn("10.7.0","highlightBlock will be removed entirely in v12.0"),jn("10.7.0","Please use highlightElement now."),No(T)}Object.assign(E,{highlight:Se,highlightAuto:Mo,highlightAll:bi,highlightElement:No,highlightBlock:Om,configure:_m,initHighlighting:wm,initHighlightingOnLoad:Cm,registerLanguage:Sm,unregisterLanguage:vm,listLanguages:Am,getLanguage:Zt,registerAliases:_u,autoDetection:wu,inherit:yu,addPlugin:Mm,removePlugin:Nm}),E.debugMode=function(){we=!1},E.safeMode=function(){we=!0},E.versionString=ym,E.regex={concat:m,lookahead:f,either:b,optional:p,anyNumberOfTimes:h};for(const T in Kn)typeof Kn[T]=="object"&&t(Kn[T]);return Object.assign(E,Kn),E},Zn=ku({});return Zn.newInstance=()=>ku({}),da=Zn,Zn.HighlightJS=Zn,Zn.default=Zn,da}var jw=Gw();const p0=of(jw);function m0(t,e=[]){return t.flatMap(n=>{const r=[...e,...n.properties?n.properties.className:[]];return n.children?m0(n.children,r):{text:n.value,classes:r}})}function _d(t){return t.value||t.children||[]}function Zw(t){return!!p0.getLanguage(t)}function wd({doc:t,name:e,lowlight:n,defaultLanguage:r}){const i=[];return qa(t,s=>s.type.name===e).forEach(s=>{var o;let a=s.pos+1;const l=s.node.attrs.language||r,u=n.listLanguages(),c=l&&(u.includes(l)||Zw(l)||(o=n.registered)!=null&&o.call(n,l))?_d(n.highlight(l,s.node.textContent)):_d(n.highlightAuto(s.node.textContent));m0(c).forEach(d=>{const f=a+d.text.length;if(d.classes.length){const h=Oe.inline(a,f,{class:d.classes.join(" ")});i.push(h)}a=f})}),ae.create(t,i)}function Yw(t){return typeof t=="function"}function Jw({name:t,lowlight:e,defaultLanguage:n}){if(!["highlight","highlightAuto","listLanguages"].every(i=>Yw(e[i])))throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");const r=new le({key:new Ee("lowlight"),state:{init:(i,{doc:s})=>wd({doc:s,name:t,lowlight:e,defaultLanguage:n}),apply:(i,s,o,a)=>{const l=o.selection.$head.parent.type.name,u=a.selection.$head.parent.type.name,c=qa(o.doc,f=>f.type.name===t),d=qa(a.doc,f=>f.type.name===t);return i.docChanged&&([l,u].includes(t)||d.length!==c.length||i.steps.some(f=>f.from!==void 0&&f.to!==void 0&&c.some(h=>h.pos>=f.from&&h.pos+h.node.nodeSize<=f.to)))?wd({doc:i.doc,name:t,lowlight:e,defaultLanguage:n}):s.map(i.mapping,i.doc)}},props:{decorations(i){return r.getState(i)}}});return r}var Xw=Cp.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),lowlight:{},languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:4,HTMLAttributes:{}}},addProseMirrorPlugins(){var t;return[...((t=this.parent)==null?void 0:t.call(this))||[],Jw({name:this.name,lowlight:this.options.lowlight,defaultLanguage:this.options.defaultLanguage})]}}),Qw=Xw;function eC(t){const e=t.regex,n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,t.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:e.optional(i)+t.IDENT_RE,relevance:0},h=e.optional(i)+t.IDENT_RE+"\\s*\\(",p=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],g=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],b=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:m,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:g},x={className:"function.dispatch",relevance:0,keywords:{_hint:b},begin:e.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,e.lookahead(/(<[^<>]+>|)\s*\(/))},w=[x,d,a,n,t.C_BLOCK_COMMENT_MODE,c,u],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:w.concat([{begin:/\(/,end:/\)/,keywords:_,contains:w.concat(["self"]),relevance:0}]),relevance:0},M={className:"function",begin:"("+o+"[\\*&\\s]+)+"+h,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:h,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,u,c,a,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,t.C_BLOCK_COMMENT_MODE,u,c,a]}]},a,n,t.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(C,M,x,w,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:_,contains:["self",a]},{begin:t.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function tC(t){const e={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=eC(t),r=n.keywords;return r.type=[...r.type,...e.type],r.literal=[...r.literal,...e.literal],r.built_in=[...r.built_in,...e.built_in],r._hints=e._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function nC(t){const e=t.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:e.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const i={className:"subst",begin:/\$\(/,end:/\)/,contains:[t.BACKSLASH_ESCAPE]},s=t.inherit(t.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),o={begin:/<<-?\s*(?=\w+)/,starts:{contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},a={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,n,i]};i.contains.push(a);const l={match:/\\"/},u={className:"string",begin:/'/,end:/'/},c={match:/\\'/},d={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},t.NUMBER_MODE,n]},f=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],h=t.SHEBANG({binary:`(${f.join("|")})`,relevance:10}),p={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[t.inherit(t.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},m=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],g=["true","false"],b={match:/(\/[a-z._-]+)+/},y=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],k=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],_=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],x=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:m,literal:g,built_in:[...y,...k,"set","shopt",..._,...x]},contains:[h,t.SHEBANG(),p,d,s,o,b,a,l,u,c,n]}}function rC(t){const e=t.regex,n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",a={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,t.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:e.optional(i)+t.IDENT_RE,relevance:0},h=e.optional(i)+t.IDENT_RE+"\\s*\\(",g={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},b=[d,a,n,t.C_BLOCK_COMMENT_MODE,c,u],y={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:g,contains:b.concat([{begin:/\(/,end:/\)/,keywords:g,contains:b.concat(["self"]),relevance:0}]),relevance:0},k={begin:"("+o+"[\\*&\\s]+)+"+h,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:g,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:g,relevance:0},{begin:h,returnBegin:!0,contains:[t.inherit(f,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,u,c,a,{begin:/\(/,end:/\)/,keywords:g,relevance:0,contains:["self",n,t.C_BLOCK_COMMENT_MODE,u,c,a]}]},a,n,t.C_BLOCK_COMMENT_MODE,d]};return{name:"C",aliases:["h"],keywords:g,disableAutodetect:!0,illegal:"</",contains:[].concat(y,k,b,[d,{begin:t.IDENT_RE+"::",keywords:g},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{preprocessor:d,strings:u,keywords:g}}}function iC(t){const e=t.regex,n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",i="[a-zA-Z_]\\w*::",o="(?!struct)("+r+"|"+e.optional(i)+"[a-zA-Z_]\\w*"+e.optional("<[^<>]+>")+")",a={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},u={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},t.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},d={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(u,{className:"string"}),{className:"string",begin:/<.*?>/},n,t.C_BLOCK_COMMENT_MODE]},f={className:"title",begin:e.optional(i)+t.IDENT_RE,relevance:0},h=e.optional(i)+t.IDENT_RE+"\\s*\\(",p=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],m=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],g=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],b=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],_={type:m,keyword:p,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:g},x={className:"function.dispatch",relevance:0,keywords:{_hint:b},begin:e.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,t.IDENT_RE,e.lookahead(/(<[^<>]+>|)\s*\(/))},w=[x,d,a,n,t.C_BLOCK_COMMENT_MODE,c,u],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:w.concat([{begin:/\(/,end:/\)/,keywords:_,contains:w.concat(["self"]),relevance:0}]),relevance:0},M={className:"function",begin:"("+o+"[\\*&\\s]+)+"+h,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:h,returnBegin:!0,contains:[f],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[u,c]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,u,c,a,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,t.C_BLOCK_COMMENT_MODE,u,c,a]}]},a,n,t.C_BLOCK_COMMENT_MODE,d]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(C,M,x,w,[d,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:_,contains:["self",a]},{begin:t.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function sC(t){const e=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],i=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],s=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],o={keyword:i.concat(s),built_in:e,literal:r},a=t.inherit(t.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),l={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},u={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},c={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},d=t.inherit(c,{illegal:/\n/}),f={className:"subst",begin:/\{/,end:/\}/,keywords:o},h=t.inherit(f,{illegal:/\n/}),p={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},t.BACKSLASH_ESCAPE,h]},m={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},f]},g=t.inherit(m,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},h]});f.contains=[m,p,c,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,l,t.C_BLOCK_COMMENT_MODE],h.contains=[g,p,d,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,l,t.inherit(t.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const b={variants:[u,m,p,c,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},y={begin:"<",end:">",contains:[{beginKeywords:"in out"},a]},k=t.IDENT_RE+"(<"+t.IDENT_RE+"(\\s*,\\s*"+t.IDENT_RE+")*>)?(\\[\\])?",_={begin:"@"+t.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:o,illegal:/::/,contains:[t.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},b,l,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},a,y,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[a,y,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+k+"\\s+)+"+t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:o,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:t.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[t.TITLE_MODE,y],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:o,relevance:0,contains:[b,l,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},_]}}const oC=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),aC=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],lC=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],uC=[...aC,...lC],cC=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),dC=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),fC=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),hC=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function pC(t){const e=t.regex,n=oC(t),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},i="and or not only",s=/@-?\w[\w]*(-\w+)*/,o="[a-zA-Z-][a-zA-Z0-9_-]*",a=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+o,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+dC.join("|")+")"},{begin:":(:)?("+fC.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+hC.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...a,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...a,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:e.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:s},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:i,attribute:cC.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...a,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+uC.join("|")+")\\b"}]}}function mC(t){const e=t.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:e.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:e.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function gC(t){const s={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:s,illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{className:"string",variants:[t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[t.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:s,illegal:/["']/}]}]}}function bC(t){const e=t.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[t.HASH_COMMENT_MODE,t.QUOTE_STRING_MODE,t.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:e.concat(n,e.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function yC(t){const e=t.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:t.NUMBER_RE}]},r=t.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},s={className:"literal",begin:/\bon|off|true|false|yes|no\b/},o={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},a={begin:/\[/,end:/\]/,contains:[r,s,i,o,n,"self"],relevance:0},l=/[A-Za-z0-9_-]+/,u=/"(\\"|[^"])*"/,c=/'[^']*'/,d=e.either(l,u,c),f=e.concat(d,"(\\s*\\.\\s*",d,")*",e.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:f,className:"attr",starts:{end:/$/,contains:[r,a,s,i,o,n]}}]}}var nr="[0-9](_*[0-9])*",zi=`\\.(${nr})`,$i="[0-9a-fA-F](_*[0-9a-fA-F])*",Cd={className:"number",variants:[{begin:`(\\b(${nr})((${zi})|\\.)?|(${zi}))[eE][+-]?(${nr})[fFdD]?\\b`},{begin:`\\b(${nr})((${zi})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${zi})[fFdD]?\\b`},{begin:`\\b(${nr})[fFdD]\\b`},{begin:`\\b0[xX]((${$i})\\.?|(${$i})?\\.(${$i}))[pP][+-]?(${nr})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${$i})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function g0(t,e,n){return n===-1?"":t.replace(e,r=>g0(t,e,n-1))}function EC(t){const e=t.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+g0("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),l={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},u={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},c={className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[t.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:l,illegal:/<\/|#/,contains:[t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[t.BACKSLASH_ESCAPE]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[e.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[c,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",t.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:l,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:l,relevance:0,contains:[u,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,Cd,t.C_BLOCK_COMMENT_MODE]},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},Cd,u]}}const Sd="[A-Za-z$_][0-9A-Za-z$_]*",kC=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],xC=["true","false","null","undefined","NaN","Infinity"],b0=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],y0=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],E0=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],_C=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],wC=[].concat(E0,b0,y0);function CC(t){const e=t.regex,n=(Q,{after:Fe})=>{const Je="</"+Q[0].slice(1);return Q.input.indexOf(Je,Fe)!==-1},r=Sd,i={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Q,Fe)=>{const Je=Q[0].length+Q.index,We=Q.input[Je];if(We==="<"||We===","){Fe.ignoreMatch();return}We===">"&&(n(Q,{after:Je})||Fe.ignoreMatch());let ze;const Pt=Q.input.substring(Je);if(ze=Pt.match(/^\s*=/)){Fe.ignoreMatch();return}if((ze=Pt.match(/^\s+extends\s+/))&&ze.index===0){Fe.ignoreMatch();return}}},a={$pattern:Sd,keyword:kC,literal:xC,built_in:wC,"variable.language":_C},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},h={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},g={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},k=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,p,m,g,{match:/\$\d+/},d];f.contains=k.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(k)});const _=[].concat(y,f.contains),x=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(_)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:x},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,e.concat(r,"(",e.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},M={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...b0,...y0]}},R={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},j={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},be={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ue(Q){return e.concat("(?!",Q.join("|"),")")}const re={match:e.concat(/\b/,ue([...E0,"super","import"].map(Q=>`${Q}\\s*\\(`)),r,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},G={begin:e.concat(/\./,e.lookahead(e.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},q={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},ye="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",Ye={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(ye)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:x,CLASS_REFERENCE:M},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),R,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,p,m,g,y,{match:/\$\d+/},d,M,{scope:"attr",match:r+e.lookahead(":"),relevance:0},Ye,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,t.REGEXP_MODE,{className:"function",begin:ye,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:x}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},j,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,t.inherit(t.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},G,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},re,be,C,q,{match:/\$[(.]/}]}}function SC(t){const e={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],i={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[e,n,t.QUOTE_STRING_MODE,i,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var rr="[0-9](_*[0-9])*",Hi=`\\.(${rr})`,Ui="[0-9a-fA-F](_*[0-9a-fA-F])*",vC={className:"number",variants:[{begin:`(\\b(${rr})((${Hi})|\\.)?|(${Hi}))[eE][+-]?(${rr})[fFdD]?\\b`},{begin:`\\b(${rr})((${Hi})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${Hi})[fFdD]?\\b`},{begin:`\\b(${rr})[fFdD]\\b`},{begin:`\\b0[xX]((${Ui})\\.?|(${Ui})?\\.(${Ui}))[pP][+-]?(${rr})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${Ui})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function AC(t){const e={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"@"},i={className:"subst",begin:/\$\{/,end:/\}/,contains:[t.C_NUMBER_MODE]},s={className:"variable",begin:"\\$"+t.UNDERSCORE_IDENT_RE},o={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[s,i]},{begin:"'",end:"'",illegal:/\n/,contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[t.BACKSLASH_ESCAPE,s,i]}]};i.contains.push(o);const a={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+t.UNDERSCORE_IDENT_RE+")?"},l={className:"meta",begin:"@"+t.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[t.inherit(o,{className:"string"}),"self"]}]},u=vC,c=t.COMMENT("/\\*","\\*/",{contains:[t.C_BLOCK_COMMENT_MODE]}),d={variants:[{className:"type",begin:t.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},f=d;return f.variants[1].contains=[d],d.variants[1].contains=[f],{name:"Kotlin",aliases:["kt","kts"],keywords:e,contains:[t.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),t.C_LINE_COMMENT_MODE,c,n,r,a,l,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:e,relevance:5,contains:[{begin:t.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[t.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:e,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[d,t.C_LINE_COMMENT_MODE,c],relevance:0},t.C_LINE_COMMENT_MODE,c,a,l,o,t.C_NUMBER_MODE]},c]},{begin:[/class|interface|trait/,/\s+/,t.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},t.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},a,l]},o,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
246
+ `},u]}}const TC=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),MC=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],NC=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],OC=[...MC,...NC],DC=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),k0=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),x0=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),RC=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),IC=k0.concat(x0).sort().reverse();function LC(t){const e=TC(t),n=IC,r="and or not only",i="[\\w-]+",s="("+i+"|@\\{"+i+"\\})",o=[],a=[],l=function(k){return{className:"string",begin:"~?"+k+".*?"+k}},u=function(k,_,x){return{className:k,begin:_,relevance:x}},c={$pattern:/[a-z-]+/,keyword:r,attribute:DC.join(" ")},d={begin:"\\(",end:"\\)",contains:a,keywords:c,relevance:0};a.push(t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,l("'"),l('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},e.HEXCOLOR,d,u("variable","@@?"+i,10),u("variable","@\\{"+i+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},e.IMPORTANT,{beginKeywords:"and not"},e.FUNCTION_DISPATCH);const f=a.concat({begin:/\{/,end:/\}/,contains:o}),h={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(a)},p={begin:s+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},e.CSS_VARIABLE,{className:"attribute",begin:"\\b("+RC.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:a}}]},m={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:a,relevance:0}},g={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:f}},b={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:s,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,h,u("keyword","all\\b"),u("variable","@\\{"+i+"\\}"),{begin:"\\b("+OC.join("|")+")\\b",className:"selector-tag"},e.CSS_NUMBER_MODE,u("selector-tag",s,0),u("selector-id","#"+s),u("selector-class","\\."+s,0),u("selector-tag","&",0),e.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+k0.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+x0.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:f},{begin:"!important"},e.FUNCTION_DISPATCH]},y={begin:i+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[b]};return o.push(t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,m,g,y,p,b,h,e.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function PC(t){const e="\\[=*\\[",n="\\]=*\\]",r={begin:e,end:n,contains:["self"]},i=[t.COMMENT("--(?!"+e+")","$"),t.COMMENT("--"+e,n,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:t.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[t.inherit(t.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},t.C_NUMBER_MODE,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,{className:"string",begin:e,end:n,contains:[r],relevance:5}])}}function BC(t){const e={className:"variable",variants:[{begin:"\\$\\("+t.UNDERSCORE_IDENT_RE+"\\)",contains:[t.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,e]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[e,n]},i={begin:"^"+t.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},s={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[e]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[t.HASH_COMMENT_MODE,e,n,r,i,s,o]}}function FC(t){const e=t.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},s={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},a=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.concat(/\[.+?\]\(/,a,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},c={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},d=t.inherit(u,{contains:[]}),f=t.inherit(c,{contains:[]});u.contains.push(f),c.contains.push(d);let h=[n,l];return[u,c,d,f].forEach(b=>{b.contains=b.contains.concat(h)}),h=h.concat(u,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:h},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:h}]}]},n,s,u,c,{className:"quote",begin:"^>\\s+",contains:h,end:"$"},i,r,l,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function zC(t){const e={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,a={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:a,illegal:"</",contains:[e,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,t.C_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[t.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[t.UNDERSCORE_TITLE_MODE]},{begin:"\\."+t.UNDERSCORE_IDENT_RE,relevance:0}]}}function $C(t){const e=t.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:n.join(" ")},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},a={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:e.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[a]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},c=[t.BACKSLASH_ESCAPE,s,l],d=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],f=(m,g,b="\\1")=>{const y=b==="\\1"?b:e.concat(b,g);return e.concat(e.concat("(?:",m,")"),g,/(?:\\.|[^\\\/])*?/,y,/(?:\\.|[^\\\/])*?/,b,r)},h=(m,g,b)=>e.concat(e.concat("(?:",m,")"),g,/(?:\\.|[^\\\/])*?/,b,r),p=[l,t.HASH_COMMENT_MODE,t.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:c,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[t.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+t.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[t.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:f("s|tr|y",e.either(...d,{capture:!0}))},{begin:f("s|tr|y","\\(","\\)")},{begin:f("s|tr|y","\\[","\\]")},{begin:f("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:h("(?:m|qr)?",/\//,/\//)},{begin:h("m|qr",e.either(...d,{capture:!0}),/\1/)},{begin:h("m|qr",/\(/,/\)/)},{begin:h("m|qr",/\[/,/\]/)},{begin:h("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,a]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[t.TITLE_MODE,a,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return s.contains=p,o.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:p}}function HC(t){const e=t.regex,n=/(?![A-Za-z0-9])(?![$])/,r=e.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),i=e.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),s=e.concat(/[A-Z]+/,n),o={scope:"variable",match:"\\$+"+r},a={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=t.inherit(t.APOS_STRING_MODE,{illegal:null}),c=t.inherit(t.QUOTE_STRING_MODE,{illegal:null,contains:t.QUOTE_STRING_MODE.contains.concat(l)}),d={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:t.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(G,q)=>{q.data._beginMatch=G[1]||G[2]},"on:end":(G,q)=>{q.data._beginMatch!==G[1]&&q.ignoreMatch()}},f=t.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),h=`[
247
+ ]`,p={scope:"string",variants:[c,u,d,f]},m={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},g=["false","null","true"],b=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],y=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],_={keyword:b,literal:(G=>{const q=[];return G.forEach(ye=>{q.push(ye),ye.toLowerCase()===ye?q.push(ye.toUpperCase()):q.push(ye.toLowerCase())}),q})(g),built_in:y},x=G=>G.map(q=>q.replace(/\|\d+$/,"")),w={variants:[{match:[/new/,e.concat(h,"+"),e.concat("(?!",x(y).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},C=e.concat(r,"\\b(?!\\()"),M={variants:[{match:[e.concat(/::/,e.lookahead(/(?!class\b)/)),C],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,e.concat(/::/,e.lookahead(/(?!class\b)/)),C],scope:{1:"title.class",3:"variable.constant"}},{match:[i,e.concat("::",e.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},R={scope:"attr",match:e.concat(r,e.lookahead(":"),e.lookahead(/(?!::)/))},j={relevance:0,begin:/\(/,end:/\)/,keywords:_,contains:[R,o,M,t.C_BLOCK_COMMENT_MODE,p,m,w]},be={relevance:0,match:[/\b/,e.concat("(?!fn\\b|function\\b|",x(b).join("\\b|"),"|",x(y).join("\\b|"),"\\b)"),r,e.concat(h,"*"),e.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[j]};j.contains.push(be);const ue=[R,M,t.C_BLOCK_COMMENT_MODE,p,m,w],re={begin:e.concat(/#\[\s*\\?/,e.either(i,s)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:g,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:g,keyword:["new","array"]},contains:["self",...ue]},...ue,{scope:"meta",variants:[{match:i},{match:s}]}]};return{case_insensitive:!1,keywords:_,contains:[re,t.HASH_COMMENT_MODE,t.COMMENT("//","$"),t.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:t.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},a,{scope:"variable.language",match:/\$this\b/},o,be,M,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},w,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},t.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:_,contains:["self",re,o,M,t.C_BLOCK_COMMENT_MODE,p,m]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},t.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[t.inherit(t.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},t.UNDERSCORE_TITLE_MODE]},p,m]}}function UC(t){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},t.inherit(t.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),t.inherit(t.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function qC(t){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function WC(t){const e=t.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],a={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:a,illegal:/#/},c={begin:/\{\{/,relevance:0},d={className:"string",contains:[t.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[t.BACKSLASH_ESCAPE,l,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[t.BACKSLASH_ESCAPE,l,c,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[t.BACKSLASH_ESCAPE,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[t.BACKSLASH_ESCAPE,c,u]},t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},f="[0-9](_?[0-9])*",h=`(\\b(${f}))?\\.(${f})|\\b(${f})\\.`,p=`\\b|${r.join("|")}`,m={className:"number",relevance:0,variants:[{begin:`(\\b(${f})|(${h}))[eE][+-]?(${f})[jJ]?(?=${p})`},{begin:`(${h})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${p})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${p})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`},{begin:`\\b(${f})[jJ](?=${p})`}]},g={className:"comment",begin:e.lookahead(/# type:/),end:/$/,keywords:a,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},b={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:["self",l,m,d,t.HASH_COMMENT_MODE]}]};return u.contains=[d,m,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:a,illegal:/(<\/|\?)|=>/,contains:[l,m,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},d,g,t.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[b]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[m,b,d]}]}}function VC(t){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function KC(t){const e=t.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=e.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,s=e.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[t.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:e.lookahead(e.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),t.HASH_COMMENT_MODE,{scope:"string",contains:[t.BACKSLASH_ESCAPE],variants:[t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),t.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[s,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:s},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function GC(t){const e=t.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=e.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=e.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},a={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},u=[t.COMMENT("#","$",{contains:[a]}),t.COMMENT("^=begin","^=end",{contains:[a],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:o},d={className:"string",contains:[t.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:e.concat(/<<[-~]?'?/,e.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,c]})]}]},f="[1-9](_?[0-9])*|0",h="[0-9](_?[0-9])*",p={className:"number",relevance:0,variants:[{begin:`\\b(${f})(\\.(${h}))?([eE][+-]?(${h})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},m={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},w=[d,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:o},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[m]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[d,{begin:n}],relevance:0},p,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,u),relevance:0}].concat(l,u);c.contains=w,m.contains=w;const j=[{begin:/^\s*=>/,starts:{end:"$",contains:w}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:w}}];return u.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(j).concat(u).concat(w)}}function jC(t){const e=t.regex,n=/(r#)?/,r=e.concat(n,t.UNDERSCORE_IDENT_RE),i=e.concat(n,t.IDENT_RE),s={className:"title.function.invoke",relevance:0,begin:e.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,e.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(32|64))?",a=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],c=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:t.IDENT_RE+"!?",type:c,keyword:a,literal:l,built_in:u},illegal:"</",contains:[t.C_LINE_COMMENT_MODE,t.COMMENT("/\\*","\\*/",{contains:["self"]}),t.inherit(t.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+o},{begin:"\\b0o([0-7_]+)"+o},{begin:"\\b0x([A-Fa-f0-9_]+)"+o},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+o}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[t.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:t.IDENT_RE+"::",keywords:{keyword:"Self",built_in:u,type:c}},{className:"punctuation",begin:"->"},s]}}const ZC=t=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:t.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:t.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),YC=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],JC=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],XC=[...YC,...JC],QC=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),eS=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),tS=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),nS=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function rS(t){const e=ZC(t),n=tS,r=eS,i="@[a-z-]+",s="and or not only",a={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE,e.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},e.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+XC.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},a,{begin:/\(/,end:/\)/,contains:[e.CSS_NUMBER_MODE]},e.CSS_VARIABLE,{className:"attribute",begin:"\\b("+nS.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[e.BLOCK_COMMENT,a,e.HEXCOLOR,e.CSS_NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,e.IMPORTANT,e.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:QC.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},a,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,e.HEXCOLOR,e.CSS_NUMBER_MODE]},e.FUNCTION_DISPATCH]}}function iS(t){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function sS(t){const e=t.regex,n=t.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},s=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],c=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],d=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],f=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],h=c,p=[...u,...l].filter(x=>!c.includes(x)),m={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},g={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},b={match:e.concat(/\b/,e.either(...h),/\s*\(/),relevance:0,keywords:{built_in:h}};function y(x){return e.concat(/\b/,e.either(...x.map(w=>w.replace(/\s+/,"\\s+"))),/\b/)}const k={scope:"keyword",match:y(f),relevance:0};function _(x,{exceptions:w,when:C}={}){const M=C;return w=w||[],x.map(R=>R.match(/\|\d+$/)||w.includes(R)?R:M(R)?`${R}|0`:R)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:_(p,{when:x=>x.length<3}),literal:s,type:a,built_in:d},contains:[{scope:"type",match:y(o)},k,b,m,r,i,t.C_NUMBER_MODE,t.C_BLOCK_COMMENT_MODE,n,g]}}function _0(t){return t?typeof t=="string"?t:t.source:null}function Sr(t){return oe("(?=",t,")")}function oe(...t){return t.map(n=>_0(n)).join("")}function oS(t){const e=t[t.length-1];return typeof e=="object"&&e.constructor===Object?(t.splice(t.length-1,1),e):{}}function Xe(...t){return"("+(oS(t).capture?"":"?:")+t.map(r=>_0(r)).join("|")+")"}const nu=t=>oe(/\b/,t,/\w$/.test(t)?/\b/:/\B/),aS=["Protocol","Type"].map(nu),vd=["init","self"].map(nu),lS=["Any","Self"],fa=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],Ad=["false","nil","true"],uS=["assignment","associativity","higherThan","left","lowerThan","none","right"],cS=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],Td=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],w0=Xe(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),C0=Xe(w0,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),ha=oe(w0,C0,"*"),S0=Xe(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Ws=Xe(S0,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Ct=oe(S0,Ws,"*"),qi=oe(/[A-Z]/,Ws,"*"),dS=["attached","autoclosure",oe(/convention\(/,Xe("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",oe(/objc\(/,Ct,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],fS=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function hS(t){const e={match:/\s+/,relevance:0},n=t.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[t.C_LINE_COMMENT_MODE,n],i={match:[/\./,Xe(...aS,...vd)],className:{2:"keyword"}},s={match:oe(/\./,Xe(...fa)),relevance:0},o=fa.filter(se=>typeof se=="string").concat(["_|0"]),a=fa.filter(se=>typeof se!="string").concat(lS).map(nu),l={variants:[{className:"keyword",match:Xe(...a,...vd)}]},u={$pattern:Xe(/\b\w+/,/#\w+/),keyword:o.concat(cS),literal:Ad},c=[i,s,l],d={match:oe(/\./,Xe(...Td)),relevance:0},f={className:"built_in",match:oe(/\b/,Xe(...Td),/(?=\()/)},h=[d,f],p={match:/->/,relevance:0},m={className:"operator",relevance:0,variants:[{match:ha},{match:`\\.(\\.|${C0})+`}]},g=[p,m],b="([0-9]_*)+",y="([0-9a-fA-F]_*)+",k={className:"number",relevance:0,variants:[{match:`\\b(${b})(\\.(${b}))?([eE][+-]?(${b}))?\\b`},{match:`\\b0x(${y})(\\.(${y}))?([pP][+-]?(${b}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},_=(se="")=>({className:"subst",variants:[{match:oe(/\\/,se,/[0\\tnr"']/)},{match:oe(/\\/,se,/u\{[0-9a-fA-F]{1,8}\}/)}]}),x=(se="")=>({className:"subst",match:oe(/\\/,se,/[\t ]*(?:[\r\n]|\r\n)/)}),w=(se="")=>({className:"subst",label:"interpol",begin:oe(/\\/,se,/\(/),end:/\)/}),C=(se="")=>({begin:oe(se,/"""/),end:oe(/"""/,se),contains:[_(se),x(se),w(se)]}),M=(se="")=>({begin:oe(se,/"/),end:oe(/"/,se),contains:[_(se),w(se)]}),R={className:"string",variants:[C(),C("#"),C("##"),C("###"),M(),M("#"),M("##"),M("###")]},j=[t.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[t.BACKSLASH_ESCAPE]}],be={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:j},ue=se=>{const Gn=oe(se,/\//),_n=oe(/\//,se);return{begin:Gn,end:_n,contains:[...j,{scope:"comment",begin:`#(?!.*${_n})`,end:/$/}]}},re={scope:"regexp",variants:[ue("###"),ue("##"),ue("#"),be]},G={match:oe(/`/,Ct,/`/)},q={className:"variable",match:/\$\d+/},ye={className:"variable",match:`\\$${Ws}+`},Ye=[G,q,ye],Q={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:fS,contains:[...g,k,R]}]}},Fe={scope:"keyword",match:oe(/@/,Xe(...dS),Sr(Xe(/\(/,/\s+/)))},Je={scope:"meta",match:oe(/@/,Ct)},We=[Q,Fe,Je],ze={match:Sr(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:oe(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Ws,"+")},{className:"type",match:qi,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:oe(/\s+&\s+/,Sr(qi)),relevance:0}]},Pt={begin:/</,end:/>/,keywords:u,contains:[...r,...c,...We,p,ze]};ze.contains.push(Pt);const Eo={match:oe(Ct,/\s*:/),keywords:"_|0",relevance:0},pi={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",Eo,...r,re,...c,...h,...g,k,R,...Ye,...We,ze]},Er={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,ze]},ko={begin:Xe(Sr(oe(Ct,/\s*:/)),Sr(oe(Ct,/\s+/,Ct,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Ct}]},mi={begin:/\(/,end:/\)/,keywords:u,contains:[ko,...r,...c,...g,k,R,...We,ze,pi],endsParent:!0,illegal:/["']/},fu={match:[/(func|macro)/,/\s+/,Xe(G.match,Ct,ha)],className:{1:"keyword",3:"title.function"},contains:[Er,mi,e],illegal:[/\[/,/%/]},Kn={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Er,mi,e],illegal:/\[|%/},xo={match:[/operator/,/\s+/,ha],className:{1:"keyword",3:"title"}},_o={begin:[/precedencegroup/,/\s+/,qi],className:{1:"keyword",3:"title"},contains:[ze],keywords:[...uS,...Ad],end:/}/},wo={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Co={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},So={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Ct,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[Er,...c,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:qi},...c],relevance:0}]};for(const se of R.variants){const Gn=se.contains.find(vo=>vo.label==="interpol");Gn.keywords=u;const _n=[...c,...h,...g,k,R,...Ye];Gn.contains=[..._n,{begin:/\(/,end:/\)/,contains:["self",..._n]}]}return{name:"Swift",keywords:u,contains:[...r,fu,Kn,wo,Co,So,xo,_o,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},re,...c,...h,...g,k,R,...Ye,...We,ze,pi]}}const Vs="[A-Za-z$_][0-9A-Za-z$_]*",v0=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],A0=["true","false","null","undefined","NaN","Infinity"],T0=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],M0=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],N0=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],O0=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],D0=[].concat(N0,T0,M0);function pS(t){const e=t.regex,n=(Q,{after:Fe})=>{const Je="</"+Q[0].slice(1);return Q.input.indexOf(Je,Fe)!==-1},r=Vs,i={begin:"<>",end:"</>"},s=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(Q,Fe)=>{const Je=Q[0].length+Q.index,We=Q.input[Je];if(We==="<"||We===","){Fe.ignoreMatch();return}We===">"&&(n(Q,{after:Je})||Fe.ignoreMatch());let ze;const Pt=Q.input.substring(Je);if(ze=Pt.match(/^\s*=/)){Fe.ignoreMatch();return}if((ze=Pt.match(/^\s+extends\s+/))&&ze.index===0){Fe.ignoreMatch();return}}},a={$pattern:Vs,keyword:v0,literal:A0,built_in:D0,"variable.language":O0},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{",end:"\\}",keywords:a,contains:[]},h={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,f],subLanguage:"css"}},m={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,f],subLanguage:"graphql"}},g={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,f]},y={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},k=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,p,m,g,{match:/\$\d+/},d];f.contains=k.concat({begin:/\{/,end:/\}/,keywords:a,contains:["self"].concat(k)});const _=[].concat(y,f.contains),x=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:a,contains:["self"].concat(_)}]),w={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:x},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,e.concat(r,"(",e.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},M={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...T0,...M0]}},R={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},j={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[w],illegal:/%/},be={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ue(Q){return e.concat("(?!",Q.join("|"),")")}const re={match:e.concat(/\b/,ue([...N0,"super","import"].map(Q=>`${Q}\\s*\\(`)),r,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},G={begin:e.concat(/\./,e.lookahead(e.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},q={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},w]},ye="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",Ye={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(ye)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[w]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:a,exports:{PARAMS_CONTAINS:x,CLASS_REFERENCE:M},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),R,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,h,p,m,g,y,{match:/\$\d+/},d,M,{scope:"attr",match:r+e.lookahead(":"),relevance:0},Ye,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[y,t.REGEXP_MODE,{className:"function",begin:ye,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:a,contains:x}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:s},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},j,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[w,t.inherit(t.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},G,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[w]},re,be,C,q,{match:/\$[(.]/}]}}function mS(t){const e=t.regex,n=pS(t),r=Vs,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],s={begin:[/namespace/,/\s+/,t.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[n.exports.CLASS_REFERENCE]},a={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:Vs,keyword:v0.concat(l),literal:A0,built_in:D0.concat(i),"variable.language":O0},c={className:"meta",begin:"@"+r},d=(m,g,b)=>{const y=m.contains.findIndex(k=>k.label===g);if(y===-1)throw new Error("can not find mode to replace");m.contains.splice(y,1,b)};Object.assign(n.keywords,u),n.exports.PARAMS_CONTAINS.push(c);const f=n.contains.find(m=>m.scope==="attr"),h=Object.assign({},f,{match:e.concat(r,e.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,f,h]),n.contains=n.contains.concat([c,s,o,h]),d(n,"shebang",t.SHEBANG()),d(n,"use_strict",a);const p=n.contains.find(m=>m.label==="func.def");return p.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function gS(t){const e=t.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,s=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,a=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:e.concat(/# */,e.either(s,i),/ *#/)},{begin:e.concat(/# */,a,/ *#/)},{begin:e.concat(/# */,o,/ *#/)},{begin:e.concat(/# */,e.either(s,i),/ +/,e.either(o,a),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},c={className:"label",begin:/^\w+:/},d=t.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),f=t.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,r,l,u,c,d,f,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[f]}]}}function bS(t){t.regex;const e=t.COMMENT(/\(;/,/;\)/);e.contains.push("self");const n=t.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},s={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},a={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[n,e,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},s,o,i,t.QUOTE_STRING_MODE,l,u,a]}}function yS(t){const e=t.regex,n=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},s={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=t.inherit(s,{begin:/\(/,end:/\)/}),a=t.inherit(t.APOS_STRING_MODE,{className:"string"}),l=t.inherit(t.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[s,l,a,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[s,o,l,a]}]}]},t.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(/</,e.lookahead(e.concat(n,e.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:u}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function ES(t){const e="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},s={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[t.BACKSLASH_ESCAPE,i]},a=t.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),f={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},h={end:",",endsWithParent:!0,excludeEnd:!0,keywords:e,relevance:0},p={begin:/\{/,end:/\}/,contains:[h],illegal:"\\n",relevance:0},m={begin:"\\[",end:"\\]",contains:[h],illegal:"\\n",relevance:0},g=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+t.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+t.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},t.HASH_COMMENT_MODE,{beginKeywords:e,keywords:{literal:e}},f,{className:"number",begin:t.C_NUMBER_RE+"\\b",relevance:0},p,m,s,o],b=[...g];return b.pop(),b.push(a),h.contains=b,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:g}}const kS={arduino:tC,bash:nC,c:rC,cpp:iC,csharp:sC,css:pC,diff:mC,go:gC,graphql:bC,ini:yC,java:EC,javascript:CC,json:SC,kotlin:AC,less:LC,lua:PC,makefile:BC,markdown:FC,objectivec:zC,perl:$C,php:HC,"php-template":UC,plaintext:qC,python:WC,"python-repl":VC,r:KC,ruby:GC,rust:jC,scss:rS,shell:iS,sql:sS,swift:hS,typescript:mS,vbnet:gS,wasm:bS,xml:yS,yaml:ES},Md={},xS="hljs-";function _S(t){const e=p0.newInstance();return t&&s(t),{highlight:n,highlightAuto:r,listLanguages:i,register:s,registerAlias:o,registered:a};function n(l,u,c){const d=c||Md,f=typeof d.prefix=="string"?d.prefix:xS;if(!e.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");e.configure({__emitter:wS,classPrefix:f});const h=e.highlight(u,{ignoreIllegals:!0,language:l});if(h.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:h.errorRaised});const p=h._emitter.root,m=p.data;return m.language=h.language,m.relevance=h.relevance,p}function r(l,u){const d=(u||Md).subset||i();let f=-1,h=0,p;for(;++f<d.length;){const m=d[f];if(!e.getLanguage(m))continue;const g=n(m,l,u);g.data&&g.data.relevance!==void 0&&g.data.relevance>h&&(h=g.data.relevance,p=g)}return p||{type:"root",children:[],data:{language:void 0,relevance:h}}}function i(){return e.listLanguages()}function s(l,u){if(typeof l=="string")e.registerLanguage(l,u);else{let c;for(c in l)Object.hasOwn(l,c)&&e.registerLanguage(c,l[c])}}function o(l,u){if(typeof l=="string")e.registerAliases(typeof u=="string"?u:[...u],{languageName:l});else{let c;for(c in l)if(Object.hasOwn(l,c)){const d=l[c];e.registerAliases(typeof d=="string"?d:[...d],{languageName:c})}}}function a(l){return!!e.getLanguage(l)}}class wS{constructor(e){this.options=e,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(e==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=e:n.children.push({type:"text",value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,n){const r=this.stack[this.stack.length-1],i=e.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:i}):r.children.push(...i)}openNode(e){const n=this,r=e.split(".").map(function(o,a){return a?o+"_".repeat(a):n.options.classPrefix+o}),i=this.stack[this.stack.length-1],s={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(s),this.stack.push(s)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const Nd={};function CS(t){let e=Nd[t];if(e)return e;e=Nd[t]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);e.push(r)}for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);e[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return e}function mr(t,e){typeof e!="string"&&(e=mr.defaultChars);const n=CS(e);return t.replace(/(%[a-f0-9]{2})+/gi,function(r){let i="";for(let s=0,o=r.length;s<o;s+=3){const a=parseInt(r.slice(s+1,s+3),16);if(a<128){i+=n[a];continue}if((a&224)===192&&s+3<o){const l=parseInt(r.slice(s+4,s+6),16);if((l&192)===128){const u=a<<6&1984|l&63;u<128?i+="��":i+=String.fromCharCode(u),s+=3;continue}}if((a&240)===224&&s+6<o){const l=parseInt(r.slice(s+4,s+6),16),u=parseInt(r.slice(s+7,s+9),16);if((l&192)===128&&(u&192)===128){const c=a<<12&61440|l<<6&4032|u&63;c<2048||c>=55296&&c<=57343?i+="���":i+=String.fromCharCode(c),s+=6;continue}}if((a&248)===240&&s+9<o){const l=parseInt(r.slice(s+4,s+6),16),u=parseInt(r.slice(s+7,s+9),16),c=parseInt(r.slice(s+10,s+12),16);if((l&192)===128&&(u&192)===128&&(c&192)===128){let d=a<<18&1835008|l<<12&258048|u<<6&4032|c&63;d<65536||d>1114111?i+="����":(d-=65536,i+=String.fromCharCode(55296+(d>>10),56320+(d&1023))),s+=9;continue}}i+="�"}return i})}mr.defaultChars=";/?:@&=+$,#";mr.componentChars="";const Od={};function SS(t){let e=Od[t];if(e)return e;e=Od[t]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?e.push(r):e.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<t.length;n++)e[t.charCodeAt(n)]=t[n];return e}function di(t,e,n){typeof e!="string"&&(n=e,e=di.defaultChars),typeof n>"u"&&(n=!0);const r=SS(e);let i="";for(let s=0,o=t.length;s<o;s++){const a=t.charCodeAt(s);if(n&&a===37&&s+2<o&&/^[0-9a-f]{2}$/i.test(t.slice(s+1,s+3))){i+=t.slice(s,s+3),s+=2;continue}if(a<128){i+=r[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&s+1<o){const l=t.charCodeAt(s+1);if(l>=56320&&l<=57343){i+=encodeURIComponent(t[s]+t[s+1]),s++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(t[s])}return i}di.defaultChars=";/?:@&=+$,-_.!~*'()#";di.componentChars="-_.!~*'()";function ru(t){let e="";return e+=t.protocol||"",e+=t.slashes?"//":"",e+=t.auth?t.auth+"@":"",t.hostname&&t.hostname.indexOf(":")!==-1?e+="["+t.hostname+"]":e+=t.hostname||"",e+=t.port?":"+t.port:"",e+=t.pathname||"",e+=t.search||"",e+=t.hash||"",e}function Ks(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const vS=/^([a-z0-9.+-]+:)/i,AS=/:[0-9]*$/,TS=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,MS=["<",">",'"',"`"," ","\r",`
248
+ `," "],NS=["{","}","|","\\","^","`"].concat(MS),OS=["'"].concat(NS),Dd=["%","/","?",";","#"].concat(OS),Rd=["/","?","#"],DS=255,Id=/^[+a-z0-9A-Z_-]{0,63}$/,RS=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ld={javascript:!0,"javascript:":!0},Pd={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function iu(t,e){if(t&&t instanceof Ks)return t;const n=new Ks;return n.parse(t,e),n}Ks.prototype.parse=function(t,e){let n,r,i,s=t;if(s=s.trim(),!e&&t.split("#").length===1){const u=TS.exec(s);if(u)return this.pathname=u[1],u[2]&&(this.search=u[2]),this}let o=vS.exec(s);if(o&&(o=o[0],n=o.toLowerCase(),this.protocol=o,s=s.substr(o.length)),(e||o||s.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=s.substr(0,2)==="//",i&&!(o&&Ld[o])&&(s=s.substr(2),this.slashes=!0)),!Ld[o]&&(i||o&&!Pd[o])){let u=-1;for(let p=0;p<Rd.length;p++)r=s.indexOf(Rd[p]),r!==-1&&(u===-1||r<u)&&(u=r);let c,d;u===-1?d=s.lastIndexOf("@"):d=s.lastIndexOf("@",u),d!==-1&&(c=s.slice(0,d),s=s.slice(d+1),this.auth=c),u=-1;for(let p=0;p<Dd.length;p++)r=s.indexOf(Dd[p]),r!==-1&&(u===-1||r<u)&&(u=r);u===-1&&(u=s.length),s[u-1]===":"&&u--;const f=s.slice(0,u);s=s.slice(u),this.parseHost(f),this.hostname=this.hostname||"";const h=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!h){const p=this.hostname.split(/\./);for(let m=0,g=p.length;m<g;m++){const b=p[m];if(b&&!b.match(Id)){let y="";for(let k=0,_=b.length;k<_;k++)b.charCodeAt(k)>127?y+="x":y+=b[k];if(!y.match(Id)){const k=p.slice(0,m),_=p.slice(m+1),x=b.match(RS);x&&(k.push(x[1]),_.unshift(x[2])),_.length&&(s=_.join(".")+s),this.hostname=k.join(".");break}}}}this.hostname.length>DS&&(this.hostname=""),h&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=s.indexOf("#");a!==-1&&(this.hash=s.substr(a),s=s.slice(0,a));const l=s.indexOf("?");return l!==-1&&(this.search=s.substr(l),s=s.slice(0,l)),s&&(this.pathname=s),Pd[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};Ks.prototype.parseHost=function(t){let e=AS.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};const IS=Object.freeze(Object.defineProperty({__proto__:null,decode:mr,encode:di,format:ru,parse:iu},Symbol.toStringTag,{value:"Module"})),R0=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,I0=/[\0-\x1F\x7F-\x9F]/,LS=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,su=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,L0=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,P0=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,PS=Object.freeze(Object.defineProperty({__proto__:null,Any:R0,Cc:I0,Cf:LS,P:su,S:L0,Z:P0},Symbol.toStringTag,{value:"Module"})),BS=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))),FS=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var pa;const zS=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]]),$S=(pa=String.fromCodePoint)!==null&&pa!==void 0?pa:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function HS(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=zS.get(t))!==null&&e!==void 0?e:t}var Ie;(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"})(Ie||(Ie={}));const US=32;var dn;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(dn||(dn={}));function cl(t){return t>=Ie.ZERO&&t<=Ie.NINE}function qS(t){return t>=Ie.UPPER_A&&t<=Ie.UPPER_F||t>=Ie.LOWER_A&&t<=Ie.LOWER_F}function WS(t){return t>=Ie.UPPER_A&&t<=Ie.UPPER_Z||t>=Ie.LOWER_A&&t<=Ie.LOWER_Z||cl(t)}function VS(t){return t===Ie.EQUALS||WS(t)}var Re;(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"})(Re||(Re={}));var an;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(an||(an={}));class KS{constructor(e,n,r){this.decodeTree=e,this.emitCodePoint=n,this.errors=r,this.state=Re.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=an.Strict}startEntity(e){this.decodeMode=e,this.state=Re.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case Re.EntityStart:return e.charCodeAt(n)===Ie.NUM?(this.state=Re.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=Re.NamedEntity,this.stateNamedEntity(e,n));case Re.NumericStart:return this.stateNumericStart(e,n);case Re.NumericDecimal:return this.stateNumericDecimal(e,n);case Re.NumericHex:return this.stateNumericHex(e,n);case Re.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|US)===Ie.LOWER_X?(this.state=Re.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=Re.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+parseInt(e.substr(n,s),i),this.consumed+=s}}stateNumericHex(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(cl(i)||qS(i))n+=1;else return this.addToNumericResult(e,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(e,r,n,16),-1}stateNumericDecimal(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(cl(i))n+=1;else return this.addToNumericResult(e,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(e,r,n,10),-1}emitNumericEntity(e,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===Ie.SEMI)this.consumed+=1;else if(this.decodeMode===an.Strict)return 0;return this.emitCodePoint(HS(this.result),this.consumed),this.errors&&(e!==Ie.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&dn.VALUE_LENGTH)>>14;for(;n<e.length;n++,this.excess++){const o=e.charCodeAt(n);if(this.treeIndex=GS(r,i,this.treeIndex+Math.max(1,s),o),this.treeIndex<0)return this.result===0||this.decodeMode===an.Attribute&&(s===0||VS(o))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&dn.VALUE_LENGTH)>>14,s!==0){if(o===Ie.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==an.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:r}=this,i=(r[n]&dn.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[e]&~dn.VALUE_LENGTH:i[e+1],r),n===3&&this.emitCodePoint(i[e+2],r),r}end(){var e;switch(this.state){case Re.NamedEntity:return this.result!==0&&(this.decodeMode!==an.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Re.NumericDecimal:return this.emitNumericEntity(0,2);case Re.NumericHex:return this.emitNumericEntity(0,3);case Re.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Re.EntityStart:return 0}}}function B0(t){let e="";const n=new KS(t,r=>e+=$S(r));return function(i,s){let o=0,a=0;for(;(a=i.indexOf("&",a))>=0;){e+=i.slice(o,a),n.startEntity(s);const u=n.write(i,a+1);if(u<0){o=a+n.end();break}o=a+u,a=u===0?o+1:o}const l=e+i.slice(o);return e="",l}}function GS(t,e,n,r){const i=(e&dn.BRANCH_LENGTH)>>7,s=e&dn.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const l=r-s;return l<0||l>=i?-1:t[n+l]-1}let o=n,a=o+i-1;for(;o<=a;){const l=o+a>>>1,u=t[l];if(u<r)o=l+1;else if(u>r)a=l-1;else return t[l+i]}return-1}const jS=B0(BS);B0(FS);function F0(t,e=an.Legacy){return jS(t,e)}function ZS(t){return Object.prototype.toString.call(t)}function ou(t){return ZS(t)==="[object String]"}const YS=Object.prototype.hasOwnProperty;function JS(t,e){return YS.call(t,e)}function po(t){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){t[r]=n[r]})}}),t}function z0(t,e,n){return[].concat(t.slice(0,e),n,t.slice(e+1))}function au(t){return!(t>=55296&&t<=57343||t>=64976&&t<=65007||(t&65535)===65535||(t&65535)===65534||t>=0&&t<=8||t===11||t>=14&&t<=31||t>=127&&t<=159||t>1114111)}function Gs(t){if(t>65535){t-=65536;const e=55296+(t>>10),n=56320+(t&1023);return String.fromCharCode(e,n)}return String.fromCharCode(t)}const $0=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,XS=/&([a-z#][a-z0-9]{1,31});/gi,QS=new RegExp($0.source+"|"+XS.source,"gi"),ev=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function tv(t,e){if(e.charCodeAt(0)===35&&ev.test(e)){const r=e[1].toLowerCase()==="x"?parseInt(e.slice(2),16):parseInt(e.slice(1),10);return au(r)?Gs(r):t}const n=F0(t);return n!==t?n:t}function nv(t){return t.indexOf("\\")<0?t:t.replace($0,"$1")}function gr(t){return t.indexOf("\\")<0&&t.indexOf("&")<0?t:t.replace(QS,function(e,n,r){return n||tv(e,r)})}const rv=/[&<>"]/,iv=/[&<>"]/g,sv={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function ov(t){return sv[t]}function yn(t){return rv.test(t)?t.replace(iv,ov):t}const av=/[.?*+^$[\]\\(){}|-]/g;function lv(t){return t.replace(av,"\\$&")}function fe(t){switch(t){case 9:case 32:return!0}return!1}function ni(t){if(t>=8192&&t<=8202)return!0;switch(t){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function ri(t){return su.test(t)||L0.test(t)}function ii(t){switch(t){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function mo(t){return t=t.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(t=t.replace(/ẞ/g,"ß")),t.toLowerCase().toUpperCase()}const uv={mdurl:IS,ucmicro:PS},cv=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:z0,assign:po,escapeHtml:yn,escapeRE:lv,fromCodePoint:Gs,has:JS,isMdAsciiPunct:ii,isPunctChar:ri,isSpace:fe,isString:ou,isValidEntityCode:au,isWhiteSpace:ni,lib:uv,normalizeReference:mo,unescapeAll:gr,unescapeMd:nv},Symbol.toStringTag,{value:"Module"}));function dv(t,e,n){let r,i,s,o;const a=t.posMax,l=t.pos;for(t.pos=e+1,r=1;t.pos<a;){if(s=t.src.charCodeAt(t.pos),s===93&&(r--,r===0)){i=!0;break}if(o=t.pos,t.md.inline.skipToken(t),s===91){if(o===t.pos-1)r++;else if(n)return t.pos=l,-1}}let u=-1;return i&&(u=t.pos),t.pos=l,u}function fv(t,e,n){let r,i=e;const s={ok:!1,pos:0,str:""};if(t.charCodeAt(i)===60){for(i++;i<n;){if(r=t.charCodeAt(i),r===10||r===60)return s;if(r===62)return s.pos=i+1,s.str=gr(t.slice(e+1,i)),s.ok=!0,s;if(r===92&&i+1<n){i+=2;continue}i++}return s}let o=0;for(;i<n&&(r=t.charCodeAt(i),!(r===32||r<32||r===127));){if(r===92&&i+1<n){if(t.charCodeAt(i+1)===32)break;i+=2;continue}if(r===40&&(o++,o>32))return s;if(r===41){if(o===0)break;o--}i++}return e===i||o!==0||(s.str=gr(t.slice(e,i)),s.pos=i,s.ok=!0),s}function hv(t,e,n,r){let i,s=e;const o={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)o.str=r.str,o.marker=r.marker;else{if(s>=n)return o;let a=t.charCodeAt(s);if(a!==34&&a!==39&&a!==40)return o;e++,s++,a===40&&(a=41),o.marker=a}for(;s<n;){if(i=t.charCodeAt(s),i===o.marker)return o.pos=s+1,o.str+=gr(t.slice(e,s)),o.ok=!0,o;if(i===40&&o.marker===41)return o;i===92&&s+1<n&&s++,s++}return o.can_continue=!0,o.str+=gr(t.slice(e,s)),o}const pv=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:fv,parseLinkLabel:dv,parseLinkTitle:hv},Symbol.toStringTag,{value:"Module"})),Rt={};Rt.code_inline=function(t,e,n,r,i){const s=t[e];return"<code"+i.renderAttrs(s)+">"+yn(s.content)+"</code>"};Rt.code_block=function(t,e,n,r,i){const s=t[e];return"<pre"+i.renderAttrs(s)+"><code>"+yn(t[e].content)+`</code></pre>
249
+ `};Rt.fence=function(t,e,n,r,i){const s=t[e],o=s.info?gr(s.info).trim():"";let a="",l="";if(o){const c=o.split(/(\s+)/g);a=c[0],l=c.slice(2).join("")}let u;if(n.highlight?u=n.highlight(s.content,a,l)||yn(s.content):u=yn(s.content),u.indexOf("<pre")===0)return u+`
250
+ `;if(o){const c=s.attrIndex("class"),d=s.attrs?s.attrs.slice():[];c<0?d.push(["class",n.langPrefix+a]):(d[c]=d[c].slice(),d[c][1]+=" "+n.langPrefix+a);const f={attrs:d};return`<pre><code${i.renderAttrs(f)}>${u}</code></pre>
251
+ `}return`<pre><code${i.renderAttrs(s)}>${u}</code></pre>
252
+ `};Rt.image=function(t,e,n,r,i){const s=t[e];return s.attrs[s.attrIndex("alt")][1]=i.renderInlineAsText(s.children,n,r),i.renderToken(t,e,n)};Rt.hardbreak=function(t,e,n){return n.xhtmlOut?`<br />
253
+ `:`<br>
254
+ `};Rt.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut?`<br />
255
+ `:`<br>
256
+ `:`
257
+ `};Rt.text=function(t,e){return yn(t[e].content)};Rt.html_block=function(t,e){return t[e].content};Rt.html_inline=function(t,e){return t[e].content};function yr(){this.rules=po({},Rt)}yr.prototype.renderAttrs=function(e){let n,r,i;if(!e.attrs)return"";for(i="",n=0,r=e.attrs.length;n<r;n++)i+=" "+yn(e.attrs[n][0])+'="'+yn(e.attrs[n][1])+'"';return i};yr.prototype.renderToken=function(e,n,r){const i=e[n];let s="";if(i.hidden)return"";i.block&&i.nesting!==-1&&n&&e[n-1].hidden&&(s+=`
258
+ `),s+=(i.nesting===-1?"</":"<")+i.tag,s+=this.renderAttrs(i),i.nesting===0&&r.xhtmlOut&&(s+=" /");let o=!1;if(i.block&&(o=!0,i.nesting===1&&n+1<e.length)){const a=e[n+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===i.tag)&&(o=!1)}return s+=o?`>
259
+ `:">",s};yr.prototype.renderInline=function(t,e,n){let r="";const i=this.rules;for(let s=0,o=t.length;s<o;s++){const a=t[s].type;typeof i[a]<"u"?r+=i[a](t,s,e,n,this):r+=this.renderToken(t,s,e)}return r};yr.prototype.renderInlineAsText=function(t,e,n){let r="";for(let i=0,s=t.length;i<s;i++)switch(t[i].type){case"text":r+=t[i].content;break;case"image":r+=this.renderInlineAsText(t[i].children,e,n);break;case"html_inline":case"html_block":r+=t[i].content;break;case"softbreak":case"hardbreak":r+=`
260
+ `;break}return r};yr.prototype.render=function(t,e,n){let r="";const i=this.rules;for(let s=0,o=t.length;s<o;s++){const a=t[s].type;a==="inline"?r+=this.renderInline(t[s].children,e,n):typeof i[a]<"u"?r+=i[a](t,s,e,n,this):r+=this.renderToken(t,s,e,n)}return r};function rt(){this.__rules__=[],this.__cache__=null}rt.prototype.__find__=function(t){for(let e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1};rt.prototype.__compile__=function(){const t=this,e=[""];t.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){e.indexOf(r)<0&&e.push(r)})}),t.__cache__={},e.forEach(function(n){t.__cache__[n]=[],t.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||t.__cache__[n].push(r.fn))})})};rt.prototype.at=function(t,e,n){const r=this.__find__(t),i=n||{};if(r===-1)throw new Error("Parser rule not found: "+t);this.__rules__[r].fn=e,this.__rules__[r].alt=i.alt||[],this.__cache__=null};rt.prototype.before=function(t,e,n,r){const i=this.__find__(t),s=r||{};if(i===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(i,0,{name:e,enabled:!0,fn:n,alt:s.alt||[]}),this.__cache__=null};rt.prototype.after=function(t,e,n,r){const i=this.__find__(t),s=r||{};if(i===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(i+1,0,{name:e,enabled:!0,fn:n,alt:s.alt||[]}),this.__cache__=null};rt.prototype.push=function(t,e,n){const r=n||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:r.alt||[]}),this.__cache__=null};rt.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);const n=[];return t.forEach(function(r){const i=this.__find__(r);if(i<0){if(e)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[i].enabled=!0,n.push(r)},this),this.__cache__=null,n};rt.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(t,e)};rt.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);const n=[];return t.forEach(function(r){const i=this.__find__(r);if(i<0){if(e)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[i].enabled=!1,n.push(r)},this),this.__cache__=null,n};rt.prototype.getRules=function(t){return this.__cache__===null&&this.__compile__(),this.__cache__[t]||[]};function xt(t,e,n){this.type=t,this.tag=e,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}xt.prototype.attrIndex=function(e){if(!this.attrs)return-1;const n=this.attrs;for(let r=0,i=n.length;r<i;r++)if(n[r][0]===e)return r;return-1};xt.prototype.attrPush=function(e){this.attrs?this.attrs.push(e):this.attrs=[e]};xt.prototype.attrSet=function(e,n){const r=this.attrIndex(e),i=[e,n];r<0?this.attrPush(i):this.attrs[r]=i};xt.prototype.attrGet=function(e){const n=this.attrIndex(e);let r=null;return n>=0&&(r=this.attrs[n][1]),r};xt.prototype.attrJoin=function(e,n){const r=this.attrIndex(e);r<0?this.attrPush([e,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function H0(t,e,n){this.src=t,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=e}H0.prototype.Token=xt;const mv=/\r\n?|\n/g,gv=/\0/g;function bv(t){let e;e=t.src.replace(mv,`
261
+ `),e=e.replace(gv,"�"),t.src=e}function yv(t){let e;t.inlineMode?(e=new t.Token("inline","",0),e.content=t.src,e.map=[0,1],e.children=[],t.tokens.push(e)):t.md.block.parse(t.src,t.md,t.env,t.tokens)}function Ev(t){const e=t.tokens;for(let n=0,r=e.length;n<r;n++){const i=e[n];i.type==="inline"&&t.md.inline.parse(i.content,t.md,t.env,i.children)}}function kv(t){return/^<a[>\s]/i.test(t)}function xv(t){return/^<\/a\s*>/i.test(t)}function _v(t){const e=t.tokens;if(t.md.options.linkify)for(let n=0,r=e.length;n<r;n++){if(e[n].type!=="inline"||!t.md.linkify.pretest(e[n].content))continue;let i=e[n].children,s=0;for(let o=i.length-1;o>=0;o--){const a=i[o];if(a.type==="link_close"){for(o--;i[o].level!==a.level&&i[o].type!=="link_open";)o--;continue}if(a.type==="html_inline"&&(kv(a.content)&&s>0&&s--,xv(a.content)&&s++),!(s>0)&&a.type==="text"&&t.md.linkify.test(a.content)){const l=a.content;let u=t.md.linkify.match(l);const c=[];let d=a.level,f=0;u.length>0&&u[0].index===0&&o>0&&i[o-1].type==="text_special"&&(u=u.slice(1));for(let h=0;h<u.length;h++){const p=u[h].url,m=t.md.normalizeLink(p);if(!t.md.validateLink(m))continue;let g=u[h].text;u[h].schema?u[h].schema==="mailto:"&&!/^mailto:/i.test(g)?g=t.md.normalizeLinkText("mailto:"+g).replace(/^mailto:/,""):g=t.md.normalizeLinkText(g):g=t.md.normalizeLinkText("http://"+g).replace(/^http:\/\//,"");const b=u[h].index;if(b>f){const x=new t.Token("text","",0);x.content=l.slice(f,b),x.level=d,c.push(x)}const y=new t.Token("link_open","a",1);y.attrs=[["href",m]],y.level=d++,y.markup="linkify",y.info="auto",c.push(y);const k=new t.Token("text","",0);k.content=g,k.level=d,c.push(k);const _=new t.Token("link_close","a",-1);_.level=--d,_.markup="linkify",_.info="auto",c.push(_),f=u[h].lastIndex}if(f<l.length){const h=new t.Token("text","",0);h.content=l.slice(f),h.level=d,c.push(h)}e[n].children=i=z0(i,o,c)}}}}const U0=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,wv=/\((c|tm|r)\)/i,Cv=/\((c|tm|r)\)/ig,Sv={c:"©",r:"®",tm:"™"};function vv(t,e){return Sv[e.toLowerCase()]}function Av(t){let e=0;for(let n=t.length-1;n>=0;n--){const r=t[n];r.type==="text"&&!e&&(r.content=r.content.replace(Cv,vv)),r.type==="link_open"&&r.info==="auto"&&e--,r.type==="link_close"&&r.info==="auto"&&e++}}function Tv(t){let e=0;for(let n=t.length-1;n>=0;n--){const r=t[n];r.type==="text"&&!e&&U0.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&e--,r.type==="link_close"&&r.info==="auto"&&e++}}function Mv(t){let e;if(t.md.options.typographer)for(e=t.tokens.length-1;e>=0;e--)t.tokens[e].type==="inline"&&(wv.test(t.tokens[e].content)&&Av(t.tokens[e].children),U0.test(t.tokens[e].content)&&Tv(t.tokens[e].children))}const Nv=/['"]/,Bd=/['"]/g,Fd="’";function Wi(t,e,n){return t.slice(0,e)+n+t.slice(e+1)}function Ov(t,e){let n;const r=[];for(let i=0;i<t.length;i++){const s=t[i],o=t[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=o);n--);if(r.length=n+1,s.type!=="text")continue;let a=s.content,l=0,u=a.length;e:for(;l<u;){Bd.lastIndex=l;const c=Bd.exec(a);if(!c)break;let d=!0,f=!0;l=c.index+1;const h=c[0]==="'";let p=32;if(c.index-1>=0)p=a.charCodeAt(c.index-1);else for(n=i-1;n>=0&&!(t[n].type==="softbreak"||t[n].type==="hardbreak");n--)if(t[n].content){p=t[n].content.charCodeAt(t[n].content.length-1);break}let m=32;if(l<u)m=a.charCodeAt(l);else for(n=i+1;n<t.length&&!(t[n].type==="softbreak"||t[n].type==="hardbreak");n++)if(t[n].content){m=t[n].content.charCodeAt(0);break}const g=ii(p)||ri(String.fromCharCode(p)),b=ii(m)||ri(String.fromCharCode(m)),y=ni(p),k=ni(m);if(k?d=!1:b&&(y||g||(d=!1)),y?f=!1:g&&(k||b||(f=!1)),m===34&&c[0]==='"'&&p>=48&&p<=57&&(f=d=!1),d&&f&&(d=g,f=b),!d&&!f){h&&(s.content=Wi(s.content,c.index,Fd));continue}if(f)for(n=r.length-1;n>=0;n--){let _=r[n];if(r[n].level<o)break;if(_.single===h&&r[n].level===o){_=r[n];let x,w;h?(x=e.md.options.quotes[2],w=e.md.options.quotes[3]):(x=e.md.options.quotes[0],w=e.md.options.quotes[1]),s.content=Wi(s.content,c.index,w),t[_.token].content=Wi(t[_.token].content,_.pos,x),l+=w.length-1,_.token===i&&(l+=x.length-1),a=s.content,u=a.length,r.length=n;continue e}}d?r.push({token:i,pos:c.index,single:h,level:o}):f&&h&&(s.content=Wi(s.content,c.index,Fd))}}}function Dv(t){if(t.md.options.typographer)for(let e=t.tokens.length-1;e>=0;e--)t.tokens[e].type!=="inline"||!Nv.test(t.tokens[e].content)||Ov(t.tokens[e].children,t)}function Rv(t){let e,n;const r=t.tokens,i=r.length;for(let s=0;s<i;s++){if(r[s].type!=="inline")continue;const o=r[s].children,a=o.length;for(e=0;e<a;e++)o[e].type==="text_special"&&(o[e].type="text");for(e=n=0;e<a;e++)o[e].type==="text"&&e+1<a&&o[e+1].type==="text"?o[e+1].content=o[e].content+o[e+1].content:(e!==n&&(o[n]=o[e]),n++);e!==n&&(o.length=n)}}const ma=[["normalize",bv],["block",yv],["inline",Ev],["linkify",_v],["replacements",Mv],["smartquotes",Dv],["text_join",Rv]];function lu(){this.ruler=new rt;for(let t=0;t<ma.length;t++)this.ruler.push(ma[t][0],ma[t][1])}lu.prototype.process=function(t){const e=this.ruler.getRules("");for(let n=0,r=e.length;n<r;n++)e[n](t)};lu.prototype.State=H0;function It(t,e,n,r){this.src=t,this.md=e,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const i=this.src;for(let s=0,o=0,a=0,l=0,u=i.length,c=!1;o<u;o++){const d=i.charCodeAt(o);if(!c)if(fe(d)){a++,d===9?l+=4-l%4:l++;continue}else c=!0;(d===10||o===u-1)&&(d!==10&&o++,this.bMarks.push(s),this.eMarks.push(o),this.tShift.push(a),this.sCount.push(l),this.bsCount.push(0),c=!1,a=0,l=0,s=o+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}It.prototype.push=function(t,e,n){const r=new xt(t,e,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};It.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]};It.prototype.skipEmptyLines=function(e){for(let n=this.lineMax;e<n&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e};It.prototype.skipSpaces=function(e){for(let n=this.src.length;e<n;e++){const r=this.src.charCodeAt(e);if(!fe(r))break}return e};It.prototype.skipSpacesBack=function(e,n){if(e<=n)return e;for(;e>n;)if(!fe(this.src.charCodeAt(--e)))return e+1;return e};It.prototype.skipChars=function(e,n){for(let r=this.src.length;e<r&&this.src.charCodeAt(e)===n;e++);return e};It.prototype.skipCharsBack=function(e,n,r){if(e<=r)return e;for(;e>r;)if(n!==this.src.charCodeAt(--e))return e+1;return e};It.prototype.getLines=function(e,n,r,i){if(e>=n)return"";const s=new Array(n-e);for(let o=0,a=e;a<n;a++,o++){let l=0;const u=this.bMarks[a];let c=u,d;for(a+1<n||i?d=this.eMarks[a]+1:d=this.eMarks[a];c<d&&l<r;){const f=this.src.charCodeAt(c);if(fe(f))f===9?l+=4-(l+this.bsCount[a])%4:l++;else if(c-u<this.tShift[a])l++;else break;c++}l>r?s[o]=new Array(l-r+1).join(" ")+this.src.slice(c,d):s[o]=this.src.slice(c,d)}return s.join("")};It.prototype.Token=xt;const Iv=65536;function ga(t,e){const n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];return t.src.slice(n,r)}function zd(t){const e=[],n=t.length;let r=0,i=t.charCodeAt(r),s=!1,o=0,a="";for(;r<n;)i===124&&(s?(a+=t.substring(o,r-1),o=r):(e.push(a+t.substring(o,r)),a="",o=r+1)),s=i===92,r++,i=t.charCodeAt(r);return e.push(a+t.substring(o)),e}function Lv(t,e,n,r){if(e+2>n)return!1;let i=e+1;if(t.sCount[i]<t.blkIndent||t.sCount[i]-t.blkIndent>=4)return!1;let s=t.bMarks[i]+t.tShift[i];if(s>=t.eMarks[i])return!1;const o=t.src.charCodeAt(s++);if(o!==124&&o!==45&&o!==58||s>=t.eMarks[i])return!1;const a=t.src.charCodeAt(s++);if(a!==124&&a!==45&&a!==58&&!fe(a)||o===45&&fe(a))return!1;for(;s<t.eMarks[i];){const _=t.src.charCodeAt(s);if(_!==124&&_!==45&&_!==58&&!fe(_))return!1;s++}let l=ga(t,e+1),u=l.split("|");const c=[];for(let _=0;_<u.length;_++){const x=u[_].trim();if(!x){if(_===0||_===u.length-1)continue;return!1}if(!/^:?-+:?$/.test(x))return!1;x.charCodeAt(x.length-1)===58?c.push(x.charCodeAt(0)===58?"center":"right"):x.charCodeAt(0)===58?c.push("left"):c.push("")}if(l=ga(t,e).trim(),l.indexOf("|")===-1||t.sCount[e]-t.blkIndent>=4)return!1;u=zd(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop();const d=u.length;if(d===0||d!==c.length)return!1;if(r)return!0;const f=t.parentType;t.parentType="table";const h=t.md.block.ruler.getRules("blockquote"),p=t.push("table_open","table",1),m=[e,0];p.map=m;const g=t.push("thead_open","thead",1);g.map=[e,e+1];const b=t.push("tr_open","tr",1);b.map=[e,e+1];for(let _=0;_<u.length;_++){const x=t.push("th_open","th",1);c[_]&&(x.attrs=[["style","text-align:"+c[_]]]);const w=t.push("inline","",0);w.content=u[_].trim(),w.children=[],t.push("th_close","th",-1)}t.push("tr_close","tr",-1),t.push("thead_close","thead",-1);let y,k=0;for(i=e+2;i<n&&!(t.sCount[i]<t.blkIndent);i++){let _=!1;for(let w=0,C=h.length;w<C;w++)if(h[w](t,i,n,!0)){_=!0;break}if(_||(l=ga(t,i).trim(),!l)||t.sCount[i]-t.blkIndent>=4||(u=zd(l),u.length&&u[0]===""&&u.shift(),u.length&&u[u.length-1]===""&&u.pop(),k+=d-u.length,k>Iv))break;if(i===e+2){const w=t.push("tbody_open","tbody",1);w.map=y=[e+2,0]}const x=t.push("tr_open","tr",1);x.map=[i,i+1];for(let w=0;w<d;w++){const C=t.push("td_open","td",1);c[w]&&(C.attrs=[["style","text-align:"+c[w]]]);const M=t.push("inline","",0);M.content=u[w]?u[w].trim():"",M.children=[],t.push("td_close","td",-1)}t.push("tr_close","tr",-1)}return y&&(t.push("tbody_close","tbody",-1),y[1]=i),t.push("table_close","table",-1),m[1]=i,t.parentType=f,t.line=i,!0}function Pv(t,e,n){if(t.sCount[e]-t.blkIndent<4)return!1;let r=e+1,i=r;for(;r<n;){if(t.isEmpty(r)){r++;continue}if(t.sCount[r]-t.blkIndent>=4){r++,i=r;continue}break}t.line=i;const s=t.push("code_block","code",0);return s.content=t.getLines(e,i,4+t.blkIndent,!1)+`
262
+ `,s.map=[e,t.line],!0}function Bv(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||i+3>s)return!1;const o=t.src.charCodeAt(i);if(o!==126&&o!==96)return!1;let a=i;i=t.skipChars(i,o);let l=i-a;if(l<3)return!1;const u=t.src.slice(a,i),c=t.src.slice(i,s);if(o===96&&c.indexOf(String.fromCharCode(o))>=0)return!1;if(r)return!0;let d=e,f=!1;for(;d++,!(d>=n||(i=a=t.bMarks[d]+t.tShift[d],s=t.eMarks[d],i<s&&t.sCount[d]<t.blkIndent));)if(t.src.charCodeAt(i)===o&&!(t.sCount[d]-t.blkIndent>=4)&&(i=t.skipChars(i,o),!(i-a<l)&&(i=t.skipSpaces(i),!(i<s)))){f=!0;break}l=t.sCount[e],t.line=d+(f?1:0);const h=t.push("fence","code",0);return h.info=c,h.content=t.getLines(e+1,d,l,!0),h.markup=u,h.map=[e,t.line],!0}function Fv(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];const o=t.lineMax;if(t.sCount[e]-t.blkIndent>=4||t.src.charCodeAt(i)!==62)return!1;if(r)return!0;const a=[],l=[],u=[],c=[],d=t.md.block.ruler.getRules("blockquote"),f=t.parentType;t.parentType="blockquote";let h=!1,p;for(p=e;p<n;p++){const k=t.sCount[p]<t.blkIndent;if(i=t.bMarks[p]+t.tShift[p],s=t.eMarks[p],i>=s)break;if(t.src.charCodeAt(i++)===62&&!k){let x=t.sCount[p]+1,w,C;t.src.charCodeAt(i)===32?(i++,x++,C=!1,w=!0):t.src.charCodeAt(i)===9?(w=!0,(t.bsCount[p]+x)%4===3?(i++,x++,C=!1):C=!0):w=!1;let M=x;for(a.push(t.bMarks[p]),t.bMarks[p]=i;i<s;){const R=t.src.charCodeAt(i);if(fe(R))R===9?M+=4-(M+t.bsCount[p]+(C?1:0))%4:M++;else break;i++}h=i>=s,l.push(t.bsCount[p]),t.bsCount[p]=t.sCount[p]+1+(w?1:0),u.push(t.sCount[p]),t.sCount[p]=M-x,c.push(t.tShift[p]),t.tShift[p]=i-t.bMarks[p];continue}if(h)break;let _=!1;for(let x=0,w=d.length;x<w;x++)if(d[x](t,p,n,!0)){_=!0;break}if(_){t.lineMax=p,t.blkIndent!==0&&(a.push(t.bMarks[p]),l.push(t.bsCount[p]),c.push(t.tShift[p]),u.push(t.sCount[p]),t.sCount[p]-=t.blkIndent);break}a.push(t.bMarks[p]),l.push(t.bsCount[p]),c.push(t.tShift[p]),u.push(t.sCount[p]),t.sCount[p]=-1}const m=t.blkIndent;t.blkIndent=0;const g=t.push("blockquote_open","blockquote",1);g.markup=">";const b=[e,0];g.map=b,t.md.block.tokenize(t,e,p);const y=t.push("blockquote_close","blockquote",-1);y.markup=">",t.lineMax=o,t.parentType=f,b[1]=t.line;for(let k=0;k<c.length;k++)t.bMarks[k+e]=a[k],t.tShift[k+e]=c[k],t.sCount[k+e]=u[k],t.bsCount[k+e]=l[k];return t.blkIndent=m,!0}function zv(t,e,n,r){const i=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;let s=t.bMarks[e]+t.tShift[e];const o=t.src.charCodeAt(s++);if(o!==42&&o!==45&&o!==95)return!1;let a=1;for(;s<i;){const u=t.src.charCodeAt(s++);if(u!==o&&!fe(u))return!1;u===o&&a++}if(a<3)return!1;if(r)return!0;t.line=e+1;const l=t.push("hr","hr",0);return l.map=[e,t.line],l.markup=Array(a+1).join(String.fromCharCode(o)),!0}function $d(t,e){const n=t.eMarks[e];let r=t.bMarks[e]+t.tShift[e];const i=t.src.charCodeAt(r++);if(i!==42&&i!==45&&i!==43)return-1;if(r<n){const s=t.src.charCodeAt(r);if(!fe(s))return-1}return r}function Hd(t,e){const n=t.bMarks[e]+t.tShift[e],r=t.eMarks[e];let i=n;if(i+1>=r)return-1;let s=t.src.charCodeAt(i++);if(s<48||s>57)return-1;for(;;){if(i>=r)return-1;if(s=t.src.charCodeAt(i++),s>=48&&s<=57){if(i-n>=10)return-1;continue}if(s===41||s===46)break;return-1}return i<r&&(s=t.src.charCodeAt(i),!fe(s))?-1:i}function $v(t,e){const n=t.level+2;for(let r=e+2,i=t.tokens.length-2;r<i;r++)t.tokens[r].level===n&&t.tokens[r].type==="paragraph_open"&&(t.tokens[r+2].hidden=!0,t.tokens[r].hidden=!0,r+=2)}function Hv(t,e,n,r){let i,s,o,a,l=e,u=!0;if(t.sCount[l]-t.blkIndent>=4||t.listIndent>=0&&t.sCount[l]-t.listIndent>=4&&t.sCount[l]<t.blkIndent)return!1;let c=!1;r&&t.parentType==="paragraph"&&t.sCount[l]>=t.blkIndent&&(c=!0);let d,f,h;if((h=Hd(t,l))>=0){if(d=!0,o=t.bMarks[l]+t.tShift[l],f=Number(t.src.slice(o,h-1)),c&&f!==1)return!1}else if((h=$d(t,l))>=0)d=!1;else return!1;if(c&&t.skipSpaces(h)>=t.eMarks[l])return!1;if(r)return!0;const p=t.src.charCodeAt(h-1),m=t.tokens.length;d?(a=t.push("ordered_list_open","ol",1),f!==1&&(a.attrs=[["start",f]])):a=t.push("bullet_list_open","ul",1);const g=[l,0];a.map=g,a.markup=String.fromCharCode(p);let b=!1;const y=t.md.block.ruler.getRules("list"),k=t.parentType;for(t.parentType="list";l<n;){s=h,i=t.eMarks[l];const _=t.sCount[l]+h-(t.bMarks[l]+t.tShift[l]);let x=_;for(;s<i;){const q=t.src.charCodeAt(s);if(q===9)x+=4-(x+t.bsCount[l])%4;else if(q===32)x++;else break;s++}const w=s;let C;w>=i?C=1:C=x-_,C>4&&(C=1);const M=_+C;a=t.push("list_item_open","li",1),a.markup=String.fromCharCode(p);const R=[l,0];a.map=R,d&&(a.info=t.src.slice(o,h-1));const j=t.tight,be=t.tShift[l],ue=t.sCount[l],re=t.listIndent;if(t.listIndent=t.blkIndent,t.blkIndent=M,t.tight=!0,t.tShift[l]=w-t.bMarks[l],t.sCount[l]=x,w>=i&&t.isEmpty(l+1)?t.line=Math.min(t.line+2,n):t.md.block.tokenize(t,l,n,!0),(!t.tight||b)&&(u=!1),b=t.line-l>1&&t.isEmpty(t.line-1),t.blkIndent=t.listIndent,t.listIndent=re,t.tShift[l]=be,t.sCount[l]=ue,t.tight=j,a=t.push("list_item_close","li",-1),a.markup=String.fromCharCode(p),l=t.line,R[1]=l,l>=n||t.sCount[l]<t.blkIndent||t.sCount[l]-t.blkIndent>=4)break;let G=!1;for(let q=0,ye=y.length;q<ye;q++)if(y[q](t,l,n,!0)){G=!0;break}if(G)break;if(d){if(h=Hd(t,l),h<0)break;o=t.bMarks[l]+t.tShift[l]}else if(h=$d(t,l),h<0)break;if(p!==t.src.charCodeAt(h-1))break}return d?a=t.push("ordered_list_close","ol",-1):a=t.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(p),g[1]=l,t.line=l,t.parentType=k,u&&$v(t,m),!0}function Uv(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e],o=e+1;if(t.sCount[e]-t.blkIndent>=4||t.src.charCodeAt(i)!==91)return!1;function a(y){const k=t.lineMax;if(y>=k||t.isEmpty(y))return null;let _=!1;if(t.sCount[y]-t.blkIndent>3&&(_=!0),t.sCount[y]<0&&(_=!0),!_){const C=t.md.block.ruler.getRules("reference"),M=t.parentType;t.parentType="reference";let R=!1;for(let j=0,be=C.length;j<be;j++)if(C[j](t,y,k,!0)){R=!0;break}if(t.parentType=M,R)return null}const x=t.bMarks[y]+t.tShift[y],w=t.eMarks[y];return t.src.slice(x,w+1)}let l=t.src.slice(i,s+1);s=l.length;let u=-1;for(i=1;i<s;i++){const y=l.charCodeAt(i);if(y===91)return!1;if(y===93){u=i;break}else if(y===10){const k=a(o);k!==null&&(l+=k,s=l.length,o++)}else if(y===92&&(i++,i<s&&l.charCodeAt(i)===10)){const k=a(o);k!==null&&(l+=k,s=l.length,o++)}}if(u<0||l.charCodeAt(u+1)!==58)return!1;for(i=u+2;i<s;i++){const y=l.charCodeAt(i);if(y===10){const k=a(o);k!==null&&(l+=k,s=l.length,o++)}else if(!fe(y))break}const c=t.md.helpers.parseLinkDestination(l,i,s);if(!c.ok)return!1;const d=t.md.normalizeLink(c.str);if(!t.md.validateLink(d))return!1;i=c.pos;const f=i,h=o,p=i;for(;i<s;i++){const y=l.charCodeAt(i);if(y===10){const k=a(o);k!==null&&(l+=k,s=l.length,o++)}else if(!fe(y))break}let m=t.md.helpers.parseLinkTitle(l,i,s);for(;m.can_continue;){const y=a(o);if(y===null)break;l+=y,i=s,s=l.length,o++,m=t.md.helpers.parseLinkTitle(l,i,s,m)}let g;for(i<s&&p!==i&&m.ok?(g=m.str,i=m.pos):(g="",i=f,o=h);i<s;){const y=l.charCodeAt(i);if(!fe(y))break;i++}if(i<s&&l.charCodeAt(i)!==10&&g)for(g="",i=f,o=h;i<s;){const y=l.charCodeAt(i);if(!fe(y))break;i++}if(i<s&&l.charCodeAt(i)!==10)return!1;const b=mo(l.slice(1,u));return b?(r||(typeof t.env.references>"u"&&(t.env.references={}),typeof t.env.references[b]>"u"&&(t.env.references[b]={title:g,href:d}),t.line=o),!0):!1}const qv=["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"],Wv="[a-zA-Z_:][a-zA-Z0-9:._-]*",Vv="[^\"'=<>`\\x00-\\x20]+",Kv="'[^']*'",Gv='"[^"]*"',jv="(?:"+Vv+"|"+Kv+"|"+Gv+")",Zv="(?:\\s+"+Wv+"(?:\\s*=\\s*"+jv+")?)",q0="<[A-Za-z][A-Za-z0-9\\-]*"+Zv+"*\\s*\\/?>",W0="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Yv="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Jv="<[?][\\s\\S]*?[?]>",Xv="<![A-Za-z][^>]*>",Qv="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",eA=new RegExp("^(?:"+q0+"|"+W0+"|"+Yv+"|"+Jv+"|"+Xv+"|"+Qv+")"),tA=new RegExp("^(?:"+q0+"|"+W0+")"),Xn=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+qv.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(tA.source+"\\s*$"),/^$/,!1]];function nA(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4||!t.md.options.html||t.src.charCodeAt(i)!==60)return!1;let o=t.src.slice(i,s),a=0;for(;a<Xn.length&&!Xn[a][0].test(o);a++);if(a===Xn.length)return!1;if(r)return Xn[a][2];let l=e+1;if(!Xn[a][1].test(o)){for(;l<n&&!(t.sCount[l]<t.blkIndent);l++)if(i=t.bMarks[l]+t.tShift[l],s=t.eMarks[l],o=t.src.slice(i,s),Xn[a][1].test(o)){o.length!==0&&l++;break}}t.line=l;const u=t.push("html_block","",0);return u.map=[e,l],u.content=t.getLines(e,l,t.blkIndent,!0),!0}function rA(t,e,n,r){let i=t.bMarks[e]+t.tShift[e],s=t.eMarks[e];if(t.sCount[e]-t.blkIndent>=4)return!1;let o=t.src.charCodeAt(i);if(o!==35||i>=s)return!1;let a=1;for(o=t.src.charCodeAt(++i);o===35&&i<s&&a<=6;)a++,o=t.src.charCodeAt(++i);if(a>6||i<s&&!fe(o))return!1;if(r)return!0;s=t.skipSpacesBack(s,i);const l=t.skipCharsBack(s,35,i);l>i&&fe(t.src.charCodeAt(l-1))&&(s=l),t.line=e+1;const u=t.push("heading_open","h"+String(a),1);u.markup="########".slice(0,a),u.map=[e,t.line];const c=t.push("inline","",0);c.content=t.src.slice(i,s).trim(),c.map=[e,t.line],c.children=[];const d=t.push("heading_close","h"+String(a),-1);return d.markup="########".slice(0,a),!0}function iA(t,e,n){const r=t.md.block.ruler.getRules("paragraph");if(t.sCount[e]-t.blkIndent>=4)return!1;const i=t.parentType;t.parentType="paragraph";let s=0,o,a=e+1;for(;a<n&&!t.isEmpty(a);a++){if(t.sCount[a]-t.blkIndent>3)continue;if(t.sCount[a]>=t.blkIndent){let h=t.bMarks[a]+t.tShift[a];const p=t.eMarks[a];if(h<p&&(o=t.src.charCodeAt(h),(o===45||o===61)&&(h=t.skipChars(h,o),h=t.skipSpaces(h),h>=p))){s=o===61?1:2;break}}if(t.sCount[a]<0)continue;let f=!1;for(let h=0,p=r.length;h<p;h++)if(r[h](t,a,n,!0)){f=!0;break}if(f)break}if(!s)return!1;const l=t.getLines(e,a,t.blkIndent,!1).trim();t.line=a+1;const u=t.push("heading_open","h"+String(s),1);u.markup=String.fromCharCode(o),u.map=[e,t.line];const c=t.push("inline","",0);c.content=l,c.map=[e,t.line-1],c.children=[];const d=t.push("heading_close","h"+String(s),-1);return d.markup=String.fromCharCode(o),t.parentType=i,!0}function sA(t,e,n){const r=t.md.block.ruler.getRules("paragraph"),i=t.parentType;let s=e+1;for(t.parentType="paragraph";s<n&&!t.isEmpty(s);s++){if(t.sCount[s]-t.blkIndent>3||t.sCount[s]<0)continue;let u=!1;for(let c=0,d=r.length;c<d;c++)if(r[c](t,s,n,!0)){u=!0;break}if(u)break}const o=t.getLines(e,s,t.blkIndent,!1).trim();t.line=s;const a=t.push("paragraph_open","p",1);a.map=[e,t.line];const l=t.push("inline","",0);return l.content=o,l.map=[e,t.line],l.children=[],t.push("paragraph_close","p",-1),t.parentType=i,!0}const Vi=[["table",Lv,["paragraph","reference"]],["code",Pv],["fence",Bv,["paragraph","reference","blockquote","list"]],["blockquote",Fv,["paragraph","reference","blockquote","list"]],["hr",zv,["paragraph","reference","blockquote","list"]],["list",Hv,["paragraph","reference","blockquote"]],["reference",Uv],["html_block",nA,["paragraph","reference","blockquote"]],["heading",rA,["paragraph","reference","blockquote"]],["lheading",iA],["paragraph",sA]];function go(){this.ruler=new rt;for(let t=0;t<Vi.length;t++)this.ruler.push(Vi[t][0],Vi[t][1],{alt:(Vi[t][2]||[]).slice()})}go.prototype.tokenize=function(t,e,n){const r=this.ruler.getRules(""),i=r.length,s=t.md.options.maxNesting;let o=e,a=!1;for(;o<n&&(t.line=o=t.skipEmptyLines(o),!(o>=n||t.sCount[o]<t.blkIndent));){if(t.level>=s){t.line=n;break}const l=t.line;let u=!1;for(let c=0;c<i;c++)if(u=r[c](t,o,n,!1),u){if(l>=t.line)throw new Error("block rule didn't increment state.line");break}if(!u)throw new Error("none of the block rules matched");t.tight=!a,t.isEmpty(t.line-1)&&(a=!0),o=t.line,o<n&&t.isEmpty(o)&&(a=!0,o++,t.line=o)}};go.prototype.parse=function(t,e,n,r){if(!t)return;const i=new this.State(t,e,n,r);this.tokenize(i,i.line,i.lineMax)};go.prototype.State=It;function fi(t,e,n,r){this.src=t,this.env=n,this.md=e,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}fi.prototype.pushPending=function(){const t=new xt("text","",0);return t.content=this.pending,t.level=this.pendingLevel,this.tokens.push(t),this.pending="",t};fi.prototype.push=function(t,e,n){this.pending&&this.pushPending();const r=new xt(t,e,n);let i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r};fi.prototype.scanDelims=function(t,e){const n=this.posMax,r=this.src.charCodeAt(t),i=t>0?this.src.charCodeAt(t-1):32;let s=t;for(;s<n&&this.src.charCodeAt(s)===r;)s++;const o=s-t,a=s<n?this.src.charCodeAt(s):32,l=ii(i)||ri(String.fromCharCode(i)),u=ii(a)||ri(String.fromCharCode(a)),c=ni(i),d=ni(a),f=!d&&(!u||c||l),h=!c&&(!l||d||u);return{can_open:f&&(e||!h||l),can_close:h&&(e||!f||u),length:o}};fi.prototype.Token=xt;function oA(t){switch(t){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function aA(t,e){let n=t.pos;for(;n<t.posMax&&!oA(t.src.charCodeAt(n));)n++;return n===t.pos?!1:(e||(t.pending+=t.src.slice(t.pos,n)),t.pos=n,!0)}const lA=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function uA(t,e){if(!t.md.options.linkify||t.linkLevel>0)return!1;const n=t.pos,r=t.posMax;if(n+3>r||t.src.charCodeAt(n)!==58||t.src.charCodeAt(n+1)!==47||t.src.charCodeAt(n+2)!==47)return!1;const i=t.pending.match(lA);if(!i)return!1;const s=i[1],o=t.md.linkify.matchAtStart(t.src.slice(n-s.length));if(!o)return!1;let a=o.url;if(a.length<=s.length)return!1;let l=a.length;for(;l>0&&a.charCodeAt(l-1)===42;)l--;l!==a.length&&(a=a.slice(0,l));const u=t.md.normalizeLink(a);if(!t.md.validateLink(u))return!1;if(!e){t.pending=t.pending.slice(0,-s.length);const c=t.push("link_open","a",1);c.attrs=[["href",u]],c.markup="linkify",c.info="auto";const d=t.push("text","",0);d.content=t.md.normalizeLinkText(a);const f=t.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return t.pos+=a.length-s.length,!0}function cA(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==10)return!1;const r=t.pending.length-1,i=t.posMax;if(!e)if(r>=0&&t.pending.charCodeAt(r)===32)if(r>=1&&t.pending.charCodeAt(r-1)===32){let s=r-1;for(;s>=1&&t.pending.charCodeAt(s-1)===32;)s--;t.pending=t.pending.slice(0,s),t.push("hardbreak","br",0)}else t.pending=t.pending.slice(0,-1),t.push("softbreak","br",0);else t.push("softbreak","br",0);for(n++;n<i&&fe(t.src.charCodeAt(n));)n++;return t.pos=n,!0}const uu=[];for(let t=0;t<256;t++)uu.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(t){uu[t.charCodeAt(0)]=1});function dA(t,e){let n=t.pos;const r=t.posMax;if(t.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=t.src.charCodeAt(n);if(i===10){for(e||t.push("hardbreak","br",0),n++;n<r&&(i=t.src.charCodeAt(n),!!fe(i));)n++;return t.pos=n,!0}let s=t.src[n];if(i>=55296&&i<=56319&&n+1<r){const a=t.src.charCodeAt(n+1);a>=56320&&a<=57343&&(s+=t.src[n+1],n++)}const o="\\"+s;if(!e){const a=t.push("text_special","",0);i<256&&uu[i]!==0?a.content=s:a.content=o,a.markup=o,a.info="escape"}return t.pos=n+1,!0}function fA(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==96)return!1;const i=n;n++;const s=t.posMax;for(;n<s&&t.src.charCodeAt(n)===96;)n++;const o=t.src.slice(i,n),a=o.length;if(t.backticksScanned&&(t.backticks[a]||0)<=i)return e||(t.pending+=o),t.pos+=a,!0;let l=n,u;for(;(u=t.src.indexOf("`",l))!==-1;){for(l=u+1;l<s&&t.src.charCodeAt(l)===96;)l++;const c=l-u;if(c===a){if(!e){const d=t.push("code_inline","code",0);d.markup=o,d.content=t.src.slice(n,u).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return t.pos=l,!0}t.backticks[c]=u}return t.backticksScanned=!0,e||(t.pending+=o),t.pos+=a,!0}function hA(t,e){const n=t.pos,r=t.src.charCodeAt(n);if(e||r!==126)return!1;const i=t.scanDelims(t.pos,!0);let s=i.length;const o=String.fromCharCode(r);if(s<2)return!1;let a;s%2&&(a=t.push("text","",0),a.content=o,s--);for(let l=0;l<s;l+=2)a=t.push("text","",0),a.content=o+o,t.delimiters.push({marker:r,length:0,token:t.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return t.pos+=i.length,!0}function Ud(t,e){let n;const r=[],i=e.length;for(let s=0;s<i;s++){const o=e[s];if(o.marker!==126||o.end===-1)continue;const a=e[o.end];n=t.tokens[o.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=t.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",t.tokens[a.token-1].type==="text"&&t.tokens[a.token-1].content==="~"&&r.push(a.token-1)}for(;r.length;){const s=r.pop();let o=s+1;for(;o<t.tokens.length&&t.tokens[o].type==="s_close";)o++;o--,s!==o&&(n=t.tokens[o],t.tokens[o]=t.tokens[s],t.tokens[s]=n)}}function pA(t){const e=t.tokens_meta,n=t.tokens_meta.length;Ud(t,t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&Ud(t,e[r].delimiters)}const V0={tokenize:hA,postProcess:pA};function mA(t,e){const n=t.pos,r=t.src.charCodeAt(n);if(e||r!==95&&r!==42)return!1;const i=t.scanDelims(t.pos,r===42);for(let s=0;s<i.length;s++){const o=t.push("text","",0);o.content=String.fromCharCode(r),t.delimiters.push({marker:r,length:i.length,token:t.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return t.pos+=i.length,!0}function qd(t,e){const n=e.length;for(let r=n-1;r>=0;r--){const i=e[r];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const s=e[i.end],o=r>0&&e[r-1].end===i.end+1&&e[r-1].marker===i.marker&&e[r-1].token===i.token-1&&e[i.end+1].token===s.token+1,a=String.fromCharCode(i.marker),l=t.tokens[i.token];l.type=o?"strong_open":"em_open",l.tag=o?"strong":"em",l.nesting=1,l.markup=o?a+a:a,l.content="";const u=t.tokens[s.token];u.type=o?"strong_close":"em_close",u.tag=o?"strong":"em",u.nesting=-1,u.markup=o?a+a:a,u.content="",o&&(t.tokens[e[r-1].token].content="",t.tokens[e[i.end+1].token].content="",r--)}}function gA(t){const e=t.tokens_meta,n=t.tokens_meta.length;qd(t,t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&qd(t,e[r].delimiters)}const K0={tokenize:mA,postProcess:gA};function bA(t,e){let n,r,i,s,o="",a="",l=t.pos,u=!0;if(t.src.charCodeAt(t.pos)!==91)return!1;const c=t.pos,d=t.posMax,f=t.pos+1,h=t.md.helpers.parseLinkLabel(t,t.pos,!0);if(h<0)return!1;let p=h+1;if(p<d&&t.src.charCodeAt(p)===40){for(u=!1,p++;p<d&&(n=t.src.charCodeAt(p),!(!fe(n)&&n!==10));p++);if(p>=d)return!1;if(l=p,i=t.md.helpers.parseLinkDestination(t.src,p,t.posMax),i.ok){for(o=t.md.normalizeLink(i.str),t.md.validateLink(o)?p=i.pos:o="",l=p;p<d&&(n=t.src.charCodeAt(p),!(!fe(n)&&n!==10));p++);if(i=t.md.helpers.parseLinkTitle(t.src,p,t.posMax),p<d&&l!==p&&i.ok)for(a=i.str,p=i.pos;p<d&&(n=t.src.charCodeAt(p),!(!fe(n)&&n!==10));p++);}(p>=d||t.src.charCodeAt(p)!==41)&&(u=!0),p++}if(u){if(typeof t.env.references>"u")return!1;if(p<d&&t.src.charCodeAt(p)===91?(l=p+1,p=t.md.helpers.parseLinkLabel(t,p),p>=0?r=t.src.slice(l,p++):p=h+1):p=h+1,r||(r=t.src.slice(f,h)),s=t.env.references[mo(r)],!s)return t.pos=c,!1;o=s.href,a=s.title}if(!e){t.pos=f,t.posMax=h;const m=t.push("link_open","a",1),g=[["href",o]];m.attrs=g,a&&g.push(["title",a]),t.linkLevel++,t.md.inline.tokenize(t),t.linkLevel--,t.push("link_close","a",-1)}return t.pos=p,t.posMax=d,!0}function yA(t,e){let n,r,i,s,o,a,l,u,c="";const d=t.pos,f=t.posMax;if(t.src.charCodeAt(t.pos)!==33||t.src.charCodeAt(t.pos+1)!==91)return!1;const h=t.pos+2,p=t.md.helpers.parseLinkLabel(t,t.pos+1,!1);if(p<0)return!1;if(s=p+1,s<f&&t.src.charCodeAt(s)===40){for(s++;s<f&&(n=t.src.charCodeAt(s),!(!fe(n)&&n!==10));s++);if(s>=f)return!1;for(u=s,a=t.md.helpers.parseLinkDestination(t.src,s,t.posMax),a.ok&&(c=t.md.normalizeLink(a.str),t.md.validateLink(c)?s=a.pos:c=""),u=s;s<f&&(n=t.src.charCodeAt(s),!(!fe(n)&&n!==10));s++);if(a=t.md.helpers.parseLinkTitle(t.src,s,t.posMax),s<f&&u!==s&&a.ok)for(l=a.str,s=a.pos;s<f&&(n=t.src.charCodeAt(s),!(!fe(n)&&n!==10));s++);else l="";if(s>=f||t.src.charCodeAt(s)!==41)return t.pos=d,!1;s++}else{if(typeof t.env.references>"u")return!1;if(s<f&&t.src.charCodeAt(s)===91?(u=s+1,s=t.md.helpers.parseLinkLabel(t,s),s>=0?i=t.src.slice(u,s++):s=p+1):s=p+1,i||(i=t.src.slice(h,p)),o=t.env.references[mo(i)],!o)return t.pos=d,!1;c=o.href,l=o.title}if(!e){r=t.src.slice(h,p);const m=[];t.md.inline.parse(r,t.md,t.env,m);const g=t.push("image","img",0),b=[["src",c],["alt",""]];g.attrs=b,g.children=m,g.content=r,l&&b.push(["title",l])}return t.pos=s,t.posMax=f,!0}const EA=/^([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])?)*)$/,kA=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function xA(t,e){let n=t.pos;if(t.src.charCodeAt(n)!==60)return!1;const r=t.pos,i=t.posMax;for(;;){if(++n>=i)return!1;const o=t.src.charCodeAt(n);if(o===60)return!1;if(o===62)break}const s=t.src.slice(r+1,n);if(kA.test(s)){const o=t.md.normalizeLink(s);if(!t.md.validateLink(o))return!1;if(!e){const a=t.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";const l=t.push("text","",0);l.content=t.md.normalizeLinkText(s);const u=t.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return t.pos+=s.length+2,!0}if(EA.test(s)){const o=t.md.normalizeLink("mailto:"+s);if(!t.md.validateLink(o))return!1;if(!e){const a=t.push("link_open","a",1);a.attrs=[["href",o]],a.markup="autolink",a.info="auto";const l=t.push("text","",0);l.content=t.md.normalizeLinkText(s);const u=t.push("link_close","a",-1);u.markup="autolink",u.info="auto"}return t.pos+=s.length+2,!0}return!1}function _A(t){return/^<a[>\s]/i.test(t)}function wA(t){return/^<\/a\s*>/i.test(t)}function CA(t){const e=t|32;return e>=97&&e<=122}function SA(t,e){if(!t.md.options.html)return!1;const n=t.posMax,r=t.pos;if(t.src.charCodeAt(r)!==60||r+2>=n)return!1;const i=t.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!CA(i))return!1;const s=t.src.slice(r).match(eA);if(!s)return!1;if(!e){const o=t.push("html_inline","",0);o.content=s[0],_A(o.content)&&t.linkLevel++,wA(o.content)&&t.linkLevel--}return t.pos+=s[0].length,!0}const vA=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,AA=/^&([a-z][a-z0-9]{1,31});/i;function TA(t,e){const n=t.pos,r=t.posMax;if(t.src.charCodeAt(n)!==38||n+1>=r)return!1;if(t.src.charCodeAt(n+1)===35){const s=t.src.slice(n).match(vA);if(s){if(!e){const o=s[1][0].toLowerCase()==="x"?parseInt(s[1].slice(1),16):parseInt(s[1],10),a=t.push("text_special","",0);a.content=au(o)?Gs(o):Gs(65533),a.markup=s[0],a.info="entity"}return t.pos+=s[0].length,!0}}else{const s=t.src.slice(n).match(AA);if(s){const o=F0(s[0]);if(o!==s[0]){if(!e){const a=t.push("text_special","",0);a.content=o,a.markup=s[0],a.info="entity"}return t.pos+=s[0].length,!0}}}return!1}function Wd(t){const e={},n=t.length;if(!n)return;let r=0,i=-2;const s=[];for(let o=0;o<n;o++){const a=t[o];if(s.push(0),(t[r].marker!==a.marker||i!==a.token-1)&&(r=o),i=a.token,a.length=a.length||0,!a.close)continue;e.hasOwnProperty(a.marker)||(e[a.marker]=[-1,-1,-1,-1,-1,-1]);const l=e[a.marker][(a.open?3:0)+a.length%3];let u=r-s[r]-1,c=u;for(;u>l;u-=s[u]+1){const d=t[u];if(d.marker===a.marker&&d.open&&d.end<0){let f=!1;if((d.close||a.open)&&(d.length+a.length)%3===0&&(d.length%3!==0||a.length%3!==0)&&(f=!0),!f){const h=u>0&&!t[u-1].open?s[u-1]+1:0;s[o]=o-u+h,s[u]=h,a.open=!1,d.end=o,d.close=!1,c=-1,i=-2;break}}}c!==-1&&(e[a.marker][(a.open?3:0)+(a.length||0)%3]=c)}}function MA(t){const e=t.tokens_meta,n=t.tokens_meta.length;Wd(t.delimiters);for(let r=0;r<n;r++)e[r]&&e[r].delimiters&&Wd(e[r].delimiters)}function NA(t){let e,n,r=0;const i=t.tokens,s=t.tokens.length;for(e=n=0;e<s;e++)i[e].nesting<0&&r--,i[e].level=r,i[e].nesting>0&&r++,i[e].type==="text"&&e+1<s&&i[e+1].type==="text"?i[e+1].content=i[e].content+i[e+1].content:(e!==n&&(i[n]=i[e]),n++);e!==n&&(i.length=n)}const ba=[["text",aA],["linkify",uA],["newline",cA],["escape",dA],["backticks",fA],["strikethrough",V0.tokenize],["emphasis",K0.tokenize],["link",bA],["image",yA],["autolink",xA],["html_inline",SA],["entity",TA]],ya=[["balance_pairs",MA],["strikethrough",V0.postProcess],["emphasis",K0.postProcess],["fragments_join",NA]];function hi(){this.ruler=new rt;for(let t=0;t<ba.length;t++)this.ruler.push(ba[t][0],ba[t][1]);this.ruler2=new rt;for(let t=0;t<ya.length;t++)this.ruler2.push(ya[t][0],ya[t][1])}hi.prototype.skipToken=function(t){const e=t.pos,n=this.ruler.getRules(""),r=n.length,i=t.md.options.maxNesting,s=t.cache;if(typeof s[e]<"u"){t.pos=s[e];return}let o=!1;if(t.level<i){for(let a=0;a<r;a++)if(t.level++,o=n[a](t,!0),t.level--,o){if(e>=t.pos)throw new Error("inline rule didn't increment state.pos");break}}else t.pos=t.posMax;o||t.pos++,s[e]=t.pos};hi.prototype.tokenize=function(t){const e=this.ruler.getRules(""),n=e.length,r=t.posMax,i=t.md.options.maxNesting;for(;t.pos<r;){const s=t.pos;let o=!1;if(t.level<i){for(let a=0;a<n;a++)if(o=e[a](t,!1),o){if(s>=t.pos)throw new Error("inline rule didn't increment state.pos");break}}if(o){if(t.pos>=r)break;continue}t.pending+=t.src[t.pos++]}t.pending&&t.pushPending()};hi.prototype.parse=function(t,e,n,r){const i=new this.State(t,e,n,r);this.tokenize(i);const s=this.ruler2.getRules(""),o=s.length;for(let a=0;a<o;a++)s[a](i)};hi.prototype.State=fi;function OA(t){const e={};t=t||{},e.src_Any=R0.source,e.src_Cc=I0.source,e.src_Z=P0.source,e.src_P=su.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const n="[><|]";return e.src_pseudo_letter="(?:(?!"+n+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+n+"|"+e.src_ZPCc+")(?!"+(t["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(t["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function dl(t){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){t[r]=n[r]})}),t}function bo(t){return Object.prototype.toString.call(t)}function DA(t){return bo(t)==="[object String]"}function RA(t){return bo(t)==="[object Object]"}function IA(t){return bo(t)==="[object RegExp]"}function Vd(t){return bo(t)==="[object Function]"}function LA(t){return t.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const G0={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function PA(t){return Object.keys(t||{}).reduce(function(e,n){return e||G0.hasOwnProperty(n)},!1)}const BA={"http:":{validate:function(t,e,n){const r=t.slice(e);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(t,e,n){const r=t.slice(e);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?e>=3&&t[e-3]===":"||e>=3&&t[e-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(t,e,n){const r=t.slice(e);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},FA="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",zA="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function $A(t){t.__index__=-1,t.__text_cache__=""}function HA(t){return function(e,n){const r=e.slice(n);return t.test(r)?r.match(t)[0].length:0}}function Kd(){return function(t,e){e.normalize(t)}}function js(t){const e=t.re=OA(t.__opts__),n=t.__tlds__.slice();t.onCompile(),t.__tlds_replaced__||n.push(FA),n.push(e.src_xn),e.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(r(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(r(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(r(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(r(e.tpl_host_fuzzy_test),"i");const i=[];t.__compiled__={};function s(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(t.__schemas__).forEach(function(a){const l=t.__schemas__[a];if(l===null)return;const u={validate:null,link:null};if(t.__compiled__[a]=u,RA(l)){IA(l.validate)?u.validate=HA(l.validate):Vd(l.validate)?u.validate=l.validate:s(a,l),Vd(l.normalize)?u.normalize=l.normalize:l.normalize?s(a,l):u.normalize=Kd();return}if(DA(l)){i.push(a);return}s(a,l)}),i.forEach(function(a){t.__compiled__[t.__schemas__[a]]&&(t.__compiled__[a].validate=t.__compiled__[t.__schemas__[a]].validate,t.__compiled__[a].normalize=t.__compiled__[t.__schemas__[a]].normalize)}),t.__compiled__[""]={validate:null,normalize:Kd()};const o=Object.keys(t.__compiled__).filter(function(a){return a.length>0&&t.__compiled__[a]}).map(LA).join("|");t.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+o+")","i"),t.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+o+")","ig"),t.re.schema_at_start=RegExp("^"+t.re.schema_search.source,"i"),t.re.pretest=RegExp("("+t.re.schema_test.source+")|("+t.re.host_fuzzy_test.source+")|@","i"),$A(t)}function UA(t,e){const n=t.__index__,r=t.__last_index__,i=t.__text_cache__.slice(n,r);this.schema=t.__schema__.toLowerCase(),this.index=n+e,this.lastIndex=r+e,this.raw=i,this.text=i,this.url=i}function fl(t,e){const n=new UA(t,e);return t.__compiled__[n.schema].normalize(n,t),n}function ct(t,e){if(!(this instanceof ct))return new ct(t,e);e||PA(t)&&(e=t,t={}),this.__opts__=dl({},G0,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=dl({},BA,t),this.__compiled__={},this.__tlds__=zA,this.__tlds_replaced__=!1,this.re={},js(this)}ct.prototype.add=function(e,n){return this.__schemas__[e]=n,js(this),this};ct.prototype.set=function(e){return this.__opts__=dl(this.__opts__,e),this};ct.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let n,r,i,s,o,a,l,u,c;if(this.re.schema_test.test(e)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(e))!==null;)if(s=this.testSchemaAt(e,n[2],l.lastIndex),s){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+s;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(u=e.search(this.re.host_fuzzy_test),u>=0&&(this.__index__<0||u<this.__index__)&&(r=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(o=r.index+r[1].length,(this.__index__<0||o<this.__index__)&&(this.__schema__="",this.__index__=o,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(c=e.indexOf("@"),c>=0&&(i=e.match(this.re.email_fuzzy))!==null&&(o=i.index+i[1].length,a=i.index+i[0].length,(this.__index__<0||o<this.__index__||o===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=o,this.__last_index__=a))),this.__index__>=0};ct.prototype.pretest=function(e){return this.re.pretest.test(e)};ct.prototype.testSchemaAt=function(e,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(e,r,this):0};ct.prototype.match=function(e){const n=[];let r=0;this.__index__>=0&&this.__text_cache__===e&&(n.push(fl(this,r)),r=this.__last_index__);let i=r?e.slice(r):e;for(;this.test(i);)n.push(fl(this,r)),i=i.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};ct.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const n=this.re.schema_at_start.exec(e);if(!n)return null;const r=this.testSchemaAt(e,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,fl(this,0)):null};ct.prototype.tlds=function(e,n){return e=Array.isArray(e)?e:[e],n?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(r,i,s){return r!==s[i-1]}).reverse(),js(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,js(this),this)};ct.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)};ct.prototype.onCompile=function(){};const ar=2147483647,Tt=36,cu=1,si=26,qA=38,WA=700,j0=72,Z0=128,Y0="-",VA=/^xn--/,KA=/[^\0-\x7F]/,GA=/[\x2E\u3002\uFF0E\uFF61]/g,jA={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ea=Tt-cu,Mt=Math.floor,ka=String.fromCharCode;function nn(t){throw new RangeError(jA[t])}function ZA(t,e){const n=[];let r=t.length;for(;r--;)n[r]=e(t[r]);return n}function J0(t,e){const n=t.split("@");let r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(GA,".");const i=t.split("."),s=ZA(i,e).join(".");return r+s}function X0(t){const e=[];let n=0;const r=t.length;for(;n<r;){const i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){const s=t.charCodeAt(n++);(s&64512)==56320?e.push(((i&1023)<<10)+(s&1023)+65536):(e.push(i),n--)}else e.push(i)}return e}const YA=t=>String.fromCodePoint(...t),JA=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:Tt},Gd=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Q0=function(t,e,n){let r=0;for(t=n?Mt(t/WA):t>>1,t+=Mt(t/e);t>Ea*si>>1;r+=Tt)t=Mt(t/Ea);return Mt(r+(Ea+1)*t/(t+qA))},em=function(t){const e=[],n=t.length;let r=0,i=Z0,s=j0,o=t.lastIndexOf(Y0);o<0&&(o=0);for(let a=0;a<o;++a)t.charCodeAt(a)>=128&&nn("not-basic"),e.push(t.charCodeAt(a));for(let a=o>0?o+1:0;a<n;){const l=r;for(let c=1,d=Tt;;d+=Tt){a>=n&&nn("invalid-input");const f=JA(t.charCodeAt(a++));f>=Tt&&nn("invalid-input"),f>Mt((ar-r)/c)&&nn("overflow"),r+=f*c;const h=d<=s?cu:d>=s+si?si:d-s;if(f<h)break;const p=Tt-h;c>Mt(ar/p)&&nn("overflow"),c*=p}const u=e.length+1;s=Q0(r-l,u,l==0),Mt(r/u)>ar-i&&nn("overflow"),i+=Mt(r/u),r%=u,e.splice(r++,0,i)}return String.fromCodePoint(...e)},tm=function(t){const e=[];t=X0(t);const n=t.length;let r=Z0,i=0,s=j0;for(const l of t)l<128&&e.push(ka(l));const o=e.length;let a=o;for(o&&e.push(Y0);a<n;){let l=ar;for(const c of t)c>=r&&c<l&&(l=c);const u=a+1;l-r>Mt((ar-i)/u)&&nn("overflow"),i+=(l-r)*u,r=l;for(const c of t)if(c<r&&++i>ar&&nn("overflow"),c===r){let d=i;for(let f=Tt;;f+=Tt){const h=f<=s?cu:f>=s+si?si:f-s;if(d<h)break;const p=d-h,m=Tt-h;e.push(ka(Gd(h+p%m,0))),d=Mt(p/m)}e.push(ka(Gd(d,0))),s=Q0(i,u,a===o),i=0,++a}++i,++r}return e.join("")},XA=function(t){return J0(t,function(e){return VA.test(e)?em(e.slice(4).toLowerCase()):e})},QA=function(t){return J0(t,function(e){return KA.test(e)?"xn--"+tm(e):e})},nm={version:"2.3.1",ucs2:{decode:X0,encode:YA},decode:em,encode:tm,toASCII:QA,toUnicode:XA},e3={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},t3={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},n3={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},r3={default:e3,zero:t3,commonmark:n3},i3=/^(vbscript|javascript|file|data):/,s3=/^data:image\/(gif|png|jpeg|webp);/;function o3(t){const e=t.trim().toLowerCase();return i3.test(e)?s3.test(e):!0}const rm=["http:","https:","mailto:"];function a3(t){const e=iu(t,!0);if(e.hostname&&(!e.protocol||rm.indexOf(e.protocol)>=0))try{e.hostname=nm.toASCII(e.hostname)}catch{}return di(ru(e))}function l3(t){const e=iu(t,!0);if(e.hostname&&(!e.protocol||rm.indexOf(e.protocol)>=0))try{e.hostname=nm.toUnicode(e.hostname)}catch{}return mr(ru(e),mr.defaultChars+"%")}function it(t,e){if(!(this instanceof it))return new it(t,e);e||ou(t)||(e=t||{},t="default"),this.inline=new hi,this.block=new go,this.core=new lu,this.renderer=new yr,this.linkify=new ct,this.validateLink=o3,this.normalizeLink=a3,this.normalizeLinkText=l3,this.utils=cv,this.helpers=po({},pv),this.options={},this.configure(t),e&&this.set(e)}it.prototype.set=function(t){return po(this.options,t),this};it.prototype.configure=function(t){const e=this;if(ou(t)){const n=t;if(t=r3[n],!t)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!t)throw new Error("Wrong `markdown-it` preset, can't be empty");return t.options&&e.set(t.options),t.components&&Object.keys(t.components).forEach(function(n){t.components[n].rules&&e[n].ruler.enableOnly(t.components[n].rules),t.components[n].rules2&&e[n].ruler2.enableOnly(t.components[n].rules2)}),this};it.prototype.enable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(t,!0))},this),n=n.concat(this.inline.ruler2.enable(t,!0));const r=t.filter(function(i){return n.indexOf(i)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};it.prototype.disable=function(t,e){let n=[];Array.isArray(t)||(t=[t]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(t,!0))},this),n=n.concat(this.inline.ruler2.disable(t,!0));const r=t.filter(function(i){return n.indexOf(i)<0});if(r.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};it.prototype.use=function(t){const e=[this].concat(Array.prototype.slice.call(arguments,1));return t.apply(t,e),this};it.prototype.parse=function(t,e){if(typeof t!="string")throw new Error("Input data should be a String");const n=new this.core.State(t,this,e);return this.core.process(n),n.tokens};it.prototype.render=function(t,e){return e=e||{},this.renderer.render(this.parse(t,e),this.options,e)};it.prototype.parseInline=function(t,e){const n=new this.core.State(t,this,e);return n.inlineMode=!0,this.core.process(n),n.tokens};it.prototype.renderInline=function(t,e){return e=e||{},this.renderer.render(this.parseInline(t,e),this.options,e)};const u3=new hl({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(t){return["h"+t.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:t=>({params:t.getAttribute("data-params")||""})}],toDOM(t){return["pre",t.attrs.params?{"data-params":t.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(t){return{order:t.hasAttribute("start")?+t.getAttribute("start"):1,tight:t.hasAttribute("data-tight")}}}],toDOM(t){return["ol",{start:t.attrs.order==1?null:t.attrs.order,"data-tight":t.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:t=>({tight:t.hasAttribute("data-tight")})}],toDOM(t){return["ul",{"data-tight":t.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(t){return{src:t.getAttribute("src"),title:t.getAttribute("title"),alt:t.getAttribute("alt")}}}],toDOM(t){return["img",t.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:t=>t.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name=="strong"},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(t){return{href:t.getAttribute("href"),title:t.getAttribute("title")}}}],toDOM(t){return["a",t.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function c3(t,e){if(t.isText&&e.isText&&te.sameSet(t.marks,e.marks))return t.withText(t.text+e.text)}class d3{constructor(e,n){this.schema=e,this.tokenHandlers=n,this.stack=[{type:e.topNodeType,attrs:null,content:[],marks:te.none}]}top(){return this.stack[this.stack.length-1]}push(e){this.stack.length&&this.top().content.push(e)}addText(e){if(!e)return;let n=this.top(),r=n.content,i=r[r.length-1],s=this.schema.text(e,n.marks),o;i&&(o=c3(i,s))?r[r.length-1]=o:r.push(s)}openMark(e){let n=this.top();n.marks=e.addToSet(n.marks)}closeMark(e){let n=this.top();n.marks=e.removeFromSet(n.marks)}parseTokens(e){for(let n=0;n<e.length;n++){let r=e[n],i=this.tokenHandlers[r.type];if(!i)throw new Error("Token type `"+r.type+"` not supported by Markdown parser");i(this,r,e,n)}}addNode(e,n,r){let i=this.top(),s=e.createAndFill(n,r,i?i.marks:[]);return s?(this.push(s),s):null}openNode(e,n){this.stack.push({type:e,attrs:n,content:[],marks:te.none})}closeNode(){let e=this.stack.pop();return this.addNode(e.type,e.attrs,e.content)}}function vr(t,e,n,r){return t.getAttrs?t.getAttrs(e,n,r):t.attrs instanceof Function?t.attrs(e):t.attrs}function xa(t,e){return t.noCloseToken||e=="code_inline"||e=="code_block"||e=="fence"}function jd(t){return t[t.length-1]==`
263
+ `?t.slice(0,t.length-1):t}function _a(){}function f3(t,e){let n=Object.create(null);for(let r in e){let i=e[r];if(i.block){let s=t.nodeType(i.block);xa(i,r)?n[r]=(o,a,l,u)=>{o.openNode(s,vr(i,a,l,u)),o.addText(jd(a.content)),o.closeNode()}:(n[r+"_open"]=(o,a,l,u)=>o.openNode(s,vr(i,a,l,u)),n[r+"_close"]=o=>o.closeNode())}else if(i.node){let s=t.nodeType(i.node);n[r]=(o,a,l,u)=>o.addNode(s,vr(i,a,l,u))}else if(i.mark){let s=t.marks[i.mark];xa(i,r)?n[r]=(o,a,l,u)=>{o.openMark(s.create(vr(i,a,l,u))),o.addText(jd(a.content)),o.closeMark(s)}:(n[r+"_open"]=(o,a,l,u)=>o.openMark(s.create(vr(i,a,l,u))),n[r+"_close"]=o=>o.closeMark(s))}else if(i.ignore)xa(i,r)?n[r]=_a:(n[r+"_open"]=_a,n[r+"_close"]=_a);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(i))}return n.text=(r,i)=>r.addText(i.content),n.inline=(r,i)=>r.parseTokens(i.children),n.softbreak=n.softbreak||(r=>r.addText(" ")),n}let h3=class{constructor(e,n,r){this.schema=e,this.tokenizer=n,this.tokens=r,this.tokenHandlers=f3(e,r)}parse(e,n={}){let r=new d3(this.schema,this.tokenHandlers),i;r.parseTokens(this.tokenizer.parse(e,n));do i=r.closeNode();while(r.stack.length);return i||this.schema.topNodeType.createAndFill()}};function Zd(t,e){for(;++e<t.length;)if(t[e].type!="list_item_open")return t[e].hidden;return!1}new h3(u3,it("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(t,e,n)=>({tight:Zd(e,n)})},ordered_list:{block:"ordered_list",getAttrs:(t,e,n)=>({order:+t.attrGet("start")||1,tight:Zd(e,n)})},heading:{block:"heading",getAttrs:t=>({level:+t.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:t=>({params:t.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:t=>({src:t.attrGet("src"),title:t.attrGet("title")||null,alt:t.children[0]&&t.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:t=>({href:t.attrGet("href"),title:t.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}});const p3={open:"",close:"",mixable:!0};let m3=class{constructor(e,n,r={}){this.nodes=e,this.marks=n,this.options=r}serialize(e,n={}){n=Object.assign({},this.options,n);let r=new im(this.nodes,this.marks,n);return r.renderContent(e),r.out}};const Lt=new m3({blockquote(t,e){t.wrapBlock("> ",null,e,()=>t.renderContent(e))},code_block(t,e){const n=e.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";t.write(r+(e.attrs.params||"")+`
264
+ `),t.text(e.textContent,!1),t.write(`
265
+ `),t.write(r),t.closeBlock(e)},heading(t,e){t.write(t.repeat("#",e.attrs.level)+" "),t.renderInline(e,!1),t.closeBlock(e)},horizontal_rule(t,e){t.write(e.attrs.markup||"---"),t.closeBlock(e)},bullet_list(t,e){t.renderList(e," ",()=>(e.attrs.bullet||"*")+" ")},ordered_list(t,e){let n=e.attrs.order||1,r=String(n+e.childCount-1).length,i=t.repeat(" ",r+2);t.renderList(e,i,s=>{let o=String(n+s);return t.repeat(" ",r-o.length)+o+". "})},list_item(t,e){t.renderContent(e)},paragraph(t,e){t.renderInline(e),t.closeBlock(e)},image(t,e){t.write("!["+t.esc(e.attrs.alt||"")+"]("+e.attrs.src.replace(/[\(\)]/g,"\\$&")+(e.attrs.title?' "'+e.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(t,e,n,r){for(let i=r+1;i<n.childCount;i++)if(n.child(i).type!=e.type){t.write(`\\
266
+ `);return}},text(t,e){t.text(e.text,!t.inAutolink)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open(t,e,n,r){return t.inAutolink=g3(e,n,r),t.inAutolink?"<":"["},close(t,e,n,r){let{inAutolink:i}=t;return t.inAutolink=void 0,i?">":"]("+e.attrs.href.replace(/[\(\)"]/g,"\\$&")+(e.attrs.title?` "${e.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(t,e,n,r){return Yd(n.child(r),-1)},close(t,e,n,r){return Yd(n.child(r-1),1)},escape:!1}});function Yd(t,e){let n=/`+/g,r,i=0;if(t.isText)for(;r=n.exec(t.text);)i=Math.max(i,r[0].length);let s=i>0&&e>0?" `":"`";for(let o=0;o<i;o++)s+="`";return i>0&&e<0&&(s+=" "),s}function g3(t,e,n){if(t.attrs.title||!/^\w+:/.test(t.attrs.href))return!1;let r=e.child(n);return!r.isText||r.text!=t.attrs.href||r.marks[r.marks.length-1]!=t?!1:n==e.childCount-1||!t.isInSet(e.child(n+1).marks)}let im=class{constructor(e,n,r){this.nodes=e,this.marks=n,this.options=r,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(e=2){if(this.closed){if(this.atBlank()||(this.out+=`
267
+ `),e>1){let n=this.delim,r=/\s+$/.exec(n);r&&(n=n.slice(0,n.length-r[0].length));for(let i=1;i<e;i++)this.out+=n+`
268
+ `}this.closed=null}}getMark(e){let n=this.marks[e];if(!n){if(this.options.strict!==!1)throw new Error(`Mark type \`${e}\` not supported by Markdown renderer`);n=p3}return n}wrapBlock(e,n,r,i){let s=this.delim;this.write(n??e),this.delim+=e,i(),this.delim=s,this.closeBlock(r)}atBlank(){return/(^|\n)$/.test(this.out)}ensureNewLine(){this.atBlank()||(this.out+=`
269
+ `)}write(e){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),e&&(this.out+=e)}closeBlock(e){this.closed=e}text(e,n=!0){let r=e.split(`
270
+ `);for(let i=0;i<r.length;i++)this.write(),!n&&r[i][0]=="["&&/(^|[^\\])\!$/.test(this.out)&&(this.out=this.out.slice(0,this.out.length-1)+"\\!"),this.out+=n?this.esc(r[i],this.atBlockStart):r[i],i!=r.length-1&&(this.out+=`
271
+ `)}render(e,n,r){if(this.nodes[e.type.name])this.nodes[e.type.name](this,e,n,r);else{if(this.options.strict!==!1)throw new Error("Token type `"+e.type.name+"` not supported by Markdown renderer");e.type.isLeaf||(e.type.inlineContent?this.renderInline(e):this.renderContent(e),e.isBlock&&this.closeBlock(e))}}renderContent(e){e.forEach((n,r,i)=>this.render(n,e,i))}renderInline(e,n=!0){this.atBlockStart=n;let r=[],i="",s=(o,a,l)=>{let u=o?o.marks:[];o&&o.type.name===this.options.hardBreakNodeName&&(u=u.filter(m=>{if(l+1==e.childCount)return!1;let g=e.child(l+1);return m.isInSet(g.marks)&&(!g.isText||/\S/.test(g.text))}));let c=i;if(i="",o&&o.isText&&u.some(m=>{let g=this.getMark(m.type.name);return g&&g.expelEnclosingWhitespace&&!m.isInSet(r)})){let[m,g,b]=/^(\s*)(.*)$/m.exec(o.text);g&&(c+=g,o=b?o.withText(b):null,o||(u=r))}if(o&&o.isText&&u.some(m=>{let g=this.getMark(m.type.name);return g&&g.expelEnclosingWhitespace&&!this.isMarkAhead(e,l+1,m)})){let[m,g,b]=/^(.*?)(\s*)$/m.exec(o.text);b&&(i=b,o=g?o.withText(g):null,o||(u=r))}let d=u.length?u[u.length-1]:null,f=d&&this.getMark(d.type.name).escape===!1,h=u.length-(f?1:0);e:for(let m=0;m<h;m++){let g=u[m];if(!this.getMark(g.type.name).mixable)break;for(let b=0;b<r.length;b++){let y=r[b];if(!this.getMark(y.type.name).mixable)break;if(g.eq(y)){m>b?u=u.slice(0,b).concat(g).concat(u.slice(b,m)).concat(u.slice(m+1,h)):b>m&&(u=u.slice(0,m).concat(u.slice(m+1,b)).concat(g).concat(u.slice(b,h)));continue e}}}let p=0;for(;p<Math.min(r.length,h)&&u[p].eq(r[p]);)++p;for(;p<r.length;)this.text(this.markString(r.pop(),!1,e,l),!1);if(c&&this.text(c),o){for(;r.length<h;){let m=u[r.length];r.push(m),this.text(this.markString(m,!0,e,l),!1),this.atBlockStart=!1}f&&o.isText?this.text(this.markString(d,!0,e,l)+o.text+this.markString(d,!1,e,l+1),!1):this.render(o,e,l),this.atBlockStart=!1}o!=null&&o.isText&&o.nodeSize>0&&(this.atBlockStart=!1)};e.forEach(s),s(null,0,e.childCount),this.atBlockStart=!1}renderList(e,n,r){this.closed&&this.closed.type==e.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let i=typeof e.attrs.tight<"u"?e.attrs.tight:this.options.tightLists,s=this.inTightList;this.inTightList=i,e.forEach((o,a,l)=>{l&&i&&this.flushClose(1),this.wrapBlock(n,r(l),e,()=>this.render(o,e,l))}),this.inTightList=s}esc(e,n=!1){return e=e.replace(/[`*\\~\[\]_]/g,(r,i)=>r=="_"&&i>0&&i+1<e.length&&e[i-1].match(/\w/)&&e[i+1].match(/\w/)?r:"\\"+r),n&&(e=e.replace(/^(\+[ ]|[\-*>])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(e=e.replace(this.options.escapeExtraCharacters,"\\$&")),e}quote(e){let n=e.indexOf('"')==-1?'""':e.indexOf("'")==-1?"''":"()";return n[0]+e+n[1]}repeat(e,n){let r="";for(let i=0;i<n;i++)r+=e;return r}markString(e,n,r,i){let s=this.getMark(e.type.name),o=n?s.open:s.close;return typeof o=="string"?o:o(this,e,r,i)}getEnclosingWhitespace(e){return{leading:(e.match(/^(\s+)/)||[void 0])[0],trailing:(e.match(/(\s+)$/)||[void 0])[0]}}isMarkAhead(e,n,r){for(;;n++){if(n>=e.childCount)return!1;let i=e.child(n);if(i.type.name!=this.options.hardBreakNodeName)return r.isInSet(i.marks);n++}}};var wa,Jd;function b3(){if(Jd)return wa;Jd=1;var t=!0,e=!1,n=!1;wa=function(m,g){g&&(t=!g.enabled,e=!!g.label,n=!!g.labelAfter),m.core.ruler.after("inline","github-task-lists",function(b){for(var y=b.tokens,k=2;k<y.length;k++)s(y,k)&&(o(y[k],b.Token),r(y[k-2],"class","task-list-item"+(t?"":" enabled")),r(y[i(y,k-2)],"class","contains-task-list"))})};function r(m,g,b){var y=m.attrIndex(g),k=[g,b];y<0?m.attrPush(k):m.attrs[y]=k}function i(m,g){for(var b=m[g].level-1,y=g-1;y>=0;y--)if(m[y].level===b)return y;return-1}function s(m,g){return d(m[g])&&f(m[g-1])&&h(m[g-2])&&p(m[g])}function o(m,g){if(m.children.unshift(a(m,g)),m.children[1].content=m.children[1].content.slice(3),m.content=m.content.slice(3),e)if(n){m.children.pop();var b="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);m.children[0].content=m.children[0].content.slice(0,-1)+' id="'+b+'">',m.children.push(c(m.content,b,g))}else m.children.unshift(l(g)),m.children.push(u(g))}function a(m,g){var b=new g("html_inline","",0),y=t?' disabled="" ':"";return m.content.indexOf("[ ] ")===0?b.content='<input class="task-list-item-checkbox"'+y+'type="checkbox">':(m.content.indexOf("[x] ")===0||m.content.indexOf("[X] ")===0)&&(b.content='<input class="task-list-item-checkbox" checked=""'+y+'type="checkbox">'),b}function l(m){var g=new m("html_inline","",0);return g.content="<label>",g}function u(m){var g=new m("html_inline","",0);return g.content="</label>",g}function c(m,g,b){var y=new b("html_inline","",0);return y.content='<label class="task-list-item-label" for="'+g+'">'+m+"</label>",y.attrs=[{for:g}],y}function d(m){return m.type==="inline"}function f(m){return m.type==="paragraph_open"}function h(m){return m.type==="list_item_open"}function p(m){return m.content.indexOf("[ ] ")===0||m.content.indexOf("[x] ")===0||m.content.indexOf("[X] ")===0}return wa}var y3=b3();const E3=of(y3);var k3=Object.defineProperty,x3=(t,e,n)=>e in t?k3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Zs=(t,e,n)=>(x3(t,typeof e!="symbol"?e+"":e,n),n);const _3=me.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:t=>t.getAttribute("data-tight")==="true"||!t.querySelector("p"),renderHTML:t=>({class:t.tight?this.options.tightClass:null,"data-tight":t.tight?"true":null})}}}]},addCommands(){var t=this;return{toggleTight:function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:r,commands:i}=n;function s(o){if(!r.isActive(o))return!1;const a=r.getAttributes(o);return i.updateAttributes(o,{tight:e??!(a!=null&&a.tight)})}return t.options.listTypes.some(o=>s(o))}}}}}),Xd=it();function sm(t,e){return Xd.inline.State.prototype.scanDelims.call({src:t,posMax:t.length}),new Xd.inline.State(t,null,null,[]).scanDelims(e,!0)}function om(t,e,n,r){let i=t.substring(0,n)+t.substring(n+e.length);return i=i.substring(0,n+r)+e+i.substring(n+r),i}function w3(t,e,n,r){let i=n,s=t;for(;i<r&&!sm(s,i).can_open;)s=om(s,e,i,1),i++;return{text:s,from:i,to:r}}function C3(t,e,n,r){let i=r,s=t;for(;i>n&&!sm(s,i).can_close;)s=om(s,e,i,-1),i--;return{text:s,from:n,to:i}}function S3(t,e,n,r){let i={text:t,from:n,to:r};return i=w3(i.text,e,i.from,i.to),i=C3(i.text,e,i.from,i.to),i.to-i.from<e.length+1&&(i.text=i.text.substring(0,i.from)+i.text.substring(i.to+e.length)),i.text}class v3 extends im{constructor(e,n,r){super(e,n,r??{}),Zs(this,"inTable",!1),this.inlines=[]}render(e,n,r){super.render(e,n,r);const i=this.inlines[this.inlines.length-1];if(i!=null&&i.start&&i!==null&&i!==void 0&&i.end){const{delimiter:s,start:o,end:a}=this.normalizeInline(i);this.out=S3(this.out,s,o,a),this.inlines.pop()}}markString(e,n,r,i){const s=this.marks[e.type.name];if(s.expelEnclosingWhitespace)if(n)this.inlines.push({start:this.out.length,delimiter:s.open});else{const o=this.inlines.pop();this.inlines.push({...o,end:this.out.length})}return super.markString(e,n,r,i)}normalizeInline(e){let{start:n,end:r}=e;for(;this.out.charAt(n).match(/\s/);)n++;return{...e,start:n}}}const am=st.create({name:"markdownHTMLMark",addStorage(){return{markdown:{serialize:{open(t,e){var n,r;return this.editor.storage.markdown.options.html?(n=(r=Qd(e))===null||r===void 0?void 0:r[0])!==null&&n!==void 0?n:"":(console.warn(`Tiptap Markdown: "${e.type.name}" mark is only available in html mode`),"")},close(t,e){var n,r;return this.editor.storage.markdown.options.html&&(n=(r=Qd(e))===null||r===void 0?void 0:r[1])!==null&&n!==void 0?n:""}},parse:{}}}}});function Qd(t){const e=t.type.schema,n=e.text(" ",[t]),i=ui(v.from(n),e).match(/^(<.*?>) (<\/.*?>)$/);return i?[i[1],i[2]]:null}function du(t){const e=`<body>${t}</body>`;return new window.DOMParser().parseFromString(e,"text/html").body}function A3(t){return t==null?void 0:t.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function T3(t){const e=t.parentElement,n=e.cloneNode();for(;e.firstChild&&e.firstChild!==t;)n.appendChild(e.firstChild);n.childNodes.length>0&&e.parentElement.insertBefore(n,e),e.parentElement.insertBefore(t,e),e.childNodes.length===0&&e.remove()}function M3(t){const e=t.parentNode;for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t)}const yo=X.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(t,e,n){this.editor.storage.markdown.options.html?t.write(N3(e,n)):(console.warn(`Tiptap Markdown: "${e.type.name}" node is only available in html mode`),t.write(`[${e.type.name}]`)),e.isBlock&&t.closeBlock(e)},parse:{}}}}});function N3(t,e){const n=t.type.schema,r=ui(v.from(t),n);return t.isBlock&&(e instanceof v||e.type.name===n.topNodeType.name)?O3(r):r}function O3(t){const n=du(t).firstElementChild;return n.innerHTML=n.innerHTML.trim()?`
272
+ ${n.innerHTML}
273
+ `:`
274
+ `,n.outerHTML}const D3=X.create({name:"blockquote"}),R3=D3.extend({addStorage(){return{markdown:{serialize:Lt.nodes.blockquote,parse:{}}}}}),I3=X.create({name:"bulletList"}),lm=I3.extend({addStorage(){return{markdown:{serialize(t,e){return t.renderList(e," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),L3=X.create({name:"codeBlock"}),P3=L3.extend({addStorage(){return{markdown:{serialize(t,e){t.write("```"+(e.attrs.language||"")+`
275
+ `),t.text(e.textContent,!1),t.ensureNewLine(),t.write("```"),t.closeBlock(e)},parse:{setup(t){var e;t.set({langPrefix:(e=this.options.languageClassPrefix)!==null&&e!==void 0?e:"language-"})},updateDOM(t){t.innerHTML=t.innerHTML.replace(/\n<\/code><\/pre>/g,"</code></pre>")}}}}}}),B3=X.create({name:"hardBreak"}),um=B3.extend({addStorage(){return{markdown:{serialize(t,e,n,r){for(let i=r+1;i<n.childCount;i++)if(n.child(i).type!=e.type){t.write(t.inTable?yo.storage.markdown.serialize.call(this,t,e,n):`\\
276
+ `);return}},parse:{}}}}}),F3=X.create({name:"heading"}),z3=F3.extend({addStorage(){return{markdown:{serialize:Lt.nodes.heading,parse:{}}}}}),$3=X.create({name:"horizontalRule"}),H3=$3.extend({addStorage(){return{markdown:{serialize:Lt.nodes.horizontal_rule,parse:{}}}}}),U3=X.create({name:"image"}),q3=U3.extend({addStorage(){return{markdown:{serialize:Lt.nodes.image,parse:{}}}}}),W3=X.create({name:"listItem"}),V3=W3.extend({addStorage(){return{markdown:{serialize:Lt.nodes.list_item,parse:{}}}}}),K3=X.create({name:"orderedList"});function G3(t,e,n){let r=0;for(;n-r>0&&e.child(n-r-1).type.name===t.type.name;r++);return r}const j3=K3.extend({addStorage(){return{markdown:{serialize(t,e,n,r){const i=e.attrs.start||1,s=String(i+e.childCount-1).length,o=t.repeat(" ",s+2),l=G3(e,n,r)%2?") ":". ";t.renderList(e,o,u=>{const c=String(i+u);return t.repeat(" ",s-c.length)+c+l})},parse:{}}}}}),Z3=X.create({name:"paragraph"}),Y3=Z3.extend({addStorage(){return{markdown:{serialize:Lt.nodes.paragraph,parse:{}}}}});function Ca(t){var e,n;return(e=t==null||(n=t.content)===null||n===void 0?void 0:n.content)!==null&&e!==void 0?e:[]}const J3=X.create({name:"table"}),X3=J3.extend({addStorage(){return{markdown:{serialize(t,e,n){if(!Q3(e)){yo.storage.markdown.serialize.call(this,t,e,n);return}t.inTable=!0,e.forEach((r,i,s)=>{if(t.write("| "),r.forEach((o,a,l)=>{l&&t.write(" | ");const u=o.firstChild;u.textContent.trim()&&t.renderInline(u)}),t.write(" |"),t.ensureNewLine(),!s){const o=Array.from({length:r.childCount}).map(()=>"---").join(" | ");t.write(`| ${o} |`),t.ensureNewLine()}}),t.closeBlock(e),t.inTable=!1},parse:{}}}}});function ef(t){return t.attrs.colspan>1||t.attrs.rowspan>1}function Q3(t){const e=Ca(t),n=e[0],r=e.slice(1);return!(Ca(n).some(i=>i.type.name!=="tableHeader"||ef(i)||i.childCount>1)||r.some(i=>Ca(i).some(s=>s.type.name==="tableHeader"||ef(s)||s.childCount>1)))}const eT=X.create({name:"taskItem"}),tT=eT.extend({addStorage(){return{markdown:{serialize(t,e){const n=e.attrs.checked?"[x]":"[ ]";t.write(`${n} `),t.renderContent(e)},parse:{updateDOM(t){[...t.querySelectorAll(".task-list-item")].forEach(e=>{const n=e.querySelector("input");e.setAttribute("data-type","taskItem"),n&&(e.setAttribute("data-checked",n.checked),n.remove())})}}}}}}),nT=X.create({name:"taskList"}),rT=nT.extend({addStorage(){return{markdown:{serialize:lm.storage.markdown.serialize,parse:{setup(t){t.use(E3)},updateDOM(t){[...t.querySelectorAll(".contains-task-list")].forEach(e=>{e.setAttribute("data-type","taskList")})}}}}}}),iT=X.create({name:"text"}),sT=iT.extend({addStorage(){return{markdown:{serialize(t,e){t.text(A3(e.text))},parse:{}}}}}),oT=st.create({name:"bold"}),aT=oT.extend({addStorage(){return{markdown:{serialize:Lt.marks.strong,parse:{}}}}}),lT=st.create({name:"code"}),uT=lT.extend({addStorage(){return{markdown:{serialize:Lt.marks.code,parse:{}}}}}),cT=st.create({name:"italic"}),dT=cT.extend({addStorage(){return{markdown:{serialize:Lt.marks.em,parse:{}}}}}),fT=st.create({name:"link"}),hT=fT.extend({addStorage(){return{markdown:{serialize:Lt.marks.link,parse:{}}}}}),pT=st.create({name:"strike"}),mT=pT.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),gT=[R3,lm,P3,um,z3,H3,yo,q3,V3,j3,Y3,X3,tT,rT,sT,aT,uT,am,dT,hT,mT];function Ys(t){var e,n;const r=(e=t.storage)===null||e===void 0?void 0:e.markdown,i=(n=gT.find(s=>s.name===t.name))===null||n===void 0?void 0:n.storage.markdown;return r||i?{...i,...r}:null}class bT{constructor(e){Zs(this,"editor",null),this.editor=e}serialize(e){const n=new v3(this.nodes,this.marks,{hardBreakNodeName:um.name});return n.renderContent(e),n.out}get nodes(){var e;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(n=>[n,this.serializeNode(yo)])),...Object.fromEntries((e=this.editor.extensionManager.extensions.filter(n=>n.type==="node"&&this.serializeNode(n)).map(n=>[n.name,this.serializeNode(n)]))!==null&&e!==void 0?e:[])}}get marks(){var e;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(n=>[n,this.serializeMark(am)])),...Object.fromEntries((e=this.editor.extensionManager.extensions.filter(n=>n.type==="mark"&&this.serializeMark(n)).map(n=>[n.name,this.serializeMark(n)]))!==null&&e!==void 0?e:[])}}serializeNode(e){var n;return(n=Ys(e))===null||n===void 0||(n=n.serialize)===null||n===void 0?void 0:n.bind({editor:this.editor,options:e.options})}serializeMark(e){var n;const r=(n=Ys(e))===null||n===void 0?void 0:n.serialize;return r?{...r,open:typeof r.open=="function"?r.open.bind({editor:this.editor,options:e.options}):r.open,close:typeof r.close=="function"?r.close.bind({editor:this.editor,options:e.options}):r.close}:null}}class yT{constructor(e,n){Zs(this,"editor",null),Zs(this,"md",null);let{html:r,linkify:i,breaks:s}=n;this.editor=e,this.md=this.withPatchedRenderer(it({html:r,linkify:i,breaks:s}))}parse(e){let{inline:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string"){this.editor.extensionManager.extensions.forEach(s=>{var o;return(o=Ys(s))===null||o===void 0||(o=o.parse)===null||o===void 0||(o=o.setup)===null||o===void 0?void 0:o.call({editor:this.editor,options:s.options},this.md)});const r=this.md.render(e),i=du(r);return this.editor.extensionManager.extensions.forEach(s=>{var o;return(o=Ys(s))===null||o===void 0||(o=o.parse)===null||o===void 0||(o=o.updateDOM)===null||o===void 0?void 0:o.call({editor:this.editor,options:s.options},i)}),this.normalizeDOM(i,{inline:n,content:e}),i.innerHTML}return e}normalizeDOM(e,n){let{inline:r,content:i}=n;return this.normalizeBlocks(e),e.querySelectorAll("*").forEach(s=>{var o;((o=s.nextSibling)===null||o===void 0?void 0:o.nodeType)===Node.TEXT_NODE&&!s.closest("pre")&&(s.nextSibling.textContent=s.nextSibling.textContent.replace(/^\n/,""))}),r&&this.normalizeInline(e,i),e}normalizeBlocks(e){const r=Object.values(this.editor.schema.nodes).filter(i=>i.isBlock).map(i=>{var s;return(s=i.spec.parseDOM)===null||s===void 0?void 0:s.map(o=>o.tag)}).flat().filter(Boolean).join(",");r&&[...e.querySelectorAll(r)].forEach(i=>{i.parentElement.matches("p")&&T3(i)})}normalizeInline(e,n){var r;if((r=e.firstElementChild)!==null&&r!==void 0&&r.matches("p")){var i,s,o,a;const l=e.firstElementChild,{nextElementSibling:u}=l,c=(i=(s=n.match(/^\s+/))===null||s===void 0?void 0:s[0])!==null&&i!==void 0?i:"",d=u?"":(o=(a=n.match(/\s+$/))===null||a===void 0?void 0:a[0])!==null&&o!==void 0?o:"";if(n.match(/^\n\n/)){l.innerHTML=`${l.innerHTML}${d}`;return}M3(l),e.innerHTML=`${c}${e.innerHTML}${d}`}}withPatchedRenderer(e){const n=r=>function(){const i=r(...arguments);return i===`
277
+ `?i:i[i.length-1]===`
278
+ `?i.slice(0,-1):i};return e.renderer.rules.hardbreak=n(e.renderer.rules.hardbreak),e.renderer.rules.softbreak=n(e.renderer.rules.softbreak),e.renderer.rules.fence=n(e.renderer.rules.fence),e.renderer.rules.code_block=n(e.renderer.rules.code_block),e.renderer.renderToken=n(e.renderer.renderToken.bind(e.renderer)),e}}const ET=me.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new le({key:new Ee("markdownClipboard"),props:{clipboardTextParser:(t,e,n)=>{if(n||!this.options.transformPastedText)return null;const r=this.editor.storage.markdown.parser.parse(t,{inline:!0});return Vt.fromSchema(this.editor.schema).parseSlice(du(r),{preserveWhitespace:!0,context:e})},clipboardTextSerializer:t=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(t.content):null}})]}}),kT=me.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){const t=tp.Commands.config.addCommands();return{setContent:(e,n)=>r=>t.setContent(r.editor.storage.markdown.parser.parse(e),n)(r),insertContentAt:(e,n,r)=>i=>t.insertContentAt(e,i.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(i)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new yT(this.editor,this.options),serializer:new bT(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[_3.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),ET.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}}),tf=64,nf=2e3,xT=Kw.extend({name:"image",draggable:!0,addAttributes(){var t;return{...((t=this.parent)==null?void 0:t.call(this))??{},width:{default:null,parseHTML:e=>{const n=e.getAttribute("width");if(n){const i=parseInt(n,10);return Number.isFinite(i)?i:null}const r=e.style.width;if(r&&r.endsWith("px")){const i=parseInt(r,10);return Number.isFinite(i)?i:null}return null},renderHTML:e=>e.width?{width:String(e.width)}:{}},align:{default:"left",parseHTML:e=>{const n=e.getAttribute("data-align");return n==="left"||n==="center"||n==="right"?n:e.style.marginLeft==="auto"&&e.style.marginRight==="auto"?"center":e.style.marginLeft==="auto"?"right":"left"},renderHTML:e=>({"data-align":e.align??"left"})}}},addNodeView(){return qx(_T)}});function _T({node:t,updateAttributes:e,selected:n}){const r=ne.useRef(null),i=ne.useRef(null),[s,o]=ne.useState(!1),a=t.attrs.src??"",l=t.attrs.alt??"",u=t.attrs.title??void 0,c=t.attrs.width,d=t.attrs.align??"left";ne.useEffect(()=>{if(!s)return;const h=m=>{const g=i.current;if(!g)return;const b=m.clientX-g.x,y=Math.max(tf,Math.min(nf,g.width+b));e({width:Math.round(y)})},p=()=>{i.current=null,o(!1)};return window.addEventListener("pointermove",h),window.addEventListener("pointerup",p),window.addEventListener("pointercancel",p),()=>{window.removeEventListener("pointermove",h),window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p)}},[s,e]);const f=h=>{var p;h.preventDefault(),h.stopPropagation();const m=(p=r.current)==null?void 0:p.querySelector("img"),g=c??(m==null?void 0:m.getBoundingClientRect().width)??320;i.current={x:h.clientX,width:g},o(!0)};return I.jsxs(Bx,{ref:r,"data-resizable-image":"","data-selected":n?"true":void 0,className:Qi("relative block max-w-full align-baseline","[&>img]:block [&>img]:max-w-full [&>img]:h-auto [&>img]:rounded-md",d==="left"&&"mr-auto",d==="center"&&"mx-auto",d==="right"&&"ml-auto",n&&"ring-2 ring-[color:var(--accent)] ring-offset-1 ring-offset-background"),style:{width:c?`${c}px`:void 0},children:[I.jsx("img",{src:a,alt:l,title:u,draggable:!1}),I.jsx("span",{role:"slider","aria-label":"Resize image","aria-valuenow":c??0,"aria-valuemin":tf,"aria-valuemax":nf,"data-testid":"resize-handle",onPointerDown:f,className:Qi("absolute right-0 bottom-0 h-3 w-3 translate-x-1/2 translate-y-1/2 cursor-nwse-resize","rounded-full border border-background bg-[color:var(--accent)] shadow","opacity-0 transition-opacity duration-150 ease-out",(n||s)&&"opacity-100")})]})}const wT=_S(kS),CT=[/<script[\s>][\s\S]*?<\/script>/gi,/<iframe[\s>][\s\S]*?<\/iframe>/gi,/\s+on\w+\s*=\s*["'][^"']*["']/gi,/\s+on\w+\s*=\s*\S+/gi,/href\s*=\s*["']?\s*javascript:[^"'\s>]*/gi,/src\s*=\s*["']?\s*javascript:[^"'\s>]*/gi];function ST(t){let e=t;for(const n of CT)e=e.replace(n,"");return e}const rf=[A2.configure({codeBlock:!1,link:!1,underline:!1}),e2,P_.configure({openOnClick:!0,autolink:!0,linkOnPaste:!0,defaultProtocol:"https",HTMLAttributes:{rel:"noopener noreferrer nofollow",target:"_blank"}}),Qp.configure({placeholder:"Start writing..."}),T2,M2.configure({nested:!0}),O2.configure({types:["heading","paragraph"]}),L2,h0.configure({resizable:!0}),f0,d0,c0,xT.configure({inline:!1,allowBase64:!0}),Qw.configure({lowlight:wT}),kT.configure({html:!0,transformPastedText:!0,transformCopiedText:!0})];function Ne({onClick:t,active:e,disabled:n,title:r,children:i}){return I.jsx(Vm,{type:"button",size:"icon-xs",onClick:t,disabled:n,title:r,"aria-pressed":e,className:Qi("text-muted-foreground/70",e&&"bg-[color:var(--accent-soft)] text-[color:var(--accent)]"),children:i})}function Ar(){return I.jsx(Km,{className:"mx-2 h-3.5"})}function sf(t){const e=t.trim().toLowerCase();return!e.startsWith("javascript:")&&!e.startsWith("data:text/html")}function vT(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=()=>e(r.result),r.onerror=()=>n(r.error??new Error("Read failed")),r.readAsDataURL(t)})}function AT({editor:t}){const e=l=>{if(t){if(t.isActive("image")){t.chain().focus().updateAttributes("image",{align:l}).run();return}t.chain().focus().setTextAlign(l).run()}},n=ne.useRef(null),r=yp({editor:t,selector:({editor:l})=>l?{bold:l.isActive("bold"),italic:l.isActive("italic"),underline:l.isActive("underline"),strike:l.isActive("strike"),h1:l.isActive("heading",{level:1}),h2:l.isActive("heading",{level:2}),h3:l.isActive("heading",{level:3}),bulletList:l.isActive("bulletList"),orderedList:l.isActive("orderedList"),taskList:l.isActive("taskList"),blockquote:l.isActive("blockquote"),codeBlock:l.isActive("codeBlock"),link:l.isActive("link"),highlight:l.isActive("highlight"),alignLeft:l.isActive("image")?(l.getAttributes("image").align??"left")==="left":l.isActive({textAlign:"left"}),alignCenter:l.isActive("image")?l.getAttributes("image").align==="center":l.isActive({textAlign:"center"}),alignRight:l.isActive("image")?l.getAttributes("image").align==="right":l.isActive({textAlign:"right"})}:null});if(!t||!r)return null;const i=()=>{const l=window.prompt("URL:");l&&sf(l)&&t.chain().focus().extendMarkRange("link").setLink({href:l}).run()},s=()=>{const l=window.prompt("Image URL:");l&&sf(l)&&t.chain().focus().setImage({src:l}).run()},o=l=>{var u;if(l!=null&&l.shiftKey){s();return}(u=n.current)==null||u.click()},a=async l=>{var u;const c=(u=l.target.files)==null?void 0:u[0];if(l.target.value="",!(!c||!c.type.startsWith("image/")))try{const d=await vT(c);t.chain().focus().setImage({src:d,alt:c.name}).run()}catch{}};return I.jsxs(Um,{className:"border-b border-border/60 bg-background px-3 py-1.5","aria-label":"Formatting toolbar",children:[I.jsx(Ne,{onClick:()=>t.chain().focus().toggleBold().run(),active:r.bold,title:"Bold",children:I.jsx(Jm,{className:"h-4 w-4"})}),I.jsx(Ne,{onClick:()=>t.chain().focus().toggleItalic().run(),active:r.italic,title:"Italic",children:I.jsx(ug,{className:"h-4 w-4"})}),I.jsx(Ne,{onClick:()=>t.chain().focus().toggleUnderline().run(),active:r.underline,title:"Underline",children:I.jsx(Og,{className:"h-4 w-4"})}),I.jsx(Ne,{onClick:()=>t.chain().focus().toggleStrike().run(),active:r.strike,title:"Strikethrough",children:I.jsx(wg,{className:"h-4 w-4"})}),I.jsx(Ar,{}),I.jsx(Ne,{onClick:()=>t.chain().focus().toggleHeading({level:1}).run(),active:r.h1,title:"Heading 1",children:I.jsx(tg,{className:"h-4 w-4"})}),I.jsx(Ne,{onClick:()=>t.chain().focus().toggleHeading({level:2}).run(),active:r.h2,title:"Heading 2",children:I.jsx(rg,{className:"h-4 w-4"})}),I.jsx(Ne,{onClick:()=>t.chain().focus().toggleHeading({level:3}).run(),active:r.h3,title:"Heading 3",children:I.jsx(sg,{className:"h-4 w-4"})}),I.jsx(Ar,{}),I.jsx(Ne,{onClick:()=>t.chain().focus().toggleBulletList().run(),active:r.bulletList,title:"Bullet list",children:I.jsx(bg,{className:"h-4 w-4"})}),I.jsx(Ne,{onClick:()=>t.chain().focus().toggleOrderedList().run(),active:r.orderedList,title:"Ordered list",children:I.jsx(mg,{className:"h-4 w-4"})}),I.jsx(Ne,{onClick:()=>t.chain().focus().toggleTaskList().run(),active:r.taskList,title:"Task list",children:I.jsx(hg,{className:"h-4 w-4"})}),I.jsx(Ar,{}),I.jsx(Ne,{onClick:()=>t.chain().focus().toggleBlockquote().run(),active:r.blockquote,title:"Quote",children:I.jsx(xg,{className:"h-4 w-4"})}),I.jsx(Ne,{onClick:()=>t.chain().focus().toggleCodeBlock().run(),active:r.codeBlock,title:"Code block",children:I.jsx(Qm,{className:"h-4 w-4"})}),I.jsx(Ne,{onClick:i,active:r.link,title:"Link",children:I.jsx(dg,{className:"h-4 w-4"})}),I.jsx(Ne,{onClick:o,title:"Image (click to upload, Shift+click for URL)",children:I.jsx(qm,{className:"h-4 w-4"})}),I.jsx(Wm,{ref:n,"data-testid":"image-file-input",type:"file",accept:"image/*",className:"hidden",onChange:a}),I.jsx(Ne,{onClick:()=>t.chain().focus().toggleHighlight().run(),active:r.highlight,title:"Highlight",children:I.jsx(ag,{className:"h-4 w-4"})}),I.jsx(Ar,{}),I.jsx(Ne,{onClick:()=>e("left"),active:r.alignLeft,title:"Align left",children:I.jsx(Mg,{className:"h-4 w-4"})}),I.jsx(Ne,{onClick:()=>e("center"),active:r.alignCenter,title:"Center align",children:I.jsx(Sg,{className:"h-4 w-4"})}),I.jsx(Ne,{onClick:()=>e("right"),active:r.alignRight,title:"Align right",children:I.jsx(Ag,{className:"h-4 w-4"})}),I.jsx(Ar,{}),I.jsx(Ne,{onClick:()=>t.chain().focus().setHorizontalRule().run(),title:"Horizontal rule",children:I.jsx(Eg,{className:"h-4 w-4"})})]})}function LT({content:t,onChange:e,readOnly:n=!1,placeholder:r,className:i}){const s=ne.useRef(e);s.current=e;const o=ne.useRef(!1),a=Lx({extensions:r?[...rf.filter(l=>l.name!=="placeholder"),Qp.configure({placeholder:r})]:rf,content:t,editable:!n,editorProps:{attributes:{class:"tiptap-prose max-w-[68ch] px-8 py-6 focus:outline-none min-h-[200px]"},transformPastedHTML:ST},onUpdate:({editor:l})=>{var u,c,d;o.current||(d=s.current)==null||d.call(s,((c=(u=l.storage.markdown)==null?void 0:u.getMarkdown)==null?void 0:c.call(u))??l.getHTML())}});return ne.useEffect(()=>{!a||a.isDestroyed||a.setEditable(!n)},[a,n]),ne.useEffect(()=>{var l,u;!a||a.isDestroyed||(((u=(l=a.storage.markdown)==null?void 0:l.getMarkdown)==null?void 0:u.call(l))??a.getHTML())===t||(o.current=!0,a.commands.setContent(t),o.current=!1)},[a,t]),I.jsxs("div",{className:Qi("flex h-full flex-col overflow-hidden",i),children:[!n&&I.jsx(AT,{editor:a}),I.jsx("div",{className:"flex-1 overflow-auto",children:I.jsx(bp,{editor:a})})]})}export{LT as MarkdownEditor,sf as isSafeUrl,vT as readFileAsDataUrl,ST as sanitizeHtml};