ghost 6.21.0 → 6.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/components/tryghost-i18n-6.21.2.tgz +0 -0
  2. package/components/{tryghost-parse-email-address-6.21.0.tgz → tryghost-parse-email-address-6.21.2.tgz} +0 -0
  3. package/content/themes/casper/LICENSE +1 -1
  4. package/content/themes/casper/README.md +7 -2
  5. package/content/themes/casper/assets/built/casper.js +1 -2
  6. package/content/themes/casper/assets/built/casper.js.map +1 -1
  7. package/content/themes/casper/assets/built/global.css +1 -2
  8. package/content/themes/casper/assets/built/global.css.map +1 -1
  9. package/content/themes/casper/assets/built/screen.css +1 -2
  10. package/content/themes/casper/assets/built/screen.css.map +1 -1
  11. package/content/themes/casper/assets/css/global.css +4 -0
  12. package/content/themes/casper/default.hbs +5 -5
  13. package/content/themes/casper/error-404.hbs +1 -1
  14. package/content/themes/casper/error.hbs +2 -2
  15. package/content/themes/casper/gulpfile.js +13 -2
  16. package/content/themes/casper/locales/context.json +112 -0
  17. package/content/themes/casper/locales/de-CH.json +112 -0
  18. package/content/themes/casper/locales/de.json +112 -0
  19. package/content/themes/casper/locales/en.json +112 -0
  20. package/content/themes/casper/locales/fr.json +112 -0
  21. package/content/themes/casper/locales/ga.json +112 -0
  22. package/content/themes/casper/locales/gd.json +112 -0
  23. package/content/themes/casper/locales/nl.json +112 -0
  24. package/content/themes/casper/locales/pt-BR.json +112 -0
  25. package/content/themes/casper/locales/sv.json +112 -0
  26. package/content/themes/casper/locales/uk.json +112 -0
  27. package/content/themes/casper/locales/zh.json +112 -0
  28. package/content/themes/casper/package.json +12 -11
  29. package/content/themes/casper/partials/post-card.hbs +4 -4
  30. package/content/themes/casper/post.hbs +4 -4
  31. package/content/themes/casper/tag.hbs +1 -1
  32. package/content/themes/source/LICENSE +1 -1
  33. package/content/themes/source/README.md +4 -1
  34. package/content/themes/source/assets/built/screen.css +1 -2
  35. package/content/themes/source/assets/built/screen.css.map +1 -1
  36. package/content/themes/source/assets/built/source.js +1 -2
  37. package/content/themes/source/assets/built/source.js.map +1 -1
  38. package/content/themes/source/assets/css/screen.css +18 -16
  39. package/content/themes/source/default.hbs +1 -1
  40. package/content/themes/source/gulpfile.js +5 -3
  41. package/content/themes/source/locales/context.json +112 -0
  42. package/content/themes/source/locales/de-CH.json +112 -0
  43. package/content/themes/source/locales/de.json +112 -0
  44. package/content/themes/source/locales/en.json +112 -0
  45. package/content/themes/source/locales/fr.json +112 -0
  46. package/content/themes/source/locales/ga.json +112 -0
  47. package/content/themes/source/locales/gd.json +112 -0
  48. package/content/themes/source/locales/nl.json +112 -0
  49. package/content/themes/source/locales/pt-BR.json +112 -0
  50. package/content/themes/source/locales/sv.json +112 -0
  51. package/content/themes/source/locales/uk.json +112 -0
  52. package/content/themes/source/locales/zh.json +112 -0
  53. package/content/themes/source/package.json +13 -11
  54. package/content/themes/source/partials/components/featured.hbs +1 -1
  55. package/content/themes/source/partials/components/footer.hbs +1 -1
  56. package/content/themes/source/partials/components/header-content.hbs +1 -1
  57. package/content/themes/source/partials/components/navigation.hbs +5 -5
  58. package/content/themes/source/partials/components/post-list.hbs +7 -7
  59. package/content/themes/source/partials/email-subscription.hbs +5 -5
  60. package/content/themes/source/partials/lightbox.hbs +6 -6
  61. package/content/themes/source/partials/post-card.hbs +1 -1
  62. package/content/themes/source/partials/search-toggle.hbs +1 -1
  63. package/content/themes/source/post.hbs +2 -2
  64. package/core/built/admin/assets/{PolarAngleAxis-a31TecIQ.js → PolarAngleAxis-D8t9UwHk.js} +1 -1
  65. package/core/built/admin/assets/{_baseAssignValue-Dw5pcaUJ.js → _baseAssignValue-DPyNU5o6.js} +1 -1
  66. package/core/built/admin/assets/{a-large-small-Cf_hUupE.js → a-large-small-BijOKCoa.js} +1 -1
  67. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +1 -1
  68. package/core/built/admin/assets/admin-x-settings/{code-editor-view-C1ZFtR6M.mjs → code-editor-view-DJsXOcZ2.mjs} +2 -2
  69. package/core/built/admin/assets/admin-x-settings/{index-zyVbQw03.mjs → index-BnhIi5NU.mjs} +2 -2
  70. package/core/built/admin/assets/admin-x-settings/{index-D96qFjP9.mjs → index-CnwJhGbs.mjs} +2 -2
  71. package/core/built/admin/assets/admin-x-settings/{index-ILVAmH8Q.mjs → index-DaGaokMn.mjs} +1067 -1063
  72. package/core/built/admin/assets/admin-x-settings/{modals-BbDVa22r.mjs → modals-D02VJnTV.mjs} +2838 -2840
  73. package/core/built/admin/assets/{at-sign-DyMz5le1.js → at-sign-_JfhlimD.js} +1 -1
  74. package/core/built/admin/assets/{audience-BevM-Udw.js → audience-BdrhpNZ4.js} +1 -1
  75. package/core/built/admin/assets/{avatar-flipboard-DiGYhH_s.js → avatar-flipboard-BdmM8eOn.js} +1 -1
  76. package/core/built/admin/assets/{bluesky-sharing-Dj4VOEDi.js → bluesky-sharing-yeM8KkY8.js} +1 -1
  77. package/core/built/admin/assets/{chart-BDdnkPgC.js → chart-CULaDoVB.js} +1 -1
  78. package/core/built/admin/assets/{chunk.138.5c4b0d0ae3f21c9c726d.js → chunk.482.c45c97fe666cd1a6b060.js} +4 -4
  79. package/core/built/admin/assets/{chunk.524.54ba5b50c191627c46f2.js → chunk.524.7fc2692374515780e66e.js} +4 -4
  80. package/core/built/admin/assets/{chunk.582.3232d44081d84d135e3d.js → chunk.582.fd8c4fa8e637e2d5611e.js} +8 -8
  81. package/core/built/admin/assets/{code-editor-view-V0wBeYuE.js → code-editor-view-UA2xKjk1.js} +1 -1
  82. package/core/built/admin/assets/{comments-CqurDRGu.js → comments-DoNjlMYA.js} +1 -1
  83. package/core/built/admin/assets/{content-helpers-C8lVEp2H.js → content-helpers-BRzxAgjP.js} +1 -1
  84. package/core/built/admin/assets/{copy-BdseBMKx.js → copy-CbX-_mHj.js} +1 -1
  85. package/core/built/admin/assets/{data-list--5Xfh5gm.js → data-list-nZOiCWV9.js} +1 -1
  86. package/core/built/admin/assets/{deleted-feed-item-Bmxp6PAR.js → deleted-feed-item-DjkZpKDC.js} +1 -1
  87. package/core/built/admin/assets/{edit-profile-Bi-G8vrq.js → edit-profile-BY_oJrQn.js} +1 -1
  88. package/core/built/admin/assets/{empty-indicator-C1cLHSRX.js → empty-indicator-DoxAratw.js} +1 -1
  89. package/core/built/admin/assets/{en-DPpVO1wK.js → en-B9ScC5j9.js} +1 -1
  90. package/core/built/admin/assets/{feed-lCu_EJ0a.js → feed-BsgqABLQ.js} +1 -1
  91. package/core/built/admin/assets/{filters-BYYV0fmK.js → filters-CscMb_Gl.js} +1 -1
  92. package/core/built/admin/assets/{gh-chart-BYWaeEuY.js → gh-chart-GokHrG5_.js} +1 -1
  93. package/core/built/admin/assets/{ghost-565670d46ad5b30935426b5dfa95bc81.js → ghost-d1843f84a9476ccbdf2a350848ac88aa.js} +2 -2
  94. package/core/built/admin/assets/{growth-DXHnB1EQ.js → growth-CKOWA1_V.js} +1 -1
  95. package/core/built/admin/assets/{hash-tZATAzZa.js → hash-twG7-iIB.js} +1 -1
  96. package/core/built/admin/assets/{inbox-B-LuWyHY.js → inbox-BdkIJbSq.js} +1 -1
  97. package/core/built/admin/assets/{index-BDrJ3N3y.js → index-B7OzWwwP.js} +1 -1
  98. package/core/built/admin/assets/{index-B8tGZsrG.js → index-BFySh9qo.js} +1 -1
  99. package/core/built/admin/assets/{index-EiGE3Aiy.js → index-BOWUajrT.js} +1 -1
  100. package/core/built/admin/assets/{index-ig4J4RpO.js → index-BQLCImHQ.js} +1 -1
  101. package/core/built/admin/assets/{index-BmKPrbBK.js → index-C398bG84.js} +1 -1
  102. package/core/built/admin/assets/{index-BX0_v5NB.js → index-C5YCjM6z.js} +1 -1
  103. package/core/built/admin/assets/{index-DEwhVcR5.js → index-CHpxzPRR.js} +1 -1
  104. package/core/built/admin/assets/{index-CX1A5TwO.js → index-CM-iA6b-.js} +3 -3
  105. package/core/built/admin/assets/{index-9bj69FKq.js → index-CgCHCdle.js} +1 -1
  106. package/core/built/admin/assets/{index-BocVu6WC.js → index-Cw441AFq.js} +1 -1
  107. package/core/built/admin/assets/{index-jHIJgh6L.js → index-D9S88kRl.js} +1 -1
  108. package/core/built/admin/assets/{index-CqvBC0jL.js → index-DbgA2vK8.js} +1 -1
  109. package/core/built/admin/assets/{index-2H-Jp89Z.js → index-ghPdV1ln.js} +1 -1
  110. package/core/built/admin/assets/{index-BcOzgmTC.js → index-tX0pajfP.js} +1 -1
  111. package/core/built/admin/assets/{index-BxVUX0dN.js → index-upXLfQxx.js} +1 -1
  112. package/core/built/admin/assets/{koenig-lexical-BdX9U-oB.js → koenig-lexical-GZS7bHDz.js} +1 -1
  113. package/core/built/admin/assets/{kpi-card-DQ1AbLJB.js → kpi-card-B6fmS7IH.js} +1 -1
  114. package/core/built/admin/assets/{kpis-vcbQvnLh.js → kpis-B-JXQ-4C.js} +1 -1
  115. package/core/built/admin/assets/{label-CNmRJkLy.js → label-ChHoKmj0.js} +1 -1
  116. package/core/built/admin/assets/{links-BE51SJxR.js → links-DQSOljcR.js} +1 -1
  117. package/core/built/admin/assets/{list-filter-BwnQ0Xlp.js → list-filter-cWuCDOLb.js} +1 -1
  118. package/core/built/admin/assets/{loader-circle-CcLEGvsN.js → loader-circle-B5ILzHHu.js} +1 -1
  119. package/core/built/admin/assets/{lucide-react-DHFgHS1l.js → lucide-react-CM0rB7CS.js} +1 -1
  120. package/core/built/admin/assets/{main-layout-DsxBNVo-.js → main-layout-BE7vZmy0.js} +1 -1
  121. package/core/built/admin/assets/{members-3okEkvWv.js → members-C10Z_BuG.js} +1 -1
  122. package/core/built/admin/assets/{message-square-text-BkERj4f5.js → message-square-text-DVZjnBBF.js} +1 -1
  123. package/core/built/admin/assets/{minus-C6oMPJo2.js → minus-BWrVDnd-.js} +1 -1
  124. package/core/built/admin/assets/{modals-CfUec0CL.js → modals-Bx7uDUHI.js} +15 -15
  125. package/core/built/admin/assets/{moderation-DEHUqi1e.js → moderation-DwlKZoB5.js} +1 -1
  126. package/core/built/admin/assets/{newsletter-Cp-39ksw.js → newsletter-DkOl42UB.js} +1 -1
  127. package/core/built/admin/assets/{newsletters-Bj58VQa2.js → newsletters-DNt9qd4h.js} +1 -1
  128. package/core/built/admin/assets/{note-9ysQWJz6.js → note-C-BLqULD.js} +1 -1
  129. package/core/built/admin/assets/{offers-DORdeAfE.js → offers-CU0KFuyW.js} +1 -1
  130. package/core/built/admin/assets/{overview-aZmI_71o.js → overview-DAEelSKq.js} +1 -1
  131. package/core/built/admin/assets/{pagemenu-DK1tbdsq.js → pagemenu-Cr7_YYR8.js} +1 -1
  132. package/core/built/admin/assets/{post-analytics-context-D8nk51yA.js → post-analytics-context-B2ytyOU0.js} +1 -1
  133. package/core/built/admin/assets/{post-analytics-header-qh1LEasb.js → post-analytics-header-CvR25xxU.js} +1 -1
  134. package/core/built/admin/assets/{post-analytics-HdZI-1J7.js → post-analytics-qpfoP-57.js} +1 -1
  135. package/core/built/admin/assets/{post-share-modal-CvTf3PP9.js → post-share-modal-DDhiG0X4.js} +1 -1
  136. package/core/built/admin/assets/{posts-mIxckqHa.js → posts-DTy4lguT.js} +1 -1
  137. package/core/built/admin/assets/{referrers-qhD64pmp.js → referrers-BzKz9fT9.js} +1 -1
  138. package/core/built/admin/assets/{repeat-Idtsb62O.js → repeat-C_xWSLK1.js} +1 -1
  139. package/core/built/admin/assets/{reply-DXS-C-Rk.js → reply-CXnb6Juu.js} +1 -1
  140. package/core/built/admin/assets/{select-CeD8IhXy.js → select-WZUCQgjI.js} +1 -1
  141. package/core/built/admin/assets/{settings-BHfStwmS.js → settings-BC82mM6N.js} +1 -1
  142. package/core/built/admin/assets/{settings-M0QTt_tT.js → settings-EbntXZw9.js} +7 -7
  143. package/core/built/admin/assets/{sort-button-BoTFsBYE.js → sort-button-CFYf_NOQ.js} +1 -1
  144. package/core/built/admin/assets/{source-icon-opy8g_Nk.js → source-icon-xS8eeWX-.js} +1 -1
  145. package/core/built/admin/assets/{sprout-BKOFkdV8.js → sprout-CLmu2pln.js} +1 -1
  146. package/core/built/admin/assets/{square-BjZk7vJx.js → square-D0Y5-h0C.js} +1 -1
  147. package/core/built/admin/assets/{stats-DXXxmfRV.js → stats-B5O9DjYi.js} +1 -1
  148. package/core/built/admin/assets/{stats-view-D_5J0Nf7.js → stats-view-Cr6M1ycv.js} +1 -1
  149. package/core/built/admin/assets/{step-1-BcaR_MDC.js → step-1-DGbl6AAj.js} +1 -1
  150. package/core/built/admin/assets/{step-2-BR0jqEO_.js → step-2-Rf8oissi.js} +1 -1
  151. package/core/built/admin/assets/{step-3-CMPME0ky.js → step-3-tMPmbeBc.js} +1 -1
  152. package/core/built/admin/assets/{table-CwbnKMYe.js → table-CXo8NKU2.js} +1 -1
  153. package/core/built/admin/assets/{tabs-hfT89L_O.js → tabs-BMk71Tf2.js} +1 -1
  154. package/core/built/admin/assets/{tags-BSwYlj_e.js → tags-CSl0BjsA.js} +1 -1
  155. package/core/built/admin/assets/{tags-C3b5AHTm.js → tags-CqHx8i6Q.js} +1 -1
  156. package/core/built/admin/assets/{ticket-BnxPoED1.js → ticket-BtYGyQvH.js} +1 -1
  157. package/core/built/admin/assets/{tiers-DHKKzaBK.js → tiers-CPwRaPSt.js} +1 -1
  158. package/core/built/admin/assets/{toggle-group-U-Oqm2AA.js → toggle-group-QFge4qQs.js} +1 -1
  159. package/core/built/admin/assets/{topic-filter-28veMlW4.js → topic-filter-DnYtZ5e5.js} +1 -1
  160. package/core/built/admin/assets/{trash-D6TuYuIs.js → trash-B4ncKmRu.js} +1 -1
  161. package/core/built/admin/assets/{use-growth-stats-COmCRCzY.js → use-growth-stats-eFO-f1o1.js} +1 -1
  162. package/core/built/admin/assets/{use-infinite-virtual-scroll-mIEgtLoq.js → use-infinite-virtual-scroll-DTqnBtHM.js} +1 -1
  163. package/core/built/admin/assets/{use-scroll-restoration-CXVseKDj.js → use-scroll-restoration-o1DrSdlb.js} +1 -1
  164. package/core/built/admin/assets/{use-simple-pagination-5-LKveLR.js → use-simple-pagination-BsBGNcxc.js} +1 -1
  165. package/core/built/admin/assets/{user-plus-CKQ-d0d4.js → user-plus-BS8SGBmk.js} +1 -1
  166. package/core/built/admin/assets/{user-round-check-BWc7Da4S.js → user-round-check-BgOPeBFs.js} +1 -1
  167. package/core/built/admin/assets/{wallet-cards-BlDtHc6_.js → wallet-cards-Be7G77lR.js} +1 -1
  168. package/core/built/admin/assets/{web-Bvvtl44p.js → web-BNs01IAt.js} +1 -1
  169. package/core/built/admin/index.html +5 -5
  170. package/core/frontend/helpers/cancel_link.js +2 -2
  171. package/core/server/api/endpoints/authors-public.js +3 -3
  172. package/core/server/api/endpoints/files.js +2 -1
  173. package/core/server/api/endpoints/pages-public.js +3 -3
  174. package/core/server/api/endpoints/posts-public.js +3 -3
  175. package/core/server/api/endpoints/users.js +6 -2
  176. package/core/server/api/endpoints/utils/api-filter-utils.js +22 -0
  177. package/core/server/api/endpoints/utils/api-filter-utils.ts +22 -0
  178. package/core/server/lib/lexical.js +2 -1
  179. package/core/server/lib/mobiledoc.js +1 -1
  180. package/core/server/lib/request-external.js +78 -2
  181. package/core/server/services/email-service/email-templates/partials/styles.hbs +3 -1
  182. package/core/server/services/koenig/node-renderers/image-renderer.js +80 -10
  183. package/core/server/services/koenig/render-utils/srcset-attribute.js +15 -3
  184. package/core/server/services/members/members-api/controllers/router-controller.js +5 -5
  185. package/core/server/services/members/members-api/repositories/member-repository.js +1 -1
  186. package/core/server/services/members/members-api/utils/get-discount-window.js +70 -4
  187. package/core/server/services/members/members-api/utils/has-active-offer.js +10 -14
  188. package/core/server/services/oembed/oembed-service.js +9 -1
  189. package/core/server/services/offers/application/offer-mapper.js +48 -0
  190. package/core/server/services/offers/application/offers-api.js +2 -2
  191. package/core/shared/config/defaults.json +1 -1
  192. package/core/shared/labs.js +2 -1
  193. package/package.json +6 -6
  194. package/tsconfig.tsbuildinfo +1 -1
  195. package/yarn.lock +148 -16
  196. package/components/tryghost-i18n-6.21.0.tgz +0 -0
  197. package/core/server/api/endpoints/utils/public-endpoint-utils.js +0 -18
  198. package/core/server/api/endpoints/utils/public-endpoint-utils.ts +0 -17
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-9bj69FKq.js","./minus-C6oMPJo2.js","./deleted-feed-item-Bmxp6PAR.js","./trash-D6TuYuIs.js","./topic-filter-28veMlW4.js","./empty-indicator-C1cLHSRX.js","./inbox-B-LuWyHY.js","./feed-lCu_EJ0a.js","./hash-tZATAzZa.js","./note-9ysQWJz6.js","./index-BcOzgmTC.js","./at-sign-DyMz5le1.js","./user-round-check-BWc7Da4S.js","./reply-DXS-C-Rk.js","./index-CqvBC0jL.js","./sprout-BKOFkdV8.js","./index-BxVUX0dN.js","./tags-C3b5AHTm.js","./edit-profile-Bi-G8vrq.js","./label-CNmRJkLy.js","./tabs-hfT89L_O.js","./index-BX0_v5NB.js","./lucide-react-DHFgHS1l.js","./a-large-small-Cf_hUupE.js","./wallet-cards-BlDtHc6_.js","./list-filter-BwnQ0Xlp.js","./ticket-BnxPoED1.js","./loader-circle-CcLEGvsN.js","./message-square-text-BkERj4f5.js","./copy-BdseBMKx.js","./user-plus-CKQ-d0d4.js","./square-BjZk7vJx.js","./repeat-Idtsb62O.js","./settings-BHfStwmS.js","./index-jHIJgh6L.js","./toggle-group-U-Oqm2AA.js","./moderation-DEHUqi1e.js","./bluesky-sharing-Dj4VOEDi.js","./step-1-BcaR_MDC.js","./step-2-BR0jqEO_.js","./avatar-flipboard-DiGYhH_s.js","./step-3-CMPME0ky.js","./post-analytics-context-D8nk51yA.js","./posts-mIxckqHa.js","./post-analytics-HdZI-1J7.js","./main-layout-DsxBNVo-.js","./post-share-modal-CvTf3PP9.js","./overview-aZmI_71o.js","./growth-DXHnB1EQ.js","./source-icon-opy8g_Nk.js","./source-utils-B1S3ZHA2.js","./pagemenu-DK1tbdsq.js","./table-CwbnKMYe.js","./kpi-card-DQ1AbLJB.js","./post-analytics-header-qh1LEasb.js","./get-site-timezone-BDBAcjmq.js","./post-helpers-gInwAwEv.js","./currency-fEUUCkj0.js","./stats-DXXxmfRV.js","./data-list--5Xfh5gm.js","./links-BE51SJxR.js","./chart-BDdnkPgC.js","./_baseAssignValue-Dw5pcaUJ.js","./PolarAngleAxis-a31TecIQ.js","./kpis-vcbQvnLh.js","./gh-chart-BYWaeEuY.js","./web-Bvvtl44p.js","./select-CeD8IhXy.js","./en-DPpVO1wK.js","./filters-BYYV0fmK.js","./newsletter-Cp-39ksw.js","./use-simple-pagination-5-LKveLR.js","./tags-BSwYlj_e.js","./use-infinite-virtual-scroll-mIEgtLoq.js","./comments-CqurDRGu.js","./use-scroll-restoration-CXVseKDj.js","./index-ig4J4RpO.js","./members-3okEkvWv.js","./newsletters-Bj58VQa2.js","./offers-DORdeAfE.js","./tiers-DHKKzaBK.js","./index-DEwhVcR5.js","./stats-view-D_5J0Nf7.js","./audience-BevM-Udw.js","./use-growth-stats-COmCRCzY.js","./index-BDrJ3N3y.js","./content-helpers-C8lVEp2H.js","./index-B8tGZsrG.js","./sort-button-BoTFsBYE.js","./referrers-qhD64pmp.js","./index-BocVu6WC.js","./settings-M0QTt_tT.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CgCHCdle.js","./minus-BWrVDnd-.js","./deleted-feed-item-DjkZpKDC.js","./trash-B4ncKmRu.js","./topic-filter-DnYtZ5e5.js","./empty-indicator-DoxAratw.js","./inbox-BdkIJbSq.js","./feed-BsgqABLQ.js","./hash-twG7-iIB.js","./note-C-BLqULD.js","./index-tX0pajfP.js","./at-sign-_JfhlimD.js","./user-round-check-BgOPeBFs.js","./reply-CXnb6Juu.js","./index-DbgA2vK8.js","./sprout-CLmu2pln.js","./index-upXLfQxx.js","./tags-CqHx8i6Q.js","./edit-profile-BY_oJrQn.js","./label-ChHoKmj0.js","./tabs-BMk71Tf2.js","./index-C5YCjM6z.js","./lucide-react-CM0rB7CS.js","./a-large-small-BijOKCoa.js","./wallet-cards-Be7G77lR.js","./list-filter-cWuCDOLb.js","./ticket-BtYGyQvH.js","./loader-circle-B5ILzHHu.js","./message-square-text-DVZjnBBF.js","./copy-CbX-_mHj.js","./user-plus-BS8SGBmk.js","./square-D0Y5-h0C.js","./repeat-C_xWSLK1.js","./settings-BC82mM6N.js","./index-D9S88kRl.js","./toggle-group-QFge4qQs.js","./moderation-DwlKZoB5.js","./bluesky-sharing-yeM8KkY8.js","./step-1-DGbl6AAj.js","./step-2-Rf8oissi.js","./avatar-flipboard-BdmM8eOn.js","./step-3-tMPmbeBc.js","./post-analytics-context-B2ytyOU0.js","./posts-DTy4lguT.js","./post-analytics-qpfoP-57.js","./main-layout-BE7vZmy0.js","./post-share-modal-DDhiG0X4.js","./overview-DAEelSKq.js","./growth-CKOWA1_V.js","./source-icon-xS8eeWX-.js","./source-utils-B1S3ZHA2.js","./pagemenu-Cr7_YYR8.js","./table-CXo8NKU2.js","./kpi-card-B6fmS7IH.js","./post-analytics-header-CvR25xxU.js","./get-site-timezone-BDBAcjmq.js","./post-helpers-gInwAwEv.js","./currency-fEUUCkj0.js","./stats-B5O9DjYi.js","./data-list-nZOiCWV9.js","./links-DQSOljcR.js","./chart-CULaDoVB.js","./_baseAssignValue-DPyNU5o6.js","./PolarAngleAxis-D8t9UwHk.js","./kpis-B-JXQ-4C.js","./gh-chart-GokHrG5_.js","./web-BNs01IAt.js","./select-WZUCQgjI.js","./en-B9ScC5j9.js","./filters-CscMb_Gl.js","./newsletter-DkOl42UB.js","./use-simple-pagination-BsBGNcxc.js","./tags-CSl0BjsA.js","./use-infinite-virtual-scroll-DTqnBtHM.js","./comments-DoNjlMYA.js","./use-scroll-restoration-o1DrSdlb.js","./index-BQLCImHQ.js","./members-C10Z_BuG.js","./newsletters-DNt9qd4h.js","./offers-CU0KFuyW.js","./tiers-CPwRaPSt.js","./index-CHpxzPRR.js","./stats-view-Cr6M1ycv.js","./audience-BdrhpNZ4.js","./use-growth-stats-eFO-f1o1.js","./index-B7OzWwwP.js","./content-helpers-BRzxAgjP.js","./index-BFySh9qo.js","./sort-button-CFYf_NOQ.js","./referrers-BzKz9fT9.js","./index-Cw441AFq.js","./settings-EbntXZw9.js"])))=>i.map(i=>d[i]);
2
2
  function mR(e,t){for(var o=0;o<t.length;o++){const n=t[o];if(typeof n!="string"&&!Array.isArray(n)){for(const r in n)if(r!=="default"&&!(r in e)){const a=Object.getOwnPropertyDescriptor(n,r);a&&Object.defineProperty(e,r,a.get?a:{enumerable:!0,get:()=>n[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function o(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(r){if(r.ep)return;r.ep=!0;const a=o(r);fetch(r.href,a)}})();var _r0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function uu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function gR(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var o=function n(){var r=!1;try{r=this instanceof n}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(o,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}),o}var tb={exports:{}},Qc={},ob={exports:{}},z1={};/**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -597,7 +597,7 @@ _0.version="2.24.0";kU($1);_0.fn=g0;_0.min=fQ;_0.max=AQ;_0.now=hQ;_0.utc=Dt;_0.u
597
597
  * See the LICENSE file in the root directory of this source tree.
598
598
  */const lK=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],jd=K0("x",lK),H3=Ao("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:stroke-[1.5px]",{variants:{variant:{default:"bg-primary font-medium text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive font-medium text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background font-medium hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary font-medium text-secondary-foreground hover:bg-secondary/80 dark:bg-gray-925/70 dark:hover:bg-gray-900",ghost:"font-medium hover:bg-accent hover:text-accent-foreground",link:"font-medium text-primary underline-offset-4 hover:underline",dropdown:"border border-input bg-background hover:bg-accent hover:text-accent-foreground"},size:{default:"h-[34px] px-3 py-2",sm:"h-7 rounded-md px-3 text-xs [&_svg]:size-3",lg:"h-11 rounded-md px-8 text-md font-semibold",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),i1=p.forwardRef(({className:e,variant:t,size:o,asChild:n=!1,children:r,...a},i)=>{const l=n?ic:"button",z=t==="dropdown"?b.jsxs(b.Fragment,{children:[r,b.jsx(KG,{className:"!-ml-1 !-mr-0.5 size-4 !stroke-[2px] opacity-50",strokeWidth:2})]}):r;return b.jsx(l,{ref:i,className:R0(H3({variant:t,size:o,className:e})),...a,children:z})});i1.displayName="Button";function bK(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",t.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}const zK=e=>{switch(e){case"success":return OK;case"info":return AK;case"warning":return fK;case"error":return hK;default:return null}},uK=Array(12).fill(0),dK=({visible:e,className:t})=>l0.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},l0.createElement("div",{className:"sonner-spinner"},uK.map((o,n)=>l0.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),OK=l0.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l0.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),fK=l0.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},l0.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),AK=l0.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l0.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),hK=l0.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},l0.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),qK=l0.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},l0.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),l0.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),mK=()=>{const[e,t]=l0.useState(document.hidden);return l0.useEffect(()=>{const o=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),e};let Hz=1;class gK{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const o=this.subscribers.indexOf(t);this.subscribers.splice(o,1)}),this.publish=t=>{this.subscribers.forEach(o=>o(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var o;const{message:n,...r}=t,a=typeof t?.id=="number"||((o=t.id)==null?void 0:o.length)>0?t.id:Hz++,i=this.toasts.find(z=>z.id===a),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(z=>z.id===a?(this.publish({...z,...t,id:a,title:n}),{...z,...t,id:a,dismissible:l,title:n}):z):this.addToast({title:n,...r,dismissible:l,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:t,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(n=>n({id:o.id,dismiss:!0}))}),t),this.message=(t,o)=>this.create({...o,message:t}),this.error=(t,o)=>this.create({...o,message:t,type:"error"}),this.success=(t,o)=>this.create({...o,type:"success",message:t}),this.info=(t,o)=>this.create({...o,type:"info",message:t}),this.warning=(t,o)=>this.create({...o,type:"warning",message:t}),this.loading=(t,o)=>this.create({...o,type:"loading",message:t}),this.promise=(t,o)=>{if(!o)return;let n;o.loading!==void 0&&(n=this.create({...o,promise:t,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let a=n!==void 0,i;const l=r.then(async u=>{if(i=["resolve",u],l0.isValidElement(u))a=!1,this.create({id:n,type:"default",message:u});else if(vK(u)&&!u.ok){a=!1;const O=typeof o.error=="function"?await o.error(`HTTP error! status: ${u.status}`):o.error,h=typeof o.description=="function"?await o.description(`HTTP error! status: ${u.status}`):o.description,g=typeof O=="object"&&!l0.isValidElement(O)?O:{message:O};this.create({id:n,type:"error",description:h,...g})}else if(u instanceof Error){a=!1;const O=typeof o.error=="function"?await o.error(u):o.error,h=typeof o.description=="function"?await o.description(u):o.description,g=typeof O=="object"&&!l0.isValidElement(O)?O:{message:O};this.create({id:n,type:"error",description:h,...g})}else if(o.success!==void 0){a=!1;const O=typeof o.success=="function"?await o.success(u):o.success,h=typeof o.description=="function"?await o.description(u):o.description,g=typeof O=="object"&&!l0.isValidElement(O)?O:{message:O};this.create({id:n,type:"success",description:h,...g})}}).catch(async u=>{if(i=["reject",u],o.error!==void 0){a=!1;const f=typeof o.error=="function"?await o.error(u):o.error,O=typeof o.description=="function"?await o.description(u):o.description,q=typeof f=="object"&&!l0.isValidElement(f)?f:{message:f};this.create({id:n,type:"error",description:O,...q})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),o.finally==null||o.finally.call(o)}),z=()=>new Promise((u,f)=>l.then(()=>i[0]==="reject"?f(i[1]):u(i[1])).catch(f));return typeof n!="string"&&typeof n!="number"?{unwrap:z}:Object.assign(n,{unwrap:z})},this.custom=(t,o)=>{const n=o?.id||Hz++;return this.create({jsx:t(n),id:n,...o}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const A2=new gK,WK=(e,t)=>{const o=t?.id||Hz++;return A2.addToast({title:e,...t,id:o}),o},vK=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",RK=WK,yK=()=>A2.toasts,wK=()=>A2.getActiveToasts(),Se=Object.assign(RK,{success:A2.success,info:A2.info,warning:A2.warning,error:A2.error,custom:A2.custom,message:A2.message,promise:A2.promise,dismiss:A2.dismiss,loading:A2.loading},{getHistory:yK,getToasts:wK});bK("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Si(e){return e.label!==void 0}const LK=3,xK="24px",kK="16px",Hf=4e3,CK=356,NK=14,_K=45,BK=200;function xt(...e){return e.filter(Boolean).join(" ")}function EK(e){const[t,o]=e.split("-"),n=[];return t&&n.push(t),o&&n.push(o),n}const SK=e=>{var t,o,n,r,a,i,l,z,u;const{invert:f,toast:O,unstyled:h,interacting:q,setHeights:g,visibleToasts:W,heights:v,index:y,toasts:k,expanded:C,removeToast:L,defaultRichColors:x,closeButton:w,style:P,cancelButtonStyle:H,actionButtonStyle:o0,className:Y="",descriptionClassName:K="",duration:n0,position:J,gap:i0,expandByDefault:L0,classNames:Z,icons:m0,closeButtonAriaLabel:$="Close toast"}=e,[X,G]=l0.useState(null),[N,I]=l0.useState(null),[c0,h0]=l0.useState(!1),[d0,v0]=l0.useState(!1),[u0,e0]=l0.useState(!1),[S0,T0]=l0.useState(!1),[V0,h1]=l0.useState(!1),[E,t0]=l0.useState(0),[r0,A0]=l0.useState(0),j0=l0.useRef(O.duration||n0||Hf),J0=l0.useRef(null),a1=l0.useRef(null),o1=y===0,q1=y+1<=W,C1=O.type,ke=O.dismissible!==!1,rt=O.className||"",c2=O.descriptionClassName||"",K1=l0.useMemo(()=>v.findIndex(Y0=>Y0.toastId===O.id)||0,[v,O.id]),X1=l0.useMemo(()=>{var Y0;return(Y0=O.closeButton)!=null?Y0:w},[O.closeButton,w]),a2=l0.useMemo(()=>O.duration||n0||Hf,[O.duration,n0]),ct=l0.useRef(0),qe=l0.useRef(0),s2=l0.useRef(0),le=l0.useRef(null),[_2,B2]=J.split("-"),Ce=l0.useMemo(()=>v.reduce((Y0,E1,n1)=>n1>=K1?Y0:Y0+E1.height,0),[v,K1]),Ge=mK(),E2=O.invert||f,je=C1==="loading";qe.current=l0.useMemo(()=>K1*i0+Ce,[K1,Ce]),l0.useEffect(()=>{j0.current=a2},[a2]),l0.useEffect(()=>{h0(!0)},[]),l0.useEffect(()=>{const Y0=a1.current;if(Y0){const E1=Y0.getBoundingClientRect().height;return A0(E1),g(n1=>[{toastId:O.id,height:E1,position:O.position},...n1]),()=>g(n1=>n1.filter(H1=>H1.toastId!==O.id))}},[g,O.id]),l0.useLayoutEffect(()=>{if(!c0)return;const Y0=a1.current,E1=Y0.style.height;Y0.style.height="auto";const n1=Y0.getBoundingClientRect().height;Y0.style.height=E1,A0(n1),g(H1=>H1.find(B=>B.toastId===O.id)?H1.map(B=>B.toastId===O.id?{...B,height:n1}:B):[{toastId:O.id,height:n1,position:O.position},...H1])},[c0,O.title,O.description,g,O.id,O.jsx,O.action,O.cancel]);const Ne=l0.useCallback(()=>{v0(!0),t0(qe.current),g(Y0=>Y0.filter(E1=>E1.toastId!==O.id)),setTimeout(()=>{L(O)},BK)},[O,L,g,qe]);l0.useEffect(()=>{if(O.promise&&C1==="loading"||O.duration===1/0||O.type==="loading")return;let Y0;return C||q||Ge?(()=>{if(s2.current<ct.current){const H1=new Date().getTime()-ct.current;j0.current=j0.current-H1}s2.current=new Date().getTime()})():(()=>{j0.current!==1/0&&(ct.current=new Date().getTime(),Y0=setTimeout(()=>{O.onAutoClose==null||O.onAutoClose.call(O,O),Ne()},j0.current))})(),()=>clearTimeout(Y0)},[C,q,O,C1,Ge,Ne]),l0.useEffect(()=>{O.delete&&(Ne(),O.onDismiss==null||O.onDismiss.call(O,O))},[Ne,O.delete]);function i2(){var Y0;if(m0?.loading){var E1;return l0.createElement("div",{className:xt(Z?.loader,O==null||(E1=O.classNames)==null?void 0:E1.loader,"sonner-loader"),"data-visible":C1==="loading"},m0.loading)}return l0.createElement(dK,{className:xt(Z?.loader,O==null||(Y0=O.classNames)==null?void 0:Y0.loader),visible:C1==="loading"})}const Ze=O.icon||m0?.[C1]||zK(C1);var p2,m2;return l0.createElement("li",{tabIndex:0,ref:a1,className:xt(Y,rt,Z?.toast,O==null||(t=O.classNames)==null?void 0:t.toast,Z?.default,Z?.[C1],O==null||(o=O.classNames)==null?void 0:o[C1]),"data-sonner-toast":"","data-rich-colors":(p2=O.richColors)!=null?p2:x,"data-styled":!(O.jsx||O.unstyled||h),"data-mounted":c0,"data-promise":!!O.promise,"data-swiped":V0,"data-removed":d0,"data-visible":q1,"data-y-position":_2,"data-x-position":B2,"data-index":y,"data-front":o1,"data-swiping":u0,"data-dismissible":ke,"data-type":C1,"data-invert":E2,"data-swipe-out":S0,"data-swipe-direction":N,"data-expanded":!!(C||L0&&c0),"data-testid":O.testId,style:{"--index":y,"--toasts-before":y,"--z-index":k.length-y,"--offset":`${d0?E:qe.current}px`,"--initial-height":L0?"auto":`${r0}px`,...P,...O.style},onDragEnd:()=>{e0(!1),G(null),le.current=null},onPointerDown:Y0=>{Y0.button!==2&&(je||!ke||(J0.current=new Date,t0(qe.current),Y0.target.setPointerCapture(Y0.pointerId),Y0.target.tagName!=="BUTTON"&&(e0(!0),le.current={x:Y0.clientX,y:Y0.clientY})))},onPointerUp:()=>{var Y0,E1,n1;if(S0||!ke)return;le.current=null;const H1=Number(((Y0=a1.current)==null?void 0:Y0.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),S2=Number(((E1=a1.current)==null?void 0:E1.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),B=new Date().getTime()-((n1=J0.current)==null?void 0:n1.getTime()),D=X==="x"?H1:S2,V=Math.abs(D)/B;if(Math.abs(D)>=_K||V>.11){t0(qe.current),O.onDismiss==null||O.onDismiss.call(O,O),I(X==="x"?H1>0?"right":"left":S2>0?"down":"up"),Ne(),T0(!0);return}else{var s0,f0;(s0=a1.current)==null||s0.style.setProperty("--swipe-amount-x","0px"),(f0=a1.current)==null||f0.style.setProperty("--swipe-amount-y","0px")}h1(!1),e0(!1),G(null)},onPointerMove:Y0=>{var E1,n1,H1;if(!le.current||!ke||((E1=window.getSelection())==null?void 0:E1.toString().length)>0)return;const B=Y0.clientY-le.current.y,D=Y0.clientX-le.current.x;var V;const s0=(V=e.swipeDirections)!=null?V:EK(J);!X&&(Math.abs(D)>1||Math.abs(B)>1)&&G(Math.abs(D)>Math.abs(B)?"x":"y");let f0={x:0,y:0};const y0=w0=>1/(1.5+Math.abs(w0)/20);if(X==="y"){if(s0.includes("top")||s0.includes("bottom"))if(s0.includes("top")&&B<0||s0.includes("bottom")&&B>0)f0.y=B;else{const w0=B*y0(B);f0.y=Math.abs(w0)<Math.abs(B)?w0:B}}else if(X==="x"&&(s0.includes("left")||s0.includes("right")))if(s0.includes("left")&&D<0||s0.includes("right")&&D>0)f0.x=D;else{const w0=D*y0(D);f0.x=Math.abs(w0)<Math.abs(D)?w0:D}(Math.abs(f0.x)>0||Math.abs(f0.y)>0)&&h1(!0),(n1=a1.current)==null||n1.style.setProperty("--swipe-amount-x",`${f0.x}px`),(H1=a1.current)==null||H1.style.setProperty("--swipe-amount-y",`${f0.y}px`)}},X1&&!O.jsx&&C1!=="loading"?l0.createElement("button",{"aria-label":$,"data-disabled":je,"data-close-button":!0,onClick:je||!ke?()=>{}:()=>{Ne(),O.onDismiss==null||O.onDismiss.call(O,O)},className:xt(Z?.closeButton,O==null||(n=O.classNames)==null?void 0:n.closeButton)},(m2=m0?.close)!=null?m2:qK):null,(C1||O.icon||O.promise)&&O.icon!==null&&(m0?.[C1]!==null||O.icon)?l0.createElement("div",{"data-icon":"",className:xt(Z?.icon,O==null||(r=O.classNames)==null?void 0:r.icon)},O.promise||O.type==="loading"&&!O.icon?O.icon||i2():null,O.type!=="loading"?Ze:null):null,l0.createElement("div",{"data-content":"",className:xt(Z?.content,O==null||(a=O.classNames)==null?void 0:a.content)},l0.createElement("div",{"data-title":"",className:xt(Z?.title,O==null||(i=O.classNames)==null?void 0:i.title)},O.jsx?O.jsx:typeof O.title=="function"?O.title():O.title),O.description?l0.createElement("div",{"data-description":"",className:xt(K,c2,Z?.description,O==null||(l=O.classNames)==null?void 0:l.description)},typeof O.description=="function"?O.description():O.description):null),l0.isValidElement(O.cancel)?O.cancel:O.cancel&&Si(O.cancel)?l0.createElement("button",{"data-button":!0,"data-cancel":!0,style:O.cancelButtonStyle||H,onClick:Y0=>{Si(O.cancel)&&ke&&(O.cancel.onClick==null||O.cancel.onClick.call(O.cancel,Y0),Ne())},className:xt(Z?.cancelButton,O==null||(z=O.classNames)==null?void 0:z.cancelButton)},O.cancel.label):null,l0.isValidElement(O.action)?O.action:O.action&&Si(O.action)?l0.createElement("button",{"data-button":!0,"data-action":!0,style:O.actionButtonStyle||o0,onClick:Y0=>{Si(O.action)&&(O.action.onClick==null||O.action.onClick.call(O.action,Y0),!Y0.defaultPrevented&&Ne())},className:xt(Z?.actionButton,O==null||(u=O.classNames)==null?void 0:u.actionButton)},O.action.label):null)};function Uf(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function TK(e,t){const o={};return[e,t].forEach((n,r)=>{const a=r===1,i=a?"--mobile-offset":"--offset",l=a?kK:xK;function z(u){["top","right","bottom","left"].forEach(f=>{o[`${i}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof n=="number"||typeof n=="string"?z(n):typeof n=="object"?["top","right","bottom","left"].forEach(u=>{n[u]===void 0?o[`${i}-${u}`]=l:o[`${i}-${u}`]=typeof n[u]=="number"?`${n[u]}px`:n[u]}):z(l)}),o}const PK=l0.forwardRef(function(t,o){const{id:n,invert:r,position:a="bottom-right",hotkey:i=["altKey","KeyT"],expand:l,closeButton:z,className:u,offset:f,mobileOffset:O,theme:h="light",richColors:q,duration:g,style:W,visibleToasts:v=LK,toastOptions:y,dir:k=Uf(),gap:C=NK,icons:L,containerAriaLabel:x="Notifications"}=t,[w,P]=l0.useState([]),H=l0.useMemo(()=>n?w.filter(c0=>c0.toasterId===n):w.filter(c0=>!c0.toasterId),[w,n]),o0=l0.useMemo(()=>Array.from(new Set([a].concat(H.filter(c0=>c0.position).map(c0=>c0.position)))),[H,a]),[Y,K]=l0.useState([]),[n0,J]=l0.useState(!1),[i0,L0]=l0.useState(!1),[Z,m0]=l0.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=l0.useRef(null),X=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),G=l0.useRef(null),N=l0.useRef(!1),I=l0.useCallback(c0=>{P(h0=>{var d0;return(d0=h0.find(v0=>v0.id===c0.id))!=null&&d0.delete||A2.dismiss(c0.id),h0.filter(({id:v0})=>v0!==c0.id)})},[]);return l0.useEffect(()=>A2.subscribe(c0=>{if(c0.dismiss){requestAnimationFrame(()=>{P(h0=>h0.map(d0=>d0.id===c0.id?{...d0,delete:!0}:d0))});return}setTimeout(()=>{hh.flushSync(()=>{P(h0=>{const d0=h0.findIndex(v0=>v0.id===c0.id);return d0!==-1?[...h0.slice(0,d0),{...h0[d0],...c0},...h0.slice(d0+1)]:[c0,...h0]})})})}),[w]),l0.useEffect(()=>{if(h!=="system"){m0(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?m0("dark"):m0("light")),typeof window>"u")return;const c0=window.matchMedia("(prefers-color-scheme: dark)");try{c0.addEventListener("change",({matches:h0})=>{m0(h0?"dark":"light")})}catch{c0.addListener(({matches:d0})=>{try{m0(d0?"dark":"light")}catch(v0){console.error(v0)}})}},[h]),l0.useEffect(()=>{w.length<=1&&J(!1)},[w]),l0.useEffect(()=>{const c0=h0=>{var d0;if(i.every(e0=>h0[e0]||h0.code===e0)){var u0;J(!0),(u0=$.current)==null||u0.focus()}h0.code==="Escape"&&(document.activeElement===$.current||(d0=$.current)!=null&&d0.contains(document.activeElement))&&J(!1)};return document.addEventListener("keydown",c0),()=>document.removeEventListener("keydown",c0)},[i]),l0.useEffect(()=>{if($.current)return()=>{G.current&&(G.current.focus({preventScroll:!0}),G.current=null,N.current=!1)}},[$.current]),l0.createElement("section",{ref:o,"aria-label":`${x} ${X}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},o0.map((c0,h0)=>{var d0;const[v0,u0]=c0.split("-");return H.length?l0.createElement("ol",{key:c0,dir:k==="auto"?Uf():k,tabIndex:-1,ref:$,className:u,"data-sonner-toaster":!0,"data-sonner-theme":Z,"data-y-position":v0,"data-x-position":u0,style:{"--front-toast-height":`${((d0=Y[0])==null?void 0:d0.height)||0}px`,"--width":`${CK}px`,"--gap":`${C}px`,...W,...TK(f,O)},onBlur:e0=>{N.current&&!e0.currentTarget.contains(e0.relatedTarget)&&(N.current=!1,G.current&&(G.current.focus({preventScroll:!0}),G.current=null))},onFocus:e0=>{e0.target instanceof HTMLElement&&e0.target.dataset.dismissible==="false"||N.current||(N.current=!0,G.current=e0.relatedTarget)},onMouseEnter:()=>J(!0),onMouseMove:()=>J(!0),onMouseLeave:()=>{i0||J(!1)},onDragEnd:()=>J(!1),onPointerDown:e0=>{e0.target instanceof HTMLElement&&e0.target.dataset.dismissible==="false"||L0(!0)},onPointerUp:()=>L0(!1)},H.filter(e0=>!e0.position&&h0===0||e0.position===c0).map((e0,S0)=>{var T0,V0;return l0.createElement(SK,{key:e0.id,icons:L,index:S0,toast:e0,defaultRichColors:q,duration:(T0=y?.duration)!=null?T0:g,className:y?.className,descriptionClassName:y?.descriptionClassName,invert:r,visibleToasts:v,closeButton:(V0=y?.closeButton)!=null?V0:z,interacting:i0,position:c0,style:y?.style,unstyled:y?.unstyled,classNames:y?.classNames,cancelButtonStyle:y?.cancelButtonStyle,actionButtonStyle:y?.actionButtonStyle,closeButtonAriaLabel:y?.closeButtonAriaLabel,removeToast:I,toasts:H.filter(h1=>h1.position==e0.position),heights:Y.filter(h1=>h1.position==e0.position),setHeights:K,expandByDefault:l,gap:C,expanded:n0,swipeDirections:t.swipeDirections})})):null}))}),jK=({...e})=>b.jsx(PK,{className:"toaster group",style:{"--normal-bg":"hsl(var(--background))","--normal-text":"hsl(var(--foreground))","--normal-border":"hsl(var(--border))"},theme:"light",...e}),XK=l0.createContext({isDirty:!1,setGlobalDirtyState:()=>{}}),DK=({children:e})=>{const[t,o]=p.useState([]),n=p.useCallback((r,a)=>{o(i=>a&&!i.includes(r)?[...i,r]:!a&&i.includes(r)?i.filter(l=>l!==r):i)},[]);return b.jsx(XK.Provider,{value:{isDirty:t.length>0,setGlobalDirtyState:n},children:e})},IK=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:24,width:24,id:"Alert-Triangle--Streamline-Ultimate",...e},p.createElement("desc",null,"Alert Triangle Streamline Icon: https://streamlinehq.com"),p.createElement("path",{d:"m23.77 20.57 -10 -19A2 2 0 0 0 12 0.5a2 2 0 0 0 -1.77 1.07l-10 19a2 2 0 0 0 0.06 2A2 2 0 0 0 2 23.5h20a2 2 0 0 0 1.77 -2.93ZM11 8.5a1 1 0 0 1 2 0v6a1 1 0 0 1 -2 0ZM12.05 20a1.53 1.53 0 0 1 -1.52 -1.47A1.48 1.48 0 0 1 12 17a1.53 1.53 0 0 1 1.52 1.47A1.48 1.48 0 0 1 12.05 20Z",fill:"currentColor",strokeWidth:1})),FK="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20height='24'%20width='24'%20id='Alert-Triangle--Streamline-Ultimate'%3e%3cdesc%3eAlert%20Triangle%20Streamline%20Icon:%20https://streamlinehq.com%3c/desc%3e%3cpath%20d='m23.77%2020.57%20-10%20-19A2%202%200%200%200%2012%200.5a2%202%200%200%200%20-1.77%201.07l-10%2019a2%202%200%200%200%200.06%202A2%202%200%200%200%202%2023.5h20a2%202%200%200%200%201.77%20-2.93ZM11%208.5a1%201%200%200%201%202%200v6a1%201%200%200%201%20-2%200ZM12.05%2020a1.53%201.53%200%200%201%20-1.52%20-1.47A1.48%201.48%200%200%201%2012%2017a1.53%201.53%200%200%201%201.52%201.47A1.48%201.48%200%200%201%2012.05%2020Z'%20fill='currentColor'%20stroke-width='1'%3e%3c/path%3e%3c/svg%3e",HK=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:IK,default:FK},Symbol.toStringTag,{value:"Module"})),UK=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:24,width:24,id:"Information-Circle--Streamline-Ultimate",...e},p.createElement("desc",null,"Information Circle Streamline Icon: https://streamlinehq.com"),p.createElement("path",{d:"M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm0.25 5a1.5 1.5 0 1 1 -1.5 1.5 1.5 1.5 0 0 1 1.5 -1.5Zm2.25 13.5h-4a1 1 0 0 1 0 -2h0.75a0.25 0.25 0 0 0 0.25 -0.25v-4.5a0.25 0.25 0 0 0 -0.25 -0.25h-0.75a1 1 0 0 1 0 -2h1a2 2 0 0 1 2 2v4.75a0.25 0.25 0 0 0 0.25 0.25h0.75a1 1 0 0 1 0 2Z",fill:"currentcolor",strokeWidth:1})),VK="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20height='24'%20width='24'%20id='Information-Circle--Streamline-Ultimate'%3e%3cdesc%3eInformation%20Circle%20Streamline%20Icon:%20https://streamlinehq.com%3c/desc%3e%3cpath%20d='M12%200a12%2012%200%201%200%2012%2012A12%2012%200%200%200%2012%200Zm0.25%205a1.5%201.5%200%201%201%20-1.5%201.5%201.5%201.5%200%200%201%201.5%20-1.5Zm2.25%2013.5h-4a1%201%200%200%201%200%20-2h0.75a0.25%200.25%200%200%200%200.25%20-0.25v-4.5a0.25%200.25%200%200%200%20-0.25%20-0.25h-0.75a1%201%200%200%201%200%20-2h1a2%202%200%200%201%202%202v4.75a0.25%200.25%200%200%200%200.25%200.25h0.75a1%201%200%200%201%200%202Z'%20fill='currentcolor'%20stroke-width='1'%3e%3c/path%3e%3c/svg%3e",QK=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:UK,default:VK},Symbol.toStringTag,{value:"Module"})),$K=e=>p.createElement("svg",{height:16,id:"Skull-2--Streamline-Ultimate",viewBox:"0 0 16 16",width:16,xmlns:"http://www.w3.org/2000/svg",...e},p.createElement("desc",null,`
599
599
  Skull 2 Streamline Icon: https://streamlinehq.com
600
- `),p.createElement("g",null,p.createElement("path",{d:"M12.333333333333332 7.333333333333333a4.333333333333333 4.333333333333333 0 1 0 -7.333333333333333 3.126666666666667v1.88a1 1 0 0 0 2 0 1 1 0 0 0 2 0 1 1 0 1 0 2 0v-1.88a4.326666666666666 4.326666666666666 0 0 0 1.3333333333333333 -3.126666666666667Zm-6.253333333333334 1a1 1 0 1 1 1 -1 1 1 0 0 1 -1 1Zm4 0a1 1 0 1 1 1 -1 1 1 0 0 1 -1 1Z",fill:"currentColor",strokeWidth:.6667}),p.createElement("path",{d:"m1.8666666666666665 3.28 1.22 1.22a0.3466666666666667 0.3466666666666667 0 0 0 0.26666666666666666 0.09333333333333334 0.35333333333333333 0.35333333333333333 0 0 0 0.24666666666666665 -0.14666666666666667 5.133333333333333 5.133333333333333 0 0 1 0.8066666666666666 -0.9733333333333333 0.3133333333333333 0.3133333333333333 0 0 0 0.09999999999999999 -0.2333333333333333 0.3666666666666667 0.3666666666666667 0 0 0 -0.09333333333333334 -0.24666666666666665L3.28 1.8666666666666665A1.1666666666666665 1.1666666666666665 0 0 0 1.8399999999999999 0.11333333333333334a0.6666666666666666 0.6666666666666666 0 0 0 -0.3666666666666667 0.48l-0.09999999999999999 0.5133333333333333a0.31999999999999995 0.31999999999999995 0 0 1 -0.26 0.26666666666666666l-0.52 0.09999999999999999a0.6666666666666666 0.6666666666666666 0 0 0 -0.48 0.3666666666666667A1.1666666666666665 1.1666666666666665 0 0 0 1.8666666666666665 3.28Z",fill:"currentColor",strokeWidth:.6667}),p.createElement("path",{d:"M12.4 4.446666666666666a0.35333333333333333 0.35333333333333333 0 0 0 0.24666666666666665 0.14666666666666667 0.3466666666666667 0.3466666666666667 0 0 0 0.26666666666666666 -0.09333333333333334l1.22 -1.22a1.1666666666666665 1.1666666666666665 0 0 0 1.7533333333333332 -1.44 0.6666666666666666 0.6666666666666666 0 0 0 -0.48 -0.3666666666666667l-0.52 -0.09999999999999999a0.31999999999999995 0.31999999999999995 0 0 1 -0.26 -0.26666666666666666l-0.09999999999999999 -0.5133333333333333a0.6666666666666666 0.6666666666666666 0 0 0 -0.3666666666666667 -0.48 1.1666666666666665 1.1666666666666665 0 0 0 -1.44 1.7533333333333332l-1.1333333333333333 1.1266666666666665a0.3666666666666667 0.3666666666666667 0 0 0 -0.09333333333333334 0.24666666666666665 0.3133333333333333 0.3133333333333333 0 0 0 0.09999999999999999 0.2333333333333333 5.133333333333333 5.133333333333333 0 0 1 0.8066666666666666 0.9733333333333333Z",fill:"currentColor",strokeWidth:.6667}),p.createElement("path",{d:"M3.6 11.559999999999999a0.33999999999999997 0.33999999999999997 0 0 0 -0.26666666666666666 -0.15333333333333332 0.3466666666666667 0.3466666666666667 0 0 0 -0.26666666666666666 0.09333333333333334l-1.2 1.22a1.1666666666666665 1.1666666666666665 0 0 0 -1.7533333333333332 1.44 0.6666666666666666 0.6666666666666666 0 0 0 0.48 0.3666666666666667l0.52 0.09999999999999999a0.31999999999999995 0.31999999999999995 0 0 1 0.26 0.26666666666666666l0.09999999999999999 0.5133333333333333a0.6666666666666666 0.6666666666666666 0 0 0 0.3666666666666667 0.48 1.1666666666666665 1.1666666666666665 0 0 0 1.44 -1.7533333333333332l1.1333333333333333 -1.1266666666666665a0.36 0.36 0 0 0 0.09333333333333334 -0.24 0.31999999999999995 0.31999999999999995 0 0 0 -0.09999999999999999 -0.24 5.333333333333333 5.333333333333333 0 0 1 -0.8066666666666666 -0.9666666666666666Z",fill:"currentColor",strokeWidth:.6667}),p.createElement("path",{d:"m14.133333333333333 12.719999999999999 -1.22 -1.22a0.3466666666666667 0.3466666666666667 0 0 0 -0.26666666666666666 -0.09333333333333334 0.33999999999999997 0.33999999999999997 0 0 0 -0.24666666666666665 0.15333333333333332 5.333333333333333 5.333333333333333 0 0 1 -0.8066666666666666 0.9666666666666666 0.31999999999999995 0.31999999999999995 0 0 0 -0.09999999999999999 0.24 0.36 0.36 0 0 0 0.09333333333333334 0.24l1.1333333333333333 1.1266666666666665a1.1666666666666665 1.1666666666666665 0 0 0 1.44 1.7533333333333332 0.6666666666666666 0.6666666666666666 0 0 0 0.3666666666666667 -0.48l0.09999999999999999 -0.5133333333333333a0.31999999999999995 0.31999999999999995 0 0 1 0.26 -0.26666666666666666l0.52 -0.09999999999999999a0.6666666666666666 0.6666666666666666 0 0 0 0.48 -0.3666666666666667 1.1666666666666665 1.1666666666666665 0 0 0 -1.7533333333333332 -1.44Z",fill:"currentColor",strokeWidth:.6667}))),GK="data:image/svg+xml,%3csvg%20height='16'%20id='Skull-2--Streamline-Ultimate'%20viewBox='0%200%2016%2016'%20width='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdesc%3e%20Skull%202%20Streamline%20Icon:%20https://streamlinehq.com%20%3c/desc%3e%3cg%3e%3cpath%20d='M12.333333333333332%207.333333333333333a4.333333333333333%204.333333333333333%200%201%200%20-7.333333333333333%203.126666666666667v1.88a1%201%200%200%200%202%200%201%201%200%200%200%202%200%201%201%200%201%200%202%200v-1.88a4.326666666666666%204.326666666666666%200%200%200%201.3333333333333333%20-3.126666666666667Zm-6.253333333333334%201a1%201%200%201%201%201%20-1%201%201%200%200%201%20-1%201Zm4%200a1%201%200%201%201%201%20-1%201%201%200%200%201%20-1%201Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='m1.8666666666666665%203.28%201.22%201.22a0.3466666666666667%200.3466666666666667%200%200%200%200.26666666666666666%200.09333333333333334%200.35333333333333333%200.35333333333333333%200%200%200%200.24666666666666665%20-0.14666666666666667%205.133333333333333%205.133333333333333%200%200%201%200.8066666666666666%20-0.9733333333333333%200.3133333333333333%200.3133333333333333%200%200%200%200.09999999999999999%20-0.2333333333333333%200.3666666666666667%200.3666666666666667%200%200%200%20-0.09333333333333334%20-0.24666666666666665L3.28%201.8666666666666665A1.1666666666666665%201.1666666666666665%200%200%200%201.8399999999999999%200.11333333333333334a0.6666666666666666%200.6666666666666666%200%200%200%20-0.3666666666666667%200.48l-0.09999999999999999%200.5133333333333333a0.31999999999999995%200.31999999999999995%200%200%201%20-0.26%200.26666666666666666l-0.52%200.09999999999999999a0.6666666666666666%200.6666666666666666%200%200%200%20-0.48%200.3666666666666667A1.1666666666666665%201.1666666666666665%200%200%200%201.8666666666666665%203.28Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='M12.4%204.446666666666666a0.35333333333333333%200.35333333333333333%200%200%200%200.24666666666666665%200.14666666666666667%200.3466666666666667%200.3466666666666667%200%200%200%200.26666666666666666%20-0.09333333333333334l1.22%20-1.22a1.1666666666666665%201.1666666666666665%200%200%200%201.7533333333333332%20-1.44%200.6666666666666666%200.6666666666666666%200%200%200%20-0.48%20-0.3666666666666667l-0.52%20-0.09999999999999999a0.31999999999999995%200.31999999999999995%200%200%201%20-0.26%20-0.26666666666666666l-0.09999999999999999%20-0.5133333333333333a0.6666666666666666%200.6666666666666666%200%200%200%20-0.3666666666666667%20-0.48%201.1666666666666665%201.1666666666666665%200%200%200%20-1.44%201.7533333333333332l-1.1333333333333333%201.1266666666666665a0.3666666666666667%200.3666666666666667%200%200%200%20-0.09333333333333334%200.24666666666666665%200.3133333333333333%200.3133333333333333%200%200%200%200.09999999999999999%200.2333333333333333%205.133333333333333%205.133333333333333%200%200%201%200.8066666666666666%200.9733333333333333Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='M3.6%2011.559999999999999a0.33999999999999997%200.33999999999999997%200%200%200%20-0.26666666666666666%20-0.15333333333333332%200.3466666666666667%200.3466666666666667%200%200%200%20-0.26666666666666666%200.09333333333333334l-1.2%201.22a1.1666666666666665%201.1666666666666665%200%200%200%20-1.7533333333333332%201.44%200.6666666666666666%200.6666666666666666%200%200%200%200.48%200.3666666666666667l0.52%200.09999999999999999a0.31999999999999995%200.31999999999999995%200%200%201%200.26%200.26666666666666666l0.09999999999999999%200.5133333333333333a0.6666666666666666%200.6666666666666666%200%200%200%200.3666666666666667%200.48%201.1666666666666665%201.1666666666666665%200%200%200%201.44%20-1.7533333333333332l1.1333333333333333%20-1.1266666666666665a0.36%200.36%200%200%200%200.09333333333333334%20-0.24%200.31999999999999995%200.31999999999999995%200%200%200%20-0.09999999999999999%20-0.24%205.333333333333333%205.333333333333333%200%200%201%20-0.8066666666666666%20-0.9666666666666666Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='m14.133333333333333%2012.719999999999999%20-1.22%20-1.22a0.3466666666666667%200.3466666666666667%200%200%200%20-0.26666666666666666%20-0.09333333333333334%200.33999999999999997%200.33999999999999997%200%200%200%20-0.24666666666666665%200.15333333333333332%205.333333333333333%205.333333333333333%200%200%201%20-0.8066666666666666%200.9666666666666666%200.31999999999999995%200.31999999999999995%200%200%200%20-0.09999999999999999%200.24%200.36%200.36%200%200%200%200.09333333333333334%200.24l1.1333333333333333%201.1266666666666665a1.1666666666666665%201.1666666666666665%200%200%200%201.44%201.7533333333333332%200.6666666666666666%200.6666666666666666%200%200%200%200.3666666666666667%20-0.48l0.09999999999999999%20-0.5133333333333333a0.31999999999999995%200.31999999999999995%200%200%201%200.26%20-0.26666666666666666l0.52%20-0.09999999999999999a0.6666666666666666%200.6666666666666666%200%200%200%200.48%20-0.3666666666666667%201.1666666666666665%201.1666666666666665%200%200%200%20-1.7533333333333332%20-1.44Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",ZK=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:$K,default:GK},Symbol.toStringTag,{value:"Module"})),KK=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:24,width:24,id:"Check-Circle-1--Streamline-Ultimate",...e},p.createElement("desc",null,"Check Circle 1 Streamline Icon: https://streamlinehq.com"),p.createElement("path",{d:"M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm6.93 8.2 -6.85 9.29a1 1 0 0 1 -1.43 0.19l-4.89 -3.91a1 1 0 0 1 -0.15 -1.41A1 1 0 0 1 7 12.21l4.08 3.26L17.32 7a1 1 0 0 1 1.39 -0.21 1 1 0 0 1 0.22 1.41Z",fill:"currentcolor",strokeWidth:1})),YK="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20height='24'%20width='24'%20id='Check-Circle-1--Streamline-Ultimate'%3e%3cdesc%3eCheck%20Circle%201%20Streamline%20Icon:%20https://streamlinehq.com%3c/desc%3e%3cpath%20d='M12%200a12%2012%200%201%200%2012%2012A12%2012%200%200%200%2012%200Zm6.93%208.2%20-6.85%209.29a1%201%200%200%201%20-1.43%200.19l-4.89%20-3.91a1%201%200%200%201%20-0.15%20-1.41A1%201%200%200%201%207%2012.21l4.08%203.26L17.32%207a1%201%200%200%201%201.39%20-0.21%201%201%200%200%201%200.22%201.41Z'%20fill='currentcolor'%20stroke-width='1'%3e%3c/path%3e%3c/svg%3e",JK=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:KK,default:YK},Symbol.toStringTag,{value:"Module"})),eY=e=>p.createElement("svg",{viewBox:"-0.75 -0.75 20 20",xmlns:"http://www.w3.org/2000/svg",height:24,width:24,...e},p.createElement("desc",null,"Typography"),p.createElement("path",{d:"m0.578125 9.827354166666668 8.09375 0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),p.createElement("path",{d:"m12.140625 13.296104166666666 5.78125 0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),p.createElement("path",{d:"M12.140625 16.764854166666666V10.40625a2.890625 2.890625 0 0 1 5.78125 0v6.359375",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),p.createElement("path",{d:"M0.578125 16.764854166666666V5.78125a4.046875 4.046875 0 0 1 8.09375 0v10.984375",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),tY="data:image/svg+xml,%3csvg%20viewBox='-0.75%20-0.75%2020%2020'%20xmlns='http://www.w3.org/2000/svg'%20height='24'%20width='24'%3e%3cdesc%3eTypography%3c/desc%3e%3cpath%20d='m0.578125%209.827354166666668%208.09375%200'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3cpath%20d='m12.140625%2013.296104166666666%205.78125%200'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3cpath%20d='M12.140625%2016.764854166666666V10.40625a2.890625%202.890625%200%200%201%205.78125%200v6.359375'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3cpath%20d='M0.578125%2016.764854166666666V5.78125a4.046875%204.046875%200%200%201%208.09375%200v10.984375'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3c/svg%3e",oY=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:eY,default:tY},Symbol.toStringTag,{value:"Module"})),nY=Ao("",{variants:{size:{sm:"size-3",md:"size-4",lg:"size-6",xl:"size-8"}},defaultVariants:{size:"md"}}),rY=Object.assign({"../../assets/icons/error-fill.svg":HK,"../../assets/icons/info-fill.svg":QK,"../../assets/icons/skull-and-bones.svg":ZK,"../../assets/icons/success-fill.svg":JK,"../../assets/icons/typography.svg":oY}),ip=Object.entries(rY).reduce((e,[t,o])=>{var n;const r=((n=t.match(/[^/]+(?=\.svg$)/))==null?void 0:n[0])??"",a=gG(r),i=l=>{const{size:z,className:u,...f}=l,O=R0(nY({size:z,className:u}));return l0.createElement(o.ReactComponent,{...f,className:O})};return i.displayName=`Icon.${a}`,e[a]=i,e},{}),cc0=ip,cY=p.createContext({isAnyTextFieldFocused:!1,setFocusState:()=>{},darkMode:!1}),aY=()=>{const[e,t]=p.useState(!1);return p.useEffect(()=>(t(!0),()=>t(!1)),[]),e?a3.createPortal(b.jsx("div",{className:ho,style:{width:"unset",height:"unset"},children:b.jsx(jK,{icons:{error:b.jsx(ip.ErrorFill,{className:"text-red"}),success:b.jsx(ip.SuccessFill,{className:"text-green"}),info:b.jsx(ip.InfoFill,{className:"text-gray-500"})},position:"bottom-left",toastOptions:{classNames:{title:"!mt-[-1px] !text-md !font-semibold !leading-tighter !tracking-[0.1px]",description:"!text-gray-900 dark:!text-gray-300 !text-sm !mt-px",icon:"!ml-0"},style:{alignItems:"flex-start",maxWidth:"290px"}}})}),document.body):null},sY=({darkMode:e,children:t})=>{const[o,n]=p.useState(!1),r=a=>{n(a)};return b.jsx(cY.Provider,{value:{isAnyTextFieldFocused:o,setFocusState:r,darkMode:e},children:b.jsxs(DK,{children:[t,b.jsx(aY,{})]})})},ho="shade shade-admin shade-activitypub shade-stats shade-posts",iY=({darkMode:e,fetchKoenigLexical:t,className:o,children:n,...r})=>{const a=se("shade",o);return b.jsx("div",{className:a,...r,children:b.jsx(sY,{darkMode:e,children:n})})},pY=GH,MY=ZH,lY=KH,Q9=p.forwardRef(({className:e,...t},o)=>b.jsx(C8,{className:R0("fixed inset-0 z-50 bg-black/30 backdrop-blur-none transform-gpu data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=open]:backdrop-blur-[3px]",e),...t,ref:o}));Q9.displayName=C8.displayName;const $9=p.forwardRef(({className:e,...t},o)=>b.jsx(lY,{children:b.jsxs("div",{className:ho,children:[b.jsx(Q9,{onClick:n=>n.stopPropagation()}),b.jsx(N8,{ref:o,className:R0("fixed left-[50%] top-[20%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-20%] gap-6 bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[18%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[18%] sm:rounded-lg",e),...t})]})}));$9.displayName=N8.displayName;const G9=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col space-y-2 text-center sm:text-left",e),...t});G9.displayName="AlertDialogHeader";const Z9=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 [&>button]:min-w-20",e),...t});Z9.displayName="AlertDialogFooter";const K9=p.forwardRef(({className:e,...t},o)=>b.jsx(E8,{ref:o,className:R0("text-xl font-semibold",e),...t}));K9.displayName=E8.displayName;const Y9=p.forwardRef(({className:e,...t},o)=>b.jsx(S8,{ref:o,className:R0("text-base",e),...t}));Y9.displayName=S8.displayName;const J9=p.forwardRef(({className:e,...t},o)=>b.jsx(_8,{ref:o,className:R0(H3(),e),...t}));J9.displayName=_8.displayName;const em=p.forwardRef(({className:e,...t},o)=>b.jsx(B8,{ref:o,className:R0(H3({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));em.displayName=B8.displayName;const bY=p.lazy(()=>m1(()=>import("./index-EiGE3Aiy.js"),[],import.meta.url)),Vf=e=>b.jsx(p.Suspense,{fallback:b.jsx("div",{}),children:b.jsx(bY,{...e})}),Xd=p.forwardRef(({className:e,...t},o)=>b.jsx(G7,{ref:o,className:R0("relative flex h-8 w-8 shrink-0 overflow-hidden rounded-full",e),...t}));Xd.displayName=G7.displayName;const Dd=p.forwardRef(({className:e,...t},o)=>b.jsx(Z7,{ref:o,className:R0("aspect-square h-full w-full",e),...t}));Dd.displayName=Z7.displayName;const Id=p.forwardRef(({className:e,...t},o)=>b.jsx(K7,{ref:o,className:R0("flex h-full w-full items-center justify-center rounded-full bg-muted [&_svg]:size-4",e),...t}));Id.displayName=K7.displayName;const zY=Ao("inline-flex items-center rounded-sm border px-1.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground/70",destructive:"border-transparent bg-destructive/20 text-destructive",success:"border-transparent bg-green/20 text-green",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function uY({className:e,variant:t,...o}){return b.jsx("div",{className:R0(zY({variant:t}),e),...o})}const dY=Ao("relative block rounded-lg transition-all duration-300",{variants:{variant:{default:"border border-border bg-background shadow-sm hover:shadow-md dark:border-gray-900 dark:bg-gray-925",gradient:["cursor-pointer border border-gray-100 bg-white dark:border-gray-950 dark:bg-black","shadow-[rgb(75_225_226_/_28%)_-7px_-6px_42px_8px,rgb(202_103_255_/_32%)_7px_6px_42px_8px]","dark:shadow-[rgb(75_225_226_/_36%)_-7px_-6px_42px_8px,rgb(202_103_255_/_38%)_7px_6px_42px_8px]","hover:shadow-[rgb(75_225_226_/_38%)_-7px_-4px_42px_10px,rgb(202_103_255_/_42%)_7px_8px_42px_10px]","dark:hover:shadow-[rgb(75_225_226_/_50%)_-7px_-4px_42px_10px,rgb(202_103_255_/_52%)_7px_8px_42px_10px]","hover:translate-y-[-2px] hover:scale-[1.01]"],info:"bg-blue-50 border-blue-200 dark:bg-blue-950/30 dark:border-blue-800 border",success:"bg-green-50 border-green-200 dark:bg-green-950/30 dark:border-green-800 border",warning:"bg-yellow-50 border-yellow-200 dark:bg-yellow-950/30 dark:border-yellow-800 border",destructive:"bg-white shadow-sm dark:bg-gray-950"},size:{sm:"p-2 text-sm",md:"p-3",lg:"p-4"}},defaultVariants:{variant:"default",size:"md"}}),U3=p.forwardRef((e,t)=>{const{variant:o,size:n,dismissible:r=!1,onDismiss:a,role:i="status",className:l,children:z,...u}=e,f=O=>{O.preventDefault(),O.stopPropagation(),r&&a&&a()};return b.jsxs("div",{ref:t,className:R0(dY({variant:o,size:n}),l),role:i,...u,children:[r&&b.jsx(i1,{"aria-label":"Dismiss notification",className:"absolute right-1 top-1 size-8 text-gray-600 dark:text-gray-500 dark:hover:text-gray-300",size:"icon",variant:"ghost",onClick:f,children:b.jsx(jd,{className:"size-5"})}),z]})});U3.displayName="Banner";const os=ud,tm=dd,OY=Od,fY=L3,om=p.forwardRef(({className:e,...t},o)=>b.jsx(Ga,{ref:o,className:R0("fixed inset-0 z-50 bg-black/30 backdrop-blur-none transform-gpu data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=open]:backdrop-blur-[3px]",e),...t}));om.displayName=Ga.displayName;const pc=p.forwardRef(({className:e,children:t,...o},n)=>b.jsx(OY,{children:b.jsxs("div",{className:ho,children:[b.jsx(om,{}),b.jsx(Za,{ref:n,className:R0("fixed left-[50%] top-[8vmin] z-50 grid w-full max-w-lg translate-x-[-50%] gap-6 bg-background dark:bg-[#101114] p-6 shadow-lg duration-200 transform-gpu data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2 sm:rounded-lg outline-none",e),...o,children:t})]})}));pc.displayName=Za.displayName;const V3=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});V3.displayName="DialogHeader";const Q3=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 sm:items-end [&_button]:min-w-20",e),...t});Q3.displayName="DialogFooter";const $3=p.forwardRef(({className:e,...t},o)=>b.jsx(Ka,{ref:o,className:R0("text-xl font-semibold leading-none tracking-tight",e),...t}));$3.displayName=Ka.displayName;const nm=p.forwardRef(({className:e,...t},o)=>b.jsx(Ya,{ref:o,className:R0("text-sm text-muted-foreground",e),...t}));nm.displayName=Ya.displayName;var Uz=["Enter"," "],AY=["ArrowDown","PageUp","Home"],rm=["ArrowUp","PageDown","End"],hY=[...AY,...rm],qY={ltr:[...Uz,"ArrowRight"],rtl:[...Uz,"ArrowLeft"]},mY={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ns="Menu",[xa,gY,WY]=c7(ns),[Kn,cm]=Y2(ns,[WY,bn,i7]),G3=bn(),am=i7(),[vY,Yn]=Kn(ns),[RY,rs]=Kn(ns),sm=e=>{const{__scopeMenu:t,open:o=!1,children:n,dir:r,onOpenChange:a,modal:i=!0}=e,l=G3(t),[z,u]=p.useState(null),f=p.useRef(!1),O=Tt(a),h=a7(r);return p.useEffect(()=>{const q=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",q,{capture:!0}),()=>{document.removeEventListener("keydown",q,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),b.jsx(b3,{...l,children:b.jsx(vY,{scope:t,open:o,onOpenChange:O,content:z,onContentChange:u,children:b.jsx(RY,{scope:t,onClose:p.useCallback(()=>O(!1),[O]),isUsingKeyboardRef:f,dir:h,modal:i,children:n})})})};sm.displayName=ns;var yY="MenuAnchor",Fd=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e,r=G3(o);return b.jsx(Da,{...r,...n,ref:t})});Fd.displayName=yY;var Hd="MenuPortal",[wY,im]=Kn(Hd,{forceMount:void 0}),pm=e=>{const{__scopeMenu:t,forceMount:o,children:n,container:r}=e,a=Yn(Hd,t);return b.jsx(wY,{scope:t,forceMount:o,children:b.jsx(q2,{present:o||a.open,children:b.jsx(nc,{asChild:!0,container:r,children:n})})})};pm.displayName=Hd;var Q2="MenuContent",[LY,Ud]=Kn(Q2),Mm=p.forwardRef((e,t)=>{const o=im(Q2,e.__scopeMenu),{forceMount:n=o.forceMount,...r}=e,a=Yn(Q2,e.__scopeMenu),i=rs(Q2,e.__scopeMenu);return b.jsx(xa.Provider,{scope:e.__scopeMenu,children:b.jsx(q2,{present:n||a.open,children:b.jsx(xa.Slot,{scope:e.__scopeMenu,children:i.modal?b.jsx(xY,{...r,ref:t}):b.jsx(kY,{...r,ref:t})})})})}),xY=p.forwardRef((e,t)=>{const o=Yn(Q2,e.__scopeMenu),n=p.useRef(null),r=B1(t,n);return p.useEffect(()=>{const a=n.current;if(a)return Yu(a)},[]),b.jsx(Vd,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:E0(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),kY=p.forwardRef((e,t)=>{const o=Yn(Q2,e.__scopeMenu);return b.jsx(Vd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),CY=Qr("MenuContent.ScrollLock"),Vd=p.forwardRef((e,t)=>{const{__scopeMenu:o,loop:n=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:z,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:O,onInteractOutside:h,onDismiss:q,disableOutsideScroll:g,...W}=e,v=Yn(Q2,o),y=rs(Q2,o),k=G3(o),C=am(o),L=gY(o),[x,w]=p.useState(null),P=p.useRef(null),H=B1(t,P,v.onContentChange),o0=p.useRef(0),Y=p.useRef(""),K=p.useRef(0),n0=p.useRef(null),J=p.useRef("right"),i0=p.useRef(0),L0=g?h3:p.Fragment,Z=g?{as:CY,allowPinchZoom:!0}:void 0,m0=X=>{const G=Y.current+X,N=L().filter(u0=>!u0.disabled),I=document.activeElement,c0=N.find(u0=>u0.ref.current===I)?.textValue,h0=N.map(u0=>u0.textValue),d0=FY(h0,G,c0),v0=N.find(u0=>u0.textValue===d0)?.ref.current;(function u0(e0){Y.current=e0,window.clearTimeout(o0.current),e0!==""&&(o0.current=window.setTimeout(()=>u0(""),1e3))})(G),v0&&setTimeout(()=>v0.focus())};p.useEffect(()=>()=>window.clearTimeout(o0.current),[]),Ku();const $=p.useCallback(X=>J.current===n0.current?.side&&UY(X,n0.current?.area),[]);return b.jsx(LY,{scope:o,searchRef:Y,onItemEnter:p.useCallback(X=>{$(X)&&X.preventDefault()},[$]),onItemLeave:p.useCallback(X=>{$(X)||(P.current?.focus(),w(null))},[$]),onTriggerLeave:p.useCallback(X=>{$(X)&&X.preventDefault()},[$]),pointerGraceTimerRef:K,onPointerGraceIntentChange:p.useCallback(X=>{n0.current=X},[]),children:b.jsx(L0,{...Z,children:b.jsx(f3,{asChild:!0,trapped:r,onMountAutoFocus:E0(a,X=>{X.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:b.jsx(oc,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:O,onInteractOutside:h,onDismiss:q,children:b.jsx(_j,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:x,onCurrentTabStopIdChange:w,onEntryFocus:E0(z,X=>{y.isUsingKeyboardRef.current||X.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(z3,{role:"menu","aria-orientation":"vertical","data-state":ym(v.open),"data-radix-menu-content":"",dir:y.dir,...k,...W,ref:H,style:{outline:"none",...W.style},onKeyDown:E0(W.onKeyDown,X=>{const N=X.target.closest("[data-radix-menu-content]")===X.currentTarget,I=X.ctrlKey||X.altKey||X.metaKey,c0=X.key.length===1;N&&(X.key==="Tab"&&X.preventDefault(),!I&&c0&&m0(X.key));const h0=P.current;if(X.target!==h0||!hY.includes(X.key))return;X.preventDefault();const v0=L().filter(u0=>!u0.disabled).map(u0=>u0.ref.current);rm.includes(X.key)&&v0.reverse(),DY(v0)}),onBlur:E0(e.onBlur,X=>{X.currentTarget.contains(X.target)||(window.clearTimeout(o0.current),Y.current="")}),onPointerMove:E0(e.onPointerMove,ka(X=>{const G=X.target,N=i0.current!==X.clientX;if(X.currentTarget.contains(G)&&N){const I=X.clientX>i0.current?"right":"left";J.current=I,i0.current=X.clientX}}))})})})})})})});Mm.displayName=Q2;var NY="MenuGroup",Qd=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e;return b.jsx(R1.div,{role:"group",...n,ref:t})});Qd.displayName=NY;var _Y="MenuLabel",lm=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e;return b.jsx(R1.div,{...n,ref:t})});lm.displayName=_Y;var Pp="MenuItem",Qf="menu.itemSelect",Z3=p.forwardRef((e,t)=>{const{disabled:o=!1,onSelect:n,...r}=e,a=p.useRef(null),i=rs(Pp,e.__scopeMenu),l=Ud(Pp,e.__scopeMenu),z=B1(t,a),u=p.useRef(!1),f=()=>{const O=a.current;if(!o&&O){const h=new CustomEvent(Qf,{bubbles:!0,cancelable:!0});O.addEventListener(Qf,q=>n?.(q),{once:!0}),Nh(O,h),h.defaultPrevented?u.current=!1:i.onClose()}};return b.jsx(bm,{...r,ref:z,disabled:o,onClick:E0(e.onClick,f),onPointerDown:O=>{e.onPointerDown?.(O),u.current=!0},onPointerUp:E0(e.onPointerUp,O=>{u.current||O.currentTarget?.click()}),onKeyDown:E0(e.onKeyDown,O=>{const h=l.searchRef.current!=="";o||h&&O.key===" "||Uz.includes(O.key)&&(O.currentTarget.click(),O.preventDefault())})})});Z3.displayName=Pp;var bm=p.forwardRef((e,t)=>{const{__scopeMenu:o,disabled:n=!1,textValue:r,...a}=e,i=Ud(Pp,o),l=am(o),z=p.useRef(null),u=B1(t,z),[f,O]=p.useState(!1),[h,q]=p.useState("");return p.useEffect(()=>{const g=z.current;g&&q((g.textContent??"").trim())},[a.children]),b.jsx(xa.ItemSlot,{scope:o,disabled:n,textValue:r??h,children:b.jsx(Bj,{asChild:!0,...l,focusable:!n,children:b.jsx(R1.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:u,onPointerMove:E0(e.onPointerMove,ka(g=>{n?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:E0(e.onPointerLeave,ka(g=>i.onItemLeave(g))),onFocus:E0(e.onFocus,()=>O(!0)),onBlur:E0(e.onBlur,()=>O(!1))})})})}),BY="MenuCheckboxItem",zm=p.forwardRef((e,t)=>{const{checked:o=!1,onCheckedChange:n,...r}=e;return b.jsx(Am,{scope:e.__scopeMenu,checked:o,children:b.jsx(Z3,{role:"menuitemcheckbox","aria-checked":jp(o)?"mixed":o,...r,ref:t,"data-state":Gd(o),onSelect:E0(r.onSelect,()=>n?.(jp(o)?!0:!o),{checkForDefaultPrevented:!1})})})});zm.displayName=BY;var um="MenuRadioGroup",[EY,SY]=Kn(um,{value:void 0,onValueChange:()=>{}}),dm=p.forwardRef((e,t)=>{const{value:o,onValueChange:n,...r}=e,a=Tt(n);return b.jsx(EY,{scope:e.__scopeMenu,value:o,onValueChange:a,children:b.jsx(Qd,{...r,ref:t})})});dm.displayName=um;var Om="MenuRadioItem",fm=p.forwardRef((e,t)=>{const{value:o,...n}=e,r=SY(Om,e.__scopeMenu),a=o===r.value;return b.jsx(Am,{scope:e.__scopeMenu,checked:a,children:b.jsx(Z3,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":Gd(a),onSelect:E0(n.onSelect,()=>r.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});fm.displayName=Om;var $d="MenuItemIndicator",[Am,TY]=Kn($d,{checked:!1}),hm=p.forwardRef((e,t)=>{const{__scopeMenu:o,forceMount:n,...r}=e,a=TY($d,o);return b.jsx(q2,{present:n||jp(a.checked)||a.checked===!0,children:b.jsx(R1.span,{...r,ref:t,"data-state":Gd(a.checked)})})});hm.displayName=$d;var PY="MenuSeparator",qm=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e;return b.jsx(R1.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});qm.displayName=PY;var jY="MenuArrow",mm=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e,r=G3(o);return b.jsx(u3,{...r,...n,ref:t})});mm.displayName=jY;var XY="MenuSub",[ac0,gm]=Kn(XY),ba="MenuSubTrigger",Wm=p.forwardRef((e,t)=>{const o=Yn(ba,e.__scopeMenu),n=rs(ba,e.__scopeMenu),r=gm(ba,e.__scopeMenu),a=Ud(ba,e.__scopeMenu),i=p.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:z}=a,u={__scopeMenu:e.__scopeMenu},f=p.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return p.useEffect(()=>f,[f]),p.useEffect(()=>{const O=l.current;return()=>{window.clearTimeout(O),z(null)}},[l,z]),b.jsx(Fd,{asChild:!0,...u,children:b.jsx(bm,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":r.contentId,"data-state":ym(o.open),...e,ref:Vn(t,r.onTriggerChange),onClick:O=>{e.onClick?.(O),!(e.disabled||O.defaultPrevented)&&(O.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:E0(e.onPointerMove,ka(O=>{a.onItemEnter(O),!O.defaultPrevented&&!e.disabled&&!o.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{o.onOpenChange(!0),f()},100))})),onPointerLeave:E0(e.onPointerLeave,ka(O=>{f();const h=o.content?.getBoundingClientRect();if(h){const q=o.content?.dataset.side,g=q==="right",W=g?-5:5,v=h[g?"left":"right"],y=h[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:O.clientX+W,y:O.clientY},{x:v,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:v,y:h.bottom}],side:q}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(O),O.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:E0(e.onKeyDown,O=>{const h=a.searchRef.current!=="";e.disabled||h&&O.key===" "||qY[n.dir].includes(O.key)&&(o.onOpenChange(!0),o.content?.focus(),O.preventDefault())})})})});Wm.displayName=ba;var vm="MenuSubContent",Rm=p.forwardRef((e,t)=>{const o=im(Q2,e.__scopeMenu),{forceMount:n=o.forceMount,...r}=e,a=Yn(Q2,e.__scopeMenu),i=rs(Q2,e.__scopeMenu),l=gm(vm,e.__scopeMenu),z=p.useRef(null),u=B1(t,z);return b.jsx(xa.Provider,{scope:e.__scopeMenu,children:b.jsx(q2,{present:n||a.open,children:b.jsx(xa.Slot,{scope:e.__scopeMenu,children:b.jsx(Vd,{id:l.contentId,"aria-labelledby":l.triggerId,...r,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&z.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:E0(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:E0(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:E0(e.onKeyDown,f=>{const O=f.currentTarget.contains(f.target),h=mY[i.dir].includes(f.key);O&&h&&(a.onOpenChange(!1),l.trigger?.focus(),f.preventDefault())})})})})})});Rm.displayName=vm;function ym(e){return e?"open":"closed"}function jp(e){return e==="indeterminate"}function Gd(e){return jp(e)?"indeterminate":e?"checked":"unchecked"}function DY(e){const t=document.activeElement;for(const o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function IY(e,t){return e.map((o,n)=>e[(t+n)%e.length])}function FY(e,t,o){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1;let i=IY(e,Math.max(a,0));r.length===1&&(i=i.filter(u=>u!==o));const z=i.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return z!==o?z:void 0}function HY(e,t){const{x:o,y:n}=e;let r=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],z=t[i],u=l.x,f=l.y,O=z.x,h=z.y;f>n!=h>n&&o<(O-u)*(n-f)/(h-f)+u&&(r=!r)}return r}function UY(e,t){if(!t)return!1;const o={x:e.clientX,y:e.clientY};return HY(o,t)}function ka(e){return t=>t.pointerType==="mouse"?e(t):void 0}var VY=sm,QY=Fd,$Y=pm,GY=Mm,ZY=Qd,KY=lm,YY=Z3,JY=zm,eJ=dm,tJ=fm,oJ=hm,nJ=qm,rJ=mm,cJ=Wm,aJ=Rm,K3="DropdownMenu",[sJ]=Y2(K3,[cm]),n2=cm(),[iJ,wm]=sJ(K3),Lm=e=>{const{__scopeDropdownMenu:t,children:o,dir:n,open:r,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,z=n2(t),u=p.useRef(null),[f,O]=Qn({prop:r,defaultProp:a??!1,onChange:i,caller:K3});return b.jsx(iJ,{scope:t,triggerId:ft(),triggerRef:u,contentId:ft(),open:f,onOpenChange:O,onOpenToggle:p.useCallback(()=>O(h=>!h),[O]),modal:l,children:b.jsx(VY,{...z,open:f,onOpenChange:O,dir:n,modal:l,children:o})})};Lm.displayName=K3;var xm="DropdownMenuTrigger",km=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,disabled:n=!1,...r}=e,a=wm(xm,o),i=n2(o);return b.jsx(QY,{asChild:!0,...i,children:b.jsx(R1.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...r,ref:Vn(t,a.triggerRef),onPointerDown:E0(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:E0(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});km.displayName=xm;var pJ="DropdownMenuPortal",Cm=e=>{const{__scopeDropdownMenu:t,...o}=e,n=n2(t);return b.jsx($Y,{...n,...o})};Cm.displayName=pJ;var Nm="DropdownMenuContent",_m=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=wm(Nm,o),a=n2(o),i=p.useRef(!1);return b.jsx(GY,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...n,ref:t,onCloseAutoFocus:E0(e.onCloseAutoFocus,l=>{i.current||r.triggerRef.current?.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:E0(e.onInteractOutside,l=>{const z=l.detail.originalEvent,u=z.button===0&&z.ctrlKey===!0,f=z.button===2||u;(!r.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});_m.displayName=Nm;var MJ="DropdownMenuGroup",Bm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(ZY,{...r,...n,ref:t})});Bm.displayName=MJ;var lJ="DropdownMenuLabel",Em=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(KY,{...r,...n,ref:t})});Em.displayName=lJ;var bJ="DropdownMenuItem",Sm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(YY,{...r,...n,ref:t})});Sm.displayName=bJ;var zJ="DropdownMenuCheckboxItem",Tm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(JY,{...r,...n,ref:t})});Tm.displayName=zJ;var uJ="DropdownMenuRadioGroup",dJ=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(eJ,{...r,...n,ref:t})});dJ.displayName=uJ;var OJ="DropdownMenuRadioItem",Pm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(tJ,{...r,...n,ref:t})});Pm.displayName=OJ;var fJ="DropdownMenuItemIndicator",jm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(oJ,{...r,...n,ref:t})});jm.displayName=fJ;var AJ="DropdownMenuSeparator",Xm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(nJ,{...r,...n,ref:t})});Xm.displayName=AJ;var hJ="DropdownMenuArrow",qJ=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(rJ,{...r,...n,ref:t})});qJ.displayName=hJ;var mJ="DropdownMenuSubTrigger",Dm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(cJ,{...r,...n,ref:t})});Dm.displayName=mJ;var gJ="DropdownMenuSubContent",Im=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(aJ,{...r,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Im.displayName=gJ;var WJ=Lm,vJ=km,RJ=Cm,Fm=_m,yJ=Bm,Hm=Em,Um=Sm,Vm=Tm,Qm=Pm,$m=jm,Gm=Xm,Zm=Dm,Km=Im;const Ym=WJ,Jm=vJ,sc0=yJ,wJ=p.forwardRef(({className:e,inset:t,children:o,...n},r)=>b.jsxs(Zm,{ref:r,className:R0("flex cursor-default gap-2 select-none hover:bg-accent items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[o,b.jsx(F3,{className:"ml-auto"})]}));wJ.displayName=Zm.displayName;const LJ=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{className:ho,children:b.jsx(Km,{ref:o,className:R0("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));LJ.displayName=Km.displayName;const Zd=p.forwardRef(({className:e,sideOffset:t=4,...o},n)=>b.jsx(RJ,{children:b.jsx("div",{className:ho,children:b.jsx(Fm,{ref:n,className:R0("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),sideOffset:t,...o})})}));Zd.displayName=Fm.displayName;const eg=p.forwardRef(({className:e,inset:t,...o},n)=>b.jsx(Um,{ref:n,className:R0("relative flex cursor-default select-none cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));eg.displayName=Um.displayName;const xJ=p.forwardRef(({className:e,children:t,checked:o,...n},r)=>b.jsxs(Vm,{ref:r,checked:o,className:R0("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:b.jsx($m,{children:b.jsx(S9,{className:"size-4"})})}),t]}));xJ.displayName=Vm.displayName;const kJ=p.forwardRef(({className:e,children:t,...o},n)=>b.jsxs(Qm,{ref:n,className:R0("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[b.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:b.jsx($m,{children:b.jsx(aZ,{className:"size-2 fill-current"})})}),t]}));kJ.displayName=Qm.displayName;const CJ=p.forwardRef(({className:e,inset:t,...o},n)=>b.jsx(Hm,{ref:n,className:R0("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));CJ.displayName=Hm.displayName;const Pn=p.forwardRef(({className:e,...t},o)=>b.jsx(Gm,{ref:o,className:R0("-mx-1 my-1 h-px bg-muted",e),...t}));Pn.displayName=Gm.displayName;const tg=p.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...n},r)=>b.jsx(Sh,{ref:r,className:R0("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),decorative:o,orientation:t,...n}));tg.displayName=Sh.displayName;const NJ=FD,_J=HD,Sb=VD,og=p.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},r)=>b.jsx(UD,{children:b.jsx("div",{className:ho,children:b.jsx(Aq,{ref:r,align:t,className:R0("z-50 rounded-md bg-white dark:bg-gray-950 p-5 text-popover-foreground shadow-md border outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),sideOffset:o,...n})})}));og.displayName=Aq.displayName;const BJ=Ao("peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",{variants:{size:{default:"h-5 w-9",sm:"h-4 w-7"}},defaultVariants:{size:"default"}}),EJ=Ao("pointer-events-none block rounded-full bg-background ring-0 transition-transform [filter:drop-shadow(0_1px_2px_rgba(0,0,0,0.07))] data-[state=unchecked]:translate-x-0",{variants:{size:{default:"size-4 data-[state=checked]:translate-x-4",sm:"size-3 data-[state=checked]:translate-x-3"}},defaultVariants:{size:"default"}}),ng=p.forwardRef(({className:e,size:t,...o},n)=>b.jsx(A7,{className:R0(BJ({size:t,className:e})),...o,ref:n,children:b.jsx(jj,{className:R0(EJ({size:t}))})}));ng.displayName=A7.displayName;const SJ=vX,TJ=RX,PJ=yX,rg=p.forwardRef(({className:e,sideOffset:t=4,...o},n)=>b.jsx(wX,{children:b.jsx("div",{className:ho,children:b.jsx(D7,{ref:n,className:R0("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),sideOffset:t,...o})})}));rg.displayName=D7.displayName;var Tb,Y3="HoverCard",[cg]=Y2(Y3,[bn]),J3=bn(),[jJ,eM]=cg(Y3),ag=e=>{const{__scopeHoverCard:t,children:o,open:n,defaultOpen:r,onOpenChange:a,openDelay:i=700,closeDelay:l=300}=e,z=J3(t),u=p.useRef(0),f=p.useRef(0),O=p.useRef(!1),h=p.useRef(!1),[q,g]=Qn({prop:n,defaultProp:r??!1,onChange:a,caller:Y3}),W=p.useCallback(()=>{clearTimeout(f.current),u.current=window.setTimeout(()=>g(!0),i)},[i,g]),v=p.useCallback(()=>{clearTimeout(u.current),!O.current&&!h.current&&(f.current=window.setTimeout(()=>g(!1),l))},[l,g]),y=p.useCallback(()=>g(!1),[g]);return p.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(f.current)},[]),b.jsx(jJ,{scope:t,open:q,onOpenChange:g,onOpen:W,onClose:v,onDismiss:y,hasSelectionRef:O,isPointerDownOnContentRef:h,children:b.jsx(b3,{...z,children:o})})};ag.displayName=Y3;var sg="HoverCardTrigger",ig=p.forwardRef((e,t)=>{const{__scopeHoverCard:o,...n}=e,r=eM(sg,o),a=J3(o);return b.jsx(Da,{asChild:!0,...a,children:b.jsx(R1.a,{"data-state":r.open?"open":"closed",...n,ref:t,onPointerEnter:E0(e.onPointerEnter,Dp(r.onOpen)),onPointerLeave:E0(e.onPointerLeave,Dp(r.onClose)),onFocus:E0(e.onFocus,r.onOpen),onBlur:E0(e.onBlur,r.onClose),onTouchStart:E0(e.onTouchStart,i=>i.preventDefault())})})});ig.displayName=sg;var Kd="HoverCardPortal",[XJ,DJ]=cg(Kd,{forceMount:void 0}),pg=e=>{const{__scopeHoverCard:t,forceMount:o,children:n,container:r}=e,a=eM(Kd,t);return b.jsx(XJ,{scope:t,forceMount:o,children:b.jsx(q2,{present:o||a.open,children:b.jsx(nc,{asChild:!0,container:r,children:n})})})};pg.displayName=Kd;var Xp="HoverCardContent",Mg=p.forwardRef((e,t)=>{const o=DJ(Xp,e.__scopeHoverCard),{forceMount:n=o.forceMount,...r}=e,a=eM(Xp,e.__scopeHoverCard);return b.jsx(q2,{present:n||a.open,children:b.jsx(IJ,{"data-state":a.open?"open":"closed",...r,onPointerEnter:E0(e.onPointerEnter,Dp(a.onOpen)),onPointerLeave:E0(e.onPointerLeave,Dp(a.onClose)),ref:t})})});Mg.displayName=Xp;var IJ=p.forwardRef((e,t)=>{const{__scopeHoverCard:o,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,...l}=e,z=eM(Xp,o),u=J3(o),f=p.useRef(null),O=B1(t,f),[h,q]=p.useState(!1);return p.useEffect(()=>{if(h){const g=document.body;return Tb=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=Tb,g.style.webkitUserSelect=Tb}}},[h]),p.useEffect(()=>{if(f.current){const g=()=>{q(!1),z.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(z.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),z.hasSelectionRef.current=!1,z.isPointerDownOnContentRef.current=!1}}},[z.isPointerDownOnContentRef,z.hasSelectionRef]),p.useEffect(()=>{f.current&&UJ(f.current).forEach(W=>W.setAttribute("tabindex","-1"))}),b.jsx(oc,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:E0(a,g=>{g.preventDefault()}),onDismiss:z.onDismiss,children:b.jsx(z3,{...u,...l,onPointerDown:E0(l.onPointerDown,g=>{g.currentTarget.contains(g.target)&&q(!0),z.hasSelectionRef.current=!1,z.isPointerDownOnContentRef.current=!0}),ref:O,style:{...l.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),FJ="HoverCardArrow",HJ=p.forwardRef((e,t)=>{const{__scopeHoverCard:o,...n}=e,r=J3(o);return b.jsx(u3,{...r,...n,ref:t})});HJ.displayName=FJ;function Dp(e){return t=>t.pointerType==="touch"?void 0:e()}function UJ(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;o.nextNode();)t.push(o.currentNode);return t}var VJ=ag,QJ=ig,$J=pg,lg=Mg;const GJ=VJ,ZJ=QJ,bg=p.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},r)=>b.jsx($J,{children:b.jsx("div",{className:ho,children:b.jsx(lg,{ref:r,align:t,className:R0("pointer-events-auto z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]",e),sideOffset:o,...n})})}));bg.displayName=lg.displayName;const KJ=Ao("rounded-full",{variants:{variant:{neutral:"bg-muted",info:"bg-blue-500",success:"bg-green-500",error:"bg-red-500",warning:"bg-yellow-500"},state:{idle:"",active:"animate-pulse",inactive:"border-2 bg-transparent"},size:{sm:"size-2",md:"size-3",lg:"size-4"}},compoundVariants:[{variant:"neutral",state:"inactive",className:"border-muted-foreground"},{variant:"info",state:"inactive",className:"border-blue-500"},{variant:"success",state:"inactive",className:"border-green-500"},{variant:"error",state:"inactive",className:"border-red-500"},{variant:"warning",state:"inactive",className:"border-yellow-500"}],defaultVariants:{variant:"success",state:"idle",size:"sm"}});function $f({className:e,variant:t,state:o,size:n,label:r,...a}){return b.jsxs("span",{className:"inline-flex items-center",...a,children:[b.jsx("span",{"aria-hidden":"true",className:R0(KJ({variant:t,state:o,size:n}),e)}),r&&b.jsx("span",{className:"sr-only",children:r})]})}const tM=p.forwardRef(({className:e,type:t,...o},n)=>b.jsx("input",{ref:n,className:R0("flex h-9 w-full rounded-md border border-transparent bg-gray-150 dark:bg-gray-900 px-3 py-1 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:bg-transparent focus-visible:border-green focus-visible:shadow-[0_0_0_2px_rgba(48,207,67,.25)] disabled:cursor-not-allowed disabled:opacity-50",e),type:t,...o}));tM.displayName="Input";function YJ({className:e,...t}){return b.jsx("kbd",{className:R0("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium m-0 shadow-none border-none text-shadow-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",e),"data-slot":"kbd",...t})}function j1({containerClassName:e,count:t=1,randomize:o=!1,minWidth:n=70,maxWidth:r=100,className:a,...i}){const{randomWidths:l,keys:z}=p.useMemo(()=>{const u=[],f=[];for(let O=0;O<t;O++){if(o){const h=Math.floor((r-n)/5),q=Math.floor(Math.random()*(h+1)),g=n+q*5;u.push(`${g}%`)}f.push(`skeleton-${crypto.randomUUID()}`)}return{randomWidths:u,keys:f}},[t,o,n,r]);return b.jsx("span",{className:e,children:Array.from({length:t}).map((u,f)=>b.jsxs(l0.Fragment,{children:[b.jsx("span",{className:R0("inline-flex w-full leading-none animate-pulse rounded-[2px] bg-primary/10",a),style:o?{width:l[f]}:void 0,...i,children:"‌"}),b.jsx("br",{})]},z[f]))})}const JJ=l0.forwardRef(({className:e,lines:t=5,...o},n)=>t<1?b.jsx(b.Fragment,{}):b.jsx("div",{ref:n,className:R0("flex flex-col gap-2",e),...o,children:Array.from({length:t},(r,a)=>{let i="66%";switch(a%5){case 0:i="57%";break;case 1:i="33%";break;case 2:i="40%";break;case 3:i="48%";break;case 4:i="24%";break}return b.jsxs("div",{className:"flex justify-between gap-6",children:[b.jsx("div",{className:"grow",style:{maxWidth:i},children:b.jsx(j1,{})}),b.jsx(j1,{className:"w-[60px] self-end"})]},a)})}));JJ.displayName="SkeletonTable";const Ip=({size:e="md",color:t="dark",className:o=""})=>{let n="relative mx-0 my-[-0.5] box-border inline-block animate-spin rounded-full before:z-10 before:block before:rounded-full before:content-['']";switch(e){case"sm":n+=" h-[16px] w-[16px] border-2 before:mt-[10px] before:h-[3px] before:w-[3px]";break;case"md":n+=" h-[20px] w-[20px] border-2 before:mt-[13px] before:h-[3px] before:w-[3px]";break;case"lg":default:n+=" h-[50px] w-[50px] border before:mt-[7px] before:h-[7px] before:w-[7px]";break}switch(t){case"light":n+=" border-white/20 before:bg-white dark:border-black/10 dark:before:bg-black";break;case"dark":default:n+=" border-black/10 before:bg-black dark:border-white/20 dark:before:bg-white";break}return b.jsx("div",{className:`${n} ${o}`})},ic0=()=>b.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-3",children:b.jsx("div",{className:"flex size-20 items-center justify-center rounded-full",children:b.jsxs("div",{className:"-mt-1.5 flex items-end gap-2",children:[b.jsx(j1,{className:"h-10 w-3"}),b.jsx(j1,{className:"h-14 w-3"}),b.jsx(j1,{className:"h-6 w-3"})]})})}),e00=({className:e="",children:t})=>b.jsx("div",{className:`my-10 flex flex-col items-center gap-1 text-sm text-grey-600 ${e}`,children:t}),t00=({className:e="",children:t})=>b.jsx("div",{className:`text-grey-500 [&>svg]:size-8 [&>svg]:stroke-[1px] ${e}`,children:t}),o00=ud,pc0=dd,n00=Od,zg=p.forwardRef(({className:e,...t},o)=>b.jsx(Ga,{className:R0("fixed inset-0 z-50 bg-black/10 data-[state=open]:animate-in duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));zg.displayName=Ga.displayName;const r00=Ao("fixed z-50 gap-4 bg-background p-8 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ug=p.forwardRef(({side:e="right",className:t,children:o,...n},r)=>b.jsx(n00,{children:b.jsxs("div",{className:ho,children:[b.jsx(zg,{}),b.jsxs(Za,{ref:r,className:R0(r00({side:e}),t),...n,children:[b.jsxs(L3,{className:"fixed right-4 top-4 z-50 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[b.jsx(jd,{className:"size-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]}),o]})]})}));ug.displayName=Za.displayName;const c00=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col space-y-1 text-center sm:text-left",e),...t});c00.displayName="SheetHeader";const a00=p.forwardRef(({className:e,...t},o)=>b.jsx(Ka,{ref:o,className:R0("text-xl font-semibold text-foreground",e),...t}));a00.displayName=Ka.displayName;const s00=p.forwardRef(({className:e,...t},o)=>b.jsx(Ya,{ref:o,className:R0("text-sm text-muted-foreground",e),...t}));s00.displayName=Ya.displayName;const dg=801;function Pb(){return window.innerWidth<dg}function i00(){const[e,t]=p.useState(Pb());return p.useEffect(()=>{const o=window.matchMedia(`(max-width: ${dg-1}px)`),n=()=>{t(Pb())};return o.addEventListener("change",n),t(Pb()),()=>o.removeEventListener("change",n)},[]),e}const p00="sidebar:state",M00=3600*24*7,l00="30rem",b00="28rem",z00="4rem",u00="b",oM="[34px]",Og=p.createContext(null);function Jn(){const e=p.useContext(Og);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const fg=p.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:o,className:n,style:r,children:a,...i},l)=>{const z=i00(),[u,f]=p.useState(!1),[O,h]=p.useState(e),q=t??O,g=p.useCallback(k=>{const C=typeof k=="function"?k(q):k;o?o(C):h(C),document.cookie=`${p00}=${C}; path=/; max-age=${M00}`},[o,q]),W=p.useCallback(()=>z?f(k=>!k):g(k=>!k),[z,g,f]);p.useEffect(()=>{const k=C=>{C.key===u00&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),W())};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[W]);const v=q?"expanded":"collapsed",y=p.useMemo(()=>({state:v,open:q,setOpen:g,isMobile:z,openMobile:u,setOpenMobile:f,toggleSidebar:W}),[v,q,g,z,u,f,W]);return b.jsx(Og.Provider,{value:y,children:b.jsx(SJ,{delayDuration:0,children:b.jsx("div",{ref:l,className:R0("group/sidebar-wrapper relative flex h-full w-full has-[[data-variant=inset]]:bg-sidebar",n),style:{"--sidebar-width":l00,"--sidebar-width-icon":z00,...r},...i,children:a})})})});fg.displayName="SidebarProvider";const Ag=p.forwardRef(({side:e="left",variant:t="sidebar",collapsible:o="offcanvas",className:n,children:r,...a},i)=>{const{isMobile:l,state:z,openMobile:u,setOpenMobile:f}=Jn();return o==="none"?b.jsx("div",{ref:i,className:R0("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",n),role:"navigation",...a,children:r}):l?b.jsx(o00,{open:u,onOpenChange:f,...a,children:b.jsx(ug,{className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar",role:"navigation",side:e,style:{"--sidebar-width":b00},children:b.jsx("div",{className:"flex size-full flex-col",children:r})})}):b.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":z==="collapsed"?o:"","data-side":e,"data-state":z,"data-variant":t,role:"navigation",children:[b.jsx("div",{className:R0("relative h-full w-[--sidebar-width] bg-transparent","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),b.jsx("div",{className:R0("absolute inset-y-0 z-10 hidden h-full w-[--sidebar-width] md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] border-sidebar-border group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...a,children:b.jsx("div",{className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow","data-sidebar":"sidebar",children:r})})]})});Ag.displayName="Sidebar";const hg=p.forwardRef(({children:e,className:t,onClick:o,...n},r)=>{const{toggleSidebar:a}=Jn();return b.jsx(i1,{ref:r,className:R0("h-7 w-7",t),"data-sidebar":"trigger",size:"icon",variant:"ghost",onClick:i=>{o?.(i),a()},...n,children:e||b.jsxs(b.Fragment,{children:[b.jsx(XZ,{}),b.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})})});hg.displayName="SidebarTrigger";const d00=p.forwardRef(({className:e,...t},o)=>{const{toggleSidebar:n}=Jn();return b.jsx("button",{ref:o,"aria-label":"Toggle Sidebar",className:R0("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),"data-sidebar":"rail",tabIndex:-1,title:"Toggle Sidebar",type:"button",onClick:n,...t})});d00.displayName="SidebarRail";const qg=p.forwardRef(({className:e,...t},o)=>b.jsx("main",{ref:o,className:R0("relative flex h-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));qg.displayName="SidebarInset";const O00=p.forwardRef(({className:e,...t},o)=>b.jsx(tM,{ref:o,className:R0("w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",`h-${oM}`,e),"data-sidebar":"input",...t}));O00.displayName="SidebarInput";const mg=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("flex flex-col gap-2 p-2",e),"data-sidebar":"header",...t}));mg.displayName="SidebarHeader";const gg=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("flex flex-col gap-2 p-2",e),"data-sidebar":"footer",...t}));gg.displayName="SidebarFooter";const f00=p.forwardRef(({className:e,...t},o)=>b.jsx(tg,{ref:o,className:R0("mx-2 w-auto bg-sidebar-border",e),"data-sidebar":"separator",...t}));f00.displayName="SidebarSeparator";const Wg=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("flex min-h-0 flex-1 flex-col gap-4 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),"data-sidebar":"content",...t}));Wg.displayName="SidebarContent";const Mc=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("relative flex w-full min-w-0 flex-col p-2",e),"data-sidebar":"group",...t}));Mc.displayName="SidebarGroup";const A00=p.forwardRef(({className:e,asChild:t=!1,...o},n)=>{const r=t?ic:"div";return b.jsx(r,{ref:n,className:R0("duration-200 flex shrink-0 items-center rounded-md px-3 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",`h-${oM}`,e),"data-sidebar":"group-label",...o})});A00.displayName="SidebarGroupLabel";const h00=p.forwardRef(({className:e,asChild:t=!1,...o},n)=>{const r=t?ic:"button";return b.jsx(r,{ref:n,className:R0("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),"data-sidebar":"group-action",...o})});h00.displayName="SidebarGroupAction";const cs=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("w-full text-sm",e),"data-sidebar":"group-content",...t}));cs.displayName="SidebarGroupContent";const lc=p.forwardRef(({className:e,...t},o)=>b.jsx("ul",{ref:o,className:R0("flex w-full min-w-0 flex-col gap-0.5",e),"data-sidebar":"menu",...t}));lc.displayName="SidebarMenu";const Yd=p.forwardRef(({className:e,...t},o)=>b.jsx("li",{ref:o,className:R0("group/menu-item relative",e),"data-sidebar":"menu-item",...t}));Yd.displayName="SidebarMenuItem";const q00=Ao("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md px-3 py-2 text-left text-md font-medium text-sidebar-foreground outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:`h-${oM} text-md`,sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),nM=p.forwardRef(({asChild:e=!1,isActive:t=!1,variant:o="default",size:n="default",tooltip:r,className:a,...i},l)=>{const z=e?ic:"button",{isMobile:u,state:f}=Jn(),O=b.jsx(z,{ref:l,className:R0(q00({variant:o,size:n}),a),"data-active":t,"data-sidebar":"menu-button","data-size":n,...i});return r?(typeof r=="string"&&(r={children:r}),b.jsxs(TJ,{children:[b.jsx(PJ,{asChild:!0,children:O}),b.jsx(rg,{align:"center",hidden:f!=="collapsed"||u,side:"right",...r})]})):O});nM.displayName="SidebarMenuButton";const m00=p.forwardRef(({className:e,asChild:t=!1,showOnHover:o=!1,...n},r)=>{const a=t?ic:"button";return b.jsx(a,{ref:r,className:R0("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",o&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),"data-sidebar":"menu-action",...n})});m00.displayName="SidebarMenuAction";const Jd=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("absolute right-2 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-sm font-medium tabular-nums text-gray-600 select-none pointer-events-none","peer-hover/menu-button: peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1.5","peer-data-[size=default]/menu-button:top-2","peer-data-[size=lg]/menu-button:top-3","group-data-[collapsible=icon]:hidden",e),"data-sidebar":"menu-badge",...t}));Jd.displayName="SidebarMenuBadge";const g00=p.forwardRef(({className:e,showIcon:t=!1,...o},n)=>{const r=p.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return b.jsxs("div",{ref:n,className:R0("rounded-md flex gap-2 px-3 items-center",`h-${oM}`,e),"data-sidebar":"menu-skeleton",...o,children:[t&&b.jsx(j1,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),b.jsx(j1,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});g00.displayName="SidebarMenuSkeleton";const W00=p.forwardRef(({className:e,...t},o)=>b.jsx("ul",{ref:o,className:R0("mx-3.5 flex min-w-0 translate-x-px flex-col gap-0.5 border-l border-sidebar-border px-3 py-0.5","group-data-[collapsible=icon]:hidden",e),"data-sidebar":"menu-sub",...t}));W00.displayName="SidebarMenuSub";const v00=p.forwardRef(({...e},t)=>b.jsx("li",{ref:t,...e}));v00.displayName="SidebarMenuSubItem";const R00=p.forwardRef(({asChild:e=!1,size:t="md",isActive:o,className:n,...r},a)=>{const i=e?ic:"a";return b.jsx(i,{ref:a,className:R0("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-3 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),"data-active":o,"data-sidebar":"menu-sub-button","data-size":t,...r})});R00.displayName="SidebarMenuSubButton";const Fp=p.forwardRef(({className:e,onBackToDashboard:t,...o},n)=>b.jsx("div",{ref:n,className:R0("admin-x-container-error",e),...o,children:b.jsxs("div",{className:"admin-x-error max-w-xl",children:[b.jsx("h1",{children:"Loading interrupted"}),b.jsx("p",{children:"They say life is a series of trials and tribulations. This moment right here? It's a tribulation. Our app was supposed to load, and yet here we are. Loadless. Click back to the dashboard to try again."}),b.jsx("a",{className:"cursor-pointer text-green",onClick:t,children:"← Back to the dashboard"})]})}));Fp.displayName="ErrorPage";const vg=p.forwardRef(({className:e,...t},o)=>b.jsx("h1",{ref:o,className:R0("scroll-m-20 text-3xl leading-[1.1em] tracking-tighter font-bold",e),...t}));vg.displayName="H1";const y00=p.forwardRef(({className:e,...t},o)=>b.jsx("h2",{ref:o,className:R0("scroll-m-20 text-2xl font-bold tracking-tighter first:mt-0",e),...t}));y00.displayName="H2";const Rg=p.forwardRef(({className:e,...t},o)=>b.jsx("h3",{ref:o,className:R0("scroll-m-20 text-xl font-semibold tracking-tight",e),...t}));Rg.displayName="H3";const V2=p.forwardRef(({className:e,...t},o)=>b.jsx("h4",{ref:o,className:R0("scroll-m-20 text-lg font-semibold tracking-tight",e),...t}));V2.displayName="H4";const w00=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("text-xs text-muted-foreground tracking-wide font-medium uppercase",e),...t}));w00.displayName="HTable";const Vz=new Map;p.createContext({saveScrollPosition:()=>{},getScrollPosition:()=>{},resetScrollPosition:()=>{}});function L00(e){Vz.delete(e)}function x00({containerRef:e}){const t=Pe(),o=p.useRef(null),n=p.useRef(null);return p.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const i=r.scrollTop;Vz.set(t.pathname,i),n.current=i};return r.addEventListener("scroll",a),()=>r.removeEventListener("scroll",a)},[t.pathname,e]),p.useEffect(()=>{const r=e.current;if(!r)return;const a=Vz.get(t.pathname);a!==void 0&&o.current!==t.pathname&&Math.abs(a-r.scrollTop)>5&&(r.scrollTop=a)},[t.pathname,e]),p.useEffect(()=>{o.current=t.pathname},[t.pathname]),null}function k00({routes:e,prefix:t,errorElement:o,children:n}){const r=p.useMemo(()=>{const a=`/${t?.replace(/\/+/g,"/").replace(/^\/|\/$/g,"")}`,i={element:b.jsx(xH,{children:n}),children:e.map(l=>({...l,errorElement:l.errorElement||o||b.jsx(Fp,{})}))};return fH([i],{basename:a})},[e,t,o,n]);return b.jsx(FF,{router:r})}function yg(){const e=Va(),{externalNavigate:t}=Ea();return p.useCallback((o,n)=>{if(typeof o=="number"){e(o);return}if(n?.crossApp){t({route:o,isExternal:!0});return}e(o,n)},[e,t])}function C00(){const e=xF();return e&&Object.keys(e).length>0}function ro({to:e,replace:t,state:o,crossApp:n}){const{externalNavigate:r}=Ea();return n?(r({route:e,isExternal:!0}),null):b.jsx(VF,{replace:t,state:o,to:e})}function w1(e){return()=>e().then(({default:t})=>({Component:t}))}const N00="FeaturebaseTokenResponseType",_00={staleTime:7200*60*1e3,refetchInterval:8640*60*1e3,refetchIntervalInBackground:!0},B00=Xt({dataType:N00,path:"/featurebase/token/"}),E00=(e={})=>B00({..._00,...e}),wg=p.createContext(void 0);function Lg(){const e=p.useContext(wg);if(e===void 0)throw new Error("useEmberContext must be used within an EmberProvider");return e}const Gf=l0.memo(function(){const t=p.useRef(null),{isFallbackPresent:o}=Lg();return p.useLayoutEffect(()=>{if(t.current){const n=document.getElementById("ember-app");if(n)t.current.appendChild(n);else throw new Error("Ember app not found")}return()=>{const n=document.getElementById("ember-app");if(n)document.body.appendChild(n);else throw new Error("Ember app not found")}},[]),b.jsx("div",{ref:t,hidden:!o,className:"h-full w-full"})});function S00({children:e}){const[t,o]=p.useState(0),n=p.useCallback(()=>{o(l=>l+1)},[]),r=p.useCallback(()=>{o(l=>Math.max(0,l-1))},[]),i={isFallbackPresent:t>0,registerFallback:n,unregisterFallback:r};return b.jsx(wg.Provider,{value:i,children:e})}function Qz(){const{registerFallback:e,unregisterFallback:t}=Lg();return p.useEffect(()=>(e(),()=>{t()}),[e,t]),null}const xg="ConfigResponseType",Mc0=xg,as=Xt({dataType:xg,path:"/config/"}),T00=e=>{var t,o;return!!((o=(t=e?.hostSettings)==null?void 0:t.managedEmail)!=null&&o.enabled)},P00=e=>{var t,o;const n=(o=(t=e?.hostSettings)==null?void 0:t.managedEmail)==null?void 0:o.sendingDomain;return typeof n=="string"&&n.length>0},j00=e=>{var t,o;return(o=(t=e?.hostSettings)==null?void 0:t.managedEmail)==null?void 0:o.sendingDomain},X00={integration:"IntegrationsResponseType",invite:"InvitesResponseType",offer:"OffersResponseType",newsletter:"NewslettersResponseType",recommendation:"RecommendationResponseType",setting:"SettingsResponseType",theme:"ThemesResponseType",tier:"TiersResponseType",user:"UsersResponseType",post:"PostsResponseType",member:"MembersResponseType",tag:"TagsResponseType",label:"LabelsResponseType",webhook:"WebhooksResponseType"};function kg(e){if(typeof window>"u")return()=>{};if(window.EmberBridge?.state)return e(window.EmberBridge.state),()=>{};const t=setInterval(()=>{window.EmberBridge?.state&&(clearInterval(t),e(window.EmberBridge.state))},100);return()=>clearInterval(t)}function rM(e,t){let o=null,n=!0;const r=kg(a=>{n&&(a.on(e,t),o=()=>a.off(e,t))});return()=>{n=!1,r(),o?.()}}function D00(){const e=v1();p.useEffect(()=>rM("emberDataChange",o=>{const{modelName:n}=o,r=X00[n];r&&e.invalidateQueries({predicate:a=>a.queryKey[0]===r})}),[e])}function I00(){const e=v1();p.useEffect(()=>rM("emberAuthChange",o=>{o.isAuthenticated&&e.invalidateQueries()}),[e])}function Cg(){const[e,t]=p.useState(null);return p.useEffect(()=>rM("subscriptionChange",n=>{t(n)}),[]),e}function F00(e){return rM("sidebarVisibilityChange",e)}function Zf(){return window.EmberBridge?.state.sidebarVisible??!0}function e5(){return p.useSyncExternalStore(F00,Zf,Zf)}const H00={getRouteUrl:e=>e,isRouteActive:()=>!1};function Ng(){const[e,t]=p.useState(()=>window.EmberBridge?.state??null),[,o]=p.useState(0);return p.useEffect(()=>{if(!e)return kg(t);const n=()=>{o(r=>r+1)};return e.on("routeChange",n),()=>e.off("routeChange",n)},[e]),e?{getRouteUrl:e.getRouteUrl,isRouteActive:e.isRouteActive}:H00}function U00(){const{data:e}=as(),t=Cg();return!(!e?.config?.hostSettings?.forceUpgrade||t?.subscription?.status==="active")}function V00(){const e=U00(),o=id().some(n=>n.handle?.allowInForceUpgrade===!0);return e&&!o?b.jsx(ro,{to:"/pro",replace:!0}):b.jsx(En,{})}const ss=qq,lc0=Wq({dataType:ss,path:"/users/",defaultSearchParams:{limit:"100",include:"roles"},defaultNextPageParams:(e,t)=>{var o;return{...t,page:(((o=e.meta)==null?void 0:o.pagination.next)||1).toString()}},returnData:e=>{const{pages:t}=e,o=t.flatMap(r=>r.users),n=t[t.length-1].meta;return{users:o,meta:n,isEnd:n?n.pagination.pages===n.pagination.page:!0}}}),bc0=vq({dataType:ss,path:e=>`/users/slug/${e}/`,defaultSearchParams:{include:"roles"}}),_g=Ve({method:"PUT",path:e=>`/users/${e.id}/`,body:e=>({users:[e]}),searchParams:()=>({include:"roles"}),updateQueries:{dataType:ss,emberUpdateType:"createOrUpdate",update:Rq("users")}}),zc0=Ve({method:"DELETE",path:e=>`/users/${e}/`,updateQueries:{dataType:ss,emberUpdateType:"delete",update:OI("users")}}),uc0=Ve({method:"PUT",path:()=>"/users/password/",body:({newPassword:e,confirmNewPassword:t,userId:o,oldPassword:n})=>({password:[{user_id:o,oldPassword:n||"",newPassword:e,ne2Password:t}]})}),dc0=Ve({method:"PUT",path:()=>"/users/owner/",body:e=>({owner:[{id:e}]}),updateQueries:{dataType:ss,emberUpdateType:"createOrUpdate",update:Rq("users")}});function is(e){return e.roles.some(t=>t.name==="Owner")}function cM(e){return e.roles.some(t=>t.name==="Administrator")}function Bg(e){return e.roles.some(o=>o.name==="Editor")||e.roles.some(o=>o.name==="Super Editor")}function Q00(e){return e.roles.some(t=>t.name==="Super Editor")}function $00(e){return e.roles.some(t=>t.name==="Author")}function ps(e){return e.roles.some(t=>t.name==="Contributor")}function Oc0(e){return $00(e)||ps(e)}function G00(e){return is(e)||cM(e)||Bg(e)}function Z00(e){return is(e)||cM(e)||Q00(e)}function K00(e){return is(e)||cM(e)||Bg(e)}function Y00(e){return is(e)||cM(e)}const J00="SiteResponseType",aM=Xt({dataType:J00,path:"/site/"});function fc0(e){const t=new URL(e.url),o=t.pathname.endsWith("/")?t.pathname:`${t.pathname}/`;return`${t.origin}${o}`}function e10(e,t){if(T00(t)&&P00(t))return j00(t)||"";const o=new URL(e.url).hostname||"";return o.startsWith("www.")?o.replace(/^(www)\.(?=[^/]*\..{2,5})/,""):o}function Ac0(e,t,o){const n=e10(t,o);return e==="noreply"?`noreply@${n}`:e}const $z=navigator.userAgent.indexOf("Mac")!==-1?"command":"ctrl",t10=$z==="command"?"⌘K":"Ctrl+K",o10=e=>{e.preventDefault();const t=new KeyboardEvent("keydown",{key:"k",keyCode:75,metaKey:$z==="command",ctrlKey:$z==="ctrl"});document.dispatchEvent(t)};function n10({...e}){const{data:t}=ye(),o=aM(),n=o.data?.site.title??"",r=o.data?.site.icon??"https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",a=t&&!ps(t);return b.jsx(mg,{...e,children:b.jsxs("div",{className:"flex flex-col items-stretch gap-6",children:[b.jsx("div",{className:"flex items-center justify-between",children:b.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[b.jsx("div",{className:"w-8 h-8 rounded-md bg-transparent border-0 flex-shrink-0",children:b.jsx("img",{src:r,alt:"Site icon",className:"w-full h-full rounded-md object-cover"})}),b.jsx("div",{className:"font-semibold text-[15px] text-foreground overflow-hidden text-ellipsis whitespace-nowrap flex-1",children:n})]})}),a&&b.jsxs(i1,{variant:"outline",className:"flex items-center justify-between text-muted-foreground hover:text-gray-700 hover:bg-background text-base [&_svg]:stroke-2 pr-2 shadow-xs hover:shadow-sm hover:border-gray-200 dark:hover:border-gray-800 h-[38px] dark:bg-gray-950",onClick:o10,children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Sd,{className:"text-muted-foreground"}),"Search site"]}),b.jsx(YJ,{className:"text-gray-500 bg-transparent shadow-none dark:text-gray-800",style:{textShadow:"none"},children:t10})]})]})})}function a0(e,t,o){function n(l,z){var u;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(u=l._zod).traits??(u.traits=new Set),l._zod.traits.add(e),t(l,z);for(const f in i.prototype)f in l||Object.defineProperty(l,f,{value:i.prototype[f].bind(l)});l._zod.constr=i,l._zod.def=z}const r=o?.Parent??Object;class a extends r{}Object.defineProperty(a,"name",{value:e});function i(l){var z;const u=o?.Parent?new a:this;n(u,l),(z=u._zod).deferred??(z.deferred=[]);for(const f of u._zod.deferred)f();return u}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:l=>o?.Parent&&l instanceof o.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Hr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Eg extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Sg={};function sn(e){return Sg}function r10(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,r])=>t.indexOf(+n)===-1).map(([n,r])=>r)}function Gz(e,t){return typeof t=="bigint"?t.toString():t}function t5(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function o5(e){return e==null}function n5(e){const t=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(t,o)}const Kf=Symbol("evaluating");function k1(e,t,o){let n;Object.defineProperty(e,t,{get(){if(n!==Kf)return n===void 0&&(n=Kf,n=o()),n},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function er(e,t,o){Object.defineProperty(e,t,{value:o,writable:!0,enumerable:!0,configurable:!0})}function tr(...e){const t={};for(const o of e){const n=Object.getOwnPropertyDescriptors(o);Object.assign(t,n)}return Object.defineProperties({},t)}function Yf(e){return JSON.stringify(e)}const Tg="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Hp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const c10=t5(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Kr(e){if(Hp(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const o=t.prototype;return!(Hp(o)===!1||Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)}function Pg(e){return Kr(e)?{...e}:Array.isArray(e)?[...e]:e}const a10=new Set(["string","number","symbol"]);function sM(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dn(e,t,o){const n=new e._zod.constr(t??e._zod.def);return(!t||o?.parent)&&(n._zod.parent=e),n}function Q0(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function s10(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function i10(e,t){const o=e._zod.def,n=tr(e._zod.def,{get shape(){const r={};for(const a in t){if(!(a in o.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(r[a]=o.shape[a])}return er(this,"shape",r),r},checks:[]});return dn(e,n)}function p10(e,t){const o=e._zod.def,n=tr(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const a in t){if(!(a in o.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete r[a]}return er(this,"shape",r),r},checks:[]});return dn(e,n)}function M10(e,t){if(!Kr(t))throw new Error("Invalid input to extend: expected a plain object");const o=e._zod.def.checks;if(o&&o.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=tr(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return er(this,"shape",a),a},checks:[]});return dn(e,r)}function l10(e,t){if(!Kr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const o={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return er(this,"shape",n),n},checks:e._zod.def.checks};return dn(e,o)}function b10(e,t){const o=tr(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return er(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return dn(e,o)}function z10(e,t,o){const n=tr(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(o)for(const i in o){if(!(i in r))throw new Error(`Unrecognized key: "${i}"`);o[i]&&(a[i]=e?new e({type:"optional",innerType:r[i]}):r[i])}else for(const i in r)a[i]=e?new e({type:"optional",innerType:r[i]}):r[i];return er(this,"shape",a),a},checks:[]});return dn(t,n)}function u10(e,t,o){const n=tr(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(o)for(const i in o){if(!(i in a))throw new Error(`Unrecognized key: "${i}"`);o[i]&&(a[i]=new e({type:"nonoptional",innerType:r[i]}))}else for(const i in r)a[i]=new e({type:"nonoptional",innerType:r[i]});return er(this,"shape",a),a},checks:[]});return dn(t,n)}function _r(e,t=0){if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(e.issues[o]?.continue!==!0)return!0;return!1}function Br(e,t){return t.map(o=>{var n;return(n=o).path??(n.path=[]),o.path.unshift(e),o})}function Ti(e){return typeof e=="string"?e:e?.message}function pn(e,t,o){const n={...e,path:e.path??[]};if(!e.message){const r=Ti(e.inst?._zod.def?.error?.(e))??Ti(t?.error?.(e))??Ti(o.customError?.(e))??Ti(o.localeError?.(e))??"Invalid input";n.message=r}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function r5(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ca(...e){const[t,o,n]=e;return typeof t=="string"?{message:t,code:"custom",input:o,inst:n}:{...t}}const jg=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Gz,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Xg=a0("$ZodError",jg),iM=a0("$ZodError",jg,{Parent:Error});function d10(e,t=o=>o.message){const o={},n=[];for(const r of e.issues)r.path.length>0?(o[r.path[0]]=o[r.path[0]]||[],o[r.path[0]].push(t(r))):n.push(t(r));return{formErrors:n,fieldErrors:o}}function O10(e,t=o=>o.message){const o={_errors:[]},n=r=>{for(const a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(i=>n({issues:i}));else if(a.code==="invalid_key")n({issues:a.issues});else if(a.code==="invalid_element")n({issues:a.issues});else if(a.path.length===0)o._errors.push(t(a));else{let i=o,l=0;for(;l<a.path.length;){const z=a.path[l];l===a.path.length-1?(i[z]=i[z]||{_errors:[]},i[z]._errors.push(t(a))):i[z]=i[z]||{_errors:[]},i=i[z],l++}}};return n(e),o}const pM=e=>(t,o,n,r)=>{const a=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:o,issues:[]},a);if(i instanceof Promise)throw new Hr;if(i.issues.length){const l=new(r?.Err??e)(i.issues.map(z=>pn(z,a,sn())));throw Tg(l,r?.callee),l}return i.value},hc0=pM(iM),MM=e=>async(t,o,n,r)=>{const a=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:o,issues:[]},a);if(i instanceof Promise&&(i=await i),i.issues.length){const l=new(r?.Err??e)(i.issues.map(z=>pn(z,a,sn())));throw Tg(l,r?.callee),l}return i.value},qc0=MM(iM),lM=e=>(t,o,n)=>{const r=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:o,issues:[]},r);if(a instanceof Promise)throw new Hr;return a.issues.length?{success:!1,error:new(e??Xg)(a.issues.map(i=>pn(i,r,sn())))}:{success:!0,data:a.value}},f10=lM(iM),bM=e=>async(t,o,n)=>{const r=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:o,issues:[]},r);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(i=>pn(i,r,sn())))}:{success:!0,data:a.value}},A10=bM(iM),h10=e=>(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return pM(e)(t,o,r)},q10=e=>(t,o,n)=>pM(e)(t,o,n),m10=e=>async(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return MM(e)(t,o,r)},g10=e=>async(t,o,n)=>MM(e)(t,o,n),W10=e=>(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return lM(e)(t,o,r)},v10=e=>(t,o,n)=>lM(e)(t,o,n),R10=e=>async(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return bM(e)(t,o,r)},y10=e=>async(t,o,n)=>bM(e)(t,o,n),w10=/^[cC][^\s-]{8,}$/,L10=/^[0-9a-z]+$/,x10=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,k10=/^[0-9a-vA-V]{20}$/,C10=/^[A-Za-z0-9]{27}$/,N10=/^[a-zA-Z0-9_-]{21}$/,_10=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,B10=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Jf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,E10=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,S10="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function T10(){return new RegExp(S10,"u")}const P10=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,j10=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,X10=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,D10=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,I10=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Dg=/^[A-Za-z0-9_-]*$/,F10=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,H10=/^\+(?:[0-9]){6,14}[0-9]$/,Ig="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",U10=new RegExp(`^${Ig}$`);function Fg(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function V10(e){return new RegExp(`^${Fg(e)}$`)}function Q10(e){const t=Fg({precision:e.precision}),o=["Z"];e.local&&o.push(""),e.offset&&o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${o.join("|")})`;return new RegExp(`^${Ig}T(?:${n})$`)}const $10=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},G10=/^(?:true|false)$/i,Z10=/^[^A-Z]*$/,K10=/^[^a-z]*$/,ot=a0("$ZodCheck",(e,t)=>{var o;e._zod??(e._zod={}),e._zod.def=t,(o=e._zod).onattach??(o.onattach=[])}),Hg={number:"number",bigint:"bigint",object:"date"},Y10=a0("$ZodCheckLessThan",(e,t)=>{ot.init(e,t);const o=Hg[typeof t.value];e._zod.onattach.push(n=>{const r=n._zod.bag,a=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:o,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),J10=a0("$ZodCheckGreaterThan",(e,t)=>{ot.init(e,t);const o=Hg[typeof t.value];e._zod.onattach.push(n=>{const r=n._zod.bag,a=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:o,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ee0=a0("$ZodCheckMaxLength",(e,t)=>{var o;ot.init(e,t),(o=e._zod.def).when??(o.when=n=>{const r=n.value;return!o5(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const i=r5(r);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),te0=a0("$ZodCheckMinLength",(e,t)=>{var o;ot.init(e,t),(o=e._zod.def).when??(o.when=n=>{const r=n.value;return!o5(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const i=r5(r);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),oe0=a0("$ZodCheckLengthEquals",(e,t)=>{var o;ot.init(e,t),(o=e._zod.def).when??(o.when=n=>{const r=n.value;return!o5(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=n=>{const r=n.value,a=r.length;if(a===t.length)return;const i=r5(r),l=a>t.length;n.issues.push({origin:i,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),zM=a0("$ZodCheckStringFormat",(e,t)=>{var o,n;ot.init(e,t),e._zod.onattach.push(r=>{const a=r._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(o=e._zod).check??(o.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),ne0=a0("$ZodCheckRegex",(e,t)=>{zM.init(e,t),e._zod.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),re0=a0("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Z10),zM.init(e,t)}),ce0=a0("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=K10),zM.init(e,t)}),ae0=a0("$ZodCheckIncludes",(e,t)=>{ot.init(e,t);const o=sM(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${o}`:o);t.pattern=n,e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),se0=a0("$ZodCheckStartsWith",(e,t)=>{ot.init(e,t);const o=new RegExp(`^${sM(t.prefix)}.*`);t.pattern??(t.pattern=o),e._zod.onattach.push(n=>{const r=n._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(o)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ie0=a0("$ZodCheckEndsWith",(e,t)=>{ot.init(e,t);const o=new RegExp(`.*${sM(t.suffix)}$`);t.pattern??(t.pattern=o),e._zod.onattach.push(n=>{const r=n._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(o)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),pe0=a0("$ZodCheckOverwrite",(e,t)=>{ot.init(e,t),e._zod.check=o=>{o.value=t.tx(o.value)}});class Me0{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
600
+ `),p.createElement("g",null,p.createElement("path",{d:"M12.333333333333332 7.333333333333333a4.333333333333333 4.333333333333333 0 1 0 -7.333333333333333 3.126666666666667v1.88a1 1 0 0 0 2 0 1 1 0 0 0 2 0 1 1 0 1 0 2 0v-1.88a4.326666666666666 4.326666666666666 0 0 0 1.3333333333333333 -3.126666666666667Zm-6.253333333333334 1a1 1 0 1 1 1 -1 1 1 0 0 1 -1 1Zm4 0a1 1 0 1 1 1 -1 1 1 0 0 1 -1 1Z",fill:"currentColor",strokeWidth:.6667}),p.createElement("path",{d:"m1.8666666666666665 3.28 1.22 1.22a0.3466666666666667 0.3466666666666667 0 0 0 0.26666666666666666 0.09333333333333334 0.35333333333333333 0.35333333333333333 0 0 0 0.24666666666666665 -0.14666666666666667 5.133333333333333 5.133333333333333 0 0 1 0.8066666666666666 -0.9733333333333333 0.3133333333333333 0.3133333333333333 0 0 0 0.09999999999999999 -0.2333333333333333 0.3666666666666667 0.3666666666666667 0 0 0 -0.09333333333333334 -0.24666666666666665L3.28 1.8666666666666665A1.1666666666666665 1.1666666666666665 0 0 0 1.8399999999999999 0.11333333333333334a0.6666666666666666 0.6666666666666666 0 0 0 -0.3666666666666667 0.48l-0.09999999999999999 0.5133333333333333a0.31999999999999995 0.31999999999999995 0 0 1 -0.26 0.26666666666666666l-0.52 0.09999999999999999a0.6666666666666666 0.6666666666666666 0 0 0 -0.48 0.3666666666666667A1.1666666666666665 1.1666666666666665 0 0 0 1.8666666666666665 3.28Z",fill:"currentColor",strokeWidth:.6667}),p.createElement("path",{d:"M12.4 4.446666666666666a0.35333333333333333 0.35333333333333333 0 0 0 0.24666666666666665 0.14666666666666667 0.3466666666666667 0.3466666666666667 0 0 0 0.26666666666666666 -0.09333333333333334l1.22 -1.22a1.1666666666666665 1.1666666666666665 0 0 0 1.7533333333333332 -1.44 0.6666666666666666 0.6666666666666666 0 0 0 -0.48 -0.3666666666666667l-0.52 -0.09999999999999999a0.31999999999999995 0.31999999999999995 0 0 1 -0.26 -0.26666666666666666l-0.09999999999999999 -0.5133333333333333a0.6666666666666666 0.6666666666666666 0 0 0 -0.3666666666666667 -0.48 1.1666666666666665 1.1666666666666665 0 0 0 -1.44 1.7533333333333332l-1.1333333333333333 1.1266666666666665a0.3666666666666667 0.3666666666666667 0 0 0 -0.09333333333333334 0.24666666666666665 0.3133333333333333 0.3133333333333333 0 0 0 0.09999999999999999 0.2333333333333333 5.133333333333333 5.133333333333333 0 0 1 0.8066666666666666 0.9733333333333333Z",fill:"currentColor",strokeWidth:.6667}),p.createElement("path",{d:"M3.6 11.559999999999999a0.33999999999999997 0.33999999999999997 0 0 0 -0.26666666666666666 -0.15333333333333332 0.3466666666666667 0.3466666666666667 0 0 0 -0.26666666666666666 0.09333333333333334l-1.2 1.22a1.1666666666666665 1.1666666666666665 0 0 0 -1.7533333333333332 1.44 0.6666666666666666 0.6666666666666666 0 0 0 0.48 0.3666666666666667l0.52 0.09999999999999999a0.31999999999999995 0.31999999999999995 0 0 1 0.26 0.26666666666666666l0.09999999999999999 0.5133333333333333a0.6666666666666666 0.6666666666666666 0 0 0 0.3666666666666667 0.48 1.1666666666666665 1.1666666666666665 0 0 0 1.44 -1.7533333333333332l1.1333333333333333 -1.1266666666666665a0.36 0.36 0 0 0 0.09333333333333334 -0.24 0.31999999999999995 0.31999999999999995 0 0 0 -0.09999999999999999 -0.24 5.333333333333333 5.333333333333333 0 0 1 -0.8066666666666666 -0.9666666666666666Z",fill:"currentColor",strokeWidth:.6667}),p.createElement("path",{d:"m14.133333333333333 12.719999999999999 -1.22 -1.22a0.3466666666666667 0.3466666666666667 0 0 0 -0.26666666666666666 -0.09333333333333334 0.33999999999999997 0.33999999999999997 0 0 0 -0.24666666666666665 0.15333333333333332 5.333333333333333 5.333333333333333 0 0 1 -0.8066666666666666 0.9666666666666666 0.31999999999999995 0.31999999999999995 0 0 0 -0.09999999999999999 0.24 0.36 0.36 0 0 0 0.09333333333333334 0.24l1.1333333333333333 1.1266666666666665a1.1666666666666665 1.1666666666666665 0 0 0 1.44 1.7533333333333332 0.6666666666666666 0.6666666666666666 0 0 0 0.3666666666666667 -0.48l0.09999999999999999 -0.5133333333333333a0.31999999999999995 0.31999999999999995 0 0 1 0.26 -0.26666666666666666l0.52 -0.09999999999999999a0.6666666666666666 0.6666666666666666 0 0 0 0.48 -0.3666666666666667 1.1666666666666665 1.1666666666666665 0 0 0 -1.7533333333333332 -1.44Z",fill:"currentColor",strokeWidth:.6667}))),GK="data:image/svg+xml,%3csvg%20height='16'%20id='Skull-2--Streamline-Ultimate'%20viewBox='0%200%2016%2016'%20width='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cdesc%3e%20Skull%202%20Streamline%20Icon:%20https://streamlinehq.com%20%3c/desc%3e%3cg%3e%3cpath%20d='M12.333333333333332%207.333333333333333a4.333333333333333%204.333333333333333%200%201%200%20-7.333333333333333%203.126666666666667v1.88a1%201%200%200%200%202%200%201%201%200%200%200%202%200%201%201%200%201%200%202%200v-1.88a4.326666666666666%204.326666666666666%200%200%200%201.3333333333333333%20-3.126666666666667Zm-6.253333333333334%201a1%201%200%201%201%201%20-1%201%201%200%200%201%20-1%201Zm4%200a1%201%200%201%201%201%20-1%201%201%200%200%201%20-1%201Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='m1.8666666666666665%203.28%201.22%201.22a0.3466666666666667%200.3466666666666667%200%200%200%200.26666666666666666%200.09333333333333334%200.35333333333333333%200.35333333333333333%200%200%200%200.24666666666666665%20-0.14666666666666667%205.133333333333333%205.133333333333333%200%200%201%200.8066666666666666%20-0.9733333333333333%200.3133333333333333%200.3133333333333333%200%200%200%200.09999999999999999%20-0.2333333333333333%200.3666666666666667%200.3666666666666667%200%200%200%20-0.09333333333333334%20-0.24666666666666665L3.28%201.8666666666666665A1.1666666666666665%201.1666666666666665%200%200%200%201.8399999999999999%200.11333333333333334a0.6666666666666666%200.6666666666666666%200%200%200%20-0.3666666666666667%200.48l-0.09999999999999999%200.5133333333333333a0.31999999999999995%200.31999999999999995%200%200%201%20-0.26%200.26666666666666666l-0.52%200.09999999999999999a0.6666666666666666%200.6666666666666666%200%200%200%20-0.48%200.3666666666666667A1.1666666666666665%201.1666666666666665%200%200%200%201.8666666666666665%203.28Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='M12.4%204.446666666666666a0.35333333333333333%200.35333333333333333%200%200%200%200.24666666666666665%200.14666666666666667%200.3466666666666667%200.3466666666666667%200%200%200%200.26666666666666666%20-0.09333333333333334l1.22%20-1.22a1.1666666666666665%201.1666666666666665%200%200%200%201.7533333333333332%20-1.44%200.6666666666666666%200.6666666666666666%200%200%200%20-0.48%20-0.3666666666666667l-0.52%20-0.09999999999999999a0.31999999999999995%200.31999999999999995%200%200%201%20-0.26%20-0.26666666666666666l-0.09999999999999999%20-0.5133333333333333a0.6666666666666666%200.6666666666666666%200%200%200%20-0.3666666666666667%20-0.48%201.1666666666666665%201.1666666666666665%200%200%200%20-1.44%201.7533333333333332l-1.1333333333333333%201.1266666666666665a0.3666666666666667%200.3666666666666667%200%200%200%20-0.09333333333333334%200.24666666666666665%200.3133333333333333%200.3133333333333333%200%200%200%200.09999999999999999%200.2333333333333333%205.133333333333333%205.133333333333333%200%200%201%200.8066666666666666%200.9733333333333333Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='M3.6%2011.559999999999999a0.33999999999999997%200.33999999999999997%200%200%200%20-0.26666666666666666%20-0.15333333333333332%200.3466666666666667%200.3466666666666667%200%200%200%20-0.26666666666666666%200.09333333333333334l-1.2%201.22a1.1666666666666665%201.1666666666666665%200%200%200%20-1.7533333333333332%201.44%200.6666666666666666%200.6666666666666666%200%200%200%200.48%200.3666666666666667l0.52%200.09999999999999999a0.31999999999999995%200.31999999999999995%200%200%201%200.26%200.26666666666666666l0.09999999999999999%200.5133333333333333a0.6666666666666666%200.6666666666666666%200%200%200%200.3666666666666667%200.48%201.1666666666666665%201.1666666666666665%200%200%200%201.44%20-1.7533333333333332l1.1333333333333333%20-1.1266666666666665a0.36%200.36%200%200%200%200.09333333333333334%20-0.24%200.31999999999999995%200.31999999999999995%200%200%200%20-0.09999999999999999%20-0.24%205.333333333333333%205.333333333333333%200%200%201%20-0.8066666666666666%20-0.9666666666666666Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3cpath%20d='m14.133333333333333%2012.719999999999999%20-1.22%20-1.22a0.3466666666666667%200.3466666666666667%200%200%200%20-0.26666666666666666%20-0.09333333333333334%200.33999999999999997%200.33999999999999997%200%200%200%20-0.24666666666666665%200.15333333333333332%205.333333333333333%205.333333333333333%200%200%201%20-0.8066666666666666%200.9666666666666666%200.31999999999999995%200.31999999999999995%200%200%200%20-0.09999999999999999%200.24%200.36%200.36%200%200%200%200.09333333333333334%200.24l1.1333333333333333%201.1266666666666665a1.1666666666666665%201.1666666666666665%200%200%200%201.44%201.7533333333333332%200.6666666666666666%200.6666666666666666%200%200%200%200.3666666666666667%20-0.48l0.09999999999999999%20-0.5133333333333333a0.31999999999999995%200.31999999999999995%200%200%201%200.26%20-0.26666666666666666l0.52%20-0.09999999999999999a0.6666666666666666%200.6666666666666666%200%200%200%200.48%20-0.3666666666666667%201.1666666666666665%201.1666666666666665%200%200%200%20-1.7533333333333332%20-1.44Z'%20fill='currentColor'%20strokeWidth='0.6667'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",ZK=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:$K,default:GK},Symbol.toStringTag,{value:"Module"})),KK=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",height:24,width:24,id:"Check-Circle-1--Streamline-Ultimate",...e},p.createElement("desc",null,"Check Circle 1 Streamline Icon: https://streamlinehq.com"),p.createElement("path",{d:"M12 0a12 12 0 1 0 12 12A12 12 0 0 0 12 0Zm6.93 8.2 -6.85 9.29a1 1 0 0 1 -1.43 0.19l-4.89 -3.91a1 1 0 0 1 -0.15 -1.41A1 1 0 0 1 7 12.21l4.08 3.26L17.32 7a1 1 0 0 1 1.39 -0.21 1 1 0 0 1 0.22 1.41Z",fill:"currentcolor",strokeWidth:1})),YK="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20height='24'%20width='24'%20id='Check-Circle-1--Streamline-Ultimate'%3e%3cdesc%3eCheck%20Circle%201%20Streamline%20Icon:%20https://streamlinehq.com%3c/desc%3e%3cpath%20d='M12%200a12%2012%200%201%200%2012%2012A12%2012%200%200%200%2012%200Zm6.93%208.2%20-6.85%209.29a1%201%200%200%201%20-1.43%200.19l-4.89%20-3.91a1%201%200%200%201%20-0.15%20-1.41A1%201%200%200%201%207%2012.21l4.08%203.26L17.32%207a1%201%200%200%201%201.39%20-0.21%201%201%200%200%201%200.22%201.41Z'%20fill='currentcolor'%20stroke-width='1'%3e%3c/path%3e%3c/svg%3e",JK=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:KK,default:YK},Symbol.toStringTag,{value:"Module"})),eY=e=>p.createElement("svg",{viewBox:"-0.75 -0.75 20 20",xmlns:"http://www.w3.org/2000/svg",height:24,width:24,...e},p.createElement("desc",null,"Typography"),p.createElement("path",{d:"m0.578125 9.827354166666668 8.09375 0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),p.createElement("path",{d:"m12.140625 13.296104166666666 5.78125 0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),p.createElement("path",{d:"M12.140625 16.764854166666666V10.40625a2.890625 2.890625 0 0 1 5.78125 0v6.359375",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5}),p.createElement("path",{d:"M0.578125 16.764854166666666V5.78125a4.046875 4.046875 0 0 1 8.09375 0v10.984375",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})),tY="data:image/svg+xml,%3csvg%20viewBox='-0.75%20-0.75%2020%2020'%20xmlns='http://www.w3.org/2000/svg'%20height='24'%20width='24'%3e%3cdesc%3eTypography%3c/desc%3e%3cpath%20d='m0.578125%209.827354166666668%208.09375%200'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3cpath%20d='m12.140625%2013.296104166666666%205.78125%200'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3cpath%20d='M12.140625%2016.764854166666666V10.40625a2.890625%202.890625%200%200%201%205.78125%200v6.359375'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3cpath%20d='M0.578125%2016.764854166666666V5.78125a4.046875%204.046875%200%200%201%208.09375%200v10.984375'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='1.5'%3e%3c/path%3e%3c/svg%3e",oY=Object.freeze(Object.defineProperty({__proto__:null,ReactComponent:eY,default:tY},Symbol.toStringTag,{value:"Module"})),nY=Ao("",{variants:{size:{sm:"size-3",md:"size-4",lg:"size-6",xl:"size-8"}},defaultVariants:{size:"md"}}),rY=Object.assign({"../../assets/icons/error-fill.svg":HK,"../../assets/icons/info-fill.svg":QK,"../../assets/icons/skull-and-bones.svg":ZK,"../../assets/icons/success-fill.svg":JK,"../../assets/icons/typography.svg":oY}),ip=Object.entries(rY).reduce((e,[t,o])=>{var n;const r=((n=t.match(/[^/]+(?=\.svg$)/))==null?void 0:n[0])??"",a=gG(r),i=l=>{const{size:z,className:u,...f}=l,O=R0(nY({size:z,className:u}));return l0.createElement(o.ReactComponent,{...f,className:O})};return i.displayName=`Icon.${a}`,e[a]=i,e},{}),cc0=ip,cY=p.createContext({isAnyTextFieldFocused:!1,setFocusState:()=>{},darkMode:!1}),aY=()=>{const[e,t]=p.useState(!1);return p.useEffect(()=>(t(!0),()=>t(!1)),[]),e?a3.createPortal(b.jsx("div",{className:ho,style:{width:"unset",height:"unset"},children:b.jsx(jK,{icons:{error:b.jsx(ip.ErrorFill,{className:"text-red"}),success:b.jsx(ip.SuccessFill,{className:"text-green"}),info:b.jsx(ip.InfoFill,{className:"text-gray-500"})},position:"bottom-left",toastOptions:{classNames:{title:"!mt-[-1px] !text-md !font-semibold !leading-tighter !tracking-[0.1px]",description:"!text-gray-900 dark:!text-gray-300 !text-sm !mt-px",icon:"!ml-0"},style:{alignItems:"flex-start",maxWidth:"290px"}}})}),document.body):null},sY=({darkMode:e,children:t})=>{const[o,n]=p.useState(!1),r=a=>{n(a)};return b.jsx(cY.Provider,{value:{isAnyTextFieldFocused:o,setFocusState:r,darkMode:e},children:b.jsxs(DK,{children:[t,b.jsx(aY,{})]})})},ho="shade shade-admin shade-activitypub shade-stats shade-posts",iY=({darkMode:e,fetchKoenigLexical:t,className:o,children:n,...r})=>{const a=se("shade",o);return b.jsx("div",{className:a,...r,children:b.jsx(sY,{darkMode:e,children:n})})},pY=GH,MY=ZH,lY=KH,Q9=p.forwardRef(({className:e,...t},o)=>b.jsx(C8,{className:R0("fixed inset-0 z-50 bg-black/30 backdrop-blur-none transform-gpu data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=open]:backdrop-blur-[3px]",e),...t,ref:o}));Q9.displayName=C8.displayName;const $9=p.forwardRef(({className:e,...t},o)=>b.jsx(lY,{children:b.jsxs("div",{className:ho,children:[b.jsx(Q9,{onClick:n=>n.stopPropagation()}),b.jsx(N8,{ref:o,className:R0("fixed left-[50%] top-[20%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-20%] gap-6 bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[18%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[18%] sm:rounded-lg",e),...t})]})}));$9.displayName=N8.displayName;const G9=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col space-y-2 text-center sm:text-left",e),...t});G9.displayName="AlertDialogHeader";const Z9=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 [&>button]:min-w-20",e),...t});Z9.displayName="AlertDialogFooter";const K9=p.forwardRef(({className:e,...t},o)=>b.jsx(E8,{ref:o,className:R0("text-xl font-semibold",e),...t}));K9.displayName=E8.displayName;const Y9=p.forwardRef(({className:e,...t},o)=>b.jsx(S8,{ref:o,className:R0("text-base",e),...t}));Y9.displayName=S8.displayName;const J9=p.forwardRef(({className:e,...t},o)=>b.jsx(_8,{ref:o,className:R0(H3(),e),...t}));J9.displayName=_8.displayName;const em=p.forwardRef(({className:e,...t},o)=>b.jsx(B8,{ref:o,className:R0(H3({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));em.displayName=B8.displayName;const bY=p.lazy(()=>m1(()=>import("./index-BOWUajrT.js"),[],import.meta.url)),Vf=e=>b.jsx(p.Suspense,{fallback:b.jsx("div",{}),children:b.jsx(bY,{...e})}),Xd=p.forwardRef(({className:e,...t},o)=>b.jsx(G7,{ref:o,className:R0("relative flex h-8 w-8 shrink-0 overflow-hidden rounded-full",e),...t}));Xd.displayName=G7.displayName;const Dd=p.forwardRef(({className:e,...t},o)=>b.jsx(Z7,{ref:o,className:R0("aspect-square h-full w-full",e),...t}));Dd.displayName=Z7.displayName;const Id=p.forwardRef(({className:e,...t},o)=>b.jsx(K7,{ref:o,className:R0("flex h-full w-full items-center justify-center rounded-full bg-muted [&_svg]:size-4",e),...t}));Id.displayName=K7.displayName;const zY=Ao("inline-flex items-center rounded-sm border px-1.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground/70",destructive:"border-transparent bg-destructive/20 text-destructive",success:"border-transparent bg-green/20 text-green",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function uY({className:e,variant:t,...o}){return b.jsx("div",{className:R0(zY({variant:t}),e),...o})}const dY=Ao("relative block rounded-lg transition-all duration-300",{variants:{variant:{default:"border border-border bg-background shadow-sm hover:shadow-md dark:border-gray-900 dark:bg-gray-925",gradient:["cursor-pointer border border-gray-100 bg-white dark:border-gray-950 dark:bg-black","shadow-[rgb(75_225_226_/_28%)_-7px_-6px_42px_8px,rgb(202_103_255_/_32%)_7px_6px_42px_8px]","dark:shadow-[rgb(75_225_226_/_36%)_-7px_-6px_42px_8px,rgb(202_103_255_/_38%)_7px_6px_42px_8px]","hover:shadow-[rgb(75_225_226_/_38%)_-7px_-4px_42px_10px,rgb(202_103_255_/_42%)_7px_8px_42px_10px]","dark:hover:shadow-[rgb(75_225_226_/_50%)_-7px_-4px_42px_10px,rgb(202_103_255_/_52%)_7px_8px_42px_10px]","hover:translate-y-[-2px] hover:scale-[1.01]"],info:"bg-blue-50 border-blue-200 dark:bg-blue-950/30 dark:border-blue-800 border",success:"bg-green-50 border-green-200 dark:bg-green-950/30 dark:border-green-800 border",warning:"bg-yellow-50 border-yellow-200 dark:bg-yellow-950/30 dark:border-yellow-800 border",destructive:"bg-white shadow-sm dark:bg-gray-950"},size:{sm:"p-2 text-sm",md:"p-3",lg:"p-4"}},defaultVariants:{variant:"default",size:"md"}}),U3=p.forwardRef((e,t)=>{const{variant:o,size:n,dismissible:r=!1,onDismiss:a,role:i="status",className:l,children:z,...u}=e,f=O=>{O.preventDefault(),O.stopPropagation(),r&&a&&a()};return b.jsxs("div",{ref:t,className:R0(dY({variant:o,size:n}),l),role:i,...u,children:[r&&b.jsx(i1,{"aria-label":"Dismiss notification",className:"absolute right-1 top-1 size-8 text-gray-600 dark:text-gray-500 dark:hover:text-gray-300",size:"icon",variant:"ghost",onClick:f,children:b.jsx(jd,{className:"size-5"})}),z]})});U3.displayName="Banner";const os=ud,tm=dd,OY=Od,fY=L3,om=p.forwardRef(({className:e,...t},o)=>b.jsx(Ga,{ref:o,className:R0("fixed inset-0 z-50 bg-black/30 backdrop-blur-none transform-gpu data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=open]:backdrop-blur-[3px]",e),...t}));om.displayName=Ga.displayName;const pc=p.forwardRef(({className:e,children:t,...o},n)=>b.jsx(OY,{children:b.jsxs("div",{className:ho,children:[b.jsx(om,{}),b.jsx(Za,{ref:n,className:R0("fixed left-[50%] top-[8vmin] z-50 grid w-full max-w-lg translate-x-[-50%] gap-6 bg-background dark:bg-[#101114] p-6 shadow-lg duration-200 transform-gpu data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2 sm:rounded-lg outline-none",e),...o,children:t})]})}));pc.displayName=Za.displayName;const V3=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});V3.displayName="DialogHeader";const Q3=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 sm:items-end [&_button]:min-w-20",e),...t});Q3.displayName="DialogFooter";const $3=p.forwardRef(({className:e,...t},o)=>b.jsx(Ka,{ref:o,className:R0("text-xl font-semibold leading-none tracking-tight",e),...t}));$3.displayName=Ka.displayName;const nm=p.forwardRef(({className:e,...t},o)=>b.jsx(Ya,{ref:o,className:R0("text-sm text-muted-foreground",e),...t}));nm.displayName=Ya.displayName;var Uz=["Enter"," "],AY=["ArrowDown","PageUp","Home"],rm=["ArrowUp","PageDown","End"],hY=[...AY,...rm],qY={ltr:[...Uz,"ArrowRight"],rtl:[...Uz,"ArrowLeft"]},mY={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ns="Menu",[xa,gY,WY]=c7(ns),[Kn,cm]=Y2(ns,[WY,bn,i7]),G3=bn(),am=i7(),[vY,Yn]=Kn(ns),[RY,rs]=Kn(ns),sm=e=>{const{__scopeMenu:t,open:o=!1,children:n,dir:r,onOpenChange:a,modal:i=!0}=e,l=G3(t),[z,u]=p.useState(null),f=p.useRef(!1),O=Tt(a),h=a7(r);return p.useEffect(()=>{const q=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",q,{capture:!0}),()=>{document.removeEventListener("keydown",q,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),b.jsx(b3,{...l,children:b.jsx(vY,{scope:t,open:o,onOpenChange:O,content:z,onContentChange:u,children:b.jsx(RY,{scope:t,onClose:p.useCallback(()=>O(!1),[O]),isUsingKeyboardRef:f,dir:h,modal:i,children:n})})})};sm.displayName=ns;var yY="MenuAnchor",Fd=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e,r=G3(o);return b.jsx(Da,{...r,...n,ref:t})});Fd.displayName=yY;var Hd="MenuPortal",[wY,im]=Kn(Hd,{forceMount:void 0}),pm=e=>{const{__scopeMenu:t,forceMount:o,children:n,container:r}=e,a=Yn(Hd,t);return b.jsx(wY,{scope:t,forceMount:o,children:b.jsx(q2,{present:o||a.open,children:b.jsx(nc,{asChild:!0,container:r,children:n})})})};pm.displayName=Hd;var Q2="MenuContent",[LY,Ud]=Kn(Q2),Mm=p.forwardRef((e,t)=>{const o=im(Q2,e.__scopeMenu),{forceMount:n=o.forceMount,...r}=e,a=Yn(Q2,e.__scopeMenu),i=rs(Q2,e.__scopeMenu);return b.jsx(xa.Provider,{scope:e.__scopeMenu,children:b.jsx(q2,{present:n||a.open,children:b.jsx(xa.Slot,{scope:e.__scopeMenu,children:i.modal?b.jsx(xY,{...r,ref:t}):b.jsx(kY,{...r,ref:t})})})})}),xY=p.forwardRef((e,t)=>{const o=Yn(Q2,e.__scopeMenu),n=p.useRef(null),r=B1(t,n);return p.useEffect(()=>{const a=n.current;if(a)return Yu(a)},[]),b.jsx(Vd,{...e,ref:r,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:E0(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),kY=p.forwardRef((e,t)=>{const o=Yn(Q2,e.__scopeMenu);return b.jsx(Vd,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),CY=Qr("MenuContent.ScrollLock"),Vd=p.forwardRef((e,t)=>{const{__scopeMenu:o,loop:n=!1,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEntryFocus:z,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:O,onInteractOutside:h,onDismiss:q,disableOutsideScroll:g,...W}=e,v=Yn(Q2,o),y=rs(Q2,o),k=G3(o),C=am(o),L=gY(o),[x,w]=p.useState(null),P=p.useRef(null),H=B1(t,P,v.onContentChange),o0=p.useRef(0),Y=p.useRef(""),K=p.useRef(0),n0=p.useRef(null),J=p.useRef("right"),i0=p.useRef(0),L0=g?h3:p.Fragment,Z=g?{as:CY,allowPinchZoom:!0}:void 0,m0=X=>{const G=Y.current+X,N=L().filter(u0=>!u0.disabled),I=document.activeElement,c0=N.find(u0=>u0.ref.current===I)?.textValue,h0=N.map(u0=>u0.textValue),d0=FY(h0,G,c0),v0=N.find(u0=>u0.textValue===d0)?.ref.current;(function u0(e0){Y.current=e0,window.clearTimeout(o0.current),e0!==""&&(o0.current=window.setTimeout(()=>u0(""),1e3))})(G),v0&&setTimeout(()=>v0.focus())};p.useEffect(()=>()=>window.clearTimeout(o0.current),[]),Ku();const $=p.useCallback(X=>J.current===n0.current?.side&&UY(X,n0.current?.area),[]);return b.jsx(LY,{scope:o,searchRef:Y,onItemEnter:p.useCallback(X=>{$(X)&&X.preventDefault()},[$]),onItemLeave:p.useCallback(X=>{$(X)||(P.current?.focus(),w(null))},[$]),onTriggerLeave:p.useCallback(X=>{$(X)&&X.preventDefault()},[$]),pointerGraceTimerRef:K,onPointerGraceIntentChange:p.useCallback(X=>{n0.current=X},[]),children:b.jsx(L0,{...Z,children:b.jsx(f3,{asChild:!0,trapped:r,onMountAutoFocus:E0(a,X=>{X.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:b.jsx(oc,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:O,onInteractOutside:h,onDismiss:q,children:b.jsx(_j,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:n,currentTabStopId:x,onCurrentTabStopIdChange:w,onEntryFocus:E0(z,X=>{y.isUsingKeyboardRef.current||X.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(z3,{role:"menu","aria-orientation":"vertical","data-state":ym(v.open),"data-radix-menu-content":"",dir:y.dir,...k,...W,ref:H,style:{outline:"none",...W.style},onKeyDown:E0(W.onKeyDown,X=>{const N=X.target.closest("[data-radix-menu-content]")===X.currentTarget,I=X.ctrlKey||X.altKey||X.metaKey,c0=X.key.length===1;N&&(X.key==="Tab"&&X.preventDefault(),!I&&c0&&m0(X.key));const h0=P.current;if(X.target!==h0||!hY.includes(X.key))return;X.preventDefault();const v0=L().filter(u0=>!u0.disabled).map(u0=>u0.ref.current);rm.includes(X.key)&&v0.reverse(),DY(v0)}),onBlur:E0(e.onBlur,X=>{X.currentTarget.contains(X.target)||(window.clearTimeout(o0.current),Y.current="")}),onPointerMove:E0(e.onPointerMove,ka(X=>{const G=X.target,N=i0.current!==X.clientX;if(X.currentTarget.contains(G)&&N){const I=X.clientX>i0.current?"right":"left";J.current=I,i0.current=X.clientX}}))})})})})})})});Mm.displayName=Q2;var NY="MenuGroup",Qd=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e;return b.jsx(R1.div,{role:"group",...n,ref:t})});Qd.displayName=NY;var _Y="MenuLabel",lm=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e;return b.jsx(R1.div,{...n,ref:t})});lm.displayName=_Y;var Pp="MenuItem",Qf="menu.itemSelect",Z3=p.forwardRef((e,t)=>{const{disabled:o=!1,onSelect:n,...r}=e,a=p.useRef(null),i=rs(Pp,e.__scopeMenu),l=Ud(Pp,e.__scopeMenu),z=B1(t,a),u=p.useRef(!1),f=()=>{const O=a.current;if(!o&&O){const h=new CustomEvent(Qf,{bubbles:!0,cancelable:!0});O.addEventListener(Qf,q=>n?.(q),{once:!0}),Nh(O,h),h.defaultPrevented?u.current=!1:i.onClose()}};return b.jsx(bm,{...r,ref:z,disabled:o,onClick:E0(e.onClick,f),onPointerDown:O=>{e.onPointerDown?.(O),u.current=!0},onPointerUp:E0(e.onPointerUp,O=>{u.current||O.currentTarget?.click()}),onKeyDown:E0(e.onKeyDown,O=>{const h=l.searchRef.current!=="";o||h&&O.key===" "||Uz.includes(O.key)&&(O.currentTarget.click(),O.preventDefault())})})});Z3.displayName=Pp;var bm=p.forwardRef((e,t)=>{const{__scopeMenu:o,disabled:n=!1,textValue:r,...a}=e,i=Ud(Pp,o),l=am(o),z=p.useRef(null),u=B1(t,z),[f,O]=p.useState(!1),[h,q]=p.useState("");return p.useEffect(()=>{const g=z.current;g&&q((g.textContent??"").trim())},[a.children]),b.jsx(xa.ItemSlot,{scope:o,disabled:n,textValue:r??h,children:b.jsx(Bj,{asChild:!0,...l,focusable:!n,children:b.jsx(R1.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:u,onPointerMove:E0(e.onPointerMove,ka(g=>{n?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:E0(e.onPointerLeave,ka(g=>i.onItemLeave(g))),onFocus:E0(e.onFocus,()=>O(!0)),onBlur:E0(e.onBlur,()=>O(!1))})})})}),BY="MenuCheckboxItem",zm=p.forwardRef((e,t)=>{const{checked:o=!1,onCheckedChange:n,...r}=e;return b.jsx(Am,{scope:e.__scopeMenu,checked:o,children:b.jsx(Z3,{role:"menuitemcheckbox","aria-checked":jp(o)?"mixed":o,...r,ref:t,"data-state":Gd(o),onSelect:E0(r.onSelect,()=>n?.(jp(o)?!0:!o),{checkForDefaultPrevented:!1})})})});zm.displayName=BY;var um="MenuRadioGroup",[EY,SY]=Kn(um,{value:void 0,onValueChange:()=>{}}),dm=p.forwardRef((e,t)=>{const{value:o,onValueChange:n,...r}=e,a=Tt(n);return b.jsx(EY,{scope:e.__scopeMenu,value:o,onValueChange:a,children:b.jsx(Qd,{...r,ref:t})})});dm.displayName=um;var Om="MenuRadioItem",fm=p.forwardRef((e,t)=>{const{value:o,...n}=e,r=SY(Om,e.__scopeMenu),a=o===r.value;return b.jsx(Am,{scope:e.__scopeMenu,checked:a,children:b.jsx(Z3,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":Gd(a),onSelect:E0(n.onSelect,()=>r.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});fm.displayName=Om;var $d="MenuItemIndicator",[Am,TY]=Kn($d,{checked:!1}),hm=p.forwardRef((e,t)=>{const{__scopeMenu:o,forceMount:n,...r}=e,a=TY($d,o);return b.jsx(q2,{present:n||jp(a.checked)||a.checked===!0,children:b.jsx(R1.span,{...r,ref:t,"data-state":Gd(a.checked)})})});hm.displayName=$d;var PY="MenuSeparator",qm=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e;return b.jsx(R1.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});qm.displayName=PY;var jY="MenuArrow",mm=p.forwardRef((e,t)=>{const{__scopeMenu:o,...n}=e,r=G3(o);return b.jsx(u3,{...r,...n,ref:t})});mm.displayName=jY;var XY="MenuSub",[ac0,gm]=Kn(XY),ba="MenuSubTrigger",Wm=p.forwardRef((e,t)=>{const o=Yn(ba,e.__scopeMenu),n=rs(ba,e.__scopeMenu),r=gm(ba,e.__scopeMenu),a=Ud(ba,e.__scopeMenu),i=p.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:z}=a,u={__scopeMenu:e.__scopeMenu},f=p.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return p.useEffect(()=>f,[f]),p.useEffect(()=>{const O=l.current;return()=>{window.clearTimeout(O),z(null)}},[l,z]),b.jsx(Fd,{asChild:!0,...u,children:b.jsx(bm,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":r.contentId,"data-state":ym(o.open),...e,ref:Vn(t,r.onTriggerChange),onClick:O=>{e.onClick?.(O),!(e.disabled||O.defaultPrevented)&&(O.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:E0(e.onPointerMove,ka(O=>{a.onItemEnter(O),!O.defaultPrevented&&!e.disabled&&!o.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{o.onOpenChange(!0),f()},100))})),onPointerLeave:E0(e.onPointerLeave,ka(O=>{f();const h=o.content?.getBoundingClientRect();if(h){const q=o.content?.dataset.side,g=q==="right",W=g?-5:5,v=h[g?"left":"right"],y=h[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:O.clientX+W,y:O.clientY},{x:v,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:v,y:h.bottom}],side:q}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(O),O.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:E0(e.onKeyDown,O=>{const h=a.searchRef.current!=="";e.disabled||h&&O.key===" "||qY[n.dir].includes(O.key)&&(o.onOpenChange(!0),o.content?.focus(),O.preventDefault())})})})});Wm.displayName=ba;var vm="MenuSubContent",Rm=p.forwardRef((e,t)=>{const o=im(Q2,e.__scopeMenu),{forceMount:n=o.forceMount,...r}=e,a=Yn(Q2,e.__scopeMenu),i=rs(Q2,e.__scopeMenu),l=gm(vm,e.__scopeMenu),z=p.useRef(null),u=B1(t,z);return b.jsx(xa.Provider,{scope:e.__scopeMenu,children:b.jsx(q2,{present:n||a.open,children:b.jsx(xa.Slot,{scope:e.__scopeMenu,children:b.jsx(Vd,{id:l.contentId,"aria-labelledby":l.triggerId,...r,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{i.isUsingKeyboardRef.current&&z.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:E0(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:E0(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:E0(e.onKeyDown,f=>{const O=f.currentTarget.contains(f.target),h=mY[i.dir].includes(f.key);O&&h&&(a.onOpenChange(!1),l.trigger?.focus(),f.preventDefault())})})})})})});Rm.displayName=vm;function ym(e){return e?"open":"closed"}function jp(e){return e==="indeterminate"}function Gd(e){return jp(e)?"indeterminate":e?"checked":"unchecked"}function DY(e){const t=document.activeElement;for(const o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function IY(e,t){return e.map((o,n)=>e[(t+n)%e.length])}function FY(e,t,o){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=o?e.indexOf(o):-1;let i=IY(e,Math.max(a,0));r.length===1&&(i=i.filter(u=>u!==o));const z=i.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return z!==o?z:void 0}function HY(e,t){const{x:o,y:n}=e;let r=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],z=t[i],u=l.x,f=l.y,O=z.x,h=z.y;f>n!=h>n&&o<(O-u)*(n-f)/(h-f)+u&&(r=!r)}return r}function UY(e,t){if(!t)return!1;const o={x:e.clientX,y:e.clientY};return HY(o,t)}function ka(e){return t=>t.pointerType==="mouse"?e(t):void 0}var VY=sm,QY=Fd,$Y=pm,GY=Mm,ZY=Qd,KY=lm,YY=Z3,JY=zm,eJ=dm,tJ=fm,oJ=hm,nJ=qm,rJ=mm,cJ=Wm,aJ=Rm,K3="DropdownMenu",[sJ]=Y2(K3,[cm]),n2=cm(),[iJ,wm]=sJ(K3),Lm=e=>{const{__scopeDropdownMenu:t,children:o,dir:n,open:r,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,z=n2(t),u=p.useRef(null),[f,O]=Qn({prop:r,defaultProp:a??!1,onChange:i,caller:K3});return b.jsx(iJ,{scope:t,triggerId:ft(),triggerRef:u,contentId:ft(),open:f,onOpenChange:O,onOpenToggle:p.useCallback(()=>O(h=>!h),[O]),modal:l,children:b.jsx(VY,{...z,open:f,onOpenChange:O,dir:n,modal:l,children:o})})};Lm.displayName=K3;var xm="DropdownMenuTrigger",km=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,disabled:n=!1,...r}=e,a=wm(xm,o),i=n2(o);return b.jsx(QY,{asChild:!0,...i,children:b.jsx(R1.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...r,ref:Vn(t,a.triggerRef),onPointerDown:E0(e.onPointerDown,l=>{!n&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:E0(e.onKeyDown,l=>{n||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});km.displayName=xm;var pJ="DropdownMenuPortal",Cm=e=>{const{__scopeDropdownMenu:t,...o}=e,n=n2(t);return b.jsx($Y,{...n,...o})};Cm.displayName=pJ;var Nm="DropdownMenuContent",_m=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=wm(Nm,o),a=n2(o),i=p.useRef(!1);return b.jsx(GY,{id:r.contentId,"aria-labelledby":r.triggerId,...a,...n,ref:t,onCloseAutoFocus:E0(e.onCloseAutoFocus,l=>{i.current||r.triggerRef.current?.focus(),i.current=!1,l.preventDefault()}),onInteractOutside:E0(e.onInteractOutside,l=>{const z=l.detail.originalEvent,u=z.button===0&&z.ctrlKey===!0,f=z.button===2||u;(!r.modal||f)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});_m.displayName=Nm;var MJ="DropdownMenuGroup",Bm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(ZY,{...r,...n,ref:t})});Bm.displayName=MJ;var lJ="DropdownMenuLabel",Em=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(KY,{...r,...n,ref:t})});Em.displayName=lJ;var bJ="DropdownMenuItem",Sm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(YY,{...r,...n,ref:t})});Sm.displayName=bJ;var zJ="DropdownMenuCheckboxItem",Tm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(JY,{...r,...n,ref:t})});Tm.displayName=zJ;var uJ="DropdownMenuRadioGroup",dJ=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(eJ,{...r,...n,ref:t})});dJ.displayName=uJ;var OJ="DropdownMenuRadioItem",Pm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(tJ,{...r,...n,ref:t})});Pm.displayName=OJ;var fJ="DropdownMenuItemIndicator",jm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(oJ,{...r,...n,ref:t})});jm.displayName=fJ;var AJ="DropdownMenuSeparator",Xm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(nJ,{...r,...n,ref:t})});Xm.displayName=AJ;var hJ="DropdownMenuArrow",qJ=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(rJ,{...r,...n,ref:t})});qJ.displayName=hJ;var mJ="DropdownMenuSubTrigger",Dm=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(cJ,{...r,...n,ref:t})});Dm.displayName=mJ;var gJ="DropdownMenuSubContent",Im=p.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...n}=e,r=n2(o);return b.jsx(aJ,{...r,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Im.displayName=gJ;var WJ=Lm,vJ=km,RJ=Cm,Fm=_m,yJ=Bm,Hm=Em,Um=Sm,Vm=Tm,Qm=Pm,$m=jm,Gm=Xm,Zm=Dm,Km=Im;const Ym=WJ,Jm=vJ,sc0=yJ,wJ=p.forwardRef(({className:e,inset:t,children:o,...n},r)=>b.jsxs(Zm,{ref:r,className:R0("flex cursor-default gap-2 select-none hover:bg-accent items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[o,b.jsx(F3,{className:"ml-auto"})]}));wJ.displayName=Zm.displayName;const LJ=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{className:ho,children:b.jsx(Km,{ref:o,className:R0("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})}));LJ.displayName=Km.displayName;const Zd=p.forwardRef(({className:e,sideOffset:t=4,...o},n)=>b.jsx(RJ,{children:b.jsx("div",{className:ho,children:b.jsx(Fm,{ref:n,className:R0("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),sideOffset:t,...o})})}));Zd.displayName=Fm.displayName;const eg=p.forwardRef(({className:e,inset:t,...o},n)=>b.jsx(Um,{ref:n,className:R0("relative flex cursor-default select-none cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...o}));eg.displayName=Um.displayName;const xJ=p.forwardRef(({className:e,children:t,checked:o,...n},r)=>b.jsxs(Vm,{ref:r,checked:o,className:R0("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:b.jsx($m,{children:b.jsx(S9,{className:"size-4"})})}),t]}));xJ.displayName=Vm.displayName;const kJ=p.forwardRef(({className:e,children:t,...o},n)=>b.jsxs(Qm,{ref:n,className:R0("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[b.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:b.jsx($m,{children:b.jsx(aZ,{className:"size-2 fill-current"})})}),t]}));kJ.displayName=Qm.displayName;const CJ=p.forwardRef(({className:e,inset:t,...o},n)=>b.jsx(Hm,{ref:n,className:R0("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));CJ.displayName=Hm.displayName;const Pn=p.forwardRef(({className:e,...t},o)=>b.jsx(Gm,{ref:o,className:R0("-mx-1 my-1 h-px bg-muted",e),...t}));Pn.displayName=Gm.displayName;const tg=p.forwardRef(({className:e,orientation:t="horizontal",decorative:o=!0,...n},r)=>b.jsx(Sh,{ref:r,className:R0("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),decorative:o,orientation:t,...n}));tg.displayName=Sh.displayName;const NJ=FD,_J=HD,Sb=VD,og=p.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},r)=>b.jsx(UD,{children:b.jsx("div",{className:ho,children:b.jsx(Aq,{ref:r,align:t,className:R0("z-50 rounded-md bg-white dark:bg-gray-950 p-5 text-popover-foreground shadow-md border outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",e),sideOffset:o,...n})})}));og.displayName=Aq.displayName;const BJ=Ao("peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",{variants:{size:{default:"h-5 w-9",sm:"h-4 w-7"}},defaultVariants:{size:"default"}}),EJ=Ao("pointer-events-none block rounded-full bg-background ring-0 transition-transform [filter:drop-shadow(0_1px_2px_rgba(0,0,0,0.07))] data-[state=unchecked]:translate-x-0",{variants:{size:{default:"size-4 data-[state=checked]:translate-x-4",sm:"size-3 data-[state=checked]:translate-x-3"}},defaultVariants:{size:"default"}}),ng=p.forwardRef(({className:e,size:t,...o},n)=>b.jsx(A7,{className:R0(BJ({size:t,className:e})),...o,ref:n,children:b.jsx(jj,{className:R0(EJ({size:t}))})}));ng.displayName=A7.displayName;const SJ=vX,TJ=RX,PJ=yX,rg=p.forwardRef(({className:e,sideOffset:t=4,...o},n)=>b.jsx(wX,{children:b.jsx("div",{className:ho,children:b.jsx(D7,{ref:n,className:R0("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),sideOffset:t,...o})})}));rg.displayName=D7.displayName;var Tb,Y3="HoverCard",[cg]=Y2(Y3,[bn]),J3=bn(),[jJ,eM]=cg(Y3),ag=e=>{const{__scopeHoverCard:t,children:o,open:n,defaultOpen:r,onOpenChange:a,openDelay:i=700,closeDelay:l=300}=e,z=J3(t),u=p.useRef(0),f=p.useRef(0),O=p.useRef(!1),h=p.useRef(!1),[q,g]=Qn({prop:n,defaultProp:r??!1,onChange:a,caller:Y3}),W=p.useCallback(()=>{clearTimeout(f.current),u.current=window.setTimeout(()=>g(!0),i)},[i,g]),v=p.useCallback(()=>{clearTimeout(u.current),!O.current&&!h.current&&(f.current=window.setTimeout(()=>g(!1),l))},[l,g]),y=p.useCallback(()=>g(!1),[g]);return p.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(f.current)},[]),b.jsx(jJ,{scope:t,open:q,onOpenChange:g,onOpen:W,onClose:v,onDismiss:y,hasSelectionRef:O,isPointerDownOnContentRef:h,children:b.jsx(b3,{...z,children:o})})};ag.displayName=Y3;var sg="HoverCardTrigger",ig=p.forwardRef((e,t)=>{const{__scopeHoverCard:o,...n}=e,r=eM(sg,o),a=J3(o);return b.jsx(Da,{asChild:!0,...a,children:b.jsx(R1.a,{"data-state":r.open?"open":"closed",...n,ref:t,onPointerEnter:E0(e.onPointerEnter,Dp(r.onOpen)),onPointerLeave:E0(e.onPointerLeave,Dp(r.onClose)),onFocus:E0(e.onFocus,r.onOpen),onBlur:E0(e.onBlur,r.onClose),onTouchStart:E0(e.onTouchStart,i=>i.preventDefault())})})});ig.displayName=sg;var Kd="HoverCardPortal",[XJ,DJ]=cg(Kd,{forceMount:void 0}),pg=e=>{const{__scopeHoverCard:t,forceMount:o,children:n,container:r}=e,a=eM(Kd,t);return b.jsx(XJ,{scope:t,forceMount:o,children:b.jsx(q2,{present:o||a.open,children:b.jsx(nc,{asChild:!0,container:r,children:n})})})};pg.displayName=Kd;var Xp="HoverCardContent",Mg=p.forwardRef((e,t)=>{const o=DJ(Xp,e.__scopeHoverCard),{forceMount:n=o.forceMount,...r}=e,a=eM(Xp,e.__scopeHoverCard);return b.jsx(q2,{present:n||a.open,children:b.jsx(IJ,{"data-state":a.open?"open":"closed",...r,onPointerEnter:E0(e.onPointerEnter,Dp(a.onOpen)),onPointerLeave:E0(e.onPointerLeave,Dp(a.onClose)),ref:t})})});Mg.displayName=Xp;var IJ=p.forwardRef((e,t)=>{const{__scopeHoverCard:o,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,...l}=e,z=eM(Xp,o),u=J3(o),f=p.useRef(null),O=B1(t,f),[h,q]=p.useState(!1);return p.useEffect(()=>{if(h){const g=document.body;return Tb=g.style.userSelect||g.style.webkitUserSelect,g.style.userSelect="none",g.style.webkitUserSelect="none",()=>{g.style.userSelect=Tb,g.style.webkitUserSelect=Tb}}},[h]),p.useEffect(()=>{if(f.current){const g=()=>{q(!1),z.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(z.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",g),()=>{document.removeEventListener("pointerup",g),z.hasSelectionRef.current=!1,z.isPointerDownOnContentRef.current=!1}}},[z.isPointerDownOnContentRef,z.hasSelectionRef]),p.useEffect(()=>{f.current&&UJ(f.current).forEach(W=>W.setAttribute("tabindex","-1"))}),b.jsx(oc,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:n,onPointerDownOutside:r,onFocusOutside:E0(a,g=>{g.preventDefault()}),onDismiss:z.onDismiss,children:b.jsx(z3,{...u,...l,onPointerDown:E0(l.onPointerDown,g=>{g.currentTarget.contains(g.target)&&q(!0),z.hasSelectionRef.current=!1,z.isPointerDownOnContentRef.current=!0}),ref:O,style:{...l.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),FJ="HoverCardArrow",HJ=p.forwardRef((e,t)=>{const{__scopeHoverCard:o,...n}=e,r=J3(o);return b.jsx(u3,{...r,...n,ref:t})});HJ.displayName=FJ;function Dp(e){return t=>t.pointerType==="touch"?void 0:e()}function UJ(e){const t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;o.nextNode();)t.push(o.currentNode);return t}var VJ=ag,QJ=ig,$J=pg,lg=Mg;const GJ=VJ,ZJ=QJ,bg=p.forwardRef(({className:e,align:t="center",sideOffset:o=4,...n},r)=>b.jsx($J,{children:b.jsx("div",{className:ho,children:b.jsx(lg,{ref:r,align:t,className:R0("pointer-events-auto z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-hover-card-content-transform-origin]",e),sideOffset:o,...n})})}));bg.displayName=lg.displayName;const KJ=Ao("rounded-full",{variants:{variant:{neutral:"bg-muted",info:"bg-blue-500",success:"bg-green-500",error:"bg-red-500",warning:"bg-yellow-500"},state:{idle:"",active:"animate-pulse",inactive:"border-2 bg-transparent"},size:{sm:"size-2",md:"size-3",lg:"size-4"}},compoundVariants:[{variant:"neutral",state:"inactive",className:"border-muted-foreground"},{variant:"info",state:"inactive",className:"border-blue-500"},{variant:"success",state:"inactive",className:"border-green-500"},{variant:"error",state:"inactive",className:"border-red-500"},{variant:"warning",state:"inactive",className:"border-yellow-500"}],defaultVariants:{variant:"success",state:"idle",size:"sm"}});function $f({className:e,variant:t,state:o,size:n,label:r,...a}){return b.jsxs("span",{className:"inline-flex items-center",...a,children:[b.jsx("span",{"aria-hidden":"true",className:R0(KJ({variant:t,state:o,size:n}),e)}),r&&b.jsx("span",{className:"sr-only",children:r})]})}const tM=p.forwardRef(({className:e,type:t,...o},n)=>b.jsx("input",{ref:n,className:R0("flex h-9 w-full rounded-md border border-transparent bg-gray-150 dark:bg-gray-900 px-3 py-1 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:bg-transparent focus-visible:border-green focus-visible:shadow-[0_0_0_2px_rgba(48,207,67,.25)] disabled:cursor-not-allowed disabled:opacity-50",e),type:t,...o}));tM.displayName="Input";function YJ({className:e,...t}){return b.jsx("kbd",{className:R0("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium m-0 shadow-none border-none text-shadow-none","[&_svg:not([class*='size-'])]:size-3","[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",e),"data-slot":"kbd",...t})}function j1({containerClassName:e,count:t=1,randomize:o=!1,minWidth:n=70,maxWidth:r=100,className:a,...i}){const{randomWidths:l,keys:z}=p.useMemo(()=>{const u=[],f=[];for(let O=0;O<t;O++){if(o){const h=Math.floor((r-n)/5),q=Math.floor(Math.random()*(h+1)),g=n+q*5;u.push(`${g}%`)}f.push(`skeleton-${crypto.randomUUID()}`)}return{randomWidths:u,keys:f}},[t,o,n,r]);return b.jsx("span",{className:e,children:Array.from({length:t}).map((u,f)=>b.jsxs(l0.Fragment,{children:[b.jsx("span",{className:R0("inline-flex w-full leading-none animate-pulse rounded-[2px] bg-primary/10",a),style:o?{width:l[f]}:void 0,...i,children:"‌"}),b.jsx("br",{})]},z[f]))})}const JJ=l0.forwardRef(({className:e,lines:t=5,...o},n)=>t<1?b.jsx(b.Fragment,{}):b.jsx("div",{ref:n,className:R0("flex flex-col gap-2",e),...o,children:Array.from({length:t},(r,a)=>{let i="66%";switch(a%5){case 0:i="57%";break;case 1:i="33%";break;case 2:i="40%";break;case 3:i="48%";break;case 4:i="24%";break}return b.jsxs("div",{className:"flex justify-between gap-6",children:[b.jsx("div",{className:"grow",style:{maxWidth:i},children:b.jsx(j1,{})}),b.jsx(j1,{className:"w-[60px] self-end"})]},a)})}));JJ.displayName="SkeletonTable";const Ip=({size:e="md",color:t="dark",className:o=""})=>{let n="relative mx-0 my-[-0.5] box-border inline-block animate-spin rounded-full before:z-10 before:block before:rounded-full before:content-['']";switch(e){case"sm":n+=" h-[16px] w-[16px] border-2 before:mt-[10px] before:h-[3px] before:w-[3px]";break;case"md":n+=" h-[20px] w-[20px] border-2 before:mt-[13px] before:h-[3px] before:w-[3px]";break;case"lg":default:n+=" h-[50px] w-[50px] border before:mt-[7px] before:h-[7px] before:w-[7px]";break}switch(t){case"light":n+=" border-white/20 before:bg-white dark:border-black/10 dark:before:bg-black";break;case"dark":default:n+=" border-black/10 before:bg-black dark:border-white/20 dark:before:bg-white";break}return b.jsx("div",{className:`${n} ${o}`})},ic0=()=>b.jsx("div",{className:"flex h-full flex-col items-center justify-center gap-3",children:b.jsx("div",{className:"flex size-20 items-center justify-center rounded-full",children:b.jsxs("div",{className:"-mt-1.5 flex items-end gap-2",children:[b.jsx(j1,{className:"h-10 w-3"}),b.jsx(j1,{className:"h-14 w-3"}),b.jsx(j1,{className:"h-6 w-3"})]})})}),e00=({className:e="",children:t})=>b.jsx("div",{className:`my-10 flex flex-col items-center gap-1 text-sm text-grey-600 ${e}`,children:t}),t00=({className:e="",children:t})=>b.jsx("div",{className:`text-grey-500 [&>svg]:size-8 [&>svg]:stroke-[1px] ${e}`,children:t}),o00=ud,pc0=dd,n00=Od,zg=p.forwardRef(({className:e,...t},o)=>b.jsx(Ga,{className:R0("fixed inset-0 z-50 bg-black/10 data-[state=open]:animate-in duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:o}));zg.displayName=Ga.displayName;const r00=Ao("fixed z-50 gap-4 bg-background p-8 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),ug=p.forwardRef(({side:e="right",className:t,children:o,...n},r)=>b.jsx(n00,{children:b.jsxs("div",{className:ho,children:[b.jsx(zg,{}),b.jsxs(Za,{ref:r,className:R0(r00({side:e}),t),...n,children:[b.jsxs(L3,{className:"fixed right-4 top-4 z-50 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[b.jsx(jd,{className:"size-4"}),b.jsx("span",{className:"sr-only",children:"Close"})]}),o]})]})}));ug.displayName=Za.displayName;const c00=({className:e,...t})=>b.jsx("div",{className:R0("flex flex-col space-y-1 text-center sm:text-left",e),...t});c00.displayName="SheetHeader";const a00=p.forwardRef(({className:e,...t},o)=>b.jsx(Ka,{ref:o,className:R0("text-xl font-semibold text-foreground",e),...t}));a00.displayName=Ka.displayName;const s00=p.forwardRef(({className:e,...t},o)=>b.jsx(Ya,{ref:o,className:R0("text-sm text-muted-foreground",e),...t}));s00.displayName=Ya.displayName;const dg=801;function Pb(){return window.innerWidth<dg}function i00(){const[e,t]=p.useState(Pb());return p.useEffect(()=>{const o=window.matchMedia(`(max-width: ${dg-1}px)`),n=()=>{t(Pb())};return o.addEventListener("change",n),t(Pb()),()=>o.removeEventListener("change",n)},[]),e}const p00="sidebar:state",M00=3600*24*7,l00="30rem",b00="28rem",z00="4rem",u00="b",oM="[34px]",Og=p.createContext(null);function Jn(){const e=p.useContext(Og);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const fg=p.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:o,className:n,style:r,children:a,...i},l)=>{const z=i00(),[u,f]=p.useState(!1),[O,h]=p.useState(e),q=t??O,g=p.useCallback(k=>{const C=typeof k=="function"?k(q):k;o?o(C):h(C),document.cookie=`${p00}=${C}; path=/; max-age=${M00}`},[o,q]),W=p.useCallback(()=>z?f(k=>!k):g(k=>!k),[z,g,f]);p.useEffect(()=>{const k=C=>{C.key===u00&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),W())};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[W]);const v=q?"expanded":"collapsed",y=p.useMemo(()=>({state:v,open:q,setOpen:g,isMobile:z,openMobile:u,setOpenMobile:f,toggleSidebar:W}),[v,q,g,z,u,f,W]);return b.jsx(Og.Provider,{value:y,children:b.jsx(SJ,{delayDuration:0,children:b.jsx("div",{ref:l,className:R0("group/sidebar-wrapper relative flex h-full w-full has-[[data-variant=inset]]:bg-sidebar",n),style:{"--sidebar-width":l00,"--sidebar-width-icon":z00,...r},...i,children:a})})})});fg.displayName="SidebarProvider";const Ag=p.forwardRef(({side:e="left",variant:t="sidebar",collapsible:o="offcanvas",className:n,children:r,...a},i)=>{const{isMobile:l,state:z,openMobile:u,setOpenMobile:f}=Jn();return o==="none"?b.jsx("div",{ref:i,className:R0("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",n),role:"navigation",...a,children:r}):l?b.jsx(o00,{open:u,onOpenChange:f,...a,children:b.jsx(ug,{className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden","data-mobile":"true","data-sidebar":"sidebar",role:"navigation",side:e,style:{"--sidebar-width":b00},children:b.jsx("div",{className:"flex size-full flex-col",children:r})})}):b.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-collapsible":z==="collapsed"?o:"","data-side":e,"data-state":z,"data-variant":t,role:"navigation",children:[b.jsx("div",{className:R0("relative h-full w-[--sidebar-width] bg-transparent","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),b.jsx("div",{className:R0("absolute inset-y-0 z-10 hidden h-full w-[--sidebar-width] md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] border-sidebar-border group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...a,children:b.jsx("div",{className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow","data-sidebar":"sidebar",children:r})})]})});Ag.displayName="Sidebar";const hg=p.forwardRef(({children:e,className:t,onClick:o,...n},r)=>{const{toggleSidebar:a}=Jn();return b.jsx(i1,{ref:r,className:R0("h-7 w-7",t),"data-sidebar":"trigger",size:"icon",variant:"ghost",onClick:i=>{o?.(i),a()},...n,children:e||b.jsxs(b.Fragment,{children:[b.jsx(XZ,{}),b.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})})});hg.displayName="SidebarTrigger";const d00=p.forwardRef(({className:e,...t},o)=>{const{toggleSidebar:n}=Jn();return b.jsx("button",{ref:o,"aria-label":"Toggle Sidebar",className:R0("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),"data-sidebar":"rail",tabIndex:-1,title:"Toggle Sidebar",type:"button",onClick:n,...t})});d00.displayName="SidebarRail";const qg=p.forwardRef(({className:e,...t},o)=>b.jsx("main",{ref:o,className:R0("relative flex h-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));qg.displayName="SidebarInset";const O00=p.forwardRef(({className:e,...t},o)=>b.jsx(tM,{ref:o,className:R0("w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",`h-${oM}`,e),"data-sidebar":"input",...t}));O00.displayName="SidebarInput";const mg=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("flex flex-col gap-2 p-2",e),"data-sidebar":"header",...t}));mg.displayName="SidebarHeader";const gg=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("flex flex-col gap-2 p-2",e),"data-sidebar":"footer",...t}));gg.displayName="SidebarFooter";const f00=p.forwardRef(({className:e,...t},o)=>b.jsx(tg,{ref:o,className:R0("mx-2 w-auto bg-sidebar-border",e),"data-sidebar":"separator",...t}));f00.displayName="SidebarSeparator";const Wg=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("flex min-h-0 flex-1 flex-col gap-4 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),"data-sidebar":"content",...t}));Wg.displayName="SidebarContent";const Mc=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("relative flex w-full min-w-0 flex-col p-2",e),"data-sidebar":"group",...t}));Mc.displayName="SidebarGroup";const A00=p.forwardRef(({className:e,asChild:t=!1,...o},n)=>{const r=t?ic:"div";return b.jsx(r,{ref:n,className:R0("duration-200 flex shrink-0 items-center rounded-md px-3 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",`h-${oM}`,e),"data-sidebar":"group-label",...o})});A00.displayName="SidebarGroupLabel";const h00=p.forwardRef(({className:e,asChild:t=!1,...o},n)=>{const r=t?ic:"button";return b.jsx(r,{ref:n,className:R0("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),"data-sidebar":"group-action",...o})});h00.displayName="SidebarGroupAction";const cs=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("w-full text-sm",e),"data-sidebar":"group-content",...t}));cs.displayName="SidebarGroupContent";const lc=p.forwardRef(({className:e,...t},o)=>b.jsx("ul",{ref:o,className:R0("flex w-full min-w-0 flex-col gap-0.5",e),"data-sidebar":"menu",...t}));lc.displayName="SidebarMenu";const Yd=p.forwardRef(({className:e,...t},o)=>b.jsx("li",{ref:o,className:R0("group/menu-item relative",e),"data-sidebar":"menu-item",...t}));Yd.displayName="SidebarMenuItem";const q00=Ao("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md px-3 py-2 text-left text-md font-medium text-sidebar-foreground outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:`h-${oM} text-md`,sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),nM=p.forwardRef(({asChild:e=!1,isActive:t=!1,variant:o="default",size:n="default",tooltip:r,className:a,...i},l)=>{const z=e?ic:"button",{isMobile:u,state:f}=Jn(),O=b.jsx(z,{ref:l,className:R0(q00({variant:o,size:n}),a),"data-active":t,"data-sidebar":"menu-button","data-size":n,...i});return r?(typeof r=="string"&&(r={children:r}),b.jsxs(TJ,{children:[b.jsx(PJ,{asChild:!0,children:O}),b.jsx(rg,{align:"center",hidden:f!=="collapsed"||u,side:"right",...r})]})):O});nM.displayName="SidebarMenuButton";const m00=p.forwardRef(({className:e,asChild:t=!1,showOnHover:o=!1,...n},r)=>{const a=t?ic:"button";return b.jsx(a,{ref:r,className:R0("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",o&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),"data-sidebar":"menu-action",...n})});m00.displayName="SidebarMenuAction";const Jd=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("absolute right-2 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-sm font-medium tabular-nums text-gray-600 select-none pointer-events-none","peer-hover/menu-button: peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1.5","peer-data-[size=default]/menu-button:top-2","peer-data-[size=lg]/menu-button:top-3","group-data-[collapsible=icon]:hidden",e),"data-sidebar":"menu-badge",...t}));Jd.displayName="SidebarMenuBadge";const g00=p.forwardRef(({className:e,showIcon:t=!1,...o},n)=>{const r=p.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return b.jsxs("div",{ref:n,className:R0("rounded-md flex gap-2 px-3 items-center",`h-${oM}`,e),"data-sidebar":"menu-skeleton",...o,children:[t&&b.jsx(j1,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),b.jsx(j1,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});g00.displayName="SidebarMenuSkeleton";const W00=p.forwardRef(({className:e,...t},o)=>b.jsx("ul",{ref:o,className:R0("mx-3.5 flex min-w-0 translate-x-px flex-col gap-0.5 border-l border-sidebar-border px-3 py-0.5","group-data-[collapsible=icon]:hidden",e),"data-sidebar":"menu-sub",...t}));W00.displayName="SidebarMenuSub";const v00=p.forwardRef(({...e},t)=>b.jsx("li",{ref:t,...e}));v00.displayName="SidebarMenuSubItem";const R00=p.forwardRef(({asChild:e=!1,size:t="md",isActive:o,className:n,...r},a)=>{const i=e?ic:"a";return b.jsx(i,{ref:a,className:R0("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-3 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),"data-active":o,"data-sidebar":"menu-sub-button","data-size":t,...r})});R00.displayName="SidebarMenuSubButton";const Fp=p.forwardRef(({className:e,onBackToDashboard:t,...o},n)=>b.jsx("div",{ref:n,className:R0("admin-x-container-error",e),...o,children:b.jsxs("div",{className:"admin-x-error max-w-xl",children:[b.jsx("h1",{children:"Loading interrupted"}),b.jsx("p",{children:"They say life is a series of trials and tribulations. This moment right here? It's a tribulation. Our app was supposed to load, and yet here we are. Loadless. Click back to the dashboard to try again."}),b.jsx("a",{className:"cursor-pointer text-green",onClick:t,children:"← Back to the dashboard"})]})}));Fp.displayName="ErrorPage";const vg=p.forwardRef(({className:e,...t},o)=>b.jsx("h1",{ref:o,className:R0("scroll-m-20 text-3xl leading-[1.1em] tracking-tighter font-bold",e),...t}));vg.displayName="H1";const y00=p.forwardRef(({className:e,...t},o)=>b.jsx("h2",{ref:o,className:R0("scroll-m-20 text-2xl font-bold tracking-tighter first:mt-0",e),...t}));y00.displayName="H2";const Rg=p.forwardRef(({className:e,...t},o)=>b.jsx("h3",{ref:o,className:R0("scroll-m-20 text-xl font-semibold tracking-tight",e),...t}));Rg.displayName="H3";const V2=p.forwardRef(({className:e,...t},o)=>b.jsx("h4",{ref:o,className:R0("scroll-m-20 text-lg font-semibold tracking-tight",e),...t}));V2.displayName="H4";const w00=p.forwardRef(({className:e,...t},o)=>b.jsx("div",{ref:o,className:R0("text-xs text-muted-foreground tracking-wide font-medium uppercase",e),...t}));w00.displayName="HTable";const Vz=new Map;p.createContext({saveScrollPosition:()=>{},getScrollPosition:()=>{},resetScrollPosition:()=>{}});function L00(e){Vz.delete(e)}function x00({containerRef:e}){const t=Pe(),o=p.useRef(null),n=p.useRef(null);return p.useEffect(()=>{const r=e.current;if(!r)return;const a=()=>{const i=r.scrollTop;Vz.set(t.pathname,i),n.current=i};return r.addEventListener("scroll",a),()=>r.removeEventListener("scroll",a)},[t.pathname,e]),p.useEffect(()=>{const r=e.current;if(!r)return;const a=Vz.get(t.pathname);a!==void 0&&o.current!==t.pathname&&Math.abs(a-r.scrollTop)>5&&(r.scrollTop=a)},[t.pathname,e]),p.useEffect(()=>{o.current=t.pathname},[t.pathname]),null}function k00({routes:e,prefix:t,errorElement:o,children:n}){const r=p.useMemo(()=>{const a=`/${t?.replace(/\/+/g,"/").replace(/^\/|\/$/g,"")}`,i={element:b.jsx(xH,{children:n}),children:e.map(l=>({...l,errorElement:l.errorElement||o||b.jsx(Fp,{})}))};return fH([i],{basename:a})},[e,t,o,n]);return b.jsx(FF,{router:r})}function yg(){const e=Va(),{externalNavigate:t}=Ea();return p.useCallback((o,n)=>{if(typeof o=="number"){e(o);return}if(n?.crossApp){t({route:o,isExternal:!0});return}e(o,n)},[e,t])}function C00(){const e=xF();return e&&Object.keys(e).length>0}function ro({to:e,replace:t,state:o,crossApp:n}){const{externalNavigate:r}=Ea();return n?(r({route:e,isExternal:!0}),null):b.jsx(VF,{replace:t,state:o,to:e})}function w1(e){return()=>e().then(({default:t})=>({Component:t}))}const N00="FeaturebaseTokenResponseType",_00={staleTime:7200*60*1e3,refetchInterval:8640*60*1e3,refetchIntervalInBackground:!0},B00=Xt({dataType:N00,path:"/featurebase/token/"}),E00=(e={})=>B00({..._00,...e}),wg=p.createContext(void 0);function Lg(){const e=p.useContext(wg);if(e===void 0)throw new Error("useEmberContext must be used within an EmberProvider");return e}const Gf=l0.memo(function(){const t=p.useRef(null),{isFallbackPresent:o}=Lg();return p.useLayoutEffect(()=>{if(t.current){const n=document.getElementById("ember-app");if(n)t.current.appendChild(n);else throw new Error("Ember app not found")}return()=>{const n=document.getElementById("ember-app");if(n)document.body.appendChild(n);else throw new Error("Ember app not found")}},[]),b.jsx("div",{ref:t,hidden:!o,className:"h-full w-full"})});function S00({children:e}){const[t,o]=p.useState(0),n=p.useCallback(()=>{o(l=>l+1)},[]),r=p.useCallback(()=>{o(l=>Math.max(0,l-1))},[]),i={isFallbackPresent:t>0,registerFallback:n,unregisterFallback:r};return b.jsx(wg.Provider,{value:i,children:e})}function Qz(){const{registerFallback:e,unregisterFallback:t}=Lg();return p.useEffect(()=>(e(),()=>{t()}),[e,t]),null}const xg="ConfigResponseType",Mc0=xg,as=Xt({dataType:xg,path:"/config/"}),T00=e=>{var t,o;return!!((o=(t=e?.hostSettings)==null?void 0:t.managedEmail)!=null&&o.enabled)},P00=e=>{var t,o;const n=(o=(t=e?.hostSettings)==null?void 0:t.managedEmail)==null?void 0:o.sendingDomain;return typeof n=="string"&&n.length>0},j00=e=>{var t,o;return(o=(t=e?.hostSettings)==null?void 0:t.managedEmail)==null?void 0:o.sendingDomain},X00={integration:"IntegrationsResponseType",invite:"InvitesResponseType",offer:"OffersResponseType",newsletter:"NewslettersResponseType",recommendation:"RecommendationResponseType",setting:"SettingsResponseType",theme:"ThemesResponseType",tier:"TiersResponseType",user:"UsersResponseType",post:"PostsResponseType",member:"MembersResponseType",tag:"TagsResponseType",label:"LabelsResponseType",webhook:"WebhooksResponseType"};function kg(e){if(typeof window>"u")return()=>{};if(window.EmberBridge?.state)return e(window.EmberBridge.state),()=>{};const t=setInterval(()=>{window.EmberBridge?.state&&(clearInterval(t),e(window.EmberBridge.state))},100);return()=>clearInterval(t)}function rM(e,t){let o=null,n=!0;const r=kg(a=>{n&&(a.on(e,t),o=()=>a.off(e,t))});return()=>{n=!1,r(),o?.()}}function D00(){const e=v1();p.useEffect(()=>rM("emberDataChange",o=>{const{modelName:n}=o,r=X00[n];r&&e.invalidateQueries({predicate:a=>a.queryKey[0]===r})}),[e])}function I00(){const e=v1();p.useEffect(()=>rM("emberAuthChange",o=>{o.isAuthenticated&&e.invalidateQueries()}),[e])}function Cg(){const[e,t]=p.useState(null);return p.useEffect(()=>rM("subscriptionChange",n=>{t(n)}),[]),e}function F00(e){return rM("sidebarVisibilityChange",e)}function Zf(){return window.EmberBridge?.state.sidebarVisible??!0}function e5(){return p.useSyncExternalStore(F00,Zf,Zf)}const H00={getRouteUrl:e=>e,isRouteActive:()=>!1};function Ng(){const[e,t]=p.useState(()=>window.EmberBridge?.state??null),[,o]=p.useState(0);return p.useEffect(()=>{if(!e)return kg(t);const n=()=>{o(r=>r+1)};return e.on("routeChange",n),()=>e.off("routeChange",n)},[e]),e?{getRouteUrl:e.getRouteUrl,isRouteActive:e.isRouteActive}:H00}function U00(){const{data:e}=as(),t=Cg();return!(!e?.config?.hostSettings?.forceUpgrade||t?.subscription?.status==="active")}function V00(){const e=U00(),o=id().some(n=>n.handle?.allowInForceUpgrade===!0);return e&&!o?b.jsx(ro,{to:"/pro",replace:!0}):b.jsx(En,{})}const ss=qq,lc0=Wq({dataType:ss,path:"/users/",defaultSearchParams:{limit:"100",include:"roles"},defaultNextPageParams:(e,t)=>{var o;return{...t,page:(((o=e.meta)==null?void 0:o.pagination.next)||1).toString()}},returnData:e=>{const{pages:t}=e,o=t.flatMap(r=>r.users),n=t[t.length-1].meta;return{users:o,meta:n,isEnd:n?n.pagination.pages===n.pagination.page:!0}}}),bc0=vq({dataType:ss,path:e=>`/users/slug/${e}/`,defaultSearchParams:{include:"roles"}}),_g=Ve({method:"PUT",path:e=>`/users/${e.id}/`,body:e=>({users:[e]}),searchParams:()=>({include:"roles"}),updateQueries:{dataType:ss,emberUpdateType:"createOrUpdate",update:Rq("users")}}),zc0=Ve({method:"DELETE",path:e=>`/users/${e}/`,updateQueries:{dataType:ss,emberUpdateType:"delete",update:OI("users")}}),uc0=Ve({method:"PUT",path:()=>"/users/password/",body:({newPassword:e,confirmNewPassword:t,userId:o,oldPassword:n})=>({password:[{user_id:o,oldPassword:n||"",newPassword:e,ne2Password:t}]})}),dc0=Ve({method:"PUT",path:()=>"/users/owner/",body:e=>({owner:[{id:e}]}),updateQueries:{dataType:ss,emberUpdateType:"createOrUpdate",update:Rq("users")}});function is(e){return e.roles.some(t=>t.name==="Owner")}function cM(e){return e.roles.some(t=>t.name==="Administrator")}function Bg(e){return e.roles.some(o=>o.name==="Editor")||e.roles.some(o=>o.name==="Super Editor")}function Q00(e){return e.roles.some(t=>t.name==="Super Editor")}function $00(e){return e.roles.some(t=>t.name==="Author")}function ps(e){return e.roles.some(t=>t.name==="Contributor")}function Oc0(e){return $00(e)||ps(e)}function G00(e){return is(e)||cM(e)||Bg(e)}function Z00(e){return is(e)||cM(e)||Q00(e)}function K00(e){return is(e)||cM(e)||Bg(e)}function Y00(e){return is(e)||cM(e)}const J00="SiteResponseType",aM=Xt({dataType:J00,path:"/site/"});function fc0(e){const t=new URL(e.url),o=t.pathname.endsWith("/")?t.pathname:`${t.pathname}/`;return`${t.origin}${o}`}function e10(e,t){if(T00(t)&&P00(t))return j00(t)||"";const o=new URL(e.url).hostname||"";return o.startsWith("www.")?o.replace(/^(www)\.(?=[^/]*\..{2,5})/,""):o}function Ac0(e,t,o){const n=e10(t,o);return e==="noreply"?`noreply@${n}`:e}const $z=navigator.userAgent.indexOf("Mac")!==-1?"command":"ctrl",t10=$z==="command"?"⌘K":"Ctrl+K",o10=e=>{e.preventDefault();const t=new KeyboardEvent("keydown",{key:"k",keyCode:75,metaKey:$z==="command",ctrlKey:$z==="ctrl"});document.dispatchEvent(t)};function n10({...e}){const{data:t}=ye(),o=aM(),n=o.data?.site.title??"",r=o.data?.site.icon??"https://static.ghost.org/v4.0.0/images/ghost-orb-1.png",a=t&&!ps(t);return b.jsx(mg,{...e,children:b.jsxs("div",{className:"flex flex-col items-stretch gap-6",children:[b.jsx("div",{className:"flex items-center justify-between",children:b.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[b.jsx("div",{className:"w-8 h-8 rounded-md bg-transparent border-0 flex-shrink-0",children:b.jsx("img",{src:r,alt:"Site icon",className:"w-full h-full rounded-md object-cover"})}),b.jsx("div",{className:"font-semibold text-[15px] text-foreground overflow-hidden text-ellipsis whitespace-nowrap flex-1",children:n})]})}),a&&b.jsxs(i1,{variant:"outline",className:"flex items-center justify-between text-muted-foreground hover:text-gray-700 hover:bg-background text-base [&_svg]:stroke-2 pr-2 shadow-xs hover:shadow-sm hover:border-gray-200 dark:hover:border-gray-800 h-[38px] dark:bg-gray-950",onClick:o10,children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Sd,{className:"text-muted-foreground"}),"Search site"]}),b.jsx(YJ,{className:"text-gray-500 bg-transparent shadow-none dark:text-gray-800",style:{textShadow:"none"},children:t10})]})]})})}function a0(e,t,o){function n(l,z){var u;Object.defineProperty(l,"_zod",{value:l._zod??{},enumerable:!1}),(u=l._zod).traits??(u.traits=new Set),l._zod.traits.add(e),t(l,z);for(const f in i.prototype)f in l||Object.defineProperty(l,f,{value:i.prototype[f].bind(l)});l._zod.constr=i,l._zod.def=z}const r=o?.Parent??Object;class a extends r{}Object.defineProperty(a,"name",{value:e});function i(l){var z;const u=o?.Parent?new a:this;n(u,l),(z=u._zod).deferred??(z.deferred=[]);for(const f of u._zod.deferred)f();return u}return Object.defineProperty(i,"init",{value:n}),Object.defineProperty(i,Symbol.hasInstance,{value:l=>o?.Parent&&l instanceof o.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(i,"name",{value:e}),i}class Hr extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Eg extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const Sg={};function sn(e){return Sg}function r10(e){const t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,r])=>t.indexOf(+n)===-1).map(([n,r])=>r)}function Gz(e,t){return typeof t=="bigint"?t.toString():t}function t5(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function o5(e){return e==null}function n5(e){const t=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(t,o)}const Kf=Symbol("evaluating");function k1(e,t,o){let n;Object.defineProperty(e,t,{get(){if(n!==Kf)return n===void 0&&(n=Kf,n=o()),n},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function er(e,t,o){Object.defineProperty(e,t,{value:o,writable:!0,enumerable:!0,configurable:!0})}function tr(...e){const t={};for(const o of e){const n=Object.getOwnPropertyDescriptors(o);Object.assign(t,n)}return Object.defineProperties({},t)}function Yf(e){return JSON.stringify(e)}const Tg="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Hp(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const c10=t5(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Kr(e){if(Hp(e)===!1)return!1;const t=e.constructor;if(t===void 0)return!0;const o=t.prototype;return!(Hp(o)===!1||Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)}function Pg(e){return Kr(e)?{...e}:Array.isArray(e)?[...e]:e}const a10=new Set(["string","number","symbol"]);function sM(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dn(e,t,o){const n=new e._zod.constr(t??e._zod.def);return(!t||o?.parent)&&(n._zod.parent=e),n}function Q0(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function s10(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function i10(e,t){const o=e._zod.def,n=tr(e._zod.def,{get shape(){const r={};for(const a in t){if(!(a in o.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(r[a]=o.shape[a])}return er(this,"shape",r),r},checks:[]});return dn(e,n)}function p10(e,t){const o=e._zod.def,n=tr(e._zod.def,{get shape(){const r={...e._zod.def.shape};for(const a in t){if(!(a in o.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete r[a]}return er(this,"shape",r),r},checks:[]});return dn(e,n)}function M10(e,t){if(!Kr(t))throw new Error("Invalid input to extend: expected a plain object");const o=e._zod.def.checks;if(o&&o.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const r=tr(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return er(this,"shape",a),a},checks:[]});return dn(e,r)}function l10(e,t){if(!Kr(t))throw new Error("Invalid input to safeExtend: expected a plain object");const o={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return er(this,"shape",n),n},checks:e._zod.def.checks};return dn(e,o)}function b10(e,t){const o=tr(e._zod.def,{get shape(){const n={...e._zod.def.shape,...t._zod.def.shape};return er(this,"shape",n),n},get catchall(){return t._zod.def.catchall},checks:[]});return dn(e,o)}function z10(e,t,o){const n=tr(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(o)for(const i in o){if(!(i in r))throw new Error(`Unrecognized key: "${i}"`);o[i]&&(a[i]=e?new e({type:"optional",innerType:r[i]}):r[i])}else for(const i in r)a[i]=e?new e({type:"optional",innerType:r[i]}):r[i];return er(this,"shape",a),a},checks:[]});return dn(t,n)}function u10(e,t,o){const n=tr(t._zod.def,{get shape(){const r=t._zod.def.shape,a={...r};if(o)for(const i in o){if(!(i in a))throw new Error(`Unrecognized key: "${i}"`);o[i]&&(a[i]=new e({type:"nonoptional",innerType:r[i]}))}else for(const i in r)a[i]=new e({type:"nonoptional",innerType:r[i]});return er(this,"shape",a),a},checks:[]});return dn(t,n)}function _r(e,t=0){if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(e.issues[o]?.continue!==!0)return!0;return!1}function Br(e,t){return t.map(o=>{var n;return(n=o).path??(n.path=[]),o.path.unshift(e),o})}function Ti(e){return typeof e=="string"?e:e?.message}function pn(e,t,o){const n={...e,path:e.path??[]};if(!e.message){const r=Ti(e.inst?._zod.def?.error?.(e))??Ti(t?.error?.(e))??Ti(o.customError?.(e))??Ti(o.localeError?.(e))??"Invalid input";n.message=r}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function r5(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ca(...e){const[t,o,n]=e;return typeof t=="string"?{message:t,code:"custom",input:o,inst:n}:{...t}}const jg=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Gz,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Xg=a0("$ZodError",jg),iM=a0("$ZodError",jg,{Parent:Error});function d10(e,t=o=>o.message){const o={},n=[];for(const r of e.issues)r.path.length>0?(o[r.path[0]]=o[r.path[0]]||[],o[r.path[0]].push(t(r))):n.push(t(r));return{formErrors:n,fieldErrors:o}}function O10(e,t=o=>o.message){const o={_errors:[]},n=r=>{for(const a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(i=>n({issues:i}));else if(a.code==="invalid_key")n({issues:a.issues});else if(a.code==="invalid_element")n({issues:a.issues});else if(a.path.length===0)o._errors.push(t(a));else{let i=o,l=0;for(;l<a.path.length;){const z=a.path[l];l===a.path.length-1?(i[z]=i[z]||{_errors:[]},i[z]._errors.push(t(a))):i[z]=i[z]||{_errors:[]},i=i[z],l++}}};return n(e),o}const pM=e=>(t,o,n,r)=>{const a=n?Object.assign(n,{async:!1}):{async:!1},i=t._zod.run({value:o,issues:[]},a);if(i instanceof Promise)throw new Hr;if(i.issues.length){const l=new(r?.Err??e)(i.issues.map(z=>pn(z,a,sn())));throw Tg(l,r?.callee),l}return i.value},hc0=pM(iM),MM=e=>async(t,o,n,r)=>{const a=n?Object.assign(n,{async:!0}):{async:!0};let i=t._zod.run({value:o,issues:[]},a);if(i instanceof Promise&&(i=await i),i.issues.length){const l=new(r?.Err??e)(i.issues.map(z=>pn(z,a,sn())));throw Tg(l,r?.callee),l}return i.value},qc0=MM(iM),lM=e=>(t,o,n)=>{const r=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:o,issues:[]},r);if(a instanceof Promise)throw new Hr;return a.issues.length?{success:!1,error:new(e??Xg)(a.issues.map(i=>pn(i,r,sn())))}:{success:!0,data:a.value}},f10=lM(iM),bM=e=>async(t,o,n)=>{const r=n?Object.assign(n,{async:!0}):{async:!0};let a=t._zod.run({value:o,issues:[]},r);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(i=>pn(i,r,sn())))}:{success:!0,data:a.value}},A10=bM(iM),h10=e=>(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return pM(e)(t,o,r)},q10=e=>(t,o,n)=>pM(e)(t,o,n),m10=e=>async(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return MM(e)(t,o,r)},g10=e=>async(t,o,n)=>MM(e)(t,o,n),W10=e=>(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return lM(e)(t,o,r)},v10=e=>(t,o,n)=>lM(e)(t,o,n),R10=e=>async(t,o,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return bM(e)(t,o,r)},y10=e=>async(t,o,n)=>bM(e)(t,o,n),w10=/^[cC][^\s-]{8,}$/,L10=/^[0-9a-z]+$/,x10=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,k10=/^[0-9a-vA-V]{20}$/,C10=/^[A-Za-z0-9]{27}$/,N10=/^[a-zA-Z0-9_-]{21}$/,_10=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,B10=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Jf=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,E10=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,S10="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function T10(){return new RegExp(S10,"u")}const P10=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,j10=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,X10=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,D10=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,I10=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Dg=/^[A-Za-z0-9_-]*$/,F10=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,H10=/^\+(?:[0-9]){6,14}[0-9]$/,Ig="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",U10=new RegExp(`^${Ig}$`);function Fg(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function V10(e){return new RegExp(`^${Fg(e)}$`)}function Q10(e){const t=Fg({precision:e.precision}),o=["Z"];e.local&&o.push(""),e.offset&&o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${t}(?:${o.join("|")})`;return new RegExp(`^${Ig}T(?:${n})$`)}const $10=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},G10=/^(?:true|false)$/i,Z10=/^[^A-Z]*$/,K10=/^[^a-z]*$/,ot=a0("$ZodCheck",(e,t)=>{var o;e._zod??(e._zod={}),e._zod.def=t,(o=e._zod).onattach??(o.onattach=[])}),Hg={number:"number",bigint:"bigint",object:"date"},Y10=a0("$ZodCheckLessThan",(e,t)=>{ot.init(e,t);const o=Hg[typeof t.value];e._zod.onattach.push(n=>{const r=n._zod.bag,a=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<a&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:o,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),J10=a0("$ZodCheckGreaterThan",(e,t)=>{ot.init(e,t);const o=Hg[typeof t.value];e._zod.onattach.push(n=>{const r=n._zod.bag,a=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:o,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),ee0=a0("$ZodCheckMaxLength",(e,t)=>{var o;ot.init(e,t),(o=e._zod.def).when??(o.when=n=>{const r=n.value;return!o5(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(n._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const r=n.value;if(r.length<=t.maximum)return;const i=r5(r);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),te0=a0("$ZodCheckMinLength",(e,t)=>{var o;ot.init(e,t),(o=e._zod.def).when??(o.when=n=>{const r=n.value;return!o5(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const r=n.value;if(r.length>=t.minimum)return;const i=r5(r);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),oe0=a0("$ZodCheckLengthEquals",(e,t)=>{var o;ot.init(e,t),(o=e._zod.def).when??(o.when=n=>{const r=n.value;return!o5(r)&&r.length!==void 0}),e._zod.onattach.push(n=>{const r=n._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=n=>{const r=n.value,a=r.length;if(a===t.length)return;const i=r5(r),l=a>t.length;n.issues.push({origin:i,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),zM=a0("$ZodCheckStringFormat",(e,t)=>{var o,n;ot.init(e,t),e._zod.onattach.push(r=>{const a=r._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(o=e._zod).check??(o.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),ne0=a0("$ZodCheckRegex",(e,t)=>{zM.init(e,t),e._zod.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),re0=a0("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Z10),zM.init(e,t)}),ce0=a0("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=K10),zM.init(e,t)}),ae0=a0("$ZodCheckIncludes",(e,t)=>{ot.init(e,t);const o=sM(t.includes),n=new RegExp(typeof t.position=="number"?`^.{${t.position}}${o}`:o);t.pattern=n,e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort})}}),se0=a0("$ZodCheckStartsWith",(e,t)=>{ot.init(e,t);const o=new RegExp(`^${sM(t.prefix)}.*`);t.pattern??(t.pattern=o),e._zod.onattach.push(n=>{const r=n._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(o)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),ie0=a0("$ZodCheckEndsWith",(e,t)=>{ot.init(e,t);const o=new RegExp(`.*${sM(t.suffix)}$`);t.pattern??(t.pattern=o),e._zod.onattach.push(n=>{const r=n._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(o)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),pe0=a0("$ZodCheckOverwrite",(e,t)=>{ot.init(e,t),e._zod.check=o=>{o.value=t.tx(o.value)}});class Me0{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const n=t.split(`
601
601
  `).filter(i=>i),r=Math.min(...n.map(i=>i.length-i.trimStart().length)),a=n.map(i=>i.slice(r)).map(i=>" ".repeat(this.indent*2)+i);for(const i of a)this.content.push(i)}compile(){const t=Function,o=this?.args,r=[...(this?.content??[""]).map(a=>` ${a}`)];return new t(...o,r.join(`
602
602
  `))}}const le0={major:4,minor:1,patch:12},re=a0("$ZodType",(e,t)=>{var o;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=le0;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const r of n)for(const a of r._zod.onattach)a(e);if(n.length===0)(o=e._zod).deferred??(o.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const r=(i,l,z)=>{let u=_r(i),f;for(const O of l){if(O._zod.def.when){if(!O._zod.def.when(i))continue}else if(u)continue;const h=i.issues.length,q=O._zod.check(i);if(q instanceof Promise&&z?.async===!1)throw new Hr;if(f||q instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await q,i.issues.length!==h&&(u||(u=_r(i,h)))});else{if(i.issues.length===h)continue;u||(u=_r(i,h))}}return f?f.then(()=>i):i},a=(i,l,z)=>{if(_r(i))return i.aborted=!0,i;const u=r(l,n,z);if(u instanceof Promise){if(z.async===!1)throw new Hr;return u.then(f=>e._zod.parse(f,z))}return e._zod.parse(u,z)};e._zod.run=(i,l)=>{if(l.skipChecks)return e._zod.parse(i,l);if(l.direction==="backward"){const u=e._zod.parse({value:i.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(f=>a(f,i,l)):a(u,i,l)}const z=e._zod.parse(i,l);if(z instanceof Promise){if(l.async===!1)throw new Hr;return z.then(u=>r(u,n,l))}return r(z,n,l)}}e["~standard"]={validate:r=>{try{const a=f10(e,r);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return A10(e,r).then(i=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}}),uM=a0("$ZodString",(e,t)=>{re.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??$10(e._zod.bag),e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=String(o.value)}catch{}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),ee=a0("$ZodStringFormat",(e,t)=>{zM.init(e,t),uM.init(e,t)}),be0=a0("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=B10),ee.init(e,t)}),ze0=a0("$ZodUUID",(e,t)=>{if(t.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(n===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Jf(n))}else t.pattern??(t.pattern=Jf());ee.init(e,t)}),ue0=a0("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=E10),ee.init(e,t)}),de0=a0("$ZodURL",(e,t)=>{ee.init(e,t),e._zod.check=o=>{try{const n=o.value.trim(),r=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:F10.source,input:o.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:o.value,inst:e,continue:!t.abort})),t.normalize?o.value=r.href:o.value=n;return}catch{o.issues.push({code:"invalid_format",format:"url",input:o.value,inst:e,continue:!t.abort})}}}),Oe0=a0("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=T10()),ee.init(e,t)}),fe0=a0("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=N10),ee.init(e,t)}),Ae0=a0("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=w10),ee.init(e,t)}),he0=a0("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=L10),ee.init(e,t)}),qe0=a0("$ZodULID",(e,t)=>{t.pattern??(t.pattern=x10),ee.init(e,t)}),me0=a0("$ZodXID",(e,t)=>{t.pattern??(t.pattern=k10),ee.init(e,t)}),ge0=a0("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=C10),ee.init(e,t)}),We0=a0("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Q10(t)),ee.init(e,t)}),ve0=a0("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=U10),ee.init(e,t)}),Re0=a0("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=V10(t)),ee.init(e,t)}),ye0=a0("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=_10),ee.init(e,t)}),we0=a0("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=P10),ee.init(e,t),e._zod.onattach.push(o=>{const n=o._zod.bag;n.format="ipv4"})}),Le0=a0("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=j10),ee.init(e,t),e._zod.onattach.push(o=>{const n=o._zod.bag;n.format="ipv6"}),e._zod.check=o=>{try{new URL(`http://[${o.value}]`)}catch{o.issues.push({code:"invalid_format",format:"ipv6",input:o.value,inst:e,continue:!t.abort})}}}),xe0=a0("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=X10),ee.init(e,t)}),ke0=a0("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=D10),ee.init(e,t),e._zod.check=o=>{const n=o.value.split("/");try{if(n.length!==2)throw new Error;const[r,a]=n;if(!a)throw new Error;const i=Number(a);if(`${i}`!==a)throw new Error;if(i<0||i>128)throw new Error;new URL(`http://[${r}]`)}catch{o.issues.push({code:"invalid_format",format:"cidrv6",input:o.value,inst:e,continue:!t.abort})}}});function Ug(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Ce0=a0("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=I10),ee.init(e,t),e._zod.onattach.push(o=>{o._zod.bag.contentEncoding="base64"}),e._zod.check=o=>{Ug(o.value)||o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:e,continue:!t.abort})}});function Ne0(e){if(!Dg.test(e))return!1;const t=e.replace(/[-_]/g,n=>n==="-"?"+":"/"),o=t.padEnd(Math.ceil(t.length/4)*4,"=");return Ug(o)}const _e0=a0("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Dg),ee.init(e,t),e._zod.onattach.push(o=>{o._zod.bag.contentEncoding="base64url"}),e._zod.check=o=>{Ne0(o.value)||o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:e,continue:!t.abort})}}),Be0=a0("$ZodE164",(e,t)=>{t.pattern??(t.pattern=H10),ee.init(e,t)});function Ee0(e,t=null){try{const o=e.split(".");if(o.length!==3)return!1;const[n]=o;if(!n)return!1;const r=JSON.parse(atob(n));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}const Se0=a0("$ZodJWT",(e,t)=>{ee.init(e,t),e._zod.check=o=>{Ee0(o.value,t.alg)||o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:e,continue:!t.abort})}}),Vg=a0("$ZodBoolean",(e,t)=>{re.init(e,t),e._zod.pattern=G10,e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=!!o.value}catch{}const r=o.value;return typeof r=="boolean"||o.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),o}}),Te0=a0("$ZodUnknown",(e,t)=>{re.init(e,t),e._zod.parse=o=>o}),Pe0=a0("$ZodNever",(e,t)=>{re.init(e,t),e._zod.parse=(o,n)=>(o.issues.push({expected:"never",code:"invalid_type",input:o.value,inst:e}),o)}),je0=a0("$ZodDate",(e,t)=>{re.init(e,t),e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=new Date(o.value)}catch{}const r=o.value,a=r instanceof Date;return a&&!Number.isNaN(r.getTime())||o.issues.push({expected:"date",code:"invalid_type",input:r,...a?{received:"Invalid Date"}:{},inst:e}),o}});function eA(e,t,o){e.issues.length&&t.issues.push(...Br(o,e.issues)),t.value[o]=e.value}const Xe0=a0("$ZodArray",(e,t)=>{re.init(e,t),e._zod.parse=(o,n)=>{const r=o.value;if(!Array.isArray(r))return o.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),o;o.value=Array(r.length);const a=[];for(let i=0;i<r.length;i++){const l=r[i],z=t.element._zod.run({value:l,issues:[]},n);z instanceof Promise?a.push(z.then(u=>eA(u,o,i))):eA(z,o,i)}return a.length?Promise.all(a).then(()=>o):o}});function Up(e,t,o,n){e.issues.length&&t.issues.push(...Br(o,e.issues)),e.value===void 0?o in n&&(t.value[o]=void 0):t.value[o]=e.value}function Qg(e){const t=Object.keys(e.shape);for(const n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const o=s10(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function $g(e,t,o,n,r,a){const i=[],l=r.keySet,z=r.catchall._zod,u=z.def.type;for(const f of Object.keys(t)){if(l.has(f))continue;if(u==="never"){i.push(f);continue}const O=z.run({value:t[f],issues:[]},n);O instanceof Promise?e.push(O.then(h=>Up(h,o,f,t))):Up(O,o,f,t)}return i.length&&o.issues.push({code:"unrecognized_keys",keys:i,input:t,inst:a}),e.length?Promise.all(e).then(()=>o):o}const De0=a0("$ZodObject",(e,t)=>{if(re.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const l=t.shape;Object.defineProperty(t,"shape",{get:()=>{const z={...l};return Object.defineProperty(t,"shape",{value:z}),z}})}const n=t5(()=>Qg(t));k1(e._zod,"propValues",()=>{const l=t.shape,z={};for(const u in l){const f=l[u]._zod;if(f.values){z[u]??(z[u]=new Set);for(const O of f.values)z[u].add(O)}}return z});const r=Hp,a=t.catchall;let i;e._zod.parse=(l,z)=>{i??(i=n.value);const u=l.value;if(!r(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};const f=[],O=i.shape;for(const h of i.keys){const g=O[h]._zod.run({value:u[h],issues:[]},z);g instanceof Promise?f.push(g.then(W=>Up(W,l,h,u))):Up(g,l,h,u)}return a?$g(f,u,l,z,n.value,e):f.length?Promise.all(f).then(()=>l):l}}),Ie0=a0("$ZodObjectJIT",(e,t)=>{De0.init(e,t);const o=e._zod.parse,n=t5(()=>Qg(t)),r=h=>{const q=new Me0(["shape","payload","ctx"]),g=n.value,W=C=>{const L=Yf(C);return`shape[${L}]._zod.run({ value: input[${L}], issues: [] }, ctx)`};q.write("const input = payload.value;");const v=Object.create(null);let y=0;for(const C of g.keys)v[C]=`key_${y++}`;q.write("const newResult = {};");for(const C of g.keys){const L=v[C],x=Yf(C);q.write(`const ${L} = ${W(C)};`),q.write(`
603
603
  if (${L}.issues.length) {
@@ -617,4 +617,4 @@ _0.version="2.24.0";kU($1);_0.fn=g0;_0.min=fQ;_0.max=AQ;_0.now=hQ;_0.utc=Dt;_0.u
617
617
  }
618
618
 
619
619
  `)}q.write("payload.value = newResult;"),q.write("return payload;");const k=q.compile();return(C,L)=>k(h,C,L)};let a;const i=Hp,l=!Sg.jitless,u=l&&c10.value,f=t.catchall;let O;e._zod.parse=(h,q)=>{O??(O=n.value);const g=h.value;return i(g)?l&&u&&q?.async===!1&&q.jitless!==!0?(a||(a=r(t.shape)),h=a(h,q),f?$g([],g,h,q,O,e):h):o(h,q):(h.issues.push({expected:"object",code:"invalid_type",input:g,inst:e}),h)}});function tA(e,t,o,n){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const r=e.filter(a=>!_r(a));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:o,errors:e.map(a=>a.issues.map(i=>pn(i,n,sn())))}),t)}const Fe0=a0("$ZodUnion",(e,t)=>{re.init(e,t),k1(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),k1(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),k1(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),k1(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){const r=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${r.map(a=>n5(a.source)).join("|")})$`)}});const o=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(r,a)=>{if(o)return n(r,a);let i=!1;const l=[];for(const z of t.options){const u=z._zod.run({value:r.value,issues:[]},a);if(u instanceof Promise)l.push(u),i=!0;else{if(u.issues.length===0)return u;l.push(u)}}return i?Promise.all(l).then(z=>tA(z,r,e,a)):tA(l,r,e,a)}}),He0=a0("$ZodIntersection",(e,t)=>{re.init(e,t),e._zod.parse=(o,n)=>{const r=o.value,a=t.left._zod.run({value:r,issues:[]},n),i=t.right._zod.run({value:r,issues:[]},n);return a instanceof Promise||i instanceof Promise?Promise.all([a,i]).then(([z,u])=>oA(o,z,u)):oA(o,a,i)}});function Zz(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Kr(e)&&Kr(t)){const o=Object.keys(t),n=Object.keys(e).filter(a=>o.indexOf(a)!==-1),r={...e,...t};for(const a of n){const i=Zz(e[a],t[a]);if(!i.valid)return{valid:!1,mergeErrorPath:[a,...i.mergeErrorPath]};r[a]=i.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const o=[];for(let n=0;n<e.length;n++){const r=e[n],a=t[n],i=Zz(r,a);if(!i.valid)return{valid:!1,mergeErrorPath:[n,...i.mergeErrorPath]};o.push(i.data)}return{valid:!0,data:o}}return{valid:!1,mergeErrorPath:[]}}function oA(e,t,o){if(t.issues.length&&e.issues.push(...t.issues),o.issues.length&&e.issues.push(...o.issues),_r(e))return e;const n=Zz(t.value,o.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const Ue0=a0("$ZodRecord",(e,t)=>{re.init(e,t),e._zod.parse=(o,n)=>{const r=o.value;if(!Kr(r))return o.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),o;const a=[];if(t.keyType._zod.values){const i=t.keyType._zod.values;o.value={};for(const z of i)if(typeof z=="string"||typeof z=="number"||typeof z=="symbol"){const u=t.valueType._zod.run({value:r[z],issues:[]},n);u instanceof Promise?a.push(u.then(f=>{f.issues.length&&o.issues.push(...Br(z,f.issues)),o.value[z]=f.value})):(u.issues.length&&o.issues.push(...Br(z,u.issues)),o.value[z]=u.value)}let l;for(const z in r)i.has(z)||(l=l??[],l.push(z));l&&l.length>0&&o.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:l})}else{o.value={};for(const i of Reflect.ownKeys(r)){if(i==="__proto__")continue;const l=t.keyType._zod.run({value:i,issues:[]},n);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){o.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(u=>pn(u,n,sn())),input:i,path:[i],inst:e}),o.value[l.value]=l.value;continue}const z=t.valueType._zod.run({value:r[i],issues:[]},n);z instanceof Promise?a.push(z.then(u=>{u.issues.length&&o.issues.push(...Br(i,u.issues)),o.value[l.value]=u.value})):(z.issues.length&&o.issues.push(...Br(i,z.issues)),o.value[l.value]=z.value)}}return a.length?Promise.all(a).then(()=>o):o}}),Ve0=a0("$ZodEnum",(e,t)=>{re.init(e,t);const o=r10(t.entries),n=new Set(o);e._zod.values=n,e._zod.pattern=new RegExp(`^(${o.filter(r=>a10.has(typeof r)).map(r=>typeof r=="string"?sM(r):r.toString()).join("|")})$`),e._zod.parse=(r,a)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:o,input:i,inst:e}),r}}),Qe0=a0("$ZodTransform",(e,t)=>{re.init(e,t),e._zod.parse=(o,n)=>{if(n.direction==="backward")throw new Eg(e.constructor.name);const r=t.transform(o.value,o);if(n.async)return(r instanceof Promise?r:Promise.resolve(r)).then(i=>(o.value=i,o));if(r instanceof Promise)throw new Hr;return o.value=r,o}});function nA(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const $e0=a0("$ZodOptional",(e,t)=>{re.init(e,t),e._zod.optin="optional",e._zod.optout="optional",k1(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),k1(e._zod,"pattern",()=>{const o=t.innerType._zod.pattern;return o?new RegExp(`^(${n5(o.source)})?$`):void 0}),e._zod.parse=(o,n)=>{if(t.innerType._zod.optin==="optional"){const r=t.innerType._zod.run(o,n);return r instanceof Promise?r.then(a=>nA(a,o.value)):nA(r,o.value)}return o.value===void 0?o:t.innerType._zod.run(o,n)}}),Ge0=a0("$ZodNullable",(e,t)=>{re.init(e,t),k1(e._zod,"optin",()=>t.innerType._zod.optin),k1(e._zod,"optout",()=>t.innerType._zod.optout),k1(e._zod,"pattern",()=>{const o=t.innerType._zod.pattern;return o?new RegExp(`^(${n5(o.source)}|null)$`):void 0}),k1(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(o,n)=>o.value===null?o:t.innerType._zod.run(o,n)}),Ze0=a0("$ZodDefault",(e,t)=>{re.init(e,t),e._zod.optin="optional",k1(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,n)=>{if(n.direction==="backward")return t.innerType._zod.run(o,n);if(o.value===void 0)return o.value=t.defaultValue,o;const r=t.innerType._zod.run(o,n);return r instanceof Promise?r.then(a=>rA(a,t)):rA(r,t)}});function rA(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Ke0=a0("$ZodPrefault",(e,t)=>{re.init(e,t),e._zod.optin="optional",k1(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,n)=>(n.direction==="backward"||o.value===void 0&&(o.value=t.defaultValue),t.innerType._zod.run(o,n))}),Ye0=a0("$ZodNonOptional",(e,t)=>{re.init(e,t),k1(e._zod,"values",()=>{const o=t.innerType._zod.values;return o?new Set([...o].filter(n=>n!==void 0)):void 0}),e._zod.parse=(o,n)=>{const r=t.innerType._zod.run(o,n);return r instanceof Promise?r.then(a=>cA(a,e)):cA(r,e)}});function cA(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Je0=a0("$ZodCatch",(e,t)=>{re.init(e,t),k1(e._zod,"optin",()=>t.innerType._zod.optin),k1(e._zod,"optout",()=>t.innerType._zod.optout),k1(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,n)=>{if(n.direction==="backward")return t.innerType._zod.run(o,n);const r=t.innerType._zod.run(o,n);return r instanceof Promise?r.then(a=>(o.value=a.value,a.issues.length&&(o.value=t.catchValue({...o,error:{issues:a.issues.map(i=>pn(i,n,sn()))},input:o.value}),o.issues=[]),o)):(o.value=r.value,r.issues.length&&(o.value=t.catchValue({...o,error:{issues:r.issues.map(a=>pn(a,n,sn()))},input:o.value}),o.issues=[]),o)}}),e20=a0("$ZodPipe",(e,t)=>{re.init(e,t),k1(e._zod,"values",()=>t.in._zod.values),k1(e._zod,"optin",()=>t.in._zod.optin),k1(e._zod,"optout",()=>t.out._zod.optout),k1(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(o,n)=>{if(n.direction==="backward"){const a=t.out._zod.run(o,n);return a instanceof Promise?a.then(i=>Pi(i,t.in,n)):Pi(a,t.in,n)}const r=t.in._zod.run(o,n);return r instanceof Promise?r.then(a=>Pi(a,t.out,n)):Pi(r,t.out,n)}});function Pi(e,t,o){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},o)}const Gg=a0("$ZodCodec",(e,t)=>{re.init(e,t),k1(e._zod,"values",()=>t.in._zod.values),k1(e._zod,"optin",()=>t.in._zod.optin),k1(e._zod,"optout",()=>t.out._zod.optout),k1(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(o,n)=>{if((n.direction||"forward")==="forward"){const a=t.in._zod.run(o,n);return a instanceof Promise?a.then(i=>ji(i,t,n)):ji(a,t,n)}else{const a=t.out._zod.run(o,n);return a instanceof Promise?a.then(i=>ji(i,t,n)):ji(a,t,n)}}});function ji(e,t,o){if(e.issues.length)return e.aborted=!0,e;if((o.direction||"forward")==="forward"){const r=t.transform(e.value,e);return r instanceof Promise?r.then(a=>Xi(e,a,t.out,o)):Xi(e,r,t.out,o)}else{const r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(a=>Xi(e,a,t.in,o)):Xi(e,r,t.in,o)}}function Xi(e,t,o,n){return e.issues.length?(e.aborted=!0,e):o._zod.run({value:t,issues:e.issues},n)}const t20=a0("$ZodReadonly",(e,t)=>{re.init(e,t),k1(e._zod,"propValues",()=>t.innerType._zod.propValues),k1(e._zod,"values",()=>t.innerType._zod.values),k1(e._zod,"optin",()=>t.innerType._zod.optin),k1(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(o,n)=>{if(n.direction==="backward")return t.innerType._zod.run(o,n);const r=t.innerType._zod.run(o,n);return r instanceof Promise?r.then(aA):aA(r)}});function aA(e){return e.value=Object.freeze(e.value),e}const o20=a0("$ZodCustom",(e,t)=>{ot.init(e,t),re.init(e,t),e._zod.parse=(o,n)=>o,e._zod.check=o=>{const n=o.value,r=t.fn(n);if(r instanceof Promise)return r.then(a=>sA(a,o,n,e));sA(r,o,n,e)}});function sA(e,t,o,n){if(!e){const r={code:"custom",input:o,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(r.params=n._zod.def.params),t.issues.push(Ca(r))}}class n20{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...o){const n=o[0];if(this._map.set(t,n),n&&typeof n=="object"&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const o=this._map.get(t);return o&&typeof o=="object"&&"id"in o&&this._idmap.delete(o.id),this._map.delete(t),this}get(t){const o=t._zod.parent;if(o){const n={...this.get(o)??{}};delete n.id;const r={...n,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function r20(){return new n20}const Di=r20();function c20(e,t){return new e({type:"string",...Q0(t)})}function a20(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Q0(t)})}function iA(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Q0(t)})}function s20(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Q0(t)})}function i20(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Q0(t)})}function p20(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Q0(t)})}function M20(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Q0(t)})}function l20(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Q0(t)})}function b20(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Q0(t)})}function z20(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Q0(t)})}function u20(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Q0(t)})}function d20(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Q0(t)})}function O20(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Q0(t)})}function f20(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Q0(t)})}function A20(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Q0(t)})}function h20(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Q0(t)})}function q20(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Q0(t)})}function m20(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Q0(t)})}function g20(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Q0(t)})}function W20(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Q0(t)})}function v20(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Q0(t)})}function R20(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Q0(t)})}function y20(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Q0(t)})}function w20(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Q0(t)})}function L20(e,t){return new e({type:"string",format:"date",check:"string_format",...Q0(t)})}function x20(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Q0(t)})}function k20(e,t){return new e({type:"string",format:"duration",check:"string_format",...Q0(t)})}function C20(e,t){return new e({type:"boolean",...Q0(t)})}function N20(e){return new e({type:"unknown"})}function _20(e,t){return new e({type:"never",...Q0(t)})}function B20(e,t){return new e({type:"date",...Q0(t)})}function E20(e,t){return new Y10({check:"less_than",...Q0(t),value:e,inclusive:!0})}function S20(e,t){return new J10({check:"greater_than",...Q0(t),value:e,inclusive:!0})}function Zg(e,t){return new ee0({check:"max_length",...Q0(t),maximum:e})}function Vp(e,t){return new te0({check:"min_length",...Q0(t),minimum:e})}function Kg(e,t){return new oe0({check:"length_equals",...Q0(t),length:e})}function T20(e,t){return new ne0({check:"string_format",format:"regex",...Q0(t),pattern:e})}function P20(e){return new re0({check:"string_format",format:"lowercase",...Q0(e)})}function j20(e){return new ce0({check:"string_format",format:"uppercase",...Q0(e)})}function X20(e,t){return new ae0({check:"string_format",format:"includes",...Q0(t),includes:e})}function D20(e,t){return new se0({check:"string_format",format:"starts_with",...Q0(t),prefix:e})}function I20(e,t){return new ie0({check:"string_format",format:"ends_with",...Q0(t),suffix:e})}function Ms(e){return new pe0({check:"overwrite",tx:e})}function F20(e){return Ms(t=>t.normalize(e))}function H20(){return Ms(e=>e.trim())}function U20(){return Ms(e=>e.toLowerCase())}function V20(){return Ms(e=>e.toUpperCase())}function Q20(e,t,o){return new e({type:"array",element:t,...Q0(o)})}function $20(e,t,o){return new e({type:"custom",check:"custom",fn:t,...Q0(o)})}function G20(e){const t=Z20(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(Ca(n,o.value,t._zod.def));else{const r=n;r.fatal&&(r.continue=!1),r.code??(r.code="custom"),r.input??(r.input=o.value),r.inst??(r.inst=t),r.continue??(r.continue=!t._zod.def.abort),o.issues.push(Ca(r))}},e(o.value,o)));return t}function Z20(e,t){const o=new ot({check:"custom",...Q0(t)});return o._zod.check=e,o}function K20(e,t){const o=Q0(t);let n=o.truthy??["true","1","yes","on","y","enabled"],r=o.falsy??["false","0","no","off","n","disabled"];o.case!=="sensitive"&&(n=n.map(q=>typeof q=="string"?q.toLowerCase():q),r=r.map(q=>typeof q=="string"?q.toLowerCase():q));const a=new Set(n),i=new Set(r),l=e.Codec??Gg,z=e.Boolean??Vg,u=e.String??uM,f=new u({type:"string",error:o.error}),O=new z({type:"boolean",error:o.error}),h=new l({type:"pipe",in:f,out:O,transform:((q,g)=>{let W=q;return o.case!=="sensitive"&&(W=W.toLowerCase()),a.has(W)?!0:i.has(W)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...i],input:g.value,inst:h,continue:!1}),{})}),reverseTransform:((q,g)=>q===!0?n[0]||"true":r[0]||"false"),error:o.error});return h}const Y20=a0("ZodISODateTime",(e,t)=>{We0.init(e,t),ce.init(e,t)});function Yg(e){return w20(Y20,e)}const J20=a0("ZodISODate",(e,t)=>{ve0.init(e,t),ce.init(e,t)});function et0(e){return L20(J20,e)}const tt0=a0("ZodISOTime",(e,t)=>{Re0.init(e,t),ce.init(e,t)});function ot0(e){return x20(tt0,e)}const nt0=a0("ZodISODuration",(e,t)=>{ye0.init(e,t),ce.init(e,t)});function rt0(e){return k20(nt0,e)}const ct0=(e,t)=>{Xg.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:o=>O10(e,o)},flatten:{value:o=>d10(e,o)},addIssue:{value:o=>{e.issues.push(o),e.message=JSON.stringify(e.issues,Gz,2)}},addIssues:{value:o=>{e.issues.push(...o),e.message=JSON.stringify(e.issues,Gz,2)}},isEmpty:{get(){return e.issues.length===0}}})},nt=a0("ZodError",ct0,{Parent:Error}),at0=pM(nt),st0=MM(nt),it0=lM(nt),pt0=bM(nt),Mt0=h10(nt),lt0=q10(nt),bt0=m10(nt),zt0=g10(nt),ut0=W10(nt),dt0=v10(nt),Ot0=R10(nt),ft0=y10(nt),fe=a0("ZodType",(e,t)=>(re.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...o)=>e.clone(tr(t,{checks:[...t.checks??[],...o.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]})),e.clone=(o,n)=>dn(e,o,n),e.brand=()=>e,e.register=((o,n)=>(o.add(e,n),e)),e.parse=(o,n)=>at0(e,o,n,{callee:e.parse}),e.safeParse=(o,n)=>it0(e,o,n),e.parseAsync=async(o,n)=>st0(e,o,n,{callee:e.parseAsync}),e.safeParseAsync=async(o,n)=>pt0(e,o,n),e.spa=e.safeParseAsync,e.encode=(o,n)=>Mt0(e,o,n),e.decode=(o,n)=>lt0(e,o,n),e.encodeAsync=async(o,n)=>bt0(e,o,n),e.decodeAsync=async(o,n)=>zt0(e,o,n),e.safeEncode=(o,n)=>ut0(e,o,n),e.safeDecode=(o,n)=>dt0(e,o,n),e.safeEncodeAsync=async(o,n)=>Ot0(e,o,n),e.safeDecodeAsync=async(o,n)=>ft0(e,o,n),e.refine=(o,n)=>e.check(io0(o,n)),e.superRefine=o=>e.check(po0(o)),e.overwrite=o=>e.check(Ms(o)),e.optional=()=>MA(e),e.nullable=()=>lA(e),e.nullish=()=>MA(lA(e)),e.nonoptional=o=>to0(e,o),e.array=()=>c5(e),e.or=o=>It0([e,o]),e.and=o=>Ht0(e,o),e.transform=o=>bA(e,Gt0(o)),e.default=o=>Yt0(e,o),e.prefault=o=>eo0(e,o),e.catch=o=>no0(e,o),e.pipe=o=>bA(e,o),e.readonly=()=>ao0(e),e.describe=o=>{const n=e.clone();return Di.add(n,{description:o}),n},Object.defineProperty(e,"description",{get(){return Di.get(e)?.description},configurable:!0}),e.meta=(...o)=>{if(o.length===0)return Di.get(e);const n=e.clone();return Di.add(n,o[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Jg=a0("_ZodString",(e,t)=>{uM.init(e,t),fe.init(e,t);const o=e._zod.bag;e.format=o.format??null,e.minLength=o.minimum??null,e.maxLength=o.maximum??null,e.regex=(...n)=>e.check(T20(...n)),e.includes=(...n)=>e.check(X20(...n)),e.startsWith=(...n)=>e.check(D20(...n)),e.endsWith=(...n)=>e.check(I20(...n)),e.min=(...n)=>e.check(Vp(...n)),e.max=(...n)=>e.check(Zg(...n)),e.length=(...n)=>e.check(Kg(...n)),e.nonempty=(...n)=>e.check(Vp(1,...n)),e.lowercase=n=>e.check(P20(n)),e.uppercase=n=>e.check(j20(n)),e.trim=()=>e.check(H20()),e.normalize=(...n)=>e.check(F20(...n)),e.toLowerCase=()=>e.check(U20()),e.toUpperCase=()=>e.check(V20())}),eW=a0("ZodString",(e,t)=>{uM.init(e,t),Jg.init(e,t),e.email=o=>e.check(a20(At0,o)),e.url=o=>e.check(l20(ht0,o)),e.jwt=o=>e.check(y20(Bt0,o)),e.emoji=o=>e.check(b20(qt0,o)),e.guid=o=>e.check(iA(pA,o)),e.uuid=o=>e.check(s20(Ii,o)),e.uuidv4=o=>e.check(i20(Ii,o)),e.uuidv6=o=>e.check(p20(Ii,o)),e.uuidv7=o=>e.check(M20(Ii,o)),e.nanoid=o=>e.check(z20(mt0,o)),e.guid=o=>e.check(iA(pA,o)),e.cuid=o=>e.check(u20(gt0,o)),e.cuid2=o=>e.check(d20(Wt0,o)),e.ulid=o=>e.check(O20(vt0,o)),e.base64=o=>e.check(W20(Ct0,o)),e.base64url=o=>e.check(v20(Nt0,o)),e.xid=o=>e.check(f20(Rt0,o)),e.ksuid=o=>e.check(A20(yt0,o)),e.ipv4=o=>e.check(h20(wt0,o)),e.ipv6=o=>e.check(q20(Lt0,o)),e.cidrv4=o=>e.check(m20(xt0,o)),e.cidrv6=o=>e.check(g20(kt0,o)),e.e164=o=>e.check(R20(_t0,o)),e.datetime=o=>e.check(Yg(o)),e.date=o=>e.check(et0(o)),e.time=o=>e.check(ot0(o)),e.duration=o=>e.check(rt0(o))});function L2(e){return c20(eW,e)}const ce=a0("ZodStringFormat",(e,t)=>{ee.init(e,t),Jg.init(e,t)}),At0=a0("ZodEmail",(e,t)=>{ue0.init(e,t),ce.init(e,t)}),pA=a0("ZodGUID",(e,t)=>{be0.init(e,t),ce.init(e,t)}),Ii=a0("ZodUUID",(e,t)=>{ze0.init(e,t),ce.init(e,t)}),ht0=a0("ZodURL",(e,t)=>{de0.init(e,t),ce.init(e,t)}),qt0=a0("ZodEmoji",(e,t)=>{Oe0.init(e,t),ce.init(e,t)}),mt0=a0("ZodNanoID",(e,t)=>{fe0.init(e,t),ce.init(e,t)}),gt0=a0("ZodCUID",(e,t)=>{Ae0.init(e,t),ce.init(e,t)}),Wt0=a0("ZodCUID2",(e,t)=>{he0.init(e,t),ce.init(e,t)}),vt0=a0("ZodULID",(e,t)=>{qe0.init(e,t),ce.init(e,t)}),Rt0=a0("ZodXID",(e,t)=>{me0.init(e,t),ce.init(e,t)}),yt0=a0("ZodKSUID",(e,t)=>{ge0.init(e,t),ce.init(e,t)}),wt0=a0("ZodIPv4",(e,t)=>{we0.init(e,t),ce.init(e,t)}),Lt0=a0("ZodIPv6",(e,t)=>{Le0.init(e,t),ce.init(e,t)}),xt0=a0("ZodCIDRv4",(e,t)=>{xe0.init(e,t),ce.init(e,t)}),kt0=a0("ZodCIDRv6",(e,t)=>{ke0.init(e,t),ce.init(e,t)}),Ct0=a0("ZodBase64",(e,t)=>{Ce0.init(e,t),ce.init(e,t)}),Nt0=a0("ZodBase64URL",(e,t)=>{_e0.init(e,t),ce.init(e,t)}),_t0=a0("ZodE164",(e,t)=>{Be0.init(e,t),ce.init(e,t)}),Bt0=a0("ZodJWT",(e,t)=>{Se0.init(e,t),ce.init(e,t)}),tW=a0("ZodBoolean",(e,t)=>{Vg.init(e,t),fe.init(e,t)});function Kz(e){return C20(tW,e)}const Et0=a0("ZodUnknown",(e,t)=>{Te0.init(e,t),fe.init(e,t)});function Yz(){return N20(Et0)}const St0=a0("ZodNever",(e,t)=>{Pe0.init(e,t),fe.init(e,t)});function Tt0(e){return _20(St0,e)}const Pt0=a0("ZodDate",(e,t)=>{je0.init(e,t),fe.init(e,t),e.min=(n,r)=>e.check(S20(n,r)),e.max=(n,r)=>e.check(E20(n,r));const o=e._zod.bag;e.minDate=o.minimum?new Date(o.minimum):null,e.maxDate=o.maximum?new Date(o.maximum):null});function jt0(e){return B20(Pt0,e)}const Xt0=a0("ZodArray",(e,t)=>{Xe0.init(e,t),fe.init(e,t),e.element=t.element,e.min=(o,n)=>e.check(Vp(o,n)),e.nonempty=o=>e.check(Vp(1,o)),e.max=(o,n)=>e.check(Zg(o,n)),e.length=(o,n)=>e.check(Kg(o,n)),e.unwrap=()=>e.element});function c5(e,t){return Q20(Xt0,e,t)}const oW=a0("ZodObject",(e,t)=>{Ie0.init(e,t),fe.init(e,t),k1(e,"shape",()=>t.shape),e.keyof=()=>Qt0(Object.keys(e._zod.def.shape)),e.catchall=o=>e.clone({...e._zod.def,catchall:o}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Yz()}),e.loose=()=>e.clone({...e._zod.def,catchall:Yz()}),e.strict=()=>e.clone({...e._zod.def,catchall:Tt0()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=o=>M10(e,o),e.safeExtend=o=>l10(e,o),e.merge=o=>b10(e,o),e.pick=o=>i10(e,o),e.omit=o=>p10(e,o),e.partial=(...o)=>z10(nW,e,o[0]),e.required=(...o)=>u10(rW,e,o[0])});function Qp(e,t){const o={type:"object",shape:e??{},...Q0(t)};return new oW(o)}function dM(e,t){return new oW({type:"object",shape:e,catchall:Yz(),...Q0(t)})}const Dt0=a0("ZodUnion",(e,t)=>{Fe0.init(e,t),fe.init(e,t),e.options=t.options});function It0(e,t){return new Dt0({type:"union",options:e,...Q0(t)})}const Ft0=a0("ZodIntersection",(e,t)=>{He0.init(e,t),fe.init(e,t)});function Ht0(e,t){return new Ft0({type:"intersection",left:e,right:t})}const Ut0=a0("ZodRecord",(e,t)=>{Ue0.init(e,t),fe.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Vt0(e,t,o){return new Ut0({type:"record",keyType:e,valueType:t,...Q0(o)})}const Jz=a0("ZodEnum",(e,t)=>{Ve0.init(e,t),fe.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const o=new Set(Object.keys(t.entries));e.extract=(n,r)=>{const a={};for(const i of n)if(o.has(i))a[i]=t.entries[i];else throw new Error(`Key ${i} not found in enum`);return new Jz({...t,checks:[],...Q0(r),entries:a})},e.exclude=(n,r)=>{const a={...t.entries};for(const i of n)if(o.has(i))delete a[i];else throw new Error(`Key ${i} not found in enum`);return new Jz({...t,checks:[],...Q0(r),entries:a})}});function Qt0(e,t){const o=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Jz({type:"enum",entries:o,...Q0(t)})}const $t0=a0("ZodTransform",(e,t)=>{Qe0.init(e,t),fe.init(e,t),e._zod.parse=(o,n)=>{if(n.direction==="backward")throw new Eg(e.constructor.name);o.addIssue=a=>{if(typeof a=="string")o.issues.push(Ca(a,o.value,t));else{const i=a;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=e),o.issues.push(Ca(i))}};const r=t.transform(o.value,o);return r instanceof Promise?r.then(a=>(o.value=a,o)):(o.value=r,o)}});function Gt0(e){return new $t0({type:"transform",transform:e})}const nW=a0("ZodOptional",(e,t)=>{$e0.init(e,t),fe.init(e,t),e.unwrap=()=>e._zod.def.innerType});function MA(e){return new nW({type:"optional",innerType:e})}const Zt0=a0("ZodNullable",(e,t)=>{Ge0.init(e,t),fe.init(e,t),e.unwrap=()=>e._zod.def.innerType});function lA(e){return new Zt0({type:"nullable",innerType:e})}const Kt0=a0("ZodDefault",(e,t)=>{Ze0.init(e,t),fe.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Yt0(e,t){return new Kt0({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Pg(t)}})}const Jt0=a0("ZodPrefault",(e,t)=>{Ke0.init(e,t),fe.init(e,t),e.unwrap=()=>e._zod.def.innerType});function eo0(e,t){return new Jt0({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Pg(t)}})}const rW=a0("ZodNonOptional",(e,t)=>{Ye0.init(e,t),fe.init(e,t),e.unwrap=()=>e._zod.def.innerType});function to0(e,t){return new rW({type:"nonoptional",innerType:e,...Q0(t)})}const oo0=a0("ZodCatch",(e,t)=>{Je0.init(e,t),fe.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function no0(e,t){return new oo0({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const cW=a0("ZodPipe",(e,t)=>{e20.init(e,t),fe.init(e,t),e.in=t.in,e.out=t.out});function bA(e,t){return new cW({type:"pipe",in:e,out:t})}const aW=a0("ZodCodec",(e,t)=>{cW.init(e,t),Gg.init(e,t)});function ro0(e,t,o){return new aW({type:"pipe",in:e,out:t,transform:o.decode,reverseTransform:o.encode})}const co0=a0("ZodReadonly",(e,t)=>{t20.init(e,t),fe.init(e,t),e.unwrap=()=>e._zod.def.innerType});function ao0(e){return new co0({type:"readonly",innerType:e})}const so0=a0("ZodCustom",(e,t)=>{o20.init(e,t),fe.init(e,t)});function io0(e,t={}){return $20(so0,e,t)}function po0(e){return G20(e)}const Mo0=(...e)=>K20({Codec:aW,Boolean:tW,String:eW},...e),sW=ro0(Yg({offset:!0}),jt0(),{decode:e=>new Date(e),encode:e=>e.toISOString()}),lo0=dM({slug:L2(),title:L2(),custom_excerpt:L2(),url:L2().url(),published_at:sW,featured:Mo0(),feature_image:L2().url().optional(),html:L2().optional()}).transform(e=>({slug:e.slug,title:e.title,customExcerpt:e.custom_excerpt,url:e.url,publishedAt:e.published_at,featured:e.featured,featureImage:e.feature_image,html:e.html})),bo0=Qp({posts:c5(lo0).default([]),changelogUrl:L2().url().default("https://ghost.org/changelog")}).transform(e=>({entries:e.posts,changelogUrl:e.changelogUrl})),ls=()=>K2({queryKey:["changelog"],queryFn:async()=>{const e=await fetch("https://ghost.org/changelog.json");if(!e.ok)throw new Error(`Failed to fetch changelog: ${e.status}`);const t=await e.json();return bo0.parse(t)},staleTime:1/0});function zA(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function iW(e,t){const o={...e};for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=t[n],a=e[n];r!==void 0&&(zA(r)&&zA(a)?o[n]=iW(a,r):o[n]=r)}return o}const zo0=dM({lastSeenDate:sW.optional().catch(void 0)}),uA={expanded:{posts:!0},menu:{visible:!0}},uo0=dM({expanded:Qp({posts:Kz()}),menu:Qp({visible:Kz()})}),eu=dM({whatsNew:zo0.optional().catch(void 0),nightShift:Kz().optional(),navigation:uo0.default(uA).catch(uA)}),pW=e=>["userPreferences",e?.id,e?.accessibility];function OM(e){const{data:t}=ye();return K2({...e,queryKey:pW(t),queryFn:()=>{if(!t)throw new Error("User not loaded");const o=t.accessibility||"{}",n=JSON.parse(o);return eu.parse(n)},enabled:!!t,staleTime:1/0,cacheTime:0})}const fM=()=>{const e=v1(),{data:t}=ye(),{mutateAsync:o}=_g();return Me({mutationFn:async n=>{if(!t)throw new Error("User is not loaded");const r=e.getQueryData(pW(t))??eu.parse({}),a=iW(r,n),i=eu.encode(a);await o({...t,accessibility:JSON.stringify(i)})}})};function do0(){return{lastSeenDate:new Date}}const Oo0=(e,t)=>["whatsNew",e?.whatsNew?.lastSeenDate?.toISOString(),t?.publishedAt.toISOString()],a5=()=>{const{data:e,isSuccess:t}=OM(),{data:o,isSuccess:n}=ls(),{mutateAsync:r}=fM(),a=!!e?.whatsNew?.lastSeenDate;p.useEffect(()=>{!a&&t&&r({whatsNew:do0()})},[a,t,r]);const i=o?.entries[0];return K2({queryKey:Oo0(e,i),queryFn:()=>{if(!i)return{hasNew:!1};const l=e.whatsNew.lastSeenDate;return{hasNew:i.publishedAt>l}},enabled:n&&a,staleTime:1/0,cacheTime:0})},MW=()=>{const{data:e}=ls(),{mutateAsync:t}=fM();return Me({mutationFn:async()=>{const o=e?.entries[0];if(!o)return;const n={lastSeenDate:o.publishedAt};await t({whatsNew:n})}})};function fo0(e){return e.toLocaleDateString("en-GB",{day:"2-digit",month:"long",year:"numeric"})}function Ao0({entry:e}){return b.jsxs("a",{className:"flex items-start gap-6 p-2 -mx-2 rounded-md hover:bg-muted/80 transition-colors","data-test-entry":!0,href:e.url,rel:"noopener noreferrer",target:"_blank",children:[e.featureImage&&b.jsx("img",{alt:e.title,className:"flex-shrink-0 w-40 h-[110px] object-cover rounded","data-test-entry-image":!0,src:e.featureImage}),b.jsxs("div",{className:"flex flex-col gap-2 min-w-0 flex-1",children:[b.jsx("h2",{className:"text-[17px] font-semibold text-foreground mt-1.5","data-test-entry-title":!0,children:e.title}),b.jsx("p",{className:"text-sm text-gray-700 leading-[1.45] line-clamp-2","data-test-entry-excerpt":!0,children:e.customExcerpt}),b.jsx("span",{className:"text-sm text-gray-600","data-test-entry-date":!0,children:fo0(e.publishedAt)})]})]})}function ho0({open:e,onOpenChange:t}){const{data:o}=ls(),{mutate:n}=MW();return p.useEffect(()=>{e&&n()},[e,n]),b.jsx(os,{open:e,onOpenChange:t,children:b.jsxs(pc,{className:"max-w-2xl max-h-[85vh] flex flex-col","data-test-modal":"whats-new",role:"dialog","aria-modal":"true","aria-labelledby":"whats-new-modal-title",children:[b.jsx(V3,{children:b.jsx($3,{id:"whats-new-modal-title","data-test-modal-title":!0,className:"text-2xl tracking-tighter",children:"What’s new?"})}),o?b.jsxs(b.Fragment,{children:[b.jsx("section",{className:"flex-1 overflow-y-auto space-y-2 -mx-6 px-6","data-test-entries":!0,children:o.entries.map(r=>b.jsx(Ao0,{entry:r},r.slug))}),b.jsxs(Q3,{className:"flex-row justify-between sm:justify-between gap-3",children:[b.jsx(i1,{asChild:!0,variant:"outline",children:b.jsx("a",{href:`${o.changelogUrl}#/portal/signup`,rel:"noopener noreferrer",target:"_blank",children:"Turn on notifications"})}),b.jsx(i1,{asChild:!0,children:b.jsx("a",{href:o.changelogUrl,rel:"noopener noreferrer",target:"_blank",children:"All updates →"})})]})]}):b.jsx("div",{className:"flex-1 flex items-center justify-center py-12",children:b.jsx(Ip,{size:"lg"})})]})})}function lW(){const e=Cg(),t=!!e?.subscription?.isActiveTrial,o=e?.subscription?.trial_end?Math.ceil((new Date(e.subscription.trial_end).getTime()-Date.now())/(1e3*60*60*24)):0;return{showUpgradeBanner:t,trialDaysRemaining:o}}function qo0({children:e,...t}){return b.jsx("span",{className:"flex-1",...t,children:e})}const e2=({children:e,...t})=>b.jsx(eg,{className:"cursor-pointer text-base",asChild:!0,...t,children:e});e2.Label=qo0;function $p(e){const t=ye();return b.jsxs(Xd,{...e,children:[t.data?.profile_image&&b.jsx(Dd,{src:t.data?.profile_image}),b.jsx(Id,{className:"text-foreground-muted hover:text-foreground",children:b.jsx(Pd,{})})]})}function bW({name:e,email:t,children:o}){return b.jsx("div",{className:"p-3",children:b.jsxs("div",{className:"flex items-center gap-3",children:[o,b.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[b.jsx("span",{className:"text-base font-semibold text-foreground truncate",children:e}),b.jsx("span",{className:"text-xs text-foreground-muted -mt-px truncate",children:t})]})]})})}function zW(){const e=ye();return b.jsx(e2,{children:b.jsxs($a,{to:`/settings/staff/${e.data?.slug}`,children:[b.jsx(Pd,{}),b.jsx(e2.Label,{children:"Your profile"})]})})}function uW(){const{data:e}=OM(),{mutateAsync:t,isLoading:o}=fM(),n=r=>{t({nightShift:r})};return b.jsxs(e2,{asChild:!1,onSelect:r=>{r.preventDefault(),n(!e?.nightShift)},children:[b.jsx(PZ,{}),b.jsx(e2.Label,{className:"flex-1",children:"Dark mode"}),b.jsx(ng,{size:"sm",checked:e?.nightShift??!1,disabled:o,onCheckedChange:n,onClick:r=>r.stopPropagation(),tabIndex:-1})]})}function dW(){const e=()=>{const{apiRoot:t,adminRoot:o}=m3();fetch(`${t}/session`,{method:"DELETE"}).then(()=>{window.location.href=o}).catch(n=>{console.error(n)})};return b.jsxs(e2,{asChild:!1,onSelect:e,children:[b.jsx(xZ,{}),b.jsx(e2.Label,{children:"Sign out"})]})}function mo0(e){const t=ye(),{data:o}=a5(),{showUpgradeBanner:n}=lW();return b.jsxs(Ym,{...e,children:[b.jsx(Jm,{asChild:!0,className:"focus-visible:ring-0",children:b.jsxs(nM,{size:"lg",className:"data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground","aria-label":"User menu",children:[b.jsxs("div",{className:"relative",children:[b.jsx($p,{}),o?.hasNew&&b.jsx("span",{className:"absolute -top-0.5 -right-0.5",children:b.jsx($f,{variant:"success",size:"sm",label:"New updates available","data-test-whats-new-avatar-badge":!0})})]}),b.jsxs("div",{className:"grid flex-1 text-left text-base leading-tight",children:[b.jsx("span",{className:"truncate font-semibold",children:t.data?.name}),b.jsx("span",{className:"text-muted-foreground truncate text-xs -mt-px",children:t.data?.email})]}),b.jsx(oZ,{className:"ml-auto size-4 text-grey-700","data-test-nav":"arrow-down"})]})}),b.jsxs(Zd,{align:"start",sideOffset:10,className:`w-[var(--radix-dropdown-menu-trigger-width)] ${n?"shadow-[0_18px_80px_0_rgba(0,0,0,0.07),0_7.52px_33.422px_0_rgba(0,0,0,0.05),0_4.021px_17.869px_0_rgba(0,0,0,0.04),0_2.254px_10.017px_0_rgba(0,0,0,0.04),0_1.197px_5.32px_0_rgba(0,0,0,0.03),0_0.498px_2.214px_0_rgba(0,0,0,0.02)]":""}`,children:[b.jsx(bW,{name:t.data?.name,email:t.data?.email,children:b.jsx($p,{})}),b.jsx(Pn,{}),b.jsxs(e2,{"data-test-nav":"whatsnew",asChild:!1,onSelect:()=>{e.onOpenWhatsNew?.()},children:[b.jsx(I9,{}),b.jsx(e2.Label,{children:"What’s new?"}),o?.hasNew&&b.jsx("div",{className:"flex-1 flex justify-end",children:b.jsx($f,{variant:"success",size:"sm",label:"New updates available","data-test-whats-new-menu-badge":!0})})]}),b.jsx(zW,{}),b.jsx(Pn,{}),b.jsx(e2,{children:b.jsxs("a",{href:"https://ghost.org/resources?utm_source=admin&utm_campaign=resources",target:"_blank",rel:"noopener noreferrer",children:[b.jsx($G,{}),b.jsx(e2.Label,{children:"Resources & guides"})]})}),b.jsx(uW,{}),b.jsx(Pn,{}),b.jsx(dW,{})]})]})}function go0(){const e=ye(),o=aM().data?.site.url??"";return b.jsxs(Ym,{children:[b.jsx(Jm,{asChild:!0,children:b.jsx("button",{className:"rounded-full shadow-lg hover:shadow-xl transition-shadow focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 p-0.5 flex items-center justify-center border border-border dark:bg-muted bg-background","aria-label":"Open user menu",children:b.jsx($p,{className:"w-11 h-11"})})}),b.jsxs(Zd,{align:"start",side:"top",sideOffset:10,className:"min-w-56 mb-2",children:[b.jsx(bW,{name:e.data?.name,email:e.data?.email,children:b.jsx($p,{})}),b.jsx(Pn,{}),b.jsx(e2,{children:b.jsxs($a,{to:"/posts",children:[b.jsx(OZ,{}),b.jsx(e2.Label,{children:"Posts"})]})}),b.jsx(e2,{children:b.jsxs("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:[b.jsx(Bd,{}),b.jsx(e2.Label,{children:"View site"})]})}),b.jsx(Pn,{}),b.jsx(zW,{}),b.jsx(uW,{}),b.jsx(Pn,{}),b.jsx(dW,{})]})]})}const mc0=null,s5="CustomThemeSettingsResponseType",Wo0=s5,gc0=Xt({dataType:s5,path:"/custom_theme_settings/"}),Wc0=Ve({method:"PUT",path:()=>"/custom_theme_settings/",body:e=>({custom_theme_settings:e}),updateQueries:{emberUpdateType:"skip",dataType:s5,update:e=>e}}),bc="ThemesResponseType",vc0=Xt({dataType:bc,path:"/themes/"}),vo0=Xt({dataType:bc,path:"/themes/active/"}),Rc0=Ve({method:"PUT",path:e=>`/themes/${e}/activate/`,updateQueries:{dataType:bc,emberUpdateType:"createOrUpdate",update:(e,t)=>({...t,themes:t.themes.map(o=>{const n=e.themes.find(({name:r})=>r===o.name);return n||{...o,active:!1}})})},invalidateQueries:{dataType:Wo0}}),yc0=Ve({method:"DELETE",path:e=>`/themes/${e}/`,updateQueries:{dataType:bc,emberUpdateType:"delete",update:(e,t,o)=>({...t,themes:t.themes.filter(n=>n.name!==o)})}}),wc0=Ve({method:"POST",path:()=>"/themes/install/",searchParams:e=>({source:"github",ref:e}),updateQueries:{dataType:bc,emberUpdateType:"createOrUpdate",update:(e,t)=>t&&{...t,themes:[...t.themes,...e.themes]}}}),Lc0=Ve({method:"POST",path:()=>"/themes/upload/",body:({file:e})=>{const t=new FormData;return t.append("file",e),t},updateQueries:{dataType:bc,emberUpdateType:"createOrUpdate",update:(e,t)=>t&&{...t,themes:[...t.themes,...e.themes]}}});function Ro0(e){return e.active}function OW(e){return e.name.toLowerCase()==="source"}function fW(e){return e.name.toLowerCase()==="casper"}function xc0(e){return OW(e)||fW(e)}function kc0(e){return!OW(e)&&!fW(e)&&!Ro0(e)}function yo0(e){return e.code==="GS110-NO-MISSING-PAGE-BUILDER-USAGE"&&!!e.failures?.[0]?.message?.includes("show_title_and_feature_image")}function AW(){const{data:e}=ye(),t=e&&ps(e),{data:o}=vo0({enabled:!t}),n=o?.themes?.[0],r=n?.errors??[],a=n?.warnings??[],i=r.filter(z=>!yo0(z));return{hasErrors:i.length>0,errors:i,warnings:a}}function dA({error:e}){const[t,o]=p.useState(!1);return b.jsxs("li",{className:"border-b border-border last:border-0",children:[b.jsxs("button",{className:"flex w-full items-center gap-2 py-3 text-left text-sm font-medium",type:"button",onClick:()=>o(!t),children:[b.jsx(F3,{className:`size-4 shrink-0 text-muted-foreground transition-transform duration-200 ${t?"rotate-90":""}`}),b.jsx("span",{children:e.rule})]}),t&&b.jsxs("div",{className:"pb-3 pl-6 text-sm text-muted-foreground",children:[b.jsx("p",{dangerouslySetInnerHTML:{__html:e.details}}),e.failures?.length>0&&b.jsxs("div",{className:"mt-2",children:[b.jsx("h6",{className:"text-xs font-semibold uppercase text-muted-foreground",children:"Affected files:"}),b.jsx("ul",{className:"mt-1 list-disc pl-4",children:e.failures.map((n,r)=>b.jsxs("li",{children:[b.jsx("code",{className:"text-xs",children:n.ref}),n.message&&b.jsxs(b.Fragment,{children:[": ",n.message]})]},r))})]})]})]})}function wo0({open:e,onOpenChange:t,errors:o,warnings:n}){return b.jsx(os,{open:e,onOpenChange:t,children:b.jsxs(pc,{className:"max-w-lg max-h-[85vh] flex flex-col",children:[b.jsx(V3,{children:b.jsx($3,{className:"text-2xl tracking-tighter",children:"Theme errors"})}),b.jsxs("section",{className:"flex-1 overflow-y-auto -mx-6 px-6",children:[o.length>0&&b.jsxs("div",{children:[b.jsx("h2",{className:"mb-1 text-sm font-semibold",children:"Errors"}),b.jsx("p",{className:"mb-2 text-xs text-muted-foreground",children:"Highly recommended to fix, functionality could be restricted"}),b.jsx("ul",{className:"border-t border-border",children:o.map((r,a)=>b.jsx(dA,{error:r},a))})]}),n.length>0&&b.jsxs("div",{className:o.length>0?"mt-4":"",children:[b.jsx("h2",{className:"mb-1 text-sm font-semibold",children:"Warnings"}),b.jsx("ul",{className:"border-t border-border",children:n.map((r,a)=>b.jsx(dA,{error:r},a))})]})]}),b.jsx(Q3,{children:b.jsx(i1,{onClick:()=>t(!1),children:"OK"})})]})})}function Lo0(){const{hasErrors:e,errors:t,warnings:o}=AW(),[n,r]=p.useState(!1);return e?b.jsxs(b.Fragment,{children:[b.jsx(U3,{className:"mx-2 cursor-pointer",role:"status",size:"md",variant:"destructive",onClick:()=>r(!0),children:b.jsxs("div",{className:"flex items-start gap-2",children:[b.jsx(U9,{className:"mt-0.5 size-4 shrink-0 text-red"}),b.jsxs("div",{children:[b.jsx("div",{className:"font-semibold text-red",children:"Your theme has errors"}),b.jsx("div",{className:"text-sm text-foreground",children:"Some functionality on your site may be limited →"})]})]})}),b.jsx(wo0,{errors:t,open:n,warnings:o,onOpenChange:r})]}):null}const xo0=""+new URL("ghost-pro-logo-B1sXD_MX.png",import.meta.url).href,ko0=""+new URL("ghost-pro-logo-dark-BeH8deo0.png",import.meta.url).href;function Co0({trialDaysRemaining:e}){return b.jsxs(U3,{variant:"gradient",size:"lg",className:"mx-2 flex flex-col items-stretch",children:[b.jsxs("div",{children:[b.jsx("img",{src:xo0,alt:"Ghost Pro",className:"max-h-[33px] dark:hidden"}),b.jsx("img",{src:ko0,alt:"Ghost Pro",className:"max-h-[33px] hidden dark:block"})]}),b.jsx("div",{className:"text-base mt-3 font-semibold",children:"Unlock every feature"}),b.jsxs("div",{className:"mt-2 text-gray-700 text-sm mb-4",children:["Choose a plan to access the full power of Ghost right away, you have ",b.jsxs("span",{className:"font-semibold text-foreground",children:[e," days"]})," free trial remaining."]}),b.jsx(i1,{asChild:!0,children:b.jsx("a",{href:"#/pro/billing/plans",children:"Upgrade now"})})]})}function No0(){const{data:e}=a5(),{data:t}=ls(),{mutate:o}=MW(),[n,r]=p.useState(!1);if(n||!e?.hasNew)return null;const a=t?.entries[0];if(!a)return null;const i=()=>{r(!0),o()},l=()=>{o()};return b.jsx(U3,{"data-test-toast":"whats-new",className:"mx-2",role:"status","aria-label":"What’s new notification","aria-live":"polite",variant:"gradient",dismissible:!0,onDismiss:i,children:b.jsxs("a",{href:a.url,target:"_blank",rel:"noopener noreferrer",className:"block pr-8",onClick:l,"data-test-toast-link":!0,children:[b.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b.jsx(I9,{className:"size-4 text-purple-600 dark:text-purple"}),b.jsx("span",{className:"text-xs font-semibold text-gray-700 dark:text-gray-400 uppercase tracking-wide",children:"What’s new?"})]}),b.jsx("div",{className:"text-base font-semibold text-gray-900 dark:text-foreground mb-1","data-test-toast-title":!0,children:a.title}),b.jsx("div",{className:"text-sm text-gray-700","data-test-toast-excerpt":!0,children:a.customExcerpt})]})})}function _o0(){const{data:e}=a5(),{data:t}=ls(),o=t?.entries[0];return{showWhatsNewBanner:!!e?.hasNew&&!!o}}function i5(){const{hasErrors:e}=AW(),{showUpgradeBanner:t,trialDaysRemaining:o}=lW(),{showWhatsNewBanner:n}=_o0();return e5()?e?{bannerType:"theme-errors",banner:b.jsx(Lo0,{}),hasBanner:!0}:t?{bannerType:"upgrade",banner:b.jsx(Co0,{trialDaysRemaining:o}),hasBanner:!0}:n?{bannerType:"whats-new",banner:b.jsx(No0,{}),hasBanner:!0}:{bannerType:null,banner:null,hasBanner:!1}:{bannerType:null,banner:null,hasBanner:!1}}function Bo0({...e}){const[t,o]=p.useState(!1),{hasBanner:n}=i5();return b.jsxs(b.Fragment,{children:[b.jsx(gg,{...e,children:b.jsx(Mc,{className:n?"pt-3":"",children:b.jsx(lc,{children:b.jsx(Yd,{children:b.jsx(mo0,{onOpenWhatsNew:()=>o(!0)})})})})}),b.jsx(ho0,{open:t,onOpenChange:o})]})}function Eo0({banner:e}){const t=i5(),o=e??t.banner;return o?b.jsx("div",{className:"fixed left-3 bottom-[92px] max-w-[276px] z-50",children:o}):null}const Gp="SettingsResponseType",AM=Xt({dataType:Gp,path:"/settings/",defaultSearchParams:{group:"site,theme,private,members,portal,newsletter,email,labs,slack,unsplash,views,firstpromoter,editor,comments,analytics,announcement,pintura,donations,security,social_web,explore,transistor"}}),Cc0=Ve({method:"PUT",path:()=>"/settings/",body:e=>({settings:e.map(({key:t,value:o})=>({key:t,value:o}))}),updateQueries:{dataType:Gp,emberUpdateType:"createOrUpdate",update:e=>({...e,settings:e.settings})},invalidateQueries:{filters:{predicate(e){return e.queryKey[0]!==Gp}}}}),Nc0=Ve({method:"DELETE",path:()=>"/settings/stripe/connect/",invalidateQueries:{dataType:Gp}}),_c0=Ve({method:"POST",path:()=>"/slack/test/"});function Bc0(e){const t=["API","CTA","RSS"];return e.replace(/^[a-z]/,o=>o.toUpperCase()).replace(/_/g," ").replace(new RegExp(`\\b(${t.join("|")})\\b`,"ig"),o=>o.toUpperCase())}function Ec0(e,t){return t.map(o=>{var n;return(n=e?.find(r=>r.key===o))==null?void 0:n.value})}function oo(e,t){if(!e)return null;const o=e.find(n=>n.key===t);return o?.value||null}function Sc0(e,t){if(!e)return;const o=e.find(n=>n.key===t);return o?.is_read_only||!1}function Tc0(e,t){const o=a=>e.some(i=>i.key===a&&i.value),n=o("stripe_secret_key")&&o("stripe_publishable_key"),r=o("stripe_connect_secret_key")&&o("stripe_connect_publishable_key");return t.stripeDirect?n:r||n}const p5=[],hW=p.createContext(void 0),So0=({children:e})=>{const t=Pe(),[o,n]=p.useState(()=>{const i=localStorage.getItem("featureFlags");return i?JSON.parse(i):To0()});p.useEffect(()=>{const i=Po0(t.search);Object.keys(i).length>0&&n(l=>{const z={...l,...i};return localStorage.setItem("featureFlags",JSON.stringify(z)),z})},[t.search]);const a={isEnabled:i=>o[i]??!1,flags:o,allFlags:p5};return b.jsx(hW.Provider,{value:a,children:e})},To0=()=>p5.reduce((e,t)=>({...e,[t]:!1}),{}),Po0=e=>{const t=new URLSearchParams(e),o={};return p5.forEach(n=>{const r=t.get(n);r==="ON"?o[n]=!0:r==="OFF"&&(o[n]=!1)}),o},jo0=()=>{const e=p.useContext(hW);if(e===void 0)throw new Error("useFeatureFlags must be used within a FeatureFlagsProvider");return e};function hM(){const t=id().find(o=>o.handle==="activitypub-basepath")?.pathname??"";return t.endsWith("/")?t.slice(0,-1):t}function qo(){const e=yg(),t=hM();return p.useCallback((o,n)=>{if(typeof o=="number"){e(o,n);return}o.startsWith("/")?e(`${t}${o}`,n):e(o,n)},[e,t])}const qW=({className:e,onClick:t})=>{const o=qo(),{previousPath:n}=y3();return b.jsx(i1,{className:R0("size-9 rounded-full bg-white/85 px-2 backdrop-blur-md dark:bg-black/85 dark:text-white [&_svg]:size-6 focus-visible:ring-0",e),variant:"ghost",onClick:()=>{if(t){t();return}o(n?-1:"/")},children:b.jsx(XG,{size:24,strokeWidth:1.25})})},Xo0=()=>{const e=Pe(),t=no(SW,e.pathname);if(!t)return null;const o=t.map(n=>n.route).filter(n=>n.pageTitle);return o[o.length-1]||t[t.length-1].route};function mW(){const e=id(),t=e.findIndex(z=>z.handle==="activitypub-basepath");if(t===-1)return"";const o=e[t+1];if(!o)return"";const r=e[t].pathname,a=o.pathname;let i=a.startsWith(r)?a.slice(r.length):a;return i=i.replace(/^\//,""),i.split("/")[0]}const Do0=({title:e,backIcon:t})=>t?b.jsx(qW,{className:"-ml-2"}):b.jsx(vg,{className:"max-md:text-[2.4rem]",children:e}),OA=({onToggleMobileSidebar:e})=>b.jsx(i1,{className:"px:0 mr-[-9px] w-[34px] rounded-full bg-white/85 backdrop-blur-md lg:hidden dark:bg-black/85 dark:text-white",variant:"ghost",onClick:e,children:b.jsx(CZ,{className:"!size-5"})}),Io0=({onToggleMobileSidebar:e,showBorder:t=!0})=>{const{canGoBack:o}=y3(),n=mW(),r=C00(),a=Xo0();let i=!1;n==="profile"&&(i=!0),n==="notes"&&o&&(i=!0);const l=o&&r||a?.showBackButton===!0;return b.jsx(b.Fragment,{children:i?b.jsxs("div",{className:"sticky left-0 top-8 z-50 inline-block max-lg:flex max-lg:items-center max-lg:justify-between max-lg:pr-[15.5px] max-md:top-4",children:[b.jsx("div",{children:l&&b.jsx(qW,{className:"ml-6 max-md:ml-[10px]"})}),!l&&b.jsx(OA,{onToggleMobileSidebar:e})]}):b.jsx("div",{className:"sticky top-0 z-50 bg-white/85 backdrop-blur-md dark:bg-black",children:b.jsxs("div",{className:`relative flex h-[102px] items-center justify-between gap-5 px-[min(4vw,32px)] max-md:h-[68px] ${t?'before:absolute before:inset-x-[min(4vw,32px)] before:bottom-0 before:block before:border-b before:border-gray-200 before:content-[""] before:dark:border-gray-950':""}`,children:[b.jsx(Do0,{backIcon:l,title:a?.pageTitle||""}),b.jsx(OA,{onToggleMobileSidebar:e})]})})})};function Jo(e){if(!e.preferredUsername||!e.id)return"@unknown@unknown";try{return`@${e.preferredUsername}@${new URL(e.id).hostname.replace(/^www\./,"")}`}catch{return"@unknown@unknown"}}var tu=(e=>(e[e.Note=0]="Note",e[e.Article=1]="Article",e[e.Tombstone=2]="Tombstone",e))(tu||{});const Fo0=e=>typeof e=="object"&&e!==null&&"statusCode"in e&&"message"in e&&typeof e.statusCode=="number"&&typeof e.message=="string";class Ho0{constructor(t,o,n,r=window.fetch.bind(window)){this.apiUrl=t,this.authApiUrl=o,this.handle=n,this.fetch=r}async getToken(){try{return(await(await this.fetch(this.authApiUrl)).json())?.identities?.[0]?.token||null}catch{return null}}async fetchJSON(t,o="GET",n){const r=await this.getToken(),a={method:o,headers:{Authorization:`Bearer ${r}`,Accept:"application/activity+json"}};n&&(a.body=JSON.stringify(n),a.headers["Content-Type"]="application/json");const i=await this.fetch(t,a);if(i.status===204||i.status===202)return null;if(!i.ok){const l={message:"Something went wrong, please try again.",statusCode:i.status};try{const z=await i.json(),u=z.message||z.error;u&&(l.message=u),z.code&&(l.code=z.code)}catch{}throw l}return await i.json()}async blockDomain(t){const o=new URL(`.ghost/activitypub/v1/actions/block/domain/${encodeURIComponent(t.href)}`,this.apiUrl);return await this.fetchJSON(o,"POST"),!0}async unblockDomain(t){const o=new URL(`.ghost/activitypub/v1/actions/unblock/domain/${encodeURIComponent(t.href)}`,this.apiUrl);return await this.fetchJSON(o,"POST"),!0}async block(t){const o=new URL(`.ghost/activitypub/v1/actions/block/${encodeURIComponent(t.href)}`,this.apiUrl);return await this.fetchJSON(o,"POST"),!0}async unblock(t){const o=new URL(`.ghost/activitypub/v1/actions/unblock/${encodeURIComponent(t.href)}`,this.apiUrl);return await this.fetchJSON(o,"POST"),!0}async follow(t){const o=new URL(`.ghost/activitypub/v1/actions/follow/${t}`,this.apiUrl);return await this.fetchJSON(o,"POST")}async unfollow(t){const o=new URL(`.ghost/activitypub/v1/actions/unfollow/${t}`,this.apiUrl);return await this.fetchJSON(o,"POST")}async like(t){const o=new URL(`.ghost/activitypub/v1/actions/like/${encodeURIComponent(t)}`,this.apiUrl);await this.fetchJSON(o,"POST")}async unlike(t){const o=new URL(`.ghost/activitypub/v1/actions/unlike/${encodeURIComponent(t)}`,this.apiUrl);await this.fetchJSON(o,"POST")}async repost(t){const o=new URL(`.ghost/activitypub/v1/actions/repost/${encodeURIComponent(t)}`,this.apiUrl);await this.fetchJSON(o,"POST")}async derepost(t){const o=new URL(`.ghost/activitypub/v1/actions/derepost/${encodeURIComponent(t)}`,this.apiUrl);await this.fetchJSON(o,"POST")}async reply(t,o,n){const r=new URL(`.ghost/activitypub/v1/actions/reply/${encodeURIComponent(t)}`,this.apiUrl),a={content:o};return n&&(a.image=n),await this.fetchJSON(r,"POST",a)}async note(t,o){const n=new URL(".ghost/activitypub/v1/actions/note",this.apiUrl),r={content:t};return o&&(r.image=o),(await this.fetchJSON(n,"POST",r)).post}async delete(t){const o=new URL(`.ghost/activitypub/v1/post/${encodeURIComponent(t)}`,this.apiUrl);await this.fetchJSON(o,"DELETE")}get userApiUrl(){return new URL(`.ghost/activitypub/users/${this.handle}`,this.apiUrl)}async getUser(){return await this.fetchJSON(this.userApiUrl)}get searchApiUrl(){return new URL(".ghost/activitypub/v1/actions/search",this.apiUrl)}async search(t){const o=this.searchApiUrl;o.searchParams.set("query",t);const n=await this.fetchJSON(o,"GET");return n&&"accounts"in n?n:{accounts:[]}}async getThread(t){const o=new URL(`.ghost/activitypub/v1/thread/${encodeURIComponent(t)}`,this.apiUrl);return await this.fetchJSON(o)}async getAccount(t){const o=new URL(`.ghost/activitypub/v1/account/${t}`,this.apiUrl);return await this.fetchJSON(o)}async getAccountFollows(t,o,n){const r=new URL(`.ghost/activitypub/v1/account/${t}/follows/${o}`,this.apiUrl);n&&r.searchParams.set("next",n);const a=await this.fetchJSON(r);if(a===null)return{accounts:[],next:null};if(!("accounts"in a))return{accounts:[],next:null};const i=Array.isArray(a.accounts)?a.accounts:[],l="next"in a&&typeof a.next=="string"?a.next:null;return{accounts:i,next:l}}async getFeed(t){return this.getPaginatedPosts(".ghost/activitypub/v1/feed/notes",t)}async getInbox(t){return this.getPaginatedPosts(".ghost/activitypub/v1/feed/reader",t)}async getDiscoveryFeed(t,o){const n=`.ghost/activitypub/v1/feed/discover/${t}`;return this.getPaginatedPosts(n,o)}async getExploreAccounts(t,o){const n=`.ghost/activitypub/v1/explore/${t}`;return this.getPaginatedExploreAccounts(n,o)}async getTopics(){const t=new URL(".ghost/activitypub/v1/topics",this.apiUrl),o=await this.fetchJSON(t);return{topics:o&&"topics"in o&&Array.isArray(o.topics)?o.topics:[]}}async getRecommendations(t){const o=new URL(".ghost/activitypub/v1/recommendations",this.apiUrl);t&&o.searchParams.set("limit",t.toString());const n=await this.fetchJSON(o);return{accounts:n&&"accounts"in n&&Array.isArray(n.accounts)?n.accounts:[]}}async getPostsByAccount(t,o){return this.getPaginatedPosts(`.ghost/activitypub/v1/posts/${t}`,o)}async getPostsLikedByAccount(t){return this.getPaginatedPosts(".ghost/activitypub/v1/posts/me/liked",t)}async getPaginatedPosts(t,o){const n=new URL(t,this.apiUrl);o&&n.searchParams.set("next",o);const r=await this.fetchJSON(n);if(r===null||!("posts"in r))return{posts:[],next:null};const a=Array.isArray(r.posts)?r.posts:[],i="next"in r&&typeof r.next=="string"?r.next:null;return{posts:a,next:i}}async getNotifications(t){const o=new URL(".ghost/activitypub/v1/notifications",this.apiUrl);t&&o.searchParams.set("next",t);const n=await this.fetchJSON(o);if(n===null)return{notifications:[],next:null};if(!("notifications"in n))return{notifications:[],next:null};const r=Array.isArray(n.notifications)?n.notifications:[],a="next"in n&&typeof n.next=="string"?n.next:null;return{notifications:r,next:a}}async getNotificationsCount(){const t=new URL(".ghost/activitypub/v1/notifications/unread/count",this.apiUrl),o=await this.fetchJSON(t);return o===null?{count:0}:{count:typeof o.count=="number"?o.count:0}}async resetNotificationsCount(){const t=new URL(".ghost/activitypub/v1/notifications/unread/reset",this.apiUrl);return await this.fetchJSON(t,"PUT"),!0}async getBlockedAccounts(t){const o=new URL(".ghost/activitypub/v1/blocks/accounts",this.apiUrl);t&&o.searchParams.set("next",t);const n=await this.fetchJSON(o);if(n===null)return{accounts:[],next:null};const r="blocked_accounts"in n&&Array.isArray(n.blocked_accounts)?n.blocked_accounts:[],a="next"in n&&typeof n.next=="string"?n.next:null;return{accounts:r,next:a}}async getBlockedDomains(t){const o=new URL(".ghost/activitypub/v1/blocks/domains",this.apiUrl);t&&o.searchParams.set("next",t);const n=await this.fetchJSON(o);if(n===null)return{domains:[],next:null};const r="blocked_domains"in n&&Array.isArray(n.blocked_domains)?n.blocked_domains:[],a="next"in n&&typeof n.next=="string"?n.next:null;return{domains:r,next:a}}async getPaginatedExploreAccounts(t,o){const n=new URL(t,this.apiUrl);o&&n.searchParams.set("next",o);const r=await this.fetchJSON(n);if(r===null||!("accounts"in r))return{accounts:[],next:null};const a=Array.isArray(r.accounts)?r.accounts:[],i="next"in r&&typeof r.next=="string"?r.next:null;return{accounts:a,next:i}}async getPost(t){const o=new URL(`.ghost/activitypub/v1/post/${encodeURIComponent(t)}`,this.apiUrl);return await this.fetchJSON(o)}async getReplies(t,o){const n=new URL(`.ghost/activitypub/v1/replies/${encodeURIComponent(t)}`,this.apiUrl);return o&&n.searchParams.set("next",o),await this.fetchJSON(n)}async updateAccount({name:t,username:o,bio:n,avatarUrl:r,bannerImageUrl:a}){const i=new URL(".ghost/activitypub/v1/account",this.apiUrl);await this.fetchJSON(i,"PUT",{name:t,username:o,bio:n,avatarUrl:r,bannerImageUrl:a})}async upload(t){const o=new URL(".ghost/activitypub/v1/upload/image",this.apiUrl),n=new FormData;n.append("file",t);const r=await this.getToken(),a=await this.fetch(o,{method:"POST",headers:{Authorization:`Bearer ${r}`},body:n});if(!a.ok)throw{message:"Upload failed",statusCode:a.status};return(await a.json()).fileUrl}async enableBluesky(){const t=new URL(".ghost/activitypub/v2/actions/bluesky/enable",this.apiUrl);await this.fetchJSON(t,"POST")}async disableBluesky(){const t=new URL(".ghost/activitypub/v2/actions/bluesky/disable",this.apiUrl);await this.fetchJSON(t,"POST")}async confirmBlueskyHandle(){const t=new URL(".ghost/activitypub/v2/actions/bluesky/confirm-handle",this.apiUrl),o=await this.fetchJSON(t,"POST");return o===null||!("handle"in o)||typeof o.handle!="string"?"":String(o.handle)}}const gW="pending-";function WW(){return`${gW}${crypto.randomUUID()}`}function Pc0(e){return e.startsWith(gW)}function Uo0(e,t,o,n){const r={id:e.url,icon:e.icon,name:e.name,preferredUsername:e.preferredUsername,"@context":"",discoverable:!1,featured:"",followers:"",following:"",image:{url:""},inbox:"",manuallyApprovesFollowers:!1,outbox:"",publicKey:{id:"",owner:"",publicKeyPem:""},published:"",summary:"",type:"Person",url:""};return{id:t,type:"Create",actor:r,object:{type:"Note",name:"",content:o,summary:null,url:"",attributedTo:r,image:n||"",published:new Date().toISOString(),attachment:[],preview:{type:"Note",content:o},id:t,replyCount:0,liked:!1,reposted:!1,repostCount:0,authored:!0,"@context":""},"@context":"",to:""}}function Vo0(e){return e.replace(/\n/g,"<br />")}function zc(e){let t="";e.repostedBy!==null?t="Announce":t="Create";const o={id:e.author.url,icon:{url:e.author.avatarUrl},name:e.author.name,preferredUsername:e.author.handle.split("@")[1],followedByMe:e.author.followedByMe,"@context":"",discoverable:!1,featured:"",followers:"",following:"",image:{url:""},inbox:"",manuallyApprovesFollowers:!1,outbox:"",publicKey:{id:"",owner:"",publicKeyPem:""},published:"",summary:"",type:"Person",url:""};let n=null;e.repostedBy!==null&&(n={id:e.repostedBy.url,icon:{url:e.repostedBy.avatarUrl},name:e.repostedBy.name,preferredUsername:e.repostedBy.handle.split("@")[1],followedByMe:e.repostedBy.followedByMe,"@context":"",discoverable:!1,featured:"",followers:"",following:"",image:{url:""},inbox:"",manuallyApprovesFollowers:!1,outbox:"",publicKey:{id:"",owner:"",publicKeyPem:""},published:"",summary:"",type:"Person",url:""});let r="Note";e.type===tu.Article?r="Article":e.type===tu.Tombstone&&(r="Tombstone");const a={type:r,name:e.title,content:e.content,summary:e.summary,url:e.url,attributedTo:o,image:e.featureImageUrl??"",published:e.publishedAt,attachment:e.attachments,preview:{type:"",content:e.excerpt},id:e.id,replyCount:e.replyCount,likeCount:e.likeCount,liked:e.likedByMe,reposted:e.repostedByMe,repostCount:e.repostCount,authored:e.authoredByMe===!0,metadata:e.metadata,"@context":""};return{id:e.id,type:t,actor:n!==null?n:o,object:a,"@context":"",to:""}}let jb;async function l1(){return jb||(jb=(await(await fetch("/ghost/api/admin/site/")).json()).site.url),jb}function b1(e,t){return new Ho0(new URL(t),new URL("/ghost/api/admin/identities/",window.location.origin),e)}function r2(e="Rate limit exceeded",t="You've made too many requests. Please try again later."){Se.error(e,{description:t})}function qM(e="Action failed",t="This user has restricted who can interact with their account."){Se.error(e,{description:t})}const b0={outbox:e=>["outbox",e],liked:e=>["liked",e],user:e=>["user",e],profilePosts:e=>e===null?["profile_posts"]:["profile_posts",e],account:e=>["account",e],accountFollows:(e,t)=>["account_follows",e,t],searchResults:e=>["search_results",e],suggestedProfiles:(e,t)=>["suggested_profiles",e,t],exploreProfiles:e=>["explore_profiles",e],replyChain:e=>e===null?["reply_chain"]:["reply_chain",e],feed:["feed"],inbox:["inbox"],discoveryFeed:["discovery_feed"],postsByAccount:["account_posts"],postsLikedByAccount:["account_liked_posts"],notifications:e=>["notifications",e],notificationsCount:e=>["notifications_count",e],blockedAccounts:e=>["blocked_accounts",e],blockedDomains:e=>["blocked_domains",e],topics:()=>["topics"]};function ou(e,t,o){const n=[b0.feed,b0.inbox,b0.discoveryFeed,b0.postsLikedByAccount,b0.profilePosts(null)];for(const r of n)e.setQueriesData(r,a=>a===void 0?a:{...a,pages:a.pages.map(i=>({...i,posts:i.posts.map(l=>l.object.id===t?{...l,object:{...l.object,liked:o,likeCount:Math.max(o?(l.object.likeCount||0)+1:(l.object.likeCount||0)-1,0)}}:l)}))}),r===b0.postsLikedByAccount&&(e.setQueriesData(r,a=>a&&{...a,pages:a.pages.map(i=>({...i,posts:o?i.posts:i.posts.filter(l=>l.object.id!==t)}))}),o&&e.invalidateQueries({queryKey:b0.postsLikedByAccount}))}function vW(e,t,o,n){const r=[b0.feed,b0.inbox,b0.discoveryFeed,b0.profilePosts("index")],a=o.split("@")[1];for(const l of r)e.setQueriesData(l,z=>z===void 0?z:{...z,pages:z.pages.map(u=>({...u,posts:u.posts.map(f=>f.type!=="Announce"&&f.actor?.preferredUsername===a?{...f,actor:{...f.actor,followedByMe:n}}:f.type==="Announce"&&typeof f.object.attributedTo=="object"&&f.object.attributedTo&&!Array.isArray(f.object.attributedTo)&&"preferredUsername"in f.object.attributedTo&&f.object.attributedTo.preferredUsername===a?{...f,object:{...f.object,attributedTo:{...f.object.attributedTo,followedByMe:n}}}:f)}))});const i=b0.replyChain(null);e.setQueriesData(i,l=>{if(!l)return l;const z=u=>u.author.handle===o?{...u,author:{...u.author,followedByMe:n}}:u;return{...l,post:z(l.post),ancestors:{...l.ancestors,chain:l.ancestors.chain.map(z)},children:l.children.map(u=>({...u,post:z(u.post),chain:u.chain.map(z)}))}})}function RW(e,t,o){e.getQueryCache().getAll().forEach(a=>{const i=a.queryKey;Array.isArray(i)&&i[0]==="account_follows"&&e.setQueryData(i,l=>l?.pages?{...l,pages:l.pages.map(z=>({...z,accounts:z.accounts.map(u=>u.handle===t?{...u,isFollowing:o}:u)}))}:l)})}function nu(e,t,o){const n=b0.replyChain(null);e.setQueriesData(n,r=>{if(!r)return r;const a=i=>i.id===t?{...i,likedByMe:o,likeCount:Math.max(o?(i.likeCount||0)+1:(i.likeCount||0)-1,0)}:i;return{...r,post:a(r.post),ancestors:{...r.ancestors,chain:r.ancestors.chain.map(a)},children:r.children.map(i=>({...i,post:a(i.post),chain:i.chain.map(a)}))}}),e.setQueryData(b0.account("index"),r=>r&&{...r,likedCount:Math.max(0,r.likedCount+(o?1:-1))})}function ru(e,t,o,n){const r=b0.notifications(t);e.setQueriesData({queryKey:r},a=>{if(!a||!a.pages)return a;try{return{...a,pages:a.pages.map(i=>!i||!i.notifications?i:{...i,notifications:i.notifications.map(l=>!l||!l.post?l:l.post.id===o?{...l,post:{...l.post,likedByMe:n,likeCount:Math.max(n?l.post.likeCount+1:l.post.likeCount-1,0)}}:l)})}}catch{return a}})}function cu(e,t,o,n){const r=b0.notifications(t);e.setQueriesData({queryKey:r},a=>{if(!a||!a.pages)return a;try{return{...a,pages:a.pages.map(i=>!i||!i.notifications?i:{...i,notifications:i.notifications.map(l=>!l||!l.post?l:l.post.id===o?{...l,post:{...l.post,repostedByMe:n,repostCount:Math.max(n?l.post.repostCount+1:l.post.repostCount-1,0)}}:l)})}}catch{return a}})}function au(e,t,o,n){const r=b0.notifications(t);e.setQueriesData({queryKey:r},a=>{if(!a||!a.pages)return a;try{return{...a,pages:a.pages.map(i=>!i||!i.notifications?i:{...i,notifications:i.notifications.map(l=>!l||!l.post?l:l.post.id===o?{...l,post:{...l.post,replyCount:Math.max((l.post.replyCount??0)+n,0)}}:l)})}}catch{return a}})}function fA(e,t,o){const n=[b0.feed,b0.inbox,b0.discoveryFeed,b0.profilePosts("index"),b0.postsLikedByAccount];for(const r of n)e.setQueriesData(r,a=>a&&{...a,pages:a.pages.map(i=>({...i,posts:i.posts.map(l=>l.object.id===t?{...l,object:{...l.object,replyCount:Math.max((l.object.replyCount??0)+o,0)}}:l)}))})}function AA(e,t,o){const n=b0.replyChain(null);e.setQueriesData({queryKey:n,exact:!1},r=>{if(!r)return r;const a=i=>i.id===t?{...i,replyCount:Math.max((i.replyCount||0)+o,0)}:i;return{...r,post:a(r.post),ancestors:{...r.ancestors,chain:r.ancestors.chain.map(a)},children:r.children.map(i=>({...i,post:a(i.post),chain:i.chain.map(a)}))}})}function jc0(e){return mt({queryKey:b0.blockedAccounts(e),refetchOnMount:"always",async queryFn({pageParam:t}){const o=await l1();return b1(e,o).getBlockedAccounts(t)},getNextPageParam(t){return t.next}})}function Xc0(e){return mt({queryKey:b0.blockedDomains(e),refetchOnMount:"always",async queryFn({pageParam:t}){const o=await l1();return b1(e,o).getBlockedDomains(t)},getNextPageParam(t){return t.next}})}function Qo0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).like(o)},onMutate:o=>{ou(t,o,!0),nu(t,o,!0),ru(t,e,o,!0)},onError(o,n){ou(t,n,!1),nu(t,n,!1),ru(t,e,n,!1),o.statusCode===403&&qM(),o.statusCode===429&&r2()}})}function $o0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).unlike(o)},onMutate:o=>{ou(t,o,!1),nu(t,o,!1),ru(t,e,o,!1)},onError(o){o.statusCode===429&&r2()}})}function Dc0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).blockDomain(new URL(o.url))},onMutate:o=>{o.handle&&t.setQueryData(b0.account(o.handle),n=>n&&{...n,domainBlockedByMe:!0,followedByMe:!1,followsMe:!1})},onError(o){o.statusCode===429&&r2()}})}function Ic0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).unblockDomain(new URL(o.url))},onMutate:o=>{o.handle&&t.setQueryData(b0.account(o.handle),n=>n&&{...n,domainBlockedByMe:!1})},onError(o){o.statusCode===429&&r2()}})}function Fc0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).block(new URL(o.apId))},onMutate:o=>{t.setQueryData(b0.account(o.handle),n=>n&&{...n,blockedByMe:!0,followedByMe:!1,followsMe:!1}),t.invalidateQueries({queryKey:b0.feed}),t.invalidateQueries({queryKey:b0.inbox}),t.invalidateQueries({queryKey:b0.discoveryFeed})},onError(o){o.statusCode===429&&r2()}})}function Hc0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).unblock(new URL(o.apId))},onMutate:o=>{t.setQueryData(b0.account(o.handle),n=>n&&{...n,blockedByMe:!1})},onError(o){o.statusCode===429&&r2()}})}function su(e,t,o){const n=[b0.feed,b0.inbox,b0.discoveryFeed,b0.profilePosts(null)];for(const r of n)e.setQueriesData(r,a=>a===void 0?a:{...a,pages:a.pages.map(i=>({...i,posts:i.posts.map(l=>l.object.id===t?{...l,object:{...l.object,reposted:o,repostCount:Math.max(o?l.object.repostCount+1:l.object.repostCount-1,0)}}:l)}))})}function iu(e,t,o){const n=b0.replyChain(null);e.setQueriesData(n,r=>{if(!r)return r;const a=i=>i.id===t?{...i,repostedByMe:o,repostCount:Math.max(o?(i.repostCount||0)+1:(i.repostCount||0)-1,0)}:i;return{...r,post:a(r.post),ancestors:{...r.ancestors,chain:r.ancestors.chain.map(a)},children:r.children.map(i=>({...i,post:a(i.post),chain:i.chain.map(a)}))}})}function Go0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).repost(o)},onMutate:o=>{su(t,o,!0),iu(t,o,!0),cu(t,e,o,!0)},onError(o,n){su(t,n,!1),iu(t,n,!1),cu(t,e,n,!1),o.statusCode===403&&qM(),o.statusCode===429&&r2()}})}function Zo0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).derepost(o)},onMutate:o=>{su(t,o,!1),iu(t,o,!1),cu(t,e,o,!1)},onError(o){o.statusCode===429&&r2()}})}function Ko0(e){return K2({queryKey:b0.user(e),async queryFn(){const t=await l1();return b1(e,t).getUser()}})}function M5(e,t,o){const n=v1();return Me({async mutationFn(r){const a=await l1();return b1(e,a).unfollow(r)},onSuccess(r,a){const i=b0.account(a==="me"?"index":a);n.setQueryData(i,h=>h&&{...h,followedByMe:!1,followerCount:h.followerCount-1<0?0:h.followerCount-1});const l=b0.accountFollows(a,"followers");n.setQueryData(l,h=>{if(!h?.pages?.[0])return h;const q=n.getQueryData(b0.account("index"));return q?{...h,pages:h.pages.map(g=>({...g,accounts:g.accounts.filter(W=>W.name!==q.name)}))}:h});const z=b0.account("index");n.setQueryData(z,h=>h&&{...h,followingCount:h.followingCount-1});const f=b0.accountFollows("me","following");n.getQueryData(f)?n.setQueryData(f,h=>h?.pages?{...h,pages:h.pages.map(q=>({...q,accounts:q.accounts.filter(g=>g.handle!==a)}))}:h):n.invalidateQueries({queryKey:f}),RW(n,a,!1),n.setQueryData(b0.exploreProfiles(e),h=>{if(!h)return h;const q=h.pages.map(g=>{const W=Object.entries(g.results).reduce((v,[y,k])=>{const C=k.sites.map(L=>L.handle===a?{...L,followedByMe:!1,followerCount:Math.max(0,L.followerCount-1)}:L);return v[y]={...k,sites:C},v},{});return{...g,results:W}});return{...h,pages:q}}),n.setQueriesData({queryKey:["suggested_profiles"],exact:!1},h=>h&&h.map(q=>q.handle===a?{...q,followedByMe:!1,followerCount:Math.max(0,q.followerCount-1)}:q)),vW(n,e,a,!1),t()},onError:r=>{r.statusCode===429&&r2(),o()}})}function l5(e,t,o){const n=v1();return Me({async mutationFn(r){const a=await l1();return b1(e,a).follow(r)},onSuccess(r,a){const i=b0.account(a==="me"?"index":a);n.setQueryData(i,h=>h&&{...h,followedByMe:!0,followerCount:h.followerCount+1});const l=b0.account("index");n.setQueryData(l,h=>h&&{...h,followingCount:h.followingCount+1});const z=b0.accountFollows(a,"followers"),f=b0.accountFollows("me","following");n.getQueryData(f)?n.setQueryData(f,h=>{if(!h?.pages?.[0])return h;const q=n.getQueryData(b0.account(a==="me"?"index":a));if(!q)return h;const g={id:q.id,name:q.name,handle:q.handle,avatarUrl:q.avatarUrl,blockedByMe:q.blockedByMe,domainBlockedByMe:q.domainBlockedByMe,isFollowing:!0};return{...h,pages:[{...h.pages[0],accounts:[g,...h.pages[0].accounts]},...h.pages.slice(1)]}}):n.invalidateQueries({queryKey:f}),RW(n,a,!0),n.setQueryData(b0.exploreProfiles(e),h=>{if(!h)return h;const q=h.pages.map(g=>{const W=Object.entries(g.results).reduce((v,[y,k])=>{const C=k.sites.map(L=>L.handle===a?{...L,followedByMe:!0,followerCount:L.followerCount+1}:L);return v[y]={...k,sites:C},v},{});return{...g,results:W}});return{...h,pages:q}}),n.setQueriesData({queryKey:["suggested_profiles"],exact:!1},h=>h&&h.map(q=>q.handle===a?{...q,followedByMe:!0,followerCount:q.followerCount+1}:q)),n.setQueryData(z,h=>{if(!h?.pages?.[0])return h;const q=n.getQueryData(b0.account("index"));if(!q)return h;const g={id:q.url,type:"Person",preferredUsername:"index",name:q.name,url:q.url,handle:`index@${new URL(q.url).hostname}`,icon:{type:"Image",url:q.avatarUrl},isFollowing:!1};return{...h,pages:[{...h.pages[0],accounts:[g,...h.pages[0].accounts]},...h.pages.slice(1)]}}),vW(n,e,a,!0),t()},onError(r){o(),r.statusCode===429&&r2(),r.statusCode===403&&qM()}})}function Yo0(e,t){const o=v1(),n=b0.searchResults(t);return{searchQuery:K2({queryKey:n,enabled:t.length>0,refetchOnMount:"always",async queryFn(){const i=await l1();return b1(e,i).search(t)}}),updateAccountSearchResult:(i,l)=>{o.setQueryData(n,z=>z&&{...z,accounts:z.accounts.map(u=>u.id===i?{...u,...l}:u)})}}}function Xb(e,t,o,n){e.setQueryData(t,r=>r&&{...r,pages:r.pages.map((a,i)=>i===0?{...a,[o]:[n,...a[o]]}:a)})}function tn(e,t,o,n,r){e.setQueryData(t,a=>a&&{...a,pages:a.pages.map(i=>({...i,[o]:i[o].map(l=>l.id===n?r(l):l)}))})}function Db(e,t,o,n){e.setQueryData(t,r=>r&&{...r,pages:r.pages.map(a=>({...a,[o]:a[o].filter(i=>i.id!==n)}))})}function Jo0(e,t){const o=v1();return Me({async mutationFn({inReplyTo:n,content:r,imageUrl:a,altText:i}){const l=await l1(),z=b1(e,l),u=a?{url:a,altText:i}:void 0;return z.reply(n,r,u)},onMutate:({inReplyTo:n})=>{if(!t)throw new Error("Cannot create reply without actor props");const r=WW();return fA(o,n,1),AA(o,n,1),au(o,e,n,1),{id:r}},onSuccess:(n,r)=>{if(n.id===void 0)throw new Error("Activity returned from API has no id");o.invalidateQueries({queryKey:b0.replyChain(r.inReplyTo)})},onError(n,r){console.error(n),fA(o,r.inReplyTo,-1),AA(o,r.inReplyTo,-1),au(o,e,r.inReplyTo,-1),n.statusCode===403&&qM(),n.statusCode===429&&r2(),Se.error("An error occurred while sending your reply.")}})}function en0(e,t){const o=v1(),n=b0.feed,r=b0.outbox(e),a=b0.profilePosts("index");return Me({async mutationFn({content:i,imageUrl:l,altText:z}){const u=await l1(),f=b1(e,u),O=l?{url:l,altText:z}:void 0;return f.note(i,O)},onMutate:({content:i,imageUrl:l})=>{if(!t)throw new Error("Cannot create note without actor props");const z=Vo0(i),u=WW(),f=Uo0(t,u,z,l);return Xb(o,n,"posts",f),Xb(o,r,"data",f),Xb(o,a,"posts",f),{id:u}},onSuccess:(i,l,z)=>{if(i.id===void 0)throw new Error("Post returned from API has no id");const u=zc(i);tn(o,n,"posts",z?.id??"",()=>u),tn(o,r,"data",z?.id??"",()=>u),tn(o,a,"posts",z?.id??"",()=>u)},onError(i,l,z){console.error(i),Db(o,n,"posts",z?.id??""),Db(o,r,"data",z?.id??""),Db(o,a,"posts",z?.id??""),i.statusCode===429&&r2(),Se.error("An error occurred while posting your note.")}})}function b5(e,t,o){const n=o?.enabled!==!1;return K2({queryKey:b0.account(t==="me"?"index":t),enabled:n,async queryFn(){const r=await l1();return b1(e,r).getAccount(t)}})}function Uc0(e,t){const o=v1();return mt({queryKey:b0.accountFollows(e,t),async queryFn({pageParam:n}){const r=await l1(),i=await b1("index",r).getAccountFollows(e,t,n);return i.accounts&&i.accounts.forEach(l=>{o.setQueryData(b0.account(l.handle),l)}),i},getNextPageParam(n){return n.next}})}function Vc0(e){const t=b0.feed,o=v1();return{feedQuery:mt({queryKey:t,enabled:e.enabled,staleTime:60*1e3,async queryFn({pageParam:a}){const i=await l1();return b1("index",i).getFeed(a).then(z=>({posts:z.posts.map(zc),next:z.next}))},getNextPageParam(a){return a.next}}),updateFeedActivity:(a,i)=>{tn(o,t,"posts",a,l=>({...l,...i}))}}}function Qc0(e){const t=b0.inbox,o=v1();return{inboxQuery:mt({queryKey:t,enabled:e.enabled,staleTime:20*1e3,async queryFn({pageParam:a}){const i=await l1();return b1("index",i).getInbox(a).then(z=>({posts:z.posts.map(zc),next:z.next}))},getNextPageParam(a){return a.next}}),updateInboxActivity:(a,i)=>{tn(o,t,"posts",a,l=>({...l,...i}))}}}function $c0(e){const t=[...b0.discoveryFeed,e.topic],o=v1();return{discoveryFeedQuery:mt({queryKey:t,enabled:e.enabled,staleTime:20*1e3,async queryFn({pageParam:a}){const i=await l1();return b1("index",i).getDiscoveryFeed(e.topic,a).then(z=>({posts:z.posts.map(zc),next:z.next}))},getNextPageParam(a){return a.next}}),updateDiscoveryFeedActivity:(a,i)=>{tn(o,t,"posts",a,l=>({...l,...i}))}}}function Gc0(e,t){const o=b0.profilePosts(e==="me"?"index":e),n=v1();return{postsByAccountQuery:mt({queryKey:o,enabled:t.enabled,async queryFn({pageParam:i}){const l=await l1();return b1("index",l).getPostsByAccount(e,i).then(u=>({posts:u.posts.map(zc),next:u.next})).catch(()=>({posts:[],next:null}))},getNextPageParam(i){return i.next}}),updatePostsByAccount:(i,l)=>{tn(n,o,"posts",i,z=>({...z,...l}))}}}function Zc0(e){const t=b0.postsLikedByAccount,o=v1();return{postsLikedByAccountQuery:mt({queryKey:t,enabled:e.enabled,async queryFn({pageParam:a}){const i=await l1();return b1("index",i).getPostsLikedByAccount(a).then(z=>({posts:z.posts.map(zc),next:z.next}))},getNextPageParam(a){return a.next}}),updatePostsLikedByAccount:(a,i)=>{tn(o,t,"posts",a,l=>({...l,...i}))}}}function tn0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).delete(o.id)},onMutate:({id:o,parentId:n})=>{const r=t.getQueryData(b0.feed);t.setQueryData(b0.feed,L=>L&&{...L,pages:L.pages.map(x=>({...x,posts:x.posts.filter(w=>w.id!==o).map(w=>w.object.id===n?{...w,object:{...w.object,replyCount:w.object.replyCount-1}}:w)}))});const a=t.getQueryData(b0.inbox);t.setQueryData(b0.inbox,L=>L&&{...L,pages:L.pages.map(x=>({...x,posts:x.posts.filter(w=>w.id!==o).map(w=>w.object.id===n?{...w,object:{...w.object,replyCount:w.object.replyCount-1}}:w)}))}),n&&au(t,e,n,-1);const i=b0.outbox(e),l=t.getQueryData(i);t.setQueryData(i,L=>L&&{...L,pages:L.pages.map(x=>({...x,data:x.data.filter(w=>w.object.id!==o)}))});const z=b0.liked(e),u=t.getQueryData(z);let f=!1;t.setQueryData(z,L=>L&&{...L,pages:L.pages.map(x=>(f=x.data.some(w=>w.object.id===o),{...x,data:x.data.filter(w=>w.object.id!==o)}))}),[b0.feed,b0.inbox,b0.discoveryFeed,b0.profilePosts("index"),b0.postsLikedByAccount].some(L=>t.getQueryData(L)?.pages.some(w=>w.posts.some(P=>P.id===o&&P.object.liked)))&&t.setQueryData(b0.account(e),L=>L&&{...L,likedCount:Math.max(0,L.likedCount-1)});const h=b0.profilePosts(null),q=t.getQueriesData(h);t.setQueriesData(h,L=>L&&{...L,pages:L.pages.map(x=>({...x,posts:x.posts.filter(w=>w.object.id!==o)}))});let g=[],W;f&&(g=b0.account(e),W=t.getQueryData(g),t.setQueryData(g,L=>L&&{...L,likedCount:L.likedCount-1<0?0:L.likedCount-1}));const v=b0.profilePosts("index"),y=t.getQueryData(v);t.setQueryData(v,L=>L&&{...L,pages:L.pages.map(x=>({...x,posts:x.posts.filter(w=>w.object.id!==o)}))});const k=b0.postsLikedByAccount,C=t.getQueryData(k);return t.setQueryData(k,L=>L&&{...L,pages:L.pages.map(x=>({...x,posts:x.posts.filter(w=>w.object.id!==o)}))}),n&&t.setQueriesData({queryKey:["reply_chain"],exact:!1},L=>{if(!L)return L;const x=L.children.filter(P=>P.post.id!==o).map(P=>({...P,chain:P.chain.filter(H=>H.id!==o)}));let w=L.post;return L.post.id===n&&(w={...L.post,replyCount:Math.max(0,(L.post.replyCount||0)-1)}),{...L,post:w,children:x}}),{previousFeed:{key:b0.feed,data:r},previousInbox:{key:b0.inbox,data:a},previousOutbox:{key:i,data:l},previousLiked:{key:z,data:u},previousProfilePosts:{key:h,data:q},previousAccount:f?{key:g,data:W}:null,previousPostsByAccount:{key:b0.profilePosts("index"),data:y},previousPostsLikedByAccount:{key:b0.postsLikedByAccount,data:C}}},onError:(o,n,r)=>{r&&(t.setQueryData(r.previousFeed.key,r.previousFeed.data),t.setQueryData(r.previousInbox.key,r.previousInbox.data),t.setQueryData(r.previousOutbox.key,r.previousOutbox.data),t.setQueryData(r.previousLiked.key,r.previousLiked.data),t.setQueriesData(r.previousProfilePosts.key,r.previousProfilePosts.data),r.previousAccount&&t.setQueryData(r.previousAccount.key,r.previousAccount.data),r.previousPostsByAccount&&t.setQueryData(b0.profilePosts("index"),r.previousPostsByAccount),r.previousPostsLikedByAccount&&t.setQueryData(b0.postsLikedByAccount,r.previousPostsLikedByAccount))},onSuccess:(o,{parentId:n})=>{t.invalidateQueries({queryKey:["reply_chain"]}),n&&(t.invalidateQueries({queryKey:b0.feed}),t.invalidateQueries({queryKey:b0.inbox}))}})}function Kc0(e){return mt({queryKey:b0.notifications(e),async queryFn({pageParam:t}){const o=await l1();return b1(e,o).getNotifications(t)},getNextPageParam(t){return t.next}})}function Yc0(e,t){const o=K2({queryKey:b0.replyChain(t),enabled:!!t,async queryFn(){if(!t)throw new Error("Post ID is required");const f=await l1(),O=b1(e,f);try{return await O.getReplies(t)}catch(h){if(Fo0(h)&&h.statusCode===404)return await O.getPost(t),await O.getReplies(t);throw h}}}),[n,r]=p.useState(null),[a,i]=p.useState(null);p.useEffect(()=>{o.data?r(o.data):o.error&&i(o.error)},[o.data,o.error]);const l=p.useCallback(async()=>{if(!(!n?.ancestors.hasMore||!n?.ancestors.chain[0]))try{const f=await l1(),h=await b1(e,f).getReplies(n.ancestors.chain[0].id);r(q=>q&&{...q,ancestors:{chain:[...h.ancestors.chain,...q.ancestors.chain],hasMore:h.ancestors.hasMore}})}catch(f){i(f instanceof Error?f:new Error("Failed to load more ancestors"))}},[e,n?.ancestors.hasMore,n?.ancestors.chain]),z=p.useCallback(async()=>{if(n?.next&&t)try{const f=await l1(),h=await b1(e,f).getReplies(t,n.next);r(q=>q&&{...q,children:[...q.children,...h.children],next:h.next})}catch(f){i(f instanceof Error?f:new Error("Failed to load more children"))}},[e,n?.next,t]),u=p.useCallback(async f=>{if(n?.children[f]?.hasMore)try{const O=await l1(),h=b1(e,O),q=n.children[f],g=q.chain.length>1?q.chain[q.chain.length-2]:q.post,W=await h.getReplies(g.id),v=W.children[0].chain;r(y=>{if(!y)return y;const k=[...y.children];return k[f]={...q,chain:[...q.chain,...v],hasMore:W.children[0].hasMore},{...y,children:k}})}catch(O){i(O instanceof Error?O:new Error("Failed to load more child replies"))}},[e,n]);return{data:n,isLoading:o.isLoading,error:a,loadMoreAncestors:l,loadMoreChildren:z,loadMoreChildReplies:u,hasMoreAncestors:!!n?.ancestors.hasMore,hasMoreChildren:!!n?.next,hasMoreChildReplies:f=>!!n?.children[f]?.hasMore}}function Jc0(e){const t=v1();return Me({async mutationFn(o){const n=await l1();return b1(e,n).updateAccount(o)},onSuccess(){t.invalidateQueries({queryKey:b0.account("index")})}})}async function on0(e){const t=await l1();return b1("index",t).upload(e)}function yW(e,t=!0){const o=p.useCallback(async()=>await l1(),[]),n=p.useCallback(async()=>{const r=await o();return b1(e,r)},[e,o]);return K2({queryKey:b0.notificationsCount(e),enabled:t,async queryFn(){return(await(await n()).getNotificationsCount()).count}})}function nn0(e){const t=v1(),o=p.useCallback(async()=>await l1(),[]),n=p.useCallback(async()=>{const r=await o();return b1(e,r)},[e,o]);return Me({async mutationFn(){return t.setQueryData(b0.notificationsCount(e),0),(await n()).resetNotificationsCount()}})}function ea0(e,t){const o=v1(),n=[...b0.exploreProfiles(e),t];return{exploreProfilesQuery:mt({queryKey:n,staleTime:3600*1e3,async queryFn({pageParam:i}){const l=await l1(),u=await b1(e,l).getExploreAccounts(t,i);return u.accounts.forEach(f=>{o.setQueryData(b0.account(f.handle),f)}),{accounts:u.accounts,next:u.next}},getNextPageParam(i){return i.next}}),updateExploreProfile:(i,l)=>{o.setQueryData(n,z=>{if(!z)return z;const u=z.pages.map(f=>{const O=f.accounts.map(h=>h.id===i?{...h,...l}:h);return{...f,accounts:O}});return{...z,pages:u}})}}}function z5(e,t=3){const o=v1(),n=b0.suggestedProfiles(e,t);return{suggestedProfilesQuery:K2({queryKey:n,async queryFn(){const i=await l1(),u=(await b1("index",i).getRecommendations(t)).accounts;return u.length>0&&u.forEach(f=>{o.setQueryData(b0.account(f.handle),f)}),u.length>0?u:null},retry:!1,staleTime:3600*1e3}),updateSuggestedProfile:(i,l)=>{o.setQueryData(n,z=>z&&z.map(u=>u.id===i?{...u,...l}:u))}}}function u5(){return{topicsQuery:K2({queryKey:b0.topics(),async queryFn(){const t=await l1();return b1("index",t).getTopics()},staleTime:864e5,retry:!1})}}function d5(e,t){const o=b0.account("index");e.setQueryData(o,n=>n&&{...n,...t})}function ta0(e){const t=v1();return Me({async mutationFn(){const o=await l1();return b1(e,o).enableBluesky()},onSuccess(){d5(t,{blueskyEnabled:!0,blueskyHandleConfirmed:!1,blueskyHandle:null}),t.invalidateQueries({queryKey:b0.accountFollows("index","following")})},onError(o){o.statusCode===429&&r2()}})}function oa0(e){const t=v1();return Me({async mutationFn(){const o=await l1();return b1(e,o).disableBluesky()},onSuccess(){d5(t,{blueskyEnabled:!1,blueskyHandleConfirmed:!1,blueskyHandle:null}),t.invalidateQueries({queryKey:b0.accountFollows("index","following")})},onError(o){o.statusCode===429&&r2()}})}function na0(e){const t=v1();return Me({async mutationFn(){const o=await l1();return b1(e,o).confirmBlueskyHandle()},onSuccess(o){o!==""&&d5(t,{blueskyEnabled:!0,blueskyHandleConfirmed:!0,blueskyHandle:o})},onError(o){o.statusCode===429&&r2()}})}let pp=null;const hA=({onFollow:e,onUnfollow:t,authorHandle:o,followedByMe:n})=>{const[,r]=l0.useReducer(z=>z+1,0),i=pp===o&&!n,l=z=>{i?(t(z),setTimeout(()=>{pp=null,r()},0)):(pp=o,r(),e(z))};return b.jsx(i1,{className:"absolute -right-1.5 bottom-px z-10 flex size-4 items-center justify-center rounded-full p-0 outline outline-2 outline-white transition-transform hover:scale-105 active:scale-100 dark:outline-black",title:i?"Unfollow":"Follow",onClick:l,children:i?b.jsx(S9,{className:"-mb-px !size-3 !stroke-[2.4]"}):b.jsx(j9,{className:"!size-[14px] !stroke-2"})})},en=({author:e,size:t,isLoading:o=!1,disabled:n=!1,className:r="",showFollowButton:a=!1})=>{let i=20,l=`shrink-0 items-center justify-center rounded-full relative z-10 flex bg-black/5 dark:bg-gray-900 ${t==="lg"||n?"":"cursor-pointer"} ${r}`,z="z-10 object-cover rounded-full outline outline-[0.5px] outline-offset-[-0.5px] outline-black/10";const[u,f]=p.useState(e?.icon?.url),O=qo(),h=l5("index",()=>{Se.success(`Followed ${e?.name}`)},()=>{Se.error("Failed to follow")}),q=M5("index",()=>{Se.info(`Unfollowed ${e?.name}`)},()=>{Se.error("Failed to unfollow")});switch(p.useEffect(()=>{f(e?.icon?.url)},[e?.icon?.url]),t){case"2xs":i=10,l=se("size-4",l),z=se("size-4",z);break;case"xs":i=12,l=se("size-6",l),z=se("size-6",z);break;case"notification":i=16,l=se("size-9",l),z=se("size-9",z);break;case"sm":l=se("size-10",l),z=se("size-10",z);break;case"md":l=se("size-[60px]",l),z=se("size-[60px]",z);break;case"lg":i=32,l=se("size-22",l),z=se("size-22",z);break;default:l=se("size-10",l),z=se("size-10",z);break}if(!e||o)return b.jsx(j1,{className:z,containerClassName:l});const g=e?.handle||Jo(e),W=L=>{L.stopPropagation(),O(`/profile/${g}`)},v=L=>{L.stopPropagation(),h.mutate(g)},y=L=>{L.stopPropagation(),q.mutate(g)},C=a||pp===g;return u?b.jsxs("div",{className:l,onClick:t==="lg"||n?void 0:W,children:[b.jsx("img",{className:z,referrerPolicy:"no-referrer",src:u,onError:()=>f(void 0)}),C&&b.jsx(hA,{authorHandle:g,followedByMe:!1,onFollow:v,onUnfollow:y})]}):b.jsxs("div",{className:l,onClick:n?void 0:W,children:[b.jsx(Td,{className:"text-gray-600",size:i,strokeWidth:1.5}),C&&b.jsx(hA,{authorHandle:g,followedByMe:!1,onFollow:v,onUnfollow:y})]})},Ib=({trigger:e,onCopyLink:t,onDelete:o,allowDelete:n=!1,disabled:r=!1,layout:a,followedByMe:i=!1,authoredByMe:l=!1,onFollow:z=()=>{},onUnfollow:u=()=>{}})=>{const f=q=>{q.stopPropagation(),t()},O=q=>{q.stopPropagation(),o()},h=q=>{q.stopPropagation(),i?u():z()};return b.jsxs(pY,{children:[b.jsxs(NJ,{children:[b.jsx(_J,{disabled:r,asChild:!0,onClick:q=>q.stopPropagation(),children:e}),b.jsx(og,{align:`${a==="modal"?"start":"end"}`,alignOffset:a==="modal"?-12:0,className:"p-2",children:b.jsxs("div",{className:"flex w-48 flex-col",children:[(!n||a==="inbox")&&b.jsx(Sb,{asChild:!0,children:b.jsxs(i1,{className:"justify-start",variant:"ghost",onClick:f,children:[b.jsx(wZ,{}),"Copy link"]})}),!l&&b.jsx(Sb,{asChild:!0,children:b.jsxs(i1,{className:"justify-start",variant:"ghost",onClick:h,children:[i?b.jsx(cK,{}):b.jsx(sK,{}),i?"Unfollow":"Follow"]})}),n&&b.jsx(MY,{asChild:!0,children:b.jsx(Sb,{asChild:!0,children:b.jsxs(i1,{className:"justify-start text-red hover:bg-red/5 hover:text-red",variant:"ghost",onClick:q=>q.stopPropagation(),children:[b.jsx(F9,{}),"Delete"]})})})]})})]}),b.jsxs($9,{onClick:q=>q.stopPropagation(),children:[b.jsxs(G9,{children:[b.jsx(K9,{children:"Delete this post?"}),b.jsx(Y9,{children:a==="inbox"?"This will remove the post from the Ghost social web, but it will remain on your website.":b.jsx(b.Fragment,{children:"If you delete this post, you won't be able to restore it."})})]}),b.jsxs(Z9,{children:[b.jsx(em,{onClick:q=>q.stopPropagation(),children:"Cancel"}),b.jsx(J9,{className:H3({variant:"destructive"}),onClick:O,children:"Delete"})]})]})]})};function rn0(e){const[t,o]=p.useState({images:[],currentIndex:0,isOpen:!1}),n=l=>{const z=f5(l);if(!z)return[];if(Array.isArray(z))return z.map((u,f)=>({url:u.url,alt:u.name||`Image-${f}`}));if(z.mediaType?.startsWith("image/")||z.type==="Image")return[{url:z.url,alt:z.name||"Image"}];if(l.image){let u;if(typeof l.image=="string"?u=l.image:u=l.image?.url,u)return[{url:u,alt:"Image"}]}return[]};return{lightboxState:t,openLightbox:l=>{if(!e)return;const z=n(e),u=z.findIndex(f=>f.url===l);u!==-1&&o({images:z,currentIndex:u,isOpen:!0})},closeLightbox:()=>{o(l=>({...l,isOpen:!1}))},navigateToIndex:l=>{o(z=>({...z,currentIndex:l}))}}}const Fb=({images:e,currentIndex:t,isOpen:o,onClose:n,onNavigate:r})=>{const a=t===0,i=t===e.length-1,l=p.useCallback(()=>{if(e.length<=1||i)return;const u=(t+1)%e.length;r(u)},[e.length,i,t,r]),z=p.useCallback(()=>{if(e.length<=1||a)return;const u=(t-1+e.length)%e.length;r(u)},[e.length,a,t,r]);return p.useEffect(()=>{const u=f=>{o&&(f.key==="ArrowRight"&&!i?l():f.key==="ArrowLeft"&&!a&&z())};return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[o,t,e.length,l,z,i,a]),!o||e.length===0?null:b.jsx(os,{open:o,onOpenChange:u=>{u||n()},children:b.jsxs(pc,{className:"top-[50%] h-[100vh] max-h-[100vh] w-[100vw] max-w-[100vw] translate-y-[-50%] items-center border-none bg-transparent p-0 shadow-none data-[state=closed]:zoom-out-100 data-[state=open]:zoom-in-100 data-[state=closed]:slide-out-to-top-[50%] data-[state=open]:slide-in-from-top-[50%]",onClick:()=>n(),children:[b.jsx("img",{alt:e[t].alt,className:"mx-auto max-h-[90vh] max-w-[90vw] object-contain",src:e[t].url,onClick:u=>u.stopPropagation()}),e.length>1&&b.jsxs(b.Fragment,{children:[b.jsxs(i1,{className:"absolute left-5 top-1/2 size-11 -translate-y-1/2 rounded-full bg-black/50 p-0 pr-0.5 hover:bg-black/70",disabled:a,onClick:u=>{u.stopPropagation(),z()},children:[b.jsx(JG,{className:"!size-6"}),b.jsx("span",{className:"sr-only",children:"Previous image"})]}),b.jsxs(i1,{className:"absolute right-5 top-1/2 size-11 -translate-y-1/2 rounded-full bg-black/50 p-0 pl-0.5 hover:bg-black/70",disabled:i,onClick:u=>{u.stopPropagation(),l()},children:[b.jsx(F3,{className:"!size-6"}),b.jsx("span",{className:"sr-only",children:"Next image"})]})]}),b.jsx(fY,{asChild:!0,children:b.jsxs(i1,{className:"absolute right-5 top-5 size-11 rounded-full bg-black/50 p-0 hover:bg-black/70",children:[b.jsx(jd,{className:"!size-5"}),b.jsx("span",{className:"sr-only",children:"Close"})]})})]})})},qA=()=>{},O5=({className:e,following:t,handle:o,variant:n="default",onFollow:r=qA,onUnfollow:a=qA,"data-testid":i})=>{const[l,z]=p.useState(t),u=M5("index",()=>{},()=>{z(!0)}),f=l5("index",()=>{},()=>{z(!1)}),O=async()=>{l?(z(!1),a(),u.mutate(o)):(z(!0),r(),f.mutate(o))};p.useEffect(()=>{z(t)},[t]);const h=l?"Following":"Follow";return n==="link"?b.jsx(i1,{className:se("p-0 font-medium",l?"text-gray-700 hover:text-black dark:text-gray-600 dark:hover:text-white":"text-purple hover:text-black dark:hover:text-white",e),"data-testid":i,variant:"link",onClick:q=>{q?.preventDefault(),q?.stopPropagation(),O()},children:h}):b.jsx(i1,{className:se("min-w-[90px]",e),"data-testid":i,title:l?"Click to unfollow":"",variant:l?"outline":"default",onClick:q=>{q?.preventDefault(),q?.stopPropagation(),O()},children:h})};/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:wW,setPrototypeOf:mA,isFrozen:cn0,getPrototypeOf:an0,getOwnPropertyDescriptor:sn0}=Object;let{freeze:t2,seal:Z2,create:pu}=Object,{apply:Mu,construct:lu}=typeof Reflect<"u"&&Reflect;t2||(t2=function(t){return t});Z2||(Z2=function(t){return t});Mu||(Mu=function(t,o){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return t.apply(o,r)});lu||(lu=function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return new t(...n)});const Fi=o2(Array.prototype.forEach),in0=o2(Array.prototype.lastIndexOf),gA=o2(Array.prototype.pop),oa=o2(Array.prototype.push),pn0=o2(Array.prototype.splice),Mp=o2(String.prototype.toLowerCase),Hb=o2(String.prototype.toString),Ub=o2(String.prototype.match),na=o2(String.prototype.replace),Mn0=o2(String.prototype.indexOf),ln0=o2(String.prototype.trim),bt=o2(Object.prototype.hasOwnProperty),Je=o2(RegExp.prototype.test),ra=bn0(TypeError);function o2(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];return Mu(e,t,n)}}function bn0(e){return function(){for(var t=arguments.length,o=new Array(t),n=0;n<t;n++)o[n]=arguments[n];return lu(e,o)}}function u1(e,t){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Mp;mA&&mA(e,null);let n=t.length;for(;n--;){let r=t[n];if(typeof r=="string"){const a=o(r);a!==r&&(cn0(t)||(t[n]=a),r=a)}e[r]=!0}return e}function zn0(e){for(let t=0;t<e.length;t++)bt(e,t)||(e[t]=null);return e}function kt(e){const t=pu(null);for(const[o,n]of wW(e))bt(e,o)&&(Array.isArray(n)?t[o]=zn0(n):n&&typeof n=="object"&&n.constructor===Object?t[o]=kt(n):t[o]=n);return t}function ca(e,t){for(;e!==null;){const n=sn0(e,t);if(n){if(n.get)return o2(n.get);if(typeof n.value=="function")return o2(n.value)}e=an0(e)}function o(){return null}return o}const WA=t2(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Vb=t2(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Qb=t2(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),un0=t2(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),$b=t2(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),dn0=t2(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),vA=t2(["#text"]),RA=t2(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Gb=t2(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),yA=t2(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Hi=t2(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),On0=Z2(/\{\{[\w\W]*|[\w\W]*\}\}/gm),fn0=Z2(/<%[\w\W]*|[\w\W]*%>/gm),An0=Z2(/\$\{[\w\W]*/gm),hn0=Z2(/^data-[\-\w.\u00B7-\uFFFF]+$/),qn0=Z2(/^aria-[\-\w]+$/),LW=Z2(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),mn0=Z2(/^(?:\w+script|data):/i),gn0=Z2(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),xW=Z2(/^html$/i),Wn0=Z2(/^[a-z][.\w]*(-[.\w]+)+$/i);var wA=Object.freeze({__proto__:null,ARIA_ATTR:qn0,ATTR_WHITESPACE:gn0,CUSTOM_ELEMENT:Wn0,DATA_ATTR:hn0,DOCTYPE_NAME:xW,ERB_EXPR:fn0,IS_ALLOWED_URI:LW,IS_SCRIPT_OR_DATA:mn0,MUSTACHE_EXPR:On0,TMPLIT_EXPR:An0});const aa={element:1,text:3,progressingInstruction:7,comment:8,document:9},vn0=function(){return typeof window>"u"?null:window},Rn0=function(t,o){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";o&&o.hasAttribute(r)&&(n=o.getAttribute(r));const a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(i){return i},createScriptURL(i){return i}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},LA=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function kW(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vn0();const t=W0=>kW(W0);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==aa.document||!e.Element)return t.isSupported=!1,t;let{document:o}=e;const n=o,r=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:i,Node:l,Element:z,NodeFilter:u,NamedNodeMap:f=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:O,DOMParser:h,trustedTypes:q}=e,g=z.prototype,W=ca(g,"cloneNode"),v=ca(g,"remove"),y=ca(g,"nextSibling"),k=ca(g,"childNodes"),C=ca(g,"parentNode");if(typeof i=="function"){const W0=o.createElement("template");W0.content&&W0.content.ownerDocument&&(o=W0.content.ownerDocument)}let L,x="";const{implementation:w,createNodeIterator:P,createDocumentFragment:H,getElementsByTagName:o0}=o,{importNode:Y}=n;let K=LA();t.isSupported=typeof wW=="function"&&typeof C=="function"&&w&&w.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:n0,ERB_EXPR:J,TMPLIT_EXPR:i0,DATA_ATTR:L0,ARIA_ATTR:Z,IS_SCRIPT_OR_DATA:m0,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:X}=wA;let{IS_ALLOWED_URI:G}=wA,N=null;const I=u1({},[...WA,...Vb,...Qb,...$b,...vA]);let c0=null;const h0=u1({},[...RA,...Gb,...yA,...Hi]);let d0=Object.seal(pu(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),v0=null,u0=null;const e0=Object.seal(pu(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let S0=!0,T0=!0,V0=!1,h1=!0,E=!1,t0=!0,r0=!1,A0=!1,j0=!1,J0=!1,a1=!1,o1=!1,q1=!0,C1=!1;const ke="user-content-";let rt=!0,c2=!1,K1={},X1=null;const a2=u1({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let ct=null;const qe=u1({},["audio","video","img","source","image","track"]);let s2=null;const le=u1({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),_2="http://www.w3.org/1998/Math/MathML",B2="http://www.w3.org/2000/svg",Ce="http://www.w3.org/1999/xhtml";let Ge=Ce,E2=!1,je=null;const Ne=u1({},[_2,B2,Ce],Hb);let i2=u1({},["mi","mo","mn","ms","mtext"]),Ze=u1({},["annotation-xml"]);const p2=u1({},["title","style","font","a","script"]);let m2=null;const Y0=["application/xhtml+xml","text/html"],E1="text/html";let n1=null,H1=null;const S2=o.createElement("form"),B=function(S){return S instanceof RegExp||S instanceof Function},D=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(H1&&H1===S)){if((!S||typeof S!="object")&&(S={}),S=kt(S),m2=Y0.indexOf(S.PARSER_MEDIA_TYPE)===-1?E1:S.PARSER_MEDIA_TYPE,n1=m2==="application/xhtml+xml"?Hb:Mp,N=bt(S,"ALLOWED_TAGS")?u1({},S.ALLOWED_TAGS,n1):I,c0=bt(S,"ALLOWED_ATTR")?u1({},S.ALLOWED_ATTR,n1):h0,je=bt(S,"ALLOWED_NAMESPACES")?u1({},S.ALLOWED_NAMESPACES,Hb):Ne,s2=bt(S,"ADD_URI_SAFE_ATTR")?u1(kt(le),S.ADD_URI_SAFE_ATTR,n1):le,ct=bt(S,"ADD_DATA_URI_TAGS")?u1(kt(qe),S.ADD_DATA_URI_TAGS,n1):qe,X1=bt(S,"FORBID_CONTENTS")?u1({},S.FORBID_CONTENTS,n1):a2,v0=bt(S,"FORBID_TAGS")?u1({},S.FORBID_TAGS,n1):kt({}),u0=bt(S,"FORBID_ATTR")?u1({},S.FORBID_ATTR,n1):kt({}),K1=bt(S,"USE_PROFILES")?S.USE_PROFILES:!1,S0=S.ALLOW_ARIA_ATTR!==!1,T0=S.ALLOW_DATA_ATTR!==!1,V0=S.ALLOW_UNKNOWN_PROTOCOLS||!1,h1=S.ALLOW_SELF_CLOSE_IN_ATTR!==!1,E=S.SAFE_FOR_TEMPLATES||!1,t0=S.SAFE_FOR_XML!==!1,r0=S.WHOLE_DOCUMENT||!1,J0=S.RETURN_DOM||!1,a1=S.RETURN_DOM_FRAGMENT||!1,o1=S.RETURN_TRUSTED_TYPE||!1,j0=S.FORCE_BODY||!1,q1=S.SANITIZE_DOM!==!1,C1=S.SANITIZE_NAMED_PROPS||!1,rt=S.KEEP_CONTENT!==!1,c2=S.IN_PLACE||!1,G=S.ALLOWED_URI_REGEXP||LW,Ge=S.NAMESPACE||Ce,i2=S.MATHML_TEXT_INTEGRATION_POINTS||i2,Ze=S.HTML_INTEGRATION_POINTS||Ze,d0=S.CUSTOM_ELEMENT_HANDLING||{},S.CUSTOM_ELEMENT_HANDLING&&B(S.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(d0.tagNameCheck=S.CUSTOM_ELEMENT_HANDLING.tagNameCheck),S.CUSTOM_ELEMENT_HANDLING&&B(S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(d0.attributeNameCheck=S.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),S.CUSTOM_ELEMENT_HANDLING&&typeof S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(d0.allowCustomizedBuiltInElements=S.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),E&&(T0=!1),a1&&(J0=!0),K1&&(N=u1({},vA),c0=[],K1.html===!0&&(u1(N,WA),u1(c0,RA)),K1.svg===!0&&(u1(N,Vb),u1(c0,Gb),u1(c0,Hi)),K1.svgFilters===!0&&(u1(N,Qb),u1(c0,Gb),u1(c0,Hi)),K1.mathMl===!0&&(u1(N,$b),u1(c0,yA),u1(c0,Hi))),S.ADD_TAGS&&(typeof S.ADD_TAGS=="function"?e0.tagCheck=S.ADD_TAGS:(N===I&&(N=kt(N)),u1(N,S.ADD_TAGS,n1))),S.ADD_ATTR&&(typeof S.ADD_ATTR=="function"?e0.attributeCheck=S.ADD_ATTR:(c0===h0&&(c0=kt(c0)),u1(c0,S.ADD_ATTR,n1))),S.ADD_URI_SAFE_ATTR&&u1(s2,S.ADD_URI_SAFE_ATTR,n1),S.FORBID_CONTENTS&&(X1===a2&&(X1=kt(X1)),u1(X1,S.FORBID_CONTENTS,n1)),S.ADD_FORBID_CONTENTS&&(X1===a2&&(X1=kt(X1)),u1(X1,S.ADD_FORBID_CONTENTS,n1)),rt&&(N["#text"]=!0),r0&&u1(N,["html","head","body"]),N.table&&(u1(N,["tbody"]),delete v0.tbody),S.TRUSTED_TYPES_POLICY){if(typeof S.TRUSTED_TYPES_POLICY.createHTML!="function")throw ra('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof S.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ra('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');L=S.TRUSTED_TYPES_POLICY,x=L.createHTML("")}else L===void 0&&(L=Rn0(q,r)),L!==null&&typeof x=="string"&&(x=L.createHTML(""));t2&&t2(S),H1=S}},V=u1({},[...Vb,...Qb,...un0]),s0=u1({},[...$b,...dn0]),f0=function(S){let z0=C(S);(!z0||!z0.tagName)&&(z0={namespaceURI:Ge,tagName:"template"});const x0=Mp(S.tagName),O1=Mp(z0.tagName);return je[S.namespaceURI]?S.namespaceURI===B2?z0.namespaceURI===Ce?x0==="svg":z0.namespaceURI===_2?x0==="svg"&&(O1==="annotation-xml"||i2[O1]):!!V[x0]:S.namespaceURI===_2?z0.namespaceURI===Ce?x0==="math":z0.namespaceURI===B2?x0==="math"&&Ze[O1]:!!s0[x0]:S.namespaceURI===Ce?z0.namespaceURI===B2&&!Ze[O1]||z0.namespaceURI===_2&&!i2[O1]?!1:!s0[x0]&&(p2[x0]||!V[x0]):!!(m2==="application/xhtml+xml"&&je[S.namespaceURI]):!1},y0=function(S){oa(t.removed,{element:S});try{C(S).removeChild(S)}catch{v(S)}},w0=function(S,z0){try{oa(t.removed,{attribute:z0.getAttributeNode(S),from:z0})}catch{oa(t.removed,{attribute:null,from:z0})}if(z0.removeAttribute(S),S==="is")if(J0||a1)try{y0(z0)}catch{}else try{z0.setAttribute(S,"")}catch{}},C0=function(S){let z0=null,x0=null;if(j0)S="<remove></remove>"+S;else{const T1=Ub(S,/^[\r\n\t ]+/);x0=T1&&T1[0]}m2==="application/xhtml+xml"&&Ge===Ce&&(S='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+S+"</body></html>");const O1=L?L.createHTML(S):S;if(Ge===Ce)try{z0=new h().parseFromString(O1,m2)}catch{}if(!z0||!z0.documentElement){z0=w.createDocument(Ge,"template",null);try{z0.documentElement.innerHTML=E2?x:O1}catch{}}const c1=z0.body||z0.documentElement;return S&&x0&&c1.insertBefore(o.createTextNode(x0),c1.childNodes[0]||null),Ge===Ce?o0.call(z0,r0?"html":"body")[0]:r0?z0.documentElement:c1},D0=function(S){return P.call(S.ownerDocument||S,S,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},U0=function(S){return S instanceof O&&(typeof S.nodeName!="string"||typeof S.textContent!="string"||typeof S.removeChild!="function"||!(S.attributes instanceof f)||typeof S.removeAttribute!="function"||typeof S.setAttribute!="function"||typeof S.namespaceURI!="string"||typeof S.insertBefore!="function"||typeof S.hasChildNodes!="function")},I0=function(S){return typeof l=="function"&&S instanceof l};function N0(W0,S,z0){Fi(W0,x0=>{x0.call(t,S,z0,H1)})}const r1=function(S){let z0=null;if(N0(K.beforeSanitizeElements,S,null),U0(S))return y0(S),!0;const x0=n1(S.nodeName);if(N0(K.uponSanitizeElement,S,{tagName:x0,allowedTags:N}),t0&&S.hasChildNodes()&&!I0(S.firstElementChild)&&Je(/<[/\w!]/g,S.innerHTML)&&Je(/<[/\w!]/g,S.textContent)||S.nodeType===aa.progressingInstruction||t0&&S.nodeType===aa.comment&&Je(/<[/\w]/g,S.data))return y0(S),!0;if(!(e0.tagCheck instanceof Function&&e0.tagCheck(x0))&&(!N[x0]||v0[x0])){if(!v0[x0]&&Y1(x0)&&(d0.tagNameCheck instanceof RegExp&&Je(d0.tagNameCheck,x0)||d0.tagNameCheck instanceof Function&&d0.tagNameCheck(x0)))return!1;if(rt&&!X1[x0]){const O1=C(S)||S.parentNode,c1=k(S)||S.childNodes;if(c1&&O1){const T1=c1.length;for(let D1=T1-1;D1>=0;--D1){const _e=W(c1[D1],!0);_e.__removalCount=(S.__removalCount||0)+1,O1.insertBefore(_e,y(S))}}}return y0(S),!0}return S instanceof z&&!f0(S)||(x0==="noscript"||x0==="noembed"||x0==="noframes")&&Je(/<\/no(script|embed|frames)/i,S.innerHTML)?(y0(S),!0):(E&&S.nodeType===aa.text&&(z0=S.textContent,Fi([n0,J,i0],O1=>{z0=na(z0,O1," ")}),S.textContent!==z0&&(oa(t.removed,{element:S.cloneNode()}),S.textContent=z0)),N0(K.afterSanitizeElements,S,null),!1)},L1=function(S,z0,x0){if(q1&&(z0==="id"||z0==="name")&&(x0 in o||x0 in S2))return!1;if(!(T0&&!u0[z0]&&Je(L0,z0))){if(!(S0&&Je(Z,z0))){if(!(e0.attributeCheck instanceof Function&&e0.attributeCheck(z0,S))){if(!c0[z0]||u0[z0]){if(!(Y1(S)&&(d0.tagNameCheck instanceof RegExp&&Je(d0.tagNameCheck,S)||d0.tagNameCheck instanceof Function&&d0.tagNameCheck(S))&&(d0.attributeNameCheck instanceof RegExp&&Je(d0.attributeNameCheck,z0)||d0.attributeNameCheck instanceof Function&&d0.attributeNameCheck(z0,S))||z0==="is"&&d0.allowCustomizedBuiltInElements&&(d0.tagNameCheck instanceof RegExp&&Je(d0.tagNameCheck,x0)||d0.tagNameCheck instanceof Function&&d0.tagNameCheck(x0))))return!1}else if(!s2[z0]){if(!Je(G,na(x0,$,""))){if(!((z0==="src"||z0==="xlink:href"||z0==="href")&&S!=="script"&&Mn0(x0,"data:")===0&&ct[S])){if(!(V0&&!Je(m0,na(x0,$,"")))){if(x0)return!1}}}}}}}return!0},Y1=function(S){return S!=="annotation-xml"&&Ub(S,X)},Ae=function(S){N0(K.beforeSanitizeAttributes,S,null);const{attributes:z0}=S;if(!z0||U0(S))return;const x0={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:c0,forceKeepAttr:void 0};let O1=z0.length;for(;O1--;){const c1=z0[O1],{name:T1,namespaceURI:D1,value:_e}=c1,Xe=n1(T1),p1=_e;let f1=T1==="value"?p1:ln0(p1);if(x0.attrName=Xe,x0.attrValue=f1,x0.keepAttr=!0,x0.forceKeepAttr=void 0,N0(K.uponSanitizeAttribute,S,x0),f1=x0.attrValue,C1&&(Xe==="id"||Xe==="name")&&(w0(T1,S),f1=ke+f1),t0&&Je(/((--!?|])>)|<\/(style|title|textarea)/i,f1)){w0(T1,S);continue}if(Xe==="attributename"&&Ub(f1,"href")){w0(T1,S);continue}if(x0.forceKeepAttr)continue;if(!x0.keepAttr){w0(T1,S);continue}if(!h1&&Je(/\/>/i,f1)){w0(T1,S);continue}E&&Fi([n0,J,i0],be=>{f1=na(f1,be," ")});const M2=n1(S.nodeName);if(!L1(M2,Xe,f1)){w0(T1,S);continue}if(L&&typeof q=="object"&&typeof q.getAttributeType=="function"&&!D1)switch(q.getAttributeType(M2,Xe)){case"TrustedHTML":{f1=L.createHTML(f1);break}case"TrustedScriptURL":{f1=L.createScriptURL(f1);break}}if(f1!==p1)try{D1?S.setAttributeNS(D1,T1,f1):S.setAttribute(T1,f1),U0(S)?y0(S):gA(t.removed)}catch{w0(T1,S)}}N0(K.afterSanitizeAttributes,S,null)},S1=function W0(S){let z0=null;const x0=D0(S);for(N0(K.beforeSanitizeShadowDOM,S,null);z0=x0.nextNode();)N0(K.uponSanitizeShadowNode,z0,null),r1(z0),Ae(z0),z0.content instanceof a&&W0(z0.content);N0(K.afterSanitizeShadowDOM,S,null)};return t.sanitize=function(W0){let S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},z0=null,x0=null,O1=null,c1=null;if(E2=!W0,E2&&(W0="<!-->"),typeof W0!="string"&&!I0(W0))if(typeof W0.toString=="function"){if(W0=W0.toString(),typeof W0!="string")throw ra("dirty is not a string, aborting")}else throw ra("toString is not a function");if(!t.isSupported)return W0;if(A0||D(S),t.removed=[],typeof W0=="string"&&(c2=!1),c2){if(W0.nodeName){const _e=n1(W0.nodeName);if(!N[_e]||v0[_e])throw ra("root node is forbidden and cannot be sanitized in-place")}}else if(W0 instanceof l)z0=C0("<!---->"),x0=z0.ownerDocument.importNode(W0,!0),x0.nodeType===aa.element&&x0.nodeName==="BODY"||x0.nodeName==="HTML"?z0=x0:z0.appendChild(x0);else{if(!J0&&!E&&!r0&&W0.indexOf("<")===-1)return L&&o1?L.createHTML(W0):W0;if(z0=C0(W0),!z0)return J0?null:o1?x:""}z0&&j0&&y0(z0.firstChild);const T1=D0(c2?W0:z0);for(;O1=T1.nextNode();)r1(O1),Ae(O1),O1.content instanceof a&&S1(O1.content);if(c2)return W0;if(J0){if(a1)for(c1=H.call(z0.ownerDocument);z0.firstChild;)c1.appendChild(z0.firstChild);else c1=z0;return(c0.shadowroot||c0.shadowrootmode)&&(c1=Y.call(n,c1,!0)),c1}let D1=r0?z0.outerHTML:z0.innerHTML;return r0&&N["!doctype"]&&z0.ownerDocument&&z0.ownerDocument.doctype&&z0.ownerDocument.doctype.name&&Je(xW,z0.ownerDocument.doctype.name)&&(D1="<!DOCTYPE "+z0.ownerDocument.doctype.name+`>
620
- `+D1),E&&Fi([n0,J,i0],_e=>{D1=na(D1,_e," ")}),L&&o1?L.createHTML(D1):D1},t.setConfig=function(){let W0=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};D(W0),A0=!0},t.clearConfig=function(){H1=null,A0=!1},t.isValidAttribute=function(W0,S,z0){H1||D({});const x0=n1(W0),O1=n1(S);return L1(x0,O1,z0)},t.addHook=function(W0,S){typeof S=="function"&&oa(K[W0],S)},t.removeHook=function(W0,S){if(S!==void 0){const z0=in0(K[W0],S);return z0===-1?void 0:pn0(K[W0],z0,1)[0]}return gA(K[W0])},t.removeHooks=function(W0){K[W0]=[]},t.removeAllHooks=function(){K=LA()},t}var yn0=kW();const wn0=["http:","https:","mailto:"];function ra0(e){try{const t=new URL(e);return wn0.includes(t.protocol)}catch{return!1}}function ca0(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Cr(e){return yn0.sanitize(e)}function bu(e,t=[]){if(t.length===0)return e.replace(/<br\s*\/?>/gi," ").replace(/<\/p>\s*<p>|<\/div>\s*<div>|<\/h[1-6]>\s*<|<\/li>\s*<li>|<\/a>/gi," ").replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim();const o=t.map(u=>u.toLowerCase()),n={};let r=0,i=e.replace(/<\/(h[1-6]|p|div|li|blockquote|pre)>/gi,"<br>");for(const u of o){const f=new RegExp(`<${u}[^>]*>.*?<\\/${u}>|<${u}[^>]*\\/?>`,"gis");i=i.replace(f,O=>{const h=`__EXCLUDED_TAG_${r+=1}__`;return n[h]=O,h})}let l=i;o.includes("br")||(l=i.replace(/<br\s*\/?>/gi," "));let z=l.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim();for(const[u,f]of Object.entries(n))z=z.replace(u,f);return z}const lp=e=>{const t=document.createElement("div");t.innerHTML=e;const o=t.getElementsByTagName("a");for(let n=0;n<o.length;n++)(o[n].getAttribute("href")||"").match(/^\s*(javascript|data|vbscript):/i)&&o[n].removeAttribute("href"),o[n].setAttribute("target","_blank"),o[n].setAttribute("rel","noopener noreferrer");return t.innerHTML},xA=e=>"preferredUsername"in e,Zo=({actor:e,children:t,disabled:o=!1,side:n="bottom",align:r="start",isCurrentUser:a=!1})=>{const[i,l]=p.useState(!1),z=qo();let u=e?.handle;!u&&e&&xA(e)&&(u=Jo(e));const f=o||!u&&!e,O=b5("index",u||"",{enabled:i&&!!u}),h=O.isFetching||O.isLoading,q=O.error,g=O.data?typeof O.data.followerCount=="number"&&typeof O.data.followingCount=="number"&&O.data.bio!==void 0:!1;if(p.useEffect(()=>{!i||!u||!g&&!h&&!q&&O.refetch({cancelRefetch:!1})},[O,h,q,g,i,u]),f)return b.jsx(b.Fragment,{children:t});const v=O.data||e,y=v?.handle??u??"",k=v?.name??"",C=v?.avatarUrl??(e&&xA(e)?e.icon?.url:null)??null,L=!!v?.followsMe,x=typeof v?.followingCount=="number"?v.followingCount:Number(v?.followingCount)||0,w=typeof v?.followerCount=="number"?v.followerCount:Number(v?.followerCount)||0,P=v?.bio?lp(bu(v.bio,["a"])):void 0,H=()=>{y&&z(`/profile/${y}`)},o0=()=>{y&&z(`/profile/${y}/following`)},Y=()=>{y&&z(`/profile/${y}/followers`)};return b.jsxs(GJ,{onOpenChange:l,children:[b.jsx(ZJ,{asChild:!0,children:t}),b.jsx(bg,{align:r,className:"w-[320px] cursor-default rounded-2xl border-0 p-5 text-left text-gray-900 shadow-[0_5px_24px_0px_rgba(0,0,0,0.02),0px_2px_5px_0px_rgba(0,0,0,0.07),0px_0px_1px_0px_rgba(0,0,0,0.25)] outline-none dark:bg-[#101114] dark:shadow-none",side:n,sideOffset:12,onClick:K=>K.stopPropagation(),children:b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsxs("div",{className:"flex justify-between",children:[b.jsxs(Xd,{className:"size-14 cursor-pointer",onClick:H,children:[C&&b.jsx(Dd,{alt:k,className:"rounded-full outline outline-[0.5px] outline-offset-[-0.5px] outline-black/10",src:C,onError:K=>{K.target.src="",K.target.style.display="none"}}),b.jsx(Id,{className:"bg-gray-200 text-sm font-semibold text-gray-700 dark:bg-gray-800 dark:text-gray-200",children:b.jsx(Td,{className:"size-5 text-gray-500 dark:text-gray-400",strokeWidth:1.5})})]}),!a&&b.jsx(O5,{following:!!v?.followedByMe,handle:y,type:"primary"})]}),b.jsxs("div",{className:"flex cursor-pointer flex-col items-start",onClick:H,children:[b.jsx(Rg,{className:"w-full truncate",children:k}),b.jsxs("div",{className:"flex w-full gap-2",children:[b.jsx("span",{className:"truncate text-gray-700 dark:text-gray-600",children:y}),L&&!a&&b.jsx(uY,{className:"mt-px whitespace-nowrap",variant:"secondary",children:"Follows you"})]})]})]}),b.jsx("div",{className:"flex gap-3 dark:text-gray-300",children:h?b.jsx(j1,{className:"h-4 w-32"}):!q&&b.jsxs(b.Fragment,{children:[b.jsxs("span",{className:"cursor-pointer hover:underline",onClick:o0,children:[b.jsx("span",{className:"font-bold text-black dark:text-white",children:Xf(x)})," ","Following"]}),b.jsxs("span",{className:"cursor-pointer hover:underline",onClick:Y,children:[b.jsx("span",{className:"font-bold text-black dark:text-white",children:Xf(w)})," ","Followers"]})]})}),h?b.jsx(j1,{className:"h-4 w-48"}):!q&&P?b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(P)},className:"leading-tight dark:text-gray-300 [&_.invisible]:hidden [&_a:hover]:underline [&_a]:text-[#00a4eb]"}):null]})})]})},CW=(e={})=>{const[t,o]=p.useState(!1),n=Pe();return p.useEffect(()=>{const r=a=>{if(a.target instanceof HTMLInputElement||a.target instanceof HTMLTextAreaElement||a.target instanceof HTMLElement&&a.target.isContentEditable||a.target instanceof HTMLSelectElement||a.metaKey||a.ctrlKey||a.altKey||a.shiftKey)return;const i=document.querySelector('[role="dialog"][data-state="open"]');if(!(i&&!(e.componentRef?.current?.closest('[role="dialog"]')===i)))switch(a.key.toLowerCase()){case"n":i||(a.preventDefault(),e.onOpenNewNote?e.onOpenNewNote():o(!0));break;case"r":e.isReplyAvailable&&e.onOpenReply&&(n.pathname.includes("/notes/")||n.pathname.includes("/reader/"))&&(a.preventDefault(),e.onOpenReply());break}};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,n.pathname]),{isNewNoteModalOpen:t,setIsNewNoteModalOpen:o}},Ui=({actor:e,object:t,likeCount:o,commentCount:n,repostCount:r,layout:a,disabled:i=!1,buttonClassName:l="",onLikeClick:z,onCommentClick:u,onReplyCountChange:f})=>{const[O,h]=p.useState(t.liked),[q,g]=p.useState(t.reposted),[W,v]=p.useState(!1),y=p.useRef(null);CW({isReplyAvailable:!u&&a!=="reply",onOpenReply:()=>v(!0),componentRef:y}),p.useEffect(()=>{h(t.liked),g(t.reposted)},[t.liked,t.reposted]),p.useEffect(()=>{P(r)},[r]);const k=Qo0("index"),C=$o0("index"),L=Go0("index"),x=Zo0("index"),[w,P]=p.useState(r),H=async K=>{K.stopPropagation(),O?C.mutate(t.id):k.mutate(t.id,{onError(){h(!1)}}),h(!O),z()},o0=K=>{K.stopPropagation(),u?u():v(!0)},Y=`px-2 gap-1.5 font-normal text-md [&_svg]:size-[18px] transition-color ap-action-button text-gray-900 hover:text-gray-900 hover:bg-black/[3%] dark:bg-black dark:hover:bg-gray-950 dark:text-gray-600 ${l}`;return b.jsxs(b.Fragment,{children:[b.jsxs("div",{ref:y,className:`flex ${a!=="inbox"&&"gap-1"}`,children:[b.jsxs(i1,{className:`${Y} ${O&&"text-pink-500 hover:text-pink-500"}`,"data-testid":"like-button",disabled:i,id:"like",title:`${O?"Undo like":"Like"}`,variant:"ghost",onClick:K=>{K?.stopPropagation(),K&&H(K)},children:[b.jsx(mZ,{className:`${O&&"fill-pink-500 text-pink-500"}`}),a!=="inbox"&&b.jsx(Vf,{className:o===0?"-ml-1.5 w-0 overflow-hidden":"",spinTiming:{duration:300},value:o})]}),b.jsxs(i1,{className:`${Y}`,"data-testid":"reply-button",disabled:i,id:"comment",title:"Reply",variant:"ghost",onClick:o0,children:[b.jsx(Ed,{className:"-mr-px"}),a!=="inbox"&&n>0&&I3(n)]}),b.jsxs(i1,{className:`${Y} ${q&&"text-green-500 hover:text-green-500"}`,"data-testid":"repost-button",disabled:i,id:"repost",title:`${q?"Undo repost":"Repost"}`,variant:"ghost",onClick:K=>{K?.stopPropagation(),q?(x.mutate(t.id),P(w-1)):(L.mutate(t.id,{onError(){g(!1),P(w-1)}}),P(w+1)),g(!q)},children:[b.jsx(X9,{className:`${q&&"text-green-500"}`}),a!=="inbox"&&b.jsx(Vf,{className:w===0?"-ml-1.5 w-0 overflow-hidden":"",spinTiming:{duration:300},value:w})]})]}),W&&b.jsx(A5,{open:W,replyTo:{object:t,actor:e},onOpenChange:K=>{v(K)},onReply:()=>{f?.(1),v(!1)},onReplyError:()=>{f?.(-1)}})]})};function Ln0(e){const o=e.replace(/<[^>]*>/g,"").split(/\s+/).filter(r=>r.length>0).length;return`${Math.ceil(o/275)} min read`}const Fo=(e,t,o)=>{o?.stopPropagation(),t(typeof e=="string"?`/profile/${e}`:`/profile/${e.handle||Jo(e)}`)},xn0=e=>{const t=new Date,o=i=>new Date(i.getFullYear(),i.getMonth(),i.getDate()),n=o(t),r=o(new Date(t.getTime()-1440*60*1e3)),a=o(e);return a.getTime()===n.getTime()?kn0(e):a.getTime()===r.getTime()?"Yesterday":Cn0(e)},kn0=e=>{const o=Math.floor((new Date().getTime()-e.getTime())/1e3);if(o<1)return"Just now";if(o<60)return`${o}s`;const n=Math.floor(o/60);return n<60?`${n}m`:`${Math.floor(n/60)}h`},Cn0=e=>{const t=new Date,o=e.getDate(),n=e.toLocaleString("default",{month:"short"});return e.getFullYear()===t.getFullYear()?`${o} ${n}`:`${o} ${n} ${e.getFullYear()}`};function Nn0(e){return new Date(e).toLocaleDateString("default",{year:"numeric",month:"short",day:"2-digit"})+", "+new Date(e).toLocaleTimeString("default",{hour:"2-digit",minute:"2-digit"})}function Vi(e,t=!0){const o=new Date(e?.published??e?.createdAt??new Date),n=Nn0(o),r=xn0(o);return t&&!e.url?.includes("/.ghost/activitypub")?b.jsx("a",{className:"whitespace-nowrap text-gray-700 hover:underline",href:e.url,rel:"noreferrer",target:"_blank",title:n,onClick:a=>a.stopPropagation(),children:r}):b.jsx("span",{className:"whitespace-nowrap text-gray-700",children:r})}function f5(e){let t;if(e.image&&(t=e.image),e.type==="Note"&&!t&&(t=e.attachment),!t)return null;if(Array.isArray(t)){if(t.length===0)return null;if(t.length===1)return t[0]}return t}function sa(e,t,o,n){const r=f5(e);if(!r)return null;const a=z=>u=>{u.stopPropagation(),t&&t(z)},i=z=>{n&&n(z)},l=(z,u=!1)=>{const f=u?"min-h-[200px]":"";return b.jsx("div",{className:`${z} ${f} flex w-full items-center justify-center bg-gray-100 dark:bg-gray-925/30`,children:b.jsx(WZ,{className:"text-gray-400",size:24,strokeWidth:1.5})})};if(Array.isArray(r)){const z=r.length;let u="";return z===1?u="grid-cols-1":z>=2&&z<=4?u="grid-cols-2 auto-rows-[150px]":z>4&&(u="grid-cols-3 auto-rows-[150px]"),b.jsx("div",{className:`attachment-gallery mt-3 grid w-full ${u} gap-2`,children:r.map((f,O)=>{const h=`size-full rounded-md outline outline-1 -outline-offset-1 outline-black/10 ${z===3&&O===0?"row-span-2":""}`;return o&&o.has(f.url)?l(h,z===1):b.jsx("img",{alt:f.name||`Image-${O}`,className:`${h} cursor-pointer object-cover`,referrerPolicy:"no-referrer",src:f.url,onClick:t?a(f.url):void 0,onError:()=>i(f.url)},f.url)})})}switch(r.mediaType){case"image/jpeg":case"image/png":case"image/gif":case"image/webp":return o&&o.has(r.url)?l(`${e.type==="Article"?"w-full rounded-t-md":"mt-3 max-h-[420px] rounded-md outline outline-1 -outline-offset-1 outline-black/10"}`,!0):b.jsx("img",{alt:r.name||"Image",className:`cursor-pointer ${e.type==="Article"?"w-full rounded-t-md":"mt-3 max-h-[420px] rounded-md outline outline-1 -outline-offset-1 outline-black/10"}`,referrerPolicy:"no-referrer",src:r.url,onClick:t?a(r.url):void 0,onError:()=>i(r.url)});case"video/mp4":case"video/webm":return b.jsx("div",{className:"relative mb-4 mt-3",children:b.jsx("video",{className:"h-[300px] w-full rounded object-cover",src:r.url,controls:!0})});case"audio/mpeg":case"audio/ogg":return b.jsx("div",{className:"relative mb-4 mt-2 w-full",children:b.jsx("audio",{className:"w-full",src:r.url,controls:!0})});default:if(e.image||r.type==="Image"){const z=e.type==="Article"?"cursor-pointer aspect-[16/7.55] w-full rounded-t-md object-cover":"cursor-pointer mt-3 max-h-[420px] rounded-md outline outline-1 -outline-offset-1 outline-black/10";let u;return e.image?typeof e.image=="string"?u=e.image:u=e.image?.url:u=r.url,o&&o.has(u)?l(z,!0):b.jsx("img",{alt:r.name||"Image",className:z,referrerPolicy:"no-referrer",src:u,onClick:t?a(u):void 0,onError:()=>i(u)})}return null}}function _n0(e,t){const o=f5(e),n="ml-8 md:ml-9 shrink-0 rounded-md h-[91px] w-[121px] relative",r=se("object-cover outline outline-1 -outline-offset-1 outline-black/[0.05]",n);if(t)return b.jsx(j1,{className:`${r} outline-0`});if(!o)return null;if(Array.isArray(o))return b.jsx("img",{className:r,referrerPolicy:"no-referrer",src:o[0].url});switch(o.mediaType){case"image/jpeg":case"image/png":case"image/gif":return b.jsx("img",{className:r,referrerPolicy:"no-referrer",src:o.url});case"video/mp4":case"video/webm":return b.jsxs("div",{className:n,children:[b.jsx("video",{className:"h-[80px] w-full rounded object-cover",src:o.url}),b.jsx("div",{className:"absolute inset-0 rounded bg-gray-900 opacity-50"}),b.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:b.jsx(FZ,{color:"white",fill:"white",size:40})})]});case"audio/mpeg":case"audio/ogg":return b.jsx("div",{className:"ml-8 w-[120px]",children:b.jsx("div",{className:"relative mb-4 mt-2 w-full",children:b.jsx("audio",{className:"w-full",src:o.url,controls:!0})})});default:return e.image?b.jsx("img",{className:r,referrerPolicy:"no-referrer",src:typeof e.image=="string"?e.image:e.image?.url}):null}}const kA=()=>{},CA=b.jsx(X9,{className:"shrink-0 text-gray-700 dark:text-gray-600",size:16,strokeWidth:1.5}),Bn0=({actor:e,allowDelete:t=!1,object:o,parentId:n=void 0,layout:r,type:a,commentCount:i=0,repostCount:l=0,likeCount:z=0,showHeader:u=!0,last:f,isLoading:O,isPending:h=!1,isCompact:q=!1,isChainContinuation:g=!1,isChainParent:W=!1,onClick:v=kA,onDelete:y=kA,showStats:k=!0})=>{const C=new Date(o?.published??new Date).toLocaleDateString("default",{year:"numeric",month:"short",day:"2-digit"})+", "+new Date(o?.published??new Date).toLocaleTimeString("default",{hour:"2-digit",minute:"2-digit"}),[,L]=p.useState(!1),[x,w]=p.useState(new Set),P=p.useRef(null),[H,o0]=p.useState(!1),Y=tn0("index"),K=qo(),n0=l5("index",()=>{Se.success(`Followed ${X?.name}`)},()=>{Se.error("Failed to follow")}),J=M5("index",()=>{Se.info(`Unfollowed ${X?.name}`)},()=>{Se.error("Failed to unfollow")});p.useEffect(()=>{const V0=P.current;V0&&o0(V0.scrollHeight>V0.clientHeight)},[o?.content]),p.useEffect(()=>{const V0=P.current;if(!V0)return;const h1=E=>{const r0=E.target.closest("a[data-profile]");if(r0){const A0=r0.getAttribute("data-profile")?.trim();/^@([\w.-]+)@([\w-]+\.[\w.-]+[a-zA-Z])$/.test(A0||"")&&A0&&(E.preventDefault(),E.stopPropagation(),Fo(A0,K))}};return V0.addEventListener("click",h1),()=>{V0.removeEventListener("click",h1)}},[K,o?.content]);const i0=()=>{},L0=()=>{h||v()},Z=()=>{Y.mutate({id:o.id,parentId:n}),y()},m0=async()=>{o?.url&&(await navigator.clipboard.writeText(o.url),L(!0),Se.success("Link copied"),setTimeout(()=>L(!1),2e3))},$=V0=>{w(h1=>new Set(h1).add(V0))};let X=e;a==="Announce"&&(X=typeof o.attributedTo=="object"?o.attributedTo:e);const G=X?Jo(X):null,N=X?.followedByMe||!1,I=a==="Announce"?typeof o.attributedTo=="object"&&o.attributedTo&&!Array.isArray(o.attributedTo)&&"authored"in o.attributedTo?o.attributedTo.authored:typeof o.attributedTo=="object"&&o.attributedTo&&!Array.isArray(o.attributedTo)&&typeof e=="object"&&e&&o.attributedTo.id===e.id:o.authored,c0=a==="Announce"?o.reposted??!1:o.authored,h0=()=>{G&&n0.mutate(G)},d0=()=>{G&&J.mutate(G)},v0=b.jsx(i1,{className:`relative z-10 size-[34px] rounded-md ${r==="inbox"||r==="modal"?"text-gray-900 hover:text-gray-900 dark:text-gray-600 dark:hover:text-gray-600":"text-gray-500 hover:text-gray-500"} dark:bg-black dark:hover:bg-gray-950 [&_svg]:size-5`,"data-testid":"menu-button",variant:"ghost",children:b.jsx(T9,{})}),{lightboxState:u0,openLightbox:e0,closeLightbox:S0,navigateToIndex:T0}=rn0(o);return r==="feed"?b.jsxs(b.Fragment,{children:[o&&b.jsxs("div",{className:`group/article relative -mx-4 ${h?"pointer-events-none":"cursor-pointer"} rounded-lg p-6 px-4 pb-[18px]`,"data-layout":"feed","data-object-id":o.id,onClick:L0,children:[a==="Announce"&&b.jsxs("div",{className:"z-10 mb-2 flex items-center gap-1.5 text-gray-700 dark:text-gray-600",children:[CA,b.jsxs("div",{className:"flex min-w-0 items-center gap-1 text-sm",children:[b.jsx(Zo,{actor:e,align:"center",isCurrentUser:c0,children:b.jsx("span",{className:"truncate break-anywhere hover:underline",onClick:V0=>{Fo(e,K,V0)},children:e.name})}),"reposted"]})]}),b.jsxs("div",{className:"border-1 flex flex-col gap-2.5","data-test-activity":!0,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Zo,{actor:X,isCurrentUser:I,children:b.jsxs("div",{className:"flex min-w-0 grow items-center gap-3",children:[b.jsx(en,{author:X,disabled:h,showFollowButton:!I&&!N}),b.jsxs("div",{className:"flex min-w-0 grow flex-col",onClick:V0=>{h||Fo(X,K,V0)},children:[b.jsx("span",{className:`min-w-0 truncate font-semibold break-anywhere ${q?"text-lg":"text-md"} ${h?"":"hover-underline"} dark:text-white`,"data-test-activity-heading":!0,children:O?b.jsx(j1,{className:"w-24"}):X.name}),b.jsxs("div",{className:"flex w-full text-md text-gray-700 dark:text-gray-600",children:[b.jsx("span",{className:`truncate ${h?"":"hover-underline"}`,children:O?b.jsx(j1,{className:"w-56"}):Jo(X)}),b.jsx("div",{className:`ml-1 before:mr-1 ${!O&&'before:content-["·"]'}`,title:`${C}`,children:O?b.jsx(j1,{className:"w-4"}):Vi(o,h===!1&&!o.authored)})]})]})]})}),b.jsx(Ib,{allowDelete:t,authoredByMe:I,disabled:h,followedByMe:N,layout:"feed",trigger:v0,onCopyLink:m0,onDelete:Z,onFollow:h0,onUnfollow:d0})]}),b.jsx("div",{className:"relative col-start-2 col-end-3 w-full gap-4 pl-[52px]",children:b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"",children:o.type==="Article"?b.jsxs("div",{className:"rounded-md border border-gray-150 transition-colors hover:bg-gray-75 dark:border-gray-950 dark:hover:bg-gray-950",children:[sa(o,L0,x,$),b.jsxs("div",{className:"p-5",children:[b.jsx("div",{className:"mb-1 line-clamp-2 text-pretty text-lg font-semibold leading-tight tracking-tight break-anywhere","data-test-activity-heading":!0,children:o.name}),b.jsx("div",{className:"line-clamp-3 leading-[1.4em] break-anywhere",children:o.preview?.content})]})]}):b.jsxs("div",{className:"relative",children:[b.jsx("div",{className:"ap-note-content line-clamp-[10] text-pretty leading-[1.4285714286] tracking-[-0.006em] text-gray-900 break-anywhere dark:text-gray-300 [&_p+p]:mt-3",children:O?b.jsx(j1,{count:2}):b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(lp(o.content||"")??"")},ref:P,onClick:V0=>{const h1=V0.target;(h1.tagName==="A"||h1.closest("a"))&&V0.stopPropagation()}})}),H&&b.jsx("button",{className:"mt-1 text-blue-600",type:"button",children:"Show more"}),sa(o,e0,x,$)]})}),b.jsx("div",{className:"space-between relative z-[30] ml-[-8px] mt-1 flex",children:O?b.jsx(j1,{className:"ml-2 w-18"}):k&&b.jsx(Ui,{actor:X,commentCount:i,disabled:h,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0})})]})})]})]}),b.jsx(Fb,{currentIndex:u0.currentIndex,images:u0.images,isOpen:u0.isOpen,onClose:S0,onNavigate:T0})]}):r==="modal"?b.jsxs(b.Fragment,{children:[o&&b.jsxs("div",{"data-object-id":o.id,children:[b.jsxs("div",{className:"group/article relative","data-layout":"modal",onClick:L0,children:[b.jsxs("div",{className:"z-10 -my-1 grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-3 pb-3 pt-4","data-test-activity":!0,children:[u&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"relative z-10 pt-[3px]",children:b.jsx(en,{author:X,showFollowButton:!I&&!N})}),b.jsxs("div",{className:"relative z-10 flex w-full min-w-0 cursor-pointer flex-col overflow-visible text-[1.5rem]",onClick:V0=>{h||Fo(X,K,V0)},children:[b.jsxs("div",{className:"flex w-full",children:[b.jsx("span",{className:'min-w-0 truncate whitespace-nowrap font-semibold break-anywhere after:mx-1 after:font-normal after:text-gray-700 after:content-["·"] after:dark:text-gray-600',"data-test-activity-heading":!0,children:X.name}),b.jsx("div",{children:Vi(o,!o.authored)})]}),b.jsx("div",{className:"flex w-full",children:b.jsx("span",{className:"min-w-0 truncate text-gray-700 dark:text-gray-600",children:Jo(X)})})]})]}),b.jsx("div",{className:"relative z-10 col-start-1 col-end-3 w-full gap-4",children:b.jsxs("div",{className:"flex flex-col items-start",children:[o.name&&b.jsx(V2,{className:"mb-1 leading-tight break-anywhere","data-test-activity-heading":!0,children:o.name}),b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(lp(o.content||"")??"")},ref:P,className:"ap-note-content-large text-pretty text-[1.6rem] tracking-[-0.011em] text-gray-900 break-anywhere dark:text-gray-300 [&_p+p]:mt-3"}),sa(o,e0,x,$),b.jsx("div",{className:"space-between ml-[-8px] mt-3 flex",children:k&&b.jsx(Ui,{actor:X,commentCount:i,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0})})]})})]}),b.jsx("div",{className:"absolute -inset-x-3 -inset-y-0 z-0 rounded transition-colors max-lg:hidden"})]}),b.jsx("div",{className:"mt-3 h-px bg-gray-200 dark:bg-gray-950"})]}),b.jsx(Fb,{currentIndex:u0.currentIndex,images:u0.images,isOpen:u0.isOpen,onClose:S0,onNavigate:T0})]}):r==="reply"?b.jsxs(b.Fragment,{children:[o&&b.jsxs("div",{className:`group/article relative ${q?"pb-6":g?"pb-5":"py-5"} ${h?"pointer-events-none":"cursor-pointer"}`,"data-layout":"reply","data-object-id":o.id,onClick:L0,children:[b.jsxs("div",{className:"border-1 flex flex-col gap-2.5 border-b-gray-200","data-test-activity":!0,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Zo,{actor:X,isCurrentUser:I,children:b.jsxs("div",{className:"flex min-w-0 grow items-center gap-3",children:[b.jsx(en,{author:X,disabled:h,showFollowButton:!I&&!N}),b.jsxs("div",{className:"flex min-w-0 grow flex-col",onClick:V0=>{h||Fo(X,K,V0)},children:[b.jsxs("div",{className:"flex",children:[b.jsx("span",{className:'min-w-0 truncate whitespace-nowrap font-semibold text-black break-anywhere after:mx-1 after:font-normal after:text-gray-700 after:content-["·"] dark:text-white',"data-test-activity-heading":!0,children:X.name}),b.jsx("div",{children:Vi(o,h===!1&&!o.authored)})]}),b.jsx("div",{className:"flex",children:b.jsx("span",{className:"truncate text-gray-700",children:Jo(X)})})]})]})}),!q&&b.jsx(Ib,{allowDelete:t,authoredByMe:I,disabled:h,followedByMe:N,layout:"reply",trigger:v0,onCopyLink:m0,onDelete:Z,onFollow:h0,onUnfollow:d0})]}),b.jsx("div",{className:"relative z-10 col-start-2 col-end-3 w-full gap-4 pl-[52px]",children:b.jsxs("div",{className:"flex flex-col items-start",children:[o.type==="Article"&&sa(o,L0,x,$),o.name&&b.jsx(V2,{className:"mt-2.5 text-pretty leading-tight break-anywhere","data-test-activity-heading":!0,children:o.name}),o.preview&&o.type==="Article"?b.jsx("div",{className:"mt-1 line-clamp-3 leading-tight",children:o.preview.content}):b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(lp(o.content||"")??"")},ref:P,className:"ap-note-content text-pretty tracking-[-0.006em] text-gray-900 break-anywhere dark:text-gray-300 [&_p+p]:mt-3"}),o.type==="Note"&&sa(o,e0,x,$),o.type==="Article"&&b.jsx(i1,{className:"mt-3 w-full",id:"read-more",variant:"secondary",children:"Read more"}),!q&&b.jsx("div",{className:"space-between ml-[-8px] mt-2 flex",children:k&&b.jsx(Ui,{actor:X,commentCount:i,disabled:h,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0})})]})})]}),!f&&b.jsx("div",{className:`absolute left-[19px] ${q?"bottom-[8px] top-[51px]":g?"bottom-[5px] top-[51px]":W?"bottom-[5px] top-[71px]":"bottom-[-7px] top-[71px]"} z-0 w-[2px] rounded-sm bg-gray-200 dark:bg-gray-950`})]}),b.jsx(Fb,{currentIndex:u0.currentIndex,images:u0.images,isOpen:u0.isOpen,onClose:S0,onNavigate:T0})]}):r==="inbox"?b.jsx(b.Fragment,{children:o&&b.jsxs("div",{className:"group/article relative -mx-4 -my-px flex min-h-[112px] min-w-0 cursor-pointer items-center justify-between rounded-lg p-6 hover:bg-gray-75 dark:hover:bg-gray-950/50","data-layout":"inbox","data-object-id":o.id,onClick:L0,children:[b.jsxs("div",{className:"w-full min-w-0",children:[b.jsx("div",{className:"z-10 mb-1.5 flex w-full min-w-0 items-center gap-1.5 text-sm group-hover/article:border-transparent",children:O?b.jsx(j1,{className:"w-24"}):b.jsxs(b.Fragment,{children:[b.jsx(Zo,{actor:X,isCurrentUser:I,children:b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx(en,{author:X,size:"2xs"}),b.jsx("span",{className:"min-w-0 font-semibold text-gray-900 break-anywhere hover:underline dark:text-gray-600","data-test-activity-heading":!0,onClick:V0=>{Fo(X,K,V0)},children:X.name})]})}),a==="Announce"&&b.jsxs("span",{className:"z-10 flex items-center gap-1 text-gray-700 dark:text-gray-600",children:[CA,b.jsx(Zo,{actor:e,align:"center",isCurrentUser:c0,children:b.jsx("span",{className:"line-clamp-1 hover:underline",onClick:V0=>{Fo(e,K,V0)},children:e.name})})," reposted"]}),b.jsx("span",{className:'shrink-0 whitespace-nowrap text-gray-600 before:mr-1 before:content-["·"]',title:`${C}`,children:Vi(o,!o.authored)})]})}),b.jsxs("div",{className:"flex",children:[b.jsxs("div",{className:"flex min-h-[73px] w-full min-w-0 flex-col items-start justify-start gap-1",children:[b.jsx(V2,{className:"line-clamp-2 w-full max-w-[600px] text-pretty leading-tight break-anywhere","data-test-activity-heading":!0,children:O?b.jsx(j1,{className:"w-full max-w-96"}):o.name?o.name:b.jsx("span",{dangerouslySetInnerHTML:{__html:Cr(bu(o.content||""))}})}),b.jsx("div",{className:"ap-note-content line-clamp-2 w-full max-w-[600px] text-pretty text-base leading-normal text-gray-900 break-anywhere dark:text-gray-300 [&_p+p]:mt-3",children:O?b.jsx(j1,{count:2}):b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(bu(o.preview?.content??o.content??""))}})}),b.jsx("span",{className:"mt-1 shrink-0 whitespace-nowrap text-sm leading-none text-gray-600",children:O?b.jsx(j1,{className:"w-16"}):o.content&&`${Ln0(o.content)}`})]}),b.jsxs("div",{className:"invisible absolute right-3 top-8 z-[49] flex -translate-y-1/2 rounded-lg bg-white p-1 shadow-md group-hover/article:visible dark:bg-black",children:[k&&b.jsx(Ui,{actor:X,commentCount:i,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0}),b.jsx(Ib,{allowDelete:t,authoredByMe:I,followedByMe:N,layout:"inbox",trigger:v0,onCopyLink:m0,onDelete:Z,onFollow:h0,onUnfollow:d0})]})]})]}),_n0(o,O)]})}):b.jsx(b.Fragment,{})},NA=5*1024*1024,_A="Image must be less than 5MB in size.",aa0=async e=>{try{const t=await fetch(e,{mode:"cors"});if(!t.ok)throw new Error(`Failed to fetch image: ${t.status}`);const o=await t.blob();return new Promise((n,r)=>{const a=new FileReader;a.onload=()=>n(a.result),a.onerror=r,a.readAsDataURL(o)})}catch{return e}},sa0=e=>new Promise(t=>{const o=new Image;o.onload=()=>{URL.revokeObjectURL(o.src),t(o.width===o.height)},o.src=URL.createObjectURL(e)}),ia0="Image must be square.",A5=({children:e,replyTo:t,onReply:o,onReplyError:n,onOpenChange:r,...a})=>{const{data:i}=Ko0("index"),l=en0("index",i),z=Jo0("index",i),{data:u,isLoading:f}=b5("index","me"),[O,h]=p.useState(!1),q=p.useRef(null),g=p.useRef(null),[W,v]=p.useState(null),[y,k]=p.useState(!1),C=p.useRef(null),[L,x]=p.useState(""),[w,P]=p.useState(null),[H,o0]=p.useState(""),[Y,K]=p.useState(!1),[n0,J]=p.useState(!1),[i0,L0]=p.useState(!1),Z=qo(),m0=500;p.useEffect(()=>{a.open!==void 0&&h(a.open)},[a.open]),p.useEffect(()=>{if(a.open!==void 0?a.open:O){const S0=setTimeout(()=>{L0(!0)},300);return()=>clearTimeout(S0)}else L0(!1)},[O,a.open]);const $=!L.trim()||!i||n0||L.length>m0,X=p.useCallback(async()=>{const e0=L.trim();if(!(!e0||!i))try{J(!0),t?(await z.mutateAsync({inReplyTo:t.object.id,content:e0,imageUrl:w||void 0,altText:H||void 0}),o?.()):(await l.mutateAsync({content:e0,imageUrl:w||void 0,altText:H||void 0}),Z("/notes")),h(!1),r&&r(!1),Se.success(t?"Reply posted":"Note posted")}catch{t&&n?.()}finally{J(!1)}},[L,i,t,z,l,w,H,o,n,h,Z,r]),G=e0=>{x(e0.target.value)};p.useEffect(()=>{q.current&&(q.current.style.height="auto",q.current.style.height=`${q.current.scrollHeight}px`)},[L]),p.useEffect(()=>{if((a.open!==void 0?a.open:O)&&q.current){const S0=setTimeout(()=>{q.current?.focus()},100);return()=>clearTimeout(S0)}},[O,a.open]),p.useEffect(()=>{if(Y&&g.current){const e0=setTimeout(()=>{g.current?.focus()},100);return()=>clearTimeout(e0)}},[Y]),p.useEffect(()=>{const e0=T0=>{(T0.metaKey||T0.ctrlKey)&&T0.key==="Enter"&&(T0.preventDefault(),!$&&!y&&X())};if(a.open!==void 0?a.open:O)return document.addEventListener("keydown",e0),()=>document.removeEventListener("keydown",e0)},[O,a.open,$,y,X]);const N=p.useCallback(async e0=>{const S0=e0.clipboardData?.items;if(S0)for(let T0=0;T0<S0.length;T0++){const V0=S0[T0];if(V0.type.indexOf("image")!==-1){e0.preventDefault();const h1=V0.getAsFile();if(h1){if(h1.size>NA){Se.error(_A);return}const E=URL.createObjectURL(h1);v(E),await I(h1)}break}}},[]);p.useEffect(()=>{if(a.open!==void 0?a.open:O)return document.addEventListener("paste",N),()=>document.removeEventListener("paste",N)},[O,a.open,N]);const I=async e0=>{try{k(!0);const S0=await on0(e0);P(S0)}catch(S0){v(null);let T0="Failed to upload image. Try again.";if(S0&&typeof S0=="object"&&"statusCode"in S0)switch(S0.statusCode){case 413:T0="Image size exceeds limit.";break;case 415:T0="The file type is not supported.";break}Se.error(T0)}finally{k(!1)}},c0=async e0=>{const S0=e0.target.files;if(S0&&S0.length>0){const T0=S0[0];if(T0.size>NA){Se.error(_A),e0.target.value="";return}const V0=URL.createObjectURL(T0);v(V0),await I(T0)}},h0=e0=>{e0.stopPropagation(),v(null),P(null),o0(""),K(!1),W&&URL.revokeObjectURL(W),C.current&&(C.current.value="")},d0=e0=>{e0.stopPropagation(),K(!Y)},v0=()=>{q.current?.focus()};p.useEffect(()=>()=>{W&&URL.revokeObjectURL(W)},[W]);let u0="What's new?";if(t){const e0=t.object.attributedTo||{};typeof e0=="object"&&"preferredUsername"in e0&&"id"in e0&&(u0=`Reply to ${Jo(e0)}...`)}return b.jsxs(os,{open:a.open!==void 0?a.open:O,onOpenChange:e0=>{e0&&(x(""),v(null),P(null),o0(""),K(!1),W&&URL.revokeObjectURL(W),C.current&&(C.current.value="")),h(e0),r&&r(e0)},...a.open!==void 0?{}:a,children:[b.jsx(tm,{asChild:!0,children:e}),b.jsxs(pc,{className:"max-h-[80vh] min-h-[240px] gap-0 overflow-y-auto pb-0","data-testid":"new-note-modal",onClick:e0=>e0.stopPropagation(),children:[b.jsxs(V3,{className:"hidden",children:[b.jsx($3,{children:t?"Reply":"New note"}),b.jsx(nm,{children:"Post your thoughts to the Social web"})]}),t&&b.jsx(Bn0,{actor:t.actor,allowDelete:!1,commentCount:t.object.replyCount??0,isCompact:!0,layout:"reply",likeCount:t.object.likeCount??0,object:t.object,repostCount:t.object.repostCount??0,type:t.object.type==="Article"?"Article":"Note",onClick:()=>{}}),b.jsxs("div",{className:`flex ${W?"":"min-h-36"} cursor-text items-start gap-3`,onClick:v0,children:[b.jsx("div",{className:"sticky top-0",children:b.jsx(en,{author:i})}),b.jsx(XP,{asChild:!0,children:b.jsxs("div",{className:"-mt-0.5 flex w-full flex-col gap-0.5",children:[f?b.jsx(j1,{className:"w-10"}):b.jsx("span",{className:"min-w-0 truncate whitespace-nowrap font-semibold text-black break-anywhere dark:text-white",children:u?.name}),b.jsx(P6,{name:"content",asChild:!0,children:b.jsx(j6,{asChild:!0,children:b.jsx("textarea",{ref:q,autoFocus:!0,className:"ap-textarea w-full resize-none bg-transparent text-[1.5rem] break-anywhere","data-testid":"note-textarea",placeholder:u0,rows:1,value:L,onChange:G,onPaste:N})})}),b.jsx(P6,{name:"image",asChild:!0,children:b.jsx(j6,{asChild:!0,children:b.jsx("input",{ref:C,accept:"image/jpeg,image/png,image/webp,image/gif",className:"hidden",type:"file",onChange:c0})})})]})})]}),W&&b.jsxs("div",{className:"group relative mt-6 flex min-h-[200px] w-full items-center justify-center",children:[b.jsx("img",{alt:"Image attachment preview",className:`max-h-[320px] w-full rounded-sm object-cover outline outline-1 -outline-offset-1 outline-black/10 ${y&&"opacity-10"}`,src:W}),y&&b.jsx("div",{className:"absolute leading-[0]",children:b.jsx(Ip,{size:"md"})}),b.jsx(i1,{className:"absolute right-3 top-3 size-8 bg-black/60 text-white opacity-0 hover:bg-black/80 group-hover:opacity-100",onClick:h0,children:b.jsx(F9,{})}),!y&&b.jsx(i1,{className:`absolute bottom-3 left-3 h-6 px-2 py-0 text-white ${Y?"bg-green-500 hover:bg-green-500":"bg-black/60 hover:bg-black/80"}`,onClick:d0,children:"Alt"})]}),W&&!y&&Y&&b.jsx("div",{className:"mt-1",children:b.jsx(tM,{ref:g,className:"w-full border-0 bg-transparent px-0 focus-visible:border-0 focus-visible:bg-transparent focus-visible:shadow-none focus-visible:outline-0 dark:bg-[#101114] dark:text-white dark:placeholder:text-gray-800",placeholder:"Type alt text for image (optional)",type:"text",value:H,onChange:e0=>o0(e0.target.value)})}),b.jsxs(Q3,{className:`${i0?"sticky":"static"} bottom-0 flex-row bg-background py-6 dark:bg-[#101114]`,children:[b.jsx(i1,{className:"mr-auto w-[34px] !min-w-0",variant:"outline",onClick:()=>C.current?.click(),children:b.jsx(RZ,{})}),b.jsxs("div",{className:"flex items-center space-x-3",children:[b.jsxs("div",{className:`text-sm ${L.length>=m0?"text-red-500":L.length>=m0*.9?"text-yellow-600":"text-gray-500"}`,children:[L.length,"/",m0]}),b.jsx(i1,{className:"min-w-16","data-testid":"post-button",disabled:$||y,onClick:X,children:n0?b.jsx(Ip,{color:"light",size:"sm"}):"Post"})]})]})]})]})};function zu(e){if(!e)return{};try{return JSON.parse(e)}catch{return{}}}function En0(e,t){const o=zu(e);return JSON.stringify({...o,...t})}const NW=()=>{const{data:e}=ye(),{mutateAsync:t}=_g(),o=l0.useMemo(()=>e?.accessibility?zu(e.accessibility).apOnboarding||{}:{},[e?.accessibility]),n=l0.useCallback(async r=>{if(!e)return;const a=zu(e.accessibility),i=En0(e.accessibility,{apOnboarding:{...a.apOnboarding,...r}});await t({...e,accessibility:i})},[e,t]);return{isOnboarded:!!o.welcomeStepsFinished,isExplainerClosed:!!o.exploreExplainerClosed,setOnboarded:r=>n({welcomeStepsFinished:r}),setExplainerClosed:r=>n({exploreExplainerClosed:r})}},_W=()=>b.jsx("div",{className:"h-full pt-14",children:b.jsx(En,{})}),Sn0=Object.freeze(Object.defineProperty({__proto__:null,default:_W,useOnboardingStatus:NW},Symbol.toStringTag,{value:"Module"})),Tn0=()=>{const e=qo();function t(){e(`/notes/${encodeURIComponent("https://activitypub.ghost.org/.ghost/activitypub/note/6d6d7f57-b656-4caa-ba9e-efa1d9a4b3fb")}`)}return b.jsxs("div",{className:"z-20 w-full bg-white dark:bg-black",children:[b.jsxs("div",{className:"flex w-full flex-col gap-0.5 border-t border-gray-200 bg-white px-3 pt-6 dark:border-gray-950 dark:bg-black",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(BZ,{className:"text-purple-500",size:20,strokeWidth:1.5}),b.jsx(V2,{children:"Beta feedback"})]}),b.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-600",children:"Something not working? Let us know"}),b.jsx(i1,{className:"mt-2 dark:bg-gray-925/70 dark:hover:bg-gray-900",variant:"secondary",onClick:t,children:"Send feedback"})]}),b.jsxs("div",{className:"-mb-1 ml-3 flex items-center gap-1.5 pb-2 pt-4 text-xs text-gray-400",children:[b.jsx("a",{className:"text-xs font-medium text-gray-700 hover:text-black dark:text-gray-600 dark:hover:text-white",href:"https://ghost.org/help/social-web/",rel:"noreferrer",target:"_blank",children:"Help"}),"⋅",b.jsx("a",{className:"text-xs font-medium text-gray-700 hover:text-black dark:text-gray-600 dark:hover:text-white",href:"https://activitypub.ghost.org/archive",rel:"noreferrer",target:"_blank",children:"Updates"})]})]})},Zp=({children:e,url:t=null,onClick:o,"data-testid":n,isSelected:r=!1})=>{const a=l0.Children.toArray(e),i=b.jsx("div",{className:`relative flex w-full max-w-[620px] cursor-pointer flex-col before:absolute before:inset-x-[-16px] before:inset-y-[-1px] before:rounded-md before:bg-gray-50 before:transition-opacity hover:z-10 hover:cursor-pointer hover:border-b-transparent hover:before:opacity-100 dark:before:bg-gray-950 ${r?"z-10 before:opacity-100":"before:opacity-0"}`,"data-testid":n,onClick:()=>{!t&&o&&o()},children:b.jsxs("div",{className:"relative z-10 flex w-full items-center gap-3 py-3",children:[a[0],a[1],a[2]]})});return t?b.jsx("a",{href:t,rel:"noreferrer",target:"_blank",onClick:l=>{o&&(l.preventDefault(),o())},children:i}):i},Pn0=()=>{const e=qo(),{suggestedProfilesQuery:t}=z5("index",3),{data:o,isLoading:n}=t,r=n?Array(3).fill(null):o||[],{resetStack:a}=y3(),i="[@media(max-height:740px)]:hidden";return!n&&(!o||o.length===0)?null:b.jsxs("div",{className:`border-t border-gray-200 px-3 pt-6 dark:border-gray-950 ${i}`,children:[b.jsxs("div",{className:"mb-3 flex flex-col gap-0.5",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Tp,{className:"text-purple-500",size:20,strokeWidth:1.5}),b.jsx(V2,{children:"Follow suggestions"})]}),b.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-600",children:"Accounts you might be interested in"})]}),b.jsx("ul",{className:"grow",children:r.map((l,z)=>{const u=l?.id||`loading-${z}`,f=l?.name||"",O=l?.handle||"",h=l?.avatarUrl||"";let q;switch(z){case 0:q="[@media(max-height:740px)]:hidden";break;case 1:q="[@media(max-height:800px)]:hidden";break;case 2:q="[@media(max-height:860px)]:hidden";break}return b.jsx(p.Fragment,{children:b.jsx("li",{className:q,children:b.jsx(Zo,{actor:l,align:"center",isCurrentUser:!1,side:"left",children:b.jsx("div",{children:b.jsxs(Zp,{onClick:()=>{!n&&l&&Fo(l,e)},children:[n?b.jsx(j1,{className:"z-10 size-10"}):b.jsx(en,{author:{icon:{url:h},name:f,handle:O},showFollowButton:!0}),b.jsxs("div",{className:"flex min-w-0 flex-col",children:[b.jsx("span",{className:"block max-w-[190px] truncate font-semibold text-black dark:text-white",children:n?b.jsx(j1,{className:"w-24"}):f}),b.jsx("span",{className:"block max-w-[190px] truncate text-sm text-gray-700 dark:text-gray-600",children:n?b.jsx(j1,{className:"w-40"}):O})]})]})})})},u)},u)})}),b.jsx(i1,{className:"p-0 font-medium text-purple hover:text-black dark:hover:text-white",variant:"link",onClick:()=>{a(),e("/explore")},children:"Find more →"})]})},jn0=({profile:e,update:t,isLoading:o,onOpenChange:n})=>{const r=()=>{t(e.id,{followedByMe:!0})},a=()=>{t(e.id,{followedByMe:!1})},i=qo();return b.jsx(Zo,{actor:e,align:"center",isCurrentUser:!1,side:"left",children:b.jsx("div",{children:b.jsxs(Zp,{onClick:()=>{n?.(!1),i(`/profile/${e.handle}`)},children:[b.jsx(en,{author:{icon:{url:e.avatarUrl},name:e.name,handle:e.handle},onClick:()=>n?.(!1)}),b.jsxs("div",{className:"flex grow flex-col break-anywhere",children:[b.jsx("span",{className:"line-clamp-1 font-semibold text-black dark:text-white",children:o?b.jsx(j1,{className:"w-full max-w-64"}):e.name}),b.jsx("span",{className:"line-clamp-1 text-sm text-gray-700 dark:text-gray-600",children:o?b.jsx(j1,{className:"w-24"}):e.handle})]}),o?b.jsx("div",{className:"inline-flex items-center",children:b.jsx(j1,{className:"w-12"})}):b.jsx(O5,{className:"ml-auto",following:e.followedByMe,handle:e.handle,type:"secondary",onFollow:r,onUnfollow:a})]},e.id)})})},Xn0=({onOpenChange:e})=>{const{suggestedProfilesQuery:t,updateSuggestedProfile:o}=z5("index",5),{data:n=[],isLoading:r}=t;return!r&&(!n||n.length===0)?null:b.jsx("div",{className:"mb-[-15px] flex flex-col gap-3 pt-2",children:b.jsx("div",{className:"flex flex-col",children:(r?Array(5).fill(null):n||[]).map((a,i)=>b.jsx(l0.Fragment,{children:b.jsx(jn0,{isLoading:r,profile:a||{id:"",name:"",handle:"",avatarUrl:"",bio:"",followerCount:0,followingCount:0,followedByMe:!1},update:o,onOpenChange:e})},a?.id||`loading-${i}`))})})};function Dn0(e,t,o,n){var r=this,a=p.useRef(null),i=p.useRef(0),l=p.useRef(0),z=p.useRef(null),u=p.useRef([]),f=p.useRef(),O=p.useRef(),h=p.useRef(e),q=p.useRef(!0);h.current=e;var g=typeof window<"u",W=!t&&t!==0&&g;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var v=!!(o=o||{}).leading,y=!("trailing"in o)||!!o.trailing,k="maxWait"in o,C="debounceOnServer"in o&&!!o.debounceOnServer,L=k?Math.max(+o.maxWait||0,t):null;p.useEffect(function(){return q.current=!0,function(){q.current=!1}},[]);var x=p.useMemo(function(){var w=function(J){var i0=u.current,L0=f.current;return u.current=f.current=null,i.current=J,l.current=l.current||J,O.current=h.current.apply(L0,i0)},P=function(J,i0){W&&cancelAnimationFrame(z.current),z.current=W?requestAnimationFrame(J):setTimeout(J,i0)},H=function(J){if(!q.current)return!1;var i0=J-a.current;return!a.current||i0>=t||i0<0||k&&J-i.current>=L},o0=function(J){return z.current=null,y&&u.current?w(J):(u.current=f.current=null,O.current)},Y=function J(){var i0=Date.now();if(v&&l.current===i.current&&K(),H(i0))return o0(i0);if(q.current){var L0=t-(i0-a.current),Z=k?Math.min(L0,L-(i0-i.current)):L0;P(J,Z)}},K=function(){n&&n({})},n0=function(){if(g||C){var J=Date.now(),i0=H(J);if(u.current=[].slice.call(arguments),f.current=r,a.current=J,i0){if(!z.current&&q.current)return i.current=a.current,P(Y,t),v?w(a.current):O.current;if(k)return P(Y,t),w(a.current)}return z.current||P(Y,t),O.current}};return n0.cancel=function(){var J=z.current;J&&(W?cancelAnimationFrame(z.current):clearTimeout(z.current)),i.current=0,u.current=a.current=f.current=z.current=null,J&&n&&n({})},n0.isPending=function(){return!!z.current},n0.flush=function(){return z.current?o0(Date.now()):O.current},n0},[v,k,t,L,y,W,g,C,n]);return x}function In0(e,t){return e===t}function Fn0(e,t,o){var n=In0,r=p.useRef(e),a=p.useState({})[1],i=Dn0(p.useCallback(function(z){r.current=z,a({})},[a]),t,o,a),l=p.useRef(e);return n(l.current,e)||(i(e),l.current=e),[r.current,i]}const Qi=80,Hn0=({onOpenChange:e,query:t,setQuery:o})=>{const n=p.useRef(null),r=p.useRef([]),a=p.useRef(0),i=qo(),[l]=Fn0(t,300),z=t.length>=2,{searchQuery:u,updateAccountSearchResult:f}=Yo0("index",z?l:""),{data:O,isFetching:h,isFetched:q}=u,{suggestedProfilesQuery:g}=z5("index",5),{data:W,isLoading:v}=g,y=v||W&&W.length>0,{topicsQuery:k}=u5(),{data:C}=k,L=b5("index","me"),{data:x}=L,[w,P]=p.useState([]),[H,o0]=p.useState(null),[Y,K]=p.useState(0),n0=p.useMemo(()=>{const X=C?.topics||[];if(!z||X.length===0)return[];const G=t.toLowerCase();return X.filter(N=>N.slug==="following"?!1:N.name.toLowerCase().startsWith(G)||N.slug.toLowerCase().startsWith(G))},[t,z,C?.topics]),J=p.useMemo(()=>[...n0.map(X=>({type:"topic",data:X})),...w.map(X=>({type:"account",data:X}))],[n0,w]);p.useEffect(()=>{if(!z){P([]),o0(null);return}q&&(O?.accounts&&O.accounts.length>0?(P(O.accounts),o0("results"),K(0)):(P([]),o0("none"),K(0)))},[O?.accounts,q,z]);const i0=h&&z,L0=t.length<2||!H&&z&&n0.length===0,Z=!L0&&H==="none"&&n0.length===0,m0=!L0&&(w.length>0||n0.length>0);p.useEffect(()=>{n.current?.focus()},[]),p.useEffect(()=>{const X=r.current[Y];if(!X)return;const G=X.closest("[data-radix-scroll-area-viewport]")||X.closest(".overflow-y-auto");if(!G){X.scrollIntoView({block:"nearest"});return}const N=G.getBoundingClientRect(),I=X.getBoundingClientRect();I.top<N.top+Qi?G.scrollTo({top:G.scrollTop-(N.top+Qi-I.top),behavior:"smooth"}):I.bottom>N.bottom-Qi&&G.scrollTo({top:G.scrollTop+(I.bottom-N.bottom+Qi),behavior:"smooth"})},[Y]);const $=X=>{if(!(!m0||J.length===0)){if(X.key==="ArrowDown"||X.key==="ArrowUp"){X.preventDefault();const G=Date.now();if(G-a.current<50)return;a.current=G,X.key==="ArrowDown"?K(N=>(N+1)%J.length):K(N=>(N-1+J.length)%J.length)}else if(X.key==="Enter"){const G=J[Y];if(!G)return;X.preventDefault(),e?.(!1),G.type==="topic"?i(`/explore/${G.data.slug}`):i(`/profile/${G.data.handle}`)}}};return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:'sticky -top-6 z-30 -mt-6 flex h-[72px] shrink-0 items-center gap-2 bg-white pb-2 pt-3 before:pointer-events-none before:absolute before:-inset-x-6 before:bottom-0 before:h-0 before:border-b before:border-b-gray-150 before:content-[""] dark:bg-[#101114] dark:before:border-b-gray-950',children:[b.jsx(Sd,{className:"text-gray-600",size:18,strokeWidth:1.5}),b.jsx(tM,{ref:n,autoComplete:"off",className:"flex h-10 w-full items-center rounded-lg border-0 bg-transparent px-0 py-1.5 text-lg focus-visible:border-0 focus-visible:bg-transparent focus-visible:shadow-none focus-visible:outline-0 dark:bg-[#101114] dark:text-white dark:placeholder:text-gray-800",placeholder:"Search by name, handle, or URL...",title:"Search",type:"text",value:t,onChange:X=>o(X.target.value),onKeyDown:$}),i0&&b.jsx(Ip,{className:"!absolute right-0 mr-0.5 shrink-0",size:"sm"})]}),b.jsxs("div",{className:"h-full",children:[Z&&b.jsx("div",{className:"flex h-full items-center justify-center pb-14",children:b.jsxs(e00,{children:[b.jsx(t00,{children:b.jsx(Td,{})}),"No users matching this handle or account URL"]})}),m0&&b.jsx("div",{className:"mt-[-14px] pb-2",children:J.map((X,G)=>{const N=G===Y;if(X.type==="topic")return b.jsx("div",{ref:h0=>r.current[G]=h0,children:b.jsxs(Zp,{isSelected:N,onClick:()=>{e?.(!1),i(`/explore/${X.data.slug}`)},children:[b.jsx("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-full bg-gray-100 dark:bg-gray-900",children:b.jsx(Tp,{className:"text-gray-700 dark:text-gray-500",size:18,strokeWidth:1.5})}),b.jsxs("div",{className:"flex flex-col",children:[b.jsx("span",{className:"font-semibold text-black dark:text-white",children:X.data.name}),b.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-600",children:"Topic"})]})]})},X.data.slug);const I=X.data,c0=I.handle===x?.handle;return b.jsx(Zo,{actor:I,align:"center",isCurrentUser:c0,side:"left",children:b.jsx("div",{ref:h0=>r.current[G]=h0,children:b.jsxs(Zp,{isSelected:N,onClick:()=>{e?.(!1),i(`/profile/${I.handle}`)},children:[b.jsx(en,{author:{icon:{url:I.avatarUrl},name:I.name,handle:I.handle}}),b.jsxs("div",{className:"flex flex-col break-anywhere",children:[b.jsx("span",{className:"line-clamp-1 font-semibold text-black dark:text-white",children:I.name}),b.jsx("span",{className:"line-clamp-1 text-sm text-gray-700 dark:text-gray-600",children:I.handle})]}),I.blockedByMe||I.domainBlockedByMe?b.jsx(i1,{className:"pointer-events-none ml-auto min-w-[90px]",variant:"destructive",children:"Blocked"}):c0?null:b.jsx(O5,{className:"ml-auto",following:I.followedByMe,handle:I.handle,type:"secondary",onFollow:()=>f(I.id,{followedByMe:!0}),onUnfollow:()=>f(I.id,{followedByMe:!1})})]})})},I.id)})}),L0&&y&&b.jsxs(b.Fragment,{children:[b.jsx(V2,{children:"More people to follow"}),b.jsx(Xn0,{onOpenChange:e})]})]})]})},Un0=()=>b.jsxs("div",{className:"inline-flex h-9 w-full items-center justify-start gap-2 rounded-full bg-gray-100 px-3 text-md font-normal text-gray-600 hover:bg-gray-200 hover:text-gray-600 dark:bg-gray-925/70 dark:text-gray-700 dark:hover:bg-gray-925 [&_svg]:size-[18px]",children:[b.jsx(Sd,{size:18,strokeWidth:1.5})," Search the social web"]}),xn=p.forwardRef(({to:e,children:t,count:o,...n},r)=>{const a=Pe(),{resetStack:i}=y3(),l=hM(),z=e&&e.startsWith("/")?`${l}${e}`:e,u=z&&(a.pathname===z||a.pathname.startsWith(`${z}/`)),f=R0("justify-start text-md font-medium text-gray-800 dark:hover:bg-gray-925/70 dark:text-gray-500 h-9 [&_svg]:size-[18px]",u&&"bg-gray-100 dark:bg-gray-925/70 dark:text-white text-black font-semibold"),O=o&&o>0?b.jsx("span",{className:R0("ml-auto bg-purple-500 text-white text-xs font-semibold py-1 px-1.5 rounded-full min-w-[20px] h-5 flex items-center justify-center"),children:I3(o)}):null;return z?b.jsx(i1,{className:f,variant:"ghost",asChild:!0,children:b.jsxs($a,{to:z,onClick:()=>{i(),L00(z)},children:[t,O]})}):b.jsxs(i1,{ref:r,className:f,variant:"ghost",onClick:n.onClick,...n,children:[t,O]})});xn.displayName="SidebarMenuLink";const BW=({isMobileSidebarOpen:e})=>{const{allFlags:t,flags:o}=jo0(),[n,r]=p.useState(!1),[a,i]=p.useState(""),{data:l}=ye(),z=Pe(),u=hM(),{data:f}=yW(l?.slug||""),O=nn0(l?.slug||""),{topicsQuery:h}=u5(),{data:q,isLoading:g}=h,W=!g&&q&&q.topics.length===0;p.useEffect(()=>{z.pathname===`${u}/notifications`&&f&&f>0&&O.mutate()},[z.pathname,u,f,O]);const v=p.useCallback(()=>{f&&f>0&&O.mutate()},[f,O]);return b.jsx("div",{className:`sticky top-0 flex min-h-screen w-[320px] flex-col border-l border-gray-200 pr-8 transition-transform duration-300 ease-in-out max-lg:fixed max-lg:inset-y-0 max-lg:right-0 max-lg:z-50 max-lg:border-0 max-lg:bg-white max-lg:shadow-xl max-md:bottom-[72px] max-md:min-h-[auto] max-md:overflow-y-scroll dark:border-gray-950 max-lg:dark:bg-black ${e?"max-lg:translate-x-0":"max-lg:translate-x-full"}`,children:b.jsxs("div",{className:"flex grow flex-col justify-between",children:[b.jsxs("div",{className:"isolate flex w-full flex-col items-start gap-6 pl-6 pt-6",children:[b.jsx("div",{className:"flex h-[52px] w-full items-center",children:b.jsxs(os,{open:n,onOpenChange:r,children:[b.jsx(tm,{className:"mt-0.5 w-full",children:b.jsx(Un0,{})}),b.jsx(pc,{className:"flex h-full max-h-[452px] flex-col overflow-y-auto pb-0",children:b.jsx(Hn0,{query:a,setQuery:i,onOpenChange:r})})]})}),b.jsxs("div",{className:"flex w-full flex-col gap-px",children:[b.jsxs(xn,{to:"/reader",children:[b.jsx(VG,{size:18,strokeWidth:1.5}),"Reader"]}),b.jsxs(xn,{to:"/notes",children:[b.jsx(Ed,{size:18,strokeWidth:1.5}),"Notes"]}),b.jsxs(xn,{count:z.pathname!==`${u}/notifications`?f:void 0,to:"/notifications",onClick:v,children:[b.jsx(HG,{size:18,strokeWidth:1.5}),"Notifications"]}),W?b.jsx(i1,{className:"inline-flex w-full items-center gap-2 rounded-sm px-3 py-2.5 text-left text-md font-medium text-gray-800 transition-colors hover:bg-gray-100 dark:text-gray-500 dark:hover:bg-gray-925/70",variant:"ghost",asChild:!0,children:b.jsxs("a",{href:"https://explore.ghost.org/social-web",rel:"noopener noreferrer",target:"_blank",children:[b.jsx(Tp,{size:18,strokeWidth:1.5}),"Explore",b.jsx(Bd,{className:"ml-auto",size:14,strokeWidth:1.5})]})}):b.jsxs(xn,{to:"/explore",children:[b.jsx(Tp,{size:18,strokeWidth:1.5}),"Explore"]}),b.jsxs(xn,{to:"/profile",children:[b.jsx(Pd,{size:18,strokeWidth:1.5}),"Profile"]}),b.jsxs(xn,{to:"/preferences",children:[b.jsx(ZZ,{size:18,strokeWidth:1.5}),"Preferences"]})]}),b.jsx(A5,{children:b.jsxs(i1,{className:"h-9 rounded-full bg-purple-500 px-3 text-md text-white hover:bg-purple-600 dark:hover:bg-purple-600",children:[b.jsx(uZ,{}),"New note"]})}),b.jsx(Pn0,{}),t.map(y=>o[y]?b.jsxs("div",{className:"flex items-center justify-between gap-1 pl-3 opacity-50",children:[b.jsx("span",{className:"font-mono text-xs",children:y}),b.jsx("span",{className:"text-green-800 inline-flex items-center rounded bg-green-100 px-1 py-0.5 text-xs font-medium",children:"ON"})]},y):b.jsx(b.Fragment,{}))]}),b.jsx("div",{className:"sticky bottom-0 flex items-center gap-2 bg-white pb-4 pl-4 dark:bg-black",children:b.jsx(Tn0,{})})]})})};BW.displayName="Sidebar";const Vn0=({children:e,...t})=>{const{isOnboarded:o}=NW(),n=hM(),{data:r,isLoading:a}=ye(),i=p.useRef(null),[l,z]=p.useState(!1),u=mW(),{topicsQuery:f}=u5(),{data:O}=f,h=O&&O.topics.length>0,{isNewNoteModalOpen:q,setIsNewNoteModalOpen:g}=CW(),W=()=>{z(!l)},v=()=>{z(!1)};return a||!r?null:o?b.jsxs("div",{ref:i,className:`h-screen w-full ${o&&"overflow-y-auto"}`,"data-scrollable-container":!0,children:[b.jsx(x00,{containerRef:i}),b.jsx("div",{className:"relative mx-auto flex max-w-page flex-col",...t,children:o?b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"block grid-cols-[auto_320px] items-start lg:grid",children:[b.jsxs("div",{className:"z-0 min-w-0",children:[b.jsx(Io0,{showBorder:!(u==="reader"&&h)&&u!=="explore",onToggleMobileSidebar:W}),b.jsx("div",{className:"px-[min(4vw,32px)]",children:e})]}),b.jsx(BW,{isMobileSidebarOpen:l,onCloseMobileSidebar:v})]}),l&&b.jsx("div",{className:"fixed inset-0 z-40 lg:hidden",onClick:v})]}):b.jsx(_W,{})}),b.jsx(A5,{open:q,onOpenChange:g})]}):b.jsx(ro,{to:`${n}/welcome`,replace:!0})},ia=({children:e})=>b.jsx("div",{className:"flex max-h-12 max-w-12 grow-0 items-center justify-center rounded-full bg-gray-100 p-3 text-gray-700 dark:bg-gray-925/70 [&_svg]:size-8 [&_svg]:stroke-1",children:e}),pa=({children:e,className:t})=>b.jsx("div",{className:`mx-auto mt-[24vh] flex max-w-[500px] flex-col items-center gap-5 text-center text-gray-700 ${t||""}`,children:e}),EW=({statusCode:e,errorCode:t})=>{const o=Qq(),n=yg(),r=a=>{a.preventDefault(),n("/analytics/",{crossApp:!0})};return o?b.jsx(Vn0,{children:b.jsxs(pa,{children:[b.jsx(ia,{children:b.jsx(QZ,{})}),b.jsx(V2,{className:"-mb-4",children:"Oops, page not found!"}),b.jsx("div",{children:"We couldn't find the page you were looking for. It may have been moved, deleted, or never existed in the first place."})]})}):e===429?b.jsxs(pa,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(ia,{children:b.jsx(U9,{})}),b.jsx(V2,{className:"-mb-4",children:"Rate limit exceeded"}),b.jsx("div",{children:"You've made too many requests. Please try again in a moment."}),b.jsx(i1,{asChild:!0,children:b.jsx("a",{href:"https://ghost.org/help/social-web/",rel:"noopener noreferrer",target:"_blank",children:"Learn more →"})})]}):e===403?t==="ROLE_MISSING"||t==="SITE_MISSING"?b.jsxs(pa,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(ia,{children:b.jsx(D9,{})}),b.jsx(V2,{className:"-mb-4",children:"Site not configured correctly"}),b.jsx("div",{children:"This feature can't be used because the site isn't set up correctly. If you manage this site, check your settings or server logs, or contact support."}),b.jsx(i1,{asChild:!0,children:b.jsx("a",{href:"https://ghost.org/help/social-web/",rel:"noopener noreferrer",target:"_blank",children:"Learn more →"})})]}):b.jsxs(pa,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(ia,{children:b.jsx(IG,{})}),b.jsx(V2,{className:"-mb-4",children:"Account suspended"}),b.jsx("div",{children:"Your account has been suspended due to policy violations."}),b.jsx(i1,{asChild:!0,children:b.jsx("a",{href:"https://ghost.org/help/social-web/",rel:"noopener noreferrer",target:"_blank",children:"Learn more →"})})]}):e===410&&t==="INVALID_VERSION"?b.jsxs(pa,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(ia,{children:b.jsx(iZ,{})}),b.jsx(V2,{className:"-mb-4",children:"New version available"}),b.jsx("div",{children:"We've made some updates! Refresh your page to see what's new"}),b.jsx(i1,{asChild:!0,children:b.jsx("button",{type:"button",onClick:()=>window.location.reload(),children:"Refresh your page"})})]}):b.jsx("div",{className:"admin-x-container-error",children:b.jsxs("div",{className:"admin-x-error max-w-xl",children:[b.jsx("h1",{children:"Loading interrupted"}),b.jsx("p",{children:"They say life is a series of trials and tribulations. This moment right here? It's a tribulation. Our app was supposed to load, and yet here we are. Loadless. Click back to the dashboard to try again."}),b.jsx("a",{className:"cursor-pointer text-green",onClick:r,children:"← Back to the homepage"})]})})},Qn0=Object.freeze(Object.defineProperty({__proto__:null,default:EW},Symbol.toStringTag,{value:"Module"})),$n0="activitypub",SW=[{path:$n0,element:b.jsx(En,{}),errorElement:b.jsx(EW,{}),handle:"activitypub-basepath",children:[{index:!0,element:b.jsx(ro,{to:"reader"})},{path:"inbox",element:b.jsx(ro,{to:"../reader",replace:!0})},{path:"feed",element:b.jsx(ro,{to:"../notes",replace:!0})},{path:"reader",lazy:w1(()=>m1(()=>import("./index-9bj69FKq.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),pageTitle:"Reader"},{path:"reader/:postId",lazy:w1(()=>m1(()=>import("./index-9bj69FKq.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),pageTitle:"Reader"},{path:"notes",lazy:w1(()=>m1(()=>import("./feed-lCu_EJ0a.js"),__vite__mapDeps([7,8]),import.meta.url)),pageTitle:"Notes"},{path:"notes/:postId",lazy:w1(()=>m1(()=>import("./note-9ysQWJz6.js"),__vite__mapDeps([9,2,3,8]),import.meta.url)),pageTitle:"Note"},{path:"notifications",lazy:w1(()=>m1(()=>import("./index-BcOzgmTC.js"),__vite__mapDeps([10,11,12,13]),import.meta.url)),pageTitle:"Notifications"},{path:"explore",lazy:w1(()=>m1(()=>import("./index-CqvBC0jL.js"),__vite__mapDeps([14,4,15]),import.meta.url)),pageTitle:"Explore"},{path:"explore/:topic",lazy:w1(()=>m1(()=>import("./index-CqvBC0jL.js"),__vite__mapDeps([14,4,15]),import.meta.url)),pageTitle:"Explore"},{path:"profile",lazy:w1(()=>m1(()=>import("./index-BxVUX0dN.js"),__vite__mapDeps([16,17,18,19,11,20,21,22,23,24,25,26,27,28,29,8,6,30,1,31,12,32,13,15,3,33]),import.meta.url)),pageTitle:"Profile"},{path:"profile/likes",lazy:w1(()=>m1(()=>import("./index-BxVUX0dN.js"),__vite__mapDeps([16,17,18,19,11,20,21,22,23,24,25,26,27,28,29,8,6,30,1,31,12,32,13,15,3,33]),import.meta.url)),pageTitle:"Profile"},{path:"profile/following",lazy:w1(()=>m1(()=>import("./index-BxVUX0dN.js"),__vite__mapDeps([16,17,18,19,11,20,21,22,23,24,25,26,27,28,29,8,6,30,1,31,12,32,13,15,3,33]),import.meta.url)),pageTitle:"Profile"},{path:"profile/followers",lazy:w1(()=>m1(()=>import("./index-BxVUX0dN.js"),__vite__mapDeps([16,17,18,19,11,20,21,22,23,24,25,26,27,28,29,8,6,30,1,31,12,32,13,15,3,33]),import.meta.url)),pageTitle:"Profile"},{path:"profile/:handle/:tab?",lazy:w1(()=>m1(()=>import("./index-BxVUX0dN.js"),__vite__mapDeps([16,17,18,19,11,20,21,22,23,24,25,26,27,28,29,8,6,30,1,31,12,32,13,15,3,33]),import.meta.url)),pageTitle:"Profile"},{path:"preferences",lazy:w1(()=>m1(()=>import("./index-jHIJgh6L.js"),__vite__mapDeps([34,35,31,29,33,18,19,11]),import.meta.url)),pageTitle:"Preferences"},{path:"preferences/moderation",lazy:w1(()=>m1(()=>import("./moderation-DEHUqi1e.js"),__vite__mapDeps([36,20,21,22,23,24,25,26,11,27,28,29,8,6,30,1,17,31,12,32,13,15,3]),import.meta.url)),pageTitle:"Moderation",showBackButton:!0},{path:"preferences/bluesky-sharing",lazy:w1(()=>m1(()=>import("./bluesky-sharing-Dj4VOEDi.js"),__vite__mapDeps([37,18,19,11,29]),import.meta.url)),showBackButton:!0},{path:"welcome",lazy:w1(()=>m1(()=>Promise.resolve().then(()=>Sn0),void 0,import.meta.url)),pageTitle:"Welcome",children:[{path:"",element:b.jsx(ro,{to:"1",replace:!0})},{path:"1",lazy:w1(()=>m1(()=>import("./step-1-BcaR_MDC.js"),__vite__mapDeps([38,29]),import.meta.url))},{path:"2",lazy:w1(()=>m1(()=>import("./step-2-BR0jqEO_.js"),__vite__mapDeps([39,40,13,32]),import.meta.url))},{path:"3",lazy:w1(()=>m1(()=>import("./step-3-CMPME0ky.js"),__vite__mapDeps([41,40,13,32,23,6,8]),import.meta.url))},{path:"*",element:b.jsx(ro,{to:"1",replace:!0})}]},{path:"*",lazy:w1(()=>m1(()=>Promise.resolve().then(()=>Qn0),void 0,import.meta.url))}]}];function Gn0(){return b.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M3.6349 20.3723C3.80192 20.5393 4.00019 20.6718 4.21841 20.7622C4.43663 20.8525 4.67052 20.8991 4.90672 20.8991C5.14291 20.8991 5.3768 20.8525 5.59502 20.7622C5.81324 20.6718 6.01152 20.5393 6.17853 20.3723C6.34555 20.2052 6.47804 20.007 6.56843 19.7888C6.65882 19.5705 6.70534 19.3366 6.70534 19.1004C6.70534 18.8643 6.65882 18.6304 6.56843 18.4121C6.47804 18.1939 6.34555 17.9956 6.17853 17.8286C5.84123 17.4913 5.38374 17.3018 4.90672 17.3018C4.42969 17.3018 3.9722 17.4913 3.6349 17.8286C3.29759 18.1659 3.10809 18.6234 3.10809 19.1004C3.10809 19.5775 3.29759 20.035 3.6349 20.3723ZM17.7153 6.17951C17.8823 6.34653 18.0806 6.47901 18.2988 6.5694C18.517 6.65979 18.7509 6.70632 18.9871 6.70632C19.2233 6.70632 19.4572 6.65979 19.6754 6.5694C19.8936 6.47901 20.0919 6.34653 20.2589 6.17951C20.4259 6.01249 20.5584 5.81421 20.6488 5.596C20.7392 5.37778 20.7857 5.14389 20.7857 4.90769C20.7857 4.67149 20.7392 4.43761 20.6488 4.21939C20.5584 4.00117 20.4259 3.80289 20.2589 3.63587C19.9216 3.29857 19.4641 3.10907 18.9871 3.10907C18.5101 3.10907 18.0526 3.29857 17.7153 3.63587C17.378 3.97318 17.1885 4.43067 17.1885 4.90769C17.1885 5.38472 17.378 5.8422 17.7153 6.17951ZM7.50655 12.0023C7.50655 13.1946 7.98019 14.3381 8.82329 15.1812C9.66639 16.0243 10.8099 16.4979 12.0022 16.4979C13.1945 16.4979 14.338 16.0243 15.1811 15.1812C16.0242 14.3381 16.4978 13.1946 16.4978 12.0023C16.4978 10.81 16.0242 9.66647 15.1811 8.82337C14.338 7.98027 13.1945 7.50663 12.0022 7.50663C10.8099 7.50663 9.66639 7.98027 8.82329 8.82337C7.98019 9.66647 7.50655 10.81 7.50655 12.0023Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),b.jsx("path",{d:"M8.79319 21.5246C10.5669 22.1224 12.4724 22.2127 14.2947 21.7854C16.1171 21.3581 17.7838 20.4302 19.1069 19.1062C20.4302 17.7827 21.3577 16.116 21.7848 14.2937C22.2119 12.4715 22.1217 10.5662 21.5243 8.79251M2.47582 15.2081C1.87829 13.4342 1.78805 11.5287 2.21527 9.70622C2.64249 7.88378 3.57019 6.21687 4.89383 4.89332C6.21747 3.56977 7.88445 2.64219 9.70692 2.21511C11.5294 1.78802 13.4349 1.87839 15.2088 2.47605",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Kp({path:e,activeOnSubpath:t=!1}){const o=t&&e?`${e}/*`:e;return RF(o||"")!==null}function Z0({children:e,...t}){return b.jsx(Yd,{...t,children:e})}function Zn0({to:e,target:t,rel:o,activeOnSubpath:n=!1,isActive:r,children:a,...i}){const l=`#/${e?.replace(/^\/?#\//,"")}`,z=Kp({path:e,activeOnSubpath:n}),u=r!==void 0?r:z,{isMobile:f,setOpenMobile:O}=Jn(),h=()=>{f&&O(!1)};return b.jsx(nM,{asChild:!0,isActive:u,...i,children:b.jsx("a",{href:t==="_blank"?e:l,rel:t==="_blank"?o??"noopener noreferrer":o,target:t,"aria-current":u?"page":void 0,onClick:h,children:a})})}function Kn0({children:e,...t}){return b.jsx("span",{...t,children:e})}function Yn0({onClick:e,children:t,...o}){const{isMobile:n,setOpenMobile:r}=Jn(),a=()=>{n&&r(!1),e?.()};return b.jsx(nM,{onClick:a,...o,children:t})}Z0.Link=Zn0;Z0.Label=Kn0;Z0.Button=Yn0;function Jn0({...e}){const{data:t}=ye(),{data:o}=AM(),n=oo(o?.settings,"social_web_enabled")??!1,a=aM().data?.site.url,{data:i=0}=yW(t?.slug||"",n),l=Kp({path:"network",activeOnSubpath:!0}),z=Kp({path:"activitypub",activeOnSubpath:!0}),u=i>0&&!l&&!z;return!t||!Y00(t)?null:b.jsx(Mc,{...e,children:b.jsx(cs,{children:b.jsxs(lc,{children:[b.jsx(Z0,{children:b.jsxs(Z0.Link,{to:"analytics",activeOnSubpath:!0,children:[b.jsx(H9,{}),b.jsx(Z0.Label,{children:"Analytics"})]})}),n&&b.jsxs(Z0,{children:[b.jsxs(Z0.Link,{to:"network",isActive:l||z,children:[b.jsx(Gn0,{}),b.jsx(Z0.Label,{children:"Network"})]}),u&&b.jsx(Jd,{children:i})]}),b.jsxs(Z0,{className:"relative group/viewsite",children:[b.jsxs(Z0.Link,{to:"site",children:[b.jsx(PG,{}),b.jsx(Z0.Label,{children:"View site"})]}),b.jsx("a",{href:a,target:"_blank","aria-label":"View site in new tab",rel:"noopener noreferrer",className:"absolute opacity-0 group-hover/viewsite:opacity-100 right-0 top-0 size-8 hover:bg-sidebar-accent flex items-center justify-center rounded-full text-gray-700 hover:text-sidebar-accent-foreground transition-all",children:b.jsx(Bd,{size:16})})]})]})})})}function er0({isExpanded:e,children:t,id:o}){return b.jsx("div",{id:o,className:`grid transition-all duration-200 ease-out ${e?"grid-rows-[1fr] mb-5":"grid-rows-[0fr] mb-0"}`,children:b.jsx("div",{className:"overflow-hidden",children:t})})}const bs="MembersResponseType",tr0=Xt({dataType:bs,path:"/members/"}),pa0=vq({dataType:bs,path:e=>`/members/${e}/`}),Ma0=Ve({method:"POST",path:({id:e})=>`/members/${e}/commenting/disable`,body:({reason:e,hideComments:t})=>({reason:e,hide_comments:t}),invalidateQueries:{dataType:"CommentsResponseType"}}),la0=Ve({method:"POST",path:({id:e})=>`/members/${e}/commenting/enable`,body:()=>({}),invalidateQueries:{dataType:"CommentsResponseType"}}),ba0=Wq({dataType:bs,path:"/members/",defaultSearchParams:{include:"labels,tiers",limit:"50",order:"created_at desc"},defaultNextPageParams:(e,t)=>{var o;if((o=e.meta)!=null&&o.pagination.next)return{...t,page:e.meta.pagination.next.toString()}},returnData:e=>{const{pages:t}=e,o=t.flatMap(r=>r.members),n=t[t.length-1].meta;return{members:o,meta:n,isEnd:n?n.pagination.pages===n.pagination.page:!0}}}),za0=Ve({method:"PUT",path:()=>"/members/bulk/",body:({action:e})=>({bulk:{action:e.type,meta:e.meta||{},newsletter:e.newsletter}}),searchParams:({filter:e,all:t})=>{if(!t&&!e)throw new Error("Bulk edit requires either a filter or all flag");const o={};return t?o.all="true":o.filter=e,o},invalidateQueries:{dataType:bs}}),ua0=Ve({method:"DELETE",path:()=>"/members/",searchParams:({filter:e,all:t})=>{if(!t&&!e)throw new Error("Bulk delete requires either a filter or all flag");const o={};return t?o.all="true":o.filter=e,o},invalidateQueries:{dataType:bs}});function or0(){const{data:e}=tr0({searchParams:{limit:"1"}});return e?.meta?.pagination.total}const nr0=()=>OM({select:e=>e.navigation}),rr0=()=>{const{mutateAsync:e}=fM();return Me({mutationFn:async t=>{await e({navigation:t})}})},cr0=e=>{const{data:t}=nr0(),{mutateAsync:o}=rr0();return[t?.expanded[e]??!0,async a=>o({expanded:{[e]:a}})]},ar0=Qp({name:L2(),route:L2(),color:L2(),icon:L2().optional(),filter:Vt0(L2(),L2().nullable())}),sr0=c5(ar0);function ir0(e){return{midgrey:"#7C8B9A",blue:"#14b8ff",green:"#30cf43",red:"#f50b23",teal:"#4dcddc",purple:"#8e42ff",yellow:"#ffb41f",orange:"#fe8b05",pink:"#fb2d8d"}[e]||"#7C8B9A"}function pr0({route:e="posts"}){const{data:t}=AM(),o=Ng(),n=p.useMemo(()=>{const r=oo(t?.settings,"shared_views")??"[]";try{const a=JSON.parse(r),i=sr0.safeParse(a);return i.success?i.data.filter(l=>l.route===e):(console.error("Failed to validate shared_views setting:",i.error),[])}catch(a){return console.error("Failed to parse shared_views setting:",a),[]}},[t,e]);return n.length===0?null:b.jsx(b.Fragment,{children:n.map(r=>{const a=o.getRouteUrl(e,r.filter),i=o.isRouteActive(e,r.filter);return b.jsx(Z0,{children:b.jsxs(Z0.Link,{className:"pl-9",to:a,isActive:i,children:[b.jsx(Z0.Label,{className:"grow",children:r.name}),b.jsx("span",{className:"size-2 rounded-full shrink-0 mx-0.5",style:{backgroundColor:ir0(r.color)},"data-color":r.color,"aria-hidden":"true"})]})},a)})})}const Yp=e=>{const{data:t}=as();return t?.config.labs?.[e]??!1};function Mr0({...e}){const{data:t}=ye(),[o,n]=cr0("posts"),r=or0(),a=Ng(),i=Yp("commentModeration"),l=Yp("membersForward"),z=t&&K00(t),u=t&&Z00(t);return b.jsx(Mc,{...e,children:b.jsx(cs,{children:b.jsxs(lc,{children:[b.jsxs(Z0,{children:[b.jsx(i1,{"aria-controls":"posts-submenu","aria-expanded":o,"aria-label":"Toggle post views",variant:"ghost",size:"icon",className:"!h-[34px] absolute sidebar:opacity-0 group-hover/menu-item:opacity-100 focus-visible:opacity-100 transition-all left-3 top-0 p-0 h-9 w-auto text-sidebar-accent-foreground hover:text-gray-black hover:bg-transparent",onClick:()=>void n(!o),children:b.jsx(F3,{size:16,className:`transition-all ${o&&"rotate-[90deg]"}`})}),b.jsxs(Z0.Link,{to:a.getRouteUrl("posts"),isActive:a.isRouteActive("posts"),children:[b.jsx(P9,{className:"opacity-0 sidebar:opacity-100 sidebar:group-hover/menu-item:opacity-0 pointer-events-none transition-all"}),b.jsx(Z0.Label,{children:"Posts"})]}),b.jsx("a",{href:"#/editor/post","aria-label":"Create new post",className:"flex items-center justify-center absolute hover:bg-sidebar-accent transition-all rounded-full right-0 top-0 p-0 size-8 text-gray-700 hover:text-sidebar-accent-foreground",children:b.jsx(j9,{size:20,className:"!stroke-[1.5px] mt-px"})})]}),b.jsxs(er0,{isExpanded:o,id:"posts-submenu",children:[b.jsx(Z0,{children:b.jsx(Z0.Link,{className:"pl-9",to:"posts?type=draft",isActive:a.isRouteActive("posts",{type:"draft"}),children:b.jsx(Z0.Label,{children:"Drafts"})})}),b.jsx(Z0,{children:b.jsx(Z0.Link,{className:"pl-9",to:"posts?type=scheduled",isActive:a.isRouteActive("posts",{type:"scheduled"}),children:b.jsx(Z0.Label,{children:"Scheduled"})})}),b.jsx(Z0,{children:b.jsx(Z0.Link,{className:"pl-9",to:"posts?type=published",isActive:a.isRouteActive("posts",{type:"published"}),children:b.jsx(Z0.Label,{children:"Published"})})}),b.jsx(pr0,{})]}),b.jsx(Z0,{children:b.jsxs(Z0.Link,{to:a.getRouteUrl("pages"),isActive:a.isRouteActive("pages"),children:[b.jsx(AZ,{}),b.jsx(Z0.Label,{children:"Pages"})]})}),z&&b.jsx(Z0,{children:b.jsxs(Z0.Link,{to:"tags",isActive:a.isRouteActive(["tags","tag","tag.new"]),children:[b.jsx(eK,{}),b.jsx(Z0.Label,{children:"Tags"})]})}),u&&b.jsxs(Z0,{children:[b.jsxs(Z0.Link,{to:l?"members-forward":a.getRouteUrl("members"),isActive:a.isRouteActive(["members","member","member.new"]),children:[b.jsx(V9,{}),b.jsx(Z0.Label,{children:"Members"})]}),r!=null&&b.jsx(Jd,{children:I3(r)})]}),u&&i&&b.jsx(Z0,{children:b.jsxs(Z0.Link,{to:"comments",activeOnSubpath:!0,children:[b.jsx(SZ,{}),b.jsx(Z0.Label,{children:"Comments"})]})})]})})})}const BA=function(){let t,o;return{promise:new Promise((r,a)=>{t=r,o=a}),resolve:t,reject:o}},Zb="https://do.featurebase.app/js/sdk.js";let za=null;function lr0(){return za||(za=new Promise((e,t)=>{if(document.querySelector(`script[src="${Zb}"]`)){e();return}const n=document.createElement("script");n.src=Zb,n.onload=()=>e(),n.onerror=r=>{n.remove(),za=null;const a=new Error(`[Featurebase] Failed to load SDK from ${Zb}`,{cause:r});console.error(a),t(a)},document.head.appendChild(n)})),za}function br0(){const{data:e}=as(),{data:t}=OM(),o=Yp("featurebaseFeedback"),[n,r]=p.useState(!1),{organization:a,enabled:i}=e?.config.featurebase??{},l=!!(o&&i),z=t?.nightShift?"dark":"light",{data:u}=E00({enabled:l&&n}),f=u?.featurebase?.token;p.useEffect(()=>{n&&lr0().catch(g=>{console.error("[Featurebase] Failed to load SDK:",g)})},[n]);const O=p.useRef(BA());p.useEffect(()=>{!n||!a||!f||za?.then(()=>{window.Featurebase?.("initialize_feedback_widget",{organization:a,theme:z,featurebaseJwt:f},g=>{g?(console.error("[Featurebase] Failed to initialize widget:",g),O.current.reject(g),O.current=BA(),r(!1)):O.current.resolve()})})},[a,z,f,n]);const h=p.useCallback(()=>{l&&r(!0)},[l]);return{openFeedbackWidget:p.useCallback(g=>{l&&(r(!0),O.current.promise.then(()=>{window.postMessage({target:"FeaturebaseWidget",data:{action:"openFeedbackWidget",...g?.board&&{setBoard:g.board}}},"*")}))},[l]),preloadFeedbackWidget:h}}function zr0({...e}){const{data:t}=ye(),{data:o}=as(),n=Yp("featurebaseFeedback"),{openFeedbackWidget:r,preloadFeedbackWidget:a}=br0();if(!t)return null;const l=o?.config.hostSettings?.billing?.enabled&&is(t),z=n&&!ps(t)&&o?.config.featurebase?.enabled;return!l&&!z?null:b.jsx(Mc,{...e,children:b.jsx(cs,{children:b.jsxs(lc,{children:[l&&b.jsx(Z0,{children:b.jsxs(Z0.Link,{to:"pro",children:[b.jsx(MZ,{}),b.jsx(Z0.Label,{children:"Ghost(Pro)"})]})}),z&&b.jsx(Z0,{children:b.jsxs(Z0.Button,{onClick:r,onMouseEnter:a,onFocus:a,children:[b.jsx(Ed,{}),b.jsx(Z0.Label,{children:"Feedback"})]})})]})})})}function ur0({...e}){const{data:t}=ye(),o=t&&G00(t);return b.jsx(Mc,{...e,children:b.jsx(cs,{children:b.jsxs(lc,{children:[o&&b.jsx(Z0,{children:b.jsxs(Z0.Link,{to:"settings",children:[b.jsx(D9,{}),b.jsx(Z0.Label,{children:"Settings"})]})}),b.jsx(Z0,{children:b.jsxs(Z0.Link,{to:"https://ghost.org/help?utm_source=admin&utm_campaign=help",target:"_blank",rel:"noopener noreferrer",children:[b.jsx(rZ,{}),b.jsx(Z0.Label,{children:"Help"})]})})]})})})}function dr0(){const{banner:e,bannerType:t}=i5();let o="";return t==="theme-errors"?o="pb-[110px]":t==="upgrade"?o="pb-[254px]":t==="whats-new"&&(o="pb-[180px]"),b.jsxs(Wg,{className:"px-3 pt-4 justify-between",children:[b.jsxs("div",{className:"flex flex-col gap-2 sidebar:gap-4",children:[b.jsx(Jn0,{}),b.jsx(Mr0,{}),b.jsx(zr0,{})]}),b.jsxs("div",{className:`flex flex-col gap-2 sidebar:gap-4 ${o}`,children:[b.jsx(Eo0,{banner:e}),b.jsx(ur0,{className:"pb-0"})]})]})}function Or0({...e}){return b.jsxs(Ag,{...e,children:[b.jsx(n10,{className:"px-5 pt-6 pb-0"}),b.jsx(dr0,{}),b.jsx(Bo0,{className:"p-3 gap-0"})]})}const $i=1.5;function Kb({to:e,activeOnSubpath:t=!1,children:o,...n}){const r=Kp({path:e,activeOnSubpath:t});return b.jsx(i1,{asChild:!0,className:`rounded-full w-full max-w-16 min-w-9 hover:bg-gray-200 ${r?"bg-gray-200":"bg-transparent"}`,...n,variant:"ghost",size:"icon","data-active":r,children:b.jsx("a",{href:e,children:o})})}function fr0(){const{isMobile:e}=Jn(),t=e5();return!e||!t?b.jsx(b.Fragment,{}):b.jsx("div",{className:"fixed sidebar:hidden bottom-0 left-0 right-0 h-[var(--mobile-navbar-height)] bg-sidebar/80 backdrop-blur-md border-t border-sidebar-border z-50 safe-area-inset-bottom",children:b.jsxs("div",{className:"grid grid-cols-4 items-center w-full justify-items-center max-w-[300px] h-full mx-auto px-5",children:[b.jsxs(Kb,{activeOnSubpath:!0,to:"analytics",children:[b.jsx(H9,{strokeWidth:$i}),b.jsx("span",{className:"sr-only",children:"Analytics"})]}),b.jsxs(Kb,{activeOnSubpath:!0,to:"posts",children:[b.jsx(P9,{strokeWidth:$i}),b.jsx("span",{className:"sr-only",children:"Posts"})]}),b.jsxs(Kb,{activeOnSubpath:!0,to:"members",children:[b.jsx(V9,{strokeWidth:$i}),b.jsx("span",{className:"sr-only",children:"Members"})]}),b.jsxs(hg,{className:"rounded-full px-8 h-9 hover:bg-transparent",children:[b.jsx(T9,{strokeWidth:$i}),b.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})]})})}function Ar0({children:e}){const{data:t}=ye(),o=e5();return t&&ps(t)?b.jsxs("div",{className:"relative h-full bg-background",children:[b.jsx("main",{className:"flex h-full flex-col overflow-y-auto",children:b.jsx("div",{className:"flex-1",children:e})}),b.jsx("div",{className:"fixed bottom-3.5 left-3.5 lg:bottom-8 lg:left-8 z-20",children:b.jsx(go0,{})})]}):b.jsxs(fg,{open:!!t&&o,children:[b.jsx(Or0,{}),b.jsxs(qg,{className:`bg-background overflow-y-auto sidebar:max-h-full ${o?"max-h-[calc(100%-var(--mobile-navbar-height))]":"max-h-full"}`,children:[b.jsx("main",{className:"flex-1",children:e}),b.jsx(fr0,{})]})]})}function hr0(){const{data:e}=ye();return I00(),D00(),b.jsx(S00,{children:e?b.jsxs(Ar0,{children:[b.jsx(En,{}),b.jsx(Gf,{})]}):b.jsxs(b.Fragment,{children:[b.jsx(Qz,{}),b.jsx(Gf,{})]})})}const TW=p.createContext(void 0),da0=()=>{const e=p.useContext(TW);if(e===void 0)throw new Error("useAppContext must be used within an AppProvider");return e},qr0=({children:e,value:t})=>{const o=p.useContext(ku),n=t.externalNavigate??o?.externalNavigate;if(!n)throw new Error("External navigate function is required");const r={externalNavigate:n,fromAnalytics:!1,...o,...t};return b.jsx(TW.Provider,{value:r,children:e})},mr0=[{path:"",errorElement:b.jsx(Fp,{onBackToDashboard:()=>{}}),children:[{path:"posts/analytics/:postId",lazy:async()=>{const[{default:e},{default:t}]=await Promise.all([m1(()=>import("./post-analytics-context-D8nk51yA.js").then(o=>o.p),__vite__mapDeps([42,43]),import.meta.url),m1(()=>import("./post-analytics-HdZI-1J7.js"),__vite__mapDeps([44,45,46,43,42]),import.meta.url)]);return{element:b.jsx(e,{children:b.jsx(t,{})})}},children:[{path:"",lazy:w1(()=>m1(()=>import("./overview-aZmI_71o.js"),__vite__mapDeps([47,48,5,24,49,30,50,51,52,53,54,46,42,43,55,56,3,15,57,58,59,60,61,62,63,64,22,23,25,26,11,27,28,29,8,6,1,17,31,12,32,13,65,20,21]),import.meta.url))},{path:"web",lazy:w1(()=>m1(()=>import("./web-Bvvtl44p.js"),__vite__mapDeps([66,67,28,42,43,27,64,49,30,50,51,24,59,22,23,25,26,11,29,8,6,1,17,31,12,32,13,15,3,65,61,62,20,21,68,54,46,55,56,69,5]),import.meta.url))},{path:"growth",lazy:w1(()=>m1(()=>import("./growth-DXHnB1EQ.js").then(e=>e.g),__vite__mapDeps([48,5,24,49,30,50,51,52,53,54,46,42,43,55,56,3,15,57,58]),import.meta.url))},{path:"newsletter",lazy:w1(()=>m1(()=>import("./newsletter-Cp-39ksw.js"),__vite__mapDeps([70,51,24,71,22,23,25,26,11,27,28,29,8,6,30,1,17,31,12,32,13,15,3,20,21,53,54,46,42,43,55,56,59,60,61,62,63,58]),import.meta.url))}]},{path:"tags",children:[{index:!0,lazy:w1(()=>m1(()=>import("./tags-BSwYlj_e.js"),__vite__mapDeps([72,35,73,45,52,17,5]),import.meta.url))},{path:":tagSlug",element:null}]},{path:"comments",lazy:w1(()=>m1(()=>import("./comments-CqurDRGu.js"),__vite__mapDeps([74,69,27,43,28,73,45,75,76,19,13,5]),import.meta.url))},{path:"members-forward",lazy:w1(()=>m1(()=>import("./members-3okEkvWv.js"),__vite__mapDeps([77,69,27,17,78,26,55,79,80,30,43,73,75,5]),import.meta.url))},{path:"*",element:b.jsx(Fp,{onBackToDashboard:()=>{}})}]}],gr0={today:{name:"Today",value:1},last7Days:{name:"Last 7 days",value:7},last30Days:{name:"Last 30 days",value:31},last3Months:{name:"Last 90 days",value:91},yearToDate:{name:"Year to date",value:-1},last12Months:{name:"Last 12 months",value:372},allTime:{name:"All time",value:1e3}},Wr0=Object.values(gr0),vr0=2,Oa0={US:"United States",TWN:"Taiwan",TW:"Taiwan","mobile-ios":"iOS","mobile-android":"Android",macos:"macOS","google.com":"Google","ghost.org":"Ghost","bing.com":"Bing","bsky.app":"Bluesky","yahoo.com":"Yahoo","duckduckgo.com":"DuckDuckGo",unknown:"Unknown",Others:"Unknown",Other:"Unknown",NULL:"Unknown","ᴺᵁᴸᴸ":"Unknown"},fa0=["NULL","ᴺᵁᴸᴸ","","Others","Other"],Aa0="https://static.ghost.org/v5.0.0/images/globe-icon.svg",Ur={PUBLIC:1,FREE:2,PAID:4},ha0=Ur.PUBLIC|Ur.FREE|Ur.PAID,qa0=[{name:"Public visitors",value:"undefined",bit:Ur.PUBLIC},{name:"Free members",value:"free",bit:Ur.FREE},{name:"Paid members",value:"paid",bit:Ur.PAID}],PW=p.createContext(void 0),ma0=()=>{const e=p.useContext(PW);if(e===void 0)throw new Error("useGlobalData must be used within a GlobalDataProvider");return e},Rr0=({children:e})=>{const t=AM(),o=aM(),n=as(),r=n.data?.config,a=!!r?.stats,i=dI({enabled:a}),[l,z]=p.useState(Wr0[vr0].value),[u,f]=p.useState(null),O=[n,t,o],h=O.map(C=>C.error).find(Boolean),q=a?i.error:null,g=h||q,W=O.some(C=>C.isLoading),v=a?i.isLoading:!1,y=W||v;if(g)throw g;const k={url:o.data?.site.url,icon:o.data?.site.icon,title:o.data?.site.title};return b.jsx(PW.Provider,{value:{data:r,site:k,statsConfig:r?.stats,tinybirdToken:i.token,isLoading:y,range:l,setRange:z,settings:t.data?.settings||[],selectedNewsletterId:u,setSelectedNewsletterId:f},children:e})},yr0=[{path:"analytics",children:[{index:!0,lazy:w1(()=>m1(()=>import("./index-DEwhVcR5.js"),__vite__mapDeps([81,82,67,28,27,51,24,30,15,22,23,25,26,11,29,8,6,1,17,31,12,32,13,3,5,46,56,83,65,61,62,84,58,57,43]),import.meta.url))},{path:"web",lazy:w1(()=>m1(()=>import("./index-BDrJ3N3y.js"),__vite__mapDeps([85,82,67,28,27,51,24,30,15,22,23,25,26,11,29,8,6,1,17,31,12,32,13,3,68,59,5,71,86,50,69,83,58,20,21,65,61,62]),import.meta.url))},{path:"growth",lazy:w1(()=>m1(()=>import("./index-B8tGZsrG.js"),__vite__mapDeps([87,82,67,28,27,51,24,30,15,22,23,25,26,11,29,8,6,1,17,31,12,32,13,3,5,65,61,62,20,21,83,88,52,86,57,50,58,89,80,63,84]),import.meta.url))},{path:"newsletters",lazy:w1(()=>m1(()=>import("./index-BocVu6WC.js"),__vite__mapDeps([90,82,67,28,27,51,24,30,15,22,23,25,26,11,29,8,6,1,17,31,12,32,13,3,61,62,5,65,20,21,88,52,78,58]),import.meta.url))}]}],wr0=()=>{const{data:e,isError:t,isLoading:o}=ye();return e?b.jsx(ro,{replace:!0,to:`/settings/staff/${e.slug}`}):t||!o?b.jsx(ro,{replace:!0,to:"/"}):null},Lr0=[{element:b.jsx(V00,{}),children:[{path:"/tags/:tagSlug",Component:Qz,handle:{allowInForceUpgrade:!0}},{element:b.jsx(qr0,{value:{fromAnalytics:!0},children:b.jsx(En,{})}),children:mr0[0].children.filter(e=>e.path!=="*")},{element:b.jsx(Rr0,{children:b.jsx(En,{})}),children:yr0},{path:"network",loader:()=>HI("/activitypub")},{path:"my-profile",Component:wr0,handle:{allowInForceUpgrade:!0}},{path:"",element:b.jsx(So0,{children:b.jsx(En,{})}),children:SW},{path:"settings/*",lazy:w1(()=>m1(()=>import("./settings-M0QTt_tT.js").then(e=>e.bb),__vite__mapDeps([91,21,78,43,80,79,89]),import.meta.url)),handle:{allowInForceUpgrade:!0}},{path:"*",Component:Qz,handle:{allowInForceUpgrade:!0}}]}],xr0=["http:","https:","mailto:","tel:"];function kr0(e){if(e.match(/^[a-z]+:/i))try{const t=new URL(e);return xr0.includes(t.protocol)?(window.location.href=e,!0):!1}catch{const t=e.startsWith("/")?e:`/${e}`;return window.location.hash=t,!0}else{const t=e.startsWith("/")?e:`/${e}`;return window.location.hash=t,!0}}function Cr0({children:e}){const{data:t}=AM(),o=p.useMemo(()=>{if(!t?.settings)return;const n=t.settings;return{paidMembersEnabled:oo(n,"paid_members_enabled")??!1,newslettersEnabled:oo(n,"editor_default_email_recipients")!=="disabled",analytics:{emailTrackOpens:oo(n,"email_track_opens")??!1,emailTrackClicks:oo(n,"email_track_clicks")??!1,membersTrackSources:oo(n,"members_track_sources")??!1,outboundLinkTagging:oo(n,"outbound_link_tagging")??!1,webAnalytics:oo(n,"web_analytics_enabled")??!1}}},[t]);return b.jsx(rx,{appSettings:o,children:e})}const Nr0={ghostVersion:"",externalNavigate:e=>{kr0(e.route)},unsplashConfig:{Authorization:"Client-ID 8672af113b0a8573edae3aa3713886265d9bb741d707f6c01a486cde8c278980","Accept-Version":"v1","Content-Type":"application/json","App-Pragma":"no-cache","X-Unsplash-Cache":!0},sentryDSN:null,onUpdate:(e,t)=>{window.EmberBridge?.state.onUpdate(e,t)},onInvalidate:e=>{window.EmberBridge?.state.onInvalidate(e)},onDelete:(e,t)=>{window.EmberBridge?.state.onDelete(e,t)}};kR.createRoot(document.getElementById("root")).render(b.jsx(p.StrictMode,{children:b.jsx(nx,{...Nr0,children:b.jsx(k00,{prefix:"/",routes:Lr0,children:b.jsx(Cr0,{children:b.jsx(iY,{className:"shade-admin",darkMode:!1,fetchKoenigLexical:null,children:b.jsx(hr0,{})})})})})}));export{Rg as $,en as A,i1 as B,F3 as C,os as D,pa as E,Bn0 as F,$a as G,V2 as H,jc0 as I,Xc0 as J,Fc0 as K,Vn0 as L,Hc0 as M,Dc0 as N,Ic0 as O,Zo as P,y00 as Q,e00 as R,j1 as S,t00 as T,IG as U,Zp as V,Se as W,jd as X,ta0 as Y,oa0 as Z,na0 as _,y3 as a,ic as a$,S9 as a0,pY as a1,$9 as a2,G9 as a3,K9 as a4,Y9 as a5,Z9 as a6,em as a7,J9 as a8,H3 as a9,E0 as aA,q2 as aB,K0 as aC,a3 as aD,m1 as aE,hh as aF,B1 as aG,lx as aH,xh as aI,se as aJ,as as aK,aM as aL,AM as aM,dI as aN,Pd as aO,Pe as aP,XG as aQ,lc0 as aR,En as aS,yg as aT,ic0 as aU,tg as aV,w00 as aW,Tp as aX,da0 as aY,Jr0 as aZ,tc0 as a_,vq as aa,Ve as ab,Xt as ac,Fr0 as ad,Rq as ae,v1 as af,nm as ag,Q3 as ah,wZ as ai,Wq as aj,ec0 as ak,Ur0 as al,_0 as am,Gr0 as an,I3 as ao,Ao as ap,H9 as aq,Jm as ar,a7 as as,Qn as at,Y2 as au,ft as av,R1 as aw,i7 as ax,_j as ay,Bj as az,qo as b,ro as b$,ed as b0,Ym as b1,T9 as b2,Zd as b3,sc0 as b4,eg as b5,Pn as b6,vg as b7,jf as b8,Vr0 as b9,Yc0 as bA,zc as bB,mZ as bC,Kc0 as bD,HG as bE,sa as bF,Ui as bG,Xd as bH,Dd as bI,Id as bJ,o00 as bK,pc0 as bL,ug as bM,c00 as bN,a00 as bO,s00 as bP,JJ as bQ,$r0 as bR,Hr0 as bS,Na as bT,Vn as bU,ha0 as bV,qa0 as bW,Ur as bX,ma0 as bY,Er0 as bZ,Yr0 as b_,bn as ba,b3 as bb,c7 as bc,qt as bd,cX as be,Da as bf,nc as bg,Tt as bh,Yu as bi,Ku as bj,h3 as bk,Qr as bl,f3 as bm,oc as bn,z3 as bo,u3 as bp,KG as bq,ho as br,A5 as bs,z5 as bt,JG as bu,uZ as bv,Vc0 as bw,Ko0 as bx,Fo0 as by,EW as bz,ia as c,BZ as c$,aa0 as c0,SJ as c1,TJ as c2,PJ as c3,rg as c4,hc0 as c5,qc0 as c6,Xg as c7,Jc0 as c8,F9 as c9,Qr0 as cA,OZ as cB,Zr0 as cC,gr0 as cD,RZ as cE,Xf as cF,MZ as cG,uu as cH,Wr0 as cI,x2 as cJ,MY as cK,Sb as cL,uY as cM,Gc0 as cN,Uc0 as cO,Zc0 as cP,Jp as cQ,fa0 as cR,Oa0 as cS,P9 as cT,Kr0 as cU,Aa0 as cV,oc0 as cW,tr0 as cX,za0 as cY,ua0 as cZ,Ir0 as c_,sK as ca,tM as cb,fY as cc,Qp as cd,NA as ce,_A as cf,sa0 as cg,ia0 as ch,L2 as ci,on0 as cj,cc0 as ck,V9 as cl,eK as cm,ud as cn,Od as co,Ga as cp,Za as cq,Sd as cr,NJ as cs,_J as ct,j9 as cu,og as cv,ng as cw,WG as cx,nc0 as cy,rc0 as cz,Vi as d,dc0 as d$,oo as d0,ba0 as d1,Fn0 as d2,aZ as d3,pa0 as d4,Ma0 as d5,la0 as d6,Ed as d7,qW as d8,Ln0 as d9,xc0 as dA,vc0 as dB,wc0 as dC,Lc0 as dD,Ea as dE,mc0 as dF,Bc0 as dG,gc0 as dH,Wc0 as dI,At as dJ,T00 as dK,P00 as dL,j00 as dM,qP as dN,Ac0 as dO,e10 as dP,Tc0 as dQ,_c0 as dR,Nc0 as dS,pe as dT,Y00 as dU,uc0 as dV,xz as dW,is as dX,bc0 as dY,_g as dZ,zc0 as d_,ca0 as da,ra0 as db,Qc0 as dc,$c0 as dd,_r0 as de,gR as df,lN as dg,S6 as dh,m3 as di,Cc0 as dj,Ec0 as dk,gb as dl,jr0 as dm,Xr0 as dn,Wu as dp,fc0 as dq,vo0 as dr,OW as ds,fW as dt,Ro0 as du,Rc0 as dv,yc0 as dw,kc0 as dx,tI as dy,rc as dz,l0 as e,G00 as e0,Bg as e1,Oc0 as e2,cM as e3,Sh as e4,Tr0 as e5,XP as e6,P6 as e7,j6 as e8,vu as e9,Lh as eA,PG as eB,$G as eC,VG as eD,oZ as eE,rZ as eF,iZ as eG,AZ as eH,WZ as eI,xZ as eJ,CZ as eK,SZ as eL,PZ as eM,XZ as eN,FZ as eO,X9 as eP,QZ as eQ,D9 as eR,ZZ as eS,I9 as eT,U9 as eU,Td as eV,cK as eW,SG as eX,qj as ea,A7 as eb,jj as ec,vX as ed,RX as ee,yX as ef,D7 as eg,G7 as eh,Z7 as ei,K7 as ej,Ex as ek,FD as el,Pr0 as em,HD as en,Aq as eo,g3 as ep,ma as eq,ye as er,Dr0 as es,Uy as et,Mc0 as eu,OI as ev,Sc0 as ew,ps as ex,qh as ey,Sr0 as ez,Ip as f,Jo as g,Fo as h,Pc0 as i,b as j,NW as k,ea0 as l,b5 as m,O5 as n,lp as o,bu as p,u5 as q,p as r,Cr as s,tm as t,xF as u,pc as v,V3 as w,$3 as x,Bd as y,R0 as z};
620
+ `+D1),E&&Fi([n0,J,i0],_e=>{D1=na(D1,_e," ")}),L&&o1?L.createHTML(D1):D1},t.setConfig=function(){let W0=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};D(W0),A0=!0},t.clearConfig=function(){H1=null,A0=!1},t.isValidAttribute=function(W0,S,z0){H1||D({});const x0=n1(W0),O1=n1(S);return L1(x0,O1,z0)},t.addHook=function(W0,S){typeof S=="function"&&oa(K[W0],S)},t.removeHook=function(W0,S){if(S!==void 0){const z0=in0(K[W0],S);return z0===-1?void 0:pn0(K[W0],z0,1)[0]}return gA(K[W0])},t.removeHooks=function(W0){K[W0]=[]},t.removeAllHooks=function(){K=LA()},t}var yn0=kW();const wn0=["http:","https:","mailto:"];function ra0(e){try{const t=new URL(e);return wn0.includes(t.protocol)}catch{return!1}}function ca0(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Cr(e){return yn0.sanitize(e)}function bu(e,t=[]){if(t.length===0)return e.replace(/<br\s*\/?>/gi," ").replace(/<\/p>\s*<p>|<\/div>\s*<div>|<\/h[1-6]>\s*<|<\/li>\s*<li>|<\/a>/gi," ").replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim();const o=t.map(u=>u.toLowerCase()),n={};let r=0,i=e.replace(/<\/(h[1-6]|p|div|li|blockquote|pre)>/gi,"<br>");for(const u of o){const f=new RegExp(`<${u}[^>]*>.*?<\\/${u}>|<${u}[^>]*\\/?>`,"gis");i=i.replace(f,O=>{const h=`__EXCLUDED_TAG_${r+=1}__`;return n[h]=O,h})}let l=i;o.includes("br")||(l=i.replace(/<br\s*\/?>/gi," "));let z=l.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim();for(const[u,f]of Object.entries(n))z=z.replace(u,f);return z}const lp=e=>{const t=document.createElement("div");t.innerHTML=e;const o=t.getElementsByTagName("a");for(let n=0;n<o.length;n++)(o[n].getAttribute("href")||"").match(/^\s*(javascript|data|vbscript):/i)&&o[n].removeAttribute("href"),o[n].setAttribute("target","_blank"),o[n].setAttribute("rel","noopener noreferrer");return t.innerHTML},xA=e=>"preferredUsername"in e,Zo=({actor:e,children:t,disabled:o=!1,side:n="bottom",align:r="start",isCurrentUser:a=!1})=>{const[i,l]=p.useState(!1),z=qo();let u=e?.handle;!u&&e&&xA(e)&&(u=Jo(e));const f=o||!u&&!e,O=b5("index",u||"",{enabled:i&&!!u}),h=O.isFetching||O.isLoading,q=O.error,g=O.data?typeof O.data.followerCount=="number"&&typeof O.data.followingCount=="number"&&O.data.bio!==void 0:!1;if(p.useEffect(()=>{!i||!u||!g&&!h&&!q&&O.refetch({cancelRefetch:!1})},[O,h,q,g,i,u]),f)return b.jsx(b.Fragment,{children:t});const v=O.data||e,y=v?.handle??u??"",k=v?.name??"",C=v?.avatarUrl??(e&&xA(e)?e.icon?.url:null)??null,L=!!v?.followsMe,x=typeof v?.followingCount=="number"?v.followingCount:Number(v?.followingCount)||0,w=typeof v?.followerCount=="number"?v.followerCount:Number(v?.followerCount)||0,P=v?.bio?lp(bu(v.bio,["a"])):void 0,H=()=>{y&&z(`/profile/${y}`)},o0=()=>{y&&z(`/profile/${y}/following`)},Y=()=>{y&&z(`/profile/${y}/followers`)};return b.jsxs(GJ,{onOpenChange:l,children:[b.jsx(ZJ,{asChild:!0,children:t}),b.jsx(bg,{align:r,className:"w-[320px] cursor-default rounded-2xl border-0 p-5 text-left text-gray-900 shadow-[0_5px_24px_0px_rgba(0,0,0,0.02),0px_2px_5px_0px_rgba(0,0,0,0.07),0px_0px_1px_0px_rgba(0,0,0,0.25)] outline-none dark:bg-[#101114] dark:shadow-none",side:n,sideOffset:12,onClick:K=>K.stopPropagation(),children:b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsxs("div",{className:"flex flex-col gap-2",children:[b.jsxs("div",{className:"flex justify-between",children:[b.jsxs(Xd,{className:"size-14 cursor-pointer",onClick:H,children:[C&&b.jsx(Dd,{alt:k,className:"rounded-full outline outline-[0.5px] outline-offset-[-0.5px] outline-black/10",src:C,onError:K=>{K.target.src="",K.target.style.display="none"}}),b.jsx(Id,{className:"bg-gray-200 text-sm font-semibold text-gray-700 dark:bg-gray-800 dark:text-gray-200",children:b.jsx(Td,{className:"size-5 text-gray-500 dark:text-gray-400",strokeWidth:1.5})})]}),!a&&b.jsx(O5,{following:!!v?.followedByMe,handle:y,type:"primary"})]}),b.jsxs("div",{className:"flex cursor-pointer flex-col items-start",onClick:H,children:[b.jsx(Rg,{className:"w-full truncate",children:k}),b.jsxs("div",{className:"flex w-full gap-2",children:[b.jsx("span",{className:"truncate text-gray-700 dark:text-gray-600",children:y}),L&&!a&&b.jsx(uY,{className:"mt-px whitespace-nowrap",variant:"secondary",children:"Follows you"})]})]})]}),b.jsx("div",{className:"flex gap-3 dark:text-gray-300",children:h?b.jsx(j1,{className:"h-4 w-32"}):!q&&b.jsxs(b.Fragment,{children:[b.jsxs("span",{className:"cursor-pointer hover:underline",onClick:o0,children:[b.jsx("span",{className:"font-bold text-black dark:text-white",children:Xf(x)})," ","Following"]}),b.jsxs("span",{className:"cursor-pointer hover:underline",onClick:Y,children:[b.jsx("span",{className:"font-bold text-black dark:text-white",children:Xf(w)})," ","Followers"]})]})}),h?b.jsx(j1,{className:"h-4 w-48"}):!q&&P?b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(P)},className:"leading-tight dark:text-gray-300 [&_.invisible]:hidden [&_a:hover]:underline [&_a]:text-[#00a4eb]"}):null]})})]})},CW=(e={})=>{const[t,o]=p.useState(!1),n=Pe();return p.useEffect(()=>{const r=a=>{if(a.target instanceof HTMLInputElement||a.target instanceof HTMLTextAreaElement||a.target instanceof HTMLElement&&a.target.isContentEditable||a.target instanceof HTMLSelectElement||a.metaKey||a.ctrlKey||a.altKey||a.shiftKey)return;const i=document.querySelector('[role="dialog"][data-state="open"]');if(!(i&&!(e.componentRef?.current?.closest('[role="dialog"]')===i)))switch(a.key.toLowerCase()){case"n":i||(a.preventDefault(),e.onOpenNewNote?e.onOpenNewNote():o(!0));break;case"r":e.isReplyAvailable&&e.onOpenReply&&(n.pathname.includes("/notes/")||n.pathname.includes("/reader/"))&&(a.preventDefault(),e.onOpenReply());break}};return document.addEventListener("keydown",r),()=>document.removeEventListener("keydown",r)},[e,n.pathname]),{isNewNoteModalOpen:t,setIsNewNoteModalOpen:o}},Ui=({actor:e,object:t,likeCount:o,commentCount:n,repostCount:r,layout:a,disabled:i=!1,buttonClassName:l="",onLikeClick:z,onCommentClick:u,onReplyCountChange:f})=>{const[O,h]=p.useState(t.liked),[q,g]=p.useState(t.reposted),[W,v]=p.useState(!1),y=p.useRef(null);CW({isReplyAvailable:!u&&a!=="reply",onOpenReply:()=>v(!0),componentRef:y}),p.useEffect(()=>{h(t.liked),g(t.reposted)},[t.liked,t.reposted]),p.useEffect(()=>{P(r)},[r]);const k=Qo0("index"),C=$o0("index"),L=Go0("index"),x=Zo0("index"),[w,P]=p.useState(r),H=async K=>{K.stopPropagation(),O?C.mutate(t.id):k.mutate(t.id,{onError(){h(!1)}}),h(!O),z()},o0=K=>{K.stopPropagation(),u?u():v(!0)},Y=`px-2 gap-1.5 font-normal text-md [&_svg]:size-[18px] transition-color ap-action-button text-gray-900 hover:text-gray-900 hover:bg-black/[3%] dark:bg-black dark:hover:bg-gray-950 dark:text-gray-600 ${l}`;return b.jsxs(b.Fragment,{children:[b.jsxs("div",{ref:y,className:`flex ${a!=="inbox"&&"gap-1"}`,children:[b.jsxs(i1,{className:`${Y} ${O&&"text-pink-500 hover:text-pink-500"}`,"data-testid":"like-button",disabled:i,id:"like",title:`${O?"Undo like":"Like"}`,variant:"ghost",onClick:K=>{K?.stopPropagation(),K&&H(K)},children:[b.jsx(mZ,{className:`${O&&"fill-pink-500 text-pink-500"}`}),a!=="inbox"&&b.jsx(Vf,{className:o===0?"-ml-1.5 w-0 overflow-hidden":"",spinTiming:{duration:300},value:o})]}),b.jsxs(i1,{className:`${Y}`,"data-testid":"reply-button",disabled:i,id:"comment",title:"Reply",variant:"ghost",onClick:o0,children:[b.jsx(Ed,{className:"-mr-px"}),a!=="inbox"&&n>0&&I3(n)]}),b.jsxs(i1,{className:`${Y} ${q&&"text-green-500 hover:text-green-500"}`,"data-testid":"repost-button",disabled:i,id:"repost",title:`${q?"Undo repost":"Repost"}`,variant:"ghost",onClick:K=>{K?.stopPropagation(),q?(x.mutate(t.id),P(w-1)):(L.mutate(t.id,{onError(){g(!1),P(w-1)}}),P(w+1)),g(!q)},children:[b.jsx(X9,{className:`${q&&"text-green-500"}`}),a!=="inbox"&&b.jsx(Vf,{className:w===0?"-ml-1.5 w-0 overflow-hidden":"",spinTiming:{duration:300},value:w})]})]}),W&&b.jsx(A5,{open:W,replyTo:{object:t,actor:e},onOpenChange:K=>{v(K)},onReply:()=>{f?.(1),v(!1)},onReplyError:()=>{f?.(-1)}})]})};function Ln0(e){const o=e.replace(/<[^>]*>/g,"").split(/\s+/).filter(r=>r.length>0).length;return`${Math.ceil(o/275)} min read`}const Fo=(e,t,o)=>{o?.stopPropagation(),t(typeof e=="string"?`/profile/${e}`:`/profile/${e.handle||Jo(e)}`)},xn0=e=>{const t=new Date,o=i=>new Date(i.getFullYear(),i.getMonth(),i.getDate()),n=o(t),r=o(new Date(t.getTime()-1440*60*1e3)),a=o(e);return a.getTime()===n.getTime()?kn0(e):a.getTime()===r.getTime()?"Yesterday":Cn0(e)},kn0=e=>{const o=Math.floor((new Date().getTime()-e.getTime())/1e3);if(o<1)return"Just now";if(o<60)return`${o}s`;const n=Math.floor(o/60);return n<60?`${n}m`:`${Math.floor(n/60)}h`},Cn0=e=>{const t=new Date,o=e.getDate(),n=e.toLocaleString("default",{month:"short"});return e.getFullYear()===t.getFullYear()?`${o} ${n}`:`${o} ${n} ${e.getFullYear()}`};function Nn0(e){return new Date(e).toLocaleDateString("default",{year:"numeric",month:"short",day:"2-digit"})+", "+new Date(e).toLocaleTimeString("default",{hour:"2-digit",minute:"2-digit"})}function Vi(e,t=!0){const o=new Date(e?.published??e?.createdAt??new Date),n=Nn0(o),r=xn0(o);return t&&!e.url?.includes("/.ghost/activitypub")?b.jsx("a",{className:"whitespace-nowrap text-gray-700 hover:underline",href:e.url,rel:"noreferrer",target:"_blank",title:n,onClick:a=>a.stopPropagation(),children:r}):b.jsx("span",{className:"whitespace-nowrap text-gray-700",children:r})}function f5(e){let t;if(e.image&&(t=e.image),e.type==="Note"&&!t&&(t=e.attachment),!t)return null;if(Array.isArray(t)){if(t.length===0)return null;if(t.length===1)return t[0]}return t}function sa(e,t,o,n){const r=f5(e);if(!r)return null;const a=z=>u=>{u.stopPropagation(),t&&t(z)},i=z=>{n&&n(z)},l=(z,u=!1)=>{const f=u?"min-h-[200px]":"";return b.jsx("div",{className:`${z} ${f} flex w-full items-center justify-center bg-gray-100 dark:bg-gray-925/30`,children:b.jsx(WZ,{className:"text-gray-400",size:24,strokeWidth:1.5})})};if(Array.isArray(r)){const z=r.length;let u="";return z===1?u="grid-cols-1":z>=2&&z<=4?u="grid-cols-2 auto-rows-[150px]":z>4&&(u="grid-cols-3 auto-rows-[150px]"),b.jsx("div",{className:`attachment-gallery mt-3 grid w-full ${u} gap-2`,children:r.map((f,O)=>{const h=`size-full rounded-md outline outline-1 -outline-offset-1 outline-black/10 ${z===3&&O===0?"row-span-2":""}`;return o&&o.has(f.url)?l(h,z===1):b.jsx("img",{alt:f.name||`Image-${O}`,className:`${h} cursor-pointer object-cover`,referrerPolicy:"no-referrer",src:f.url,onClick:t?a(f.url):void 0,onError:()=>i(f.url)},f.url)})})}switch(r.mediaType){case"image/jpeg":case"image/png":case"image/gif":case"image/webp":return o&&o.has(r.url)?l(`${e.type==="Article"?"w-full rounded-t-md":"mt-3 max-h-[420px] rounded-md outline outline-1 -outline-offset-1 outline-black/10"}`,!0):b.jsx("img",{alt:r.name||"Image",className:`cursor-pointer ${e.type==="Article"?"w-full rounded-t-md":"mt-3 max-h-[420px] rounded-md outline outline-1 -outline-offset-1 outline-black/10"}`,referrerPolicy:"no-referrer",src:r.url,onClick:t?a(r.url):void 0,onError:()=>i(r.url)});case"video/mp4":case"video/webm":return b.jsx("div",{className:"relative mb-4 mt-3",children:b.jsx("video",{className:"h-[300px] w-full rounded object-cover",src:r.url,controls:!0})});case"audio/mpeg":case"audio/ogg":return b.jsx("div",{className:"relative mb-4 mt-2 w-full",children:b.jsx("audio",{className:"w-full",src:r.url,controls:!0})});default:if(e.image||r.type==="Image"){const z=e.type==="Article"?"cursor-pointer aspect-[16/7.55] w-full rounded-t-md object-cover":"cursor-pointer mt-3 max-h-[420px] rounded-md outline outline-1 -outline-offset-1 outline-black/10";let u;return e.image?typeof e.image=="string"?u=e.image:u=e.image?.url:u=r.url,o&&o.has(u)?l(z,!0):b.jsx("img",{alt:r.name||"Image",className:z,referrerPolicy:"no-referrer",src:u,onClick:t?a(u):void 0,onError:()=>i(u)})}return null}}function _n0(e,t){const o=f5(e),n="ml-8 md:ml-9 shrink-0 rounded-md h-[91px] w-[121px] relative",r=se("object-cover outline outline-1 -outline-offset-1 outline-black/[0.05]",n);if(t)return b.jsx(j1,{className:`${r} outline-0`});if(!o)return null;if(Array.isArray(o))return b.jsx("img",{className:r,referrerPolicy:"no-referrer",src:o[0].url});switch(o.mediaType){case"image/jpeg":case"image/png":case"image/gif":return b.jsx("img",{className:r,referrerPolicy:"no-referrer",src:o.url});case"video/mp4":case"video/webm":return b.jsxs("div",{className:n,children:[b.jsx("video",{className:"h-[80px] w-full rounded object-cover",src:o.url}),b.jsx("div",{className:"absolute inset-0 rounded bg-gray-900 opacity-50"}),b.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:b.jsx(FZ,{color:"white",fill:"white",size:40})})]});case"audio/mpeg":case"audio/ogg":return b.jsx("div",{className:"ml-8 w-[120px]",children:b.jsx("div",{className:"relative mb-4 mt-2 w-full",children:b.jsx("audio",{className:"w-full",src:o.url,controls:!0})})});default:return e.image?b.jsx("img",{className:r,referrerPolicy:"no-referrer",src:typeof e.image=="string"?e.image:e.image?.url}):null}}const kA=()=>{},CA=b.jsx(X9,{className:"shrink-0 text-gray-700 dark:text-gray-600",size:16,strokeWidth:1.5}),Bn0=({actor:e,allowDelete:t=!1,object:o,parentId:n=void 0,layout:r,type:a,commentCount:i=0,repostCount:l=0,likeCount:z=0,showHeader:u=!0,last:f,isLoading:O,isPending:h=!1,isCompact:q=!1,isChainContinuation:g=!1,isChainParent:W=!1,onClick:v=kA,onDelete:y=kA,showStats:k=!0})=>{const C=new Date(o?.published??new Date).toLocaleDateString("default",{year:"numeric",month:"short",day:"2-digit"})+", "+new Date(o?.published??new Date).toLocaleTimeString("default",{hour:"2-digit",minute:"2-digit"}),[,L]=p.useState(!1),[x,w]=p.useState(new Set),P=p.useRef(null),[H,o0]=p.useState(!1),Y=tn0("index"),K=qo(),n0=l5("index",()=>{Se.success(`Followed ${X?.name}`)},()=>{Se.error("Failed to follow")}),J=M5("index",()=>{Se.info(`Unfollowed ${X?.name}`)},()=>{Se.error("Failed to unfollow")});p.useEffect(()=>{const V0=P.current;V0&&o0(V0.scrollHeight>V0.clientHeight)},[o?.content]),p.useEffect(()=>{const V0=P.current;if(!V0)return;const h1=E=>{const r0=E.target.closest("a[data-profile]");if(r0){const A0=r0.getAttribute("data-profile")?.trim();/^@([\w.-]+)@([\w-]+\.[\w.-]+[a-zA-Z])$/.test(A0||"")&&A0&&(E.preventDefault(),E.stopPropagation(),Fo(A0,K))}};return V0.addEventListener("click",h1),()=>{V0.removeEventListener("click",h1)}},[K,o?.content]);const i0=()=>{},L0=()=>{h||v()},Z=()=>{Y.mutate({id:o.id,parentId:n}),y()},m0=async()=>{o?.url&&(await navigator.clipboard.writeText(o.url),L(!0),Se.success("Link copied"),setTimeout(()=>L(!1),2e3))},$=V0=>{w(h1=>new Set(h1).add(V0))};let X=e;a==="Announce"&&(X=typeof o.attributedTo=="object"?o.attributedTo:e);const G=X?Jo(X):null,N=X?.followedByMe||!1,I=a==="Announce"?typeof o.attributedTo=="object"&&o.attributedTo&&!Array.isArray(o.attributedTo)&&"authored"in o.attributedTo?o.attributedTo.authored:typeof o.attributedTo=="object"&&o.attributedTo&&!Array.isArray(o.attributedTo)&&typeof e=="object"&&e&&o.attributedTo.id===e.id:o.authored,c0=a==="Announce"?o.reposted??!1:o.authored,h0=()=>{G&&n0.mutate(G)},d0=()=>{G&&J.mutate(G)},v0=b.jsx(i1,{className:`relative z-10 size-[34px] rounded-md ${r==="inbox"||r==="modal"?"text-gray-900 hover:text-gray-900 dark:text-gray-600 dark:hover:text-gray-600":"text-gray-500 hover:text-gray-500"} dark:bg-black dark:hover:bg-gray-950 [&_svg]:size-5`,"data-testid":"menu-button",variant:"ghost",children:b.jsx(T9,{})}),{lightboxState:u0,openLightbox:e0,closeLightbox:S0,navigateToIndex:T0}=rn0(o);return r==="feed"?b.jsxs(b.Fragment,{children:[o&&b.jsxs("div",{className:`group/article relative -mx-4 ${h?"pointer-events-none":"cursor-pointer"} rounded-lg p-6 px-4 pb-[18px]`,"data-layout":"feed","data-object-id":o.id,onClick:L0,children:[a==="Announce"&&b.jsxs("div",{className:"z-10 mb-2 flex items-center gap-1.5 text-gray-700 dark:text-gray-600",children:[CA,b.jsxs("div",{className:"flex min-w-0 items-center gap-1 text-sm",children:[b.jsx(Zo,{actor:e,align:"center",isCurrentUser:c0,children:b.jsx("span",{className:"truncate break-anywhere hover:underline",onClick:V0=>{Fo(e,K,V0)},children:e.name})}),"reposted"]})]}),b.jsxs("div",{className:"border-1 flex flex-col gap-2.5","data-test-activity":!0,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Zo,{actor:X,isCurrentUser:I,children:b.jsxs("div",{className:"flex min-w-0 grow items-center gap-3",children:[b.jsx(en,{author:X,disabled:h,showFollowButton:!I&&!N}),b.jsxs("div",{className:"flex min-w-0 grow flex-col",onClick:V0=>{h||Fo(X,K,V0)},children:[b.jsx("span",{className:`min-w-0 truncate font-semibold break-anywhere ${q?"text-lg":"text-md"} ${h?"":"hover-underline"} dark:text-white`,"data-test-activity-heading":!0,children:O?b.jsx(j1,{className:"w-24"}):X.name}),b.jsxs("div",{className:"flex w-full text-md text-gray-700 dark:text-gray-600",children:[b.jsx("span",{className:`truncate ${h?"":"hover-underline"}`,children:O?b.jsx(j1,{className:"w-56"}):Jo(X)}),b.jsx("div",{className:`ml-1 before:mr-1 ${!O&&'before:content-["·"]'}`,title:`${C}`,children:O?b.jsx(j1,{className:"w-4"}):Vi(o,h===!1&&!o.authored)})]})]})]})}),b.jsx(Ib,{allowDelete:t,authoredByMe:I,disabled:h,followedByMe:N,layout:"feed",trigger:v0,onCopyLink:m0,onDelete:Z,onFollow:h0,onUnfollow:d0})]}),b.jsx("div",{className:"relative col-start-2 col-end-3 w-full gap-4 pl-[52px]",children:b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"",children:o.type==="Article"?b.jsxs("div",{className:"rounded-md border border-gray-150 transition-colors hover:bg-gray-75 dark:border-gray-950 dark:hover:bg-gray-950",children:[sa(o,L0,x,$),b.jsxs("div",{className:"p-5",children:[b.jsx("div",{className:"mb-1 line-clamp-2 text-pretty text-lg font-semibold leading-tight tracking-tight break-anywhere","data-test-activity-heading":!0,children:o.name}),b.jsx("div",{className:"line-clamp-3 leading-[1.4em] break-anywhere",children:o.preview?.content})]})]}):b.jsxs("div",{className:"relative",children:[b.jsx("div",{className:"ap-note-content line-clamp-[10] text-pretty leading-[1.4285714286] tracking-[-0.006em] text-gray-900 break-anywhere dark:text-gray-300 [&_p+p]:mt-3",children:O?b.jsx(j1,{count:2}):b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(lp(o.content||"")??"")},ref:P,onClick:V0=>{const h1=V0.target;(h1.tagName==="A"||h1.closest("a"))&&V0.stopPropagation()}})}),H&&b.jsx("button",{className:"mt-1 text-blue-600",type:"button",children:"Show more"}),sa(o,e0,x,$)]})}),b.jsx("div",{className:"space-between relative z-[30] ml-[-8px] mt-1 flex",children:O?b.jsx(j1,{className:"ml-2 w-18"}):k&&b.jsx(Ui,{actor:X,commentCount:i,disabled:h,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0})})]})})]})]}),b.jsx(Fb,{currentIndex:u0.currentIndex,images:u0.images,isOpen:u0.isOpen,onClose:S0,onNavigate:T0})]}):r==="modal"?b.jsxs(b.Fragment,{children:[o&&b.jsxs("div",{"data-object-id":o.id,children:[b.jsxs("div",{className:"group/article relative","data-layout":"modal",onClick:L0,children:[b.jsxs("div",{className:"z-10 -my-1 grid grid-cols-[auto_1fr] grid-rows-[auto_1fr] gap-3 pb-3 pt-4","data-test-activity":!0,children:[u&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"relative z-10 pt-[3px]",children:b.jsx(en,{author:X,showFollowButton:!I&&!N})}),b.jsxs("div",{className:"relative z-10 flex w-full min-w-0 cursor-pointer flex-col overflow-visible text-[1.5rem]",onClick:V0=>{h||Fo(X,K,V0)},children:[b.jsxs("div",{className:"flex w-full",children:[b.jsx("span",{className:'min-w-0 truncate whitespace-nowrap font-semibold break-anywhere after:mx-1 after:font-normal after:text-gray-700 after:content-["·"] after:dark:text-gray-600',"data-test-activity-heading":!0,children:X.name}),b.jsx("div",{children:Vi(o,!o.authored)})]}),b.jsx("div",{className:"flex w-full",children:b.jsx("span",{className:"min-w-0 truncate text-gray-700 dark:text-gray-600",children:Jo(X)})})]})]}),b.jsx("div",{className:"relative z-10 col-start-1 col-end-3 w-full gap-4",children:b.jsxs("div",{className:"flex flex-col items-start",children:[o.name&&b.jsx(V2,{className:"mb-1 leading-tight break-anywhere","data-test-activity-heading":!0,children:o.name}),b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(lp(o.content||"")??"")},ref:P,className:"ap-note-content-large text-pretty text-[1.6rem] tracking-[-0.011em] text-gray-900 break-anywhere dark:text-gray-300 [&_p+p]:mt-3"}),sa(o,e0,x,$),b.jsx("div",{className:"space-between ml-[-8px] mt-3 flex",children:k&&b.jsx(Ui,{actor:X,commentCount:i,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0})})]})})]}),b.jsx("div",{className:"absolute -inset-x-3 -inset-y-0 z-0 rounded transition-colors max-lg:hidden"})]}),b.jsx("div",{className:"mt-3 h-px bg-gray-200 dark:bg-gray-950"})]}),b.jsx(Fb,{currentIndex:u0.currentIndex,images:u0.images,isOpen:u0.isOpen,onClose:S0,onNavigate:T0})]}):r==="reply"?b.jsxs(b.Fragment,{children:[o&&b.jsxs("div",{className:`group/article relative ${q?"pb-6":g?"pb-5":"py-5"} ${h?"pointer-events-none":"cursor-pointer"}`,"data-layout":"reply","data-object-id":o.id,onClick:L0,children:[b.jsxs("div",{className:"border-1 flex flex-col gap-2.5 border-b-gray-200","data-test-activity":!0,children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx(Zo,{actor:X,isCurrentUser:I,children:b.jsxs("div",{className:"flex min-w-0 grow items-center gap-3",children:[b.jsx(en,{author:X,disabled:h,showFollowButton:!I&&!N}),b.jsxs("div",{className:"flex min-w-0 grow flex-col",onClick:V0=>{h||Fo(X,K,V0)},children:[b.jsxs("div",{className:"flex",children:[b.jsx("span",{className:'min-w-0 truncate whitespace-nowrap font-semibold text-black break-anywhere after:mx-1 after:font-normal after:text-gray-700 after:content-["·"] dark:text-white',"data-test-activity-heading":!0,children:X.name}),b.jsx("div",{children:Vi(o,h===!1&&!o.authored)})]}),b.jsx("div",{className:"flex",children:b.jsx("span",{className:"truncate text-gray-700",children:Jo(X)})})]})]})}),!q&&b.jsx(Ib,{allowDelete:t,authoredByMe:I,disabled:h,followedByMe:N,layout:"reply",trigger:v0,onCopyLink:m0,onDelete:Z,onFollow:h0,onUnfollow:d0})]}),b.jsx("div",{className:"relative z-10 col-start-2 col-end-3 w-full gap-4 pl-[52px]",children:b.jsxs("div",{className:"flex flex-col items-start",children:[o.type==="Article"&&sa(o,L0,x,$),o.name&&b.jsx(V2,{className:"mt-2.5 text-pretty leading-tight break-anywhere","data-test-activity-heading":!0,children:o.name}),o.preview&&o.type==="Article"?b.jsx("div",{className:"mt-1 line-clamp-3 leading-tight",children:o.preview.content}):b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(lp(o.content||"")??"")},ref:P,className:"ap-note-content text-pretty tracking-[-0.006em] text-gray-900 break-anywhere dark:text-gray-300 [&_p+p]:mt-3"}),o.type==="Note"&&sa(o,e0,x,$),o.type==="Article"&&b.jsx(i1,{className:"mt-3 w-full",id:"read-more",variant:"secondary",children:"Read more"}),!q&&b.jsx("div",{className:"space-between ml-[-8px] mt-2 flex",children:k&&b.jsx(Ui,{actor:X,commentCount:i,disabled:h,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0})})]})})]}),!f&&b.jsx("div",{className:`absolute left-[19px] ${q?"bottom-[8px] top-[51px]":g?"bottom-[5px] top-[51px]":W?"bottom-[5px] top-[71px]":"bottom-[-7px] top-[71px]"} z-0 w-[2px] rounded-sm bg-gray-200 dark:bg-gray-950`})]}),b.jsx(Fb,{currentIndex:u0.currentIndex,images:u0.images,isOpen:u0.isOpen,onClose:S0,onNavigate:T0})]}):r==="inbox"?b.jsx(b.Fragment,{children:o&&b.jsxs("div",{className:"group/article relative -mx-4 -my-px flex min-h-[112px] min-w-0 cursor-pointer items-center justify-between rounded-lg p-6 hover:bg-gray-75 dark:hover:bg-gray-950/50","data-layout":"inbox","data-object-id":o.id,onClick:L0,children:[b.jsxs("div",{className:"w-full min-w-0",children:[b.jsx("div",{className:"z-10 mb-1.5 flex w-full min-w-0 items-center gap-1.5 text-sm group-hover/article:border-transparent",children:O?b.jsx(j1,{className:"w-24"}):b.jsxs(b.Fragment,{children:[b.jsx(Zo,{actor:X,isCurrentUser:I,children:b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx(en,{author:X,size:"2xs"}),b.jsx("span",{className:"min-w-0 font-semibold text-gray-900 break-anywhere hover:underline dark:text-gray-600","data-test-activity-heading":!0,onClick:V0=>{Fo(X,K,V0)},children:X.name})]})}),a==="Announce"&&b.jsxs("span",{className:"z-10 flex items-center gap-1 text-gray-700 dark:text-gray-600",children:[CA,b.jsx(Zo,{actor:e,align:"center",isCurrentUser:c0,children:b.jsx("span",{className:"line-clamp-1 hover:underline",onClick:V0=>{Fo(e,K,V0)},children:e.name})})," reposted"]}),b.jsx("span",{className:'shrink-0 whitespace-nowrap text-gray-600 before:mr-1 before:content-["·"]',title:`${C}`,children:Vi(o,!o.authored)})]})}),b.jsxs("div",{className:"flex",children:[b.jsxs("div",{className:"flex min-h-[73px] w-full min-w-0 flex-col items-start justify-start gap-1",children:[b.jsx(V2,{className:"line-clamp-2 w-full max-w-[600px] text-pretty leading-tight break-anywhere","data-test-activity-heading":!0,children:O?b.jsx(j1,{className:"w-full max-w-96"}):o.name?o.name:b.jsx("span",{dangerouslySetInnerHTML:{__html:Cr(bu(o.content||""))}})}),b.jsx("div",{className:"ap-note-content line-clamp-2 w-full max-w-[600px] text-pretty text-base leading-normal text-gray-900 break-anywhere dark:text-gray-300 [&_p+p]:mt-3",children:O?b.jsx(j1,{count:2}):b.jsx("div",{dangerouslySetInnerHTML:{__html:Cr(bu(o.preview?.content??o.content??""))}})}),b.jsx("span",{className:"mt-1 shrink-0 whitespace-nowrap text-sm leading-none text-gray-600",children:O?b.jsx(j1,{className:"w-16"}):o.content&&`${Ln0(o.content)}`})]}),b.jsxs("div",{className:"invisible absolute right-3 top-8 z-[49] flex -translate-y-1/2 rounded-lg bg-white p-1 shadow-md group-hover/article:visible dark:bg-black",children:[k&&b.jsx(Ui,{actor:X,commentCount:i,layout:r,likeCount:z,object:o,repostCount:l,onLikeClick:i0}),b.jsx(Ib,{allowDelete:t,authoredByMe:I,followedByMe:N,layout:"inbox",trigger:v0,onCopyLink:m0,onDelete:Z,onFollow:h0,onUnfollow:d0})]})]})]}),_n0(o,O)]})}):b.jsx(b.Fragment,{})},NA=5*1024*1024,_A="Image must be less than 5MB in size.",aa0=async e=>{try{const t=await fetch(e,{mode:"cors"});if(!t.ok)throw new Error(`Failed to fetch image: ${t.status}`);const o=await t.blob();return new Promise((n,r)=>{const a=new FileReader;a.onload=()=>n(a.result),a.onerror=r,a.readAsDataURL(o)})}catch{return e}},sa0=e=>new Promise(t=>{const o=new Image;o.onload=()=>{URL.revokeObjectURL(o.src),t(o.width===o.height)},o.src=URL.createObjectURL(e)}),ia0="Image must be square.",A5=({children:e,replyTo:t,onReply:o,onReplyError:n,onOpenChange:r,...a})=>{const{data:i}=Ko0("index"),l=en0("index",i),z=Jo0("index",i),{data:u,isLoading:f}=b5("index","me"),[O,h]=p.useState(!1),q=p.useRef(null),g=p.useRef(null),[W,v]=p.useState(null),[y,k]=p.useState(!1),C=p.useRef(null),[L,x]=p.useState(""),[w,P]=p.useState(null),[H,o0]=p.useState(""),[Y,K]=p.useState(!1),[n0,J]=p.useState(!1),[i0,L0]=p.useState(!1),Z=qo(),m0=500;p.useEffect(()=>{a.open!==void 0&&h(a.open)},[a.open]),p.useEffect(()=>{if(a.open!==void 0?a.open:O){const S0=setTimeout(()=>{L0(!0)},300);return()=>clearTimeout(S0)}else L0(!1)},[O,a.open]);const $=!L.trim()||!i||n0||L.length>m0,X=p.useCallback(async()=>{const e0=L.trim();if(!(!e0||!i))try{J(!0),t?(await z.mutateAsync({inReplyTo:t.object.id,content:e0,imageUrl:w||void 0,altText:H||void 0}),o?.()):(await l.mutateAsync({content:e0,imageUrl:w||void 0,altText:H||void 0}),Z("/notes")),h(!1),r&&r(!1),Se.success(t?"Reply posted":"Note posted")}catch{t&&n?.()}finally{J(!1)}},[L,i,t,z,l,w,H,o,n,h,Z,r]),G=e0=>{x(e0.target.value)};p.useEffect(()=>{q.current&&(q.current.style.height="auto",q.current.style.height=`${q.current.scrollHeight}px`)},[L]),p.useEffect(()=>{if((a.open!==void 0?a.open:O)&&q.current){const S0=setTimeout(()=>{q.current?.focus()},100);return()=>clearTimeout(S0)}},[O,a.open]),p.useEffect(()=>{if(Y&&g.current){const e0=setTimeout(()=>{g.current?.focus()},100);return()=>clearTimeout(e0)}},[Y]),p.useEffect(()=>{const e0=T0=>{(T0.metaKey||T0.ctrlKey)&&T0.key==="Enter"&&(T0.preventDefault(),!$&&!y&&X())};if(a.open!==void 0?a.open:O)return document.addEventListener("keydown",e0),()=>document.removeEventListener("keydown",e0)},[O,a.open,$,y,X]);const N=p.useCallback(async e0=>{const S0=e0.clipboardData?.items;if(S0)for(let T0=0;T0<S0.length;T0++){const V0=S0[T0];if(V0.type.indexOf("image")!==-1){e0.preventDefault();const h1=V0.getAsFile();if(h1){if(h1.size>NA){Se.error(_A);return}const E=URL.createObjectURL(h1);v(E),await I(h1)}break}}},[]);p.useEffect(()=>{if(a.open!==void 0?a.open:O)return document.addEventListener("paste",N),()=>document.removeEventListener("paste",N)},[O,a.open,N]);const I=async e0=>{try{k(!0);const S0=await on0(e0);P(S0)}catch(S0){v(null);let T0="Failed to upload image. Try again.";if(S0&&typeof S0=="object"&&"statusCode"in S0)switch(S0.statusCode){case 413:T0="Image size exceeds limit.";break;case 415:T0="The file type is not supported.";break}Se.error(T0)}finally{k(!1)}},c0=async e0=>{const S0=e0.target.files;if(S0&&S0.length>0){const T0=S0[0];if(T0.size>NA){Se.error(_A),e0.target.value="";return}const V0=URL.createObjectURL(T0);v(V0),await I(T0)}},h0=e0=>{e0.stopPropagation(),v(null),P(null),o0(""),K(!1),W&&URL.revokeObjectURL(W),C.current&&(C.current.value="")},d0=e0=>{e0.stopPropagation(),K(!Y)},v0=()=>{q.current?.focus()};p.useEffect(()=>()=>{W&&URL.revokeObjectURL(W)},[W]);let u0="What's new?";if(t){const e0=t.object.attributedTo||{};typeof e0=="object"&&"preferredUsername"in e0&&"id"in e0&&(u0=`Reply to ${Jo(e0)}...`)}return b.jsxs(os,{open:a.open!==void 0?a.open:O,onOpenChange:e0=>{e0&&(x(""),v(null),P(null),o0(""),K(!1),W&&URL.revokeObjectURL(W),C.current&&(C.current.value="")),h(e0),r&&r(e0)},...a.open!==void 0?{}:a,children:[b.jsx(tm,{asChild:!0,children:e}),b.jsxs(pc,{className:"max-h-[80vh] min-h-[240px] gap-0 overflow-y-auto pb-0","data-testid":"new-note-modal",onClick:e0=>e0.stopPropagation(),children:[b.jsxs(V3,{className:"hidden",children:[b.jsx($3,{children:t?"Reply":"New note"}),b.jsx(nm,{children:"Post your thoughts to the Social web"})]}),t&&b.jsx(Bn0,{actor:t.actor,allowDelete:!1,commentCount:t.object.replyCount??0,isCompact:!0,layout:"reply",likeCount:t.object.likeCount??0,object:t.object,repostCount:t.object.repostCount??0,type:t.object.type==="Article"?"Article":"Note",onClick:()=>{}}),b.jsxs("div",{className:`flex ${W?"":"min-h-36"} cursor-text items-start gap-3`,onClick:v0,children:[b.jsx("div",{className:"sticky top-0",children:b.jsx(en,{author:i})}),b.jsx(XP,{asChild:!0,children:b.jsxs("div",{className:"-mt-0.5 flex w-full flex-col gap-0.5",children:[f?b.jsx(j1,{className:"w-10"}):b.jsx("span",{className:"min-w-0 truncate whitespace-nowrap font-semibold text-black break-anywhere dark:text-white",children:u?.name}),b.jsx(P6,{name:"content",asChild:!0,children:b.jsx(j6,{asChild:!0,children:b.jsx("textarea",{ref:q,autoFocus:!0,className:"ap-textarea w-full resize-none bg-transparent text-[1.5rem] break-anywhere","data-testid":"note-textarea",placeholder:u0,rows:1,value:L,onChange:G,onPaste:N})})}),b.jsx(P6,{name:"image",asChild:!0,children:b.jsx(j6,{asChild:!0,children:b.jsx("input",{ref:C,accept:"image/jpeg,image/png,image/webp,image/gif",className:"hidden",type:"file",onChange:c0})})})]})})]}),W&&b.jsxs("div",{className:"group relative mt-6 flex min-h-[200px] w-full items-center justify-center",children:[b.jsx("img",{alt:"Image attachment preview",className:`max-h-[320px] w-full rounded-sm object-cover outline outline-1 -outline-offset-1 outline-black/10 ${y&&"opacity-10"}`,src:W}),y&&b.jsx("div",{className:"absolute leading-[0]",children:b.jsx(Ip,{size:"md"})}),b.jsx(i1,{className:"absolute right-3 top-3 size-8 bg-black/60 text-white opacity-0 hover:bg-black/80 group-hover:opacity-100",onClick:h0,children:b.jsx(F9,{})}),!y&&b.jsx(i1,{className:`absolute bottom-3 left-3 h-6 px-2 py-0 text-white ${Y?"bg-green-500 hover:bg-green-500":"bg-black/60 hover:bg-black/80"}`,onClick:d0,children:"Alt"})]}),W&&!y&&Y&&b.jsx("div",{className:"mt-1",children:b.jsx(tM,{ref:g,className:"w-full border-0 bg-transparent px-0 focus-visible:border-0 focus-visible:bg-transparent focus-visible:shadow-none focus-visible:outline-0 dark:bg-[#101114] dark:text-white dark:placeholder:text-gray-800",placeholder:"Type alt text for image (optional)",type:"text",value:H,onChange:e0=>o0(e0.target.value)})}),b.jsxs(Q3,{className:`${i0?"sticky":"static"} bottom-0 flex-row bg-background py-6 dark:bg-[#101114]`,children:[b.jsx(i1,{className:"mr-auto w-[34px] !min-w-0",variant:"outline",onClick:()=>C.current?.click(),children:b.jsx(RZ,{})}),b.jsxs("div",{className:"flex items-center space-x-3",children:[b.jsxs("div",{className:`text-sm ${L.length>=m0?"text-red-500":L.length>=m0*.9?"text-yellow-600":"text-gray-500"}`,children:[L.length,"/",m0]}),b.jsx(i1,{className:"min-w-16","data-testid":"post-button",disabled:$||y,onClick:X,children:n0?b.jsx(Ip,{color:"light",size:"sm"}):"Post"})]})]})]})]})};function zu(e){if(!e)return{};try{return JSON.parse(e)}catch{return{}}}function En0(e,t){const o=zu(e);return JSON.stringify({...o,...t})}const NW=()=>{const{data:e}=ye(),{mutateAsync:t}=_g(),o=l0.useMemo(()=>e?.accessibility?zu(e.accessibility).apOnboarding||{}:{},[e?.accessibility]),n=l0.useCallback(async r=>{if(!e)return;const a=zu(e.accessibility),i=En0(e.accessibility,{apOnboarding:{...a.apOnboarding,...r}});await t({...e,accessibility:i})},[e,t]);return{isOnboarded:!!o.welcomeStepsFinished,isExplainerClosed:!!o.exploreExplainerClosed,setOnboarded:r=>n({welcomeStepsFinished:r}),setExplainerClosed:r=>n({exploreExplainerClosed:r})}},_W=()=>b.jsx("div",{className:"h-full pt-14",children:b.jsx(En,{})}),Sn0=Object.freeze(Object.defineProperty({__proto__:null,default:_W,useOnboardingStatus:NW},Symbol.toStringTag,{value:"Module"})),Tn0=()=>{const e=qo();function t(){e(`/notes/${encodeURIComponent("https://activitypub.ghost.org/.ghost/activitypub/note/6d6d7f57-b656-4caa-ba9e-efa1d9a4b3fb")}`)}return b.jsxs("div",{className:"z-20 w-full bg-white dark:bg-black",children:[b.jsxs("div",{className:"flex w-full flex-col gap-0.5 border-t border-gray-200 bg-white px-3 pt-6 dark:border-gray-950 dark:bg-black",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(BZ,{className:"text-purple-500",size:20,strokeWidth:1.5}),b.jsx(V2,{children:"Beta feedback"})]}),b.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-600",children:"Something not working? Let us know"}),b.jsx(i1,{className:"mt-2 dark:bg-gray-925/70 dark:hover:bg-gray-900",variant:"secondary",onClick:t,children:"Send feedback"})]}),b.jsxs("div",{className:"-mb-1 ml-3 flex items-center gap-1.5 pb-2 pt-4 text-xs text-gray-400",children:[b.jsx("a",{className:"text-xs font-medium text-gray-700 hover:text-black dark:text-gray-600 dark:hover:text-white",href:"https://ghost.org/help/social-web/",rel:"noreferrer",target:"_blank",children:"Help"}),"⋅",b.jsx("a",{className:"text-xs font-medium text-gray-700 hover:text-black dark:text-gray-600 dark:hover:text-white",href:"https://activitypub.ghost.org/archive",rel:"noreferrer",target:"_blank",children:"Updates"})]})]})},Zp=({children:e,url:t=null,onClick:o,"data-testid":n,isSelected:r=!1})=>{const a=l0.Children.toArray(e),i=b.jsx("div",{className:`relative flex w-full max-w-[620px] cursor-pointer flex-col before:absolute before:inset-x-[-16px] before:inset-y-[-1px] before:rounded-md before:bg-gray-50 before:transition-opacity hover:z-10 hover:cursor-pointer hover:border-b-transparent hover:before:opacity-100 dark:before:bg-gray-950 ${r?"z-10 before:opacity-100":"before:opacity-0"}`,"data-testid":n,onClick:()=>{!t&&o&&o()},children:b.jsxs("div",{className:"relative z-10 flex w-full items-center gap-3 py-3",children:[a[0],a[1],a[2]]})});return t?b.jsx("a",{href:t,rel:"noreferrer",target:"_blank",onClick:l=>{o&&(l.preventDefault(),o())},children:i}):i},Pn0=()=>{const e=qo(),{suggestedProfilesQuery:t}=z5("index",3),{data:o,isLoading:n}=t,r=n?Array(3).fill(null):o||[],{resetStack:a}=y3(),i="[@media(max-height:740px)]:hidden";return!n&&(!o||o.length===0)?null:b.jsxs("div",{className:`border-t border-gray-200 px-3 pt-6 dark:border-gray-950 ${i}`,children:[b.jsxs("div",{className:"mb-3 flex flex-col gap-0.5",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Tp,{className:"text-purple-500",size:20,strokeWidth:1.5}),b.jsx(V2,{children:"Follow suggestions"})]}),b.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-600",children:"Accounts you might be interested in"})]}),b.jsx("ul",{className:"grow",children:r.map((l,z)=>{const u=l?.id||`loading-${z}`,f=l?.name||"",O=l?.handle||"",h=l?.avatarUrl||"";let q;switch(z){case 0:q="[@media(max-height:740px)]:hidden";break;case 1:q="[@media(max-height:800px)]:hidden";break;case 2:q="[@media(max-height:860px)]:hidden";break}return b.jsx(p.Fragment,{children:b.jsx("li",{className:q,children:b.jsx(Zo,{actor:l,align:"center",isCurrentUser:!1,side:"left",children:b.jsx("div",{children:b.jsxs(Zp,{onClick:()=>{!n&&l&&Fo(l,e)},children:[n?b.jsx(j1,{className:"z-10 size-10"}):b.jsx(en,{author:{icon:{url:h},name:f,handle:O},showFollowButton:!0}),b.jsxs("div",{className:"flex min-w-0 flex-col",children:[b.jsx("span",{className:"block max-w-[190px] truncate font-semibold text-black dark:text-white",children:n?b.jsx(j1,{className:"w-24"}):f}),b.jsx("span",{className:"block max-w-[190px] truncate text-sm text-gray-700 dark:text-gray-600",children:n?b.jsx(j1,{className:"w-40"}):O})]})]})})})},u)},u)})}),b.jsx(i1,{className:"p-0 font-medium text-purple hover:text-black dark:hover:text-white",variant:"link",onClick:()=>{a(),e("/explore")},children:"Find more →"})]})},jn0=({profile:e,update:t,isLoading:o,onOpenChange:n})=>{const r=()=>{t(e.id,{followedByMe:!0})},a=()=>{t(e.id,{followedByMe:!1})},i=qo();return b.jsx(Zo,{actor:e,align:"center",isCurrentUser:!1,side:"left",children:b.jsx("div",{children:b.jsxs(Zp,{onClick:()=>{n?.(!1),i(`/profile/${e.handle}`)},children:[b.jsx(en,{author:{icon:{url:e.avatarUrl},name:e.name,handle:e.handle},onClick:()=>n?.(!1)}),b.jsxs("div",{className:"flex grow flex-col break-anywhere",children:[b.jsx("span",{className:"line-clamp-1 font-semibold text-black dark:text-white",children:o?b.jsx(j1,{className:"w-full max-w-64"}):e.name}),b.jsx("span",{className:"line-clamp-1 text-sm text-gray-700 dark:text-gray-600",children:o?b.jsx(j1,{className:"w-24"}):e.handle})]}),o?b.jsx("div",{className:"inline-flex items-center",children:b.jsx(j1,{className:"w-12"})}):b.jsx(O5,{className:"ml-auto",following:e.followedByMe,handle:e.handle,type:"secondary",onFollow:r,onUnfollow:a})]},e.id)})})},Xn0=({onOpenChange:e})=>{const{suggestedProfilesQuery:t,updateSuggestedProfile:o}=z5("index",5),{data:n=[],isLoading:r}=t;return!r&&(!n||n.length===0)?null:b.jsx("div",{className:"mb-[-15px] flex flex-col gap-3 pt-2",children:b.jsx("div",{className:"flex flex-col",children:(r?Array(5).fill(null):n||[]).map((a,i)=>b.jsx(l0.Fragment,{children:b.jsx(jn0,{isLoading:r,profile:a||{id:"",name:"",handle:"",avatarUrl:"",bio:"",followerCount:0,followingCount:0,followedByMe:!1},update:o,onOpenChange:e})},a?.id||`loading-${i}`))})})};function Dn0(e,t,o,n){var r=this,a=p.useRef(null),i=p.useRef(0),l=p.useRef(0),z=p.useRef(null),u=p.useRef([]),f=p.useRef(),O=p.useRef(),h=p.useRef(e),q=p.useRef(!0);h.current=e;var g=typeof window<"u",W=!t&&t!==0&&g;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var v=!!(o=o||{}).leading,y=!("trailing"in o)||!!o.trailing,k="maxWait"in o,C="debounceOnServer"in o&&!!o.debounceOnServer,L=k?Math.max(+o.maxWait||0,t):null;p.useEffect(function(){return q.current=!0,function(){q.current=!1}},[]);var x=p.useMemo(function(){var w=function(J){var i0=u.current,L0=f.current;return u.current=f.current=null,i.current=J,l.current=l.current||J,O.current=h.current.apply(L0,i0)},P=function(J,i0){W&&cancelAnimationFrame(z.current),z.current=W?requestAnimationFrame(J):setTimeout(J,i0)},H=function(J){if(!q.current)return!1;var i0=J-a.current;return!a.current||i0>=t||i0<0||k&&J-i.current>=L},o0=function(J){return z.current=null,y&&u.current?w(J):(u.current=f.current=null,O.current)},Y=function J(){var i0=Date.now();if(v&&l.current===i.current&&K(),H(i0))return o0(i0);if(q.current){var L0=t-(i0-a.current),Z=k?Math.min(L0,L-(i0-i.current)):L0;P(J,Z)}},K=function(){n&&n({})},n0=function(){if(g||C){var J=Date.now(),i0=H(J);if(u.current=[].slice.call(arguments),f.current=r,a.current=J,i0){if(!z.current&&q.current)return i.current=a.current,P(Y,t),v?w(a.current):O.current;if(k)return P(Y,t),w(a.current)}return z.current||P(Y,t),O.current}};return n0.cancel=function(){var J=z.current;J&&(W?cancelAnimationFrame(z.current):clearTimeout(z.current)),i.current=0,u.current=a.current=f.current=z.current=null,J&&n&&n({})},n0.isPending=function(){return!!z.current},n0.flush=function(){return z.current?o0(Date.now()):O.current},n0},[v,k,t,L,y,W,g,C,n]);return x}function In0(e,t){return e===t}function Fn0(e,t,o){var n=In0,r=p.useRef(e),a=p.useState({})[1],i=Dn0(p.useCallback(function(z){r.current=z,a({})},[a]),t,o,a),l=p.useRef(e);return n(l.current,e)||(i(e),l.current=e),[r.current,i]}const Qi=80,Hn0=({onOpenChange:e,query:t,setQuery:o})=>{const n=p.useRef(null),r=p.useRef([]),a=p.useRef(0),i=qo(),[l]=Fn0(t,300),z=t.length>=2,{searchQuery:u,updateAccountSearchResult:f}=Yo0("index",z?l:""),{data:O,isFetching:h,isFetched:q}=u,{suggestedProfilesQuery:g}=z5("index",5),{data:W,isLoading:v}=g,y=v||W&&W.length>0,{topicsQuery:k}=u5(),{data:C}=k,L=b5("index","me"),{data:x}=L,[w,P]=p.useState([]),[H,o0]=p.useState(null),[Y,K]=p.useState(0),n0=p.useMemo(()=>{const X=C?.topics||[];if(!z||X.length===0)return[];const G=t.toLowerCase();return X.filter(N=>N.slug==="following"?!1:N.name.toLowerCase().startsWith(G)||N.slug.toLowerCase().startsWith(G))},[t,z,C?.topics]),J=p.useMemo(()=>[...n0.map(X=>({type:"topic",data:X})),...w.map(X=>({type:"account",data:X}))],[n0,w]);p.useEffect(()=>{if(!z){P([]),o0(null);return}q&&(O?.accounts&&O.accounts.length>0?(P(O.accounts),o0("results"),K(0)):(P([]),o0("none"),K(0)))},[O?.accounts,q,z]);const i0=h&&z,L0=t.length<2||!H&&z&&n0.length===0,Z=!L0&&H==="none"&&n0.length===0,m0=!L0&&(w.length>0||n0.length>0);p.useEffect(()=>{n.current?.focus()},[]),p.useEffect(()=>{const X=r.current[Y];if(!X)return;const G=X.closest("[data-radix-scroll-area-viewport]")||X.closest(".overflow-y-auto");if(!G){X.scrollIntoView({block:"nearest"});return}const N=G.getBoundingClientRect(),I=X.getBoundingClientRect();I.top<N.top+Qi?G.scrollTo({top:G.scrollTop-(N.top+Qi-I.top),behavior:"smooth"}):I.bottom>N.bottom-Qi&&G.scrollTo({top:G.scrollTop+(I.bottom-N.bottom+Qi),behavior:"smooth"})},[Y]);const $=X=>{if(!(!m0||J.length===0)){if(X.key==="ArrowDown"||X.key==="ArrowUp"){X.preventDefault();const G=Date.now();if(G-a.current<50)return;a.current=G,X.key==="ArrowDown"?K(N=>(N+1)%J.length):K(N=>(N-1+J.length)%J.length)}else if(X.key==="Enter"){const G=J[Y];if(!G)return;X.preventDefault(),e?.(!1),G.type==="topic"?i(`/explore/${G.data.slug}`):i(`/profile/${G.data.handle}`)}}};return b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:'sticky -top-6 z-30 -mt-6 flex h-[72px] shrink-0 items-center gap-2 bg-white pb-2 pt-3 before:pointer-events-none before:absolute before:-inset-x-6 before:bottom-0 before:h-0 before:border-b before:border-b-gray-150 before:content-[""] dark:bg-[#101114] dark:before:border-b-gray-950',children:[b.jsx(Sd,{className:"text-gray-600",size:18,strokeWidth:1.5}),b.jsx(tM,{ref:n,autoComplete:"off",className:"flex h-10 w-full items-center rounded-lg border-0 bg-transparent px-0 py-1.5 text-lg focus-visible:border-0 focus-visible:bg-transparent focus-visible:shadow-none focus-visible:outline-0 dark:bg-[#101114] dark:text-white dark:placeholder:text-gray-800",placeholder:"Search by name, handle, or URL...",title:"Search",type:"text",value:t,onChange:X=>o(X.target.value),onKeyDown:$}),i0&&b.jsx(Ip,{className:"!absolute right-0 mr-0.5 shrink-0",size:"sm"})]}),b.jsxs("div",{className:"h-full",children:[Z&&b.jsx("div",{className:"flex h-full items-center justify-center pb-14",children:b.jsxs(e00,{children:[b.jsx(t00,{children:b.jsx(Td,{})}),"No users matching this handle or account URL"]})}),m0&&b.jsx("div",{className:"mt-[-14px] pb-2",children:J.map((X,G)=>{const N=G===Y;if(X.type==="topic")return b.jsx("div",{ref:h0=>r.current[G]=h0,children:b.jsxs(Zp,{isSelected:N,onClick:()=>{e?.(!1),i(`/explore/${X.data.slug}`)},children:[b.jsx("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-full bg-gray-100 dark:bg-gray-900",children:b.jsx(Tp,{className:"text-gray-700 dark:text-gray-500",size:18,strokeWidth:1.5})}),b.jsxs("div",{className:"flex flex-col",children:[b.jsx("span",{className:"font-semibold text-black dark:text-white",children:X.data.name}),b.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-600",children:"Topic"})]})]})},X.data.slug);const I=X.data,c0=I.handle===x?.handle;return b.jsx(Zo,{actor:I,align:"center",isCurrentUser:c0,side:"left",children:b.jsx("div",{ref:h0=>r.current[G]=h0,children:b.jsxs(Zp,{isSelected:N,onClick:()=>{e?.(!1),i(`/profile/${I.handle}`)},children:[b.jsx(en,{author:{icon:{url:I.avatarUrl},name:I.name,handle:I.handle}}),b.jsxs("div",{className:"flex flex-col break-anywhere",children:[b.jsx("span",{className:"line-clamp-1 font-semibold text-black dark:text-white",children:I.name}),b.jsx("span",{className:"line-clamp-1 text-sm text-gray-700 dark:text-gray-600",children:I.handle})]}),I.blockedByMe||I.domainBlockedByMe?b.jsx(i1,{className:"pointer-events-none ml-auto min-w-[90px]",variant:"destructive",children:"Blocked"}):c0?null:b.jsx(O5,{className:"ml-auto",following:I.followedByMe,handle:I.handle,type:"secondary",onFollow:()=>f(I.id,{followedByMe:!0}),onUnfollow:()=>f(I.id,{followedByMe:!1})})]})})},I.id)})}),L0&&y&&b.jsxs(b.Fragment,{children:[b.jsx(V2,{children:"More people to follow"}),b.jsx(Xn0,{onOpenChange:e})]})]})]})},Un0=()=>b.jsxs("div",{className:"inline-flex h-9 w-full items-center justify-start gap-2 rounded-full bg-gray-100 px-3 text-md font-normal text-gray-600 hover:bg-gray-200 hover:text-gray-600 dark:bg-gray-925/70 dark:text-gray-700 dark:hover:bg-gray-925 [&_svg]:size-[18px]",children:[b.jsx(Sd,{size:18,strokeWidth:1.5})," Search the social web"]}),xn=p.forwardRef(({to:e,children:t,count:o,...n},r)=>{const a=Pe(),{resetStack:i}=y3(),l=hM(),z=e&&e.startsWith("/")?`${l}${e}`:e,u=z&&(a.pathname===z||a.pathname.startsWith(`${z}/`)),f=R0("justify-start text-md font-medium text-gray-800 dark:hover:bg-gray-925/70 dark:text-gray-500 h-9 [&_svg]:size-[18px]",u&&"bg-gray-100 dark:bg-gray-925/70 dark:text-white text-black font-semibold"),O=o&&o>0?b.jsx("span",{className:R0("ml-auto bg-purple-500 text-white text-xs font-semibold py-1 px-1.5 rounded-full min-w-[20px] h-5 flex items-center justify-center"),children:I3(o)}):null;return z?b.jsx(i1,{className:f,variant:"ghost",asChild:!0,children:b.jsxs($a,{to:z,onClick:()=>{i(),L00(z)},children:[t,O]})}):b.jsxs(i1,{ref:r,className:f,variant:"ghost",onClick:n.onClick,...n,children:[t,O]})});xn.displayName="SidebarMenuLink";const BW=({isMobileSidebarOpen:e})=>{const{allFlags:t,flags:o}=jo0(),[n,r]=p.useState(!1),[a,i]=p.useState(""),{data:l}=ye(),z=Pe(),u=hM(),{data:f}=yW(l?.slug||""),O=nn0(l?.slug||""),{topicsQuery:h}=u5(),{data:q,isLoading:g}=h,W=!g&&q&&q.topics.length===0;p.useEffect(()=>{z.pathname===`${u}/notifications`&&f&&f>0&&O.mutate()},[z.pathname,u,f,O]);const v=p.useCallback(()=>{f&&f>0&&O.mutate()},[f,O]);return b.jsx("div",{className:`sticky top-0 flex min-h-screen w-[320px] flex-col border-l border-gray-200 pr-8 transition-transform duration-300 ease-in-out max-lg:fixed max-lg:inset-y-0 max-lg:right-0 max-lg:z-50 max-lg:border-0 max-lg:bg-white max-lg:shadow-xl max-md:bottom-[72px] max-md:min-h-[auto] max-md:overflow-y-scroll dark:border-gray-950 max-lg:dark:bg-black ${e?"max-lg:translate-x-0":"max-lg:translate-x-full"}`,children:b.jsxs("div",{className:"flex grow flex-col justify-between",children:[b.jsxs("div",{className:"isolate flex w-full flex-col items-start gap-6 pl-6 pt-6",children:[b.jsx("div",{className:"flex h-[52px] w-full items-center",children:b.jsxs(os,{open:n,onOpenChange:r,children:[b.jsx(tm,{className:"mt-0.5 w-full",children:b.jsx(Un0,{})}),b.jsx(pc,{className:"flex h-full max-h-[452px] flex-col overflow-y-auto pb-0",children:b.jsx(Hn0,{query:a,setQuery:i,onOpenChange:r})})]})}),b.jsxs("div",{className:"flex w-full flex-col gap-px",children:[b.jsxs(xn,{to:"/reader",children:[b.jsx(VG,{size:18,strokeWidth:1.5}),"Reader"]}),b.jsxs(xn,{to:"/notes",children:[b.jsx(Ed,{size:18,strokeWidth:1.5}),"Notes"]}),b.jsxs(xn,{count:z.pathname!==`${u}/notifications`?f:void 0,to:"/notifications",onClick:v,children:[b.jsx(HG,{size:18,strokeWidth:1.5}),"Notifications"]}),W?b.jsx(i1,{className:"inline-flex w-full items-center gap-2 rounded-sm px-3 py-2.5 text-left text-md font-medium text-gray-800 transition-colors hover:bg-gray-100 dark:text-gray-500 dark:hover:bg-gray-925/70",variant:"ghost",asChild:!0,children:b.jsxs("a",{href:"https://explore.ghost.org/social-web",rel:"noopener noreferrer",target:"_blank",children:[b.jsx(Tp,{size:18,strokeWidth:1.5}),"Explore",b.jsx(Bd,{className:"ml-auto",size:14,strokeWidth:1.5})]})}):b.jsxs(xn,{to:"/explore",children:[b.jsx(Tp,{size:18,strokeWidth:1.5}),"Explore"]}),b.jsxs(xn,{to:"/profile",children:[b.jsx(Pd,{size:18,strokeWidth:1.5}),"Profile"]}),b.jsxs(xn,{to:"/preferences",children:[b.jsx(ZZ,{size:18,strokeWidth:1.5}),"Preferences"]})]}),b.jsx(A5,{children:b.jsxs(i1,{className:"h-9 rounded-full bg-purple-500 px-3 text-md text-white hover:bg-purple-600 dark:hover:bg-purple-600",children:[b.jsx(uZ,{}),"New note"]})}),b.jsx(Pn0,{}),t.map(y=>o[y]?b.jsxs("div",{className:"flex items-center justify-between gap-1 pl-3 opacity-50",children:[b.jsx("span",{className:"font-mono text-xs",children:y}),b.jsx("span",{className:"text-green-800 inline-flex items-center rounded bg-green-100 px-1 py-0.5 text-xs font-medium",children:"ON"})]},y):b.jsx(b.Fragment,{}))]}),b.jsx("div",{className:"sticky bottom-0 flex items-center gap-2 bg-white pb-4 pl-4 dark:bg-black",children:b.jsx(Tn0,{})})]})})};BW.displayName="Sidebar";const Vn0=({children:e,...t})=>{const{isOnboarded:o}=NW(),n=hM(),{data:r,isLoading:a}=ye(),i=p.useRef(null),[l,z]=p.useState(!1),u=mW(),{topicsQuery:f}=u5(),{data:O}=f,h=O&&O.topics.length>0,{isNewNoteModalOpen:q,setIsNewNoteModalOpen:g}=CW(),W=()=>{z(!l)},v=()=>{z(!1)};return a||!r?null:o?b.jsxs("div",{ref:i,className:`h-screen w-full ${o&&"overflow-y-auto"}`,"data-scrollable-container":!0,children:[b.jsx(x00,{containerRef:i}),b.jsx("div",{className:"relative mx-auto flex max-w-page flex-col",...t,children:o?b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"block grid-cols-[auto_320px] items-start lg:grid",children:[b.jsxs("div",{className:"z-0 min-w-0",children:[b.jsx(Io0,{showBorder:!(u==="reader"&&h)&&u!=="explore",onToggleMobileSidebar:W}),b.jsx("div",{className:"px-[min(4vw,32px)]",children:e})]}),b.jsx(BW,{isMobileSidebarOpen:l,onCloseMobileSidebar:v})]}),l&&b.jsx("div",{className:"fixed inset-0 z-40 lg:hidden",onClick:v})]}):b.jsx(_W,{})}),b.jsx(A5,{open:q,onOpenChange:g})]}):b.jsx(ro,{to:`${n}/welcome`,replace:!0})},ia=({children:e})=>b.jsx("div",{className:"flex max-h-12 max-w-12 grow-0 items-center justify-center rounded-full bg-gray-100 p-3 text-gray-700 dark:bg-gray-925/70 [&_svg]:size-8 [&_svg]:stroke-1",children:e}),pa=({children:e,className:t})=>b.jsx("div",{className:`mx-auto mt-[24vh] flex max-w-[500px] flex-col items-center gap-5 text-center text-gray-700 ${t||""}`,children:e}),EW=({statusCode:e,errorCode:t})=>{const o=Qq(),n=yg(),r=a=>{a.preventDefault(),n("/analytics/",{crossApp:!0})};return o?b.jsx(Vn0,{children:b.jsxs(pa,{children:[b.jsx(ia,{children:b.jsx(QZ,{})}),b.jsx(V2,{className:"-mb-4",children:"Oops, page not found!"}),b.jsx("div",{children:"We couldn't find the page you were looking for. It may have been moved, deleted, or never existed in the first place."})]})}):e===429?b.jsxs(pa,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(ia,{children:b.jsx(U9,{})}),b.jsx(V2,{className:"-mb-4",children:"Rate limit exceeded"}),b.jsx("div",{children:"You've made too many requests. Please try again in a moment."}),b.jsx(i1,{asChild:!0,children:b.jsx("a",{href:"https://ghost.org/help/social-web/",rel:"noopener noreferrer",target:"_blank",children:"Learn more →"})})]}):e===403?t==="ROLE_MISSING"||t==="SITE_MISSING"?b.jsxs(pa,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(ia,{children:b.jsx(D9,{})}),b.jsx(V2,{className:"-mb-4",children:"Site not configured correctly"}),b.jsx("div",{children:"This feature can't be used because the site isn't set up correctly. If you manage this site, check your settings or server logs, or contact support."}),b.jsx(i1,{asChild:!0,children:b.jsx("a",{href:"https://ghost.org/help/social-web/",rel:"noopener noreferrer",target:"_blank",children:"Learn more →"})})]}):b.jsxs(pa,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(ia,{children:b.jsx(IG,{})}),b.jsx(V2,{className:"-mb-4",children:"Account suspended"}),b.jsx("div",{children:"Your account has been suspended due to policy violations."}),b.jsx(i1,{asChild:!0,children:b.jsx("a",{href:"https://ghost.org/help/social-web/",rel:"noopener noreferrer",target:"_blank",children:"Learn more →"})})]}):e===410&&t==="INVALID_VERSION"?b.jsxs(pa,{className:"mt-[50vh] -translate-y-1/2",children:[b.jsx(ia,{children:b.jsx(iZ,{})}),b.jsx(V2,{className:"-mb-4",children:"New version available"}),b.jsx("div",{children:"We've made some updates! Refresh your page to see what's new"}),b.jsx(i1,{asChild:!0,children:b.jsx("button",{type:"button",onClick:()=>window.location.reload(),children:"Refresh your page"})})]}):b.jsx("div",{className:"admin-x-container-error",children:b.jsxs("div",{className:"admin-x-error max-w-xl",children:[b.jsx("h1",{children:"Loading interrupted"}),b.jsx("p",{children:"They say life is a series of trials and tribulations. This moment right here? It's a tribulation. Our app was supposed to load, and yet here we are. Loadless. Click back to the dashboard to try again."}),b.jsx("a",{className:"cursor-pointer text-green",onClick:r,children:"← Back to the homepage"})]})})},Qn0=Object.freeze(Object.defineProperty({__proto__:null,default:EW},Symbol.toStringTag,{value:"Module"})),$n0="activitypub",SW=[{path:$n0,element:b.jsx(En,{}),errorElement:b.jsx(EW,{}),handle:"activitypub-basepath",children:[{index:!0,element:b.jsx(ro,{to:"reader"})},{path:"inbox",element:b.jsx(ro,{to:"../reader",replace:!0})},{path:"feed",element:b.jsx(ro,{to:"../notes",replace:!0})},{path:"reader",lazy:w1(()=>m1(()=>import("./index-CgCHCdle.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),pageTitle:"Reader"},{path:"reader/:postId",lazy:w1(()=>m1(()=>import("./index-CgCHCdle.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),pageTitle:"Reader"},{path:"notes",lazy:w1(()=>m1(()=>import("./feed-BsgqABLQ.js"),__vite__mapDeps([7,8]),import.meta.url)),pageTitle:"Notes"},{path:"notes/:postId",lazy:w1(()=>m1(()=>import("./note-C-BLqULD.js"),__vite__mapDeps([9,2,3,8]),import.meta.url)),pageTitle:"Note"},{path:"notifications",lazy:w1(()=>m1(()=>import("./index-tX0pajfP.js"),__vite__mapDeps([10,11,12,13]),import.meta.url)),pageTitle:"Notifications"},{path:"explore",lazy:w1(()=>m1(()=>import("./index-DbgA2vK8.js"),__vite__mapDeps([14,4,15]),import.meta.url)),pageTitle:"Explore"},{path:"explore/:topic",lazy:w1(()=>m1(()=>import("./index-DbgA2vK8.js"),__vite__mapDeps([14,4,15]),import.meta.url)),pageTitle:"Explore"},{path:"profile",lazy:w1(()=>m1(()=>import("./index-upXLfQxx.js"),__vite__mapDeps([16,17,18,19,11,20,21,22,23,24,25,26,27,28,29,8,6,30,1,31,12,32,13,15,3,33]),import.meta.url)),pageTitle:"Profile"},{path:"profile/likes",lazy:w1(()=>m1(()=>import("./index-upXLfQxx.js"),__vite__mapDeps([16,17,18,19,11,20,21,22,23,24,25,26,27,28,29,8,6,30,1,31,12,32,13,15,3,33]),import.meta.url)),pageTitle:"Profile"},{path:"profile/following",lazy:w1(()=>m1(()=>import("./index-upXLfQxx.js"),__vite__mapDeps([16,17,18,19,11,20,21,22,23,24,25,26,27,28,29,8,6,30,1,31,12,32,13,15,3,33]),import.meta.url)),pageTitle:"Profile"},{path:"profile/followers",lazy:w1(()=>m1(()=>import("./index-upXLfQxx.js"),__vite__mapDeps([16,17,18,19,11,20,21,22,23,24,25,26,27,28,29,8,6,30,1,31,12,32,13,15,3,33]),import.meta.url)),pageTitle:"Profile"},{path:"profile/:handle/:tab?",lazy:w1(()=>m1(()=>import("./index-upXLfQxx.js"),__vite__mapDeps([16,17,18,19,11,20,21,22,23,24,25,26,27,28,29,8,6,30,1,31,12,32,13,15,3,33]),import.meta.url)),pageTitle:"Profile"},{path:"preferences",lazy:w1(()=>m1(()=>import("./index-D9S88kRl.js"),__vite__mapDeps([34,35,31,29,33,18,19,11]),import.meta.url)),pageTitle:"Preferences"},{path:"preferences/moderation",lazy:w1(()=>m1(()=>import("./moderation-DwlKZoB5.js"),__vite__mapDeps([36,20,21,22,23,24,25,26,11,27,28,29,8,6,30,1,17,31,12,32,13,15,3]),import.meta.url)),pageTitle:"Moderation",showBackButton:!0},{path:"preferences/bluesky-sharing",lazy:w1(()=>m1(()=>import("./bluesky-sharing-yeM8KkY8.js"),__vite__mapDeps([37,18,19,11,29]),import.meta.url)),showBackButton:!0},{path:"welcome",lazy:w1(()=>m1(()=>Promise.resolve().then(()=>Sn0),void 0,import.meta.url)),pageTitle:"Welcome",children:[{path:"",element:b.jsx(ro,{to:"1",replace:!0})},{path:"1",lazy:w1(()=>m1(()=>import("./step-1-DGbl6AAj.js"),__vite__mapDeps([38,29]),import.meta.url))},{path:"2",lazy:w1(()=>m1(()=>import("./step-2-Rf8oissi.js"),__vite__mapDeps([39,40,13,32]),import.meta.url))},{path:"3",lazy:w1(()=>m1(()=>import("./step-3-tMPmbeBc.js"),__vite__mapDeps([41,40,13,32,23,6,8]),import.meta.url))},{path:"*",element:b.jsx(ro,{to:"1",replace:!0})}]},{path:"*",lazy:w1(()=>m1(()=>Promise.resolve().then(()=>Qn0),void 0,import.meta.url))}]}];function Gn0(){return b.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M3.6349 20.3723C3.80192 20.5393 4.00019 20.6718 4.21841 20.7622C4.43663 20.8525 4.67052 20.8991 4.90672 20.8991C5.14291 20.8991 5.3768 20.8525 5.59502 20.7622C5.81324 20.6718 6.01152 20.5393 6.17853 20.3723C6.34555 20.2052 6.47804 20.007 6.56843 19.7888C6.65882 19.5705 6.70534 19.3366 6.70534 19.1004C6.70534 18.8643 6.65882 18.6304 6.56843 18.4121C6.47804 18.1939 6.34555 17.9956 6.17853 17.8286C5.84123 17.4913 5.38374 17.3018 4.90672 17.3018C4.42969 17.3018 3.9722 17.4913 3.6349 17.8286C3.29759 18.1659 3.10809 18.6234 3.10809 19.1004C3.10809 19.5775 3.29759 20.035 3.6349 20.3723ZM17.7153 6.17951C17.8823 6.34653 18.0806 6.47901 18.2988 6.5694C18.517 6.65979 18.7509 6.70632 18.9871 6.70632C19.2233 6.70632 19.4572 6.65979 19.6754 6.5694C19.8936 6.47901 20.0919 6.34653 20.2589 6.17951C20.4259 6.01249 20.5584 5.81421 20.6488 5.596C20.7392 5.37778 20.7857 5.14389 20.7857 4.90769C20.7857 4.67149 20.7392 4.43761 20.6488 4.21939C20.5584 4.00117 20.4259 3.80289 20.2589 3.63587C19.9216 3.29857 19.4641 3.10907 18.9871 3.10907C18.5101 3.10907 18.0526 3.29857 17.7153 3.63587C17.378 3.97318 17.1885 4.43067 17.1885 4.90769C17.1885 5.38472 17.378 5.8422 17.7153 6.17951ZM7.50655 12.0023C7.50655 13.1946 7.98019 14.3381 8.82329 15.1812C9.66639 16.0243 10.8099 16.4979 12.0022 16.4979C13.1945 16.4979 14.338 16.0243 15.1811 15.1812C16.0242 14.3381 16.4978 13.1946 16.4978 12.0023C16.4978 10.81 16.0242 9.66647 15.1811 8.82337C14.338 7.98027 13.1945 7.50663 12.0022 7.50663C10.8099 7.50663 9.66639 7.98027 8.82329 8.82337C7.98019 9.66647 7.50655 10.81 7.50655 12.0023Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),b.jsx("path",{d:"M8.79319 21.5246C10.5669 22.1224 12.4724 22.2127 14.2947 21.7854C16.1171 21.3581 17.7838 20.4302 19.1069 19.1062C20.4302 17.7827 21.3577 16.116 21.7848 14.2937C22.2119 12.4715 22.1217 10.5662 21.5243 8.79251M2.47582 15.2081C1.87829 13.4342 1.78805 11.5287 2.21527 9.70622C2.64249 7.88378 3.57019 6.21687 4.89383 4.89332C6.21747 3.56977 7.88445 2.64219 9.70692 2.21511C11.5294 1.78802 13.4349 1.87839 15.2088 2.47605",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Kp({path:e,activeOnSubpath:t=!1}){const o=t&&e?`${e}/*`:e;return RF(o||"")!==null}function Z0({children:e,...t}){return b.jsx(Yd,{...t,children:e})}function Zn0({to:e,target:t,rel:o,activeOnSubpath:n=!1,isActive:r,children:a,...i}){const l=`#/${e?.replace(/^\/?#\//,"")}`,z=Kp({path:e,activeOnSubpath:n}),u=r!==void 0?r:z,{isMobile:f,setOpenMobile:O}=Jn(),h=()=>{f&&O(!1)};return b.jsx(nM,{asChild:!0,isActive:u,...i,children:b.jsx("a",{href:t==="_blank"?e:l,rel:t==="_blank"?o??"noopener noreferrer":o,target:t,"aria-current":u?"page":void 0,onClick:h,children:a})})}function Kn0({children:e,...t}){return b.jsx("span",{...t,children:e})}function Yn0({onClick:e,children:t,...o}){const{isMobile:n,setOpenMobile:r}=Jn(),a=()=>{n&&r(!1),e?.()};return b.jsx(nM,{onClick:a,...o,children:t})}Z0.Link=Zn0;Z0.Label=Kn0;Z0.Button=Yn0;function Jn0({...e}){const{data:t}=ye(),{data:o}=AM(),n=oo(o?.settings,"social_web_enabled")??!1,a=aM().data?.site.url,{data:i=0}=yW(t?.slug||"",n),l=Kp({path:"network",activeOnSubpath:!0}),z=Kp({path:"activitypub",activeOnSubpath:!0}),u=i>0&&!l&&!z;return!t||!Y00(t)?null:b.jsx(Mc,{...e,children:b.jsx(cs,{children:b.jsxs(lc,{children:[b.jsx(Z0,{children:b.jsxs(Z0.Link,{to:"analytics",activeOnSubpath:!0,children:[b.jsx(H9,{}),b.jsx(Z0.Label,{children:"Analytics"})]})}),n&&b.jsxs(Z0,{children:[b.jsxs(Z0.Link,{to:"network",isActive:l||z,children:[b.jsx(Gn0,{}),b.jsx(Z0.Label,{children:"Network"})]}),u&&b.jsx(Jd,{children:i})]}),b.jsxs(Z0,{className:"relative group/viewsite",children:[b.jsxs(Z0.Link,{to:"site",children:[b.jsx(PG,{}),b.jsx(Z0.Label,{children:"View site"})]}),b.jsx("a",{href:a,target:"_blank","aria-label":"View site in new tab",rel:"noopener noreferrer",className:"absolute opacity-0 group-hover/viewsite:opacity-100 right-0 top-0 size-8 hover:bg-sidebar-accent flex items-center justify-center rounded-full text-gray-700 hover:text-sidebar-accent-foreground transition-all",children:b.jsx(Bd,{size:16})})]})]})})})}function er0({isExpanded:e,children:t,id:o}){return b.jsx("div",{id:o,className:`grid transition-all duration-200 ease-out ${e?"grid-rows-[1fr] mb-5":"grid-rows-[0fr] mb-0"}`,children:b.jsx("div",{className:"overflow-hidden",children:t})})}const bs="MembersResponseType",tr0=Xt({dataType:bs,path:"/members/"}),pa0=vq({dataType:bs,path:e=>`/members/${e}/`}),Ma0=Ve({method:"POST",path:({id:e})=>`/members/${e}/commenting/disable`,body:({reason:e,hideComments:t})=>({reason:e,hide_comments:t}),invalidateQueries:{dataType:"CommentsResponseType"}}),la0=Ve({method:"POST",path:({id:e})=>`/members/${e}/commenting/enable`,body:()=>({}),invalidateQueries:{dataType:"CommentsResponseType"}}),ba0=Wq({dataType:bs,path:"/members/",defaultSearchParams:{include:"labels,tiers",limit:"50",order:"created_at desc"},defaultNextPageParams:(e,t)=>{var o;if((o=e.meta)!=null&&o.pagination.next)return{...t,page:e.meta.pagination.next.toString()}},returnData:e=>{const{pages:t}=e,o=t.flatMap(r=>r.members),n=t[t.length-1].meta;return{members:o,meta:n,isEnd:n?n.pagination.pages===n.pagination.page:!0}}}),za0=Ve({method:"PUT",path:()=>"/members/bulk/",body:({action:e})=>({bulk:{action:e.type,meta:e.meta||{},newsletter:e.newsletter}}),searchParams:({filter:e,all:t})=>{if(!t&&!e)throw new Error("Bulk edit requires either a filter or all flag");const o={};return t?o.all="true":o.filter=e,o},invalidateQueries:{dataType:bs}}),ua0=Ve({method:"DELETE",path:()=>"/members/",searchParams:({filter:e,all:t})=>{if(!t&&!e)throw new Error("Bulk delete requires either a filter or all flag");const o={};return t?o.all="true":o.filter=e,o},invalidateQueries:{dataType:bs}});function or0(){const{data:e}=tr0({searchParams:{limit:"1"}});return e?.meta?.pagination.total}const nr0=()=>OM({select:e=>e.navigation}),rr0=()=>{const{mutateAsync:e}=fM();return Me({mutationFn:async t=>{await e({navigation:t})}})},cr0=e=>{const{data:t}=nr0(),{mutateAsync:o}=rr0();return[t?.expanded[e]??!0,async a=>o({expanded:{[e]:a}})]},ar0=Qp({name:L2(),route:L2(),color:L2(),icon:L2().optional(),filter:Vt0(L2(),L2().nullable())}),sr0=c5(ar0);function ir0(e){return{midgrey:"#7C8B9A",blue:"#14b8ff",green:"#30cf43",red:"#f50b23",teal:"#4dcddc",purple:"#8e42ff",yellow:"#ffb41f",orange:"#fe8b05",pink:"#fb2d8d"}[e]||"#7C8B9A"}function pr0({route:e="posts"}){const{data:t}=AM(),o=Ng(),n=p.useMemo(()=>{const r=oo(t?.settings,"shared_views")??"[]";try{const a=JSON.parse(r),i=sr0.safeParse(a);return i.success?i.data.filter(l=>l.route===e):(console.error("Failed to validate shared_views setting:",i.error),[])}catch(a){return console.error("Failed to parse shared_views setting:",a),[]}},[t,e]);return n.length===0?null:b.jsx(b.Fragment,{children:n.map(r=>{const a=o.getRouteUrl(e,r.filter),i=o.isRouteActive(e,r.filter);return b.jsx(Z0,{children:b.jsxs(Z0.Link,{className:"pl-9",to:a,isActive:i,children:[b.jsx(Z0.Label,{className:"grow",children:r.name}),b.jsx("span",{className:"size-2 rounded-full shrink-0 mx-0.5",style:{backgroundColor:ir0(r.color)},"data-color":r.color,"aria-hidden":"true"})]})},a)})})}const Yp=e=>{const{data:t}=as();return t?.config.labs?.[e]??!1};function Mr0({...e}){const{data:t}=ye(),[o,n]=cr0("posts"),r=or0(),a=Ng(),i=Yp("commentModeration"),l=Yp("membersForward"),z=t&&K00(t),u=t&&Z00(t);return b.jsx(Mc,{...e,children:b.jsx(cs,{children:b.jsxs(lc,{children:[b.jsxs(Z0,{children:[b.jsx(i1,{"aria-controls":"posts-submenu","aria-expanded":o,"aria-label":"Toggle post views",variant:"ghost",size:"icon",className:"!h-[34px] absolute sidebar:opacity-0 group-hover/menu-item:opacity-100 focus-visible:opacity-100 transition-all left-3 top-0 p-0 h-9 w-auto text-sidebar-accent-foreground hover:text-gray-black hover:bg-transparent",onClick:()=>void n(!o),children:b.jsx(F3,{size:16,className:`transition-all ${o&&"rotate-[90deg]"}`})}),b.jsxs(Z0.Link,{to:a.getRouteUrl("posts"),isActive:a.isRouteActive("posts"),children:[b.jsx(P9,{className:"opacity-0 sidebar:opacity-100 sidebar:group-hover/menu-item:opacity-0 pointer-events-none transition-all"}),b.jsx(Z0.Label,{children:"Posts"})]}),b.jsx("a",{href:"#/editor/post","aria-label":"Create new post",className:"flex items-center justify-center absolute hover:bg-sidebar-accent transition-all rounded-full right-0 top-0 p-0 size-8 text-gray-700 hover:text-sidebar-accent-foreground",children:b.jsx(j9,{size:20,className:"!stroke-[1.5px] mt-px"})})]}),b.jsxs(er0,{isExpanded:o,id:"posts-submenu",children:[b.jsx(Z0,{children:b.jsx(Z0.Link,{className:"pl-9",to:"posts?type=draft",isActive:a.isRouteActive("posts",{type:"draft"}),children:b.jsx(Z0.Label,{children:"Drafts"})})}),b.jsx(Z0,{children:b.jsx(Z0.Link,{className:"pl-9",to:"posts?type=scheduled",isActive:a.isRouteActive("posts",{type:"scheduled"}),children:b.jsx(Z0.Label,{children:"Scheduled"})})}),b.jsx(Z0,{children:b.jsx(Z0.Link,{className:"pl-9",to:"posts?type=published",isActive:a.isRouteActive("posts",{type:"published"}),children:b.jsx(Z0.Label,{children:"Published"})})}),b.jsx(pr0,{})]}),b.jsx(Z0,{children:b.jsxs(Z0.Link,{to:a.getRouteUrl("pages"),isActive:a.isRouteActive("pages"),children:[b.jsx(AZ,{}),b.jsx(Z0.Label,{children:"Pages"})]})}),z&&b.jsx(Z0,{children:b.jsxs(Z0.Link,{to:"tags",isActive:a.isRouteActive(["tags","tag","tag.new"]),children:[b.jsx(eK,{}),b.jsx(Z0.Label,{children:"Tags"})]})}),u&&b.jsxs(Z0,{children:[b.jsxs(Z0.Link,{to:l?"members-forward":a.getRouteUrl("members"),isActive:a.isRouteActive(["members","member","member.new"]),children:[b.jsx(V9,{}),b.jsx(Z0.Label,{children:"Members"})]}),r!=null&&b.jsx(Jd,{children:I3(r)})]}),u&&i&&b.jsx(Z0,{children:b.jsxs(Z0.Link,{to:"comments",activeOnSubpath:!0,children:[b.jsx(SZ,{}),b.jsx(Z0.Label,{children:"Comments"})]})})]})})})}const BA=function(){let t,o;return{promise:new Promise((r,a)=>{t=r,o=a}),resolve:t,reject:o}},Zb="https://do.featurebase.app/js/sdk.js";let za=null;function lr0(){return za||(za=new Promise((e,t)=>{if(document.querySelector(`script[src="${Zb}"]`)){e();return}const n=document.createElement("script");n.src=Zb,n.onload=()=>e(),n.onerror=r=>{n.remove(),za=null;const a=new Error(`[Featurebase] Failed to load SDK from ${Zb}`,{cause:r});console.error(a),t(a)},document.head.appendChild(n)})),za}function br0(){const{data:e}=as(),{data:t}=OM(),o=Yp("featurebaseFeedback"),[n,r]=p.useState(!1),{organization:a,enabled:i}=e?.config.featurebase??{},l=!!(o&&i),z=t?.nightShift?"dark":"light",{data:u}=E00({enabled:l&&n}),f=u?.featurebase?.token;p.useEffect(()=>{n&&lr0().catch(g=>{console.error("[Featurebase] Failed to load SDK:",g)})},[n]);const O=p.useRef(BA());p.useEffect(()=>{!n||!a||!f||za?.then(()=>{window.Featurebase?.("initialize_feedback_widget",{organization:a,theme:z,featurebaseJwt:f},g=>{g?(console.error("[Featurebase] Failed to initialize widget:",g),O.current.reject(g),O.current=BA(),r(!1)):O.current.resolve()})})},[a,z,f,n]);const h=p.useCallback(()=>{l&&r(!0)},[l]);return{openFeedbackWidget:p.useCallback(g=>{l&&(r(!0),O.current.promise.then(()=>{window.postMessage({target:"FeaturebaseWidget",data:{action:"openFeedbackWidget",...g?.board&&{setBoard:g.board}}},"*")}))},[l]),preloadFeedbackWidget:h}}function zr0({...e}){const{data:t}=ye(),{data:o}=as(),n=Yp("featurebaseFeedback"),{openFeedbackWidget:r,preloadFeedbackWidget:a}=br0();if(!t)return null;const l=o?.config.hostSettings?.billing?.enabled&&is(t),z=n&&!ps(t)&&o?.config.featurebase?.enabled;return!l&&!z?null:b.jsx(Mc,{...e,children:b.jsx(cs,{children:b.jsxs(lc,{children:[l&&b.jsx(Z0,{children:b.jsxs(Z0.Link,{to:"pro",children:[b.jsx(MZ,{}),b.jsx(Z0.Label,{children:"Ghost(Pro)"})]})}),z&&b.jsx(Z0,{children:b.jsxs(Z0.Button,{onClick:r,onMouseEnter:a,onFocus:a,children:[b.jsx(Ed,{}),b.jsx(Z0.Label,{children:"Feedback"})]})})]})})})}function ur0({...e}){const{data:t}=ye(),o=t&&G00(t);return b.jsx(Mc,{...e,children:b.jsx(cs,{children:b.jsxs(lc,{children:[o&&b.jsx(Z0,{children:b.jsxs(Z0.Link,{to:"settings",children:[b.jsx(D9,{}),b.jsx(Z0.Label,{children:"Settings"})]})}),b.jsx(Z0,{children:b.jsxs(Z0.Link,{to:"https://ghost.org/help?utm_source=admin&utm_campaign=help",target:"_blank",rel:"noopener noreferrer",children:[b.jsx(rZ,{}),b.jsx(Z0.Label,{children:"Help"})]})})]})})})}function dr0(){const{banner:e,bannerType:t}=i5();let o="";return t==="theme-errors"?o="pb-[110px]":t==="upgrade"?o="pb-[254px]":t==="whats-new"&&(o="pb-[180px]"),b.jsxs(Wg,{className:"px-3 pt-4 justify-between",children:[b.jsxs("div",{className:"flex flex-col gap-2 sidebar:gap-4",children:[b.jsx(Jn0,{}),b.jsx(Mr0,{}),b.jsx(zr0,{})]}),b.jsxs("div",{className:`flex flex-col gap-2 sidebar:gap-4 ${o}`,children:[b.jsx(Eo0,{banner:e}),b.jsx(ur0,{className:"pb-0"})]})]})}function Or0({...e}){return b.jsxs(Ag,{...e,children:[b.jsx(n10,{className:"px-5 pt-6 pb-0"}),b.jsx(dr0,{}),b.jsx(Bo0,{className:"p-3 gap-0"})]})}const $i=1.5;function Kb({to:e,activeOnSubpath:t=!1,children:o,...n}){const r=Kp({path:e,activeOnSubpath:t});return b.jsx(i1,{asChild:!0,className:`rounded-full w-full max-w-16 min-w-9 hover:bg-gray-200 ${r?"bg-gray-200":"bg-transparent"}`,...n,variant:"ghost",size:"icon","data-active":r,children:b.jsx("a",{href:e,children:o})})}function fr0(){const{isMobile:e}=Jn(),t=e5();return!e||!t?b.jsx(b.Fragment,{}):b.jsx("div",{className:"fixed sidebar:hidden bottom-0 left-0 right-0 h-[var(--mobile-navbar-height)] bg-sidebar/80 backdrop-blur-md border-t border-sidebar-border z-50 safe-area-inset-bottom",children:b.jsxs("div",{className:"grid grid-cols-4 items-center w-full justify-items-center max-w-[300px] h-full mx-auto px-5",children:[b.jsxs(Kb,{activeOnSubpath:!0,to:"analytics",children:[b.jsx(H9,{strokeWidth:$i}),b.jsx("span",{className:"sr-only",children:"Analytics"})]}),b.jsxs(Kb,{activeOnSubpath:!0,to:"posts",children:[b.jsx(P9,{strokeWidth:$i}),b.jsx("span",{className:"sr-only",children:"Posts"})]}),b.jsxs(Kb,{activeOnSubpath:!0,to:"members",children:[b.jsx(V9,{strokeWidth:$i}),b.jsx("span",{className:"sr-only",children:"Members"})]}),b.jsxs(hg,{className:"rounded-full px-8 h-9 hover:bg-transparent",children:[b.jsx(T9,{strokeWidth:$i}),b.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})]})})}function Ar0({children:e}){const{data:t}=ye(),o=e5();return t&&ps(t)?b.jsxs("div",{className:"relative h-full bg-background",children:[b.jsx("main",{className:"flex h-full flex-col overflow-y-auto",children:b.jsx("div",{className:"flex-1",children:e})}),b.jsx("div",{className:"fixed bottom-3.5 left-3.5 lg:bottom-8 lg:left-8 z-20",children:b.jsx(go0,{})})]}):b.jsxs(fg,{open:!!t&&o,children:[b.jsx(Or0,{}),b.jsxs(qg,{className:`bg-background overflow-y-auto sidebar:max-h-full ${o?"max-h-[calc(100%-var(--mobile-navbar-height))]":"max-h-full"}`,children:[b.jsx("main",{className:"flex-1",children:e}),b.jsx(fr0,{})]})]})}function hr0(){const{data:e}=ye();return I00(),D00(),b.jsx(S00,{children:e?b.jsxs(Ar0,{children:[b.jsx(En,{}),b.jsx(Gf,{})]}):b.jsxs(b.Fragment,{children:[b.jsx(Qz,{}),b.jsx(Gf,{})]})})}const TW=p.createContext(void 0),da0=()=>{const e=p.useContext(TW);if(e===void 0)throw new Error("useAppContext must be used within an AppProvider");return e},qr0=({children:e,value:t})=>{const o=p.useContext(ku),n=t.externalNavigate??o?.externalNavigate;if(!n)throw new Error("External navigate function is required");const r={externalNavigate:n,fromAnalytics:!1,...o,...t};return b.jsx(TW.Provider,{value:r,children:e})},mr0=[{path:"",errorElement:b.jsx(Fp,{onBackToDashboard:()=>{}}),children:[{path:"posts/analytics/:postId",lazy:async()=>{const[{default:e},{default:t}]=await Promise.all([m1(()=>import("./post-analytics-context-B2ytyOU0.js").then(o=>o.p),__vite__mapDeps([42,43]),import.meta.url),m1(()=>import("./post-analytics-qpfoP-57.js"),__vite__mapDeps([44,45,46,43,42]),import.meta.url)]);return{element:b.jsx(e,{children:b.jsx(t,{})})}},children:[{path:"",lazy:w1(()=>m1(()=>import("./overview-DAEelSKq.js"),__vite__mapDeps([47,48,5,24,49,30,50,51,52,53,54,46,42,43,55,56,3,15,57,58,59,60,61,62,63,64,22,23,25,26,11,27,28,29,8,6,1,17,31,12,32,13,65,20,21]),import.meta.url))},{path:"web",lazy:w1(()=>m1(()=>import("./web-BNs01IAt.js"),__vite__mapDeps([66,67,28,42,43,27,64,49,30,50,51,24,59,22,23,25,26,11,29,8,6,1,17,31,12,32,13,15,3,65,61,62,20,21,68,54,46,55,56,69,5]),import.meta.url))},{path:"growth",lazy:w1(()=>m1(()=>import("./growth-CKOWA1_V.js").then(e=>e.g),__vite__mapDeps([48,5,24,49,30,50,51,52,53,54,46,42,43,55,56,3,15,57,58]),import.meta.url))},{path:"newsletter",lazy:w1(()=>m1(()=>import("./newsletter-DkOl42UB.js"),__vite__mapDeps([70,51,24,71,22,23,25,26,11,27,28,29,8,6,30,1,17,31,12,32,13,15,3,20,21,53,54,46,42,43,55,56,59,60,61,62,63,58]),import.meta.url))}]},{path:"tags",children:[{index:!0,lazy:w1(()=>m1(()=>import("./tags-CSl0BjsA.js"),__vite__mapDeps([72,35,73,45,52,17,5]),import.meta.url))},{path:":tagSlug",element:null}]},{path:"comments",lazy:w1(()=>m1(()=>import("./comments-DoNjlMYA.js"),__vite__mapDeps([74,69,27,43,28,73,45,75,76,19,13,5]),import.meta.url))},{path:"members-forward",lazy:w1(()=>m1(()=>import("./members-C10Z_BuG.js"),__vite__mapDeps([77,69,27,17,78,26,55,79,80,30,43,73,75,5]),import.meta.url))},{path:"*",element:b.jsx(Fp,{onBackToDashboard:()=>{}})}]}],gr0={today:{name:"Today",value:1},last7Days:{name:"Last 7 days",value:7},last30Days:{name:"Last 30 days",value:31},last3Months:{name:"Last 90 days",value:91},yearToDate:{name:"Year to date",value:-1},last12Months:{name:"Last 12 months",value:372},allTime:{name:"All time",value:1e3}},Wr0=Object.values(gr0),vr0=2,Oa0={US:"United States",TWN:"Taiwan",TW:"Taiwan","mobile-ios":"iOS","mobile-android":"Android",macos:"macOS","google.com":"Google","ghost.org":"Ghost","bing.com":"Bing","bsky.app":"Bluesky","yahoo.com":"Yahoo","duckduckgo.com":"DuckDuckGo",unknown:"Unknown",Others:"Unknown",Other:"Unknown",NULL:"Unknown","ᴺᵁᴸᴸ":"Unknown"},fa0=["NULL","ᴺᵁᴸᴸ","","Others","Other"],Aa0="https://static.ghost.org/v5.0.0/images/globe-icon.svg",Ur={PUBLIC:1,FREE:2,PAID:4},ha0=Ur.PUBLIC|Ur.FREE|Ur.PAID,qa0=[{name:"Public visitors",value:"undefined",bit:Ur.PUBLIC},{name:"Free members",value:"free",bit:Ur.FREE},{name:"Paid members",value:"paid",bit:Ur.PAID}],PW=p.createContext(void 0),ma0=()=>{const e=p.useContext(PW);if(e===void 0)throw new Error("useGlobalData must be used within a GlobalDataProvider");return e},Rr0=({children:e})=>{const t=AM(),o=aM(),n=as(),r=n.data?.config,a=!!r?.stats,i=dI({enabled:a}),[l,z]=p.useState(Wr0[vr0].value),[u,f]=p.useState(null),O=[n,t,o],h=O.map(C=>C.error).find(Boolean),q=a?i.error:null,g=h||q,W=O.some(C=>C.isLoading),v=a?i.isLoading:!1,y=W||v;if(g)throw g;const k={url:o.data?.site.url,icon:o.data?.site.icon,title:o.data?.site.title};return b.jsx(PW.Provider,{value:{data:r,site:k,statsConfig:r?.stats,tinybirdToken:i.token,isLoading:y,range:l,setRange:z,settings:t.data?.settings||[],selectedNewsletterId:u,setSelectedNewsletterId:f},children:e})},yr0=[{path:"analytics",children:[{index:!0,lazy:w1(()=>m1(()=>import("./index-CHpxzPRR.js"),__vite__mapDeps([81,82,67,28,27,51,24,30,15,22,23,25,26,11,29,8,6,1,17,31,12,32,13,3,5,46,56,83,65,61,62,84,58,57,43]),import.meta.url))},{path:"web",lazy:w1(()=>m1(()=>import("./index-B7OzWwwP.js"),__vite__mapDeps([85,82,67,28,27,51,24,30,15,22,23,25,26,11,29,8,6,1,17,31,12,32,13,3,68,59,5,71,86,50,69,83,58,20,21,65,61,62]),import.meta.url))},{path:"growth",lazy:w1(()=>m1(()=>import("./index-BFySh9qo.js"),__vite__mapDeps([87,82,67,28,27,51,24,30,15,22,23,25,26,11,29,8,6,1,17,31,12,32,13,3,5,65,61,62,20,21,83,88,52,86,57,50,58,89,80,63,84]),import.meta.url))},{path:"newsletters",lazy:w1(()=>m1(()=>import("./index-Cw441AFq.js"),__vite__mapDeps([90,82,67,28,27,51,24,30,15,22,23,25,26,11,29,8,6,1,17,31,12,32,13,3,61,62,5,65,20,21,88,52,78,58]),import.meta.url))}]}],wr0=()=>{const{data:e,isError:t,isLoading:o}=ye();return e?b.jsx(ro,{replace:!0,to:`/settings/staff/${e.slug}`}):t||!o?b.jsx(ro,{replace:!0,to:"/"}):null},Lr0=[{element:b.jsx(V00,{}),children:[{path:"/tags/:tagSlug",Component:Qz,handle:{allowInForceUpgrade:!0}},{element:b.jsx(qr0,{value:{fromAnalytics:!0},children:b.jsx(En,{})}),children:mr0[0].children.filter(e=>e.path!=="*")},{element:b.jsx(Rr0,{children:b.jsx(En,{})}),children:yr0},{path:"network",loader:()=>HI("/activitypub")},{path:"my-profile",Component:wr0,handle:{allowInForceUpgrade:!0}},{path:"",element:b.jsx(So0,{children:b.jsx(En,{})}),children:SW},{path:"settings/*",lazy:w1(()=>m1(()=>import("./settings-EbntXZw9.js").then(e=>e.bb),__vite__mapDeps([91,21,78,43,80,79,89]),import.meta.url)),handle:{allowInForceUpgrade:!0}},{path:"*",Component:Qz,handle:{allowInForceUpgrade:!0}}]}],xr0=["http:","https:","mailto:","tel:"];function kr0(e){if(e.match(/^[a-z]+:/i))try{const t=new URL(e);return xr0.includes(t.protocol)?(window.location.href=e,!0):!1}catch{const t=e.startsWith("/")?e:`/${e}`;return window.location.hash=t,!0}else{const t=e.startsWith("/")?e:`/${e}`;return window.location.hash=t,!0}}function Cr0({children:e}){const{data:t}=AM(),o=p.useMemo(()=>{if(!t?.settings)return;const n=t.settings;return{paidMembersEnabled:oo(n,"paid_members_enabled")??!1,newslettersEnabled:oo(n,"editor_default_email_recipients")!=="disabled",analytics:{emailTrackOpens:oo(n,"email_track_opens")??!1,emailTrackClicks:oo(n,"email_track_clicks")??!1,membersTrackSources:oo(n,"members_track_sources")??!1,outboundLinkTagging:oo(n,"outbound_link_tagging")??!1,webAnalytics:oo(n,"web_analytics_enabled")??!1}}},[t]);return b.jsx(rx,{appSettings:o,children:e})}const Nr0={ghostVersion:"",externalNavigate:e=>{kr0(e.route)},unsplashConfig:{Authorization:"Client-ID 8672af113b0a8573edae3aa3713886265d9bb741d707f6c01a486cde8c278980","Accept-Version":"v1","Content-Type":"application/json","App-Pragma":"no-cache","X-Unsplash-Cache":!0},sentryDSN:null,onUpdate:(e,t)=>{window.EmberBridge?.state.onUpdate(e,t)},onInvalidate:e=>{window.EmberBridge?.state.onInvalidate(e)},onDelete:(e,t)=>{window.EmberBridge?.state.onDelete(e,t)}};kR.createRoot(document.getElementById("root")).render(b.jsx(p.StrictMode,{children:b.jsx(nx,{...Nr0,children:b.jsx(k00,{prefix:"/",routes:Lr0,children:b.jsx(Cr0,{children:b.jsx(iY,{className:"shade-admin",darkMode:!1,fetchKoenigLexical:null,children:b.jsx(hr0,{})})})})})}));export{Rg as $,en as A,i1 as B,F3 as C,os as D,pa as E,Bn0 as F,$a as G,V2 as H,jc0 as I,Xc0 as J,Fc0 as K,Vn0 as L,Hc0 as M,Dc0 as N,Ic0 as O,Zo as P,y00 as Q,e00 as R,j1 as S,t00 as T,IG as U,Zp as V,Se as W,jd as X,ta0 as Y,oa0 as Z,na0 as _,y3 as a,ic as a$,S9 as a0,pY as a1,$9 as a2,G9 as a3,K9 as a4,Y9 as a5,Z9 as a6,em as a7,J9 as a8,H3 as a9,E0 as aA,q2 as aB,K0 as aC,a3 as aD,m1 as aE,hh as aF,B1 as aG,lx as aH,xh as aI,se as aJ,as as aK,aM as aL,AM as aM,dI as aN,Pd as aO,Pe as aP,XG as aQ,lc0 as aR,En as aS,yg as aT,ic0 as aU,tg as aV,w00 as aW,Tp as aX,da0 as aY,Jr0 as aZ,tc0 as a_,vq as aa,Ve as ab,Xt as ac,Fr0 as ad,Rq as ae,v1 as af,nm as ag,Q3 as ah,wZ as ai,Wq as aj,ec0 as ak,Ur0 as al,_0 as am,Gr0 as an,I3 as ao,Ao as ap,H9 as aq,Jm as ar,a7 as as,Qn as at,Y2 as au,ft as av,R1 as aw,i7 as ax,_j as ay,Bj as az,qo as b,ro as b$,ed as b0,Ym as b1,T9 as b2,Zd as b3,sc0 as b4,eg as b5,Pn as b6,vg as b7,jf as b8,Vr0 as b9,Yc0 as bA,zc as bB,mZ as bC,Kc0 as bD,HG as bE,sa as bF,Ui as bG,Xd as bH,Dd as bI,Id as bJ,o00 as bK,pc0 as bL,ug as bM,c00 as bN,a00 as bO,s00 as bP,JJ as bQ,$r0 as bR,Hr0 as bS,Na as bT,Vn as bU,ha0 as bV,qa0 as bW,Ur as bX,ma0 as bY,Er0 as bZ,Yr0 as b_,bn as ba,b3 as bb,c7 as bc,qt as bd,cX as be,Da as bf,nc as bg,Tt as bh,Yu as bi,Ku as bj,h3 as bk,Qr as bl,f3 as bm,oc as bn,z3 as bo,u3 as bp,KG as bq,ho as br,A5 as bs,z5 as bt,JG as bu,uZ as bv,Vc0 as bw,Ko0 as bx,Fo0 as by,EW as bz,ia as c,BZ as c$,aa0 as c0,SJ as c1,TJ as c2,PJ as c3,rg as c4,hc0 as c5,qc0 as c6,Xg as c7,Jc0 as c8,F9 as c9,Qr0 as cA,OZ as cB,Zr0 as cC,gr0 as cD,RZ as cE,Xf as cF,MZ as cG,uu as cH,Wr0 as cI,x2 as cJ,MY as cK,Sb as cL,uY as cM,Gc0 as cN,Uc0 as cO,Zc0 as cP,Jp as cQ,fa0 as cR,Oa0 as cS,P9 as cT,Kr0 as cU,Aa0 as cV,oc0 as cW,tr0 as cX,za0 as cY,ua0 as cZ,Ir0 as c_,sK as ca,tM as cb,fY as cc,Qp as cd,NA as ce,_A as cf,sa0 as cg,ia0 as ch,L2 as ci,on0 as cj,cc0 as ck,V9 as cl,eK as cm,ud as cn,Od as co,Ga as cp,Za as cq,Sd as cr,NJ as cs,_J as ct,j9 as cu,og as cv,ng as cw,WG as cx,nc0 as cy,rc0 as cz,Vi as d,dc0 as d$,oo as d0,ba0 as d1,Fn0 as d2,aZ as d3,pa0 as d4,Ma0 as d5,la0 as d6,Ed as d7,qW as d8,Ln0 as d9,xc0 as dA,vc0 as dB,wc0 as dC,Lc0 as dD,Ea as dE,mc0 as dF,Bc0 as dG,gc0 as dH,Wc0 as dI,At as dJ,T00 as dK,P00 as dL,j00 as dM,qP as dN,Ac0 as dO,e10 as dP,Tc0 as dQ,_c0 as dR,Nc0 as dS,pe as dT,Y00 as dU,uc0 as dV,xz as dW,is as dX,bc0 as dY,_g as dZ,zc0 as d_,ca0 as da,ra0 as db,Qc0 as dc,$c0 as dd,_r0 as de,gR as df,lN as dg,S6 as dh,m3 as di,Cc0 as dj,Ec0 as dk,gb as dl,jr0 as dm,Xr0 as dn,Wu as dp,fc0 as dq,vo0 as dr,OW as ds,fW as dt,Ro0 as du,Rc0 as dv,yc0 as dw,kc0 as dx,tI as dy,rc as dz,l0 as e,G00 as e0,Bg as e1,Oc0 as e2,cM as e3,Sh as e4,Tr0 as e5,XP as e6,P6 as e7,j6 as e8,vu as e9,Lh as eA,PG as eB,$G as eC,VG as eD,oZ as eE,rZ as eF,iZ as eG,AZ as eH,WZ as eI,xZ as eJ,CZ as eK,SZ as eL,PZ as eM,XZ as eN,FZ as eO,X9 as eP,QZ as eQ,D9 as eR,ZZ as eS,I9 as eT,U9 as eU,Td as eV,cK as eW,SG as eX,qj as ea,A7 as eb,jj as ec,vX as ed,RX as ee,yX as ef,D7 as eg,G7 as eh,Z7 as ei,K7 as ej,Ex as ek,FD as el,Pr0 as em,HD as en,Aq as eo,g3 as ep,ma as eq,ye as er,Dr0 as es,Uy as et,Mc0 as eu,OI as ev,Sc0 as ew,ps as ex,qh as ey,Sr0 as ez,Ip as f,Jo as g,Fo as h,Pc0 as i,b as j,NW as k,ea0 as l,b5 as m,O5 as n,lp as o,bu as p,u5 as q,p as r,Cr as s,tm as t,xF as u,pc as v,V3 as w,$3 as x,Bd as y,R0 as z};