@notectl/core 2.1.2 → 2.2.1

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 (1544) hide show
  1. package/dist/chunks/AlignmentPlugin-BLzRjrUl.mjs +2 -0
  2. package/dist/chunks/AlignmentPlugin-BLzRjrUl.mjs.map +1 -0
  3. package/dist/chunks/AttrRegistry-CRnXTPha.mjs +2 -0
  4. package/dist/chunks/AttrRegistry-CRnXTPha.mjs.map +1 -0
  5. package/dist/chunks/AttributedMarkCommands-CxhdUsuE.mjs +2 -0
  6. package/dist/chunks/AttributedMarkCommands-CxhdUsuE.mjs.map +1 -0
  7. package/dist/chunks/BidiIsolationPlugin-DNPXe5ga.mjs +2 -0
  8. package/dist/chunks/BidiIsolationPlugin-DNPXe5ga.mjs.map +1 -0
  9. package/dist/chunks/BlockInsertion-C7jFEeYB.mjs +2 -0
  10. package/dist/chunks/BlockInsertion-C7jFEeYB.mjs.map +1 -0
  11. package/dist/chunks/BlockTypePickerRegistry-U4uY7-lN.mjs +2 -0
  12. package/dist/chunks/BlockTypePickerRegistry-U4uY7-lN.mjs.map +1 -0
  13. package/dist/chunks/BlockquotePlugin-YgXcV4mT.mjs +2 -0
  14. package/dist/chunks/BlockquotePlugin-YgXcV4mT.mjs.map +1 -0
  15. package/dist/chunks/CaretNavigationPlugin-P6OYaTSq.mjs +2 -0
  16. package/dist/chunks/CaretNavigationPlugin-P6OYaTSq.mjs.map +1 -0
  17. package/dist/chunks/CodeBlockPlugin-ChPv3Edf.mjs +2 -0
  18. package/dist/chunks/CodeBlockPlugin-ChPv3Edf.mjs.map +1 -0
  19. package/dist/chunks/ColorGrid-D5-teEjD.mjs +2 -0
  20. package/dist/chunks/ColorGrid-D5-teEjD.mjs.map +1 -0
  21. package/dist/chunks/ColorPickerPopup-_Gp09pdx.mjs +2 -0
  22. package/dist/chunks/ColorPickerPopup-_Gp09pdx.mjs.map +1 -0
  23. package/dist/chunks/ColorValidation-okAvytHQ.mjs +2 -0
  24. package/dist/chunks/ColorValidation-okAvytHQ.mjs.map +1 -0
  25. package/dist/chunks/CommandHelpers-NV80Ff1G.mjs +2 -0
  26. package/dist/chunks/CommandHelpers-NV80Ff1G.mjs.map +1 -0
  27. package/dist/chunks/Commands-ixGhPiRG.mjs +2 -0
  28. package/dist/chunks/Commands-ixGhPiRG.mjs.map +1 -0
  29. package/dist/chunks/Decoration-DZK7hrL1.mjs +2 -0
  30. package/dist/chunks/Decoration-DZK7hrL1.mjs.map +1 -0
  31. package/dist/chunks/DirectionDetection-7HmMUZrx.mjs +2 -0
  32. package/dist/chunks/DirectionDetection-7HmMUZrx.mjs.map +1 -0
  33. package/dist/chunks/DirectionIcons-DhRvPVoz.mjs +2 -0
  34. package/dist/chunks/DirectionIcons-DhRvPVoz.mjs.map +1 -0
  35. package/dist/chunks/Document-znhIcvM9.mjs +2 -0
  36. package/dist/chunks/Document-znhIcvM9.mjs.map +1 -0
  37. package/dist/chunks/DocumentParser-DCjOW3us.mjs +2 -0
  38. package/dist/chunks/DocumentParser-DCjOW3us.mjs.map +1 -0
  39. package/dist/chunks/FontPlugin-COYtG1Uo.mjs +2 -0
  40. package/dist/chunks/FontPlugin-COYtG1Uo.mjs.map +1 -0
  41. package/dist/chunks/FontSizePlugin-CLcfdTm3.mjs +2 -0
  42. package/dist/chunks/FontSizePlugin-CLcfdTm3.mjs.map +1 -0
  43. package/dist/chunks/FormulaPlugin-DphHU4Rn.mjs +2 -0
  44. package/dist/chunks/FormulaPlugin-DphHU4Rn.mjs.map +1 -0
  45. package/dist/chunks/GapCursorNavigation-Bkuu_Ek8.mjs +2 -0
  46. package/dist/chunks/GapCursorNavigation-Bkuu_Ek8.mjs.map +1 -0
  47. package/dist/chunks/GapCursorPlugin-CRDmQEi1.mjs +2 -0
  48. package/dist/chunks/GapCursorPlugin-CRDmQEi1.mjs.map +1 -0
  49. package/dist/chunks/HardBreakPlugin-Cr6dMQ-H.mjs +2 -0
  50. package/dist/chunks/HardBreakPlugin-Cr6dMQ-H.mjs.map +1 -0
  51. package/dist/chunks/HeadingPlugin-3NL4ARPp.mjs +2 -0
  52. package/dist/chunks/HeadingPlugin-3NL4ARPp.mjs.map +1 -0
  53. package/dist/chunks/HighlightPlugin-dHxnAuoW.mjs +2 -0
  54. package/dist/chunks/HighlightPlugin-dHxnAuoW.mjs.map +1 -0
  55. package/dist/chunks/HorizontalRulePlugin-BYPaI4TR.mjs +2 -0
  56. package/dist/chunks/HorizontalRulePlugin-BYPaI4TR.mjs.map +1 -0
  57. package/dist/chunks/ImagePlugin-kgokm-a1.mjs +2 -0
  58. package/dist/chunks/ImagePlugin-kgokm-a1.mjs.map +1 -0
  59. package/dist/chunks/InlineCodePlugin-Bl1jyDwk.mjs +2 -0
  60. package/dist/chunks/InlineCodePlugin-Bl1jyDwk.mjs.map +1 -0
  61. package/dist/chunks/InlineStyleMarkSpec-Cc-b1tlm.mjs +2 -0
  62. package/dist/chunks/InlineStyleMarkSpec-Cc-b1tlm.mjs.map +1 -0
  63. package/dist/chunks/KeyboardNav-DZXdTg-_.mjs +2 -0
  64. package/dist/chunks/KeyboardNav-DZXdTg-_.mjs.map +1 -0
  65. package/dist/chunks/LinkPlugin-Dmcfo3On.mjs +2 -0
  66. package/dist/chunks/LinkPlugin-Dmcfo3On.mjs.map +1 -0
  67. package/dist/chunks/ListPlugin-Ch-5CsFc.mjs +2 -0
  68. package/dist/chunks/ListPlugin-Ch-5CsFc.mjs.map +1 -0
  69. package/dist/chunks/NavigationQueries-3zTaNBlp.mjs +2 -0
  70. package/dist/chunks/NavigationQueries-3zTaNBlp.mjs.map +1 -0
  71. package/dist/chunks/NodeResolver-BplmzA7c.mjs +2 -0
  72. package/dist/chunks/NodeResolver-BplmzA7c.mjs.map +1 -0
  73. package/dist/chunks/NodeSelectionCommands-dUmbRoZ2.mjs +2 -0
  74. package/dist/chunks/NodeSelectionCommands-dUmbRoZ2.mjs.map +1 -0
  75. package/dist/chunks/NodeSpecPatching-DToX09gc.mjs +2 -0
  76. package/dist/chunks/NodeSpecPatching-DToX09gc.mjs.map +1 -0
  77. package/dist/chunks/Platform-wPvKFB9m.mjs +2 -0
  78. package/dist/chunks/Platform-wPvKFB9m.mjs.map +1 -0
  79. package/dist/chunks/PluginHelpers-C3aCCGfX.mjs +2 -0
  80. package/dist/chunks/PluginHelpers-C3aCCGfX.mjs.map +1 -0
  81. package/dist/chunks/PopupKeyboardPatterns-ZdAQB78m.mjs +2 -0
  82. package/dist/chunks/PopupKeyboardPatterns-ZdAQB78m.mjs.map +1 -0
  83. package/dist/chunks/PopupManager-DsT1uRWi.mjs +2 -0
  84. package/dist/chunks/PopupManager-DsT1uRWi.mjs.map +1 -0
  85. package/dist/chunks/PopupPositioning-BEnz90Oh.mjs +2 -0
  86. package/dist/chunks/PopupPositioning-BEnz90Oh.mjs.map +1 -0
  87. package/dist/chunks/PrintPlugin-Bq-Z14K1.mjs +2 -0
  88. package/dist/chunks/PrintPlugin-Bq-Z14K1.mjs.map +1 -0
  89. package/dist/chunks/PrintTypes-DA0Cc--M.mjs +2 -0
  90. package/dist/chunks/PrintTypes-DA0Cc--M.mjs.map +1 -0
  91. package/dist/chunks/RangeIterator-Cl4_k8cx.mjs +2 -0
  92. package/dist/chunks/RangeIterator-Cl4_k8cx.mjs.map +1 -0
  93. package/dist/chunks/SelectionSync-DCJpNFat.mjs +2 -0
  94. package/dist/chunks/SelectionSync-DCJpNFat.mjs.map +1 -0
  95. package/dist/chunks/ShortcutFormatting-DZK70CN9.mjs +2 -0
  96. package/dist/chunks/ShortcutFormatting-DZK70CN9.mjs.map +1 -0
  97. package/dist/chunks/SimpleMark-CezTJnXh.mjs +2 -0
  98. package/dist/chunks/SimpleMark-CezTJnXh.mjs.map +1 -0
  99. package/dist/chunks/SmartPastePlugin-DlApY6Vw.mjs +2 -0
  100. package/dist/chunks/SmartPastePlugin-DlApY6Vw.mjs.map +1 -0
  101. package/dist/chunks/StrikethroughPlugin-BuFDABvz.mjs +2 -0
  102. package/dist/chunks/StrikethroughPlugin-BuFDABvz.mjs.map +1 -0
  103. package/dist/chunks/StyleRuntime-Bwde5icB.mjs +2 -0
  104. package/dist/chunks/StyleRuntime-Bwde5icB.mjs.map +1 -0
  105. package/dist/chunks/SuperSubPlugin-CiLJ7i4s.mjs +2 -0
  106. package/dist/chunks/SuperSubPlugin-CiLJ7i4s.mjs.map +1 -0
  107. package/dist/chunks/SyntaxTokenTypes-C9dGwufi.mjs +2 -0
  108. package/dist/chunks/SyntaxTokenTypes-C9dGwufi.mjs.map +1 -0
  109. package/dist/chunks/TablePlugin-5ru-y-YX.mjs +2 -0
  110. package/dist/chunks/TablePlugin-5ru-y-YX.mjs.map +1 -0
  111. package/dist/chunks/TextColorPlugin-Vz-Nz8aH.mjs +2 -0
  112. package/dist/chunks/TextColorPlugin-Vz-Nz8aH.mjs.map +1 -0
  113. package/dist/chunks/TextDirectionAutoPlugin-Behl6KMe.mjs +2 -0
  114. package/dist/chunks/TextDirectionAutoPlugin-Behl6KMe.mjs.map +1 -0
  115. package/dist/chunks/TextDirectionPlugin-C3h1n-aA.mjs +2 -0
  116. package/dist/chunks/TextDirectionPlugin-C3h1n-aA.mjs.map +1 -0
  117. package/dist/chunks/TextDirectionService-DRfeQnF6.mjs +2 -0
  118. package/dist/chunks/TextDirectionService-DRfeQnF6.mjs.map +1 -0
  119. package/dist/chunks/TextFormattingPlugin-D_nRMeBn.mjs +2 -0
  120. package/dist/chunks/TextFormattingPlugin-D_nRMeBn.mjs.map +1 -0
  121. package/dist/chunks/ToolbarPlugin-CSMSgjPM.mjs +2 -0
  122. package/dist/chunks/ToolbarPlugin-CSMSgjPM.mjs.map +1 -0
  123. package/dist/chunks/TypedKeys-E3jOGByL.mjs +2 -0
  124. package/dist/chunks/TypedKeys-E3jOGByL.mjs.map +1 -0
  125. package/dist/chunks/VideoPlugin-BUCGIYXr.mjs +2 -0
  126. package/dist/chunks/VideoPlugin-BUCGIYXr.mjs.map +1 -0
  127. package/dist/chunks/WordBoundary-CYDAtEks.mjs +2 -0
  128. package/dist/chunks/WordBoundary-CYDAtEks.mjs.map +1 -0
  129. package/dist/chunks/XmlDetector-DxBGXqua.mjs +2 -0
  130. package/dist/chunks/XmlDetector-DxBGXqua.mjs.map +1 -0
  131. package/dist/chunks/XmlPatterns-BiHS8w3k.mjs +2 -0
  132. package/dist/chunks/XmlPatterns-BiHS8w3k.mjs.map +1 -0
  133. package/dist/chunks/XmlSupport-B_F65M8G.mjs +2 -0
  134. package/dist/chunks/XmlSupport-B_F65M8G.mjs.map +1 -0
  135. package/dist/chunks/ar-B38MlRRN.mjs +2 -0
  136. package/dist/chunks/ar-B38MlRRN.mjs.map +1 -0
  137. package/dist/chunks/ar-BIeE0C5A.mjs +2 -0
  138. package/dist/chunks/ar-BIeE0C5A.mjs.map +1 -0
  139. package/dist/chunks/ar-BK0rFxF_.mjs +2 -0
  140. package/dist/chunks/ar-BK0rFxF_.mjs.map +1 -0
  141. package/dist/chunks/ar-BK4O36ep.mjs +2 -0
  142. package/dist/chunks/ar-BK4O36ep.mjs.map +1 -0
  143. package/dist/chunks/ar-BNUWuZe3.mjs +2 -0
  144. package/dist/chunks/ar-BNUWuZe3.mjs.map +1 -0
  145. package/dist/chunks/ar-BSXH8acw.mjs +2 -0
  146. package/dist/chunks/ar-BSXH8acw.mjs.map +1 -0
  147. package/dist/chunks/ar-BY8yNlGe.mjs +2 -0
  148. package/dist/chunks/ar-BY8yNlGe.mjs.map +1 -0
  149. package/dist/chunks/ar-BgHkduPE.mjs +2 -0
  150. package/dist/chunks/ar-BgHkduPE.mjs.map +1 -0
  151. package/dist/chunks/ar-BnfWtLhK.mjs +2 -0
  152. package/dist/chunks/ar-BnfWtLhK.mjs.map +1 -0
  153. package/dist/chunks/ar-BwCPhCf6.mjs +2 -0
  154. package/dist/chunks/ar-BwCPhCf6.mjs.map +1 -0
  155. package/dist/chunks/ar-Bymjd9Z_.mjs +2 -0
  156. package/dist/chunks/ar-Bymjd9Z_.mjs.map +1 -0
  157. package/dist/chunks/ar-CKPpdJ7F.mjs +2 -0
  158. package/dist/chunks/ar-CKPpdJ7F.mjs.map +1 -0
  159. package/dist/chunks/ar-C_ir5Uf4.mjs +2 -0
  160. package/dist/chunks/ar-C_ir5Uf4.mjs.map +1 -0
  161. package/dist/chunks/ar-CkE6GDVA.mjs +2 -0
  162. package/dist/chunks/ar-CkE6GDVA.mjs.map +1 -0
  163. package/dist/chunks/ar-ClgA1KQM.mjs +2 -0
  164. package/dist/chunks/ar-ClgA1KQM.mjs.map +1 -0
  165. package/dist/chunks/ar-Cm1DOK74.mjs +2 -0
  166. package/dist/chunks/ar-Cm1DOK74.mjs.map +1 -0
  167. package/dist/chunks/ar-CseGhQtS.mjs +2 -0
  168. package/dist/chunks/ar-CseGhQtS.mjs.map +1 -0
  169. package/dist/chunks/ar-D0bqkviV.mjs +2 -0
  170. package/dist/chunks/ar-D0bqkviV.mjs.map +1 -0
  171. package/dist/chunks/ar-D5d185g0.mjs +2 -0
  172. package/dist/chunks/ar-D5d185g0.mjs.map +1 -0
  173. package/dist/chunks/ar-DSwUyX47.mjs +2 -0
  174. package/dist/chunks/ar-DSwUyX47.mjs.map +1 -0
  175. package/dist/chunks/ar-DfSNWZX7.mjs +2 -0
  176. package/dist/chunks/ar-DfSNWZX7.mjs.map +1 -0
  177. package/dist/chunks/ar-Dghtfs46.mjs +2 -0
  178. package/dist/chunks/ar-Dghtfs46.mjs.map +1 -0
  179. package/dist/chunks/ar-DvNKBrJd.mjs +2 -0
  180. package/dist/chunks/ar-DvNKBrJd.mjs.map +1 -0
  181. package/dist/chunks/ar-KNULRI8r.mjs +2 -0
  182. package/dist/chunks/ar-KNULRI8r.mjs.map +1 -0
  183. package/dist/chunks/ar-NtGRavHz.mjs +2 -0
  184. package/dist/chunks/ar-NtGRavHz.mjs.map +1 -0
  185. package/dist/chunks/ar-Y9KjJLX8.mjs +2 -0
  186. package/dist/chunks/ar-Y9KjJLX8.mjs.map +1 -0
  187. package/dist/chunks/ar-odM5gkvw.mjs +2 -0
  188. package/dist/chunks/ar-odM5gkvw.mjs.map +1 -0
  189. package/dist/chunks/color-picker-C89H4SVX.mjs +2 -0
  190. package/dist/chunks/color-picker-C89H4SVX.mjs.map +1 -0
  191. package/dist/chunks/de-B1TXiyll.mjs +2 -0
  192. package/dist/chunks/de-B1TXiyll.mjs.map +1 -0
  193. package/dist/chunks/de-BDRaxLyi.mjs +2 -0
  194. package/dist/chunks/de-BDRaxLyi.mjs.map +1 -0
  195. package/dist/chunks/de-BGOpZ8Ls.mjs +2 -0
  196. package/dist/chunks/de-BGOpZ8Ls.mjs.map +1 -0
  197. package/dist/chunks/de-BfZ5qXWz.mjs +2 -0
  198. package/dist/chunks/de-BfZ5qXWz.mjs.map +1 -0
  199. package/dist/chunks/de-BibufNIa.mjs +2 -0
  200. package/dist/chunks/de-BibufNIa.mjs.map +1 -0
  201. package/dist/chunks/de-BkZqCmzL.mjs +2 -0
  202. package/dist/chunks/de-BkZqCmzL.mjs.map +1 -0
  203. package/dist/chunks/de-BzRd2oyR.mjs +2 -0
  204. package/dist/chunks/de-BzRd2oyR.mjs.map +1 -0
  205. package/dist/chunks/de-C4gnHDmk.mjs +2 -0
  206. package/dist/chunks/de-C4gnHDmk.mjs.map +1 -0
  207. package/dist/chunks/de-C4iw9SEp.mjs +2 -0
  208. package/dist/chunks/de-C4iw9SEp.mjs.map +1 -0
  209. package/dist/chunks/de-CLWzcDoW.mjs +2 -0
  210. package/dist/chunks/de-CLWzcDoW.mjs.map +1 -0
  211. package/dist/chunks/de-Cbv0otYM.mjs +2 -0
  212. package/dist/chunks/de-Cbv0otYM.mjs.map +1 -0
  213. package/dist/chunks/de-Cinp7zmo.mjs +2 -0
  214. package/dist/chunks/de-Cinp7zmo.mjs.map +1 -0
  215. package/dist/chunks/de-CvnyjI_X.mjs +2 -0
  216. package/dist/chunks/de-CvnyjI_X.mjs.map +1 -0
  217. package/dist/chunks/de-DCx3Shj3.mjs +2 -0
  218. package/dist/chunks/de-DCx3Shj3.mjs.map +1 -0
  219. package/dist/chunks/de-Dav2GzjV.mjs +2 -0
  220. package/dist/chunks/de-Dav2GzjV.mjs.map +1 -0
  221. package/dist/chunks/de-Dc7GRbWc.mjs +2 -0
  222. package/dist/chunks/de-Dc7GRbWc.mjs.map +1 -0
  223. package/dist/chunks/de-DdntlpT3.mjs +2 -0
  224. package/dist/chunks/de-DdntlpT3.mjs.map +1 -0
  225. package/dist/chunks/de-DefykdF-.mjs +2 -0
  226. package/dist/chunks/de-DefykdF-.mjs.map +1 -0
  227. package/dist/chunks/de-DfQQIP8Y.mjs +2 -0
  228. package/dist/chunks/de-DfQQIP8Y.mjs.map +1 -0
  229. package/dist/chunks/de-DkcKDkbA.mjs +2 -0
  230. package/dist/chunks/de-DkcKDkbA.mjs.map +1 -0
  231. package/dist/chunks/de-DqGfLfeV.mjs +2 -0
  232. package/dist/chunks/de-DqGfLfeV.mjs.map +1 -0
  233. package/dist/chunks/de-DudqIJho.mjs +2 -0
  234. package/dist/chunks/de-DudqIJho.mjs.map +1 -0
  235. package/dist/chunks/de-LCXA2xWj.mjs +2 -0
  236. package/dist/chunks/de-LCXA2xWj.mjs.map +1 -0
  237. package/dist/chunks/de-YygmrxGp.mjs +2 -0
  238. package/dist/chunks/de-YygmrxGp.mjs.map +1 -0
  239. package/dist/chunks/de-asI3UlFG.mjs +2 -0
  240. package/dist/chunks/de-asI3UlFG.mjs.map +1 -0
  241. package/dist/chunks/de-kvMvD3AJ.mjs +2 -0
  242. package/dist/chunks/de-kvMvD3AJ.mjs.map +1 -0
  243. package/dist/chunks/de-pnfTnS03.mjs +2 -0
  244. package/dist/chunks/de-pnfTnS03.mjs.map +1 -0
  245. package/dist/chunks/es-4tbAR0If.mjs +2 -0
  246. package/dist/chunks/es-4tbAR0If.mjs.map +1 -0
  247. package/dist/chunks/es-B9z2Xwj0.mjs +2 -0
  248. package/dist/chunks/es-B9z2Xwj0.mjs.map +1 -0
  249. package/dist/chunks/es-BJxjRQSg.mjs +2 -0
  250. package/dist/chunks/es-BJxjRQSg.mjs.map +1 -0
  251. package/dist/chunks/es-BSyxBRjn.mjs +2 -0
  252. package/dist/chunks/es-BSyxBRjn.mjs.map +1 -0
  253. package/dist/chunks/es-Bcpq2xfU.mjs +2 -0
  254. package/dist/chunks/es-Bcpq2xfU.mjs.map +1 -0
  255. package/dist/chunks/es-BhUjc8mO.mjs +2 -0
  256. package/dist/chunks/es-BhUjc8mO.mjs.map +1 -0
  257. package/dist/chunks/es-Bm7hoJSI.mjs +2 -0
  258. package/dist/chunks/es-Bm7hoJSI.mjs.map +1 -0
  259. package/dist/chunks/es-C0E-lFIC.mjs +2 -0
  260. package/dist/chunks/es-C0E-lFIC.mjs.map +1 -0
  261. package/dist/chunks/es-C2wBBQ7N.mjs +2 -0
  262. package/dist/chunks/es-C2wBBQ7N.mjs.map +1 -0
  263. package/dist/chunks/es-C9vhYpfP.mjs +2 -0
  264. package/dist/chunks/es-C9vhYpfP.mjs.map +1 -0
  265. package/dist/chunks/es-Cgslt0Hp.mjs +2 -0
  266. package/dist/chunks/es-Cgslt0Hp.mjs.map +1 -0
  267. package/dist/chunks/es-CksXDFxg.mjs +2 -0
  268. package/dist/chunks/es-CksXDFxg.mjs.map +1 -0
  269. package/dist/chunks/es-CnQUZlfY.mjs +2 -0
  270. package/dist/chunks/es-CnQUZlfY.mjs.map +1 -0
  271. package/dist/chunks/es-CrRNOn2Q.mjs +2 -0
  272. package/dist/chunks/es-CrRNOn2Q.mjs.map +1 -0
  273. package/dist/chunks/es-D0427MIH.mjs +2 -0
  274. package/dist/chunks/es-D0427MIH.mjs.map +1 -0
  275. package/dist/chunks/es-D19xfXus.mjs +2 -0
  276. package/dist/chunks/es-D19xfXus.mjs.map +1 -0
  277. package/dist/chunks/es-Dk6lCcOt.mjs +2 -0
  278. package/dist/chunks/es-Dk6lCcOt.mjs.map +1 -0
  279. package/dist/chunks/es-Dls_xPCW.mjs +2 -0
  280. package/dist/chunks/es-Dls_xPCW.mjs.map +1 -0
  281. package/dist/chunks/es-DrcsyDvI.mjs +2 -0
  282. package/dist/chunks/es-DrcsyDvI.mjs.map +1 -0
  283. package/dist/chunks/es-DwKejbO9.mjs +2 -0
  284. package/dist/chunks/es-DwKejbO9.mjs.map +1 -0
  285. package/dist/chunks/es-NcrWuNe1.mjs +2 -0
  286. package/dist/chunks/es-NcrWuNe1.mjs.map +1 -0
  287. package/dist/chunks/es-RaZerssd.mjs +2 -0
  288. package/dist/chunks/es-RaZerssd.mjs.map +1 -0
  289. package/dist/chunks/es-TIjHCFNF.mjs +2 -0
  290. package/dist/chunks/es-TIjHCFNF.mjs.map +1 -0
  291. package/dist/chunks/es-eZcDkBb-.mjs +2 -0
  292. package/dist/chunks/es-eZcDkBb-.mjs.map +1 -0
  293. package/dist/chunks/es-j_-KW9-4.mjs +2 -0
  294. package/dist/chunks/es-j_-KW9-4.mjs.map +1 -0
  295. package/dist/chunks/es-kGLwn8EB.mjs +2 -0
  296. package/dist/chunks/es-kGLwn8EB.mjs.map +1 -0
  297. package/dist/chunks/es-qQRDC0Ge.mjs +2 -0
  298. package/dist/chunks/es-qQRDC0Ge.mjs.map +1 -0
  299. package/dist/chunks/fonts-ZXAIMT3b.mjs +2 -0
  300. package/dist/chunks/fonts-ZXAIMT3b.mjs.map +1 -0
  301. package/dist/chunks/fr-B27zAq0X.mjs +2 -0
  302. package/dist/chunks/fr-B27zAq0X.mjs.map +1 -0
  303. package/dist/chunks/fr-BEd3ZHO4.mjs +2 -0
  304. package/dist/chunks/fr-BEd3ZHO4.mjs.map +1 -0
  305. package/dist/chunks/fr-BHXLpdaH.mjs +2 -0
  306. package/dist/chunks/fr-BHXLpdaH.mjs.map +1 -0
  307. package/dist/chunks/fr-BKu4eU3V.mjs +2 -0
  308. package/dist/chunks/fr-BKu4eU3V.mjs.map +1 -0
  309. package/dist/chunks/fr-BUrUZ5UQ.mjs +2 -0
  310. package/dist/chunks/fr-BUrUZ5UQ.mjs.map +1 -0
  311. package/dist/chunks/fr-BlqlUQ3b.mjs +2 -0
  312. package/dist/chunks/fr-BlqlUQ3b.mjs.map +1 -0
  313. package/dist/chunks/fr-BruEqDw1.mjs +2 -0
  314. package/dist/chunks/fr-BruEqDw1.mjs.map +1 -0
  315. package/dist/chunks/fr-BwuuFBkA.mjs +2 -0
  316. package/dist/chunks/fr-BwuuFBkA.mjs.map +1 -0
  317. package/dist/chunks/fr-C2lLh5Ti.mjs +2 -0
  318. package/dist/chunks/fr-C2lLh5Ti.mjs.map +1 -0
  319. package/dist/chunks/fr-C7N2_AlK.mjs +2 -0
  320. package/dist/chunks/fr-C7N2_AlK.mjs.map +1 -0
  321. package/dist/chunks/fr-COfd6sLW.mjs +2 -0
  322. package/dist/chunks/fr-COfd6sLW.mjs.map +1 -0
  323. package/dist/chunks/fr-COx4cSxc.mjs +2 -0
  324. package/dist/chunks/fr-COx4cSxc.mjs.map +1 -0
  325. package/dist/chunks/fr-CX37XjPO.mjs +2 -0
  326. package/dist/chunks/fr-CX37XjPO.mjs.map +1 -0
  327. package/dist/chunks/fr-CYn6fMiH.mjs +2 -0
  328. package/dist/chunks/fr-CYn6fMiH.mjs.map +1 -0
  329. package/dist/chunks/fr-CbsiyDEa.mjs +2 -0
  330. package/dist/chunks/fr-CbsiyDEa.mjs.map +1 -0
  331. package/dist/chunks/fr-CcZiELJY.mjs +2 -0
  332. package/dist/chunks/fr-CcZiELJY.mjs.map +1 -0
  333. package/dist/chunks/fr-CeHzUPVT.mjs +2 -0
  334. package/dist/chunks/fr-CeHzUPVT.mjs.map +1 -0
  335. package/dist/chunks/fr-Cv73J4QZ.mjs +2 -0
  336. package/dist/chunks/fr-Cv73J4QZ.mjs.map +1 -0
  337. package/dist/chunks/fr-DDLuorz7.mjs +2 -0
  338. package/dist/chunks/fr-DDLuorz7.mjs.map +1 -0
  339. package/dist/chunks/fr-DMA4CAyo.mjs +2 -0
  340. package/dist/chunks/fr-DMA4CAyo.mjs.map +1 -0
  341. package/dist/chunks/fr-DNJuGtO1.mjs +2 -0
  342. package/dist/chunks/fr-DNJuGtO1.mjs.map +1 -0
  343. package/dist/chunks/fr-DQOE8O6_.mjs +2 -0
  344. package/dist/chunks/fr-DQOE8O6_.mjs.map +1 -0
  345. package/dist/chunks/fr-DXjOwGew.mjs +2 -0
  346. package/dist/chunks/fr-DXjOwGew.mjs.map +1 -0
  347. package/dist/chunks/fr-DilrEvE_.mjs +2 -0
  348. package/dist/chunks/fr-DilrEvE_.mjs.map +1 -0
  349. package/dist/chunks/fr-P7iY3ntE.mjs +2 -0
  350. package/dist/chunks/fr-P7iY3ntE.mjs.map +1 -0
  351. package/dist/chunks/fr-ViUNGo_J.mjs +2 -0
  352. package/dist/chunks/fr-ViUNGo_J.mjs.map +1 -0
  353. package/dist/chunks/fr-gdIyLcGC.mjs +2 -0
  354. package/dist/chunks/fr-gdIyLcGC.mjs.map +1 -0
  355. package/dist/chunks/full-h88Sb2MR.mjs +2 -0
  356. package/dist/chunks/full-h88Sb2MR.mjs.map +1 -0
  357. package/dist/chunks/hi-BC82Jxjl.mjs +2 -0
  358. package/dist/chunks/hi-BC82Jxjl.mjs.map +1 -0
  359. package/dist/chunks/hi-BCTarnem.mjs +2 -0
  360. package/dist/chunks/hi-BCTarnem.mjs.map +1 -0
  361. package/dist/chunks/hi-BMStjhJF.mjs +2 -0
  362. package/dist/chunks/hi-BMStjhJF.mjs.map +1 -0
  363. package/dist/chunks/hi-BQ2Fyx7t.mjs +2 -0
  364. package/dist/chunks/hi-BQ2Fyx7t.mjs.map +1 -0
  365. package/dist/chunks/hi-Bg4-z2Os.mjs +2 -0
  366. package/dist/chunks/hi-Bg4-z2Os.mjs.map +1 -0
  367. package/dist/chunks/hi-BgqI_gOH.mjs +2 -0
  368. package/dist/chunks/hi-BgqI_gOH.mjs.map +1 -0
  369. package/dist/chunks/hi-CEPSeUBX.mjs +2 -0
  370. package/dist/chunks/hi-CEPSeUBX.mjs.map +1 -0
  371. package/dist/chunks/hi-CRaZj5Uo.mjs +2 -0
  372. package/dist/chunks/hi-CRaZj5Uo.mjs.map +1 -0
  373. package/dist/chunks/hi-CT0uK1Me.mjs +2 -0
  374. package/dist/chunks/hi-CT0uK1Me.mjs.map +1 -0
  375. package/dist/chunks/hi-CnIpMd8L.mjs +2 -0
  376. package/dist/chunks/hi-CnIpMd8L.mjs.map +1 -0
  377. package/dist/chunks/hi-CnSv0JhL.mjs +2 -0
  378. package/dist/chunks/hi-CnSv0JhL.mjs.map +1 -0
  379. package/dist/chunks/hi-DLLBZu67.mjs +2 -0
  380. package/dist/chunks/hi-DLLBZu67.mjs.map +1 -0
  381. package/dist/chunks/hi-DMg_aiSR.mjs +2 -0
  382. package/dist/chunks/hi-DMg_aiSR.mjs.map +1 -0
  383. package/dist/chunks/hi-DWwLzOX5.mjs +2 -0
  384. package/dist/chunks/hi-DWwLzOX5.mjs.map +1 -0
  385. package/dist/chunks/hi-D_4Xi4Nv.mjs +2 -0
  386. package/dist/chunks/hi-D_4Xi4Nv.mjs.map +1 -0
  387. package/dist/chunks/hi-D_Jtykmj.mjs +2 -0
  388. package/dist/chunks/hi-D_Jtykmj.mjs.map +1 -0
  389. package/dist/chunks/hi-Da5pRz8E.mjs +2 -0
  390. package/dist/chunks/hi-Da5pRz8E.mjs.map +1 -0
  391. package/dist/chunks/hi-DqL20WmM.mjs +2 -0
  392. package/dist/chunks/hi-DqL20WmM.mjs.map +1 -0
  393. package/dist/chunks/hi-DwQopxRg.mjs +2 -0
  394. package/dist/chunks/hi-DwQopxRg.mjs.map +1 -0
  395. package/dist/chunks/hi-IuMohSSw.mjs +2 -0
  396. package/dist/chunks/hi-IuMohSSw.mjs.map +1 -0
  397. package/dist/chunks/hi-PUX7dDPm.mjs +2 -0
  398. package/dist/chunks/hi-PUX7dDPm.mjs.map +1 -0
  399. package/dist/chunks/hi-RmfZAmwT.mjs +2 -0
  400. package/dist/chunks/hi-RmfZAmwT.mjs.map +1 -0
  401. package/dist/chunks/hi-UIBrTEVu.mjs +2 -0
  402. package/dist/chunks/hi-UIBrTEVu.mjs.map +1 -0
  403. package/dist/chunks/hi-_SjWnfeh.mjs +2 -0
  404. package/dist/chunks/hi-_SjWnfeh.mjs.map +1 -0
  405. package/dist/chunks/hi-dV2GZgH_.mjs +2 -0
  406. package/dist/chunks/hi-dV2GZgH_.mjs.map +1 -0
  407. package/dist/chunks/hi-ehh5oKz3.mjs +2 -0
  408. package/dist/chunks/hi-ehh5oKz3.mjs.map +1 -0
  409. package/dist/chunks/hi-yXnRBFJK.mjs +2 -0
  410. package/dist/chunks/hi-yXnRBFJK.mjs.map +1 -0
  411. package/dist/chunks/minimal-a40NeBQ_.mjs +2 -0
  412. package/dist/chunks/minimal-a40NeBQ_.mjs.map +1 -0
  413. package/dist/chunks/pt-2a8Oto6x.mjs +2 -0
  414. package/dist/chunks/pt-2a8Oto6x.mjs.map +1 -0
  415. package/dist/chunks/pt-ALzIyTiI.mjs +2 -0
  416. package/dist/chunks/pt-ALzIyTiI.mjs.map +1 -0
  417. package/dist/chunks/pt-B2hMlTc6.mjs +2 -0
  418. package/dist/chunks/pt-B2hMlTc6.mjs.map +1 -0
  419. package/dist/chunks/pt-BCIkSb0w.mjs +2 -0
  420. package/dist/chunks/pt-BCIkSb0w.mjs.map +1 -0
  421. package/dist/chunks/pt-BFotmq5x.mjs +2 -0
  422. package/dist/chunks/pt-BFotmq5x.mjs.map +1 -0
  423. package/dist/chunks/pt-BM7OScX6.mjs +2 -0
  424. package/dist/chunks/pt-BM7OScX6.mjs.map +1 -0
  425. package/dist/chunks/pt-BM7zXWxW.mjs +2 -0
  426. package/dist/chunks/pt-BM7zXWxW.mjs.map +1 -0
  427. package/dist/chunks/pt-BchCuzFq.mjs +2 -0
  428. package/dist/chunks/pt-BchCuzFq.mjs.map +1 -0
  429. package/dist/chunks/pt-BmcHFWoR.mjs +2 -0
  430. package/dist/chunks/pt-BmcHFWoR.mjs.map +1 -0
  431. package/dist/chunks/pt-C53W99RV.mjs +2 -0
  432. package/dist/chunks/pt-C53W99RV.mjs.map +1 -0
  433. package/dist/chunks/pt-CORQy8qv.mjs +2 -0
  434. package/dist/chunks/pt-CORQy8qv.mjs.map +1 -0
  435. package/dist/chunks/pt-CUPKr943.mjs +2 -0
  436. package/dist/chunks/pt-CUPKr943.mjs.map +1 -0
  437. package/dist/chunks/pt-CYkKDsLa.mjs +2 -0
  438. package/dist/chunks/pt-CYkKDsLa.mjs.map +1 -0
  439. package/dist/chunks/pt-Cd_SXHKt.mjs +2 -0
  440. package/dist/chunks/pt-Cd_SXHKt.mjs.map +1 -0
  441. package/dist/chunks/pt-CjN3Oq-6.mjs +2 -0
  442. package/dist/chunks/pt-CjN3Oq-6.mjs.map +1 -0
  443. package/dist/chunks/pt-CrKrgktr.mjs +2 -0
  444. package/dist/chunks/pt-CrKrgktr.mjs.map +1 -0
  445. package/dist/chunks/pt-Crmbkj0e.mjs +2 -0
  446. package/dist/chunks/pt-Crmbkj0e.mjs.map +1 -0
  447. package/dist/chunks/pt-D19IWOM_.mjs +2 -0
  448. package/dist/chunks/pt-D19IWOM_.mjs.map +1 -0
  449. package/dist/chunks/pt-D6zY7l2E.mjs +2 -0
  450. package/dist/chunks/pt-D6zY7l2E.mjs.map +1 -0
  451. package/dist/chunks/pt-DA5hufLZ.mjs +2 -0
  452. package/dist/chunks/pt-DA5hufLZ.mjs.map +1 -0
  453. package/dist/chunks/pt-DEfBqu-c.mjs +2 -0
  454. package/dist/chunks/pt-DEfBqu-c.mjs.map +1 -0
  455. package/dist/chunks/pt-DG3rw6nK.mjs +2 -0
  456. package/dist/chunks/pt-DG3rw6nK.mjs.map +1 -0
  457. package/dist/chunks/pt-DRoAHNZi.mjs +2 -0
  458. package/dist/chunks/pt-DRoAHNZi.mjs.map +1 -0
  459. package/dist/chunks/pt-Eml9QiUL.mjs +2 -0
  460. package/dist/chunks/pt-Eml9QiUL.mjs.map +1 -0
  461. package/dist/chunks/pt-Haa3wVmA.mjs +2 -0
  462. package/dist/chunks/pt-Haa3wVmA.mjs.map +1 -0
  463. package/dist/chunks/pt-aj7zOxTg.mjs +2 -0
  464. package/dist/chunks/pt-aj7zOxTg.mjs.map +1 -0
  465. package/dist/chunks/pt-l6dTmkQk.mjs +2 -0
  466. package/dist/chunks/pt-l6dTmkQk.mjs.map +1 -0
  467. package/dist/chunks/ru--JPEpdcJ.mjs +2 -0
  468. package/dist/chunks/ru--JPEpdcJ.mjs.map +1 -0
  469. package/dist/chunks/ru-B76ORyqe.mjs +2 -0
  470. package/dist/chunks/ru-B76ORyqe.mjs.map +1 -0
  471. package/dist/chunks/ru-BDQ62WuE.mjs +2 -0
  472. package/dist/chunks/ru-BDQ62WuE.mjs.map +1 -0
  473. package/dist/chunks/ru-BQ6W3lwr.mjs +2 -0
  474. package/dist/chunks/ru-BQ6W3lwr.mjs.map +1 -0
  475. package/dist/chunks/ru-BQpaitci.mjs +2 -0
  476. package/dist/chunks/ru-BQpaitci.mjs.map +1 -0
  477. package/dist/chunks/ru-Bm9VwJLu.mjs +2 -0
  478. package/dist/chunks/ru-Bm9VwJLu.mjs.map +1 -0
  479. package/dist/chunks/ru-BnNdik6i.mjs +2 -0
  480. package/dist/chunks/ru-BnNdik6i.mjs.map +1 -0
  481. package/dist/chunks/ru-Bo4am8cd.mjs +2 -0
  482. package/dist/chunks/ru-Bo4am8cd.mjs.map +1 -0
  483. package/dist/chunks/ru-C1k56xWQ.mjs +2 -0
  484. package/dist/chunks/ru-C1k56xWQ.mjs.map +1 -0
  485. package/dist/chunks/ru-C4rnSQlI.mjs +2 -0
  486. package/dist/chunks/ru-C4rnSQlI.mjs.map +1 -0
  487. package/dist/chunks/ru-CKM3t1sv.mjs +2 -0
  488. package/dist/chunks/ru-CKM3t1sv.mjs.map +1 -0
  489. package/dist/chunks/ru-CO6eCsxU.mjs +2 -0
  490. package/dist/chunks/ru-CO6eCsxU.mjs.map +1 -0
  491. package/dist/chunks/ru-CTaYpQ9_.mjs +2 -0
  492. package/dist/chunks/ru-CTaYpQ9_.mjs.map +1 -0
  493. package/dist/chunks/ru-CdY8d80t.mjs +2 -0
  494. package/dist/chunks/ru-CdY8d80t.mjs.map +1 -0
  495. package/dist/chunks/ru-CsDtaWRd.mjs +2 -0
  496. package/dist/chunks/ru-CsDtaWRd.mjs.map +1 -0
  497. package/dist/chunks/ru-Cy_4nn8h.mjs +2 -0
  498. package/dist/chunks/ru-Cy_4nn8h.mjs.map +1 -0
  499. package/dist/chunks/ru-DACtjNuJ.mjs +2 -0
  500. package/dist/chunks/ru-DACtjNuJ.mjs.map +1 -0
  501. package/dist/chunks/ru-DN6yN_w9.mjs +2 -0
  502. package/dist/chunks/ru-DN6yN_w9.mjs.map +1 -0
  503. package/dist/chunks/ru-DThFtd76.mjs +2 -0
  504. package/dist/chunks/ru-DThFtd76.mjs.map +1 -0
  505. package/dist/chunks/ru-Dd_P7hP7.mjs +2 -0
  506. package/dist/chunks/ru-Dd_P7hP7.mjs.map +1 -0
  507. package/dist/chunks/ru-Dhuxwzwy.mjs +2 -0
  508. package/dist/chunks/ru-Dhuxwzwy.mjs.map +1 -0
  509. package/dist/chunks/ru-Dn6UDGIG.mjs +2 -0
  510. package/dist/chunks/ru-Dn6UDGIG.mjs.map +1 -0
  511. package/dist/chunks/ru-DojHc5wu.mjs +2 -0
  512. package/dist/chunks/ru-DojHc5wu.mjs.map +1 -0
  513. package/dist/chunks/ru-DyWzWBjV.mjs +2 -0
  514. package/dist/chunks/ru-DyWzWBjV.mjs.map +1 -0
  515. package/dist/chunks/ru-NBxCkjlP.mjs +2 -0
  516. package/dist/chunks/ru-NBxCkjlP.mjs.map +1 -0
  517. package/dist/chunks/ru-_MQaVHam.mjs +2 -0
  518. package/dist/chunks/ru-_MQaVHam.mjs.map +1 -0
  519. package/dist/chunks/ru-wv17PPrd.mjs +2 -0
  520. package/dist/chunks/ru-wv17PPrd.mjs.map +1 -0
  521. package/dist/chunks/src-ooaZ_Egu.mjs +2 -0
  522. package/dist/chunks/src-ooaZ_Egu.mjs.map +1 -0
  523. package/dist/chunks/zh-2-Y3Limy.mjs +2 -0
  524. package/dist/chunks/zh-2-Y3Limy.mjs.map +1 -0
  525. package/dist/chunks/zh-B02VPMqX.mjs +2 -0
  526. package/dist/chunks/zh-B02VPMqX.mjs.map +1 -0
  527. package/dist/chunks/zh-BYjLBWWN.mjs +2 -0
  528. package/dist/chunks/zh-BYjLBWWN.mjs.map +1 -0
  529. package/dist/chunks/zh-Bt2ZdHcS.mjs +2 -0
  530. package/dist/chunks/zh-Bt2ZdHcS.mjs.map +1 -0
  531. package/dist/chunks/zh-BuN_C4o-.mjs +2 -0
  532. package/dist/chunks/zh-BuN_C4o-.mjs.map +1 -0
  533. package/dist/chunks/zh-CA3BDj0Y.mjs +2 -0
  534. package/dist/chunks/zh-CA3BDj0Y.mjs.map +1 -0
  535. package/dist/chunks/zh-CHuGP7RS.mjs +2 -0
  536. package/dist/chunks/zh-CHuGP7RS.mjs.map +1 -0
  537. package/dist/chunks/zh-CIPsF5P8.mjs +2 -0
  538. package/dist/chunks/zh-CIPsF5P8.mjs.map +1 -0
  539. package/dist/chunks/zh-C_YS18re.mjs +2 -0
  540. package/dist/chunks/zh-C_YS18re.mjs.map +1 -0
  541. package/dist/chunks/zh-CfMPFWUg.mjs +2 -0
  542. package/dist/chunks/zh-CfMPFWUg.mjs.map +1 -0
  543. package/dist/chunks/zh-CfjCcBIB.mjs +2 -0
  544. package/dist/chunks/zh-CfjCcBIB.mjs.map +1 -0
  545. package/dist/chunks/zh-CqQph809.mjs +2 -0
  546. package/dist/chunks/zh-CqQph809.mjs.map +1 -0
  547. package/dist/chunks/zh-Cxe42GC5.mjs +2 -0
  548. package/dist/chunks/zh-Cxe42GC5.mjs.map +1 -0
  549. package/dist/chunks/zh-CyMU2cTf.mjs +2 -0
  550. package/dist/chunks/zh-CyMU2cTf.mjs.map +1 -0
  551. package/dist/chunks/zh-Cynz1sBa.mjs +2 -0
  552. package/dist/chunks/zh-Cynz1sBa.mjs.map +1 -0
  553. package/dist/chunks/zh-DRKs6Q0a.mjs +2 -0
  554. package/dist/chunks/zh-DRKs6Q0a.mjs.map +1 -0
  555. package/dist/chunks/zh-DTuIJjx6.mjs +2 -0
  556. package/dist/chunks/zh-DTuIJjx6.mjs.map +1 -0
  557. package/dist/chunks/zh-DTz9l6mp.mjs +2 -0
  558. package/dist/chunks/zh-DTz9l6mp.mjs.map +1 -0
  559. package/dist/chunks/zh-DZwjiJmn.mjs +2 -0
  560. package/dist/chunks/zh-DZwjiJmn.mjs.map +1 -0
  561. package/dist/chunks/zh-D_VJDQl4.mjs +2 -0
  562. package/dist/chunks/zh-D_VJDQl4.mjs.map +1 -0
  563. package/dist/chunks/zh-Dt20Om7Z.mjs +2 -0
  564. package/dist/chunks/zh-Dt20Om7Z.mjs.map +1 -0
  565. package/dist/chunks/zh-SgsZ9f-W.mjs +2 -0
  566. package/dist/chunks/zh-SgsZ9f-W.mjs.map +1 -0
  567. package/dist/chunks/zh-XR7Ls7m-.mjs +2 -0
  568. package/dist/chunks/zh-XR7Ls7m-.mjs.map +1 -0
  569. package/dist/chunks/zh-aXPI9lKF.mjs +2 -0
  570. package/dist/chunks/zh-aXPI9lKF.mjs.map +1 -0
  571. package/dist/chunks/zh-cLXIKkZQ.mjs +2 -0
  572. package/dist/chunks/zh-cLXIKkZQ.mjs.map +1 -0
  573. package/dist/chunks/zh-cZUtN871.mjs +2 -0
  574. package/dist/chunks/zh-cZUtN871.mjs.map +1 -0
  575. package/dist/chunks/zh-hcdnCGUp.mjs +2 -0
  576. package/dist/chunks/zh-hcdnCGUp.mjs.map +1 -0
  577. package/dist/commands/AttributedMarkCommands.d.ts.map +1 -1
  578. package/dist/commands/BlockInsertion.d.ts +27 -0
  579. package/dist/commands/BlockInsertion.d.ts.map +1 -1
  580. package/dist/commands/CommandHelpers.d.ts +12 -0
  581. package/dist/commands/CommandHelpers.d.ts.map +1 -1
  582. package/dist/commands/Commands.d.ts.map +1 -1
  583. package/dist/commands/ContainerCommands.d.ts +24 -0
  584. package/dist/commands/ContainerCommands.d.ts.map +1 -0
  585. package/dist/commands/CursorMarks.d.ts +13 -0
  586. package/dist/commands/CursorMarks.d.ts.map +1 -0
  587. package/dist/commands/GapCursorCommands.d.ts.map +1 -1
  588. package/dist/commands/MarkCommands.d.ts.map +1 -1
  589. package/dist/commands/NodeSelectionCommands.d.ts.map +1 -1
  590. package/dist/commands/PasteCommand.d.ts.map +1 -1
  591. package/dist/commands/SelectionDeletion.d.ts +25 -0
  592. package/dist/commands/SelectionDeletion.d.ts.map +1 -0
  593. package/dist/decorations/Decoration.d.ts +6 -0
  594. package/dist/decorations/Decoration.d.ts.map +1 -1
  595. package/dist/decorations/PositionMapping.d.ts +13 -3
  596. package/dist/decorations/PositionMapping.d.ts.map +1 -1
  597. package/dist/editor/ContentSerializer.d.ts +1 -1
  598. package/dist/editor/ContentSerializer.d.ts.map +1 -1
  599. package/dist/editor/EditorConfig.d.ts +14 -2
  600. package/dist/editor/EditorConfig.d.ts.map +1 -1
  601. package/dist/editor/EditorDOM.d.ts.map +1 -1
  602. package/dist/editor/EditorInitializer.d.ts.map +1 -1
  603. package/dist/editor/NotectlEditor.d.ts +12 -7
  604. package/dist/editor/NotectlEditor.d.ts.map +1 -1
  605. package/dist/editor/PluginBootstrapper.d.ts.map +1 -1
  606. package/dist/editor/styles/base.d.ts +1 -1
  607. package/dist/editor/styles/base.d.ts.map +1 -1
  608. package/dist/editor/styles/table.d.ts +1 -1
  609. package/dist/editor/styles/table.d.ts.map +1 -1
  610. package/dist/editor/styles/toolbar.d.ts +1 -1
  611. package/dist/editor/styles/toolbar.d.ts.map +1 -1
  612. package/dist/fonts.d.ts +11 -0
  613. package/dist/fonts.d.ts.map +1 -1
  614. package/dist/fonts.mjs +1 -1
  615. package/dist/full.d.ts +2 -0
  616. package/dist/full.d.ts.map +1 -1
  617. package/dist/full.mjs +1 -1
  618. package/dist/html.d.ts +1 -1
  619. package/dist/html.d.ts.map +1 -1
  620. package/dist/html.mjs +1 -1
  621. package/dist/index.d.ts +4 -1
  622. package/dist/index.d.ts.map +1 -1
  623. package/dist/input/ClipboardHandler.d.ts.map +1 -1
  624. package/dist/input/HTMLParser.d.ts +3 -0
  625. package/dist/input/HTMLParser.d.ts.map +1 -1
  626. package/dist/input/InputHandler.d.ts +9 -0
  627. package/dist/input/InputHandler.d.ts.map +1 -1
  628. package/dist/input/InputManager.d.ts +2 -0
  629. package/dist/input/InputManager.d.ts.map +1 -1
  630. package/dist/input/KeyboardHandler.d.ts.map +1 -1
  631. package/dist/input/PasteHTMLHandler.d.ts +1 -1
  632. package/dist/input/PasteHTMLHandler.d.ts.map +1 -1
  633. package/dist/input/PasteRichBlockHandler.d.ts +1 -1
  634. package/dist/input/PasteRichBlockHandler.d.ts.map +1 -1
  635. package/dist/input/SelectionDocument.d.ts.map +1 -1
  636. package/dist/model/ContentSlice.d.ts +6 -7
  637. package/dist/model/ContentSlice.d.ts.map +1 -1
  638. package/dist/model/Document.d.ts +34 -0
  639. package/dist/model/Document.d.ts.map +1 -1
  640. package/dist/model/GraphemeUtils.d.ts +8 -2
  641. package/dist/model/GraphemeUtils.d.ts.map +1 -1
  642. package/dist/model/MarkSpec.d.ts +6 -0
  643. package/dist/model/MarkSpec.d.ts.map +1 -1
  644. package/dist/model/NodeResolver.d.ts +18 -0
  645. package/dist/model/NodeResolver.d.ts.map +1 -1
  646. package/dist/model/Schema.d.ts +6 -0
  647. package/dist/model/Schema.d.ts.map +1 -1
  648. package/dist/model/SchemaRegistry.d.ts.map +1 -1
  649. package/dist/model/TextInputInterceptor.d.ts +21 -0
  650. package/dist/model/TextInputInterceptor.d.ts.map +1 -0
  651. package/dist/notectl-core.mjs +1 -1
  652. package/dist/notectl-core.umd.js +1 -1
  653. package/dist/notectl-core.umd.js.map +1 -1
  654. package/dist/plugins/MiddlewareChain.d.ts +11 -0
  655. package/dist/plugins/MiddlewareChain.d.ts.map +1 -1
  656. package/dist/plugins/Plugin.d.ts +7 -0
  657. package/dist/plugins/Plugin.d.ts.map +1 -1
  658. package/dist/plugins/PluginContextFactory.d.ts +6 -0
  659. package/dist/plugins/PluginContextFactory.d.ts.map +1 -1
  660. package/dist/plugins/PluginManager.d.ts +5 -0
  661. package/dist/plugins/PluginManager.d.ts.map +1 -1
  662. package/dist/plugins/RegistrationTracker.d.ts.map +1 -1
  663. package/dist/plugins/alignment/AlignmentPlugin.d.ts.map +1 -1
  664. package/dist/plugins/alignment.mjs +1 -1
  665. package/dist/plugins/bidi-isolation/BidiIsolationPlugin.d.ts.map +1 -1
  666. package/dist/plugins/bidi-isolation.mjs +1 -1
  667. package/dist/plugins/blockquote/BlockquoteKeyboardHandlers.d.ts +1 -1
  668. package/dist/plugins/blockquote/BlockquoteKeyboardHandlers.d.ts.map +1 -1
  669. package/dist/plugins/blockquote/BlockquotePlugin.d.ts +13 -3
  670. package/dist/plugins/blockquote/BlockquotePlugin.d.ts.map +1 -1
  671. package/dist/plugins/blockquote/BlockquoteStyles.d.ts +1 -1
  672. package/dist/plugins/blockquote/BlockquoteStyles.d.ts.map +1 -1
  673. package/dist/plugins/blockquote.mjs +1 -1
  674. package/dist/plugins/caret-navigation.mjs +1 -1
  675. package/dist/plugins/code-block/AutoPairController.d.ts +50 -0
  676. package/dist/plugins/code-block/AutoPairController.d.ts.map +1 -0
  677. package/dist/plugins/code-block/BracketPairing.d.ts +49 -0
  678. package/dist/plugins/code-block/BracketPairing.d.ts.map +1 -0
  679. package/dist/plugins/code-block/CodeBlockDecorations.d.ts +16 -0
  680. package/dist/plugins/code-block/CodeBlockDecorations.d.ts.map +1 -0
  681. package/dist/plugins/code-block/CodeBlockHighlighting.d.ts +10 -0
  682. package/dist/plugins/code-block/CodeBlockHighlighting.d.ts.map +1 -0
  683. package/dist/plugins/code-block/CodeBlockKeyboardHandlers.d.ts +11 -2
  684. package/dist/plugins/code-block/CodeBlockKeyboardHandlers.d.ts.map +1 -1
  685. package/dist/plugins/code-block/CodeBlockLocale.d.ts +4 -0
  686. package/dist/plugins/code-block/CodeBlockLocale.d.ts.map +1 -1
  687. package/dist/plugins/code-block/CodeBlockNodeView.d.ts.map +1 -1
  688. package/dist/plugins/code-block/CodeBlockPlugin.d.ts +4 -14
  689. package/dist/plugins/code-block/CodeBlockPlugin.d.ts.map +1 -1
  690. package/dist/plugins/code-block/CodeBlockSchema.d.ts +11 -0
  691. package/dist/plugins/code-block/CodeBlockSchema.d.ts.map +1 -0
  692. package/dist/plugins/code-block/CodeBlockTypes.d.ts +66 -0
  693. package/dist/plugins/code-block/CodeBlockTypes.d.ts.map +1 -1
  694. package/dist/plugins/code-block/IndentHelpers.d.ts +71 -0
  695. package/dist/plugins/code-block/IndentHelpers.d.ts.map +1 -0
  696. package/dist/plugins/code-block/PairStack.d.ts +37 -0
  697. package/dist/plugins/code-block/PairStack.d.ts.map +1 -0
  698. package/dist/plugins/code-block/TokenCache.d.ts +21 -0
  699. package/dist/plugins/code-block/TokenCache.d.ts.map +1 -0
  700. package/dist/plugins/code-block/highlighter/RegexTokenizer.d.ts.map +1 -1
  701. package/dist/plugins/code-block/highlighter/TokenIteration.d.ts +18 -0
  702. package/dist/plugins/code-block/highlighter/TokenIteration.d.ts.map +1 -0
  703. package/dist/plugins/code-block/highlighter/languages/index.d.ts +1 -0
  704. package/dist/plugins/code-block/highlighter/languages/index.d.ts.map +1 -1
  705. package/dist/plugins/code-block/highlighter/languages/java.d.ts.map +1 -1
  706. package/dist/plugins/code-block/highlighter/languages/typescript.d.ts +3 -0
  707. package/dist/plugins/code-block/highlighter/languages/typescript.d.ts.map +1 -0
  708. package/dist/plugins/code-block/index.d.ts +1 -0
  709. package/dist/plugins/code-block/index.d.ts.map +1 -1
  710. package/dist/plugins/code-block/locales/ar.d.ts.map +1 -1
  711. package/dist/plugins/code-block/locales/de.d.ts.map +1 -1
  712. package/dist/plugins/code-block/locales/es.d.ts.map +1 -1
  713. package/dist/plugins/code-block/locales/fr.d.ts.map +1 -1
  714. package/dist/plugins/code-block/locales/hi.d.ts.map +1 -1
  715. package/dist/plugins/code-block/locales/pt.d.ts.map +1 -1
  716. package/dist/plugins/code-block/locales/ru.d.ts.map +1 -1
  717. package/dist/plugins/code-block/locales/zh.d.ts.map +1 -1
  718. package/dist/plugins/code-block.mjs +1 -1
  719. package/dist/plugins/font/FontPlugin.d.ts.map +1 -1
  720. package/dist/plugins/font-size/FontSizeOperations.d.ts +7 -3
  721. package/dist/plugins/font-size/FontSizeOperations.d.ts.map +1 -1
  722. package/dist/plugins/font-size/FontSizePlugin.d.ts.map +1 -1
  723. package/dist/plugins/font-size.mjs +1 -1
  724. package/dist/plugins/font.mjs +1 -1
  725. package/dist/plugins/formula/DisplayMathNodeSpec.d.ts +5 -0
  726. package/dist/plugins/formula/DisplayMathNodeSpec.d.ts.map +1 -0
  727. package/dist/plugins/formula/DisplayMathNodeView.d.ts +12 -0
  728. package/dist/plugins/formula/DisplayMathNodeView.d.ts.map +1 -0
  729. package/dist/plugins/formula/FormulaCommands.d.ts +35 -0
  730. package/dist/plugins/formula/FormulaCommands.d.ts.map +1 -0
  731. package/dist/plugins/formula/FormulaEditTrigger.d.ts +12 -0
  732. package/dist/plugins/formula/FormulaEditTrigger.d.ts.map +1 -0
  733. package/dist/plugins/formula/FormulaEditorMount.d.ts +19 -0
  734. package/dist/plugins/formula/FormulaEditorMount.d.ts.map +1 -0
  735. package/dist/plugins/formula/FormulaInputRules.d.ts +4 -0
  736. package/dist/plugins/formula/FormulaInputRules.d.ts.map +1 -0
  737. package/dist/plugins/formula/FormulaLocale.d.ts +45 -0
  738. package/dist/plugins/formula/FormulaLocale.d.ts.map +1 -0
  739. package/dist/plugins/formula/FormulaOverlay.d.ts +38 -0
  740. package/dist/plugins/formula/FormulaOverlay.d.ts.map +1 -0
  741. package/dist/plugins/formula/FormulaPasteInterceptor.d.ts +10 -0
  742. package/dist/plugins/formula/FormulaPasteInterceptor.d.ts.map +1 -0
  743. package/dist/plugins/formula/FormulaPlugin.d.ts +22 -0
  744. package/dist/plugins/formula/FormulaPlugin.d.ts.map +1 -0
  745. package/dist/plugins/formula/FormulaRendering.d.ts +18 -0
  746. package/dist/plugins/formula/FormulaRendering.d.ts.map +1 -0
  747. package/dist/plugins/formula/FormulaStyles.d.ts +12 -0
  748. package/dist/plugins/formula/FormulaStyles.d.ts.map +1 -0
  749. package/dist/plugins/formula/FormulaToolbar.d.ts +5 -0
  750. package/dist/plugins/formula/FormulaToolbar.d.ts.map +1 -0
  751. package/dist/plugins/formula/FormulaTypes.d.ts +64 -0
  752. package/dist/plugins/formula/FormulaTypes.d.ts.map +1 -0
  753. package/dist/plugins/formula/InlineMathNodeSpec.d.ts +5 -0
  754. package/dist/plugins/formula/InlineMathNodeSpec.d.ts.map +1 -0
  755. package/dist/plugins/formula/MathFont.d.ts +4 -0
  756. package/dist/plugins/formula/MathFont.d.ts.map +1 -0
  757. package/dist/plugins/formula/MathFontFace.d.ts +4 -0
  758. package/dist/plugins/formula/MathFontFace.d.ts.map +1 -0
  759. package/dist/plugins/formula/index.d.ts +14 -0
  760. package/dist/plugins/formula/index.d.ts.map +1 -0
  761. package/dist/plugins/formula/latex/LatexParser.d.ts +8 -0
  762. package/dist/plugins/formula/latex/LatexParser.d.ts.map +1 -0
  763. package/dist/plugins/formula/latex/LatexParserTypes.d.ts +61 -0
  764. package/dist/plugins/formula/latex/LatexParserTypes.d.ts.map +1 -0
  765. package/dist/plugins/formula/latex/LatexSymbols.d.ts +87 -0
  766. package/dist/plugins/formula/latex/LatexSymbols.d.ts.map +1 -0
  767. package/dist/plugins/formula/latex/LatexToMathML.d.ts +33 -0
  768. package/dist/plugins/formula/latex/LatexToMathML.d.ts.map +1 -0
  769. package/dist/plugins/formula/latex/LatexTokenizer.d.ts +45 -0
  770. package/dist/plugins/formula/latex/LatexTokenizer.d.ts.map +1 -0
  771. package/dist/plugins/formula/latex/MathAlphabet.d.ts +42 -0
  772. package/dist/plugins/formula/latex/MathAlphabet.d.ts.map +1 -0
  773. package/dist/plugins/formula/latex/handlers/Accents.d.ts +6 -0
  774. package/dist/plugins/formula/latex/handlers/Accents.d.ts.map +1 -0
  775. package/dist/plugins/formula/latex/handlers/Delimiters.d.ts +12 -0
  776. package/dist/plugins/formula/latex/handlers/Delimiters.d.ts.map +1 -0
  777. package/dist/plugins/formula/latex/handlers/Environments.d.ts +9 -0
  778. package/dist/plugins/formula/latex/handlers/Environments.d.ts.map +1 -0
  779. package/dist/plugins/formula/latex/handlers/Fonts.d.ts +6 -0
  780. package/dist/plugins/formula/latex/handlers/Fonts.d.ts.map +1 -0
  781. package/dist/plugins/formula/latex/handlers/Spacing.d.ts +13 -0
  782. package/dist/plugins/formula/latex/handlers/Spacing.d.ts.map +1 -0
  783. package/dist/plugins/formula/latex/handlers/Structures.d.ts +19 -0
  784. package/dist/plugins/formula/latex/handlers/Structures.d.ts.map +1 -0
  785. package/dist/plugins/formula/latex/index.d.ts +11 -0
  786. package/dist/plugins/formula/latex/index.d.ts.map +1 -0
  787. package/dist/plugins/formula/locales/ar.d.ts +4 -0
  788. package/dist/plugins/formula/locales/ar.d.ts.map +1 -0
  789. package/dist/plugins/formula/locales/de.d.ts +4 -0
  790. package/dist/plugins/formula/locales/de.d.ts.map +1 -0
  791. package/dist/plugins/formula/locales/es.d.ts +4 -0
  792. package/dist/plugins/formula/locales/es.d.ts.map +1 -0
  793. package/dist/plugins/formula/locales/fr.d.ts +4 -0
  794. package/dist/plugins/formula/locales/fr.d.ts.map +1 -0
  795. package/dist/plugins/formula/locales/hi.d.ts +4 -0
  796. package/dist/plugins/formula/locales/hi.d.ts.map +1 -0
  797. package/dist/plugins/formula/locales/pt.d.ts +4 -0
  798. package/dist/plugins/formula/locales/pt.d.ts.map +1 -0
  799. package/dist/plugins/formula/locales/ru.d.ts +4 -0
  800. package/dist/plugins/formula/locales/ru.d.ts.map +1 -0
  801. package/dist/plugins/formula/locales/zh.d.ts +4 -0
  802. package/dist/plugins/formula/locales/zh.d.ts.map +1 -0
  803. package/dist/plugins/formula/math-field/MathField.d.ts +45 -0
  804. package/dist/plugins/formula/math-field/MathField.d.ts.map +1 -0
  805. package/dist/plugins/formula/math-field/MathFieldTypes.d.ts +73 -0
  806. package/dist/plugins/formula/math-field/MathFieldTypes.d.ts.map +1 -0
  807. package/dist/plugins/formula/math-field/MathPalette.d.ts +16 -0
  808. package/dist/plugins/formula/math-field/MathPalette.d.ts.map +1 -0
  809. package/dist/plugins/formula/math-field/MathPaletteData.d.ts +15 -0
  810. package/dist/plugins/formula/math-field/MathPaletteData.d.ts.map +1 -0
  811. package/dist/plugins/formula/math-field/index.d.ts +9 -0
  812. package/dist/plugins/formula/math-field/index.d.ts.map +1 -0
  813. package/dist/plugins/formula/mathml/MathMLBuilder.d.ts +58 -0
  814. package/dist/plugins/formula/mathml/MathMLBuilder.d.ts.map +1 -0
  815. package/dist/plugins/formula/mathml/MathMLDocument.d.ts +54 -0
  816. package/dist/plugins/formula/mathml/MathMLDocument.d.ts.map +1 -0
  817. package/dist/plugins/formula/mathml/MathMLSanitize.d.ts +15 -0
  818. package/dist/plugins/formula/mathml/MathMLSanitize.d.ts.map +1 -0
  819. package/dist/plugins/formula/mathml/index.d.ts +8 -0
  820. package/dist/plugins/formula/mathml/index.d.ts.map +1 -0
  821. package/dist/plugins/formula.mjs +1 -0
  822. package/dist/plugins/gap-cursor.mjs +1 -1
  823. package/dist/plugins/hard-break.mjs +1 -1
  824. package/dist/plugins/heading.mjs +1 -1
  825. package/dist/plugins/highlight/HighlightPalette.d.ts +7 -0
  826. package/dist/plugins/highlight/HighlightPalette.d.ts.map +1 -0
  827. package/dist/plugins/highlight/HighlightPlugin.d.ts.map +1 -1
  828. package/dist/plugins/highlight.mjs +1 -1
  829. package/dist/plugins/horizontal-rule/HorizontalRulePlugin.d.ts.map +1 -1
  830. package/dist/plugins/horizontal-rule.mjs +1 -1
  831. package/dist/plugins/image/ImageCommands.d.ts.map +1 -1
  832. package/dist/plugins/image/ImageNodeView.d.ts.map +1 -1
  833. package/dist/plugins/image/ImagePlugin.d.ts.map +1 -1
  834. package/dist/plugins/image/ImagePopup.d.ts.map +1 -1
  835. package/dist/plugins/image/ImagePopupStyles.d.ts +3 -0
  836. package/dist/plugins/image/ImagePopupStyles.d.ts.map +1 -0
  837. package/dist/plugins/image.mjs +1 -1
  838. package/dist/plugins/inline-code/InlineCodePlugin.d.ts +1 -4
  839. package/dist/plugins/inline-code/InlineCodePlugin.d.ts.map +1 -1
  840. package/dist/plugins/inline-code.mjs +1 -1
  841. package/dist/plugins/language/bundles/JavaSupport.d.ts.map +1 -1
  842. package/dist/plugins/language/bundles/TypeScriptSupport.d.ts +3 -0
  843. package/dist/plugins/language/bundles/TypeScriptSupport.d.ts.map +1 -0
  844. package/dist/plugins/language/bundles/index.d.ts +1 -0
  845. package/dist/plugins/language/bundles/index.d.ts.map +1 -1
  846. package/dist/plugins/language/index.d.ts +1 -1
  847. package/dist/plugins/language/index.d.ts.map +1 -1
  848. package/dist/plugins/language.mjs +1 -1
  849. package/dist/plugins/link/LinkPlugin.d.ts.map +1 -1
  850. package/dist/plugins/link.mjs +1 -1
  851. package/dist/plugins/list.mjs +1 -1
  852. package/dist/plugins/print.mjs +1 -1
  853. package/dist/plugins/shared/InlineStyleMarkSpec.d.ts +22 -0
  854. package/dist/plugins/shared/InlineStyleMarkSpec.d.ts.map +1 -0
  855. package/dist/plugins/shared/NodeSpecPatching.d.ts +16 -0
  856. package/dist/plugins/shared/NodeSpecPatching.d.ts.map +1 -0
  857. package/dist/plugins/shared/PluginHelpers.d.ts +8 -0
  858. package/dist/plugins/shared/PluginHelpers.d.ts.map +1 -1
  859. package/dist/plugins/shared/PopupManager.d.ts.map +1 -1
  860. package/dist/plugins/shared/PopupPositioning.d.ts +20 -0
  861. package/dist/plugins/shared/PopupPositioning.d.ts.map +1 -1
  862. package/dist/plugins/shared/SimpleMark.d.ts +22 -0
  863. package/dist/plugins/shared/SimpleMark.d.ts.map +1 -0
  864. package/dist/plugins/shared.mjs +1 -1
  865. package/dist/plugins/smart-paste/detectors/DetectionScorer.d.ts +17 -0
  866. package/dist/plugins/smart-paste/detectors/DetectionScorer.d.ts.map +1 -0
  867. package/dist/plugins/smart-paste/detectors/LexerDetector.d.ts +36 -0
  868. package/dist/plugins/smart-paste/detectors/LexerDetector.d.ts.map +1 -0
  869. package/dist/plugins/smart-paste/detectors/TokenStats.d.ts +44 -0
  870. package/dist/plugins/smart-paste/detectors/TokenStats.d.ts.map +1 -0
  871. package/dist/plugins/smart-paste/index.d.ts +3 -1
  872. package/dist/plugins/smart-paste/index.d.ts.map +1 -1
  873. package/dist/plugins/smart-paste.mjs +1 -1
  874. package/dist/plugins/strikethrough/StrikethroughPlugin.d.ts +0 -4
  875. package/dist/plugins/strikethrough/StrikethroughPlugin.d.ts.map +1 -1
  876. package/dist/plugins/strikethrough.mjs +1 -1
  877. package/dist/plugins/super-sub/SuperSubPlugin.d.ts.map +1 -1
  878. package/dist/plugins/super-sub.mjs +1 -1
  879. package/dist/plugins/table/TableCommands.d.ts.map +1 -1
  880. package/dist/plugins/table/TableNavigation.d.ts.map +1 -1
  881. package/dist/plugins/table/TablePlugin.d.ts.map +1 -1
  882. package/dist/plugins/table.mjs +1 -1
  883. package/dist/plugins/text-color/TextColorPalette.d.ts +6 -0
  884. package/dist/plugins/text-color/TextColorPalette.d.ts.map +1 -0
  885. package/dist/plugins/text-color/TextColorPlugin.d.ts.map +1 -1
  886. package/dist/plugins/text-color.mjs +1 -1
  887. package/dist/plugins/text-direction/TextDirectionPlugin.d.ts.map +1 -1
  888. package/dist/plugins/text-direction-auto.mjs +1 -1
  889. package/dist/plugins/text-direction.mjs +1 -1
  890. package/dist/plugins/text-formatting/TextFormattingPlugin.d.ts.map +1 -1
  891. package/dist/plugins/text-formatting.mjs +1 -1
  892. package/dist/plugins/toolbar/ToolbarOverflowController.d.ts +14 -1
  893. package/dist/plugins/toolbar/ToolbarOverflowController.d.ts.map +1 -1
  894. package/dist/plugins/toolbar/ToolbarPlugin.d.ts +13 -1
  895. package/dist/plugins/toolbar/ToolbarPlugin.d.ts.map +1 -1
  896. package/dist/plugins/toolbar/ToolbarRenderers.d.ts.map +1 -1
  897. package/dist/plugins/toolbar/index.d.ts +1 -1
  898. package/dist/plugins/toolbar/index.d.ts.map +1 -1
  899. package/dist/plugins/toolbar.mjs +1 -1
  900. package/dist/plugins/video/VideoCommands.d.ts +62 -0
  901. package/dist/plugins/video/VideoCommands.d.ts.map +1 -0
  902. package/dist/plugins/video/VideoEditOverlay.d.ts +30 -0
  903. package/dist/plugins/video/VideoEditOverlay.d.ts.map +1 -0
  904. package/dist/plugins/video/VideoEmbedPrompt.d.ts +18 -0
  905. package/dist/plugins/video/VideoEmbedPrompt.d.ts.map +1 -0
  906. package/dist/plugins/video/VideoFacade.d.ts +46 -0
  907. package/dist/plugins/video/VideoFacade.d.ts.map +1 -0
  908. package/dist/plugins/video/VideoLocale.d.ts +53 -0
  909. package/dist/plugins/video/VideoLocale.d.ts.map +1 -0
  910. package/dist/plugins/video/VideoNodeSpec.d.ts +24 -0
  911. package/dist/plugins/video/VideoNodeSpec.d.ts.map +1 -0
  912. package/dist/plugins/video/VideoNodeView.d.ts +16 -0
  913. package/dist/plugins/video/VideoNodeView.d.ts.map +1 -0
  914. package/dist/plugins/video/VideoPasteInterceptor.d.ts +9 -0
  915. package/dist/plugins/video/VideoPasteInterceptor.d.ts.map +1 -0
  916. package/dist/plugins/video/VideoPlugin.d.ts +31 -0
  917. package/dist/plugins/video/VideoPlugin.d.ts.map +1 -0
  918. package/dist/plugins/video/VideoPopup.d.ts +28 -0
  919. package/dist/plugins/video/VideoPopup.d.ts.map +1 -0
  920. package/dist/plugins/video/VideoPopupStyles.d.ts +3 -0
  921. package/dist/plugins/video/VideoPopupStyles.d.ts.map +1 -0
  922. package/dist/plugins/video/VideoProviders.d.ts +98 -0
  923. package/dist/plugins/video/VideoProviders.d.ts.map +1 -0
  924. package/dist/plugins/video/VideoResize.d.ts +35 -0
  925. package/dist/plugins/video/VideoResize.d.ts.map +1 -0
  926. package/dist/plugins/video/VideoSanitizeHook.d.ts +23 -0
  927. package/dist/plugins/video/VideoSanitizeHook.d.ts.map +1 -0
  928. package/dist/plugins/video/VideoSelectionToolbar.d.ts +20 -0
  929. package/dist/plugins/video/VideoSelectionToolbar.d.ts.map +1 -0
  930. package/dist/plugins/video/VideoStyles.d.ts +3 -0
  931. package/dist/plugins/video/VideoStyles.d.ts.map +1 -0
  932. package/dist/plugins/video/VideoTypes.d.ts +102 -0
  933. package/dist/plugins/video/VideoTypes.d.ts.map +1 -0
  934. package/dist/plugins/video/VideoViewHelpers.d.ts +13 -0
  935. package/dist/plugins/video/VideoViewHelpers.d.ts.map +1 -0
  936. package/dist/plugins/video/index.d.ts +6 -0
  937. package/dist/plugins/video/index.d.ts.map +1 -0
  938. package/dist/plugins/video/locales/ar.d.ts +4 -0
  939. package/dist/plugins/video/locales/ar.d.ts.map +1 -0
  940. package/dist/plugins/video/locales/de.d.ts +4 -0
  941. package/dist/plugins/video/locales/de.d.ts.map +1 -0
  942. package/dist/plugins/video/locales/es.d.ts +4 -0
  943. package/dist/plugins/video/locales/es.d.ts.map +1 -0
  944. package/dist/plugins/video/locales/fr.d.ts +4 -0
  945. package/dist/plugins/video/locales/fr.d.ts.map +1 -0
  946. package/dist/plugins/video/locales/hi.d.ts +4 -0
  947. package/dist/plugins/video/locales/hi.d.ts.map +1 -0
  948. package/dist/plugins/video/locales/pt.d.ts +4 -0
  949. package/dist/plugins/video/locales/pt.d.ts.map +1 -0
  950. package/dist/plugins/video/locales/ru.d.ts +4 -0
  951. package/dist/plugins/video/locales/ru.d.ts.map +1 -0
  952. package/dist/plugins/video/locales/zh.d.ts +4 -0
  953. package/dist/plugins/video/locales/zh.d.ts.map +1 -0
  954. package/dist/plugins/video.mjs +1 -0
  955. package/dist/presets/FullPreset.d.ts +1 -1
  956. package/dist/presets/FullPreset.d.ts.map +1 -1
  957. package/dist/presets/PresetTypes.d.ts +4 -0
  958. package/dist/presets/PresetTypes.d.ts.map +1 -1
  959. package/dist/presets/full.mjs +1 -1
  960. package/dist/presets/minimal.mjs +1 -1
  961. package/dist/presets.mjs +1 -1
  962. package/dist/serialization/CSSClassCollector.d.ts.map +1 -1
  963. package/dist/serialization/ContentHTMLTypes.d.ts +19 -1
  964. package/dist/serialization/ContentHTMLTypes.d.ts.map +1 -1
  965. package/dist/serialization/DocumentParser.d.ts.map +1 -1
  966. package/dist/serialization/DocumentSerializer.d.ts +3 -3
  967. package/dist/serialization/DocumentSerializer.d.ts.map +1 -1
  968. package/dist/serialization/HTMLWhitespace.d.ts +22 -0
  969. package/dist/serialization/HTMLWhitespace.d.ts.map +1 -0
  970. package/dist/serialization/MarkSerializer.d.ts.map +1 -1
  971. package/dist/serialization/index.d.ts +1 -1
  972. package/dist/serialization/index.d.ts.map +1 -1
  973. package/dist/state/BlockTreeOps.d.ts +8 -1
  974. package/dist/state/BlockTreeOps.d.ts.map +1 -1
  975. package/dist/state/EditorState.d.ts.map +1 -1
  976. package/dist/state/History.d.ts +20 -0
  977. package/dist/state/History.d.ts.map +1 -1
  978. package/dist/state/InlineContentOps.d.ts +30 -0
  979. package/dist/state/InlineContentOps.d.ts.map +1 -1
  980. package/dist/state/Mapping.d.ts +261 -0
  981. package/dist/state/Mapping.d.ts.map +1 -0
  982. package/dist/state/NavigationQueries.d.ts +11 -0
  983. package/dist/state/NavigationQueries.d.ts.map +1 -1
  984. package/dist/state/SelectionMapping.d.ts +25 -0
  985. package/dist/state/SelectionMapping.d.ts.map +1 -0
  986. package/dist/state/StepApplication.d.ts +20 -3
  987. package/dist/state/StepApplication.d.ts.map +1 -1
  988. package/dist/state/StepHandlers.d.ts +68 -0
  989. package/dist/state/StepHandlers.d.ts.map +1 -0
  990. package/dist/state/StepInversion.d.ts +22 -5
  991. package/dist/state/StepInversion.d.ts.map +1 -1
  992. package/dist/state/StepMapping.d.ts +18 -0
  993. package/dist/state/StepMapping.d.ts.map +1 -0
  994. package/dist/state/StepMaps.d.ts +25 -0
  995. package/dist/state/StepMaps.d.ts.map +1 -0
  996. package/dist/state/Steps.d.ts +38 -0
  997. package/dist/state/Steps.d.ts.map +1 -1
  998. package/dist/state/Transaction.d.ts +25 -1
  999. package/dist/state/Transaction.d.ts.map +1 -1
  1000. package/dist/state/TransactionBuilder.d.ts +51 -7
  1001. package/dist/state/TransactionBuilder.d.ts.map +1 -1
  1002. package/dist/test/TestUtils.d.ts +3 -1
  1003. package/dist/test/TestUtils.d.ts.map +1 -1
  1004. package/dist/view/CaretNavigation.d.ts.map +1 -1
  1005. package/dist/view/EditorView.d.ts.map +1 -1
  1006. package/dist/view/SelectionSync.d.ts.map +1 -1
  1007. package/dist/view/ViewMovementCommands.d.ts.map +1 -1
  1008. package/package.json +16 -1
  1009. package/dist/chunks/AlignmentPlugin-bqK6ze-E.mjs +0 -2
  1010. package/dist/chunks/AlignmentPlugin-bqK6ze-E.mjs.map +0 -1
  1011. package/dist/chunks/AttrRegistry-nDKtHK87.mjs +0 -2
  1012. package/dist/chunks/AttrRegistry-nDKtHK87.mjs.map +0 -1
  1013. package/dist/chunks/AttributedMarkCommands-35jTbVRg.mjs +0 -2
  1014. package/dist/chunks/AttributedMarkCommands-35jTbVRg.mjs.map +0 -1
  1015. package/dist/chunks/BidiIsolationPlugin-SIKxfWXp.mjs +0 -2
  1016. package/dist/chunks/BidiIsolationPlugin-SIKxfWXp.mjs.map +0 -1
  1017. package/dist/chunks/BlockInsertion-DsnHLcvM.mjs +0 -2
  1018. package/dist/chunks/BlockInsertion-DsnHLcvM.mjs.map +0 -1
  1019. package/dist/chunks/BlockTypePickerRegistry-C_jLddOz.mjs +0 -2
  1020. package/dist/chunks/BlockTypePickerRegistry-C_jLddOz.mjs.map +0 -1
  1021. package/dist/chunks/BlockquotePlugin-BEaZSoVT.mjs +0 -2
  1022. package/dist/chunks/BlockquotePlugin-BEaZSoVT.mjs.map +0 -1
  1023. package/dist/chunks/CaretNavigationPlugin-DHl61oc6.mjs +0 -2
  1024. package/dist/chunks/CaretNavigationPlugin-DHl61oc6.mjs.map +0 -1
  1025. package/dist/chunks/CodeBlockPlugin-DglqiSNK.mjs +0 -2
  1026. package/dist/chunks/CodeBlockPlugin-DglqiSNK.mjs.map +0 -1
  1027. package/dist/chunks/ColorGrid-Czm0p2E9.mjs +0 -2
  1028. package/dist/chunks/ColorGrid-Czm0p2E9.mjs.map +0 -1
  1029. package/dist/chunks/ColorPickerPopup-CL-W380M.mjs +0 -2
  1030. package/dist/chunks/ColorPickerPopup-CL-W380M.mjs.map +0 -1
  1031. package/dist/chunks/ColorValidation-CiGxVsqd.mjs +0 -2
  1032. package/dist/chunks/ColorValidation-CiGxVsqd.mjs.map +0 -1
  1033. package/dist/chunks/CommandHelpers-DTlQcGv5.mjs +0 -2
  1034. package/dist/chunks/CommandHelpers-DTlQcGv5.mjs.map +0 -1
  1035. package/dist/chunks/Commands-BuYF23lf.mjs +0 -2
  1036. package/dist/chunks/Commands-BuYF23lf.mjs.map +0 -1
  1037. package/dist/chunks/Decoration-oeHDjWWq.mjs +0 -2
  1038. package/dist/chunks/Decoration-oeHDjWWq.mjs.map +0 -1
  1039. package/dist/chunks/DirectionDetection-Hun6-7ER.mjs +0 -2
  1040. package/dist/chunks/DirectionDetection-Hun6-7ER.mjs.map +0 -1
  1041. package/dist/chunks/DirectionIcons-CfaDcQ9a.mjs +0 -2
  1042. package/dist/chunks/DirectionIcons-CfaDcQ9a.mjs.map +0 -1
  1043. package/dist/chunks/Document-_qdGR4vh.mjs +0 -2
  1044. package/dist/chunks/Document-_qdGR4vh.mjs.map +0 -1
  1045. package/dist/chunks/DocumentParser-CyATBOz-.mjs +0 -2
  1046. package/dist/chunks/DocumentParser-CyATBOz-.mjs.map +0 -1
  1047. package/dist/chunks/FontPlugin-B-Sxa0UW.mjs +0 -2
  1048. package/dist/chunks/FontPlugin-B-Sxa0UW.mjs.map +0 -1
  1049. package/dist/chunks/FontSizePlugin-C1zlyXL2.mjs +0 -2
  1050. package/dist/chunks/FontSizePlugin-C1zlyXL2.mjs.map +0 -1
  1051. package/dist/chunks/GapCursorNavigation-BaXDnjFf.mjs +0 -2
  1052. package/dist/chunks/GapCursorNavigation-BaXDnjFf.mjs.map +0 -1
  1053. package/dist/chunks/GapCursorPlugin-nldun8cE.mjs +0 -2
  1054. package/dist/chunks/GapCursorPlugin-nldun8cE.mjs.map +0 -1
  1055. package/dist/chunks/HardBreakPlugin-DZRdsE15.mjs +0 -2
  1056. package/dist/chunks/HardBreakPlugin-DZRdsE15.mjs.map +0 -1
  1057. package/dist/chunks/HeadingPlugin-EPAmsEGt.mjs +0 -2
  1058. package/dist/chunks/HeadingPlugin-EPAmsEGt.mjs.map +0 -1
  1059. package/dist/chunks/HighlightPlugin-RN3l6pVJ.mjs +0 -2
  1060. package/dist/chunks/HighlightPlugin-RN3l6pVJ.mjs.map +0 -1
  1061. package/dist/chunks/HorizontalRulePlugin-BJPXzTtJ.mjs +0 -2
  1062. package/dist/chunks/HorizontalRulePlugin-BJPXzTtJ.mjs.map +0 -1
  1063. package/dist/chunks/ImagePlugin-CCEevNfJ.mjs +0 -2
  1064. package/dist/chunks/ImagePlugin-CCEevNfJ.mjs.map +0 -1
  1065. package/dist/chunks/InlineCodePlugin-B7IOgUSI.mjs +0 -2
  1066. package/dist/chunks/InlineCodePlugin-B7IOgUSI.mjs.map +0 -1
  1067. package/dist/chunks/KeyboardNav-CsdlWnNl.mjs +0 -2
  1068. package/dist/chunks/KeyboardNav-CsdlWnNl.mjs.map +0 -1
  1069. package/dist/chunks/LinkPlugin-Bhwg24lH.mjs +0 -2
  1070. package/dist/chunks/LinkPlugin-Bhwg24lH.mjs.map +0 -1
  1071. package/dist/chunks/ListPlugin-BkG6UO4x.mjs +0 -2
  1072. package/dist/chunks/ListPlugin-BkG6UO4x.mjs.map +0 -1
  1073. package/dist/chunks/NavigationQueries-CgYPG6oY.mjs +0 -2
  1074. package/dist/chunks/NavigationQueries-CgYPG6oY.mjs.map +0 -1
  1075. package/dist/chunks/NodeResolver-DVPpO5nC.mjs +0 -2
  1076. package/dist/chunks/NodeResolver-DVPpO5nC.mjs.map +0 -1
  1077. package/dist/chunks/NodeSelectionCommands-Ddxu5Qck.mjs +0 -2
  1078. package/dist/chunks/NodeSelectionCommands-Ddxu5Qck.mjs.map +0 -1
  1079. package/dist/chunks/Platform-D9TRT4Mn.mjs +0 -2
  1080. package/dist/chunks/Platform-D9TRT4Mn.mjs.map +0 -1
  1081. package/dist/chunks/PluginHelpers-D-MvWR98.mjs +0 -2
  1082. package/dist/chunks/PluginHelpers-D-MvWR98.mjs.map +0 -1
  1083. package/dist/chunks/PopupKeyboardPatterns-DQdL7RHx.mjs +0 -2
  1084. package/dist/chunks/PopupKeyboardPatterns-DQdL7RHx.mjs.map +0 -1
  1085. package/dist/chunks/PopupManager-CxPzNm-P.mjs +0 -2
  1086. package/dist/chunks/PopupManager-CxPzNm-P.mjs.map +0 -1
  1087. package/dist/chunks/PopupPositioning-DRNwWB0U.mjs +0 -2
  1088. package/dist/chunks/PopupPositioning-DRNwWB0U.mjs.map +0 -1
  1089. package/dist/chunks/PrintPlugin-DOk5IZRO.mjs +0 -2
  1090. package/dist/chunks/PrintPlugin-DOk5IZRO.mjs.map +0 -1
  1091. package/dist/chunks/PrintTypes-Drk6kLcl.mjs +0 -2
  1092. package/dist/chunks/PrintTypes-Drk6kLcl.mjs.map +0 -1
  1093. package/dist/chunks/RangeIterator-DytL1lUT.mjs +0 -2
  1094. package/dist/chunks/RangeIterator-DytL1lUT.mjs.map +0 -1
  1095. package/dist/chunks/ShortcutFormatting-DE6B8iGs.mjs +0 -2
  1096. package/dist/chunks/ShortcutFormatting-DE6B8iGs.mjs.map +0 -1
  1097. package/dist/chunks/SmartPastePlugin-DqKx94sH.mjs +0 -2
  1098. package/dist/chunks/SmartPastePlugin-DqKx94sH.mjs.map +0 -1
  1099. package/dist/chunks/StrikethroughPlugin-vYNzfxdy.mjs +0 -2
  1100. package/dist/chunks/StrikethroughPlugin-vYNzfxdy.mjs.map +0 -1
  1101. package/dist/chunks/StyleRuntime-D3d1XFFe.mjs +0 -2
  1102. package/dist/chunks/StyleRuntime-D3d1XFFe.mjs.map +0 -1
  1103. package/dist/chunks/SuperSubPlugin-BNsoXWHS.mjs +0 -2
  1104. package/dist/chunks/SuperSubPlugin-BNsoXWHS.mjs.map +0 -1
  1105. package/dist/chunks/SyntaxTokenTypes-CVUAMov0.mjs +0 -2
  1106. package/dist/chunks/SyntaxTokenTypes-CVUAMov0.mjs.map +0 -1
  1107. package/dist/chunks/TablePlugin-R-hmydrM.mjs +0 -2
  1108. package/dist/chunks/TablePlugin-R-hmydrM.mjs.map +0 -1
  1109. package/dist/chunks/TextColorPlugin-DQ-CB9cr.mjs +0 -2
  1110. package/dist/chunks/TextColorPlugin-DQ-CB9cr.mjs.map +0 -1
  1111. package/dist/chunks/TextDirectionAutoPlugin-kZ1tcu0d.mjs +0 -2
  1112. package/dist/chunks/TextDirectionAutoPlugin-kZ1tcu0d.mjs.map +0 -1
  1113. package/dist/chunks/TextDirectionPlugin-Bk3CkbYh.mjs +0 -2
  1114. package/dist/chunks/TextDirectionPlugin-Bk3CkbYh.mjs.map +0 -1
  1115. package/dist/chunks/TextDirectionService-DY4M8EwU.mjs +0 -2
  1116. package/dist/chunks/TextDirectionService-DY4M8EwU.mjs.map +0 -1
  1117. package/dist/chunks/TextFormattingPlugin-D13eP6nF.mjs +0 -2
  1118. package/dist/chunks/TextFormattingPlugin-D13eP6nF.mjs.map +0 -1
  1119. package/dist/chunks/ToolbarPlugin-DeH8n5d2.mjs +0 -2
  1120. package/dist/chunks/ToolbarPlugin-DeH8n5d2.mjs.map +0 -1
  1121. package/dist/chunks/TypedKeys-CU7aToqY.mjs +0 -2
  1122. package/dist/chunks/TypedKeys-CU7aToqY.mjs.map +0 -1
  1123. package/dist/chunks/WordBoundary-BE2u997Q.mjs +0 -2
  1124. package/dist/chunks/WordBoundary-BE2u997Q.mjs.map +0 -1
  1125. package/dist/chunks/XmlDetector-BtYxzBDa.mjs +0 -2
  1126. package/dist/chunks/XmlDetector-BtYxzBDa.mjs.map +0 -1
  1127. package/dist/chunks/XmlPatterns-DuP8GWVt.mjs +0 -2
  1128. package/dist/chunks/XmlPatterns-DuP8GWVt.mjs.map +0 -1
  1129. package/dist/chunks/XmlSupport-D54BdAJZ.mjs +0 -2
  1130. package/dist/chunks/XmlSupport-D54BdAJZ.mjs.map +0 -1
  1131. package/dist/chunks/ar-2Fkz_6nI.mjs +0 -2
  1132. package/dist/chunks/ar-2Fkz_6nI.mjs.map +0 -1
  1133. package/dist/chunks/ar-4ZPC8daa.mjs +0 -2
  1134. package/dist/chunks/ar-4ZPC8daa.mjs.map +0 -1
  1135. package/dist/chunks/ar-6I20_Djq.mjs +0 -2
  1136. package/dist/chunks/ar-6I20_Djq.mjs.map +0 -1
  1137. package/dist/chunks/ar-B7-Dm70S.mjs +0 -2
  1138. package/dist/chunks/ar-B7-Dm70S.mjs.map +0 -1
  1139. package/dist/chunks/ar-BRe0t96G.mjs +0 -2
  1140. package/dist/chunks/ar-BRe0t96G.mjs.map +0 -1
  1141. package/dist/chunks/ar-BnNyrtdi.mjs +0 -2
  1142. package/dist/chunks/ar-BnNyrtdi.mjs.map +0 -1
  1143. package/dist/chunks/ar-BsMfhWs5.mjs +0 -2
  1144. package/dist/chunks/ar-BsMfhWs5.mjs.map +0 -1
  1145. package/dist/chunks/ar-Bvja-bjE.mjs +0 -2
  1146. package/dist/chunks/ar-Bvja-bjE.mjs.map +0 -1
  1147. package/dist/chunks/ar-BxVbBvSa.mjs +0 -2
  1148. package/dist/chunks/ar-BxVbBvSa.mjs.map +0 -1
  1149. package/dist/chunks/ar-C5dW-co3.mjs +0 -2
  1150. package/dist/chunks/ar-C5dW-co3.mjs.map +0 -1
  1151. package/dist/chunks/ar-CARMr30L.mjs +0 -2
  1152. package/dist/chunks/ar-CARMr30L.mjs.map +0 -1
  1153. package/dist/chunks/ar-CB-pehGw.mjs +0 -2
  1154. package/dist/chunks/ar-CB-pehGw.mjs.map +0 -1
  1155. package/dist/chunks/ar-CEYgAxTM.mjs +0 -2
  1156. package/dist/chunks/ar-CEYgAxTM.mjs.map +0 -1
  1157. package/dist/chunks/ar-CO60qpZJ.mjs +0 -2
  1158. package/dist/chunks/ar-CO60qpZJ.mjs.map +0 -1
  1159. package/dist/chunks/ar-CtI_snUM.mjs +0 -2
  1160. package/dist/chunks/ar-CtI_snUM.mjs.map +0 -1
  1161. package/dist/chunks/ar-Cv1RQvhK.mjs +0 -2
  1162. package/dist/chunks/ar-Cv1RQvhK.mjs.map +0 -1
  1163. package/dist/chunks/ar-D5jV20Tu.mjs +0 -2
  1164. package/dist/chunks/ar-D5jV20Tu.mjs.map +0 -1
  1165. package/dist/chunks/ar-DJN9fQ7Z.mjs +0 -2
  1166. package/dist/chunks/ar-DJN9fQ7Z.mjs.map +0 -1
  1167. package/dist/chunks/ar-DPTsUnwA.mjs +0 -2
  1168. package/dist/chunks/ar-DPTsUnwA.mjs.map +0 -1
  1169. package/dist/chunks/ar-DZJIBD1Q.mjs +0 -2
  1170. package/dist/chunks/ar-DZJIBD1Q.mjs.map +0 -1
  1171. package/dist/chunks/ar-DkkbwV93.mjs +0 -2
  1172. package/dist/chunks/ar-DkkbwV93.mjs.map +0 -1
  1173. package/dist/chunks/ar-DmeMor8Y.mjs +0 -2
  1174. package/dist/chunks/ar-DmeMor8Y.mjs.map +0 -1
  1175. package/dist/chunks/ar-LnE7jPai.mjs +0 -2
  1176. package/dist/chunks/ar-LnE7jPai.mjs.map +0 -1
  1177. package/dist/chunks/ar-P3wW0fmA.mjs +0 -2
  1178. package/dist/chunks/ar-P3wW0fmA.mjs.map +0 -1
  1179. package/dist/chunks/ar-uum0DCfv.mjs +0 -2
  1180. package/dist/chunks/ar-uum0DCfv.mjs.map +0 -1
  1181. package/dist/chunks/color-picker-DlXhHBZ6.mjs +0 -2
  1182. package/dist/chunks/color-picker-DlXhHBZ6.mjs.map +0 -1
  1183. package/dist/chunks/de-8SHQu0rr.mjs +0 -2
  1184. package/dist/chunks/de-8SHQu0rr.mjs.map +0 -1
  1185. package/dist/chunks/de-B8a71A0X.mjs +0 -2
  1186. package/dist/chunks/de-B8a71A0X.mjs.map +0 -1
  1187. package/dist/chunks/de-B9weXoA1.mjs +0 -2
  1188. package/dist/chunks/de-B9weXoA1.mjs.map +0 -1
  1189. package/dist/chunks/de-BKm53tVU.mjs +0 -2
  1190. package/dist/chunks/de-BKm53tVU.mjs.map +0 -1
  1191. package/dist/chunks/de-BLWrnMfX.mjs +0 -2
  1192. package/dist/chunks/de-BLWrnMfX.mjs.map +0 -1
  1193. package/dist/chunks/de-BOujs1pF.mjs +0 -2
  1194. package/dist/chunks/de-BOujs1pF.mjs.map +0 -1
  1195. package/dist/chunks/de-B_1XleAG.mjs +0 -2
  1196. package/dist/chunks/de-B_1XleAG.mjs.map +0 -1
  1197. package/dist/chunks/de-BpmjrOMc.mjs +0 -2
  1198. package/dist/chunks/de-BpmjrOMc.mjs.map +0 -1
  1199. package/dist/chunks/de-C8OHD1fm.mjs +0 -2
  1200. package/dist/chunks/de-C8OHD1fm.mjs.map +0 -1
  1201. package/dist/chunks/de-CAVCXBBR.mjs +0 -2
  1202. package/dist/chunks/de-CAVCXBBR.mjs.map +0 -1
  1203. package/dist/chunks/de-CkMnuozT.mjs +0 -2
  1204. package/dist/chunks/de-CkMnuozT.mjs.map +0 -1
  1205. package/dist/chunks/de-CtDnvnnm.mjs +0 -2
  1206. package/dist/chunks/de-CtDnvnnm.mjs.map +0 -1
  1207. package/dist/chunks/de-Cz26vtXW.mjs +0 -2
  1208. package/dist/chunks/de-Cz26vtXW.mjs.map +0 -1
  1209. package/dist/chunks/de-D0BPSP3j.mjs +0 -2
  1210. package/dist/chunks/de-D0BPSP3j.mjs.map +0 -1
  1211. package/dist/chunks/de-D74v0paw.mjs +0 -2
  1212. package/dist/chunks/de-D74v0paw.mjs.map +0 -1
  1213. package/dist/chunks/de-DKj55F9g.mjs +0 -2
  1214. package/dist/chunks/de-DKj55F9g.mjs.map +0 -1
  1215. package/dist/chunks/de-DYuRb98l.mjs +0 -2
  1216. package/dist/chunks/de-DYuRb98l.mjs.map +0 -1
  1217. package/dist/chunks/de-DaK0-sdo.mjs +0 -2
  1218. package/dist/chunks/de-DaK0-sdo.mjs.map +0 -1
  1219. package/dist/chunks/de-Dia08Wsq.mjs +0 -2
  1220. package/dist/chunks/de-Dia08Wsq.mjs.map +0 -1
  1221. package/dist/chunks/de-Dp_uj2Z3.mjs +0 -2
  1222. package/dist/chunks/de-Dp_uj2Z3.mjs.map +0 -1
  1223. package/dist/chunks/de-DwX1CDNO.mjs +0 -2
  1224. package/dist/chunks/de-DwX1CDNO.mjs.map +0 -1
  1225. package/dist/chunks/de-DyF2mRfw.mjs +0 -2
  1226. package/dist/chunks/de-DyF2mRfw.mjs.map +0 -1
  1227. package/dist/chunks/de-X3BLBlF8.mjs +0 -2
  1228. package/dist/chunks/de-X3BLBlF8.mjs.map +0 -1
  1229. package/dist/chunks/de-dPC3Qk7N.mjs +0 -2
  1230. package/dist/chunks/de-dPC3Qk7N.mjs.map +0 -1
  1231. package/dist/chunks/de-pLGt5S7j.mjs +0 -2
  1232. package/dist/chunks/de-pLGt5S7j.mjs.map +0 -1
  1233. package/dist/chunks/es--xozZF4T.mjs +0 -2
  1234. package/dist/chunks/es--xozZF4T.mjs.map +0 -1
  1235. package/dist/chunks/es-2BjtTusm.mjs +0 -2
  1236. package/dist/chunks/es-2BjtTusm.mjs.map +0 -1
  1237. package/dist/chunks/es-B2rEK7_f.mjs +0 -2
  1238. package/dist/chunks/es-B2rEK7_f.mjs.map +0 -1
  1239. package/dist/chunks/es-B9esmUm1.mjs +0 -2
  1240. package/dist/chunks/es-B9esmUm1.mjs.map +0 -1
  1241. package/dist/chunks/es-BJxkHalP.mjs +0 -2
  1242. package/dist/chunks/es-BJxkHalP.mjs.map +0 -1
  1243. package/dist/chunks/es-BMKsnh3y.mjs +0 -2
  1244. package/dist/chunks/es-BMKsnh3y.mjs.map +0 -1
  1245. package/dist/chunks/es-BXFflrrU.mjs +0 -2
  1246. package/dist/chunks/es-BXFflrrU.mjs.map +0 -1
  1247. package/dist/chunks/es-BbX_lEEN.mjs +0 -2
  1248. package/dist/chunks/es-BbX_lEEN.mjs.map +0 -1
  1249. package/dist/chunks/es-BlHe_tc0.mjs +0 -2
  1250. package/dist/chunks/es-BlHe_tc0.mjs.map +0 -1
  1251. package/dist/chunks/es-Bu6nnEeT.mjs +0 -2
  1252. package/dist/chunks/es-Bu6nnEeT.mjs.map +0 -1
  1253. package/dist/chunks/es-Bx0CbUoY.mjs +0 -2
  1254. package/dist/chunks/es-Bx0CbUoY.mjs.map +0 -1
  1255. package/dist/chunks/es-CE9Tbsb7.mjs +0 -2
  1256. package/dist/chunks/es-CE9Tbsb7.mjs.map +0 -1
  1257. package/dist/chunks/es-COSomns3.mjs +0 -2
  1258. package/dist/chunks/es-COSomns3.mjs.map +0 -1
  1259. package/dist/chunks/es-C_7qthHu.mjs +0 -2
  1260. package/dist/chunks/es-C_7qthHu.mjs.map +0 -1
  1261. package/dist/chunks/es-CirfP3x1.mjs +0 -2
  1262. package/dist/chunks/es-CirfP3x1.mjs.map +0 -1
  1263. package/dist/chunks/es-CpF8eiPr.mjs +0 -2
  1264. package/dist/chunks/es-CpF8eiPr.mjs.map +0 -1
  1265. package/dist/chunks/es-D787y0ui.mjs +0 -2
  1266. package/dist/chunks/es-D787y0ui.mjs.map +0 -1
  1267. package/dist/chunks/es-D8iB5vwQ.mjs +0 -2
  1268. package/dist/chunks/es-D8iB5vwQ.mjs.map +0 -1
  1269. package/dist/chunks/es-DBb78XWu.mjs +0 -2
  1270. package/dist/chunks/es-DBb78XWu.mjs.map +0 -1
  1271. package/dist/chunks/es-DC6mYTD3.mjs +0 -2
  1272. package/dist/chunks/es-DC6mYTD3.mjs.map +0 -1
  1273. package/dist/chunks/es-Dh--mRZs.mjs +0 -2
  1274. package/dist/chunks/es-Dh--mRZs.mjs.map +0 -1
  1275. package/dist/chunks/es-DvPsYqFj.mjs +0 -2
  1276. package/dist/chunks/es-DvPsYqFj.mjs.map +0 -1
  1277. package/dist/chunks/es-DxXimuUa.mjs +0 -2
  1278. package/dist/chunks/es-DxXimuUa.mjs.map +0 -1
  1279. package/dist/chunks/es-mWJptxq3.mjs +0 -2
  1280. package/dist/chunks/es-mWJptxq3.mjs.map +0 -1
  1281. package/dist/chunks/es-qYV--o6U.mjs +0 -2
  1282. package/dist/chunks/es-qYV--o6U.mjs.map +0 -1
  1283. package/dist/chunks/fonts-CxtWyeNB.mjs +0 -2
  1284. package/dist/chunks/fonts-CxtWyeNB.mjs.map +0 -1
  1285. package/dist/chunks/fr--F426oao.mjs +0 -2
  1286. package/dist/chunks/fr--F426oao.mjs.map +0 -1
  1287. package/dist/chunks/fr-B0BPbbNB.mjs +0 -2
  1288. package/dist/chunks/fr-B0BPbbNB.mjs.map +0 -1
  1289. package/dist/chunks/fr-B4UQy0j-.mjs +0 -2
  1290. package/dist/chunks/fr-B4UQy0j-.mjs.map +0 -1
  1291. package/dist/chunks/fr-B4XLxkci.mjs +0 -2
  1292. package/dist/chunks/fr-B4XLxkci.mjs.map +0 -1
  1293. package/dist/chunks/fr-BC1Rfp9S.mjs +0 -2
  1294. package/dist/chunks/fr-BC1Rfp9S.mjs.map +0 -1
  1295. package/dist/chunks/fr-BRGGu0E2.mjs +0 -2
  1296. package/dist/chunks/fr-BRGGu0E2.mjs.map +0 -1
  1297. package/dist/chunks/fr-BoSz1pa9.mjs +0 -2
  1298. package/dist/chunks/fr-BoSz1pa9.mjs.map +0 -1
  1299. package/dist/chunks/fr-Bom3RFIN.mjs +0 -2
  1300. package/dist/chunks/fr-Bom3RFIN.mjs.map +0 -1
  1301. package/dist/chunks/fr-BtnwMUII.mjs +0 -2
  1302. package/dist/chunks/fr-BtnwMUII.mjs.map +0 -1
  1303. package/dist/chunks/fr-C6pglM3H.mjs +0 -2
  1304. package/dist/chunks/fr-C6pglM3H.mjs.map +0 -1
  1305. package/dist/chunks/fr-CDBpS6xE.mjs +0 -2
  1306. package/dist/chunks/fr-CDBpS6xE.mjs.map +0 -1
  1307. package/dist/chunks/fr-CN0ihkUg.mjs +0 -2
  1308. package/dist/chunks/fr-CN0ihkUg.mjs.map +0 -1
  1309. package/dist/chunks/fr-CNNBBeLM.mjs +0 -2
  1310. package/dist/chunks/fr-CNNBBeLM.mjs.map +0 -1
  1311. package/dist/chunks/fr-CVOY2y07.mjs +0 -2
  1312. package/dist/chunks/fr-CVOY2y07.mjs.map +0 -1
  1313. package/dist/chunks/fr-CZAbL_o0.mjs +0 -2
  1314. package/dist/chunks/fr-CZAbL_o0.mjs.map +0 -1
  1315. package/dist/chunks/fr-DJkPmQG_.mjs +0 -2
  1316. package/dist/chunks/fr-DJkPmQG_.mjs.map +0 -1
  1317. package/dist/chunks/fr-DkWdFDsR.mjs +0 -2
  1318. package/dist/chunks/fr-DkWdFDsR.mjs.map +0 -1
  1319. package/dist/chunks/fr-DnQHoPVo.mjs +0 -2
  1320. package/dist/chunks/fr-DnQHoPVo.mjs.map +0 -1
  1321. package/dist/chunks/fr-DsdueaiG.mjs +0 -2
  1322. package/dist/chunks/fr-DsdueaiG.mjs.map +0 -1
  1323. package/dist/chunks/fr-DxNdsa11.mjs +0 -2
  1324. package/dist/chunks/fr-DxNdsa11.mjs.map +0 -1
  1325. package/dist/chunks/fr-IO4_LYvE.mjs +0 -2
  1326. package/dist/chunks/fr-IO4_LYvE.mjs.map +0 -1
  1327. package/dist/chunks/fr-ZKDCEpww.mjs +0 -2
  1328. package/dist/chunks/fr-ZKDCEpww.mjs.map +0 -1
  1329. package/dist/chunks/fr-coufP_et.mjs +0 -2
  1330. package/dist/chunks/fr-coufP_et.mjs.map +0 -1
  1331. package/dist/chunks/fr-lYSOgOK7.mjs +0 -2
  1332. package/dist/chunks/fr-lYSOgOK7.mjs.map +0 -1
  1333. package/dist/chunks/fr-wobtRjcF.mjs +0 -2
  1334. package/dist/chunks/fr-wobtRjcF.mjs.map +0 -1
  1335. package/dist/chunks/full-5hGvv-bG.mjs +0 -2
  1336. package/dist/chunks/full-5hGvv-bG.mjs.map +0 -1
  1337. package/dist/chunks/hi-B0o90MFd.mjs +0 -2
  1338. package/dist/chunks/hi-B0o90MFd.mjs.map +0 -1
  1339. package/dist/chunks/hi-BFko34WG.mjs +0 -2
  1340. package/dist/chunks/hi-BFko34WG.mjs.map +0 -1
  1341. package/dist/chunks/hi-BVxSgaNT.mjs +0 -2
  1342. package/dist/chunks/hi-BVxSgaNT.mjs.map +0 -1
  1343. package/dist/chunks/hi-BirBQ5Ef.mjs +0 -2
  1344. package/dist/chunks/hi-BirBQ5Ef.mjs.map +0 -1
  1345. package/dist/chunks/hi-BnsbcSIX.mjs +0 -2
  1346. package/dist/chunks/hi-BnsbcSIX.mjs.map +0 -1
  1347. package/dist/chunks/hi-BoFuxLtG.mjs +0 -2
  1348. package/dist/chunks/hi-BoFuxLtG.mjs.map +0 -1
  1349. package/dist/chunks/hi-BptyTwAv.mjs +0 -2
  1350. package/dist/chunks/hi-BptyTwAv.mjs.map +0 -1
  1351. package/dist/chunks/hi-BulaYhi_.mjs +0 -2
  1352. package/dist/chunks/hi-BulaYhi_.mjs.map +0 -1
  1353. package/dist/chunks/hi-BzflHG6Y.mjs +0 -2
  1354. package/dist/chunks/hi-BzflHG6Y.mjs.map +0 -1
  1355. package/dist/chunks/hi-C7Hb-gQ_.mjs +0 -2
  1356. package/dist/chunks/hi-C7Hb-gQ_.mjs.map +0 -1
  1357. package/dist/chunks/hi-C_lY7kA9.mjs +0 -2
  1358. package/dist/chunks/hi-C_lY7kA9.mjs.map +0 -1
  1359. package/dist/chunks/hi-CkylXoIm.mjs +0 -2
  1360. package/dist/chunks/hi-CkylXoIm.mjs.map +0 -1
  1361. package/dist/chunks/hi-DGJTbrQi.mjs +0 -2
  1362. package/dist/chunks/hi-DGJTbrQi.mjs.map +0 -1
  1363. package/dist/chunks/hi-DGJgX0fG.mjs +0 -2
  1364. package/dist/chunks/hi-DGJgX0fG.mjs.map +0 -1
  1365. package/dist/chunks/hi-DKDYpjdr.mjs +0 -2
  1366. package/dist/chunks/hi-DKDYpjdr.mjs.map +0 -1
  1367. package/dist/chunks/hi-DfAX8S-T.mjs +0 -2
  1368. package/dist/chunks/hi-DfAX8S-T.mjs.map +0 -1
  1369. package/dist/chunks/hi-Dhq91ipt.mjs +0 -2
  1370. package/dist/chunks/hi-Dhq91ipt.mjs.map +0 -1
  1371. package/dist/chunks/hi-Dup389dM.mjs +0 -2
  1372. package/dist/chunks/hi-Dup389dM.mjs.map +0 -1
  1373. package/dist/chunks/hi-DzRFsYYN.mjs +0 -2
  1374. package/dist/chunks/hi-DzRFsYYN.mjs.map +0 -1
  1375. package/dist/chunks/hi-ObZRwITd.mjs +0 -2
  1376. package/dist/chunks/hi-ObZRwITd.mjs.map +0 -1
  1377. package/dist/chunks/hi-VvUzjfH_.mjs +0 -2
  1378. package/dist/chunks/hi-VvUzjfH_.mjs.map +0 -1
  1379. package/dist/chunks/hi-jWQDQkOX.mjs +0 -2
  1380. package/dist/chunks/hi-jWQDQkOX.mjs.map +0 -1
  1381. package/dist/chunks/hi-l3hIrp8J.mjs +0 -2
  1382. package/dist/chunks/hi-l3hIrp8J.mjs.map +0 -1
  1383. package/dist/chunks/hi-o8Gsu5Ly.mjs +0 -2
  1384. package/dist/chunks/hi-o8Gsu5Ly.mjs.map +0 -1
  1385. package/dist/chunks/hi-sxC2nk3h.mjs +0 -2
  1386. package/dist/chunks/hi-sxC2nk3h.mjs.map +0 -1
  1387. package/dist/chunks/minimal-pBhi4EJI.mjs +0 -2
  1388. package/dist/chunks/minimal-pBhi4EJI.mjs.map +0 -1
  1389. package/dist/chunks/pt--57Ug7ig.mjs +0 -2
  1390. package/dist/chunks/pt--57Ug7ig.mjs.map +0 -1
  1391. package/dist/chunks/pt-4j8Km9Db.mjs +0 -2
  1392. package/dist/chunks/pt-4j8Km9Db.mjs.map +0 -1
  1393. package/dist/chunks/pt-BTGFKCns.mjs +0 -2
  1394. package/dist/chunks/pt-BTGFKCns.mjs.map +0 -1
  1395. package/dist/chunks/pt-BU8Qfuoz.mjs +0 -2
  1396. package/dist/chunks/pt-BU8Qfuoz.mjs.map +0 -1
  1397. package/dist/chunks/pt-BYAOJxIB.mjs +0 -2
  1398. package/dist/chunks/pt-BYAOJxIB.mjs.map +0 -1
  1399. package/dist/chunks/pt-BjNWQm9A.mjs +0 -2
  1400. package/dist/chunks/pt-BjNWQm9A.mjs.map +0 -1
  1401. package/dist/chunks/pt-Bvnb_NpT.mjs +0 -2
  1402. package/dist/chunks/pt-Bvnb_NpT.mjs.map +0 -1
  1403. package/dist/chunks/pt-C2pkn7vo.mjs +0 -2
  1404. package/dist/chunks/pt-C2pkn7vo.mjs.map +0 -1
  1405. package/dist/chunks/pt-C8MhLnWx.mjs +0 -2
  1406. package/dist/chunks/pt-C8MhLnWx.mjs.map +0 -1
  1407. package/dist/chunks/pt-CJfYLSTe.mjs +0 -2
  1408. package/dist/chunks/pt-CJfYLSTe.mjs.map +0 -1
  1409. package/dist/chunks/pt-CdwVIYOK.mjs +0 -2
  1410. package/dist/chunks/pt-CdwVIYOK.mjs.map +0 -1
  1411. package/dist/chunks/pt-CwrVo90O.mjs +0 -2
  1412. package/dist/chunks/pt-CwrVo90O.mjs.map +0 -1
  1413. package/dist/chunks/pt-DD26CKCA.mjs +0 -2
  1414. package/dist/chunks/pt-DD26CKCA.mjs.map +0 -1
  1415. package/dist/chunks/pt-DLbf6uoo.mjs +0 -2
  1416. package/dist/chunks/pt-DLbf6uoo.mjs.map +0 -1
  1417. package/dist/chunks/pt-DNyNHwKh.mjs +0 -2
  1418. package/dist/chunks/pt-DNyNHwKh.mjs.map +0 -1
  1419. package/dist/chunks/pt-DVfMAcXb.mjs +0 -2
  1420. package/dist/chunks/pt-DVfMAcXb.mjs.map +0 -1
  1421. package/dist/chunks/pt-DWSFad3n.mjs +0 -2
  1422. package/dist/chunks/pt-DWSFad3n.mjs.map +0 -1
  1423. package/dist/chunks/pt-DZXY4i4G.mjs +0 -2
  1424. package/dist/chunks/pt-DZXY4i4G.mjs.map +0 -1
  1425. package/dist/chunks/pt-DfUpRhK1.mjs +0 -2
  1426. package/dist/chunks/pt-DfUpRhK1.mjs.map +0 -1
  1427. package/dist/chunks/pt-DlvNEDeW.mjs +0 -2
  1428. package/dist/chunks/pt-DlvNEDeW.mjs.map +0 -1
  1429. package/dist/chunks/pt-DzFyGwB4.mjs +0 -2
  1430. package/dist/chunks/pt-DzFyGwB4.mjs.map +0 -1
  1431. package/dist/chunks/pt-HhQcARW6.mjs +0 -2
  1432. package/dist/chunks/pt-HhQcARW6.mjs.map +0 -1
  1433. package/dist/chunks/pt-SjvTF40s.mjs +0 -2
  1434. package/dist/chunks/pt-SjvTF40s.mjs.map +0 -1
  1435. package/dist/chunks/pt-ihNE0VQJ.mjs +0 -2
  1436. package/dist/chunks/pt-ihNE0VQJ.mjs.map +0 -1
  1437. package/dist/chunks/pt-zfCjhIgy.mjs +0 -2
  1438. package/dist/chunks/pt-zfCjhIgy.mjs.map +0 -1
  1439. package/dist/chunks/ru-0AHodbWv.mjs +0 -2
  1440. package/dist/chunks/ru-0AHodbWv.mjs.map +0 -1
  1441. package/dist/chunks/ru-2MDGmLw0.mjs +0 -2
  1442. package/dist/chunks/ru-2MDGmLw0.mjs.map +0 -1
  1443. package/dist/chunks/ru-3VfYKfTm.mjs +0 -2
  1444. package/dist/chunks/ru-3VfYKfTm.mjs.map +0 -1
  1445. package/dist/chunks/ru-B-gRJ6nQ.mjs +0 -2
  1446. package/dist/chunks/ru-B-gRJ6nQ.mjs.map +0 -1
  1447. package/dist/chunks/ru-B6ITUB-Y.mjs +0 -2
  1448. package/dist/chunks/ru-B6ITUB-Y.mjs.map +0 -1
  1449. package/dist/chunks/ru-BKDWkabk.mjs +0 -2
  1450. package/dist/chunks/ru-BKDWkabk.mjs.map +0 -1
  1451. package/dist/chunks/ru-BMxJsSe3.mjs +0 -2
  1452. package/dist/chunks/ru-BMxJsSe3.mjs.map +0 -1
  1453. package/dist/chunks/ru-Bep1iHQL.mjs +0 -2
  1454. package/dist/chunks/ru-Bep1iHQL.mjs.map +0 -1
  1455. package/dist/chunks/ru-Blj0nqoL.mjs +0 -2
  1456. package/dist/chunks/ru-Blj0nqoL.mjs.map +0 -1
  1457. package/dist/chunks/ru-BqnHkmii.mjs +0 -2
  1458. package/dist/chunks/ru-BqnHkmii.mjs.map +0 -1
  1459. package/dist/chunks/ru-C-4AaPUK.mjs +0 -2
  1460. package/dist/chunks/ru-C-4AaPUK.mjs.map +0 -1
  1461. package/dist/chunks/ru-C9Nv7JJI.mjs +0 -2
  1462. package/dist/chunks/ru-C9Nv7JJI.mjs.map +0 -1
  1463. package/dist/chunks/ru-CJFtr1Ks.mjs +0 -2
  1464. package/dist/chunks/ru-CJFtr1Ks.mjs.map +0 -1
  1465. package/dist/chunks/ru-CN63yWk_.mjs +0 -2
  1466. package/dist/chunks/ru-CN63yWk_.mjs.map +0 -1
  1467. package/dist/chunks/ru-CcFX97-2.mjs +0 -2
  1468. package/dist/chunks/ru-CcFX97-2.mjs.map +0 -1
  1469. package/dist/chunks/ru-D8PhWFSp.mjs +0 -2
  1470. package/dist/chunks/ru-D8PhWFSp.mjs.map +0 -1
  1471. package/dist/chunks/ru-DYAncidS.mjs +0 -2
  1472. package/dist/chunks/ru-DYAncidS.mjs.map +0 -1
  1473. package/dist/chunks/ru-D_zXo-FA.mjs +0 -2
  1474. package/dist/chunks/ru-D_zXo-FA.mjs.map +0 -1
  1475. package/dist/chunks/ru-DhSPV6m0.mjs +0 -2
  1476. package/dist/chunks/ru-DhSPV6m0.mjs.map +0 -1
  1477. package/dist/chunks/ru-LNbpjKCw.mjs +0 -2
  1478. package/dist/chunks/ru-LNbpjKCw.mjs.map +0 -1
  1479. package/dist/chunks/ru-LXi1ONW4.mjs +0 -2
  1480. package/dist/chunks/ru-LXi1ONW4.mjs.map +0 -1
  1481. package/dist/chunks/ru-db7wsWkx.mjs +0 -2
  1482. package/dist/chunks/ru-db7wsWkx.mjs.map +0 -1
  1483. package/dist/chunks/ru-nZ4BjiD0.mjs +0 -2
  1484. package/dist/chunks/ru-nZ4BjiD0.mjs.map +0 -1
  1485. package/dist/chunks/ru-v9zumXd2.mjs +0 -2
  1486. package/dist/chunks/ru-v9zumXd2.mjs.map +0 -1
  1487. package/dist/chunks/ru-wK2ytv3A.mjs +0 -2
  1488. package/dist/chunks/ru-wK2ytv3A.mjs.map +0 -1
  1489. package/dist/chunks/src-CNK6vpUU.mjs +0 -2
  1490. package/dist/chunks/src-CNK6vpUU.mjs.map +0 -1
  1491. package/dist/chunks/zh-9AcCSFm0.mjs +0 -2
  1492. package/dist/chunks/zh-9AcCSFm0.mjs.map +0 -1
  1493. package/dist/chunks/zh-B3bJCfdB.mjs +0 -2
  1494. package/dist/chunks/zh-B3bJCfdB.mjs.map +0 -1
  1495. package/dist/chunks/zh-B46Dt1h7.mjs +0 -2
  1496. package/dist/chunks/zh-B46Dt1h7.mjs.map +0 -1
  1497. package/dist/chunks/zh-BRy2B6Og.mjs +0 -2
  1498. package/dist/chunks/zh-BRy2B6Og.mjs.map +0 -1
  1499. package/dist/chunks/zh-BfYi8wB2.mjs +0 -2
  1500. package/dist/chunks/zh-BfYi8wB2.mjs.map +0 -1
  1501. package/dist/chunks/zh-C0I3L6NA.mjs +0 -2
  1502. package/dist/chunks/zh-C0I3L6NA.mjs.map +0 -1
  1503. package/dist/chunks/zh-C33e4gfg.mjs +0 -2
  1504. package/dist/chunks/zh-C33e4gfg.mjs.map +0 -1
  1505. package/dist/chunks/zh-C9sNwnC1.mjs +0 -2
  1506. package/dist/chunks/zh-C9sNwnC1.mjs.map +0 -1
  1507. package/dist/chunks/zh-CACr0qSo.mjs +0 -2
  1508. package/dist/chunks/zh-CACr0qSo.mjs.map +0 -1
  1509. package/dist/chunks/zh-CU0hd8zq.mjs +0 -2
  1510. package/dist/chunks/zh-CU0hd8zq.mjs.map +0 -1
  1511. package/dist/chunks/zh-CX2zUoWR.mjs +0 -2
  1512. package/dist/chunks/zh-CX2zUoWR.mjs.map +0 -1
  1513. package/dist/chunks/zh-CblZ-34H.mjs +0 -2
  1514. package/dist/chunks/zh-CblZ-34H.mjs.map +0 -1
  1515. package/dist/chunks/zh-CicpU0g8.mjs +0 -2
  1516. package/dist/chunks/zh-CicpU0g8.mjs.map +0 -1
  1517. package/dist/chunks/zh-Cr3KdEZV.mjs +0 -2
  1518. package/dist/chunks/zh-Cr3KdEZV.mjs.map +0 -1
  1519. package/dist/chunks/zh-D24dsCiw.mjs +0 -2
  1520. package/dist/chunks/zh-D24dsCiw.mjs.map +0 -1
  1521. package/dist/chunks/zh-DQtLxQ3s.mjs +0 -2
  1522. package/dist/chunks/zh-DQtLxQ3s.mjs.map +0 -1
  1523. package/dist/chunks/zh-DR1OF5vm.mjs +0 -2
  1524. package/dist/chunks/zh-DR1OF5vm.mjs.map +0 -1
  1525. package/dist/chunks/zh-DS82x1KL.mjs +0 -2
  1526. package/dist/chunks/zh-DS82x1KL.mjs.map +0 -1
  1527. package/dist/chunks/zh-DdJA-AEY.mjs +0 -2
  1528. package/dist/chunks/zh-DdJA-AEY.mjs.map +0 -1
  1529. package/dist/chunks/zh-DpVlDZ9n.mjs +0 -2
  1530. package/dist/chunks/zh-DpVlDZ9n.mjs.map +0 -1
  1531. package/dist/chunks/zh-OWVKcbVR.mjs +0 -2
  1532. package/dist/chunks/zh-OWVKcbVR.mjs.map +0 -1
  1533. package/dist/chunks/zh-d19V68ib.mjs +0 -2
  1534. package/dist/chunks/zh-d19V68ib.mjs.map +0 -1
  1535. package/dist/chunks/zh-fSMt1FnB.mjs +0 -2
  1536. package/dist/chunks/zh-fSMt1FnB.mjs.map +0 -1
  1537. package/dist/chunks/zh-mLlk9Wki.mjs +0 -2
  1538. package/dist/chunks/zh-mLlk9Wki.mjs.map +0 -1
  1539. package/dist/chunks/zh-nnMt8E6m.mjs +0 -2
  1540. package/dist/chunks/zh-nnMt8E6m.mjs.map +0 -1
  1541. package/dist/input/InternalClipboard.d.ts +0 -13
  1542. package/dist/input/InternalClipboard.d.ts.map +0 -1
  1543. package/dist/plugins/smart-paste/detectors/JavaDetector.d.ts +0 -7
  1544. package/dist/plugins/smart-paste/detectors/JavaDetector.d.ts.map +0 -1
