@mx-space/cli 0.15.0 → 0.15.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 (615) hide show
  1. package/README.md +1 -1
  2. package/dist/{Lexical.dev-Cck4n26y.mjs → Lexical.dev-BSvx45_E.mjs} +127 -94
  3. package/dist/{Lexical.node-D6wf2D5M.mjs → Lexical.node-kAh5GM2n.mjs} +1 -1
  4. package/dist/{Lexical.prod-DCwS1oTq.mjs → Lexical.prod-Bqwgb3ez.mjs} +4 -2
  5. package/dist/{LexicalClipboard.dev-CMkPHV7O.mjs → LexicalClipboard.dev-BWU3KXIa.mjs} +18 -14
  6. package/dist/{LexicalClipboard.node-m4nZ7IYw.mjs → LexicalClipboard.node-BygAdNdF.mjs} +1 -1
  7. package/dist/{LexicalClipboard.prod-B_rN1vE1.mjs → LexicalClipboard.prod-BtMuKNyT.mjs} +10 -10
  8. package/dist/{LexicalCodeCore.dev-DyJw3i8V.mjs → LexicalCodeCore.dev-CD2xgvDs.mjs} +43 -25
  9. package/dist/{LexicalCodeCore.prod-DPXLHQLF.mjs → LexicalCodeCore.prod-Bl6FFMc7.mjs} +6 -6
  10. package/dist/{LexicalDragon.dev-ZkNfMwrE.mjs → LexicalDragon.dev-BwdYhm4K.mjs} +2 -2
  11. package/dist/{LexicalDragon.node-Ds9oLUFh.mjs → LexicalDragon.node-CpJhkCVV.mjs} +1 -1
  12. package/dist/{LexicalDragon.prod-B58ic2av.mjs → LexicalDragon.prod-CvXmWwo1.mjs} +2 -2
  13. package/dist/{LexicalExtension.dev-DvwHs1Xv.mjs → LexicalExtension.dev-LcRLXI5Z.mjs} +25 -13
  14. package/dist/{LexicalExtension.node-5OymZQfy.mjs → LexicalExtension.node-BwJt2LXV.mjs} +1 -1
  15. package/dist/{LexicalExtension.prod-Ce0T5smQ.mjs → LexicalExtension.prod-lg8_33-H.mjs} +16 -13
  16. package/dist/{LexicalHeadless.dev-DA0WldSR.mjs → LexicalHeadless.dev-BeUbKBes.mjs} +1 -1
  17. package/dist/{LexicalHeadless.prod-1kQgKB6c.mjs → LexicalHeadless.prod-4gbIA8HM.mjs} +1 -1
  18. package/dist/{LexicalHtml.dev-BDB7CUrx.mjs → LexicalHtml.dev-BLdZWTCJ.mjs} +20 -14
  19. package/dist/{LexicalHtml.node-DpVNt7It.mjs → LexicalHtml.node-BeuJMvvt.mjs} +1 -1
  20. package/dist/{LexicalHtml.prod-HkxM5scw.mjs → LexicalHtml.prod-CHUyCocN.mjs} +4 -4
  21. package/dist/{LexicalLink.dev-C5zNJlrm.mjs → LexicalLink.dev-DgsFRqw0.mjs} +28 -21
  22. package/dist/{LexicalLink.prod-Bkt9hQAt.mjs → LexicalLink.prod-CkXkeKY2.mjs} +6 -5
  23. package/dist/{LexicalList.dev-B7VgME-m.mjs → LexicalList.dev-OOms3kQi.mjs} +4 -4
  24. package/dist/{LexicalList.prod-B8c7TDjH.mjs → LexicalList.prod-DzMBeqHn.mjs} +4 -4
  25. package/dist/{LexicalMarkdown.dev-B5z9kLbV.mjs → LexicalMarkdown.dev-DJLKbZtD.mjs} +40 -29
  26. package/dist/{LexicalMarkdown.prod-wKzw7FFH.mjs → LexicalMarkdown.prod-Cp21kDCU.mjs} +10 -7
  27. package/dist/{LexicalRichText.dev-CUd6Li5F.mjs → LexicalRichText.dev-0rkAGjUf.mjs} +15 -11
  28. package/dist/{LexicalRichText.node-BKfaQ-CH.mjs → LexicalRichText.node-Cd-BySPE.mjs} +4 -4
  29. package/dist/{LexicalRichText.prod-SBewjJHx.mjs → LexicalRichText.prod-DTQiEr8C.mjs} +17 -11
  30. package/dist/{LexicalSelection.dev-D27JOCqj.mjs → LexicalSelection.dev-Bi0VlUEv.mjs} +28 -24
  31. package/dist/{LexicalSelection.node-DBEwPjBu.mjs → LexicalSelection.node-t2U46EF_.mjs} +1 -1
  32. package/dist/{LexicalSelection.prod-OaYhXHOL.mjs → LexicalSelection.prod-CrFG111g.mjs} +2 -2
  33. package/dist/{LexicalTable.dev-6IFFOAE0.mjs → LexicalTable.dev-D-sFhO-o.mjs} +33 -28
  34. package/dist/{LexicalTable.prod-2CaLZ7fH.mjs → LexicalTable.prod-DwYaa_dN.mjs} +10 -9
  35. package/dist/{LexicalUtils.dev-DJA7J_7v.mjs → LexicalUtils.dev-Q2q3-UDM.mjs} +8 -5
  36. package/dist/{LexicalUtils.node-Df9oPTlA.mjs → LexicalUtils.node-Dl7OvqJV.mjs} +1 -1
  37. package/dist/{LexicalUtils.prod-Bb7V4Ewg.mjs → LexicalUtils.prod-CBnq_iEV.mjs} +7 -6
  38. package/dist/bin/mxs.mjs +1 -1
  39. package/dist/esm-CNZ7kdTg.mjs +2 -0
  40. package/dist/{esm-DLzrv7gD.mjs → esm-ZXjJmLEC.mjs} +257 -260
  41. package/dist/index.mjs +1 -1
  42. package/dist/{mxs-BIRW5Axj.mjs → mxs-DC9zR3f2.mjs} +759 -539
  43. package/dist/{rolldown-runtime-JspESFgx.mjs → rolldown-runtime-B4iAMlE-.mjs} +1 -1
  44. package/dist/src/bin/mxs.d.ts +2 -0
  45. package/dist/src/bin/mxs.js +310 -0
  46. package/dist/src/cli/ai/_poll.d.ts +12 -0
  47. package/dist/src/cli/ai/_poll.js +38 -0
  48. package/dist/src/cli/ai/_resolve.d.ts +8 -0
  49. package/dist/src/cli/ai/_resolve.js +27 -0
  50. package/dist/src/cli/ai/index.d.ts +127 -0
  51. package/dist/src/cli/ai/index.js +46 -0
  52. package/dist/src/cli/ai/insights/by-article.d.ts +10 -0
  53. package/dist/src/cli/ai/insights/by-article.js +21 -0
  54. package/dist/src/cli/ai/insights/delete.d.ts +7 -0
  55. package/dist/src/cli/ai/insights/delete.js +18 -0
  56. package/dist/src/cli/ai/insights/edit.d.ts +8 -0
  57. package/dist/src/cli/ai/insights/edit.js +54 -0
  58. package/dist/src/cli/ai/insights/get.d.ts +6 -0
  59. package/dist/src/cli/ai/insights/get.js +11 -0
  60. package/dist/src/cli/ai/insights/index.d.ts +30 -0
  61. package/dist/src/cli/ai/insights/index.js +17 -0
  62. package/dist/src/cli/ai/insights/list.d.ts +10 -0
  63. package/dist/src/cli/ai/insights/list.js +20 -0
  64. package/dist/src/cli/ai/insights/refresh.d.ts +10 -0
  65. package/dist/src/cli/ai/insights/refresh.js +25 -0
  66. package/dist/src/cli/ai/insights/translate.d.ts +10 -0
  67. package/dist/src/cli/ai/insights/translate.js +25 -0
  68. package/dist/src/cli/ai/overview/by-article.d.ts +7 -0
  69. package/dist/src/cli/ai/overview/by-article.js +15 -0
  70. package/dist/src/cli/ai/overview/index.d.ts +11 -0
  71. package/dist/src/cli/ai/overview/index.js +4 -0
  72. package/dist/src/cli/ai/overview/list.d.ts +10 -0
  73. package/dist/src/cli/ai/overview/list.js +20 -0
  74. package/dist/src/cli/ai/summary/by-article.d.ts +10 -0
  75. package/dist/src/cli/ai/summary/by-article.js +21 -0
  76. package/dist/src/cli/ai/summary/delete.d.ts +7 -0
  77. package/dist/src/cli/ai/summary/delete.js +18 -0
  78. package/dist/src/cli/ai/summary/edit.d.ts +8 -0
  79. package/dist/src/cli/ai/summary/edit.js +54 -0
  80. package/dist/src/cli/ai/summary/get.d.ts +6 -0
  81. package/dist/src/cli/ai/summary/get.js +11 -0
  82. package/dist/src/cli/ai/summary/index.d.ts +30 -0
  83. package/dist/src/cli/ai/summary/index.js +9 -0
  84. package/dist/src/cli/ai/summary/list.d.ts +10 -0
  85. package/dist/src/cli/ai/summary/list.js +20 -0
  86. package/dist/src/cli/ai/summary/regen.d.ts +10 -0
  87. package/dist/src/cli/ai/summary/regen.js +25 -0
  88. package/dist/src/cli/ai/summary/translate.d.ts +10 -0
  89. package/dist/src/cli/ai/summary/translate.js +25 -0
  90. package/dist/src/cli/ai/translate/by-article.d.ts +9 -0
  91. package/dist/src/cli/ai/translate/by-article.js +19 -0
  92. package/dist/src/cli/ai/translate/delete.d.ts +7 -0
  93. package/dist/src/cli/ai/translate/delete.js +18 -0
  94. package/dist/src/cli/ai/translate/edit.d.ts +8 -0
  95. package/dist/src/cli/ai/translate/edit.js +97 -0
  96. package/dist/src/cli/ai/translate/entries/delete.d.ts +7 -0
  97. package/dist/src/cli/ai/translate/entries/delete.js +18 -0
  98. package/dist/src/cli/ai/translate/entries/edit.d.ts +8 -0
  99. package/dist/src/cli/ai/translate/entries/edit.js +73 -0
  100. package/dist/src/cli/ai/translate/entries/generate.d.ts +7 -0
  101. package/dist/src/cli/ai/translate/entries/generate.js +15 -0
  102. package/dist/src/cli/ai/translate/entries/index.d.ts +17 -0
  103. package/dist/src/cli/ai/translate/entries/index.js +6 -0
  104. package/dist/src/cli/ai/translate/entries/list.d.ts +10 -0
  105. package/dist/src/cli/ai/translate/entries/list.js +20 -0
  106. package/dist/src/cli/ai/translate/get.d.ts +6 -0
  107. package/dist/src/cli/ai/translate/get.js +11 -0
  108. package/dist/src/cli/ai/translate/index.d.ts +40 -0
  109. package/dist/src/cli/ai/translate/index.js +19 -0
  110. package/dist/src/cli/ai/translate/languages.d.ts +7 -0
  111. package/dist/src/cli/ai/translate/languages.js +15 -0
  112. package/dist/src/cli/ai/translate/list.d.ts +9 -0
  113. package/dist/src/cli/ai/translate/list.js +19 -0
  114. package/dist/src/cli/ai/translate/run.d.ts +10 -0
  115. package/dist/src/cli/ai/translate/run.js +31 -0
  116. package/dist/src/cli/ai/tts/by-article.d.ts +7 -0
  117. package/dist/src/cli/ai/tts/by-article.js +15 -0
  118. package/dist/src/cli/ai/tts/delete.d.ts +7 -0
  119. package/dist/src/cli/ai/tts/delete.js +18 -0
  120. package/dist/src/cli/ai/tts/index.d.ts +22 -0
  121. package/dist/src/cli/ai/tts/index.js +7 -0
  122. package/dist/src/cli/ai/tts/list.d.ts +10 -0
  123. package/dist/src/cli/ai/tts/list.js +20 -0
  124. package/dist/src/cli/ai/tts/run.d.ts +10 -0
  125. package/dist/src/cli/ai/tts/run.js +25 -0
  126. package/dist/src/cli/ai/tts/voices.d.ts +7 -0
  127. package/dist/src/cli/ai/tts/voices.js +12 -0
  128. package/dist/src/cli/ai/views.d.ts +3 -0
  129. package/dist/src/cli/ai/views.js +45 -0
  130. package/dist/src/cli/auth/index.d.ts +6 -0
  131. package/dist/src/cli/auth/index.js +22 -0
  132. package/dist/src/cli/auth/login.d.ts +11 -0
  133. package/dist/src/cli/auth/login.js +168 -0
  134. package/dist/src/cli/auth/logout.d.ts +6 -0
  135. package/dist/src/cli/auth/logout.js +21 -0
  136. package/dist/src/cli/auth/status.d.ts +4 -0
  137. package/dist/src/cli/auth/status.js +31 -0
  138. package/dist/src/cli/auth/view.d.ts +25 -0
  139. package/dist/src/cli/auth/view.js +46 -0
  140. package/dist/src/cli/auth/whoami.d.ts +7 -0
  141. package/dist/src/cli/auth/whoami.js +44 -0
  142. package/dist/src/cli/category/create.d.ts +10 -0
  143. package/dist/src/cli/category/create.js +24 -0
  144. package/dist/src/cli/category/delete.d.ts +8 -0
  145. package/dist/src/cli/category/delete.js +21 -0
  146. package/dist/src/cli/category/get.d.ts +6 -0
  147. package/dist/src/cli/category/get.js +11 -0
  148. package/dist/src/cli/category/index.d.ts +20 -0
  149. package/dist/src/cli/category/index.js +41 -0
  150. package/dist/src/cli/category/list.d.ts +4 -0
  151. package/dist/src/cli/category/list.js +10 -0
  152. package/dist/src/cli/category/update.d.ts +12 -0
  153. package/dist/src/cli/category/update.js +34 -0
  154. package/dist/src/cli/comment/_flags.d.ts +28 -0
  155. package/dist/src/cli/comment/_flags.js +48 -0
  156. package/dist/src/cli/comment/approve.d.ts +9 -0
  157. package/dist/src/cli/comment/approve.js +23 -0
  158. package/dist/src/cli/comment/delete.d.ts +9 -0
  159. package/dist/src/cli/comment/delete.js +24 -0
  160. package/dist/src/cli/comment/get.d.ts +6 -0
  161. package/dist/src/cli/comment/get.js +12 -0
  162. package/dist/src/cli/comment/index.d.ts +34 -0
  163. package/dist/src/cli/comment/index.js +53 -0
  164. package/dist/src/cli/comment/list.d.ts +9 -0
  165. package/dist/src/cli/comment/list.js +20 -0
  166. package/dist/src/cli/comment/reject.d.ts +9 -0
  167. package/dist/src/cli/comment/reject.js +23 -0
  168. package/dist/src/cli/comment/reply.d.ts +9 -0
  169. package/dist/src/cli/comment/reply.js +31 -0
  170. package/dist/src/cli/comment/unread.d.ts +7 -0
  171. package/dist/src/cli/comment/unread.js +21 -0
  172. package/dist/src/cli/comment/view.d.ts +3 -0
  173. package/dist/src/cli/comment/view.js +197 -0
  174. package/dist/src/cli/config/edit.d.ts +5 -0
  175. package/dist/src/cli/config/edit.js +36 -0
  176. package/dist/src/cli/config/get.d.ts +6 -0
  177. package/dist/src/cli/config/get.js +11 -0
  178. package/dist/src/cli/config/index.d.ts +10 -0
  179. package/dist/src/cli/config/index.js +22 -0
  180. package/dist/src/cli/config/list.d.ts +4 -0
  181. package/dist/src/cli/config/list.js +10 -0
  182. package/dist/src/cli/config/set.d.ts +9 -0
  183. package/dist/src/cli/config/set.js +48 -0
  184. package/dist/src/cli/draft/_shared.d.ts +27 -0
  185. package/dist/src/cli/draft/_shared.js +85 -0
  186. package/dist/src/cli/draft/create.d.ts +21 -0
  187. package/dist/src/cli/draft/create.js +34 -0
  188. package/dist/src/cli/draft/delete.d.ts +7 -0
  189. package/dist/src/cli/draft/delete.js +20 -0
  190. package/dist/src/cli/draft/get.d.ts +6 -0
  191. package/dist/src/cli/draft/get.js +11 -0
  192. package/dist/src/cli/draft/index.d.ts +54 -0
  193. package/dist/src/cli/draft/index.js +42 -0
  194. package/dist/src/cli/draft/list.d.ts +11 -0
  195. package/dist/src/cli/draft/list.js +23 -0
  196. package/dist/src/cli/draft/publish.d.ts +8 -0
  197. package/dist/src/cli/draft/publish.js +64 -0
  198. package/dist/src/cli/draft/update.d.ts +22 -0
  199. package/dist/src/cli/draft/update.js +29 -0
  200. package/dist/src/cli/file/_shared.d.ts +6 -0
  201. package/dist/src/cli/file/_shared.js +5 -0
  202. package/dist/src/cli/file/delete.d.ts +8 -0
  203. package/dist/src/cli/file/delete.js +21 -0
  204. package/dist/src/cli/file/index.d.ts +19 -0
  205. package/dist/src/cli/file/index.js +33 -0
  206. package/dist/src/cli/file/list.d.ts +6 -0
  207. package/dist/src/cli/file/list.js +11 -0
  208. package/dist/src/cli/file/rename.d.ts +8 -0
  209. package/dist/src/cli/file/rename.js +16 -0
  210. package/dist/src/cli/file/upload.d.ts +9 -0
  211. package/dist/src/cli/file/upload.js +32 -0
  212. package/dist/src/cli/help/index.d.ts +62 -0
  213. package/dist/src/cli/help/index.js +276 -0
  214. package/dist/src/cli/help/registry.d.ts +28 -0
  215. package/dist/src/cli/help/registry.js +29 -0
  216. package/dist/src/cli/note/_flags.d.ts +66 -0
  217. package/dist/src/cli/note/_flags.js +73 -0
  218. package/dist/src/cli/note/create.d.ts +23 -0
  219. package/dist/src/cli/note/create.js +25 -0
  220. package/dist/src/cli/note/delete.d.ts +8 -0
  221. package/dist/src/cli/note/delete.js +21 -0
  222. package/dist/src/cli/note/edit.d.ts +28 -0
  223. package/dist/src/cli/note/edit.js +114 -0
  224. package/dist/src/cli/note/get.d.ts +6 -0
  225. package/dist/src/cli/note/get.js +29 -0
  226. package/dist/src/cli/note/index.d.ts +77 -0
  227. package/dist/src/cli/note/index.js +63 -0
  228. package/dist/src/cli/note/list.d.ts +10 -0
  229. package/dist/src/cli/note/list.js +22 -0
  230. package/dist/src/cli/note/publish.d.ts +7 -0
  231. package/dist/src/cli/note/publish.js +17 -0
  232. package/dist/src/cli/note/unpublish.d.ts +7 -0
  233. package/dist/src/cli/note/unpublish.js +17 -0
  234. package/dist/src/cli/note/update.d.ts +25 -0
  235. package/dist/src/cli/note/update.js +36 -0
  236. package/dist/src/cli/note/view.d.ts +3 -0
  237. package/dist/src/cli/note/view.js +162 -0
  238. package/dist/src/cli/page/create.d.ts +41 -0
  239. package/dist/src/cli/page/create.js +56 -0
  240. package/dist/src/cli/page/delete.d.ts +7 -0
  241. package/dist/src/cli/page/delete.js +37 -0
  242. package/dist/src/cli/page/edit.d.ts +19 -0
  243. package/dist/src/cli/page/edit.js +117 -0
  244. package/dist/src/cli/page/get.d.ts +6 -0
  245. package/dist/src/cli/page/get.js +16 -0
  246. package/dist/src/cli/page/index.d.ts +44 -0
  247. package/dist/src/cli/page/index.js +38 -0
  248. package/dist/src/cli/page/list.d.ts +4 -0
  249. package/dist/src/cli/page/list.js +10 -0
  250. package/dist/src/cli/page/update.d.ts +16 -0
  251. package/dist/src/cli/page/update.js +48 -0
  252. package/dist/src/cli/page/view.d.ts +2 -0
  253. package/dist/src/cli/page/view.js +79 -0
  254. package/dist/src/cli/post/_flags.d.ts +66 -0
  255. package/dist/src/cli/post/_flags.js +96 -0
  256. package/dist/src/cli/post/apply.d.ts +7 -0
  257. package/dist/src/cli/post/apply.js +70 -0
  258. package/dist/src/cli/post/create.d.ts +21 -0
  259. package/dist/src/cli/post/create.js +24 -0
  260. package/dist/src/cli/post/delete.d.ts +8 -0
  261. package/dist/src/cli/post/delete.js +21 -0
  262. package/dist/src/cli/post/edit.d.ts +26 -0
  263. package/dist/src/cli/post/edit.js +115 -0
  264. package/dist/src/cli/post/get.d.ts +7 -0
  265. package/dist/src/cli/post/get.js +15 -0
  266. package/dist/src/cli/post/index.d.ts +91 -0
  267. package/dist/src/cli/post/index.js +73 -0
  268. package/dist/src/cli/post/list.d.ts +10 -0
  269. package/dist/src/cli/post/list.js +23 -0
  270. package/dist/src/cli/post/publish.d.ts +7 -0
  271. package/dist/src/cli/post/publish.js +17 -0
  272. package/dist/src/cli/post/stage.d.ts +23 -0
  273. package/dist/src/cli/post/stage.js +55 -0
  274. package/dist/src/cli/post/unpublish.d.ts +7 -0
  275. package/dist/src/cli/post/unpublish.js +17 -0
  276. package/dist/src/cli/post/update.d.ts +23 -0
  277. package/dist/src/cli/post/update.js +38 -0
  278. package/dist/src/cli/post/view.d.ts +3 -0
  279. package/dist/src/cli/post/view.js +150 -0
  280. package/dist/src/cli/preview/index.d.ts +13 -0
  281. package/dist/src/cli/preview/index.js +226 -0
  282. package/dist/src/cli/profile/index.d.ts +14 -0
  283. package/dist/src/cli/profile/index.js +36 -0
  284. package/dist/src/cli/profile/ls.d.ts +5 -0
  285. package/dist/src/cli/profile/ls.js +26 -0
  286. package/dist/src/cli/profile/mark.d.ts +9 -0
  287. package/dist/src/cli/profile/mark.js +23 -0
  288. package/dist/src/cli/profile/rm.d.ts +12 -0
  289. package/dist/src/cli/profile/rm.js +50 -0
  290. package/dist/src/cli/profile/show.d.ts +9 -0
  291. package/dist/src/cli/profile/show.js +40 -0
  292. package/dist/src/cli/profile/use.d.ts +6 -0
  293. package/dist/src/cli/profile/use.js +11 -0
  294. package/dist/src/cli/profile/view.d.ts +8 -0
  295. package/dist/src/cli/profile/view.js +21 -0
  296. package/dist/src/cli/project/_flags.d.ts +56 -0
  297. package/dist/src/cli/project/_flags.js +130 -0
  298. package/dist/src/cli/project/create.d.ts +17 -0
  299. package/dist/src/cli/project/create.js +25 -0
  300. package/dist/src/cli/project/delete.d.ts +8 -0
  301. package/dist/src/cli/project/delete.js +22 -0
  302. package/dist/src/cli/project/edit.d.ts +11 -0
  303. package/dist/src/cli/project/edit.js +61 -0
  304. package/dist/src/cli/project/get.d.ts +7 -0
  305. package/dist/src/cli/project/get.js +14 -0
  306. package/dist/src/cli/project/index.d.ts +43 -0
  307. package/dist/src/cli/project/index.js +52 -0
  308. package/dist/src/cli/project/list.d.ts +8 -0
  309. package/dist/src/cli/project/list.js +19 -0
  310. package/dist/src/cli/project/update.d.ts +18 -0
  311. package/dist/src/cli/project/update.js +24 -0
  312. package/dist/src/cli/project/view-cmd.d.ts +7 -0
  313. package/dist/src/cli/project/view-cmd.js +15 -0
  314. package/dist/src/cli/project/view.d.ts +3 -0
  315. package/dist/src/cli/project/view.js +102 -0
  316. package/dist/src/cli/render/codehighlight.d.ts +8 -0
  317. package/dist/src/cli/render/codehighlight.js +264 -0
  318. package/dist/src/cli/render/envelope.d.ts +7 -0
  319. package/dist/src/cli/render/envelope.js +23 -0
  320. package/dist/src/cli/render/frontmatter.d.ts +8 -0
  321. package/dist/src/cli/render/frontmatter.js +50 -0
  322. package/dist/src/cli/render/helpers.d.ts +2 -0
  323. package/dist/src/cli/render/helpers.js +11 -0
  324. package/dist/src/cli/render/index.d.ts +7 -0
  325. package/dist/src/cli/render/index.js +10 -0
  326. package/dist/src/cli/render/lexical/blocks.d.ts +19 -0
  327. package/dist/src/cli/render/lexical/blocks.js +208 -0
  328. package/dist/src/cli/render/lexical/code.d.ts +2 -0
  329. package/dist/src/cli/render/lexical/code.js +22 -0
  330. package/dist/src/cli/render/lexical/embeds.d.ts +6 -0
  331. package/dist/src/cli/render/lexical/embeds.js +51 -0
  332. package/dist/src/cli/render/lexical/index.d.ts +9 -0
  333. package/dist/src/cli/render/lexical/index.js +25 -0
  334. package/dist/src/cli/render/lexical/inlines.d.ts +17 -0
  335. package/dist/src/cli/render/lexical/inlines.js +76 -0
  336. package/dist/src/cli/render/lexical/parser.d.ts +10 -0
  337. package/dist/src/cli/render/lexical/parser.js +64 -0
  338. package/dist/src/cli/render/lexical/walker.d.ts +21 -0
  339. package/dist/src/cli/render/lexical/walker.js +51 -0
  340. package/dist/src/cli/render/markdown.d.ts +18 -0
  341. package/dist/src/cli/render/markdown.js +196 -0
  342. package/dist/src/cli/render/metadata-block.d.ts +14 -0
  343. package/dist/src/cli/render/metadata-block.js +50 -0
  344. package/dist/src/cli/skill/all.d.ts +4 -0
  345. package/dist/src/cli/skill/all.js +11 -0
  346. package/dist/src/cli/skill/get.d.ts +6 -0
  347. package/dist/src/cli/skill/get.js +12 -0
  348. package/dist/src/cli/skill/index.d.ts +10 -0
  349. package/dist/src/cli/skill/index.js +34 -0
  350. package/dist/src/cli/skill/list.d.ts +4 -0
  351. package/dist/src/cli/skill/list.js +11 -0
  352. package/dist/src/cli/skill/search.d.ts +6 -0
  353. package/dist/src/cli/skill/search.js +12 -0
  354. package/dist/src/cli/skill/views.d.ts +6 -0
  355. package/dist/src/cli/skill/views.js +90 -0
  356. package/dist/src/cli/snippet/_flags.d.ts +57 -0
  357. package/dist/src/cli/snippet/_flags.js +123 -0
  358. package/dist/src/cli/snippet/_resolve.d.ts +4 -0
  359. package/dist/src/cli/snippet/_resolve.js +32 -0
  360. package/dist/src/cli/snippet/_sync.d.ts +5 -0
  361. package/dist/src/cli/snippet/_sync.js +54 -0
  362. package/dist/src/cli/snippet/create.d.ts +19 -0
  363. package/dist/src/cli/snippet/create.js +35 -0
  364. package/dist/src/cli/snippet/delete.d.ts +8 -0
  365. package/dist/src/cli/snippet/delete.js +28 -0
  366. package/dist/src/cli/snippet/edit.d.ts +7 -0
  367. package/dist/src/cli/snippet/edit.js +29 -0
  368. package/dist/src/cli/snippet/get.d.ts +6 -0
  369. package/dist/src/cli/snippet/get.js +12 -0
  370. package/dist/src/cli/snippet/index.d.ts +43 -0
  371. package/dist/src/cli/snippet/index.js +58 -0
  372. package/dist/src/cli/snippet/list.d.ts +9 -0
  373. package/dist/src/cli/snippet/list.js +20 -0
  374. package/dist/src/cli/snippet/pull.d.ts +8 -0
  375. package/dist/src/cli/snippet/pull.js +33 -0
  376. package/dist/src/cli/snippet/push.d.ts +10 -0
  377. package/dist/src/cli/snippet/push.js +31 -0
  378. package/dist/src/cli/snippet/update.d.ts +8 -0
  379. package/dist/src/cli/snippet/update.js +16 -0
  380. package/dist/src/cli/topic/create.d.ts +10 -0
  381. package/dist/src/cli/topic/create.js +24 -0
  382. package/dist/src/cli/topic/delete.d.ts +7 -0
  383. package/dist/src/cli/topic/delete.js +37 -0
  384. package/dist/src/cli/topic/get.d.ts +6 -0
  385. package/dist/src/cli/topic/get.js +15 -0
  386. package/dist/src/cli/topic/index.d.ts +20 -0
  387. package/dist/src/cli/topic/index.js +32 -0
  388. package/dist/src/cli/topic/list.d.ts +4 -0
  389. package/dist/src/cli/topic/list.js +10 -0
  390. package/dist/src/cli/topic/update.d.ts +11 -0
  391. package/dist/src/cli/topic/update.js +51 -0
  392. package/dist/src/cli/ui/index.d.ts +24 -0
  393. package/dist/src/cli/ui/index.js +83 -0
  394. package/dist/src/cli/update/index.d.ts +10 -0
  395. package/dist/src/cli/update/index.js +142 -0
  396. package/dist/src/domain/admin-link.d.ts +12 -0
  397. package/dist/src/domain/admin-link.js +45 -0
  398. package/dist/src/domain/content-spec.d.ts +20 -0
  399. package/dist/src/domain/content-spec.js +78 -0
  400. package/dist/src/domain/envelope-compat.d.ts +68 -0
  401. package/dist/src/domain/envelope-compat.js +121 -0
  402. package/dist/src/domain/envelope.d.ts +34 -0
  403. package/dist/src/domain/envelope.js +355 -0
  404. package/dist/src/domain/errors.d.ts +336 -0
  405. package/dist/src/domain/errors.js +239 -0
  406. package/dist/src/domain/gate.d.ts +14 -0
  407. package/dist/src/domain/gate.js +18 -0
  408. package/dist/src/domain/payload.d.ts +64 -0
  409. package/dist/src/domain/payload.js +237 -0
  410. package/dist/src/domain/preflight-guards.d.ts +54 -0
  411. package/dist/src/domain/preflight-guards.js +130 -0
  412. package/dist/src/domain/runtime-flags.d.ts +33 -0
  413. package/dist/src/domain/runtime-flags.js +166 -0
  414. package/dist/src/domain/schema/api-envelope.d.ts +67 -0
  415. package/dist/src/domain/schema/api-envelope.js +65 -0
  416. package/dist/src/domain/schema/category.d.ts +23 -0
  417. package/dist/src/domain/schema/category.js +19 -0
  418. package/dist/src/domain/schema/config.d.ts +13 -0
  419. package/dist/src/domain/schema/config.js +18 -0
  420. package/dist/src/domain/schema/note.d.ts +76 -0
  421. package/dist/src/domain/schema/note.js +35 -0
  422. package/dist/src/domain/schema/page.d.ts +40 -0
  423. package/dist/src/domain/schema/page.js +22 -0
  424. package/dist/src/domain/schema/post.d.ts +68 -0
  425. package/dist/src/domain/schema/post.js +35 -0
  426. package/dist/src/domain/schema/profile.d.ts +14 -0
  427. package/dist/src/domain/schema/profile.js +22 -0
  428. package/dist/src/domain/schema/topic.d.ts +24 -0
  429. package/dist/src/domain/schema/topic.js +16 -0
  430. package/dist/src/domain/version.d.ts +15 -0
  431. package/dist/src/domain/version.js +43 -0
  432. package/dist/src/index.d.ts +4 -0
  433. package/dist/src/index.js +8 -0
  434. package/dist/src/layers/App.d.ts +30 -0
  435. package/dist/src/layers/App.js +39 -0
  436. package/dist/src/services/Ai/index.d.ts +13 -0
  437. package/dist/src/services/Ai/index.js +127 -0
  438. package/dist/src/services/Ai/overview.d.ts +7 -0
  439. package/dist/src/services/Ai/overview.js +11 -0
  440. package/dist/src/services/Ai/resources.d.ts +7 -0
  441. package/dist/src/services/Ai/resources.js +59 -0
  442. package/dist/src/services/Ai/shared.d.ts +2 -0
  443. package/dist/src/services/Ai/shared.js +11 -0
  444. package/dist/src/services/Ai/tasks.d.ts +8 -0
  445. package/dist/src/services/Ai/tasks.js +144 -0
  446. package/dist/src/services/Ai/types.d.ts +130 -0
  447. package/dist/src/services/Ai/types.js +1 -0
  448. package/dist/src/services/Api.d.ts +67 -0
  449. package/dist/src/services/Api.js +348 -0
  450. package/dist/src/services/Auth.d.ts +101 -0
  451. package/dist/src/services/Auth.js +402 -0
  452. package/dist/src/services/Backup.d.ts +8 -0
  453. package/dist/src/services/Backup.js +4 -0
  454. package/dist/src/services/Cache.d.ts +8 -0
  455. package/dist/src/services/Cache.js +4 -0
  456. package/dist/src/services/Comment.d.ts +48 -0
  457. package/dist/src/services/Comment.js +102 -0
  458. package/dist/src/services/Config.d.ts +95 -0
  459. package/dist/src/services/Config.js +359 -0
  460. package/dist/src/services/Editor.d.ts +28 -0
  461. package/dist/src/services/Editor.js +95 -0
  462. package/dist/src/services/Lexical.d.ts +27 -0
  463. package/dist/src/services/Lexical.js +56 -0
  464. package/dist/src/services/Migration.d.ts +31 -0
  465. package/dist/src/services/Migration.js +177 -0
  466. package/dist/src/services/Profile.d.ts +29 -0
  467. package/dist/src/services/Profile.js +115 -0
  468. package/dist/src/services/Renderer/content.d.ts +16 -0
  469. package/dist/src/services/Renderer/content.js +110 -0
  470. package/dist/src/services/Renderer/datetime.d.ts +38 -0
  471. package/dist/src/services/Renderer/datetime.js +147 -0
  472. package/dist/src/services/Renderer/errors.d.ts +3 -0
  473. package/dist/src/services/Renderer/errors.js +59 -0
  474. package/dist/src/services/Renderer/index.d.ts +13 -0
  475. package/dist/src/services/Renderer/index.js +11 -0
  476. package/dist/src/services/Renderer/lists.d.ts +1 -0
  477. package/dist/src/services/Renderer/lists.js +101 -0
  478. package/dist/src/services/Renderer/options.d.ts +10 -0
  479. package/dist/src/services/Renderer/options.js +13 -0
  480. package/dist/src/services/Renderer/primitives.d.ts +4 -0
  481. package/dist/src/services/Renderer/primitives.js +12 -0
  482. package/dist/src/services/Renderer/service.d.ts +35 -0
  483. package/dist/src/services/Renderer/service.js +123 -0
  484. package/dist/src/services/Renderer/view.d.ts +16 -0
  485. package/dist/src/services/Renderer/view.js +1 -0
  486. package/dist/src/services/Resolver.d.ts +47 -0
  487. package/dist/src/services/Resolver.js +269 -0
  488. package/dist/src/services/Skill.d.ts +29 -0
  489. package/dist/src/services/Skill.js +421 -0
  490. package/dist/src/services/UpdateNotifier.d.ts +162 -0
  491. package/dist/src/services/UpdateNotifier.js +572 -0
  492. package/dist/test/cli/ai/ai.test.d.ts +1 -0
  493. package/dist/test/cli/ai/ai.test.js +507 -0
  494. package/dist/test/cli/ai/verbs.test.d.ts +1 -0
  495. package/dist/test/cli/ai/verbs.test.js +235 -0
  496. package/dist/test/cli/auth/login.test.d.ts +1 -0
  497. package/dist/test/cli/auth/login.test.js +236 -0
  498. package/dist/test/cli/auth/logout-whoami.test.d.ts +1 -0
  499. package/dist/test/cli/auth/logout-whoami.test.js +124 -0
  500. package/dist/test/cli/auth/status.test.d.ts +1 -0
  501. package/dist/test/cli/auth/status.test.js +90 -0
  502. package/dist/test/cli/category/category.test.d.ts +1 -0
  503. package/dist/test/cli/category/category.test.js +175 -0
  504. package/dist/test/cli/comment/comment.test.d.ts +1 -0
  505. package/dist/test/cli/comment/comment.test.js +445 -0
  506. package/dist/test/cli/config/config.test.d.ts +1 -0
  507. package/dist/test/cli/config/config.test.js +281 -0
  508. package/dist/test/cli/edit-roundtrip.test.d.ts +1 -0
  509. package/dist/test/cli/edit-roundtrip.test.js +259 -0
  510. package/dist/test/cli/file/file.test.d.ts +1 -0
  511. package/dist/test/cli/file/file.test.js +185 -0
  512. package/dist/test/cli/help.test.d.ts +1 -0
  513. package/dist/test/cli/help.test.js +289 -0
  514. package/dist/test/cli/note/create.test.d.ts +1 -0
  515. package/dist/test/cli/note/create.test.js +155 -0
  516. package/dist/test/cli/note/list.test.d.ts +1 -0
  517. package/dist/test/cli/note/list.test.js +115 -0
  518. package/dist/test/cli/note/publish.test.d.ts +1 -0
  519. package/dist/test/cli/note/publish.test.js +123 -0
  520. package/dist/test/cli/page/page.test.d.ts +1 -0
  521. package/dist/test/cli/page/page.test.js +185 -0
  522. package/dist/test/cli/post/create.test.d.ts +1 -0
  523. package/dist/test/cli/post/create.test.js +172 -0
  524. package/dist/test/cli/post/list.test.d.ts +1 -0
  525. package/dist/test/cli/post/list.test.js +133 -0
  526. package/dist/test/cli/post/publish.test.d.ts +1 -0
  527. package/dist/test/cli/post/publish.test.js +139 -0
  528. package/dist/test/cli/post/stage-apply.test.d.ts +1 -0
  529. package/dist/test/cli/post/stage-apply.test.js +215 -0
  530. package/dist/test/cli/post/update.test.d.ts +1 -0
  531. package/dist/test/cli/post/update.test.js +160 -0
  532. package/dist/test/cli/post-note-crud.test.d.ts +1 -0
  533. package/dist/test/cli/post-note-crud.test.js +362 -0
  534. package/dist/test/cli/profile/ls.test.d.ts +1 -0
  535. package/dist/test/cli/profile/ls.test.js +93 -0
  536. package/dist/test/cli/profile/mark-use.test.d.ts +1 -0
  537. package/dist/test/cli/profile/mark-use.test.js +216 -0
  538. package/dist/test/cli/project-crud.test.d.ts +1 -0
  539. package/dist/test/cli/project-crud.test.js +315 -0
  540. package/dist/test/cli/render/lexical.test.d.ts +1 -0
  541. package/dist/test/cli/render/lexical.test.js +216 -0
  542. package/dist/test/cli/render/markdown.test.d.ts +1 -0
  543. package/dist/test/cli/render/markdown.test.js +39 -0
  544. package/dist/test/cli/snippet-crud.test.d.ts +1 -0
  545. package/dist/test/cli/snippet-crud.test.js +293 -0
  546. package/dist/test/cli/topic/topic.test.d.ts +1 -0
  547. package/dist/test/cli/topic/topic.test.js +181 -0
  548. package/dist/test/cli/update.test.d.ts +1 -0
  549. package/dist/test/cli/update.test.js +395 -0
  550. package/dist/test/domain/content-spec.test.d.ts +1 -0
  551. package/dist/test/domain/content-spec.test.js +126 -0
  552. package/dist/test/domain/envelope-compat.test.d.ts +1 -0
  553. package/dist/test/domain/envelope-compat.test.js +126 -0
  554. package/dist/test/domain/envelope.test.d.ts +1 -0
  555. package/dist/test/domain/envelope.test.js +149 -0
  556. package/dist/test/domain/errors.test.d.ts +1 -0
  557. package/dist/test/domain/errors.test.js +127 -0
  558. package/dist/test/domain/gate.test.d.ts +1 -0
  559. package/dist/test/domain/gate.test.js +128 -0
  560. package/dist/test/domain/payload.test.d.ts +1 -0
  561. package/dist/test/domain/payload.test.js +259 -0
  562. package/dist/test/helper/test-fs.d.ts +24 -0
  563. package/dist/test/helper/test-fs.js +161 -0
  564. package/dist/test/helper/test-http.d.ts +31 -0
  565. package/dist/test/helper/test-http.js +66 -0
  566. package/dist/test/integration/_helpers.d.ts +5 -0
  567. package/dist/test/integration/_helpers.js +24 -0
  568. package/dist/test/integration/cli-error-envelope.test.d.ts +1 -0
  569. package/dist/test/integration/cli-error-envelope.test.js +137 -0
  570. package/dist/test/integration/cli-help-render.test.d.ts +1 -0
  571. package/dist/test/integration/cli-help-render.test.js +149 -0
  572. package/dist/test/integration/cli-help.test.d.ts +1 -0
  573. package/dist/test/integration/cli-help.test.js +67 -0
  574. package/dist/test/integration/cli-post-list.test.d.ts +1 -0
  575. package/dist/test/integration/cli-post-list.test.js +140 -0
  576. package/dist/test/integration/cli-skill.test.d.ts +1 -0
  577. package/dist/test/integration/cli-skill.test.js +74 -0
  578. package/dist/test/integration/cli-version.test.d.ts +1 -0
  579. package/dist/test/integration/cli-version.test.js +37 -0
  580. package/dist/test/services/Api.test.d.ts +1 -0
  581. package/dist/test/services/Api.test.js +553 -0
  582. package/dist/test/services/Auth.test.d.ts +1 -0
  583. package/dist/test/services/Auth.test.js +650 -0
  584. package/dist/test/services/Config.test.d.ts +1 -0
  585. package/dist/test/services/Config.test.js +510 -0
  586. package/dist/test/services/Datetime.test.d.ts +1 -0
  587. package/dist/test/services/Datetime.test.js +113 -0
  588. package/dist/test/services/Editor.test.d.ts +1 -0
  589. package/dist/test/services/Editor.test.js +205 -0
  590. package/dist/test/services/Lexical.errors.test.d.ts +1 -0
  591. package/dist/test/services/Lexical.errors.test.js +60 -0
  592. package/dist/test/services/Lexical.test.d.ts +1 -0
  593. package/dist/test/services/Lexical.test.js +68 -0
  594. package/dist/test/services/Migration.test.d.ts +1 -0
  595. package/dist/test/services/Migration.test.js +376 -0
  596. package/dist/test/services/Profile.test.d.ts +1 -0
  597. package/dist/test/services/Profile.test.js +277 -0
  598. package/dist/test/services/Renderer.test.d.ts +1 -0
  599. package/dist/test/services/Renderer.test.js +538 -0
  600. package/dist/test/services/Resolver.test.d.ts +1 -0
  601. package/dist/test/services/Resolver.test.js +320 -0
  602. package/dist/test/services/Skill.test.d.ts +1 -0
  603. package/dist/test/services/Skill.test.js +261 -0
  604. package/dist/test/services/UpdateNotifier.spawn.test.d.ts +1 -0
  605. package/dist/test/services/UpdateNotifier.spawn.test.js +73 -0
  606. package/dist/test/services/UpdateNotifier.test.d.ts +1 -0
  607. package/dist/test/services/UpdateNotifier.test.js +912 -0
  608. package/dist/vendor/litexml/cli.mjs +19 -4
  609. package/dist/vendor/litexml/litexml-html-preview-client.css +98 -13
  610. package/dist/vendor/litexml/litexml-html-preview-client.js +5794 -4976
  611. package/dist/vendor/litexml/style.css +5 -5
  612. package/package.json +29 -26
  613. package/skills/safety.md +1 -1
  614. package/LICENSE +0 -33
  615. package/dist/esm-CDcJmHkG.mjs +0 -2
