@remit/web-client-dist 0.0.697 → 0.0.698

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 (217) hide show
  1. package/assets/{BriefPane-BQx5RRpb.js → BriefPane-OvZiBDtW.js} +1 -1
  2. package/assets/{CalendarEventEditor-B3bVY-Oc.js → CalendarEventEditor-JBfO_GQa.js} +1 -1
  3. package/assets/{CalendarEventPopup-D6PNfUfu.js → CalendarEventPopup-U6Ndkn2v.js} +1 -1
  4. package/assets/{CalendarLoadFailed-Cm6trTQZ.js → CalendarLoadFailed-CNaVKDtW.js} +1 -1
  5. package/assets/{CalendarQuickCreate-B_n983kv.js → CalendarQuickCreate-C-yc6zce.js} +1 -1
  6. package/assets/{CalendarSession-BosFoHg2.js → CalendarSession-C_XnZoOI.js} +1 -1
  7. package/assets/{CollectionPane-BzktgIp0.js → CollectionPane-C6EYtyWc.js} +1 -1
  8. package/assets/{DesktopChrome-GxTHTvqD.js → DesktopChrome-DXIJ6wUA.js} +1 -1
  9. package/assets/{DropdownMenu-C2J8u8zN.js → DropdownMenu-DsxemHc4.js} +1 -1
  10. package/assets/{EmptyState-BJU14tbt.js → EmptyState-Dv8xCRkX.js} +1 -1
  11. package/assets/{ErrorState-BTHOmsYP.js → ErrorState-BptbbJAv.js} +1 -1
  12. package/assets/{FullCompose-DiZNltCL.js → FullCompose-BGLjrGst.js} +1 -1
  13. package/assets/{LabelApplyTrigger-P8IoLKME.js → LabelApplyTrigger-DzgVUcax.js} +1 -1
  14. package/assets/{MailShell-tKLYT5hn.js → MailShell-DE0ZN2ct.js} +1 -1
  15. package/assets/{MailViewChrome-CLgaFbe-.js → MailViewChrome-DoBZYTxQ.js} +1 -1
  16. package/assets/MailboxPane-CxaGFC0R.js +135 -0
  17. package/assets/{MessageBody-jG4Dhul6.js → MessageBody-BYYCZieC.js} +1 -1
  18. package/assets/MessageToolbar-CnhMX7Ap.js +1 -0
  19. package/assets/{NavMenuButton-CLp6InRG.js → NavMenuButton-B28Nb9kR.js} +1 -1
  20. package/assets/{OnboardingWizard-BSlPpmI5.js → OnboardingWizard-dQ9c99Ni.js} +1 -1
  21. package/assets/{OutboxPane-B6UfixBP.js → OutboxPane-ByJt4RDv.js} +1 -1
  22. package/assets/{ReportLink-BELrQR40.js → ReportLink-D0tCso5T.js} +1 -1
  23. package/assets/_calendarObjectId-DA9THlEZ.js +1 -0
  24. package/assets/_labelId-QQEJSaaH.js +1 -0
  25. package/assets/_mailboxId-CjHcitFP.js +1 -0
  26. package/assets/_messageId-BR_TgwKr.js +1 -0
  27. package/assets/_messageId-CAxQBVFC.js +1 -0
  28. package/assets/_messageId-CO7AhNVu.js +1 -0
  29. package/assets/_messageId-D0sfforj.js +1 -0
  30. package/assets/_outboxMessageId-CuYUqctH.js +1 -0
  31. package/assets/_recurrenceId-CLQuwNQw.js +1 -0
  32. package/assets/{_slotId-DQqfctAf.js → _slotId-BgSRkGdw.js} +1 -1
  33. package/assets/_threadId-BGKDrxuA.js +1 -0
  34. package/assets/_threadId-Ba8E2aAx.js +1 -0
  35. package/assets/_threadId-Br_FU4M4.js +1 -0
  36. package/assets/_threadId-D9ge4hnK.js +1 -0
  37. package/assets/_view._date-BCOouUgc.js +1 -0
  38. package/assets/{account-service-status-DsLvRU-X.js → account-service-status-C6hq8flJ.js} +1 -1
  39. package/assets/{accounts-D0rPQMGH.js → accounts-B2HAE5Mp.js} +1 -1
  40. package/assets/{advanced-q_hG98BB.js → advanced-BBWKSR4H.js} +1 -1
  41. package/assets/{agenda-time-D0yU-H44.js → agenda-time-C9jExuVe.js} +1 -1
  42. package/assets/{app-chrome-BfyGOiSA.js → app-chrome-CS-vT-4r.js} +1 -1
  43. package/assets/{appearance-DM1k2Ta7.js → appearance-oUeDfZvm.js} +1 -1
  44. package/assets/{avatar-Bq7beWCy.js → avatar-B60PZejm.js} +1 -1
  45. package/assets/{badge-BB80tGxy.js → badge-DYFkBshe.js} +1 -1
  46. package/assets/{bottom-sheet-DKF_Dkid.js → bottom-sheet-B0y_-mKC.js} +1 -1
  47. package/assets/brief--Wmhw18k.js +1 -0
  48. package/assets/{brief-8diVJSZ9.js → brief-DBLwMpYO.js} +1 -1
  49. package/assets/{calendar-BqFIadRy.js → calendar-Cf7D8za1.js} +1 -1
  50. package/assets/{calendar-Ds9kgvU8.js → calendar-DON3hXqq.js} +1 -1
  51. package/assets/{calendar-event-popup-Cr_LW8IP.js → calendar-event-popup-BqE6svk6.js} +1 -1
  52. package/assets/{calendar-event-sidebar-B_eR1h5J.js → calendar-event-sidebar-BGvCPmWa.js} +1 -1
  53. package/assets/{calendar-failure-note-C4gNXDQV.js → calendar-failure-note-sEjmPcbo.js} +1 -1
  54. package/assets/{calendar-guests-Cay9Ub8h.js → calendar-guests-CuFcAD3k.js} +1 -1
  55. package/assets/{calendar-suggestion-EosZrXZC.js → calendar-suggestion-CZ6ssHct.js} +1 -1
  56. package/assets/calendars-9OZeuRv6.js +1 -0
  57. package/assets/{card-CLJYKox8.js → card-13z0qC0r.js} +1 -1
  58. package/assets/{checkbox-CYOm-zGr.js → checkbox-ZdvWSWRN.js} +1 -1
  59. package/assets/{chevron-down-De4wQzka.js → chevron-down-wpFtElCn.js} +1 -1
  60. package/assets/{chevron-left-CUHU8UT9.js → chevron-left-HeNgNNR2.js} +1 -1
  61. package/assets/{circle-check-DlR8I4Hf.js → circle-check-Q9IHsvBp.js} +1 -1
  62. package/assets/{circle-check-big-CMsxQSjY.js → circle-check-big-C2cm1OoH.js} +1 -1
  63. package/assets/{circle-question-mark-DhNa_A16.js → circle-question-mark-CYsyue28.js} +1 -1
  64. package/assets/{classification-BgDJ1gwK.js → classification-BxsZLEnC.js} +1 -1
  65. package/assets/{clock-Dds4zv6u.js → clock-D8a14yMJ.js} +1 -1
  66. package/assets/{cloud-off-BYulqayx.js → cloud-off-I2wH-wZi.js} +1 -1
  67. package/assets/compose._-_outboxMessageId_-BGkih4eY.js +1 -0
  68. package/assets/compose._-_outboxMessageId_-CivLnC_Q.js +1 -0
  69. package/assets/compose._-_outboxMessageId_-DhaK6pb5.js +1 -0
  70. package/assets/compose._-_outboxMessageId_-cX-iEK_S.js +1 -0
  71. package/assets/compose._-_outboxMessageId_-nFk2BCjJ.js +1 -0
  72. package/assets/{config-import-VTZQj3gU.js → config-import-DTqOa38a.js} +1 -1
  73. package/assets/{confirm-dialog-XvccFJdE.js → confirm-dialog-CsttDS5u.js} +1 -1
  74. package/assets/{copy-BokIobZ4.js → copy-V6gKiItu.js} +1 -1
  75. package/assets/{credential-steps-O1OzlOow.js → credential-steps-BPun50HH.js} +1 -1
  76. package/assets/{download-DEuAIIIQ.js → download-CHIm9QMw.js} +1 -1
  77. package/assets/{draft-BEiHkDpm.js → draft-CUl68Y86.js} +1 -1
  78. package/assets/edit-CO4QGWtB.js +1 -0
  79. package/assets/edit-DRr0H801.js +1 -0
  80. package/assets/{external-link-L7NXOTeQ.js → external-link-DinDD_TS.js} +1 -1
  81. package/assets/{file-braces-BN8-S---.js → file-braces-DSnr6-a7.js} +1 -1
  82. package/assets/filters-BOpD_izN.js +1 -0
  83. package/assets/flagged-BLzcJrUz.js +1 -0
  84. package/assets/{flagged-B-j-3yRr.js → flagged-Cj4ARwpT.js} +1 -1
  85. package/assets/folder-failure-BphZCUyZ.js +1 -0
  86. package/assets/{folder-input-B0q8wLhf.js → folder-input-BqAxe_6s.js} +1 -1
  87. package/assets/folders-NwCVYN5L.js +1 -0
  88. package/assets/{help-copy-DUjzIPXf.js → help-copy-EtAi1Aq7.js} +1 -1
  89. package/assets/{import-DLM5VFnJ.js → import-DJMjk1Ri.js} +1 -1
  90. package/assets/index-6MdUWIJB.js +1 -0
  91. package/assets/index-B3pRGruo.js +1 -0
  92. package/assets/index-BDF8UTpu.js +1 -0
  93. package/assets/{index-Caon2n2j.js → index-BQ2vE6gp.js} +4 -4
  94. package/assets/index-BoKIe_Hw.js +1 -0
  95. package/assets/index-CKFdaY9c.js +222 -0
  96. package/assets/index-CO7AhNVu.js +1 -0
  97. package/assets/index-CR5Op_4t.js +1 -0
  98. package/assets/index-D0sfforj.js +1 -0
  99. package/assets/index-DLuz5acm.js +1 -0
  100. package/assets/index-DqCcXbbs.js +1 -0
  101. package/assets/index-GZXGsbCN.js +1 -0
  102. package/assets/index-PBPFqVVA.js +1 -0
  103. package/assets/index-h2rbe_XB.js +1 -0
  104. package/assets/{kbd-jzPSd-a2.js → kbd-qpWA48X9.js} +1 -1
  105. package/assets/{label-chip-DtBVyALF.js → label-chip-zwUAXSWu.js} +1 -1
  106. package/assets/labels-CwGUliq_.js +1 -0
  107. package/assets/list-pages-BCUbyyea.js +1 -0
  108. package/assets/mail-B-_K5JCo.js +1 -0
  109. package/assets/{mail-BzFJWQZy.js → mail-Bsgov7FY.js} +1 -1
  110. package/assets/{menu-Bh94jr77.js → menu-CKmdL0us.js} +1 -1
  111. package/assets/{nav-link-ed0mFCCx.js → nav-link-YOSchPy9.js} +1 -1
  112. package/assets/new-DKJdGwfE.js +1 -0
  113. package/assets/{onboarding-completion-qKzJSmsI.js → onboarding-completion-cX9HM-aL.js} +1 -1
  114. package/assets/onboarding-pnezHKXj.js +1 -0
  115. package/assets/outbox-CLnMeXYO.js +1 -0
  116. package/assets/{pencil-BDbmS56C.js → pencil-C6KO5975.js} +1 -1
  117. package/assets/{people-eWwwIt4_.js → people-BhhvdCU4.js} +1 -1
  118. package/assets/{plus-D5-2sA5v.js → plus-DsSkq30M.js} +1 -1
  119. package/assets/{popover-menu-DhcuKv1N.js → popover-menu-DP-hyKpu.js} +1 -1
  120. package/assets/{refresh-cw-Cu9_I3cT.js → refresh-cw-CCcTeH3S.js} +1 -1
  121. package/assets/{reply-CXuSMyqp.js → reply-SkF_KCOk.js} +1 -1
  122. package/assets/{rich-text-Ds4rQc2o.js → rich-text-By6rXXKy.js} +1 -1
  123. package/assets/{rich-text-spellcheck-worker-provider-ChKzrvjg.js → rich-text-spellcheck-worker-provider-DQbI8hMR.js} +1 -1
  124. package/assets/{rotate-ccw-hQhPZwrx.js → rotate-ccw-lh0BmpDo.js} +1 -1
  125. package/assets/{roving-focus-DZX7IpN4.js → roving-focus-DlzLpO4G.js} +1 -1
  126. package/assets/{row-actions-BDfQKXdD.js → row-actions-0g39M7ib.js} +1 -1
  127. package/assets/{search-mirror-B2xnwy77.js → search-mirror-D9nwr5km.js} +1 -1
  128. package/assets/{search-scope-B-3MTDpD.js → search-scope-DNDpRNp9.js} +1 -1
  129. package/assets/{search-token-index-BYKMNlJD.js → search-token-index-cy3uaYXm.js} +1 -1
  130. package/assets/{sections-DpRVKuXF.js → sections-ZsRsk30_.js} +1 -1
  131. package/assets/{segmented-control-BwvsufVp.js → segmented-control-CeqFpYfk.js} +1 -1
  132. package/assets/{select-TYdrgtW5.js → select-yGv73aji.js} +1 -1
  133. package/assets/{senders-vh4OQfD0.js → senders-lMWjFLIX.js} +1 -1
  134. package/assets/settings-C8z99CK0.js +1 -0
  135. package/assets/{settings-screen-DTYVWAkg.js → settings-screen-C8z8YwuM.js} +1 -1
  136. package/assets/{shield-check-C-tOrPEx.js → shield-check-CIZoP3AE.js} +1 -1
  137. package/assets/spam-D6paxCM2.js +1 -0
  138. package/assets/{suggest-list-BCqr1j26.js → suggest-list-czu9q5H4.js} +1 -1
  139. package/assets/{suggested-vips--pG2iuOT.js → suggested-vips-DXCCMmOn.js} +1 -1
  140. package/assets/suggestion._suggestionId-zlbObxkn.js +1 -0
  141. package/assets/{switch-CyAtRlCz.js → switch-BezKd3gx.js} +1 -1
  142. package/assets/task._calendarTaskId-CgBc-n43.js +1 -0
  143. package/assets/{undo-2-D1IMLq7c.js → undo-2-CgG5m84e.js} +1 -1
  144. package/assets/{useCalendarData-DFG3pzeG.js → useCalendarData-CgRGDHYQ.js} +1 -1
  145. package/assets/{useCalendarScheduling-B_INtO-h.js → useCalendarScheduling-BhFuxgru.js} +1 -1
  146. package/assets/useCalendarSuggestions-BaIFwYBZ.js +1 -0
  147. package/assets/{useCalendarTasks-b_UNFPQH.js → useCalendarTasks-CnP7DfUR.js} +1 -1
  148. package/assets/{useClassificationSettings-DBRecrmp.js → useClassificationSettings-Bk89yu99.js} +1 -1
  149. package/assets/{useCollectionThreads-DgofDKen.js → useCollectionThreads-BMsppZhN.js} +1 -1
  150. package/assets/{useDebouncedValue-CFZ4EPXW.js → useDebouncedValue-BpDHcfPe.js} +1 -1
  151. package/assets/{useFilters-DHWZEIQe.js → useFilters-Cv2IfE4J.js} +1 -1
  152. package/assets/{useInfiniteQuery-B-vOuANs.js → useInfiniteQuery-DwTTxcsy.js} +1 -1
  153. package/assets/{useJunkMailboxIds-CW7aI25D.js → useJunkMailboxIds-CDFS8XJA.js} +1 -1
  154. package/assets/useLabels-BIArT792.js +1 -0
  155. package/assets/{useLayoutTier-BNUKvwJD.js → useLayoutTier-Y7Z9Nnsm.js} +1 -1
  156. package/assets/{useMediaQuery-Hy81MQ2M.js → useMediaQuery-CjE8xNMz.js} +1 -1
  157. package/assets/{useMessageBodyContent-CpTD2HGg.js → useMessageBodyContent-D5mskS3v.js} +1 -1
  158. package/assets/{useQueries-DPH-PeHV.js → useQueries-CQ_R-NWg.js} +1 -1
  159. package/assets/{useRefreshControl-DdbTrGxq.js → useRefreshControl-DwtRYeei.js} +1 -1
  160. package/assets/{useResultFolderIndex-BVyfzXH5.js → useResultFolderIndex-ZNSoZByc.js} +1 -1
  161. package/assets/{useSignature-W9HBbZ_n.js → useSignature-CnLh1XFv.js} +1 -1
  162. package/assets/{warnings-B2sNE31D.js → warnings-zZSUr-_I.js} +1 -1
  163. package/index.html +2 -2
  164. package/package.json +1 -1
  165. package/assets/MailboxPane-BxNCkl6s.js +0 -135
  166. package/assets/MessageToolbar-DeDUhCvg.js +0 -1
  167. package/assets/_calendarObjectId-BiaBDCEt.js +0 -1
  168. package/assets/_labelId-DLeWLaow.js +0 -1
  169. package/assets/_mailboxId-DWvQ-9gi.js +0 -1
  170. package/assets/_messageId-BB9xOwfs.js +0 -1
  171. package/assets/_messageId-C2YSZxRF.js +0 -1
  172. package/assets/_messageId-CPvSvBZB.js +0 -1
  173. package/assets/_messageId-DbVH08AL.js +0 -1
  174. package/assets/_outboxMessageId-BFgW_k_u.js +0 -1
  175. package/assets/_recurrenceId-96pqeQMh.js +0 -1
  176. package/assets/_threadId-Bm7b75jN.js +0 -1
  177. package/assets/_threadId-CCwEReI2.js +0 -1
  178. package/assets/_threadId-Db39B53v.js +0 -1
  179. package/assets/_threadId-Dht02PUZ.js +0 -1
  180. package/assets/_view._date-BQeaBjoE.js +0 -1
  181. package/assets/brief-CFBkxoDK.js +0 -1
  182. package/assets/calendars-52NaEZbX.js +0 -1
  183. package/assets/compose._-_outboxMessageId_-BY1Sf-7o.js +0 -1
  184. package/assets/compose._-_outboxMessageId_-ByGI1c-o.js +0 -1
  185. package/assets/compose._-_outboxMessageId_-CvOAO1iL.js +0 -1
  186. package/assets/compose._-_outboxMessageId_-EZpX9L3H.js +0 -1
  187. package/assets/compose._-_outboxMessageId_-urlj3DLH.js +0 -1
  188. package/assets/edit-B9dhadKH.js +0 -1
  189. package/assets/edit-vn6fIBd6.js +0 -1
  190. package/assets/filters-VSaDpnX3.js +0 -1
  191. package/assets/flagged-BZJepVc-.js +0 -1
  192. package/assets/folder-failure-CqkVSsrb.js +0 -1
  193. package/assets/folders-CTNX9Hcm.js +0 -1
  194. package/assets/index-B--m5QrT.js +0 -1
  195. package/assets/index-BuawSiTp.js +0 -1
  196. package/assets/index-C2YSZxRF.js +0 -1
  197. package/assets/index-CO1X8-aP.js +0 -1
  198. package/assets/index-CPvSvBZB.js +0 -1
  199. package/assets/index-ChWo5_90.js +0 -1
  200. package/assets/index-DGb7Ls8y.js +0 -1
  201. package/assets/index-DLRo9M2D.js +0 -1
  202. package/assets/index-DemsYVll.js +0 -1
  203. package/assets/index-Dylwxpr-.js +0 -1
  204. package/assets/index-YwusJB4d.js +0 -1
  205. package/assets/index-Zfii_-4V.js +0 -1
  206. package/assets/index-fsuIswbe.js +0 -213
  207. package/assets/labels-CUXsONgB.js +0 -1
  208. package/assets/mail-BodKXw3C.js +0 -1
  209. package/assets/new-DlRrHbU8.js +0 -1
  210. package/assets/onboarding-8O2rW7qq.js +0 -1
  211. package/assets/outbox-nrXvnMTk.js +0 -1
  212. package/assets/settings-MlHARJWl.js +0 -1
  213. package/assets/spam-CecFwFHS.js +0 -1
  214. package/assets/suggestion._suggestionId-DiMWWP0r.js +0 -1
  215. package/assets/task._calendarTaskId-D-wpEifQ.js +0 -1
  216. package/assets/useCalendarSuggestions-DXbA0boT.js +0 -1
  217. package/assets/useLabels-k1VKuQrr.js +0 -1
