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.
- package/components/tryghost-i18n-6.25.1.tgz +0 -0
- package/components/tryghost-parse-email-address-6.25.1.tgz +0 -0
- package/core/boot.js +3 -1
- package/core/built/admin/assets/{PolarAngleAxis-7TlIQL3R.js → PolarAngleAxis-C6ZeSpZB.js} +1 -1
- package/core/built/admin/assets/{_baseAssignValue-DJsCJz6y.js → _baseAssignValue-BKAl5FrV.js} +1 -1
- package/core/built/admin/assets/{a-large-small-BnBpzYwl.js → a-large-small-B_ulQCIs.js} +1 -1
- package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
- package/core/built/admin/assets/admin-x-settings/{code-editor-view-De3K_osj.mjs → code-editor-view-CBYT1gA1.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-bGxDzD13.mjs → index-CN5CixaU.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-5D8KqsFU.mjs → index-CPQODntW.mjs} +2 -2
- package/core/built/admin/assets/admin-x-settings/{index-BIUDn7ot.mjs → index-CgTfOd7g.mjs} +9 -9
- package/core/built/admin/assets/admin-x-settings/{modals-DuokUyAH.mjs → modals-_y-6HROx.mjs} +2 -2
- package/core/built/admin/assets/{at-sign-DC4NtDDM.js → at-sign-B8xWKM0y.js} +1 -1
- package/core/built/admin/assets/{audience-CC5U4UxI.js → audience-CBOR--z9.js} +1 -1
- package/core/built/admin/assets/{avatar-flipboard-_GQfQXQc.js → avatar-flipboard-IipGb_wZ.js} +1 -1
- package/core/built/admin/assets/{bluesky-sharing-BKyzPl9y.js → bluesky-sharing-CkI1QuAm.js} +1 -1
- package/core/built/admin/assets/{chart-BCQFlmhJ.js → chart-_slUcr-K.js} +1 -1
- package/core/built/admin/assets/{chunk.423.dae9a3bbe7845c3a3cfc.js → chunk.434.de8a15730373eccfeefe.js} +13 -101
- package/core/built/admin/assets/{chunk.524.b5e454aa74df4428420c.js → chunk.524.5b9b463506a16221fc91.js} +6 -6
- package/core/built/admin/assets/{chunk.582.20635869be68725e6d5c.js → chunk.582.d8eae1661d753befaefd.js} +7 -7
- package/core/built/admin/assets/{chunk.123.1255d9e815f933dfdc57.js → chunk.630.3dbb0231a2d871126a80.js} +8 -6
- package/core/built/admin/assets/{code-editor-view-BXnjo7qe.js → code-editor-view-BWMqr2JV.js} +1 -1
- package/core/built/admin/assets/comments-BeoA0nfK.js +1 -0
- package/core/built/admin/assets/{content-helpers-CQXipRWa.js → content-helpers-CmTGdEmL.js} +1 -1
- package/core/built/admin/assets/{copy-B-MxRWPu.js → copy-CDHcAPJw.js} +1 -1
- package/core/built/admin/assets/{data-list-B2sqn7IE.js → data-list-Crb1ffbp.js} +1 -1
- package/core/built/admin/assets/{deleted-feed-item-DQi676Dy.js → deleted-feed-item-DBW0zJQg.js} +1 -1
- package/core/built/admin/assets/{dropzone-GgOCfK2j.js → dropzone-B9JUsQlW.js} +3 -3
- package/core/built/admin/assets/{edit-profile-COx5FmF9.js → edit-profile-Dz-IhetN.js} +1 -1
- package/core/built/admin/assets/{empty-indicator-Bf4Dqk72.js → empty-indicator-2QGnEbtY.js} +1 -1
- package/core/built/admin/assets/{en-BkI47Ou-.js → en-BRQS1Z8j.js} +1 -1
- package/core/built/admin/assets/{feed-Dzc-8jwd.js → feed-T3kW9UJA.js} +1 -1
- package/core/built/admin/assets/filters-ChOMQQZW.js +1 -0
- package/core/built/admin/assets/{gh-chart-Ch6dYUac.js → gh-chart-fuWw60Ka.js} +1 -1
- package/core/built/admin/assets/{ghost-69e448feab2cb78aba64f7177fa4d6f0.js → ghost-78b4a517ac907213ab47708eef33bc6f.js} +423 -542
- package/core/built/admin/assets/{growth-BIBJdcm6.js → growth-D9sCnmon.js} +1 -1
- package/core/built/admin/assets/{hash-BGd7HEsT.js → hash-CI1pQ1UC.js} +1 -1
- package/core/built/admin/assets/header-OevT95FI.js +1 -0
- package/core/built/admin/assets/{inbox-CFzKvW3h.js → inbox-DYY8-M1K.js} +1 -1
- package/core/built/admin/assets/{index-Dy8dCc8t.js → index-8CZdLQzu.js} +4 -4
- package/core/built/admin/assets/{index-DIO8ceib.js → index-BDAOs7pI.js} +1 -1
- package/core/built/admin/assets/{index-BZyG96u1.js → index-BEEgMX-_.js} +1 -1
- package/core/built/admin/assets/index-BbveDn8H.css +1 -0
- package/core/built/admin/assets/{index-BYXKsmpv.js → index-C-Cpbee5.js} +1 -1
- package/core/built/admin/assets/{index-DDJAHYHQ.js → index-CCF2RKxR.js} +12 -12
- package/core/built/admin/assets/{index-ZuWSQ3L6.js → index-CEnfjH5h.js} +93 -93
- package/core/built/admin/assets/{index-_WMp37yL.js → index-CcFVbffG.js} +1 -1
- package/core/built/admin/assets/{index-DpZazR71.js → index-CyMlhfZJ.js} +1 -1
- package/core/built/admin/assets/{index-DM98UB_U.js → index-DBZYUfjO.js} +1 -1
- package/core/built/admin/assets/{index-D0gRP4Gp.js → index-DJa3pLmx.js} +1 -1
- package/core/built/admin/assets/{index-n5opb8tL.js → index-DVqmhe-L.js} +1 -1
- package/core/built/admin/assets/{index-S2DGJkmz.js → index-DW5aEj6O.js} +2 -2
- package/core/built/admin/assets/{index-CvX5YYEz.js → index-DcFgRUSN.js} +1 -1
- package/core/built/admin/assets/{index-7NTHsKgE.js → index-DjgsxHeB.js} +1 -1
- package/core/built/admin/assets/index-mqQc8MVd.js +1 -0
- package/core/built/admin/assets/{index-CsHjDdYB.js → index-qQZsxgFE.js} +1 -1
- package/core/built/admin/assets/{koenig-lexical-8qAZ5o1x.js → koenig-lexical-CsbE6fpi.js} +1 -1
- package/core/built/admin/assets/kpis-Dw04ruBN.js +1 -0
- package/core/built/admin/assets/{label-CofMdj8x.js → label-tBvn89sm.js} +1 -1
- package/core/built/admin/assets/{links-MSlYSad1.js → links-Do4jcjIh.js} +1 -1
- package/core/built/admin/assets/{loader-circle-CF5G2g_Z.js → loader-circle-C8exRUku.js} +4 -4
- package/core/built/admin/assets/{lucide-react-DZiAu6PQ.js → lucide-react-4VO5Dwow.js} +1 -1
- package/core/built/admin/assets/{main-layout-DEVUkqt_.js → main-layout-BAqXRgAx.js} +1 -1
- package/core/built/admin/assets/{member-route-mLKS-PsA.js → member-route-D4n-RbQd.js} +1 -1
- package/core/built/admin/assets/members-DRLgwCgJ.js +15 -0
- package/core/built/admin/assets/{message-square-text-DESy3kSk.js → message-square-text-CC_1bY-Q.js} +5 -5
- package/core/built/admin/assets/{minus-DVNwSjD6.js → minus-DSyx9DCe.js} +1 -1
- package/core/built/admin/assets/{modals-FYjLOMaQ.js → modals-AryZr_DA.js} +13 -13
- package/core/built/admin/assets/{moderation-u4WS46a-.js → moderation-DwKm9LO-.js} +1 -1
- package/core/built/admin/assets/{newsletter-Cj0UCg4J.js → newsletter-C0rydPGS.js} +1 -1
- package/core/built/admin/assets/{newsletters-_UvhdBE3.js → newsletters-DKdmxfDG.js} +1 -1
- package/core/built/admin/assets/{note-CRnFryTp.js → note-996Zos9G.js} +1 -1
- package/core/built/admin/assets/{overview-Cr0dGxEU.js → overview-r17hlWAB.js} +1 -1
- package/core/built/admin/assets/{pagemenu-BqoDENpI.js → pagemenu-DzpB1AkZ.js} +17 -17
- package/core/built/admin/assets/{post-analytics-DIr_rDtL.js → post-analytics-AwufPVFE.js} +1 -1
- package/core/built/admin/assets/{post-analytics-context-WA--pwK5.js → post-analytics-context-GFe0lMc-.js} +1 -1
- package/core/built/admin/assets/{post-analytics-header-D97SoEaV.js → post-analytics-header-DmGyNvP9.js} +1 -1
- package/core/built/admin/assets/{post-share-modal-DBxR7WCX.js → post-share-modal-CTpdCS2X.js} +1 -1
- package/core/built/admin/assets/posts/{comments-Bswx2dzs.mjs → comments-Cvt31uBs.mjs} +597 -674
- package/core/built/admin/assets/posts/{dialog-67vvNv8e.mjs → dialog-DaViJlnd.mjs} +3 -3
- package/core/built/admin/assets/posts/{dropdown-menu-BKZfsAPJ.mjs → dropdown-menu-B4KGMiRI.mjs} +5 -5
- package/core/built/admin/assets/posts/{empty-indicator-DTmBQa_3.mjs → empty-indicator-BaD6pCXM.mjs} +2 -2
- package/core/built/admin/assets/posts/filters-BsCI4RJg.mjs +2835 -0
- package/core/built/admin/assets/posts/{get-site-timezone-D75cHSJ1.mjs → get-site-timezone-Bo-iI2bI.mjs} +2 -2
- package/core/built/admin/assets/posts/{growth-BqJWjpAp.mjs → growth-BJxIDp2o.mjs} +14 -14
- package/core/built/admin/assets/posts/header-7zhnErbb.mjs +100 -0
- package/core/built/admin/assets/posts/{heading-DXxLDQ96.mjs → heading-BCDx_eVF.mjs} +2 -2
- package/core/built/admin/assets/posts/{hooks-pVotzebr.mjs → hooks-DQL2O_El.mjs} +2 -2
- package/core/built/admin/assets/posts/{index-DZ1HzbGS.mjs → index-0mEgtljt.mjs} +3 -3
- package/core/built/admin/assets/posts/{index-By5yPnMZ.mjs → index-BTzJVQ6S.mjs} +10 -10
- package/core/built/admin/assets/posts/{input-DdXe2Fjm.mjs → input-DaHXv92f.mjs} +2 -2
- package/core/built/admin/assets/posts/{kpis-1MXZeSC9.mjs → kpis-GRsx6fPV.mjs} +10 -10
- package/core/built/admin/assets/posts/{links-DGzzdzsH.mjs → links-B1q_pqE9.mjs} +4 -4
- package/core/built/admin/assets/posts/{loading-indicator-CSj2spwS.mjs → loading-indicator-DiYqXomj.mjs} +3 -3
- package/core/built/admin/assets/posts/{main-layout-CGs25JVH.mjs → main-layout-DeqPTJTe.mjs} +2 -2
- package/core/built/admin/assets/posts/{members-BRcED5fL.mjs → members-LABk5yI5.mjs} +4102 -3442
- package/core/built/admin/assets/posts/{newsletter-D706LlgM.mjs → newsletter-C_nbHBaP.mjs} +15 -15
- package/core/built/admin/assets/posts/{overview-5dG5ypjx.mjs → overview-AJnKv4Ze.mjs} +16 -16
- package/core/built/admin/assets/posts/{post-analytics-wvNuOa4c.mjs → post-analytics-b_CKsePp.mjs} +6 -6
- package/core/built/admin/assets/posts/{post-analytics-context-BqnFe05q.mjs → post-analytics-context-D6jtpxxm.mjs} +5 -5
- package/core/built/admin/assets/posts/{post-analytics-header-Dsi5l6hb.mjs → post-analytics-header-R5UF_tF0.mjs} +11 -11
- package/core/built/admin/assets/posts/{post-share-modal-DWe35McY.mjs → post-share-modal-y4BEOajk.mjs} +4 -4
- package/core/built/admin/assets/posts/posts-C2hNrf1c.mjs +37 -0
- package/core/built/admin/assets/posts/posts.js +1 -1
- package/core/built/admin/assets/posts/{reply-B4vwBMwj.mjs → reply-2Uvi3Kxb.mjs} +2 -2
- package/core/built/admin/assets/posts/{search-DQuB1WMm.mjs → search-se7meOnL.mjs} +2 -2
- package/core/built/admin/assets/posts/{select-BMPHyOdQ.mjs → select-DpUpauFg.mjs} +8 -8
- package/core/built/admin/assets/posts/{separator-DgZ2VF9r.mjs → separator-CdBM46dw.mjs} +3 -3
- package/core/built/admin/assets/posts/{settings-D-wnf7Qg.mjs → settings-Chhj9xKP.mjs} +2 -2
- package/core/built/admin/assets/posts/{sheet-SOdCzxUt.mjs → sheet--k3SiDko.mjs} +3 -3
- package/core/built/admin/assets/posts/{skeleton-Du7JXZ_1.mjs → skeleton-CUSLSLoY.mjs} +3 -3
- package/core/built/admin/assets/posts/{source-icon-DcBtKbCl.mjs → source-icon-BjYUIoXN.mjs} +3 -3
- package/core/built/admin/assets/posts/{stats-CeLav-Hu.mjs → stats-BRdXKaxM.mjs} +4 -4
- package/core/built/admin/assets/posts/{table-DlaJMBps.mjs → table-Bgi_UcfL.mjs} +2 -2
- package/core/built/admin/assets/posts/{tabs-BQQbtw2g.mjs → tabs-DT8Bh72E.mjs} +14 -14
- package/core/built/admin/assets/posts/tags-BCFLnZYl.mjs +399 -0
- package/core/built/admin/assets/posts/{tags-CLyaNf39.mjs → tags-Kv2q0o3p.mjs} +2 -2
- package/core/built/admin/assets/posts/use-scroll-restoration-CLAUAal3.mjs +517 -0
- package/core/built/admin/assets/posts/{use-infinite-virtual-scroll-B_NwiBXK.mjs → virtual-list-window-CQDEqNBL.mjs} +246 -262
- package/core/built/admin/assets/posts/{web-TEVKbXSI.mjs → web-CqN0MQU6.mjs} +18 -18
- package/core/built/admin/assets/posts-GvXDuhVG.js +1 -0
- package/core/built/admin/assets/{referrers-J4vexZCf.js → referrers-Bd9pW-WX.js} +1 -1
- package/core/built/admin/assets/{repeat-BxOK9zhN.js → repeat-y6HlMgGO.js} +2 -2
- package/core/built/admin/assets/{reply-BoTN-eE0.js → reply-Cc8ryI5v.js} +2 -2
- package/core/built/admin/assets/{select-Bd1zcqox.js → select-CGr_5qad.js} +1 -1
- package/core/built/admin/assets/{settings-D72z6T_a.js → settings-BPsfSgg3.js} +1 -1
- package/core/built/admin/assets/{settings-BGbGoa4s.js → settings-BTd0Adha.js} +19 -19
- package/core/built/admin/assets/{sort-button-BOLTpImz.js → sort-button-k76_5HR2.js} +1 -1
- package/core/built/admin/assets/{source-icon-BqEM5MvU.js → source-icon-DMt0UskC.js} +1 -1
- package/core/built/admin/assets/{sprout-Bf-wc2Vo.js → sprout-Td9eaOoY.js} +2 -2
- package/core/built/admin/assets/{square-Cj_bJ0HZ.js → square-Df8vEYlG.js} +1 -1
- package/core/built/admin/assets/stats/{audience-BiHYBUzT.mjs → audience-DMTObpL8.mjs} +3 -3
- package/core/built/admin/assets/stats/{content-helpers-CIXZiyCm.mjs → content-helpers-ReMp9KJN.mjs} +4 -4
- package/core/built/admin/assets/stats/{index-CkKk-p14.mjs → index-6L-yLKFX.mjs} +8 -8
- package/core/built/admin/assets/stats/{index-DBB8Oih1.mjs → index-CIUyjeP-.mjs} +5 -5
- package/core/built/admin/assets/stats/{index-9zQR4gr0.mjs → index-CMSDpQm3.mjs} +3626 -3513
- package/core/built/admin/assets/stats/{index-DErXBfDM.mjs → index-Ca-_KJzy.mjs} +5 -5
- package/core/built/admin/assets/stats/{index-DMSmQLxG.mjs → index-CfO5yPSP.mjs} +5 -5
- package/core/built/admin/assets/stats/{sort-button-BqY7GFaO.mjs → sort-button-BB_M2CdZ.mjs} +3 -3
- package/core/built/admin/assets/stats/{stats-BeJgKX2G.mjs → stats-B2nnuLeU.mjs} +4 -4
- package/core/built/admin/assets/stats/stats.js +1 -1
- package/core/built/admin/assets/stats/{tabs-CPz357mW.mjs → tabs-DjJG-d3O.mjs} +3 -3
- package/core/built/admin/assets/stats/{use-growth-stats-WMYXBQE3.mjs → use-growth-stats-BMT5M7l6.mjs} +3 -3
- package/core/built/admin/assets/{stats-DWpHtRym.js → stats-Bs9ZbmXX.js} +1 -1
- package/core/built/admin/assets/stats-view-BWoPuaLz.js +1 -0
- package/core/built/admin/assets/{step-1-Bjya9Gt0.js → step-1-BUvsuCs0.js} +1 -1
- package/core/built/admin/assets/{step-2-CJ6I8JNc.js → step-2-DI9ekXls.js} +1 -1
- package/core/built/admin/assets/{step-3-3fs6Y2Kj.js → step-3-DzT_XhaS.js} +2 -2
- package/core/built/admin/assets/{table-B4zlzEDP.js → table-BKqaEGAm.js} +1 -1
- package/core/built/admin/assets/{tabs-mR5oJGm5.js → tabs-G6Ql8vbf.js} +1 -1
- package/core/built/admin/assets/tags-BHm-dlBs.js +1 -0
- package/core/built/admin/assets/{tags-CsgMtkFL.js → tags-_taMP0sJ.js} +1 -1
- package/core/built/admin/assets/{textarea-CQjEvapR.js → textarea-DcVuGYYq.js} +1 -1
- package/core/built/admin/assets/{tiers-CQE0v797.js → tiers-kv-xBoqQ.js} +1 -1
- package/core/built/admin/assets/{toggle-group-CR-Z-bJL.js → toggle-group-DsatLdt7.js} +1 -1
- package/core/built/admin/assets/{topic-filter-_NyD55eH.js → topic-filter-DkJyIuAf.js} +1 -1
- package/core/built/admin/assets/{trash-BFSLkv0z.js → trash-BeZZgbn-.js} +1 -1
- package/core/built/admin/assets/{upload-BTxT4v2z.js → upload-BG7KNIn7.js} +4 -4
- package/core/built/admin/assets/{use-growth-stats-BGymNu5O.js → use-growth-stats-CNGdl44N.js} +1 -1
- package/core/built/admin/assets/use-scroll-restoration-CQ3w0W98.js +1 -0
- package/core/built/admin/assets/{use-simple-pagination-Cq7Afp_c.js → use-simple-pagination-BeIJ_5Vv.js} +1 -1
- package/core/built/admin/assets/{user-plus-DMl69yKl.js → user-plus-CMxR50-Y.js} +1 -1
- package/core/built/admin/assets/{user-round-check-CVuZXUPz.js → user-round-check-2nhPmqP3.js} +1 -1
- package/core/built/admin/assets/virtual-list-window-Uq8oKYVG.js +4 -0
- package/core/built/admin/assets/{wallet-cards-zHR_y6Sp.js → wallet-cards-CJcVzH0D.js} +1 -1
- package/core/built/admin/assets/{web-CmFHgeQw.js → web-BPwTFKrc.js} +1 -1
- package/core/built/admin/index.html +7 -7
- package/core/frontend/helpers/ghost_head.js +1 -4
- package/core/server/data/migrations/versions/6.25/2026-03-26-15-47-00-insert-default-email-design-settings-row.js +42 -0
- package/core/server/data/migrations/versions/6.25/2026-03-30-20-22-25-add-email-design-setting-permissions.js +44 -0
- 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
- package/core/server/data/migrations/versions/6.25/2026-03-31-13-12-10-backfill-automated-emails-email-design-setting-id.js +45 -0
- 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
- package/core/server/data/schema/fixtures/fixtures.json +35 -0
- package/core/server/data/schema/schema.js +1 -0
- package/core/server/data/seeders/importers/comment-reports-importer.js +1 -3
- package/core/server/data/seeders/importers/comments-importer.js +3 -2
- package/core/server/data/seeders/importers/email-batches-importer.js +3 -3
- package/core/server/data/seeders/importers/email-recipients-importer.js +6 -6
- package/core/server/data/seeders/importers/emails-importer.js +4 -3
- package/core/server/data/seeders/importers/members-click-events-importer.js +1 -1
- package/core/server/data/seeders/importers/members-created-events-importer.js +2 -1
- package/core/server/data/seeders/importers/members-feedback-importer.js +3 -4
- package/core/server/data/seeders/importers/members-login-events-importer.js +3 -2
- package/core/server/data/seeders/importers/members-status-events-importer.js +1 -2
- package/core/server/data/seeders/importers/members-stripe-customers-importer.js +2 -1
- package/core/server/data/seeders/importers/members-stripe-customers-subscriptions-importer.js +4 -2
- package/core/server/data/seeders/importers/members-subscribe-events-importer.js +1 -2
- package/core/server/data/seeders/importers/members-subscription-created-events-importer.js +3 -1
- package/core/server/data/seeders/importers/offer-redemptions-importer.js +3 -3
- package/core/server/data/seeders/utils/database-date.js +26 -1
- package/core/server/models/automated-email.js +27 -0
- package/core/server/models/email-design-setting.js +27 -0
- package/core/server/services/members/service.js +0 -22
- package/core/server/services/stripe/service.js +1 -2
- package/core/server/services/verification/verification-webhook-service.js +2 -2
- package/core/server/services/verification/verification-webhook-service.ts +2 -2
- package/core/server/services/verification-trigger.js +34 -69
- package/core/server/services/webhooks/webhook-trigger.js +1 -1
- package/core/shared/labs.js +2 -2
- package/package.json +10 -28
- package/tsconfig.tsbuildinfo +1 -1
- package/yarn.lock +423 -107
- package/components/tryghost-i18n-6.24.0.tgz +0 -0
- package/components/tryghost-parse-email-address-6.24.0.tgz +0 -0
- package/core/built/admin/assets/comments-CteqV7ZN.js +0 -1
- package/core/built/admin/assets/filters-DXXaCya7.js +0 -1
- package/core/built/admin/assets/index-QB-va_sk.css +0 -1
- package/core/built/admin/assets/index-nBUk6L1X.js +0 -1
- package/core/built/admin/assets/kpis-Cv75oSPY.js +0 -1
- package/core/built/admin/assets/members-DcElgZ2t.js +0 -15
- package/core/built/admin/assets/posts/filters-Ds_ZaYIU.mjs +0 -2722
- package/core/built/admin/assets/posts/posts-DI5YQFp4.mjs +0 -17
- package/core/built/admin/assets/posts/tags-CjwolIiT.mjs +0 -395
- package/core/built/admin/assets/posts/use-scroll-restoration-YSR5jwQl.mjs +0 -232
- package/core/built/admin/assets/posts-CJHEP4C-.js +0 -1
- package/core/built/admin/assets/stats-view-CcyaLPwj.js +0 -1
- package/core/built/admin/assets/tags-DEFC6GpD.js +0 -1
- package/core/built/admin/assets/use-infinite-virtual-scroll-CNqGwgHd.js +0 -4
- package/core/built/admin/assets/use-scroll-restoration-BWtb0NrS.js +0 -1
- package/core/shared/config/env/config.testing-browser.json +0 -98
- /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
|
|
2
|
-
import { u as
|
|
3
|
-
import {
|
|
4
|
-
import { u as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { C as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { E as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
var U = "Checkbox", [
|
|
18
|
-
function
|
|
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:
|
|
23
|
-
defaultChecked:
|
|
24
|
-
disabled:
|
|
22
|
+
children: n,
|
|
23
|
+
defaultChecked: r,
|
|
24
|
+
disabled: i,
|
|
25
25
|
form: o,
|
|
26
26
|
name: l,
|
|
27
|
-
onCheckedChange:
|
|
28
|
-
required:
|
|
29
|
-
value:
|
|
27
|
+
onCheckedChange: c,
|
|
28
|
+
required: d,
|
|
29
|
+
value: u = "on",
|
|
30
30
|
// @ts-expect-error
|
|
31
|
-
internal_do_not_use_render:
|
|
32
|
-
} = s, [
|
|
31
|
+
internal_do_not_use_render: p
|
|
32
|
+
} = s, [h, f] = $s({
|
|
33
33
|
prop: a,
|
|
34
|
-
defaultProp:
|
|
35
|
-
onChange:
|
|
34
|
+
defaultProp: r ?? !1,
|
|
35
|
+
onChange: c,
|
|
36
36
|
caller: U
|
|
37
|
-
}), [
|
|
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
|
-
),
|
|
41
|
-
checked:
|
|
42
|
-
disabled:
|
|
43
|
-
setChecked:
|
|
44
|
-
control:
|
|
45
|
-
setControl:
|
|
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:
|
|
49
|
-
hasConsumerStoppedPropagationRef:
|
|
50
|
-
required:
|
|
51
|
-
defaultChecked:
|
|
52
|
-
isFormControl:
|
|
53
|
-
bubbleInput:
|
|
54
|
-
setBubbleInput:
|
|
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
|
-
|
|
57
|
+
Ys,
|
|
58
58
|
{
|
|
59
59
|
scope: t,
|
|
60
|
-
...
|
|
61
|
-
children:
|
|
60
|
+
...I,
|
|
61
|
+
children: Zs(p) ? p(I) : n
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
64
|
}
|
|
65
|
-
var
|
|
66
|
-
({ __scopeCheckbox: s, onKeyDown: t, onClick: a, ...
|
|
65
|
+
var De = "CheckboxTrigger", Me = k(
|
|
66
|
+
({ __scopeCheckbox: s, onKeyDown: t, onClick: a, ...n }, r) => {
|
|
67
67
|
const {
|
|
68
|
-
control:
|
|
68
|
+
control: i,
|
|
69
69
|
value: o,
|
|
70
70
|
disabled: l,
|
|
71
|
-
checked:
|
|
72
|
-
required:
|
|
73
|
-
setControl:
|
|
74
|
-
setChecked:
|
|
75
|
-
hasConsumerStoppedPropagationRef:
|
|
76
|
-
isFormControl:
|
|
77
|
-
bubbleInput:
|
|
78
|
-
} =
|
|
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
|
|
81
|
-
if (
|
|
82
|
-
const
|
|
83
|
-
return
|
|
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
|
-
}, [
|
|
86
|
-
|
|
85
|
+
}, [i, p]), /* @__PURE__ */ e.jsx(
|
|
86
|
+
ie.button,
|
|
87
87
|
{
|
|
88
88
|
type: "button",
|
|
89
89
|
role: "checkbox",
|
|
90
|
-
"aria-checked":
|
|
91
|
-
"aria-required":
|
|
92
|
-
"data-state":
|
|
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
|
-
...
|
|
97
|
-
ref:
|
|
98
|
-
onKeyDown:
|
|
99
|
-
|
|
96
|
+
...n,
|
|
97
|
+
ref: b,
|
|
98
|
+
onKeyDown: Ne(t, (j) => {
|
|
99
|
+
j.key === "Enter" && j.preventDefault();
|
|
100
100
|
}),
|
|
101
|
-
onClick:
|
|
102
|
-
|
|
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
|
-
|
|
109
|
-
var
|
|
108
|
+
Me.displayName = De;
|
|
109
|
+
var ce = k(
|
|
110
110
|
(s, t) => {
|
|
111
111
|
const {
|
|
112
112
|
__scopeCheckbox: a,
|
|
113
|
-
name:
|
|
114
|
-
checked:
|
|
115
|
-
defaultChecked:
|
|
113
|
+
name: n,
|
|
114
|
+
checked: r,
|
|
115
|
+
defaultChecked: i,
|
|
116
116
|
required: o,
|
|
117
117
|
disabled: l,
|
|
118
|
-
value:
|
|
119
|
-
onCheckedChange:
|
|
120
|
-
form:
|
|
121
|
-
...
|
|
118
|
+
value: c,
|
|
119
|
+
onCheckedChange: d,
|
|
120
|
+
form: u,
|
|
121
|
+
...p
|
|
122
122
|
} = s;
|
|
123
123
|
return /* @__PURE__ */ e.jsx(
|
|
124
|
-
|
|
124
|
+
Xs,
|
|
125
125
|
{
|
|
126
126
|
__scopeCheckbox: a,
|
|
127
|
-
checked:
|
|
128
|
-
defaultChecked:
|
|
127
|
+
checked: r,
|
|
128
|
+
defaultChecked: i,
|
|
129
129
|
disabled: l,
|
|
130
130
|
required: o,
|
|
131
|
-
onCheckedChange:
|
|
132
|
-
name:
|
|
133
|
-
form:
|
|
134
|
-
value:
|
|
135
|
-
internal_do_not_use_render: ({ isFormControl:
|
|
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
|
-
|
|
137
|
+
Me,
|
|
138
138
|
{
|
|
139
|
-
...
|
|
139
|
+
...p,
|
|
140
140
|
ref: t,
|
|
141
141
|
__scopeCheckbox: a
|
|
142
142
|
}
|
|
143
143
|
),
|
|
144
|
-
|
|
145
|
-
|
|
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
|
-
|
|
156
|
-
var
|
|
155
|
+
ce.displayName = U;
|
|
156
|
+
var $e = "CheckboxIndicator", Fe = k(
|
|
157
157
|
(s, t) => {
|
|
158
|
-
const { __scopeCheckbox: a, forceMount:
|
|
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:
|
|
162
|
+
present: n || S(i.checked) || i.checked === !0,
|
|
163
163
|
children: /* @__PURE__ */ e.jsx(
|
|
164
|
-
|
|
164
|
+
ie.span,
|
|
165
165
|
{
|
|
166
|
-
"data-state":
|
|
167
|
-
"data-disabled":
|
|
168
|
-
...
|
|
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
|
-
|
|
178
|
-
var
|
|
177
|
+
Fe.displayName = $e;
|
|
178
|
+
var ze = "CheckboxBubbleInput", Oe = k(
|
|
179
179
|
({ __scopeCheckbox: s, ...t }, a) => {
|
|
180
180
|
const {
|
|
181
|
-
control:
|
|
182
|
-
hasConsumerStoppedPropagationRef:
|
|
183
|
-
checked:
|
|
181
|
+
control: n,
|
|
182
|
+
hasConsumerStoppedPropagationRef: r,
|
|
183
|
+
checked: i,
|
|
184
184
|
defaultChecked: o,
|
|
185
185
|
required: l,
|
|
186
|
-
disabled:
|
|
187
|
-
name:
|
|
188
|
-
value:
|
|
189
|
-
form:
|
|
190
|
-
bubbleInput:
|
|
191
|
-
setBubbleInput:
|
|
192
|
-
} =
|
|
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
|
|
195
|
-
if (!
|
|
196
|
-
const
|
|
197
|
-
|
|
194
|
+
const v = h;
|
|
195
|
+
if (!v) return;
|
|
196
|
+
const P = window.HTMLInputElement.prototype, R = Object.getOwnPropertyDescriptor(
|
|
197
|
+
P,
|
|
198
198
|
"checked"
|
|
199
|
-
).set,
|
|
200
|
-
if (
|
|
201
|
-
const
|
|
202
|
-
|
|
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
|
-
}, [
|
|
205
|
-
const
|
|
204
|
+
}, [h, b, i, r]);
|
|
205
|
+
const j = D(S(i) ? !1 : i);
|
|
206
206
|
return /* @__PURE__ */ e.jsx(
|
|
207
|
-
|
|
207
|
+
ie.input,
|
|
208
208
|
{
|
|
209
209
|
type: "checkbox",
|
|
210
210
|
"aria-hidden": !0,
|
|
211
|
-
defaultChecked: o ??
|
|
211
|
+
defaultChecked: o ?? j.current,
|
|
212
212
|
required: l,
|
|
213
|
-
disabled:
|
|
214
|
-
name:
|
|
215
|
-
value:
|
|
216
|
-
form:
|
|
213
|
+
disabled: c,
|
|
214
|
+
name: d,
|
|
215
|
+
value: u,
|
|
216
|
+
form: p,
|
|
217
217
|
...t,
|
|
218
218
|
tabIndex: -1,
|
|
219
|
-
ref:
|
|
219
|
+
ref: m,
|
|
220
220
|
style: {
|
|
221
221
|
...t.style,
|
|
222
|
-
...
|
|
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
|
-
|
|
237
|
-
function
|
|
236
|
+
Oe.displayName = ze;
|
|
237
|
+
function Zs(s) {
|
|
238
238
|
return typeof s == "function";
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function S(s) {
|
|
241
241
|
return s === "indeterminate";
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
return
|
|
243
|
+
function Be(s) {
|
|
244
|
+
return S(s) ? "indeterminate" : s ? "checked" : "unchecked";
|
|
245
245
|
}
|
|
246
|
-
const
|
|
247
|
-
|
|
246
|
+
const He = k(({ className: s, ...t }, a) => /* @__PURE__ */ e.jsx(
|
|
247
|
+
ce,
|
|
248
248
|
{
|
|
249
249
|
ref: a,
|
|
250
|
-
className:
|
|
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
|
-
|
|
256
|
+
Fe,
|
|
257
257
|
{
|
|
258
|
-
className:
|
|
259
|
-
children: /* @__PURE__ */ e.jsx(
|
|
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
|
-
|
|
265
|
-
var
|
|
266
|
-
function
|
|
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
|
|
270
|
-
return s != null && typeof s == "object" && "$$typeof" in s && s.$$typeof ===
|
|
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
|
|
274
|
-
const t = /* @__PURE__ */
|
|
275
|
-
let { children:
|
|
276
|
-
|
|
277
|
-
const l = L.toArray(
|
|
278
|
-
if (
|
|
279
|
-
const
|
|
280
|
-
return /* @__PURE__ */ e.jsx(t, { ...o, ref:
|
|
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:
|
|
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
|
|
288
|
-
const t =
|
|
289
|
-
let { children:
|
|
290
|
-
if (
|
|
291
|
-
const o =
|
|
292
|
-
return
|
|
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(
|
|
294
|
+
return L.count(r) > 1 ? L.only(null) : null;
|
|
295
295
|
});
|
|
296
296
|
return t.displayName = `${s}.SlotClone`, t;
|
|
297
297
|
}
|
|
298
|
-
var
|
|
299
|
-
function
|
|
300
|
-
return
|
|
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
|
|
302
|
+
function nt(s, t) {
|
|
303
303
|
const a = { ...t };
|
|
304
|
-
for (const
|
|
305
|
-
const
|
|
306
|
-
/^on[A-Z]/.test(
|
|
307
|
-
const
|
|
308
|
-
return
|
|
309
|
-
} :
|
|
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
|
|
314
|
-
var
|
|
315
|
-
let t = (
|
|
316
|
-
return a ? s.ref : (t = (
|
|
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
|
|
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
|
-
],
|
|
337
|
-
const a = /* @__PURE__ */
|
|
338
|
-
const { asChild: o, ...l } =
|
|
339
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e.jsx(
|
|
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
|
|
342
|
-
}, {}),
|
|
343
|
-
|
|
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
|
|
349
|
-
a.target.closest("button, input, select, textarea") || ((
|
|
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
|
-
|
|
354
|
-
var
|
|
355
|
-
const
|
|
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
|
-
),
|
|
358
|
-
|
|
357
|
+
), qe = k(({ className: s, ...t }, a) => /* @__PURE__ */ e.jsx(
|
|
358
|
+
Ve,
|
|
359
359
|
{
|
|
360
360
|
ref: a,
|
|
361
|
-
className:
|
|
361
|
+
className: N(dt(), s),
|
|
362
362
|
...t
|
|
363
363
|
}
|
|
364
364
|
));
|
|
365
|
-
|
|
366
|
-
const
|
|
367
|
-
function
|
|
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
|
-
|
|
385
|
-
|
|
386
|
-
|
|
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
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
})
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
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
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
filters: a,
|
|
424
|
-
onFiltersChange: i
|
|
392
|
+
const xt = ({
|
|
393
|
+
filters: s,
|
|
394
|
+
onFiltersChange: t
|
|
425
395
|
}) => {
|
|
426
|
-
const n =
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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,
|
|
543
|
-
),
|
|
483
|
+
[n, a]
|
|
484
|
+
), i = s.length > 0, o = N(
|
|
544
485
|
"flex flex-row",
|
|
545
|
-
!
|
|
546
|
-
|
|
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:
|
|
549
|
-
|
|
489
|
+
return /* @__PURE__ */ e.jsx("div", { className: o, children: /* @__PURE__ */ e.jsx(
|
|
490
|
+
os,
|
|
550
491
|
{
|
|
551
|
-
addButtonIcon:
|
|
552
|
-
addButtonText:
|
|
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 ${
|
|
495
|
+
className: `[&>button]:order-last ${i ? "[&>button]:border-none" : "w-auto"}`,
|
|
555
496
|
clearButtonClassName: "font-normal text-muted-foreground",
|
|
556
|
-
clearButtonIcon: /* @__PURE__ */ e.jsx(
|
|
497
|
+
clearButtonIcon: /* @__PURE__ */ e.jsx(Ls, {}),
|
|
557
498
|
clearButtonText: "Clear",
|
|
558
|
-
fields:
|
|
559
|
-
filters:
|
|
499
|
+
fields: r,
|
|
500
|
+
filters: s,
|
|
560
501
|
keyboardShortcut: "f",
|
|
561
|
-
popoverAlign:
|
|
562
|
-
showClearButton:
|
|
502
|
+
popoverAlign: i ? "start" : "end",
|
|
503
|
+
showClearButton: i,
|
|
563
504
|
showSearchInput: !1,
|
|
564
|
-
onChange:
|
|
505
|
+
onChange: t
|
|
565
506
|
}
|
|
566
507
|
) });
|
|
567
|
-
},
|
|
568
|
-
/* @__PURE__ */ e.jsx(
|
|
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
|
-
] }),
|
|
571
|
-
function
|
|
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
|
-
|
|
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(
|
|
521
|
+
t ? /* @__PURE__ */ e.jsx(Is, {}) : /* @__PURE__ */ e.jsx(zs, {})
|
|
581
522
|
]
|
|
582
523
|
}
|
|
583
524
|
);
|
|
584
525
|
}
|
|
585
|
-
function
|
|
586
|
-
const t = D(null), [a,
|
|
526
|
+
function We({ item: s }) {
|
|
527
|
+
const t = D(null), [a, n] = y(!1), [r, i] = y(!1);
|
|
587
528
|
return B(() => {
|
|
588
|
-
if (
|
|
529
|
+
if (r)
|
|
589
530
|
return;
|
|
590
531
|
const o = () => {
|
|
591
|
-
t.current &&
|
|
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,
|
|
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:
|
|
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
|
-
|
|
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(
|
|
547
|
+
a && /* @__PURE__ */ e.jsx(jt, { expanded: r, onClick: () => i(!r) })
|
|
607
548
|
] }) });
|
|
608
549
|
}
|
|
609
|
-
const A = "CommentsResponseType",
|
|
550
|
+
const A = "CommentsResponseType", gt = Os({
|
|
610
551
|
dataType: A,
|
|
611
552
|
path: "/comments/",
|
|
612
553
|
defaultNextPageParams: (s, t) => {
|
|
613
|
-
var a,
|
|
554
|
+
var a, n;
|
|
614
555
|
return (a = s.meta) != null && a.pagination.next ? {
|
|
615
556
|
...t,
|
|
616
|
-
page: (((
|
|
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((
|
|
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:
|
|
624
|
-
isEnd:
|
|
564
|
+
meta: n,
|
|
565
|
+
isEnd: n ? n.pagination.pages === n.pagination.page : !0
|
|
625
566
|
};
|
|
626
567
|
}
|
|
627
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
606
|
+
}), Ct = oe({
|
|
666
607
|
dataType: "CommentReportsResponseType",
|
|
667
608
|
path: (s) => `/comments/${s}/reports/`
|
|
668
|
-
}),
|
|
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
|
-
}),
|
|
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
|
|
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
|
|
636
|
+
function Ye({
|
|
696
637
|
memberName: s,
|
|
697
638
|
memberId: t,
|
|
698
639
|
createdAt: a,
|
|
699
|
-
isHidden:
|
|
700
|
-
canComment:
|
|
701
|
-
onAuthorClick:
|
|
640
|
+
isHidden: n,
|
|
641
|
+
canComment: r,
|
|
642
|
+
onAuthorClick: i,
|
|
702
643
|
postTitle: o,
|
|
703
644
|
onPostClick: l,
|
|
704
|
-
className:
|
|
645
|
+
className: c
|
|
705
646
|
}) {
|
|
706
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
707
|
-
/* @__PURE__ */ e.jsxs("div", { className:
|
|
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
|
-
|
|
650
|
+
n && "opacity-50"
|
|
710
651
|
), children: [
|
|
711
|
-
/* @__PURE__ */ e.jsx("div", { className: "whitespace-nowrap", children: t &&
|
|
712
|
-
|
|
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:
|
|
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
|
-
|
|
721
|
-
/* @__PURE__ */ e.jsx(
|
|
722
|
-
|
|
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(
|
|
668
|
+
/* @__PURE__ */ e.jsx(X, { children: "Comments disabled" })
|
|
728
669
|
] }) }),
|
|
729
|
-
/* @__PURE__ */ e.jsx(
|
|
730
|
-
/* @__PURE__ */ e.jsx("div", { className: "shrink-0 whitespace-nowrap", children: a && /* @__PURE__ */ e.jsx(
|
|
731
|
-
/* @__PURE__ */ e.jsx(
|
|
732
|
-
/* @__PURE__ */ e.jsx(
|
|
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
|
-
|
|
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
|
-
|
|
688
|
+
n && /* @__PURE__ */ e.jsx(us, { variant: "secondary", children: "Hidden" })
|
|
748
689
|
] });
|
|
749
690
|
}
|
|
750
|
-
function
|
|
691
|
+
function St({
|
|
751
692
|
open: s,
|
|
752
693
|
memberName: t,
|
|
753
694
|
onOpenChange: a,
|
|
754
|
-
onConfirm:
|
|
695
|
+
onConfirm: n
|
|
755
696
|
}) {
|
|
756
|
-
const [
|
|
757
|
-
|
|
697
|
+
const [r, i] = y(!1), o = (c) => {
|
|
698
|
+
c || i(!1), a(c);
|
|
758
699
|
}, l = () => {
|
|
759
|
-
|
|
700
|
+
n(r), i(!1);
|
|
760
701
|
};
|
|
761
|
-
return /* @__PURE__ */ e.jsx(
|
|
762
|
-
/* @__PURE__ */ e.jsxs(
|
|
763
|
-
/* @__PURE__ */ e.jsx(
|
|
764
|
-
/* @__PURE__ */ e.jsxs(
|
|
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
|
-
|
|
712
|
+
He,
|
|
772
713
|
{
|
|
773
|
-
checked:
|
|
714
|
+
checked: r,
|
|
774
715
|
id: "hide-comments",
|
|
775
|
-
onCheckedChange: (
|
|
716
|
+
onCheckedChange: (c) => i(c === !0)
|
|
776
717
|
}
|
|
777
718
|
),
|
|
778
|
-
/* @__PURE__ */ e.jsx(
|
|
719
|
+
/* @__PURE__ */ e.jsx(qe, { htmlFor: "hide-comments", children: "Hide all previous comments" })
|
|
779
720
|
] }),
|
|
780
|
-
/* @__PURE__ */ e.jsxs(
|
|
781
|
-
/* @__PURE__ */ e.jsx(
|
|
782
|
-
/* @__PURE__ */ e.jsx(
|
|
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
|
|
727
|
+
function Xe({
|
|
787
728
|
comment: s
|
|
788
729
|
}) {
|
|
789
|
-
const { mutate: t } =
|
|
790
|
-
|
|
791
|
-
id:
|
|
792
|
-
reason: `Disabled from comment ${
|
|
793
|
-
hideComments:
|
|
794
|
-
}),
|
|
795
|
-
},
|
|
796
|
-
|
|
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(
|
|
800
|
-
/* @__PURE__ */ e.jsx(
|
|
801
|
-
|
|
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(
|
|
747
|
+
children: /* @__PURE__ */ e.jsx(vs, {})
|
|
807
748
|
}
|
|
808
749
|
) }),
|
|
809
|
-
/* @__PURE__ */ e.jsxs(
|
|
810
|
-
|
|
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
|
-
|
|
815
|
-
/* @__PURE__ */ e.jsx(
|
|
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
|
-
|
|
819
|
-
/* @__PURE__ */ e.jsx(
|
|
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:
|
|
822
|
-
/* @__PURE__ */ e.jsx(
|
|
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
|
-
|
|
769
|
+
St,
|
|
829
770
|
{
|
|
830
771
|
memberName: l == null ? void 0 : l.name,
|
|
831
|
-
open:
|
|
832
|
-
onConfirm:
|
|
833
|
-
onOpenChange:
|
|
772
|
+
open: n,
|
|
773
|
+
onConfirm: p,
|
|
774
|
+
onOpenChange: r
|
|
834
775
|
}
|
|
835
776
|
)
|
|
836
777
|
] });
|
|
837
778
|
}
|
|
838
|
-
function
|
|
839
|
-
var
|
|
840
|
-
const { data:
|
|
841
|
-
return /* @__PURE__ */ e.jsx(
|
|
842
|
-
/* @__PURE__ */ e.jsx(
|
|
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: (
|
|
792
|
+
avatarImage: (d = s.member) == null ? void 0 : d.avatar_image,
|
|
852
793
|
className: "shrink-0",
|
|
853
|
-
memberId: (
|
|
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: ((
|
|
859
|
-
/* @__PURE__ */ e.jsx(
|
|
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: ((
|
|
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:
|
|
874
|
-
|
|
875
|
-
var
|
|
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: (
|
|
883
|
-
memberId: (
|
|
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(
|
|
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: ((
|
|
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(
|
|
891
|
-
] },
|
|
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(
|
|
840
|
+
/* @__PURE__ */ e.jsx(ne, { children: /* @__PURE__ */ e.jsx(C, { onClick: () => a(!1), children: "OK" }) })
|
|
900
841
|
] }) });
|
|
901
842
|
}
|
|
902
|
-
function
|
|
903
|
-
var l,
|
|
904
|
-
const { data:
|
|
905
|
-
return /* @__PURE__ */ e.jsx(
|
|
906
|
-
/* @__PURE__ */ e.jsx(
|
|
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: (
|
|
856
|
+
avatarImage: (c = s.member) == null ? void 0 : c.avatar_image,
|
|
916
857
|
className: "shrink-0",
|
|
917
|
-
memberId: (
|
|
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: ((
|
|
923
|
-
/* @__PURE__ */ e.jsx(
|
|
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: ((
|
|
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:
|
|
938
|
-
var
|
|
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: (
|
|
946
|
-
memberId: (
|
|
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(
|
|
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: ((
|
|
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(
|
|
954
|
-
] },
|
|
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(
|
|
897
|
+
/* @__PURE__ */ e.jsx(ne, { children: /* @__PURE__ */ e.jsx(C, { onClick: () => a(!1), children: "OK" }) })
|
|
957
898
|
] }) });
|
|
958
899
|
}
|
|
959
|
-
function
|
|
960
|
-
const l =
|
|
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:
|
|
963
|
-
] }),
|
|
964
|
-
return /* @__PURE__ */ e.jsx(
|
|
965
|
-
/* @__PURE__ */ e.jsx(
|
|
966
|
-
|
|
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:
|
|
909
|
+
className: N(l, "cursor-pointer hover:opacity-70"),
|
|
969
910
|
"data-testid": o,
|
|
970
|
-
to:
|
|
971
|
-
onClick: (
|
|
972
|
-
|
|
911
|
+
to: n,
|
|
912
|
+
onClick: (u) => {
|
|
913
|
+
u.stopPropagation();
|
|
973
914
|
},
|
|
974
|
-
children:
|
|
915
|
+
children: c
|
|
975
916
|
}
|
|
976
|
-
) :
|
|
917
|
+
) : r ? /* @__PURE__ */ e.jsx(
|
|
977
918
|
"button",
|
|
978
919
|
{
|
|
979
|
-
className:
|
|
920
|
+
className: N(l, "cursor-pointer hover:opacity-70"),
|
|
980
921
|
"data-testid": o,
|
|
981
922
|
type: "button",
|
|
982
|
-
onClick: (
|
|
983
|
-
|
|
923
|
+
onClick: (u) => {
|
|
924
|
+
u.stopPropagation(), r();
|
|
984
925
|
},
|
|
985
|
-
children:
|
|
926
|
+
children: c
|
|
986
927
|
}
|
|
987
|
-
) : /* @__PURE__ */ e.jsx("div", { className: l, "data-testid": o, children:
|
|
988
|
-
/* @__PURE__ */ e.jsx(
|
|
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
|
|
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
|
|
938
|
+
function Ze({
|
|
998
939
|
comment: s,
|
|
999
940
|
className: t
|
|
1000
941
|
}) {
|
|
1001
|
-
var
|
|
1002
|
-
const [a] = H(), [
|
|
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:
|
|
945
|
+
/* @__PURE__ */ e.jsxs("div", { className: N("flex items-center gap-6", t), children: [
|
|
1005
946
|
/* @__PURE__ */ e.jsx(
|
|
1006
|
-
|
|
947
|
+
W,
|
|
1007
948
|
{
|
|
1008
|
-
count:
|
|
1009
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
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:
|
|
953
|
+
to: p ? l : void 0
|
|
1013
954
|
}
|
|
1014
955
|
),
|
|
1015
956
|
/* @__PURE__ */ e.jsx(
|
|
1016
|
-
|
|
957
|
+
W,
|
|
1017
958
|
{
|
|
1018
|
-
count:
|
|
1019
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
959
|
+
count: d,
|
|
960
|
+
icon: /* @__PURE__ */ e.jsx(Se, { size: 16, strokeWidth: 1.5 }),
|
|
1020
961
|
label: "Likes",
|
|
1021
|
-
onClick:
|
|
962
|
+
onClick: h ? () => r(!0) : void 0
|
|
1022
963
|
}
|
|
1023
964
|
),
|
|
1024
965
|
/* @__PURE__ */ e.jsx(
|
|
1025
|
-
|
|
966
|
+
W,
|
|
1026
967
|
{
|
|
1027
|
-
className:
|
|
1028
|
-
count:
|
|
1029
|
-
icon: /* @__PURE__ */ e.jsx(
|
|
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:
|
|
972
|
+
onClick: f ? () => o(!0) : void 0
|
|
1032
973
|
}
|
|
1033
974
|
)
|
|
1034
975
|
] }),
|
|
1035
976
|
/* @__PURE__ */ e.jsx(
|
|
1036
|
-
|
|
977
|
+
Pt,
|
|
1037
978
|
{
|
|
1038
979
|
comment: s,
|
|
1039
|
-
open:
|
|
1040
|
-
onOpenChange:
|
|
980
|
+
open: n,
|
|
981
|
+
onOpenChange: r
|
|
1041
982
|
}
|
|
1042
983
|
),
|
|
1043
984
|
/* @__PURE__ */ e.jsx(
|
|
1044
|
-
|
|
985
|
+
It,
|
|
1045
986
|
{
|
|
1046
987
|
comment: s,
|
|
1047
|
-
open:
|
|
988
|
+
open: i,
|
|
1048
989
|
onOpenChange: o
|
|
1049
990
|
}
|
|
1050
991
|
)
|
|
1051
992
|
] });
|
|
1052
993
|
}
|
|
1053
|
-
function
|
|
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
|
|
1063
|
-
var
|
|
1064
|
-
const [
|
|
1065
|
-
return /* @__PURE__ */ e.jsxs("div", { className: `flex w-full flex-row ${
|
|
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: (
|
|
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: (
|
|
1014
|
+
memberId: (f = s.member) == null ? void 0 : f.id
|
|
1074
1015
|
}
|
|
1075
1016
|
),
|
|
1076
|
-
/* @__PURE__ */ e.jsx(
|
|
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
|
-
|
|
1027
|
+
Ye,
|
|
1087
1028
|
{
|
|
1088
|
-
canComment: (
|
|
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: (
|
|
1092
|
-
memberName: (
|
|
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
|
-
|
|
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:
|
|
1104
|
-
onClick: (
|
|
1105
|
-
|
|
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(
|
|
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(
|
|
1114
|
-
/* @__PURE__ */ e.jsx(
|
|
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(
|
|
1118
|
-
/* @__PURE__ */ e.jsx(
|
|
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
|
-
|
|
1063
|
+
Ze,
|
|
1123
1064
|
{
|
|
1124
1065
|
comment: s
|
|
1125
1066
|
}
|
|
1126
1067
|
),
|
|
1127
1068
|
/* @__PURE__ */ e.jsx(
|
|
1128
|
-
|
|
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((
|
|
1136
|
-
|
|
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:
|
|
1079
|
+
comment: j,
|
|
1139
1080
|
isReply: !0,
|
|
1140
|
-
selectedCommentId:
|
|
1081
|
+
selectedCommentId: n
|
|
1141
1082
|
},
|
|
1142
|
-
|
|
1083
|
+
j.id
|
|
1143
1084
|
)) })
|
|
1144
1085
|
]
|
|
1145
1086
|
}
|
|
1146
1087
|
) })
|
|
1147
1088
|
] });
|
|
1148
1089
|
}
|
|
1149
|
-
const
|
|
1090
|
+
const Et = ({
|
|
1150
1091
|
selectedComment: s,
|
|
1151
1092
|
replies: t,
|
|
1152
1093
|
selectedCommentId: a,
|
|
1153
|
-
fetchNextPage:
|
|
1154
|
-
hasNextPage:
|
|
1155
|
-
isFetchingNextPage:
|
|
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
|
-
|
|
1101
|
+
Je,
|
|
1161
1102
|
{
|
|
1162
1103
|
comment: o,
|
|
1163
1104
|
isSelectedComment: !0,
|
|
1164
1105
|
selectedCommentId: a
|
|
1165
1106
|
}
|
|
1166
1107
|
),
|
|
1167
|
-
|
|
1168
|
-
|
|
1108
|
+
r && /* @__PURE__ */ e.jsx("div", { className: "flex justify-center pb-4", children: /* @__PURE__ */ e.jsx(
|
|
1109
|
+
C,
|
|
1169
1110
|
{
|
|
1170
|
-
disabled:
|
|
1111
|
+
disabled: i,
|
|
1171
1112
|
variant: "outline",
|
|
1172
|
-
onClick: () =>
|
|
1173
|
-
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
|
-
},
|
|
1121
|
+
}, Lt = ({
|
|
1181
1122
|
commentId: s,
|
|
1182
1123
|
open: t,
|
|
1183
1124
|
onOpenChange: a
|
|
1184
1125
|
}) => {
|
|
1185
|
-
var
|
|
1126
|
+
var g;
|
|
1186
1127
|
const {
|
|
1187
|
-
data:
|
|
1188
|
-
isLoading:
|
|
1189
|
-
isError:
|
|
1128
|
+
data: n,
|
|
1129
|
+
isLoading: r,
|
|
1130
|
+
isError: i,
|
|
1190
1131
|
fetchNextPage: o,
|
|
1191
1132
|
hasNextPage: l,
|
|
1192
|
-
isFetchingNextPage:
|
|
1193
|
-
} =
|
|
1133
|
+
isFetchingNextPage: c
|
|
1134
|
+
} = wt(s ?? "", {
|
|
1194
1135
|
enabled: t && !!s
|
|
1195
|
-
}), { data:
|
|
1136
|
+
}), { data: d, isLoading: u, isError: p } = vt(s ?? "", {
|
|
1196
1137
|
enabled: t && !!s
|
|
1197
|
-
}),
|
|
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
|
-
(
|
|
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:
|
|
1204
|
-
|
|
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
|
-
|
|
1147
|
+
m.post.feature_image && /* @__PURE__ */ e.jsx(
|
|
1207
1148
|
"img",
|
|
1208
1149
|
{
|
|
1209
|
-
alt:
|
|
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:
|
|
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:
|
|
1218
|
-
|
|
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(
|
|
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(
|
|
1164
|
+
children: /* @__PURE__ */ e.jsx(Re, {})
|
|
1224
1165
|
}
|
|
1225
1166
|
) }) : /* @__PURE__ */ e.jsx(
|
|
1226
|
-
|
|
1167
|
+
Et,
|
|
1227
1168
|
{
|
|
1228
1169
|
fetchNextPage: o,
|
|
1229
1170
|
hasNextPage: l,
|
|
1230
|
-
isFetchingNextPage:
|
|
1231
|
-
replies:
|
|
1232
|
-
selectedComment:
|
|
1171
|
+
isFetchingNextPage: c,
|
|
1172
|
+
replies: b,
|
|
1173
|
+
selectedComment: m,
|
|
1233
1174
|
selectedCommentId: s ?? ""
|
|
1234
1175
|
}
|
|
1235
1176
|
) })
|
|
1236
1177
|
] }) });
|
|
1237
|
-
},
|
|
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
|
|
1190
|
+
function Dt({
|
|
1250
1191
|
items: s,
|
|
1251
1192
|
totalItems: t,
|
|
1252
1193
|
hasNextPage: a,
|
|
1253
|
-
isFetchingNextPage:
|
|
1254
|
-
fetchNextPage:
|
|
1255
|
-
|
|
1256
|
-
|
|
1194
|
+
isFetchingNextPage: n,
|
|
1195
|
+
fetchNextPage: r,
|
|
1196
|
+
resetKey: i,
|
|
1197
|
+
onAddFilter: o,
|
|
1198
|
+
isLoading: l
|
|
1257
1199
|
}) {
|
|
1258
|
-
const
|
|
1259
|
-
if (
|
|
1260
|
-
const
|
|
1261
|
-
|
|
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
|
|
1266
|
-
if (
|
|
1267
|
-
const
|
|
1268
|
-
if (
|
|
1269
|
-
const
|
|
1270
|
-
x
|
|
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
|
-
|
|
1214
|
+
b(!1), j(null);
|
|
1273
1215
|
} else
|
|
1274
|
-
|
|
1275
|
-
}, [
|
|
1276
|
-
const { visibleItems:
|
|
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:
|
|
1220
|
+
totalItems: d,
|
|
1279
1221
|
hasNextPage: a,
|
|
1280
|
-
isFetchingNextPage:
|
|
1281
|
-
fetchNextPage:
|
|
1282
|
-
parentRef:
|
|
1222
|
+
isFetchingNextPage: n,
|
|
1223
|
+
fetchNextPage: r,
|
|
1224
|
+
parentRef: c
|
|
1283
1225
|
});
|
|
1284
|
-
return /* @__PURE__ */ e.jsxs("div", { ref:
|
|
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(
|
|
1292
|
-
|
|
1293
|
-
var
|
|
1294
|
-
return
|
|
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
|
-
...
|
|
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
|
-
|
|
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: (
|
|
1309
|
-
isHidden:
|
|
1310
|
-
memberId: (
|
|
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
|
-
|
|
1257
|
+
Ye,
|
|
1316
1258
|
{
|
|
1317
|
-
canComment: (
|
|
1318
|
-
createdAt:
|
|
1319
|
-
isHidden:
|
|
1320
|
-
memberId: (
|
|
1321
|
-
memberName: (
|
|
1322
|
-
postTitle: (
|
|
1323
|
-
onAuthorClick: (
|
|
1324
|
-
onPostClick: (
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
1336
|
-
onClick: (
|
|
1337
|
-
|
|
1277
|
+
to: de(h, x.in_reply_to_id || x.parent_id) || "",
|
|
1278
|
+
onClick: (ss) => {
|
|
1279
|
+
ss.stopPropagation();
|
|
1338
1280
|
},
|
|
1339
|
-
children:
|
|
1281
|
+
children: x.in_reply_to_snippet
|
|
1340
1282
|
}
|
|
1341
1283
|
)
|
|
1342
1284
|
] }),
|
|
1343
|
-
/* @__PURE__ */ e.jsx(
|
|
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
|
-
|
|
1346
|
-
/* @__PURE__ */ e.jsx(
|
|
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
|
-
|
|
1350
|
-
/* @__PURE__ */ e.jsx(
|
|
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
|
-
|
|
1296
|
+
Ze,
|
|
1355
1297
|
{
|
|
1356
1298
|
className: "ml-2",
|
|
1357
|
-
comment:
|
|
1299
|
+
comment: x
|
|
1358
1300
|
}
|
|
1359
1301
|
),
|
|
1360
1302
|
/* @__PURE__ */ e.jsx(
|
|
1361
|
-
|
|
1303
|
+
Xe,
|
|
1362
1304
|
{
|
|
1363
|
-
comment:
|
|
1305
|
+
comment: x
|
|
1364
1306
|
}
|
|
1365
1307
|
)
|
|
1366
1308
|
] })
|
|
1367
1309
|
] })
|
|
1368
1310
|
] }),
|
|
1369
|
-
/* @__PURE__ */ e.jsx("div", { children: (
|
|
1311
|
+
/* @__PURE__ */ e.jsx("div", { children: (ve = x.post) != null && ve.feature_image ? /* @__PURE__ */ e.jsx(
|
|
1370
1312
|
"img",
|
|
1371
1313
|
{
|
|
1372
|
-
alt:
|
|
1373
|
-
className: `hidden aspect-video w-36 rounded object-cover lg:block ${
|
|
1374
|
-
src:
|
|
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
|
-
|
|
1321
|
+
w
|
|
1380
1322
|
);
|
|
1381
1323
|
}),
|
|
1382
|
-
/* @__PURE__ */ e.jsx(
|
|
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
|
-
|
|
1330
|
+
Lt,
|
|
1388
1331
|
{
|
|
1389
|
-
commentId:
|
|
1390
|
-
open:
|
|
1391
|
-
onOpenChange:
|
|
1332
|
+
commentId: g,
|
|
1333
|
+
open: m,
|
|
1334
|
+
onOpenChange: I
|
|
1392
1335
|
}
|
|
1393
1336
|
)
|
|
1394
1337
|
] });
|
|
1395
1338
|
}
|
|
1396
|
-
const
|
|
1397
|
-
function
|
|
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
|
|
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
|
|
1420
|
-
a.operator === "contains" ? t.push(`html:~'${
|
|
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
|
|
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
|
|
1386
|
+
function Ft(s) {
|
|
1444
1387
|
const t = [];
|
|
1445
|
-
for (const [a,
|
|
1446
|
-
if (!
|
|
1388
|
+
for (const [a, n] of s.entries()) {
|
|
1389
|
+
if (!es.includes(a) || !n)
|
|
1447
1390
|
continue;
|
|
1448
|
-
const
|
|
1449
|
-
|
|
1391
|
+
const r = $t(n);
|
|
1392
|
+
r && t.push({
|
|
1450
1393
|
id: a,
|
|
1451
1394
|
field: a,
|
|
1452
|
-
operator:
|
|
1453
|
-
values: [
|
|
1395
|
+
operator: r.operator,
|
|
1396
|
+
values: [r.value]
|
|
1454
1397
|
});
|
|
1455
1398
|
}
|
|
1456
1399
|
return t;
|
|
1457
1400
|
}
|
|
1458
|
-
function
|
|
1401
|
+
function zt(s) {
|
|
1459
1402
|
const t = new URLSearchParams();
|
|
1460
1403
|
for (const a of s)
|
|
1461
|
-
if (
|
|
1462
|
-
const
|
|
1463
|
-
t.set(a.field,
|
|
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
|
|
1468
|
-
const [s, t] = H(), a =
|
|
1469
|
-
const
|
|
1470
|
-
t(
|
|
1471
|
-
}, [a, t]),
|
|
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]),
|
|
1474
|
-
return { filters: a, nql:
|
|
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
|
|
1496
|
-
var
|
|
1497
|
-
const { filters: s, nql: t, setFilters: a, clearFilters:
|
|
1498
|
-
a((
|
|
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:
|
|
1503
|
-
isFetchingNextPage:
|
|
1504
|
-
isRefetching:
|
|
1505
|
-
fetchNextPage:
|
|
1506
|
-
hasNextPage:
|
|
1507
|
-
} =
|
|
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
|
-
}),
|
|
1511
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1512
|
-
/* @__PURE__ */ e.jsx(
|
|
1513
|
-
|
|
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(
|
|
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(
|
|
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
|
-
|
|
1449
|
+
Dt,
|
|
1528
1450
|
{
|
|
1529
|
-
fetchNextPage:
|
|
1530
|
-
hasNextPage:
|
|
1531
|
-
isFetchingNextPage:
|
|
1532
|
-
isLoading:
|
|
1451
|
+
fetchNextPage: p,
|
|
1452
|
+
hasNextPage: h,
|
|
1453
|
+
isFetchingNextPage: d,
|
|
1454
|
+
isLoading: c && !d,
|
|
1533
1455
|
items: (o == null ? void 0 : o.comments) ?? [],
|
|
1534
|
-
|
|
1535
|
-
|
|
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
|
-
|
|
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
|
-
|
|
1463
|
+
Te,
|
|
1541
1464
|
{
|
|
1542
1465
|
title: "No comments yet",
|
|
1543
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1466
|
+
children: /* @__PURE__ */ e.jsx(Re, {})
|
|
1544
1467
|
}
|
|
1545
1468
|
) }) })
|
|
1546
1469
|
] });
|
|
1547
1470
|
};
|
|
1548
1471
|
export {
|
|
1549
|
-
|
|
1472
|
+
aa as default
|
|
1550
1473
|
};
|
|
1551
|
-
//# sourceMappingURL=comments-
|
|
1474
|
+
//# sourceMappingURL=comments-Cvt31uBs.mjs.map
|