@@ -1,8 +1,8 @@
1
- import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./rolldown-runtime-JspESFgx.mjs";
2
- import { $ as fiberIdWith, $a as findFirst, $i as combine$3, $n as isDieType, $o as NodeInspectSymbol, $r as catchAll, $t as sync$2, A as all$6, Aa as toArray, Ai as onInterrupt, An as scoped$3, Ao as fromNullable, Ar as bindTo, At as orDie, B as catchSome, Ba as merge$3, Bi as withFiberRuntime, Bn as addFinalizer, Bo as orElse$3, Br as allLevels, Bt as retry, C as decodeSync, Ca as map$12, Ci as fiberRefUnsafeMake, Cn as TaggedError$1, Co as splitAt, Cr as mapBoth, Ct as match$5, D as acquireRelease, Da as reverse, Di as interruptFiber, Dn as mergeAll$2, Do as empty$17, Dr as zip$2, Dt as negate, E as _void, Ea as reduce$1, Ei as interruptAsFiber, En as fromEffect$5, Eo as unsafeGet$1, Er as void_$3, Et as matchEffect, F as cached$1, Fa as Reference, Fi as tap$1, Fn as updateContext$1, Fo as isOption, Fr as set$3, Ft as provideService, G as die$2, Ga as append$5, Gi as of$3, Gn as make$36, Go as isEither, Gr as CommitPrototype, Gt as scopeWith, H as catchTags, Ha as isConfigError, Hi as DeferredTypeId$1, Hn as close, Ho as boolean$3, Hr as updateAs, Ht as runSync, I as catchAll$1, Ia as Tag$3, Ii as uninterruptible, In as forkIn$1, Io as isSome, Ir as update$9, It as race, J as ensuring$4, Ja as drop$1, Ji as get$23, Jn as fail$6, Jo as merge$2, Jr as consoleTag, Jt as serviceFunctions, K as dieMessage, Ka as appendAll$1, Ki as empty$16, Kn as NoSuchElementException, Ko as left, Kr as currentServices, Kt as scoped$4, L as catchAllCause$1, La as add$1, Li as uninterruptibleMask$1, Ln as makeSynchronized, Lo as map$14, Lr as updateAndGet, Lt as raceWith, M as as, Ma as unsafeGet, Mi as succeed$5, Mn as updateEffect$1, Mo as getOrThrow, Mr as get$22, Mt as orElseFail, N as asVoid$1, Na as unsafeHead, Ni as suspend$5, Nn as unsafeFork, No as getOrUndefined, Nr as make$35, O as acquireUseRelease$2, Oa as take$2, Oi as interruptible$1, On as provide$1, Oo as filter$5, Or as zipRight$2, Ot as onError, P as async, Pa as GenericTag, Pi as sync$1, Pn as unsafeRunPromiseExit, Po as isNone, Pr as modify$1, Pt as provide$2, Q as failSync, Qa as filterMap, Qi as set$4, Qn as interruptors, Qo as Class$1, Qr as asyncInterrupt, Qt as suspend$6, R as catchAllDefect, Ra as get$20, Ri as void_$2, Rn as unsafeMakeSemaphore, Ro as match$4, Rr as get$24, Rt as repeat, S as redactedRegistry, Sa as isEmpty$7, Si as fiberRefLocally, Sn as Error$1, So as span, Sr as map$10, Ss as pipe, St as mapInputContext, T as is$2, Ta as prepend$2, Ti as interrupt$2, Tn as taggedEnum, To as take$3, Tr as succeed$6, Tt as matchCauseEffect, U as context, Ua as isMissingDataOnly, Ui as cons$1, Un as extend, Uo as mapInput, Ur as sequential, Ut as runtime, V as catchTag, Va as omit, Vi as zipRight$1, Vn as addFinalizerExit, Vo as some, Vr as getOrDefault, Vt as runFork$1, W as contextWithEffect, Wa as allocate, Wi as isNil, Wn as fork, Wo as string$1, Wr as Class, Wt as scope, X as fail$8, Xa as every, Xi as isEmpty$8, Xn as flipCauseOption, Xo as pipeArguments, Xr as as$1, Xt as sleep$2, Y as exit, Ya as empty$15, Yi as has$1, Yn as failureOrCause, Yo as right, Yr as round, Yt as serviceOption, Z as failCause$4, Za as filter$4, Zi as make$39, Zn as interrupt$3, Zo as BaseProto, Zr as asVoid, Zt as succeed$7, _ as optional$9, _a as drop, _i as exitVoid, _n as zipLeft, _o as prepend$3, _r as all$5, _s as constTrue, _t as logWarning, a as Literal, aa as make$34, ai as deferredFailCause, an as tryPromise, ao as head$2, ar as currentLoggers$1, as as equals, at as forEach$2, b as isConfig, ba as fromIterable$2, bi as fiberRefGet, bn as spaced$1, bo as some$1, br as failCause$3, bs as dual, bt as mapBoth$1, ca as fromIterable$4, ci as deferredIsDone, cn as uninterruptibleMask, co as isEmptyReadonlyArray, cr as ensuring$5, cs as combine$2, ct as forkScoped, d as TaggedError, da as size$15, di as deferredUnsafeDone, dn as unsafeMakeSemaphore$1, do as make$38, dr as scopeTag, ds as symbol$1, dt as interrupt$4, ea as combineAll, ei as currentContext$1, en as tap, eo as findFirstIndex, er as isInterrupted, es as format$3, et as filter$3, f as Union, fa as decode, fi as deferredUnsafeMake, fn as useSpan, fo as map$13, fr as prettyLoggerDefault$1, fs as hasProperty, ft as interruptible, g as int, ga as appendAll, gi as exitSucceed, gn as zip$1, go as of$2, gr as join$3, gs as constFalse, gt as logError, h as decodeUnknown, ha as append$4, hi as exitFailCause, hn as withParentSpan, ho as matchRight, hr as interruptAllAs$1, hs as globalValue, ht as locally, i as Int, ia as get$21, ii as deferredFail, in as tryMap, io as getSomes, ir as squash, is as toStringUnknown, it as fnUntraced, j as annotateLogs, ja as unsafeFromArray, ji as scopeClose, jn as succeed$4, jo as getOrElse, jr as sleep$1, jt as orElse$4, k as addFinalizer$1, ka as takeRight, ki as map$8, kn as provideMerge$1, ko as flatMap$6, kr as bind, kt as onInterrupt$1, la as has$2, li as deferredMake, ln as unlessEffect, lo as isNonEmptyReadonlyArray, lr as forEachConcurrentDiscard, ls as hash, lt as gen, ma as seconds, mi as exitFail, mn as withFiberRuntime$1, mo as matchLeft, mr as inheritAll$1, ms as isTagged, mt as isEffect, n as Date$, na as make$40, ni as deferredAwait, nn as tapErrorCause, no as flatMap$7, nr as map$11, ns as symbolRedactable, nt as flatMap$5, o as Number$, oa as set$2, oi as deferredInterrupt, on as try_, oo as headNonEmpty, or as currentMinimumLogLevel, os as symbol$2, ot as forkDaemon, p as compose, pa as isFinite$1, pi as exitAs, pn as when$2, po as match$6, pr as _await$2, ps as isObject, pt as intoDeferred, q as either$1, qa as contains, qi as fromIterable$3, qn as die$1, qo as match$2, qr as spanTag, qt as scopedWith$1, r as Defect, ra as none$4, ri as deferredComplete, rn as timeout, ro as fromIterable$1, rr as reduceWithContext, rs as toJSON, rt as flatten$5, s as NumberFromString, sa as add$2, si as deferredInterruptWith, sn as uninterruptible$1, so as isArray$1, sr as defaultLogger$1, ss as cached, st as forkIn, t as Cause, ta as ids$1, ti as currentTracerEnabled$1, tn as tapError, to as findLast, tr as isInterruptedOnly, ts as redact$1, tt as filterOrDieMessage, u as String$, ua as remove$5, ui as deferredSucceed, un as unsafeMakeLatch, uo as join$4, ur as scopeMake, us as string, ut as ignore, va as empty$14, vi as exitZipRight, vn as zipRight$3, vo as reduce$2, vr as die, vs as constUndefined, vt as makeSemaphore, w as encodeSync, wa as of$1, wi as flatMap$4, wn as tagged, wo as tailNonEmpty, wr as match$3, wt as matchCause, x as proto$19, xa as isChunk, xi as fiberRefGetWith, xo as sort$2, xr as isFailure, xs as identity, xt as mapError$3, y as make$37, ya as filter$2, yi as fiberId, yn as zipWith, yo as reduceRight, yr as fail$7, ys as constVoid, yt as map$9, z as catchIf, za as getOption, zi as whenEffect, zn as Scope, zo as none$3, zr as TypeId$22, zt as repeatN } from "./esm-DLzrv7gD.mjs";
3
- import { _ as LinkNode, a as HeadingNode, b as CodeHighlightNode, d as ListItemNode, f as ListNode, g as AutoLinkNode, o as QuoteNode, x as CodeNode } from "./LexicalRichText.node-BKfaQ-CH.mjs";
4
- import { a as HorizontalRuleNode } from "./LexicalExtension.node-5OymZQfy.mjs";
5
- import { hn as ElementNode, mn as DecoratorNode } from "./Lexical.node-D6wf2D5M.mjs";
1
+ import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./rolldown-runtime-B4iAMlE-.mjs";
2
+ import { $ as fiberIdWith, $a as findFirst, $i as combine$3, $n as isDieType, $o as NodeInspectSymbol, $r as catchAll, $t as sync$2, A as all$6, Aa as toArray, Ai as onInterrupt, An as scoped$3, Ao as fromNullable, Ar as bindTo, At as orDie, B as catchSome, Ba as merge$3, Bi as withFiberRuntime, Bn as addFinalizer, Bo as orElse$3, Br as allLevels, Bt as retry, C as decodeSync, Ca as map$12, Ci as fiberRefUnsafeMake, Cn as TaggedError$1, Co as splitAt, Cr as mapBoth, Ct as match$5, D as acquireRelease, Da as reverse, Di as interruptFiber, Dn as mergeAll$2, Do as empty$17, Dr as zip$2, Dt as negate, E as _void, Ea as reduce$1, Ei as interruptAsFiber, En as fromEffect$5, Eo as unsafeGet$1, Er as void_$3, Et as matchEffect, F as cached$1, Fa as Reference, Fi as tap$1, Fn as updateContext$1, Fo as isOption, Fr as set$3, Ft as provideService, G as die$2, Ga as append$5, Gi as of$3, Gn as make$36, Go as isEither, Gr as CommitPrototype, Gt as scopeWith, H as catchTags, Ha as isConfigError, Hi as DeferredTypeId$1, Hn as close, Ho as boolean$3, Hr as updateAs, Ht as runSync, I as catchAll$1, Ia as Tag$3, Ii as uninterruptible, In as forkIn$1, Io as isSome, Ir as update$9, It as race, J as ensuring$4, Ja as drop$1, Ji as get$23, Jn as fail$6, Jo as merge$2, Jr as consoleTag, Jt as serviceFunctions, K as dieMessage, Ka as appendAll$1, Ki as empty$16, Kn as NoSuchElementException, Ko as left, Kr as currentServices, Kt as scoped$4, L as catchAllCause$1, La as add$1, Li as uninterruptibleMask$1, Ln as makeSynchronized, Lo as map$14, Lr as updateAndGet, Lt as raceWith, M as as, Ma as unsafeGet, Mi as succeed$5, Mn as updateEffect$1, Mo as getOrThrow, Mr as get$22, Mt as orElseFail, N as asVoid$1, Na as unsafeHead, Ni as suspend$5, Nn as unsafeFork, No as getOrUndefined, Nr as make$35, O as acquireUseRelease$2, Oa as take$2, Oi as interruptible$1, On as provide$1, Oo as filter$5, Or as zipRight$2, Ot as onError, P as async, Pa as GenericTag, Pi as sync$1, Pn as unsafeRunPromiseExit, Po as isNone, Pr as modify$1, Pt as provide$2, Q as failSync, Qa as filterMap, Qi as set$4, Qn as interruptors, Qo as Class$1, Qr as asyncInterrupt, Qt as suspend$6, R as catchAllDefect, Ra as get$20, Ri as void_$2, Rn as unsafeMakeSemaphore, Ro as match$4, Rr as get$24, Rt as repeat, S as redactedRegistry, Sa as isEmpty$7, Si as fiberRefLocally, Sn as Error$1, So as span, Sr as map$10, Ss as pipe, St as mapInputContext, T as is$2, Ta as prepend$2, Ti as interrupt$2, Tn as taggedEnum, To as take$3, Tr as succeed$6, Tt as matchCauseEffect, U as context, Ua as isMissingDataOnly, Ui as cons$1, Un as extend, Uo as mapInput, Ur as sequential, Ut as runtime, V as catchTag, Va as omit, Vi as zipRight$1, Vn as addFinalizerExit, Vo as some, Vr as getOrDefault, Vt as runFork$1, W as contextWithEffect, Wa as allocate, Wi as isNil, Wn as fork, Wo as string$1, Wr as Class, Wt as scope, X as fail$8, Xa as every, Xi as isEmpty$8, Xn as flipCauseOption, Xo as pipeArguments, Xr as as$1, Xt as sleep$2, Y as exit, Ya as empty$15, Yi as has$1, Yn as failureOrCause, Yo as right, Yr as round, Yt as serviceOption, Z as failCause$4, Za as filter$4, Zi as make$39, Zn as interrupt$3, Zo as BaseProto, Zr as asVoid, Zt as succeed$7, _ as optional$9, _a as drop, _i as exitVoid, _n as zipLeft, _o as prepend$3, _r as all$5, _s as constTrue, _t as logWarning, a as Literal, aa as make$34, ai as deferredFailCause, an as tryPromise, ao as head$2, ar as currentLoggers$1, as as equals, at as forEach$2, b as isConfig, ba as fromIterable$2, bi as fiberRefGet, bn as spaced$1, bo as some$1, br as failCause$3, bs as dual, bt as mapBoth$1, ca as fromIterable$4, ci as deferredIsDone, cn as uninterruptibleMask, co as isEmptyReadonlyArray, cr as ensuring$5, cs as combine$2, ct as forkScoped, d as TaggedError, da as size$15, di as deferredUnsafeDone, dn as unsafeMakeSemaphore$1, do as make$38, dr as scopeTag, ds as symbol$1, dt as interrupt$4, ea as combineAll, ei as currentContext$1, en as tap, eo as findFirstIndex, er as isInterrupted, es as format$3, et as filter$3, f as Union, fa as decode, fi as deferredUnsafeMake, fn as useSpan, fo as map$13, fr as prettyLoggerDefault$1, fs as hasProperty, ft as interruptible, g as int, ga as appendAll, gi as exitSucceed, gn as zip$1, go as of$2, gr as join$3, gs as constFalse, gt as logError, h as decodeUnknown, ha as append$4, hi as exitFailCause, hn as withParentSpan, ho as matchRight, hr as interruptAllAs$1, hs as globalValue, ht as locally, i as Int, ia as get$21, ii as deferredFail, in as tryMap, io as getSomes, ir as squash, is as toStringUnknown, it as fnUntraced, j as annotateLogs, ja as unsafeFromArray, ji as scopeClose, jn as succeed$4, jo as getOrElse, jr as sleep$1, jt as orElse$4, k as addFinalizer$1, ka as takeRight, ki as map$8, kn as provideMerge$1, ko as flatMap$6, kr as bind, kt as onInterrupt$1, la as has$2, li as deferredMake, ln as unlessEffect, lo as isNonEmptyReadonlyArray, lr as forEachConcurrentDiscard, ls as hash, lt as gen, ma as seconds, mi as exitFail, mn as withFiberRuntime$1, mo as matchLeft, mr as inheritAll$1, ms as isTagged, mt as isEffect, n as Date$, na as make$40, ni as deferredAwait, nn as tapErrorCause, no as flatMap$7, nr as map$11, ns as symbolRedactable, nt as flatMap$5, o as Number$, oa as set$2, oi as deferredInterrupt, on as try_, oo as headNonEmpty, or as currentMinimumLogLevel, os as symbol$2, ot as forkDaemon, p as compose, pa as isFinite$1, pi as exitAs, pn as when$2, po as match$6, pr as _await$2, ps as isObject, pt as intoDeferred, q as either$1, qa as contains, qi as fromIterable$3, qn as die$1, qo as match$2, qr as spanTag, qt as scopedWith$1, r as Defect, ra as none$4, ri as deferredComplete, rn as timeout, ro as fromIterable$1, rr as reduceWithContext, rs as toJSON, rt as flatten$5, s as NumberFromString, sa as add$2, si as deferredInterruptWith, sn as uninterruptible$1, so as isArray$1, sr as defaultLogger$1, ss as cached, st as forkIn, t as Cause, ta as ids$1, ti as currentTracerEnabled$1, tn as tapError, to as findLast, tr as isInterruptedOnly, ts as redact$1, tt as filterOrDieMessage, u as String$, ua as remove$5, ui as deferredSucceed, un as unsafeMakeLatch, uo as join$4, ur as scopeMake, us as string, ut as ignore, va as empty$14, vi as exitZipRight, vn as zipRight$3, vo as reduce$2, vr as die, vs as constUndefined, vt as makeSemaphore, w as encodeSync, wa as of$1, wi as flatMap$4, wn as tagged, wo as tailNonEmpty, wr as match$3, wt as matchCause, x as proto$19, xa as isChunk, xi as fiberRefGetWith, xo as sort$2, xr as isFailure, xs as identity, xt as mapError$3, y as make$37, ya as filter$2, yi as fiberId, yn as zipWith, yo as reduceRight, yr as fail$7, ys as constVoid, yt as map$9, z as catchIf, za as getOption, zi as whenEffect, zn as Scope, zo as none$3, zr as TypeId$22, zt as repeatN } from "./esm-ZXjJmLEC.mjs";
3
+ import { _ as LinkNode, a as HeadingNode, b as CodeHighlightNode, d as ListItemNode, f as ListNode, g as AutoLinkNode, o as QuoteNode, x as CodeNode } from "./LexicalRichText.node-Cd-BySPE.mjs";
4
+ import { a as HorizontalRuleNode } from "./LexicalExtension.node-BwJt2LXV.mjs";
5
+ import { hn as ElementNode, mn as DecoratorNode } from "./Lexical.node-kAh5GM2n.mjs";
6
6
  import { createRequire } from "node:module";