@@ -0,0 +1 @@
1
+ import{j as o}from"./index-CKFdaY9c.js";import{M as r}from"./MailboxPane-CxaGFC0R.js";import"./useInfiniteQuery-DwTTxcsy.js";import"./MessageToolbar-CnhMX7Ap.js";import"./MessageBody-BYYCZieC.js";import"./kbd-qpWA48X9.js";import"./search-scope-DNDpRNp9.js";import"./app-chrome-CS-vT-4r.js";import"./nav-link-YOSchPy9.js";import"./useMediaQuery-CjE8xNMz.js";import"./reply-SkF_KCOk.js";import"./useMessageBodyContent-D5mskS3v.js";import"./roving-focus-DlzLpO4G.js";import"./chevron-down-wpFtElCn.js";import"./search-token-index-cy3uaYXm.js";import"./useQueries-CQ_R-NWg.js";import"./useLabels-BIArT792.js";import"./list-pages-BCUbyyea.js";import"./index-BQ2vE6gp.js";import"./useSignature-CnLh1XFv.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BpDHcfPe.js";import"./suggest-list-czu9q5H4.js";import"./sections-ZsRsk30_.js";import"./useJunkMailboxIds-CDFS8XJA.js";import"./badge-DYFkBshe.js";import"./undo-2-CgG5m84e.js";import"./DropdownMenu-DsxemHc4.js";import"./refresh-cw-CCcTeH3S.js";import"./popover-menu-DP-hyKpu.js";import"./ErrorState-BptbbJAv.js";import"./mail-Bsgov7FY.js";import"./download-CHIm9QMw.js";import"./avatar-B60PZejm.js";import"./EmptyState-Dv8xCRkX.js";import"./circle-question-mark-CYsyue28.js";import"./useFilters-Cv2IfE4J.js";import"./select-yGv73aji.js";import"./plus-DsSkq30M.js";import"./calendar-suggestion-CZ6ssHct.js";import"./useCalendarSuggestions-BaIFwYBZ.js";import"./agenda-time-C9jExuVe.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-DON3hXqq.js";import"./calendar-failure-note-sEjmPcbo.js";import"./checkbox-ZdvWSWRN.js";import"./clock-D8a14yMJ.js";import"./segmented-control-CeqFpYfk.js";import"./useLayoutTier-Y7Z9Nnsm.js";import"./menu-CKmdL0us.js";import"./folder-input-BqAxe_6s.js";import"./confirm-dialog-CsttDS5u.js";import"./label-chip-zwUAXSWu.js";import"./cloud-off-I2wH-wZi.js";import"./useRefreshControl-DwtRYeei.js";import"./circle-check-big-C2cm1OoH.js";import"./LabelApplyTrigger-DzgVUcax.js";import"./MailViewChrome-DoBZYTxQ.js";import"./NavMenuButton-B28Nb9kR.js";import"./shield-check-CIZoP3AE.js";import"./bottom-sheet-B0y_-mKC.js";import"./circle-check-Q9IHsvBp.js";function xo(){return o.jsx(r.Reading,{})}export{xo as component};
@@ -0,0 +1 @@
1
+ import{j as o}from"./index-CKFdaY9c.js";import{C as r}from"./CollectionPane-C6EYtyWc.js";import"./useCollectionThreads-BMsppZhN.js";import"./useQueries-CQ_R-NWg.js";import"./useInfiniteQuery-DwTTxcsy.js";import"./MessageToolbar-CnhMX7Ap.js";import"./MessageBody-BYYCZieC.js";import"./kbd-qpWA48X9.js";import"./search-scope-DNDpRNp9.js";import"./app-chrome-CS-vT-4r.js";import"./nav-link-YOSchPy9.js";import"./useMediaQuery-CjE8xNMz.js";import"./reply-SkF_KCOk.js";import"./useMessageBodyContent-D5mskS3v.js";import"./roving-focus-DlzLpO4G.js";import"./chevron-down-wpFtElCn.js";import"./search-token-index-cy3uaYXm.js";import"./useLabels-BIArT792.js";import"./list-pages-BCUbyyea.js";import"./index-BQ2vE6gp.js";import"./useSignature-CnLh1XFv.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BpDHcfPe.js";import"./suggest-list-czu9q5H4.js";import"./sections-ZsRsk30_.js";import"./useJunkMailboxIds-CDFS8XJA.js";import"./badge-DYFkBshe.js";import"./undo-2-CgG5m84e.js";import"./DropdownMenu-DsxemHc4.js";import"./refresh-cw-CCcTeH3S.js";import"./popover-menu-DP-hyKpu.js";import"./ErrorState-BptbbJAv.js";import"./mail-Bsgov7FY.js";import"./download-CHIm9QMw.js";import"./avatar-B60PZejm.js";import"./EmptyState-Dv8xCRkX.js";import"./circle-question-mark-CYsyue28.js";import"./useFilters-Cv2IfE4J.js";import"./select-yGv73aji.js";import"./plus-DsSkq30M.js";import"./calendar-suggestion-CZ6ssHct.js";import"./useCalendarSuggestions-BaIFwYBZ.js";import"./agenda-time-C9jExuVe.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-DON3hXqq.js";import"./calendar-failure-note-sEjmPcbo.js";import"./checkbox-ZdvWSWRN.js";import"./clock-D8a14yMJ.js";import"./segmented-control-CeqFpYfk.js";import"./useLayoutTier-Y7Z9Nnsm.js";import"./menu-CKmdL0us.js";import"./folder-input-BqAxe_6s.js";import"./confirm-dialog-CsttDS5u.js";import"./label-chip-zwUAXSWu.js";import"./cloud-off-I2wH-wZi.js";import"./MailViewChrome-DoBZYTxQ.js";import"./wizard-selection-zWa1qc6-.js";function po(){return o.jsx(r.Reading,{})}export{po as component};
@@ -0,0 +1 @@
1
+ import{j as r}from"./index-CKFdaY9c.js";import{B as o}from"./BriefPane-OvZiBDtW.js";import"./MessageToolbar-CnhMX7Ap.js";import"./MessageBody-BYYCZieC.js";import"./kbd-qpWA48X9.js";import"./search-scope-DNDpRNp9.js";import"./app-chrome-CS-vT-4r.js";import"./nav-link-YOSchPy9.js";import"./useMediaQuery-CjE8xNMz.js";import"./reply-SkF_KCOk.js";import"./useMessageBodyContent-D5mskS3v.js";import"./roving-focus-DlzLpO4G.js";import"./chevron-down-wpFtElCn.js";import"./search-token-index-cy3uaYXm.js";import"./useQueries-CQ_R-NWg.js";import"./useLabels-BIArT792.js";import"./list-pages-BCUbyyea.js";import"./index-BQ2vE6gp.js";import"./useSignature-CnLh1XFv.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BpDHcfPe.js";import"./suggest-list-czu9q5H4.js";import"./sections-ZsRsk30_.js";import"./useJunkMailboxIds-CDFS8XJA.js";import"./badge-DYFkBshe.js";import"./undo-2-CgG5m84e.js";import"./DropdownMenu-DsxemHc4.js";import"./refresh-cw-CCcTeH3S.js";import"./popover-menu-DP-hyKpu.js";import"./ErrorState-BptbbJAv.js";import"./mail-Bsgov7FY.js";import"./download-CHIm9QMw.js";import"./avatar-B60PZejm.js";import"./EmptyState-Dv8xCRkX.js";import"./circle-question-mark-CYsyue28.js";import"./useFilters-Cv2IfE4J.js";import"./select-yGv73aji.js";import"./plus-DsSkq30M.js";import"./calendar-suggestion-CZ6ssHct.js";import"./useCalendarSuggestions-BaIFwYBZ.js";import"./agenda-time-C9jExuVe.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-DON3hXqq.js";import"./calendar-failure-note-sEjmPcbo.js";import"./checkbox-ZdvWSWRN.js";import"./clock-D8a14yMJ.js";import"./segmented-control-CeqFpYfk.js";import"./useLayoutTier-Y7Z9Nnsm.js";import"./menu-CKmdL0us.js";import"./folder-input-BqAxe_6s.js";import"./confirm-dialog-CsttDS5u.js";import"./label-chip-zwUAXSWu.js";import"./cloud-off-I2wH-wZi.js";import"./LabelApplyTrigger-DzgVUcax.js";import"./useRefreshControl-DwtRYeei.js";import"./circle-check-big-C2cm1OoH.js";import"./wizard-selection-zWa1qc6-.js";function pr(){return r.jsx(o.Reading,{})}export{pr as component};
@@ -0,0 +1 @@
1
+ import{fz as t,j as m}from"./index-CKFdaY9c.js";import{C as p}from"./CalendarEventPopup-U6Ndkn2v.js";import"./useCalendarSuggestions-BaIFwYBZ.js";import"./ErrorState-BptbbJAv.js";import"./useQueries-CQ_R-NWg.js";import"./list-pages-BCUbyyea.js";import"./useCalendarData-CgRGDHYQ.js";import"./useCalendarTasks-CnP7DfUR.js";import"./calendar-format-BwCpz-JZ.js";import"./nav-link-YOSchPy9.js";import"./useMediaQuery-CjE8xNMz.js";import"./calendar-DON3hXqq.js";import"./reply-SkF_KCOk.js";import"./CalendarSession-C_XnZoOI.js";import"./calendar-event-popup-BqE6svk6.js";import"./pencil-C6KO5975.js";import"./calendar-guests-CuFcAD3k.js";import"./circle-question-mark-CYsyue28.js";import"./confirm-dialog-CsttDS5u.js";function v(){const{calendarObjectId:r,recurrenceId:o}=t.useParams();return m.jsx(p,{calendarObjectId:r,recurrenceId:o})}export{v as component};
@@ -0,0 +1 @@
1
+ import{j as o}from"./index-CKFdaY9c.js";import{C as t}from"./CollectionPane-C6EYtyWc.js";import"./useCollectionThreads-BMsppZhN.js";import"./useQueries-CQ_R-NWg.js";import"./useInfiniteQuery-DwTTxcsy.js";import"./MessageToolbar-CnhMX7Ap.js";import"./MessageBody-BYYCZieC.js";import"./kbd-qpWA48X9.js";import"./search-scope-DNDpRNp9.js";import"./app-chrome-CS-vT-4r.js";import"./nav-link-YOSchPy9.js";import"./useMediaQuery-CjE8xNMz.js";import"./reply-SkF_KCOk.js";import"./useMessageBodyContent-D5mskS3v.js";import"./roving-focus-DlzLpO4G.js";import"./chevron-down-wpFtElCn.js";import"./search-token-index-cy3uaYXm.js";import"./useLabels-BIArT792.js";import"./list-pages-BCUbyyea.js";import"./index-BQ2vE6gp.js";import"./useSignature-CnLh1XFv.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BpDHcfPe.js";import"./suggest-list-czu9q5H4.js";import"./sections-ZsRsk30_.js";import"./useJunkMailboxIds-CDFS8XJA.js";import"./badge-DYFkBshe.js";import"./undo-2-CgG5m84e.js";import"./DropdownMenu-DsxemHc4.js";import"./refresh-cw-CCcTeH3S.js";import"./popover-menu-DP-hyKpu.js";import"./ErrorState-BptbbJAv.js";import"./mail-Bsgov7FY.js";import"./download-CHIm9QMw.js";import"./avatar-B60PZejm.js";import"./EmptyState-Dv8xCRkX.js";import"./circle-question-mark-CYsyue28.js";import"./useFilters-Cv2IfE4J.js";import"./select-yGv73aji.js";import"./plus-DsSkq30M.js";import"./calendar-suggestion-CZ6ssHct.js";import"./useCalendarSuggestions-BaIFwYBZ.js";import"./agenda-time-C9jExuVe.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-DON3hXqq.js";import"./calendar-failure-note-sEjmPcbo.js";import"./checkbox-ZdvWSWRN.js";import"./clock-D8a14yMJ.js";import"./segmented-control-CeqFpYfk.js";import"./useLayoutTier-Y7Z9Nnsm.js";import"./menu-CKmdL0us.js";import"./folder-input-BqAxe_6s.js";import"./confirm-dialog-CsttDS5u.js";import"./label-chip-zwUAXSWu.js";import"./cloud-off-I2wH-wZi.js";import"./MailViewChrome-DoBZYTxQ.js";import"./wizard-selection-zWa1qc6-.js";function po(){return o.jsx(t.Reading,{})}export{po as component};
@@ -0,0 +1 @@
1
+ import{fw as o,j as r}from"./index-CKFdaY9c.js";import{C as m}from"./CalendarEventPopup-U6Ndkn2v.js";import"./useCalendarSuggestions-BaIFwYBZ.js";import"./ErrorState-BptbbJAv.js";import"./useQueries-CQ_R-NWg.js";import"./list-pages-BCUbyyea.js";import"./useCalendarData-CgRGDHYQ.js";import"./useCalendarTasks-CnP7DfUR.js";import"./calendar-format-BwCpz-JZ.js";import"./nav-link-YOSchPy9.js";import"./useMediaQuery-CjE8xNMz.js";import"./calendar-DON3hXqq.js";import"./reply-SkF_KCOk.js";import"./CalendarSession-C_XnZoOI.js";import"./calendar-event-popup-BqE6svk6.js";import"./pencil-C6KO5975.js";import"./calendar-guests-CuFcAD3k.js";import"./circle-question-mark-CYsyue28.js";import"./confirm-dialog-CsttDS5u.js";function w(){const{calendarObjectId:t}=o.useParams();return r.jsx(m,{calendarObjectId:t})}export{w as component};
@@ -0,0 +1 @@
1
+ import{j as o}from"./index-CKFdaY9c.js";import{O as t}from"./OutboxPane-ByJt4RDv.js";import"./MessageBody-BYYCZieC.js";import"./kbd-qpWA48X9.js";import"./search-scope-DNDpRNp9.js";import"./app-chrome-CS-vT-4r.js";import"./nav-link-YOSchPy9.js";import"./useMediaQuery-CjE8xNMz.js";import"./reply-SkF_KCOk.js";import"./useMessageBodyContent-D5mskS3v.js";import"./outbox-status-BlKn6P0x.js";import"./NavMenuButton-B28Nb9kR.js";import"./menu-CKmdL0us.js";import"./roving-focus-DlzLpO4G.js";import"./circle-check-big-C2cm1OoH.js";import"./clock-D8a14yMJ.js";import"./row-actions-0g39M7ib.js";import"./rotate-ccw-lh0BmpDo.js";function P(){return o.jsx(t.Reading,{})}export{P as component};
@@ -0,0 +1 @@
1
+ import{j as r}from"./index-CKFdaY9c.js";import{B as o}from"./BriefPane-OvZiBDtW.js";import"./MessageToolbar-CnhMX7Ap.js";import"./MessageBody-BYYCZieC.js";import"./kbd-qpWA48X9.js";import"./search-scope-DNDpRNp9.js";import"./app-chrome-CS-vT-4r.js";import"./nav-link-YOSchPy9.js";import"./useMediaQuery-CjE8xNMz.js";import"./reply-SkF_KCOk.js";import"./useMessageBodyContent-D5mskS3v.js";import"./roving-focus-DlzLpO4G.js";import"./chevron-down-wpFtElCn.js";import"./search-token-index-cy3uaYXm.js";import"./useQueries-CQ_R-NWg.js";import"./useLabels-BIArT792.js";import"./list-pages-BCUbyyea.js";import"./index-BQ2vE6gp.js";import"./useSignature-CnLh1XFv.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BpDHcfPe.js";import"./suggest-list-czu9q5H4.js";import"./sections-ZsRsk30_.js";import"./useJunkMailboxIds-CDFS8XJA.js";import"./badge-DYFkBshe.js";import"./undo-2-CgG5m84e.js";import"./DropdownMenu-DsxemHc4.js";import"./refresh-cw-CCcTeH3S.js";import"./popover-menu-DP-hyKpu.js";import"./ErrorState-BptbbJAv.js";import"./mail-Bsgov7FY.js";import"./download-CHIm9QMw.js";import"./avatar-B60PZejm.js";import"./EmptyState-Dv8xCRkX.js";import"./circle-question-mark-CYsyue28.js";import"./useFilters-Cv2IfE4J.js";import"./select-yGv73aji.js";import"./plus-DsSkq30M.js";import"./calendar-suggestion-CZ6ssHct.js";import"./useCalendarSuggestions-BaIFwYBZ.js";import"./agenda-time-C9jExuVe.js";import"./calendar-format-BwCpz-JZ.js";import"./calendar-DON3hXqq.js";import"./calendar-failure-note-sEjmPcbo.js";import"./checkbox-ZdvWSWRN.js";import"./clock-D8a14yMJ.js";import"./segmented-control-CeqFpYfk.js";import"./useLayoutTier-Y7Z9Nnsm.js";import"./menu-CKmdL0us.js";import"./folder-input-BqAxe_6s.js";import"./confirm-dialog-CsttDS5u.js";import"./label-chip-zwUAXSWu.js";import"./cloud-off-I2wH-wZi.js";import"./LabelApplyTrigger-DzgVUcax.js";import"./useRefreshControl-DwtRYeei.js";import"./circle-check-big-C2cm1OoH.js";import"./wizard-selection-zWa1qc6-.js";function pr(){return r.jsx(o.Reading,{})}export{pr as component};
@@ -1 +1 @@
1
- import{j as s,p as t}from"./index-fsuIswbe.js";function x({className:e,...n}){return s.jsx("kbd",{className:t("inline-flex h-4 min-w-4 items-center justify-center rounded-xs border border-line bg-surface-sunken px-1 font-sans text-2xs text-fg-muted",e),...n})}export{x as K};
1
+ import{j as s,p as t}from"./index-CKFdaY9c.js";function x({className:e,...n}){return s.jsx("kbd",{className:t("inline-flex h-4 min-w-4 items-center justify-center rounded-xs border border-line bg-surface-sunken px-1 font-sans text-2xs text-fg-muted",e),...n})}export{x as K};
@@ -1 +1 @@
1
- import{j as s,p as a}from"./index-fsuIswbe.js";import{i as o,l}from"./useLabels-k1VKuQrr.js";function c({label:e,onRemove:t,className:n}){const r=o(e.color)?l[e.color]:l.Default;return s.jsxs("span",{className:a("inline-flex items-center gap-1 rounded-full bg-surface-sunken px-2 py-0.5 text-2xs font-medium text-fg-muted shrink-0",n),children:[s.jsx("span",{className:a("size-1.5 shrink-0 rounded-full",r)}),s.jsx("span",{className:"truncate",children:e.name}),t&&s.jsx("button",{type:"button",onClick:()=>t(e.labelId),"aria-label":`Remove label ${e.name}`,className:"ml-0.5 rounded-full text-fg-subtle hover:text-fg",children:"×"})]})}export{c as L};
1
+ import{j as s,p as a}from"./index-CKFdaY9c.js";import{i as o,l}from"./useLabels-BIArT792.js";function c({label:e,onRemove:t,className:n}){const r=o(e.color)?l[e.color]:l.Default;return s.jsxs("span",{className:a("inline-flex items-center gap-1 rounded-full bg-surface-sunken px-2 py-0.5 text-2xs font-medium text-fg-muted shrink-0",n),children:[s.jsx("span",{className:a("size-1.5 shrink-0 rounded-full",r)}),s.jsx("span",{className:"truncate",children:e.name}),t&&s.jsx("button",{type:"button",onClick:()=>t(e.labelId),"aria-label":`Remove label ${e.name}`,className:"ml-0.5 rounded-full text-fg-subtle hover:text-fg",children:"×"})]})}export{c as L};
@@ -0,0 +1 @@
1
+ import{r as f,j as e,ar as h,B as b,T as y,u as N,af as C,a as L,c as I,d as S}from"./index-CKFdaY9c.js";import{L as D}from"./label-chip-zwUAXSWu.js";import{S as g}from"./select-yGv73aji.js";import{b as v,u as w,c as $,d as E,a as k}from"./useLabels-BIArT792.js";import{a as R}from"./sections-ZsRsk30_.js";import{S as O}from"./settings-screen-C8z8YwuM.js";import{E as j}from"./ErrorState-BptbbJAv.js";import{C as B}from"./confirm-dialog-CsttDS5u.js";import"./chevron-down-wpFtElCn.js";import"./list-pages-BCUbyyea.js";import"./avatar-B60PZejm.js";import"./badge-DYFkBshe.js";import"./chevron-left-HeNgNNR2.js";import"./menu-CKmdL0us.js";import"./circle-question-mark-CYsyue28.js";function P({labels:n,onRename:i,onRecolor:l,onDelete:u,deletingLabelId:c}){const[d,r]=f.useState(),[o,m]=f.useState("");if(n.length===0)return e.jsx("p",{className:"py-6 text-sm text-fg-muted",children:"No labels yet. Create one below, then use it in a filter or apply it to mail directly."});const a=t=>{const s=o.trim();s!==""&&i(t,s),r(void 0)};return e.jsx("ul",{className:"divide-y divide-line rounded-md border border-line",children:n.map(t=>e.jsxs("li",{className:"flex items-center gap-3 px-3 py-2.5",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[d===t.labelId?e.jsx(h,{autoFocus:!0,value:o,onChange:s=>m(s.target.value),onBlur:()=>a(t.labelId),onKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),a(t.labelId)),s.key==="Escape"&&(s.preventDefault(),r(void 0))},"aria-label":`Rename label ${t.name}`}):e.jsx("button",{type:"button",onClick:()=>{r(t.labelId),m(t.name)},"aria-label":`Rename label ${t.name}`,className:"flex items-center gap-2 rounded-sm text-left hover:opacity-80",children:e.jsx(D,{label:t})}),e.jsx("p",{className:"mt-0.5 text-xs text-fg-subtle",children:t.filterCount===0?"Not used in any filter":`Used in ${t.filterCount} ${t.filterCount===1?"filter":"filters"}`})]}),e.jsx(g,{"aria-label":`Color for ${t.name}`,value:t.color,onChange:s=>l(t.labelId,s.target.value),className:"w-28 shrink-0",children:v.map(s=>e.jsx("option",{value:s,children:s},s))}),e.jsx(b,{variant:"ghost",size:"sm",icon:e.jsx(y,{className:"size-4 text-danger"}),onClick:()=>u(t),disabled:c===t.labelId,"aria-label":`Delete label ${t.name}`})]},t.labelId))})}const T=(n,i)=>{if(i===0)return{title:`Delete the "${n}" label?`};const l=i===1?"filter":"filters";return{title:`Delete the "${n}" label?`,description:`This also deletes ${i} ${l} that ${i===1?"applies":"apply"} it — they can't be recovered.`}},H=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Labels mark mail without moving it — a message can carry any number of them alongside whichever folder it lives in."}),e.jsx("p",{children:"Use a label in a filter's action to have new (and existing) mail label itself automatically, or apply one to a selection directly from the mailbox."}),e.jsx("p",{children:"Deleting a label removes it from every message, and deletes every filter that applies it — the confirmation names how many."})]});function U({accountId:n}){const{createLabel:i,isPending:l,isError:u}=k(n),[c,d]=f.useState(""),[r,o]=f.useState("Default"),m=()=>{const a=c.trim();a!==""&&i(a,r).then(()=>{d(""),o("Default")})};return e.jsxs("div",{className:"space-y-2 rounded-sm border border-line bg-surface p-3",children:[e.jsx("p",{className:"text-sm font-medium text-fg",children:"New label"}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Name"}),e.jsx(h,{value:c,onChange:a=>d(a.target.value),placeholder:"e.g. Receipts","aria-label":"Label name",onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),m())}})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Color"}),e.jsx(g,{value:r,onChange:a=>o(a.target.value),"aria-label":"Label color",className:"w-28",children:v.map(a=>e.jsx("option",{value:a,children:a},a))})]}),e.jsx(b,{variant:"primary",onClick:m,disabled:l||c.trim()==="",children:l?"Creating…":"Create label"})]}),u&&e.jsx(S,{tone:"danger",variant:"soft",children:"Couldn't create that label. Please try again."})]})}function z({account:n}){const i=n.accountId,{labels:l,isPending:u,isError:c,error:d,refetch:r}=w(i),{updateLabel:o}=$(i),{deleteLabel:m,deletingLabelId:a}=E(i),[t,s]=f.useState();return e.jsxs("section",{className:"space-y-2",children:[e.jsx("h2",{className:"text-sm font-semibold text-fg",children:n.email}),u?e.jsx("div",{className:"h-16 animate-pulse rounded-md border border-line bg-surface","aria-busy":"true","aria-label":`Loading labels for ${n.email}`}):c?e.jsx(j,{variant:"inline",title:`Couldn't load labels for ${n.email}`,error:d,onRetry:()=>{r()}}):e.jsx(P,{labels:l,onRename:(p,x)=>o(p,{name:x}),onRecolor:(p,x)=>o(p,{color:x}),onDelete:s,deletingLabelId:a}),e.jsx(U,{accountId:i}),t&&(()=>{const p=T(t.name,t.filterCount);return e.jsx(B,{isOpen:!0,title:p.title,description:p.description,confirmLabel:"Delete label",destructive:!0,isBusy:a===t.labelId,onConfirm:()=>{m(t.labelId),s(void 0)},onCancel:()=>s(void 0)})})()]})}function te(){const n=N(),i=C(),l=R(),[u,c]=f.useState(!0),{data:d,isPending:r,isError:o,error:m,refetch:a}=L(I());return e.jsx(O,{items:i,activeId:"labels",title:"Labels",description:"Mark mail without moving it, per account.",help:H,helpOpen:u,onToggleHelp:()=>c(t=>!t),onSelect:l,onBackToMail:()=>{n({to:"/mail"})},children:r?e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading accounts"}):o?e.jsx(j,{title:"Couldn't load accounts",error:m,onRetry:()=>{a()}}):d.accounts.length===0?e.jsx("p",{className:"py-12 text-sm text-fg-muted",children:"No accounts configured."}):e.jsx("div",{className:"space-y-8",children:d.accounts.map(t=>e.jsx(z,{account:t},t.accountId))})})}export{te as component};
@@ -0,0 +1 @@
1
+ async function*r(o,{maxPages:i=Number.POSITIVE_INFINITY,signal:a}={}){let t;for(let e=0;e<i;e+=1){if(a?.aborted)return;const n=await o(t);if(yield n.items,!n.continuationToken)return;t=n.continuationToken}}export{r as l};
@@ -0,0 +1 @@
1
+ import{b as je,j as e,r as x,n as Be,o as $e,D as Ke,X as Qe,p as E,S as qe,C as Ve,q as ye,t as ae,v as He,w as Ue,x as H,y as Ne,z as Se,F as We,T as Ye,E as Ge,M as Xe,G as Je,H as Ze,I as es,B as q,J as Ce,K as ne,N as ss,P as Ie,e as se,Q as we,R as ke,U as ts,V as as,W as ns,Y as Oe,a as Me,Z as os,_ as rs,$ as X,a0 as is,a1 as ls,a2 as cs,a3 as us,a4 as ds,a5 as ms,a6 as xs,a7 as fs,a8 as ps,u as hs,c as gs,a9 as bs,O as vs}from"./index-CKFdaY9c.js";import{l as B,u as J,m as oe,a as js,b as ys,c as Ns}from"./reply-SkF_KCOk.js";import{A as Ss,S as Ee,a as Cs,c as Is,L as ws,b as ks,D as Os,d as Ms}from"./DesktopChrome-DXIJ6wUA.js";import{u as Es,N as P,a as Rs,b as Ls,i as Ps}from"./nav-link-YOSchPy9.js";import{u as te,a as Fs}from"./useMessageBodyContent-D5mskS3v.js";import{P as Ts}from"./pencil-C6KO5975.js";import{c as zs,s as As,M as Ds}from"./MailShell-DE0ZN2ct.js";import{u as _s,a as Bs,R as $s,s as Ks,i as Qs,H as qs,M as Vs}from"./useRefreshControl-DwtRYeei.js";import{K as Hs,B as Us,S as Ws,u as Ys,s as Gs,b as Xs,a as Js,c as Zs,d as et}from"./search-token-index-cy3uaYXm.js";import{u as st}from"./sections-ZsRsk30_.js";import{u as Re}from"./search-scope-DNDpRNp9.js";import{M as tt}from"./menu-CKmdL0us.js";import{B as Le,u as at}from"./useResultFolderIndex-ZNSoZByc.js";import{u as Pe}from"./useQueries-CQ_R-NWg.js";import{u as nt}from"./useCollectionThreads-BMsppZhN.js";import{l as re,i as ot,u as rt}from"./useLabels-BIArT792.js";import{f as it,a as lt}from"./folder-failure-BphZCUyZ.js";import{i as ct}from"./outbox-status-BlKn6P0x.js";import{u as ut}from"./roving-focus-DlzLpO4G.js";import{C as dt,A as mt}from"./account-service-status-C6hq8flJ.js";import{C as U}from"./chevron-down-wpFtElCn.js";import{u as xt}from"./index-BQ2vE6gp.js";import{u as Fe,i as ft}from"./useLayoutTier-Y7Z9Nnsm.js";import{u as pt}from"./useDebouncedValue-BpDHcfPe.js";import{E as ht}from"./ErrorState-BptbbJAv.js";import{K as ie}from"./kbd-qpWA48X9.js";import"./avatar-B60PZejm.js";import"./popover-menu-DP-hyKpu.js";import"./mail-Bsgov7FY.js";import"./app-chrome-CS-vT-4r.js";import"./useMediaQuery-CjE8xNMz.js";import"./FullCompose-BGLjrGst.js";import"./confirm-dialog-CsttDS5u.js";import"./circle-check-big-C2cm1OoH.js";import"./refresh-cw-CCcTeH3S.js";import"./useInfiniteQuery-DwTTxcsy.js";import"./list-pages-BCUbyyea.js";import"./useSignature-CnLh1XFv.js";import"./account-form-helpers-DhckT_PN.js";import"./suggest-list-czu9q5H4.js";const Te={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};Te.node;const gt=je(Te);const ze={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};ze.node;const bt=je(ze);function vt({onCompose:s}){return e.jsx("button",{type:"button",onClick:s,"aria-label":"Compose new message",className:"lg:hidden fixed right-4 z-30 h-14 w-14 rounded-full bg-accent text-accent-fg shadow-lg flex items-center justify-center hover:opacity-90 active:scale-95 transition-all",style:{bottom:"calc(var(--app-tab-bar, 0px) + env(safe-area-inset-bottom, 0px) + 1rem)"},children:e.jsx(Ts,{className:"size-6"})})}const jt=({isOpen:s,onClose:t})=>{const a=x.useRef(null);return Be({id:"shortcuts",open:s,answers:{back:t}}),$e(a,s),s?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[e.jsx(Ke,{label:"Dismiss keyboard shortcuts",onDismiss:t,className:"backdrop-blur-sm"}),e.jsxs("div",{ref:a,role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",tabIndex:-1,className:E("relative z-10 max-h-[85vh] w-full max-w-2xl overflow-y-auto","rounded-lg border border-line bg-surface shadow-lg","p-6"),children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Keyboard shortcuts"}),e.jsx("button",{type:"button",onClick:t,className:"p-1 text-fg-muted transition-colors hover:text-fg","aria-label":"Close",children:e.jsx(Qe,{className:"size-5"})})]}),e.jsx("div",{className:"grid gap-x-8 gap-y-6 sm:grid-cols-2",children:Hs.map(n=>e.jsxs("div",{children:[e.jsx("h3",{className:"mb-3 text-sm font-medium text-fg-muted",children:n.title}),e.jsx("div",{className:"space-y-2",children:n.hints.map(o=>e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{className:"text-sm",children:o.description}),e.jsx("span",{className:"flex shrink-0 items-center gap-1",children:o.keys.map((i,l)=>e.jsxs(x.Fragment,{children:[l>0&&o.keys[0]==="g"&&e.jsx("span",{className:"text-2xs text-fg-subtle",children:"then"}),e.jsx(ie,{children:i})]},i))})]},`${o.action}-${o.keys.join("+")}`))})]},n.title))}),e.jsx("div",{className:"mt-6 border-t border-line pt-4",children:e.jsxs("p",{className:"text-center text-xs text-fg-muted",children:["Press ",e.jsx(ie,{children:"Esc"})," to close"]})})]})]}):null},yt="button:not([disabled]), a[href]",$="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface-sunken";function Nt({active:s,dimmed:t,indent:a}){return E("flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors",$,a&&"pl-7",s?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface hover:text-fg",t&&"opacity-55")}function St({icon:s,label:t,count:a,active:n,failed:o}){return e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:E("shrink-0",n?"text-accent-2":"text-fg-subtle"),children:s}),e.jsx("span",{className:"flex-1 truncate",children:t}),o&&e.jsx(Ne,{className:"size-3.5 shrink-0 text-danger","aria-hidden":"true"}),a!=null&&a>0&&e.jsx("span",{className:E("text-2xs tabular-nums",n?"text-accent-2":"text-fg-subtle"),children:a})]})}function Ct({label:s,text:t,dimmed:a}){return e.jsxs("div",{role:"note","aria-label":`${s} — ${t}`,className:E("flex w-full cursor-not-allowed items-start gap-2 rounded-md px-2 py-1 text-sm text-fg-subtle",a&&"opacity-55"),children:[e.jsx(gt,{className:"mt-0.5 size-4 shrink-0","aria-hidden":"true"}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block truncate italic",children:s}),e.jsx("span",{className:"block text-2xs",children:t})]})]})}function z({icon:s,label:t,count:a,active:n,dimmed:o,indent:i,navId:l,linkComponent:u,ariaLabel:f,title:c,note:g,onClick:m}){if(g?.kind==="unavailable")return e.jsx(Ct,{label:t,text:g.text,dimmed:o});const b=Nt({active:n,dimmed:o,indent:i}),d=e.jsx(St,{icon:s,label:t,count:a,active:n,failed:g!==void 0}),v=f??t,I=g?`${v} — ${g.text}`:v,j=g?`${c??t} — ${g.text}`:c;return l&&u?u({navId:l,className:b,ariaLabel:I,title:j,onClick:m,children:d}):e.jsx("button",{type:"button",onClick:m,className:b,"aria-label":g?I:f,title:j,children:d})}const le={inbox:0,flagged:1,drafts:2,sent:3,archive:4,all:5,junk:6,trash:7};function It(s){switch(s){case"inbox":return e.jsx(es,{className:"size-4"});case"flagged":return e.jsx(ye,{className:"size-4"});case"drafts":return e.jsx(Ze,{className:"size-4"});case"sent":return e.jsx(Se,{className:"size-4"});case"archive":return e.jsx(Je,{className:"size-4"});case"all":return e.jsx(Xe,{className:"size-4"});case"junk":return e.jsx(Ge,{className:"size-4"});case"trash":return e.jsx(Ye,{className:"size-4"})}}function wt(s){const t=ot(s)?re[s]:re.Default;return e.jsx("span",{className:"flex size-4 items-center justify-center",children:e.jsx("span",{className:E("size-2.5 rounded-full",t)})})}const ce=s=>s.role!=null,W=8,ue="remit.nav.folders.open.",de="remit.nav.account.open.",me="remit.nav.folder.open.";function Y(s,t,a){try{const n=localStorage.getItem(s+t);return n===null?a:n!=="0"}catch{return a}}function G(s,t,a){try{localStorage.setItem(s+t,a?"1":"0")}catch{}}function kt({account:s,selectedNavId:t,onSelectNav:a,linkComponent:n}){const[o,i]=x.useState(()=>Y(de,s.id,!0)),[l,u]=x.useState(()=>Y(ue,s.id,!0)),[f,c]=x.useState(!1),[g,m]=x.useState({}),b=r=>g[r]??Y(me,r,!0),d=r=>{const N=!b(r);G(me,r,N),m(T=>({...T,[r]:N}))},v=()=>{i(r=>{const N=!r;return G(de,s.id,N),N})},I=()=>{u(r=>{const N=!r;return G(ue,s.id,N),N})},j=s.mailboxes.filter(ce).sort((r,N)=>le[r.role]-le[N.role]),y=s.mailboxes.filter(r=>!ce(r)),O=s.hierarchyDelimiter,F=new Map(y.map(r=>[r.id,r])),M=y.map(r=>({id:r.id,label:r.name,path:r.fullPath??r.name})),D=new Set(M.map(r=>r.path)),p=new Set(M.flatMap(r=>ae(r.path,O).filter(N=>D.has(N)))),S=M.find(r=>r.id===t),C=new Set(S?ae(S.path,O):[]),k=new Set(M.filter(r=>C.has(r.path)||b(r.id)).map(r=>r.path)),h=He(Ue(M,O),k,O).flatMap(r=>{const N=F.get(r.folder.id);return N?[{...r,mailbox:N}]:[]}),w=f||h.length<=W?h:h.slice(0,W),R=h.length-w.length,L=s.status??"ready",_=s.syncedServices!==void 0&&!s.syncedServices.includes("Mail"),A=L==="ready"&&j.length===0&&y.length===0;return e.jsxs("div",{className:"mt-3",children:[e.jsxs("button",{type:"button",onClick:v,"aria-expanded":o,className:E("flex w-full items-center gap-1.5 px-2 pb-1 text-left transition-colors hover:text-fg",$,s.muted&&"opacity-55"),children:[o?e.jsx(U,{className:"size-3 shrink-0 text-fg-subtle"}):e.jsx(H,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"truncate text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:s.label}),s.muted&&e.jsxs(e.Fragment,{children:[e.jsx(Us,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"text-2xs text-fg-subtle",children:"muted"})]}),_&&e.jsxs(e.Fragment,{children:[e.jsx(dt,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"text-2xs text-fg-subtle",children:mt.Mail})]})]}),o&&e.jsxs(e.Fragment,{children:[L==="loading"&&e.jsx("div",{className:"px-2 py-1 text-sm text-fg-muted",children:"Loading…"}),L==="error"&&e.jsxs("div",{role:"alert",className:"mx-2 my-1 flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft px-2 py-1.5 text-sm",children:[e.jsx(Ne,{className:"mt-0.5 size-4 shrink-0 text-danger","aria-hidden":"true"}),e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx("p",{className:"font-medium text-danger",children:"Couldn't load mailboxes"})}),s.onRetry&&e.jsx("button",{type:"button",onClick:s.onRetry,className:"shrink-0 text-sm font-medium text-accent hover:underline",children:"Retry"})]}),A&&e.jsx("div",{className:"px-2 py-1 text-sm text-fg-muted",children:"No mailboxes"}),L==="ready"&&e.jsxs(e.Fragment,{children:[j.map(r=>e.jsx(z,{navId:r.id,linkComponent:n,icon:It(r.role),label:r.name,ariaLabel:r.name,title:r.fullPath??r.name,note:r.note,count:r.unseen,active:t===r.id,dimmed:s.muted,onClick:()=>a?.(r.id)},r.id)),s.outboxPending!==void 0&&e.jsx(z,{navId:"outbox",linkComponent:n,icon:e.jsx(Se,{className:"size-4"}),label:"Outbox",ariaLabel:"Outbox",count:s.outboxPending>0?s.outboxPending:void 0,active:t==="outbox",dimmed:s.muted,onClick:()=>a?.("outbox")}),y.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:I,"aria-expanded":l,className:E("mt-1 flex w-full items-center gap-1 px-2 py-1 text-left text-2xs font-semibold uppercase tracking-wider text-fg-subtle transition-colors hover:text-fg",$),children:[l?e.jsx(U,{className:"size-3 shrink-0"}):e.jsx(H,{className:"size-3 shrink-0"}),e.jsx("span",{className:"flex-1",children:"Folders"}),e.jsx("span",{className:"tabular-nums opacity-70",children:y.length})]}),l&&e.jsxs(e.Fragment,{children:[w.map(({mailbox:r,folder:N,depth:T,expanded:V})=>e.jsxs("div",{className:"flex items-center",style:{paddingLeft:`${T*.75}rem`},children:[p.has(N.path)?e.jsx("button",{type:"button",onClick:()=>d(r.id),"aria-expanded":V,"aria-label":`${V?"Collapse":"Expand"} ${r.name}`,className:E("flex size-5 shrink-0 items-center justify-center rounded text-fg-subtle transition-colors hover:text-fg",$),children:V?e.jsx(U,{className:"size-3"}):e.jsx(H,{className:"size-3"})}):e.jsx("span",{className:"size-5 shrink-0"}),e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx(z,{navId:r.id,linkComponent:n,icon:e.jsx(We,{className:"size-4"}),label:r.name,ariaLabel:r.name,title:r.fullPath??r.name,note:r.note,count:r.unseen,active:t===r.id,dimmed:s.muted,onClick:()=>a?.(r.id)})})]},r.id)),(R>0||f)&&h.length>W&&e.jsx("button",{type:"button",onClick:()=>c(r=>!r),className:E("ml-7 flex items-center px-2 py-1 text-2xs font-medium text-accent transition-colors hover:underline",$),children:f?"Show less":`Show all (${h.length})`})]})]})]})]})]})}function Ot({accounts:s,selectedNavId:t,briefUnseen:a,onSelectNav:n,variant:o="desktop",linkComponent:i,labels:l=[],calendarNav:u="hidden"}){const f=x.useRef(null);ut({containerRef:f,itemSelector:yt});const c=o==="drawer",g=e.jsxs("nav",{ref:c?f:void 0,className:c?"px-2 py-2":"flex-1 overflow-y-auto px-2 py-2","aria-label":"Mailboxes",children:[e.jsx(z,{navId:"brief",linkComponent:i,icon:e.jsx(qe,{className:"size-4"}),label:"Daily brief",ariaLabel:"Daily brief",count:a,active:t==="brief",onClick:()=>n?.("brief")}),l.map(m=>e.jsx(z,{navId:m.id,linkComponent:i,icon:wt(m.color),label:m.name,ariaLabel:m.name,count:m.unseen,active:t===m.id,onClick:()=>n?.(m.id)},m.id)),u==="shown"&&e.jsx(z,{navId:"calendar",linkComponent:i,icon:e.jsx(Ve,{className:"size-4"}),label:"Calendar",ariaLabel:"Calendar",active:t==="calendar",onClick:()=>n?.("calendar")}),e.jsx(z,{navId:"flagged",linkComponent:i,icon:e.jsx(ye,{className:"size-4"}),label:"Starred",ariaLabel:"Starred",active:t==="flagged",onClick:()=>n?.("flagged")}),s.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-sm text-fg-muted",children:"No accounts configured"}):s.map(m=>e.jsx(kt,{account:m,selectedNavId:t,onSelectNav:n,linkComponent:i},m.id))]});return c?g:e.jsx("aside",{ref:f,className:"flex h-full w-full flex-col bg-surface-sunken",children:g})}function Mt(){const s=Re();if(!s)return null;const t=s.showNavPane?!s.navCollapsed:!1;return e.jsx(q,{variant:"ghost",size:"sm",icon:e.jsx(tt,{className:"size-4"}),onClick:s.toggleNav,"aria-label":t?"Hide folders":"Show folders","aria-expanded":t,title:"Folders",className:"shrink-0"})}const Et={global:"Search all mail",pending:"Search mail",scoped:"Search this folder"};function Rt({search:s,onCompose:t,onReportBug:a,onOpenSettings:n,settingsAttention:o,composeShortcut:i,refreshControl:l,account:u}){return e.jsx(Ss,{leading:e.jsx(Mt,{}),search:e.jsx(Ws,{value:s.value,onChange:s.onChange,onClear:s.onClear,onClearQuery:s.onClearQuery,chips:s.chips,onRemoveChip:s.onRemoveChip,placeholder:Et[s.scope]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(q,{variant:"ghost",size:"sm",icon:e.jsx(bt,{className:"size-4"}),title:i?`Compose (${i})`:"Compose","aria-label":"Compose",onClick:t}),e.jsx(q,{variant:"ghost",size:"sm",icon:e.jsx(Le,{className:"size-4"}),title:"Report a bug","aria-label":"Report a bug",onClick:a}),e.jsx(q,{variant:"ghost",size:"sm",icon:e.jsx(Ce,{label:o,children:e.jsx(Ee,{className:"size-4"})}),title:"Settings","aria-label":o?`Settings — ${o}`:"Settings",onClick:n}),l,u]})})}const Z="label:";function Ae(s){return`${Z}${s}`}function Lt(s){return s.startsWith(Z)?s.slice(Z.length):void 0}function Pt(){const{pathname:s}=Es(),t=ne({from:"/mail/$mailboxId",shouldThrow:!1}),a=ne({from:"/mail/label/$labelId",shouldThrow:!1});return B(s,"/settings")?"settings":B(s,"/calendar")?"calendar":B(s,"/mail/outbox")?"outbox":B(s,"/mail/flagged")?"flagged":B(s,"/mail/brief")?"brief":a?.labelId?Ae(a.labelId):t?.mailboxId??""}function Ft(){const s=ss(),t=J({select:c=>oe(c.location.pathname)}),a=J({select:c=>js(c.location.search)}),[n,o]=x.useState(a),i=pt(n,200),[l,u]=x.useState(t);if(l!==t){const c=As(l,t,a);u(t),c!==void 0&&o(c)}const f=x.useCallback(c=>{u(oe(s.state.location.pathname)),o(c)},[s]);return{searchInput:n,committedQuery:zs(n,i),viewKey:t,setSearchInput:f}}const Tt=()=>{const s=te();return ys()?null:e.jsx(vt,{onCompose:s})};function xe({accounts:s}){const{searchInput:t,onSearchChange:a,onSearchClear:n,onSearchClearQuery:o,resultFolderIndex:i}=Ie(),l=se(),u=st(),f=te(),{scope:c,clearScope:g}=Ys(s),m=we(),b=c.kind==="scoped"?[{id:c.chip.id,label:c.chip.label,tone:"scope"}]:void 0,d=x.useMemo(()=>s.map(O=>O.accountId),[s]),{hasNewMail:v}=_s(),{state:I,errorMessage:j,refresh:y}=Bs(d,{onSettled:()=>ts(l,as(i.keys()))});return e.jsx(Rt,{search:{value:t,scope:c.kind,chips:b,onChange:a,onClear:n,onClearQuery:o,onRemoveChip:g},onCompose:f,onReportBug:ke,onOpenSettings:()=>u("accounts"),settingsAttention:m,composeShortcut:Gs("compose"),refreshControl:e.jsx($s,{state:I,onRefresh:y,label:"Refresh all accounts",errorMessage:j,hasUpdate:v(d)}),account:e.jsx(Cs,{})})}function zt(){return e.jsxs("button",{type:"button",onClick:ke,className:"flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm text-fg-muted transition-colors hover:bg-surface hover:text-fg",children:[e.jsx(Le,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Report a bug"})]})}const At=({fullPath:s,hierarchyDelimiter:t})=>s.split(t).slice(0,-1).join(t);function Dt(s,t){const a=new Set(t.flatMap(o=>o.folders.flatMap(i=>i.state==="Missing"?[]:[i.mailboxId]))),n=new Set(s.filter(o=>a.has(o.mailboxId)).map(At));return s.filter(o=>!a.has(o.mailboxId)&&!n.has(o.fullPath))}const fe=s=>/^\d/.test(s),_t=(s,t)=>{const a=fe(s),n=fe(t);return a&&!n?-1:!a&&n?1:s.localeCompare(t,void 0,{sensitivity:"base",numeric:!0})};function Bt(s,t,a){const n=[],o=[];for(const i of s)t.has(i.mailboxId)?n.push(i):o.push(i);return o.sort((i,l)=>_t(X(i,void 0,a),X(l,void 0,a))),{system:n,labels:o}}const $t=s=>{const t=it(s);if(t)return{kind:"unavailable",text:t};const a=lt(s);if(a)return{kind:"failure",text:a}};function Kt(s,t,a){const n=is(t)&&s.unseenCount>0;return{id:s.mailboxId,name:X(s,t,a),unseen:n?s.unseenCount:void 0,role:t,fullPath:s.fullPath,note:$t(s)}}function Qt(s,t){return s.map(a=>{const n=t.get(a.labelId)??0;return{id:Ae(a.labelId),name:a.name,color:a.color,unseen:n>0?n:void 0}})}function pe({accounts:s,onMailboxSelect:t,variant:a="desktop"}){const n=se(),o=Pt(),{onSearchChange:i}=Ie(),{t:l}=ns("mail",{useSuspense:!1}),u=x.useCallback((p,S)=>l(p,{defaultValue:S}),[l]),f=Pe({queries:s.map(p=>({...Oe({path:{accountId:p.accountId}}),staleTime:1/0}))}),{labels:c,isPending:g,isError:m}=rt(s[0]?.accountId),b=!g||m,d=x.useMemo(()=>c.map(p=>p.labelId),[c]),v=nt(d),I=x.useMemo(()=>Qt(c,v),[c,v]),{data:j}=Me(os()),y=x.useMemo(()=>(j?.items??[]).filter(p=>ct(p.status)).length,[j?.items]),O=x.useMemo(()=>s.map((p,S)=>{const C=f[S],k=C?.data?.items??[],h=Dt(k,c),w=rs(p.folderAppointments),{system:R,labels:L}=Bt(h,w,u),_=C?.isError?"error":C?.isLoading||!b?"loading":"ready";return{id:p.accountId,label:p.email,email:p.email,hierarchyDelimiter:k[0]?.hierarchyDelimiter??"",muted:!!p.muted,outboxPending:y,status:_,onRetry:()=>C?.refetch(),mailboxes:[...R,...L].map(A=>Kt(A,w.get(A.mailboxId),u))}}),[s,f,y,u,c,b]),F=p=>{n.invalidateQueries({queryKey:ls({path:{mailboxId:p},query:{order:"desc"}})})},M=({navId:p,className:S,ariaLabel:C,title:k,children:h,onClick:w})=>{if(p==="brief")return e.jsx(P,{to:"/mail/brief",search:{q:void 0},activeOptions:{includeSearch:!1},onClick:()=>w?.(),className:S,"aria-label":C,title:k,children:h});if(p==="calendar")return e.jsx(P,{to:"/calendar",onClick:()=>w?.(),className:S,"aria-label":C,title:k,children:h});if(p==="outbox")return e.jsx(P,{to:"/mail/outbox",search:{q:void 0},onClick:()=>w?.(),className:S,"aria-label":C,title:k,children:h});if(p==="flagged")return e.jsx(P,{to:"/mail/flagged",search:{q:void 0},onClick:()=>w?.(),className:S,"aria-label":C,title:k,children:h});const R=Lt(p);return R?e.jsx(P,{to:"/mail/label/$labelId",params:{labelId:R},search:{q:void 0},onClick:()=>w?.(),className:S,"aria-label":C,title:k,children:h}):p==="settings"?e.jsx(P,{to:"/settings/accounts",onClick:()=>w?.(),className:S,"aria-label":C,title:k,children:h}):e.jsx(P,{to:"/mail/$mailboxId",params:{mailboxId:p},search:{q:void 0},onClick:()=>{F(p),w?.()},className:S,"aria-label":C,title:k,children:h})},D=()=>{i(""),t?.()};return e.jsx(Ot,{accounts:O,labels:I,selectedNavId:o,onSelectNav:D,linkComponent:M,variant:a})}function qt({accounts:s,onMailboxSelect:t}){const n=Re()?.showNavPane??!0,o=we();return n?e.jsx(pe,{accounts:s}):e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx(pe,{accounts:s,onMailboxSelect:t,variant:"drawer"})}),e.jsxs("div",{className:"border-t border-line px-2 py-2",children:[e.jsxs(P,{to:"/settings/accounts",onClick:t,children:[e.jsx(Ce,{label:o,children:e.jsx(Ee,{className:"size-4 shrink-0"})}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Settings"})]}),e.jsx(zt,{}),e.jsx(Is,{children:({signOut:i})=>e.jsxs("button",{type:"button",onClick:()=>{t?.(),i()},className:"flex min-h-11 w-full items-center gap-2 rounded-md px-2 py-1 text-sm text-fg-muted transition-colors hover:bg-surface hover:text-fg","data-testid":"sign-out-button",children:[e.jsx(ws,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Sign out"})]})})]})]})}function Vt(s){const t=Pe({queries:s.map(a=>({...Oe({path:{accountId:a.accountId}}),staleTime:1/0}))});return x.useMemo(()=>Xs(t.map(a=>a.data?.items??[])),[t])}const De="remit:intelligence-open";function Ht(){try{return localStorage.getItem(De)!=="closed"}catch{return!0}}function Ut(s){try{localStorage.setItem(De,s?"open":"closed")}catch{}}function he({panels:s,prefersOpen:t,isDesktop:a,hasThread:n,raisedFor:o,openMessage:i}){if(o!==null&&o===i)return!0;const l=s.filter(u=>u!=="sidebar");return l.length>0?l.includes("intelligence"):a&&n&&t}const Wt=()=>{const s=Fe(),t=Rs(),a=Ls(),n=t.find(Ps),o=Js(),[i,l]=x.useState(Ht),u=o?`${o.threadId}/${o.messageId??""}`:null,[f,c]=x.useState(null),g={panels:t,prefersOpen:i,isDesktop:s==="desktop",hasThread:o!==void 0,openMessage:u},m=he({...g,raisedFor:f}),b=he({...g,raisedFor:null}),d=x.useCallback((y,O)=>{a([...y?["intelligence"]:[],...O?[O]:[]])},[a]),v=x.useCallback(y=>{d(b,y)},[b,d]),I=x.useCallback(()=>{if(m&&!b){c(null);return}const y=!m;Ut(y),l(y),c(null),d(y,n)},[b,m,n,d]),j=x.useCallback(()=>{c(u)},[u]);return{openOverlay:n,intelligenceOpen:m,showOverlay:v,toggleIntelligence:I,raiseIntelligence:j}};var K={exports:{}},ge;function Yt(){if(ge)return K.exports;ge=1;const s=(t,a,n)=>new Promise((o,i)=>{if(n=Object.assign({concurrency:1/0},n),typeof a!="function")throw new TypeError("Mapper function is required");const{concurrency:l}=n;if(!(typeof l=="number"&&l>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${l}\` (${typeof l})`);const u=[],f=t[Symbol.iterator]();let c=!1,g=!1,m=0,b=0;const d=()=>{if(c)return;const v=f.next(),I=b;if(b++,v.done){g=!0,m===0&&o(u);return}m++,Promise.resolve(v.value).then(j=>a(j,I)).then(j=>{u[I]=j,m--,d()},j=>{c=!0,i(j)})};for(let v=0;v<l&&(d(),!g);v++);});return K.exports=s,K.exports.default=s,K.exports}var Gt=Yt();const Xt=cs(Gt),Jt=900*1e3,Zt=30,ea=(s,t)=>{if(!s)return t;const a=Number.parseInt(s,10);return Number.isFinite(a)&&a>0?a:t},sa=30*1e3,ta=s=>Math.max(ea(s,Zt)*1e3,sa),_e=ta(ps().mailboxPollIntervalSeconds),Q=(s=Date.now(),t=_e)=>Qs(s)?Math.min(qs,t):t,aa=5,ee=new Set,na=(s,t,a=Jt)=>s.filter(n=>{const o=n.lastSyncAt;return o==null?!0:t-o>a}).map(n=>n.accountId),oa=(s,t,a=_e)=>s-t>=a,ra=(s,t)=>s.filter(a=>!t.has(a)),be=(s,t)=>{if(ee.delete(s),ms(t)||xs(t,{softError:!0})){fs(t,{softError:!0});return}console.warn("[remit] background mailbox sync failed",{accountId:s,error:t})},ve=(s,t)=>us({path:{accountId:s},throwOnError:!0}).then(()=>{t.invalidateQueries({queryKey:ds({path:{accountId:s}})})}),ia=s=>{const t=se(),a=x.useRef(s);a.current=s;const n=s.map(o=>o.accountId).join(",");x.useEffect(()=>{const o=Date.now(),l=na(a.current,o).filter(u=>!ee.has(u));if(l.length!==0)for(const u of l)ee.add(u),ve(u,t).catch(f=>{be(u,f)})},[n,t]),x.useEffect(()=>{let o=Date.now(),i;const l=new Set,u=()=>{o=Date.now();const b=ra(a.current.map(d=>d.accountId),l);for(const d of b)l.add(d);Xt(b,d=>ve(d,t).catch(v=>{be(d,v)}).finally(()=>{l.delete(d)}),{concurrency:aa})},f=()=>{if(document.visibilityState==="visible"){u(),i=setTimeout(f,Q());return}},c=()=>{if(document.visibilityState!=="visible")return;i!==void 0&&clearTimeout(i);const b=Date.now(),d=Q(b);if(oa(b,o,d)){u(),i=setTimeout(f,d);return}i=setTimeout(f,o+d-b)},g=()=>{document.visibilityState==="visible"&&(i!==void 0&&clearTimeout(i),o=Date.now(),i=setTimeout(f,Q()))};i=setTimeout(f,Q()),document.addEventListener("visibilitychange",c);const m=Ks(g);return()=>{i!==void 0&&clearTimeout(i),document.removeEventListener("visibilitychange",c),m()}},[n,t])};function Wa(){const s=hs(),t=Fe(),a=ft(t),{openOverlay:n,intelligenceOpen:o,showOverlay:i,toggleIntelligence:l,raiseIntelligence:u}=Wt(),f=n==="shortcuts",c=n==="nav",{searchInput:g,committedQuery:m,viewKey:b,setSearchInput:d}=Ft(),{data:v,isLoading:I,isError:j,error:y,refetch:O}=Me({...gs(),staleTime:1/0}),F=!!(v&&(v.accounts?.length??0)===0);x.useEffect(()=>{F&&s({to:"/onboarding",replace:!0})},[F,s]),xt({enabled:!f,bindings:[{key:"?",action:"help",handler:()=>i("shortcuts"),noModifiers:!1,preventDefault:!0}]});const M=te(),D=Fs(),p=J({select:T=>Ns(T.matches)?.list==="mailbox"}),S=x.useMemo(()=>({compose:M}),[M]);Zs({enabled:!p&&!D,handlers:S});const C=x.useCallback(()=>{d("")},[d]),k=x.useCallback(()=>{d("")},[d]),h=v?.accounts??[],w=x.useMemo(()=>h.map(T=>T.accountId),[h]),R=Vt(h),L=at(h).index,_=x.useMemo(()=>et(h),[h]);ia(h);const A=x.useCallback(()=>{n==="nav"&&i(void 0)},[n,i]),r={accounts:h,mailboxNameIndex:R,accountNameIndex:_,resultFolderIndex:L,searchQuery:m,searchInput:g,searchViewKey:b,onSearchChange:d,onSearchClear:C,onSearchClearQuery:k,intelligenceOpen:o,onToggleIntelligence:l,onRaiseIntelligence:u},N={isSinglePane:a,isLoading:I||F,intelligenceOpen:o,nav:e.jsx(qt,{accounts:h,onMailboxSelect:A}),topBar:a?void 0:e.jsx(xe,{accounts:h}),appBar:t==="phone"?void 0:e.jsx(Ms,{}),overlay:a?e.jsx(Tt,{}):void 0,navOpen:c,onOpenNav:()=>i("nav"),onCloseNav:()=>i(void 0)};return e.jsx(bs.Provider,{value:r,children:e.jsxs(Vs,{accountIds:w,children:[e.jsx(ks,{children:j?e.jsx(Os,{topBar:e.jsx(xe,{accounts:h}),children:e.jsx("div",{className:"flex h-full items-center justify-center bg-canvas p-4",children:e.jsx(ht,{title:"Couldn't load your account",error:y,onRetry:()=>{O()}})})}):e.jsx(Ds,{chrome:N,children:e.jsx(vs,{})})}),e.jsx(jt,{isOpen:f,onClose:()=>i(void 0)})]})})}export{Wa as component,Ie as useMailContext};
@@ -1 +1 @@
1
- import{b as a}from"./index-fsuIswbe.js";const e={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};e.node;const t=a(e);export{t as M};
1
+ import{b as a}from"./index-CKFdaY9c.js";const e={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};e.node;const t=a(e);export{t as M};
@@ -1 +1 @@
1
- import{b as a}from"./index-fsuIswbe.js";const e={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};e.node;const n=a(e);export{n as M};
1
+ import{b as a}from"./index-CKFdaY9c.js";const e={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};e.node;const n=a(e);export{n as M};
@@ -1 +1 @@
1
- import{j as f,p as s,N as b,cq as d,cr as x,r as i,u as P,cs as N,ct as S}from"./index-fsuIswbe.js";import{u as O}from"./useMediaQuery-Hy81MQ2M.js";const l="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface",k="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",R={nav:{base:s("flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm transition-colors",l),rest:"text-fg-muted hover:bg-surface hover:text-fg",current:"bg-accent-2-soft font-medium text-accent-2"},row:{base:s("relative flex w-full items-start text-left transition-colors",k),rest:"hover:bg-surface-sunken",current:"bg-accent-2-soft"},inline:{base:s("rounded-sm underline-offset-2 transition-colors hover:underline",l),rest:"text-accent hover:text-accent-hover",current:"font-medium text-accent"}};function j(e){return e!==void 0&&e!==!1&&e!=="false"}function w({variant:e="nav",current:n,"aria-current":t,className:p,children:v,ref:h,...g}){const u=n??t,r=R[e];return f.jsx("a",{ref:h,"aria-current":u,className:s(r.base,j(u)?r.current:r.rest,p),...g,children:v})}function I(e){const n=b();return d(n.stores.location,x(e,n))}const o=["intelligence","sidebar","nav","shortcuts"],L=["nav","shortcuts"],m=e=>L.includes(e);function G(e,n){return[...e.filter(t=>!m(t)),...n?[n]:[]]}const y=N(o);function a(e){const n=new Set(e.split(",").map(t=>y.safeParse(t)).filter(t=>t.success).map(t=>t.data));return o.filter(t=>n.has(t))}function c(e){return o.filter(n=>e.includes(n)).join(",")}function M(){const e=I({select:n=>c(a(n.hash))});return i.useMemo(()=>a(e),[e])}const E=(e,n)=>!m(e)&&n;function F(e){return(n="")=>c(a(n).filter(t=>E(t,e)))}function T(){const e=O();return i.useMemo(()=>F(e),[e])}function q(){const e=P();return i.useCallback(n=>{e({search:!0,hash:c(n),replace:!0,hashScrollIntoView:!1})},[e])}const _=S(w);function A({fragment:e,...n}){const t=T();return f.jsx(_,{...n,hash:e??t})}export{A as N,M as a,q as b,T as c,m as i,G as p,I as u};
1
+ import{j as f,p as s,N as b,cq as d,cr as x,r as i,u as P,cs as N,ct as S}from"./index-CKFdaY9c.js";import{u as O}from"./useMediaQuery-CjE8xNMz.js";const l="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface",k="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",R={nav:{base:s("flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm transition-colors",l),rest:"text-fg-muted hover:bg-surface hover:text-fg",current:"bg-accent-2-soft font-medium text-accent-2"},row:{base:s("relative flex w-full items-start text-left transition-colors",k),rest:"hover:bg-surface-sunken",current:"bg-accent-2-soft"},inline:{base:s("rounded-sm underline-offset-2 transition-colors hover:underline",l),rest:"text-accent hover:text-accent-hover",current:"font-medium text-accent"}};function j(e){return e!==void 0&&e!==!1&&e!=="false"}function w({variant:e="nav",current:n,"aria-current":t,className:p,children:v,ref:h,...g}){const u=n??t,r=R[e];return f.jsx("a",{ref:h,"aria-current":u,className:s(r.base,j(u)?r.current:r.rest,p),...g,children:v})}function I(e){const n=b();return d(n.stores.location,x(e,n))}const o=["intelligence","sidebar","nav","shortcuts"],L=["nav","shortcuts"],m=e=>L.includes(e);function G(e,n){return[...e.filter(t=>!m(t)),...n?[n]:[]]}const y=N(o);function a(e){const n=new Set(e.split(",").map(t=>y.safeParse(t)).filter(t=>t.success).map(t=>t.data));return o.filter(t=>n.has(t))}function c(e){return o.filter(n=>e.includes(n)).join(",")}function M(){const e=I({select:n=>c(a(n.hash))});return i.useMemo(()=>a(e),[e])}const E=(e,n)=>!m(e)&&n;function F(e){return(n="")=>c(a(n).filter(t=>E(t,e)))}function T(){const e=O();return i.useMemo(()=>F(e),[e])}function q(){const e=P();return i.useCallback(n=>{e({search:!0,hash:c(n),replace:!0,hashScrollIntoView:!1})},[e])}const _=S(w);function A({fragment:e,...n}){const t=T();return f.jsx(_,{...n,hash:e??t})}export{A as N,M as a,q as b,T as c,m as i,G as p,I as u};
@@ -0,0 +1 @@
1
+ import{C as o}from"./CalendarEventEditor-JBfO_GQa.js";import"./index-CKFdaY9c.js";import"./draft-CUl68Y86.js";import"./agenda-time-C9jExuVe.js";import"./calendar-guests-CuFcAD3k.js";import"./calendar-event-popup-BqE6svk6.js";import"./useCalendarSuggestions-BaIFwYBZ.js";import"./ErrorState-BptbbJAv.js";import"./useQueries-CQ_R-NWg.js";import"./list-pages-BCUbyyea.js";import"./pencil-C6KO5975.js";import"./circle-question-mark-CYsyue28.js";import"./useCalendarData-CgRGDHYQ.js";import"./useCalendarTasks-CnP7DfUR.js";import"./useCalendarScheduling-BhFuxgru.js";import"./useDebouncedValue-BpDHcfPe.js";import"./calendar-format-BwCpz-JZ.js";import"./nav-link-YOSchPy9.js";import"./useMediaQuery-CjE8xNMz.js";import"./calendar-DON3hXqq.js";import"./reply-SkF_KCOk.js";import"./CalendarQuickCreate-C-yc6zce.js";import"./CalendarSession-C_XnZoOI.js";import"./calendar-event-sidebar-BGvCPmWa.js";import"./select-yGv73aji.js";import"./chevron-down-wpFtElCn.js";import"./confirm-dialog-CsttDS5u.js";const y=o;export{y as component};
@@ -1 +1 @@
1
- import{k as o}from"./index-fsuIswbe.js";async function n(e){e.recordCompleted(),await e.queryClient.refetchQueries({queryKey:o()}),e.navigateToInbox()}export{n as c};
1
+ import{k as o}from"./index-CKFdaY9c.js";async function n(e){e.recordCompleted(),await e.queryClient.refetchQueries({queryKey:o()}),e.navigateToInbox()}export{n as c};
@@ -0,0 +1 @@
1
+ import{l as i,e as n,u as a,r as m,j as p}from"./index-CKFdaY9c.js";import{O as s}from"./OnboardingWizard-dQ9c99Ni.js";import{c}from"./onboarding-completion-cX9HM-aL.js";import"./credential-steps-BPun50HH.js";import"./select-yGv73aji.js";import"./chevron-down-wpFtElCn.js";import"./badge-DYFkBshe.js";import"./card-13z0qC0r.js";import"./account-form-helpers-DhckT_PN.js";import"./mail-Bsgov7FY.js";import"./file-braces-DSnr6-a7.js";import"./kbd-qpWA48X9.js";import"./checkbox-ZdvWSWRN.js";function k(){const o=i(),t=n(),e=a(),r=m.useCallback(l=>{c({queryClient:t,recordCompleted:()=>o.recordEvent("onboarding.completed"),navigateToInbox:()=>{window.location.assign("/mail")}})},[o,t]);return p.jsx(s,{skipWelcome:!1,onComplete:r,onImportConfig:()=>{e({to:"/import"})}})}export{k as component};
@@ -0,0 +1 @@
1
+ import{j as o,O as i}from"./index-CKFdaY9c.js";import{a as m}from"./MailShell-DE0ZN2ct.js";import{u as p,O as t}from"./OutboxPane-ByJt4RDv.js";import"./nav-link-YOSchPy9.js";import"./reply-SkF_KCOk.js";import{u as s}from"./search-mirror-D9nwr5km.js";import"./useMessageBodyContent-D5mskS3v.js";import"./FullCompose-BGLjrGst.js";import"./index-BQ2vE6gp.js";import"./useSignature-CnLh1XFv.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BpDHcfPe.js";import"./suggest-list-czu9q5H4.js";import"./sections-ZsRsk30_.js";import"./useMediaQuery-CjE8xNMz.js";import"./chevron-down-wpFtElCn.js";import"./ErrorState-BptbbJAv.js";import"./confirm-dialog-CsttDS5u.js";import"./search-scope-DNDpRNp9.js";import"./app-chrome-CS-vT-4r.js";import"./MessageBody-BYYCZieC.js";import"./kbd-qpWA48X9.js";import"./outbox-status-BlKn6P0x.js";import"./NavMenuButton-B28Nb9kR.js";import"./menu-CKmdL0us.js";import"./roving-focus-DlzLpO4G.js";import"./circle-check-big-C2cm1OoH.js";import"./clock-D8a14yMJ.js";import"./row-actions-0g39M7ib.js";import"./rotate-ccw-lh0BmpDo.js";function C(){const r=p();return s({to:"/mail/outbox"}),o.jsx(t,{outboxMessageId:r,children:o.jsx(m,{phone:o.jsx(t.Phone,{}),list:o.jsx(t.List,{}),reading:o.jsx(i,{})})})}export{C as component};
@@ -1 +1 @@
1
- import{b as e}from"./index-fsuIswbe.js";const a={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};a.node;const n=e(a);export{n as P};
1
+ import{b as e}from"./index-CKFdaY9c.js";const a={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};a.node;const n=e(a);export{n as P};
@@ -1 +1 @@
1
- import{b as O,e as I,f as E,bE as R,bF as T,bG as A,bH as F,bI as L,bJ as z,bK as M,bL as v,r as c,j as e,aE as k,B as x,X as U,as as B,bM as g,bN as H,at as Q,bO as _,d as b,bP as G,bQ as C,bR as w,u as K,af as W}from"./index-fsuIswbe.js";import{R as S}from"./ReportLink-BELrQR40.js";import{C as Y}from"./copy-BokIobZ4.js";import{D as q,a as h,b as $}from"./DropdownMenu-C2J8u8zN.js";import{a as J}from"./sections-DpRVKuXF.js";import{S as X}from"./settings-screen-DTYVWAkg.js";import"./avatar-Bq7beWCy.js";import"./badge-BB80tGxy.js";import"./chevron-left-CUHU8UT9.js";import"./menu-Bh94jr77.js";import"./circle-question-mark-DhNa_A16.js";const P={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};P.node;const V=O(P),Z=async({action:s,person:t},r)=>{const n={userId:t.userId};if(s==="SignOut"){const{data:a}=await L({path:n,body:{stepUpToken:r},throwOnError:!0});return{person:a,resetUrl:void 0}}if(s==="ResetPassword"){const{data:a}=await z({path:n,body:{stepUpToken:r},throwOnError:!0});return{person:a.person,resetUrl:a.resetUrl}}const{data:o}=await M({path:n,body:{status:s==="Disable"?"Disabled":"Active",stepUpToken:r},throwOnError:!0});return{person:o,resetUrl:void 0}},ee=s=>{const t=I();return E({meta:R,gcTime:0,mutationFn:async r=>{const{data:n}=await F({body:{password:s,action:r.action,userId:r.person.userId},throwOnError:!0});return Z(r,n.stepUpToken)},onSuccess:({person:r})=>{t.setQueryData(T(),n=>n&&{people:A(n.people,r)})}})},se="That is not your password. Try again.",te="Five wrong passwords in 15 minutes. Wait 15 minutes, then try again.";function ne({action:s,person:t,onCancel:r,onDone:n,onFailed:o}){const a=v(s,t.email),[l,p]=c.useState(""),[u,m]=c.useState(null),i=ee(l),d=()=>{i.isPending||r()},D=f=>{f.preventDefault(),!(i.isPending||l==="")&&(m(null),i.mutate({action:s,person:t},{onSuccess:n,onError:y=>{const j=g(y);if(j.kind==="wrongPassword"){p(""),m(se);return}if(j.kind==="locked"){p(""),m(te);return}if(j.kind==="signedOut"){r(),H();return}o(y)}}))};return e.jsx(k,{open:!0,onClose:d,title:a.title,children:e.jsxs("form",{onSubmit:D,children:[e.jsxs("header",{className:"flex items-center gap-2 border-b border-line px-5 py-3",children:[e.jsx("span",{className:"flex-1 text-sm font-semibold text-fg",children:a.title}),e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(U,{className:"size-3.5"}),onClick:d,"aria-label":"Close"})]}),e.jsxs("div",{className:"space-y-4 px-5 py-4 text-sm text-fg-muted",children:[e.jsx("p",{children:a.body}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:"people-step-up-password",className:"text-xs font-medium text-fg",children:"Your password"}),e.jsx(B,{id:"people-step-up-password",autoComplete:"current-password",value:l,onChange:f=>{p(f.target.value),m(null)},"aria-invalid":u!==null,"aria-describedby":"people-step-up-hint",required:!0}),e.jsx("p",{id:"people-step-up-hint",className:"text-xs",children:u?e.jsx("span",{className:"text-danger",role:"alert",children:u}):"Confirm with your own password. It counts for this one action."})]})]}),e.jsxs("footer",{className:"flex items-center justify-end gap-2 border-t border-line px-5 py-3",children:[e.jsx(x,{variant:"secondary",size:"sm",onClick:d,children:"Cancel"}),e.jsx(x,{type:"submit",variant:a.destructive?"danger":"primary",size:"sm",disabled:l==="","aria-busy":i.isPending,children:a.confirmLabel})]})]})})}const re=()=>{};function ae({email:s,resetUrl:t,onDone:r}){const[n,o]=c.useState(!1),[a,l]=c.useState(!1),p=()=>{navigator.clipboard.writeText(t).then(()=>{l(!1),o(!0)}).catch(()=>l(!0))};return e.jsxs(k,{open:!0,onClose:re,title:`Reset link for ${s}`,children:[e.jsxs("header",{className:"border-b border-line px-5 py-3 text-sm font-semibold text-fg",children:["Reset link for ",s]}),e.jsxs("div",{className:"space-y-4 px-5 py-4 text-sm text-fg-muted",children:[e.jsx("p",{children:"They are signed out everywhere. Give them this link, by message or in person. It works once, for 24 hours."}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsx(x,{variant:"primary",size:"sm",icon:n?e.jsx(Q,{className:"size-3.5"}):e.jsx(Y,{className:"size-3.5"}),onClick:p,children:n?"Copied":"Copy"}),e.jsx("input",{readOnly:!0,tabIndex:-1,value:t,"aria-label":`Reset link for ${s}`,onFocus:u=>u.currentTarget.select(),className:"min-w-0 flex-1 rounded-sm border border-line bg-surface px-2 py-1.5 font-mono text-xs text-fg sm:order-first"})]}),a&&e.jsx("p",{className:"text-xs text-danger",role:"alert",children:"Copying did not work in this browser. Select the link and copy it by hand."}),e.jsx("p",{children:"You see this link only now. Close this window and it is gone. Make a new one if it gets lost."})]}),e.jsx("footer",{className:"flex justify-end border-t border-line px-5 py-3",children:e.jsx(x,{variant:"secondary",size:"sm",onClick:r,children:"Done"})})]})}const N="The list of people did not load";function oe({failure:s}){const t=c.useRef(null);return c.useEffect(()=>{t.current?.focus()},[]),e.jsx("div",{ref:t,tabIndex:-1,className:"outline-none",children:e.jsxs(b,{tone:"danger",children:[e.jsx("p",{className:"font-medium",children:s.title}),e.jsx("p",{className:"mt-1 text-fg-muted",children:s.reason}),e.jsx("p",{className:"mt-1",children:e.jsx(S,{href:C(s.title,s.error)})})]})})}function ie({person:s,onPick:t}){const r=s.status==="Disabled";return e.jsxs(q,{trigger:e.jsxs(e.Fragment,{children:[e.jsx(V,{className:"size-4","aria-hidden":"true"}),e.jsxs("span",{className:"sr-only",children:["Actions for ",s.email]})]}),children:[e.jsx(h,{onClick:()=>t("SignOut"),children:"Sign out everywhere"}),e.jsx(h,{onClick:()=>t("ResetPassword"),children:"Reset password"}),e.jsx($,{}),r?e.jsx(h,{onClick:()=>t("Enable"),children:"Enable"}):e.jsx(h,{onClick:()=>t("Disable"),disabled:s.isCaller,destructive:!s.isCaller,children:e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{children:"Disable"}),s.isCaller&&e.jsx("span",{className:"text-xs text-fg-subtle",children:"Not your own account"})]})})]})}function le({people:s,onPick:t}){const r=new Date;return e.jsx("div",{className:"overflow-x-auto rounded-sm border border-line bg-surface",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"border-b border-line text-xs text-fg-muted",children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Email"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Created"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Last sign-in"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Sessions"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Status"}),e.jsx("th",{scope:"col",className:"w-12 px-1 py-2",children:e.jsx("span",{className:"sr-only",children:"Actions"})})]})}),e.jsx("tbody",{children:s.map(n=>e.jsxs("tr",{className:"border-b border-line last:border-b-0",children:[e.jsxs("td",{className:"px-3 py-1 text-fg",children:[n.email,n.isCaller&&e.jsx("span",{className:"text-fg-muted",children:" (you)"})]}),e.jsx("td",{className:"px-3 py-1 text-fg-muted",children:w(n.createdAt,r)}),e.jsx("td",{className:"px-3 py-1 text-fg-muted",children:w(n.lastSignInAt,r)}),e.jsx("td",{className:"px-3 py-1 tabular-nums text-fg-muted",children:n.sessionCount}),e.jsx("td",{className:n.status==="Disabled"?"px-3 py-1 text-danger":"px-3 py-1 text-fg-muted",children:n.status}),e.jsx("td",{className:"px-1 py-1",children:e.jsx(ie,{person:n,onPick:o=>t(o,n)})})]},n.userId))})]})})}function ce(){const s=_(),[t,r]=c.useState(null),[n,o]=c.useState(null),[a,l]=c.useState(null);if(s.isPending)return e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading people"});if(s.unavailable)return e.jsx(b,{tone:"info",children:"This server has no People page. It shows on a self-hosted server once self sign-up is turned off."});if(s.isError)return g(s.error).kind==="signedOut"?null:e.jsxs(b,{tone:"danger",children:[e.jsxs("p",{className:"font-medium",children:[N,"."]}),e.jsx("p",{className:"mt-1 text-fg-muted",children:G(s.error)}),e.jsxs("p",{className:"mt-2 flex items-center gap-3",children:[e.jsx(x,{variant:"secondary",size:"sm",onClick:()=>{s.refetch()},children:"Try again"}),e.jsx(S,{href:C(N,s.error)})]})]});const p=(i,d)=>{o(null),r({action:i,person:d})},u=i=>{i.resetUrl&&t&&l({email:t.person.email,resetUrl:i.resetUrl}),r(null)},m=i=>{if(!t)return;const d=g(i);o({title:v(t.action,t.person.email).failedTitle,reason:d.kind==="failed"?d.reason:"Something went wrong. Nothing changed. Try again.",error:i}),r(null)};return e.jsxs("div",{className:"space-y-4",children:[n&&e.jsx(oe,{failure:n}),e.jsx(le,{people:s.data.people,onPick:p}),t&&e.jsx(ne,{action:t.action,person:t.person,onCancel:()=>r(null),onDone:u,onFailed:m}),a&&e.jsx(ae,{email:a.email,resetUrl:a.resetUrl,onDone:()=>l(null)})]})}const de=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Anyone signed in here can manage every account. Each action asks for your own password first, and is recorded with who took it and from where."}),e.jsx("p",{children:"Disabling an account signs that person out within 15 minutes and stops their calendar feed links. Their mail stays. You cannot disable your own account, so one account always stays on."}),e.jsx("p",{children:"A reset link works once, for 24 hours, and is shown only once. Making one stops the old password at once."}),e.jsxs("p",{children:["The person who runs this server can turn all sign-in off with"," ",e.jsx("code",{children:"remit sign-in off"}),", and recover an account from the host with"," ",e.jsx("code",{children:"remit people enable"})," or ",e.jsx("code",{children:"remit people reset"}),"."]})]});function Ne(){const s=K(),t=W(),r=J(),[n,o]=c.useState(!0);return e.jsx(X,{items:t,activeId:"people",title:"People",description:"Everyone with an account on this server.",help:de,helpOpen:n,onToggleHelp:()=>o(a=>!a),onSelect:r,onBackToMail:()=>{s({to:"/mail"})},children:e.jsx(ce,{})})}export{Ne as component};
1
+ import{b as O,e as I,f as E,bE as R,bF as T,bG as A,bH as F,bI as L,bJ as z,bK as M,bL as v,r as c,j as e,aE as k,B as x,X as U,as as B,bM as g,bN as H,at as Q,bO as _,d as b,bP as G,bQ as C,bR as w,u as K,af as W}from"./index-CKFdaY9c.js";import{R as S}from"./ReportLink-D0tCso5T.js";import{C as Y}from"./copy-V6gKiItu.js";import{D as q,a as h,b as $}from"./DropdownMenu-DsxemHc4.js";import{a as J}from"./sections-ZsRsk30_.js";import{S as X}from"./settings-screen-C8z8YwuM.js";import"./avatar-B60PZejm.js";import"./badge-DYFkBshe.js";import"./chevron-left-HeNgNNR2.js";import"./menu-CKmdL0us.js";import"./circle-question-mark-CYsyue28.js";const P={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};P.node;const V=O(P),Z=async({action:s,person:t},r)=>{const n={userId:t.userId};if(s==="SignOut"){const{data:a}=await L({path:n,body:{stepUpToken:r},throwOnError:!0});return{person:a,resetUrl:void 0}}if(s==="ResetPassword"){const{data:a}=await z({path:n,body:{stepUpToken:r},throwOnError:!0});return{person:a.person,resetUrl:a.resetUrl}}const{data:o}=await M({path:n,body:{status:s==="Disable"?"Disabled":"Active",stepUpToken:r},throwOnError:!0});return{person:o,resetUrl:void 0}},ee=s=>{const t=I();return E({meta:R,gcTime:0,mutationFn:async r=>{const{data:n}=await F({body:{password:s,action:r.action,userId:r.person.userId},throwOnError:!0});return Z(r,n.stepUpToken)},onSuccess:({person:r})=>{t.setQueryData(T(),n=>n&&{people:A(n.people,r)})}})},se="That is not your password. Try again.",te="Five wrong passwords in 15 minutes. Wait 15 minutes, then try again.";function ne({action:s,person:t,onCancel:r,onDone:n,onFailed:o}){const a=v(s,t.email),[l,p]=c.useState(""),[u,m]=c.useState(null),i=ee(l),d=()=>{i.isPending||r()},D=f=>{f.preventDefault(),!(i.isPending||l==="")&&(m(null),i.mutate({action:s,person:t},{onSuccess:n,onError:y=>{const j=g(y);if(j.kind==="wrongPassword"){p(""),m(se);return}if(j.kind==="locked"){p(""),m(te);return}if(j.kind==="signedOut"){r(),H();return}o(y)}}))};return e.jsx(k,{open:!0,onClose:d,title:a.title,children:e.jsxs("form",{onSubmit:D,children:[e.jsxs("header",{className:"flex items-center gap-2 border-b border-line px-5 py-3",children:[e.jsx("span",{className:"flex-1 text-sm font-semibold text-fg",children:a.title}),e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(U,{className:"size-3.5"}),onClick:d,"aria-label":"Close"})]}),e.jsxs("div",{className:"space-y-4 px-5 py-4 text-sm text-fg-muted",children:[e.jsx("p",{children:a.body}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:"people-step-up-password",className:"text-xs font-medium text-fg",children:"Your password"}),e.jsx(B,{id:"people-step-up-password",autoComplete:"current-password",value:l,onChange:f=>{p(f.target.value),m(null)},"aria-invalid":u!==null,"aria-describedby":"people-step-up-hint",required:!0}),e.jsx("p",{id:"people-step-up-hint",className:"text-xs",children:u?e.jsx("span",{className:"text-danger",role:"alert",children:u}):"Confirm with your own password. It counts for this one action."})]})]}),e.jsxs("footer",{className:"flex items-center justify-end gap-2 border-t border-line px-5 py-3",children:[e.jsx(x,{variant:"secondary",size:"sm",onClick:d,children:"Cancel"}),e.jsx(x,{type:"submit",variant:a.destructive?"danger":"primary",size:"sm",disabled:l==="","aria-busy":i.isPending,children:a.confirmLabel})]})]})})}const re=()=>{};function ae({email:s,resetUrl:t,onDone:r}){const[n,o]=c.useState(!1),[a,l]=c.useState(!1),p=()=>{navigator.clipboard.writeText(t).then(()=>{l(!1),o(!0)}).catch(()=>l(!0))};return e.jsxs(k,{open:!0,onClose:re,title:`Reset link for ${s}`,children:[e.jsxs("header",{className:"border-b border-line px-5 py-3 text-sm font-semibold text-fg",children:["Reset link for ",s]}),e.jsxs("div",{className:"space-y-4 px-5 py-4 text-sm text-fg-muted",children:[e.jsx("p",{children:"They are signed out everywhere. Give them this link, by message or in person. It works once, for 24 hours."}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsx(x,{variant:"primary",size:"sm",icon:n?e.jsx(Q,{className:"size-3.5"}):e.jsx(Y,{className:"size-3.5"}),onClick:p,children:n?"Copied":"Copy"}),e.jsx("input",{readOnly:!0,tabIndex:-1,value:t,"aria-label":`Reset link for ${s}`,onFocus:u=>u.currentTarget.select(),className:"min-w-0 flex-1 rounded-sm border border-line bg-surface px-2 py-1.5 font-mono text-xs text-fg sm:order-first"})]}),a&&e.jsx("p",{className:"text-xs text-danger",role:"alert",children:"Copying did not work in this browser. Select the link and copy it by hand."}),e.jsx("p",{children:"You see this link only now. Close this window and it is gone. Make a new one if it gets lost."})]}),e.jsx("footer",{className:"flex justify-end border-t border-line px-5 py-3",children:e.jsx(x,{variant:"secondary",size:"sm",onClick:r,children:"Done"})})]})}const N="The list of people did not load";function oe({failure:s}){const t=c.useRef(null);return c.useEffect(()=>{t.current?.focus()},[]),e.jsx("div",{ref:t,tabIndex:-1,className:"outline-none",children:e.jsxs(b,{tone:"danger",children:[e.jsx("p",{className:"font-medium",children:s.title}),e.jsx("p",{className:"mt-1 text-fg-muted",children:s.reason}),e.jsx("p",{className:"mt-1",children:e.jsx(S,{href:C(s.title,s.error)})})]})})}function ie({person:s,onPick:t}){const r=s.status==="Disabled";return e.jsxs(q,{trigger:e.jsxs(e.Fragment,{children:[e.jsx(V,{className:"size-4","aria-hidden":"true"}),e.jsxs("span",{className:"sr-only",children:["Actions for ",s.email]})]}),children:[e.jsx(h,{onClick:()=>t("SignOut"),children:"Sign out everywhere"}),e.jsx(h,{onClick:()=>t("ResetPassword"),children:"Reset password"}),e.jsx($,{}),r?e.jsx(h,{onClick:()=>t("Enable"),children:"Enable"}):e.jsx(h,{onClick:()=>t("Disable"),disabled:s.isCaller,destructive:!s.isCaller,children:e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{children:"Disable"}),s.isCaller&&e.jsx("span",{className:"text-xs text-fg-subtle",children:"Not your own account"})]})})]})}function le({people:s,onPick:t}){const r=new Date;return e.jsx("div",{className:"overflow-x-auto rounded-sm border border-line bg-surface",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"border-b border-line text-xs text-fg-muted",children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Email"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Created"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Last sign-in"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Sessions"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Status"}),e.jsx("th",{scope:"col",className:"w-12 px-1 py-2",children:e.jsx("span",{className:"sr-only",children:"Actions"})})]})}),e.jsx("tbody",{children:s.map(n=>e.jsxs("tr",{className:"border-b border-line last:border-b-0",children:[e.jsxs("td",{className:"px-3 py-1 text-fg",children:[n.email,n.isCaller&&e.jsx("span",{className:"text-fg-muted",children:" (you)"})]}),e.jsx("td",{className:"px-3 py-1 text-fg-muted",children:w(n.createdAt,r)}),e.jsx("td",{className:"px-3 py-1 text-fg-muted",children:w(n.lastSignInAt,r)}),e.jsx("td",{className:"px-3 py-1 tabular-nums text-fg-muted",children:n.sessionCount}),e.jsx("td",{className:n.status==="Disabled"?"px-3 py-1 text-danger":"px-3 py-1 text-fg-muted",children:n.status}),e.jsx("td",{className:"px-1 py-1",children:e.jsx(ie,{person:n,onPick:o=>t(o,n)})})]},n.userId))})]})})}function ce(){const s=_(),[t,r]=c.useState(null),[n,o]=c.useState(null),[a,l]=c.useState(null);if(s.isPending)return e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading people"});if(s.unavailable)return e.jsx(b,{tone:"info",children:"This server has no People page. It shows on a self-hosted server once self sign-up is turned off."});if(s.isError)return g(s.error).kind==="signedOut"?null:e.jsxs(b,{tone:"danger",children:[e.jsxs("p",{className:"font-medium",children:[N,"."]}),e.jsx("p",{className:"mt-1 text-fg-muted",children:G(s.error)}),e.jsxs("p",{className:"mt-2 flex items-center gap-3",children:[e.jsx(x,{variant:"secondary",size:"sm",onClick:()=>{s.refetch()},children:"Try again"}),e.jsx(S,{href:C(N,s.error)})]})]});const p=(i,d)=>{o(null),r({action:i,person:d})},u=i=>{i.resetUrl&&t&&l({email:t.person.email,resetUrl:i.resetUrl}),r(null)},m=i=>{if(!t)return;const d=g(i);o({title:v(t.action,t.person.email).failedTitle,reason:d.kind==="failed"?d.reason:"Something went wrong. Nothing changed. Try again.",error:i}),r(null)};return e.jsxs("div",{className:"space-y-4",children:[n&&e.jsx(oe,{failure:n}),e.jsx(le,{people:s.data.people,onPick:p}),t&&e.jsx(ne,{action:t.action,person:t.person,onCancel:()=>r(null),onDone:u,onFailed:m}),a&&e.jsx(ae,{email:a.email,resetUrl:a.resetUrl,onDone:()=>l(null)})]})}const de=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Anyone signed in here can manage every account. Each action asks for your own password first, and is recorded with who took it and from where."}),e.jsx("p",{children:"Disabling an account signs that person out within 15 minutes and stops their calendar feed links. Their mail stays. You cannot disable your own account, so one account always stays on."}),e.jsx("p",{children:"A reset link works once, for 24 hours, and is shown only once. Making one stops the old password at once."}),e.jsxs("p",{children:["The person who runs this server can turn all sign-in off with"," ",e.jsx("code",{children:"remit sign-in off"}),", and recover an account from the host with"," ",e.jsx("code",{children:"remit people enable"})," or ",e.jsx("code",{children:"remit people reset"}),"."]})]});function Ne(){const s=K(),t=W(),r=J(),[n,o]=c.useState(!0);return e.jsx(X,{items:t,activeId:"people",title:"People",description:"Everyone with an account on this server.",help:de,helpOpen:n,onToggleHelp:()=>o(a=>!a),onSelect:r,onBackToMail:()=>{s({to:"/mail"})},children:e.jsx(ce,{})})}export{Ne as component};
@@ -1 +1 @@
1
- import{b as a}from"./index-fsuIswbe.js";const e={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};e.node;const s=a(e);export{s as P};
1
+ import{b as a}from"./index-CKFdaY9c.js";const e={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};e.node;const s=a(e);export{s as P};
@@ -1 +1 @@
1
- import{b as P,r as f,n as R,ci as E,j as l,p as b,B as j}from"./index-fsuIswbe.js";const y={name:"ellipsis-vertical",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],aliases:["more-vertical"]};y.node;const k=P(y),g=4,v=8;function z(e,t,n){const o=Math.max(v,window.innerWidth-t.width-v),s=n==="end"?e.right-t.width:e.left,r=Math.min(Math.max(s,v),o),c=e.bottom+g,i=e.top-g-t.height,d=c+t.height<=window.innerHeight-v||i<v?c:i;return{left:r,top:d}}function L(e,t,n,o){const[s,r]=f.useState(null),c=f.useRef(o);return c.current=o,f.useLayoutEffect(()=>{if(!t){r(null);return}const i=()=>{const x=e.current,h=c.current();if(!x||!h)return;const m=x.getBoundingClientRect(),w={width:m.right-m.left,height:m.bottom-m.top},p=z(h,w,n);r(a=>a?.left===p.left&&a.top===p.top?a:{position:"fixed",left:p.left,top:p.top})};i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0);const u=e.current;let d=null;return u&&typeof ResizeObserver<"u"&&(d=new ResizeObserver(i),d.observe(u)),()=>{d?.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0)}},[t,n,e]),s}function M(e,t){const[n,o]=f.useState(!1),s=f.useRef(null),r=f.useRef(null);return R({id:e,open:n,answers:{back:()=>{o(!1),t?.()}}}),f.useEffect(()=>{if(!n)return;const c=i=>{const u=i.target;s.current?.contains(u)||r.current?.contains(u)||o(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[n]),{open:n,setOpen:o,containerRef:s,panelRef:r,getAnchor:()=>s.current?.getBoundingClientRect()??null}}function N({open:e,align:t="start",getAnchor:n,panelRef:o,children:s}){const r=L(o,e,t,n);return e?E.createPortal(l.jsx("div",{className:"z-50",style:r??{position:"fixed",visibility:"hidden"},children:s}),document.body):null}function O({label:e,children:t,className:n,ref:o,onKeyDown:s,"data-testid":r}){return l.jsx("div",{ref:o,role:"menu","aria-label":e,tabIndex:-1,onKeyDown:s,"data-testid":r,className:b("z-50 flex max-h-[60dvh] min-w-44 flex-col overflow-y-auto overscroll-contain rounded-md border border-line bg-surface py-1 shadow-lg outline-none",n),children:t})}function S({label:e,icon:t,onSelect:n,className:o,lang:s,"data-testid":r}){return l.jsxs("button",{type:"button",role:"menuitem",lang:s,onClick:n,"data-testid":r,className:b("flex min-h-11 items-center gap-3 px-4 py-2.5 text-left text-sm text-fg transition-colors hover:bg-surface-sunken",o),children:[t&&l.jsx("span",{className:"shrink-0 text-fg-subtle",children:t}),e]})}function B({triggerLabel:e,triggerIcon:t,triggerText:n,items:o,align:s="end",touch:r=!0,className:c,triggerClassName:i,nested:u=!1,children:d}){const{open:x,setOpen:h,containerRef:m,panelRef:w,getAnchor:p}=M("popover-menu");return o.length===0&&!d?null:l.jsxs("div",{ref:m,className:b("relative",c),...u?{role:"none"}:{},children:[l.jsx(j,{variant:"ghost",size:"sm",icon:t??l.jsx(k,{className:"size-5"}),onClick:()=>h(a=>!a),"aria-label":e,"aria-haspopup":"menu","aria-expanded":x,...u?{role:"menuitem"}:{},className:b(r&&"min-h-11 min-w-11 px-0",i),children:n}),l.jsx(N,{open:x,align:s,panelRef:w,getAnchor:p,children:l.jsxs(O,{ref:w,children:[o.map(a=>l.jsx(S,{label:a.label,icon:a.icon,onSelect:()=>{h(!1),a.onSelect()}},a.key)),d]})})]})}export{k as E,N as P,O as a,S as b,B as c,M as u};
1
+ import{b as P,r as f,n as R,ci as E,j as l,p as b,B as j}from"./index-CKFdaY9c.js";const y={name:"ellipsis-vertical",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],aliases:["more-vertical"]};y.node;const k=P(y),g=4,v=8;function z(e,t,n){const o=Math.max(v,window.innerWidth-t.width-v),s=n==="end"?e.right-t.width:e.left,r=Math.min(Math.max(s,v),o),c=e.bottom+g,i=e.top-g-t.height,d=c+t.height<=window.innerHeight-v||i<v?c:i;return{left:r,top:d}}function L(e,t,n,o){const[s,r]=f.useState(null),c=f.useRef(o);return c.current=o,f.useLayoutEffect(()=>{if(!t){r(null);return}const i=()=>{const x=e.current,h=c.current();if(!x||!h)return;const m=x.getBoundingClientRect(),w={width:m.right-m.left,height:m.bottom-m.top},p=z(h,w,n);r(a=>a?.left===p.left&&a.top===p.top?a:{position:"fixed",left:p.left,top:p.top})};i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0);const u=e.current;let d=null;return u&&typeof ResizeObserver<"u"&&(d=new ResizeObserver(i),d.observe(u)),()=>{d?.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0)}},[t,n,e]),s}function M(e,t){const[n,o]=f.useState(!1),s=f.useRef(null),r=f.useRef(null);return R({id:e,open:n,answers:{back:()=>{o(!1),t?.()}}}),f.useEffect(()=>{if(!n)return;const c=i=>{const u=i.target;s.current?.contains(u)||r.current?.contains(u)||o(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[n]),{open:n,setOpen:o,containerRef:s,panelRef:r,getAnchor:()=>s.current?.getBoundingClientRect()??null}}function N({open:e,align:t="start",getAnchor:n,panelRef:o,children:s}){const r=L(o,e,t,n);return e?E.createPortal(l.jsx("div",{className:"z-50",style:r??{position:"fixed",visibility:"hidden"},children:s}),document.body):null}function O({label:e,children:t,className:n,ref:o,onKeyDown:s,"data-testid":r}){return l.jsx("div",{ref:o,role:"menu","aria-label":e,tabIndex:-1,onKeyDown:s,"data-testid":r,className:b("z-50 flex max-h-[60dvh] min-w-44 flex-col overflow-y-auto overscroll-contain rounded-md border border-line bg-surface py-1 shadow-lg outline-none",n),children:t})}function S({label:e,icon:t,onSelect:n,className:o,lang:s,"data-testid":r}){return l.jsxs("button",{type:"button",role:"menuitem",lang:s,onClick:n,"data-testid":r,className:b("flex min-h-11 items-center gap-3 px-4 py-2.5 text-left text-sm text-fg transition-colors hover:bg-surface-sunken",o),children:[t&&l.jsx("span",{className:"shrink-0 text-fg-subtle",children:t}),e]})}function B({triggerLabel:e,triggerIcon:t,triggerText:n,items:o,align:s="end",touch:r=!0,className:c,triggerClassName:i,nested:u=!1,children:d}){const{open:x,setOpen:h,containerRef:m,panelRef:w,getAnchor:p}=M("popover-menu");return o.length===0&&!d?null:l.jsxs("div",{ref:m,className:b("relative",c),...u?{role:"none"}:{},children:[l.jsx(j,{variant:"ghost",size:"sm",icon:t??l.jsx(k,{className:"size-5"}),onClick:()=>h(a=>!a),"aria-label":e,"aria-haspopup":"menu","aria-expanded":x,...u?{role:"menuitem"}:{},className:b(r&&"min-h-11 min-w-11 px-0",i),children:n}),l.jsx(N,{open:x,align:s,panelRef:w,getAnchor:p,children:l.jsxs(O,{ref:w,children:[o.map(a=>l.jsx(S,{label:a.label,icon:a.icon,onSelect:()=>{h(!1),a.onSelect()}},a.key)),d]})})]})}export{k as E,N as P,O as a,S as b,B as c,M as u};
@@ -1 +1 @@
1
- import{b as a}from"./index-fsuIswbe.js";const e={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};e.node;const o=a(e);export{o as R};
1
+ import{b as a}from"./index-CKFdaY9c.js";const e={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};e.node;const o=a(e);export{o as R};
@@ -1 +1 @@
1
- import{N as E,cq as O,cr as A,K as i,r as u,u as m,cu as c,cs as B,cw as y}from"./index-fsuIswbe.js";import{u as D,c as I}from"./nav-link-ed0mFCCx.js";function S(e){const s=E({warn:e?.router===void 0}),a=e?.router||s;return O(a.stores.__store,A(e,a))}const R="/mail/brief",L="/mail/$mailboxId",_="/mail/outbox",w="/mail/flagged",T="/mail/label/$labelId";function k(e){for(const s of e){if(s.routeId===R)return{list:"brief"};if(s.routeId===w)return{list:"flagged"};if(s.routeId===_)return{list:"outbox"};if(s.routeId===T)return{list:"label",labelId:s.params?.labelId};if(s.routeId===L)return{list:"mailbox",mailboxId:s.params?.mailboxId}}}function X(e){const s=e.split(/[?#]/)[0].split("/").filter(Boolean);if(s[0]!=="mail")return"";const a=s[1];return a?a==="brief"?R:a==="flagged"?w:a==="outbox"?_:a==="label"?`${T}:${s[2]??""}`:P(a):""}function j(e){if(typeof e!="object"||e===null)return"";const{q:s}=e;return typeof s=="string"?s:""}function P(e){return`${L}:${e}`}function q(e,s){return e===s?!0:e.startsWith(`${s}/`)}function C(e){const s=e.split(/[?#]/)[0].split("/").filter(Boolean);if(s[0]!=="mail")return!1;const a=s[1]==="label"?3:2;return s.length>a}function f(){const e=S({select:r=>k(r.matches)?.list}),a=i({from:"/mail/$mailboxId",shouldThrow:!1})?.mailboxId,t=i({from:"/mail/label/$labelId",shouldThrow:!1})?.labelId;return u.useMemo(()=>({list:e,mailboxId:a,labelId:t}),[e,a,t])}function V(){const{pathname:e}=D();return C(e)}function Q(){const e=m(),s=I(),{list:a,mailboxId:o,labelId:t}=f();return u.useCallback(()=>{const r=l=>l,n=s;if(a==="flagged"){e({to:"/mail/flagged",search:r,hash:n});return}if(a==="outbox"){e({to:"/mail/outbox",search:r,hash:n});return}if(a==="mailbox"&&o){e({to:"/mail/$mailboxId",params:{mailboxId:o},search:r,hash:n});return}if(a==="label"&&t){e({to:"/mail/label/$labelId",params:{labelId:t},search:r,hash:n});return}e({to:"/mail/brief",search:r,hash:n})},[e,s,a,o,t])}const U=["reply","reply-all","forward"],F=B(U),b="/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}",h="/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}",g="/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}",p="/mail/label/$labelId/$threadId/$messageId/$mode/{-$outboxMessageId}";function v(){const e=i({from:b,shouldThrow:!1}),s=i({from:h,shouldThrow:!1}),a=i({from:g,shouldThrow:!1}),o=i({from:p,shouldThrow:!1});return e??s??a??o}function G(){const e=c({from:b,shouldThrow:!1}),s=c({from:h,shouldThrow:!1}),a=c({from:g,shouldThrow:!1}),o=c({from:p,shouldThrow:!1});return(e??s??a??o)?.body}const $=e=>s=>e===void 0?y(s):{...y(s),body:e.body};function x(){const e=v(),s=G();return u.useMemo(()=>{if(!e)return;const a=F.safeParse(e.mode);return a.success?{kind:"reply",mode:a.data,threadId:e.threadId,sourceMessageId:e.messageId,outboxMessageId:e.outboxMessageId,seed:s===void 0?void 0:{body:s}}:{kind:"unknown",segment:e.mode}},[e,s])}function W(){return x()?.kind==="reply"}function M({list:e,mailboxId:s,labelId:a},o,t){return e==="flagged"?{to:h,params:{...o,outboxMessageId:t}}:e==="mailbox"&&s?{to:g,params:{...o,mailboxId:s,outboxMessageId:t}}:e==="label"&&a?{to:p,params:{...o,labelId:a,outboxMessageId:t}}:{to:b,params:{...o,outboxMessageId:t}}}function Y(e,s){if(e?.kind==="reply"&&e.threadId===s.threadId&&e.sourceMessageId===s.messageId)return e.outboxMessageId}function z(){const e=m(),s=I(),a=f(),o=x();return u.useCallback((t,r)=>{e({...M(a,t,r===void 0?Y(o,t):void 0),search:$(r),hash:s})},[e,s,a,o])}function H(e,s,a){if(!(!s||!a))return o=>e({threadId:s,messageId:a,mode:o})}function J(){const e=m(),s=f(),a=x();return u.useCallback(o=>{a?.kind==="reply"&&e({...M(s,{threadId:a.threadId,messageId:a.sourceMessageId,mode:a.mode},o),search:$(void 0),hash:!0,replace:!0})},[e,s,a])}function Z(){const e=m(),s=I(),{list:a,mailboxId:o,labelId:t}=f(),r=v();return u.useCallback(()=>{if(!r)return;const n=$(void 0),l=s,d={threadId:r.threadId,messageId:r.messageId};if(a==="flagged"){e({to:"/mail/flagged/$threadId/$messageId",params:d,search:n,hash:l});return}if(a==="mailbox"&&o){e({to:"/mail/$mailboxId/$threadId/$messageId",params:{...d,mailboxId:o},search:n,hash:l});return}if(a==="label"&&t){e({to:"/mail/label/$labelId/$threadId/$messageId",params:{...d,labelId:t},search:n,hash:l});return}e({to:"/mail/brief/$threadId/$messageId",params:d,search:n,hash:l})},[e,s,a,o,t,r])}export{j as a,V as b,k as c,f as d,Q as e,z as f,W as g,J as h,Z as i,x as j,q as l,X as m,H as r,S as u};
1
+ import{N as E,cq as O,cr as A,K as i,r as u,u as m,cu as c,cs as B,cw as y}from"./index-CKFdaY9c.js";import{u as D,c as I}from"./nav-link-YOSchPy9.js";function S(e){const s=E({warn:e?.router===void 0}),a=e?.router||s;return O(a.stores.__store,A(e,a))}const R="/mail/brief",L="/mail/$mailboxId",_="/mail/outbox",w="/mail/flagged",T="/mail/label/$labelId";function k(e){for(const s of e){if(s.routeId===R)return{list:"brief"};if(s.routeId===w)return{list:"flagged"};if(s.routeId===_)return{list:"outbox"};if(s.routeId===T)return{list:"label",labelId:s.params?.labelId};if(s.routeId===L)return{list:"mailbox",mailboxId:s.params?.mailboxId}}}function X(e){const s=e.split(/[?#]/)[0].split("/").filter(Boolean);if(s[0]!=="mail")return"";const a=s[1];return a?a==="brief"?R:a==="flagged"?w:a==="outbox"?_:a==="label"?`${T}:${s[2]??""}`:P(a):""}function j(e){if(typeof e!="object"||e===null)return"";const{q:s}=e;return typeof s=="string"?s:""}function P(e){return`${L}:${e}`}function q(e,s){return e===s?!0:e.startsWith(`${s}/`)}function C(e){const s=e.split(/[?#]/)[0].split("/").filter(Boolean);if(s[0]!=="mail")return!1;const a=s[1]==="label"?3:2;return s.length>a}function f(){const e=S({select:r=>k(r.matches)?.list}),a=i({from:"/mail/$mailboxId",shouldThrow:!1})?.mailboxId,t=i({from:"/mail/label/$labelId",shouldThrow:!1})?.labelId;return u.useMemo(()=>({list:e,mailboxId:a,labelId:t}),[e,a,t])}function V(){const{pathname:e}=D();return C(e)}function Q(){const e=m(),s=I(),{list:a,mailboxId:o,labelId:t}=f();return u.useCallback(()=>{const r=l=>l,n=s;if(a==="flagged"){e({to:"/mail/flagged",search:r,hash:n});return}if(a==="outbox"){e({to:"/mail/outbox",search:r,hash:n});return}if(a==="mailbox"&&o){e({to:"/mail/$mailboxId",params:{mailboxId:o},search:r,hash:n});return}if(a==="label"&&t){e({to:"/mail/label/$labelId",params:{labelId:t},search:r,hash:n});return}e({to:"/mail/brief",search:r,hash:n})},[e,s,a,o,t])}const U=["reply","reply-all","forward"],F=B(U),b="/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}",h="/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}",g="/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}",p="/mail/label/$labelId/$threadId/$messageId/$mode/{-$outboxMessageId}";function v(){const e=i({from:b,shouldThrow:!1}),s=i({from:h,shouldThrow:!1}),a=i({from:g,shouldThrow:!1}),o=i({from:p,shouldThrow:!1});return e??s??a??o}function G(){const e=c({from:b,shouldThrow:!1}),s=c({from:h,shouldThrow:!1}),a=c({from:g,shouldThrow:!1}),o=c({from:p,shouldThrow:!1});return(e??s??a??o)?.body}const $=e=>s=>e===void 0?y(s):{...y(s),body:e.body};function x(){const e=v(),s=G();return u.useMemo(()=>{if(!e)return;const a=F.safeParse(e.mode);return a.success?{kind:"reply",mode:a.data,threadId:e.threadId,sourceMessageId:e.messageId,outboxMessageId:e.outboxMessageId,seed:s===void 0?void 0:{body:s}}:{kind:"unknown",segment:e.mode}},[e,s])}function W(){return x()?.kind==="reply"}function M({list:e,mailboxId:s,labelId:a},o,t){return e==="flagged"?{to:h,params:{...o,outboxMessageId:t}}:e==="mailbox"&&s?{to:g,params:{...o,mailboxId:s,outboxMessageId:t}}:e==="label"&&a?{to:p,params:{...o,labelId:a,outboxMessageId:t}}:{to:b,params:{...o,outboxMessageId:t}}}function Y(e,s){if(e?.kind==="reply"&&e.threadId===s.threadId&&e.sourceMessageId===s.messageId)return e.outboxMessageId}function z(){const e=m(),s=I(),a=f(),o=x();return u.useCallback((t,r)=>{e({...M(a,t,r===void 0?Y(o,t):void 0),search:$(r),hash:s})},[e,s,a,o])}function H(e,s,a){if(!(!s||!a))return o=>e({threadId:s,messageId:a,mode:o})}function J(){const e=m(),s=f(),a=x();return u.useCallback(o=>{a?.kind==="reply"&&e({...M(s,{threadId:a.threadId,messageId:a.sourceMessageId,mode:a.mode},o),search:$(void 0),hash:!0,replace:!0})},[e,s,a])}function Z(){const e=m(),s=I(),{list:a,mailboxId:o,labelId:t}=f(),r=v();return u.useCallback(()=>{if(!r)return;const n=$(void 0),l=s,d={threadId:r.threadId,messageId:r.messageId};if(a==="flagged"){e({to:"/mail/flagged/$threadId/$messageId",params:d,search:n,hash:l});return}if(a==="mailbox"&&o){e({to:"/mail/$mailboxId/$threadId/$messageId",params:{...d,mailboxId:o},search:n,hash:l});return}if(a==="label"&&t){e({to:"/mail/label/$labelId/$threadId/$messageId",params:{...d,labelId:t},search:n,hash:l});return}e({to:"/mail/brief/$threadId/$messageId",params:d,search:n,hash:l})},[e,s,a,o,t,r])}export{j as a,V as b,k as c,f as d,Q as e,z as f,W as g,J as h,Z as i,x as j,q as l,X as m,H as r,S as u};
@@ -1,4 +1,4 @@
1
- import{b as Vr,r as z,j as F,B as uf,p as ha,d as Kp,ci as vu,n as Wp,fz as qp,y as Up,L as Hp}from"./index-fsuIswbe.js";import{h as _l,f as Su,j as wu,k as Jp}from"./index-Caon2n2j.js";import{b as Eu,l as go,c as Vp,e as Yp}from"./useSignature-W9HBbZ_n.js";import{r as Xp,u as Gp}from"./roving-focus-DZX7IpN4.js";import{C as Zp}from"./confirm-dialog-XvccFJdE.js";import{a as Qp,D as em}from"./useMediaQuery-Hy81MQ2M.js";import{B as tm}from"./bottom-sheet-DKF_Dkid.js";import{P as nm,a as rm,b as Ps}from"./popover-menu-DhcuKv1N.js";import{U as om}from"./undo-2-D1IMLq7c.js";import{o as gv}from"./rich-text-spellcheck-provider-J8m9wz6A.js";import"./useMessageBodyContent-CpTD2HGg.js";import"./reply-CXuSMyqp.js";import"./nav-link-ed0mFCCx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-CFZ4EPXW.js";import"./suggest-list-BCqr1j26.js";import"./sections-DpRVKuXF.js";import"./chevron-down-De4wQzka.js";const cf={name:"bold",size:24,node:[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]};cf.node;const im=Vr(cf);const df={name:"book-plus",size:24,node:[["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]};df.node;const sm=Vr(df);const ff={name:"italic",size:24,node:[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]};ff.node;const am=Vr(ff);const hf={name:"link",size:24,node:[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]};hf.node;const lm=Vr(hf);const gf={name:"quote",size:24,node:[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]};gf.node;const um=Vr(gf);const pf={name:"redo-2",size:24,node:[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]};pf.node;const cm=Vr(pf),GC={html:"",text:"",formatting:[]},dm={account:"the account default",detected:"detected from what you wrote",manual:"chosen for this message"},fm=({language:n,languages:e,source:t,onSelect:r,helpText:o})=>{const[i,s]=z.useState(!1),a=z.useRef(null),l=z.useRef(null),u=z.useRef(null),c=z.useId(),d=z.useCallback(g=>{s(!1),g&&l.current?.focus()},[]);z.useEffect(()=>{if(!i)return;const g=m=>{a.current?.contains(m.target)||s(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[i]),z.useEffect(()=>{if(!i)return;const g=u.current?.querySelector('[aria-checked="true"]'),m=u.current?.querySelector('[role="menuitemradio"]');(g??m)?.focus()},[i]);const f=g=>{if(g.key==="Escape"){g.preventDefault(),d(!0);return}const m=[...u.current?.querySelectorAll('[role="menuitemradio"]')??[]],p=m.indexOf(document.activeElement),y=Xp(g.key,p,m.length);y!==null&&(g.preventDefault(),m[y]?.focus())},h=g=>{r(g),d(!0)};return F.jsxs("div",{ref:a,className:"relative",children:[F.jsx(uf,{ref:l,variant:"ghost",size:"md","aria-label":`Message language: ${go(n)}, ${dm[t]}`,"aria-haspopup":"menu","aria-expanded":i,"aria-controls":i?c:void 0,onClick:()=>s(g=>!g),"data-testid":"compose-language-chip","data-language":n,"data-language-source":t,className:ha("min-h-11 min-w-11 shrink-0 px-2 font-medium",n!==e[0]&&"bg-accent-2-soft text-accent-2"),children:Eu(n)}),i&&F.jsxs("div",{ref:u,id:c,role:"menu","aria-label":"Message language",onKeyDown:f,"data-testid":"compose-language-menu",className:"absolute right-0 top-full z-50 mt-1 flex max-h-[60dvh] min-w-56 flex-col overflow-y-auto overscroll-contain rounded-md border border-line bg-surface py-1 shadow-lg",children:[e.map(g=>F.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":g===n,lang:g,onClick:()=>h(g),className:ha("flex min-h-11 items-center justify-between gap-3 px-4 py-2.5 text-left text-sm text-fg transition-colors hover:bg-surface-sunken",g===n&&"bg-accent-2-soft"),children:[go(g),F.jsx("span",{className:"shrink-0 text-xs text-fg-subtle",children:Eu(g)})]},g)),F.jsx("p",{"data-testid":"compose-language-help",className:"border-t border-line px-4 pb-1 pt-2 text-xs text-fg-muted",children:o??Vp(navigator.userAgent)})]})]})},hm=({mode:n,onToggle:e})=>F.jsx(uf,{variant:"ghost",size:"md","aria-pressed":n==="plain",title:"Plain text",onClick:e,"data-testid":"compose-mode-toggle",className:ha("min-h-11 shrink-0",n==="plain"&&"bg-accent-2-soft text-accent-2"),children:"Plain text"}),gm=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),mf=n=>{const e=n.activeElement;return e?.shadowRoot?mf(e.shadowRoot)??e:e},pm=n=>{const e=n.tagName.toUpperCase();if(e==="IFRAME"||e==="FRAME"||e==="TEXTAREA"||e==="SELECT")return!0;if(e==="INPUT"){const r=(n.getAttribute("type")??"text").toLowerCase();return!gm.has(r)}const t=n.getAttribute("contenteditable");return t!==null&&t.toLowerCase()!=="false"?!0:n.isContentEditable===!0},yf=n=>{const e=n?.ownerDocument??globalThis.document;if(!e)return!1;const t=mf(e);return!t||t===n||n?.contains(t)?!1:pm(t)};function $(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function _f(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);t.search=r.toString(),console.warn(`Minified Lexical warning #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const nt=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,mm=nt&&"documentMode"in document?document.documentMode:null,Ft=nt&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Pt=nt&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),zr=!(!nt||!("InputEvent"in window)||mm)&&"getTargetRanges"in new window.InputEvent("input"),Tn=nt&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,bf=nt&&/Android/.test(navigator.userAgent),Po=nt&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!bf,kf=nt&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Di=nt&&bf&&kf,Lo=nt&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Ft&&!kf,ym=0,_m=1,bm=2,ga=1,pa=2,ma=4,ya=8,km=16,Ls=32,Is=64,bl=128,xm=1,Cm=2,vm=3,Sm=4,wm=5,Em=6,Co=Po||Tn||Lo?" ":"​",Bn=`
1
+ import{b as Vr,r as z,j as F,B as uf,p as ha,d as Kp,ci as vu,n as Wp,fB as qp,y as Up,L as Hp}from"./index-CKFdaY9c.js";import{h as _l,f as Su,j as wu,k as Jp}from"./index-BQ2vE6gp.js";import{b as Eu,l as go,c as Vp,e as Yp}from"./useSignature-CnLh1XFv.js";import{r as Xp,u as Gp}from"./roving-focus-DlzLpO4G.js";import{C as Zp}from"./confirm-dialog-CsttDS5u.js";import{a as Qp,D as em}from"./useMediaQuery-CjE8xNMz.js";import{B as tm}from"./bottom-sheet-B0y_-mKC.js";import{P as nm,a as rm,b as Ps}from"./popover-menu-DP-hyKpu.js";import{U as om}from"./undo-2-CgG5m84e.js";import{o as gv}from"./rich-text-spellcheck-provider-J8m9wz6A.js";import"./useMessageBodyContent-D5mskS3v.js";import"./reply-SkF_KCOk.js";import"./nav-link-YOSchPy9.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-BpDHcfPe.js";import"./suggest-list-czu9q5H4.js";import"./sections-ZsRsk30_.js";import"./chevron-down-wpFtElCn.js";const cf={name:"bold",size:24,node:[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]};cf.node;const im=Vr(cf);const df={name:"book-plus",size:24,node:[["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]};df.node;const sm=Vr(df);const ff={name:"italic",size:24,node:[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]};ff.node;const am=Vr(ff);const hf={name:"link",size:24,node:[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]};hf.node;const lm=Vr(hf);const gf={name:"quote",size:24,node:[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]};gf.node;const um=Vr(gf);const pf={name:"redo-2",size:24,node:[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]};pf.node;const cm=Vr(pf),GC={html:"",text:"",formatting:[]},dm={account:"the account default",detected:"detected from what you wrote",manual:"chosen for this message"},fm=({language:n,languages:e,source:t,onSelect:r,helpText:o})=>{const[i,s]=z.useState(!1),a=z.useRef(null),l=z.useRef(null),u=z.useRef(null),c=z.useId(),d=z.useCallback(g=>{s(!1),g&&l.current?.focus()},[]);z.useEffect(()=>{if(!i)return;const g=m=>{a.current?.contains(m.target)||s(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[i]),z.useEffect(()=>{if(!i)return;const g=u.current?.querySelector('[aria-checked="true"]'),m=u.current?.querySelector('[role="menuitemradio"]');(g??m)?.focus()},[i]);const f=g=>{if(g.key==="Escape"){g.preventDefault(),d(!0);return}const m=[...u.current?.querySelectorAll('[role="menuitemradio"]')??[]],p=m.indexOf(document.activeElement),y=Xp(g.key,p,m.length);y!==null&&(g.preventDefault(),m[y]?.focus())},h=g=>{r(g),d(!0)};return F.jsxs("div",{ref:a,className:"relative",children:[F.jsx(uf,{ref:l,variant:"ghost",size:"md","aria-label":`Message language: ${go(n)}, ${dm[t]}`,"aria-haspopup":"menu","aria-expanded":i,"aria-controls":i?c:void 0,onClick:()=>s(g=>!g),"data-testid":"compose-language-chip","data-language":n,"data-language-source":t,className:ha("min-h-11 min-w-11 shrink-0 px-2 font-medium",n!==e[0]&&"bg-accent-2-soft text-accent-2"),children:Eu(n)}),i&&F.jsxs("div",{ref:u,id:c,role:"menu","aria-label":"Message language",onKeyDown:f,"data-testid":"compose-language-menu",className:"absolute right-0 top-full z-50 mt-1 flex max-h-[60dvh] min-w-56 flex-col overflow-y-auto overscroll-contain rounded-md border border-line bg-surface py-1 shadow-lg",children:[e.map(g=>F.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":g===n,lang:g,onClick:()=>h(g),className:ha("flex min-h-11 items-center justify-between gap-3 px-4 py-2.5 text-left text-sm text-fg transition-colors hover:bg-surface-sunken",g===n&&"bg-accent-2-soft"),children:[go(g),F.jsx("span",{className:"shrink-0 text-xs text-fg-subtle",children:Eu(g)})]},g)),F.jsx("p",{"data-testid":"compose-language-help",className:"border-t border-line px-4 pb-1 pt-2 text-xs text-fg-muted",children:o??Vp(navigator.userAgent)})]})]})},hm=({mode:n,onToggle:e})=>F.jsx(uf,{variant:"ghost",size:"md","aria-pressed":n==="plain",title:"Plain text",onClick:e,"data-testid":"compose-mode-toggle",className:ha("min-h-11 shrink-0",n==="plain"&&"bg-accent-2-soft text-accent-2"),children:"Plain text"}),gm=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),mf=n=>{const e=n.activeElement;return e?.shadowRoot?mf(e.shadowRoot)??e:e},pm=n=>{const e=n.tagName.toUpperCase();if(e==="IFRAME"||e==="FRAME"||e==="TEXTAREA"||e==="SELECT")return!0;if(e==="INPUT"){const r=(n.getAttribute("type")??"text").toLowerCase();return!gm.has(r)}const t=n.getAttribute("contenteditable");return t!==null&&t.toLowerCase()!=="false"?!0:n.isContentEditable===!0},yf=n=>{const e=n?.ownerDocument??globalThis.document;if(!e)return!1;const t=mf(e);return!t||t===n||n?.contains(t)?!1:pm(t)};function $(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function _f(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);t.search=r.toString(),console.warn(`Minified Lexical warning #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const nt=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,mm=nt&&"documentMode"in document?document.documentMode:null,Ft=nt&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Pt=nt&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),zr=!(!nt||!("InputEvent"in window)||mm)&&"getTargetRanges"in new window.InputEvent("input"),Tn=nt&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,bf=nt&&/Android/.test(navigator.userAgent),Po=nt&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!bf,kf=nt&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Di=nt&&bf&&kf,Lo=nt&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Ft&&!kf,ym=0,_m=1,bm=2,ga=1,pa=2,ma=4,ya=8,km=16,Ls=32,Is=64,bl=128,xm=1,Cm=2,vm=3,Sm=4,wm=5,Em=6,Co=Po||Tn||Lo?" ":"​",Bn=`
2
2
 
3
3
  `,kl=Pt?" ":Co,hn={bold:1,capitalize:1024,code:16,highlight:bl,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},Tm={directionless:1,unmergeable:2},$i={center:2,end:6,justify:4,left:1,right:3,start:5},Nm={[Cm]:"center",[Em]:"end",[Sm]:"justify",[xm]:"left",[vm]:"right",[wm]:"start"},Dm={normal:0,segmented:2,token:1},$m={[ym]:"normal",[bm]:"segmented",[_m]:"token"},Tu="$config";function Nu(){return we()._blockCursorElement}function Am(n){return n!==null&&n.nodeType===1&&n.hasAttribute("data-lexical-slot")}let xf=class yi{element;before;after;constructor(e,t,r){this.element=e,this.before=t||null,this.after=r||null}withBefore(e){return new yi(this.element,e,this.after)}withAfter(e){return new yi(this.element,this.before,e)}withElement(e){return this.element===e?this:new yi(e,this.before,this.after)}insertChild(e){const t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&$(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&$(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&$(359),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,r){if(this.element===e)return t===e&&r===0?"before":"after";const o=Du(e,this.element);if(o===null)return"after";const i=Array.prototype.indexOf.call(e.childNodes,o);if(i<0)return"after";if(t===e)return r<=i?"before":"after";const s=Du(e,t);if(s===null)return"after";const a=Array.prototype.indexOf.call(e.childNodes,s);return a>=0&&a<=i?"before":"after"}getInsertionAnchor(){return this.before}};function Du(n,e){let t=e;for(;t!==null&&t.parentNode!==n;)t=t.parentNode;return t}let Cf=class _i extends xf{withBefore(e){return new _i(this.element,e,this.after)}withAfter(e){return new _i(this.element,this.before,e)}withElement(e){return this.element===e?this:new _i(e,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;for(;Am(t);)e=t,t=t.nextSibling;const r=e?e.nextSibling:this.element.firstChild;return r!==null&&r===Nu()?r:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(this.element.__lexicalLastChildKind=e,e===null)this.removeManagedLineBreak();else{const t=e==="decorator"&&(Lo||Tn||Po);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const t=this.element,r=e.nodeName==="IMG"?e.nextSibling:null;r&&t.removeChild(r),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const t=this.getManagedLineBreak();if(t){if(e===(t.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,o=this.before,i=ae().createElement("br");if(i.setAttribute("data-lexical-managed-linebreak","true"),r.insertBefore(i,o),e){const s=ae().createElement("img");s.setAttribute("data-lexical-managed-linebreak","true"),s.style.setProperty("display","inline","important"),s.style.setProperty("border","0px","important"),s.style.setProperty("margin","0px","important"),s.alt="",r.insertBefore(s,i),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=i}getFirstChildOffset(){const e=this.getFirstChild(),t=this.getInsertionAnchor();let r=0;for(let o=this.element.firstChild;o!==null&&o!==e&&o!==t;o=o.nextSibling)r++;return r}resolveChildIndex(e,t,r,o){if(r===this.element){const l=this.getFirstChildOffset(),u=Nu(),c=this.element.childNodes,d=Math.min(o,c.length);let f=0;for(let h=l;h<d;h++)c[h]!==u&&f++;return[e,Math.min(f,e.getChildrenSize())]}const i=$u(t,r);i.push(o);const s=$u(t,this.element);let a=e.getIndexWithinParent();for(let l=0;l<s.length;l++){const u=i[l],c=s[l];if(u===void 0||u<c)break;if(u>c){a+=1;break}}return[e.getParentOrThrow(),a]}};function $u(n,e){const t=[];let r=e;for(;r!==n&&r!==null;r=r.parentNode){let o=0;for(let i=r.previousSibling;i!==null;i=i.previousSibling)o++;t.push(o)}return r!==n&&$(225),t.reverse()}let vf;try{vf="0.49.0+prod.esm"}catch{}const Sf=vf??'"<unknown>+source"';let to=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){const e=Array.from(this._front).reverse();for(const t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}};const jn=null;function wf(n,e=1e3){return n instanceof _a?n.clone():n.size<e?new Map(n):new _a().init(new Map(n),void 0,n.size)}let _a=class Ef{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new Ef().init(this._old,this._nursery,this._size)}init(e,t,r){return this._old=e,this._nursery=t,this._size=r,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){const t=this._nursery&&this._nursery.get(e);return t!==void 0?t:this._old&&this._old.get(e)}get(e){const t=this.getWithTombstone(e);return t===jn?void 0:t}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){const t=new Map(this._old);for(const[r,o]of this._nursery)o!==jn?t.set(r,o):t.delete(r);this._old=t,this._nursery=void 0}return this._mutable=!1,this}set(e,t){const r=this.getWithTombstone(e);if(r===t)return this;const o=this.getNursery();return r!==jn&&r!==void 0||(this._size++,r===jn&&o.delete(e)),o.set(e,t),this}delete(e){const t=this.has(e);return t&&(this.getNursery().set(e,jn),this._size--),t}getOrInsert(e,t){const r=this.get(e);return r!==void 0?r:(this.set(e,t),t)}getOrInsertComputed(e,t){const r=this.get(e);if(r!==void 0)return r;const o=t(e);return this.set(e,o),o}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const e of this.entries())yield e[0]}*values(){for(const e of this.entries())yield e[1]}*entries(){const e=this._nursery,t=this._old;if(t)for(const r of t){const o=r[0],i=e?e.get(o):void 0;i!==jn&&(i!==void 0&&(r[1]=i),yield r)}if(e)for(const r of e)r[1]===jn||t&&t.has(r[0])||(yield r)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(const[r,o]of this.entries())e(o,r,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}};function Ai(n,e,t,r,o,i){if(x(n)){let s=n.getFirstChild();for(;s!==null;){const a=s.__key;s.__parent===e&&((x(s)||dn(s)&&s.__slots!==null)&&Ai(s,a,t,r,o,i),t.has(a)||i.delete(a),o.push(a)),s=s.getNextSibling()}}for(const s of dn(n)&&n.__slots!==null?n.__slots.values():[]){const a=r.get(s);a!==void 0&&Gn(a)&&a.__slotHost===e&&((x(a)||dn(a)&&a.__slots!==null)&&Ai(a,s,t,r,o,i),t.has(s)||i.delete(s),o.push(s))}}let ba=!1,xl=0;function Fm(n){xl=n.timeStamp}function Bs(n,e,t){const r=n.nodeName==="BR",o=e.__lexicalLineBreak;return o&&(n===o||r&&n.previousSibling===o)||r&&Gr(n,t)!==void 0}function zm(n,e,t){const r=Pe(gt(t)),o=r&&ft(r,t._rootElement);let i=null,s=null;o!==null&&o.anchorNode===n&&(i=o.anchorOffset,s=o.focusOffset);const a=n.nodeValue;a!==null&&Kl(e,a,i,s,!1)}function Om(n,e,t){if(N(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return ht(e)&&t.isAttached()}function Mm(n,e,t){for(let r=n;r&&!Zh(r);r=sr(r)){const o=Gr(r,e);if(o!==void 0){const i=Q(o,t);if(i)return re(i)||!q(r)?void 0:[r,i]}}}function Tf(n,e,t){ba=!0;const r=performance.now()-xl>100;try{wt(n,()=>{const o=O()||(function(d){return d.read("latest",()=>{const f=O();return f!==null?f.clone():null})})(n),i=new Map,s=n._editorState,a=n._blockCursorElement;let l=!1,u="";for(let d=0;d<e.length;d++){const f=e[d],h=f.type,g=f.target,m=Mm(g,n,s);if(!m)continue;const[p,y]=m;if(h==="characterData")r&&D(y)&&ht(g)&&Om(o,g,y)&&zm(g,y,n);else if(h==="childList"){l=!0;const _=f.addedNodes;for(let S=0;S<_.length;S++){const C=_[S],w=Rh(C),v=C.parentNode;if(!(v==null||C===a||w!==null||Bs(C,v,n)||n._slotsUsed&&q(C)&&C.hasAttribute("data-lexical-slot")||Zh(C))){if(Pt){const E=(q(C)?C.innerText:null)||C.nodeValue;E&&(u+=E)}v.removeChild(C)}}const b=f.removedNodes,k=b.length;if(k>0){let S=0;for(let C=0;C<k;C++){const w=b[C];(Bs(w,g,n)||a===w)&&(g.appendChild(w),S++)}k!==S&&i.set(p,y)}}}if(i.size>0)for(const[d,f]of i)f.reconcileObservedMutation(d,n);const c=t.takeRecords();if(c.length>0){for(let d=0;d<c.length;d++){const f=c[d],h=f.addedNodes,g=f.target;for(let m=0;m<h.length;m++){const p=h[m],y=p.parentNode;y==null||p.nodeName!=="BR"||Bs(p,g,n)||y.removeChild(p)}}t.takeRecords()}o!==null&&(l&&be(o),Pt&&Wh(n)&&o.insertRawText(u))})}finally{ba=!1}}function Nf(n){const e=n._observer;e!==null&&Tf(n,e.takeRecords(),e)}function Df(n){(function(e){xl===0&&gt(e).addEventListener("textInput",Fm,!0)})(n),n._observer=new MutationObserver((e,t)=>{Tf(n,e,t)})}const Au="latest";let jm=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||Lm).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}};function Io(n,e){return new jm(n,e)}function Bo(n,e,t=Au){const r=(t===Au?n.getLatest():n).__state;return r?r.getValue(e):e.defaultValue}function Sr(n,e,t){let r;if(Ie(),typeof t=="function"){const i=n.getLatest(),s=Bo(i,e);if(r=t(s),e.isEqual(s,r))return i}else r=t;const o=n.getWritable();return Af(o).updateFromKnown(e,r),o}function Rm(n){const e=new Map,t=new Set;for(const{ownNodeConfig:r}of Vl(typeof n=="function"?n:n.replace))if(r&&r.stateConfigs)for(const o of r.stateConfigs){let i;"stateConfig"in o?(i=o.stateConfig,o.flat&&t.add(i.key)):i=o,e.set(i.key,i)}return{flatKeys:t,sharedConfigMap:e}}const Fu=new Set(["__proto__","constructor","prototype"]);let Pm=class $f{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,r=void 0,o=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=r,this.knownState=o;const{sharedConfigMap:s}=this.sharedNodeState,a=i!==void 0?i:(function(l,u,c){let d=c.size;if(u)for(const f in u){const h=l.get(f);h&&c.has(h)||d++}return d})(s,r,o);this.size=a}getValue(e){const t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const o=this.unknownState[e.key];o!==void 0&&(r=e.parse(o)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},t={};for(const[r,o]of this.knownState)r.isEqual(o,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(o);for(const r of this.sharedNodeState.flatKeys)r in e&&(t[r]=e[r],delete e[r]);return zu(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:r}=this,o=new Map(this.knownState);return new $f(e,t,(function(i,s,a){let l;if(a)for(const[u,c]of Object.entries(a)){if(Fu.has(u))continue;const d=i.get(u);d?s.has(d)||s.set(d,d.parse(c)):(l=l||{},l[u]=c)}return l})(t.sharedConfigMap,o,r),o,this.size)}resetOnCopyNode(){for(const e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:o,unknownState:i}=this;o.has(e)||i&&r in i||(i&&(delete i[r],this.unknownState=zu(i)),this.size++),o.set(e,t)}updateFromUnknown(e,t){if(Fu.has(e))return;const r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){const{knownState:t}=this;for(const r of t.keys())t.set(r,r.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(const[r,o]of Object.entries(e))this.updateFromUnknown(r,o)}};function Af(n){const e=n.getWritable(),t=e.__state?e.__state.getWritable(e):new Pm(e,Ff(e));return e.__state=t,t}function Ff(n){return n.__state?n.__state.sharedNodeState:Oh(we(),n.getType()).sharedNodeState}function zu(n){if(n)for(const e in n)return n}function Lm(n){return n}function Ou(n,e,t){for(const[r,o]of e.knownState){if(n.has(r.key))continue;n.add(r.key);const i=t?t.getValue(r):r.defaultValue;if(i!==o&&!r.isEqual(i,o))return!0}return!1}function Mu(n,e,t){const{unknownState:r}=e,o=t?t.unknownState:void 0;if(r){for(const[i,s]of Object.entries(r))if(!n.has(i)&&(n.add(i),s!==(o?o[i]:void 0)))return!0}return!1}function ju(n,e){const t=n.__state;return t&&t.node===n?t.getWritable(e):t}function Ru(n,e){const t=n.__mode,r=n.__format,o=n.__style,i=e.__mode,s=e.__format,a=e.__style,l=n.__state,u=e.__state;return(t===null||t===i)&&(r===null||r===s)&&(o===null||o===a)&&(n.__state===null||l===u||(function(c,d){if(c===d)return!0;const f=new Set;return!(c&&Ou(f,c,d)||d&&Ou(f,d,c)||c&&Mu(f,c,d)||d&&Mu(f,d,c))})(l,u))}function Pu(n,e){const t=n.mergeWithSibling(e),r=pe()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function Lu(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&D(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(Ru(e,r)){r=Pu(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&D(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(Ru(r,t)){r=Pu(r,t);break}break}t.remove()}}else r.remove()}function Kt(n){return Iu(n.anchor),Iu(n.focus),n}function Iu(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,o;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),o=!0):(r=e.getChildAtIndex(t),o=!1),D(r)){n.set(r.__key,o?r.getTextContentSize():0,"text",!0);break}if(!x(r))break;n.set(r.__key,o?r.getChildrenSize():0,"element",!0)}}const vo=Symbol.for("@lexical/CachedTextSize");function Bu(n,e){return xa.read(()=>{let t=0,r=n;for(let o=0;o<e&&r!==null;o++){const i=zt.get(r);if(i===void 0&&$(345,r),x(i)){const s=De.get(r);if(s!==void 0&&x(s)&&s.__parent!==i.__parent)t+=i.getTextContentSize();else{const a=Hn.get(r),l=a&&a.__lexicalTextContent;typeof l!="string"&&$(346,i.getType()),t+=l.length}o<e-1&&!i.isInline()&&(t+=2)}else{const s=i[vo];s===void 0&&$(347,i.getType(),r),t+=s}r=i.__next}return t},{editor:de})}function zf(n){x(n)||n[vo]===void 0&&(n[vo]=D(n)?n.__text.length:n.getTextContentSize())}const Im=4;let So,de,wo,ie="",ze=null,Ze=null,qe=null;function Wt(){return{firstTextKey:qe,format:ze,style:Ze}}function Ct(n){n.firstTextKey!==null&&(ze=n.format,Ze=n.style,qe=n.firstTextKey)}function ka(n){if(qe!==null)return;const e=n.__lexicalFirstTextKey;if(e===void 0&&$(348),e===null)return;const t=De.get(e);D(t)&&(ze=t.getFormat(),Ze=t.getStyle(),qe=e)}let ds,po,mo,zt,xa,De,Hn,Ca,Eo,Jn,ln=!1,Fi=!1;function Cn(n,e){const t=zt.get(n),r=De.has(n);if(e!==null){const o=Ta(n);o.parentNode===e&&e.removeChild(o)}if(!r){if(de._keyToDOMMap.delete(n),x(t)){const o=Gi(t,zt);va(o,0,o.length-1,null)}if(t!==void 0){for(const o of pt(t).values()){const i=wa(o);Cn(o,null),i!==null&&i.remove()}Wl(Eo,wo,ds,t,"destroyed")}}}function va(n,e,t,r){for(let o=e;o<=t;++o){const i=n[o];i!==void 0&&Cn(i,r)}}function Rn(n,e){n.setProperty("text-align",e)}const Bm="40px";function Of(n,e){const t=So.theme.indent;if(typeof t=="string"){const r=n.classList.contains(t);e>0&&!r?n.classList.add(t):e<1&&r&&n.classList.remove(t)}n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * var(--lexical-indent-base-value, ${Bm}))`)}function Mf(n,e){const t=n.style;e===0?Rn(t,""):e===1?Rn(t,"left"):e===2?Rn(t,"center"):e===3?Rn(t,"right"):e===4?Rn(t,"justify"):e===5?Rn(t,"start"):e===6&&Rn(t,"end")}function Sa(n,e){const t=(function(r){const o=r.__dir;if(o!==null)return o;if(Oe(r))return null;const i=r.getParent();return i===null||Se(i)&&i.__dir===null?"auto":null})(e);t!==null?n.dir=t:n.removeAttribute("dir")}function jf(n){const e=ae().createElement("div");return e.setAttribute("data-lexical-slot",n),e.style.display="none",e}function Rf(n,e,t){e||n.contentEditable==="false"?Xy(t,de):t.removeAttribute("contenteditable")}function Ku(n,e,t){const r=ie,o=Wt();ie="";let i="";const s=re(n);for(const[a,l]of t){const u=jf(a);Rf(e,s,u),e.appendChild(u),ie="";const c=Wt();vn(l,Dt(n,u,de)),Ct(c),Pf(n,a,e,u),i+=ie}return Ct(o),ie=r,i}function pt(n){return dn(n)&&n.__slots!==null?n.__slots:tg}function Pf(n,e,t,r){const o=Jn.$getSlotTargetElement(n,e,t,de);o!==null&&(r.parentElement!==o&&o.appendChild(r),r.style.display="")}function wa(n){const e=Hn.get(n);return e!==void 0?e.parentElement:null}function Wu(n,e,t){const r=pt(n),o=pt(e);for(const[c,d]of r)if(!o.has(c)){const f=wa(d);Cn(d,null),f!==null&&f.remove()}const i=ie,s=Wt();let a="",l=null;const u=re(e);for(const[c,d]of o){const f=r.get(c);let h=f!==void 0?wa(f):null;ie="";const g=Wt();if(h===null){h=jf(c);let m=null;for(const p of t.children)if(!p.hasAttribute("data-lexical-slot")){m=p;break}t.insertBefore(h,m),vn(d,Dt(e,h,de))}else f===d?an(d,h):(f!==void 0&&Cn(f,h),vn(d,Dt(e,h,de)));if(Ct(g),Rf(t,u,h),Pf(e,c,t,h),a+=ie,h.parentElement===t){const m=l===null?t.firstChild:l.nextSibling;m!==h&&t.insertBefore(h,m),l=h}}return Ct(s),ie=i,a}function vn(n,e){const t=De.get(n);if(t===void 0&&$(60),e!==null){const o=zt.get(n);if(o!==void 0){const i=Hn.get(n);if(i!==void 0){const s=Gn(o)?o.__slotHost:null,a=Gn(t)?t.__slotHost:null,l=o.__parent!==t.__parent||s!==a,u=a!==null&&i.parentElement!==e.element;if(l||u)return e.insertChild(i),an(n,e.element)}}}const r=Jn.$createDOM(t,de);if((function(o,i,s){const a=s._keyToDOMMap;Ph(i,s,o),a.set(o,i)})(n,r,de),D(t)?r.setAttribute("data-lexical-text","true"):re(t)&&(r.setAttribute("data-lexical-decorator","true"),Yi(r,{captureSelection:!0})),x(t)){const o=t.__indent,i=t.__size;Sa(r,t),o!==0&&Of(r,o);const s=pt(t),a=s.size>0?Ku(t,r,s):"";if(i===0)r.__lexicalTextContent=a,r.__lexicalFirstTextKey=null,ie+=a,s.size>0&&(r.__lexicalSlotTextLength=a.length);else{const u=ie,c=i-1;if(Ea(Gi(t,De),t,0,c,Dt(t,r,de)),a!==""){const d=r.__lexicalTextContent||"";r.__lexicalTextContent=a+d,ie=u+a+d}s.size>0&&(r.__lexicalSlotTextLength=a.length)}const l=t.__format;l!==0&&Mf(r,l),t.isInline()||Lf(null,t,r)}else{const o=t.getTextContent();if(re(t)){const i=t.decorate(de,So);i!==null&&If(n,i),r.contentEditable="false";const s=pt(t);s.size>0&&Ku(t,r,s)}ie+=o}return e!==null&&e.insertChild(r),Jn.$decorateDOM(t,null,r,de),zf(t),Wl(Eo,wo,ds,t,"created"),r}function Ea(n,e,t,r,o){const i=ie,s=Wt();ie="",ze=null,Ze=null,qe=null;let a=t;for(;a<=r;++a){const u=Wt();vn(n[a],o);const c=De.get(n[a]);c!==null&&D(c)?ze===null&&(ze=c.getFormat(),Ze=c.getStyle(),qe=c.__key):x(c)&&a<r&&!c.isInline()&&(ie+=Bn),Ct(u)}const l=de._keyToDOMMap.get(e.__key);l===void 0&&$(349,e.__key),l.__lexicalTextContent=ie,l.__lexicalFirstTextKey=qe,ie=i+ie,Ct(s)}function Lf(n,e,t){const r=Dt(e,t,de),o=r.element.__lexicalLastChildKind??null,i=(function(s,a){if(s){const l=s.__last;if(l){const u=a.get(l);if(u)return We(u)?"line-break":re(u)&&u.isInline()?"decorator":null}return pt(s).size>0?null:"empty"}return null})(e,De);o!==i&&r.setManagedLineBreak(i)}function Km(n,e,t){var r;ze=null,Ze=null,qe=null,(function(o,i,s){const a=ie,l=o.__size,u=i.__size;ie="";const c=s.element,d=de._keyToDOMMap.get(i.__key);d===void 0&&$(351,i.__key);const f=u-l;if(!ln&&Math.abs(f)<=1&&l>=Im&&o.__first===i.__first&&(f!==0||!de._cloneNotNeeded.has(o.__key))){const h=d.__lexicalTextContent,g=Ca.get(o.__key);if(!ln&&typeof h=="string"&&g!==void 0){const m=(function(p,y){const _=y.size;if(_===0||_>=p.__size)return null;let b=p.__last,k=null,S=0;for(;b!==null&&S<_;){if(!y.has(b))return null;k=b;const C=De.get(b);if(C===void 0)return null;b=C.__prev,S++}return S!==_||b!==null&&y.has(b)?null:k})(i,g);if(m!==null){const p=g.size;if(f===0){const y=Bu(m,p);let _=m,b=0;for(;_!==null&&b<p;){const v=De.get(_);if(v===void 0)break;const E=Wt();an(_,c),D(v)&&ze===null&&(ze=v.getFormat(),Ze=v.getStyle(),qe=v.__key),Ct(E),_=v.__next,b++}let k="";for(_=m,b=0;_!==null&&b<p;){const v=De.get(_);if(v===void 0)break;let E;if(x(v)){const A=de._keyToDOMMap.get(_),T=A&&A.__lexicalTextContent;typeof T!="string"&&$(352,v.getType()),E=T}else E=v.getTextContent();k+=E,b<p-1&&x(v)&&!v.isInline()&&(k+=Bn),_=v.__next,b++}const S=d.__lexicalSlotTextLength||0,C=S>0?h.slice(S):h,w=C.slice(0,C.length-y)+k;return d.__lexicalTextContent=w,ie=a+w,void qu(i,d,g)}if((function(y,_,b,k,S,C,w,v){if(v!==1&&v!==-1||w!==(v===1?2:1))return!1;const A=w-v;let T=y.__last;for(let oe=0;oe<A-1;oe++){if(T===null)return!1;const $e=zt.get(T);if($e===void 0)return!1;T=$e.__prev}if(T===null)return!1;const j=De.get(C),M=zt.get(T);if(j===void 0||M===void 0||j.__prev!==M.__prev)return!1;const R=[];let I=C;for(let oe=0;oe<w;oe++){if(I===null)return!1;R.push(I);const $e=De.get(I);I=$e?$e.__next:null}const te=[];I=T;for(let oe=0;oe<A;oe++){if(I===null)return!1;te.push(I);const $e=zt.get(I);I=$e?$e.__next:null}const se=new Set(te),ne=new Set(R),B=[];let L=0,K=0;for(;L<A&&K<w;)if(R[K]===te[L])B.push({key:R[K],kind:"reconcile"}),L++,K++;else if(ne.has(te[L])){if(se.has(R[K]))return!1;B.push({key:R[K],kind:"create",nextIndex:K}),K++}else B.push({key:te[L],kind:"destroy"}),L++;for(;L<A;)B.push({key:te[L++],kind:"destroy"});for(;K<w;)B.push({key:R[K],kind:"create",nextIndex:K}),K++;const H=Bu(T,A);for(const oe of B){const $e=Wt();if(oe.kind==="reconcile")an(oe.key,b.element);else if(oe.kind==="destroy")Cn(oe.key,b.element);else{let it=null;for(let nn=oe.nextIndex+1;nn<w;nn++){const _n=de._keyToDOMMap.get(R[nn]);if(_n!==void 0){it=_n;break}}vn(oe.key,b.withBefore(it??b.before))}if(oe.kind!=="destroy"){const it=De.get(oe.key);it&&D(it)&&ze===null&&(ze=it.getFormat(),Ze=it.getStyle(),qe=it.__key)}Ct($e)}let Y="";for(let oe=0;oe<w;oe++){const $e=De.get(R[oe]);if($e===void 0)return!1;let it;if(x($e)){const nn=de._keyToDOMMap.get(R[oe]),_n=nn&&nn.__lexicalTextContent;typeof _n!="string"&&$(350,$e.getType()),it=_n}else it=$e.getTextContent();Y+=it,oe<w-1&&x($e)&&!$e.isInline()&&(Y+=Bn)}const he=k.__lexicalSlotTextLength||0,ot=he>0?S.slice(he):S;return k.__lexicalTextContent=ot.slice(0,ot.length-H)+Y,!0})(o,0,s,d,h,m,p,f)){const y=d.__lexicalTextContent;return typeof y!="string"&&$(353),ie=a+y,void qu(i,d,g)}}}if(f===0){let m=o.__first,p=0;for(;m!==null;){const y=De.get(m);if(y===void 0)break;const _=ln||mo.has(m)||po.has(m),b=Wt();if(_)an(m,c);else{let k,S;if(x(y)){S=Hn.get(m);const C=S&&S.__lexicalTextContent;typeof C!="string"&&$(354,y.getType()),k=C}else k=y.getTextContent();ie+=k,S!==void 0&&ka(S)}D(y)?ze===null&&(ze=y.getFormat(),Ze=y.getStyle(),qe=y.__key):x(y)&&p<u-1&&!y.isInline()&&(ie+=Bn),Ct(b),m=y.__next,p++}return d.__lexicalTextContent=ie,d.__lexicalFirstTextKey=qe,void(ie=a+ie)}}if(l===1&&u===1){const h=o.__first,g=i.__first;if(h===g)an(h,c);else{const p=Ta(h),y=vn(g,null);try{p.parentNode===c?c.replaceChild(y,p):s.insertChild(y)}catch(_){if(typeof _=="object"&&_!=null){const b=`${_.toString()} Parent: ${c.tagName}, new child: {tag: ${y.tagName} key: ${g}}, old child: {tag: ${p.tagName}, key: ${h}}.`;throw new Error(b)}throw _}Cn(h,null)}const m=De.get(g);D(m)&&ze===null&&(ze=m.getFormat(),Ze=m.getStyle(),qe=m.__key)}else{const h=Gi(o,zt),g=Gi(i,De);if(h.length!==l&&$(227),g.length!==u&&$(228),l===0)u!==0&&Ea(g,i,0,u-1,s);else if(u===0){if(l!==0){const m=s.after==null&&s.before==null&&pt(i).size===0&&s.element.__lexicalLineBreak==null;va(h,0,l-1,m?null:c),m&&(c.textContent="")}}else(function(m,p,y,_,b,k){const S=_-1,C=b-1;let w,v,E=k.getFirstChild(),A=0,T=0;for(;A<=S&&T<=C;){const R=p[A],I=y[T],te=Wt();if(R===I)E=Ks(an(I,k.element)),A++,T++;else{if(v===void 0&&(v=Uu(y,T)),w===void 0)w=Uu(p,A);else if(!w.has(R)){A++,Ct(te);continue}if(!v.has(R)){E=Ks(Ta(R)),Cn(R,k.element),A++,w.delete(R),Ct(te);continue}if(w.has(I)){const ne=Lr(de,I);ne!==E&&k.withBefore(E??k.before).insertChild(ne),E=Ks(an(I,k.element)),A++,T++}else vn(I,k.withBefore(E??k.before)),T++}const se=De.get(I);se!==null&&D(se)?ze===null&&(ze=se.getFormat(),Ze=se.getStyle(),qe=se.__key):x(se)&&T<=C&&!se.isInline()&&(ie+=Bn),Ct(te)}const j=A>S,M=T>C;if(j&&!M){const R=y[C+1],I=R===void 0?null:de.getElementByKey(R);Ea(y,m,T,C,k.withBefore(I??k.before))}else M&&!j&&va(p,A,S,k.element)})(i,h,g,l,u,s)}d.__lexicalTextContent=ie,d.__lexicalFirstTextKey=qe,ie=a+ie})(n,e,Dt(e,t,de)),Se(e)||(r=e,ze==null||ze===r.__textFormat||Fi||r.setTextFormat(ze),(function(o){Ze==null||Ze===o.__textStyle||Fi||o.setTextStyle(Ze)})(e))}function qu(n,e,t){const r=e.__lexicalFirstTextKey;if(r!=null){const o=n.__key;let i=r;for(;i!==null;){const s=De.get(i);if(s===void 0){i=null;break}if(s.__parent===o)break;i=s.__parent}if(i!==null&&!t.has(i)){const s=De.get(r);if(D(s))return ze=s.getFormat(),void(Ze=s.getStyle())}}e.__lexicalFirstTextKey=qe}function an(n,e){const t=zt.get(n);let r=De.get(n);t!==void 0&&r!==void 0||$(61);const o=ln||mo.has(n)||po.has(n),i=Lr(de,n);if(t===r&&!o){let s;if(x(t)){const a=i.__lexicalTextContent;typeof a!="string"&&$(355,t.getType()),s=a,ka(i)}else s=t.getTextContent();return ie+=s,i}if(t!==r&&o&&Wl(Eo,wo,ds,r,"updated"),Jn.$updateDOM(r,t,i,de)){const s=vn(n,null);return e===null&&$(62),e.replaceChild(s,i),Cn(n,null),s}if(x(t)){x(r)||$(334,n);const s=r.__indent;(ln||s!==t.__indent)&&Of(i,s);const a=r.__format;(ln||a!==t.__format)&&Mf(i,a);const l=o&&(pt(r).size>0||pt(t).size>0)?Wu(t,r,i):"";if(o){const u=ie;if(Km(t,r,i),Oe(r)||r.isInline()||Lf(0,r,i),l!==""){const c=i.__lexicalTextContent||"";i.__lexicalTextContent=l+c,ie=u+l+c,i.__lexicalSlotTextLength=l.length}else(pt(r).size>0||pt(t).size>0)&&(i.__lexicalSlotTextLength=0)}else{const u=i.__lexicalTextContent;typeof u!="string"&&$(356,t.getType()),ie+=u,ka(i)}if((ln||r.__dir!==t.__dir||r.__parent!==t.__parent)&&(Sa(i,r),Oe(r)&&!ln))for(const u of r.getChildren())x(u)&&Sa(Lr(de,u.getKey()),u)}else{const s=r.getTextContent();if(re(r)){const a=r.decorate(de,So);a!==null&&If(n,a),o&&(pt(r).size>0||pt(t).size>0)&&Wu(t,r,i)}ie+=s}if(!Fi&&Oe(r)){const s=r.getLatest();if(s.__cachedText!==ie){const a=s.getWritable();a.__cachedText=ie,r=a}}return Jn.$decorateDOM(r,t,i,de),zf(r),i}function If(n,e){let t=de._pendingDecorators;const r=de._decorators;if(t===null){if(r[n]===e)return;t=Lh(de)}t[n]=e}function Ks(n){let e=n.nextSibling;return e!==null&&e===de._blockCursorElement&&(e=e.nextSibling),e}function Uu(n,e){const t=new Set;for(let r=e;r<n.length;r++)t.add(n[r]);return t}function Wm(n,e,t,r,o,i){ie="",ze=null,Ze=null,qe=null,ln=r===2,de=t,So=t._config,Jn=t._config.dom||qi,wo=t._nodes,ds=de._listeners.mutation,po=o,mo=i,zt=n._nodeMap,xa=n,De=e._nodeMap,Fi=e._readOnly,Hn=wf(t._keyToDOMMap),Ca=(function(){const a=new Map,l=u=>{for(const c of u){const d=De.get(c);if(d===void 0)continue;const f=d.__parent;if(f===null)continue;let h=a.get(f);h===void 0&&(h=new Set,a.set(f,h)),h.add(c)}};return l(po.keys()),l(mo),a})();const s=new Map;return Eo=s,an("root",null),de=void 0,wo=void 0,po=void 0,mo=void 0,zt=void 0,xa=void 0,De=void 0,So=void 0,Hn=void 0,Ca=void 0,Eo=void 0,Jn=qi,s}function Ta(n){const e=Hn.get(n);return e===void 0&&$(75,n),e}function W(n){return{type:n}}const qt=W("SELECTION_CHANGE_COMMAND"),Bf=W("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),fs=W("CLICK_COMMAND"),Kf=W("BEFORE_INPUT_COMMAND"),Wf=W("INPUT_COMMAND"),qf=W("COMPOSITION_START_COMMAND"),Uf=W("COMPOSITION_END_COMMAND"),Sn=W("DELETE_CHARACTER_COMMAND"),wr=W("INSERT_LINE_BREAK_COMMAND"),Vn=W("INSERT_PARAGRAPH_COMMAND"),Wn=W("CONTROLLED_TEXT_INSERTION_COMMAND"),Yr=W("PASTE_COMMAND"),bi=W("REMOVE_TEXT_COMMAND"),Or=W("DELETE_WORD_COMMAND"),Mr=W("DELETE_LINE_COMMAND"),Ot=W("FORMAT_TEXT_COMMAND"),qm=W("SET_TEXT_FORMAT_COMMAND"),hs=W("UNDO_COMMAND"),gs=W("REDO_COMMAND"),ps=W("KEYDOWN_COMMAND"),Cl=W("KEY_ARROW_RIGHT_COMMAND"),Hf=W("MOVE_TO_END"),vl=W("KEY_ARROW_LEFT_COMMAND"),Jf=W("MOVE_TO_START"),Sl=W("KEY_ARROW_UP_COMMAND"),wl=W("KEY_ARROW_DOWN_COMMAND"),zi=W("KEY_ENTER_COMMAND"),Vf=W("KEY_SPACE_COMMAND"),ms=W("KEY_BACKSPACE_COMMAND"),El=W("KEY_ESCAPE_COMMAND"),Tl=W("KEY_DELETE_COMMAND"),Nl=W("KEY_TAB_COMMAND"),Um=W("INSERT_TAB_COMMAND"),Hm=W("INDENT_CONTENT_COMMAND"),Hu=W("OUTDENT_CONTENT_COMMAND"),Yf=W("DROP_COMMAND"),Xf=W("FORMAT_ELEMENT_COMMAND"),Gf=W("DRAGSTART_COMMAND"),Zf=W("DRAGOVER_COMMAND"),Jm=W("DRAGEND_COMMAND"),Ko=W("COPY_COMMAND"),ys=W("CUT_COMMAND"),Dl=W("SELECT_ALL_COMMAND"),Vm=W("CLEAR_EDITOR_COMMAND"),Ym=W("CLEAR_HISTORY_COMMAND"),lo=W("CAN_REDO_COMMAND"),uo=W("CAN_UNDO_COMMAND"),Qf=W("FOCUS_COMMAND"),Xm=W("BLUR_COMMAND"),Gm=W("KEY_MODIFIER_COMMAND");function Zm(n){const e=new Map;return{dispose(){for(const t of e.values())t.dispose();e.clear()},register(t,r){let o=e.get(t);o===void 0&&(o={dispose:n(t,r),holders:new Set},e.set(t,o));const i=()=>{const s=e.get(t);s&&s.holders.delete(i)&&s.holders.size===0&&(e.delete(t),s.dispose())};return o.holders.add(i),i}}}function yo(n,e,t,r){return n.addEventListener(e,t,r),n.removeEventListener.bind(n,e,t,r)}const rn=Object.freeze({}),Na=[["keydown",function(n,e){const t=e._inputState;t.lastKeyDownTimeStamp=n.timeStamp,t.lastKeyCode=n.key,n.key!=="Backspace"&&To(t),!e.isComposing()&&P(e,ps,n)}],["pointerdown",function(n,e){const t=Xn(n),r=n.pointerType;Lt(t)&&r!=="touch"&&r!=="pen"&&n.button===0&&wt(e,()=>{Xi(t,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(n,e){P(e,qf,n)}],["compositionend",function(n,e){const t=e._inputState;Pt?t.compositionPhase="ending-firefox":Tn||!Po&&!Lo?P(e,Uf,n):(t.compositionPhase="ending-safari",t.compositionEndData=n.data)}],["input",function(n,e){n.stopPropagation();const t=e._inputState;To(t),wt(e,()=>{rh(n,e)||e.dispatchCommand(Wf,n)},{event:n}),t.unprocessedBeforeInputData=null}],["click",function(n,e){wt(e,()=>{const t=O(),r=Pe(gt(e)),o=yt();if(r){if(N(t)){const i=t.anchor,s=i.getNode();i.type==="element"&&i.offset===0&&t.isCollapsed()&&!Oe(s)&&fe().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&o!==null&&t.is(o)&&(r.removeAllRanges(),t.dirty=!0)}else if(n.pointerType==="touch"||n.pointerType==="pen"){const i=ft(r,e._rootElement).anchorNode;(q(i)||ht(i))&&be(Do(o,r,e,n))}}if(Pt&&r!==null&&r.rangeCount===0){const i=e._rootElement;if(i!==null&&n.target===i){const s=n.clientY;let a=i.childNodes.length;for(let u=0;u<i.childNodes.length;u++){const c=i.childNodes[u];if(q(c)){const d=c.getBoundingClientRect();if(s<=(d.top+d.bottom)/2){a=u;break}}}r.setBaseAndExtent(i,a,i,a);const l=Do(o,r,e,n);l!==null?be(l):r.removeAllRanges()}}P(e,fs,n)})}],["cut",rn],["copy",rn],["dragstart",rn],["dragover",rn],["dragend",rn],["paste",rn],["focus",rn],["blur",rn],["drop",rn]];zr&&Na.push(["beforeinput",(n,e)=>(function(t,r){const o=t.inputType;o==="deleteCompositionText"||Pt&&Wh(r)||o!=="insertCompositionText"&&wt(r,()=>{rh(t,r)||P(r,Kf,t)},{event:t})})(n,e)]);const Da=new WeakMap,Oi=new WeakMap,Qm=Zm(n=>(n.addEventListener("selectionchange",Gu),()=>n.removeEventListener("selectionchange",Gu)));function eh(n,e,t,r,o,i){const s=n.anchor,a=n.focus,l=s.getNode(),u=pe();let c;if(i!==void 0)c=i;else{const m=Pe(gt(u));c=m!==null?ft(m,u._rootElement):null}const d=c!==null?c.anchorNode:null,f=s.key,h=u.getElementByKey(f),g=t.length;return f!==a.key||!D(l)||(!o&&(!zr||u._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||l.isDirty()&&g<2||Ih(t))&&s.offset!==a.offset&&!l.isComposing()||Et(l)||l.isDirty()&&g>1||(o||!zr)&&h!==null&&!l.isComposing()&&d!==En(l,h,u)||c!==null&&e!==null&&(!e.collapsed||e.startContainer!==c.anchorNode||e.startOffset!==c.anchorOffset)||!l.isComposing()&&(l.getFormat()!==n.format||l.getStyle()!==n.style)||(function(m,p){if(p.isSegmented())return!0;if(!m.isCollapsed())return!1;const y=m.anchor.offset,_=p.getParentOrThrow(),b=Ui(p);return y===0?!p.canInsertTextBefore()||!_.canInsertTextBefore()&&!p.isComposing()||b||(function(k){const S=k.getPreviousSibling();return(D(S)||x(S)&&S.isInline())&&!S.canInsertTextAfter()})(p):y===p.getTextContentSize()&&(!p.canInsertTextAfter()||!_.canInsertTextAfter()&&!p.isComposing()||b)})(n,l)}function Ju(n,e){return ht(n)&&n.nodeValue!==null&&e!==0&&e!==n.nodeValue.length}function Vu(n,e,t){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}=ft(n,e._rootElement),a=e._inputState;a.isSelectionChangeFromDOMUpdate&&(a.isSelectionChangeFromDOMUpdate=!1,Ju(r,o)&&Ju(i,s)&&!a.postDeleteSelectionToRestore)||wt(e,()=>{if(!t)return void be(null);if(!Ho(e,r,i))return;let l=O();if(a.postDeleteSelectionToRestore&&N(l)&&l.isCollapsed()){const u=l.anchor,c=a.postDeleteSelectionToRestore.anchor;(u.key===c.key&&u.offset===c.offset+1||u.offset===1&&c.getNode().is(u.getNode().getPreviousSibling()))&&(l=a.postDeleteSelectionToRestore.clone(),be(l))}if(a.postDeleteSelectionToRestore=null,N(l)){const u=l.anchor,c=u.getNode();if(l.isCollapsed()){n.type==="Range"&&r===i&&(l.dirty=!0);const d=gt(e).event,f=d?d.timeStamp:performance.now(),{format:h,style:g,offset:m,key:p,timeStamp:y}=a.collapsedSelectionFormat,_=fe(),b=e.isComposing()===!1&&_.getTextContent()==="";if(f<y+200&&u.offset===m&&u.key===p)ki(l,h,g);else if(u.type==="text")D(c)||$(141),th(l,c);else if(u.type==="element"&&!b){x(c)||$(259);const k=u.getNode();k.isEmpty()?(function(S,C){const w=C.getTextFormat(),v=C.getTextStyle();ki(S,w,v)})(l,k):ki(l,l.format,"")}}else{const d=u.key,f=l.focus.key,h=l.getNodes(),g=h.length,m=l.isBackward(),p=m?s:o,y=m?o:s,_=m?f:d,b=m?d:f;let k=2047,S=!1;for(let C=0;C<g;C++){const w=h[C],v=w.getTextContentSize();if(D(w)&&v!==0&&!(C===0&&w.__key===_&&p===v||C===g-1&&w.__key===b&&y===0)&&(S=!0,k&=w.getFormat(),k===0))break}l.format=S?k:0}}P(e,qt)})}function ki(n,e,t){n.format===e&&n.style===t||(n.format=e,n.style=t,n.dirty=!0)}function th(n,e){ki(n,e.getFormat(),e.getStyle())}function nh(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function Yu(n){const{lastKeyCode:e}=pe()._inputState;if(n==null||n.length<=1||e==null)return;const t=e.length===1?e:e==="Enter"?`
4
4
  `:e==="Tab"?" ":null;if(!t)return;const r=O();if(!N(r)||!r.isCollapsed())return;const o=r.anchor.getNode();if(!D(o))return;const{offset:i}=r.anchor;if(o.getTextContentSize()===i){const s=o.getNextSibling();if(t===`
@@ -1 +1 @@
1
- import{f as r,s as o,g as a}from"./useSignature-W9HBbZ_n.js";import{o as n}from"./rich-text-spellcheck-provider-J8m9wz6A.js";import"./index-fsuIswbe.js";const l=t=>({post:e=>t.postMessage(e),listen:e=>t.addEventListener("message",s=>e(s.data)),fail:e=>t.addEventListener("error",s=>e(s.message)),terminate:()=>t.terminate()}),m=async t=>{const e=r(t);if(!e)return null;const s=new Worker(new URL("/assets/rich-text-spellcheck-worker-pWkhC-WR.js",import.meta.url),{type:"module"});return n(e,o(),l(s),a(e))};export{m as openSpellcheckWorker};
1
+ import{f as r,s as o,g as a}from"./useSignature-CnLh1XFv.js";import{o as n}from"./rich-text-spellcheck-provider-J8m9wz6A.js";import"./index-CKFdaY9c.js";const l=t=>({post:e=>t.postMessage(e),listen:e=>t.addEventListener("message",s=>e(s.data)),fail:e=>t.addEventListener("error",s=>e(s.message)),terminate:()=>t.terminate()}),m=async t=>{const e=r(t);if(!e)return null;const s=new Worker(new URL("/assets/rich-text-spellcheck-worker-pWkhC-WR.js",import.meta.url),{type:"module"});return n(e,o(),l(s),a(e))};export{m as openSpellcheckWorker};
@@ -1 +1 @@
1
- import{b as a}from"./index-fsuIswbe.js";const e={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};e.node;const o=a(e);export{o as R};
1
+ import{b as a}from"./index-CKFdaY9c.js";const e={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};e.node;const o=a(e);export{o as R};
@@ -1 +1 @@
1
- import{r as d}from"./index-fsuIswbe.js";const E={"data-list-row":""},v="[data-list-row]";function m(e,r,s,i="vertical"){if(s===0)return null;const n=i==="vertical"?"ArrowDown":"ArrowRight",c=i==="vertical"?"ArrowUp":"ArrowLeft";return e===n?r<0?0:Math.min(r+1,s-1):e===c?r<=0?0:r-1:e==="Home"?0:e==="End"?s-1:null}function l(e,r){return Array.from(e.querySelectorAll(r))}function y({containerRef:e,itemSelector:r,orientation:s="vertical",enabled:i=!0}){d.useEffect(()=>{if(!i)return;const n=e.current;if(!n)return;const c=()=>{const t=l(n,r);if(t.length===0)return;const f=t.find(o=>o===document.activeElement)??t[0];for(const o of t)o.tabIndex=o===f?0:-1},u=t=>{if(t.shiftKey||t.metaKey||t.ctrlKey||t.altKey)return;const a=l(n,r),f=a.indexOf(document.activeElement),o=m(t.key,f,a.length,s);o===null||o===f||(t.preventDefault(),t.stopPropagation(),a[o]?.focus())};return c(),n.addEventListener("focusin",c),n.addEventListener("keydown",u),()=>{n.removeEventListener("focusin",c),n.removeEventListener("keydown",u)}})}export{v as L,E as a,m as r,y as u};
1
+ import{r as d}from"./index-CKFdaY9c.js";const E={"data-list-row":""},v="[data-list-row]";function m(e,r,s,i="vertical"){if(s===0)return null;const n=i==="vertical"?"ArrowDown":"ArrowRight",c=i==="vertical"?"ArrowUp":"ArrowLeft";return e===n?r<0?0:Math.min(r+1,s-1):e===c?r<=0?0:r-1:e==="Home"?0:e==="End"?s-1:null}function l(e,r){return Array.from(e.querySelectorAll(r))}function y({containerRef:e,itemSelector:r,orientation:s="vertical",enabled:i=!0}){d.useEffect(()=>{if(!i)return;const n=e.current;if(!n)return;const c=()=>{const t=l(n,r);if(t.length===0)return;const f=t.find(o=>o===document.activeElement)??t[0];for(const o of t)o.tabIndex=o===f?0:-1},u=t=>{if(t.shiftKey||t.metaKey||t.ctrlKey||t.altKey)return;const a=l(n,r),f=a.indexOf(document.activeElement),o=m(t.key,f,a.length,s);o===null||o===f||(t.preventDefault(),t.stopPropagation(),a[o]?.focus())};return c(),n.addEventListener("focusin",c),n.addEventListener("keydown",u),()=>{n.removeEventListener("focusin",c),n.removeEventListener("keydown",u)}})}export{v as L,E as a,m as r,y as u};
@@ -1 +1 @@
1
- import{r as e,j as l,B as b,p as y,L as x}from"./index-fsuIswbe.js";const i=()=>l.jsx(x,{className:"size-3.5 animate-spin"}),m=(s,n)=>n?l.jsx("span",{className:"sr-only",children:s}):s;function c({actions:s=[],destructive:n,className:o}){const[f,r]=e.useState(!1);return f&&n?.confirm?l.jsxs("div",{className:y("flex items-center gap-2",o),children:[l.jsx("span",{className:"text-xs text-fg-muted",children:n.confirm.prompt}),l.jsx(b,{variant:"secondary",size:"sm",onClick:()=>r(!1),children:n.confirm.cancelLabel??"Cancel"}),l.jsx(b,{variant:"danger",size:"sm","aria-busy":n.busy,icon:n.busy?i():void 0,onClick:()=>{n.busy||n.onClick()},children:n.busy?n.busyLabel??"Working…":n.confirm.confirmLabel??n.label})]}):l.jsxs("div",{className:y("flex items-center gap-2",o),children:[s.map(a=>l.jsx(b,{variant:a.variant??"ghost",size:"sm","aria-busy":a.busy,"aria-label":a.iconOnly?a.label:void 0,icon:a.busy?i():a.icon,onClick:()=>{a.busy||a.onClick()},children:a.busy&&a.busyLabel?a.busyLabel:m(a.label,a.iconOnly)},a.label)),n&&l.jsx(b,{variant:"ghost",size:"sm","aria-busy":n.busy,"aria-label":n.iconOnly?n.label:void 0,icon:n.busy?i():n.icon,onClick:()=>{if(!n.busy){if(n.confirm){r(!0);return}n.onClick()}},children:n.busy&&n.busyLabel?n.busyLabel:m(n.label,n.iconOnly)})]})}export{c as R};
1
+ import{r as e,j as l,B as b,p as y,L as x}from"./index-CKFdaY9c.js";const i=()=>l.jsx(x,{className:"size-3.5 animate-spin"}),m=(s,n)=>n?l.jsx("span",{className:"sr-only",children:s}):s;function c({actions:s=[],destructive:n,className:o}){const[f,r]=e.useState(!1);return f&&n?.confirm?l.jsxs("div",{className:y("flex items-center gap-2",o),children:[l.jsx("span",{className:"text-xs text-fg-muted",children:n.confirm.prompt}),l.jsx(b,{variant:"secondary",size:"sm",onClick:()=>r(!1),children:n.confirm.cancelLabel??"Cancel"}),l.jsx(b,{variant:"danger",size:"sm","aria-busy":n.busy,icon:n.busy?i():void 0,onClick:()=>{n.busy||n.onClick()},children:n.busy?n.busyLabel??"Working…":n.confirm.confirmLabel??n.label})]}):l.jsxs("div",{className:y("flex items-center gap-2",o),children:[s.map(a=>l.jsx(b,{variant:a.variant??"ghost",size:"sm","aria-busy":a.busy,"aria-label":a.iconOnly?a.label:void 0,icon:a.busy?i():a.icon,onClick:()=>{a.busy||a.onClick()},children:a.busy&&a.busyLabel?a.busyLabel:m(a.label,a.iconOnly)},a.label)),n&&l.jsx(b,{variant:"ghost",size:"sm","aria-busy":n.busy,"aria-label":n.iconOnly?n.label:void 0,icon:n.busy?i():n.icon,onClick:()=>{if(!n.busy){if(n.confirm){r(!0);return}n.onClick()}},children:n.busy&&n.busyLabel?n.busyLabel:m(n.label,n.iconOnly)})]})}export{c as R};
@@ -1 +1 @@
1
- import{u as I,P as v,r as x}from"./index-fsuIswbe.js";import{u as h,a as $,g as Q}from"./reply-CXuSMyqp.js";import{b as g}from"./MailShell-tKLYT5hn.js";import{a as q}from"./useMessageBodyContent-CpTD2HGg.js";function A(a){const r=I(),{searchInput:u,searchQuery:s}=v(),n=h({select:i=>$(i.location.search)}),c=h({select:i=>i.location.pathname}),d=q(),f=Q(),m=d||f,{to:e}=a,t=a.to==="/mail/$mailboxId"?a.params.mailboxId:void 0,o=a.to==="/mail/label/$labelId"?a.params.labelId:void 0,p=t?`/mail/${t}`:o?`/mail/label/${o}`:e;x.useEffect(()=>{if(!g({searchInput:u,committedQuery:s,urlQuery:n,pathname:c,listPath:p}))return;const b=!!s&&n!==s&&!m,l=y=>({...y,q:s||void 0});if(!b){r({to:".",search:l,hash:!0,replace:!0});return}if(e==="/mail/$mailboxId"){if(!t)return;r({to:e,params:{mailboxId:t},search:l,hash:!0,replace:!0});return}if(e==="/mail/label/$labelId"){if(!o)return;r({to:e,params:{labelId:o},search:l,hash:!0,replace:!0});return}r({to:e,search:l,hash:!0,replace:!0})},[u,s,n,r,e,t,o,p,c,m])}export{A as u};
1
+ import{u as I,P as v,r as x}from"./index-CKFdaY9c.js";import{u as h,a as $,g as Q}from"./reply-SkF_KCOk.js";import{b as g}from"./MailShell-DE0ZN2ct.js";import{a as q}from"./useMessageBodyContent-D5mskS3v.js";function A(a){const r=I(),{searchInput:u,searchQuery:s}=v(),n=h({select:i=>$(i.location.search)}),c=h({select:i=>i.location.pathname}),d=q(),f=Q(),m=d||f,{to:e}=a,t=a.to==="/mail/$mailboxId"?a.params.mailboxId:void 0,o=a.to==="/mail/label/$labelId"?a.params.labelId:void 0,p=t?`/mail/${t}`:o?`/mail/label/${o}`:e;x.useEffect(()=>{if(!g({searchInput:u,committedQuery:s,urlQuery:n,pathname:c,listPath:p}))return;const b=!!s&&n!==s&&!m,l=y=>({...y,q:s||void 0});if(!b){r({to:".",search:l,hash:!0,replace:!0});return}if(e==="/mail/$mailboxId"){if(!t)return;r({to:e,params:{mailboxId:t},search:l,hash:!0,replace:!0});return}if(e==="/mail/label/$labelId"){if(!o)return;r({to:e,params:{labelId:o},search:l,hash:!0,replace:!0});return}r({to:e,search:l,hash:!0,replace:!0})},[u,s,n,r,e,t,o,p,c,m])}export{A as u};