ghost 6.24.0 → 6.25.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 (222) hide show
  1. package/components/tryghost-i18n-6.25.1.tgz +0 -0
  2. package/components/tryghost-parse-email-address-6.25.1.tgz +0 -0
  3. package/core/boot.js +3 -1
  4. package/core/built/admin/assets/{PolarAngleAxis-7TlIQL3R.js → PolarAngleAxis-C6ZeSpZB.js} +1 -1
  5. package/core/built/admin/assets/{_baseAssignValue-DJsCJz6y.js → _baseAssignValue-BKAl5FrV.js} +1 -1
  6. package/core/built/admin/assets/{a-large-small-BnBpzYwl.js → a-large-small-B_ulQCIs.js} +1 -1
  7. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
  8. package/core/built/admin/assets/admin-x-settings/{code-editor-view-De3K_osj.mjs → code-editor-view-CBYT1gA1.mjs} +2 -2
  9. package/core/built/admin/assets/admin-x-settings/{index-bGxDzD13.mjs → index-CN5CixaU.mjs} +2 -2
  10. package/core/built/admin/assets/admin-x-settings/{index-5D8KqsFU.mjs → index-CPQODntW.mjs} +2 -2
  11. package/core/built/admin/assets/admin-x-settings/{index-BIUDn7ot.mjs → index-CgTfOd7g.mjs} +9 -9
  12. package/core/built/admin/assets/admin-x-settings/{modals-DuokUyAH.mjs → modals-_y-6HROx.mjs} +2 -2
  13. package/core/built/admin/assets/{at-sign-DC4NtDDM.js → at-sign-B8xWKM0y.js} +1 -1
  14. package/core/built/admin/assets/{audience-CC5U4UxI.js → audience-CBOR--z9.js} +1 -1
  15. package/core/built/admin/assets/{avatar-flipboard-_GQfQXQc.js → avatar-flipboard-IipGb_wZ.js} +1 -1
  16. package/core/built/admin/assets/{bluesky-sharing-BKyzPl9y.js → bluesky-sharing-CkI1QuAm.js} +1 -1
  17. package/core/built/admin/assets/{chart-BCQFlmhJ.js → chart-_slUcr-K.js} +1 -1
  18. package/core/built/admin/assets/{chunk.423.dae9a3bbe7845c3a3cfc.js → chunk.434.de8a15730373eccfeefe.js} +13 -101
  19. package/core/built/admin/assets/{chunk.524.b5e454aa74df4428420c.js → chunk.524.5b9b463506a16221fc91.js} +6 -6
  20. package/core/built/admin/assets/{chunk.582.20635869be68725e6d5c.js → chunk.582.d8eae1661d753befaefd.js} +7 -7
  21. package/core/built/admin/assets/{chunk.123.1255d9e815f933dfdc57.js → chunk.630.3dbb0231a2d871126a80.js} +8 -6
  22. package/core/built/admin/assets/{code-editor-view-BXnjo7qe.js → code-editor-view-BWMqr2JV.js} +1 -1
  23. package/core/built/admin/assets/comments-BeoA0nfK.js +1 -0
  24. package/core/built/admin/assets/{content-helpers-CQXipRWa.js → content-helpers-CmTGdEmL.js} +1 -1
  25. package/core/built/admin/assets/{copy-B-MxRWPu.js → copy-CDHcAPJw.js} +1 -1
  26. package/core/built/admin/assets/{data-list-B2sqn7IE.js → data-list-Crb1ffbp.js} +1 -1
  27. package/core/built/admin/assets/{deleted-feed-item-DQi676Dy.js → deleted-feed-item-DBW0zJQg.js} +1 -1
  28. package/core/built/admin/assets/{dropzone-GgOCfK2j.js → dropzone-B9JUsQlW.js} +3 -3
  29. package/core/built/admin/assets/{edit-profile-COx5FmF9.js → edit-profile-Dz-IhetN.js} +1 -1
  30. package/core/built/admin/assets/{empty-indicator-Bf4Dqk72.js → empty-indicator-2QGnEbtY.js} +1 -1
  31. package/core/built/admin/assets/{en-BkI47Ou-.js → en-BRQS1Z8j.js} +1 -1
  32. package/core/built/admin/assets/{feed-Dzc-8jwd.js → feed-T3kW9UJA.js} +1 -1
  33. package/core/built/admin/assets/filters-ChOMQQZW.js +1 -0
  34. package/core/built/admin/assets/{gh-chart-Ch6dYUac.js → gh-chart-fuWw60Ka.js} +1 -1
  35. package/core/built/admin/assets/{ghost-69e448feab2cb78aba64f7177fa4d6f0.js → ghost-78b4a517ac907213ab47708eef33bc6f.js} +423 -542
  36. package/core/built/admin/assets/{growth-BIBJdcm6.js → growth-D9sCnmon.js} +1 -1
  37. package/core/built/admin/assets/{hash-BGd7HEsT.js → hash-CI1pQ1UC.js} +1 -1
  38. package/core/built/admin/assets/header-OevT95FI.js +1 -0
  39. package/core/built/admin/assets/{inbox-CFzKvW3h.js → inbox-DYY8-M1K.js} +1 -1
  40. package/core/built/admin/assets/{index-Dy8dCc8t.js → index-8CZdLQzu.js} +4 -4
  41. package/core/built/admin/assets/{index-DIO8ceib.js → index-BDAOs7pI.js} +1 -1
  42. package/core/built/admin/assets/{index-BZyG96u1.js → index-BEEgMX-_.js} +1 -1
  43. package/core/built/admin/assets/index-BbveDn8H.css +1 -0
  44. package/core/built/admin/assets/{index-BYXKsmpv.js → index-C-Cpbee5.js} +1 -1
  45. package/core/built/admin/assets/{index-DDJAHYHQ.js → index-CCF2RKxR.js} +12 -12
  46. package/core/built/admin/assets/{index-ZuWSQ3L6.js → index-CEnfjH5h.js} +93 -93
  47. package/core/built/admin/assets/{index-_WMp37yL.js → index-CcFVbffG.js} +1 -1
  48. package/core/built/admin/assets/{index-DpZazR71.js → index-CyMlhfZJ.js} +1 -1
  49. package/core/built/admin/assets/{index-DM98UB_U.js → index-DBZYUfjO.js} +1 -1
  50. package/core/built/admin/assets/{index-D0gRP4Gp.js → index-DJa3pLmx.js} +1 -1
  51. package/core/built/admin/assets/{index-n5opb8tL.js → index-DVqmhe-L.js} +1 -1
  52. package/core/built/admin/assets/{index-S2DGJkmz.js → index-DW5aEj6O.js} +2 -2
  53. package/core/built/admin/assets/{index-CvX5YYEz.js → index-DcFgRUSN.js} +1 -1
  54. package/core/built/admin/assets/{index-7NTHsKgE.js → index-DjgsxHeB.js} +1 -1
  55. package/core/built/admin/assets/index-mqQc8MVd.js +1 -0
  56. package/core/built/admin/assets/{index-CsHjDdYB.js → index-qQZsxgFE.js} +1 -1
  57. package/core/built/admin/assets/{koenig-lexical-8qAZ5o1x.js → koenig-lexical-CsbE6fpi.js} +1 -1
  58. package/core/built/admin/assets/kpis-Dw04ruBN.js +1 -0
  59. package/core/built/admin/assets/{label-CofMdj8x.js → label-tBvn89sm.js} +1 -1
  60. package/core/built/admin/assets/{links-MSlYSad1.js → links-Do4jcjIh.js} +1 -1
  61. package/core/built/admin/assets/{loader-circle-CF5G2g_Z.js → loader-circle-C8exRUku.js} +4 -4
  62. package/core/built/admin/assets/{lucide-react-DZiAu6PQ.js → lucide-react-4VO5Dwow.js} +1 -1
  63. package/core/built/admin/assets/{main-layout-DEVUkqt_.js → main-layout-BAqXRgAx.js} +1 -1
  64. package/core/built/admin/assets/{member-route-mLKS-PsA.js → member-route-D4n-RbQd.js} +1 -1
  65. package/core/built/admin/assets/members-DRLgwCgJ.js +15 -0
  66. package/core/built/admin/assets/{message-square-text-DESy3kSk.js → message-square-text-CC_1bY-Q.js} +5 -5
  67. package/core/built/admin/assets/{minus-DVNwSjD6.js → minus-DSyx9DCe.js} +1 -1
  68. package/core/built/admin/assets/{modals-FYjLOMaQ.js → modals-AryZr_DA.js} +13 -13
  69. package/core/built/admin/assets/{moderation-u4WS46a-.js → moderation-DwKm9LO-.js} +1 -1
  70. package/core/built/admin/assets/{newsletter-Cj0UCg4J.js → newsletter-C0rydPGS.js} +1 -1
  71. package/core/built/admin/assets/{newsletters-_UvhdBE3.js → newsletters-DKdmxfDG.js} +1 -1
  72. package/core/built/admin/assets/{note-CRnFryTp.js → note-996Zos9G.js} +1 -1
  73. package/core/built/admin/assets/{overview-Cr0dGxEU.js → overview-r17hlWAB.js} +1 -1
  74. package/core/built/admin/assets/{pagemenu-BqoDENpI.js → pagemenu-DzpB1AkZ.js} +17 -17
  75. package/core/built/admin/assets/{post-analytics-DIr_rDtL.js → post-analytics-AwufPVFE.js} +1 -1
  76. package/core/built/admin/assets/{post-analytics-context-WA--pwK5.js → post-analytics-context-GFe0lMc-.js} +1 -1
  77. package/core/built/admin/assets/{post-analytics-header-D97SoEaV.js → post-analytics-header-DmGyNvP9.js} +1 -1
  78. package/core/built/admin/assets/{post-share-modal-DBxR7WCX.js → post-share-modal-CTpdCS2X.js} +1 -1
  79. package/core/built/admin/assets/posts/{comments-Bswx2dzs.mjs → comments-Cvt31uBs.mjs} +597 -674
  80. package/core/built/admin/assets/posts/{dialog-67vvNv8e.mjs → dialog-DaViJlnd.mjs} +3 -3
  81. package/core/built/admin/assets/posts/{dropdown-menu-BKZfsAPJ.mjs → dropdown-menu-B4KGMiRI.mjs} +5 -5
  82. package/core/built/admin/assets/posts/{empty-indicator-DTmBQa_3.mjs → empty-indicator-BaD6pCXM.mjs} +2 -2
  83. package/core/built/admin/assets/posts/filters-BsCI4RJg.mjs +2835 -0
  84. package/core/built/admin/assets/posts/{get-site-timezone-D75cHSJ1.mjs → get-site-timezone-Bo-iI2bI.mjs} +2 -2
  85. package/core/built/admin/assets/posts/{growth-BqJWjpAp.mjs → growth-BJxIDp2o.mjs} +14 -14
  86. package/core/built/admin/assets/posts/header-7zhnErbb.mjs +100 -0
  87. package/core/built/admin/assets/posts/{heading-DXxLDQ96.mjs → heading-BCDx_eVF.mjs} +2 -2
  88. package/core/built/admin/assets/posts/{hooks-pVotzebr.mjs → hooks-DQL2O_El.mjs} +2 -2
  89. package/core/built/admin/assets/posts/{index-DZ1HzbGS.mjs → index-0mEgtljt.mjs} +3 -3
  90. package/core/built/admin/assets/posts/{index-By5yPnMZ.mjs → index-BTzJVQ6S.mjs} +10 -10
  91. package/core/built/admin/assets/posts/{input-DdXe2Fjm.mjs → input-DaHXv92f.mjs} +2 -2
  92. package/core/built/admin/assets/posts/{kpis-1MXZeSC9.mjs → kpis-GRsx6fPV.mjs} +10 -10
  93. package/core/built/admin/assets/posts/{links-DGzzdzsH.mjs → links-B1q_pqE9.mjs} +4 -4
  94. package/core/built/admin/assets/posts/{loading-indicator-CSj2spwS.mjs → loading-indicator-DiYqXomj.mjs} +3 -3
  95. package/core/built/admin/assets/posts/{main-layout-CGs25JVH.mjs → main-layout-DeqPTJTe.mjs} +2 -2
  96. package/core/built/admin/assets/posts/{members-BRcED5fL.mjs → members-LABk5yI5.mjs} +4102 -3442
  97. package/core/built/admin/assets/posts/{newsletter-D706LlgM.mjs → newsletter-C_nbHBaP.mjs} +15 -15
  98. package/core/built/admin/assets/posts/{overview-5dG5ypjx.mjs → overview-AJnKv4Ze.mjs} +16 -16
  99. package/core/built/admin/assets/posts/{post-analytics-wvNuOa4c.mjs → post-analytics-b_CKsePp.mjs} +6 -6
  100. package/core/built/admin/assets/posts/{post-analytics-context-BqnFe05q.mjs → post-analytics-context-D6jtpxxm.mjs} +5 -5
  101. package/core/built/admin/assets/posts/{post-analytics-header-Dsi5l6hb.mjs → post-analytics-header-R5UF_tF0.mjs} +11 -11
  102. package/core/built/admin/assets/posts/{post-share-modal-DWe35McY.mjs → post-share-modal-y4BEOajk.mjs} +4 -4
  103. package/core/built/admin/assets/posts/posts-C2hNrf1c.mjs +37 -0
  104. package/core/built/admin/assets/posts/posts.js +1 -1
  105. package/core/built/admin/assets/posts/{reply-B4vwBMwj.mjs → reply-2Uvi3Kxb.mjs} +2 -2
  106. package/core/built/admin/assets/posts/{search-DQuB1WMm.mjs → search-se7meOnL.mjs} +2 -2
  107. package/core/built/admin/assets/posts/{select-BMPHyOdQ.mjs → select-DpUpauFg.mjs} +8 -8
  108. package/core/built/admin/assets/posts/{separator-DgZ2VF9r.mjs → separator-CdBM46dw.mjs} +3 -3
  109. package/core/built/admin/assets/posts/{settings-D-wnf7Qg.mjs → settings-Chhj9xKP.mjs} +2 -2
  110. package/core/built/admin/assets/posts/{sheet-SOdCzxUt.mjs → sheet--k3SiDko.mjs} +3 -3
  111. package/core/built/admin/assets/posts/{skeleton-Du7JXZ_1.mjs → skeleton-CUSLSLoY.mjs} +3 -3
  112. package/core/built/admin/assets/posts/{source-icon-DcBtKbCl.mjs → source-icon-BjYUIoXN.mjs} +3 -3
  113. package/core/built/admin/assets/posts/{stats-CeLav-Hu.mjs → stats-BRdXKaxM.mjs} +4 -4
  114. package/core/built/admin/assets/posts/{table-DlaJMBps.mjs → table-Bgi_UcfL.mjs} +2 -2
  115. package/core/built/admin/assets/posts/{tabs-BQQbtw2g.mjs → tabs-DT8Bh72E.mjs} +14 -14
  116. package/core/built/admin/assets/posts/tags-BCFLnZYl.mjs +399 -0
  117. package/core/built/admin/assets/posts/{tags-CLyaNf39.mjs → tags-Kv2q0o3p.mjs} +2 -2
  118. package/core/built/admin/assets/posts/use-scroll-restoration-CLAUAal3.mjs +517 -0
  119. package/core/built/admin/assets/posts/{use-infinite-virtual-scroll-B_NwiBXK.mjs → virtual-list-window-CQDEqNBL.mjs} +246 -262
  120. package/core/built/admin/assets/posts/{web-TEVKbXSI.mjs → web-CqN0MQU6.mjs} +18 -18
  121. package/core/built/admin/assets/posts-GvXDuhVG.js +1 -0
  122. package/core/built/admin/assets/{referrers-J4vexZCf.js → referrers-Bd9pW-WX.js} +1 -1
  123. package/core/built/admin/assets/{repeat-BxOK9zhN.js → repeat-y6HlMgGO.js} +2 -2
  124. package/core/built/admin/assets/{reply-BoTN-eE0.js → reply-Cc8ryI5v.js} +2 -2
  125. package/core/built/admin/assets/{select-Bd1zcqox.js → select-CGr_5qad.js} +1 -1
  126. package/core/built/admin/assets/{settings-D72z6T_a.js → settings-BPsfSgg3.js} +1 -1
  127. package/core/built/admin/assets/{settings-BGbGoa4s.js → settings-BTd0Adha.js} +19 -19
  128. package/core/built/admin/assets/{sort-button-BOLTpImz.js → sort-button-k76_5HR2.js} +1 -1
  129. package/core/built/admin/assets/{source-icon-BqEM5MvU.js → source-icon-DMt0UskC.js} +1 -1
  130. package/core/built/admin/assets/{sprout-Bf-wc2Vo.js → sprout-Td9eaOoY.js} +2 -2
  131. package/core/built/admin/assets/{square-Cj_bJ0HZ.js → square-Df8vEYlG.js} +1 -1
  132. package/core/built/admin/assets/stats/{audience-BiHYBUzT.mjs → audience-DMTObpL8.mjs} +3 -3
  133. package/core/built/admin/assets/stats/{content-helpers-CIXZiyCm.mjs → content-helpers-ReMp9KJN.mjs} +4 -4
  134. package/core/built/admin/assets/stats/{index-CkKk-p14.mjs → index-6L-yLKFX.mjs} +8 -8
  135. package/core/built/admin/assets/stats/{index-DBB8Oih1.mjs → index-CIUyjeP-.mjs} +5 -5
  136. package/core/built/admin/assets/stats/{index-9zQR4gr0.mjs → index-CMSDpQm3.mjs} +3626 -3513
  137. package/core/built/admin/assets/stats/{index-DErXBfDM.mjs → index-Ca-_KJzy.mjs} +5 -5
  138. package/core/built/admin/assets/stats/{index-DMSmQLxG.mjs → index-CfO5yPSP.mjs} +5 -5
  139. package/core/built/admin/assets/stats/{sort-button-BqY7GFaO.mjs → sort-button-BB_M2CdZ.mjs} +3 -3
  140. package/core/built/admin/assets/stats/{stats-BeJgKX2G.mjs → stats-B2nnuLeU.mjs} +4 -4
  141. package/core/built/admin/assets/stats/stats.js +1 -1
  142. package/core/built/admin/assets/stats/{tabs-CPz357mW.mjs → tabs-DjJG-d3O.mjs} +3 -3
  143. package/core/built/admin/assets/stats/{use-growth-stats-WMYXBQE3.mjs → use-growth-stats-BMT5M7l6.mjs} +3 -3
  144. package/core/built/admin/assets/{stats-DWpHtRym.js → stats-Bs9ZbmXX.js} +1 -1
  145. package/core/built/admin/assets/stats-view-BWoPuaLz.js +1 -0
  146. package/core/built/admin/assets/{step-1-Bjya9Gt0.js → step-1-BUvsuCs0.js} +1 -1
  147. package/core/built/admin/assets/{step-2-CJ6I8JNc.js → step-2-DI9ekXls.js} +1 -1
  148. package/core/built/admin/assets/{step-3-3fs6Y2Kj.js → step-3-DzT_XhaS.js} +2 -2
  149. package/core/built/admin/assets/{table-B4zlzEDP.js → table-BKqaEGAm.js} +1 -1
  150. package/core/built/admin/assets/{tabs-mR5oJGm5.js → tabs-G6Ql8vbf.js} +1 -1
  151. package/core/built/admin/assets/tags-BHm-dlBs.js +1 -0
  152. package/core/built/admin/assets/{tags-CsgMtkFL.js → tags-_taMP0sJ.js} +1 -1
  153. package/core/built/admin/assets/{textarea-CQjEvapR.js → textarea-DcVuGYYq.js} +1 -1
  154. package/core/built/admin/assets/{tiers-CQE0v797.js → tiers-kv-xBoqQ.js} +1 -1
  155. package/core/built/admin/assets/{toggle-group-CR-Z-bJL.js → toggle-group-DsatLdt7.js} +1 -1
  156. package/core/built/admin/assets/{topic-filter-_NyD55eH.js → topic-filter-DkJyIuAf.js} +1 -1
  157. package/core/built/admin/assets/{trash-BFSLkv0z.js → trash-BeZZgbn-.js} +1 -1
  158. package/core/built/admin/assets/{upload-BTxT4v2z.js → upload-BG7KNIn7.js} +4 -4
  159. package/core/built/admin/assets/{use-growth-stats-BGymNu5O.js → use-growth-stats-CNGdl44N.js} +1 -1
  160. package/core/built/admin/assets/use-scroll-restoration-CQ3w0W98.js +1 -0
  161. package/core/built/admin/assets/{use-simple-pagination-Cq7Afp_c.js → use-simple-pagination-BeIJ_5Vv.js} +1 -1
  162. package/core/built/admin/assets/{user-plus-DMl69yKl.js → user-plus-CMxR50-Y.js} +1 -1
  163. package/core/built/admin/assets/{user-round-check-CVuZXUPz.js → user-round-check-2nhPmqP3.js} +1 -1
  164. package/core/built/admin/assets/virtual-list-window-Uq8oKYVG.js +4 -0
  165. package/core/built/admin/assets/{wallet-cards-zHR_y6Sp.js → wallet-cards-CJcVzH0D.js} +1 -1
  166. package/core/built/admin/assets/{web-CmFHgeQw.js → web-BPwTFKrc.js} +1 -1
  167. package/core/built/admin/index.html +7 -7
  168. package/core/frontend/helpers/ghost_head.js +1 -4
  169. package/core/server/data/migrations/versions/6.25/2026-03-26-15-47-00-insert-default-email-design-settings-row.js +42 -0
  170. package/core/server/data/migrations/versions/6.25/2026-03-30-20-22-25-add-email-design-setting-permissions.js +44 -0
  171. package/core/server/data/migrations/versions/6.25/2026-03-30-22-16-43-add-email-design-setting-id-to-automated-emails.js +8 -0
  172. package/core/server/data/migrations/versions/6.25/2026-03-31-13-12-10-backfill-automated-emails-email-design-setting-id.js +45 -0
  173. package/core/server/data/migrations/versions/6.25/2026-03-31-20-31-19-drop-nullable-on-automated-emails-email-design-setting-id.js +3 -0
  174. package/core/server/data/schema/fixtures/fixtures.json +35 -0
  175. package/core/server/data/schema/schema.js +1 -0
  176. package/core/server/data/seeders/importers/comment-reports-importer.js +1 -3
  177. package/core/server/data/seeders/importers/comments-importer.js +3 -2
  178. package/core/server/data/seeders/importers/email-batches-importer.js +3 -3
  179. package/core/server/data/seeders/importers/email-recipients-importer.js +6 -6
  180. package/core/server/data/seeders/importers/emails-importer.js +4 -3
  181. package/core/server/data/seeders/importers/members-click-events-importer.js +1 -1
  182. package/core/server/data/seeders/importers/members-created-events-importer.js +2 -1
  183. package/core/server/data/seeders/importers/members-feedback-importer.js +3 -4
  184. package/core/server/data/seeders/importers/members-login-events-importer.js +3 -2
  185. package/core/server/data/seeders/importers/members-status-events-importer.js +1 -2
  186. package/core/server/data/seeders/importers/members-stripe-customers-importer.js +2 -1
  187. package/core/server/data/seeders/importers/members-stripe-customers-subscriptions-importer.js +4 -2
  188. package/core/server/data/seeders/importers/members-subscribe-events-importer.js +1 -2
  189. package/core/server/data/seeders/importers/members-subscription-created-events-importer.js +3 -1
  190. package/core/server/data/seeders/importers/offer-redemptions-importer.js +3 -3
  191. package/core/server/data/seeders/utils/database-date.js +26 -1
  192. package/core/server/models/automated-email.js +27 -0
  193. package/core/server/models/email-design-setting.js +27 -0
  194. package/core/server/services/members/service.js +0 -22
  195. package/core/server/services/stripe/service.js +1 -2
  196. package/core/server/services/verification/verification-webhook-service.js +2 -2
  197. package/core/server/services/verification/verification-webhook-service.ts +2 -2
  198. package/core/server/services/verification-trigger.js +34 -69
  199. package/core/server/services/webhooks/webhook-trigger.js +1 -1
  200. package/core/shared/labs.js +2 -2
  201. package/package.json +10 -28
  202. package/tsconfig.tsbuildinfo +1 -1
  203. package/yarn.lock +423 -107
  204. package/components/tryghost-i18n-6.24.0.tgz +0 -0
  205. package/components/tryghost-parse-email-address-6.24.0.tgz +0 -0
  206. package/core/built/admin/assets/comments-CteqV7ZN.js +0 -1
  207. package/core/built/admin/assets/filters-DXXaCya7.js +0 -1
  208. package/core/built/admin/assets/index-QB-va_sk.css +0 -1
  209. package/core/built/admin/assets/index-nBUk6L1X.js +0 -1
  210. package/core/built/admin/assets/kpis-Cv75oSPY.js +0 -1
  211. package/core/built/admin/assets/members-DcElgZ2t.js +0 -15
  212. package/core/built/admin/assets/posts/filters-Ds_ZaYIU.mjs +0 -2722
  213. package/core/built/admin/assets/posts/posts-DI5YQFp4.mjs +0 -17
  214. package/core/built/admin/assets/posts/tags-CjwolIiT.mjs +0 -395
  215. package/core/built/admin/assets/posts/use-scroll-restoration-YSR5jwQl.mjs +0 -232
  216. package/core/built/admin/assets/posts-CJHEP4C-.js +0 -1
  217. package/core/built/admin/assets/stats-view-CcyaLPwj.js +0 -1
  218. package/core/built/admin/assets/tags-DEFC6GpD.js +0 -1
  219. package/core/built/admin/assets/use-infinite-virtual-scroll-CNqGwgHd.js +0 -4
  220. package/core/built/admin/assets/use-scroll-restoration-BWtb0NrS.js +0 -1
  221. package/core/shared/config/env/config.testing-browser.json +0 -98
  222. /package/core/built/admin/assets/{chunk.423.dae9a3bbe7845c3a3cfc.js.LICENSE.txt → chunk.434.de8a15730373eccfeefe.js.LICENSE.txt} +0 -0