7
7
  import * as Path from "node:path";
8
8
  import path, { basename, dirname, join } from "node:path";
@@ -1471,9 +1471,9 @@ var PullFromUpstream = class PullFromUpstream {
1471
1471
  this.onPull = onPull;
1472
1472
  this.onEmit = onEmit;
1473
1473
  }
1474
- close(exit$5) {
1475
- const fin1 = this.upstreamExecutor.close(exit$5);
1476
- const result = [...this.activeChildExecutors.map((child) => child !== void 0 ? child.childExecutor.close(exit$5) : void 0), fin1].reduce((acc, next) => {
1474
+ close(exit$3) {
1475
+ const fin1 = this.upstreamExecutor.close(exit$3);
1476
+ const result = [...this.activeChildExecutors.map((child) => child !== void 0 ? child.childExecutor.close(exit$3) : void 0), fin1].reduce((acc, next) => {
1477
1477
  if (acc !== void 0 && next !== void 0) return zipWith(acc, exit(next), (exit1, exit2) => zipRight$2(exit1, exit2));
1478
1478
  else if (acc !== void 0) return acc;
1479
1479
  else if (next !== void 0) return exit(next);
@@ -1509,9 +1509,9 @@ var DrainChildExecutors = class DrainChildExecutors {
1509
1509
  this.combineWithChildResult = combineWithChildResult;
1510
1510
  this.onPull = onPull;
1511
1511
  }
1512
- close(exit$3) {
1513
- const fin1 = this.upstreamExecutor.close(exit$3);
1514
- const result = [...this.activeChildExecutors.map((child) => child !== void 0 ? child.childExecutor.close(exit$3) : void 0), fin1].reduce((acc, next) => {
1512
+ close(exit$5) {
1513
+ const fin1 = this.upstreamExecutor.close(exit$5);
1514
+ const result = [...this.activeChildExecutors.map((child) => child !== void 0 ? child.childExecutor.close(exit$5) : void 0), fin1].reduce((acc, next) => {
1515
1515
  if (acc !== void 0 && next !== void 0) return zipWith(acc, exit(next), (exit1, exit2) => zipRight$2(exit1, exit2));
1516
1516
  else if (acc !== void 0) return acc;
1517
1517
  else if (next !== void 0) return exit(next);
@@ -1711,9 +1711,7 @@ var ChannelExecutor = class ChannelExecutor {
1711
1711
  case OP_SUCCEED_NOW:
1712
1712
  result = this.doneSucceed(this._currentChannel.terminal);
1713
1713
  break;
1714
- case OP_SUSPEND:
1715
- this._currentChannel = this._currentChannel.channel();
1716
- break;
1714
+ case OP_SUSPEND: this._currentChannel = this._currentChannel.channel();
1717
1715
  }
1718
1716
  }
1719
1717
  } catch (error) {
@@ -1940,7 +1938,6 @@ var ChannelExecutor = class ChannelExecutor {
1940
1938
  this.replaceSubexecutor(modifiedParent);
1941
1939
  break;
1942
1940
  }
1943
- default: break;
1944
1941
  }
1945
1942
  }
1946
1943
  handleSubexecutorFailure(childExecutor, parentSubexecutor, cause) {
@@ -2465,7 +2462,9 @@ const mergeWith = /*#__PURE__*/ dual(2, (self, options) => {
2465
2462
  state.transferChildren(parent.scope());
2466
2463
  return _void;
2467
2464
  });
2468
- return zipWith(interruptible(pullL).pipe(ensuring$4(inherit), forkIn(scope)), interruptible(pullR).pipe(ensuring$4(inherit), forkIn(scope)), (left, right) => BothRunning(left, right));
2465
+ const leftFiber = interruptible(pullL).pipe(ensuring$4(inherit), forkIn(scope));
2466
+ const rightFiber = interruptible(pullR).pipe(ensuring$4(inherit), forkIn(scope));
2467
+ return zipWith(leftFiber, rightFiber, (left, right) => BothRunning(left, right));
2469
2468
  })).pipe(flatMap$3(go), embedInput$1(input));
2470
2469
  });
2471
2470
  }
@@ -3004,7 +3003,8 @@ var MailboxImpl = class extends Class {
3004
3003
  this.capacity = 1;
3005
3004
  this.releaseCapacity();
3006
3005
  this.capacity = 0;
3007
- return succeed$5([of$1(this.messages.pop()), this.releaseCapacity()]);
3006
+ const messages = of$1(this.messages.pop());
3007
+ return succeed$5([messages, this.releaseCapacity()]);
3008
3008
  }
3009
3009
  n = Math.min(n, this.capacity || 1);
3010
3010
  let messages;
@@ -3844,7 +3844,7 @@ const make$24 = (impl) => {
3844
3844
  });
3845
3845
  };
3846
3846
  /** @internal */
3847
- const stream = (file, { bufferSize = 16, bytesToRead: bytesToRead_, chunkSize: chunkSize_ = Size$1(64 * 1024) } = {}) => {
3847
+ const stream = (file, { bufferSize = 16, bytesToRead: bytesToRead_, chunkSize: chunkSize_ = Size$1(65536) } = {}) => {
3848
3848
  const bytesToRead = bytesToRead_ !== void 0 ? Size$1(bytesToRead_) : void 0;
3849
3849
  const chunkSize = Size$1(chunkSize_);
3850
3850
  function loop(totalBytesRead) {
@@ -4944,9 +4944,7 @@ const fitsPretty = (self, width) => {
4944
4944
  case "PushAnnotationStream":
4945
4945
  stream = stream.stream;
4946
4946
  break;
4947
- case "PopAnnotationStream":
4948
- stream = stream.stream;
4949
- break;
4947
+ case "PopAnnotationStream": stream = stream.stream;
4950
4948
  }
4951
4949
  return false;
4952
4950
  };
@@ -4989,9 +4987,7 @@ const fitsSmartLoop = (self, comparator, pageWidth, currentColumn, availableWidt
4989
4987
  case "PushAnnotationStream":
4990
4988
  stream = stream.stream;
4991
4989
  break;
4992
- case "PopAnnotationStream":
4993
- stream = stream.stream;
4994
- break;
4990
+ case "PopAnnotationStream": stream = stream.stream;
4995
4991
  }
4996
4992
  return false;
4997
4993
  };
@@ -5020,9 +5016,7 @@ const failsOnFirstLine = (self) => {
5020
5016
  case "PushAnnotationStream":
5021
5017
  stream = stream.stream;
5022
5018
  break;
5023
- case "PopAnnotationStream":
5024
- stream = stream.stream;
5025
- break;
5019
+ case "PopAnnotationStream": stream = stream.stream;
5026
5020
  }
5027
5021
  throw new Error("bug");
5028
5022
  };
@@ -6561,7 +6555,8 @@ function processDown(state) {
6561
6555
  } });
6562
6556
  }