@@ -1,2 +0,0 @@
1
- import{C as e,S as t,T as n,a as s,b as i,c as r,d as o,f as a,g as l,h as c,i as h,l as d,m as p,p as u,r as g,s as m,t as f,u as y,w as k,x as S,y as w}from"./Document-_qdGR4vh.mjs";import{a as v,c as b,d as R,f as C,i as I,l as x,o as T,r as P,t as E,u as M}from"./Selection-aeiSsvhe.mjs";import{C as A,S as N,b as B,c as O,d as D,f as L,i as H,l as z,m as _,n as F,o as K,p as $,r as V,s as j,t as U,u as q,w as W,x as G,y as Q}from"./Commands-BuYF23lf.mjs";import{a as J,i as X,t as Y}from"./TypeBrands-BZDKMjR-.mjs";import{n as Z,t as ee}from"./DomUtils-RKbAVBQz.mjs";import{a as te,i as ne,t as se}from"./HTMLUtils-brwcaufP.mjs";import{i as ie,n as re,t as oe}from"./NodeResolver-DVPpO5nC.mjs";import{t as ae}from"./GapCursorNavigation-BaXDnjFf.mjs";import{C as le,D as ce,E as he,O as de,S as pe,T as ue,b as ge,t as me,v as fe,w as ye,x as ke,y as Se}from"./CaretNavigationPlugin-DHl61oc6.mjs";import{a as we,c as ve,o as be,r as Re,s as Ce}from"./CommandHelpers-DTlQcGv5.mjs";import{i as Ie,t as xe}from"./NodeSelectionCommands-Ddxu5Qck.mjs";import{t as Te}from"./Platform-D9TRT4Mn.mjs";import{a as Pe,i as Ee,o as Me,s as Ae,t as Ne}from"./DocumentParser-CyATBOz-.mjs";import{c as Be,i as Oe,l as De,n as Le,r as He,s as ze,t as _e,u as Fe}from"./BlockInsertion-DsnHLcvM.mjs";import{c as Ke,i as $e,l as Ve,n as je,s as Ue,t as qe}from"./StyleRuntime-D3d1XFFe.mjs";import{n as We,t as Ge}from"./Decoration-oeHDjWWq.mjs";import{t as Qe}from"./BlockTypePickerRegistry-C_jLddOz.mjs";import{o as Je,t as Xe}from"./ToolbarPlugin-DeH8n5d2.mjs";import{_ as Ye,a as Ze,f as et,h as tt,i as nt,l as st,n as it,o as rt,u as ot}from"./PrintTypes-Drk6kLcl.mjs";import{c as at,o as lt,s as ct}from"./PluginHelpers-D-MvWR98.mjs";import{t as ht}from"./GapCursorPlugin-nldun8cE.mjs";import{t as dt}from"./TextFormattingPlugin-D13eP6nF.mjs";import pt from"dompurify";var ut=class{_nodeSpecs=/* @__PURE__ */new Map;_markSpecs=/* @__PURE__ */new Map;_inlineNodeSpecs=/* @__PURE__ */new Map;registerNodeSpec(e){if(this._nodeSpecs.has(e.type))throw new Error(`NodeSpec for type "${e.type}" is already registered.`);this._nodeSpecs.set(e.type,e)}getNodeSpec(e){return this._nodeSpecs.get(e)}removeNodeSpec(e){this._nodeSpecs.delete(e)}getNodeTypes(){return[...this._nodeSpecs.keys()]}registerMarkSpec(e){if(this._markSpecs.has(e.type))throw new Error(`MarkSpec for type "${e.type}" is already registered.`);this._markSpecs.set(e.type,e)}getMarkSpec(e){return this._markSpecs.get(e)}removeMarkSpec(e){this._markSpecs.delete(e)}getMarkTypes(){return[...this._markSpecs.keys()]}registerInlineNodeSpec(e){if(this._inlineNodeSpecs.has(e.type))throw new Error(`InlineNodeSpec for type "${e.type}" is already registered.`);this._inlineNodeSpecs.set(e.type,e)}getInlineNodeSpec(e){return this._inlineNodeSpecs.get(e)}removeInlineNodeSpec(e){this._inlineNodeSpecs.delete(e)}getInlineNodeTypes(){return[...this._inlineNodeSpecs.keys()]}getBlockParseRules(){return this.collectParseRules(this._nodeSpecs)}getInlineParseRules(){return this.collectParseRules(this._inlineNodeSpecs)}getMarkParseRules(){return this.collectParseRules(this._markSpecs)}getAllowedTags(){return[...this.collectSanitizeValues(new Set(["p","br","div","span"]),e=>e.sanitize?.tags)]}getAllowedAttrs(){return[...this.collectSanitizeValues(new Set(["style","dir"]),e=>e.sanitize?.attrs)]}collectParseRules(e){const t=[];for(const[n,s]of e)if(s.parseHTML)for(const e of s.parseHTML)t.push({rule:e,type:n});return t.sort((e,t)=>(t.rule.priority??50)-(e.rule.priority??50))}collectSanitizeValues(e,t){const n=[this._nodeSpecs,this._inlineNodeSpecs,this._markSpecs];for(const s of n)for(const n of s.values()){const s=t(n);if(s)for(const t of s)e.add(t)}return e}clear(){this._nodeSpecs.clear(),this._markSpecs.clear(),this._inlineNodeSpecs.clear()}};function gt(e,t,n){const s=e.getNodeSpec(t);if(!s?.content)return!0;const i=e.getNodeSpec(n)?.group;for(const r of s.content.allow){if(r===n)return!0;if("text"!==r&&i&&r===i)return!0}return!1}function mt(e,t,n){const s=e.getNodeSpec(t);if(!s?.content)return!0;const{min:i=0,max:r=Number.POSITIVE_INFINITY}=s.content,o=n.filter(e=>"text"!==e);if(o.length<i||o.length>r)return!1;for(const a of o)if(!gt(e,t,a))return!1;return!0}function ft(e){e.registerNodeSpec({type:"paragraph",group:"block",content:{allow:["text"]},toDOM:e=>Z("p",e.id),toHTML:(e,t)=>`<p>${t||"<br>"}</p>`,parseHTML:[{tag:"p"},{tag:"div",priority:10}],sanitize:{tags:["p"]}})}function yt(e,t,n){return{children:kt(e.children,t,n)}}function kt(e,t,n){return e.map(e=>{if(!w(e))return e;if(e.id===t)return n(e);const s=kt(e.children,t,n);return s===e.children?e:{...e,children:s}})}function St(e,t,n){if(0===t.length)return e;const s=t[0];return s?{children:e.children.map(e=>w(e)&&e.id===s?1===t.length?n(e):wt(e,t,1,n):e)}:e}function wt(e,t,n,s){const i=t[n];if(!i)return e;const r=e.children.map(e=>w(e)&&e.id===i?n===t.length-1?s(e):wt(e,t,n+1,s):e);return{...e,children:r}}function vt(e,t,n){if(t(e))return n(e);let s=!1;const i=e.map(e=>{if(!w(e))return e;const i=vt(e.children,t,n);return i?(s=!0,{...e,children:i}):e});return s?i:null}function bt(e,t,n){const s=[];let r=0,o=!1;for(const a of e){if(i(a)){o||t!==r||(s.push(...n()),o=!0),s.push(a),r+=1;continue}const e=r+a.text.length;if(!o&&t>=r&&t<=e){const e=t-r,i=a.text.slice(0,e),l=a.text.slice(e);i&&s.push(m(i,a.marks)),s.push(...n()),l&&s.push(m(l,a.marks)),o=!0}else s.push(a);r=e}return o||s.push(...n()),s}function Rt(e,t,n){const s=[];let r=0;for(const o of e){if(i(o)){const e=r+1;e>t&&r<n&&s.push(o),r=e;continue}const e=r+o.text.length;if(e<=t||r>=n);else{const e=Math.max(0,t-r),i=Math.min(o.text.length,n-r),a=o.text.slice(e,i);a.length>0&&s.push(m(a,o.marks))}r=e}return 0===s.length&&s.push(m("")),s}function Ct(e,t,s,r,o){const a=[];let l=0;for(const c of e){if(i(c)){a.push(c),l+=1;continue}const e=l+c.text.length;if(e<=t||l>=s)a.push(c);else if(l>=t&&e<=s){const e=o?f(c.marks,r):n(c.marks,r.type);a.push(m(c.text,e))}else{const e=Math.max(0,t-l),i=Math.min(c.text.length,s-l),h=c.text.slice(0,e),d=c.text.slice(e,i),p=c.text.slice(i);if(h&&a.push(m(h,c.marks)),d){const e=o?f(c.marks,r):n(c.marks,r.type);a.push(m(d,e))}p&&a.push(m(p,c.marks))}l=e}return a}function It(e,n){if(e.every(e=>t(e)||i(e)))return n;const s=e.filter(e=>!t(e)&&!i(e));return[...n,...s]}function xt(e,t){switch(t.type){case"insertText":return function(e,t){return Tt(e,t.blockId,e=>{return t.segments?(n=e,s=t.offset,i=t.segments,bt(n,s,()=>i.map(e=>m(e.text,e.marks)))):function(e,t,n,s){return bt(e,t,()=>[m(n,s)])}(e,t.offset,t.text,t.marks);var n,s,i})}(e,t);case"deleteText":return function(e,t){return Tt(e,t.blockId,e=>function(e,t,n){const s=[];let r=0;for(const o of e){if(i(o)){const e=r+1;(e<=t||r>=n)&&s.push(o),r=e;continue}const e=r+o.text.length;if(e<=t||r>=n)s.push(o);else{const e=Math.max(0,t-r),i=Math.min(o.text.length,n-r),a=o.text.slice(0,e)+o.text.slice(i);a.length>0&&s.push(m(a,o.marks))}r=e}return s}(e,t.from,t.to))}(e,t);case"splitBlock":return function(e,t){const n=vt(e.children,e=>e.some(e=>w(e)&&e.id===t.blockId),e=>{const n=e.findIndex(e=>w(e)&&e.id===t.blockId);if(-1===n)return e;const s=e[n],i=l(s),r=o(s),a=Rt(i,0,t.offset),c=Rt(i,t.offset,r),h={...s,children:k(a)},d=g(s.type,k(c),t.newBlockId,s.attrs),p=[...e];return p.splice(n,1,h,d),p});return n?{children:n}:e}(e,t);case"mergeBlocks":return function(e,t){const n=vt(e.children,e=>e.some(e=>w(e)&&e.id===t.targetBlockId)&&e.some(e=>w(e)&&e.id===t.sourceBlockId),e=>{const n=e.findIndex(e=>w(e)&&e.id===t.targetBlockId),s=e.findIndex(e=>w(e)&&e.id===t.sourceBlockId);if(-1===n||-1===s)return e;const i=e[n],r=e[s],o=l(i),a=l(r),c=k([...o,...a]),h={...i,children:c};return e.filter(e=>!w(e)||e.id!==t.sourceBlockId).map(e=>w(e)&&e.id===t.targetBlockId?h:e)});return n?{children:n}:e}(e,t);case"addMark":return function(e,t){return Tt(e,t.blockId,e=>Ct(e,t.from,t.to,t.mark,!0))}(e,t);case"removeMark":return function(e,t){return Tt(e,t.blockId,e=>Ct(e,t.from,t.to,t.mark,!1))}(e,t);case"setStoredMarks":return e;case"setBlockType":return function(e,t){return yt(e,t.blockId,e=>{const{attrs:n,...s}=e;return{...s,type:t.nodeType,...t.attrs?{attrs:t.attrs}:{}}})}(e,t);case"insertNode":return function(e,t){if(0===t.parentPath.length){const n=[...e.children];return n.splice(t.index,0,t.node),{children:n}}return St(e,t.parentPath,e=>{const n=[...e.children];return n.splice(t.index,0,t.node),{...e,children:n}})}(e,t);case"removeNode":return function(e,t){if(0===t.parentPath.length){const n=[...e.children];return n.splice(t.index,1),{children:n}}return St(e,t.parentPath,e=>{const n=[...e.children];return n.splice(t.index,1),{...e,children:n}})}(e,t);case"setNodeAttr":return function(e,t){const n=t.path[t.path.length-1];return n?yt(e,n,e=>({...e,attrs:t.attrs})):e}(e,t);case"insertInlineNode":return function(e,t){return Tt(e,t.blockId,e=>function(e,t,n){const s=[];let r=0,o=!1;for(const a of e){if(i(a)){o||t!==r||(s.push(n),o=!0),s.push(a),r+=1;continue}const e=r+a.text.length;if(!o&&t>=r&&t<=e){const e=t-r,i=a.text.slice(0,e),l=a.text.slice(e);i&&s.push(m(i,a.marks)),s.push(n),l&&s.push(m(l,a.marks)),o=!0}else s.push(a);r=e}return o||s.push(n),s}(e,t.offset,t.node))}(e,t);case"removeInlineNode":return function(e,t){return Tt(e,t.blockId,e=>function(e,t){const n=[];let s=0;for(const r of e)i(r)?(s!==t&&n.push(r),s+=1):(n.push(r),s+=r.text.length);return n}(e,t.offset))}(e,t);case"setInlineNodeAttr":return function(e,t){return Tt(e,t.blockId,e=>function(e,t,n){const s=[];let r=0;for(const o of e)i(o)?(r===t?s.push({...o,attrs:n}):s.push(o),r+=1):(s.push(o),r+=o.text.length);return s}(e,t.offset,t.attrs),!1)}(e,t)}}function Tt(e,t,n,s=!0){return yt(e,t,e=>{const t=n(l(e));return{...e,children:It(e.children,s?k(t):t)}})}function Pt(e){return e.path?{path:e.path}:{}}function Et(e){switch(e.type){case"insertText":return{type:"deleteText",blockId:e.blockId,from:e.offset,to:e.offset+e.text.length,deletedText:e.text,deletedMarks:e.marks,deletedSegments:e.segments??[{text:e.text,marks:[...e.marks]}],...Pt(e)};case"deleteText":return{type:"insertText",blockId:e.blockId,offset:e.from,text:e.deletedText,marks:e.deletedMarks,segments:e.deletedSegments,...Pt(e)};case"splitBlock":return{type:"mergeBlocks",targetBlockId:e.blockId,sourceBlockId:e.newBlockId,targetLengthBefore:e.offset,...Pt(e)};case"mergeBlocks":return{type:"splitBlock",blockId:e.targetBlockId,offset:e.targetLengthBefore,newBlockId:e.sourceBlockId,...Pt(e)};case"addMark":return{type:"removeMark",blockId:e.blockId,from:e.from,to:e.to,mark:e.mark,...Pt(e)};case"removeMark":return{type:"addMark",blockId:e.blockId,from:e.from,to:e.to,mark:e.mark,...Pt(e)};case"setStoredMarks":return{type:"setStoredMarks",marks:e.previousMarks,previousMarks:e.marks};case"setBlockType":return{type:"setBlockType",blockId:e.blockId,nodeType:e.previousNodeType,attrs:e.previousAttrs,previousNodeType:e.nodeType,previousAttrs:e.attrs,...Pt(e)};case"insertNode":return{type:"removeNode",parentPath:e.parentPath,index:e.index,removedNode:e.node};case"removeNode":return{type:"insertNode",parentPath:e.parentPath,index:e.index,node:e.removedNode};case"setNodeAttr":return{type:"setNodeAttr",path:e.path,attrs:e.previousAttrs,previousAttrs:e.attrs};case"insertInlineNode":return{type:"removeInlineNode",blockId:e.blockId,offset:e.offset,removedNode:e.node,...Pt(e)};case"removeInlineNode":return{type:"insertInlineNode",blockId:e.blockId,offset:e.offset,node:e.removedNode,...Pt(e)};case"setInlineNodeAttr":return{type:"setInlineNodeAttr",blockId:e.blockId,offset:e.offset,attrs:e.previousAttrs,previousAttrs:e.attrs,...Pt(e)}}}function Mt(e){for(const t of e.steps)if("setStoredMarks"===t.type)return t.previousMarks;return e.storedMarksAfter}function At(e){return{steps:e.steps.map(Et).reverse(),selectionBefore:e.selectionAfter,selectionAfter:e.selectionBefore,storedMarksAfter:Mt(e),metadata:{origin:"history",timestamp:Date.now()}}}var Nt=class{steps=[];selection;storedMarks;selectionBefore;origin;workingDoc;_readonlyAllowed=!1;constructor(e,t,n="api",s){this.selection=e,this.selectionBefore=e,this.storedMarks=t,this.origin=n,this.workingDoc=s??null}insertText(e,t,n,s,i){const r={type:"insertText",blockId:e,offset:t,text:n,marks:s,...i?{segments:i}:{}};return this.steps.push(r),this.advanceDoc(r),this}deleteText(e,t,n,s,i,r){let o;if(r)o=r;else if(this.workingDoc){const r=oe(this.workingDoc,e);o=r?u(r,t,n):[{text:s,marks:[...i]}]}else o=[{text:s,marks:[...i]}];const a={type:"deleteText",blockId:e,from:t,to:n,deletedText:s,deletedMarks:i,deletedSegments:o};return this.steps.push(a),this.advanceDoc(a),this}deleteTextAt(e,t,n){const s=this.requireDoc("deleteTextAt"),i=this.requireBlock(s,e),r=p(i).slice(t,n),o=a(i,t),l=u(i,t,n);return this.deleteText(e,t,n,r,o,l)}splitBlock(e,t,n){const s={type:"splitBlock",blockId:e,offset:t,newBlockId:n};return this.steps.push(s),this.advanceDoc(s),this}mergeBlocks(e,t,n){const s={type:"mergeBlocks",targetBlockId:e,sourceBlockId:t,targetLengthBefore:n};return this.steps.push(s),this.advanceDoc(s),this}mergeBlocksAt(e,t){const n=this.requireDoc("mergeBlocksAt"),s=o(this.requireBlock(n,e));return this.mergeBlocks(e,t,s)}addMark(e,t,n,s){const i={type:"addMark",blockId:e,from:t,to:n,mark:s};return this.steps.push(i),this.advanceDoc(i),this}removeMark(e,t,n,s){const i={type:"removeMark",blockId:e,from:t,to:n,mark:s};return this.steps.push(i),this.advanceDoc(i),this}setBlockType(e,t,n){const s=this.requireDoc("setBlockType"),i=this.requireBlock(s,e),r={type:"setBlockType",blockId:e,nodeType:t,...n?{attrs:n}:{},previousNodeType:i.type,...i.attrs?{previousAttrs:i.attrs}:{}};return this.steps.push(r),this.advanceDoc(r),this}insertNode(e,t,n){const s={type:"insertNode",parentPath:e,index:t,node:n};return this.steps.push(s),this.advanceDoc(s),this}removeNode(e,t){const n=function(e,t,n){if(0===t.length){const t=e.children[n];return t&&w(t)?t:void 0}const s=ie(e,t);if(!s)return;const i=s.children[n];return i&&w(i)?i:void 0}(this.requireDoc("removeNode"),e,t);if(!n)throw new Error(`Node at index ${t} not found under parent path [${e.join(", ")}].`);const s={type:"removeNode",parentPath:e,index:t,removedNode:n};return this.steps.push(s),this.advanceDoc(s),this}setNodeAttr(e,t){const n=ie(this.requireDoc("setNodeAttr"),e);if(!n)throw new Error(`Node not found at path [${e.join(", ")}].`);const s={type:"setNodeAttr",path:e,attrs:t,...n.attrs?{previousAttrs:n.attrs}:{}};return this.steps.push(s),this.advanceDoc(s),this}insertInlineNode(e,t,n){const s={type:"insertInlineNode",blockId:e,offset:t,node:n};return this.steps.push(s),this.advanceDoc(s),this}removeInlineNode(e,t){const n=this.requireDoc("removeInlineNode"),s=c(this.requireBlock(n,e),t);if(!s||"inline"!==s.kind)throw new Error(`No InlineNode at offset ${t} in block "${e}".`);const i={type:"removeInlineNode",blockId:e,offset:t,removedNode:s.node};return this.steps.push(i),this.advanceDoc(i),this}setInlineNodeAttr(e,t,n){const s=this.requireDoc("setInlineNodeAttr"),r=l(this.requireBlock(s,e));let o=0;for(const a of r){if(i(a)&&o===t){const s={type:"setInlineNodeAttr",blockId:e,offset:t,attrs:n,previousAttrs:a.attrs};return this.steps.push(s),this.advanceDoc(s),this}o+=i(a)?1:a.text.length}throw new Error(`No InlineNode at offset ${t} in block "${e}".`)}readonlyAllowed(){return this._readonlyAllowed=!0,this}setSelection(e){return this.selection=e,this}setNodeSelection(e,t){return this.selection=P(e,t),this}setStoredMarks(e,t){return this.steps.push({type:"setStoredMarks",marks:e,previousMarks:t}),this.storedMarks=e,this}build(){return{steps:[...this.steps],selectionBefore:this.selectionBefore,selectionAfter:this.selection,storedMarksAfter:this.storedMarks,metadata:{origin:this.origin,timestamp:Date.now(),...this._readonlyAllowed?{readonlyAllowed:!0}:{}}}}requireDoc(e){if(!this.workingDoc)throw new Error(`${e} requires a document. Use state.transaction() or provide doc to constructor.`);return this.workingDoc}requireBlock(e,t){const n=oe(e,t);if(!n)throw new Error(`Block "${t}" not found in working document.`);return n}advanceDoc(e){this.workingDoc&&(this.workingDoc=xt(this.workingDoc,e))}},Bt=class e{doc;selection;storedMarks;schema;_blockMap=null;_blockOrder=null;constructor(e,t,n,s){this.doc=e,this.selection=t,this.storedMarks=n,this.schema=s}static create(t){const n=t?.schema??G(),s=t?.doc??h(),i=Ht(s.children);return new e(s,t?.selection??E(i?i.id:Y(""),0),null,n)}transaction(e="api"){return new Nt(this.selection,this.storedMarks,e,this.doc)}apply(t){let n=this.doc;for(const e of t.steps)n=xt(n,e);const s=Dt(n,t.selectionAfter);return new e(n,s,t.storedMarksAfter,this.schema)}getBlock(e){return this._blockMap??=function(e){const t=/* @__PURE__ */new Map;return function e(n){for(const s of n)w(s)&&(t.set(s.id,s),e(s.children))}(e.children),t}(this.doc),this._blockMap.get(e)}getBlockOrder(){return this._blockOrder??=function(e){const t=[];return function e(n){for(const s of n)w(s)&&(S(s)?t.push(s.id):e(s.children))}(e.children),t}(this.doc),this._blockOrder}getNodePath(e){return re(this.doc,e)}getParent(e){const t=re(this.doc,e);if(!t||t.length<=1)return;const n=t[t.length-2];return n?oe(this.doc,n):void 0}withSelection(t){const n=Dt(this.doc,t);return new e(this.doc,n,this.storedMarks,this.schema)}toJSON(){return{doc:this.doc,selection:this.selection}}static fromJSON(t,n){return new e(t.doc,t.selection,null,n??G())}};function Ot(e,t){const n=oe(e,t.blockId);if(n){const e=o(n);return t.offset>e?I(t.blockId,e,t.path):t}const s=e.children[0];return s?I(s.id,0):t}function Dt(e,t){if(x(t))return oe(e,t.nodeId)?t:Lt(e,t);if(b(t))return oe(e,t.blockId)?t:Lt(e,t);const n=Ot(e,t.anchor),s=Ot(e,t.head);return n===t.anchor&&s===t.head?t:v(n,s)}function Lt(e,t){const n=Ht(e.children);return n?E(n.id,0):t}function Ht(e){for(const t of e){if(!w(t))continue;if(S(t))return t;const e=Ht(t.children);if(e)return e}return null}function zt(e){for(const t of e.steps)if("setStoredMarks"!==t.type)return!1;return!0}function _t(e){return!!e.metadata.readonlyAllowed||zt(e)}var Ft=class{undoStack=[];redoStack=[];groupTimeoutMs;maxDepth;lastOrigin=null;constructor(e){this.groupTimeoutMs=e?.groupTimeoutMs??500,this.maxDepth=e?.maxDepth??100}push(e){if("history"===e.metadata.origin)return;if(!e.steps.some(e=>"setStoredMarks"!==e.type))return void(this.lastOrigin=null);const t=e.metadata.timestamp,n=this.undoStack[this.undoStack.length-1];for(n&&"input"===e.metadata.origin&&"input"===this.lastOrigin&&t-n.timestamp<this.groupTimeoutMs&&this.isSameInputType(n.transactions,e)&&n?this.undoStack[this.undoStack.length-1]={transactions:[...n.transactions,e],timestamp:t}:this.undoStack.push({transactions:[e],timestamp:t}),this.lastOrigin=e.metadata.origin,this.redoStack=[];this.undoStack.length>this.maxDepth;)this.undoStack.shift()}undo(e){const t=this.undoStack.pop();if(!t)return null;let n=e;const s=[];for(let i=t.transactions.length-1;i>=0;i--){const e=t.transactions[i];if(!e)continue;const r=At(e);n=n.apply(r),s.push(...r.steps)}return this.redoStack.push({transactions:t.transactions,timestamp:Date.now()}),this.lastOrigin=null,{state:n,transaction:{steps:s,selectionBefore:e.selection,selectionAfter:n.selection,storedMarksAfter:n.storedMarks,metadata:{origin:"history",timestamp:Date.now(),historyDirection:"undo"}}}}redo(e){const t=this.redoStack.pop();if(!t)return null;let n=e;const s=[];for(const i of t.transactions)n=n.apply(i),s.push(...i.steps);return this.undoStack.push({transactions:t.transactions,timestamp:Date.now()}),this.lastOrigin=null,{state:n,transaction:{steps:s,selectionBefore:e.selection,selectionAfter:n.selection,storedMarksAfter:n.storedMarks,metadata:{origin:"history",timestamp:Date.now(),historyDirection:"redo"}}}}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}clear(){this.undoStack=[],this.redoStack=[],this.lastOrigin=null}isSameInputType(e,t){const n=e[e.length-1];return!!n&&n.steps[0]?.type===t.steps[0]?.type}},Kt=class{getState;dispatch;undo;redo;keymapRegistry;isReadOnly;compositionTracker;getTextDirectionFn;navigateFromGapCursorFn;handleKeydown;constructor(e,t){this.element=e,this.getState=t.getState,this.dispatch=t.dispatch,this.undo=t.undo,this.redo=t.redo,this.keymapRegistry=t.keymapRegistry,this.isReadOnly=t.isReadOnly??(()=>!1),this.compositionTracker=t.compositionTracker,this.getTextDirectionFn=t.getTextDirection??(()=>"ltr"),this.navigateFromGapCursorFn=t.navigateFromGapCursor,this.handleKeydown=this.onKeydown.bind(this),e.addEventListener("keydown",this.handleKeydown)}onKeydown(e){if(this.compositionTracker?.isComposing)return;if(this.handleNodeSelectionKeys(e))return;if(this.handleGapCursorKeys(e))return;if(this.isReadOnly()){if(this.keymapRegistry){const t=$t(e),n=this.keymapRegistry.getKeymapsByPriority().navigation;for(let s=n.length-1;s>=0;s--){const i=n[s]?.[t];if(i?.())return void e.preventDefault()}}return void this.handleEscape(e)}if(this.keymapRegistry){const t=$t(e),n=this.keymapRegistry.getKeymapsByPriority();for(const s of[n.context,n.navigation,n.default])for(let n=s.length-1;n>=0;n--){const i=s[n]?.[t];if(i?.())return void e.preventDefault()}}if(this.handleGapCursorArrowFallback(e))return;if(this.handleTab(e))return;if(this.handleEscape(e))return;if(!e.metaKey&&!e.ctrlKey)return;const t=e.key.toLowerCase(),n=this.getState();let s=null;return"z"!==t||e.shiftKey?"z"===t&&e.shiftKey||"y"===t&&!e.shiftKey?(e.preventDefault(),void this.redo()):("a"!==t||e.shiftKey||(e.preventDefault(),s=K(n)),void(s&&this.dispatch(s))):(e.preventDefault(),void this.undo())}handleNodeSelectionKeys(e){const t=this.getState(),n=t.selection;if(!x(n))return!1;const s=e.key;if(!("ArrowLeft"!==s&&"ArrowUp"!==s&&"ArrowRight"!==s&&"ArrowDown"!==s||e.shiftKey||e.metaKey||e.ctrlKey||e.altKey)){const i=Ie(t,"ArrowLeft"===s?"left":"ArrowRight"===s?"right":"ArrowUp"===s?"up":"down",this.isSelectedBlockRtl(n.nodeId));return!!i&&(e.preventDefault(),this.dispatch(i),!0)}if("Backspace"===s||"Delete"===s){if(this.isReadOnly())return e.preventDefault(),!0;e.preventDefault();const s=xe(t,n);return s&&this.dispatch(s),!0}if("Enter"===s){if(this.isReadOnly())return e.preventDefault(),!0;e.preventDefault();const n=j(t);return n&&this.dispatch(n),!0}if("Escape"===s){e.preventDefault();const n=Ie(t,"right");return n&&this.dispatch(n),!0}return!1}handleGapCursorKeys(e){const t=this.getState(),n=t.selection;if(!b(n))return!1;const s=e.key;if("ArrowLeft"===s||"ArrowRight"===s||"ArrowUp"===s||"ArrowDown"===s)return!1;if("Escape"===s||"Tab"===s)return!1;if(e.ctrlKey||e.metaKey||e.altKey)return!1;if("Enter"===s){if(this.isReadOnly())return e.preventDefault(),!0;e.preventDefault();const n=j(t);return n&&this.dispatch(n),!0}if("Backspace"===s){if(this.isReadOnly())return e.preventDefault(),!0;e.preventDefault();const s=Q(t,n);return s&&this.dispatch(s),!0}if("Delete"===s){if(this.isReadOnly())return e.preventDefault(),!0;e.preventDefault();const s=B(t,n);return s&&this.dispatch(s),!0}if(1===s.length){if(this.isReadOnly())return e.preventDefault(),!0;e.preventDefault();const n=H(t,s);return this.dispatch(n),!0}return!1}handleGapCursorArrowFallback(e){const t=this.getState(),n=t.selection;if(!b(n))return!1;const s=e.key;if("ArrowLeft"!==s&&"ArrowRight"!==s&&"ArrowUp"!==s&&"ArrowDown"!==s)return!1;const i="ArrowLeft"===s?"left":"ArrowRight"===s?"right":"ArrowUp"===s?"up":"down";if(!this.navigateFromGapCursorFn)return!1;const r=this.navigateFromGapCursorFn(t,i,this.element);return!(!r||C(r.selectionAfter,n)||(e.preventDefault(),this.dispatch(r),0))}handleTab(e){if("Tab"!==e.key)return!1;if(e.metaKey||e.ctrlKey||e.altKey)return!1;if(e.preventDefault(),e.shiftKey)return!0;const t=H(this.getState(),"\t");return this.dispatch(t),!0}handleEscape(e){return"Escape"===e.key&&(this.element.blur(),!0)}isSelectedBlockRtl(e){const t=this.element.querySelector(`[data-block-id="${e}"]`);return t instanceof HTMLElement&&"rtl"===this.getTextDirectionFn(t)}destroy(){this.element.removeEventListener("keydown",this.handleKeydown)}};function $t(e){const t=[];(e.metaKey||e.ctrlKey)&&t.push("Mod"),e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt");let n=e.key;return" "===n?n="Space":1===n.length&&(n=n.toUpperCase()),t.push(n),t.join("-")}function Vt(e,t){if(S(e))return t.selectedLeafIds.has(e.id)?function(e,t){const n=o(e),s=e.id===t.firstBlockId?t.firstOffset:0,i=e.id===t.lastBlockId?t.lastOffset:n;if(0===s&&i===n)return e;const r=k(y(e,s,i).map(e=>"inline"===e.kind?e.node:m(e.text,e.marks)));return{...e,children:r}}(e,t):null;const n=d(e),s=[];let i=n.length!==e.children.length;for(const r of n){const e=Vt(r,t);e?(s.push(e),e!==r&&(i=!0)):i=!0}return 0===s.length?null:i?{...e,children:s}:e}var jt=class{getState;dispatch;schemaRegistry;syncSelection;isReadOnly;handleCopy;handleCut;constructor(e,t){this.element=e,this.getState=t.getState,this.dispatch=t.dispatch,this.schemaRegistry=t.schemaRegistry,this.syncSelection=t.syncSelection,this.isReadOnly=t.isReadOnly??(()=>!1),this.handleCopy=this.onCopy.bind(this),this.handleCut=this.onCut.bind(this),e.addEventListener("copy",this.handleCopy),e.addEventListener("cut",this.handleCut)}onCopy(e){this.syncSelection?.();const t=this.getState(),n=t.selection;if(b(n))return;if(M(n)&&T(n))return;e.preventDefault();const s=e.clipboardData;s&&(x(n)?this.writeNodeSelectionToClipboard(s,t):this.writeTextSelectionToClipboard(s,t))}onCut(e){if(this.isReadOnly())return;this.syncSelection?.();const t=this.getState(),n=t.selection;if(b(n))return;if(M(n)&&T(n))return;e.preventDefault();const s=e.clipboardData;if(s)if(x(n)){this.writeNodeSelectionToClipboard(s,t);const e=xe(t,n);e&&this.dispatch(e)}else{this.writeTextSelectionToClipboard(s,t);const e=F(t);e&&this.dispatch(e)}}writeNodeSelectionToClipboard(e,t){const n=t.selection;if(!x(n))return;const s=t.getBlock(n.nodeId);if(!s)return;const i={type:s.type,...s.attrs?{attrs:{...s.attrs}}:{}};e.setData("application/x-notectl-block",JSON.stringify(i));const r=this.schemaRegistry?.getNodeSpec(s.type);r?.toHTML&&e.setData("text/html",r.toHTML(s,""));const o=s.attrs,a="string"==typeof o?.alt?o.alt:"";e.setData("text/plain",a)}writeTextSelectionToClipboard(e,t){const n=t.selection;if(x(n))return;if(b(n))return;if(T(n))return;if(this.selectionRequiresDocumentSerializer(t))return void this.writeCompositeSelectionToClipboard(e,t);const s=t.getBlockOrder(),i=R(n,s),r=s.indexOf(i.from.blockId),a=s.indexOf(i.to.blockId),l=[],c=[],h=[];for(let p=r;p<=a;p++){const e=s[p];if(!e)continue;const n=t.getBlock(e);if(!n)continue;const d=o(n),u=p===r?i.from.offset:0,g=p===a?i.to.offset:d,m=this.extractSegmentsForRange(n,u,g),f=this.plainTextFromSegments(m);l.push(f),h.push({block:n,start:u,end:g}),c.push({type:n.type,text:f,...n.attrs?{attrs:{...n.attrs}}:{},...m.length>0?{segments:m}:{}})}const d=l.join("\n");if(e.setData("text/plain",d),this.schemaRegistry){const n=Me(this.schemaRegistry),o=r!==a,l=c.some(e=>void 0!==e.type&&"paragraph"!==e.type);if(o||this.containsInlineSegments(c)||l){const t=this.serializeBlocksToClipboardHTML(h,n,c);e.setData("text/html",t)}else{const o=s[r],a=o?t.getBlock(o):void 0;if(a){const t=this.serializeBlockRangeToHTML(a,i.from.offset,i.to.offset,n);e.setData("text/html",t)}}}}selectionRequiresDocumentSerializer(e){const t=this.getTextSelection(e);if(!t||T(t))return!1;const n=R(t,e.getBlockOrder()),s=re(e.doc,n.from.blockId),i=re(e.doc,n.to.blockId);if(!s||!i)return!1;if(s[0]===i[0]){const t=e.doc.children.find(e=>e.id===s[0]);return!(!t||S(t))}const r=e.doc.children.findIndex(e=>e.id===s[0]),o=e.doc.children.findIndex(e=>e.id===i[0]);for(let a=r;a<=o;a++){const t=e.doc.children[a];if(t){if(!S(t))return!0;if((this.schemaRegistry?.getNodeSpec(t.type))?.isVoid)return!0}}return!1}getTextSelection(e){const t=e.selection;if(M(t))return t}extractPlainTextForRange(e,t,n){return this.plainTextFromSegments(this.extractSegmentsForRange(e,t,n))}plainTextFromSegments(e){return e.map(e=>"inline"===e.kind?"":e.text).join("")}writeCompositeSelectionToClipboard(e,t){const n=this.getTextSelection(t);if(!n)return;const s=t.getBlockOrder(),i=R(n,s),r=s.indexOf(i.from.blockId),a=s.indexOf(i.to.blockId),l=[];for(let c=r;c<=a;c++){const e=s[c];if(!e)continue;const n=t.getBlock(e);if(!n)continue;const h=c===r?i.from.offset:0,d=c===a?i.to.offset:o(n);l.push(this.extractPlainTextForRange(n,h,d))}if(e.setData("text/plain",l.join("\n")),this.schemaRegistry){const s=function(e,t){const n=e.getBlockOrder(),s=R(t,n),i=n.indexOf(s.from.blockId),r=n.indexOf(s.to.blockId);if(-1===i||-1===r||i>r)return{children:[]};const o=e.getNodePath(s.from.blockId),a=e.getNodePath(s.to.blockId),l=o?.[0],c=a?.[0];if(!l||!c)return{children:[]};const h=e.doc.children.findIndex(e=>e.id===l),d=e.doc.children.findIndex(e=>e.id===c);if(-1===h||-1===d||h>d)return{children:[]};const p={firstBlockId:s.from.blockId,firstOffset:s.from.offset,lastBlockId:s.to.blockId,lastOffset:s.to.offset,selectedLeafIds:new Set(n.slice(i,r+1))},u=[];for(let g=h;g<=d;g++){const t=e.doc.children[g];if(!t)continue;const n=Vt(t,p);n&&u.push(n)}return{children:u}}(t,n);if(s.children.length>0){const t=Pe(s,this.schemaRegistry);e.setData("text/html",t)}}}serializeBlockRangeToHTML(e,n,s,r){const o=l(e),a=[];let c=0;for(const l of o){const e=c+(i(l)?1:l.text.length);if(e<=n||c>=s)c=e;else{if(t(l)){const e=Math.max(0,n-c),t=Math.min(l.text.length,s-c),i=l.text.slice(e,t);i.length>0&&this.schemaRegistry&&a.push(Ae(i,l.marks,this.schemaRegistry,r))}else if(i(l)){const e=this.schemaRegistry?.getInlineNodeSpec(l.inlineType);e?.toHTMLString&&a.push(e.toHTMLString(l))}c=e}}return a.join("")}extractSegmentsForRange(e,n,s){const r=l(e),o=[];let a=0;for(const l of r){const e=a+(i(l)?1:l.text.length);if(e<=n||a>=s)a=e;else{if(t(l)){const e=Math.max(0,n-a),t=Math.min(l.text.length,s-a),i=l.text.slice(e,t);if(i.length>0){const e=l.marks.map(e=>({type:e.type,...e.attrs?{attrs:{...e.attrs}}:{}}));o.push({text:i,marks:e})}}else i(l)&&o.push({kind:"inline",inlineType:l.inlineType,...Object.keys(l.attrs).length>0?{attrs:{...l.attrs}}:{}});a=e}}return o}containsInlineSegments(e){return e.some(e=>e.segments?.some(e=>"inline"===e.kind))}serializeBlocksToClipboardHTML(e,t,n){const s=[];let i,r=[];const o=()=>{r.length>0&&i&&(s.push(`<${i}>${r.join("")}</${i}>`),r=[],i=void 0)};for(const l of e){const{block:e,start:n,end:a}=l,c=this.serializeBlockRangeToHTML(e,n,a,t),h=this.schemaRegistry?.getNodeSpec(e.type);if(h?.wrapper){const t=h.wrapper(e).tag;i!==t&&(o(),i=t),h.toHTML?r.push(h.toHTML(e,c)):r.push(`<li>${c}</li>`)}else o(),h?.toHTML?s.push(h.toHTML(e,c)):s.push(`<p>${c}</p>`)}o();const a=JSON.stringify(n).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#39;").replace(/"/g,"&quot;");return s.push(`<span data-notectl-rich="${a}" hidden></span>`),s.join("")}destroy(){this.element.removeEventListener("copy",this.handleCopy),this.element.removeEventListener("cut",this.handleCut)}},Ut=class{_composing=!1;_activeBlockId=null;get isComposing(){return this._composing}get activeBlockId(){return this._activeBlockId}start(e){this._composing=!0,this._activeBlockId=e}end(){this._composing=!1,this._activeBlockId=null}},qt=class{getState;dispatch;syncSelection;inputRuleRegistry;isReadOnly;compositionTracker;compositionCommitHandled=!1;handleBeforeInput;handleCompositionStart;handleCompositionEnd;constructor(e,t){this.element=e,this.getState=t.getState,this.dispatch=t.dispatch,this.syncSelection=t.syncSelection,this.inputRuleRegistry=t.inputRuleRegistry,this.isReadOnly=t.isReadOnly??(()=>!1),this.compositionTracker=t.compositionTracker??new Ut,this.handleBeforeInput=this.onBeforeInput.bind(this),this.handleCompositionStart=this.onCompositionStart.bind(this),this.handleCompositionEnd=this.onCompositionEnd.bind(this),e.addEventListener("beforeinput",this.handleBeforeInput),e.addEventListener("compositionstart",this.handleCompositionStart),e.addEventListener("compositionend",this.handleCompositionEnd)}onBeforeInput(e){if(this.isReadOnly())return;if(this.compositionTracker.isComposing&&"insertCompositionText"===e.inputType)return;if(!function(e){switch(e){case"insertText":case"insertReplacementText":case"insertFromComposition":case"insertParagraph":case"insertLineBreak":case"deleteContentBackward":case"deleteContentForward":case"deleteWordBackward":case"deleteWordForward":case"deleteSoftLineBackward":case"deleteSoftLineForward":case"deleteByCut":case"insertFromPaste":case"insertFromDrop":case"formatBold":case"formatItalic":case"formatUnderline":case"historyUndo":case"historyRedo":return!0;default:return!1}}(e.inputType))return;"insertText"!==e.inputType&&"insertCompositionText"!==e.inputType&&"insertFromComposition"!==e.inputType&&this.syncSelection(),e.preventDefault();const t=this.getState();let n=null;switch(e.inputType){case"insertText":case"insertReplacementText":e.data&&(n=H(t,e.data,"input"));break;case"insertFromComposition":e.data&&(this.compositionCommitHandled=!0,n=H(t,e.data,"input"));break;case"insertParagraph":n=j(t);break;case"insertLineBreak":n=V(t);break;case"deleteContentBackward":n=O(t);break;case"deleteContentForward":n=z(t);break;case"deleteWordBackward":n=L(t);break;case"deleteWordForward":n=$(t);break;case"deleteSoftLineBackward":n=q(t);break;case"deleteSoftLineForward":n=D(t)}n&&(this.dispatch(n),"insertText"!==e.inputType&&"insertReplacementText"!==e.inputType||this.checkInputRules())}onCompositionStart(e){const t=this.getState();M(t.selection)&&(this.compositionCommitHandled=!1,this.compositionTracker.start(t.selection.anchor.blockId))}onCompositionEnd(e){if(this.compositionTracker.end(),this.isReadOnly())return;if(this.compositionCommitHandled)return void(this.compositionCommitHandled=!1);const t=e.data;if(!t)return;const n=H(this.getState(),t,"input");this.dispatch(n)}checkInputRules(){if(!this.inputRuleRegistry)return;const e=this.inputRuleRegistry.getInputRules();if(0===e.length)return;const t=this.getState();if(!M(t.selection))return;const{anchor:n}=t.selection,s=t.getBlock(n.blockId);if(!s)return;const i=p(s).slice(0,n.offset);for(const r of e){const e=r.pattern.exec(i);if(e){const n=e.index,s=n+e[0].length,i=r.handler(t,e,n,s);if(i)return void this.dispatch(i)}}}destroy(){this.element.removeEventListener("beforeinput",this.handleBeforeInput),this.element.removeEventListener("compositionstart",this.handleCompositionStart),this.element.removeEventListener("compositionend",this.handleCompositionEnd)}};function Wt(e){return e.reduce((e,t)=>e+t.text,"")}function Gt(e){return e.reduce((e,t)=>e+t.text.length,0)}function Qt(e,t){if(0===t.blocks.length)return e.transaction("paste").setSelection(e.selection).build();const n=t.blocks[0];return n?1===t.blocks.length&&n.type===J("paragraph")?function(e,t){const n=e.selection;if(x(n))return e.transaction("paste").setSelection(n).build();if(b(n))return function(e,t,n){const s=Jt(e,t);if(!s)return e.transaction("paste").setSelection(t).build();const i=r(),o=Wt(n),a=Gt(n),l=e.transaction("paste");return l.insertNode(s.parentPath,s.insertIndex,g(J("paragraph"),[m("")],i)),o.length>0&&l.insertText(i,0,o,[],n),l.setSelection(E(i,a)),l.build()}(e,n,t);const s=e.transaction("paste");let i;T(n)||(i=U(e,s));const o=ve(n,e.getBlockOrder()),a=i??o.blockId,l=i?0:o.offset,c=Gt(t),h=Wt(t);return s.insertText(a,l,h,[],t),s.setSelection(E(a,l+c)),s.build()}(e,n.segments):1===t.blocks.length?function(e,t){const n=e.selection;if(x(n))return e.transaction("paste").setSelection(n).build();if(b(n))return Xt(e,n,[t]);const s=e.transaction("paste");let i;T(n)||(i=U(e,s));const r=ve(n,e.getBlockOrder()),o=i??r.blockId,a=i?0:r.offset,l=Gt(t.segments),c=Wt(t.segments);return s.setBlockType(o,t.type,t.attrs),s.insertText(o,a,c,[],t.segments),s.setSelection(E(o,a+l)),s.build()}(e,n):function(e,t){const n=e.selection;if(x(n))return e.transaction("paste").setSelection(n).build();if(b(n))return Xt(e,n,t.blocks);const s=e.transaction("paste");let i;T(n)||(i=U(e,s));const o=e.getBlockOrder(),a=ve(n,o),l=i??a.blockId,c=i?0:a.offset;let h;if(i){const t=re(e.doc,a.blockId)?.[0];h=t?e.doc.children.findIndex(e=>e.id===t):0}else h=o.indexOf(l);const d=t.blocks[0],p=t.blocks[t.blocks.length-1];if(!d||!p)return s.build();const u=t.blocks.slice(1,-1),f=Gt(d.segments);d.segments.length>0&&f>0&&s.insertText(l,c,Wt(d.segments),[],d.segments),d.type!==J("paragraph")&&s.setBlockType(l,d.type,d.attrs);const y=c+f,k=r();s.splitBlock(l,y,k);let S=h+1;for(const v of u){const e=v.segments.map(e=>m(e.text,[...e.marks])),t=g(v.type,e.length>0?e:void 0,r(),v.attrs);s.insertNode([],S,t),S++}const w=Gt(p.segments);return p.segments.length>0&&w>0&&s.insertText(k,0,Wt(p.segments),[],p.segments),p.type!==J("paragraph")&&s.setBlockType(k,p.type,p.attrs),s.setSelection(E(k,w)),s.build()}(e,t):e.transaction("paste").setSelection(e.selection).build()}function Jt(e,t){const n=re(e.doc,t.blockId);if(!n)return null;const s=Re(n),i=be(Ce(e,s),t.blockId);return i<0?null:{parentPath:s,insertIndex:"before"===t.side?i:i+1}}function Xt(e,t,n){const s=Jt(e,t);if(!s)return e.transaction("paste").setSelection(t).build();const i=e.transaction("paste");let o,a=s.insertIndex,l=0;for(const c of n){const e=r(),t=Wt(c.segments),n=c.segments.map(e=>m(e.text,[...e.marks])),h=g(c.type,n.length>0?n:[m("")],e,c.attrs);i.insertNode(s.parentPath,a,h),a++,o=e,l=t.length}return o&&i.setSelection(E(o,l)),i.build()}var Yt=new Set(["P","DIV","H1","H2","H3","H4","H5","H6","BLOCKQUOTE","UL","OL","LI","HR","PRE","TABLE","THEAD","TBODY","TR"]),Zt=new Set(["STRONG","B","EM","I","U","S","STRIKE","DEL","A","SPAN","BR","SUB","SUP","CODE"]),en=/^H([1-6])$/;function tn(e){const t=e.style.fontWeight,n=Number.parseInt(t,10);return!("normal"===t||!Number.isNaN(n)&&n<700)&&{}}var nn=new Map([["STRONG",{markName:"bold",getAttrs:tn}],["B",{markName:"bold",getAttrs:tn}],["EM",{markName:"italic"}],["I",{markName:"italic"}],["U",{markName:"underline"}],["S",{markName:"strikethrough"}],["STRIKE",{markName:"strikethrough"}],["DEL",{markName:"strikethrough"}],["A",{markName:"link",getAttrs:function(e){return{href:te(e.getAttribute("href")??"")}}}]]),sn=class{schema;blockParseRules;markParseRules;blockTagHandlers;constructor(e){this.schema=e.schema,this.blockParseRules=e.schemaRegistry?.getBlockParseRules()??[],this.markParseRules=e.schemaRegistry?.getMarkParseRules()??[],this.blockTagHandlers=this.buildBlockTagHandlers()}parse(e){const t=this.parseContainer(e);return 0===t.length?{blocks:[{type:this.resolveBlockType(J("paragraph")),segments:[{text:"",marks:[]}]}]}:{blocks:t}}buildBlockTagHandlers(){const e=e=>this.parseBlockWithLineBreaks(e,this.resolveBlockType(J("paragraph"))),t=e=>this.parseTableAsParagraphs(e);return new Map([["P",e],["DIV",e],["BLOCKQUOTE",e=>this.parseBlockquote(e)],["UL",e=>this.parseList(e,"bullet",0)],["OL",e=>this.parseList(e,"ordered",0)],["LI",e=>this.parseListItem(e,"bullet",0)],["HR",()=>[{type:this.resolveBlockType(J("horizontal_rule")),segments:[]}]],["PRE",e=>[{type:this.resolveBlockType(J("paragraph")),segments:this.ensureSegments(this.parsePreContent(e))}]],["TABLE",t],["THEAD",t],["TBODY",t],["TR",t]])}parseContainer(e){const t=[];let n=[];for(const s of Array.from(e.childNodes))if(s.nodeType===Node.ELEMENT_NODE){const e=s;this.isBlockElement(e)?(this.flushPendingSegments(t,n),n=[],t.push(...this.parseBlockElement(e))):e.children.length>0&&this.containsBlockDescendants(e)?(this.flushPendingSegments(t,n),n=[],t.push(...this.parseContainerWithMarks(e,this.marksFromElement(e)))):n.push(...this.parseInlineNode(s,[]))}else if(s.nodeType===Node.TEXT_NODE){const e=s.textContent??"";e&&n.push({text:e,marks:[]})}return this.flushPendingSegments(t,n),t}parseBlockElement(e){const t=en.exec(e.tagName);if(t)return this.parseHeading(e,Number(t[1]));const n=this.blockTagHandlers.get(e.tagName);return n?n(e):this.parseUnknownBlock(e)}parseHeading(e,t){const n=this.resolveBlockType(J("heading"));return[{type:n,...n===J("heading")?{attrs:{level:t}}:{},segments:this.ensureSegments(this.parseInlineChildren(e,[]))}]}parseUnknownBlock(e){const t=this.matchBlockRule(e);return t?[{type:t.type,...t.attrs?{attrs:t.attrs}:{},segments:this.ensureSegments(this.parseInlineChildren(e,[]))}]:[{type:this.resolveBlockType(J("paragraph")),segments:this.ensureSegments(this.parseInlineChildren(e,[]))}]}parseBlockquote(e){const t=this.resolveBlockType(J("blockquote"));return Array.from(e.childNodes).some(e=>e.nodeType===Node.ELEMENT_NODE&&this.isBlockElement(e))?this.parseContainer(e).map(e=>({type:t,segments:e.segments})):[{type:t,segments:this.ensureSegments(this.parseInlineChildren(e,[]))}]}parseList(e,t,n){const s=[];for(const i of Array.from(e.children)){const e=i;"LI"===e.tagName?s.push(...this.parseListItem(e,t,n)):"UL"===e.tagName?s.push(...this.parseList(e,"bullet",n+1)):"OL"===e.tagName&&s.push(...this.parseList(e,"ordered",n+1))}return s}parseListItem(e,t,n){const s=[],i=this.resolveBlockType(J("list_item")),r=this.hasCheckbox(e),o=r?"checklist":t,a=!!r&&this.isCheckboxChecked(e),l=[],c=[];for(const h of Array.from(e.childNodes))if(h.nodeType===Node.ELEMENT_NODE){const e=h;"UL"===e.tagName||"OL"===e.tagName?c.push(e):"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")||(this.isBlockElement(e)?l.push(...this.parseInlineChildren(e,[])):l.push(...this.parseInlineNode(h,[])))}else if(h.nodeType===Node.TEXT_NODE){const e=h.textContent??"";e&&l.push({text:e,marks:[]})}s.push({type:i,attrs:{listType:o,indent:n,..."checklist"===o?{checked:a}:{}},segments:this.ensureSegments(this.normalizeSegments(l))});for(const h of c){const e="OL"===h.tagName?"ordered":"bullet";s.push(...this.parseList(h,e,n+1))}return s}parseInlineChildren(e,t){const n=[];for(const s of Array.from(e.childNodes))n.push(...this.parseInlineNode(s,t));return this.normalizeSegments(n)}parseInlineNode(e,t){if(e.nodeType===Node.TEXT_NODE){const n=e.textContent??"";return n?[{text:n,marks:this.resolveMarks(t)}]:[]}if(e.nodeType!==Node.ELEMENT_NODE)return[];const n=e,s=n.tagName;if("BR"===s)return[{text:"\n",marks:this.resolveMarks(t)}];if(this.isBlockElement(n)&&!Zt.has(s))return this.parseInlineChildren(n,t);const i=this.mergeMarks(t,this.marksFromElement(n));return this.parseInlineChildren(n,i)}parsePreContent(e){const t=e.textContent??"";return t?[{text:t,marks:[]}]:[]}parseTableAsParagraphs(e){const t=[],n=e.querySelectorAll("td, th");for(const s of Array.from(n)){const e=this.parseInlineChildren(s,[]);e.length>0&&e.some(e=>e.text.length>0)&&t.push({type:this.resolveBlockType(J("paragraph")),segments:this.ensureSegments(e)})}return t}marksFromElement(e){return this.matchMarkRules(e)||this.fallbackMarksFromElement(e)}matchMarkRules(e){if(0===this.markParseRules.length)return null;const t=e.tagName.toLowerCase(),n=[],s=/* @__PURE__ */new Set;for(const i of this.markParseRules)if(i.rule.tag===t&&!s.has(i.type)){if(i.rule.getAttrs){const t=i.rule.getAttrs(e);if(!1===t)continue;n.push({type:X(i.type),...Object.keys(t).length>0?{attrs:t}:{}})}else n.push({type:X(i.type)});s.add(i.type)}return s.size>0?n:null}fallbackMarksFromElement(e){const t=nn.get(e.tagName);if(!t)return[];if(t.getAttrs){const n=t.getAttrs(e);return!1===n?[]:Object.keys(n).length>0?[{type:X(t.markName),attrs:n}]:[{type:X(t.markName)}]}return[{type:X(t.markName)}]}mergeMarks(e,t){const n=[...e];for(const s of t)n.some(e=>e.type===s.type)||n.push(s);return n}resolveMarks(e){return e.filter(e=>N(this.schema,e.type))}resolveBlockType(e){return A(this.schema,e)?e:J("paragraph")}normalizeSegments(t){if(0===t.length)return[];const n=[];for(const s of t){const t=n[n.length-1];t&&e(t.marks,s.marks)?n[n.length-1]={text:t.text+s.text,marks:t.marks}:s.text.length>0&&n.push(s)}return n}ensureSegments(e){return 0===e.length?[{text:"",marks:[]}]:e}matchBlockRule(e){const t=e.tagName.toLowerCase();for(const n of this.blockParseRules)if(n.rule.tag===t){if(n.rule.getAttrs){const t=n.rule.getAttrs(e);if(!1===t)continue;return{type:J(n.type),attrs:t}}return{type:J(n.type)}}return null}isBlockElement(e){if(Yt.has(e.tagName))return!0;const t=e.tagName.toLowerCase();return this.blockParseRules.some(e=>e.rule.tag===t)}hasCheckbox(e){return null!==e.querySelector('input[type="checkbox"]')}isCheckboxChecked(e){return e.querySelector('input[type="checkbox"]')?.hasAttribute("checked")??!1}containsBlockDescendants(e){for(const t of Array.from(e.children)){if(this.isBlockElement(t))return!0;if(this.containsBlockDescendants(t))return!0}return!1}parseContainerWithMarks(e,t){const n=this.parseContainer(e);return 0===t.length?n:n.map(e=>({...e,segments:this.prependMarks(e.segments,t)}))}prependMarks(e,t){return e.map(e=>({text:e.text,marks:this.mergeMarks(t,e.marks)}))}parseBlockWithLineBreaks(e,t){const n=this.parseInlineChildren(e,[]);if(!n.some(e=>e.text.includes("\n")))return[{type:t,segments:this.ensureSegments(n)}];const s=[];let i=[];for(const r of n){const e=r.text.split("\n");for(let n=0;n<e.length;n++){n>0&&(s.push({type:t,segments:this.ensureSegments(this.normalizeSegments(i))}),i=[]);const o=e[n]??"";o&&i.push({text:o,marks:r.marks})}}return s.push({type:t,segments:this.ensureSegments(this.normalizeSegments(i))}),s}flushPendingSegments(e,t){const n=this.normalizeSegments(t);0!==n.length&&(n.every(e=>""===e.text.trim())||e.push({type:this.resolveBlockType(J("paragraph")),segments:n}))}},rn={1:"x-small",2:"small",3:"medium",4:"large",5:"x-large",6:"xx-large",7:"xxx-large"};function on(e){return e.toLowerCase().includes("font-size")}function an(e,t){for(;e.firstChild;)t.appendChild(e.firstChild)}function ln(e){const t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}}var cn=["script","style","iframe","object","embed","form","noscript"],hn=class{constructor(e,t,n,s){this.getState=e,this.dispatch=t,this.schemaRegistry=n,this.tryRichPasteFromJson=s}handleHTMLOrTextPaste(e,t){const n=this.getState(),s=e.getData("text/html");if(s)this.handleHTML(s,n);else if(t){const e=function(e){const t=e.split(/\r?\n/).map(e=>({type:J("paragraph"),segments:[{text:e,marks:[]}]}));return{blocks:t.length>0?t:[{type:J("paragraph"),segments:[{text:"",marks:[]}]}]}}(t);this.dispatch(Qt(this.getState(),e))}}handleHTML(e,t){const n=pt.sanitize(e,{FORBID_TAGS:cn,ALLOWED_URI_REGEXP:se}),s=this.extractRichData(n);if(s&&this.tryRichPasteFromJson(s))return;const i=document.createElement("template");i.innerHTML=n,function(e){const t=Array.from(e.querySelectorAll("font"));for(const n of t){const e=n.getAttribute("color"),t=n.getAttribute("face"),s=n.getAttribute("size"),i=n.getAttribute("style")??"";if(!(null!==e||null!==t||null!==s||i.length>0)){ln(n);continue}const r=document.createElement("span"),o=[];if(i&&o.push(i.endsWith(";")?i:`${i};`),e&&o.push(`color: ${e};`),t&&o.push(`font-family: ${t};`),s&&!on(i)){const e=rn[s];e&&o.push(`font-size: ${e};`)}Ke(r,o.join(" ")),an(n,r),n.parentNode?.replaceChild(r,n)}}(i.content);const r=i.innerHTML,o=this.schemaRegistry?this.schemaRegistry.getAllowedTags():["strong","em","u","b","i","p","br","div","span"],a=this.schemaRegistry?this.schemaRegistry.getAllowedAttrs():[],l=pt.sanitize(r,{ALLOWED_TAGS:o,ALLOWED_ATTR:a,ALLOWED_URI_REGEXP:se});if(this.schemaRegistry){const e=document.createElement("template");if(e.innerHTML=l,this.requiresDocumentParser(l,e.content))return void this.handleDocumentPaste(l,t);const n=new sn({schema:W(this.schemaRegistry),schemaRegistry:this.schemaRegistry}).parse(e.content);this.dispatch(Qt(t,n))}else{const e=this.extractTextFromHTML(l);e&&this.dispatch(H(t,e,"paste"))}}extractRichData(e){const t=document.createElement("template");t.innerHTML=e;const n=t.content.querySelector("[data-notectl-rich]")?.getAttribute("data-notectl-rich");if(n)return this.decodeHTMLEntities(n)}decodeHTMLEntities(e){return e.replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&")}requiresDocumentParser(e,t){return!!/<table[\s>]/i.test(e)||this.containsVoidBlockElements(t)}containsVoidBlockElements(e){if(!this.schemaRegistry)return!1;const t=this.schemaRegistry.getBlockParseRules();for(const n of t){if(!this.schemaRegistry.getNodeSpec(n.type)?.isVoid)continue;const t=e.querySelectorAll(n.rule.tag);for(const e of Array.from(t)){if(!n.rule.getAttrs)return!0;if(!1!==n.rule.getAttrs(e))return!0}}return!1}handleDocumentPaste(e,t){if(!this.schemaRegistry)return;const n=Ne(e,this.schemaRegistry);if(0===n.children.length)return;const s=t.selection,i=t.transaction("paste");let o;M(s)&&!T(s)&&(o=U(t,i));const a=Be(t,o??(x(s)?s.nodeId:b(s)?s.blockId:s.anchor.blockId),this.schemaRegistry);if(!a)return;const l=b(s)&&"before"===s.side?0:1;let c,h,d=a.anchorIndex+l;for(const p of n.children){const e=_e(p,r());i.insertNode(a.parentPath,d,e),d++,c=we(e),h=e}if(a.isAnchorEmpty&&!b(s)&&i.removeNode(a.parentPath,a.anchorIndex),c&&h){const e=He(h,c),t=e?p(e).length:0;i.setSelection(E(c,t))}this.dispatch(i.build())}extractTextFromHTML(e){const t=document.createElement("template");return t.innerHTML=e,t.content.textContent??""}},dn=class{constructor(e,t,n){this.getState=e,this.dispatch=t,this.schemaRegistry=n}handleBlockPaste(e){let t;try{t=JSON.parse(e)}catch{return}const n=t.type;if(!n)return;const s=this.schemaRegistry?.getNodeSpec(n);if(this.schemaRegistry&&!s)return;const i=this.getState(),o=i.selection,a=x(o)?o.nodeId:b(o)?o.blockId:o.anchor.blockId,l=r(),c=De(t.attrs,s?.attrs),h=g(J(n),void 0,l,c),d=Oe(i,a);if(d){const e=ze(i,a,d,this.schemaRegistry);if(!e)return;const t=i.getBlock(d);if(!t)return;const n=i.transaction("paste");return n.insertNode(e.parentPath,t.children.length,h),n.setSelection(P(l,[...e.parentPath,l])),void this.dispatch(n.build())}const p=Be(i,a,this.schemaRegistry);if(!p)return;const u=b(o)&&"before"===o.side?0:1,m=i.transaction("paste");m.insertNode(p.parentPath,p.anchorIndex+u,h),m.setSelection(P(l,[...p.parentPath,l])),this.dispatch(m.build())}handleRichPasteFromJson(e){let t;try{t=JSON.parse(e)}catch{return!1}return!(!Array.isArray(t)||0===t.length)&&this.handleRichPaste(t)}handleRichPaste(e){if(0===e.length)return!1;if(!e.some(e=>void 0!==e.type&&"paragraph"!==e.type||e.segments?.some(e=>"inline"===e.kind))&&e.length<=1)return!1;let t=this.getState();const n=t.selection;if(M(n)&&!T(n)){const n=t.transaction("paste"),s=U(t,n),i=n.build();if(this.dispatch(i),t=t.apply(i),s)return this.resolveAndInsertRichBlocks(e,t,s)}const s=x(n)?n.nodeId:b(n)?n.blockId:n.anchor.blockId;return this.resolveAndInsertRichBlocks(e,t,s)}resolveAndInsertRichBlocks(e,t,n){const s=t.selection,i=Oe(t,n);if(i){const s=ze(t,n,i,this.schemaRegistry);if(!s)return!1;const r=t.getBlock(i),o=s.anchorIndex>=0?s.anchorIndex+1:r?.children.length??0;return this.insertRichBlocks(e,t,s,o,!0)}const r=Be(t,n,this.schemaRegistry);if(!r)return!1;const o=b(s)&&"before"===s.side?0:1;return this.insertRichBlocks(e,t,r,r.anchorIndex+o,!b(s))}insertRichBlocks(e,t,n,s,i){const r=t.transaction("paste");let o,a=s,l=0;for(const c of e){const e=Fe(c,this.schemaRegistry);if(!e)continue;const t=Le(e);r.insertNode(n.parentPath,a,t),a++,o=t.id,l=(e.text??"").length}return i&&n.isAnchorEmpty&&n.anchorIndex>=0&&r.removeNode(n.parentPath,n.anchorIndex),o&&r.setSelection(E(o,l)),this.dispatch(r.build()),!0}},pn=class{getState;dispatch;fileHandlerRegistry;isReadOnly;getPasteInterceptors;handlePaste;htmlHandler;richBlockHandler;constructor(e,t){this.element=e,this.getState=t.getState,this.dispatch=t.dispatch,this.fileHandlerRegistry=t.fileHandlerRegistry,this.isReadOnly=t.isReadOnly??(()=>!1),this.getPasteInterceptors=t.getPasteInterceptors??(()=>[]),this.richBlockHandler=new dn(t.getState,t.dispatch,t.schemaRegistry),this.htmlHandler=new hn(t.getState,t.dispatch,t.schemaRegistry,e=>this.richBlockHandler.handleRichPasteFromJson(e)),this.handlePaste=this.onPaste.bind(this),e.addEventListener("paste",this.handlePaste)}onPaste(e){if(e.preventDefault(),this.isReadOnly())return;const t=e.clipboardData;if(!t)return;const n=t.getData("application/x-notectl-block");if(n)return void this.richBlockHandler.handleBlockPaste(n);if(this.handleFilePaste(t))return;const s=t.getData("text/plain"),i=t.getData("text/html");s&&this.tryPasteInterceptors(s,i)||this.htmlHandler.handleHTMLOrTextPaste(t,s)}tryPasteInterceptors(e,t){const n=this.getPasteInterceptors(),s=this.getState();for(const i of n){const n=i.interceptor(e,t,s);if(n)return this.dispatch(n),!0}return!1}handleFilePaste(e){if(!this.fileHandlerRegistry)return!1;const t=Array.from(e.files);if(0===t.length)for(let s=0;s<e.items.length;s++){const n=e.items[s];if(n&&"file"===n.kind){const e=n.getAsFile();e&&t.push(e)}}if(0===t.length)return!1;let n=!1;for(const s of t){const e=this.fileHandlerRegistry.matchFileHandlers(s.type);for(const t of e){const e=t(s,null);if(!0===e||e instanceof Promise){n=!0;break}}}return n}destroy(){this.element.removeEventListener("paste",this.handlePaste)}},un=class{compositionTracker;inputHandler;keyboardHandler;pasteHandler;clipboardHandler;constructor(e,t){this.compositionTracker=new Ut,this.inputHandler=new qt(e,{getState:t.getState,dispatch:t.dispatch,syncSelection:t.syncSelection,inputRuleRegistry:t.inputRuleRegistry,isReadOnly:t.isReadOnly,compositionTracker:this.compositionTracker}),this.keyboardHandler=new Kt(e,{getState:t.getState,dispatch:t.dispatch,undo:t.undo,redo:t.redo,keymapRegistry:t.keymapRegistry,isReadOnly:t.isReadOnly,compositionTracker:this.compositionTracker,getTextDirection:t.getTextDirection,navigateFromGapCursor:t.navigateFromGapCursor}),this.pasteHandler=new pn(e,{getState:t.getState,dispatch:t.dispatch,schemaRegistry:t.schemaRegistry,fileHandlerRegistry:t.fileHandlerRegistry,isReadOnly:t.isReadOnly,getPasteInterceptors:t.getPasteInterceptors}),this.clipboardHandler=new jt(e,{getState:t.getState,dispatch:t.dispatch,schemaRegistry:t.schemaRegistry,syncSelection:t.syncSelection,isReadOnly:t.isReadOnly})}destroy(){this.inputHandler.destroy(),this.keyboardHandler.destroy(),this.pasteHandler.destroy(),this.clipboardHandler.destroy()}},gn=class{_contextKeymaps=[];_navigationKeymaps=[];_defaultKeymaps=[];registerKeymap(e,t){const n=t?.priority??"default";this.keymapArrayForPriority(n).push(e)}getKeymaps(){return[...this._contextKeymaps,...this._navigationKeymaps,...this._defaultKeymaps]}getKeymapsByPriority(){return{context:[...this._contextKeymaps],navigation:[...this._navigationKeymaps],default:[...this._defaultKeymaps]}}removeKeymap(e){for(const t of[this._contextKeymaps,this._navigationKeymaps,this._defaultKeymaps]){const n=t.indexOf(e);if(-1!==n)return void t.splice(n,1)}}clear(){this._contextKeymaps.length=0,this._navigationKeymaps.length=0,this._defaultKeymaps.length=0}keymapArrayForPriority(e){switch(e){case"context":return this._contextKeymaps;case"navigation":return this._navigationKeymaps;case"default":return this._defaultKeymaps}}},mn=class{_inputRules=[];registerInputRule(e){this._inputRules.push(e)}getInputRules(){return this._inputRules}removeInputRule(e){const t=this._inputRules.indexOf(e);-1!==t&&this._inputRules.splice(t,1)}clear(){this._inputRules.length=0}},fn=class{_fileHandlers=[];registerFileHandler(e,t){this._fileHandlers.push({pattern:e,handler:t})}getFileHandlers(){return this._fileHandlers}matchFileHandlers(e){const t=[];for(const n of this._fileHandlers)yn(n.pattern,e)&&t.push(n.handler);return t}removeFileHandler(e){const t=this._fileHandlers.findIndex(t=>t.handler===e);-1!==t&&this._fileHandlers.splice(t,1)}clear(){this._fileHandlers.length=0}};function yn(e,t){if("*"===e||"*/*"===e)return!0;if(e===t)return!0;if(e.endsWith("/*")){const n=e.slice(0,-1);return t.startsWith(n)}return!1}var kn=class{_nodeViews=/* @__PURE__ */new Map;registerNodeView(e,t){if(this._nodeViews.has(e))throw new Error(`NodeView for type "${e}" is already registered.`);this._nodeViews.set(e,t)}getNodeViewFactory(e){return this._nodeViews.get(e)}removeNodeView(e){this._nodeViews.delete(e)}clear(){this._nodeViews.clear()}};function Sn(e,t){if(t){const n=t.getMarkSpec(e.type);if(n)return n.rank??100}switch(e.type){case"bold":return 0;case"italic":return 1;case"underline":return 2;default:return 100}}function wn(e,t,n){if(0===t.length)return e;const s=[...t].sort((e,t)=>Sn(e,n)-Sn(t,n));let i=e;for(let r=s.length-1;r>=0;r--){const e=s[r];if(!e)continue;const t=vn(e,n);t.appendChild(i),i=t}return i}function vn(e,t){if(t){const n=t.getMarkSpec(e.type);if(n)return n.toDOM(e)}switch(e.type){case"bold":return document.createElement("strong");case"italic":return document.createElement("em");case"underline":return document.createElement("u");default:return document.createElement("span")}}var bn=class{wrapperElement=null;container;registry;constructor(e,t){this.container=e,this.registry=t}get isActive(){return null!==this.wrapperElement}onCompositionStart(e){this.cleanup();const t=e.storedMarks;if(!t||0===t.length)return;const n=e.selection;if(!M(n))return;if(!T(n))return;const s=document.createElement("span");s.setAttribute("data-cursor-wrapper","");const i=document.createTextNode("​"),r=wn(i,t,this.registry);s.appendChild(r);const o=ye();if(!o||0===o.rangeCount)return;let a;const l=ue(this.container,o);if(l){const e=document.createRange();try{e.setStart(l.anchorNode,l.anchorOffset),e.setEnd(l.focusNode,l.focusOffset)}catch{return}a=e}else a=o.getRangeAt(0);a.insertNode(s);try{o.collapse(i,i.length)}catch{}this.wrapperElement=s}cleanup(){this.wrapperElement&&(this.wrapperElement.remove(),this.wrapperElement=null)}},Rn={error(e,t){void 0===t?console.error(e):console.error(e,t)},warn(e,t){void 0===t?console.warn(e):console.warn(e,t)},info(e,t){void 0===t?console.info(e):console.info(e,t)},debug(e,t){void 0===t?console.debug(e):console.debug(e,t)}},Cn={error(){},warn(){},info(){},debug(){}};function In(e,t){const n=`[${t}]`;return{error(t,s){e.error(`${n} ${t}`,s)},warn(t,s){e.warn(`${n} ${t}`,s)},info(t,s){e.info(`${n} ${t}`,s)},debug(t,s){e.debug(`${n} ${t}`,s)}}}var xn=class{listeners=/* @__PURE__ */new Map;log;constructor(e=Rn){this.log=In(e,"EventBus")}emit(e,t){const n=this.listeners.get(e.id);if(n)for(const i of n)try{i(t)}catch(s){this.log.error(`Listener error on "${e.id}"`,s)}}on(e,t){const n=e.id;this.listeners.has(n)||this.listeners.set(n,/* @__PURE__ */new Set);const s=this.listeners.get(n)??/* @__PURE__ */new Set;return s.add(t),()=>{s.delete(t),0===s.size&&this.listeners.delete(n)}}off(e,t){const n=this.listeners.get(e.id);n&&(n.delete(t),0===n.size&&this.listeners.delete(e.id))}clear(){this.listeners.clear()}},Tn=class{commands=/* @__PURE__ */new Map;readonlyBypassActive=!1;log;constructor(e=Rn){this.log=In(e,"CommandRegistry")}register(e,t,n,s){if(this.commands.has(e)){const t=this.commands.get(e);throw new Error(`Command "${e}" is already registered by plugin "${t?.pluginId}".`)}const i=s?.readonlyAllowed??!1;this.commands.set(e,{name:e,handler:t,pluginId:n,readonlyAllowed:i})}canExecute(e,t){const n=this.commands.get(e);return!(!n||t&&!n.readonlyAllowed)}execute(e,t){const n=this.commands.get(e);if(!n)return!1;if(t&&!n.readonlyAllowed)return!1;const s=t&&n.readonlyAllowed;s&&(this.readonlyBypassActive=!0);try{return n.handler()}catch(i){return this.log.error(`Command "${e}" error`,i),!1}finally{s&&(this.readonlyBypassActive=!1)}}isReadonlyBypassed(){return this.readonlyBypassActive}has(e){return this.commands.has(e)}remove(e){this.commands.delete(e)}clear(){this.commands.clear(),this.readonlyBypassActive=!1}get rawMap(){return this.commands}},Pn=class{middlewares=[];middlewareSorted=null;pasteInterceptors=[];pasteInterceptorsSorted=null;log;constructor(e=Rn){this.log=In(e,"MiddlewareChain")}addMiddleware(e){this.middlewares.push(e),this.middlewareSorted=null}removeMiddleware(e){const t=this.middlewares.indexOf(e);-1!==t&&this.middlewares.splice(t,1),this.middlewareSorted=null}invalidateMiddlewareSort(){this.middlewareSorted=null}dispatch(e,t,n){if(0===this.middlewares.length)return void n(e);const s=this.getSortedMiddleware();let i=0,r=!1;const o=e=>{if(i<s.length){const n=s[i++];if(!n)return;let r=!1;const l=e=>{r||(r=!0,o(e))};try{n.middleware(e,t,l)}catch(a){this.log.error(`Middleware "${n.name}" error`,a),l(e)}}else r||(r=!0,n(e))};o(e)}getChain(){return this.getSortedMiddleware().map(e=>({name:e.name,priority:e.priority,pluginId:e.pluginId}))}addPasteInterceptor(e){this.pasteInterceptors.push(e),this.pasteInterceptorsSorted=null}removePasteInterceptor(e){const t=this.pasteInterceptors.indexOf(e);-1!==t&&this.pasteInterceptors.splice(t,1),this.pasteInterceptorsSorted=null}invalidatePasteSort(){this.pasteInterceptorsSorted=null}getPasteInterceptors(){return this.getSortedPasteInterceptors()}get rawMiddlewares(){return this.middlewares}get rawPasteInterceptors(){return this.pasteInterceptors}clear(){this.middlewares.length=0,this.middlewareSorted=null,this.pasteInterceptors.length=0,this.pasteInterceptorsSorted=null}getSortedMiddleware(){return this.middlewareSorted||(this.middlewareSorted=[...this.middlewares].sort((e,t)=>e.priority-t.priority)),this.middlewareSorted}getSortedPasteInterceptors(){return this.pasteInterceptorsSorted||(this.pasteInterceptorsSorted=[...this.pasteInterceptors].sort((e,t)=>e.priority-t.priority)),this.pasteInterceptorsSorted}};function En(e,t,n,s){return{registerCommand:(s,i,r)=>{if(t.has(s)){const e=t.get(s);throw new Error(`Command "${s}" is already registered by plugin "${e?.pluginId}".`)}const o=r?.readonlyAllowed??!1;t.set(s,{name:s,handler:i,pluginId:e,readonlyAllowed:o}),n.commands.push(s)},executeCommand:s}}function Mn(e,t){return{registerService:(n,s)=>{if(e.has(n.id))throw new Error(`Service "${n.id}" is already registered by another plugin.`);e.set(n.id,s),t.services.push(n.id)},getService:t=>e.get(t.id)}}function An(e,t,n,s,i,r){return{registerMiddleware:(n,r)=>{const o={name:r?.name??(n.name||"anonymous"),pluginId:e,middleware:n,priority:r?.priority??100};t.push(o),s.middlewares.push(o),i()},registerPasteInterceptor:(t,i)=>{const o={name:i?.name??"anonymous",pluginId:e,interceptor:t,priority:i?.priority??100};n.push(o),s.pasteInterceptors.push(o),r()}}}function Nn(e,t){return{registerNodeSpec:n=>{e.registerNodeSpec(n),t.nodeSpecs.push(n.type)},registerMarkSpec:n=>{e.registerMarkSpec(n),t.markSpecs.push(n.type)},registerInlineNodeSpec:n=>{e.registerInlineNodeSpec(n),t.inlineNodeSpecs.push(n.type)}}}function Bn(e,t,n){return{registerNodeView:(e,s)=>{t.nodeViewRegistry.registerNodeView(e,s),n.nodeViews.push(e)},registerKeymap:(e,s)=>{t.keymapRegistry.registerKeymap(e,s),n.keymaps.push(e)},registerInputRule:e=>{t.inputRuleRegistry.registerInputRule(e),n.inputRules.push(e)},registerToolbarItem:s=>{t.toolbarRegistry.registerToolbarItem(s,e),n.toolbarItems.push(s.id)},registerBlockTypePickerEntry:e=>{t.blockTypePickerRegistry.registerBlockTypePickerEntry(e),n.blockTypePickerEntries.push(e.id)},registerFileHandler:(e,s)=>{t.fileHandlerRegistry.registerFileHandler(e,s),n.fileHandlers.push(s)},registerStyleSheet:e=>{const s=new CSSStyleSheet;s.replaceSync(e),t.pluginStyleSheets.push(s),n.stylesheets.push(s)}}}function On(e){return{getSchemaRegistry:()=>e.schemaRegistry,getKeymapRegistry:()=>e.keymapRegistry,getInputRuleRegistry:()=>e.inputRuleRegistry,getFileHandlerRegistry:()=>e.fileHandlerRegistry,getNodeViewRegistry:()=>e.nodeViewRegistry,getToolbarRegistry:()=>e.toolbarRegistry,getBlockTypePickerRegistry:()=>e.blockTypePickerRegistry}}var Dn=class{plugins=/* @__PURE__ */new Map;initOrder=[];startedInitOrder=[];initialized=!1;initializing=!1;readOnly=!1;log;constructor(e,t=Rn){this.tracker=e,this.log=In(t,"PluginLifecycle")}register(e){if(this.initialized||this.initializing)throw new Error(`Cannot register plugin "${e.id}" after initialization.`);if(this.plugins.has(e.id))throw new Error(`Plugin "${e.id}" is already registered.`);this.plugins.set(e.id,e)}get(e){return this.plugins.get(e)}getPluginIds(){return[...this.plugins.keys()]}async init(e,t){if(!this.initialized&&!this.initializing){this.initializing=!0;try{this.initOrder=this.resolveOrder();for(const s of this.initOrder){if(e.isCancelled?.())return;const i=this.plugins.get(s);if(!i)continue;this.startedInitOrder.push(s);const r=t(s,e);try{await i.init(r)}catch(n){throw await this.rollbackStartedPlugins(),n}}if(e.isCancelled?.())return;if(e.onBeforeReady&&await e.onBeforeReady(),e.isCancelled?.())return;for(const t of this.initOrder){if(e.isCancelled?.())return;const s=this.plugins.get(t);if(s?.onReady)try{await s.onReady()}catch(n){this.log.error(`Plugin "${t}" error in onReady`,n)}}this.initialized=!0}finally{this.initializing=!1}}}async destroy(){const e=[...this.startedInitOrder].reverse();for(const t of e)await this.destroyPlugin(t);this.plugins.clear(),this.initOrder=[],this.startedInitOrder=[],this.initialized=!1,this.initializing=!1}notifyStateChange(e,t,n){for(const i of this.initOrder){const r=this.plugins.get(i);if(r?.onStateChange)try{r.onStateChange(e,t,n)}catch(s){this.log.error(`Plugin "${i}" error in onStateChange`,s)}}}collectDecorations(e,t){let n=Ge.empty;for(const i of this.initOrder){const r=this.plugins.get(i);if(r?.decorations)try{const s=r.decorations(e,t);s.isEmpty||(n=n.merge(s))}catch(s){this.log.error(`Plugin "${i}" error in decorations()`,s)}}return n}configurePlugin(e,t){const n=this.plugins.get(e);if(!n)throw new Error(`Plugin "${e}" not found.`);if(n.onConfigure)try{n.onConfigure(t)}catch(s){this.log.error(`Plugin "${e}" error in onConfigure`,s)}}isReadOnly(){return this.readOnly}setReadOnly(e){if(this.readOnly!==e){this.readOnly=e;for(const n of this.initOrder){const s=this.plugins.get(n);if(s?.onReadOnlyChange)try{s.onReadOnlyChange(e)}catch(t){this.log.error(`Plugin "${n}" error in onReadOnlyChange`,t)}}}}get rawPlugins(){return this.plugins}get isInitialized(){return this.initialized}async destroyPlugin(e){const t=this.plugins.get(e);if(t?.destroy)try{await t.destroy()}catch(n){this.log.error(`Plugin "${e}" error in destroy`,n)}this.tracker.cleanup(e)}async rollbackStartedPlugins(){const e=[...this.startedInitOrder].reverse();for(const t of e)await this.destroyPlugin(t);this.startedInitOrder=[],this.initOrder=[],this.initialized=!1}resolveOrder(){const e=[...this.plugins.keys()];for(const r of e){const e=this.plugins.get(r);if(e)for(const t of e.dependencies??[])if(!this.plugins.has(t))throw new Error(`Plugin "${r}" depends on "${t}", which is not registered.`)}const t=/* @__PURE__ */new Map,n=/* @__PURE__ */new Map;for(const r of e)t.set(r,0),n.set(r,[]);for(const r of e){const e=this.plugins.get(r)?.dependencies??[];t.set(r,e.length);for(const t of e){const e=n.get(t);e&&e.push(r)}}const s=[];for(const[r,o]of t)0===o&&s.push(r);const i=[];for(;s.length>0;){s.sort((e,t)=>(this.plugins.get(e)?.priority??100)-(this.plugins.get(t)?.priority??100));const e=s.shift();if(!e)break;i.push(e);for(const i of n.get(e)??[]){const e=(t.get(i)??0)-1;t.set(i,e),0===e&&s.push(i)}}if(i.length!==e.length){const t=e.filter(e=>!i.includes(e));throw new Error(`Circular dependency detected among plugins: ${t.join(", ")}`)}return i}},Ln=class{registrations=/* @__PURE__ */new Map;pluginStyleSheets=[];constructor(e){this.deps=e}track(e,t){this.registrations.set(e,t)}cleanup(e){const t=this.registrations.get(e);if(t){for(const e of t.commands)this.deps.commandRegistry.remove(e);for(const e of t.services)this.deps.serviceRegistry.remove(e);for(const e of t.middlewares)this.deps.middlewareChain.removeMiddleware(e);for(const e of t.pasteInterceptors)this.deps.middlewareChain.removePasteInterceptor(e);for(const e of t.unsubscribers)e();for(const e of t.nodeSpecs)this.deps.schemaRegistry.removeNodeSpec(e);for(const e of t.markSpecs)this.deps.schemaRegistry.removeMarkSpec(e);for(const e of t.inlineNodeSpecs)this.deps.schemaRegistry.removeInlineNodeSpec(e);for(const e of t.nodeViews)this.deps.nodeViewRegistry.removeNodeView(e);for(const e of t.keymaps)this.deps.keymapRegistry.removeKeymap(e);for(const e of t.inputRules)this.deps.inputRuleRegistry.removeInputRule(e);for(const e of t.toolbarItems)this.deps.toolbarRegistry.removeToolbarItem(e);for(const e of t.fileHandlers)this.deps.fileHandlerRegistry.removeFileHandler(e);for(const e of t.blockTypePickerEntries)this.deps.blockTypePickerRegistry.removeBlockTypePickerEntry(e);for(const e of t.stylesheets){const t=this.pluginStyleSheets.indexOf(e);-1!==t&&this.pluginStyleSheets.splice(t,1)}this.registrations.delete(e)}}clear(){this.registrations.clear(),this.pluginStyleSheets.length=0}get rawStyleSheets(){return this.pluginStyleSheets}},Hn=class{services=/* @__PURE__ */new Map;register(e,t){if(this.services.has(e.id))throw new Error(`Service "${e.id}" is already registered.`);this.services.set(e.id,t)}get(e){return this.services.get(e.id)}has(e){return this.services.has(e)}remove(e){this.services.delete(e)}clear(){this.services.clear()}get rawMap(){return this.services}},zn=class{schemaRegistry=new ut;keymapRegistry=new gn;inputRuleRegistry=new mn;fileHandlerRegistry=new fn;nodeViewRegistry=new kn;toolbarRegistry=new Je;blockTypePickerRegistry=new Qe;logger;commandRegistry;serviceRegistry=new Hn;middlewareChain;eventBus;registrationTracker;lifecycle;constructor(e={}){this.logger=e.logger??Rn,this.commandRegistry=new Tn(this.logger),this.middlewareChain=new Pn(this.logger),this.eventBus=new xn(this.logger),this.registrationTracker=new Ln({commandRegistry:this.commandRegistry,serviceRegistry:this.serviceRegistry,middlewareChain:this.middlewareChain,schemaRegistry:this.schemaRegistry,keymapRegistry:this.keymapRegistry,inputRuleRegistry:this.inputRuleRegistry,nodeViewRegistry:this.nodeViewRegistry,toolbarRegistry:this.toolbarRegistry,fileHandlerRegistry:this.fileHandlerRegistry,blockTypePickerRegistry:this.blockTypePickerRegistry}),this.lifecycle=new Dn(this.registrationTracker,this.logger)}registerService(e,t){this.serviceRegistry.register(e,t)}register(e){this.lifecycle.register(e)}async init(e){return this.lifecycle.init(e,(e,t)=>this.createContext(e,t))}notifyStateChange(e,t,n){this.lifecycle.notifyStateChange(e,t,n)}collectDecorations(e,t){return this.lifecycle.collectDecorations(e,t)}dispatchWithMiddleware(e,t,n){this.middlewareChain.dispatch(e,t,n)}canExecuteCommand(e){return this.commandRegistry.canExecute(e,this.lifecycle.isReadOnly())}executeCommand(e){return this.commandRegistry.execute(e,this.lifecycle.isReadOnly())}isReadonlyBypassed(){return this.commandRegistry.isReadonlyBypassed()}configurePlugin(e,t){this.lifecycle.configurePlugin(e,t)}isReadOnly(){return this.lifecycle.isReadOnly()}setReadOnly(e){this.lifecycle.setReadOnly(e)}getPluginIds(){return this.lifecycle.getPluginIds()}getMiddlewareChain(){return this.middlewareChain.getChain()}getPasteInterceptors(){return this.middlewareChain.getPasteInterceptors()}get(e){return this.lifecycle.get(e)}getService(e){return this.serviceRegistry.get(e)}onEvent(e,t){return this.eventBus.on(e,t)}getPluginStyleSheets(){return this.registrationTracker.rawStyleSheets}async destroy(){await this.lifecycle.destroy(),this.commandRegistry.clear(),this.serviceRegistry.clear(),this.middlewareChain.clear(),this.registrationTracker.clear(),this.eventBus.clear(),this.schemaRegistry.clear(),this.keymapRegistry.clear(),this.inputRuleRegistry.clear(),this.fileHandlerRegistry.clear(),this.nodeViewRegistry.clear(),this.toolbarRegistry.clear(),this.blockTypePickerRegistry.clear()}createContext(e,t){const{context:n,registrations:s}=function(e){const t={commands:[],services:[],middlewares:[],pasteInterceptors:[],unsubscribers:[],nodeSpecs:[],markSpecs:[],inlineNodeSpecs:[],nodeViews:[],keymaps:[],inputRules:[],toolbarItems:[],fileHandlers:[],blockTypePickerEntries:[],stylesheets:[]},n=function(e,t){return{emit:(t,n)=>e.emit(t,n),on:(n,s)=>{const i=e.on(n,s);return t.unsubscribers.push(i),i},off:(t,n)=>e.off(t,n)}}(e.eventBus,t);return{context:{getState:e.getState,dispatch:e.dispatch,getContainer:e.getContainer,getPluginContainer:e.getPluginContainer,isReadOnly:e.isReadOnly,getEventBus:()=>n,...En(e.pluginId,e.commands,t,e.executeCommand),...Mn(e.services,t),...An(e.pluginId,e.middlewares,e.pasteInterceptors,t,e.invalidateMiddlewareSort,e.invalidatePasteSort),...Nn(e.schemaRegistry,t),...Bn(e.pluginId,e,t),...On(e),updateConfig:t=>{const n=e.plugins.get(e.pluginId);if(n?.onConfigure)try{n.onConfigure(t)}catch(s){const t=`[PluginContext] Plugin "${e.pluginId}" error in onConfigure`;e.logger.error(t,s)}},announce:t=>{e.announce?.(t)},hasAnnouncement:()=>e.hasAnnouncement?.()??!1},registrations:t}}({pluginId:e,logger:this.logger,getState:t.getState,dispatch:t.dispatch,getContainer:t.getContainer,getPluginContainer:t.getPluginContainer,announce:t.announce,hasAnnouncement:t.hasAnnouncement,commands:this.commandRegistry.rawMap,services:this.serviceRegistry.rawMap,middlewares:this.middlewareChain.rawMiddlewares,pasteInterceptors:this.middlewareChain.rawPasteInterceptors,pluginStyleSheets:this.registrationTracker.rawStyleSheets,plugins:this.lifecycle.rawPlugins,eventBus:this.eventBus,schemaRegistry:this.schemaRegistry,keymapRegistry:this.keymapRegistry,inputRuleRegistry:this.inputRuleRegistry,toolbarRegistry:this.toolbarRegistry,blockTypePickerRegistry:this.blockTypePickerRegistry,fileHandlerRegistry:this.fileHandlerRegistry,nodeViewRegistry:this.nodeViewRegistry,isReadOnly:()=>this.lifecycle.isReadOnly(),invalidateMiddlewareSort:()=>this.middlewareChain.invalidateMiddlewareSort(),invalidatePasteSort:()=>this.middlewareChain.invalidatePasteSort(),executeCommand:e=>this.executeCommand(e)});return this.registrationTracker.track(e,s),n}},_n={EN:"en",DE:"de",ES:"es",FR:"fr",ZH:"zh",RU:"ru",AR:"ar",HI:"hi",PT:"pt",BROWSER:"browser"},Fn={paragraph:"Paragraph",heading:"Heading",code_block:"Code Block",blockquote:"Block Quote",list_item:"List Item",horizontal_rule:"Horizontal Rule",image:"Image",table:"Table"};function Kn(e,t){return"heading"===e&&t?.level?`Heading ${t.level}`:Fn[e]??e}function $n(e,t){const n=t?.document??globalThis.document,s=t?.container??n.head;if(t?.id){const s=n.getElementById(t.id);if(s instanceof HTMLStyleElement)return s.textContent=e,t.nonce&&s.setAttribute("nonce",t.nonce),s}const i=n.createElement("style");return i.textContent=e,t?.id&&(i.id=t.id),t?.nonce&&i.setAttribute("nonce",t.nonce),s.appendChild(i),i}function Vn(e,t){const n=(t??globalThis.document).getElementById(e);n&&n.remove()}var jn=/* @__PURE__ */new WeakSet;function Un(e,t){const n=t?.target??globalThis.document,s=new CSSStyleSheet;return s.replaceSync(e),jn.add(s),t?.replace&&(n.adoptedStyleSheets=n.adoptedStyleSheets.filter(e=>!jn.has(e))),n.adoptedStyleSheets=[...n.adoptedStyleSheets,s],s}function qn(e,t){const n=t??globalThis.document;n.adoptedStyleSheets=n.adoptedStyleSheets.filter(t=>t!==e)}function Wn(e,t,n){const s=t?function(e,t){return{children:e.children.map(e=>Gn(e,t))}}(e,t):e,i=t?W(t):void 0;n(Bt.create({doc:s,schema:i}))}function Gn(e,n){const s=n.getNodeSpec(e.type);if(!s?.content||!((r=s.content).allow.length>0)||r.allow.includes("text"))return e;var r;if(S(e)){const t=e.children.length>0?e.children:void 0,n=g(J("paragraph"),t);return g(e.type,[n],e.id,e.attrs)}const o=e.children.map(e=>t(e)||i(e)?e:Gn(e,n));return g(e.type,o,e.id,e.attrs)}function Qn(e){return e.doc.children.map(e=>p(e)).join("\n")}function Jn(e){if(!e)return!0;if(0===e.children.length)return!0;if(e.children.length>1)return!1;const t=e.children[0];return!t||"paragraph"===t.type&&""===p(t)}var Xn=class{config={};getConfig(){return this.config}setConfig(e){this.config=e}mergeConfig(e){this.config={...this.config,...e}}applyAttribute(e,t,n){if("placeholder"===e){const e=t??void 0;this.config={...this.config,placeholder:e},this.applyPlaceholder(e,n.contentElement)}if("readonly"===e){const e=null!==t;this.applyReadonly(e,n.contentElement,n.pluginManager),this.config={...this.config,readonly:e}}if("theme"===e){const e=t??void 0;this.config={...this.config,theme:e},n.themeController?.apply(e??tt.Light)}"paper-size"===e&&(null===t?(n.applyPaperSize(void 0),this.config={...this.config,paperSize:void 0}):ot(t)&&(n.applyPaperSize(t),this.config={...this.config,paperSize:t})),"dir"===e&&this.applyDir("ltr"===t||"rtl"===t?t:void 0,n.contentElement,n.editorWrapper)}applyRuntimeConfig(e,t){void 0!==e.placeholder&&this.applyPlaceholder(e.placeholder,t.contentElement),void 0!==e.readonly&&this.applyReadonly(e.readonly,t.contentElement,t.pluginManager),"paperSize"in e&&t.applyPaperSize(e.paperSize),"dir"in e&&this.applyDir(e.dir,t.contentElement,t.editorWrapper),this.config={...this.config,...e}}applyTheme(e,t){this.config={...this.config,theme:e},t?.apply(e)}getTheme(){return this.config.theme??tt.Light}get isReadOnly(){return this.config.readonly??!1}getPaperSize(){return this.config.paperSize}applyPlaceholder(e,t){if(!t)return;const n=t.getAttribute("data-default-placeholder")??"";t.setAttribute("data-placeholder",e??n)}applyReadonly(e,t,n){t&&(t.contentEditable=e?"false":"true",e?t.setAttribute("aria-readonly","true"):t.removeAttribute("aria-readonly"),n?.setReadOnly(e))}applyDir(e,t,n){t&&(e?(n?.setAttribute("dir",e),t.setAttribute("dir",e)):(n?.removeAttribute("dir"),t.removeAttribute("dir")))}},Yn=class{listeners=/* @__PURE__ */new Map;on(e,t){this.listeners.has(e)||this.listeners.set(e,/* @__PURE__ */new Set),this.listeners.get(e)?.add(t)}off(e,t){this.listeners.get(e)?.delete(t)}emit(e,t){const n=this.listeners.get(e);if(n)for(const s of n)s(t)}clear(){this.listeners.clear()}},Zn=class{deps;handleSelectionChange;handleMousedown;handleDragover;handleDrop;handleCompositionStart;handleCompositionEnd;pendingNodeSelectionClear=!1;pendingGapCursorClear=!1;constructor(e){this.deps=e,this.handleCompositionStart=()=>{e.cursorWrapper.onCompositionStart(e.getState())},this.handleCompositionEnd=()=>{e.cursorWrapper.cleanup()},e.contentElement.addEventListener("compositionstart",this.handleCompositionStart),e.contentElement.addEventListener("compositionend",this.handleCompositionEnd),this.handleSelectionChange=this.onSelectionChange.bind(this),document.addEventListener("selectionchange",this.handleSelectionChange),this.handleMousedown=this.onMousedown.bind(this),e.contentElement.addEventListener("mousedown",this.handleMousedown),this.handleDragover=this.onDragover.bind(this),e.contentElement.addEventListener("dragover",this.handleDragover),this.handleDrop=this.onDrop.bind(this),e.contentElement.addEventListener("drop",this.handleDrop)}syncSelectionFromDOM(){if(this.deps.compositionState.isComposing)return;this.deps.cursorWrapper.isActive&&this.deps.cursorWrapper.cleanup();const e=this.deps.getState();if(x(e.selection)&&!this.pendingNodeSelectionClear)return;if(b(e.selection)&&!this.pendingGapCursorClear)return;this.pendingNodeSelectionClear=!1,this.pendingGapCursorClear=!1;const t=he(this.deps.contentElement);if(!t)return;if(C(t,e.selection))return;const n=e.transaction("input").setSelection(t).setStoredMarks(null,e.storedMarks).build(),s=e.apply(n);this.deps.applyUpdate(s,n,!0)}destroy(){const e=this.deps.contentElement;e.removeEventListener("compositionstart",this.handleCompositionStart),e.removeEventListener("compositionend",this.handleCompositionEnd),document.removeEventListener("selectionchange",this.handleSelectionChange),e.removeEventListener("mousedown",this.handleMousedown),e.removeEventListener("dragover",this.handleDragover),e.removeEventListener("drop",this.handleDrop)}onSelectionChange(){if(this.deps.isUpdating())return;const e=this.deps.contentElement.getRootNode(),t="activeElement"in e?e.activeElement:document.activeElement;(this.deps.contentElement.contains(t)||t===this.deps.contentElement)&&this.syncSelectionFromDOM()}onMousedown(e){if(this.deps.isUpdating())return;this.deps.onMousedown?.();const t=e.target;if(!(t instanceof HTMLElement))return;const n=t.closest("[data-block-id]");if(!(n instanceof HTMLElement&&this.deps.contentElement.contains(n)))return void((this.deps.contentElement.contains(t)||t===this.deps.contentElement)&&this.handleClickBelowContent(e));if(!n.hasAttribute("data-void")&&!n.hasAttribute("data-selectable"))return void this.markPendingSelectionClear();if(n.querySelector("[data-content-dom]")?.contains(t))return void this.markPendingSelectionClear();e.preventDefault(),this.deps.contentElement.focus();const s=P(Y(n.getAttribute("data-block-id")??""),ee(this.deps.contentElement,n)),i=this.deps.getState(),r=i.transaction("input").setSelection(s).setStoredMarks(null,i.storedMarks).build(),o=i.apply(r);this.deps.applyUpdate(o,r)}handleClickBelowContent(e){if(this.deps.isReadOnly())return;const t=this.deps.getState(),n=t.doc.children[t.doc.children.length-1];if(!n)return;const i=n.id,a=this.deps.contentElement.querySelector(`[data-block-id="${i}"]`);if(!a)return;const l=a.getBoundingClientRect();if(e.clientY<=l.bottom)return;const c=t.getBlock(i);if("paragraph"===c?.type&&0===o(c)){const n=t.transaction("input").setSelection(E(i,0)).build();return this.deps.dispatch(n),void e.preventDefault()}e.preventDefault(),this.deps.contentElement.focus();const h=r(),d=t.transaction("input").insertNode([],t.doc.children.length,s(h)).setSelection(E(h,0)).build();this.deps.dispatch(d)}onDragover(e){this.deps.fileHandlerRegistry&&e.dataTransfer&&e.dataTransfer.types.includes("Files")&&e.preventDefault()}onDrop(e){if(this.deps.isReadOnly())return;if(!this.deps.fileHandlerRegistry)return;if(!e.dataTransfer)return;const t=Array.from(e.dataTransfer.files);if(0===t.length)return;const n=this.getPositionFromPoint(e.clientX,e.clientY);let s=!1;for(const i of t){const e=this.deps.fileHandlerRegistry.matchFileHandlers(i.type);for(const t of e){const e=t(i,n);if(!0===e||e instanceof Promise){s=!0;break}}}s&&e.preventDefault()}getPositionFromPoint(e,t){const n=de(this.deps.contentElement.getRootNode(),e,t);return n&&this.deps.contentElement.contains(n.node)?le(this.deps.contentElement,n.node,n.offset):null}markPendingSelectionClear(){const e=this.deps.getState();x(e.selection)&&(this.pendingNodeSelectionClear=!0),b(e.selection)&&(this.pendingGapCursorClear=!0)}},es=class{deps;navigationKeymap=null;goalColumn=null;preserveGoalColumn=!1;constructor(e){this.deps=e,this.registerKeymaps()}resetAfterUpdate(){this.preserveGoalColumn||(this.goalColumn=null)}clearGoalColumn(){this.goalColumn=null}destroy(){this.navigationKeymap&&this.deps.keymapRegistry&&(this.deps.keymapRegistry.removeKeymap(this.navigationKeymap),this.navigationKeymap=null)}registerKeymaps(){if(!this.deps.keymapRegistry)return;const e={ArrowLeft:"left",ArrowRight:"right",ArrowUp:"up",ArrowDown:"down"},t={};for(const[n,s]of Object.entries(e))t[n]=()=>this.handleArrow(s);this.navigationKeymap=t,this.deps.keymapRegistry.registerKeymap(t,{priority:"navigation"})}handleArrow(e){const t=this.deps.getState();return!x(t.selection)&&!b(t.selection)&&!!T(t.selection)&&("left"===e||"right"===e?this.handleHorizontalArrow(e):this.handleVerticalArrow(e))}handleHorizontalArrow(e){this.goalColumn=null;const t=this.deps.getState(),n=this.resolveLogicalDirection(t,e),s=pe(t,n);if(s)return this.deps.dispatch(s),this.validateSelectionAfterInlineSkip(),!0;if(!fe(this.deps.contentElement,t,e))return!1;const i=ge(t,n);return!!i&&(this.deps.dispatch(i),!0)}resolveLogicalDirection(e,t){const n=e.selection;if(!M(n))return t;const s=this.deps.contentElement.querySelector(`[data-block-id="${n.anchor.blockId}"]`);return s instanceof HTMLElement&&"rtl"===Te(s)?"left"===t?"right":"left":t}handleVerticalArrow(e){const t=this.deps.getState(),n=this.deps.contentElement.ownerDocument.getSelection?.()??null,s=n?Se(n,this.deps.contentElement):null;if(!fe(this.deps.contentElement,t,e,s))return!1;null===this.goalColumn&&s&&(this.goalColumn=s.left),this.preserveGoalColumn=!0;const i=ke(this.deps.contentElement,t,e,this.goalColumn);return i?(this.deps.dispatch(i),this.preserveGoalColumn=!1,!0):(this.preserveGoalColumn=!1,!1)}validateSelectionAfterInlineSkip(){const e=this.deps.getState(),t=he(this.deps.contentElement);t&&C(t,e.selection)||ce(this.deps.contentElement,e.selection)}};function ts(e,t){const n=[];let s=null,i=[];for(const r of e){const e=t.getNodeSpec(r.type)?.wrapper?.(r);e&&s&&e.key===s.key?i.push(r.id):e?(s&&i.length>0&&n.push({spec:s,blockIds:i}),s=e,i=[r.id]):(s&&i.length>0&&n.push({spec:s,blockIds:i}),s=null,i=[])}return s&&i.length>0&&n.push({spec:s,blockIds:i}),n}function ns(e,t){if(t.className&&e.className!==t.className&&(e.className=t.className),t.attrs)for(const[n,s]of Object.entries(t.attrs))e.getAttribute(n)!==s&&e.setAttribute(n,s)}function ss(e){const t=document.createElement(e.tag);if(t.setAttribute("data-block-wrapper",e.key),e.className&&(t.className=e.className),e.attrs)for(const[n,s]of Object.entries(e.attrs))t.setAttribute(n,s);return t}function is(e,t,n){t!==(n?n.nextSibling:e.firstChild)&&(n||t.parentNode!==e||t!==e.firstChild)&&(n?n.after(t):e.insertBefore(t,e.firstChild))}function rs(e,t,n){for(let i=0;i<t.length;i++){const s=t[i];if(!s)continue;const r=n.querySelector(`[data-block-id="${s}"]`);if(!r)continue;const o=e.children[i]??null;r!==o&&(o?e.insertBefore(r,o):e.appendChild(r))}const s=new Set(t);for(const i of Array.from(e.children)){const t=i.getAttribute("data-block-id");t&&!s.has(t)&&n.insertBefore(i,e)}}function os(e,t,n){if(!n)return;const s=ts(t,n);for(const i of s){const t=e.querySelector(`[data-block-id="${i.blockIds[0]}"]`);if(!t)continue;const n=ss(i.spec);t.before(n);for(const s of i.blockIds){const t=e.querySelector(`[data-block-id="${s}"]`);t&&n.appendChild(t)}}}function as(e){e.parentElement?.removeChild(e)}function ls(e,t,n){const s=e.parentElement;s?s.replaceChild(t,e):n.replaceChild(t,e)}function cs(e,t,n){if(t?.parentElement){const e=t.parentElement;return void(t.nextSibling?e.insertBefore(n,t.nextSibling):e.appendChild(n))}e.firstChild?e.insertBefore(n,e.firstChild):e.appendChild(n)}function hs(e,t){if(t){const n=t.getInlineNodeSpec(e.inlineType);if(n){const t=n.toDOM(e);return t.setAttribute("contenteditable","false"),t}}const n=document.createElement("span");return n.setAttribute("data-inline-type",e.inlineType),n.setAttribute("contenteditable","false"),n}function ds(e){let t=e.replace(/ {2}/g,"  ");return t.endsWith(" ")&&(t=`${t.slice(0,-1)} `),t.startsWith(" ")&&(t=` ${t.slice(1)}`),t}function ps(e){const t=e.nodeName??"span",n=document.createElement(t);if(n.setAttribute("data-decoration","true"),e.class)for(const s of e.class.split(" "))s&&n.classList.add(s);e.style&&Ke(n,e.style);for(const[s,i]of Object.entries(e))"class"!==s&&"style"!==s&&"nodeName"!==s&&void 0!==i&&n.setAttribute(s,i);return n}function us(e,t,n){const s=n?.decorations?.findNode(t);if(s&&0!==s.length)for(const i of s){if(i.attrs.class)for(const t of i.attrs.class.split(" "))t&&e.classList.add(t);i.attrs.style&&qe(e,i.attrs.style)}}function gs(e,t,n,s){const i=s?.decorations?.findInline(e.id),r=s?.nodeViewRegistry;if(r&&t&&n&&s?.getState&&s?.dispatch){const o=r.getNodeViewFactory(e.type);if(o){const r=o(e,s.getState,s.dispatch);n.set(e.id,r);const a=t.getNodeSpec(e.type);if(a?.isVoid&&r.dom.setAttribute("data-void","true"),a?.selectable&&r.dom.setAttribute("data-selectable","true"),r.contentDOM&&r.contentDOM!==r.dom&&r.contentDOM.setAttribute("data-content-dom","true"),S(e)&&r.contentDOM)ms(r.contentDOM,e,t,i);else{const i=d(e),o=/* @__PURE__ */new Map;for(const e of i){const i=r.getContentDOM?.(e.id)??r.contentDOM;if(i){const r=gs(e,t,n,s);i.appendChild(r);let a=o.get(i);a||(a=[],o.set(i,a)),a.push(e)}}for(const[e,n]of o)os(e,n,t)}return r.dom.setAttribute("data-block-type",e.type),us(r.dom,e.id,s),r.dom}}if(t){const r=t.getNodeSpec(e.type);if(r){const o=r.toDOM(e);if(r.isVoid&&o.setAttribute("data-void","true"),r.selectable&&o.setAttribute("data-selectable","true"),!r.isVoid)if(S(e))ms(o,e,t,i);else{const i=d(e);for(const e of i){const i=gs(e,t,n,s);o.appendChild(i)}os(o,i,t)}return o.setAttribute("data-block-type",e.type),us(o,e.id,s),o}}return function(e,t,n){const s=Z("p",e.id);return s.setAttribute("data-block-type",e.type),ms(s,e,t,n),s}(e,t,i)}function ms(e,n,s,r){for(const t of e.querySelectorAll("[data-cursor-wrapper]"))t.remove();const o=l(n);if(1===o.length&&t(o[0])&&""===o[0].text)return void e.appendChild(document.createElement("br"));if(r&&0!==r.length)!function(e,t,n,s){let r=0;for(const o of t){if(i(o)){e.appendChild(hs(o,s)),r+=1;continue}const t=r,a=r+o.text.length;if(0===o.text.length){r=a;continue}const l=/* @__PURE__ */new Set;l.add(t),l.add(a);for(const e of n){const n=Math.max(t,e.from),s=Math.min(a,e.to);n>t&&n<a&&l.add(n),s>t&&s<a&&l.add(s)}const c=[...l].sort((e,t)=>e-t);for(let i=0;i<c.length-1;i++){const r=c[i],a=c[i+1];if(void 0===r||void 0===a||r>=a)continue;const l=r-t,h=a-t,d=o.text.slice(l,h),p=[];for(const e of n)e.from<=r&&e.to>=a&&p.push(e);let u=wn(document.createTextNode(ds(d)),o.marks,s);for(const e of p){const t=ps(e.attrs);t.appendChild(u),u=t}e.appendChild(u)}r=a}}(e,o,r,s);else for(const i of o)t(i)?e.appendChild(fs(i,s)):e.appendChild(hs(i,s));const a=o[o.length-1];a&&i(a)&&"hard_break"===a.inlineType&&e.appendChild(document.createElement("br"))}function fs(e,t){return""===e.text?document.createTextNode(""):wn(document.createTextNode(ds(e.text)),e.marks,t)}function ys(e,t,n,s){const i=t?.doc.children??[],r=n.doc.children,o=s?.registry,a=s?.nodeViews,l=null!=s?.compositionBlockId,c=/* @__PURE__ */new Map;for(const m of function(e){const t=[];for(const n of Array.from(e.children))if(n instanceof HTMLElement)if(n.hasAttribute("data-block-id"))t.push(n);else if(n.hasAttribute("data-block-wrapper"))for(const e of Array.from(n.children))e instanceof HTMLElement&&e.hasAttribute("data-block-id")&&t.push(e);return t}(e)){const e=m.getAttribute("data-block-id");e&&c.set(Y(e),m)}const h=new Set(r.map(e=>e.id));for(const[m,f]of c)if(!h.has(m)){as(f),c.delete(m);const e=a?.get(m);e&&(e.destroy?.(),a?.delete(m))}const d=/* @__PURE__ */new Map;for(const m of i)d.set(m.id,m);let p=null;const u=s?.selectedNodeId,g=s?.previousSelectedNodeId;for(const m of r){const t=c.get(m.id),n=d.get(m.id);if(s?.compositionBlockId===m.id&&t){p=t;continue}const i=s?.oldDecorations?.find(m.id),r=s?.decorations?.find(m.id);if(t&&n&&!ks(n,m,i,r))p=t;else if(t){const n=a?.get(m.id);if(n){if(n.update?.(m)){if(S(m)&&n.contentDOM){n.contentDOM.textContent="";const e=s?.decorations?.findInline(m.id);ms(n.contentDOM,m,o,e)}p=n.dom;continue}n.destroy?.(),a?.delete(m.id)}const i=gs(m,o,a,s);ls(t,i,e),p=i}else{const t=gs(m,o,a,s);cs(e,p,t),p=t}if(u===m.id){const e=a?.get(m.id);if(e)e.selectNode?.();else{const e=c.get(m.id)??p;e instanceof HTMLElement&&e.classList.add("notectl-node-selected")}}else if(g===m.id){const e=a?.get(m.id);if(e)e.deselectNode?.();else{const e=c.get(m.id)??p;e instanceof HTMLElement&&e.classList.remove("notectl-node-selected")}}}if(g&&g!==u){const e=a?.get(g);e&&!h.has(g)&&e.deselectNode?.()}if(u&&!h.has(u)){const e=a?.get(u);e&&e.selectNode?.()}!l&&o&&function(e,t,n){const s=ts(t,n),i=function(e,t){const n=[],s=/* @__PURE__ */new Set;for(const r of t)for(const e of r.blockIds)s.add(e);let i=0;for(const r of e){if(!s.has(r.id)){n.push({type:"bare",blockId:r.id});continue}const e=t[i];e&&e.blockIds[0]===r.id&&(n.push({type:"wrapper",key:e.spec.key,blockIds:e.blockIds}),i++)}return n}(t,s),r=function(e){const t=[];for(const n of Array.from(e.children))if(n instanceof HTMLElement)if(n.hasAttribute("data-block-wrapper")){const e=n.getAttribute("data-block-wrapper")??"",s=[];for(const t of Array.from(n.children)){if(!(t instanceof HTMLElement))continue;const e=t.getAttribute("data-block-id");e&&s.push(Y(e))}t.push({type:"wrapper",element:n,key:e,blockIds:s})}else if(n.hasAttribute("data-block-id")){const e=n.getAttribute("data-block-id")??"";t.push({type:"bare",element:n,blockId:Y(e)})}return t}(e);if(function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++){const s=e[n],i=t[n];if(!s||!i)return!1;if(s.type!==i.type)return!1;if("bare"===s.type&&"bare"===i.type){if(s.blockId!==i.blockId)return!1}else if("wrapper"===s.type&&"wrapper"===i.type){if(s.key!==i.key)return!1;if(s.blockIds.length!==i.blockIds.length)return!1;for(let e=0;e<s.blockIds.length;e++)if(s.blockIds[e]!==i.blockIds[e])return!1}}return!0}(i,r)){let e=0;for(const t of r)if("wrapper"===t.type){const n=s[e];n&&ns(t.element,n.spec),e++}return}const o=/* @__PURE__ */new Map;for(const h of r){if("wrapper"!==h.type)continue;let e=o.get(h.key);e||(e=[],o.set(h.key,e)),e.push(h.element)}const a=/* @__PURE__ */new Set;let l=null,c=0;for(const h of i){if("bare"===h.type){const t=e.querySelector(`[data-block-id="${h.blockId}"]`);if(!t)continue;t.parentNode!==e?l?l.after(t):e.insertBefore(t,e.firstChild):is(e,t,l),l=t;continue}const t=s[c];if(!t)continue;c++;const n=o.get(h.key);let i=null;if(n&&n.length>0){const e=n.shift();e&&(i=e.tagName.toLowerCase()===t.spec.tag?e:ss(t.spec))}i||(i=ss(t.spec)),a.add(i),ns(i,t.spec),i.parentNode!==e?l?l.after(i):e.insertBefore(i,e.firstChild):is(e,i,l),rs(i,h.blockIds,e),l=i}for(const h of r)if("wrapper"===h.type&&!a.has(h.element)){for(;h.element.firstChild;)e.insertBefore(h.element.firstChild,h.element);h.element.remove()}}(e,r,o)}function ks(n,s,r,o){if(n.type!==s.type)return!0;if(n.children.length!==s.children.length)return!0;const a=n.attrs,l=s.attrs;if(a!==l){if(!a||!l)return!0;const e=Object.keys(a),t=Object.keys(l);if(e.length!==t.length)return!0;for(const n of e)if(a[n]!==l[n])return!0}for(let d=0;d<n.children.length;d++){const r=n.children[d],o=s.children[d];if(!r||!o)return!0;if(t(r)&&t(o)){if(r.text!==o.text)return!0;if(!e(r.marks,o.marks))return!0}else if(i(r)&&i(o)){if(r.inlineType!==o.inlineType)return!0;if(!Ss(r.attrs,o.attrs))return!0}else{if(t(r)||t(o)||i(r)||i(o))return!0;if(ks(r,o))return!0}}const c=r??[],h=o??[];return c!==h&&!We(c,h)}function Ss(e,t){const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(const i of n)if(e[i]!==t[i])return!1;return!0}var ws=class{state;contentElement;history;stateChangeCallbacks=[];isUpdating=!1;schemaRegistry;nodeViewRegistry;nodeViews=/* @__PURE__ */new Map;decorations=Ge.empty;getDecorations;isReadOnly;isReadonlyBypassed;compositionState;cursorWrapper;navigation;events;constructor(e,t){this.state=t.state,this.contentElement=e,this.schemaRegistry=t.schemaRegistry,this.nodeViewRegistry=t.nodeViewRegistry,this.getDecorations=t.getDecorations,this.isReadOnly=t.isReadOnly??(()=>!1),this.isReadonlyBypassed=t.isReadonlyBypassed??(()=>!1),this.compositionState=t.compositionState??{isComposing:!1,activeBlockId:null},this.history=new Ft({maxDepth:t.maxHistoryDepth??100}),t.onStateChange&&this.stateChangeCallbacks.push(t.onStateChange),this.cursorWrapper=new bn(e,this.schemaRegistry),this.navigation=new es({contentElement:e,getState:()=>this.state,dispatch:e=>this.dispatch(e),keymapRegistry:t.keymapRegistry}),this.events=new Zn({contentElement:e,getState:()=>this.state,dispatch:e=>this.dispatch(e),applyUpdate:(e,t,n)=>this.applyUpdate(e,t,{skipSelectionSync:n}),isUpdating:()=>this.isUpdating,compositionState:this.compositionState,cursorWrapper:this.cursorWrapper,isReadOnly:this.isReadOnly,fileHandlerRegistry:t.fileHandlerRegistry,onMousedown:()=>this.navigation.clearGoalColumn()}),this.decorations=this.getDecorations?.(this.state)??Ge.empty,ys(e,null,this.state,{...this.reconcileOptions(),decorations:this.decorations}),ce(e,this.state.selection)}getState(){return this.state}applyUpdate(e,t,n){if(!this.isUpdating){this.isUpdating=!0;try{const s=this.state;this.state=e,this.cursorWrapper.isActive&&!e.storedMarks?.length&&this.cursorWrapper.cleanup(),(n?.pushHistory&&"history"!==t.metadata.origin||zt(t))&&this.history.push(t);const i=this.getDecorations?.(e,t)??Ge.empty;this.reconcileAndSync(s,e,i,n?.skipSelectionSync);for(const n of this.stateChangeCallbacks)n(s,e,t);this.navigation.resetAfterUpdate()}finally{this.isUpdating=!1}}}dispatch(e){if(this.isReadOnly()&&!_t(e)&&!this.isReadonlyBypassed())return;const t=this.state.apply(e);this.applyUpdate(t,e,{pushHistory:!0})}undo(){if(this.isUpdating||this.isReadOnly())return;const e=this.history.undo(this.state);e&&this.applyUpdate(e.state,e.transaction)}redo(){if(this.isUpdating||this.isReadOnly())return;const e=this.history.redo(this.state);e&&this.applyUpdate(e.state,e.transaction)}onStateChange(e){return this.stateChangeCallbacks.push(e),()=>{const t=this.stateChangeCallbacks.indexOf(e);-1!==t&&this.stateChangeCallbacks.splice(t,1)}}replaceState(e){if(!this.isUpdating){this.isUpdating=!0;try{const t=this.state,n=e.withSelection(t.selection);this.state=n,this.history.clear(),this.cursorWrapper.isActive&&!n.storedMarks?.length&&this.cursorWrapper.cleanup();const s={steps:[],selectionBefore:t.selection,selectionAfter:n.selection,storedMarksAfter:n.storedMarks,metadata:{origin:"api",timestamp:Date.now()}},i=this.getDecorations?.(n,s)??Ge.empty;this.reconcileAndSync(t,n,i);for(const e of this.stateChangeCallbacks)e(t,n,s);this.navigation.resetAfterUpdate()}finally{this.isUpdating=!1}}}syncSelection(){this.events.syncSelectionFromDOM()}reconcileAndSync(e,t,n,s){const i=this.decorations;this.decorations=n,ys(this.contentElement,e,t,{...this.reconcileOptions(e.selection),decorations:n,oldDecorations:i,compositionBlockId:this.compositionState.isComposing?this.compositionState.activeBlockId??void 0:void 0}),this.compositionState.isComposing||s||ce(this.contentElement,t.selection)}reconcileOptions(e){const t=x(this.state.selection)?this.state.selection.nodeId:void 0,n=e&&x(e)?e.nodeId:void 0;return{registry:this.schemaRegistry,nodeViewRegistry:this.nodeViewRegistry,nodeViews:this.nodeViews,getState:()=>this.state,dispatch:e=>this.dispatch(e),selectedNodeId:t,previousSelectedNodeId:n}}destroy(){this.cursorWrapper.cleanup(),this.events.destroy(),this.navigation.destroy();for(const e of this.nodeViews.values())e.destroy?.();this.nodeViews.clear()}},vs={ariaLabel:"Rich text editor",ariaDescription:"Press Escape to exit the editor",defaultPlaceholder:"Start typing..."},bs=/* @__PURE__ */Object.assign({"./locales/ar.ts":()=>import("./ar-BxVbBvSa.mjs"),"./locales/de.ts":()=>import("./de-DwX1CDNO.mjs"),"./locales/es.ts":()=>import("./es-BXFflrrU.mjs"),"./locales/fr.ts":()=>import("./fr-BC1Rfp9S.mjs"),"./locales/hi.ts":()=>import("./hi-BFko34WG.mjs"),"./locales/pt.ts":()=>import("./pt--57Ug7ig.mjs"),"./locales/ru.ts":()=>import("./ru-CJFtr1Ks.mjs"),"./locales/zh.ts":()=>import("./zh-BfYi8wB2.mjs")}),Rs=["\n:host {\n\tdisplay: block;\n\tfont-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n\tfont-size: 16px;\n\tline-height: 1.6;\n\tcolor: var(--notectl-fg);\n}\n\n.notectl-editor {\n\tdisplay: flex;\n\tflex-direction: column;\n\tborder: 1px solid var(--notectl-border);\n\tborder-radius: var(--notectl-border-radius, 6px);\n\toverflow: hidden;\n\tbackground: var(--notectl-bg);\n\t/* Fill any explicit host height so embedders can size <notectl-editor>\n\t (e.g. height: 500px) and have the toolbar/content/footer fit inside.\n\t border-box keeps the 1px border within the host's height; min-height: 0\n\t lets the flex content shrink below its intrinsic size so internal\n\t scrolling can engage. */\n\tbox-sizing: border-box;\n\theight: 100%;\n\tmin-height: 0;\n}\n\n.notectl-editor:focus-within {\n\tborder-color: var(--notectl-border-focus);\n\tbox-shadow: 0 0 0 2px var(--notectl-focus-ring);\n}\n\n/* Content Area */\n.notectl-content {\n\tflex: 1;\n\tpadding: 12px 16px;\n\toutline: none;\n\tmin-height: var(--notectl-content-min-height, 400px);\n\tmax-height: var(--notectl-content-max-height, none);\n\toverflow-y: auto;\n\tcursor: text;\n\tposition: relative;\n\twhite-space: pre-wrap;\n\tword-wrap: break-word;\n\t-webkit-user-select: text;\n\tuser-select: text;\n\t-moz-tab-size: 4;\n\ttab-size: 4;\n}\n\n.notectl-content p {\n\tmargin: 0;\n\tpadding: 2px 0;\n\tmin-height: 1.6em;\n}\n\n.notectl-content p + p {\n\tmargin-top: 0;\n}\n\n/* Horizontal Rule */\n.notectl-content hr {\n\tborder: none;\n\tborder-top: 1px solid var(--notectl-border);\n\tmargin: 8px 0;\n\tpadding: 0;\n\tcursor: default;\n\tuser-select: none;\n}\n\n/* Placeholder */\n.notectl-content.notectl-content--empty::before {\n\tcontent: attr(data-placeholder);\n\tcolor: var(--notectl-fg-muted);\n\tpointer-events: none;\n\tposition: absolute;\n\ttop: 12px;\n\tinset-inline-start: 16px;\n}\n\n/* Plugin container bottom */\n.notectl-plugin-container--bottom {\n\tborder-top: 1px solid var(--notectl-border);\n\tflex-shrink: 0;\n}\n\n/* Screen reader announcements */\n.notectl-sr-only {\n\tposition: absolute;\n\twidth: 1px;\n\theight: 1px;\n\tmargin: -1px;\n\tpadding: 0;\n\toverflow: hidden;\n\tclip: rect(0, 0, 0, 0);\n\twhite-space: nowrap;\n\tborder: 0;\n}\n\n/* Node selection */\n.notectl-node-selected {\n\toutline: 2px solid var(--notectl-primary);\n\toutline-offset: 2px;\n}\n","\n@media (prefers-reduced-motion: reduce) {\n\t.notectl-toolbar-btn,\n\t.notectl-image__resize-handle,\n\t.notectl-image__size-indicator,\n\t.notectl-color-picker__swatch,\n\t.notectl-font-picker__item,\n\t.notectl-heading-picker__item,\n\t.notectl-font-size-picker__item,\n\t.ntbl-handle,\n\t.ntbl-handle-delete,\n\t.ntbl-insert-line,\n\t.ntbl-insert-btn,\n\t.ntbl-add-zone,\n\t.ntbl-add-icon,\n\t.ntbl-col-bar,\n\t.ntbl-row-bar,\n\t.ntbl-delete-table-btn,\n\t.notectl-code-block__copy {\n\t\ttransition: none !important;\n\t}\n}\n",'\n/* Paper viewport: scroll container with centered gray background */\n.notectl-paper-viewport {\n\tflex: 1;\n\toverflow-y: auto;\n\toverflow-x: hidden;\n\tbackground: var(--notectl-paper-viewport-bg, #e8e8e8);\n\tpadding: 24px 0;\n}\n\n/* Paper surface: white page with shadow, centered */\n.notectl-paper-surface {\n\tmargin: 0 auto;\n\tbackground: var(--notectl-bg);\n\tborder-radius: 2px;\n\tbox-shadow: 0 2px 8px var(--notectl-shadow, rgba(0, 0, 0, 0.15));\n\ttransform-origin: top center;\n\ttransition: transform 0.15s ease-out;\n}\n\n/* Content overrides in paper mode: wider document margins */\n.notectl-editor[data-paper-mode] .notectl-content {\n\tflex: none;\n\tpadding: 48px 56px;\n\tmin-height: auto;\n}\n\n/* Placeholder position override for paper mode */\n.notectl-editor[data-paper-mode] .notectl-content.notectl-content--empty::before {\n\ttop: 48px;\n\tinset-inline-start: 56px;\n}\n\n/* Dark mode: darker viewport background */\n:host([theme="dark"]) .notectl-paper-viewport {\n\t--notectl-paper-viewport-bg: #181825;\n}\n\n@media (prefers-reduced-motion: reduce) {\n\t.notectl-paper-surface {\n\t\ttransition: none !important;\n\t}\n}\n'].join("\n"),Cs=null,Is=class{themeStyleSheet=new CSSStyleSheet;systemThemeQuery=null;systemThemeHandler=null;pluginSheets=[];runtimeSheets=[];shadow;constructor(e){this.shadow=e}apply(e){if(this.cleanupSystemThemeListener(),e===tt.System){this.setupSystemThemeListener();const e=Ye(this.getSystemTheme());this.setThemeStyleSheet(e)}else this.setThemeStyleSheet(Ye(e))}setPluginStyleSheets(e){this.pluginSheets=e,this.refreshAdoptedStyleSheets()}setRuntimeStyleSheets(e){this.runtimeSheets=e,this.refreshAdoptedStyleSheets()}destroy(){this.cleanupSystemThemeListener()}setThemeStyleSheet(e){this.themeStyleSheet.replaceSync(et(e)),this.refreshAdoptedStyleSheets()}refreshAdoptedStyleSheets(){this.shadow.adoptedStyleSheets=[this.themeStyleSheet,(Cs||(Cs=new CSSStyleSheet).replaceSync(Rs),Cs),...this.pluginSheets,...this.runtimeSheets]}setupSystemThemeListener(){this.systemThemeQuery=window.matchMedia("(prefers-color-scheme: dark)"),this.systemThemeHandler=e=>{const t=Ye(this.getSystemTheme());this.setThemeStyleSheet(t)},this.systemThemeQuery.addEventListener("change",this.systemThemeHandler)}cleanupSystemThemeListener(){this.systemThemeQuery&&this.systemThemeHandler&&this.systemThemeQuery.removeEventListener("change",this.systemThemeHandler),this.systemThemeQuery=null,this.systemThemeHandler=null}getSystemTheme(){return(this.systemThemeQuery??window.matchMedia("(prefers-color-scheme: dark)")).matches?tt.Dark:tt.Light}},xs=class{wrapper;content;viewport=null;surface=null;viewportObserver=null;surfaceObserver=null;currentSize=null;currentPaperWidthPx=0;currentPaperHeightPx=0;currentScale=1;compensationFrameId=null;constructor(e,t){this.wrapper=e,this.content=t}apply(e){if(null===e)return void this.disable();const t=st(e);this.currentPaperWidthPx=t.widthPx,this.currentPaperHeightPx=t.heightPx,this.currentSize=e,this.viewport||this.enable(),this.updateSurfaceDimensions(),this.wrapper.setAttribute("data-paper-mode",e)}destroy(){this.disable()}getPaperSize(){return this.currentSize}enable(){this.viewport=document.createElement("div"),this.viewport.className="notectl-paper-viewport",this.surface=document.createElement("div"),this.surface.className="notectl-paper-surface",this.wrapper.removeChild(this.content),this.surface.appendChild(this.content),this.viewport.appendChild(this.surface);const e=this.wrapper.querySelector(".notectl-plugin-container--bottom");e?this.wrapper.insertBefore(this.viewport,e):this.wrapper.appendChild(this.viewport),this.viewportObserver=new ResizeObserver(e=>{for(const t of e)this.onViewportResize(t.contentRect.width)}),this.viewportObserver.observe(this.viewport),this.surfaceObserver=new ResizeObserver(e=>{for(const t of e)this.onSurfaceResize(t.contentRect.height)}),this.surfaceObserver.observe(this.surface)}disable(){if(null!==this.compensationFrameId&&(cancelAnimationFrame(this.compensationFrameId),this.compensationFrameId=null),this.viewportObserver?.disconnect(),this.viewportObserver=null,this.surfaceObserver?.disconnect(),this.surfaceObserver=null,this.viewport&&this.surface){this.surface.removeChild(this.content);const e=this.wrapper.querySelector(".notectl-plugin-container--bottom");e?this.wrapper.insertBefore(this.content,e):this.wrapper.appendChild(this.content),this.wrapper.removeChild(this.viewport)}this.viewport=null,this.surface=null,this.currentSize=null,this.currentPaperWidthPx=0,this.currentPaperHeightPx=0,this.currentScale=1,this.wrapper.removeAttribute("data-paper-mode")}updateSurfaceDimensions(){this.surface&&(Ue(this.surface,"width",`${this.currentPaperWidthPx}px`),Ue(this.surface,"minHeight",`${this.currentPaperHeightPx}px`))}onViewportResize(e){if(!this.surface||0===this.currentPaperWidthPx)return;const t=e-48,n=Math.min(1,t/this.currentPaperWidthPx);this.currentScale=n,Ue(this.surface,"transform",n<1?`scale(${n})`:""),this.scheduleHeightCompensation(n)}onSurfaceResize(e){this.surface&&this.viewport&&this.scheduleHeightCompensation(this.currentScale)}scheduleHeightCompensation(e){null!==this.compensationFrameId&&cancelAnimationFrame(this.compensationFrameId),this.compensationFrameId=requestAnimationFrame(()=>{this.compensationFrameId=null,this.updateHeightCompensation(e)})}updateHeightCompensation(e){if(!this.surface)return;if(e>=1)return void Ue(this.surface,"marginBottom","");const t=this.surface.scrollHeight,n=t*e-t;Ue(this.surface,"marginBottom",`${n}px`)}};function Ts(e){return!Array.isArray(e)}var Ps=class{cfg;themeController=null;domElements=null;paperLayout=null;pluginManager=null;inputManager=null;view=null;cleanedUp=!1;constructor(e){this.deps=e,this.cfg=e.config}async run(){try{if(this.setupTheme(),this.isCancelled())return this.abort();const e=await async function(e){const t=new ct(e.locale??"browser").getLocale();return"en"===t?vs:await async function(e){return lt(bs,e,vs)}(t)}(this.cfg);if(this.isCancelled())return this.abort();if(this.setupDOM(e),this.setupPlugins(),await this.initPluginsAndView(),this.isCancelled()||!this.view||!this.inputManager||!this.pluginManager||!this.domElements||!this.themeController)return this.abort();const t=this.view,n=this.inputManager,s=this.pluginManager,i=this.domElements,r=this.themeController;return this.finalizeSetup(s,i),{view:t,inputManager:n,pluginManager:s,domElements:i,themeController:r,paperLayout:this.paperLayout,release:()=>{this.view=null}}}catch(e){throw await this.cleanup(),e}}setupTheme(){this.themeController=new Is(this.deps.shadow),this.deps.styleCoordinator.setup(this.deps.shadow,this.cfg.styleNonce,this.themeController),this.themeController.apply(this.cfg.theme??tt.Light)}setupDOM(e){this.domElements=function(e){const t=e.locale??vs,n=t.defaultPlaceholder,s=document.createElement("div");s.className="notectl-editor";const i=document.createElement("div");i.className="notectl-plugin-container--top",i.setAttribute("data-notectl-no-print","");const r=document.createElement("div");r.className="notectl-content",r.contentEditable=e.readonly?"false":"true",r.setAttribute("role","textbox"),r.setAttribute("aria-multiline","true"),r.setAttribute("aria-label",t.ariaLabel),e.readonly&&r.setAttribute("aria-readonly","true"),r.setAttribute("aria-description",t.ariaDescription),r.setAttribute("data-default-placeholder",n),r.setAttribute("data-placeholder",e.placeholder??n),e.dir&&(s.setAttribute("dir",e.dir),r.setAttribute("dir",e.dir));const o=document.createElement("div");o.className="notectl-plugin-container--bottom",o.setAttribute("data-notectl-no-print","");const a=document.createElement("div");return a.className="notectl-sr-only",a.setAttribute("data-notectl-no-print",""),a.setAttribute("aria-live","polite"),a.setAttribute("aria-atomic","true"),s.appendChild(i),s.appendChild(r),s.appendChild(o),s.appendChild(a),{wrapper:s,content:r,topPluginContainer:i,bottomPluginContainer:o,announcer:a}}({readonly:this.cfg.readonly,placeholder:this.cfg.placeholder,dir:this.cfg.dir??this.deps.hostDir,locale:e}),this.deps.shadow.appendChild(this.domElements.wrapper),this.cfg.paperSize&&(this.paperLayout=new xs(this.domElements.wrapper,this.domElements.content),this.paperLayout.apply(this.cfg.paperSize))}setupPlugins(){if(this.domElements){this.pluginManager=new zn({logger:this.cfg.logger}),this.pluginManager.registerService(at,new ct(this.cfg.locale??"browser")),ft(this.pluginManager.schemaRegistry),function(e,t){if(!t)return;const n=Ts(t)?t.groups:t,s=Ts(t)?t.overflow:void 0,i=[];for(const o of n){const t=[];for(const n of o)t.push(n.id),e.register(n);i.push(t)}const r={groups:i,overflow:s};e.register(new Xe(r))}(this.pluginManager,this.cfg.toolbar);for(const e of this.cfg.plugins??[])this.pluginManager.register(e);for(const e of this.deps.preInitPlugins)this.pluginManager.register(e);e=this.pluginManager,t=this.cfg.features,function(e,t){if(void 0!==e.get("text-formatting"))return;const n={bold:t?.bold??!0,italic:t?.italic??!0,underline:t?.underline??!0};e.register(new dt(n))}(e,t),function(e){void 0===e.get("caret-navigation")&&e.register(new me)}(e),function(e){void 0===e.get("gap-cursor")&&e.register(new ht)}(e),this.domElements.content.addEventListener("focus",()=>this.deps.events.emit("focus",void 0)),this.domElements.content.addEventListener("blur",()=>this.deps.events.emit("blur",void 0))}var e,t}async initPluginsAndView(){if(!this.pluginManager||!this.domElements||!this.themeController)return;const e=this.domElements,t=this.pluginManager,n=this.themeController;await t.init({isCancelled:()=>this.isCancelled(),getState:()=>{if(!this.view)throw new Error("View not initialized");return this.view.getState()},dispatch:e=>this.dispatch(e),getContainer:()=>e.content,getPluginContainer:t=>"top"===t?e.topPluginContainer:e.bottomPluginContainer,announce:t=>{e.announcer&&(e.announcer.textContent=t)},hasAnnouncement:()=>!!e.announcer?.textContent,onBeforeReady:()=>this.createInputAndView(e,t,n)})}createInputAndView(e,t,n){if(this.isCancelled()||!this.pluginManager||!this.themeController)return;const s=W(t.schemaRegistry),i=Bt.create({schema:s});this.inputManager=new un(e.content,{getState:()=>{if(!this.view)throw new Error("View not initialized");return this.view.getState()},dispatch:e=>this.dispatch(e),syncSelection:()=>this.view?.syncSelection(),undo:()=>this.view?.undo(),redo:()=>this.view?.redo(),schemaRegistry:t.schemaRegistry,keymapRegistry:t.keymapRegistry,inputRuleRegistry:t.inputRuleRegistry,fileHandlerRegistry:t.fileHandlerRegistry,isReadOnly:()=>this.deps.configController.isReadOnly,getPasteInterceptors:()=>t.getPasteInterceptors(),getTextDirection:Te,navigateFromGapCursor:ae}),this.view=new ws(e.content,{state:i,schemaRegistry:t.schemaRegistry,keymapRegistry:t.keymapRegistry,fileHandlerRegistry:t.fileHandlerRegistry,nodeViewRegistry:t.nodeViewRegistry,maxHistoryDepth:this.cfg.maxHistoryDepth,getDecorations:(e,n)=>t.collectDecorations(e,n)??Ge.empty,onStateChange:(n,s,i)=>{!function(e,t,n,s,i,r){const o=s.announcer;if(o&&(o.textContent=""),i.notifyStateChange(e,t,n),Es(s.content,t.doc),r.emit("stateChange",{oldState:e,newState:t,transaction:n}),C(e.selection,t.selection)||r.emit("selectionChange",{selection:t.selection}),!o?.textContent){const s=function(e,t,n){if("undo"===n.metadata.historyDirection)return"Undo";if("redo"===n.metadata.historyDirection)return"Redo";for(const s of n.steps)if("setBlockType"===s.type)return Kn(s.nodeType,s.attrs);for(const s of t.schema.markTypes){const n=X(s),i=_(e,n),r=_(t,n);if(i!==r)return`${s} ${r?"on":"off"}`}return null}(e,t,n);s&&o&&(o.textContent=s)}}(n,s,i,e,t,this.deps.events)},isReadOnly:()=>this.deps.configController.isReadOnly,isReadonlyBypassed:()=>t.isReadonlyBypassed(),compositionState:this.inputManager.compositionTracker}),Es(e.content,this.view.getState().doc);const r=t.getPluginStyleSheets();r.length>0&&n.setPluginStyleSheets(r)}finalizeSetup(e,t){if(this.cfg.readonly&&e.setReadOnly(!0),e.onEvent(it,e=>{!e.options.paperSize&&this.deps.configController.getPaperSize()&&(e.options={...e.options,paperSize:this.deps.configController.getPaperSize()})}),this.cfg.autofocus){const e=t.content;requestAnimationFrame(()=>e.focus())}}dispatch(e){this.view&&this.pluginManager&&this.pluginManager.dispatchWithMiddleware(e,this.view.getState(),e=>this.view?.dispatch(e))}isCancelled(){return this.deps.isCancelled?.()??!1}async abort(){return await this.cleanup(),null}async cleanup(){if(this.cleanedUp)return;this.cleanedUp=!0;const e=this.view;this.view=null,this.paperLayout?.destroy(),this.paperLayout=null,this.deps.styleCoordinator.teardown(this.deps.shadow,this.themeController),this.themeController?.destroy(),this.themeController=null,this.inputManager?.destroy(),this.inputManager=null,e?.destroy();const t=this.pluginManager;this.pluginManager=null,await(t?.destroy()),this.domElements?.wrapper.remove(),this.domElements=null}};function Es(e,t){e.classList.toggle("notectl-content--empty",Jn(t))}var Ms=class{state="idle";readyPromiseResolve=null;readyPromiseReject=null;readyPromise;preInitPlugins=[];constructor(){this.readyPromise=this.createReadyPromise()}isInitialized(){return"initializing"===this.state||"ready"===this.state}markInitialized(){return"initializing"!==this.state&&"ready"!==this.state&&("failed"===this.state&&(this.readyPromise=this.createReadyPromise()),this.state="initializing",!0)}whenReady(){return this.readyPromise}resolveReady(){"initializing"===this.state&&(this.state="ready",this.readyPromiseResolve?.(),this.readyPromiseResolve=null,this.readyPromiseReject=null)}failReady(e){"initializing"===this.state&&(this.state="failed",this.readyPromiseReject?.(e),this.readyPromiseResolve=null,this.readyPromiseReject=null)}registerPreInitPlugin(e){if("initializing"===this.state||"ready"===this.state)throw new Error("Cannot register plugins after initialization. Register before calling init() or adding to DOM.");this.preInitPlugins.push(e)}consumePreInitPlugins(){const e=this.preInitPlugins;return this.preInitPlugins=[],e}restorePreInitPlugins(e){0!==e.length&&(this.preInitPlugins=[...e,...this.preInitPlugins])}reset(){this.state="idle",this.preInitPlugins=[],this.readyPromise=this.createReadyPromise()}createReadyPromise(){const e=new Promise((e,t)=>{this.readyPromiseResolve=e,this.readyPromiseReject=t});return e.catch(()=>{}),e}},As=class{runtimeStyleSheet=null;setup(e,t,n){Ve(e),this.runtimeStyleSheet=je(),n?.setRuntimeStyleSheets(this.runtimeStyleSheet?[this.runtimeStyleSheet]:[]),$e(e,{nonce:t,sheet:this.runtimeStyleSheet})}teardown(e,t){e&&Ve(e),this.runtimeStyleSheet=null,t?.setRuntimeStyleSheets([])}},Ns=class extends HTMLElement{view=null;inputManager=null;pluginManager=null;domElements=null;configController=new Xn;events=new Yn;lifecycle=new Ms;styleCoordinator=new As;themeController=null;paperLayout=null;pendingInitPromise=null;cancelPendingInit=null;autoInitToken=0;autoInitQueued=!1;initVersion=0;releaseInit=null;constructor(){super(),this.attachShadow({mode:"open"})}static get observedAttributes(){return["placeholder","readonly","theme","paper-size","dir"]}connectedCallback(){this.lifecycle.isInitialized()||this.scheduleAutoInit()}disconnectedCallback(){setTimeout(()=>{this.isConnected||this.destroy()},0)}attributeChangedCallback(e,t,n){this.configController.applyAttribute(e,n,this.getConfigDeps())}registerPlugin(e){this.lifecycle.registerPreInitPlugin(e)}async init(e){if(this.cancelAutoInit(),!this.lifecycle.markInitialized())return;e&&this.configController.setConfig(e);const t=this.shadowRoot;if(!t){const e=/* @__PURE__ */new Error("Editor shadow root not available.");throw this.lifecycle.failReady(e),e}const n=++this.initVersion;let s=!1;this.cancelPendingInit=()=>{s=!0};const i=this.lifecycle.consumePreInitPlugins(),r=async function(e){return new Ps(e).run()}({shadow:t,config:this.configController.getConfig(),hostDir:this.getAttribute("dir")??void 0,configController:this.configController,styleCoordinator:this.styleCoordinator,events:this.events,preInitPlugins:i,isCancelled:()=>s||n!==this.initVersion});this.pendingInitPromise=r;try{const e=await r;if(!e){if(s||n!==this.initVersion)return;throw new Error("Editor initialization completed without a result.")}if(n!==this.initVersion)return;this.view=e.view,this.inputManager=e.inputManager,this.pluginManager=e.pluginManager,this.domElements=e.domElements,this.themeController=e.themeController,this.paperLayout=e.paperLayout,this.releaseInit=e.release,this.lifecycle.resolveReady(),this.events.emit("ready",void 0)}catch(o){throw n===this.initVersion&&(this.lifecycle.restorePreInitPlugins(i),this.lifecycle.failReady(o)),o}finally{this.pendingInitPromise===r&&(this.pendingInitPromise=null,this.cancelPendingInit=null)}}get isReadOnly(){return this.configController.isReadOnly}getJSON(){if(!this.view)throw new Error("Editor not initialized");return this.view.getState().doc}setJSON(e){this.assertInitialized(),Wn(e,this.pluginManager?.schemaRegistry,e=>this.replaceState(e))}async getContentHTML(e){if(!this.view)throw new Error("Editor not initialized");return function(e,t,n){const s=e.doc;if("classes"===n?.cssMode){const e=Ee(s,t);return n.pretty?{html:ne(e.html),css:e.css,styleMap:e.styleMap}:e}const i=Pe(s,t);return n?.pretty?ne(i):i}(this.view.getState(),this.pluginManager?.schemaRegistry,e)}async setContentHTML(e,t){return this.assertInitialized(),function(e,t,n,s){Wn(Ne(e,t,s),t,n)}(e,this.pluginManager?.schemaRegistry,e=>this.replaceState(e),t)}getText(){if(!this.view)throw new Error("Editor not initialized");return Qn(this.view.getState())}setText(e){this.assertInitialized(),this.view&&function(e,t,n,s){if(e===Qn(t))return;const i=e.split("\n"),r=t.doc.children.map(e=>e.id),o=i.map((e,t)=>g(J("paragraph"),[m(e)],r[t])),a=n?W(n):void 0;s(Bt.create({doc:{children:o},schema:a}))}(e,this.view.getState(),this.pluginManager?.schemaRegistry,e=>this.replaceState(e))}isEmpty(){return!this.view||Jn(this.view.getState().doc)}commands={toggleBold:()=>this.executeCommand("toggleBold"),toggleItalic:()=>this.executeCommand("toggleItalic"),toggleUnderline:()=>this.executeCommand("toggleUnderline"),undo:()=>{this.configController.isReadOnly||this.view?.undo()},redo:()=>{this.configController.isReadOnly||this.view?.redo()},selectAll:()=>{if(!this.view)return;const e=K(this.view.getState());this.dispatch(e)}};can(){const e=this.view?.getState().schema,t=this.configController.isReadOnly;return{toggleBold:()=>!t&&!!e&&N(e,"bold"),toggleItalic:()=>!t&&!!e&&N(e,"italic"),toggleUnderline:()=>!t&&!!e&&N(e,"underline"),undo:()=>!t&&(this.view?.history.canUndo()??!1),redo:()=>!t&&(this.view?.history.canRedo()??!1),selectAll:()=>this.canExecuteCommand("selectAll")}}canExecuteCommand(e){return this.pluginManager?.canExecuteCommand(e)??!1}executeCommand(e){return this.pluginManager?.executeCommand(e)??!1}configurePlugin(e,t){this.pluginManager?.configurePlugin(e,t)}getService(e){return this.pluginManager?.getService(e)}onPluginEvent(e,t){return this.pluginManager?.onEvent(e,t)??(()=>{})}getState(){if(!this.view)throw new Error("Editor not initialized");return this.view.getState()}dispatch(e){this.view&&this.pluginManager&&this.pluginManager.dispatchWithMiddleware(e,this.view.getState(),e=>this.view?.dispatch(e))}on(e,t){this.events.on(e,t)}off(e,t){this.events.off(e,t)}whenReady(){return this.lifecycle.whenReady()}configure(e){this.configController.applyRuntimeConfig(e,this.getConfigDeps())}setTheme(e){this.configController.applyTheme(e,this.themeController)}getTheme(){return this.configController.getTheme()}getPaperSize(){return this.configController.getPaperSize()}destroy(){this.cancelAutoInit(),this.initVersion++,this.cancelPendingInit?.(),this.cancelPendingInit=null;const e=this.pendingInitPromise?.then(()=>{},()=>{})??Promise.resolve();this.pendingInitPromise=null,this.releaseInit?.(),this.releaseInit=null,this.paperLayout?.destroy(),this.paperLayout=null,this.styleCoordinator.teardown(this.shadowRoot,this.themeController),this.themeController?.destroy(),this.themeController=null,this.inputManager?.destroy(),this.inputManager=null,this.view?.destroy();const t=this.pluginManager?.destroy()??Promise.resolve();return this.view=null,this.pluginManager=null,this.lifecycle.reset(),this.events.clear(),this.domElements?.wrapper.remove(),this.domElements=null,Promise.all([t,e]).then(()=>{})}getConfigDeps(){return{contentElement:this.domElements?.content??null,editorWrapper:this.domElements?.wrapper??null,pluginManager:this.pluginManager,themeController:this.themeController,applyPaperSize:e=>this.applyPaperSize(e)}}scheduleAutoInit(){const e=++this.autoInitToken;this.autoInitQueued=!0,queueMicrotask(()=>{this.isConnected&&this.autoInitQueued&&this.autoInitToken===e&&(this.autoInitQueued=!1,this.lifecycle.isInitialized()||this.init().catch(()=>{}))})}cancelAutoInit(){this.autoInitToken++,this.autoInitQueued=!1}applyPaperSize(e){this.domElements&&(e?(this.paperLayout||(this.paperLayout=new xs(this.domElements.wrapper,this.domElements.content)),this.paperLayout.apply(e)):this.paperLayout?.apply(null))}replaceState(e){this.view&&this.view.replaceState(e)}assertInitialized(){if(!this.view)throw new Error("Editor not initialized")}};async function Bs(e){const t=document.createElement("notectl-editor");return await t.init(e),t}"undefined"==typeof customElements||customElements.get("notectl-editor")||customElements.define("notectl-editor",Ns);export{xt as A,Ft as C,Nt as D,Bt as E,gt as M,mt as N,Et as O,ut as P,$t as S,zt as T,mn as _,qn as a,Ut as b,_n as c,Rn as d,In as f,fn as g,kn as h,$n as i,ft as j,At as k,zn as l,bn as m,Bs as n,Vn as o,Cn as p,Un as r,Kn as s,Ns as t,xn as u,gn as v,_t as w,jt as x,un as y};
2
- //# sourceMappingURL=src-CNK6vpUU.mjs.map