@@ -1,148 +1,148 @@
1
- import { D as S, j as e, u as _, q as D, b as B, n as w, E as es, F as L, G as F, H as Ce, J as ss, T as ts, a as P, o as z, N as T, p as H, e as as, Z as K } from "./index-By5yPnMZ.mjs";
2
- import { u as ns, F as rs, T as q, a as W, b as Q, d as G, c as is } from "./filters-Ds_ZaYIU.mjs";
3
- import { a as Ne, u as os, g as ls, B as cs, b as ds, c as ms, M as E, d as us } from "./use-scroll-restoration-YSR5jwQl.mjs";
4
- import { u as hs, g as ps } from "./posts-DI5YQFp4.mjs";
5
- import { u as xs, U as ke, d as fs, D as bs, a as js, E as gs, b as vs, c as $ } from "./dropdown-menu-BKZfsAPJ.mjs";
6
- import { a as Cs, c as Ns, F as Y, b as ye, D as X, M as ks, H as we, R as ys, E as _e } from "./reply-B4vwBMwj.mjs";
7
- import { C as ws, F as _s, c as Ss, a as Ps, E as Se, M as Pe } from "./search-DQuB1WMm.mjs";
8
- import { P as Rs, C as Is, X as Es, g as Z, i as J, j as ee, k as se, l as Ls, m as te } from "./dialog-67vvNv8e.mjs";
9
- import { H as be, u as Ts } from "./use-infinite-virtual-scroll-B_NwiBXK.mjs";
10
- import { M as Ds } from "./main-layout-CGs25JVH.mjs";
11
- import { d as Ms, P as ae, b as $s, h as Re, f as je, c as Fs, B as y, C as zs } from "./heading-DXxLDQ96.mjs";
12
- import { L as M } from "./loading-indicator-CSj2spwS.mjs";
13
- import { d as Os, b as Ie, c as ne } from "./hooks-pVotzebr.mjs";
14
- import { E as Bs, S as Hs } from "./separator-DgZ2VF9r.mjs";
15
- import { E as Ee } from "./empty-indicator-DTmBQa_3.mjs";
16
- import { S as Us, b as As, c as Vs, d as qs } from "./sheet-SOdCzxUt.mjs";
17
- var U = "Checkbox", [Ws] = Ms(U), [Qs, re] = Ws(U);
18
- function Gs(s) {
1
+ import { D as k, j as e, u as y, q as D, b as B, n as N, E as ts, F as L, G as z, H as ye, J as as, T as rs, a as F, N as T, p as H, e as ns, Z, o as Q } from "./index-BTzJVQ6S.mjs";
2
+ import { u as is, F as os, T as K, a as G, b as Y, d as X, c as ls } from "./filters-BsCI4RJg.mjs";
3
+ import { c as cs, u as ds, a as ms, B as us, b as ps, d as hs, M as E, e as xs } from "./use-scroll-restoration-CLAUAal3.mjs";
4
+ import { u as fs, U as we, d as bs, D as js, a as gs, E as vs, b as Cs, c as $ } from "./dropdown-menu-B4KGMiRI.mjs";
5
+ import { a as Ns, c as ks, F as J, b as _e, D as ee, M as ys, H as Se, R as ws, E as Pe } from "./reply-2Uvi3Kxb.mjs";
6
+ import { C as _s, F as Ss, c as Ps, a as Is, E as Ie, M as Re } from "./search-se7meOnL.mjs";
7
+ import { P as Rs, C as Es, X as Ls, g as se, i as te, j as ae, k as re, l as Ts, m as ne } from "./dialog-DaViJlnd.mjs";
8
+ import { H as Ce } from "./header-7zhnErbb.mjs";
9
+ import { M as Ds } from "./main-layout-DeqPTJTe.mjs";
10
+ import { d as Ms, P as ie, b as $s, h as Ee, f as Ne, c as Fs, B as C, C as zs } from "./heading-BCDx_eVF.mjs";
11
+ import { L as M } from "./loading-indicator-DiYqXomj.mjs";
12
+ import { d as Os, b as Le, c as oe } from "./hooks-DQL2O_El.mjs";
13
+ import { E as Bs, S as Hs } from "./separator-CdBM46dw.mjs";
14
+ import { E as Te } from "./empty-indicator-BaD6pCXM.mjs";
15
+ import { S as Us, b as As, c as Vs, d as qs } from "./sheet--k3SiDko.mjs";
16
+ import { u as Ws, a as Qs, L as Ks } from "./virtual-list-window-CQDEqNBL.mjs";
17
+ var U = "Checkbox", [Gs] = Ms(U), [Ys, le] = Gs(U);
18
+ function Xs(s) {
19
19
  const {
20
20
  __scopeCheckbox: t,
21
21
  checked: a,
22
- children: i,
23
- defaultChecked: n,
24
- disabled: r,
22
+ children: n,
23
+ defaultChecked: r,
24
+ disabled: i,
25
25
  form: o,
26
26
  name: l,
27
- onCheckedChange: d,
28
- required: c,
29
- value: h = "on",
27
+ onCheckedChange: c,
28
+ required: d,
29
+ value: u = "on",
30
30
  // @ts-expect-error
31
- internal_do_not_use_render: m
32
- } = s, [f, x] = $s({
31
+ internal_do_not_use_render: p
32
+ } = s, [h, f] = $s({
33
33
  prop: a,
34
- defaultProp: n ?? !1,
35
- onChange: d,
34
+ defaultProp: r ?? !1,
35
+ onChange: c,
36
36
  caller: U
37
- }), [p, v] = _(null), [j, g] = _(null), b = D(!1), C = p ? !!o || !!p.closest("form") : (
37
+ }), [m, b] = y(null), [g, j] = y(null), v = D(!1), P = m ? !!o || !!m.closest("form") : (
38
38
  // We set this to true by default so that events bubble to forms without JS (SSR)
39
39
  !0
40
- ), N = {
41
- checked: f,
42
- disabled: r,
43
- setChecked: x,
44
- control: p,
45
- setControl: v,
40
+ ), I = {
41
+ checked: h,
42
+ disabled: i,
43
+ setChecked: f,
44
+ control: m,
45
+ setControl: b,
46
46
  name: l,
47
47
  form: o,
48
- value: h,
49
- hasConsumerStoppedPropagationRef: b,
50
- required: c,
51
- defaultChecked: R(n) ? !1 : n,
52
- isFormControl: C,
53
- bubbleInput: j,
54
- setBubbleInput: g
48
+ value: u,
49
+ hasConsumerStoppedPropagationRef: v,
50
+ required: d,
51
+ defaultChecked: S(r) ? !1 : r,
52
+ isFormControl: P,
53
+ bubbleInput: g,
54
+ setBubbleInput: j
55
55
  };
56
56
  return /* @__PURE__ */ e.jsx(
57
- Qs,
57
+ Ys,
58
58
  {
59
59
  scope: t,
60
- ...N,
61
- children: Ks(m) ? m(N) : i
60
+ ...I,
61
+ children: Zs(p) ? p(I) : n
62
62
  }
63
63
  );
64
64
  }
65
- var Le = "CheckboxTrigger", Te = S(
66
- ({ __scopeCheckbox: s, onKeyDown: t, onClick: a, ...i }, n) => {
65
+ var De = "CheckboxTrigger", Me = k(
66
+ ({ __scopeCheckbox: s, onKeyDown: t, onClick: a, ...n }, r) => {
67
67
  const {
68
- control: r,
68
+ control: i,
69
69
  value: o,
70
70
  disabled: l,
71
- checked: d,
72
- required: c,
73
- setControl: h,
74
- setChecked: m,
75
- hasConsumerStoppedPropagationRef: f,
76
- isFormControl: x,
77
- bubbleInput: p
78
- } = re(Le, s), v = Re(n, h), j = D(d);
71
+ checked: c,
72
+ required: d,
73
+ setControl: u,
74
+ setChecked: p,
75
+ hasConsumerStoppedPropagationRef: h,
76
+ isFormControl: f,
77
+ bubbleInput: m
78
+ } = le(De, s), b = Ee(r, u), g = D(c);
79
79
  return B(() => {
80
- const g = r == null ? void 0 : r.form;
81
- if (g) {
82
- const b = () => m(j.current);
83
- return g.addEventListener("reset", b), () => g.removeEventListener("reset", b);
80
+ const j = i == null ? void 0 : i.form;
81
+ if (j) {
82
+ const v = () => p(g.current);
83
+ return j.addEventListener("reset", v), () => j.removeEventListener("reset", v);
84
84
  }
85
- }, [r, m]), /* @__PURE__ */ e.jsx(
86
- ae.button,
85
+ }, [i, p]), /* @__PURE__ */ e.jsx(
86
+ ie.button,
87
87
  {
88
88
  type: "button",
89
89
  role: "checkbox",
90
- "aria-checked": R(d) ? "mixed" : d,
91
- "aria-required": c,
92
- "data-state": ze(d),
90
+ "aria-checked": S(c) ? "mixed" : c,
91
+ "aria-required": d,
92
+ "data-state": Be(c),
93
93
  "data-disabled": l ? "" : void 0,
94
94
  disabled: l,
95
95
  value: o,
96
- ...i,
97
- ref: v,
98
- onKeyDown: je(t, (g) => {
99
- g.key === "Enter" && g.preventDefault();
96
+ ...n,
97
+ ref: b,
98
+ onKeyDown: Ne(t, (j) => {
99
+ j.key === "Enter" && j.preventDefault();
100
100
  }),
101
- onClick: je(a, (g) => {
102
- m((b) => R(b) ? !0 : !b), p && x && (f.current = g.isPropagationStopped(), f.current || g.stopPropagation());
101
+ onClick: Ne(a, (j) => {
102
+ p((v) => S(v) ? !0 : !v), m && f && (h.current = j.isPropagationStopped(), h.current || j.stopPropagation());
103
103
  })
104
104
  }
105
105
  );
106
106
  }
107
107
  );
108
- Te.displayName = Le;
109
- var ie = S(
108
+ Me.displayName = De;
109
+ var ce = k(
110
110
  (s, t) => {
111
111
  const {
112
112
  __scopeCheckbox: a,
113
- name: i,
114
- checked: n,
115
- defaultChecked: r,
113
+ name: n,
114
+ checked: r,
115
+ defaultChecked: i,
116
116
  required: o,
117
117
  disabled: l,
118
- value: d,
119
- onCheckedChange: c,
120
- form: h,
121
- ...m
118
+ value: c,
119
+ onCheckedChange: d,
120
+ form: u,
121
+ ...p
122
122
  } = s;
123
123
  return /* @__PURE__ */ e.jsx(
124
- Gs,
124
+ Xs,
125
125
  {
126
126
  __scopeCheckbox: a,
127
- checked: n,
128
- defaultChecked: r,
127
+ checked: r,
128
+ defaultChecked: i,
129
129
  disabled: l,
130
130
  required: o,
131
- onCheckedChange: c,
132
- name: i,
133
- form: h,
134
- value: d,
135
- internal_do_not_use_render: ({ isFormControl: f }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
131
+ onCheckedChange: d,
132
+ name: n,
133
+ form: u,
134
+ value: c,
135
+ internal_do_not_use_render: ({ isFormControl: h }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
136
136
  /* @__PURE__ */ e.jsx(
137
- Te,
137
+ Me,
138
138
  {
139
- ...m,
139
+ ...p,
140
140
  ref: t,
141
141
  __scopeCheckbox: a
142
142
  }
143
143
  ),
144
- f && /* @__PURE__ */ e.jsx(
145
- Fe,
144
+ h && /* @__PURE__ */ e.jsx(
145
+ Oe,
146
146
  {
147
147
  __scopeCheckbox: a
148
148
  }
@@ -152,20 +152,20 @@ var ie = S(
152
152
  );
153
153
  }
154
154
  );
155
- ie.displayName = U;
156
- var De = "CheckboxIndicator", Me = S(
155
+ ce.displayName = U;
156
+ var $e = "CheckboxIndicator", Fe = k(
157
157
  (s, t) => {
158
- const { __scopeCheckbox: a, forceMount: i, ...n } = s, r = re(De, a);
158
+ const { __scopeCheckbox: a, forceMount: n, ...r } = s, i = le($e, a);
159
159
  return /* @__PURE__ */ e.jsx(
160
160
  Rs,
161
161
  {
162
- present: i || R(r.checked) || r.checked === !0,
162
+ present: n || S(i.checked) || i.checked === !0,
163
163
  children: /* @__PURE__ */ e.jsx(
164
- ae.span,
164
+ ie.span,
165
165
  {
166
- "data-state": ze(r.checked),
167
- "data-disabled": r.disabled ? "" : void 0,
168
- ...n,
166
+ "data-state": Be(i.checked),
167
+ "data-disabled": i.disabled ? "" : void 0,
168
+ ...r,
169
169
  ref: t,
170
170
  style: { pointerEvents: "none", ...s.style }
171
171
  }
@@ -174,52 +174,52 @@ var De = "CheckboxIndicator", Me = S(
174
174
  );
175
175
  }
176
176
  );
177
- Me.displayName = De;
178
- var $e = "CheckboxBubbleInput", Fe = S(
177
+ Fe.displayName = $e;
178
+ var ze = "CheckboxBubbleInput", Oe = k(
179
179
  ({ __scopeCheckbox: s, ...t }, a) => {
180
180
  const {
181
- control: i,
182
- hasConsumerStoppedPropagationRef: n,
183
- checked: r,
181
+ control: n,
182
+ hasConsumerStoppedPropagationRef: r,
183
+ checked: i,
184
184
  defaultChecked: o,
185
185
  required: l,
186
- disabled: d,
187
- name: c,
188
- value: h,
189
- form: m,
190
- bubbleInput: f,
191
- setBubbleInput: x
192
- } = re($e, s), p = Re(a, x), v = ns(r), j = xs(i);
186
+ disabled: c,
187
+ name: d,
188
+ value: u,
189
+ form: p,
190
+ bubbleInput: h,
191
+ setBubbleInput: f
192
+ } = le(ze, s), m = Ee(a, f), b = is(i), g = fs(n);
193
193
  B(() => {
194
- const b = f;
195
- if (!b) return;
196
- const C = window.HTMLInputElement.prototype, k = Object.getOwnPropertyDescriptor(
197
- C,
194
+ const v = h;
195
+ if (!v) return;
196
+ const P = window.HTMLInputElement.prototype, R = Object.getOwnPropertyDescriptor(
197
+ P,
198
198
  "checked"
199
- ).set, u = !n.current;
200
- if (v !== r && k) {
201
- const I = new Event("click", { bubbles: u });
202
- b.indeterminate = R(r), k.call(b, R(r) ? !1 : r), b.dispatchEvent(I);
199
+ ).set, V = !r.current;
200
+ if (b !== i && R) {
201
+ const q = new Event("click", { bubbles: V });
202
+ v.indeterminate = S(i), R.call(v, S(i) ? !1 : i), v.dispatchEvent(q);
203
203
  }
204
- }, [f, v, r, n]);
205
- const g = D(R(r) ? !1 : r);
204
+ }, [h, b, i, r]);
205
+ const j = D(S(i) ? !1 : i);
206
206
  return /* @__PURE__ */ e.jsx(
207
- ae.input,
207
+ ie.input,
208
208
  {
209
209
  type: "checkbox",
210
210
  "aria-hidden": !0,
211
- defaultChecked: o ?? g.current,
211
+ defaultChecked: o ?? j.current,
212
212
  required: l,
213
- disabled: d,
214
- name: c,
215
- value: h,
216
- form: m,
213
+ disabled: c,
214
+ name: d,
215
+ value: u,
216
+ form: p,
217
217
  ...t,
218
218
  tabIndex: -1,
219
- ref: p,
219
+ ref: m,
220
220
  style: {
221
221
  ...t.style,
222
- ...j,
222
+ ...g,
223
223
  position: "absolute",
224
224
  pointerEvents: "none",
225
225
  opacity: 0,
@@ -233,89 +233,89 @@ var $e = "CheckboxBubbleInput", Fe = S(
233
233
  );
234
234
  }
235
235
  );
236
- Fe.displayName = $e;
237
- function Ks(s) {
236
+ Oe.displayName = ze;
237
+ function Zs(s) {
238
238
  return typeof s == "function";
239
239
  }
240
- function R(s) {
240
+ function S(s) {
241
241
  return s === "indeterminate";
242
242
  }
243
- function ze(s) {
244
- return R(s) ? "indeterminate" : s ? "checked" : "unchecked";
243
+ function Be(s) {
244
+ return S(s) ? "indeterminate" : s ? "checked" : "unchecked";
245
245
  }
246
- const Oe = S(({ className: s, ...t }, a) => /* @__PURE__ */ e.jsx(
247
- ie,
246
+ const He = k(({ className: s, ...t }, a) => /* @__PURE__ */ e.jsx(
247
+ ce,
248
248
  {
249
249
  ref: a,
250
- className: w(
250
+ className: N(
251
251
  "grid place-content-center peer h-4 w-4 shrink-0 rounded-xs border border-primary shadow focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
252
252
  s
253
253
  ),
254
254
  ...t,
255
255
  children: /* @__PURE__ */ e.jsx(
256
- Me,
256
+ Fe,
257
257
  {
258
- className: w("grid place-content-center text-current"),
259
- children: /* @__PURE__ */ e.jsx(Is, { className: "size-4" })
258
+ className: N("grid place-content-center text-current"),
259
+ children: /* @__PURE__ */ e.jsx(Es, { className: "size-4" })
260
260
  }
261
261
  )
262
262
  }
263
263
  ));
264
- Oe.displayName = ie.displayName;
265
- var Ys = Symbol.for("react.lazy"), O = es[" use ".trim().toString()];
266
- function Xs(s) {
264
+ He.displayName = ce.displayName;
265
+ var Js = Symbol.for("react.lazy"), O = ts[" use ".trim().toString()];
266
+ function et(s) {
267
267
  return typeof s == "object" && s !== null && "then" in s;
268
268
  }
269
- function Be(s) {
270
- return s != null && typeof s == "object" && "$$typeof" in s && s.$$typeof === Ys && "_payload" in s && Xs(s._payload);
269
+ function Ue(s) {
270
+ return s != null && typeof s == "object" && "$$typeof" in s && s.$$typeof === Js && "_payload" in s && et(s._payload);
271
271
  }
272
272
  // @__NO_SIDE_EFFECTS__
273
- function Zs(s) {
274
- const t = /* @__PURE__ */ Js(s), a = S((i, n) => {
275
- let { children: r, ...o } = i;
276
- Be(r) && typeof O == "function" && (r = O(r._payload));
277
- const l = L.toArray(r), d = l.find(st);
278
- if (d) {
279
- const c = d.props.children, h = l.map((m) => m === d ? L.count(c) > 1 ? L.only(null) : F(c) ? c.props.children : null : m);
280
- return /* @__PURE__ */ e.jsx(t, { ...o, ref: n, children: F(c) ? Ce(c, void 0, h) : null });
273
+ function st(s) {
274
+ const t = /* @__PURE__ */ tt(s), a = k((n, r) => {
275
+ let { children: i, ...o } = n;
276
+ Ue(i) && typeof O == "function" && (i = O(i._payload));
277
+ const l = L.toArray(i), c = l.find(rt);
278
+ if (c) {
279
+ const d = c.props.children, u = l.map((p) => p === c ? L.count(d) > 1 ? L.only(null) : z(d) ? d.props.children : null : p);
280
+ return /* @__PURE__ */ e.jsx(t, { ...o, ref: r, children: z(d) ? ye(d, void 0, u) : null });
281
281
  }
282
- return /* @__PURE__ */ e.jsx(t, { ...o, ref: n, children: r });
282
+ return /* @__PURE__ */ e.jsx(t, { ...o, ref: r, children: i });
283
283
  });
284
284
  return a.displayName = `${s}.Slot`, a;
285
285
  }
286
286
  // @__NO_SIDE_EFFECTS__
287
- function Js(s) {
288
- const t = S((a, i) => {
289
- let { children: n, ...r } = a;
290
- if (Be(n) && typeof O == "function" && (n = O(n._payload)), F(n)) {
291
- const o = at(n), l = tt(r, n.props);
292
- return n.type !== ss && (l.ref = i ? Fs(i, o) : o), Ce(n, l);
287
+ function tt(s) {
288
+ const t = k((a, n) => {
289
+ let { children: r, ...i } = a;
290
+ if (Ue(r) && typeof O == "function" && (r = O(r._payload)), z(r)) {
291
+ const o = it(r), l = nt(i, r.props);
292
+ return r.type !== as && (l.ref = n ? Fs(n, o) : o), ye(r, l);
293
293
  }
294
- return L.count(n) > 1 ? L.only(null) : null;
294
+ return L.count(r) > 1 ? L.only(null) : null;
295
295
  });
296
296
  return t.displayName = `${s}.SlotClone`, t;
297
297
  }
298
- var et = Symbol("radix.slottable");
299
- function st(s) {
300
- return F(s) && typeof s.type == "function" && "__radixId" in s.type && s.type.__radixId === et;
298
+ var at = Symbol("radix.slottable");
299
+ function rt(s) {
300
+ return z(s) && typeof s.type == "function" && "__radixId" in s.type && s.type.__radixId === at;
301
301
  }
302
- function tt(s, t) {
302
+ function nt(s, t) {
303
303
  const a = { ...t };
304
- for (const i in t) {
305
- const n = s[i], r = t[i];
306
- /^on[A-Z]/.test(i) ? n && r ? a[i] = (...l) => {
307
- const d = r(...l);
308
- return n(...l), d;
309
- } : n && (a[i] = n) : i === "style" ? a[i] = { ...n, ...r } : i === "className" && (a[i] = [n, r].filter(Boolean).join(" "));
304
+ for (const n in t) {
305
+ const r = s[n], i = t[n];
306
+ /^on[A-Z]/.test(n) ? r && i ? a[n] = (...l) => {
307
+ const c = i(...l);
308
+ return r(...l), c;
309
+ } : r && (a[n] = r) : n === "style" ? a[n] = { ...r, ...i } : n === "className" && (a[n] = [r, i].filter(Boolean).join(" "));
310
310
  }
311
311
  return { ...s, ...a };
312
312
  }
313
- function at(s) {
314
- var i, n;
315
- let t = (i = Object.getOwnPropertyDescriptor(s.props, "ref")) == null ? void 0 : i.get, a = t && "isReactWarning" in t && t.isReactWarning;
316
- return a ? s.ref : (t = (n = Object.getOwnPropertyDescriptor(s, "ref")) == null ? void 0 : n.get, a = t && "isReactWarning" in t && t.isReactWarning, a ? s.props.ref : s.props.ref || s.ref);
313
+ function it(s) {
314
+ var n, r;
315
+ let t = (n = Object.getOwnPropertyDescriptor(s.props, "ref")) == null ? void 0 : n.get, a = t && "isReactWarning" in t && t.isReactWarning;
316
+ return a ? s.ref : (t = (r = Object.getOwnPropertyDescriptor(s, "ref")) == null ? void 0 : r.get, a = t && "isReactWarning" in t && t.isReactWarning, a ? s.props.ref : s.props.ref || s.ref);
317
317
  }
318
- var nt = [
318
+ var ot = [
319
319
  "a",
320
320
  "button",
321
321
  "div",
@@ -333,131 +333,75 @@ var nt = [
333
333
  "span",
334
334
  "svg",
335
335
  "ul"
336
- ], rt = nt.reduce((s, t) => {
337
- const a = /* @__PURE__ */ Zs(`Primitive.${t}`), i = S((n, r) => {
338
- const { asChild: o, ...l } = n, d = o ? a : t;
339
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e.jsx(d, { ...l, ref: r });
336
+ ], lt = ot.reduce((s, t) => {
337
+ const a = /* @__PURE__ */ st(`Primitive.${t}`), n = k((r, i) => {
338
+ const { asChild: o, ...l } = r, c = o ? a : t;
339
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e.jsx(c, { ...l, ref: i });
340
340
  });
341
- return i.displayName = `Primitive.${t}`, { ...s, [t]: i };
342
- }, {}), it = "Label", He = S((s, t) => /* @__PURE__ */ e.jsx(
343
- rt.label,
341
+ return n.displayName = `Primitive.${t}`, { ...s, [t]: n };
342
+ }, {}), ct = "Label", Ae = k((s, t) => /* @__PURE__ */ e.jsx(
343
+ lt.label,
344
344
  {
345
345
  ...s,
346
346
  ref: t,
347
347
  onMouseDown: (a) => {
348
- var n;
349
- a.target.closest("button, input, select, textarea") || ((n = s.onMouseDown) == null || n.call(s, a), !a.defaultPrevented && a.detail > 1 && a.preventDefault());
348
+ var r;
349
+ a.target.closest("button, input, select, textarea") || ((r = s.onMouseDown) == null || r.call(s, a), !a.defaultPrevented && a.detail > 1 && a.preventDefault());
350
350
  }
351
351
  }
352
352
  ));
353
- He.displayName = it;
354
- var Ue = He;
355
- const ot = ts(
353
+ Ae.displayName = ct;
354
+ var Ve = Ae;
355
+ const dt = rs(
356
356
  "text-sm leading-none font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
357
- ), Ae = S(({ className: s, ...t }, a) => /* @__PURE__ */ e.jsx(
358
- Ue,
357
+ ), qe = k(({ className: s, ...t }, a) => /* @__PURE__ */ e.jsx(
358
+ Ve,
359
359
  {
360
360
  ref: a,
361
- className: w(ot(), s),
361
+ className: N(dt(), s),
362
362
  ...t
363
363
  }
364
364
  ));
365
- Ae.displayName = Ue.displayName;
366
- const lt = ({ children: s, className: t, ...a }) => /* @__PURE__ */ e.jsx("section", { className: w("flex gap-6 flex-col p-4 lg:p-8 size-full grow", t), ...a, children: s });
367
- function ge({
368
- knownItems: s,
369
- useSearch: t,
370
- useGetById: a,
371
- filters: i,
372
- filterFieldName: n,
373
- searchFieldName: r,
374
- toOption: o
375
- }) {
376
- const [l, d] = _(""), { data: c, isLoading: h } = t(l), m = P(() => {
377
- const b = i.find((C) => C.field === n);
378
- return b != null && b.values[0] ? String(b.values[0]) : "";
379
- }, [i, n]), f = P(() => !m || s.some((C) => C.id === m) ? !1 : !((c == null ? void 0 : c[r]) ?? []).some((C) => C.id === m), [m, s, c, r]), { data: x, isLoading: p } = a(m || "", {
380
- enabled: f,
381
- defaultErrorHandler: !1
382
- }), v = h || p, j = z((b) => o(b), [o]);
365
+ qe.displayName = Ve.displayName;
366
+ const mt = ({ children: s, className: t, ...a }) => /* @__PURE__ */ e.jsx("section", { className: N("flex gap-6 flex-col p-4 lg:p-8 size-full grow", t), ...a, children: s });
367
+ function ut(s) {
383
368
  return {
384
- options: P(() => {
385
- var k;
386
- const b = (c == null ? void 0 : c[r]) ?? [], C = {};
387
- for (const u of s)
388
- C[u.id] = j(u);
389
- for (const u of b)
390
- C[u.id] = j(u);
391
- const N = (k = x == null ? void 0 : x[r]) == null ? void 0 : k[0];
392
- return N != null && N.id && (C[N.id] = j(N)), m && !(m in C) && (C[m] = { value: m, label: `ID: ${m}` }), Object.values(C);
393
- }, [s, c, r, x, m, j]),
394
- isLoading: v,
395
- searchValue: l,
396
- onSearchChange: d
369
+ value: s.id,
370
+ label: s.name || "Unknown name",
371
+ detail: s.email ?? "(Unknown email)"
397
372
  };
398
373
  }
399
- function ct(s) {
400
- const [t] = Ne(s, 200);
401
- return os({
402
- searchParams: {
403
- ...t && { search: t },
404
- limit: "100",
405
- order: "created_at DESC"
406
- }
407
- });
408
- }
409
- function dt(s) {
410
- const [t] = Ne(s, 200), a = t ? `title:~'${t.replace(/'/g, "\\'")}'` : "";
411
- return hs({
412
- searchParams: {
413
- ...a && { filter: a },
414
- limit: "100",
415
- fields: "id,title",
416
- order: "published_at DESC"
417
- }
418
- });
374
+ const pt = cs({
375
+ id: "posts.members.remote",
376
+ buildBrowseSearchParams: (s) => ({
377
+ limit: "100",
378
+ order: "created_at DESC",
379
+ ...s ? { search: s } : {}
380
+ }),
381
+ selectItems: (s) => s == null ? void 0 : s.members,
382
+ useQuery: ({ enabled: s, searchParams: t }) => ds({
383
+ enabled: s,
384
+ keepPreviousData: !0,
385
+ searchParams: t
386
+ }),
387
+ toOption: ut
388
+ });
389
+ function ht() {
390
+ return pt();
419
391
  }
420
- const mt = ({
421
- knownPosts: s,
422
- knownMembers: t,
423
- filters: a,
424
- onFiltersChange: i
392
+ const xt = ({
393
+ filters: s,
394
+ onFiltersChange: t
425
395
  }) => {
426
- const n = ge({
427
- knownItems: s,
428
- useSearch: dt,
429
- useGetById: ps,
430
- searchFieldName: "posts",
431
- filters: a,
432
- filterFieldName: "post",
433
- toOption: (c) => ({
434
- value: c.id,
435
- label: c.title || "(Untitled)"
436
- })
437
- }), r = ge({
438
- knownItems: t,
439
- useSearch: ct,
440
- useGetById: ls,
441
- searchFieldName: "members",
442
- filters: a,
443
- filterFieldName: "author",
444
- toOption: (c) => ({
445
- value: c.id,
446
- label: c.name || "Unknown name",
447
- detail: c.email ?? "(Unknown email)"
448
- })
449
- }), o = P(
396
+ const a = ms(), n = ht(), r = F(
450
397
  () => [
451
398
  {
452
399
  key: "author",
453
400
  label: "Author",
454
401
  type: "select",
455
- icon: /* @__PURE__ */ e.jsx(ke, { className: "size-4" }),
456
- options: r.options,
457
- isLoading: r.options.length === 0 && r.isLoading,
458
- onSearchChange: r.onSearchChange,
459
- searchValue: r.searchValue,
402
+ icon: /* @__PURE__ */ e.jsx(we, { className: "size-4" }),
460
403
  searchable: !0,
404
+ valueSource: n,
461
405
  className: "w-80",
462
406
  popoverContentClassName: "w-80",
463
407
  operators: [
@@ -469,12 +413,9 @@ const mt = ({
469
413
  key: "post",
470
414
  label: "Post",
471
415
  type: "select",
472
- icon: /* @__PURE__ */ e.jsx(Cs, { className: "size-4" }),
473
- options: n.options,
474
- isLoading: n.options.length === 0 && n.isLoading,
475
- onSearchChange: n.onSearchChange,
476
- searchValue: n.searchValue,
416
+ icon: /* @__PURE__ */ e.jsx(Ns, { className: "size-4" }),
477
417
  searchable: !0,
418
+ valueSource: a,
478
419
  className: "w-full max-w-80",
479
420
  popoverContentClassName: "w-full max-w-[calc(100vw-32px)] max-w-80",
480
421
  operators: [
@@ -486,7 +427,7 @@ const mt = ({
486
427
  key: "body",
487
428
  label: "Text",
488
429
  type: "text",
489
- icon: /* @__PURE__ */ e.jsx(Ns, { className: "size-4" }),
430
+ icon: /* @__PURE__ */ e.jsx(ks, { className: "size-4" }),
490
431
  placeholder: "Search comment text...",
491
432
  operators: [
492
433
  { value: "contains", label: "contains" },
@@ -500,7 +441,7 @@ const mt = ({
500
441
  key: "status",
501
442
  label: "Status",
502
443
  type: "select",
503
- icon: /* @__PURE__ */ e.jsx(fs, { className: "size-4" }),
444
+ icon: /* @__PURE__ */ e.jsx(bs, { className: "size-4" }),
504
445
  options: [
505
446
  { value: "published", label: "Published" },
506
447
  { value: "hidden", label: "Hidden" }
@@ -515,7 +456,7 @@ const mt = ({
515
456
  key: "reported",
516
457
  label: "Reported",
517
458
  type: "select",
518
- icon: /* @__PURE__ */ e.jsx(Y, { className: "size-4" }),
459
+ icon: /* @__PURE__ */ e.jsx(J, { className: "size-4" }),
519
460
  options: [
520
461
  { value: "true", label: "Yes" },
521
462
  { value: "false", label: "No" }
@@ -531,7 +472,7 @@ const mt = ({
531
472
  label: "Date",
532
473
  type: "date",
533
474
  className: "w-full max-w-32",
534
- icon: /* @__PURE__ */ e.jsx(ws, { className: "size-4" }),
475
+ icon: /* @__PURE__ */ e.jsx(_s, { className: "size-4" }),
535
476
  operators: [
536
477
  { value: "is", label: "is" },
537
478
  { value: "before", label: "before" },
@@ -539,92 +480,92 @@ const mt = ({
539
480
  ]
540
481
  }
541
482
  ],
542
- [n, r]
543
- ), l = a.length > 0, d = w(
483
+ [n, a]
484
+ ), i = s.length > 0, o = N(
544
485
  "flex flex-row",
545
- !l && "[grid-area:actions] pt-5 justify-start sm:justify-end sm:pt-0",
546
- l && "col-start-1 col-end-4 row-start-3 pt-5"
486
+ !i && "[grid-area:actions] pt-5 justify-start sm:justify-end sm:pt-0",
487
+ i && "col-start-1 col-end-4 row-start-3 pt-5"
547
488
  );
548
- return /* @__PURE__ */ e.jsx("div", { className: d, children: /* @__PURE__ */ e.jsx(
549
- rs,
489
+ return /* @__PURE__ */ e.jsx("div", { className: o, children: /* @__PURE__ */ e.jsx(
490
+ os,
550
491
  {
551
- addButtonIcon: l ? /* @__PURE__ */ e.jsx(_s, {}) : /* @__PURE__ */ e.jsx(Ss, {}),
552
- addButtonText: l ? "Add filter" : "Filter",
492
+ addButtonIcon: i ? /* @__PURE__ */ e.jsx(Ss, {}) : /* @__PURE__ */ e.jsx(Ps, {}),
493
+ addButtonText: i ? "Add filter" : "Filter",
553
494
  allowMultiple: !1,
554
- className: `[&>button]:order-last ${l ? "[&>button]:border-none" : "w-auto"}`,
495
+ className: `[&>button]:order-last ${i ? "[&>button]:border-none" : "w-auto"}`,
555
496
  clearButtonClassName: "font-normal text-muted-foreground",
556
- clearButtonIcon: /* @__PURE__ */ e.jsx(Es, {}),
497
+ clearButtonIcon: /* @__PURE__ */ e.jsx(Ls, {}),
557
498
  clearButtonText: "Clear",
558
- fields: o,
559
- filters: a,
499
+ fields: r,
500
+ filters: s,
560
501
  keyboardShortcut: "f",
561
- popoverAlign: l ? "start" : "end",
562
- showClearButton: l,
502
+ popoverAlign: i ? "start" : "end",
503
+ showClearButton: i,
563
504
  showSearchInput: !1,
564
- onChange: i
505
+ onChange: t
565
506
  }
566
507
  ) });
567
- }, ut = ({ children: s }) => /* @__PURE__ */ e.jsxs(be, { className: "relative pb-6! md:sticky", variant: "inline-nav", children: [
568
- /* @__PURE__ */ e.jsx(be.Title, { children: "Comments" }),
508
+ }, ft = ({ children: s }) => /* @__PURE__ */ e.jsxs(Ce, { className: "relative pb-6! md:sticky", variant: "inline-nav", children: [
509
+ /* @__PURE__ */ e.jsx(Ce.Title, { children: "Comments" }),
569
510
  s
570
- ] }), ht = ({ children: s }) => /* @__PURE__ */ e.jsx(Ds, { children: /* @__PURE__ */ e.jsx("div", { className: "grid w-full grow", children: /* @__PURE__ */ e.jsx("div", { className: "flex h-full flex-col", "data-testid": "comments-page", children: s }) }) });
571
- function pt({ onClick: s, expanded: t }) {
511
+ ] }), bt = ({ children: s }) => /* @__PURE__ */ e.jsx(Ds, { children: /* @__PURE__ */ e.jsx("div", { className: "grid w-full grow", children: /* @__PURE__ */ e.jsx("div", { className: "flex h-full flex-col", "data-testid": "comments-page", children: s }) }) });
512
+ function jt({ onClick: s, expanded: t }) {
572
513
  return /* @__PURE__ */ e.jsxs(
573
- y,
514
+ C,
574
515
  {
575
516
  className: "shrink-0 gap-0.5 self-start p-0 text-base hover:bg-transparent",
576
517
  variant: "ghost",
577
518
  onClick: s,
578
519
  children: [
579
520
  t ? "Show less" : "Show more",
580
- t ? /* @__PURE__ */ e.jsx(Ps, {}) : /* @__PURE__ */ e.jsx(zs, {})
521
+ t ? /* @__PURE__ */ e.jsx(Is, {}) : /* @__PURE__ */ e.jsx(zs, {})
581
522
  ]
582
523
  }
583
524
  );
584
525
  }
585
- function Ve({ item: s }) {
586
- const t = D(null), [a, i] = _(!1), [n, r] = _(!1);
526
+ function We({ item: s }) {
527
+ const t = D(null), [a, n] = y(!1), [r, i] = y(!1);
587
528
  return B(() => {
588
- if (n)
529
+ if (r)
589
530
  return;
590
531
  const o = () => {
591
- t.current && i(t.current.scrollHeight > t.current.clientHeight);
532
+ t.current && n(t.current.scrollHeight > t.current.clientHeight);
592
533
  };
593
534
  return o(), window.addEventListener("resize", o), () => window.removeEventListener("resize", o);
594
- }, [s.html, n]), /* @__PURE__ */ e.jsx("div", { className: "mt-1 flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs("div", { className: `flex max-w-full flex-col items-start ${s.status === "hidden" && "opacity-50"}`, children: [
535
+ }, [s.html, r]), /* @__PURE__ */ e.jsx("div", { className: "mt-1 flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs("div", { className: `flex max-w-full flex-col items-start ${s.status === "hidden" && "opacity-50"}`, children: [
595
536
  /* @__PURE__ */ e.jsx(
596
537
  "div",
597
538
  {
598
539
  dangerouslySetInnerHTML: { __html: s.html || "" },
599
540
  ref: t,
600
- className: w(
541
+ className: N(
601
542
  "prose flex-1 text-base max-w-[80ch] balance leading-[1.5em] [&_*]:leading-[1.5em] [&_*]:text-base [&_*]:font-normal [&_blockquote]:border-l-[3px] [&_blockquote]:border-foreground [&_blockquote]:p-0 [&_blockquote]:pl-3 [&_blockquote_p]:mt-0 [&_a]:underline",
602
- n ? "-mb-1 [&_p]:mb-[0.85em]" : "line-clamp-2 [&_p]:m-0 [&_blockquote+p]:mt-1 mb-1"
543
+ r ? "-mb-1 [&_p]:mb-[0.85em]" : "line-clamp-2 [&_p]:m-0 [&_blockquote+p]:mt-1 mb-1"
603
544
  )
604
545
  }
605
546
  ),
606
- a && /* @__PURE__ */ e.jsx(pt, { expanded: n, onClick: () => r(!n) })
547
+ a && /* @__PURE__ */ e.jsx(jt, { expanded: r, onClick: () => i(!r) })
607
548
  ] }) });
608
549
  }
609
- const A = "CommentsResponseType", xt = Os({
550
+ const A = "CommentsResponseType", gt = Os({
610
551
  dataType: A,
611
552
  path: "/comments/",
612
553
  defaultNextPageParams: (s, t) => {
613
- var a, i;
554
+ var a, n;
614
555
  return (a = s.meta) != null && a.pagination.next ? {
615
556
  ...t,
616
- page: (((i = s.meta) == null ? void 0 : i.pagination.next) || 1).toString()
557
+ page: (((n = s.meta) == null ? void 0 : n.pagination.next) || 1).toString()
617
558
  } : void 0;
618
559
  },
619
560
  returnData: (s) => {
620
- const { pages: t } = s, a = t.flatMap((n) => n.comments), i = t[t.length - 1].meta;
561
+ const { pages: t } = s, a = t.flatMap((r) => r.comments), n = t[t.length - 1].meta;
621
562
  return {
622
563
  comments: a,
623
- meta: i,
624
- isEnd: i ? i.pagination.pages === i.pagination.page : !0
564
+ meta: n,
565
+ isEnd: n ? n.pagination.pages === n.pagination.page : !0
625
566
  };
626
567
  }
627
- }), qe = (s) => xt({
568
+ }), Qe = (s) => gt({
628
569
  ...s,
629
570
  searchParams: {
630
571
  limit: "100",
@@ -632,7 +573,7 @@ const A = "CommentsResponseType", xt = Os({
632
573
  include: "member,post,parent",
633
574
  ...s == null ? void 0 : s.searchParams
634
575
  }
635
- }), We = Ie({
576
+ }), Ke = Le({
636
577
  method: "PUT",
637
578
  path: ({ id: s }) => `/comments/${s}/`,
638
579
  body: ({ id: s }) => ({
@@ -644,7 +585,7 @@ const A = "CommentsResponseType", xt = Os({
644
585
  invalidateQueries: {
645
586
  dataType: A
646
587
  }
647
- }), Qe = Ie({
588
+ }), Ge = Le({
648
589
  method: "PUT",
649
590
  path: ({ id: s }) => `/comments/${s}/`,
650
591
  body: ({ id: s }) => ({
@@ -656,16 +597,16 @@ const A = "CommentsResponseType", xt = Os({
656
597
  invalidateQueries: {
657
598
  dataType: A
658
599
  }
659
- }), ft = ne({
600
+ }), vt = oe({
660
601
  dataType: A,
661
602
  path: (s) => `/comments/${s}/`,
662
603
  defaultSearchParams: {
663
604
  include: "member,post,count.replies,count.direct_replies,count.likes,count.reports,parent,in_reply_to"
664
605
  }
665
- }), bt = ne({
606
+ }), Ct = oe({
666
607
  dataType: "CommentReportsResponseType",
667
608
  path: (s) => `/comments/${s}/reports/`
668
- }), jt = (s, t) => bt(s, { ...t }), gt = ne({
609
+ }), Nt = (s, t) => Ct(s, { ...t }), kt = oe({
669
610
  dataType: "CommentLikesResponseType",
670
611
  path: (s) => `/comments/${s}/likes/`,
671
612
  defaultSearchParams: {
@@ -673,7 +614,7 @@ const A = "CommentsResponseType", xt = Os({
673
614
  limit: "100",
674
615
  order: "created_at desc"
675
616
  }
676
- }), vt = (s, t) => gt(s, { ...t }), Ct = (s, t) => qe({
617
+ }), yt = (s, t) => kt(s, { ...t }), wt = (s, t) => Qe({
677
618
  ...t,
678
619
  searchParams: {
679
620
  filter: `(parent_id:${s}+in_reply_to_id:null),in_reply_to_id:${s}`,
@@ -682,7 +623,7 @@ const A = "CommentsResponseType", xt = Os({
682
623
  limit: "100"
683
624
  }
684
625
  });
685
- function Nt(s) {
626
+ function _t(s) {
686
627
  const t = new Date(s);
687
628
  return new Intl.DateTimeFormat("en-US", {
688
629
  month: "short",
@@ -692,49 +633,49 @@ function Nt(s) {
692
633
  minute: "numeric"
693
634
  }).format(t).replace(/(\d+),(\s+\d{4})/, "$1$2");
694
635
  }
695
- function Ge({
636
+ function Ye({
696
637
  memberName: s,
697
638
  memberId: t,
698
639
  createdAt: a,
699
- isHidden: i,
700
- canComment: n,
701
- onAuthorClick: r,
640
+ isHidden: n,
641
+ canComment: r,
642
+ onAuthorClick: i,
702
643
  postTitle: o,
703
644
  onPostClick: l,
704
- className: d
645
+ className: c
705
646
  }) {
706
- return /* @__PURE__ */ e.jsxs("div", { className: w("flex items-baseline gap-4", d), children: [
707
- /* @__PURE__ */ e.jsxs("div", { className: w(
647
+ return /* @__PURE__ */ e.jsxs("div", { className: N("flex items-baseline gap-4", c), children: [
648
+ /* @__PURE__ */ e.jsxs("div", { className: N(
708
649
  "mb-1 flex min-w-0 items-center gap-x-1 text-sm",
709
- i && "opacity-50"
650
+ n && "opacity-50"
710
651
  ), children: [
711
- /* @__PURE__ */ e.jsx("div", { className: "whitespace-nowrap", children: t && r ? /* @__PURE__ */ e.jsx(
712
- y,
652
+ /* @__PURE__ */ e.jsx("div", { className: "whitespace-nowrap", children: t && i ? /* @__PURE__ */ e.jsx(
653
+ C,
713
654
  {
714
655
  className: "flex h-auto items-center gap-1.5 truncate p-0 font-semibold text-primary hover:opacity-70",
715
656
  variant: "link",
716
- onClick: r,
657
+ onClick: i,
717
658
  children: s || "Unknown"
718
659
  }
719
660
  ) : /* @__PURE__ */ e.jsx("span", { className: "block truncate font-semibold", children: s || "Unknown" }) }),
720
- n === !1 && /* @__PURE__ */ e.jsx(q, { children: /* @__PURE__ */ e.jsxs(W, { children: [
721
- /* @__PURE__ */ e.jsx(Q, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { "data-testid": "commenting-disabled-indicator", children: /* @__PURE__ */ e.jsx(
722
- ye,
661
+ r === !1 && /* @__PURE__ */ e.jsx(K, { children: /* @__PURE__ */ e.jsxs(G, { children: [
662
+ /* @__PURE__ */ e.jsx(Y, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { "data-testid": "commenting-disabled-indicator", children: /* @__PURE__ */ e.jsx(
663
+ _e,
723
664
  {
724
665
  className: "size-3.5 text-muted-foreground"
725
666
  }
726
667
  ) }) }),
727
- /* @__PURE__ */ e.jsx(G, { children: "Comments disabled" })
668
+ /* @__PURE__ */ e.jsx(X, { children: "Comments disabled" })
728
669
  ] }) }),
729
- /* @__PURE__ */ e.jsx(X, { className: "shrink-0 text-muted-foreground/50", size: 16 }),
730
- /* @__PURE__ */ e.jsx("div", { className: "shrink-0 whitespace-nowrap", children: a && /* @__PURE__ */ e.jsx(q, { children: /* @__PURE__ */ e.jsxs(W, { children: [
731
- /* @__PURE__ */ e.jsx(Q, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "cursor-default text-sm text-muted-foreground", children: T(a) }) }),
732
- /* @__PURE__ */ e.jsx(G, { children: Nt(a) })
670
+ /* @__PURE__ */ e.jsx(ee, { className: "shrink-0 text-muted-foreground/50", size: 16 }),
671
+ /* @__PURE__ */ e.jsx("div", { className: "shrink-0 whitespace-nowrap", children: a && /* @__PURE__ */ e.jsx(K, { children: /* @__PURE__ */ e.jsxs(G, { children: [
672
+ /* @__PURE__ */ e.jsx(Y, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "cursor-default text-sm text-muted-foreground", children: T(a) }) }),
673
+ /* @__PURE__ */ e.jsx(X, { children: _t(a) })
733
674
  ] }) }) }),
734
675
  o && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
735
676
  /* @__PURE__ */ e.jsx("div", { className: "shrink-0 text-muted-foreground", children: "on" }),
736
677
  /* @__PURE__ */ e.jsx("div", { className: "min-w-0 truncate", children: l ? /* @__PURE__ */ e.jsx(
737
- y,
678
+ C,
738
679
  {
739
680
  className: "block h-auto w-full cursor-pointer truncate p-0 text-left font-medium text-gray-800 hover:opacity-70 dark:text-gray-400",
740
681
  variant: "link",
@@ -744,102 +685,102 @@ function Ge({
744
685
  ) : /* @__PURE__ */ e.jsx("span", { className: "font-medium text-gray-800 dark:text-gray-400", children: o }) })
745
686
  ] })
746
687
  ] }),
747
- i && /* @__PURE__ */ e.jsx(cs, { variant: "secondary", children: "Hidden" })
688
+ n && /* @__PURE__ */ e.jsx(us, { variant: "secondary", children: "Hidden" })
748
689
  ] });
749
690
  }
750
- function kt({
691
+ function St({
751
692
  open: s,
752
693
  memberName: t,
753
694
  onOpenChange: a,
754
- onConfirm: i
695
+ onConfirm: n
755
696
  }) {
756
- const [n, r] = _(!1), o = (d) => {
757
- d || r(!1), a(d);
697
+ const [r, i] = y(!1), o = (c) => {
698
+ c || i(!1), a(c);
758
699
  }, l = () => {
759
- i(n), r(!1);
700
+ n(r), i(!1);
760
701
  };
761
- return /* @__PURE__ */ e.jsx(Z, { open: s, onOpenChange: o, children: /* @__PURE__ */ e.jsxs(J, { className: "gap-5", children: [
762
- /* @__PURE__ */ e.jsxs(ee, { children: [
763
- /* @__PURE__ */ e.jsx(se, { children: "Disable comments" }),
764
- /* @__PURE__ */ e.jsxs(Ls, { children: [
702
+ return /* @__PURE__ */ e.jsx(se, { open: s, onOpenChange: o, children: /* @__PURE__ */ e.jsxs(te, { className: "gap-5", children: [
703
+ /* @__PURE__ */ e.jsxs(ae, { children: [
704
+ /* @__PURE__ */ e.jsx(re, { children: "Disable comments" }),
705
+ /* @__PURE__ */ e.jsxs(Ts, { children: [
765
706
  t || "This member",
766
707
  " won't be able to comment in the future. You can re-enable commenting anytime."
767
708
  ] })
768
709
  ] }),
769
710
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
770
711
  /* @__PURE__ */ e.jsx(
771
- Oe,
712
+ He,
772
713
  {
773
- checked: n,
714
+ checked: r,
774
715
  id: "hide-comments",
775
- onCheckedChange: (d) => r(d === !0)
716
+ onCheckedChange: (c) => i(c === !0)
776
717
  }
777
718
  ),
778
- /* @__PURE__ */ e.jsx(Ae, { htmlFor: "hide-comments", children: "Hide all previous comments" })
719
+ /* @__PURE__ */ e.jsx(qe, { htmlFor: "hide-comments", children: "Hide all previous comments" })
779
720
  ] }),
780
- /* @__PURE__ */ e.jsxs(te, { children: [
781
- /* @__PURE__ */ e.jsx(y, { variant: "outline", onClick: () => o(!1), children: "Cancel" }),
782
- /* @__PURE__ */ e.jsx(y, { onClick: l, children: "Disable comments" })
721
+ /* @__PURE__ */ e.jsxs(ne, { children: [
722
+ /* @__PURE__ */ e.jsx(C, { variant: "outline", onClick: () => o(!1), children: "Cancel" }),
723
+ /* @__PURE__ */ e.jsx(C, { onClick: l, children: "Disable comments" })
783
724
  ] })
784
725
  ] }) });
785
726
  }
786
- function Ke({
727
+ function Xe({
787
728
  comment: s
788
729
  }) {
789
- const { mutate: t } = ds(), { mutate: a } = ms(), [i, n] = _(!1), { id: r, post: o, member: l } = s, d = o == null ? void 0 : o.url, c = l == null ? void 0 : l.id, h = l == null ? void 0 : l.can_comment, m = (x) => {
790
- c && (t({
791
- id: c,
792
- reason: `Disabled from comment ${r}`,
793
- hideComments: x
794
- }), n(!1));
795
- }, f = () => {
796
- c && a({ id: c });
730
+ const { mutate: t } = ps(), { mutate: a } = hs(), [n, r] = y(!1), { id: i, post: o, member: l } = s, c = o == null ? void 0 : o.url, d = l == null ? void 0 : l.id, u = l == null ? void 0 : l.can_comment, p = (f) => {
731
+ d && (t({
732
+ id: d,
733
+ reason: `Disabled from comment ${i}`,
734
+ hideComments: f
735
+ }), r(!1));
736
+ }, h = () => {
737
+ d && a({ id: d });
797
738
  };
798
739
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
799
- /* @__PURE__ */ e.jsxs(bs, { children: [
800
- /* @__PURE__ */ e.jsx(js, { asChild: !0, children: /* @__PURE__ */ e.jsx(
801
- y,
740
+ /* @__PURE__ */ e.jsxs(js, { children: [
741
+ /* @__PURE__ */ e.jsx(gs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
742
+ C,
802
743
  {
803
744
  className: "relative z-10 text-gray-800 hover:bg-secondary [&_svg]:size-4",
804
745
  size: "sm",
805
746
  variant: "ghost",
806
- children: /* @__PURE__ */ e.jsx(gs, {})
747
+ children: /* @__PURE__ */ e.jsx(vs, {})
807
748
  }
808
749
  ) }),
809
- /* @__PURE__ */ e.jsxs(vs, { align: "start", children: [
810
- d && /* @__PURE__ */ e.jsx($, { asChild: !0, children: /* @__PURE__ */ e.jsxs("a", { href: `${d}#ghost-comments-${r}`, rel: "noopener noreferrer", target: "_blank", children: [
750
+ /* @__PURE__ */ e.jsxs(Cs, { align: "start", children: [
751
+ c && /* @__PURE__ */ e.jsx($, { asChild: !0, children: /* @__PURE__ */ e.jsxs("a", { href: `${c}#ghost-comments-${i}`, rel: "noopener noreferrer", target: "_blank", children: [
811
752
  /* @__PURE__ */ e.jsx(Bs, { className: "size-4" }),
812
753
  "View on post"
813
754
  ] }) }),
814
- c && /* @__PURE__ */ e.jsx($, { asChild: !0, children: /* @__PURE__ */ e.jsxs("a", { href: `#/members/${c}`, children: [
815
- /* @__PURE__ */ e.jsx(ke, { className: "size-4" }),
755
+ d && /* @__PURE__ */ e.jsx($, { asChild: !0, children: /* @__PURE__ */ e.jsxs("a", { href: `#/members/${d}`, children: [
756
+ /* @__PURE__ */ e.jsx(we, { className: "size-4" }),
816
757
  "View member"
817
758
  ] }) }),
818
- c && (h !== !1 ? /* @__PURE__ */ e.jsxs($, { onClick: () => n(!0), children: [
819
- /* @__PURE__ */ e.jsx(ye, { className: "size-4" }),
759
+ d && (u !== !1 ? /* @__PURE__ */ e.jsxs($, { onClick: () => r(!0), children: [
760
+ /* @__PURE__ */ e.jsx(_e, { className: "size-4" }),
820
761
  "Disable commenting"
821
- ] }) : /* @__PURE__ */ e.jsxs($, { onClick: f, children: [
822
- /* @__PURE__ */ e.jsx(ks, { className: "size-4" }),
762
+ ] }) : /* @__PURE__ */ e.jsxs($, { onClick: h, children: [
763
+ /* @__PURE__ */ e.jsx(ys, { className: "size-4" }),
823
764
  "Enable commenting"
824
765
  ] }))
825
766
  ] })
826
767
  ] }),
827
768
  /* @__PURE__ */ e.jsx(
828
- kt,
769
+ St,
829
770
  {
830
771
  memberName: l == null ? void 0 : l.name,
831
- open: i,
832
- onConfirm: m,
833
- onOpenChange: n
772
+ open: n,
773
+ onConfirm: p,
774
+ onOpenChange: r
834
775
  }
835
776
  )
836
777
  ] });
837
778
  }
838
- function yt({ comment: s, open: t, onOpenChange: a }) {
839
- var d, c, h, m, f;
840
- const { data: i, isLoading: n } = vt(s.id, { enabled: t }), r = (i == null ? void 0 : i.comment_likes) ?? [], o = ((d = s.count) == null ? void 0 : d.likes) ?? 0, l = o - r.length;
841
- return /* @__PURE__ */ e.jsx(Z, { open: t, onOpenChange: a, children: /* @__PURE__ */ e.jsxs(J, { "aria-describedby": void 0, children: [
842
- /* @__PURE__ */ e.jsx(ee, { children: /* @__PURE__ */ e.jsxs(se, { children: [
779
+ function Pt({ comment: s, open: t, onOpenChange: a }) {
780
+ var c, d, u, p, h;
781
+ const { data: n, isLoading: r } = yt(s.id, { enabled: t }), i = (n == null ? void 0 : n.comment_likes) ?? [], o = ((c = s.count) == null ? void 0 : c.likes) ?? 0, l = o - i.length;
782
+ return /* @__PURE__ */ e.jsx(se, { open: t, onOpenChange: a, children: /* @__PURE__ */ e.jsxs(te, { "aria-describedby": void 0, children: [
783
+ /* @__PURE__ */ e.jsx(ae, { children: /* @__PURE__ */ e.jsxs(re, { children: [
843
784
  o,
844
785
  " ",
845
786
  o === 1 ? "like" : "likes"
@@ -848,18 +789,18 @@ function yt({ comment: s, open: t, onOpenChange: a }) {
848
789
  /* @__PURE__ */ e.jsx(
849
790
  E,
850
791
  {
851
- avatarImage: (c = s.member) == null ? void 0 : c.avatar_image,
792
+ avatarImage: (d = s.member) == null ? void 0 : d.avatar_image,
852
793
  className: "shrink-0",
853
- memberId: (h = s.member) == null ? void 0 : h.id
794
+ memberId: (u = s.member) == null ? void 0 : u.id
854
795
  }
855
796
  ),
856
797
  /* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 flex-col overflow-hidden", children: [
857
798
  /* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 items-center gap-1 text-sm", children: [
858
- /* @__PURE__ */ e.jsx("span", { className: "shrink-0 font-semibold", children: ((m = s.member) == null ? void 0 : m.name) || "Unknown" }),
859
- /* @__PURE__ */ e.jsx(X, { className: "shrink-0 text-muted-foreground/50", size: 16 }),
799
+ /* @__PURE__ */ e.jsx("span", { className: "shrink-0 font-semibold", children: ((p = s.member) == null ? void 0 : p.name) || "Unknown" }),
800
+ /* @__PURE__ */ e.jsx(ee, { className: "shrink-0 text-muted-foreground/50", size: 16 }),
860
801
  /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-muted-foreground", children: s.created_at && T(s.created_at) }),
861
802
  /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-muted-foreground", children: "on" }),
862
- /* @__PURE__ */ e.jsx("span", { className: "min-w-0 truncate font-medium text-gray-800 dark:text-gray-400", children: ((f = s.post) == null ? void 0 : f.title) || "Unknown post" })
803
+ /* @__PURE__ */ e.jsx("span", { className: "min-w-0 truncate font-medium text-gray-800 dark:text-gray-400", children: ((h = s.post) == null ? void 0 : h.title) || "Unknown post" })
863
804
  ] }),
864
805
  /* @__PURE__ */ e.jsx(
865
806
  "div",
@@ -870,25 +811,25 @@ function yt({ comment: s, open: t, onOpenChange: a }) {
870
811
  )
871
812
  ] })
872
813
  ] }) }),
873
- /* @__PURE__ */ e.jsx("div", { className: "-mx-1 max-h-64 overflow-y-auto px-1", children: n ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ e.jsx(M, { size: "md" }) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3 pb-1", children: [
874
- r.map((x) => {
875
- var p, v, j;
814
+ /* @__PURE__ */ e.jsx("div", { className: "-mx-1 max-h-64 overflow-y-auto px-1", children: r ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ e.jsx(M, { size: "md" }) }) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-3 pb-1", children: [
815
+ i.map((f) => {
816
+ var m, b, g;
876
817
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
877
818
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
878
819
  /* @__PURE__ */ e.jsxs("div", { className: "relative shrink-0", children: [
879
820
  /* @__PURE__ */ e.jsx(
880
821
  E,
881
822
  {
882
- avatarImage: (p = x.member) == null ? void 0 : p.avatar_image,
883
- memberId: (v = x.member) == null ? void 0 : v.id
823
+ avatarImage: (m = f.member) == null ? void 0 : m.avatar_image,
824
+ memberId: (b = f.member) == null ? void 0 : b.id
884
825
  }
885
826
  ),
886
- /* @__PURE__ */ e.jsx("div", { className: "absolute -right-0.5 -bottom-0.5 flex size-4 items-center justify-center rounded-full bg-pink-500 text-white", children: /* @__PURE__ */ e.jsx(we, { className: "size-2.5", fill: "currentColor" }) })
827
+ /* @__PURE__ */ e.jsx("div", { className: "absolute -right-0.5 -bottom-0.5 flex size-4 items-center justify-center rounded-full bg-pink-500 text-white", children: /* @__PURE__ */ e.jsx(Se, { className: "size-2.5", fill: "currentColor" }) })
887
828
  ] }),
888
- /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: ((j = x.member) == null ? void 0 : j.name) || "Deleted member" })
829
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: ((g = f.member) == null ? void 0 : g.name) || "Deleted member" })
889
830
  ] }),
890
- /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: T(x.created_at) })
891
- ] }, x.id);
831
+ /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: T(f.created_at) })
832
+ ] }, f.id);
892
833
  }),
893
834
  l > 0 && /* @__PURE__ */ e.jsxs("div", { className: "pt-1 text-center text-sm text-muted-foreground", children: [
894
835
  "and ",
@@ -896,14 +837,14 @@ function yt({ comment: s, open: t, onOpenChange: a }) {
896
837
  " more"
897
838
  ] })
898
839
  ] }) }),
899
- /* @__PURE__ */ e.jsx(te, { children: /* @__PURE__ */ e.jsx(y, { onClick: () => a(!1), children: "OK" }) })
840
+ /* @__PURE__ */ e.jsx(ne, { children: /* @__PURE__ */ e.jsx(C, { onClick: () => a(!1), children: "OK" }) })
900
841
  ] }) });
901
842
  }
902
- function wt({ comment: s, open: t, onOpenChange: a }) {
903
- var l, d, c, h, m;
904
- const { data: i, isLoading: n } = jt(s.id, { enabled: t }), r = (i == null ? void 0 : i.comment_reports) ?? [], o = ((l = s.count) == null ? void 0 : l.reports) ?? r.length;
905
- return /* @__PURE__ */ e.jsx(Z, { open: t, onOpenChange: a, children: /* @__PURE__ */ e.jsxs(J, { "aria-describedby": void 0, children: [
906
- /* @__PURE__ */ e.jsx(ee, { children: /* @__PURE__ */ e.jsxs(se, { children: [
843
+ function It({ comment: s, open: t, onOpenChange: a }) {
844
+ var l, c, d, u, p;
845
+ const { data: n, isLoading: r } = Nt(s.id, { enabled: t }), i = (n == null ? void 0 : n.comment_reports) ?? [], o = ((l = s.count) == null ? void 0 : l.reports) ?? i.length;
846
+ return /* @__PURE__ */ e.jsx(se, { open: t, onOpenChange: a, children: /* @__PURE__ */ e.jsxs(te, { "aria-describedby": void 0, children: [
847
+ /* @__PURE__ */ e.jsx(ae, { children: /* @__PURE__ */ e.jsxs(re, { children: [
907
848
  o,
908
849
  " ",
909
850
  o === 1 ? "report" : "reports"
@@ -912,18 +853,18 @@ function wt({ comment: s, open: t, onOpenChange: a }) {
912
853
  /* @__PURE__ */ e.jsx(
913
854
  E,
914
855
  {
915
- avatarImage: (d = s.member) == null ? void 0 : d.avatar_image,
856
+ avatarImage: (c = s.member) == null ? void 0 : c.avatar_image,
916
857
  className: "shrink-0",
917
- memberId: (c = s.member) == null ? void 0 : c.id
858
+ memberId: (d = s.member) == null ? void 0 : d.id
918
859
  }
919
860
  ),
920
861
  /* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 flex-col overflow-hidden", children: [
921
862
  /* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 items-center gap-1 text-sm", children: [
922
- /* @__PURE__ */ e.jsx("span", { className: "shrink-0 font-semibold", children: ((h = s.member) == null ? void 0 : h.name) || "Unknown" }),
923
- /* @__PURE__ */ e.jsx(X, { className: "shrink-0 text-muted-foreground/50", size: 16 }),
863
+ /* @__PURE__ */ e.jsx("span", { className: "shrink-0 font-semibold", children: ((u = s.member) == null ? void 0 : u.name) || "Unknown" }),
864
+ /* @__PURE__ */ e.jsx(ee, { className: "shrink-0 text-muted-foreground/50", size: 16 }),
924
865
  /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-muted-foreground", children: s.created_at && T(s.created_at) }),
925
866
  /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-muted-foreground", children: "on" }),
926
- /* @__PURE__ */ e.jsx("span", { className: "min-w-0 truncate font-medium text-gray-800 dark:text-gray-400", children: ((m = s.post) == null ? void 0 : m.title) || "Unknown post" })
867
+ /* @__PURE__ */ e.jsx("span", { className: "min-w-0 truncate font-medium text-gray-800 dark:text-gray-400", children: ((p = s.post) == null ? void 0 : p.title) || "Unknown post" })
927
868
  ] }),
928
869
  /* @__PURE__ */ e.jsx(
929
870
  "div",
@@ -934,123 +875,123 @@ function wt({ comment: s, open: t, onOpenChange: a }) {
934
875
  )
935
876
  ] })
936
877
  ] }) }),
937
- /* @__PURE__ */ e.jsx("div", { className: "-mx-1 max-h-64 overflow-y-auto px-1", children: n ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ e.jsx(M, { size: "md" }) }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3 pb-1", children: r.map((f) => {
938
- var x, p, v;
878
+ /* @__PURE__ */ e.jsx("div", { className: "-mx-1 max-h-64 overflow-y-auto px-1", children: r ? /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ e.jsx(M, { size: "md" }) }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3 pb-1", children: i.map((h) => {
879
+ var f, m, b;
939
880
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
940
881
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
941
882
  /* @__PURE__ */ e.jsxs("div", { className: "relative shrink-0", children: [
942
883
  /* @__PURE__ */ e.jsx(
943
884
  E,
944
885
  {
945
- avatarImage: (x = f.member) == null ? void 0 : x.avatar_image,
946
- memberId: (p = f.member) == null ? void 0 : p.id
886
+ avatarImage: (f = h.member) == null ? void 0 : f.avatar_image,
887
+ memberId: (m = h.member) == null ? void 0 : m.id
947
888
  }
948
889
  ),
949
- /* @__PURE__ */ e.jsx("div", { className: "absolute -right-0.5 -bottom-0.5 flex size-4 items-center justify-center rounded-full bg-red text-white", children: /* @__PURE__ */ e.jsx(Y, { className: "size-2.5", fill: "currentColor" }) })
890
+ /* @__PURE__ */ e.jsx("div", { className: "absolute -right-0.5 -bottom-0.5 flex size-4 items-center justify-center rounded-full bg-red text-white", children: /* @__PURE__ */ e.jsx(J, { className: "size-2.5", fill: "currentColor" }) })
950
891
  ] }),
951
- /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: ((v = f.member) == null ? void 0 : v.name) || "Deleted member" })
892
+ /* @__PURE__ */ e.jsx("span", { className: "font-medium", children: ((b = h.member) == null ? void 0 : b.name) || "Deleted member" })
952
893
  ] }),
953
- /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: T(f.created_at) })
954
- ] }, f.id);
894
+ /* @__PURE__ */ e.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: T(h.created_at) })
895
+ ] }, h.id);
955
896
  }) }) }),
956
- /* @__PURE__ */ e.jsx(te, { children: /* @__PURE__ */ e.jsx(y, { onClick: () => a(!1), children: "OK" }) })
897
+ /* @__PURE__ */ e.jsx(ne, { children: /* @__PURE__ */ e.jsx(C, { onClick: () => a(!1), children: "OK" }) })
957
898
  ] }) });
958
899
  }
959
- function V({ icon: s, count: t, label: a, to: i, onClick: n, className: r, testId: o }) {
960
- const l = w("flex items-center gap-1 text-xs text-gray-800", r), d = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
900
+ function W({ icon: s, count: t, label: a, to: n, onClick: r, className: i, testId: o }) {
901
+ const l = N("flex items-center gap-1 text-xs text-gray-800", i), c = /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
961
902
  s,
962
- /* @__PURE__ */ e.jsx("span", { children: as(t) })
963
- ] }), c = i || n;
964
- return /* @__PURE__ */ e.jsx(q, { children: /* @__PURE__ */ e.jsxs(W, { children: [
965
- /* @__PURE__ */ e.jsx(Q, { asChild: !0, children: i ? /* @__PURE__ */ e.jsx(
966
- K,
903
+ /* @__PURE__ */ e.jsx("span", { children: ns(t) })
904
+ ] }), d = n || r;
905
+ return /* @__PURE__ */ e.jsx(K, { children: /* @__PURE__ */ e.jsxs(G, { children: [
906
+ /* @__PURE__ */ e.jsx(Y, { asChild: !0, children: n ? /* @__PURE__ */ e.jsx(
907
+ Z,
967
908
  {
968
- className: w(l, "cursor-pointer hover:opacity-70"),
909
+ className: N(l, "cursor-pointer hover:opacity-70"),
969
910
  "data-testid": o,
970
- to: i,
971
- onClick: (h) => {
972
- h.stopPropagation();
911
+ to: n,
912
+ onClick: (u) => {
913
+ u.stopPropagation();
973
914
  },
974
- children: d
915
+ children: c
975
916
  }
976
- ) : n ? /* @__PURE__ */ e.jsx(
917
+ ) : r ? /* @__PURE__ */ e.jsx(
977
918
  "button",
978
919
  {
979
- className: w(l, "cursor-pointer hover:opacity-70"),
920
+ className: N(l, "cursor-pointer hover:opacity-70"),
980
921
  "data-testid": o,
981
922
  type: "button",
982
- onClick: (h) => {
983
- h.stopPropagation(), n();
923
+ onClick: (u) => {
924
+ u.stopPropagation(), r();
984
925
  },
985
- children: d
926
+ children: c
986
927
  }
987
- ) : /* @__PURE__ */ e.jsx("div", { className: l, "data-testid": o, children: d }) }),
988
- /* @__PURE__ */ e.jsx(G, { children: c ? `View ${a.toLowerCase()}` : a })
928
+ ) : /* @__PURE__ */ e.jsx("div", { className: l, "data-testid": o, children: c }) }),
929
+ /* @__PURE__ */ e.jsx(X, { children: d ? `View ${a.toLowerCase()}` : a })
989
930
  ] }) });
990
931
  }
991
- function oe(s, t) {
932
+ function de(s, t) {
992
933
  if (!t)
993
934
  return;
994
935
  const a = new URLSearchParams(s);
995
936
  return a.set("thread", `is:${t}`), `?${a.toString()}`;
996
937
  }
997
- function Ye({
938
+ function Ze({
998
939
  comment: s,
999
940
  className: t
1000
941
  }) {
1001
- var p, v, j, g, b;
1002
- const [a] = H(), [i, n] = _(!1), [r, o] = _(!1), l = oe(a, s.id), d = ((p = s.count) == null ? void 0 : p.direct_replies) ?? ((v = s.count) == null ? void 0 : v.replies) ?? ((j = s.replies) == null ? void 0 : j.length) ?? 0, c = ((g = s.count) == null ? void 0 : g.likes) ?? 0, h = ((b = s.count) == null ? void 0 : b.reports) ?? 0, m = d > 0, f = c > 0, x = h > 0;
942
+ var m, b, g, j, v;
943
+ const [a] = H(), [n, r] = y(!1), [i, o] = y(!1), l = de(a, s.id), c = ((m = s.count) == null ? void 0 : m.direct_replies) ?? ((b = s.count) == null ? void 0 : b.replies) ?? ((g = s.replies) == null ? void 0 : g.length) ?? 0, d = ((j = s.count) == null ? void 0 : j.likes) ?? 0, u = ((v = s.count) == null ? void 0 : v.reports) ?? 0, p = c > 0, h = d > 0, f = u > 0;
1003
944
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1004
- /* @__PURE__ */ e.jsxs("div", { className: w("flex items-center gap-6", t), children: [
945
+ /* @__PURE__ */ e.jsxs("div", { className: N("flex items-center gap-6", t), children: [
1005
946
  /* @__PURE__ */ e.jsx(
1006
- V,
947
+ W,
1007
948
  {
1008
- count: d,
1009
- icon: /* @__PURE__ */ e.jsx(ys, { size: 16, strokeWidth: 1.5 }),
949
+ count: c,
950
+ icon: /* @__PURE__ */ e.jsx(ws, { size: 16, strokeWidth: 1.5 }),
1010
951
  label: "Replies",
1011
952
  testId: "replies-metric",
1012
- to: m ? l : void 0
953
+ to: p ? l : void 0
1013
954
  }
1014
955
  ),
1015
956
  /* @__PURE__ */ e.jsx(
1016
- V,
957
+ W,
1017
958
  {
1018
- count: c,
1019
- icon: /* @__PURE__ */ e.jsx(we, { size: 16, strokeWidth: 1.5 }),
959
+ count: d,
960
+ icon: /* @__PURE__ */ e.jsx(Se, { size: 16, strokeWidth: 1.5 }),
1020
961
  label: "Likes",
1021
- onClick: f ? () => n(!0) : void 0
962
+ onClick: h ? () => r(!0) : void 0
1022
963
  }
1023
964
  ),
1024
965
  /* @__PURE__ */ e.jsx(
1025
- V,
966
+ W,
1026
967
  {
1027
- className: x ? "font-semibold text-red" : void 0,
1028
- count: h,
1029
- icon: /* @__PURE__ */ e.jsx(Y, { size: 16, strokeWidth: 1.5 }),
968
+ className: f ? "font-semibold text-red" : void 0,
969
+ count: u,
970
+ icon: /* @__PURE__ */ e.jsx(J, { size: 16, strokeWidth: 1.5 }),
1030
971
  label: "Reports",
1031
- onClick: x ? () => o(!0) : void 0
972
+ onClick: f ? () => o(!0) : void 0
1032
973
  }
1033
974
  )
1034
975
  ] }),
1035
976
  /* @__PURE__ */ e.jsx(
1036
- yt,
977
+ Pt,
1037
978
  {
1038
979
  comment: s,
1039
- open: i,
1040
- onOpenChange: n
980
+ open: n,
981
+ onOpenChange: r
1041
982
  }
1042
983
  ),
1043
984
  /* @__PURE__ */ e.jsx(
1044
- wt,
985
+ It,
1045
986
  {
1046
987
  comment: s,
1047
- open: r,
988
+ open: i,
1048
989
  onOpenChange: o
1049
990
  }
1050
991
  )
1051
992
  ] });
1052
993
  }
1053
- function _t({ hasReplies: s }) {
994
+ function Rt({ hasReplies: s }) {
1054
995
  return s ? /* @__PURE__ */ e.jsx(
1055
996
  "div",
1056
997
  {
@@ -1059,21 +1000,21 @@ function _t({ hasReplies: s }) {
1059
1000
  }
1060
1001
  ) : null;
1061
1002
  }
1062
- function Xe({ comment: s, isReply: t = !1, isSelectedComment: a = !1, selectedCommentId: i }) {
1063
- var c, h, m, f, x, p, v, j;
1064
- const [n] = H(), { mutate: r } = We(), { mutate: o } = Qe(), l = (((c = s.replies) == null ? void 0 : c.length) ?? 0) > 0 || (((h = s.count) == null ? void 0 : h.direct_replies) ?? ((m = s.count) == null ? void 0 : m.replies) ?? 0) > 0, d = !l || t ? "mb-7" : "mb-0";
1065
- return /* @__PURE__ */ e.jsxs("div", { className: `flex w-full flex-row ${d}`, children: [
1003
+ function Je({ comment: s, isReply: t = !1, isSelectedComment: a = !1, selectedCommentId: n }) {
1004
+ var d, u, p, h, f, m, b, g;
1005
+ const [r] = H(), { mutate: i } = Ke(), { mutate: o } = Ge(), l = (((d = s.replies) == null ? void 0 : d.length) ?? 0) > 0 || (((u = s.count) == null ? void 0 : u.direct_replies) ?? ((p = s.count) == null ? void 0 : p.replies) ?? 0) > 0, c = !l || t ? "mb-7" : "mb-0";
1006
+ return /* @__PURE__ */ e.jsxs("div", { className: `flex w-full flex-row ${c}`, children: [
1066
1007
  /* @__PURE__ */ e.jsxs("div", { className: "mr-2 flex shrink-0 flex-col items-center justify-start md:mr-3", children: [
1067
1008
  /* @__PURE__ */ e.jsx(
1068
1009
  E,
1069
1010
  {
1070
- avatarImage: (f = s.member) == null ? void 0 : f.avatar_image,
1011
+ avatarImage: (h = s.member) == null ? void 0 : h.avatar_image,
1071
1012
  className: "mb-3 shrink-0 md:mb-4",
1072
1013
  isHidden: s.status === "hidden",
1073
- memberId: (x = s.member) == null ? void 0 : x.id
1014
+ memberId: (f = s.member) == null ? void 0 : f.id
1074
1015
  }
1075
1016
  ),
1076
- /* @__PURE__ */ e.jsx(_t, { hasReplies: l && !t })
1017
+ /* @__PURE__ */ e.jsx(Rt, { hasReplies: l && !t })
1077
1018
  ] }),
1078
1019
  /* @__PURE__ */ e.jsx("div", { className: "grow", children: /* @__PURE__ */ e.jsxs(
1079
1020
  "div",
@@ -1083,158 +1024,158 @@ function Xe({ comment: s, isReply: t = !1, isSelectedComment: a = !1, selectedCo
1083
1024
  children: [
1084
1025
  /* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 flex-col", children: [
1085
1026
  /* @__PURE__ */ e.jsx(
1086
- Ge,
1027
+ Ye,
1087
1028
  {
1088
- canComment: (p = s.member) == null ? void 0 : p.can_comment,
1029
+ canComment: (m = s.member) == null ? void 0 : m.can_comment,
1089
1030
  createdAt: s.created_at,
1090
1031
  isHidden: s.status === "hidden",
1091
- memberId: (v = s.member) == null ? void 0 : v.id,
1092
- memberName: (j = s.member) == null ? void 0 : j.name
1032
+ memberId: (b = s.member) == null ? void 0 : b.id,
1033
+ memberName: (g = s.member) == null ? void 0 : g.name
1093
1034
  }
1094
1035
  ),
1095
1036
  s.in_reply_to_snippet && a && /* @__PURE__ */ e.jsxs("div", { className: `mb-1 line-clamp-1 text-sm ${s.status === "hidden" && "opacity-50"}`, children: [
1096
1037
  /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Replied to:" }),
1097
1038
  " ",
1098
1039
  /* @__PURE__ */ e.jsx(
1099
- K,
1040
+ Z,
1100
1041
  {
1101
1042
  className: "text-sm font-normal text-muted-foreground hover:text-foreground",
1102
1043
  "data-testid": "replied-to-link",
1103
- to: oe(n, s.in_reply_to_id || s.parent_id) || "",
1104
- onClick: (g) => {
1105
- g.stopPropagation();
1044
+ to: de(r, s.in_reply_to_id || s.parent_id) || "",
1045
+ onClick: (j) => {
1046
+ j.stopPropagation();
1106
1047
  },
1107
1048
  children: s.in_reply_to_snippet
1108
1049
  }
1109
1050
  )
1110
1051
  ] }),
1111
- /* @__PURE__ */ e.jsx(Ve, { item: s }),
1052
+ /* @__PURE__ */ e.jsx(We, { item: s }),
1112
1053
  /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex flex-row flex-wrap items-center gap-3", children: [
1113
- s.status === "published" && /* @__PURE__ */ e.jsxs(y, { className: "text-gray-800", size: "sm", variant: "outline", onClick: () => r({ id: s.id }), children: [
1114
- /* @__PURE__ */ e.jsx(_e, {}),
1054
+ s.status === "published" && /* @__PURE__ */ e.jsxs(C, { className: "text-gray-800", size: "sm", variant: "outline", onClick: () => i({ id: s.id }), children: [
1055
+ /* @__PURE__ */ e.jsx(Pe, {}),
1115
1056
  /* @__PURE__ */ e.jsx("span", { className: "max-md:hidden", children: "Hide" })
1116
1057
  ] }),
1117
- s.status === "hidden" && /* @__PURE__ */ e.jsxs(y, { className: "text-gray-800", size: "sm", variant: "outline", onClick: () => o({ id: s.id }), children: [
1118
- /* @__PURE__ */ e.jsx(Se, {}),
1058
+ s.status === "hidden" && /* @__PURE__ */ e.jsxs(C, { className: "text-gray-800", size: "sm", variant: "outline", onClick: () => o({ id: s.id }), children: [
1059
+ /* @__PURE__ */ e.jsx(Ie, {}),
1119
1060
  /* @__PURE__ */ e.jsx("span", { className: "max-md:hidden", children: "Show" })
1120
1061
  ] }),
1121
1062
  /* @__PURE__ */ e.jsx(
1122
- Ye,
1063
+ Ze,
1123
1064
  {
1124
1065
  comment: s
1125
1066
  }
1126
1067
  ),
1127
1068
  /* @__PURE__ */ e.jsx(
1128
- Ke,
1069
+ Xe,
1129
1070
  {
1130
1071
  comment: s
1131
1072
  }
1132
1073
  )
1133
1074
  ] })
1134
1075
  ] }),
1135
- l && s.replies && /* @__PURE__ */ e.jsx("div", { className: "mt-7 mb-4 -ml-2 pl-2 md:mt-8 md:mb-0 md:-ml-3 md:pl-3", children: s.replies.map((g) => /* @__PURE__ */ e.jsx(
1136
- Xe,
1076
+ l && s.replies && /* @__PURE__ */ e.jsx("div", { className: "mt-7 mb-4 -ml-2 pl-2 md:mt-8 md:mb-0 md:-ml-3 md:pl-3", children: s.replies.map((j) => /* @__PURE__ */ e.jsx(
1077
+ Je,
1137
1078
  {
1138
- comment: g,
1079
+ comment: j,
1139
1080
  isReply: !0,
1140
- selectedCommentId: i
1081
+ selectedCommentId: n
1141
1082
  },
1142
- g.id
1083
+ j.id
1143
1084
  )) })
1144
1085
  ]
1145
1086
  }
1146
1087
  ) })
1147
1088
  ] });
1148
1089
  }
1149
- const St = ({
1090
+ const Et = ({
1150
1091
  selectedComment: s,
1151
1092
  replies: t,
1152
1093
  selectedCommentId: a,
1153
- fetchNextPage: i,
1154
- hasNextPage: n,
1155
- isFetchingNextPage: r
1094
+ fetchNextPage: n,
1095
+ hasNextPage: r,
1096
+ isFetchingNextPage: i
1156
1097
  }) => {
1157
1098
  const o = { ...s, replies: t };
1158
1099
  return /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", "data-testid": "comment-thread-list", children: [
1159
1100
  /* @__PURE__ */ e.jsx(
1160
- Xe,
1101
+ Je,
1161
1102
  {
1162
1103
  comment: o,
1163
1104
  isSelectedComment: !0,
1164
1105
  selectedCommentId: a
1165
1106
  }
1166
1107
  ),
1167
- n && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center pb-4", children: /* @__PURE__ */ e.jsx(
1168
- y,
1108
+ r && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center pb-4", children: /* @__PURE__ */ e.jsx(
1109
+ C,
1169
1110
  {
1170
- disabled: r,
1111
+ disabled: i,
1171
1112
  variant: "outline",
1172
- onClick: () => i(),
1173
- children: r ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1113
+ onClick: () => n(),
1114
+ children: i ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1174
1115
  /* @__PURE__ */ e.jsx(M, { size: "sm" }),
1175
1116
  "Loading..."
1176
1117
  ] }) : "Load more replies"
1177
1118
  }
1178
1119
  ) })
1179
1120
  ] });
1180
- }, Pt = ({
1121
+ }, Lt = ({
1181
1122
  commentId: s,
1182
1123
  open: t,
1183
1124
  onOpenChange: a
1184
1125
  }) => {
1185
- var j;
1126
+ var g;
1186
1127
  const {
1187
- data: i,
1188
- isLoading: n,
1189
- isError: r,
1128
+ data: n,
1129
+ isLoading: r,
1130
+ isError: i,
1190
1131
  fetchNextPage: o,
1191
1132
  hasNextPage: l,
1192
- isFetchingNextPage: d
1193
- } = Ct(s ?? "", {
1133
+ isFetchingNextPage: c
1134
+ } = wt(s ?? "", {
1194
1135
  enabled: t && !!s
1195
- }), { data: c, isLoading: h, isError: m } = ft(s ?? "", {
1136
+ }), { data: d, isLoading: u, isError: p } = vt(s ?? "", {
1196
1137
  enabled: t && !!s
1197
- }), f = n || h, x = m || r && !c, p = (j = c == null ? void 0 : c.comments) == null ? void 0 : j[0], v = (i == null ? void 0 : i.comments) || [];
1138
+ }), h = r || u, f = p || i && !d, m = (g = d == null ? void 0 : d.comments) == null ? void 0 : g[0], b = (n == null ? void 0 : n.comments) || [];
1198
1139
  return /* @__PURE__ */ e.jsx(Us, { open: t, onOpenChange: a, children: /* @__PURE__ */ e.jsxs(As, { className: "overflow-y-auto px-6 pt-0 sm:max-w-[600px]", children: [
1199
1140
  /* @__PURE__ */ e.jsx(Vs, { className: "sticky top-0 z-40 -mx-6 bg-background/60 p-6 backdrop-blur", children: /* @__PURE__ */ e.jsx(qs, { className: "text-md", children: "Thread" }) }),
1200
- (p == null ? void 0 : p.post) && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1141
+ (m == null ? void 0 : m.post) && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1201
1142
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-4", children: [
1202
1143
  /* @__PURE__ */ e.jsxs("div", { className: "min-w-0 flex-1", children: [
1203
- /* @__PURE__ */ e.jsx("h3", { className: "line-clamp-1 text-xl font-semibold text-foreground", children: p.post.title }),
1204
- p.post.excerpt && /* @__PURE__ */ e.jsx("p", { className: "mt-1 line-clamp-2 text-sm text-muted-foreground", children: p.post.excerpt })
1144
+ /* @__PURE__ */ e.jsx("h3", { className: "line-clamp-1 text-xl font-semibold text-foreground", children: m.post.title }),
1145
+ m.post.excerpt && /* @__PURE__ */ e.jsx("p", { className: "mt-1 line-clamp-2 text-sm text-muted-foreground", children: m.post.excerpt })
1205
1146
  ] }),
1206
- p.post.feature_image && /* @__PURE__ */ e.jsx(
1147
+ m.post.feature_image && /* @__PURE__ */ e.jsx(
1207
1148
  "img",
1208
1149
  {
1209
- alt: p.post.title || "Post feature image",
1150
+ alt: m.post.title || "Post feature image",
1210
1151
  className: "hidden aspect-video h-18 shrink-0 rounded object-cover lg:block",
1211
- src: p.post.feature_image
1152
+ src: m.post.feature_image
1212
1153
  }
1213
1154
  )
1214
1155
  ] }),
1215
1156
  /* @__PURE__ */ e.jsx(Hs, { className: "-mx-6 my-6 w-auto" })
1216
1157
  ] }),
1217
- /* @__PURE__ */ e.jsx("div", { children: f ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center py-8", children: /* @__PURE__ */ e.jsx(M, { size: "lg" }) }) : x || !p ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center py-8", children: /* @__PURE__ */ e.jsx(
1218
- Ee,
1158
+ /* @__PURE__ */ e.jsx("div", { children: h ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center py-8", children: /* @__PURE__ */ e.jsx(M, { size: "lg" }) }) : f || !m ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center py-8", children: /* @__PURE__ */ e.jsx(
1159
+ Te,
1219
1160
  {
1220
- actions: /* @__PURE__ */ e.jsx(y, { variant: "outline", onClick: () => a(!1), children: "Back to comments" }),
1161
+ actions: /* @__PURE__ */ e.jsx(C, { variant: "outline", onClick: () => a(!1), children: "Back to comments" }),
1221
1162
  description: "This thread may have been deleted or doesn't exist.",
1222
1163
  title: "Thread not found",
1223
- children: /* @__PURE__ */ e.jsx(Pe, {})
1164
+ children: /* @__PURE__ */ e.jsx(Re, {})
1224
1165
  }
1225
1166
  ) }) : /* @__PURE__ */ e.jsx(
1226
- St,
1167
+ Et,
1227
1168
  {
1228
1169
  fetchNextPage: o,
1229
1170
  hasNextPage: l,
1230
- isFetchingNextPage: d,
1231
- replies: v,
1232
- selectedComment: p,
1171
+ isFetchingNextPage: c,
1172
+ replies: b,
1173
+ selectedComment: m,
1233
1174
  selectedCommentId: s ?? ""
1234
1175
  }
1235
1176
  ) })
1236
1177
  ] }) });
1237
- }, ve = ({ height: s }) => /* @__PURE__ */ e.jsx("div", { "aria-hidden": "true", className: "flex", children: /* @__PURE__ */ e.jsx("div", { className: "flex", style: { height: s } }) }), Rt = S(function(t, a) {
1178
+ }, ke = ({ height: s }) => /* @__PURE__ */ e.jsx("div", { "aria-hidden": "true", className: "flex", children: /* @__PURE__ */ e.jsx("div", { className: "flex", style: { height: s } }) }), Tt = k(function(t, a) {
1238
1179
  return /* @__PURE__ */ e.jsx(
1239
1180
  "div",
1240
1181
  {
@@ -1246,155 +1187,157 @@ const St = ({
1246
1187
  }
1247
1188
  );
1248
1189
  });
1249
- function It({
1190
+ function Dt({
1250
1191
  items: s,
1251
1192
  totalItems: t,
1252
1193
  hasNextPage: a,
1253
- isFetchingNextPage: i,
1254
- fetchNextPage: n,
1255
- onAddFilter: r,
1256
- isLoading: o
1194
+ isFetchingNextPage: n,
1195
+ fetchNextPage: r,
1196
+ resetKey: i,
1197
+ onAddFilter: o,
1198
+ isLoading: l
1257
1199
  }) {
1258
- const l = D(null), [d, c] = H(), [h, m] = _(!1), [f, x] = _(null), { mutate: p } = We(), { mutate: v } = Qe(), j = (N) => {
1259
- if (m(N), !N) {
1260
- const k = new URLSearchParams(d);
1261
- k.delete("thread"), c(k, { replace: !0 });
1200
+ const c = D(null), { visibleItemCount: d, canLoadMore: u, loadMore: p } = Ws(t, { resetKey: i }), [h, f] = H(), [m, b] = y(!1), [g, j] = y(null), { mutate: v } = Ke(), { mutate: P } = Ge(), I = (w) => {
1201
+ if (b(w), !w) {
1202
+ const _ = new URLSearchParams(h);
1203
+ _.delete("thread"), f(_, { replace: !0 });
1262
1204
  }
1263
1205
  };
1264
1206
  B(() => {
1265
- const N = d.get("thread");
1266
- if (N) {
1267
- const k = N.match(/^is:(.+)$/);
1268
- if (k && k[1]) {
1269
- const u = k[1];
1270
- x(u), m(!0);
1207
+ const w = h.get("thread");
1208
+ if (w) {
1209
+ const _ = w.match(/^is:(.+)$/);
1210
+ if (_ && _[1]) {
1211
+ const x = _[1];
1212
+ j(x), b(!0);
1271
1213
  } else
1272
- m(!1), x(null);
1214
+ b(!1), j(null);
1273
1215
  } else
1274
- m(!1), x(null);
1275
- }, [d]), us({ parentRef: l, isLoading: o });
1276
- const { visibleItems: g, spaceBefore: b, spaceAfter: C } = Ts({
1216
+ b(!1), j(null);
1217
+ }, [h]), xs({ parentRef: c, isLoading: l });
1218
+ const { visibleItems: R, spaceBefore: V, spaceAfter: q } = Qs({
1277
1219
  items: s,
1278
- totalItems: t,
1220
+ totalItems: d,
1279
1221
  hasNextPage: a,
1280
- isFetchingNextPage: i,
1281
- fetchNextPage: n,
1282
- parentRef: l
1222
+ isFetchingNextPage: n,
1223
+ fetchNextPage: r,
1224
+ parentRef: c
1283
1225
  });
1284
- return /* @__PURE__ */ e.jsxs("div", { ref: l, className: "overflow-hidden", children: [
1226
+ return /* @__PURE__ */ e.jsxs("div", { ref: c, className: "overflow-hidden", children: [
1285
1227
  /* @__PURE__ */ e.jsx(
1286
1228
  "div",
1287
1229
  {
1288
1230
  className: "flex flex-col",
1289
1231
  "data-testid": "comments-list",
1290
1232
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
1291
- /* @__PURE__ */ e.jsx(ve, { height: b }),
1292
- g.map(({ key: N, virtualItem: k, item: u, props: I }) => {
1293
- var le, ce, de, me, ue, he, pe, xe, fe;
1294
- return k.index > s.length - 1 ? /* @__PURE__ */ e.jsx(Rt, { ...I }, N) : /* @__PURE__ */ e.jsxs(
1233
+ /* @__PURE__ */ e.jsx(ke, { height: V }),
1234
+ R.map(({ key: w, virtualItem: _, item: x, props: me }) => {
1235
+ var ue, pe, he, xe, fe, be, je, ge, ve;
1236
+ return _.index > s.length - 1 ? /* @__PURE__ */ e.jsx(Tt, { ...me }, w) : /* @__PURE__ */ e.jsxs(
1295
1237
  "div",
1296
1238
  {
1297
- ...I,
1239
+ ...me,
1298
1240
  className: "grid w-full grid-cols-1 items-start justify-between gap-4 border-b p-3 hover:bg-muted/50 md:p-5 lg:grid-cols-[minmax(0,1fr)_144px]",
1299
1241
  "data-testid": "comment-list-row",
1300
1242
  onClick: () => {
1301
- h && j(!1);
1243
+ m && I(!1);
1302
1244
  },
1303
1245
  children: [
1304
1246
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-3", children: [
1305
1247
  /* @__PURE__ */ e.jsx(
1306
1248
  E,
1307
1249
  {
1308
- avatarImage: (le = u.member) == null ? void 0 : le.avatar_image,
1309
- isHidden: u.status === "hidden",
1310
- memberId: (ce = u.member) == null ? void 0 : ce.id
1250
+ avatarImage: (ue = x.member) == null ? void 0 : ue.avatar_image,
1251
+ isHidden: x.status === "hidden",
1252
+ memberId: (pe = x.member) == null ? void 0 : pe.id
1311
1253
  }
1312
1254
  ),
1313
1255
  /* @__PURE__ */ e.jsxs("div", { className: "flex min-w-0 flex-col", children: [
1314
1256
  /* @__PURE__ */ e.jsx(
1315
- Ge,
1257
+ Ye,
1316
1258
  {
1317
- canComment: (de = u.member) == null ? void 0 : de.can_comment,
1318
- createdAt: u.created_at,
1319
- isHidden: u.status === "hidden",
1320
- memberId: (me = u.member) == null ? void 0 : me.id,
1321
- memberName: (ue = u.member) == null ? void 0 : ue.name,
1322
- postTitle: (he = u.post) == null ? void 0 : he.title,
1323
- onAuthorClick: (pe = u.member) != null && pe.id ? () => r("author", u.member.id) : void 0,
1324
- onPostClick: (xe = u.post) != null && xe.id ? () => r("post", u.post.id) : void 0
1259
+ canComment: (he = x.member) == null ? void 0 : he.can_comment,
1260
+ createdAt: x.created_at,
1261
+ isHidden: x.status === "hidden",
1262
+ memberId: (xe = x.member) == null ? void 0 : xe.id,
1263
+ memberName: (fe = x.member) == null ? void 0 : fe.name,
1264
+ postTitle: (be = x.post) == null ? void 0 : be.title,
1265
+ onAuthorClick: (je = x.member) != null && je.id ? () => o("author", x.member.id) : void 0,
1266
+ onPostClick: (ge = x.post) != null && ge.id ? () => o("post", x.post.id) : void 0
1325
1267
  }
1326
1268
  ),
1327
- u.in_reply_to_snippet && /* @__PURE__ */ e.jsxs("div", { className: `mb-1 line-clamp-1 max-w-3xl text-sm ${u.status === "hidden" && "opacity-50"}`, children: [
1269
+ x.in_reply_to_snippet && /* @__PURE__ */ e.jsxs("div", { className: `mb-1 line-clamp-1 max-w-3xl text-sm ${x.status === "hidden" && "opacity-50"}`, children: [
1328
1270
  /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "Replied to:" }),
1329
1271
  " ",
1330
1272
  /* @__PURE__ */ e.jsx(
1331
- K,
1273
+ Z,
1332
1274
  {
1333
1275
  className: "text-sm font-normal text-muted-foreground hover:text-foreground",
1334
1276
  "data-testid": "replied-to-link",
1335
- to: oe(d, u.in_reply_to_id || u.parent_id) || "",
1336
- onClick: (Je) => {
1337
- Je.stopPropagation();
1277
+ to: de(h, x.in_reply_to_id || x.parent_id) || "",
1278
+ onClick: (ss) => {
1279
+ ss.stopPropagation();
1338
1280
  },
1339
- children: u.in_reply_to_snippet
1281
+ children: x.in_reply_to_snippet
1340
1282
  }
1341
1283
  )
1342
1284
  ] }),
1343
- /* @__PURE__ */ e.jsx(Ve, { item: u }),
1285
+ /* @__PURE__ */ e.jsx(We, { item: x }),
1344
1286
  /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex flex-row flex-nowrap items-center gap-3", children: [
1345
- u.status === "published" && /* @__PURE__ */ e.jsxs(y, { className: "text-foreground", size: "sm", variant: "outline", onClick: () => p({ id: u.id }), children: [
1346
- /* @__PURE__ */ e.jsx(_e, {}),
1287
+ x.status === "published" && /* @__PURE__ */ e.jsxs(C, { className: "text-foreground", size: "sm", variant: "outline", onClick: () => v({ id: x.id }), children: [
1288
+ /* @__PURE__ */ e.jsx(Pe, {}),
1347
1289
  "Hide"
1348
1290
  ] }),
1349
- u.status === "hidden" && /* @__PURE__ */ e.jsxs(y, { className: "text-foreground", size: "sm", variant: "outline", onClick: () => v({ id: u.id }), children: [
1350
- /* @__PURE__ */ e.jsx(Se, {}),
1291
+ x.status === "hidden" && /* @__PURE__ */ e.jsxs(C, { className: "text-foreground", size: "sm", variant: "outline", onClick: () => P({ id: x.id }), children: [
1292
+ /* @__PURE__ */ e.jsx(Ie, {}),
1351
1293
  "Show"
1352
1294
  ] }),
1353
1295
  /* @__PURE__ */ e.jsx(
1354
- Ye,
1296
+ Ze,
1355
1297
  {
1356
1298
  className: "ml-2",
1357
- comment: u
1299
+ comment: x
1358
1300
  }
1359
1301
  ),
1360
1302
  /* @__PURE__ */ e.jsx(
1361
- Ke,
1303
+ Xe,
1362
1304
  {
1363
- comment: u
1305
+ comment: x
1364
1306
  }
1365
1307
  )
1366
1308
  ] })
1367
1309
  ] })
1368
1310
  ] }),
1369
- /* @__PURE__ */ e.jsx("div", { children: (fe = u.post) != null && fe.feature_image ? /* @__PURE__ */ e.jsx(
1311
+ /* @__PURE__ */ e.jsx("div", { children: (ve = x.post) != null && ve.feature_image ? /* @__PURE__ */ e.jsx(
1370
1312
  "img",
1371
1313
  {
1372
- alt: u.post.title || "Post feature image",
1373
- className: `hidden aspect-video w-36 rounded object-cover lg:block ${u.status === "hidden" && "opacity-50"}`,
1374
- src: u.post.feature_image
1314
+ alt: x.post.title || "Post feature image",
1315
+ className: `hidden aspect-video w-36 rounded object-cover lg:block ${x.status === "hidden" && "opacity-50"}`,
1316
+ src: x.post.feature_image
1375
1317
  }
1376
1318
  ) : null })
1377
1319
  ]
1378
1320
  },
1379
- N
1321
+ w
1380
1322
  );
1381
1323
  }),
1382
- /* @__PURE__ */ e.jsx(ve, { height: C })
1324
+ /* @__PURE__ */ e.jsx(ke, { height: q })
1383
1325
  ] })
1384
1326
  }
1385
1327
  ),
1328
+ u && /* @__PURE__ */ e.jsx(Ks, { isLoading: n, onClick: p }),
1386
1329
  /* @__PURE__ */ e.jsx(
1387
- Pt,
1330
+ Lt,
1388
1331
  {
1389
- commentId: f,
1390
- open: h,
1391
- onOpenChange: j
1332
+ commentId: g,
1333
+ open: m,
1334
+ onOpenChange: I
1392
1335
  }
1393
1336
  )
1394
1337
  ] });
1395
1338
  }
1396
- const Ze = ["id", "status", "created_at", "body", "post", "author", "reported"];
1397
- function Et(s) {
1339
+ const es = ["id", "status", "created_at", "body", "post", "author", "reported"];
1340
+ function Mt(s) {
1398
1341
  const t = [];
1399
1342
  for (const a of s)
1400
1343
  if (a.values[0])
@@ -1411,13 +1354,13 @@ function Et(s) {
1411
1354
  else if (a.operator === "after" && a.values[0])
1412
1355
  t.push(`created_at:>'${a.values[0]}'`);
1413
1356
  else if (a.operator === "is" && a.values[0]) {
1414
- const r = String(a.values[0]), o = (/* @__PURE__ */ new Date(r + "T00:00:00")).toISOString(), l = (/* @__PURE__ */ new Date(r + "T23:59:59.999")).toISOString();
1357
+ const i = String(a.values[0]), o = (/* @__PURE__ */ new Date(i + "T00:00:00")).toISOString(), l = (/* @__PURE__ */ new Date(i + "T23:59:59.999")).toISOString();
1415
1358
  t.push(`created_at:>='${o}'+created_at:<='${l}'`);
1416
1359
  }
1417
1360
  break;
1418
1361
  case "body":
1419
- const n = a.values[0].replace(/'/g, "\\'");
1420
- a.operator === "contains" ? t.push(`html:~'${n}'`) : a.operator === "not_contains" && t.push(`html:-~'${n}'`);
1362
+ const r = a.values[0].replace(/'/g, "\\'");
1363
+ a.operator === "contains" ? t.push(`html:~'${r}'`) : a.operator === "not_contains" && t.push(`html:-~'${r}'`);
1421
1364
  break;
1422
1365
  case "post":
1423
1366
  a.operator === "is_not" ? t.push(`post_id:-${a.values[0]}`) : t.push(`post_id:${a.values[0]}`);
@@ -1431,7 +1374,7 @@ function Et(s) {
1431
1374
  }
1432
1375
  return t.length ? t.join("+") : void 0;
1433
1376
  }
1434
- function Lt(s) {
1377
+ function $t(s) {
1435
1378
  if (!s)
1436
1379
  return null;
1437
1380
  const t = s.indexOf(":");
@@ -1440,112 +1383,92 @@ function Lt(s) {
1440
1383
  value: s.substring(t + 1)
1441
1384
  };
1442
1385
  }
1443
- function Tt(s) {
1386
+ function Ft(s) {
1444
1387
  const t = [];
1445
- for (const [a, i] of s.entries()) {
1446
- if (!Ze.includes(a) || !i)
1388
+ for (const [a, n] of s.entries()) {
1389
+ if (!es.includes(a) || !n)
1447
1390
  continue;
1448
- const n = Lt(i);
1449
- n && t.push({
1391
+ const r = $t(n);
1392
+ r && t.push({
1450
1393
  id: a,
1451
1394
  field: a,
1452
- operator: n.operator,
1453
- values: [n.value]
1395
+ operator: r.operator,
1396
+ values: [r.value]
1454
1397
  });
1455
1398
  }
1456
1399
  return t;
1457
1400
  }
1458
- function Dt(s) {
1401
+ function zt(s) {
1459
1402
  const t = new URLSearchParams();
1460
1403
  for (const a of s)
1461
- if (Ze.includes(a.field) && a.values[0] !== void 0) {
1462
- const i = `${a.operator}:${String(a.values[0])}`;
1463
- t.set(a.field, i);
1404
+ if (es.includes(a.field) && a.values[0] !== void 0) {
1405
+ const n = `${a.operator}:${String(a.values[0])}`;
1406
+ t.set(a.field, n);
1464
1407
  }
1465
1408
  return t;
1466
1409
  }
1467
- function Mt() {
1468
- const [s, t] = H(), a = P(() => Tt(s), [s]), i = z((l, d = {}) => {
1469
- const c = typeof l == "function" ? l(a) : l, h = Dt(c), m = d.replace ?? !0;
1470
- t(h, { replace: m });
1471
- }, [a, t]), n = z(({ replace: l = !0 } = {}) => {
1410
+ function Ot() {
1411
+ const [s, t] = H(), a = F(() => Ft(s), [s]), n = Q((l, c = {}) => {
1412
+ const d = typeof l == "function" ? l(a) : l, u = zt(d), p = c.replace ?? !0;
1413
+ t(u, { replace: p });
1414
+ }, [a, t]), r = Q(({ replace: l = !0 } = {}) => {
1472
1415
  t(new URLSearchParams(), { replace: l });
1473
- }, [t]), r = P(() => Et(a), [a]), o = P(() => a.length === 1 && a[0].field === "id", [a]);
1474
- return { filters: a, nql: r, setFilters: i, clearFilters: n, isSingleIdFilter: o };
1475
- }
1476
- function $t({ comments: s }) {
1477
- return P(() => {
1478
- var i, n, r;
1479
- const t = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
1480
- for (const o of s)
1481
- (i = o.post) != null && i.id && ((n = o.post) != null && n.title) && t.set(o.post.id, {
1482
- id: o.post.id,
1483
- title: o.post.title
1484
- }), (r = o.member) != null && r.id && a.set(o.member.id, {
1485
- id: o.member.id,
1486
- name: o.member.name,
1487
- email: o.member.email
1488
- });
1489
- return {
1490
- knownPosts: Array.from(t.values()),
1491
- knownMembers: Array.from(a.values())
1492
- };
1493
- }, [s]);
1416
+ }, [t]), i = F(() => Mt(a), [a]), o = F(() => a.length === 1 && a[0].field === "id", [a]);
1417
+ return { filters: a, nql: i, setFilters: n, clearFilters: r, isSingleIdFilter: o };
1494
1418
  }
1495
- const ea = () => {
1496
- var j, g;
1497
- const { filters: s, nql: t, setFilters: a, clearFilters: i, isSingleIdFilter: n } = Mt(), r = z((b, C, N = "is") => {
1498
- a((k) => [...k.filter((I) => I.field !== b), is(b, N, [C])], { replace: !1 });
1419
+ const aa = () => {
1420
+ var m, b;
1421
+ const { filters: s, nql: t, setFilters: a, clearFilters: n, isSingleIdFilter: r } = Ot(), i = Q((g, j, v = "is") => {
1422
+ a((P) => [...P.filter((R) => R.field !== g), ls(g, v, [j])], { replace: !1 });
1499
1423
  }, [a]), {
1500
1424
  data: o,
1501
1425
  isError: l,
1502
- isFetching: d,
1503
- isFetchingNextPage: c,
1504
- isRefetching: h,
1505
- fetchNextPage: m,
1506
- hasNextPage: f
1507
- } = qe({
1426
+ isFetching: c,
1427
+ isFetchingNextPage: d,
1428
+ isRefetching: u,
1429
+ fetchNextPage: p,
1430
+ hasNextPage: h
1431
+ } = Qe({
1508
1432
  searchParams: t ? { filter: t } : {},
1509
1433
  keepPreviousData: !0
1510
- }), { knownPosts: x, knownMembers: p } = $t({ comments: (o == null ? void 0 : o.comments) ?? [] }), v = d && !c && !h;
1511
- return /* @__PURE__ */ e.jsxs(ht, { children: [
1512
- /* @__PURE__ */ e.jsx(ut, { children: !n && /* @__PURE__ */ e.jsx(
1513
- mt,
1434
+ }), f = c && !d && !u;
1435
+ return /* @__PURE__ */ e.jsxs(bt, { children: [
1436
+ /* @__PURE__ */ e.jsx(ft, { children: !r && /* @__PURE__ */ e.jsx(
1437
+ xt,
1514
1438
  {
1515
1439
  filters: s,
1516
- knownMembers: p,
1517
- knownPosts: x,
1518
1440
  onFiltersChange: a
1519
1441
  }
1520
1442
  ) }),
1521
- /* @__PURE__ */ e.jsx(lt, { children: v ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx(M, { size: "lg" }) }) : l ? /* @__PURE__ */ e.jsxs("div", { className: "mb-16 flex h-full flex-col items-center justify-center", children: [
1443
+ /* @__PURE__ */ e.jsx(mt, { children: f ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx(M, { size: "lg" }) }) : l ? /* @__PURE__ */ e.jsxs("div", { className: "mb-16 flex h-full flex-col items-center justify-center", children: [
1522
1444
  /* @__PURE__ */ e.jsx("h2", { className: "mb-2 text-xl font-medium", children: "Error loading comments" }),
1523
1445
  /* @__PURE__ */ e.jsx("p", { className: "mb-4 text-muted-foreground", children: "Please reload the page to try again" }),
1524
- /* @__PURE__ */ e.jsx(y, { onClick: () => window.location.reload(), children: "Reload page" })
1446
+ /* @__PURE__ */ e.jsx(C, { onClick: () => window.location.reload(), children: "Reload page" })
1525
1447
  ] }) : o != null && o.comments.length ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1526
1448
  /* @__PURE__ */ e.jsx(
1527
- It,
1449
+ Dt,
1528
1450
  {
1529
- fetchNextPage: m,
1530
- hasNextPage: f,
1531
- isFetchingNextPage: c,
1532
- isLoading: d && !c,
1451
+ fetchNextPage: p,
1452
+ hasNextPage: h,
1453
+ isFetchingNextPage: d,
1454
+ isLoading: c && !d,
1533
1455
  items: (o == null ? void 0 : o.comments) ?? [],
1534
- totalItems: ((g = (j = o == null ? void 0 : o.meta) == null ? void 0 : j.pagination) == null ? void 0 : g.total) ?? 0,
1535
- onAddFilter: r
1456
+ resetKey: t ?? "",
1457
+ totalItems: ((b = (m = o == null ? void 0 : o.meta) == null ? void 0 : m.pagination) == null ? void 0 : b.total) ?? 0,
1458
+ onAddFilter: i
1536
1459
  }
1537
1460
  ),
1538
- n && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(y, { variant: "outline", onClick: () => i({ replace: !1 }), children: "Show all comments" }) })
1461
+ r && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center py-8", children: /* @__PURE__ */ e.jsx(C, { variant: "outline", onClick: () => n({ replace: !1 }), children: "Show all comments" }) })
1539
1462
  ] }) : /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx(
1540
- Ee,
1463
+ Te,
1541
1464
  {
1542
1465
  title: "No comments yet",
1543
- children: /* @__PURE__ */ e.jsx(Pe, {})
1466
+ children: /* @__PURE__ */ e.jsx(Re, {})
1544
1467
  }
1545
1468
  ) }) })
1546
1469
  ] });
1547
1470
  };
1548
1471
  export {
1549
- ea as default
1472
+ aa as default
1550
1473
  };
1551
- //# sourceMappingURL=comments-Bswx2dzs.mjs.map
1474
+ //# sourceMappingURL=comments-Cvt31uBs.mjs.map