6563
6557
  function processCursorLeft$1(state) {
6564
- return match$4(state.dateParts[state.cursor].previousPart(), {
6558
+ const previousPart = state.dateParts[state.cursor].previousPart();
6559
+ return match$4(previousPart, {
6565
6560
  onNone: () => Action.Beep(),
6566
6561
  onSome: (previous) => Action.NextFrame({ state: {
6567
6562
  ...state,
@@ -6571,7 +6566,8 @@ function processCursorLeft$1(state) {
6571
6566
  });
6572
6567
  }
6573
6568
  function processCursorRight$1(state) {
6574
- return match$4(state.dateParts[state.cursor].nextPart(), {
6569
+ const nextPart = state.dateParts[state.cursor].nextPart();
6570
+ return match$4(nextPart, {
6575
6571
  onNone: () => Action.Beep(),
6576
6572
  onSome: (next) => Action.NextFrame({ state: {
6577
6573
  ...state,
@@ -6581,7 +6577,8 @@ function processCursorRight$1(state) {
6581
6577
  });
6582
6578
  }
6583
6579
  function processNext$1(state) {
6584
- const cursor = match$4(state.dateParts[state.cursor].nextPart(), {
6580
+ const nextPart = state.dateParts[state.cursor].nextPart();
6581
+ const cursor = match$4(nextPart, {
6585
6582
  onNone: () => state.dateParts.findIndex((part) => !part.isToken()),
6586
6583
  onSome: (next) => state.dateParts.indexOf(next)
6587
6584
  });
@@ -6676,7 +6673,10 @@ function handleProcess$4(options) {
6676
6673
  } }),
6677
6674
  onSuccess: (value) => Action.Submit({ value })
6678
6675
  });
6679
- default: return succeed$7(defaultProcessor$1(getOrElse(input.input, () => ""), state));
6676
+ default: {
6677
+ const value = getOrElse(input.input, () => "");
6678
+ return succeed$7(defaultProcessor$1(value, state));
6679
+ }
6680
6680
  }
6681
6681
  };
6682
6682
  }
@@ -6975,7 +6975,9 @@ function getFileList(directory, options) {
6975
6975
  const files = yield* orDie(fs.readDirectory(directory)).pipe(map$9((files) => ["..", ...files]));
6976
6976
  return yield* filter$3(files, (file) => {
6977
6977
  const result = options.filter(file);
6978
- return zipWith(isEffect(result) ? result : succeed$7(result), options.type === "directory" ? map$9(orDie(fs.stat(path.join(directory, file))), (info) => info.type === "Directory") : succeed$7(true), (a, b) => a && b);
6978
+ const userDefinedFilter = isEffect(result) ? result : succeed$7(result);
6979
+ const directoryFilter = options.type === "directory" ? map$9(orDie(fs.stat(path.join(directory, file))), (info) => info.type === "Directory") : succeed$7(true);
6980
+ return zipWith(userDefinedFilter, directoryFilter, (a, b) => a && b);
6979
6981
  }, { concurrency: files.length });
6980
6982
  });
6981
6983
  }
@@ -7643,9 +7645,9 @@ function renderOutput$1(nextState, leadingSymbol, trailingSymbol, options, submi
7643
7645
  function renderNextFrame$1(state, options) {
7644
7646
  return gen(function* () {
7645
7647
  const columns = yield* (yield* Terminal).columns;
7646
- const figures$3 = yield* figures;
7647
- const promptMsg = renderOutput$1(state, annotate(text$11("?"), cyanBright), annotate(figures$3.pointerSmall, blackBright), options);
7648
- const errorMsg = renderError(state, figures$3.pointerSmall);
7648
+ const figures$4 = yield* figures;
7649
+ const promptMsg = renderOutput$1(state, annotate(text$11("?"), cyanBright), annotate(figures$4.pointerSmall, blackBright), options);
7650
+ const errorMsg = renderError(state, figures$4.pointerSmall);
7649
7651
  const offset = state.cursor - state.value.length;
7650
7652
  return promptMsg.pipe(cat(errorMsg), cat(cursorMove(offset)), optimize(Deep), render$3({
7651
7653
  style: "pretty",
@@ -7656,8 +7658,8 @@ function renderNextFrame$1(state, options) {
7656
7658
  function renderSubmission$1(state, options) {
7657
7659
  return gen(function* () {
7658
7660
  const columns = yield* (yield* Terminal).columns;
7659
- const figures$4 = yield* figures;
7660
- return renderOutput$1(state, annotate(figures$4.tick, green), annotate(figures$4.ellipsis, blackBright), options, true).pipe(cat(hardLine), optimize(Deep), render$3({
7661
+ const figures$3 = yield* figures;
7662
+ return renderOutput$1(state, annotate(figures$3.tick, green), annotate(figures$3.ellipsis, blackBright), options, true).pipe(cat(hardLine), optimize(Deep), render$3({
7661
7663
  style: "pretty",
7662
7664
  options: { lineWidth: columns }
7663
7665
  }));
@@ -7815,10 +7817,10 @@ function renderOutput(toggle, leadingSymbol, trailingSymbol, options) {
7815
7817
  function renderNextFrame(state, options) {
7816
7818
  return gen(function* () {
7817
7819
  const terminal = yield* Terminal;
7818
- const figures$2 = yield* figures;
7820
+ const figures$1 = yield* figures;
7819
7821
  const columns = yield* terminal.columns;
7820
7822
  const leadingSymbol = annotate(text$11("?"), cyanBright);
7821
- const trailingSymbol = annotate(figures$2.pointerSmall, blackBright);
7823
+ const trailingSymbol = annotate(figures$1.pointerSmall, blackBright);
7822
7824
  const promptMsg = renderOutput(renderToggle(state, options), leadingSymbol, trailingSymbol, options);
7823
7825
  return cursorHide.pipe(cat(promptMsg), optimize(Deep), render$3({
7824
7826
  style: "pretty",
@@ -7829,10 +7831,10 @@ function renderNextFrame(state, options) {
7829
7831
  function renderSubmission(value, options) {
7830
7832
  return gen(function* () {
7831
7833
  const terminal = yield* Terminal;
7832
- const figures$1 = yield* figures;
7834
+ const figures$2 = yield* figures;
7833
7835
  const columns = yield* terminal.columns;
7834
- const leadingSymbol = annotate(figures$1.tick, green);
7835
- const trailingSymbol = annotate(figures$1.ellipsis, blackBright);
7836
+ const leadingSymbol = annotate(figures$2.tick, green);
7837
+ const trailingSymbol = annotate(figures$2.ellipsis, blackBright);
7836
7838
  return renderOutput(renderToggle(value, options, true), leadingSymbol, trailingSymbol, options).pipe(cat(hardLine), optimize(Deep), render$3({
7837
7839
  style: "pretty",
7838
7840
  options: { lineWidth: columns }
@@ -7939,7 +7941,10 @@ const wizard$3 = /*#__PURE__*/ dual(2, (self, help) => wizardInternal$3(self, he
7939
7941
  const getChoicesInternal = (self) => {
7940
7942
  switch (self._tag) {
7941
7943
  case "Bool": return some("true | false");
7942
- case "Choice": return some(pipe(map$13(self.alternatives, ([choice]) => choice), join$4(" | ")));
7944
+ case "Choice": {
7945
+ const choices = pipe(map$13(self.alternatives, ([choice]) => choice), join$4(" | "));
7946
+ return some(choices);
7947
+ }
7943
7948
  case "DateTime": return some("date");
7944
7949
  case "Float":
7945
7950
  case "Integer":
@@ -8133,7 +8138,10 @@ const getFishCompletions$3 = (self) => {
8133
8138
  case "directory": return self.pathExists === "yes" || self.pathExists === "either" ? make$38("-r", "-f", "-a", `"(__fish_complete_directories (commandline -ct))"`) : make$38("-r");
8134
8139
  case "either": return self.pathExists === "yes" || self.pathExists === "either" ? make$38("-r", "-F") : make$38("-r");
8135
8140
  }
8136
- case "Choice": return make$38("-r", "-f", "-a", `"{${pipe(map$13(self.alternatives, ([choice]) => `${choice}''`), join$4(","))}}"`);
8141
+ case "Choice": {
8142
+ const choices = pipe(map$13(self.alternatives, ([choice]) => `${choice}''`), join$4(","));
8143
+ return make$38("-r", "-f", "-a", `"{${choices}}"`);
8144
+ }
8137
8145
  }
8138
8146
  };
8139
8147
  /** @internal */
@@ -8192,7 +8200,8 @@ const getHelp$3 = (self) => {
8192
8200
  const spans = enumerate(self, defaultConfig);
8193
8201
  if (isNonEmptyReadonlyArray(spans)) {
8194
8202
  const head = headNonEmpty(spans);
8195
- if (isNonEmptyReadonlyArray(tailNonEmpty(spans))) return pipe(map$13(spans, (span) => p$1(span)), reduceRight(empty$6, (left, right) => sequence(left, right)));
8203
+ const tail = tailNonEmpty(spans);
8204
+ if (isNonEmptyReadonlyArray(tail)) return pipe(map$13(spans, (span) => p$1(span)), reduceRight(empty$6, (left, right) => sequence(left, right)));
8196
8205
  return p$1(head);
8197
8206
  }
8198
8207
  return empty$6;
@@ -8364,18 +8373,20 @@ const isArgs = (u) => typeof u === "object" && u != null && ArgsTypeId in u;
8364
8373
  const isEmpty$1 = (self) => self._tag === "Empty";
8365
8374
  /** @internal */
8366
8375
  const all$4 = function() {
8367
- if (arguments.length === 1) if (isArgs(arguments[0])) return map$2(arguments[0], (x) => [x]);
8368
- else if (isArray$1(arguments[0])) return allTupled$1(arguments[0]);
8369
- else {
8370
- const entries = Object.entries(arguments[0]);
8371
- let result = map$2(entries[0][1], (value) => ({ [entries[0][0]]: value }));
8372
- if (entries.length === 1) return result;
8373
- const rest = entries.slice(1);
8374
- for (const [key, options] of rest) result = map$2(makeBoth$1(result, options), ([record, value]) => ({
8375
- ...record,
8376
- [key]: value
8377
- }));
8378
- return result;
8376
+ if (arguments.length === 1) {
8377
+ if (isArgs(arguments[0])) return map$2(arguments[0], (x) => [x]);
8378
+ else if (isArray$1(arguments[0])) return allTupled$1(arguments[0]);
8379
+ else {
8380
+ const entries = Object.entries(arguments[0]);
8381
+ let result = map$2(entries[0][1], (value) => ({ [entries[0][0]]: value }));
8382
+ if (entries.length === 1) return result;
8383
+ const rest = entries.slice(1);
8384
+ for (const [key, options] of rest) result = map$2(makeBoth$1(result, options), ([record, value]) => ({
8385
+ ...record,
8386
+ [key]: value
8387
+ }));
8388
+ return result;
8389
+ }
8379
8390
  }
8380
8391
  return allTupled$1(arguments[0]);
8381
8392
  };
@@ -8433,7 +8444,8 @@ const getHelpInternal$2 = (self) => {
8433
8444
  const optionalDescription = isOption(self.fallback) ? match$4(self.fallback, {
8434
8445
  onNone: () => p$1("This setting is optional."),
8435
8446
  onSome: (fallbackValue) => {
8436
- const displayValue = toStringUnknown(isObject(fallbackValue) ? fallbackValue : String(fallbackValue), 0);
8447
+ const inspectableValue = isObject(fallbackValue) ? fallbackValue : String(fallbackValue);
8448
+ const displayValue = toStringUnknown(inspectableValue, 0);
8437
8449
  return p$1(`This setting is optional. Defaults to: ${displayValue}`);
8438
8450
  }
8439
8451
  }) : p$1("This setting is optional.");
@@ -8558,7 +8570,8 @@ const validateInternal = (self, args, config) => {
8558
8570
  case "WithFallbackConfig": return validateInternal(self.args, args, config).pipe(catchTag("MissingValue", (e) => map$9(catchAll$1(self.config, (e2) => {
8559
8571
  if (isMissingDataOnly(e2)) {
8560
8572
  const help = p$1(String(e2));
8561
- return fail$8(invalidValue(help));
8573
+ const error = invalidValue(help);
8574
+ return fail$8(error);
8562
8575
  }
8563
8576
  return fail$8(e);
8564
8577
  }), (value) => [args, value])));
@@ -8656,7 +8669,11 @@ const getZshCompletions$2 = (self, state = {
8656
8669
  return possibleValues.length === 0 ? empty$15() : of$2(`${multiple}${optional}${self.name}${description}${possibleValues}`);
8657
8670
  }
8658
8671
  case "Map": return getZshCompletions$2(self.args, state);
8659
- case "Both": return appendAll$1(getZshCompletions$2(self.left, state), getZshCompletions$2(self.right, state));
8672
+ case "Both": {
8673
+ const left = getZshCompletions$2(self.left, state);
8674
+ const right = getZshCompletions$2(self.right, state);
8675
+ return appendAll$1(left, right);
8676
+ }
8660
8677
  case "Variadic": return isSome(self.max) && self.max.value > 1 ? getZshCompletions$2(self.args, {
8661
8678
  ...state,
8662
8679
  multiple: true
@@ -8732,18 +8749,20 @@ const isEmpty = (self) => self._tag === "Empty";
8732
8749
  const isSingle = (self) => self._tag === "Single";
8733
8750
  /** @internal */
8734
8751
  const all$3 = function() {
8735
- if (arguments.length === 1) if (isOptions(arguments[0])) return map$1(arguments[0], (x) => [x]);
8736
- else if (isArray$1(arguments[0])) return allTupled(arguments[0]);
8737
- else {
8738
- const entries = Object.entries(arguments[0]);
8739
- let result = map$1(entries[0][1], (value) => ({ [entries[0][0]]: value }));
8740
- if (entries.length === 1) return result;
8741
- const rest = entries.slice(1);
8742
- for (const [key, options] of rest) result = map$1(makeBoth(result, options), ([record, value]) => ({
8743
- ...record,
8744
- [key]: value
8745
- }));
8746
- return result;
8752
+ if (arguments.length === 1) {
8753
+ if (isOptions(arguments[0])) return map$1(arguments[0], (x) => [x]);
8754
+ else if (isArray$1(arguments[0])) return allTupled(arguments[0]);
8755
+ else {
8756
+ const entries = Object.entries(arguments[0]);
8757
+ let result = map$1(entries[0][1], (value) => ({ [entries[0][0]]: value }));
8758
+ if (entries.length === 1) return result;
8759
+ const rest = entries.slice(1);
8760
+ for (const [key, options] of rest) result = map$1(makeBoth(result, options), ([record, value]) => ({
8761
+ ...record,
8762
+ [key]: value
8763
+ }));
8764
+ return result;
8765
+ }
8747
8766
  }
8748
8767
  return allTupled(arguments[0]);
8749
8768
  };
@@ -8862,7 +8881,8 @@ const getHelpInternal$1 = (self) => {
8862
8881
  const optionalDescription = isOption(self.fallback) ? match$4(self.fallback, {
8863
8882
  onNone: () => p$1("This setting is optional."),
8864
8883
  onSome: (fallbackValue) => {
8865
- const displayValue = toStringUnknown(isObject(fallbackValue) ? fallbackValue : String(fallbackValue), 0);
8884
+ const inspectableValue = isObject(fallbackValue) ? fallbackValue : String(fallbackValue);
8885
+ const displayValue = toStringUnknown(inspectableValue, 0);
8866
8886
  return p$1(`This setting is optional. Defaults to: ${displayValue}`);
8867
8887
  }
8868
8888
  }) : p$1("This setting is optional.");
@@ -8879,10 +8899,13 @@ const getIdentifierInternal = (self) => {
8879
8899
  case "Empty": return none$3();
8880
8900
  case "Single": return some(self.fullName);
8881
8901
  case "Both":
8882
- case "OrElse": return match$6(getSomes([getIdentifierInternal(self.left), getIdentifierInternal(self.right)]), {
8883
- onEmpty: () => none$3(),
8884
- onNonEmpty: (ids) => some(join$4(ids, ", "))
8885
- });
8902
+ case "OrElse": {
8903
+ const ids = getSomes([getIdentifierInternal(self.left), getIdentifierInternal(self.right)]);
8904
+ return match$6(ids, {
8905
+ onEmpty: () => none$3(),
8906
+ onNonEmpty: (ids) => some(join$4(ids, ", "))
8907
+ });
8908
+ }
8886
8909
  case "KeyValueMap":
8887
8910
  case "Variadic": return getIdentifierInternal(self.argumentOption);
8888
8911
  case "Map":
@@ -9040,7 +9063,11 @@ const getNames$1 = (self) => {
9040
9063
  case "WithDefault":
9041
9064
  case "WithFallback": return loop(self.options);
9042
9065
  case "Both":
9043
- case "OrElse": return appendAll$1(loop(self.left), loop(self.right));
9066
+ case "OrElse": {
9067
+ const left = loop(self.left);
9068
+ const right = loop(self.right);
9069
+ return appendAll$1(left, right);
9070
+ }
9044
9071
  }
9045
9072
  };
9046
9073
  const order = mapInput(boolean$3, (tuple) => !tuple[0]);
@@ -9068,7 +9095,8 @@ const parseInternal$1 = (self, args, config) => {
9068
9095
  const singleNames = filterMap(getNames$1(self), (name) => get$23(args, name));
9069
9096
  if (isNonEmptyReadonlyArray(singleNames)) {
9070
9097
  const head = headNonEmpty(singleNames);
9071
- if (isEmptyReadonlyArray(tailNonEmpty(singleNames))) {
9098
+ const tail = tailNonEmpty(singleNames);
9099
+ if (isEmptyReadonlyArray(tail)) {
9072
9100
  if (isEmptyReadonlyArray(head)) return validate$3(self.primitiveType, none$3(), config).pipe(mapError$3((e) => invalidValue(p$1(e))));
9073
9101
  if (isNonEmptyReadonlyArray(head) && isEmptyReadonlyArray(tailNonEmpty(head))) {
9074
9102
  const value = headNonEmpty(head);
@@ -9147,7 +9175,8 @@ const parseInternal$1 = (self, args, config) => {
9147
9175
  if (isTagged(e2, "QuitException")) return die$2(e2);
9148
9176
  if (isConfigError(e2) && !isMissingDataOnly(e2)) {
9149
9177
  const help = p$1(String(e2));
9150
- return fail$8(invalidValue(help));
9178
+ const error = invalidValue(help);
9179
+ return fail$8(error);
9151
9180
  }
9152
9181
  return fail$8(e);
9153
9182
  }))));
@@ -9347,34 +9376,42 @@ const parseCommandLine = (self, args, config) => {
9347
9376
  if (contains(normalizedNames, normalizedHead)) {
9348
9377
  if (isBool(self.primitiveType)) return matchLeft(tail, {
9349
9378
  onEmpty: () => {
9379
+ const parsed = some({
9380
+ name: head,
9381
+ values: empty$15()
9382
+ });
9350
9383
  return succeed$7({
9351
- parsed: some({
9352
- name: head,
9353
- values: empty$15()
9354
- }),
9384
+ parsed,
9355
9385
  leftover: tail
9356
9386
  });
9357
9387
  },
9358
9388
  onNonEmpty: (value, leftover) => {
9359
- if (isTrueValue(value)) return succeed$7({
9360
- parsed: some({
9389
+ if (isTrueValue(value)) {
9390
+ const parsed = some({
9361
9391
  name: head,
9362
9392
  values: of$2("true")
9363
- }),
9364
- leftover
9365
- });
9366
- if (isFalseValue(value)) return succeed$7({
9367
- parsed: some({
9393
+ });
9394
+ return succeed$7({
9395
+ parsed,
9396
+ leftover
9397
+ });
9398
+ }
9399
+ if (isFalseValue(value)) {
9400
+ const parsed = some({
9368
9401
  name: head,
9369
9402
  values: of$2("false")
9370
- }),
9371
- leftover
9403
+ });
9404
+ return succeed$7({
9405
+ parsed,
9406
+ leftover
9407
+ });
9408
+ }
9409
+ const parsed = some({
9410
+ name: head,
9411
+ values: empty$15()
9372
9412
  });
9373
9413
  return succeed$7({
9374
- parsed: some({
9375
- name: head,
9376
- values: empty$15()
9377
- }),
9414
+ parsed,
9378
9415
  leftover: tail
9379
9416
  });
9380
9417
  }
@@ -9385,11 +9422,12 @@ const parseCommandLine = (self, args, config) => {
9385
9422
  return fail$8(missingValue(error));
9386
9423
  },
9387
9424
  onNonEmpty: (value, leftover) => {
9425
+ const parsed = some({
9426
+ name: head,
9427
+ values: of$2(value)
9428
+ });
9388
9429
  return succeed$7({
9389
- parsed: some({
9390
- name: head,
9391
- values: of$2(value)
9392
- }),
9430
+ parsed,
9393
9431
  leftover
9394
9432
  });
9395
9433
  }
@@ -9407,13 +9445,15 @@ const parseCommandLine = (self, args, config) => {
9407
9445
  let equalsValue = void 0;
9408
9446
  for (let i = 0; i < tail.length; i++) {
9409
9447
  const arg = tail[i];
9410
- if (contains(normalizedNames, normalize(arg))) {
9448
+ const normalizedArg = normalize(arg);
9449
+ if (contains(normalizedNames, normalizedArg)) {
9411
9450
  optionIndex = i;
9412
9451
  break;
9413
9452
  }
9414
9453
  const flagMatch = FLAG_REGEX.exec(arg);
9415
9454
  if (flagMatch !== null) {
9416
- if (contains(normalizedNames, normalize(flagMatch[1]))) {
9455
+ const normalizedFlag = normalize(flagMatch[1]);
9456
+ if (contains(normalizedNames, normalizedFlag)) {
9417
9457
  optionIndex = i;
9418
9458
  equalsValue = flagMatch[2];
9419
9459
  break;
@@ -9430,64 +9470,88 @@ const parseCommandLine = (self, args, config) => {
9430
9470
  const afterOption = tail.slice(optionIndex + 1);
9431
9471
  if (isBool(self.primitiveType)) {
9432
9472
  if (equalsValue !== void 0) {
9433
- if (isTrueValue(equalsValue)) return succeed$7({
9434
- parsed: some({
9473
+ if (isTrueValue(equalsValue)) {
9474
+ const parsed = some({
9435
9475
  name: optionName,
9436
9476
  values: of$2("true")
9437
- }),
9438
- leftover: appendAll$1(beforeOption, afterOption)
9439
- });
9440
- if (isFalseValue(equalsValue)) return succeed$7({
9441
- parsed: some({
9477
+ });
9478
+ const leftover = appendAll$1(beforeOption, afterOption);
9479
+ return succeed$7({
9480
+ parsed,
9481
+ leftover
9482
+ });
9483
+ }
9484
+ if (isFalseValue(equalsValue)) {
9485
+ const parsed = some({
9442
9486
  name: optionName,
9443
9487
  values: of$2("false")
9444
- }),
9445
- leftover: appendAll$1(beforeOption, afterOption)
9446
- });
9488
+ });
9489
+ const leftover = appendAll$1(beforeOption, afterOption);
9490
+ return succeed$7({
9491
+ parsed,
9492
+ leftover
9493
+ });
9494
+ }
9447
9495
  }
9448
9496
  if (afterOption.length > 0) {
9449
9497
  const nextValue = afterOption[0];
9450
- if (isTrueValue(nextValue)) return succeed$7({
9451
- parsed: some({
9498
+ if (isTrueValue(nextValue)) {
9499
+ const parsed = some({
9452
9500
  name: optionName,
9453
9501
  values: of$2("true")
9454
- }),
9455
- leftover: appendAll$1(beforeOption, afterOption.slice(1))
9456
- });
9457
- if (isFalseValue(nextValue)) return succeed$7({
9458
- parsed: some({
9502
+ });
9503
+ const leftover = appendAll$1(beforeOption, afterOption.slice(1));
9504
+ return succeed$7({
9505
+ parsed,
9506
+ leftover
9507
+ });
9508
+ }
9509
+ if (isFalseValue(nextValue)) {
9510
+ const parsed = some({
9459
9511
  name: optionName,
9460
9512
  values: of$2("false")
9461
- }),
9462
- leftover: appendAll$1(beforeOption, afterOption.slice(1))
9463
- });
9513
+ });
9514
+ const leftover = appendAll$1(beforeOption, afterOption.slice(1));
9515
+ return succeed$7({
9516
+ parsed,
9517
+ leftover
9518
+ });
9519
+ }
9464
9520
  }
9521
+ const parsed = some({
9522
+ name: optionName,
9523
+ values: empty$15()
9524
+ });
9525
+ const leftover = appendAll$1(beforeOption, afterOption);
9465
9526
  return succeed$7({
9466
- parsed: some({
9467
- name: optionName,
9468
- values: empty$15()
9469
- }),
9470
- leftover: appendAll$1(beforeOption, afterOption)
9527
+ parsed,
9528
+ leftover
9471
9529
  });
9472
9530
  }
9473
- if (equalsValue !== void 0) return succeed$7({
9474
- parsed: some({
9531
+ if (equalsValue !== void 0) {
9532
+ const parsed = some({
9475
9533
  name: optionName,
9476
9534
  values: of$2(equalsValue)
9477
- }),
9478
- leftover: appendAll$1(beforeOption, afterOption)
9479
- });
9535
+ });
9536
+ const leftover = appendAll$1(beforeOption, afterOption);
9537
+ return succeed$7({
9538
+ parsed,
9539
+ leftover
9540
+ });
9541
+ }
9480
9542
  if (afterOption.length === 0) {
9481
9543
  const error = p$1(`Expected a value following option: '${self.fullName}'`);
9482
9544
  return fail$8(missingValue(error));
9483
9545
  }
9484
9546
  const optionValue = afterOption[0];
9547
+ const parsed = some({
9548
+ name: optionName,
9549
+ values: of$2(optionValue)
9550
+ });
9551
+ const leftover = appendAll$1(beforeOption, afterOption.slice(1));
9485
9552
  return succeed$7({
9486
- parsed: some({
9487
- name: optionName,
9488
- values: of$2(optionValue)
9489
- }),
9490
- leftover: appendAll$1(beforeOption, afterOption.slice(1))
9553
+ parsed,
9554
+ leftover
9491
9555
  });
9492
9556
  }
9493
9557
  })));
@@ -9576,7 +9640,8 @@ const parseCommandLine = (self, args, config) => {
9576
9640
  let leftover = empty$15();
9577
9641
  while (isNonEmptyReadonlyArray(unparsed)) {
9578
9642
  const name = headNonEmpty(unparsed);
9579
- if (contains(normalizedNames, normalizeCase(config, name))) {
9643
+ const normalizedName = normalizeCase(config, name);
9644
+ if (contains(normalizedNames, normalizedName)) {
9580
9645
  if (optionName === void 0) optionName = name;
9581
9646
  const value = unparsed[1];
9582
9647
  if (value !== void 0 && value.length > 0) values = append$5(values, value.trim());
@@ -9586,11 +9651,12 @@ const parseCommandLine = (self, args, config) => {
9586
9651
  unparsed = unparsed.slice(1);
9587
9652
  }
9588
9653
  }
9654
+ const parsed = fromNullable(optionName).pipe(orElse$3(() => some(self.argumentOption.fullName)), map$14((name) => ({
9655
+ name,
9656
+ values
9657
+ })));
9589
9658
  return succeed$7({
9590
- parsed: fromNullable(optionName).pipe(orElse$3(() => some(self.argumentOption.fullName)), map$14((name) => ({
9591
- name,
9592
- values
9593
- }))),
9659
+ parsed,
9594
9660
  leftover
9595
9661
  });
9596
9662
  }
@@ -9649,7 +9715,8 @@ const getBashCompletions$1 = (self) => {
9649
9715
  switch (self._tag) {
9650
9716
  case "Empty": return empty$15();
9651
9717
  case "Single": {
9652
- const cases = join$4(getNames$1(self), "|");
9718
+ const names = getNames$1(self);
9719
+ const cases = join$4(names, "|");
9653
9720
  const compgen = getBashCompletions$2(self.primitiveType);
9654
9721
  return make$38(`${cases})`, ` COMPREPLY=( ${compgen} )`, ` return 0`, ` ;;`);
9655
9722
  }
@@ -9659,7 +9726,11 @@ const getBashCompletions$1 = (self) => {
9659
9726
  case "WithDefault":
9660
9727
  case "WithFallback": return getBashCompletions$1(self.options);
9661
9728
  case "Both":
9662
- case "OrElse": return appendAll$1(getBashCompletions$1(self.left), getBashCompletions$1(self.right));
9729
+ case "OrElse": {
9730
+ const left = getBashCompletions$1(self.left);
9731
+ const right = getBashCompletions$1(self.right);
9732
+ return appendAll$1(left, right);
9733
+ }
9663
9734
  }
9664
9735
  };
9665
9736
  /** @internal */
@@ -9702,17 +9773,23 @@ const getZshCompletions$1 = (self, state = {
9702
9773
  case "Map":
9703
9774
  case "WithDefault":
9704
9775
  case "WithFallback": return getZshCompletions$1(self.options, state);
9705
- case "Both": return appendAll$1(getZshCompletions$1(self.left, state), getZshCompletions$1(self.right, state));
9776
+ case "Both": {
9777
+ const left = getZshCompletions$1(self.left, state);
9778
+ const right = getZshCompletions$1(self.right, state);
9779
+ return appendAll$1(left, right);
9780
+ }
9706
9781
  case "OrElse": {
9707
9782
  const leftNames = getNames$1(self.left);
9708
9783
  const rightNames = getNames$1(self.right);
9709
- return appendAll$1(getZshCompletions$1(self.left, {
9784
+ const left = getZshCompletions$1(self.left, {
9710
9785
  ...state,
9711
9786
  conflicts: appendAll$1(state.conflicts, rightNames)
9712
- }), getZshCompletions$1(self.right, {
9787
+ });
9788
+ const right = getZshCompletions$1(self.right, {
9713
9789
  ...state,
9714
9790
  conflicts: appendAll$1(state.conflicts, leftNames)
9715
- }));
9791
+ });
9792
+ return appendAll$1(left, right);
9716
9793
  }
9717
9794
  case "Variadic": return isSome(self.max) && self.max.value > 1 ? getZshCompletions$1(self.argumentOption, {
9718
9795
  ...state,
@@ -10005,11 +10082,17 @@ const getHelpInternal = (self, config) => {
10005
10082
  const getUsage = (command, preceding) => {
10006
10083
  switch (command._tag) {
10007
10084
  case "Standard":
10008
- case "GetUserInput": return of$2([reduce$2(append$5(preceding, getSpan(getHelp$3(getUsageInternal(command)))), empty$7, (acc, next) => isText$2(acc) && acc.value === "" ? next : isText$2(next) && next.value === "" ? acc : spans([
10009
- acc,
10010
- space,
10011
- next
10012
- ])), getSpan(command.description)]);
10085
+ case "GetUserInput": {
10086
+ const usage = getSpan(getHelp$3(getUsageInternal(command)));
10087
+ const usages = append$5(preceding, usage);
10088
+ const finalUsage = reduce$2(usages, empty$7, (acc, next) => isText$2(acc) && acc.value === "" ? next : isText$2(next) && next.value === "" ? acc : spans([
10089
+ acc,
10090
+ space,
10091
+ next
10092
+ ]));
10093
+ const description = getSpan(command.description);
10094
+ return of$2([finalUsage, description]);
10095
+ }
10013
10096
  case "Map": return getUsage(command.command, preceding);
10014
10097
  case "Subcommands": {
10015
10098
  const parentUsage = getUsage(command.parent, preceding);
@@ -10156,7 +10239,8 @@ const parseInternal = (self, args, config) => {
10156
10239
  const helpDirectiveForChild = parseChildren.pipe(flatMap$5((directive) => {
10157
10240
  if (isBuiltIn(directive) && isShowHelp(directive.option)) {
10158
10241
  const parentName = getOrElse(head$2(names), () => "");
10159
- return succeed$7(builtIn(showHelp(concat(named(of$2(parentName), none$3()), directive.option.usage), directive.option.helpDoc)));
10242
+ const newDirective = builtIn(showHelp(concat(named(of$2(parentName), none$3()), directive.option.usage), directive.option.helpDoc));
10243
+ return succeed$7(newDirective);
10160
10244
  }
10161
10245
  return fail$8(invalidArgument(empty$6));
10162
10246
  }));
@@ -10266,13 +10350,15 @@ const wizardInternal = (self, prefix, config) => {
10266
10350
  if (!isEmpty(self.options)) {
10267
10351
  const message = p$1(concat$1(optionsWizardHeader, commandName));
10268
10352
  yield* log(toAnsiText(message));
10269
- yield* updateAndGet(commandLineRef, appendAll$1(yield* wizard$1(self.options, config)));
10353
+ const options = yield* wizard$1(self.options, config);
10354
+ yield* updateAndGet(commandLineRef, appendAll$1(options));
10270
10355
  yield* logCurrentCommand;
10271
10356
  }
10272
10357
  if (!isEmpty$1(self.args)) {
10273
10358
  const message = p$1(concat$1(argsWizardHeader, commandName));
10274
10359
  yield* log(toAnsiText(message));
10275
- yield* updateAndGet(commandLineRef, appendAll$1(yield* wizard$2(self.args, config)));
10360
+ const options = yield* wizard$2(self.args, config);
10361
+ yield* updateAndGet(commandLineRef, appendAll$1(options));
10276
10362
  yield* logCurrentCommand;
10277
10363
  }
10278
10364
  }
@@ -10348,15 +10434,17 @@ const getBashCompletionsInternal = (self, executable) => traverseCommand(self, e
10348
10434
  const options = isStandard(info.command) ? all$2([info.command.options, builtIns]) : builtIns;
10349
10435
  const optionNames = getNames$1(options);
10350
10436
  const optionCases = isStandard(info.command) ? getBashCompletions$1(info.command.options) : empty$15();
10351
- const wordList = appendAll$1(optionNames, pipe(info.subcommands, map$13(([name]) => name), sort$2(string$1)));
10437
+ const subcommandNames = pipe(info.subcommands, map$13(([name]) => name), sort$2(string$1));
10438
+ const wordList = appendAll$1(optionNames, subcommandNames);
10352
10439
  const preformatted = isEmptyReadonlyArray(info.parentCommands) ? of$2(info.command.name) : pipe(info.parentCommands, append$5(info.command.name), map$13((command) => command.replaceAll("-", "__")));
10353
10440
  const caseName = join$4(preformatted, ",");
10354
10441
  const funcName = join$4(preformatted, "__");
10355
- return succeed$7(append$5(state, [isEmptyReadonlyArray(info.parentCommands) ? empty$15() : [
10442
+ const funcLines = isEmptyReadonlyArray(info.parentCommands) ? empty$15() : [
10356
10443
  `${caseName})`,
10357
10444
  ` cmd="${funcName}"`,
10358
10445
  " ;;"
10359
- ], [
10446
+ ];
10447
+ const cmdLines = [
10360
10448
  `${funcName})`,
10361
10449
  ` opts="${join$4(wordList, " ")}"`,
10362
10450
  ` if [[ \${cur} == -* || \${COMP_CWORD} -eq ${info.level + 1} ]] ; then`,
@@ -10372,7 +10460,9 @@ const getBashCompletionsInternal = (self, executable) => traverseCommand(self, e
10372
10460
  " COMPREPLY=( $(compgen -W \"${opts}\" -- \"${cur}\") )",
10373
10461
  " return 0",
10374
10462
  " ;;"
10375
- ]]));
10463
+ ];
10464
+ const lines = append$5(state, [funcLines, cmdLines]);
10465
+ return succeed$7(lines);
10376
10466
  }).pipe(map$9((lines) => {
10377
10467
  const rootCommand = unsafeGet$1(getNamesInternal(self), 0);
10378
10468
  const scriptName = `_${rootCommand}_bash_completions`;
@@ -10417,7 +10507,10 @@ const getFishCompletionsInternal = (self, executable) => traverseCommand(self, e
10417
10507
  const conditionals = make$38("-n", "\"__fish_use_subcommand\"");
10418
10508
  return succeed$7(pipe(state, appendAll$1(rootCompletions(conditionals)), appendAll$1(subcommandCompletions(conditionals))));
10419
10509
  }
10420
- const conditionals = make$38("-n", `"${pipe(appendAll$1(pipe(info.parentCommands, drop$1(1), append$5(info.command.name), map$13((command) => `__fish_seen_subcommand_from ${command}`)), map$13(info.subcommands, ([name]) => `not __fish_seen_subcommand_from ${name}`)), join$4("; and "))}"`);
10510
+ const parentConditionals = pipe(info.parentCommands, drop$1(1), append$5(info.command.name), map$13((command) => `__fish_seen_subcommand_from ${command}`));
10511
+ const subcommandConditionals = map$13(info.subcommands, ([name]) => `not __fish_seen_subcommand_from ${name}`);
10512
+ const baseConditionals = pipe(appendAll$1(parentConditionals, subcommandConditionals), join$4("; and "));
10513
+ const conditionals = make$38("-n", `"${baseConditionals}"`);
10421
10514
  return succeed$7(pipe(state, appendAll$1(rootCompletions(conditionals)), appendAll$1(subcommandCompletions(conditionals))));
10422
10515
  });
10423
10516
  const getZshCompletionsInternal = (self, executable) => traverseCommand(self, empty$15(), (state, info) => {
@@ -10428,13 +10521,14 @@ const getZshCompletionsInternal = (self, executable) => traverseCommand(self, em
10428
10521
  return `'${name}:${getShortDescription(subcommand)}' \\`;
10429
10522
  }));
10430
10523
  const commands = isEmptyReadonlyArray(subcommands) ? `commands=()` : `commands=(\n${join$4(indentAll(subcommands, 8), "\n")}\n )`;
10431
- return succeed$7(appendAll$1(state, [
10524
+ const handlerLines = [
10432
10525
  `(( $+functions[_${underscoreName}_commands] )) ||`,
10433
10526
  `_${underscoreName}_commands() {`,
10434
10527
  ` local commands; ${commands}`,
10435
10528
  ` _describe -t commands '${spaceName} commands' commands "$@"`,
10436
10529
  "}"
10437
- ]));
10530
+ ];
10531
+ return succeed$7(appendAll$1(state, handlerLines));
10438
10532
  }).pipe(map$9((handlers) => {
10439
10533
  const rootCommand = unsafeGet$1(getNamesInternal(self), 0);
10440
10534
  const cases = getZshSubcommandCases(self, empty$15(), empty$15());
@@ -10509,7 +10603,7 @@ const getZshSubcommandCases = (self, parentCommands, subcommands) => {
10509
10603
  const parentLines = getZshSubcommandCases(self.parent, parentCommands, appendAll$1(subcommands, nextSubcommands));
10510
10604
  const childCases = pipe(self.children, flatMap$7((child) => getZshSubcommandCases(child, appendAll$1(parentCommands, parentNames), subcommands)));
10511
10605
  const hyphenName = pipe(appendAll$1(parentCommands, parentNames), join$4("-"));
10512
- return appendAll$1(parentLines, pipe(parentNames, flatMap$7((parentName) => [
10606
+ const childLines = pipe(parentNames, flatMap$7((parentName) => [
10513
10607
  "case $state in",
10514
10608
  ` (${parentName})`,
10515
10609
  ` words=($line[1] "\${words[@]}")`,
@@ -10520,7 +10614,8 @@ const getZshSubcommandCases = (self, parentCommands, subcommands) => {
10520
10614
  " esac",
10521
10615
  " ;;",
10522
10616
  "esac"
10523
- ]), appendAll$1(isEmptyReadonlyArray(parentCommands) ? empty$15() : of$2(";;"))));
10617
+ ]), appendAll$1(isEmptyReadonlyArray(parentCommands) ? empty$15() : of$2(";;")));
10618
+ return appendAll$1(parentLines, childLines);
10524
10619
  }
10525
10620
  }
10526
10621
  };
@@ -10639,7 +10734,9 @@ const handleBuiltInOption = (self, executable, args, builtIn, execute, config, o
10639
10734
  active: "yes",
10640
10735
  inactive: "no"
10641
10736
  }).pipe(flatMap$5((shouldRunCommand) => {
10642
- const finalArgs = appendAll$1(take$3(originalArgs, 2), drop$1(args, 1));
10737
+ const baseArgs = take$3(originalArgs, 2);
10738
+ const wizardArgs = drop$1(args, 1);
10739
+ const finalArgs = appendAll$1(baseArgs, wizardArgs);
10643
10740
  return shouldRunCommand ? log().pipe(zipRight$3(run$5(self, finalArgs, execute))) : _void;
10644
10741
  }))), catchAll$1((e) => {
10645
10742
  if (isQuitException(e)) {
@@ -10670,9 +10767,7 @@ const prefixCommand = (self) => {
10670
10767
  case "Map":
10671
10768
  command = command.command;
10672
10769
  break;
10673
- case "Subcommands":
10674
- command = command.parent;
10675
- break;
10770
+ case "Subcommands": command = command.parent;
10676
10771
  }
10677
10772
  return prefix;
10678
10773
  };
@@ -10809,7 +10904,8 @@ const withSubcommands$1 = /*#__PURE__*/ dual(2, (self, subcommands) => {
10809
10904
  if (args.subcommand._tag === "Some") {
10810
10905
  const [tag, value] = args.subcommand.value;
10811
10906
  const subcommand = subcommandMap.get(tag);
10812
- return provideService(subcommand.transform(subcommand.handler(value), value), self.tag, args);
10907
+ const subcommandEffect = subcommand.transform(subcommand.handler(value), value);
10908
+ return provideService(subcommandEffect, self.tag, args);
10813
10909
  }
10814
10910
  return self.handler(args);
10815
10911
  }
@@ -10968,9 +11064,7 @@ function parseSetCookie(header) {
10968
11064
  case "medium":
10969
11065
  options.priority = "medium";
10970
11066
  break;
10971
- case "high":
10972
- options.priority = "high";
10973
- break;
11067
+ case "high": options.priority = "high";
10974
11068
  }
10975
11069
  break;
10976
11070
  case "httponly":
@@ -10991,11 +11085,8 @@ function parseSetCookie(header) {
10991
11085
  case "strict":
10992
11086
  options.sameSite = "strict";
10993
11087
  break;
10994
- case "none":
10995
- options.sameSite = "none";
10996
- break;
11088
+ case "none": options.sameSite = "none";
10997
11089
  }
10998
- break;
10999
11090
  }
11000
11091
  }
11001
11092
  return some(Object.assign(Object.create(CookieProto), {
@@ -11595,7 +11686,8 @@ const make$13 = (f) => makeWith((effect) => flatMap$5(effect, (request) => withF
11595
11686
  }
11596
11687
  }));
11597
11688
  }
11598
- return useSpan(get$20(fiber.currentContext, SpanNameGenerator)(request), {
11689
+ const nameGenerator = get$20(fiber.currentContext, SpanNameGenerator);
11690
+ return useSpan(nameGenerator(request), {
11599
11691
  kind: "client",
11600
11692
  captureStackTrace: false
11601
11693
  }, (span) => {
@@ -12049,7 +12141,8 @@ const layerManager$3 = /*#__PURE__*/ effect$1(WorkerManager, /* @__PURE__ */ gen
12049
12141
  }
12050
12142
  });
12051
12143
  const executeAcquire = (request, makeMailbox) => withFiberRuntime$1((fiber) => {
12052
- const span = getOption(fiber.getFiberRef(currentContext), ParentSpan).pipe(filter$5((span) => span._tag === "Span"));
12144
+ const context = fiber.getFiberRef(currentContext);
12145
+ const span = getOption(context, ParentSpan).pipe(filter$5((span) => span._tag === "Span"));
12053
12146
  const id = requestIdCounter++;
12054
12147
  return makeMailbox.pipe(tap((mailbox) => {
12055
12148
  requestMap.set(id, mailbox);
@@ -12183,7 +12276,7 @@ const effectify$1 = (fn, onError, onSyncError) => (...args) => async((resume) =>
12183
12276
  */
12184
12277
  const effectify = effectify$1;
12185
12278
  //#endregion
12186
- //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_f1a2a05590df254f139eccc610e5dde2/node_modules/@effect/platform-node-shared/dist/esm/internal/error.js
12279
+ //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_19708ecbd4cbdb49671d93a4e6081e70/node_modules/@effect/platform-node-shared/dist/esm/internal/error.js
12187
12280
  /** @internal */
12188
12281
  const handleErrnoException = (module, method) => (err, [path]) => {
12189
12282
  let reason = "Unknown";
@@ -12206,9 +12299,7 @@ const handleErrnoException = (module, method) => (err, [path]) => {
12206
12299
  case "EBUSY":
12207
12300
  reason = "Busy";
12208
12301
  break;
12209
- case "ELOOP":
12210
- reason = "BadResource";
12211
- break;
12302
+ case "ELOOP": reason = "BadResource";
12212
12303
  }
12213
12304
  return new SystemError({
12214
12305
  reason,
@@ -12221,7 +12312,7 @@ const handleErrnoException = (module, method) => (err, [path]) => {
12221
12312
  });
12222
12313
  };
12223
12314
  //#endregion
12224
- //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_f1a2a05590df254f139eccc610e5dde2/node_modules/@effect/platform-node-shared/dist/esm/internal/fileSystem.js
12315
+ //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_19708ecbd4cbdb49671d93a4e6081e70/node_modules/@effect/platform-node-shared/dist/esm/internal/fileSystem.js
12225
12316
  const handleBadArgument = (method) => (cause) => new BadArgument({
12226
12317
  module: "FileSystem",
12227
12318
  method,
@@ -12503,7 +12594,7 @@ const writeFile = (path, data, options) => async((resume, signal) => {
12503
12594
  }
12504
12595
  });
12505
12596
  //#endregion
12506
- //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_f1a2a05590df254f139eccc610e5dde2/node_modules/@effect/platform-node-shared/dist/esm/NodeFileSystem.js
12597
+ //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_19708ecbd4cbdb49671d93a4e6081e70/node_modules/@effect/platform-node-shared/dist/esm/NodeFileSystem.js
12507
12598
  /**
12508
12599
  * @since 1.0.0
12509
12600
  */
@@ -12540,7 +12631,7 @@ const layer$9 = /* @__PURE__ */ effect$1(FileSystem, /* @__PURE__ */ map$9(/*#__
12540
12631
  writeFile
12541
12632
  })));
12542
12633
  //#endregion
12543
- //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_f1a2a05590df254f139eccc610e5dde2/node_modules/@effect/platform-node-shared/dist/esm/internal/stream.js
12634
+ //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_19708ecbd4cbdb49671d93a4e6081e70/node_modules/@effect/platform-node-shared/dist/esm/internal/stream.js
12544
12635
  /** @internal */
12545
12636
  const fromReadable$1 = (evaluate, onError, options) => fromChannel(fromReadableChannel(evaluate, onError, options));
12546
12637
  /** @internal */
@@ -12662,7 +12753,7 @@ const unsafeReadableRead = (readable, onError, exit, options) => {
12662
12753
  }));
12663
12754
  };
12664
12755
  //#endregion
12665
- //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_f1a2a05590df254f139eccc610e5dde2/node_modules/@effect/platform-node-shared/dist/esm/internal/sink.js
12756
+ //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_19708ecbd4cbdb49671d93a4e6081e70/node_modules/@effect/platform-node-shared/dist/esm/internal/sink.js
12666
12757
  /** @internal */
12667
12758
  const fromWritable$1 = (evaluate, onError, options) => fromChannel$1(fromWritableChannel(evaluate, onError, options));
12668
12759
  /** @internal */
@@ -12677,14 +12768,14 @@ const writableOutput = (writable, deferred, onError) => suspend$6(() => {
12677
12768
  }));
12678
12769
  });
12679
12770
  //#endregion
12680
- //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_f1a2a05590df254f139eccc610e5dde2/node_modules/@effect/platform-node-shared/dist/esm/NodeSink.js
12771
+ //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_19708ecbd4cbdb49671d93a4e6081e70/node_modules/@effect/platform-node-shared/dist/esm/NodeSink.js
12681
12772
  /**
12682
12773
  * @category constructor
12683
12774
  * @since 1.0.0
12684
12775
  */
12685
12776
  const fromWritable = fromWritable$1;
12686
12777
  //#endregion
12687
- //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_f1a2a05590df254f139eccc610e5dde2/node_modules/@effect/platform-node-shared/dist/esm/NodeStream.js
12778
+ //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_19708ecbd4cbdb49671d93a4e6081e70/node_modules/@effect/platform-node-shared/dist/esm/NodeStream.js
12688
12779
  /**
12689
12780
  * @category constructors
12690
12781
  * @since 1.0.0
@@ -12701,7 +12792,7 @@ const toString$1 = toString$2;
12701
12792
  */
12702
12793
  const toUint8Array = toUint8Array$1;
12703
12794
  //#endregion
12704
- //#region ../../node_modules/.pnpm/@effect+platform-node@0.108.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effect@3.2_a9695d724252837ea1ecf5a96b4a8abe/node_modules/@effect/platform-node/dist/esm/internal/httpIncomingMessage.js
12795
+ //#region ../../node_modules/.pnpm/@effect+platform-node@0.108.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effect@3.2_cbaf2d87b25498626ad7aed57ec0563d/node_modules/@effect/platform-node/dist/esm/internal/httpIncomingMessage.js
12705
12796
  /** @internal */
12706
12797
  var HttpIncomingMessageImpl = class extends Class$1 {
12707
12798
  source;
@@ -12759,7 +12850,7 @@ var HttpIncomingMessageImpl = class extends Class$1 {
12759
12850
  }
12760
12851
  };
12761
12852
  //#endregion
12762
- //#region ../../node_modules/.pnpm/@effect+platform-node@0.108.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effect@3.2_a9695d724252837ea1ecf5a96b4a8abe/node_modules/@effect/platform-node/dist/esm/internal/httpClient.js
12853
+ //#region ../../node_modules/.pnpm/@effect+platform-node@0.108.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effect@3.2_cbaf2d87b25498626ad7aed57ec0563d/node_modules/@effect/platform-node/dist/esm/internal/httpClient.js
12763
12854
  /** @internal */
12764
12855
  const HttpAgentTypeId = /*#__PURE__*/ Symbol.for("@effect/platform-node/Http/NodeClient/HttpAgent");
12765
12856
  /** @internal */
@@ -12907,11 +12998,11 @@ var ClientResponseImpl$1 = class extends HttpIncomingMessageImpl {
12907
12998
  /** @internal */
12908
12999
  const layer$8 = /*#__PURE__*/ provide(/* @__PURE__ */ layerMergedContext(/* @__PURE__ */ map$9(HttpAgent, fromAgent)), agentLayer);
12909
13000
  //#endregion
12910
- //#region ../../node_modules/.pnpm/@effect+platform-node@0.108.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effect@3.2_a9695d724252837ea1ecf5a96b4a8abe/node_modules/@effect/platform-node/dist/esm/internal/httpClientUndici.js
13001
+ //#region ../../node_modules/.pnpm/@effect+platform-node@0.108.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effect@3.2_cbaf2d87b25498626ad7aed57ec0563d/node_modules/@effect/platform-node/dist/esm/internal/httpClientUndici.js
12911
13002
  /** @internal */
12912
13003
  const undiciOptionsTagKey = "@effect/platform-node/NodeHttpClient/undiciOptions";
12913
13004
  //#endregion
12914
- //#region ../../node_modules/.pnpm/@effect+platform-node@0.108.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effect@3.2_a9695d724252837ea1ecf5a96b4a8abe/node_modules/@effect/platform-node/dist/esm/NodeHttpClient.js
13005
+ //#region ../../node_modules/.pnpm/@effect+platform-node@0.108.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effect@3.2_cbaf2d87b25498626ad7aed57ec0563d/node_modules/@effect/platform-node/dist/esm/NodeHttpClient.js
12915
13006
  /**
12916
13007
  * @since 1.0.0
12917
13008
  * @category layers
@@ -13071,7 +13162,7 @@ const ProcessId = ProcessId$1;
13071
13162
  */
13072
13163
  const makeExecutor = makeExecutor$1;
13073
13164
  //#endregion
13074
- //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_f1a2a05590df254f139eccc610e5dde2/node_modules/@effect/platform-node-shared/dist/esm/internal/commandExecutor.js
13165
+ //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_19708ecbd4cbdb49671d93a4e6081e70/node_modules/@effect/platform-node-shared/dist/esm/internal/commandExecutor.js
13075
13166
  const inputToStdioOption = (stdin) => typeof stdin === "string" ? stdin : "pipe";
13076
13167
  const outputToStdioOption = (output) => typeof output === "string" ? output : "pipe";
13077
13168
  const toError = (err) => err instanceof globalThis.Error ? err : new globalThis.Error(String(err));
@@ -13179,14 +13270,14 @@ const runCommand = (fileSystem) => (command) => {
13179
13270
  }
13180
13271
  };
13181
13272
  //#endregion
13182
- //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_f1a2a05590df254f139eccc610e5dde2/node_modules/@effect/platform-node-shared/dist/esm/NodeCommandExecutor.js
13273
+ //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_19708ecbd4cbdb49671d93a4e6081e70/node_modules/@effect/platform-node-shared/dist/esm/NodeCommandExecutor.js
13183
13274
  /**
13184
13275
  * @since 1.0.0
13185
13276
  * @category layer
13186
13277
  */
13187
13278
  const layer$5 = /* @__PURE__ */ effect$1(CommandExecutor, /*#__PURE__*/ pipe(FileSystem, /*#__PURE__*/ map$9((fileSystem) => makeExecutor(runCommand(fileSystem)))));
13188
13279
  //#endregion
13189
- //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_f1a2a05590df254f139eccc610e5dde2/node_modules/@effect/platform-node-shared/dist/esm/internal/path.js
13280
+ //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_19708ecbd4cbdb49671d93a4e6081e70/node_modules/@effect/platform-node-shared/dist/esm/internal/path.js
13190
13281
  const fromFileUrl = (url) => try_({
13191
13282
  try: () => NodeUrl.fileURLToPath(url),
13192
13283
  catch: (error) => new BadArgument({
@@ -13208,7 +13299,7 @@ const toFileUrl = (path) => try_({
13208
13299
  ({ ...Path.posix });
13209
13300
  ({ ...Path.win32 });
13210
13301
  //#endregion
13211
- //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_f1a2a05590df254f139eccc610e5dde2/node_modules/@effect/platform-node-shared/dist/esm/NodePath.js
13302
+ //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_19708ecbd4cbdb49671d93a4e6081e70/node_modules/@effect/platform-node-shared/dist/esm/NodePath.js
13212
13303
  /**
13213
13304
  * @since 1.0.0
13214
13305
  */
@@ -13223,10 +13314,10 @@ const layer$3 = /* @__PURE__ */ succeed$2(Path$1, /*#__PURE__*/ Path$1.of({
13223
13314
  toFileUrl
13224
13315
  }));
13225
13316
  //#endregion
13226
- //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_f1a2a05590df254f139eccc610e5dde2/node_modules/@effect/platform-node-shared/dist/esm/internal/terminal.js
13317
+ //#region ../../node_modules/.pnpm/@effect+platform-node-shared@0.61.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effe_19708ecbd4cbdb49671d93a4e6081e70/node_modules/@effect/platform-node-shared/dist/esm/internal/terminal.js
13227
13318
  const defaultShouldQuit = (input) => input.key.ctrl && (input.key.name === "c" || input.key.name === "d");
13228
13319
  //#endregion
13229
- //#region ../../node_modules/.pnpm/@effect+platform-node@0.108.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effect@3.2_a9695d724252837ea1ecf5a96b4a8abe/node_modules/@effect/platform-node/dist/esm/NodeContext.js
13320
+ //#region ../../node_modules/.pnpm/@effect+platform-node@0.108.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effect@3.2_cbaf2d87b25498626ad7aed57ec0563d/node_modules/@effect/platform-node/dist/esm/NodeContext.js
13230
13321
  /**
13231
13322
  * @since 1.0.0
13232
13323
  */
@@ -13378,7 +13469,7 @@ const makeRunMain = (f) => dual((args) => isEffect(args[0]), (effect, options) =
13378
13469
  });
13379
13470
  });
13380
13471
  //#endregion
13381
- //#region ../../node_modules/.pnpm/@effect+platform-node@0.108.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effect@3.2_a9695d724252837ea1ecf5a96b4a8abe/node_modules/@effect/platform-node/dist/esm/NodeRuntime.js
13472
+ //#region ../../node_modules/.pnpm/@effect+platform-node@0.108.1_@effect+cluster@0.60.2_@effect+platform@0.97.1_effect@3.2_cbaf2d87b25498626ad7aed57ec0563d/node_modules/@effect/platform-node/dist/esm/NodeRuntime.js
13382
13473
  /**
13383
13474
  * @since 1.0.0
13384
13475
  */
@@ -14046,9 +14137,10 @@ function makeAuthService(http, config) {
14046
14137
  }
14047
14138
  }
14048
14139
  if (lastTransport && lastTransport._tag !== "Generic") return yield* fail$8(lastTransport);
14140
+ const tried = attempted.length > 0 ? attempted.map((a) => `${a.url} → ${a.status}`).join(", ") : "no responses";
14049
14141
  return yield* fail$8(new AuthProbe({
14050
14142
  message: "cannot detect auth endpoint",
14051
- hint: `tried: ${attempted.length > 0 ? attempted.map((a) => `${a.url} → ${a.status}`).join(", ") : "no responses"}. supply the site root (e.g. https://blog.example.com), not the API path. verify the server is reachable and runs a supported API version (${SUPPORTED_API_VERSIONS.join(", ")}).`
14143
+ hint: `tried: ${tried}. supply the site root (e.g. https://blog.example.com), not the API path. verify the server is reachable and runs a supported API version (${SUPPORTED_API_VERSIONS.join(", ")}).`
14052
14144
  }));
14053
14145
  });
14054
14146
  const requestDeviceCode = (authBase, clientId, scope = "openid profile email") => gen(function* () {
@@ -14355,13 +14447,14 @@ function makeApiService(http, config, auth, opts) {
14355
14447
  const resolved = yield* resolvedEffect;
14356
14448
  yield* maybeEmitBanner(resolved);
14357
14449
  const method = options.method ?? "GET";
14358
- const decision = decideWriteGate({
14450
+ const gateInput = {
14359
14451
  apiUrl: resolved.apiUrl,
14360
14452
  profileName: resolved.profileName,
14361
14453
  isProduction: resolved.isProduction,
14362
14454
  profileExplicit: resolved.profileExplicit,
14363
14455
  urlOverridden: resolved.urlOverridden
14364
- }, method);
14456
+ };
14457
+ const decision = decideWriteGate(gateInput, method);
14365
14458
  if (!decision.allow) return yield* fail$8(new WriteRequiresExplicit({
14366
14459
  message: decision.message,
14367
14460
  hint: decision.hint,
@@ -14474,7 +14567,7 @@ function parseBody(res) {
14474
14567
  function decodeWithSchema(schema, body) {
14475
14568
  return tryPromise({
14476
14569
  try: async () => {
14477
- const { Schema: SchemaMod } = await import("./esm-CDcJmHkG.mjs");
14570
+ const { Schema: SchemaMod } = await import("./esm-CNZ7kdTg.mjs");
14478
14571
  return SchemaMod.decodeUnknownPromise(schema)(body);
14479
14572
  },
14480
14573
  catch: (err) => new ServerError({
@@ -16113,7 +16206,7 @@ function customRandom(alphabet, defaultSize, getRandom) {
16113
16206
  }
16114
16207
  };
16115
16208
  }
16116
- let step = Math.ceil(1.6 * 256 * defaultSize / safeByteCutoff);
16209
+ let step = Math.ceil(409.6 * defaultSize / safeByteCutoff);
16117
16210
  return (size = defaultSize) => {
16118
16211
  if (!size) return "";
16119
16212
  let id = "";
@@ -16173,7 +16266,7 @@ function customAlphabet(alphabet, defaultSize = 21) {
16173
16266
  }
16174
16267
  customAlphabet(urlAlphabet);
16175
16268
  //#endregion
16176
- //#region ../../node_modules/.pnpm/@haklex+rich-litexml@0.34.0_typescript@6.0.3/node_modules/@haklex/rich-litexml/dist/src-BeDSuguH.js
16269
+ //#region ../../node_modules/.pnpm/@haklex+rich-litexml@0.36.0_typescript@6.0.3/node_modules/@haklex/rich-litexml/dist/src-DKDBBSml.js
16177
16270
  var impl = null;
16178
16271
  function registerParseHTML(fn) {
16179
16272
  impl = fn;
@@ -16338,6 +16431,19 @@ function imageDisplayWidthAttr(el) {
16338
16431
  const v = numAttr(el, "display-width");
16339
16432
  return v !== void 0 && Number.isFinite(v) && v >= 10 && v <= 100 ? v : void 0;
16340
16433
  }
16434
+ function imageFixedPxAttr(el, name) {
16435
+ const v = numAttr(el, name);
16436
+ return v !== void 0 && Number.isFinite(v) && v > 0 ? Math.round(v) : void 0;
16437
+ }
16438
+ function exclusiveImageDisplayAttrs(el) {
16439
+ const displayWidth = imageDisplayWidthAttr(el);
16440
+ if (displayWidth !== void 0) return { displayWidth };
16441
+ const fixedWidth = imageFixedPxAttr(el, "fixed-width");
16442
+ if (fixedWidth !== void 0) return { fixedWidth };
16443
+ const fixedHeight = imageFixedPxAttr(el, "fixed-height");
16444
+ if (fixedHeight !== void 0) return { fixedHeight };
16445
+ return {};
16446
+ }
16341
16447
  function imageLayoutAttr(el) {
16342
16448
  const v = el.getAttribute("layout");
16343
16449
  return v !== null && IMAGE_LAYOUTS.has(v) ? v : void 0;
@@ -16390,7 +16496,7 @@ function registerCustomReaders(registry) {
16390
16496
  caption: el.getAttribute("caption") ?? void 0,
16391
16497
  thumbhash: el.getAttribute("thumbhash") ?? void 0,
16392
16498
  accent: el.getAttribute("accent") ?? void 0,
16393
- displayWidth: imageDisplayWidthAttr(el),
16499
+ ...exclusiveImageDisplayAttrs(el),
16394
16500
  layout: imageLayoutAttr(el),
16395
16501
  version: 1
16396
16502
  };
@@ -16865,6 +16971,8 @@ function registerCustomWriters(registry) {
16865
16971
  "thumbhash": n.thumbhash,
16866
16972
  "accent": n.accent,
16867
16973
  "display-width": n.displayWidth != null ? String(n.displayWidth) : void 0,
16974
+ "fixed-width": n.fixedWidth != null ? String(n.fixedWidth) : void 0,
16975
+ "fixed-height": n.fixedHeight != null ? String(n.fixedHeight) : void 0,
16868
16976
  "layout": n.layout
16869
16977
  }),
16870
16978
  selfClosing: true
@@ -18688,9 +18796,7 @@ var Tokenizer = class {
18688
18796
  case State.InProcessingInstruction:
18689
18797
  this.stateInProcessingInstruction(c);
18690
18798
  break;
18691
- case State.InEntity:
18692
- this.stateInEntity();
18693
- break;
18799
+ case State.InEntity: this.stateInEntity();
18694
18800
  }
18695
18801
  this.index++;
18696
18802
  }
@@ -18708,9 +18814,10 @@ var Tokenizer = class {
18708
18814
  handleTrailingData() {
18709
18815
  const endIndex = this.buffer.length + this.offset;
18710
18816
  if (this.sectionStart >= endIndex) return;
18711
- if (this.state === State.InCommentLike) if (this.currentSequence === Sequences.CdataEnd) this.cbs.oncdata(this.sectionStart, endIndex, 0);
18712
- else this.cbs.oncomment(this.sectionStart, endIndex, 0);
18713
- else if (this.state === State.InTagName || this.state === State.BeforeAttributeName || this.state === State.BeforeAttributeValue || this.state === State.AfterAttributeName || this.state === State.InAttributeName || this.state === State.InAttributeValueSq || this.state === State.InAttributeValueDq || this.state === State.InAttributeValueNq || this.state === State.InClosingTagName) {} else this.cbs.ontext(this.sectionStart, endIndex);
18817
+ if (this.state === State.InCommentLike) {
18818
+ if (this.currentSequence === Sequences.CdataEnd) this.cbs.oncdata(this.sectionStart, endIndex, 0);
18819
+ else this.cbs.oncomment(this.sectionStart, endIndex, 0);
18820
+ } else if (this.state === State.InTagName || this.state === State.BeforeAttributeName || this.state === State.BeforeAttributeValue || this.state === State.AfterAttributeName || this.state === State.InAttributeName || this.state === State.InAttributeValueSq || this.state === State.InAttributeValueDq || this.state === State.InAttributeValueNq || this.state === State.InClosingTagName) {} else this.cbs.ontext(this.sectionStart, endIndex);
18714
18821
  }
18715
18822
  emitCodePoint(cp, consumed) {
18716
18823
  if (this.baseState !== State.Text && this.baseState !== State.InSpecialTag) {
@@ -21266,9 +21373,7 @@ const loopSegment = ({ [NEXT]: next, [END]: end }, json) => {
21266
21373
  elementAsJSON(next, json);
21267
21374
  next = getEnd(next);
21268
21375
  break;
21269
- case 10:
21270
- documentTypeAsJSON(next, json);
21271
- break;
21376
+ case 10: documentTypeAsJSON(next, json);
21272
21377
  }
21273
21378
  next = next[NEXT];
21274
21379
  }
@@ -21344,7 +21449,7 @@ const moCallback = (element, parentNode) => {
21344
21449
  const { active, observers } = ownerDocument[MUTATION_OBSERVER];
21345
21450
  if (active) {
21346
21451
  for (const observer of observers) for (const [target, { subtree, childList, characterData }] of observer.nodes) if (childList) {
21347
- if (parentNode && (target === parentNode || subtree && target.contains(parentNode)) || !parentNode && (subtree && (target === ownerDocument || target.contains(element)) || !subtree && target[characterData ? "childNodes" : "children"].includes(element))) {
21452
+ if (parentNode && (target === parentNode || subtree && target.contains(parentNode)) || !parentNode && (subtree && (target === ownerDocument || /* c8 ignore next */ target.contains(element)) || !subtree && target[characterData ? "childNodes" : "children"].includes(element))) {
21348
21453
  const { callback, records, scheduled } = observer;
21349
21454
  records.push(createRecord("childList", target, element, parentNode ? [] : [element], parentNode ? [element] : []));
21350
21455
  if (!scheduled) {
@@ -22233,7 +22338,6 @@ function parseSelector(subselects, selector, selectorIndex) {
22233
22338
  case CharCode.RightParenthesis:
22234
22339
  counter -= 1;
22235
22340
  if (counter === 0) return unescapeCSS(selector.slice(start, selectorIndex++));
22236
- break;
22237
22341
  }
22238
22342
  throw new Error("Parenthesis not matched");
22239
22343
  }
@@ -22359,7 +22463,6 @@ function parseSelector(subselects, selector, selectorIndex) {
22359
22463
  case CharCode.LowerS:
22360
22464
  ignoreCase = false;
22361
22465
  stripWhitespace(1);
22362
- break;
22363
22466
  }
22364
22467
  }
22365
22468
  if (selector.charCodeAt(selectorIndex) !== CharCode.RightSquareBracket) throw new Error("Attribute selector didn't terminate");
@@ -22394,19 +22497,21 @@ function parseSelector(subselects, selector, selectorIndex) {
22394
22497
  break;
22395
22498
  }
22396
22499
  let data = null;
22397
- if (selector.charCodeAt(selectorIndex) === CharCode.LeftParenthesis) if (unpackPseudos.has(name)) {
22398
- if (isQuote(selector.charCodeAt(selectorIndex + 1))) throw new Error(`Pseudo-selector ${name} cannot be quoted`);
22399
- data = [];
22400
- selectorIndex = parseSelector(data, selector, selectorIndex + 1);
22401
- if (selector.charCodeAt(selectorIndex) !== CharCode.RightParenthesis) throw new Error(`Missing closing parenthesis in :${name} (${selector})`);
22402
- selectorIndex += 1;
22403
- } else {
22404
- data = readValueWithParenthesis();
22405
- if (stripQuotesFromPseudos.has(name)) {
22406
- const quot = data.charCodeAt(0);
22407
- if (quot === data.charCodeAt(data.length - 1) && isQuote(quot)) data = data.slice(1, -1);
22500
+ if (selector.charCodeAt(selectorIndex) === CharCode.LeftParenthesis) {
22501
+ if (unpackPseudos.has(name)) {
22502
+ if (isQuote(selector.charCodeAt(selectorIndex + 1))) throw new Error(`Pseudo-selector ${name} cannot be quoted`);
22503
+ data = [];
22504
+ selectorIndex = parseSelector(data, selector, selectorIndex + 1);
22505
+ if (selector.charCodeAt(selectorIndex) !== CharCode.RightParenthesis) throw new Error(`Missing closing parenthesis in :${name} (${selector})`);
22506
+ selectorIndex += 1;
22507
+ } else {
22508
+ data = readValueWithParenthesis();
22509
+ if (stripQuotesFromPseudos.has(name)) {
22510
+ const quot = data.charCodeAt(0);
22511
+ if (quot === data.charCodeAt(data.length - 1) && isQuote(quot)) data = data.slice(1, -1);
22512
+ }
22513
+ data = unescapeCSS(data);
22408
22514
  }
22409
- data = unescapeCSS(data);
22410
22515
  }
22411
22516
  tokens.push({
22412
22517
  type: SelectorType.Pseudo,
@@ -23939,9 +24044,7 @@ function parse$2(formula) {
23939
24044
  case "-":
23940
24045
  index++;
23941
24046
  return -1;
23942
- case "+":
23943
- index++;
23944
- break;
24047
+ case "+": index++;
23945
24048
  }
23946
24049
  return 1;
23947
24050
  }
@@ -24855,7 +24958,6 @@ var ParentNode = class extends Node$1 {
24855
24958
  node.parentNode = this;
24856
24959
  knownSiblings(next[PREV], node, next);
24857
24960
  moCallback(node, null);
24858
- break;
24859
24961
  }
24860
24962
  return node;
24861
24963
  }
@@ -24981,9 +25083,7 @@ function setOwnerDocument(node) {
24981
25083
  node.ownerDocument = this;
24982
25084
  switch (node.nodeType) {
24983
25085
  case 1:
24984
- case 11:
24985
- node.childNodes.forEach(setOwnerDocument, this);
24986
- break;
25086
+ case 11: node.childNodes.forEach(setOwnerDocument, this);
24987
25087
  }
24988
25088
  return node;
24989
25089
  }
@@ -25672,9 +25772,7 @@ var Element$1 = class extends ParentNode {
25672
25772
  }
25673
25773
  case 3:
25674
25774
  case 8:
25675
- case 4:
25676
- addNext(next.cloneNode(deep));
25677
- break;
25775
+ case 4: addNext(next.cloneNode(deep));
25678
25776
  }
25679
25777
  next = next[NEXT];
25680
25778
  }
@@ -25725,7 +25823,6 @@ var Element$1 = class extends ParentNode {
25725
25823
  case 4:
25726
25824
  out.push((isOpened ? ">" : "") + next);
25727
25825
  isOpened = false;
25728
- break;
25729
25826
  }
25730
25827
  } while (next !== end);
25731
25828
  return out.join("");
@@ -26724,9 +26821,7 @@ var require_CSSStyleRule = /* @__PURE__ */ __commonJSMin(((exports) => {
26724
26821
  case "\r":
26725
26822
  case "\n":
26726
26823
  case "\f": break;
26727
- default:
26728
- buffer += " ";
26729
- break;
26824
+ default: buffer += " ";
26730
26825
  }
26731
26826
  break;
26732
26827
  case "\"":
@@ -26788,9 +26883,7 @@ var require_CSSStyleRule = /* @__PURE__ */ __commonJSMin(((exports) => {
26788
26883
  else buffer += character;
26789
26884
  state = "selector";
26790
26885
  break;
26791
- default:
26792
- buffer += character;
26793
- break;
26886
+ default: buffer += character;
26794
26887
  }
26795
26888
  return styleRule;
26796
26889
  };
@@ -27004,9 +27097,7 @@ var require_CSSImportRule = /* @__PURE__ */ __commonJSMin(((exports) => {
27004
27097
  if (buffer) this.media.mediaText = buffer.trim();
27005
27098
  }
27006
27099
  break;
27007
- default:
27008
- if (state === "media") buffer += character;
27009
- break;
27100
+ default: if (state === "media") buffer += character;
27010
27101
  }
27011
27102
  }
27012
27103
  });
@@ -27327,9 +27418,10 @@ var require_CSSValueExpression = /* @__PURE__ */ __commonJSMin(((exports) => {
27327
27418
  expression += character;
27328
27419
  break;
27329
27420
  case "/":
27330
- if (info = this._parseJSComment(token, idx)) if (info.error) error = "css expression error: unfinished comment in expression!";
27331
- else idx = info.idx;
27332
- else if (info = this._parseJSRexExp(token, idx)) {
27421
+ if (info = this._parseJSComment(token, idx)) {
27422
+ if (info.error) error = "css expression error: unfinished comment in expression!";
27423
+ else idx = info.idx;
27424
+ } else if (info = this._parseJSRexExp(token, idx)) {
27333
27425
  idx = info.idx;
27334
27426
  expression += info.text;
27335
27427
  } else expression += character;
@@ -27342,9 +27434,7 @@ var require_CSSValueExpression = /* @__PURE__ */ __commonJSMin(((exports) => {
27342
27434
  expression += info.text;
27343
27435
  } else expression += character;
27344
27436
  break;
27345
- default:
27346
- expression += character;
27347
- break;
27437
+ default: expression += character;
27348
27438
  }
27349
27439
  if (error) break;
27350
27440
  if (paren.length === 0) break;
@@ -27617,9 +27707,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
27617
27707
  case "before-value":
27618
27708
  state = "value";
27619
27709
  break;
27620
- case "importRule-begin":
27621
- state = "importRule";
27622
- break;
27710
+ case "importRule-begin": state = "importRule";
27623
27711
  }
27624
27712
  break;
27625
27713
  case "'":
@@ -27634,9 +27722,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
27634
27722
  case "before-value":
27635
27723
  state = "value";
27636
27724
  break;
27637
- case "importRule-begin":
27638
- state = "importRule";
27639
- break;
27725
+ case "importRule-begin": state = "importRule";
27640
27726
  }
27641
27727
  break;
27642
27728
  case "/":
@@ -27775,19 +27861,20 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
27775
27861
  } else buffer += character;
27776
27862
  break;
27777
27863
  case "(":
27778
- if (state === "value") if (buffer.trim() === "expression") {
27779
- var info = new CSSOM.CSSValueExpression(token, i).parse();
27780
- if (info.error) parseError(info.error);
27781
- else {
27782
- buffer += info.expression;
27783
- i = info.idx;
27864
+ if (state === "value") {
27865
+ if (buffer.trim() === "expression") {
27866
+ var info = new CSSOM.CSSValueExpression(token, i).parse();
27867
+ if (info.error) parseError(info.error);
27868
+ else {
27869
+ buffer += info.expression;
27870
+ i = info.idx;
27871
+ }
27872
+ } else {
27873
+ state = "value-parenthesis";
27874
+ valueParenthesisDepth = 1;
27875
+ buffer += character;
27784
27876
  }
27785
- } else {
27786
- state = "value-parenthesis";
27787
- valueParenthesisDepth = 1;
27788
- buffer += character;
27789
- }
27790
- else if (state === "value-parenthesis") {
27877
+ } else if (state === "value-parenthesis") {
27791
27878
  valueParenthesisDepth++;
27792
27879
  buffer += character;
27793
27880
  } else buffer += character;
@@ -27825,9 +27912,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
27825
27912
  buffer = "";
27826
27913
  state = "before-selector";
27827
27914
  break;
27828
- default:
27829
- buffer += character;
27830
- break;
27915
+ default: buffer += character;
27831
27916
  }
27832
27917
  break;
27833
27918
  case "}":
@@ -27868,7 +27953,6 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
27868
27953
  }
27869
27954
  buffer = "";
27870
27955
  state = "before-selector";
27871
- break;
27872
27956
  }
27873
27957
  break;
27874
27958
  default:
@@ -27884,12 +27968,9 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
27884
27968
  case "before-value":
27885
27969
  state = "value";
27886
27970
  break;
27887
- case "importRule-begin":
27888
- state = "importRule";
27889
- break;
27971
+ case "importRule-begin": state = "importRule";
27890
27972
  }
27891
27973
  buffer += character;
27892
- break;
27893
27974
  }
27894
27975
  return styleSheet;
27895
27976
  };
@@ -29260,7 +29341,6 @@ const ImageClass = (ownerDocument) => class Image extends HTMLImageElement {
29260
29341
  case 2:
29261
29342
  this.height = height;
29262
29343
  this.width = width;
29263
- break;
29264
29344
  }
29265
29345
  }
29266
29346
  };
@@ -29448,9 +29528,7 @@ var Document$1 = class extends NonElementParentNode {
29448
29528
  case "dispatchEvent":
29449
29529
  this[EVENT_TARGET][name] = value;
29450
29530
  break;
29451
- default:
29452
- target[name] = value;
29453
- break;
29531
+ default: target[name] = value;
29454
29532
  }
29455
29533
  return true;
29456
29534
  },
@@ -29646,9 +29724,7 @@ var HTMLDocument = class extends Document$1 {
29646
29724
  let { [NEXT]: next, [END]: end } = this;
29647
29725
  while (next !== end) {
29648
29726
  switch (next.nodeType) {
29649
- case 1:
29650
- nodeList.push(next);
29651
- break;
29727
+ case 1: nodeList.push(next);
29652
29728
  }
29653
29729
  next = next[NEXT];
29654
29730
  }
@@ -29761,7 +29837,7 @@ function Document() {
29761
29837
  }
29762
29838
  setPrototypeOf(Document, Document$1).prototype = Document$1.prototype;
29763
29839
  //#endregion
29764
- //#region ../../node_modules/.pnpm/@haklex+rich-litexml@0.34.0_typescript@6.0.3/node_modules/@haklex/rich-litexml/dist/node.mjs
29840
+ //#region ../../node_modules/.pnpm/@haklex+rich-litexml@0.36.0_typescript@6.0.3/node_modules/@haklex/rich-litexml/dist/node.mjs
29765
29841
  registerParseHTML((html) => parseHTML(html).document);
29766
29842
  //#endregion
29767
29843
  //#region ../editor/src/core/litexml.ts
@@ -29805,7 +29881,7 @@ function stripMxLitexmlDocWrapper(xml) {
29805
29881
  * LICENSE file in the root directory of this source tree.
29806
29882
  *
29807
29883
  */
29808
- const mod$2 = await (process.env.NODE_ENV !== "production" ? import("./LexicalTable.dev-6IFFOAE0.mjs") : import("./LexicalTable.prod-2CaLZ7fH.mjs"));
29884
+ const mod$2 = await (process.env.NODE_ENV !== "production" ? import("./LexicalTable.dev-D-sFhO-o.mjs") : import("./LexicalTable.prod-DwYaa_dN.mjs"));
29809
29885
  mod$2.$computeTableCellRectBoundary;
29810
29886
  mod$2.$computeTableMap;
29811
29887
  mod$2.$computeTableMapSkipCellCheck;
@@ -29882,7 +29958,7 @@ mod$2.setScrollableTablesActive;
29882
29958
  * LICENSE file in the root directory of this source tree.
29883
29959
  *
29884
29960
  */
29885
- const mod$1 = await (process.env.NODE_ENV !== "production" ? import("./LexicalMarkdown.dev-B5z9kLbV.mjs") : import("./LexicalMarkdown.prod-wKzw7FFH.mjs"));
29961
+ const mod$1 = await (process.env.NODE_ENV !== "production" ? import("./LexicalMarkdown.dev-DJLKbZtD.mjs") : import("./LexicalMarkdown.prod-Cp21kDCU.mjs"));
29886
29962
  mod$1.$convertFromMarkdownString;
29887
29963
  mod$1.$convertSelectionToMarkdownString;
29888
29964
  const $convertToMarkdownString = mod$1.$convertToMarkdownString;
@@ -29911,7 +29987,7 @@ mod$1.UNORDERED_LIST;
29911
29987
  mod$1.isTableRowDivider;
29912
29988
  mod$1.registerMarkdownShortcuts;
29913
29989
  //#endregion
29914
- //#region ../../node_modules/.pnpm/@haklex+rich-headless@0.34.0_lexical@0.49.0_typescript@6.0.3__typescript@6.0.3/node_modules/@haklex/rich-headless/dist/transformers.mjs
29990
+ //#region ../../node_modules/.pnpm/@haklex+rich-headless@0.36.0_lexical@0.49.0_typescript@6.0.3__typescript@6.0.3/node_modules/@haklex/rich-headless/dist/transformers.mjs
29915
29991
  /**
29916
29992
  * Headless Markdown transformers — export-only (Lexical → Markdown).
29917
29993
  * Import stubs are no-ops; used only for $convertToMarkdownString.
@@ -30338,7 +30414,7 @@ function $toMarkdown() {
30338
30414
  return $convertToMarkdownString(allHeadlessTransformers);
30339
30415
  }
30340
30416
  //#endregion
30341
- //#region ../../node_modules/.pnpm/@haklex+rich-headless@0.34.0_lexical@0.49.0_typescript@6.0.3__typescript@6.0.3/node_modules/@haklex/rich-headless/dist/index.mjs
30417
+ //#region ../../node_modules/.pnpm/@haklex+rich-headless@0.36.0_lexical@0.49.0_typescript@6.0.3__typescript@6.0.3/node_modules/@haklex/rich-headless/dist/index.mjs
30342
30418
  var INTRINSIC_TYPES = [
30343
30419
  "root",
30344
30420
  "paragraph",
@@ -30957,7 +31033,7 @@ var customHeadlessNodes = [
30957
31033
  ChatNode
30958
31034
  ];
30959
31035
  var allHeadlessNodes = [...builtinNodes, ...customHeadlessNodes];
30960
- const createHeadlessEditor = (await (process.env.NODE_ENV !== "production" ? import("./LexicalHeadless.dev-DA0WldSR.mjs") : import("./LexicalHeadless.prod-1kQgKB6c.mjs"))).createHeadlessEditor;
31036
+ const createHeadlessEditor = (await (process.env.NODE_ENV !== "production" ? import("./LexicalHeadless.dev-BeUbKBes.mjs") : import("./LexicalHeadless.prod-4gbIA8HM.mjs"))).createHeadlessEditor;
30961
31037
  //#endregion
30962
31038
  //#region ../editor/src/core/nodes/litexml.ts
30963
31039
  const XML_ESCAPE_MAP = {
@@ -31075,7 +31151,8 @@ function mxLexicalToMarkdown(state) {
31075
31151
  const output = [];
31076
31152
  const pendingHeadlessChildren = [];
31077
31153
  for (const child of children) {
31078
- const projection = mxBlockRegistry[typeof child?.type === "string" ? child.type : ""];
31154
+ const type = typeof child?.type === "string" ? child.type : "";
31155
+ const projection = mxBlockRegistry[type];
31079
31156
  if (projection) {
31080
31157
  flushSegment(output, pendingHeadlessChildren);
31081
31158
  const markdown = projection.toMarkdown(child);
@@ -31364,7 +31441,8 @@ const ALERT_LABEL_COLOR = {
31364
31441
  };
31365
31442
  const renderBox = (defaultType) => (node, ctx, inner) => {
31366
31443
  const type = (node.attrs.type ?? defaultType).toLowerCase();
31367
- const labelLine = wrap(ALERT_LABEL_COLOR[type] ?? ANSI.cyan, type.toUpperCase(), ctx.color);
31444
+ const colorCode = ALERT_LABEL_COLOR[type] ?? ANSI.cyan;
31445
+ const labelLine = wrap(colorCode, type.toUpperCase(), ctx.color);
31368
31446
  const rule = wrap(ANSI.dim, "─".repeat(64), ctx.color);
31369
31447
  const body = inner.walkBlockChildren(node.children, ctx);
31370
31448
  const prefix = wrap(ANSI.dim, "│ ", ctx.color);
@@ -31412,7 +31490,8 @@ const collectText = (children) => {
31412
31490
  };
31413
31491
  const codeblockRenderer = (node, ctx) => {
31414
31492
  const lang = node.attrs.lang ?? "";
31415
- const body = highlightCode(collectText(node.children).replace(/\n+$/, ""), lang, ctx.color);
31493
+ const code = collectText(node.children).replace(/\n+$/, "");
31494
+ const body = highlightCode(code, lang, ctx.color);
31416
31495
  if (lang) return `${wrap(ANSI.dim, lang, ctx.color)}\n${body}`;
31417
31496
  return body;
31418
31497
  };
@@ -31519,8 +31598,6 @@ const inlineRendererEntries = [
31519
31598
  ["footnote", footnoteRenderer],
31520
31599
  ["ruby", rubyRenderer]
31521
31600
  ];
31522
- //#endregion
31523
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.1/node_modules/fast-xml-parser/src/util.js
31524
31601
  const regexName = /* @__PURE__ */ new RegExp("^[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
31525
31602
  function getAllMatches(string, regex) {
31526
31603
  const matches = [];
@@ -31560,7 +31637,7 @@ const criticalProperties = [
31560
31637
  "prototype"
31561
31638
  ];
31562
31639
  //#endregion
31563
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.1/node_modules/fast-xml-parser/src/validator.js
31640
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.11.0/node_modules/fast-xml-parser/src/validator.js
31564
31641
  const defaultOptions$2 = {
31565
31642
  allowBooleanAttributes: false,
31566
31643
  unpairedTags: []
@@ -31610,18 +31687,19 @@ function validate(xmlData, options) {
31610
31687
  const isValid = validateAttributeString(attrStr, options);
31611
31688
  if (isValid === true) tagFound = true;
31612
31689
  else return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));
31613
- } else if (closingTag) if (!result.tagClosed) return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i));
31614
- else if (attrStr.trim().length > 0) return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos));
31615
- else if (tags.length === 0) return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos));
31616
- else {
31617
- const otg = tags.pop();
31618
- if (tagName !== otg.tagName) {
31619
- let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);
31620
- return getErrorObject("InvalidTag", "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", getLineNumberForPosition(xmlData, tagStartPos));
31690
+ } else if (closingTag) {
31691
+ if (!result.tagClosed) return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' doesn't have proper closing.", getLineNumberForPosition(xmlData, i));
31692
+ else if (attrStr.trim().length > 0) return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' can't have attributes or invalid starting.", getLineNumberForPosition(xmlData, tagStartPos));
31693
+ else if (tags.length === 0) return getErrorObject("InvalidTag", "Closing tag '" + tagName + "' has not been opened.", getLineNumberForPosition(xmlData, tagStartPos));
31694
+ else {
31695
+ const otg = tags.pop();
31696
+ if (tagName !== otg.tagName) {
31697
+ let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);
31698
+ return getErrorObject("InvalidTag", "Expected closing tag '" + otg.tagName + "' (opened in line " + openPos.line + ", col " + openPos.col + ") instead of closing tag '" + tagName + "'.", getLineNumberForPosition(xmlData, tagStartPos));
31699
+ }
31700
+ if (tags.length == 0) reachedRoot = true;
31621
31701
  }
31622
- if (tags.length == 0) reachedRoot = true;
31623
- }
31624
- else {
31702
+ } else {
31625
31703
  const isValid = validateAttributeString(attrStr, options);
31626
31704
  if (isValid !== true) return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));
31627
31705
  if (reachedRoot === true) return getErrorObject("InvalidXml", "Multiple possible root nodes found.", getLineNumberForPosition(xmlData, i));
@@ -31631,15 +31709,16 @@ function validate(xmlData, options) {
31631
31709
  });
31632
31710
  tagFound = true;
31633
31711
  }
31634
- for (i++; i < xmlData.length; i++) if (xmlData[i] === "<") if (xmlData[i + 1] === "!") {
31635
- i++;
31636
- i = readCommentAndCDATA(xmlData, i);
31637
- continue;
31638
- } else if (xmlData[i + 1] === "?") {
31639
- i = readPI(xmlData, ++i);
31640
- if (i.err) return i;
31641
- } else break;
31642
- else if (xmlData[i] === "&") {
31712
+ for (i++; i < xmlData.length; i++) if (xmlData[i] === "<") {
31713
+ if (xmlData[i + 1] === "!") {
31714
+ i++;
31715
+ i = readCommentAndCDATA(xmlData, i);
31716
+ continue;
31717
+ } else if (xmlData[i + 1] === "?") {
31718
+ i = readPI(xmlData, ++i);
31719
+ if (i.err) return i;
31720
+ } else break;
31721
+ } else if (xmlData[i] === "&") {
31643
31722
  const afterAmp = validateAmpersand(xmlData, i);
31644
31723
  if (afterAmp == -1) return getErrorObject("InvalidChar", "char '&' is not expected.", getLineNumberForPosition(xmlData, i));
31645
31724
  i = afterAmp;
@@ -31711,9 +31790,10 @@ function readAttributeStr(xmlData, i) {
31711
31790
  let startChar = "";
31712
31791
  let tagClosed = false;
31713
31792
  for (; i < xmlData.length; i++) {
31714
- if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) if (startChar === "") startChar = xmlData[i];
31715
- else if (startChar !== xmlData[i]) {} else startChar = "";
31716
- else if (xmlData[i] === ">") {
31793
+ if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {
31794
+ if (startChar === "") startChar = xmlData[i];
31795
+ else if (startChar !== xmlData[i]) {} else startChar = "";
31796
+ } else if (xmlData[i] === ">") {
31717
31797
  if (startChar === "") {
31718
31798
  tagClosed = true;
31719
31799
  break;
@@ -32315,7 +32395,7 @@ var EntityDecoder = class {
32315
32395
  }
32316
32396
  };
32317
32397
  //#endregion
32318
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.1/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js
32398
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.11.0/node_modules/fast-xml-parser/src/xmlparser/OptionsBuilder.js
32319
32399
  const defaultOnDangerousProperty = (name) => {
32320
32400
  if (DANGEROUS_PROPERTY_NAMES.includes(name)) return "__" + name;
32321
32401
  return name;
@@ -32442,7 +32522,7 @@ const buildOptions = function(options) {
32442
32522
  return built;
32443
32523
  };
32444
32524
  //#endregion
32445
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.1/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js
32525
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.11.0/node_modules/fast-xml-parser/src/xmlparser/xmlNode.js
32446
32526
  let METADATA_SYMBOL$1;
32447
32527
  if (typeof Symbol !== "function") METADATA_SYMBOL$1 = "@@xmlMetadata";
32448
32528
  else METADATA_SYMBOL$1 = Symbol("XML Node Metadata");
@@ -32463,8 +32543,15 @@ var XmlNode = class {
32463
32543
  [":@"]: node[":@"]
32464
32544
  });
32465
32545
  else this.child.push({ [node.tagname]: node.child });
32546
+ this.addStartIndex(startIndex);
32547
+ }
32548
+ addStartIndex(startIndex) {
32466
32549
  if (startIndex !== void 0) this.child[this.child.length - 1][METADATA_SYMBOL$1] = { startIndex };
32467
32550
  }
32551
+ addEndIndex(endIndex) {
32552
+ const lastChild = this.child[this.child.length - 1];
32553
+ if (lastChild !== void 0 && lastChild[METADATA_SYMBOL$1] !== void 0 && lastChild[METADATA_SYMBOL$1].endIndex === void 0) lastChild[METADATA_SYMBOL$1].endIndex = endIndex;
32554
+ }
32468
32555
  /** symbol used for metadata */
32469
32556
  static getMetaDataSymbol() {
32470
32557
  return METADATA_SYMBOL$1;
@@ -32482,9 +32569,9 @@ var XmlNode = class {
32482
32569
  * XML NS spec: https://www.w3.org/TR/xml-names/#NT-NCName
32483
32570
  */
32484
32571
  const nameStartChar10 = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�";
32485
- const nameChar10 = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�\\-\\.\\d·̀-ͯ‿-⁀";
32572
+ const nameChar10 = nameStartChar10 + "\\-\\.\\d" + "·" + "̀-ͯ" + "‿-⁀";
32486
32573
  const nameStartChar11 = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿";
32487
- const nameChar11 = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿\\-\\.\\d·̀-ͯ҇‿-⁀";
32574
+ const nameChar11 = nameStartChar11 + "\\-\\.\\d" + "·" + "̀-ͯ" + "҇" + "‿-⁀";
32488
32575
  const buildRegexes = (startChar, char, flags = "") => {
32489
32576
  const ncNamePat = `[${startChar.replace(":", "")}][${char.replace(":", "")}]*`;
32490
32577
  return {
@@ -32512,7 +32599,7 @@ const getRegexes = (xmlVersion = "1.0", asciiOnly = false) => {
32512
32599
  */
32513
32600
  const qName = (str, { xmlVersion = "1.0", asciiOnly = false } = {}) => getRegexes(xmlVersion, asciiOnly).qName.test(str);
32514
32601
  //#endregion
32515
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.1/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js
32602
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.11.0/node_modules/fast-xml-parser/src/xmlparser/DocTypeReader.js
32516
32603
  var DocTypeReader = class {
32517
32604
  constructor(options, xmlVersion) {
32518
32605
  this.suppressValidationErr = !options;
@@ -32529,41 +32616,54 @@ var DocTypeReader = class {
32529
32616
  i = i + 9;
32530
32617
  let angleBracketsCount = 1;
32531
32618
  let hasBody = false, comment = false;
32619
+ let quoteChar = null;
32532
32620
  let exp = "";
32533
- for (; i < xmlData.length; i++) if (xmlData[i] === "<" && !comment) {
32534
- if (hasBody && hasSeq(xmlData, "!ENTITY", i)) {
32535
- i += 7;
32536
- let entityName, val;
32537
- [entityName, val, i] = this.readEntityExp(xmlData, i + 1, this.suppressValidationErr);
32538
- if (val.indexOf("&") === -1) {
32539
- if (this.options.enabled !== false && this.options.maxEntityCount != null && entityCount >= this.options.maxEntityCount) throw new Error(`Entity count (${entityCount + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
32540
- entities[entityName] = val;
32541
- entityCount++;
32542
- }
32543
- } else if (hasBody && hasSeq(xmlData, "!ELEMENT", i)) {
32544
- i += 8;
32545
- const { index } = this.readElementExp(xmlData, i + 1);
32546
- i = index;
32547
- } else if (hasBody && hasSeq(xmlData, "!ATTLIST", i)) i += 8;
32548
- else if (hasBody && hasSeq(xmlData, "!NOTATION", i)) {
32549
- i += 9;
32550
- const { index } = this.readNotationExp(xmlData, i + 1, this.suppressValidationErr);
32551
- i = index;
32552
- } else if (hasSeq(xmlData, "!--", i)) comment = true;
32553
- else throw new Error(`Invalid DOCTYPE`);
32554
- angleBracketsCount++;
32555
- exp = "";
32556
- } else if (xmlData[i] === ">") {
32557
- if (comment) {
32558
- if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") {
32559
- comment = false;
32560
- angleBracketsCount--;
32561
- }
32562
- } else angleBracketsCount--;
32563
- if (angleBracketsCount === 0) break;
32564
- } else if (xmlData[i] === "[") hasBody = true;
32565
- else exp += xmlData[i];
32566
- if (angleBracketsCount !== 0) throw new Error(`Unclosed DOCTYPE`);
32621
+ for (; i < xmlData.length; i++) {
32622
+ if (quoteChar !== null) {
32623
+ if (xmlData[i] === quoteChar) quoteChar = null;
32624
+ exp += xmlData[i];
32625
+ continue;
32626
+ }
32627
+ if (!hasBody && !comment && (xmlData[i] === "\"" || xmlData[i] === "'")) {
32628
+ quoteChar = xmlData[i];
32629
+ exp += xmlData[i];
32630
+ continue;
32631
+ }
32632
+ if (xmlData[i] === "<" && !comment) {
32633
+ if (hasBody && hasSeq(xmlData, "!ENTITY", i)) {
32634
+ i += 7;
32635
+ let entityName, val;
32636
+ [entityName, val, i] = this.readEntityExp(xmlData, i + 1, this.suppressValidationErr);
32637
+ if (val.indexOf("&") === -1) {
32638
+ if (this.options.enabled !== false && this.options.maxEntityCount != null && entityCount >= this.options.maxEntityCount) throw new Error(`Entity count (${entityCount + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
32639
+ entities[entityName] = val;
32640
+ entityCount++;
32641
+ }
32642
+ } else if (hasBody && hasSeq(xmlData, "!ELEMENT", i)) {
32643
+ i += 8;
32644
+ const { index } = this.readElementExp(xmlData, i + 1);
32645
+ i = index;
32646
+ } else if (hasBody && hasSeq(xmlData, "!ATTLIST", i)) i += 8;
32647
+ else if (hasBody && hasSeq(xmlData, "!NOTATION", i)) {
32648
+ i += 9;
32649
+ const { index } = this.readNotationExp(xmlData, i + 1, this.suppressValidationErr);
32650
+ i = index;
32651
+ } else if (hasSeq(xmlData, "!--", i)) comment = true;
32652
+ else throw new Error(`Invalid DOCTYPE`);
32653
+ angleBracketsCount++;
32654
+ exp = "";
32655
+ } else if (xmlData[i] === ">") {
32656
+ if (comment) {
32657
+ if (xmlData[i - 1] === "-" && xmlData[i - 2] === "-") {
32658
+ comment = false;
32659
+ angleBracketsCount--;
32660
+ }
32661
+ } else angleBracketsCount--;
32662
+ if (angleBracketsCount === 0) break;
32663
+ } else if (xmlData[i] === "[") hasBody = true;
32664
+ else exp += xmlData[i];
32665
+ }
32666
+ if (quoteChar !== null || angleBracketsCount !== 0) throw new Error(`Unclosed DOCTYPE`);
32567
32667
  } else throw new Error(`Invalid Tag instead of DOCTYPE`);
32568
32668
  return {
32569
32669
  entities,
@@ -32917,7 +33017,7 @@ function anynum(str) {
32917
33017
  return chars.join("");
32918
33018
  }
32919
33019
  //#endregion
32920
- //#region ../../node_modules/.pnpm/strnum@2.4.1/node_modules/strnum/strnum.js
33020
+ //#region ../../node_modules/.pnpm/strnum@2.4.2/node_modules/strnum/strnum.js
32921
33021
  const hexRegex = /^[-+]?0x[a-fA-F0-9]+$/;
32922
33022
  const binRegex = /^0b[01]+$/;
32923
33023
  const octRegex = /^0o[0-7]+$/;
@@ -32960,12 +33060,15 @@ function toNumber(str, options = {}) {
32960
33060
  const num = Number(trimmedStr);
32961
33061
  const parsedStr = String(num);
32962
33062
  if (num === 0) return num;
32963
- if (parsedStr.search(/[eE]/) !== -1) if (options.eNotation) return num;
32964
- else return str;
32965
- else if (trimmedStr.indexOf(".") !== -1) if (parsedStr === "0") return num;
32966
- else if (parsedStr === numTrimmedByZeros) return num;
32967
- else if (parsedStr === `${sign}${numTrimmedByZeros}`) return num;
32968
- else return str;
33063
+ if (parsedStr.search(/[eE]/) !== -1) {
33064
+ if (options.eNotation) return num;
33065
+ else return str;
33066
+ } else if (trimmedStr.indexOf(".") !== -1) {
33067
+ if (parsedStr === "0") return num;
33068
+ else if (parsedStr === numTrimmedByZeros) return num;
33069
+ else if (parsedStr === `${sign}${numTrimmedByZeros}`) return num;
33070
+ else return str;
33071
+ }
32969
33072
  let n = leadingZeros ? numTrimmedByZeros : trimmedStr;
32970
33073
  if (leadingZeros) return n === parsedStr || sign + n === parsedStr ? num : str;
32971
33074
  else return n === parsedStr || n === sign + parsedStr ? num : str;
@@ -32984,11 +33087,12 @@ function resolveEnotation(str, trimmedStr, options) {
32984
33087
  const eAdjacentToLeadingZeros = sign ? str[leadingZeros.length + 1] === eChar : str[leadingZeros.length] === eChar;
32985
33088
  if (leadingZeros.length > 1 && eAdjacentToLeadingZeros) return str;
32986
33089
  else if (leadingZeros.length === 1 && (notation[3].startsWith(`.${eChar}`) || notation[3][0] === eChar)) return Number(trimmedStr);
32987
- else if (leadingZeros.length > 0) if (options.leadingZeros && !eAdjacentToLeadingZeros) {
32988
- trimmedStr = (notation[1] || "") + notation[3];
32989
- return Number(trimmedStr);
32990
- } else return str;
32991
- else return Number(trimmedStr);
33090
+ else if (leadingZeros.length > 0) {
33091
+ if (options.leadingZeros && !eAdjacentToLeadingZeros) {
33092
+ trimmedStr = (notation[1] || "") + notation[3];
33093
+ return Number(trimmedStr);
33094
+ } else return str;
33095
+ } else return Number(trimmedStr);
32992
33096
  } else return str;
32993
33097
  }
32994
33098
  /**
@@ -32998,7 +33102,9 @@ function resolveEnotation(str, trimmedStr, options) {
32998
33102
  */
32999
33103
  function trimZeros(numStr) {
33000
33104
  if (numStr && numStr.indexOf(".") !== -1) {
33001
- numStr = numStr.replace(/0+$/, "");
33105
+ let end = numStr.length;
33106
+ while (end > 0 && numStr.charCodeAt(end - 1) === 48) end--;
33107
+ numStr = numStr.slice(0, end);
33002
33108
  if (numStr === ".") numStr = "0";
33003
33109
  else if (numStr[0] === ".") numStr = "0" + numStr;
33004
33110
  else if (numStr[numStr.length - 1] === ".") numStr = numStr.substring(0, numStr.length - 1);
@@ -33031,7 +33137,7 @@ function handleInfinity(str, num, options) {
33031
33137
  }
33032
33138
  }
33033
33139
  //#endregion
33034
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.1/node_modules/fast-xml-parser/src/ignoreAttributes.js
33140
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.11.0/node_modules/fast-xml-parser/src/ignoreAttributes.js
33035
33141
  function getIgnoreAttributesFn(ignoreAttributes) {
33036
33142
  if (typeof ignoreAttributes === "function") return ignoreAttributes;
33037
33143
  if (Array.isArray(ignoreAttributes)) return (attrName) => {
@@ -33080,19 +33186,20 @@ var Expression = class {
33080
33186
  const segments = [];
33081
33187
  let i = 0;
33082
33188
  let currentPart = "";
33083
- while (i < pattern.length) if (pattern[i] === this.separator) if (i + 1 < pattern.length && pattern[i + 1] === this.separator) {
33084
- if (currentPart.trim()) {
33085
- segments.push(this._parseSegment(currentPart.trim()));
33189
+ while (i < pattern.length) if (pattern[i] === this.separator) {
33190
+ if (i + 1 < pattern.length && pattern[i + 1] === this.separator) {
33191
+ if (currentPart.trim()) {
33192
+ segments.push(this._parseSegment(currentPart.trim()));
33193
+ currentPart = "";
33194
+ }
33195
+ segments.push({ type: "deep-wildcard" });
33196
+ i += 2;
33197
+ } else {
33198
+ if (currentPart.trim()) segments.push(this._parseSegment(currentPart.trim()));
33086
33199
  currentPart = "";
33200
+ i++;
33087
33201
  }
33088
- segments.push({ type: "deep-wildcard" });
33089
- i += 2;
33090
33202
  } else {
33091
- if (currentPart.trim()) segments.push(this._parseSegment(currentPart.trim()));
33092
- currentPart = "";
33093
- i++;
33094
- }
33095
- else {
33096
33203
  currentPart += pattern[i];
33097
33204
  i++;
33098
33205
  }
@@ -33144,11 +33251,13 @@ var Expression = class {
33144
33251
  if (!tag) throw new Error(`Invalid segment pattern: ${part}`);
33145
33252
  segment.tag = tag;
33146
33253
  if (namespace) segment.namespace = namespace;
33147
- if (bracketContent) if (bracketContent.includes("=")) {
33148
- const eqIndex = bracketContent.indexOf("=");
33149
- segment.attrName = bracketContent.substring(0, eqIndex).trim();
33150
- segment.attrValue = bracketContent.substring(eqIndex + 1).trim();
33151
- } else segment.attrName = bracketContent.trim();
33254
+ if (bracketContent) {
33255
+ if (bracketContent.includes("=")) {
33256
+ const eqIndex = bracketContent.indexOf("=");
33257
+ segment.attrName = bracketContent.substring(0, eqIndex).trim();
33258
+ segment.attrValue = bracketContent.substring(eqIndex + 1).trim();
33259
+ } else segment.attrName = bracketContent.trim();
33260
+ }
33152
33261
  if (positionMatch) {
33153
33262
  const nthMatch = positionMatch.match(/^nth\((\d+)\)$/);
33154
33263
  if (nthMatch) {
@@ -34713,7 +34822,7 @@ function isUnsafe(value, context) {
34713
34822
  return false;
34714
34823
  }
34715
34824
  //#endregion
34716
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.1/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js
34825
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.11.0/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js
34717
34826
  /**
34718
34827
  * Extract raw attributes (without prefix) from prefixed attribute map
34719
34828
  * @param {object} prefixedAttrs - Attributes with prefix from buildAttributesMap
@@ -34919,7 +35028,8 @@ const parseXml = function(xmlData) {
34919
35028
  }
34920
35029
  this.matcher.pop();
34921
35030
  this.isCurrentNodeStopNode = false;
34922
- currentNode = this.tagsNodeStack.pop();
35031
+ currentNode = this.tagsNodeStack.pop() || xmlObj;
35032
+ if (options.captureMetaData && currentNode) currentNode.addEndIndex(closeIndex + 1);
34923
35033
  textData = "";
34924
35034
  i = closeIndex;
34925
35035
  } else if (c1 === 63) {
@@ -34937,6 +35047,7 @@ const parseXml = function(xmlData) {
34937
35047
  childNode.add(options.textNodeName, "");
34938
35048
  if (tagData.tagName !== tagData.tagExp && tagData.attrExpPresent && options.ignoreAttributes !== true) childNode[":@"] = attsMap;
34939
35049
  this.addChild(currentNode, childNode, this.readonlyMatcher, i);
35050
+ if (options.captureMetaData) currentNode.addEndIndex(tagData.closeIndex + 2);
34940
35051
  }
34941
35052
  i = tagData.closeIndex + 1;
34942
35053
  } else if (c1 === 33 && xmlData.charCodeAt(i + 2) === 45 && xmlData.charCodeAt(i + 3) === 45) {
@@ -35018,18 +35129,21 @@ const parseXml = function(xmlData) {
35018
35129
  this.matcher.pop();
35019
35130
  this.isCurrentNodeStopNode = false;
35020
35131
  this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
35132
+ if (options.captureMetaData) currentNode.addEndIndex(i + 1);
35021
35133
  } else {
35022
35134
  if (isSelfClosing) {
35023
35135
  ({tagName, tagExp} = transformTagName(options.transformTagName, tagName, tagExp, options));
35024
35136
  const childNode = new XmlNode(tagName);
35025
35137
  if (prefixedAttrs) childNode[":@"] = prefixedAttrs;
35026
35138
  this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
35139
+ if (options.captureMetaData) currentNode.addEndIndex(closeIndex + 1);
35027
35140
  this.matcher.pop();
35028
35141
  this.isCurrentNodeStopNode = false;
35029
35142
  } else if (options.unpairedTagsSet.has(tagName)) {
35030
35143
  const childNode = new XmlNode(tagName);
35031
35144
  if (prefixedAttrs) childNode[":@"] = prefixedAttrs;
35032
35145
  this.addChild(currentNode, childNode, this.readonlyMatcher, startIndex);
35146
+ if (options.captureMetaData) currentNode.addEndIndex(result.closeIndex + 1);
35033
35147
  this.matcher.pop();
35034
35148
  this.isCurrentNodeStopNode = false;
35035
35149
  i = result.closeIndex;
@@ -35111,22 +35225,23 @@ function tagExpWithClosingIndex(xmlData, i, closingChar = ">") {
35111
35225
  if (attrBoundary) {
35112
35226
  if (code === attrBoundary) attrBoundary = 0;
35113
35227
  } else if (code === 34 || code === 39) attrBoundary = code;
35114
- else if (code === closeCode0) if (closeCode1 !== -1) {
35115
- if (xmlData.charCodeAt(index + 1) === closeCode1) {
35228
+ else if (code === closeCode0) {
35229
+ if (closeCode1 !== -1) {
35230
+ if (xmlData.charCodeAt(index + 1) === closeCode1) {
35231
+ result += xmlData.substring(segmentStart, index);
35232
+ return {
35233
+ data: result,
35234
+ index
35235
+ };
35236
+ }
35237
+ } else {
35116
35238
  result += xmlData.substring(segmentStart, index);
35117
35239
  return {
35118
35240
  data: result,
35119
35241
  index
35120
35242
  };
35121
35243
  }
35122
- } else {
35123
- result += xmlData.substring(segmentStart, index);
35124
- return {
35125
- data: result,
35126
- index
35127
- };
35128
- }
35129
- else if (code === 9 && !attrBoundary) {
35244
+ } else if (code === 9 && !attrBoundary) {
35130
35245
  result += xmlData.substring(segmentStart, index) + " ";
35131
35246
  segmentStart = index + 1;
35132
35247
  }
@@ -35231,7 +35346,7 @@ function sanitizeName(name, options) {
35231
35346
  return name;
35232
35347
  }
35233
35348
  //#endregion
35234
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.1/node_modules/fast-xml-parser/src/xmlparser/node2json.js
35349
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.11.0/node_modules/fast-xml-parser/src/xmlparser/node2json.js
35235
35350
  const METADATA_SYMBOL = XmlNode.getMetaDataSymbol();
35236
35351
  /**
35237
35352
  * Helper function to strip attribute prefix from attribute map
@@ -35275,17 +35390,20 @@ function compress(arr, options, matcher, readonlyMatcher) {
35275
35390
  const rawAttrs = stripAttributePrefix(tagObj[":@"] || {}, options.attributeNamePrefix);
35276
35391
  matcher.push(property, rawAttrs);
35277
35392
  }
35278
- if (property === options.textNodeName) if (text === void 0) text = tagObj[property];
35279
- else text += "" + tagObj[property];
35280
- else if (property === void 0) continue;
35393
+ if (property === options.textNodeName) {
35394
+ if (text === void 0) text = tagObj[property];
35395
+ else text += "" + tagObj[property];
35396
+ } else if (property === void 0) continue;
35281
35397
  else if (tagObj[property]) {
35282
35398
  let val = compress(tagObj[property], options, matcher, readonlyMatcher);
35283
35399
  const isLeaf = isLeafTag(val, options);
35284
35400
  if (Object.keys(val).length === 0 && options.alwaysCreateTextNode) val[options.textNodeName] = "";
35285
35401
  if (tagObj[":@"]) assignAttributes(val, tagObj[":@"], readonlyMatcher, options);
35286
35402
  else if (Object.keys(val).length === 1 && val[options.textNodeName] !== void 0 && !options.alwaysCreateTextNode) val = val[options.textNodeName];
35287
- else if (Object.keys(val).length === 0) if (options.alwaysCreateTextNode) val[options.textNodeName] = "";
35288
- else val = "";
35403
+ else if (Object.keys(val).length === 0) {
35404
+ if (options.alwaysCreateTextNode) val[options.textNodeName] = "";
35405
+ else val = "";
35406
+ }
35289
35407
  if (tagObj[METADATA_SYMBOL] !== void 0 && typeof val === "object" && val !== null) val[METADATA_SYMBOL] = tagObj[METADATA_SYMBOL];
35290
35408
  if (compressedObj[property] !== void 0 && Object.prototype.hasOwnProperty.call(compressedObj, property)) {
35291
35409
  if (!Array.isArray(compressedObj[property])) compressedObj[property] = [compressedObj[property]];
@@ -35331,7 +35449,7 @@ function isLeafTag(obj, options) {
35331
35449
  return false;
35332
35450
  }
35333
35451
  //#endregion
35334
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.1/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js
35452
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.11.0/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js
35335
35453
  var XMLParser = class {
35336
35454
  constructor(options) {
35337
35455
  this.externalEntities = {};
@@ -35997,7 +36115,8 @@ const byArticle$4 = make$16("by-article", {
35997
36115
  }, ({ id, lang, onlyDb }) => gen(function* () {
35998
36116
  const ai = yield* Ai;
35999
36117
  const renderer = yield* Renderer;
36000
- const refId = yield* resolveArticleId(yield* Resolver, id);
36118
+ const resolver = yield* Resolver;
36119
+ const refId = yield* resolveArticleId(resolver, id);
36001
36120
  const res = yield* ai.getInsightsByArticle(refId, {
36002
36121
  lang: unwrap$18(lang),
36003
36122
  onlyDb
@@ -36976,12 +37095,14 @@ const refresh = make$16("refresh", {
36976
37095
  }, ({ id, to, force, noWait }) => gen(function* () {
36977
37096
  const ai = yield* Ai;
36978
37097
  const renderer = yield* Renderer;
36979
- const refId = yield* resolveArticleId(yield* Resolver, id);
36980
- const final = yield* followTask(ai, renderer, yield* ai.refreshInsights({
37098
+ const resolver = yield* Resolver;
37099
+ const refId = yield* resolveArticleId(resolver, id);
37100
+ const created = yield* ai.refreshInsights({
36981
37101
  refId,
36982
37102
  targetLanguages: to.length ? to : void 0,
36983
37103
  force
36984
- }), noWait);
37104
+ });
37105
+ const final = yield* followTask(ai, renderer, created, noWait);
36985
37106
  yield* renderer.emit(aiTaskView, final);
36986
37107
  })).pipe(withDescription("refresh AI insights for an article"));
36987
37108
  const translate$1 = make$16("translate", {
@@ -36992,12 +37113,14 @@ const translate$1 = make$16("translate", {
36992
37113
  }, ({ id, to, force, noWait }) => gen(function* () {
36993
37114
  const ai = yield* Ai;
36994
37115
  const renderer = yield* Renderer;
36995
- const refId = yield* resolveArticleId(yield* Resolver, id);
36996
- const final = yield* followTask(ai, renderer, yield* ai.translateInsights({
37116
+ const resolver = yield* Resolver;
37117
+ const refId = yield* resolveArticleId(resolver, id);
37118
+ const created = yield* ai.translateInsights({
36997
37119
  refId,
36998
37120
  targetLang: to,
36999
37121
  force
37000
- }), noWait);
37122
+ });
37123
+ const final = yield* followTask(ai, renderer, created, noWait);
37001
37124
  yield* renderer.emit(aiTaskView, final);
37002
37125
  })).pipe(withDescription("translate the existing AI insights into another language"));
37003
37126
  //#endregion
@@ -37014,7 +37137,8 @@ const insightsCmd = make$16("insights").pipe(withDescription("manage AI insights
37014
37137
  const byArticle$3 = make$16("by-article", { id: text$6({ name: "idOrSlug" }) }, ({ id }) => gen(function* () {
37015
37138
  const ai = yield* Ai;
37016
37139
  const renderer = yield* Renderer;
37017
- const refId = yield* resolveArticleId(yield* Resolver, id);
37140
+ const resolver = yield* Resolver;
37141
+ const refId = yield* resolveArticleId(resolver, id);
37018
37142
  const res = yield* ai.getOverviewByArticle(refId);
37019
37143
  yield* renderer.emitSuccess(res);
37020
37144
  })).pipe(withDescription("show the AI artifact overview for one article"));
@@ -37061,7 +37185,8 @@ const byArticle$2 = make$16("by-article", {
37061
37185
  }, ({ id, lang, onlyDb }) => gen(function* () {
37062
37186
  const ai = yield* Ai;
37063
37187
  const renderer = yield* Renderer;
37064
- const refId = yield* resolveArticleId(yield* Resolver, id);
37188
+ const resolver = yield* Resolver;
37189
+ const refId = yield* resolveArticleId(resolver, id);
37065
37190
  const res = yield* ai.getSummariesByArticle(refId, {
37066
37191
  lang: unwrap$15(lang),
37067
37192
  onlyDb
@@ -37156,12 +37281,14 @@ const regen = make$16("regen", {
37156
37281
  }, ({ id, to, force, noWait }) => gen(function* () {
37157
37282
  const ai = yield* Ai;
37158
37283
  const renderer = yield* Renderer;
37159
- const refId = yield* resolveArticleId(yield* Resolver, id);
37160
- const final = yield* followTask(ai, renderer, yield* ai.regenSummary({
37284
+ const resolver = yield* Resolver;
37285
+ const refId = yield* resolveArticleId(resolver, id);
37286
+ const created = yield* ai.regenSummary({
37161
37287
  refId,
37162
37288
  targetLanguages: to.length ? to : void 0,
37163
37289
  force
37164
- }), noWait);
37290
+ });
37291
+ const final = yield* followTask(ai, renderer, created, noWait);
37165
37292
  yield* renderer.emit(aiTaskView, final);
37166
37293
  })).pipe(withDescription("regenerate the AI summary for an article"));
37167
37294
  const translate = make$16("translate", {
@@ -37172,12 +37299,14 @@ const translate = make$16("translate", {
37172
37299
  }, ({ id, to, force, noWait }) => gen(function* () {
37173
37300
  const ai = yield* Ai;
37174
37301
  const renderer = yield* Renderer;
37175
- const refId = yield* resolveArticleId(yield* Resolver, id);
37176
- const final = yield* followTask(ai, renderer, yield* ai.translateSummary({
37302
+ const resolver = yield* Resolver;
37303
+ const refId = yield* resolveArticleId(resolver, id);
37304
+ const created = yield* ai.translateSummary({
37177
37305
  refId,
37178
37306
  targetLang: to,
37179
37307
  force
37180
- }), noWait);
37308
+ });
37309
+ const final = yield* followTask(ai, renderer, created, noWait);
37181
37310
  yield* renderer.emit(aiTaskView, final);
37182
37311
  })).pipe(withDescription("translate the existing AI summary into another language"));
37183
37312
  //#endregion
@@ -37202,7 +37331,8 @@ const byArticle$1 = make$16("by-article", {
37202
37331
  }, ({ id, lang }) => gen(function* () {
37203
37332
  const ai = yield* Ai;
37204
37333
  const renderer = yield* Renderer;
37205
- const refId = yield* resolveArticleId(yield* Resolver, id);
37334
+ const resolver = yield* Resolver;
37335
+ const refId = yield* resolveArticleId(resolver, id);
37206
37336
  const res = yield* ai.getTranslationsByArticle(refId, { lang: unwrap$13(lang) });
37207
37337
  yield* renderer.emitSuccess(res);
37208
37338
  })).pipe(withDescription("show an article's translations"));
@@ -37413,7 +37543,8 @@ const get$11 = make$16("get", { recordId: text$6({ name: "recordId" }) }, ({ rec
37413
37543
  const languages = make$16("languages", { id: text$6({ name: "idOrSlug" }) }, ({ id }) => gen(function* () {
37414
37544
  const ai = yield* Ai;
37415
37545
  const renderer = yield* Renderer;
37416
- const refId = yield* resolveArticleId(yield* Resolver, id);
37546
+ const resolver = yield* Resolver;
37547
+ const refId = yield* resolveArticleId(resolver, id);
37417
37548
  const res = yield* ai.getTranslationLanguages(refId);
37418
37549
  yield* renderer.emitSuccess(res);
37419
37550
  })).pipe(withDescription("list languages an article has been translated into"));
@@ -37447,12 +37578,14 @@ const run$2 = make$16("run", {
37447
37578
  if (!to.length) return yield* fail$8(new ValidationFailed({ message: "at least one --to <lang> is required" }));
37448
37579
  const ai = yield* Ai;
37449
37580
  const renderer = yield* Renderer;
37450
- const refId = yield* resolveArticleId(yield* Resolver, id);
37451
- const final = yield* followTask(ai, renderer, yield* ai.translate({
37581
+ const resolver = yield* Resolver;
37582
+ const refId = yield* resolveArticleId(resolver, id);
37583
+ const created = yield* ai.translate({
37452
37584
  refId,
37453
37585
  targetLanguages: to,
37454
37586
  force
37455
- }), noWait);
37587
+ });
37588
+ const final = yield* followTask(ai, renderer, created, noWait);
37456
37589
  yield* renderer.emit(aiTaskView, final);
37457
37590
  })).pipe(withDescription("translate an article into one or more languages"));
37458
37591
  //#endregion
@@ -37470,7 +37603,8 @@ const translateCmd = make$16("translate").pipe(withDescription("manage AI transl
37470
37603
  const byArticle = make$16("by-article", { id: text$6({ name: "idOrSlug" }) }, ({ id }) => gen(function* () {
37471
37604
  const ai = yield* Ai;
37472
37605
  const renderer = yield* Renderer;
37473
- const refId = yield* resolveArticleId(yield* Resolver, id);
37606
+ const resolver = yield* Resolver;
37607
+ const refId = yield* resolveArticleId(resolver, id);
37474
37608
  const res = yield* ai.getTtsByArticle(refId);
37475
37609
  yield* renderer.emitSuccess(res);
37476
37610
  })).pipe(withDescription("show an article's AI narrations (all rows)"));
@@ -37515,12 +37649,14 @@ const run$1 = make$16("run", {
37515
37649
  }, ({ id, to, force, noWait }) => gen(function* () {
37516
37650
  const ai = yield* Ai;
37517
37651
  const renderer = yield* Renderer;
37518
- const refId = yield* resolveArticleId(yield* Resolver, id);
37519
- const final = yield* followTask(ai, renderer, yield* ai.runTts({
37652
+ const resolver = yield* Resolver;
37653
+ const refId = yield* resolveArticleId(resolver, id);
37654
+ const created = yield* ai.runTts({
37520
37655
  refId,
37521
37656
  targetLanguages: to.length ? to : void 0,
37522
37657
  force
37523
- }), noWait);
37658
+ });
37659
+ const final = yield* followTask(ai, renderer, created, noWait);
37524
37660
  yield* renderer.emit(aiTaskView, final);
37525
37661
  })).pipe(withDescription("generate AI narration for an article"));
37526
37662
  const voices = make$16("voices", {
@@ -37639,27 +37775,27 @@ const isWsl = () => {
37639
37775
  var is_wsl_default = process$1.env.__IS_WSL_TEST__ ? isWsl : isWsl();
37640
37776
  //#endregion
37641
37777
  //#region ../../node_modules/.pnpm/powershell-utils@0.1.0/node_modules/powershell-utils/index.js
37642
- const execFile$2 = promisify(childProcess.execFile);
37643
- const powerShellPath$1 = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
37644
- const executePowerShell = async (command, options = {}) => {
37778
+ const execFile$3 = promisify(childProcess.execFile);
37779
+ const powerShellPath$2 = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
37780
+ const executePowerShell$1 = async (command, options = {}) => {
37645
37781
  const { powerShellPath: psPath, ...execFileOptions } = options;
37646
- const encodedCommand = executePowerShell.encodeCommand(command);
37647
- return execFile$2(psPath ?? powerShellPath$1(), [...executePowerShell.argumentsPrefix, encodedCommand], {
37782
+ const encodedCommand = executePowerShell$1.encodeCommand(command);
37783
+ return execFile$3(psPath ?? powerShellPath$2(), [...executePowerShell$1.argumentsPrefix, encodedCommand], {
37648
37784
  encoding: "utf8",
37649
37785
  ...execFileOptions
37650
37786
  });
37651
37787
  };
37652
- executePowerShell.argumentsPrefix = [
37788
+ executePowerShell$1.argumentsPrefix = [
37653
37789
  "-NoProfile",
37654
37790
  "-NonInteractive",
37655
37791
  "-ExecutionPolicy",
37656
37792
  "Bypass",
37657
37793
  "-EncodedCommand"
37658
37794
  ];
37659
- executePowerShell.encodeCommand = (command) => Buffer$1.from(command, "utf16le").toString("base64");
37660
- executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
37795
+ executePowerShell$1.encodeCommand = (command) => Buffer$1.from(command, "utf16le").toString("base64");
37796
+ executePowerShell$1.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
37661
37797
  //#endregion
37662
- //#region ../../node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/utilities.js
37798
+ //#region ../../node_modules/.pnpm/wsl-utils@1.0.0/node_modules/wsl-utils/utilities.js
37663
37799
  function parseMountPointFromConfig(content) {
37664
37800
  for (const line of content.split("\n")) {
37665
37801
  if (/^\s*#/.test(line)) continue;
@@ -37669,8 +37805,8 @@ function parseMountPointFromConfig(content) {
37669
37805
  }
37670
37806
  }
37671
37807
  //#endregion
37672
- //#region ../../node_modules/.pnpm/wsl-utils@0.3.1/node_modules/wsl-utils/index.js
37673
- const execFile$1 = promisify(childProcess.execFile);
37808
+ //#region ../../node_modules/.pnpm/wsl-utils@1.0.0/node_modules/wsl-utils/index.js
37809
+ const execFile$2 = promisify(childProcess.execFile);
37674
37810
  const wslDrivesMountPoint = (() => {
37675
37811
  const defaultMountPoint = "/mnt/";
37676
37812
  let mountPoint;
@@ -37693,12 +37829,12 @@ const wslDrivesMountPoint = (() => {
37693
37829
  const powerShellPathFromWsl = async () => {
37694
37830
  return `${await wslDrivesMountPoint()}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
37695
37831
  };
37696
- const powerShellPath = is_wsl_default ? powerShellPathFromWsl : powerShellPath$1;
37832
+ const powerShellPath$1 = is_wsl_default ? powerShellPathFromWsl : powerShellPath$2;
37697
37833
  let canAccessPowerShellPromise;
37698
37834
  const canAccessPowerShell = async () => {
37699
37835
  canAccessPowerShellPromise ??= (async () => {
37700
37836
  try {
37701
- const psPath = await powerShellPath();
37837
+ const psPath = await powerShellPath$1();
37702
37838
  await fs$1.access(psPath, constants.X_OK);
37703
37839
  return true;
37704
37840
  } catch {
@@ -37708,19 +37844,57 @@ const canAccessPowerShell = async () => {
37708
37844
  return canAccessPowerShellPromise;
37709
37845
  };
37710
37846
  const wslDefaultBrowser = async () => {
37711
- const psPath = await powerShellPath();
37712
- const { stdout } = await executePowerShell(String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`, { powerShellPath: psPath });
37847
+ const psPath = await powerShellPath$1();
37848
+ const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
37849
+ const { stdout } = await executePowerShell$1(command, {
37850
+ powerShellPath: psPath,
37851
+ cwd: path.dirname(psPath)
37852
+ });
37713
37853
  return stdout.trim();
37714
37854
  };
37715
- const convertWslPathToWindows = async (path) => {
37716
- if (/^[a-z]+:\/\//i.test(path)) return path;
37717
- try {
37718
- const { stdout } = await execFile$1("wslpath", ["-aw", path], { encoding: "utf8" });
37719
- return stdout.trim();
37720
- } catch {
37721
- return path;
37722
- }
37855
+ const isUrl = (path) => /^[a-z]+:\/\//i.test(path);
37856
+ const convertWslPathToWindows = async (paths) => {
37857
+ const isBatch = Array.isArray(paths);
37858
+ const pathArray = isBatch ? paths : [paths];
37859
+ const indicesToConvert = [];
37860
+ const pathsToConvert = [];
37861
+ for (const [index, path] of pathArray.entries()) if (!isUrl(path)) {
37862
+ indicesToConvert.push(index);
37863
+ pathsToConvert.push(path);
37864
+ }
37865
+ const results = [...pathArray];
37866
+ if (pathsToConvert.length > 0) try {
37867
+ const { stdout } = await execFile$2("wslpath", ["-aw", ...pathsToConvert], { encoding: "utf8" });
37868
+ const convertedPaths = stdout.split(/\r?\n/).filter(Boolean);
37869
+ for (const [index, originalIndex] of indicesToConvert.entries()) results[originalIndex] = convertedPaths[index] ?? pathArray[originalIndex];
37870
+ } catch {}
37871
+ return isBatch ? results : results[0];
37872
+ };
37873
+ //#endregion
37874
+ //#region ../../node_modules/.pnpm/powershell-utils@0.2.0/node_modules/powershell-utils/index.js
37875
+ const execFile$1 = promisify(childProcess.execFile);
37876
+ const powerShellPath = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
37877
+ const argumentsPrefix = [
37878
+ "-NoProfile",
37879
+ "-NonInteractive",
37880
+ "-ExecutionPolicy",
37881
+ "Bypass",
37882
+ "-EncodedCommand"
37883
+ ];
37884
+ const encodeCommand = (command) => Buffer$1.from(command, "utf16le").toString("base64");
37885
+ const escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
37886
+ const createArguments = (command) => [...argumentsPrefix, encodeCommand(command)];
37887
+ const executePowerShell = async (command, options = {}) => {
37888
+ const { powerShellPath: psPath, ...execFileOptions } = options;
37889
+ return execFile$1(psPath ?? powerShellPath(), createArguments(command), {
37890
+ encoding: "utf8",
37891
+ ...execFileOptions
37892
+ });
37723
37893
  };
37894
+ executePowerShell.argumentsPrefix = argumentsPrefix;
37895
+ executePowerShell.encodeCommand = encodeCommand;
37896
+ executePowerShell.escapeArgument = escapeArgument;
37897
+ executePowerShell.createArguments = createArguments;
37724
37898
  //#endregion
37725
37899
  //#region ../../node_modules/.pnpm/define-lazy-prop@3.0.0/node_modules/define-lazy-prop/index.js
37726
37900
  function defineLazyProperty(object, propertyName, valueGetter) {
@@ -37898,7 +38072,7 @@ async function defaultBrowser() {
37898
38072
  //#region ../../node_modules/.pnpm/is-in-ssh@1.0.0/node_modules/is-in-ssh/index.js
37899
38073
  const isInSsh = Boolean(process$1.env.SSH_CONNECTION || process$1.env.SSH_CLIENT || process$1.env.SSH_TTY);
37900
38074
  //#endregion
37901
- //#region ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
38075
+ //#region ../../node_modules/.pnpm/open@11.0.1/node_modules/open/index.js
37902
38076
  const fallbackAttemptSymbol = Symbol("fallbackAttempt");
37903
38077
  const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
37904
38078
  const localXdgOpenPath = path.join(__dirname, "xdg-open");
@@ -37990,7 +38164,7 @@ const baseOpen = async (options) => {
37990
38164
  if (options.newInstance) cliArguments.push("--new");
37991
38165
  if (app) cliArguments.push("-a", app);
37992
38166
  } else if (platform$1 === "win32" || shouldUseWindowsInWsl) {
37993
- command = await powerShellPath();
38167
+ command = await powerShellPath$1();
37994
38168
  cliArguments.push(...executePowerShell.argumentsPrefix);
37995
38169
  if (!is_wsl_default) childProcessOptions.windowsVerbatimArguments = true;
37996
38170
  if (is_wsl_default && options.target) options.target = await convertWslPathToWindows(options.target);
@@ -38006,6 +38180,7 @@ const baseOpen = async (options) => {
38006
38180
  }
38007
38181
  options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
38008
38182
  if (!options.wait) childProcessOptions.stdio = "ignore";
38183
+ if (is_wsl_default) childProcessOptions.cwd = path.dirname(command);
38009
38184
  } else {
38010
38185
  if (app) command = app;
38011
38186
  else {
@@ -38463,13 +38638,14 @@ const login = make$16("login", { production: production$1 }, ({ production }) =>
38463
38638
  else if (!opts.quiet && code.verification_uri_complete) yield* sync$2(() => {
38464
38639
  open(code.verification_uri_complete).catch(() => void 0);
38465
38640
  });
38466
- const cred = toCredentials(yield* auth.pollDeviceToken(probeResult.authBase, DEFAULT_CLIENT_ID, code.device_code, {
38641
+ const token = yield* auth.pollDeviceToken(probeResult.authBase, DEFAULT_CLIENT_ID, code.device_code, {
38467
38642
  intervalSec: code.interval,
38468
38643
  expiresInSec: code.expires_in,
38469
38644
  onTick: (state) => {
38470
38645
  if (state === "slow_down" && !opts.quiet && !opts.json) process.stderr.write("slow_down — increasing interval\n");
38471
38646
  }
38472
- }));
38647
+ });
38648
+ const cred = toCredentials(token);
38473
38649
  const target = targetProfile?.trim() || DEFAULT_PROFILE;
38474
38650
  const existing = yield* config.readProfileConfig(target).pipe(catchAll$1(() => succeed$7({})));
38475
38651
  const productionFlag = getOrElse(production, () => void 0);
@@ -38497,7 +38673,8 @@ const login = make$16("login", { production: production$1 }, ({ production }) =>
38497
38673
  const name = user.name ?? user.email ?? "";
38498
38674
  const email = user.name && user.email ? ` (${user.email})` : "";
38499
38675
  const role = user.role;
38500
- return `${head}\n ${dim(role ? `${name}${email} · ${role}` : `${name}${email}`, color)}`;
38676
+ const meta = role ? `${name}${email} · ${role}` : `${name}${email}`;
38677
+ return `${head}\n ${dim(meta, color)}`;
38501
38678
  });
38502
38679
  }));
38503
38680
  //#endregion
@@ -38966,7 +39143,8 @@ const authorOf = (doc) => {
38966
39143
  };
38967
39144
  const refLabel = (doc) => {
38968
39145
  const refType = firstString(doc, "ref_type", "refType");
38969
- const title = firstString(asRecord(first(doc, "ref")), "title", "slug", "id");
39146
+ const ref = asRecord(first(doc, "ref"));
39147
+ const title = firstString(ref, "title", "slug", "id");
38970
39148
  if (refType && title) return `${refType}:${title}`;
38971
39149
  if (refType) return refType;
38972
39150
  return "";
@@ -38988,8 +39166,9 @@ const collectDetailFields = (doc) => {
38988
39166
  };
38989
39167
  const renderCommentReadable = (data, color) => {
38990
39168
  const doc = normalize$4(data);
39169
+ const title = `comment from ${authorOf(doc)}`;
38991
39170
  return renderMetadataBlock({
38992
- title: `comment from ${authorOf(doc)}`,
39171
+ title,
38993
39172
  kind: "comment",
38994
39173
  fields: collectDetailFields(doc),
38995
39174
  body: firstString(doc, "text") || void 0,
@@ -39012,7 +39191,8 @@ const commentView = {
39012
39191
  llm: (data) => renderCommentLlm(data)
39013
39192
  };
39014
39193
  const renderListHeader = (payload, rowCount, color) => {
39015
- const pagination = asRecord(first(asRecord(first(payload, "meta")), "pagination"));
39194
+ const envelopeMeta = asRecord(first(payload, "meta"));
39195
+ const pagination = asRecord(first(envelopeMeta, "pagination"));
39016
39196
  const page = first(pagination, "page", "currentPage");
39017
39197
  const size = first(pagination, "size", "pageSize");
39018
39198
  const total = first(pagination, "total", "totalCount", "total_count");
@@ -40115,7 +40295,9 @@ const unwrapData = (res) => {
40115
40295
  //#endregion
40116
40296
  //#region src/cli/draft/create.ts
40117
40297
  const create$6 = make$16("create", postWriteOptions, (opts) => gen(function* () {
40118
- const payload = yield* resolveCategoryRefs({ ...(yield* buildPostPayload(toPostFlagInputs(opts))).payload });
40298
+ const flags = toPostFlagInputs(opts);
40299
+ const built = yield* buildPostPayload(flags);
40300
+ const payload = yield* resolveCategoryRefs({ ...built.payload });
40119
40301
  delete payload.isPublished;
40120
40302
  if (Object.keys(payload).filter((k) => k !== "contentFormat").length === 0) return yield* fail$8(new ValidationFailed({ message: "nothing to save: provide --file or content/meta flags" }));
40121
40303
  const body = splitDraftBody(payload);
@@ -40223,7 +40405,9 @@ const update$6 = make$16("update", {
40223
40405
  id: text$6({ name: "id" }),
40224
40406
  ...postWriteOptions
40225
40407
  }, ({ id, ...rest }) => gen(function* () {
40226
- const payload = yield* resolveCategoryRefs({ ...(yield* buildPostPayload(toPostFlagInputs(rest))).payload });
40408
+ const flags = toPostFlagInputs(rest);
40409
+ const built = yield* buildPostPayload(flags);
40410
+ const payload = yield* resolveCategoryRefs({ ...built.payload });
40227
40411
  delete payload.isPublished;
40228
40412
  if (Object.keys(payload).filter((k) => k !== "contentFormat").length === 0) return yield* fail$8(new ValidationFailed({ message: "nothing to update: provide --file or content/meta flags" }));
40229
40413
  const body = splitDraftBody(payload);
@@ -40486,7 +40670,9 @@ const resolveTopicRefs = (payload) => gen(function* () {
40486
40670
  //#endregion
40487
40671
  //#region src/cli/note/create.ts
40488
40672
  const create$5 = make$16("create", noteWriteOptions, (opts) => gen(function* () {
40489
- const payload = yield* resolveTopicRefs((yield* buildNotePayload(toNoteFlagInputs(opts))).payload);
40673
+ const flags = toNoteFlagInputs(opts);
40674
+ const built = yield* buildNotePayload(flags);
40675
+ const payload = yield* resolveTopicRefs(built.payload);
40490
40676
  const api = yield* Api;
40491
40677
  const renderer = yield* Renderer;
40492
40678
  const res = yield* api.request("/notes", {
@@ -40586,7 +40772,8 @@ const edit$4 = make$16("edit", {
40586
40772
  content: parsed.contentXml,
40587
40773
  format: flags.format ?? "lexical"
40588
40774
  });
40589
- const resolved = yield* resolveTopicRefs(applyNoteEnvelopeMeta(built.payload, parsed.meta));
40775
+ const payload = applyNoteEnvelopeMeta(built.payload, parsed.meta);
40776
+ const resolved = yield* resolveTopicRefs(payload);
40590
40777
  const id = yield* resolver.resolveNoteId(slugOrId);
40591
40778
  const res = yield* api.request(`/notes/${id}`, {
40592
40779
  method: "PUT",
@@ -40595,7 +40782,8 @@ const edit$4 = make$16("edit", {
40595
40782
  yield* renderer.emitSuccess(res);
40596
40783
  return;
40597
40784
  }
40598
- const resolved = yield* resolveTopicRefs((yield* buildNotePayload(flags)).payload);
40785
+ const built = yield* buildNotePayload(flags);
40786
+ const resolved = yield* resolveTopicRefs(built.payload);
40599
40787
  const id = yield* resolver.resolveNoteId(slugOrId);
40600
40788
  const res = yield* api.request(`/notes/${id}`, {
40601
40789
  method: "PUT",
@@ -40652,8 +40840,9 @@ const noteView = {
40652
40840
  const doc = normalize$3(data);
40653
40841
  const articleMeta = pickArticleTranslationMeta(data, first(doc, "id"));
40654
40842
  const content = renderContent(doc);
40843
+ const title = firstString(doc, "title");
40655
40844
  return renderMetadataBlock({
40656
- title: firstString(doc, "title") || void 0,
40845
+ title: title || void 0,
40657
40846
  kind: "note",
40658
40847
  fields: collectFields$3(doc, articleMeta),
40659
40848
  summary: pickSummary$2(doc),
@@ -40665,8 +40854,9 @@ const noteView = {
40665
40854
  const doc = normalize$3(data);
40666
40855
  const articleMeta = pickArticleTranslationMeta(data, first(doc, "id"));
40667
40856
  const content = renderContent(doc, true);
40857
+ const title = firstString(doc, "title");
40668
40858
  const fm = frontmatter({
40669
- title: firstString(doc, "title") || void 0,
40859
+ title: title || void 0,
40670
40860
  fields: collectFields$3(doc, articleMeta),
40671
40861
  summary: pickSummary$2(doc)
40672
40862
  });
@@ -40705,7 +40895,8 @@ const collectListItemFields$2 = (doc, articleMeta) => {
40705
40895
  const renderNoteListReadable = (data) => {
40706
40896
  const payload = asRecord(data);
40707
40897
  const rows = Array.isArray(payload.data) ? payload.data : Array.isArray(data) ? data : [];
40708
- const pagination = asRecord(first(asRecord(first(payload, "meta")), "pagination"));
40898
+ const meta = asRecord(first(payload, "meta"));
40899
+ const pagination = asRecord(first(meta, "pagination"));
40709
40900
  const lines = ["notes"];
40710
40901
  if (rows.length > 0) lines.push(`count: ${rows.length}`);
40711
40902
  else lines.push("count: 0");
@@ -40919,7 +41110,8 @@ const toPageFlagInputs = (opts) => ({
40919
41110
  file: unwrap$5(opts.file)
40920
41111
  });
40921
41112
  const create$4 = make$16("create", pageWriteOptions, (opts) => gen(function* () {
40922
- const built = yield* buildPagePayload(toPageFlagInputs(opts));
41113
+ const flags = toPageFlagInputs(opts);
41114
+ const built = yield* buildPagePayload(flags);
40923
41115
  const api = yield* Api;
40924
41116
  const renderer = yield* Renderer;
40925
41117
  const res = yield* api.request("/pages", {
@@ -41090,8 +41282,9 @@ const pageView = {
41090
41282
  const doc = normalize$2(data);
41091
41283
  const articleMeta = pickArticleTranslationMeta(data, first(doc, "id"));
41092
41284
  const content = renderContent(doc);
41285
+ const title = firstString(doc, "title");
41093
41286
  return renderMetadataBlock({
41094
- title: firstString(doc, "title") || void 0,
41287
+ title: title || void 0,
41095
41288
  kind: "page",
41096
41289
  fields: collectFields$2(doc, articleMeta),
41097
41290
  summary: pickSummary$1(doc),
@@ -41103,8 +41296,9 @@ const pageView = {
41103
41296
  const doc = normalize$2(data);
41104
41297
  const articleMeta = pickArticleTranslationMeta(data, first(doc, "id"));
41105
41298
  const content = renderContent(doc, true);
41299
+ const title = firstString(doc, "title");
41106
41300
  const fm = frontmatter({
41107
- title: firstString(doc, "title") || void 0,
41301
+ title: title || void 0,
41108
41302
  fields: collectFields$2(doc, articleMeta),
41109
41303
  summary: pickSummary$1(doc)
41110
41304
  });
@@ -41274,7 +41468,9 @@ const apply = make$16("apply", { slugOrId: slugOrId$10 }, ({ slugOrId }) => gen(
41274
41468
  //#endregion
41275
41469
  //#region src/cli/post/create.ts
41276
41470
  const create$3 = make$16("create", postWriteOptions, (opts) => gen(function* () {
41277
- const payload = yield* resolveCategoryRefs((yield* buildPostPayload(toPostFlagInputs(opts))).payload);
41471
+ const flags = toPostFlagInputs(opts);
41472
+ const built = yield* buildPostPayload(flags);
41473
+ const payload = yield* resolveCategoryRefs(built.payload);
41278
41474
  const api = yield* Api;
41279
41475
  const renderer = yield* Renderer;
41280
41476
  const res = yield* api.request("/posts", {
@@ -41366,14 +41562,15 @@ const edit$2 = make$16("edit", {
41366
41562
  cause: err
41367
41563
  })
41368
41564
  });
41369
- const resolved = yield* resolveCategoryRefs({
41565
+ const payload = {
41370
41566
  ...(yield* buildPostPayload({
41371
41567
  ...flags,
41372
41568
  content: parsed.contentXml,
41373
41569
  format: flags.format ?? "lexical"
41374
41570
  })).payload,
41375
41571
  ...metaFromEnvelope(parsed.meta)
41376
- });
41572
+ };
41573
+ const resolved = yield* resolveCategoryRefs(payload);
41377
41574
  const id = yield* resolver.resolvePostId(slugOrId);
41378
41575
  const res = yield* api.request(`/posts/${id}`, {
41379
41576
  method: "PUT",
@@ -41383,7 +41580,8 @@ const edit$2 = make$16("edit", {
41383
41580
  if (rest.open) yield* openAdminEdit("posts", id);
41384
41581
  return;
41385
41582
  }
41386
- const resolved = yield* resolveCategoryRefs((yield* buildPostPayload(flags)).payload);
41583
+ const built = yield* buildPostPayload(flags);
41584
+ const resolved = yield* resolveCategoryRefs(built.payload);
41387
41585
  const id = yield* resolver.resolvePostId(slugOrId);
41388
41586
  const res = yield* api.request(`/posts/${id}`, {
41389
41587
  method: "PUT",
@@ -41435,8 +41633,9 @@ const postView = {
41435
41633
  const doc = normalize$1(data);
41436
41634
  const articleMeta = pickArticleTranslationMeta(data, first(doc, "id"));
41437
41635
  const content = renderContent(doc);
41636
+ const title = firstString(doc, "title");
41438
41637
  return renderMetadataBlock({
41439
- title: firstString(doc, "title") || void 0,
41638
+ title: title || void 0,
41440
41639
  kind: "post",
41441
41640
  fields: collectFields$1(doc, articleMeta),
41442
41641
  summary: pickSummary(doc),
@@ -41448,8 +41647,9 @@ const postView = {
41448
41647
  const doc = normalize$1(data);
41449
41648
  const articleMeta = pickArticleTranslationMeta(data, first(doc, "id"));
41450
41649
  const content = renderContent(doc, true);
41650
+ const title = firstString(doc, "title");
41451
41651
  const fm = frontmatter({
41452
- title: firstString(doc, "title") || void 0,
41652
+ title: title || void 0,
41453
41653
  fields: collectFields$1(doc, articleMeta),
41454
41654
  summary: pickSummary(doc)
41455
41655
  });
@@ -41484,7 +41684,8 @@ const collectListItemFields$1 = (doc, articleMeta) => {
41484
41684
  const renderPostListReadable = (data) => {
41485
41685
  const payload = asRecord(data);
41486
41686
  const rows = Array.isArray(payload.data) ? payload.data : Array.isArray(data) ? data : [];
41487
- const pagination = asRecord(first(asRecord(first(payload, "meta")), "pagination"));
41687
+ const meta = asRecord(first(payload, "meta"));
41688
+ const pagination = asRecord(first(meta, "pagination"));
41488
41689
  const lines = ["posts"];
41489
41690
  if (rows.length > 0) lines.push(`count: ${rows.length}`);
41490
41691
  else lines.push("count: 0");
@@ -41568,7 +41769,9 @@ const stage = make$16("stage", {
41568
41769
  slugOrId: slugOrId$5,
41569
41770
  ...postWriteOptions
41570
41771
  }, ({ slugOrId, ...rest }) => gen(function* () {
41571
- const payload = yield* resolveCategoryRefs({ ...(yield* buildPostPayload(toPostFlagInputs(rest))).payload });
41772
+ const flags = toPostFlagInputs(rest);
41773
+ const built = yield* buildPostPayload(flags);
41774
+ const payload = yield* resolveCategoryRefs({ ...built.payload });
41572
41775
  delete payload.isPublished;
41573
41776
  if (Object.keys(payload).filter((k) => k !== "contentFormat").length === 0) return yield* fail$8(new ValidationFailed({ message: "nothing to stage: provide --file or content/meta flags" }));
41574
41777
  const draftBody = {};
@@ -42163,7 +42366,8 @@ const editableFieldsOf = (raw) => {
42163
42366
  //#endregion
42164
42367
  //#region src/cli/project/create.ts
42165
42368
  const create$2 = make$16("create", projectWriteOptions, (opts) => gen(function* () {
42166
- const payload = yield* buildProjectPayload(toProjectFlagInputs(opts));
42369
+ const flags = toProjectFlagInputs(opts);
42370
+ const payload = yield* buildProjectPayload(flags);
42167
42371
  const api = yield* Api;
42168
42372
  const renderer = yield* Renderer;
42169
42373
  const resolver = yield* Resolver;
@@ -42283,8 +42487,9 @@ const projectView = {
42283
42487
  readable: (data, ctx) => {
42284
42488
  const doc = normalize(data);
42285
42489
  const body = pickText(doc);
42490
+ const name = firstString(doc, "name");
42286
42491
  return renderMetadataBlock({
42287
- title: firstString(doc, "name") || void 0,
42492
+ title: name || void 0,
42288
42493
  kind: "project",
42289
42494
  fields: collectFields(doc),
42290
42495
  summary: pickDescription(doc),
@@ -42295,8 +42500,9 @@ const projectView = {
42295
42500
  llm: (data) => {
42296
42501
  const doc = normalize(data);
42297
42502
  const body = pickText(doc);
42503
+ const name = firstString(doc, "name");
42298
42504
  const fm = frontmatter({
42299
- title: firstString(doc, "name") || void 0,
42505
+ title: name || void 0,
42300
42506
  fields: collectFields(doc),
42301
42507
  summary: pickDescription(doc)
42302
42508
  });
@@ -42312,7 +42518,8 @@ const collectListItemFields = (doc) => [
42312
42518
  const renderProjectListReadable = (data) => {
42313
42519
  const payload = asRecord(data);
42314
42520
  const rows = Array.isArray(payload.data) ? payload.data : Array.isArray(data) ? data : [];
42315
- const pagination = asRecord(first(asRecord(first(payload, "meta")), "pagination"));
42521
+ const meta = asRecord(first(payload, "meta"));
42522
+ const pagination = asRecord(first(meta, "pagination"));
42316
42523
  const lines = ["projects", `count: ${rows.length}`];
42317
42524
  const page = first(pagination, "page", "currentPage");
42318
42525
  const size = first(pagination, "size", "pageSize");
@@ -42357,7 +42564,8 @@ const update$2 = make$16("update", {
42357
42564
  nameOrId: text$6({ name: "nameOrId" }),
42358
42565
  ...projectWriteOptions
42359
42566
  }, ({ nameOrId, ...rest }) => gen(function* () {
42360
- const payload = yield* buildProjectPayload(toProjectFlagInputs(rest));
42567
+ const flags = toProjectFlagInputs(rest);
42568
+ const payload = yield* buildProjectPayload(flags);
42361
42569
  const resolver = yield* Resolver;
42362
42570
  const id = yield* resolver.resolveProjectId(nameOrId);
42363
42571
  const api = yield* Api;
@@ -44022,9 +44230,10 @@ var MiniSearch = class MiniSearch {
44022
44230
  const indexData = this._index.fetch(term, createMap);
44023
44231
  const fieldIndex = indexData.get(fieldId);
44024
44232
  if (fieldIndex == null || fieldIndex.get(documentId) == null) this.warnDocumentChanged(documentId, fieldId, term);
44025
- else if (fieldIndex.get(documentId) <= 1) if (fieldIndex.size <= 1) indexData.delete(fieldId);
44026
- else fieldIndex.delete(documentId);
44027
- else fieldIndex.set(documentId, fieldIndex.get(documentId) - 1);
44233
+ else if (fieldIndex.get(documentId) <= 1) {
44234
+ if (fieldIndex.size <= 1) indexData.delete(fieldId);
44235
+ else fieldIndex.delete(documentId);
44236
+ } else fieldIndex.set(documentId, fieldIndex.get(documentId) - 1);
44028
44237
  if (this._index.get(term).size === 0) this._index.delete(term);
44029
44238
  }
44030
44239
  /**
@@ -44509,7 +44718,7 @@ const make$2 = gen(function* () {
44509
44718
  return yield* fail$8(new ChapterNotFound({
44510
44719
  slug,
44511
44720
  message: `no skill chapter with slug '${slug}'`,
44512
- hint: isLitexml ? "upgrade @haklex/rich-litexml to >=0.16.0 to ship liteXML chapters" : "run `mxs skill` to list available chapters"
44721
+ hint: isLitexml ? "upgrade @haklex/rich-litexml to >=0.36.1 to ship liteXML chapters" : "run `mxs skill` to list available chapters"
44513
44722
  }));
44514
44723
  }
44515
44724
  return found;
@@ -44580,7 +44789,8 @@ const skillListView = {
44580
44789
  }
44581
44790
  };
44582
44791
  const renderChapterReadable = (chapter, color) => {
44583
- return renderMarkdownToAnsi(`# ${chapter.title}\n\n_${chapter.description}_\n\n` + chapter.body, { color }).trimEnd();
44792
+ const header = `# ${chapter.title}\n\n_${chapter.description}_\n\n`;
44793
+ return renderMarkdownToAnsi(header + chapter.body, { color }).trimEnd();
44584
44794
  };
44585
44795
  const skillChapterView = {
44586
44796
  kind: "skill-chapter",
@@ -45262,14 +45472,12 @@ const topicCmd = make$16("topic").pipe(withDescription(help.description), withSu
45262
45472
  //#endregion
45263
45473
  //#region ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js
45264
45474
  var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
45265
- const SEMVER_SPEC_VERSION = "2.0.0";
45266
- const MAX_LENGTH = 256;
45267
- const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991;
45268
45475
  module.exports = {
45269
- MAX_LENGTH,
45476
+ MAX_LENGTH: 256,
45270
45477
  MAX_SAFE_COMPONENT_LENGTH: 16,
45271
- MAX_SAFE_BUILD_LENGTH: MAX_LENGTH - 6,
45272
- MAX_SAFE_INTEGER,
45478
+ MAX_SAFE_BUILD_LENGTH: 250,
45479
+ MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER ||
45480
+ /* istanbul ignore next */ 9007199254740991,
45273
45481
  RELEASE_TYPES: [
45274
45482
  "major",
45275
45483
  "premajor",
@@ -45279,7 +45487,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
45279
45487
  "prepatch",
45280
45488
  "prerelease"
45281
45489
  ],
45282
- SEMVER_SPEC_VERSION,
45490
+ SEMVER_SPEC_VERSION: "2.0.0",
45283
45491
  FLAG_INCLUDE_PRERELEASE: 1,
45284
45492
  FLAG_LOOSE: 2
45285
45493
  };
@@ -45417,9 +45625,10 @@ var require_semver$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
45417
45625
  module.exports = class SemVer {
45418
45626
  constructor(version, options) {
45419
45627
  options = parseOptions(options);
45420
- if (version instanceof SemVer) if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
45421
- else version = version.version;
45422
- else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
45628
+ if (version instanceof SemVer) {
45629
+ if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) return version;
45630
+ else version = version.version;
45631
+ } else if (typeof version !== "string") throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`);
45423
45632
  if (version.length > MAX_LENGTH) throw new TypeError(`version is longer than ${MAX_LENGTH} characters`);
45424
45633
  debug("SemVer", version, options);
45425
45634
  this.options = options;
@@ -45872,9 +46081,7 @@ var require_truncate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
45872
46081
  version.minor = 0;
45873
46082
  version.patch = 0;
45874
46083
  break;
45875
- case "minor":
45876
- version.patch = 0;
45877
- break;
46084
+ case "minor": version.patch = 0;
45878
46085
  }
45879
46086
  return version.format();
45880
46087
  };
@@ -45923,8 +46130,10 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
45923
46130
  module.exports = class Range {
45924
46131
  constructor(range, options) {
45925
46132
  options = parseOptions(options);
45926
- if (range instanceof Range) if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
45927
- else return new Range(range.raw, options);
46133
+ if (range instanceof Range) {
46134
+ if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) return range;
46135
+ else return new Range(range.raw, options);
46136
+ }
45928
46137
  if (range instanceof Comparator) {
45929
46138
  this.raw = range.value;
45930
46139
  this.set = [[range]];
@@ -46094,18 +46303,21 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
46094
46303
  let ret;
46095
46304
  if (isX(M)) ret = "";
46096
46305
  else if (isX(m)) ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
46097
- else if (isX(p)) if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
46098
- else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
46099
- else if (pr) {
46306
+ else if (isX(p)) {
46307
+ if (M === "0") ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
46308
+ else ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
46309
+ } else if (pr) {
46100
46310
  debug("replaceCaret pr", pr);
46101
- if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
46102
- else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
46103
- else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
46311
+ if (M === "0") {
46312
+ if (m === "0") ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
46313
+ else ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
46314
+ } else ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
46104
46315
  } else {
46105
46316
  debug("no pr");
46106
- if (M === "0") if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
46107
- else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
46108
- else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
46317
+ if (M === "0") {
46318
+ if (m === "0") ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`;
46319
+ else ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
46320
+ } else ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
46109
46321
  }
46110
46322
  debug("caret return", ret);
46111
46323
  return ret;
@@ -46127,9 +46339,10 @@ var require_range = /* @__PURE__ */ __commonJSMin(((exports, module) => {
46127
46339
  const anyX = xp;
46128
46340
  if (gtlt === "=" && anyX) gtlt = "";
46129
46341
  pr = options.includePrerelease ? "-0" : "";
46130
- if (xM) if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
46131
- else ret = "*";
46132
- else if (gtlt && anyX) {
46342
+ if (xM) {
46343
+ if (gtlt === ">" || gtlt === "<") ret = "<0.0.0-0";
46344
+ else ret = "*";
46345
+ } else if (gtlt && anyX) {
46133
46346
  if (xm) m = 0;
46134
46347
  p = 0;
46135
46348
  if (gtlt === ">") {
@@ -46203,8 +46416,10 @@ var require_comparator = /* @__PURE__ */ __commonJSMin(((exports, module) => {
46203
46416
  }
46204
46417
  constructor(comp, options) {
46205
46418
  options = parseOptions(options);
46206
- if (comp instanceof Comparator) if (comp.loose === !!options.loose) return comp;
46207
- else comp = comp.value;
46419
+ if (comp instanceof Comparator) {
46420
+ if (comp.loose === !!options.loose) return comp;
46421
+ else comp = comp.value;
46422
+ }
46208
46423
  comp = comp.trim().split(/\s+/).join(" ");
46209
46424
  debug("comparator", comp, options);
46210
46425
  this.options = options;
@@ -46524,11 +46739,15 @@ var require_subset = /* @__PURE__ */ __commonJSMin(((exports, module) => {
46524
46739
  const minimumVersion = [new Comparator(">=0.0.0")];
46525
46740
  const simpleSubset = (sub, dom, options) => {
46526
46741
  if (sub === dom) return true;
46527
- if (sub.length === 1 && sub[0].semver === ANY) if (dom.length === 1 && dom[0].semver === ANY) return true;
46528
- else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
46529
- else sub = minimumVersion;
46530
- if (dom.length === 1 && dom[0].semver === ANY) if (options.includePrerelease) return true;
46531
- else dom = minimumVersion;
46742
+ if (sub.length === 1 && sub[0].semver === ANY) {
46743
+ if (dom.length === 1 && dom[0].semver === ANY) return true;
46744
+ else if (options.includePrerelease) sub = minimumVersionWithPreRelease;
46745
+ else sub = minimumVersion;
46746
+ }
46747
+ if (dom.length === 1 && dom[0].semver === ANY) {
46748
+ if (options.includePrerelease) return true;
46749
+ else dom = minimumVersion;
46750
+ }
46532
46751
  const eqSet = /* @__PURE__ */ new Set();
46533
46752
  let gt, lt;
46534
46753
  for (const c of sub) if (c.operator === ">" || c.operator === ">=") gt = higherGT(gt, c, options);
@@ -46650,7 +46869,7 @@ var import_semver = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
46650
46869
  })))();
46651
46870
  const PACKAGE_NAME = "@mx-space/cli";
46652
46871
  const CACHE_FILE = "update-check.json";
46653
- const THROTTLE_MS = 1440 * 60 * 1e3;
46872
+ const THROTTLE_MS = 864e5;
46654
46873
  const FETCH_TIMEOUT_MS = 3e3;
46655
46874
  const PM_FRAGMENTS = [
46656
46875
  {
@@ -47069,9 +47288,7 @@ const make$1 = (deps = {}) => {
47069
47288
  hint: "pass --pm <npm|pnpm|yarn|bun> to override detection",
47070
47289
  details: { realPath: detection.realPath }
47071
47290
  }));
47072
- case "global":
47073
- pm = detection.pm;
47074
- break;
47291
+ case "global": pm = detection.pm;
47075
47292
  }
47076
47293
  const hit = yield* tryPromise({
47077
47294
  try: async () => {
@@ -47435,7 +47652,8 @@ const emitHelp = (data) => {
47435
47652
  const color = isColorEnabled(process.stdout);
47436
47653
  const tagline = data.description.split(" — ")[0] || data.description;
47437
47654
  const banner = renderBanner(`${data.programName} ${data.version}`, tagline, { color });
47438
- const ansi = renderMarkdownToAnsi(renderRootHelp(data), { color });
47655
+ const md = renderRootHelp(data);
47656
+ const ansi = renderMarkdownToAnsi(md, { color });
47439
47657
  process.stdout.write(banner + ansi + "\n");
47440
47658
  };
47441
47659
  const renderVerbSignature = (verb) => {
@@ -47498,7 +47716,8 @@ const renderGroupHelp = (data) => {
47498
47716
  const emitGroupHelp = (data) => {
47499
47717
  const color = isColorEnabled(process.stdout);
47500
47718
  const banner = renderBanner(`${data.programName} ${data.groupName}`, data.description, { color });
47501
- const ansi = renderMarkdownToAnsi(renderGroupHelp(data), { color });
47719
+ const md = renderGroupHelp(data);
47720
+ const ansi = renderMarkdownToAnsi(md, { color });
47502
47721
  process.stdout.write(banner + ansi + "\n");
47503
47722
  };
47504
47723
  //#endregion
@@ -47914,10 +48133,11 @@ const run = (argv) => {
47914
48133
  name: "mxs",
47915
48134
  version: CLI_VERSION
47916
48135
  });
47917
- const finalized = locally(locally(locally(preflight(flags).pipe(zipRight$3(cli(parsed.rest)), tapError((err) => isCliError(err) ? flatMap$5(Renderer, (r) => r.emitError(err)) : sync$2(() => void 0)), catchAll$1((err) => sync$2(() => {
48136
+ const core = preflight(flags).pipe(zipRight$3(cli(parsed.rest)), tapError((err) => isCliError(err) ? flatMap$5(Renderer, (r) => r.emitError(err)) : sync$2(() => void 0)), catchAll$1((err) => sync$2(() => {
47918
48137
  const tag = isCliError(err) ? err._tag : "Generic";
47919
48138
  process.exit(exitCodeForTag(tag));
47920
- }))), currentOutputOptions, {
48139
+ })));
48140
+ const finalized = locally(locally(locally(core, currentOutputOptions, {
47921
48141
  json: flags.json,
47922
48142
  output: flags.output,
47923
48143
  quiet: flags.quiet,