@remit/web-client-dist 0.0.674 → 0.0.675
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/AppFrame-R9FR9SH9.js +1 -0
- package/assets/BriefPane-BzlqkW4r.js +1 -0
- package/assets/CalendarEventEditor-BpGmPZ2Z.js +1 -0
- package/assets/CalendarEventPopup-Brcgx7tV.js +1 -0
- package/assets/CalendarQuickCreate-CwkBXqAB.js +1 -0
- package/assets/CalendarSession--XFP5lXS.js +1 -0
- package/assets/EmptyState-dD_YhGMH.js +1 -0
- package/assets/{ErrorState-Bi4vrhhQ.js → ErrorState-nA0Ptq3g.js} +1 -1
- package/assets/FlaggedPane-BwhUf1qN.js +1 -0
- package/assets/{FullCompose-D6Xef8Ur.js → FullCompose-dJ4mfUrX.js} +1 -1
- package/assets/{LabelApplyTrigger-BnPNejnI.js → LabelApplyTrigger-BA7ANeDk.js} +1 -1
- package/assets/MailShell-0sTtK1xD.js +1 -0
- package/assets/MailViewChrome-BEx9Dr1Z.js +1 -0
- package/assets/MailboxPane-DYgnYeOy.js +1 -0
- package/assets/{MessageBody-AvWIklnv.js → MessageBody-Deha778B.js} +3 -3
- package/assets/MessageToolbar-5T47fDWC.js +1 -0
- package/assets/NavMenuButton-C-7-t18I.js +1 -0
- package/assets/OnboardingWizard-hfP07hpw.js +1 -0
- package/assets/OutboxPane-gEXLW7BJ.js +1 -0
- package/assets/_calendarObjectId-Dbrtihva.js +1 -0
- package/assets/_mailboxId-B587Zr5T.js +1 -0
- package/assets/_messageId-BxlZMqGk.js +1 -0
- package/assets/_messageId-CRIBYDCW.js +1 -0
- package/assets/_messageId-DTs144Nv.js +1 -0
- package/assets/_outboxMessageId-BxdPyrXI.js +1 -0
- package/assets/_recurrenceId-QBmk5dbN.js +1 -0
- package/assets/_threadId-8Y3P5szz.js +1 -0
- package/assets/_threadId-AMQdO9xw.js +1 -0
- package/assets/_threadId-mpk_WkaQ.js +1 -0
- package/assets/_view._date-BfJq9sBQ.js +1 -0
- package/assets/account-service-status-Kz9s3jOk.js +1 -0
- package/assets/accounts-B5C8kCn6.js +1 -0
- package/assets/advanced-CudHnY-7.js +1 -0
- package/assets/appearance-BTH52atO.js +1 -0
- package/assets/{avatar-qD7fcqFf.js → avatar-vPm9XfmM.js} +1 -1
- package/assets/{bottom-sheet-B_7iO-ln.js → bottom-sheet-BTdseD_6.js} +1 -1
- package/assets/brief-BC_KN7ph.js +1 -0
- package/assets/{brief-RK0pe25_.js → brief-DuHUqR8b.js} +1 -1
- package/assets/calendar-BQjH3OHS.js +1 -0
- package/assets/calendar-LLRgZQzl.js +1 -0
- package/assets/calendar-event-popup-Mft0N_sd.js +1 -0
- package/assets/calendar-event-sidebar-D5vjFGdS.js +1 -0
- package/assets/calendar-failure-note-BUFaaizf.js +1 -0
- package/assets/calendar-report-CzeBcU6C.js +1 -0
- package/assets/calendar-suggestion-ClsxDTZs.js +1 -0
- package/assets/calendars-zYfPB3b8.js +1 -0
- package/assets/{card-C9cgHaft.js → card-865cdsJK.js} +1 -1
- package/assets/checkbox-Qon94b1C.js +1 -0
- package/assets/{circle-check-CQPt1U9q.js → circle-check-Db07NpOC.js} +1 -1
- package/assets/{circle-check-big-ZwVj0mbk.js → circle-check-big-CyVG6r7N.js} +1 -1
- package/assets/{circle-help-BtMu5xYr.js → circle-help-CVShnhWn.js} +1 -1
- package/assets/{clock-B-eYdLBT.js → clock-B9kFW89H.js} +1 -1
- package/assets/compose._-_outboxMessageId_-BkKmzR39.js +1 -0
- package/assets/compose._-_outboxMessageId_-BnYGu6ez.js +1 -0
- package/assets/compose._-_outboxMessageId_-C5Aukg6m.js +1 -0
- package/assets/compose._-_outboxMessageId_-Ck-eEtzy.js +1 -0
- package/assets/{config-import-DhLbROIb.js → config-import-C2ovEkHy.js} +1 -1
- package/assets/{confirm-dialog-AppxcVfC.js → confirm-dialog-CgMAaLI3.js} +1 -1
- package/assets/{copy-BCzZpML3.js → copy-CIKgpUwt.js} +1 -1
- package/assets/{credential-steps-DCjuFFo-.js → credential-steps-BWguS0eW.js} +1 -1
- package/assets/{download-C6M2pRs1.js → download-A4hq8dWf.js} +1 -1
- package/assets/edit-CxVYhmi5.js +1 -0
- package/assets/edit-DXN-G3Tu.js +1 -0
- package/assets/{external-link-tmwz3hf0.js → external-link-DaKTW3eK.js} +1 -1
- package/assets/{file-json-BgVPDajK.js → file-json-DiHW8YBd.js} +1 -1
- package/assets/filters-1uKuLkQU.js +1 -0
- package/assets/{flagged-IHM3vv4x.js → flagged-BIza20sq.js} +1 -1
- package/assets/flagged-DmSptMzm.js +1 -0
- package/assets/folders-Bd16ltK4.js +1 -0
- package/assets/{help-copy-BN4-5aIP.js → help-copy-N4JgEUmu.js} +1 -1
- package/assets/{import-BT72aUBc.js → import-DJptfpxt.js} +1 -1
- package/assets/index-B18BvpkW.js +1 -0
- package/assets/index-B4pYEqZI.js +1 -0
- package/assets/index-B77HnSA5.js +1 -0
- package/assets/{index-Cb2UJhnj.js → index-BWAq8iOl.js} +7 -7
- package/assets/index-BZdYp7ae.js +1 -0
- package/assets/index-BiCNOLIH.js +1 -0
- package/assets/index-BzL5-pGT.js +349 -0
- package/assets/{index-C2Hz4y-Q.css → index-C8VKP1dT.css} +1 -1
- package/assets/index-CoCVPZ34.js +1 -0
- package/assets/index-CroyVnhC.js +1 -0
- package/assets/index-DTs144Nv.js +1 -0
- package/assets/index-DsgtllX4.js +1 -0
- package/assets/index-DtqBFgK5.js +1 -0
- package/assets/index-DupXMcS6.js +1 -0
- package/assets/{kbd-DxdiA2Fl.js → kbd-B9MFmWVU.js} +1 -1
- package/assets/labels-DeCZEWet.js +1 -0
- package/assets/mail-CSUpbRUP.js +1 -0
- package/assets/{menu-ouYQ8aI9.js → menu-CGw_RHKl.js} +1 -1
- package/assets/new-DVwQ9Ia3.js +1 -0
- package/assets/onboarding-CDWqPDW8.js +1 -0
- package/assets/{onboarding-completion-h9meGJrm.js → onboarding-completion-DbgUYeRa.js} +1 -1
- package/assets/outbox-Ct7VdX2v.js +1 -0
- package/assets/{pencil-D0Kwpd2W.js → pencil-DOoqyGzC.js} +1 -1
- package/assets/{popover-menu-CTiORP1p.js → popover-menu-CNiMANtf.js} +1 -1
- package/assets/{refresh-cw-aweb7slK.js → refresh-cw-D1SQy8O7.js} +1 -1
- package/assets/reply-CQarAZxU.js +1 -0
- package/assets/{rich-text-BlpPNJ69.js → rich-text-DgI7vzll.js} +14 -14
- package/assets/{rich-text-spellcheck-worker-provider-BVC2WqOs.js → rich-text-spellcheck-worker-provider-paPOw9As.js} +1 -1
- package/assets/{rotate-ccw-cFCdZR4R.js → rotate-ccw-DPB71584.js} +1 -1
- package/assets/{roving-focus-iNw1K_A-.js → roving-focus-Coea111y.js} +1 -1
- package/assets/{row-actions-CsY_49bo.js → row-actions-CiZruXil.js} +1 -1
- package/assets/search-mirror-_Dap9COg.js +1 -0
- package/assets/search-token-index-DQHE1g7A.js +1 -0
- package/assets/{sections-By63r1y_.js → sections-C6oVXjho.js} +1 -1
- package/assets/senders-DIVpkzIq.js +1 -0
- package/assets/settings-Cv257vpL.js +1 -0
- package/assets/settings-screen-4md2ibPl.js +1 -0
- package/assets/{shield-check-C6K5BNfE.js → shield-check-BcUXVpR8.js} +1 -1
- package/assets/sparkles-C1l6GCPT.js +1 -0
- package/assets/{suggested-vips-DnRYIdD0.js → suggested-vips-iEt-4yp9.js} +1 -1
- package/assets/suggestion._suggestionId-BQw9qGr-.js +1 -0
- package/assets/{undo-2-BV0sKXdu.js → undo-2-DHJ6nykB.js} +1 -1
- package/assets/useCalendarData-Bz4EDHDO.js +2 -0
- package/assets/useCalendarSuggestions-DcYFtQhb.js +1 -0
- package/assets/{useDebouncedValue--u19KX6h.js → useDebouncedValue-B7157ZPO.js} +1 -1
- package/assets/{useFilters-Cmf0Cndn.js → useFilters-C3bLY42W.js} +1 -1
- package/assets/{useLabels-CN56tbCw.js → useLabels-DYdHiHXI.js} +1 -1
- package/assets/useLayoutTier-5aJYrTut.js +1 -0
- package/assets/{useMediaQuery-DB2OdJvp.js → useMediaQuery-7Q3jBluO.js} +1 -1
- package/assets/useMessageBodyContent-CWGtiddz.js +1 -0
- package/assets/useQueries-Sm8S3Cgh.js +1 -0
- package/assets/useRefreshControl-bA8HK_j-.js +1 -0
- package/assets/useResultFolderIndex-BaqajWHb.js +1 -0
- package/assets/{useSignature-37xUEwqG.js → useSignature-sxHvGfKr.js} +1 -1
- package/assets/warnings-ByqpxH4J.js +5 -0
- package/index.html +2 -2
- package/package.json +1 -1
- package/assets/BriefPane-zWXuK_Pj.js +0 -1
- package/assets/CalendarComposePane-Bz_-lcWc.js +0 -1
- package/assets/CalendarComposeSeed-DrUkfGTc.js +0 -1
- package/assets/CalendarShell-BATnya1t.js +0 -1
- package/assets/EmptyState-DjcO1Fvj.js +0 -1
- package/assets/FlaggedPane-Doc9iLZn.js +0 -1
- package/assets/MailNav-C8EZGG4u.js +0 -1
- package/assets/MailShell-Dc5V-rLi.js +0 -1
- package/assets/MailViewChrome-CJkUbWPO.js +0 -1
- package/assets/MailboxPane-Bzn-4kym.js +0 -1
- package/assets/MessageToolbar-CvC2dLSg.js +0 -1
- package/assets/NavMenuButton-DSpTQKmQ.js +0 -1
- package/assets/OnboardingWizard-DzR2uArY.js +0 -1
- package/assets/OpenCalendarEvent-DuKGo-jF.js +0 -2
- package/assets/OutboxPane-Bf8T7dxW.js +0 -1
- package/assets/SignInAgain-CCZnH9Mt.js +0 -1
- package/assets/_calendarObjectId-BGZWGcp9.js +0 -1
- package/assets/_mailboxId-GGJA-jVS.js +0 -1
- package/assets/_messageId-C5LRx072.js +0 -1
- package/assets/_messageId-CCba-TdT.js +0 -1
- package/assets/_messageId-TW2iI02X.js +0 -1
- package/assets/_outboxMessageId-BwVgR2h4.js +0 -1
- package/assets/_recurrenceId-pJxBSSXe.js +0 -1
- package/assets/_threadId-B_SsLFXa.js +0 -1
- package/assets/_threadId-CL2HHRtw.js +0 -1
- package/assets/_threadId-DLvgcvlr.js +0 -1
- package/assets/_view._date-wBuxk5kG.js +0 -1
- package/assets/accounts-Dc5147aO.js +0 -1
- package/assets/advanced-C3zdMHK5.js +0 -1
- package/assets/appearance-Df1fh0eu.js +0 -1
- package/assets/attendee-row-r-oUgLyi.js +0 -1
- package/assets/bell-off-DNCJLc9z.js +0 -1
- package/assets/brief-ClYJePmh.js +0 -1
- package/assets/bug-D6xXLRSh.js +0 -1
- package/assets/calendar-Dg7vWWgr.js +0 -1
- package/assets/calendar-clash-strip-C9X1djbQ.js +0 -1
- package/assets/calendar-report-BRGottVJ.js +0 -1
- package/assets/calendar-subscription-B-aAc2Gy.js +0 -1
- package/assets/calendar-suggestion-qEC_UasM.js +0 -1
- package/assets/calendars-DBDN0ptk.js +0 -1
- package/assets/checkbox-CiQllE1Y.js +0 -1
- package/assets/chevron-left-Bt4eJ35K.js +0 -1
- package/assets/compose._-_outboxMessageId_-BMq7tjfo.js +0 -1
- package/assets/compose._-_outboxMessageId_-CbnOP01x.js +0 -1
- package/assets/compose._-_outboxMessageId_-CoBJDS24.js +0 -1
- package/assets/compose._-_outboxMessageId_-Cr5hBZLH.js +0 -1
- package/assets/filters-CwblOGNb.js +0 -1
- package/assets/flagged-DvOlELtX.js +0 -1
- package/assets/folders-lF0pnG5O.js +0 -1
- package/assets/index-BDcVKyir.js +0 -1
- package/assets/index-C5LRx072.js +0 -1
- package/assets/index-CCba-TdT.js +0 -1
- package/assets/index-CVKDJurZ.js +0 -1
- package/assets/index-CXrVnh7V.js +0 -1
- package/assets/index-CXzCthHG.js +0 -349
- package/assets/index-DRT_I4p4.js +0 -1
- package/assets/index-DSNc3rHB.js +0 -1
- package/assets/index-T04Kj7bC.js +0 -1
- package/assets/index-TW2iI02X.js +0 -1
- package/assets/index-u72ANhps.js +0 -1
- package/assets/labels-CTSVGM1M.js +0 -1
- package/assets/mail-BLRLmM-I.js +0 -1
- package/assets/mail-CHopLOA-.js +0 -1
- package/assets/map-pin-DbNUeHlR.js +0 -1
- package/assets/minus-COyPQ5q9.js +0 -1
- package/assets/new-DRfIDZVL.js +0 -1
- package/assets/onboarding-U6yiJPWH.js +0 -1
- package/assets/outbox-DFxDZsE8.js +0 -1
- package/assets/reply-B9-kr45N.js +0 -1
- package/assets/search-mirror-Bg0i4bJE.js +0 -1
- package/assets/search-query-Dq2--dgF.js +0 -1
- package/assets/search-token-index-JnwciDu0.js +0 -1
- package/assets/senders-BollE7le.js +0 -1
- package/assets/settings-aPDqsj-M.js +0 -1
- package/assets/settings-screen-DxN6mICP.js +0 -1
- package/assets/suggestion._suggestionId-m9OzQCaR.js +0 -1
- package/assets/useCalendarData-BQ_jLMR7.js +0 -1
- package/assets/useCalendarEvents-lDPF_B6_.js +0 -1
- package/assets/useCalendarFreeBusy-BFq23gzr.js +0 -1
- package/assets/useCalendarWrites-CIJUCBzo.js +0 -1
- package/assets/useCalendars-BgSJfw8G.js +0 -1
- package/assets/useLayoutTier-CUyuK30O.js +0 -1
- package/assets/useMessageBodyContent-Gq_pdN4f.js +0 -1
- package/assets/useQueries-gpmd3w5y.js +0 -1
- package/assets/useRefreshControl-DdZILsE1.js +0 -1
- package/assets/useResultFolderIndex-EOtkNq1e.js +0 -1
- package/assets/warnings-BYDfjgnx.js +0 -5
package/assets/index-DRT_I4p4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,P as a}from"./index-CXzCthHG.js";import{E as s}from"./EmptyState-DjcO1Fvj.js";function r(){return e.jsx("div",{className:"flex h-full items-center justify-center bg-surface",children:e.jsx(s,{message:"Pick an event to read it here.",icon:e.jsx(a,{className:"size-8"})})})}export{r as component};
|
package/assets/index-DSNc3rHB.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-CXzCthHG.js";import{O as t}from"./OutboxPane-Bf8T7dxW.js";import"./roving-focus-iNw1K_A-.js";import"./MessageBody-AvWIklnv.js";import"./kbd-DxdiA2Fl.js";import"./search-scope-UI1H6AzA.js";import"./reply-B9-kr45N.js";import"./useMediaQuery-DB2OdJvp.js";import"./useMessageBodyContent-Gq_pdN4f.js";import"./circle-check-big-ZwVj0mbk.js";import"./clock-B-eYdLBT.js";import"./row-actions-CsY_49bo.js";import"./rotate-ccw-cFCdZR4R.js";import"./search-query-Dq2--dgF.js";import"./outbox-status-BlKn6P0x.js";import"./NavMenuButton-DSpTQKmQ.js";import"./menu-ouYQ8aI9.js";function g(){return o.jsx(t.Reading,{})}export{g as component};
|
package/assets/index-T04Kj7bC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{eW as o,j as r}from"./index-CXzCthHG.js";import{O as m}from"./OpenCalendarEvent-DuKGo-jF.js";import"./SignInAgain-CCZnH9Mt.js";import"./useCalendars-BgSJfw8G.js";import"./CalendarComposePane-Bz_-lcWc.js";import"./useCalendarEvents-lDPF_B6_.js";import"./reply-B9-kr45N.js";import"./useMediaQuery-DB2OdJvp.js";import"./useQueries-gpmd3w5y.js";import"./calendar-clash-strip-C9X1djbQ.js";import"./useCalendarWrites-CIJUCBzo.js";import"./ErrorState-Bi4vrhhQ.js";import"./useCalendarData-BQ_jLMR7.js";import"./calendar-report-BRGottVJ.js";import"./calendar-subscription-B-aAc2Gy.js";import"./attendee-row-r-oUgLyi.js";import"./avatar-qD7fcqFf.js";import"./minus-COyPQ5q9.js";import"./clock-B-eYdLBT.js";import"./map-pin-DbNUeHlR.js";import"./mail-CHopLOA-.js";import"./pencil-D0Kwpd2W.js";function g(){const{calendarObjectId:t}=o.useParams();return r.jsx(m,{calendarObjectId:t})}export{g as component};
|
package/assets/index-TW2iI02X.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-CXzCthHG.js";import{B as o}from"./BriefPane-zWXuK_Pj.js";import"./MessageBody-AvWIklnv.js";import"./kbd-DxdiA2Fl.js";import"./search-scope-UI1H6AzA.js";import"./reply-B9-kr45N.js";import"./useMediaQuery-DB2OdJvp.js";import"./useMessageBodyContent-Gq_pdN4f.js";import"./MessageToolbar-CvC2dLSg.js";import"./roving-focus-iNw1K_A-.js";import"./search-token-index-JnwciDu0.js";import"./useQueries-gpmd3w5y.js";import"./EmptyState-DjcO1Fvj.js";import"./ErrorState-Bi4vrhhQ.js";import"./popover-menu-CTiORP1p.js";import"./mail-CHopLOA-.js";import"./avatar-qD7fcqFf.js";import"./index-Cb2UJhnj.js";import"./useSignature-37xUEwqG.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue--u19KX6h.js";import"./sections-By63r1y_.js";import"./undo-2-BV0sKXdu.js";import"./download-C6M2pRs1.js";import"./useCalendarFreeBusy-BFq23gzr.js";import"./useCalendarEvents-lDPF_B6_.js";import"./useCalendars-BgSJfw8G.js";import"./map-pin-DbNUeHlR.js";import"./useLayoutTier-CUyuK30O.js";import"./calendar-suggestion-qEC_UasM.js";import"./attendee-row-r-oUgLyi.js";import"./minus-COyPQ5q9.js";import"./clock-B-eYdLBT.js";import"./calendar-clash-strip-C9X1djbQ.js";import"./bell-off-DNCJLc9z.js";import"./shield-check-C6K5BNfE.js";import"./calendar-report-BRGottVJ.js";import"./menu-ouYQ8aI9.js";import"./useFilters-Cmf0Cndn.js";import"./checkbox-CiQllE1Y.js";import"./confirm-dialog-AppxcVfC.js";import"./useRefreshControl-DdZILsE1.js";import"./circle-check-big-ZwVj0mbk.js";import"./refresh-cw-aweb7slK.js";import"./LabelApplyTrigger-BnPNejnI.js";import"./useLabels-CN56tbCw.js";import"./wizard-selection-zWa1qc6-.js";function X(){return r.jsx(o.Reading,{})}export{X as component};
|
package/assets/index-u72ANhps.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-CXzCthHG.js";import{M as i}from"./MailboxPane-Bzn-4kym.js";import"./MessageBody-AvWIklnv.js";import"./kbd-DxdiA2Fl.js";import"./search-scope-UI1H6AzA.js";import"./reply-B9-kr45N.js";import"./useMediaQuery-DB2OdJvp.js";import"./useMessageBodyContent-Gq_pdN4f.js";import"./useRefreshControl-DdZILsE1.js";import"./circle-check-big-ZwVj0mbk.js";import"./refresh-cw-aweb7slK.js";import"./useQueries-gpmd3w5y.js";import"./MessageToolbar-CvC2dLSg.js";import"./roving-focus-iNw1K_A-.js";import"./search-token-index-JnwciDu0.js";import"./EmptyState-DjcO1Fvj.js";import"./ErrorState-Bi4vrhhQ.js";import"./popover-menu-CTiORP1p.js";import"./mail-CHopLOA-.js";import"./avatar-qD7fcqFf.js";import"./index-Cb2UJhnj.js";import"./useSignature-37xUEwqG.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue--u19KX6h.js";import"./sections-By63r1y_.js";import"./undo-2-BV0sKXdu.js";import"./download-C6M2pRs1.js";import"./useCalendarFreeBusy-BFq23gzr.js";import"./useCalendarEvents-lDPF_B6_.js";import"./useCalendars-BgSJfw8G.js";import"./map-pin-DbNUeHlR.js";import"./useLayoutTier-CUyuK30O.js";import"./calendar-suggestion-qEC_UasM.js";import"./attendee-row-r-oUgLyi.js";import"./minus-COyPQ5q9.js";import"./clock-B-eYdLBT.js";import"./calendar-clash-strip-C9X1djbQ.js";import"./bell-off-DNCJLc9z.js";import"./shield-check-C6K5BNfE.js";import"./calendar-report-BRGottVJ.js";import"./menu-ouYQ8aI9.js";import"./useFilters-Cmf0Cndn.js";import"./checkbox-CiQllE1Y.js";import"./confirm-dialog-AppxcVfC.js";import"./MailViewChrome-CJkUbWPO.js";import"./LabelApplyTrigger-BnPNejnI.js";import"./useLabels-CN56tbCw.js";import"./search-query-Dq2--dgF.js";import"./NavMenuButton-DSpTQKmQ.js";import"./bottom-sheet-B_7iO-ln.js";import"./circle-help-BtMu5xYr.js";import"./circle-check-CQPt1U9q.js";function oo(){return o.jsx(i.Reading,{})}export{oo as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as f,j as e,as as h,be as y,ar as b,bF as g,d as v,W as N,u as C,a as L,c as I,aI as D,aK as S,B as w}from"./index-CXzCthHG.js";import{C as E}from"./confirm-dialog-AppxcVfC.js";import{E as j}from"./ErrorState-Bi4vrhhQ.js";import{S as $}from"./settings-screen-DxN6mICP.js";import{a as T,b as k,c as R,u as O}from"./useLabels-CN56tbCw.js";import"./avatar-qD7fcqFf.js";import"./chevron-left-Bt4eJ35K.js";import"./menu-ouYQ8aI9.js";import"./circle-help-BtMu5xYr.js";function B({labels:l,onRename:i,onRecolor:n,onDelete:m,deletingLabelId:c}){const[u,r]=f.useState(),[o,d]=f.useState("");if(l.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 t=a=>{const s=o.trim();s!==""&&i(a,s),r(void 0)};return e.jsx("ul",{className:"divide-y divide-line rounded-md border border-line",children:l.map(a=>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:[u===a.labelId?e.jsx(h,{autoFocus:!0,value:o,onChange:s=>d(s.target.value),onBlur:()=>t(a.labelId),onKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),t(a.labelId)),s.key==="Escape"&&(s.preventDefault(),r(void 0))},"aria-label":`Rename label ${a.name}`}):e.jsx("button",{type:"button",onClick:()=>{r(a.labelId),d(a.name)},"aria-label":`Rename label ${a.name}`,className:"flex items-center gap-2 rounded-sm text-left hover:opacity-80",children:e.jsx(y,{label:a})}),e.jsx("p",{className:"mt-0.5 text-xs text-fg-subtle",children:a.filterCount===0?"Not used in any filter":`Used in ${a.filterCount} ${a.filterCount===1?"filter":"filters"}`})]}),e.jsx(b,{"aria-label":`Color for ${a.name}`,value:a.color,onChange:s=>n(a.labelId,s.target.value),className:"w-28 shrink-0",children:g.map(s=>e.jsx("option",{value:s,children:s},s))}),e.jsx(v,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-4 text-danger"}),onClick:()=>m(a),disabled:c===a.labelId,"aria-label":`Delete label ${a.name}`})]},a.labelId))})}const P=(l,i)=>{if(i===0)return{title:`Delete the "${l}" label?`};const n=i===1?"filter":"filters";return{title:`Delete the "${l}" label?`,description:`This also deletes ${i} ${n} that ${i===1?"applies":"apply"} it — they can't be recovered.`}},_=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 H({accountId:l}){const{createLabel:i,isPending:n,isError:m}=O(l),[c,u]=f.useState(""),[r,o]=f.useState("Default"),d=()=>{const t=c.trim();t!==""&&i(t,r).then(()=>{u(""),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:t=>u(t.target.value),placeholder:"e.g. Receipts","aria-label":"Label name",onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),d())}})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Color"}),e.jsx(b,{value:r,onChange:t=>o(t.target.value),"aria-label":"Label color",className:"w-28",children:g.map(t=>e.jsx("option",{value:t,children:t},t))})]}),e.jsx(v,{variant:"primary",onClick:d,disabled:n||c.trim()==="",children:n?"Creating…":"Create label"})]}),m&&e.jsx(w,{tone:"danger",variant:"soft",children:"Couldn't create that label. Please try again."})]})}function A({account:l}){const i=l.accountId,{labels:n,isPending:m,isError:c,error:u,refetch:r}=T(i),{updateLabel:o}=k(i),{deleteLabel:d,deletingLabelId:t}=R(i),[a,s]=f.useState();return e.jsxs("section",{className:"space-y-2",children:[e.jsx("h2",{className:"text-sm font-semibold text-fg",children:l.email}),m?e.jsx("div",{className:"h-16 animate-pulse rounded-md border border-line bg-surface","aria-busy":"true","aria-label":`Loading labels for ${l.email}`}):c?e.jsx(j,{variant:"inline",title:`Couldn't load labels for ${l.email}`,error:u,onRetry:()=>{r()}}):e.jsx(B,{labels:n,onRename:(p,x)=>o(p,{name:x}),onRecolor:(p,x)=>o(p,{color:x}),onDelete:s,deletingLabelId:t}),e.jsx(H,{accountId:i}),a&&(()=>{const p=P(a.name,a.filterCount);return e.jsx(E,{isOpen:!0,title:p.title,description:p.description,confirmLabel:"Delete label",destructive:!0,isBusy:t===a.labelId,onConfirm:()=>{d(a.labelId),s(void 0)},onCancel:()=>s(void 0)})})()]})}function q(){const l=C(),[i,n]=f.useState(!0),{data:m,isPending:c,isError:u,error:r,refetch:o}=L(I()),d=t=>{const a=S[t];a&&l({to:a})};return e.jsx($,{items:D,activeId:"labels",title:"Labels",description:"Mark mail without moving it, per account.",help:_,helpOpen:i,onToggleHelp:()=>n(t=>!t),onSelect:d,onBackToMail:()=>{l({to:"/mail"})},children:c?e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading accounts"}):u?e.jsx(j,{title:"Couldn't load accounts",error:r,onRetry:()=>{o()}}):m.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:m.accounts.map(t=>e.jsx(A,{account:t},t.accountId))})})}export{q as component};
|
package/assets/mail-BLRLmM-I.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as ee,r as d,j as t,o as D,p as te,q as se,D as ne,X as oe,t as ae,d as N,A as re,v as ie,w as ce,f as K,x as le,y as ue,z as de,C as me,E as pe,F as he,G as fe,H as xe,J as ge,K as be,M as ve,u as ye,a as Se,c as je,N as Ce,O as Ne}from"./index-CXzCthHG.js";import{E as Ie}from"./ErrorState-Bi4vrhhQ.js";import{K as we,S as Me,u as Pe,s as Re,b as Ee,a as Oe,c as ke,d as Te}from"./search-token-index-JnwciDu0.js";import{K as O}from"./kbd-DxdiA2Fl.js";import{b as M,m as k,c as Le,d as Ae,u as Fe,a as De,i as Ke,e as Qe}from"./reply-B9-kr45N.js";import{P as _e}from"./pencil-D0Kwpd2W.js";import{u as R,a as ze}from"./useMessageBodyContent-Gq_pdN4f.js";import{c as Be,s as He,M as qe}from"./MailShell-Dc5V-rLi.js";import{u as Ve,a as $e,R as Ge,s as We,i as Ue,H as Ye,M as Je}from"./useRefreshControl-DdZILsE1.js";import{M as Xe}from"./menu-ouYQ8aI9.js";import{B as Ze}from"./bug-D6xXLRSh.js";import{L as et,S as tt,A as st,M as nt}from"./MailNav-C8EZGG4u.js";import{A as ot}from"./avatar-qD7fcqFf.js";import{u as at,P as rt,a as it,b as ct}from"./popover-menu-CTiORP1p.js";import{u as lt}from"./sections-By63r1y_.js";import{u as ut}from"./index-Cb2UJhnj.js";import{u as Q,i as dt}from"./useLayoutTier-CUyuK30O.js";import{u as mt}from"./useQueries-gpmd3w5y.js";import{u as pt}from"./useResultFolderIndex-EOtkNq1e.js";import{u as ht}from"./useDebouncedValue--u19KX6h.js";import"./search-scope-UI1H6AzA.js";import"./useMediaQuery-DB2OdJvp.js";import"./FullCompose-D6Xef8Ur.js";import"./confirm-dialog-AppxcVfC.js";import"./circle-check-big-ZwVj0mbk.js";import"./refresh-cw-aweb7slK.js";import"./roving-focus-iNw1K_A-.js";import"./bell-off-DNCJLc9z.js";import"./folder-failure-CqkVSsrb.js";import"./outbox-status-BlKn6P0x.js";import"./useSignature-37xUEwqG.js";import"./account-form-helpers-DhckT_PN.js";const ft=ee("SquarePen",[["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"}]]);function xt({email:e,onSignOut:s}){const n=d.useRef(null),{open:a,setOpen:o,containerRef:r,panelRef:i,getAnchor:u}=at("account-menu",()=>n.current?.focus());d.useEffect(()=>{if(!a)return;const c=requestAnimationFrame(()=>i.current?.querySelector('[role="menuitem"]')?.focus());return()=>cancelAnimationFrame(c)},[a,i]);const m=e??"Account";return t.jsxs("div",{ref:r,className:"relative",children:[t.jsx("button",{ref:n,type:"button","aria-label":"Account","aria-haspopup":"menu","aria-expanded":a,onClick:()=>o(c=>!c),className:"inline-flex min-h-11 min-w-11 items-center justify-center rounded-md p-1.5 text-fg-muted transition-colors hover:bg-surface-raised hover:text-fg",children:t.jsx(ot,{name:m,email:e??void 0,size:"sm"})}),t.jsx(rt,{open:a,align:"end",panelRef:i,getAnchor:u,children:t.jsxs(it,{ref:i,label:m,children:[e&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"truncate px-4 py-2 text-xs text-fg-muted",title:e,"data-testid":"account-menu-email",children:e}),t.jsx("hr",{className:"my-1 h-px border-0 bg-line"})]}),t.jsx(ct,{label:"Sign out",icon:t.jsx(et,{className:"size-4"}),onSelect:()=>{o(!1),n.current?.focus(),s()}})]})})]})}function gt({leading:e,search:s,actions:n,className:a}){return t.jsxs("header",{className:D("flex min-h-pane-header w-full shrink-0 items-center gap-2 border-b border-line bg-canvas px-row-inset py-1",a),children:[e&&t.jsx("div",{className:"flex shrink-0 items-center gap-1",children:e}),t.jsx("div",{className:"flex min-w-0 flex-1 justify-start",children:t.jsx("div",{className:"w-full max-w-xs transition-[max-width] duration-150 ease-out focus-within:max-w-lg",children:s})}),n&&t.jsx("div",{className:"flex shrink-0 items-center gap-1",children:n})]})}function bt({onCompose:e}){return t.jsx("button",{type:"button",onClick:e,"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(env(safe-area-inset-bottom, 0) + 1rem)"},children:t.jsx(_e,{className:"size-6"})})}const vt=({isOpen:e,onClose:s})=>{const n=d.useRef(null);return te({id:"shortcuts",open:e,answers:{back:s}}),se(n,e),e?t.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[t.jsx(ne,{label:"Dismiss keyboard shortcuts",onDismiss:s,className:"backdrop-blur-sm"}),t.jsxs("div",{ref:n,role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",tabIndex:-1,className:D("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:[t.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[t.jsx("h2",{className:"text-lg font-semibold",children:"Keyboard shortcuts"}),t.jsx("button",{type:"button",onClick:s,className:"p-1 text-fg-muted transition-colors hover:text-fg","aria-label":"Close",children:t.jsx(oe,{className:"size-5"})})]}),t.jsx("div",{className:"grid gap-x-8 gap-y-6 sm:grid-cols-2",children:we.map(a=>t.jsxs("div",{children:[t.jsx("h3",{className:"mb-3 text-sm font-medium text-fg-muted",children:a.title}),t.jsx("div",{className:"space-y-2",children:a.hints.map(o=>t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsx("span",{className:"text-sm",children:o.description}),t.jsx("span",{className:"flex shrink-0 items-center gap-1",children:o.keys.map((r,i)=>t.jsxs(d.Fragment,{children:[i>0&&o.keys[0]==="g"&&t.jsx("span",{className:"text-2xs text-fg-subtle",children:"then"}),t.jsx(O,{children:r})]},r))})]},`${o.action}-${o.keys.join("+")}`))})]},a.title))}),t.jsx("div",{className:"mt-6 border-t border-line pt-4",children:t.jsxs("p",{className:"text-center text-xs text-fg-muted",children:["Press ",t.jsx(O,{children:"Esc"})," to close"]})})]})]}):null};function yt(){const e=ae();if(!e)return null;const s=e.showNavPane?!e.navCollapsed:!1;return t.jsx(N,{variant:"ghost",size:"sm",icon:t.jsx(Xe,{className:"size-4"}),onClick:e.toggleNav,"aria-label":s?"Hide folders":"Show folders","aria-expanded":s,title:"Folders",className:"shrink-0"})}const St={global:"Search all mail",pending:"Search mail",scoped:"Search this folder"};function jt({search:e,onCompose:s,onReportBug:n,onOpenSettings:a,settingsAttention:o,composeShortcut:r,refreshControl:i,account:u}){return t.jsx(gt,{leading:t.jsx(yt,{}),search:t.jsx(Me,{value:e.value,onChange:e.onChange,onClear:e.onClear,onClearQuery:e.onClearQuery,chips:e.chips,onRemoveChip:e.onRemoveChip,placeholder:St[e.scope]}),actions:t.jsxs(t.Fragment,{children:[t.jsx(N,{variant:"ghost",size:"sm",icon:t.jsx(ft,{className:"size-4"}),title:r?`Compose (${r})`:"Compose","aria-label":"Compose",onClick:s}),t.jsx(N,{variant:"ghost",size:"sm",icon:t.jsx(Ze,{className:"size-4"}),title:"Report a bug","aria-label":"Report a bug",onClick:n}),t.jsx(N,{variant:"ghost",size:"sm",icon:t.jsx(re,{label:o,children:t.jsx(tt,{className:"size-4"})}),title:"Settings","aria-label":o?`Settings — ${o}`:"Settings",onClick:a}),i,u]})})}function Ct(){const e=ie(),s=M({select:c=>k(c.location.pathname)}),n=M({select:c=>Le(c.location.search)}),[a,o]=d.useState(n),r=ht(a,200),[i,u]=d.useState(s);if(i!==s){const c=He(i,s,n);u(s),c!==void 0&&o(c)}const m=d.useCallback(c=>{u(k(e.state.location.pathname)),o(c)},[e]);return{searchInput:a,committedQuery:Be(a,r),viewKey:s,setSearchInput:m}}const Nt=()=>{const e=R();return Ae()?null:t.jsx(bt,{onCompose:e})},It=()=>t.jsx(st,{children:({email:e,signOut:s})=>t.jsx(xt,{email:e,onSignOut:s})});function wt({accounts:e}){const{searchInput:s,onSearchChange:n,onSearchClear:a,onSearchClearQuery:o,resultFolderIndex:r}=ce(),i=K(),u=lt(),m=R(),{scope:c,clearScope:x}=Pe(e),f=le(),p=c.kind==="scoped"?[{id:c.chip.id,label:c.chip.label,tone:"scope"}]:void 0,l=d.useMemo(()=>e.map(S=>S.accountId),[e]),{hasNewMail:h}=Ve(),{state:y,errorMessage:g,refresh:b}=$e(l,{onSettled:()=>de(i,me(r.keys()))});return t.jsx(jt,{search:{value:s,scope:c.kind,chips:p,onChange:n,onClear:a,onClearQuery:o,onRemoveChip:x},onCompose:m,onReportBug:ue,onOpenSettings:()=>u("accounts"),settingsAttention:f,composeShortcut:Re("compose"),refreshControl:t.jsx(Ge,{state:y,onRefresh:b,label:"Refresh all accounts",errorMessage:g,hasUpdate:h(l)}),account:t.jsx(It,{})})}function Mt(e){const s=mt({queries:e.map(n=>({...pe({path:{accountId:n.accountId}}),staleTime:1/0}))});return d.useMemo(()=>Ee(s.map(n=>n.data?.items??[])),[s])}const _="remit:intelligence-open";function Pt(){try{return localStorage.getItem(_)!=="closed"}catch{return!0}}function Rt(e){try{localStorage.setItem(_,e?"open":"closed")}catch{}}function T({panels:e,prefersOpen:s,isDesktop:n,hasThread:a,raisedFor:o,openMessage:r}){return o!==null&&o===r?!0:e.length>0?e.includes("intelligence"):n&&a&&s}const Et=()=>{const e=Q(),s=Fe(),n=De(),a=s.find(Ke),o=Oe(),[r,i]=d.useState(Pt),u=o?`${o.threadId}/${o.messageId??""}`:null,[m,c]=d.useState(null),x={panels:s,prefersOpen:r,isDesktop:e==="desktop",hasThread:o!==void 0,openMessage:u},f=T({...x,raisedFor:m}),p=T({...x,raisedFor:null}),l=d.useCallback((b,S)=>{n([...b?["intelligence"]:[],...S?[S]:[]])},[n]),h=d.useCallback(b=>{l(p,b)},[p,l]),y=d.useCallback(()=>{if(f&&!p){c(null);return}const b=!f;Rt(b),i(b),c(null),l(b,a)},[p,f,a,l]),g=d.useCallback(()=>{c(u)},[u]);return{openOverlay:a,intelligenceOpen:f,showOverlay:h,toggleIntelligence:y,raiseIntelligence:g}};var j={exports:{}},L;function Ot(){if(L)return j.exports;L=1;const e=(s,n,a)=>new Promise((o,r)=>{if(a=Object.assign({concurrency:1/0},a),typeof n!="function")throw new TypeError("Mapper function is required");const{concurrency:i}=a;if(!(typeof i=="number"&&i>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${i}\` (${typeof i})`);const u=[],m=s[Symbol.iterator]();let c=!1,x=!1,f=0,p=0;const l=()=>{if(c)return;const h=m.next(),y=p;if(p++,h.done){x=!0,f===0&&o(u);return}f++,Promise.resolve(h.value).then(g=>n(g,y)).then(g=>{u[y]=g,f--,l()},g=>{c=!0,r(g)})};for(let h=0;h<i&&(l(),!x);h++);});return j.exports=e,j.exports.default=e,j.exports}var kt=Ot();const Tt=he(kt),Lt=900*1e3,At=30,Ft=(e,s)=>{if(!e)return s;const n=Number.parseInt(e,10);return Number.isFinite(n)&&n>0?n:s},Dt=30*1e3,Kt=e=>Math.max(Ft(e,At)*1e3,Dt),z=Kt(ve().mailboxPollIntervalSeconds),C=(e=Date.now(),s=z)=>Ue(e)?Math.min(Ye,s):s,Qt=5,P=new Set,_t=(e,s,n=Lt)=>e.filter(a=>{const o=a.lastSyncAt;return o==null?!0:s-o>n}).map(a=>a.accountId),zt=(e,s,n=z)=>e-s>=n,Bt=(e,s)=>e.filter(n=>!s.has(n)),A=(e,s)=>{if(P.delete(e),ge(s,{softError:!0},"nobody")){be(s);return}console.warn("[remit] background mailbox sync failed",{accountId:e,error:s})},F=(e,s)=>fe({path:{accountId:e},throwOnError:!0}).then(()=>{s.invalidateQueries({queryKey:xe({path:{accountId:e}})})}),Ht=e=>{const s=K(),n=d.useRef(e);n.current=e;const a=e.map(o=>o.accountId).join(",");d.useEffect(()=>{const o=Date.now(),i=_t(n.current,o).filter(u=>!P.has(u));if(i.length!==0)for(const u of i)P.add(u),F(u,s).catch(m=>{A(u,m)})},[a,s]),d.useEffect(()=>{let o=Date.now(),r;const i=new Set,u=()=>{o=Date.now();const p=Bt(n.current.map(l=>l.accountId),i);for(const l of p)i.add(l);Tt(p,l=>F(l,s).catch(h=>{A(l,h)}).finally(()=>{i.delete(l)}),{concurrency:Qt})},m=()=>{if(document.visibilityState==="visible"){u(),r=setTimeout(m,C());return}},c=()=>{if(document.visibilityState!=="visible")return;r!==void 0&&clearTimeout(r);const p=Date.now(),l=C(p);if(zt(p,o,l)){u(),r=setTimeout(m,l);return}r=setTimeout(m,o+l-p)},x=()=>{document.visibilityState==="visible"&&(r!==void 0&&clearTimeout(r),o=Date.now(),r=setTimeout(m,C()))};r=setTimeout(m,C()),document.addEventListener("visibilitychange",c);const f=We(x);return()=>{r!==void 0&&clearTimeout(r),document.removeEventListener("visibilitychange",c),f()}},[a,s])};function js(){const e=ye(),s=Q(),n=dt(s),{openOverlay:a,intelligenceOpen:o,showOverlay:r,toggleIntelligence:i,raiseIntelligence:u}=Et(),m=a==="shortcuts",c=a==="nav",{searchInput:x,committedQuery:f,viewKey:p,setSearchInput:l}=Ct(),{data:h,isLoading:y,isError:g,error:b,refetch:S}=Se({...je(),staleTime:1/0}),I=!!(h&&(h.accounts?.length??0)===0);d.useEffect(()=>{I&&e({to:"/onboarding",replace:!0})},[I,e]),ut({enabled:!m,bindings:[{key:"?",action:"help",handler:()=>r("shortcuts"),noModifiers:!1,preventDefault:!0}]});const E=R(),B=ze(),H=M({select:w=>Qe(w.matches)?.list==="mailbox"}),q=d.useMemo(()=>({compose:E}),[E]);ke({enabled:!H&&!B,handlers:q});const V=d.useCallback(()=>{l("")},[l]),$=d.useCallback(()=>{l("")},[l]),v=h?.accounts??[],G=d.useMemo(()=>v.map(w=>w.accountId),[v]),W=Mt(v),U=pt(v).index,Y=d.useMemo(()=>Te(v),[v]);Ht(v);const J=d.useCallback(()=>{a==="nav"&&r(void 0)},[a,r]),X={accounts:v,mailboxNameIndex:W,accountNameIndex:Y,resultFolderIndex:U,searchQuery:f,searchInput:x,searchViewKey:p,onSearchChange:l,onSearchClear:V,onSearchClearQuery:$,intelligenceOpen:o,onToggleIntelligence:i,onRaiseIntelligence:u},Z={isSinglePane:n,isLoading:y||I,intelligenceOpen:o,nav:t.jsx(nt,{accounts:v,onMailboxSelect:J}),topBar:n?void 0:t.jsx(wt,{accounts:v}),overlay:n?t.jsx(Nt,{}):void 0,navOpen:c,onOpenNav:()=>r("nav"),onCloseNav:()=>r(void 0)};return t.jsx(Ce.Provider,{value:X,children:t.jsxs(Je,{accountIds:G,children:[g?t.jsx("div",{className:"flex h-full items-center justify-center bg-canvas p-4",children:t.jsx(Ie,{title:"Couldn't load your account",error:b,onRetry:()=>{S()}})}):t.jsx(qe,{chrome:Z,children:t.jsx(Ne,{})}),t.jsx(vt,{isOpen:m,onClose:()=>r(void 0)})]})})}export{js as component,ce as useMailContext};
|
package/assets/mail-CHopLOA-.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as e}from"./index-CXzCthHG.js";const a=e("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);export{a as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as c}from"./index-CXzCthHG.js";const e=c("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);const r=c("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);export{e as G,r as M};
|
package/assets/minus-COyPQ5q9.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as s}from"./index-CXzCthHG.js";const e=s("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);export{e as M};
|
package/assets/new-DRfIDZVL.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,j as c}from"./index-CXzCthHG.js";import{e as y,u as g,C as E,c as b}from"./CalendarComposePane-Bz_-lcWc.js";import{u as x,f as I,U as T,d as k}from"./useCalendars-BgSJfw8G.js";import{a as w}from"./useCalendarWrites-CIJUCBzo.js";import"./reply-B9-kr45N.js";import{u as N,n as S}from"./useCalendarEvents-lDPF_B6_.js";import{u as j}from"./CalendarComposeSeed-DrUkfGTc.js";import"./calendar-clash-strip-C9X1djbQ.js";import"./ErrorState-Bi4vrhhQ.js";import"./useMediaQuery-DB2OdJvp.js";import"./useQueries-gpmd3w5y.js";function A({onClose:n}){const{date:m}=N(),a=j(),{calendars:u,timeZoneByCalendarId:f}=x(),d=u.filter(e=>!e.readOnly),{createEvent:p,isWriting:C}=w(),[D,r]=i.useState(""),[t,l]=i.useState(()=>{const e=y(a?.date??m,"");return a?{...e,allDay:a.allDay,startTime:a.allDay?"":a.startTime,endDate:a.endDate,endTime:a.allDay?"":a.endTime}:e}),h=g(t),s=d[0]?.id??"";i.useEffect(()=>{s!==""&&l(e=>e.calendarId===""?{...e,calendarId:s}:e)},[s]);const v=()=>{const e=b(t,{clock:k(),anchor:I(f[t.calendarId]??T)});if(!e.ok){r(e.problem);return}p(e.input).then(o=>{if(o.kind==="written"){r(""),n();return}r(o.kind==="conflict"?"This calendar changed while you were writing. Close the form and try again.":o.message)})};return c.jsx(E,{title:"New event",subtitle:t.date,calendars:d,draft:t,onChange:l,problem:D,saveLabel:"Add",isSaving:C,clashes:h,onSave:v,onCancel:n})}function z(){const{closeEvent:n}=S();return c.jsx(A,{onClose:n})}export{z as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n,f as i,u as a,r as m,j as s}from"./index-CXzCthHG.js";import{O as p}from"./OnboardingWizard-DzR2uArY.js";import{c}from"./onboarding-completion-h9meGJrm.js";import"./checkbox-CiQllE1Y.js";import"./minus-COyPQ5q9.js";import"./kbd-DxdiA2Fl.js";import"./credential-steps-DCjuFFo-.js";import"./card-C9cgHaft.js";import"./account-form-helpers-DhckT_PN.js";import"./mail-CHopLOA-.js";import"./file-json-BgVPDajK.js";function E(){const o=n(),t=i(),e=a(),r=m.useCallback(l=>{c({queryClient:t,recordCompleted:()=>o.recordEvent("onboarding.completed"),navigateToInbox:()=>{window.location.assign("/mail")}})},[o,t]);return s.jsx(p,{skipWelcome:!1,onComplete:r,onImportConfig:()=>{e({to:"/import"})}})}export{E as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o,O as i}from"./index-CXzCthHG.js";import{a as m}from"./MailShell-Dc5V-rLi.js";import{u as p,O as t}from"./OutboxPane-Bf8T7dxW.js";import"./reply-B9-kr45N.js";import{u as s}from"./search-mirror-Bg0i4bJE.js";import"./useMessageBodyContent-Gq_pdN4f.js";import"./FullCompose-D6Xef8Ur.js";import"./ErrorState-Bi4vrhhQ.js";import"./index-Cb2UJhnj.js";import"./useSignature-37xUEwqG.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue--u19KX6h.js";import"./sections-By63r1y_.js";import"./useMediaQuery-DB2OdJvp.js";import"./confirm-dialog-AppxcVfC.js";import"./roving-focus-iNw1K_A-.js";import"./MessageBody-AvWIklnv.js";import"./kbd-DxdiA2Fl.js";import"./search-scope-UI1H6AzA.js";import"./circle-check-big-ZwVj0mbk.js";import"./clock-B-eYdLBT.js";import"./row-actions-CsY_49bo.js";import"./rotate-ccw-cFCdZR4R.js";import"./search-query-Dq2--dgF.js";import"./outbox-status-BlKn6P0x.js";import"./NavMenuButton-DSpTQKmQ.js";import"./menu-ouYQ8aI9.js";function z(){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{z as component};
|
package/assets/reply-B9-kr45N.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{v as R,bW as L,bX as O,r,u,bY as M,a1 as l,j as A,bZ as B,b_ as C,b$ as m,c0 as $}from"./index-CXzCthHG.js";import{u as j}from"./useMediaQuery-DB2OdJvp.js";function F(e){const s=R({warn:e?.router===void 0}),t=e?.router||s;return L(t.stores.__store,O(e,t))}function P(e){const s=R();return L(s.stores.location,O(e,s))}const _="/mail/brief",k="/mail/$mailboxId",w="/mail/outbox",T="/mail/flagged";function N(e){for(const s of e){if(s.routeId===_)return{list:"brief"};if(s.routeId===T)return{list:"flagged"};if(s.routeId===w)return{list:"outbox"};if(s.routeId===k)return{list:"mailbox",mailboxId:s.params?.mailboxId}}}function ee(e){const s=e.split(/[?#]/)[0].split("/").filter(Boolean);if(s[0]!=="mail")return"";const t=s[1];return t?t==="brief"?_:t==="flagged"?T:t==="outbox"?w:U(t):""}function se(e){if(typeof e!="object"||e===null)return"";const{q:s}=e;return typeof s=="string"?s:""}function U(e){return`${k}:${e}`}function te(e,s){return e===s?!0:e.startsWith(`${s}/`)}function G(e){const s=e.split(/[?#]/)[0].split("/").filter(Boolean);return s[0]==="mail"&&s.length>2}const I=["intelligence","nav","shortcuts"],X=["nav","shortcuts"],S=e=>X.includes(e);function ae(e,s){return[...e.filter(t=>!S(t)),...s?[s]:[]]}const Y=M(I);function h(e){const s=new Set(e.split(",").map(t=>Y.safeParse(t)).filter(t=>t.success).map(t=>t.data));return I.filter(t=>s.has(t))}function p(e){return I.filter(s=>e.includes(s)).join(",")}function ne(){const e=P({select:s=>p(h(s.hash))});return r.useMemo(()=>h(e),[e])}const V=(e,s)=>!S(e)&&s;function W(e){return(s="")=>p(h(s).filter(t=>V(t,e)))}function c(){const e=j();return r.useMemo(()=>W(e),[e])}function oe(){const e=u();return r.useCallback(s=>{e({search:!0,hash:p(s),replace:!0,hashScrollIntoView:!1})},[e])}function d(){const e=F({select:a=>N(a.matches)?.list}),t=l({from:"/mail/$mailboxId",shouldThrow:!1})?.mailboxId;return r.useMemo(()=>({list:e,mailboxId:t}),[e,t])}function re(){const{pathname:e}=P();return G(e)}function ie(){const e=u(),s=c(),{list:t,mailboxId:a}=d();return r.useCallback(()=>{const n=i=>i,o=s;if(t==="flagged"){e({to:"/mail/flagged",search:n,hash:o});return}if(t==="outbox"){e({to:"/mail/outbox",search:n,hash:o});return}if(t==="mailbox"&&a){e({to:"/mail/$mailboxId",params:{mailboxId:a},search:n,hash:o});return}e({to:"/mail/brief",search:n,hash:o})},[e,s,t,a])}const q=B(C);function ue({fragment:e,...s}){const t=c();return A.jsx(q,{...s,hash:e??t})}const K=["reply","reply-all","forward"],Q=M(K),b="/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}",g="/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}",x="/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}";function E(){const e=l({from:b,shouldThrow:!1}),s=l({from:g,shouldThrow:!1}),t=l({from:x,shouldThrow:!1});return e??s??t}function Z(){const e=m({from:b,shouldThrow:!1}),s=m({from:g,shouldThrow:!1}),t=m({from:x,shouldThrow:!1});return(e??s??t)?.body}const y=e=>s=>e===void 0?$(s):{...$(s),body:e.body};function v(){const e=E(),s=Z();return r.useMemo(()=>{if(!e)return;const t=Q.safeParse(e.mode);return t.success?{kind:"reply",mode:t.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 le(){return v()?.kind==="reply"}function D(e,s,t,a){return e==="flagged"?{to:g,params:{...t,outboxMessageId:a}}:e==="mailbox"&&s?{to:x,params:{...t,mailboxId:s,outboxMessageId:a}}:{to:b,params:{...t,outboxMessageId:a}}}function z(e,s){if(e?.kind==="reply"&&e.threadId===s.threadId&&e.sourceMessageId===s.messageId)return e.outboxMessageId}function ce(){const e=u(),s=c(),{list:t,mailboxId:a}=d(),n=v();return r.useCallback((o,i)=>{e({...D(t,a,o,i===void 0?z(n,o):void 0),search:y(i),hash:s})},[e,s,t,a,n])}function de(e,s,t){if(!(!s||!t))return a=>e({threadId:s,messageId:t,mode:a})}function fe(){const e=u(),{list:s,mailboxId:t}=d(),a=v();return r.useCallback(n=>{a?.kind==="reply"&&e({...D(s,t,{threadId:a.threadId,messageId:a.sourceMessageId,mode:a.mode},n),search:y(void 0),hash:!0,replace:!0})},[e,s,t,a])}function me(){const e=u(),s=c(),{list:t,mailboxId:a}=d(),n=E();return r.useCallback(()=>{if(!n)return;const o=y(void 0),i=s,f={threadId:n.threadId,messageId:n.messageId};if(t==="flagged"){e({to:"/mail/flagged/$threadId/$messageId",params:f,search:o,hash:i});return}if(t==="mailbox"&&a){e({to:"/mail/$mailboxId/$threadId/$messageId",params:{...f,mailboxId:a},search:o,hash:i});return}e({to:"/mail/brief/$threadId/$messageId",params:f,search:o,hash:i})},[e,s,t,a,n])}export{ue as N,oe as a,F as b,se as c,re as d,N as e,P as f,le as g,c as h,S as i,d as j,ie as k,te as l,ee as m,ce as n,fe as o,ae as p,me as q,de as r,v as s,ne as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as g,w as v,r as x}from"./index-CXzCthHG.js";import{b as p,c as I,g as b}from"./reply-B9-kr45N.js";import{b as Q}from"./MailShell-Dc5V-rLi.js";import{a as q}from"./useMessageBodyContent-Gq_pdN4f.js";function A(a){const t=g(),{searchInput:n,searchQuery:e}=v(),i=p({select:o=>I(o.location.search)}),u=p({select:o=>o.location.pathname}),h=q(),f=b(),m=h||f,{to:s}=a,r="params"in a?a.params.mailboxId:void 0,l=r?`/mail/${r}`:s;x.useEffect(()=>{if(!Q({searchInput:n,committedQuery:e,urlQuery:i,pathname:u,listPath:l}))return;const y=!!e&&i!==e&&!m,c=d=>({...d,q:e||void 0});if(!y){t({to:".",search:c,hash:!0,replace:!0});return}if(s==="/mail/$mailboxId"){if(!r)return;t({to:s,params:{mailboxId:r},search:c,hash:!0,replace:!0});return}t({to:s,search:c,hash:!0,replace:!0})},[n,e,i,t,s,r,l,u,m])}export{A as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r,o}from"./index-CXzCthHG.js";function i({title:e,leading:s,children:a,className:n}){return r.jsxs("header",{className:o("flex h-pane-header shrink-0 items-center gap-2 border-b border-line px-row-inset",n),children:[s,e!==void 0&&r.jsx("h1",{className:"min-w-0 flex-1 truncate text-sm font-semibold text-fg",children:e}),a]})}const c=e=>e.trim().toLocaleLowerCase();export{i as P,c as n};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l,j as h,bJ as V,o as E,cf as _,X as Q,cg as L,ch as G,ci as z,cj as J,ck as X,a1 as x,u as K,a2 as Y,E as M,a4 as W,a5 as Z,w as ee,cl as N}from"./index-CXzCthHG.js";import{h as te,j as k,k as ne}from"./reply-B9-kr45N.js";import{s as oe,S as se}from"./search-scope-UI1H6AzA.js";import{u as R}from"./useQueries-gpmd3w5y.js";const re=[{action:"focusNext",keys:["j","k"],label:"navigate"},{action:"muteSender",keys:["m"],label:"mute"},{action:"help",keys:["?"],label:"all shortcuts"}];function ke(e){return re.filter(t=>e[t.action]!==void 0)}const ae=[{title:"Navigation",hints:[{action:"focusNext",keys:["j"],description:"Focus the message below"},{action:"focusPrevious",keys:["k"],description:"Focus the message above"},{action:"focusNext",keys:["↓"],description:"Focus the message below"},{action:"focusPrevious",keys:["↑"],description:"Focus the message above"},{action:"focusFirst",keys:["Home"],description:"Focus first"},{action:"focusLast",keys:["End"],description:"Focus last"},{action:"openFocused",keys:["Enter"],description:"Open focused thread"},{action:"back",keys:["Esc"],description:"Back / close overlay"}]},{title:"Selection",hints:[{action:"toggleSelect",keys:["x"],description:"Toggle select"},{action:"toggleSelect",keys:["Space"],description:"Toggle select"},{action:"extendSelectDown",keys:["Shift","j"],description:"Extend selection down"},{action:"extendSelectUp",keys:["Shift","k"],description:"Extend selection up"},{action:"extendSelectDown",keys:["Shift","↓"],description:"Extend selection down"},{action:"extendSelectUp",keys:["Shift","↑"],description:"Extend selection up"},{action:"selectAll",keys:["⌘","A"],description:"Select all"}]},{title:"Actions",hints:[{action:"reply",keys:["r"],description:"Reply"},{action:"replyAll",keys:["a"],description:"Reply all"},{action:"forward",keys:["f"],description:"Forward"},{action:"delete",keys:["#"],description:"Delete"},{action:"toggleStar",keys:["s"],description:"Star / unstar"},{action:"toggleRead",keys:["u"],description:"Toggle read / unread"}]},{title:"Sender",hints:[{action:"muteSender",keys:["m"],description:"Mute sender"},{action:"blockSender",keys:["b"],description:"Block sender"},{action:"vipSender",keys:["v"],description:"VIP sender"},{action:"markJunk",keys:["!"],description:"Mark junk"}]},{title:"Go to",hints:[{action:"goBrief",keys:["g","b"],description:"Daily brief"},{action:"goInbox",keys:["g","i"],description:"Inbox"},{action:"goSent",keys:["g","s"],description:"Sent"},{action:"goFlagged",keys:["g","f"],description:"Starred"},{action:"goSettings",keys:["g",","],description:"Settings"}]},{title:"View & global",hints:[{action:"toggleIntelligence",keys:["i"],description:"Toggle intelligence"},{action:"toggleDensity",keys:["d"],description:"Toggle density"},{action:"focusSearch",keys:["/"],description:"Focus search"},{action:"compose",keys:["c"],description:"Compose"},{action:"compose",keys:["⌘","N"],description:"Compose"},{action:"help",keys:["?"],description:"Shortcut help"}]}];function ie(e){for(const t of ae){const n=t.hints.find(o=>o.action===e);if(n)return n.keys}}function ce(e){const t=ie(e);return!t||t.length===0?"":t.length===1?t[0]??"":t[0]==="g"?t.join(" then "):t.join("")}function Ie(e){const t=ce(e);return t===""?"":`(${t})`}function le({key:e,shiftKey:t=!1,repeat:n=!1,caretAtStart:o,hasValue:i,chipCount:r}){const a=r-1;return e==="Escape"?i?{type:"clearQuery"}:{type:"blur"}:e==="Tab"&&t?r===0?{type:"none"}:{type:"focusChip",index:a}:e==="Backspace"||e==="ArrowLeft"?!o||r===0?{type:"none"}:n?{type:"none"}:{type:"focusChip",index:a}:{type:"none"}}function ue({key:e,repeat:t=!1,index:n,chipCount:o}){return e==="Backspace"||e==="Delete"?t?{type:"none"}:{type:"removeChip",index:n}:e==="ArrowLeft"?n===0?{type:"none"}:{type:"focusChip",index:n-1}:e==="ArrowRight"?n>=o-1?{type:"focusInput"}:{type:"focusChip",index:n+1}:e==="Enter"||e===" "?{type:"activateChip",index:n}:e==="Escape"?{type:"focusInput"}:{type:"none"}}function fe(e,t){const n=t-1;return n<=0?null:e<n?e:n-1}const de=e=>e instanceof HTMLElement?e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable:!1,pe=({chips:e=[],onRemoveChip:t,value:n,onChange:o,onClear:i,onClearQuery:r,placeholder:a="Search mail...",globalFocusKey:u=!0,showClearButton:p=!0,size:m="sm",inputId:f,suggest:d,className:b})=>{const D=l.useId(),F=f??D,I=l.useRef(null),P=l.useRef([]),A=r??i,[$,C]=l.useState(null),S=l.useRef(void 0),[q,O]=l.useState(""),v=e.length>0;l.useEffect(()=>{C(s=>s!==null&&s>=e.length?null:s)},[e.length]),l.useEffect(()=>{const s=S.current;if(s!==void 0){if(S.current=void 0,s===null){I.current?.focus();return}P.current[s]?.focus()}});const j=l.useRef(void 0);l.useEffect(()=>{const s=d?.caret;if(!s||s===j.current)return;j.current=s;const c=I.current;!c||c.ownerDocument.activeElement!==c||(c.setSelectionRange(s.cursor,s.cursor),d?.onCaretChange(s.cursor))});const w=s=>{d?.onCaretChange(s.selectionStart??s.value.length)},g=l.useCallback(s=>{C(s),S.current=s},[]),T=l.useCallback(s=>{const c=e[s];c&&t&&(g(fe(s,e.length)),O(`${c.label} removed`),t(c.id))},[e,t,g]),B=l.useCallback(()=>{g(null),i()},[i,g]),H=l.useCallback(s=>{const c=s.currentTarget;if(d?.onKeyDown(s))return;const y=le({key:s.key,shiftKey:s.shiftKey,repeat:s.repeat,caretAtStart:c.selectionStart===0&&c.selectionEnd===0,hasValue:n.length>0,chipCount:e.length});switch(y.type){case"focusChip":s.preventDefault(),g(y.index);return;case"clearQuery":A();return;case"blur":c.blur();return;case"none":return}},[e.length,n,A,g,d]),U=l.useCallback(s=>c=>{const y=ue({key:c.key,repeat:c.repeat,index:s,chipCount:e.length});switch(y.type!=="none"&&c.preventDefault(),y.type){case"removeChip":T(y.index);return;case"focusChip":g(y.index);return;case"focusInput":g(null);return;case"activateChip":return;case"none":return}},[e,T,g]);return l.useEffect(()=>{if(!u)return;const s=c=>{c.key!=="/"||c.metaKey||c.ctrlKey||c.altKey||de(c.target)||L("focusSearch")||(c.preventDefault(),I.current?.focus())};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[u]),h.jsxs("label",{htmlFor:F,className:E("flex w-full items-center gap-1.5 text-sm","bg-surface-sunken/50 border border-transparent","focus-within:bg-canvas focus-within:border-line focus-within:ring-2 focus-within:ring-ring","transition-colors",m==="lg"?"rounded-xl px-4 py-2":"rounded-md px-2.5 py-1",b),children:[h.jsx(V,{className:E("shrink-0 text-fg-muted pointer-events-none",m==="lg"?"size-5":"size-4")}),h.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1",children:[v&&h.jsx("div",{role:"grid","aria-label":"Search filters",className:"flex min-w-0 flex-wrap items-center gap-1",children:e.map((s,c)=>h.jsx(_,{ref:y=>{P.current[c]=y},label:s.label,tone:s.tone,focused:$===c,onFocusLabel:()=>C(c),onKeyDown:U(c),onRemove:()=>T(c)},s.id))}),h.jsx("input",{ref:I,id:F,name:"q",type:"text","aria-label":"Search mail",autoComplete:"off",value:n,tabIndex:$===null?0:-1,onChange:s=>{o(s.target.value),w(s.target)},onKeyDown:H,onKeyUp:s=>w(s.currentTarget),onClick:s=>w(s.currentTarget),onFocus:s=>{C(null),d?.onFocusChange?.(!0),w(s.currentTarget)},onBlur:()=>d?.onFocusChange?.(!1),...d?.comboboxProps,placeholder:v?void 0:a,className:"min-w-24 flex-1 bg-transparent text-fg outline-none placeholder:text-fg-muted"})]}),(n||v)&&p&&h.jsx("button",{type:"button",onClick:B,className:"shrink-0 rounded p-0.5 hover:bg-surface-raised transition-colors","aria-label":"Clear search",children:h.jsx(Q,{className:E("text-fg-muted",m==="lg"?"size-5":"size-4")})}),h.jsx("span",{role:"status","aria-live":"polite",className:"sr-only",children:q})]})},Ce=({value:e,onChange:t,onClear:n,onClearQuery:o,chips:i,onRemoveChip:r,placeholder:a="Search mail...",globalFocusKey:u=!0,showClearButton:p=!0,size:m,inputId:f,suggest:d,className:b})=>h.jsx(pe,{value:e,onChange:t,onClear:n,onClearQuery:o,chips:i,onRemoveChip:r,placeholder:a,globalFocusKey:u,showClearButton:p,size:m,inputId:f,suggest:d,className:b});function we({handlers:e,enabled:t=!0,target:n,sequenceTimeoutMs:o=1e3}){const i=l.useRef(e);i.current=e;const r=l.useRef(null),a=l.useRef(null);l.useEffect(()=>{if(!t)return;const u=()=>{a.current!==null&&(clearTimeout(a.current),a.current=null)},p=f=>{const d=G({key:f.key,shiftKey:f.shiftKey,metaKey:f.metaKey,ctrlKey:f.ctrlKey,altKey:f.altKey,inEditable:J(f.target),onControl:z(f.target)},r.current);if(X().length>0){u(),r.current=null;return}if(u(),r.current=d.nextPrefix,d.nextPrefix!==null&&(a.current=setTimeout(()=>{r.current=null,a.current=null},o)),d.action===null||L(d.action)!==null)return;const b=i.current[d.action];b&&(d.preventDefault&&f.preventDefault(),b())},m=n===void 0?window:n;if(m!==null)return m.addEventListener("keydown",p),()=>{m.removeEventListener("keydown",p),u(),r.current=null}},[t,o,n])}function Se(){const e=x({from:"/mail/brief/$threadId",shouldThrow:!1}),t=x({from:"/mail/brief/$threadId/$messageId",shouldThrow:!1}),n=x({from:"/mail/flagged/$threadId",shouldThrow:!1}),o=x({from:"/mail/flagged/$threadId/$messageId",shouldThrow:!1}),i=x({from:"/mail/$mailboxId/$threadId",shouldThrow:!1}),r=x({from:"/mail/$mailboxId/$threadId/$messageId",shouldThrow:!1}),a=e?.threadId??n?.threadId??i?.threadId,u=t?.messageId??o?.messageId??r?.messageId;return l.useMemo(()=>a?{threadId:a,messageId:u}:void 0,[a,u])}function ve(){const e=K(),t=te(),{list:n,mailboxId:o}=k();return l.useCallback((i,r)=>{const a=r?.query,p={search:f=>a===void 0?f:{...f,q:a||void 0},hash:t,replace:r?.replace??!1};if(n==="flagged"){e({to:"/mail/flagged/$threadId/$messageId",params:i,...p});return}const m=r?.mailboxId??o;if(n==="mailbox"&&m){e({to:"/mail/$mailboxId/$threadId/$messageId",params:{mailboxId:m,...i},...p});return}e({to:"/mail/brief/$threadId/$messageId",params:i,...p})},[e,t,n,o])}function Te(){return ne()}function me(){const e=K();return l.useCallback(t=>{e({to:"/mail/brief",search:{q:t||void 0}})},[e])}function Ee(){const e=K();return l.useCallback((t,n)=>{e({to:"/mail/$mailboxId",params:{mailboxId:t},search:{q:n||void 0}})},[e])}const he=({accounts:e})=>{const{list:t,mailboxId:n}=k(),{t:o}=Y("mail",{useSuspense:!1}),i=l.useCallback((a,u)=>o(a,{defaultValue:u}),[o]),r=R({queries:e.map(a=>({...M({path:{accountId:a.accountId}}),staleTime:1/0}))});if(t==="outbox")return"Outbox";if(!n)return null;for(let a=0;a<e.length;a++){const u=r[a]?.data?.items;if(!u)continue;const p=u.find(f=>f.mailboxId===n);if(!p)continue;const m=W(e[a].folderAppointments);return Z(p,m.get(n),i)}return null},Ne=({accounts:e})=>{const{mailboxId:t}=k(),n=R({queries:e.map(o=>({...M({path:{accountId:o.accountId}}),staleTime:1/0}))});if(!t)return null;for(const o of n){const i=o.data?.items;if(!i)continue;const r=i.find(a=>a.mailboxId===t);if(r)return r.unseenCount}return null},Ke=({accounts:e})=>{const{mailboxId:t}=k(),n=R({queries:e.map(o=>({...M({path:{accountId:o.accountId}}),staleTime:1/0}))});if(!t)return 0;for(const o of n){const i=o.data?.items;if(!i)continue;const r=i.find(a=>a.mailboxId===t);if(r)return r.messageCount}return 0};function Me(e){const t=me(),{searchInput:n}=ee(),o=he({accounts:e}),i=k(),r=l.useMemo(()=>oe(i,o),[i,o]),a=l.useCallback(u=>{u===se&&t(n)},[t,n]);return{scope:r,clearScope:a}}function Re(e){const t=new Map;for(const n of e){const o=n.email.toLowerCase(),i=o.split("@")[0];i&&!t.has(i)&&t.set(i,n.accountId),t.has(o)||t.set(o,n.accountId)}return t}function Fe(e){const t=new Map;for(const n of e)for(const o of n){const i=o.fullPath?.toLowerCase();if(!i)continue;const r=N(o).toLowerCase();t.has(i)||t.set(i,o.mailboxId),t.has(r)||t.set(r,o.mailboxId)}return t}function Pe(e,t=[]){const n=e.flat().filter(r=>r.fullPath),o=new Map;for(const r of n){const a=N(r).toLowerCase();o.set(a,(o.get(a)??0)+1)}const i=new Map(t.map(r=>[r.accountId,r.email]));return n.map(r=>{const a=N(r),u=o.get(a.toLowerCase())===1,p=t.length>1?i.get(r.accountId):void 0;return{value:u?a:r.fullPath,label:r.displayNameOverride?.trim()||a,...p?{hint:p}:{}}})}function Ae(e){const t=new Map;for(const n of e){const o=n.email.toLowerCase().split("@")[0]??"";t.set(o,(t.get(o)??0)+1)}return e.map(n=>{const o=n.email.split("@")[0]??n.email,i=t.get(o.toLowerCase())===1,r=n.displayName?.trim();return{value:i?o:n.email,label:r||n.email,...r?{hint:n.email}:{}}})}export{ae as K,Ce as S,Se as a,Fe as b,we as c,Re as d,ve as e,Te as f,he as g,Ne as h,Ke as i,re as j,Pe as k,Ae as l,Ee as m,ke as n,ce as s,Ie as t,Me as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,o as S,f as I,r as c,bG as A,a as C,g as k,bH as P,bI as L,d as N,X as O,u as T,aI as $,as as q,bJ as G,aK as K,bK as M,bL as R,S as D}from"./index-CXzCthHG.js";import{E}from"./ErrorState-Bi4vrhhQ.js";import{K as f}from"./kbd-DxdiA2Fl.js";import{a as V,S as Q}from"./settings-screen-DxN6mICP.js";import{u as _}from"./useDebouncedValue--u19KX6h.js";import{s as B}from"./help-copy-BN4-5aIP.js";import"./avatar-qD7fcqFf.js";import"./chevron-left-Bt4eJ35K.js";import"./menu-ouYQ8aI9.js";import"./circle-help-BtMu5xYr.js";function F({options:t,active:r,onSelect:m}){return e.jsx("div",{role:"tablist",className:S("flex shrink-0 gap-1 overflow-x-auto border-b border-line p-2","lg:w-44 lg:flex-col lg:gap-0 lg:overflow-visible lg:border-r lg:border-b-0 lg:py-2 lg:pr-2 lg:pl-3"),children:t.map(n=>{const d=n.id===r;return e.jsxs("button",{type:"button",role:"tab","aria-selected":d,onClick:()=>m(n.id),className:S("flex min-h-11 shrink-0 items-center gap-2 rounded-md px-3 text-left text-sm transition-colors lg:min-h-0 lg:px-2 lg:py-1",d?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface-sunken hover:text-fg"),children:[e.jsx("span",{className:"flex-1 truncate",children:n.label}),e.jsx("span",{className:S("text-2xs tabular-nums",d?"text-accent-2":"text-fg-subtle"),children:n.count??"—"})]},n.id)})})}const v={vip:"VIPs",muted:"Muted",blocked:"Blocked"};function H({query:t,onCount:r}){const{data:m,isPending:n,isError:d,error:b}=C(M()),g=I(),i=k({...P(),onSettled:()=>{g.invalidateQueries({queryKey:R()})}}),l=m?.suggestions??[],p=t.trim().toLowerCase(),u=p?l.filter(a=>(a.displayName??"").toLowerCase().includes(p)||a.normalizedEmail.toLowerCase().includes(p)):l;return c.useEffect(()=>{r?.(u.length,l.length)},[r,u.length,l.length]),n?e.jsx("div",{className:"px-row-inset py-3 text-sm text-fg-subtle animate-pulse",children:"Loading VIP suggestions…"}):d?e.jsx("div",{className:"px-row-inset py-3",children:e.jsx(E,{variant:"inline",title:"Couldn't load VIP suggestions",error:b})}):l.length===0?e.jsxs("div",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No VIP suggestions yet. As you reply to senders, they'll appear here. Press ",e.jsx(f,{children:"v"})," on any message to promote a sender to VIP."]}):u.length===0?e.jsxs("p",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No VIPs match “",t,"”."]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-row-inset py-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Suggested — promote to VIP"}),u.map(a=>e.jsx(V,{name:a.displayName??a.normalizedEmail,email:a.normalizedEmail,meta:a.replyCount>0?`${a.inboundCount} received · you replied ${a.replyCount}×`:`${a.inboundCount} received · you've never replied`,trailing:e.jsx(N,{variant:"ghost",size:"sm",icon:e.jsx(D,{className:"size-3.5"}),"aria-busy":i.isPending,onClick:()=>{i.isPending||i.mutate({path:{addressId:a.addressId},body:{flags:{vip:{value:!0,setAt:Date.now(),setBy:"user"}}}})},children:"Add VIP"})},a.addressId))]})}function J({group:t,query:r,onCount:m}){const n=_(r.trim(),300),d=I(),[b,g]=c.useState(null),i=n.length>=2,l=A({query:{q:n,limit:50}}),{data:p,isPending:u,isError:a,error:j}=C({...l,enabled:i}),x=k({...P(),onSuccess:()=>{d.invalidateQueries({queryKey:l.queryKey})}}),h=(p?.items??[]).filter(s=>t==="muted"?s.flags?.muted?.value??!1:s.flags?.blocked?.value??!1);return c.useEffect(()=>{m?.(i?h.length:0,null)},[m,i,h.length]),i?u?e.jsx("div",{className:"px-row-inset py-3 text-sm text-fg-subtle animate-pulse",children:"Searching…"}):a?e.jsx("div",{className:"px-row-inset py-3",children:e.jsx(E,{variant:"inline",title:"Search failed",error:j})}):h.length===0?e.jsxs("p",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No ",v[t].toLowerCase()," senders matching “",n,"”."]}):e.jsx(e.Fragment,{children:h.map(s=>{const o=t==="muted"?s.flags?.muted:s.flags?.blocked,y=o?[`${t}`,o.setAt&&L(o.setAt,{month:"short",year:"numeric"})||null,o.reason?`— ${o.reason}`:null].filter(Boolean).join(" "):t,w=x.isPending&&x.variables?.path.addressId===s.addressId,z=x.isError&&b===s.addressId;return e.jsx(V,{name:s.displayName??s.normalizedEmail,email:s.normalizedEmail,danger:t==="blocked",meta:y,trailing:z?e.jsx(N,{variant:"secondary",size:"sm",onClick:()=>{g(s.addressId),x.mutate({path:{addressId:s.addressId},body:{flags:{[t]:{value:!1,setAt:Date.now()}}}})},children:"Retry"}):e.jsx(N,{variant:"ghost",size:"sm",icon:e.jsx(O,{className:"size-3.5"}),"aria-busy":w,"aria-label":`Remove ${t} flag`,onClick:()=>{w||(g(s.addressId),x.mutate({path:{addressId:s.addressId},body:{flags:{[t]:{value:!1,setAt:Date.now()}}}}))}})},s.addressId)})}):e.jsxs("div",{className:"px-row-inset py-5 text-sm text-fg-subtle space-y-2",children:[e.jsxs("p",{children:["Type 2+ characters to search ",v[t].toLowerCase()," ","senders by name or address."]}),e.jsxs("p",{className:"text-2xs text-fg-subtle",children:["Note: a dedicated flagged-address list endpoint is in the backlog. Press ",e.jsx(f,{children:"m"})," on any message to mute its sender; ",e.jsx(f,{children:"b"})," to block."]})]})}function re(){const t=T(),[r,m]=c.useState("vip"),[n,d]=c.useState(""),[b,g]=c.useState(!0),[i,l]=c.useState(0),[p,u]=c.useState({vip:0,muted:null,blocked:null}),a=c.useCallback((s,o)=>{l(s),u(y=>({...y,vip:o}))},[]),j=c.useCallback((s,o)=>{l(s),u(y=>({...y,[r]:s}))},[r]),x=p[r],h=s=>{const o=K[s];o&&t({to:o})};return e.jsx(Q,{items:$,activeId:"senders",title:"Senders & Rules",description:"Per-sender preferences — set with one key from any message, managed here.",flush:!0,help:B,helpOpen:b,onToggleHelp:()=>g(s=>!s),onSelect:h,onBackToMail:()=>{t({to:"/mail"})},children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col lg:flex-row",children:[e.jsx(F,{active:r,onSelect:s=>{m(s),d("")},options:["vip","muted","blocked"].map(s=>({id:s,label:v[s],count:p[s]}))}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsx("div",{className:"border-b border-line px-row-inset py-2",children:e.jsx(q,{icon:e.jsx(G,{className:"size-4"}),placeholder:`Filter ${v[r].toLowerCase()} by name or address`,className:"h-8 max-w-sm",value:n,onChange:s=>d(s.target.value)})}),e.jsx("div",{className:"min-h-0 flex-1 divide-y divide-line overflow-y-auto",children:r==="vip"?e.jsx(H,{query:n,onCount:a}):e.jsx(J,{group:r,query:n,onCount:j})}),e.jsxs("footer",{className:"flex items-center justify-between border-t border-line px-row-inset py-1 text-2xs text-fg-subtle",children:[e.jsx("span",{children:x!=null?`${i} of ${x} flagged senders`:`${i} flagged senders`}),e.jsxs("span",{children:[e.jsx(f,{children:"j"})," ",e.jsx(f,{children:"k"})," navigate · ",e.jsx(f,{children:"⌫"})," remove flag"]})]})]})]})})}export{J as SearchGroupPane,re as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,O as o}from"./index-CXzCthHG.js";const n=()=>t.jsx(o,{});export{n as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as j,j as e,o as f,d as i,X as N,e as z}from"./index-CXzCthHG.js";import{A as w}from"./avatar-qD7fcqFf.js";import{C as h}from"./chevron-left-Bt4eJ35K.js";import{M as S}from"./menu-ouYQ8aI9.js";import{C as v}from"./circle-help-BtMu5xYr.js";function R({items:l,activeId:t,title:x,description:n,children:r,help:s,helpOpen:d=!0,flush:o,onSelect:k,onToggleHelp:u,onBackToMail:m}){const[y,c]=j.useState(!1),[b,C]=j.useState(!1),p=!!s&&d,g=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-3 pt-3 pb-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Settings"}),e.jsx("nav",{className:"flex-1 overflow-y-auto px-2 py-1",children:l.map(a=>e.jsxs("button",{type:"button",onClick:()=>{k?.(a.id),c(!1)},className:f("flex min-h-11 w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors lg:min-h-0",a.id===t?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface hover:text-fg"),children:[a.icon&&e.jsx("span",{className:f("shrink-0",a.id===t?"text-accent-2":"text-fg-subtle"),children:a.icon}),a.label]},a.id))})]});return e.jsxs("div",{className:"safe-area-frame flex h-dvh w-full overflow-hidden bg-canvas font-sans text-fg",children:[e.jsxs("aside",{className:"hidden w-60 shrink-0 flex-col border-r border-line bg-surface-sunken lg:flex",children:[e.jsx("div",{className:"flex h-pane-header shrink-0 items-center border-b border-line px-2",children:e.jsxs("button",{type:"button",onClick:m,className:"flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm text-fg-muted hover:bg-surface hover:text-fg",children:[e.jsx(h,{className:"size-4 text-fg-subtle"}),"Back to mail"]})}),g]}),y&&e.jsxs("div",{className:"fixed inset-0 z-50 flex lg:hidden",children:[e.jsx("button",{type:"button","aria-label":"Close menu",className:"absolute inset-0 bg-canvas/60",onClick:()=>c(!1)}),e.jsxs("aside",{className:"safe-area-frame relative flex w-72 max-w-[85%] flex-col border-r border-line bg-surface-sunken",children:[e.jsxs("div",{className:"flex h-pane-header shrink-0 items-center justify-between border-b border-line px-2",children:[e.jsxs("button",{type:"button",onClick:()=>{m?.(),c(!1)},className:"flex items-center gap-2 rounded-md px-2 py-1 text-left text-sm text-fg-muted hover:bg-surface hover:text-fg",children:[e.jsx(h,{className:"size-4 text-fg-subtle"}),"Back to mail"]}),e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-4"}),onClick:()=>c(!1),"aria-label":"Close menu"})]}),g]})]}),e.jsxs("main",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsxs("header",{className:"flex h-pane-header shrink-0 items-center gap-3 border-b border-line px-3 lg:px-5",children:[m&&e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(h,{className:"size-4"}),className:"-ml-1 lg:hidden",onClick:m,"aria-label":"Back to mail"}),e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(S,{className:"size-4"}),className:"lg:hidden",onClick:()=>c(!0),"aria-label":"Open settings menu"}),e.jsx("h1",{className:"text-md font-semibold text-fg",children:x}),n&&e.jsx("p",{className:"hidden min-w-0 truncate text-xs text-fg-subtle lg:block",children:n}),s&&e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(v,{className:"size-4"}),className:"ml-auto lg:hidden",onClick:()=>C(a=>!a),"aria-label":"Tips","aria-expanded":b}),s&&!p&&e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(v,{className:"size-4"}),className:"hidden ml-auto lg:inline-flex",onClick:u,"aria-label":"Show tips"})]}),s&&b&&e.jsx("div",{className:"border-b border-line bg-surface-sunken px-row-inset py-3 text-xs leading-relaxed text-fg-muted lg:hidden",children:s}),o?e.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:r}):e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsx("div",{className:"max-w-2xl px-3 py-5 lg:px-5",children:e.jsx("div",{className:"space-y-5",children:r})})})]}),p&&e.jsxs("aside",{className:"hidden w-64 shrink-0 flex-col border-l border-line bg-surface-sunken lg:flex",children:[e.jsxs("header",{className:"flex h-pane-header shrink-0 items-center justify-between border-b border-line px-row-inset",children:[e.jsx("span",{className:"text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Tips & tricks"}),e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-3.5"}),onClick:u,"aria-label":"Collapse tips"})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-row-inset py-3 text-xs leading-relaxed text-fg-muted",children:s})]})]})}function L({name:l,email:t,meta:x,caption:n,danger:r,trailing:s}){return e.jsxs("div",{className:"flex items-center gap-3 px-row-inset py-2 hover:bg-surface-sunken",children:[e.jsx("span",{className:f(r&&"rounded-full ring-2 ring-danger/40"),children:e.jsx(w,{name:l,email:t,size:"sm"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-col gap-0 sm:flex-row sm:items-baseline sm:gap-2",children:[e.jsx("span",{className:"truncate text-sm font-medium text-fg",children:l}),e.jsx("span",{className:"truncate text-2xs text-fg-subtle",children:t})]}),e.jsxs("div",{className:"text-xs text-fg-subtle",children:[x,n&&e.jsxs("span",{className:"text-fg-muted",children:[" · ",n]})]})]}),s&&e.jsx("div",{className:"shrink-0",children:s})]})}const O={healthy:{tone:"positive",label:"healthy"},error:{tone:"danger",label:"error"},muted:{tone:"neutral",label:"muted"}};function X({label:l,email:t,connector:x,syncLabel:n,state:r,errorDetail:s,trailing:d}){const o=O[r];return e.jsxs("div",{className:f("rounded-sm border border-line bg-surface",r==="muted"&&"opacity-65"),children:[e.jsxs("div",{className:"flex flex-col gap-3 px-row-inset py-3 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[e.jsx(w,{name:l,email:t,size:"md"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate text-sm font-semibold text-fg",children:l}),e.jsx(z,{tone:o.tone,dot:!0,children:o.label})]}),e.jsxs("div",{className:"truncate text-xs text-fg-subtle",children:[t," · ",x," · ",n]})]})]}),d&&e.jsx("div",{className:"shrink-0",children:d})]}),s&&e.jsx("div",{className:"border-t border-line px-row-inset py-2",children:e.jsx("code",{className:"block rounded-xs bg-danger-soft px-2 py-1 text-2xs text-danger",children:s})})]})}export{X as A,R as S,L as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as m,j as c}from"./index-CXzCthHG.js";import{y as b,C as D,j as x,s as w}from"./calendar-suggestion-qEC_UasM.js";import{E as T}from"./EmptyState-DjcO1Fvj.js";import{e as C,p as j,a as A,E as v,u as k,C as N}from"./CalendarComposePane-Bz_-lcWc.js";import{e as F,h as O,u as R,d as E,f as Z,U as L}from"./useCalendars-BgSJfw8G.js";import{c as P}from"./calendar-report-BRGottVJ.js";import"./reply-B9-kr45N.js";import{M as U,n as H}from"./useCalendarEvents-lDPF_B6_.js";import"./ErrorState-Bi4vrhhQ.js";import"./calendar-clash-strip-C9X1djbQ.js";import"./useMediaQuery-DB2OdJvp.js";import"./useQueries-gpmd3w5y.js";function z(e,t,d){const n={title:e.summary,location:e.location};if(e.allDay){const o=e.dtStart.slice(0,10),i=e.dtEnd.slice(0,10);return{...C(o,t),...n,allDay:!0,startTime:"",endDate:i>o?F(i,-1):o,endTime:""}}const a=o=>e.zoneCertainty==="Ambiguous"?o:O(o,d),s=a(e.dtStart),l=a(e.dtEnd);return{...C(s.slice(0,10),t),...n,startTime:s.slice(11,16),endDate:l.slice(0,10),endTime:l.slice(11,16)}}function B(e,t,d,n){const a=j(t,d,n);if(!a.ok)return a;const l=e.zoneCertainty==="Ambiguous"||a.patch.start!==void 0?{...a.patch,...A(d,n.clock),allDay:d.allDay,timeZone:n.anchor}:a.patch;return{ok:!0,input:{calendarId:d.calendarId,event:l}}}const g="Add from mail",M="The invitation named a time zone nothing could resolve. The time below is as the mail wrote it — check it before adding.";function _({suggestionId:e,onClose:t}){const{suggestion:d,isLoading:n,error:a}=b(e),s=d??void 0,[l,o]=m.useState(void 0);s!==void 0&&l===void 0&&o(s);const i=l??s;if(i!==void 0)return c.jsx($,{suggestion:i,onClose:t},i.suggestionId);if(a!==null){const u="Couldn't read what your mail is waiting on.";return c.jsx(v,{title:g,onClose:t,children:c.jsx(D,{text:`${u} Close this and try again.`,reportHref:P(u),className:"m-row-inset"})})}return c.jsx(v,{title:g,onClose:t,children:c.jsx(T,{message:n?"Reading the suggestion…":"This suggestion is no longer waiting on you. It was answered, or a later message replaced it."})})}function $({suggestion:e,onClose:t}){const{calendars:d,defaultCalendarId:n,timeZoneByCalendarId:a}=R(),s=d.filter(r=>!r.readOnly),l=x(),[o]=m.useState(()=>z(e,"",E())),[i,u]=m.useState(o),[y,p]=m.useState(""),S=k(i),f=s.some(r=>r.id===n)?n:s[0]?.id??"";m.useEffect(()=>{f!==""&&u(r=>r.calendarId===""?{...r,calendarId:f}:r)},[f]);const I=()=>{const r=B(e,o,i,{clock:E(),anchor:Z(a[i.calendarId]??L)});if(!r.ok){p(r.problem);return}p(""),l.acceptEdited(e.suggestionId,r.input).then(h=>{if(h.kind==="answered"){t();return}p(`Couldn't add this to your calendar: ${h.message}`)})};return c.jsx(N,{title:g,subtitle:w(e),notice:e.zoneCertainty==="Ambiguous"?M:"",calendars:s,draft:i,onChange:u,problem:y,saveLabel:"Add",isSaving:l.isAnswering,repeatEditable:!1,clashes:S,onSave:I,onCancel:t})}function ne(){const e=U(),{closeEvent:t}=H();return e===void 0?null:c.jsx(_,{suggestionId:e,onClose:t})}export{ne as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as m}from"./index-CXzCthHG.js";import{u as C,d as g,i as I,t as v,U as p,b as D,r as E}from"./useCalendars-BgSJfw8G.js";import{x as y,I as L}from"./useCalendarEvents-lDPF_B6_.js";function Z(a,n){const t=a.map(e=>e.id);if(n.length===0)return t;const s=new Set(n),o=t.filter(e=>s.has(e));return o.length===0?t:o}function b(a){const{calendars:n,colorByCalendarId:t,timeZoneByCalendarId:s,isLoading:o}=C(),e=Z(n,a),r=e.length===n.length?[]:e,c=a.length===0||n.length>0;return{calendars:n,colorByCalendarId:t,timeZoneByCalendarId:s,shown:e,narrowed:r,resolved:c,isLoading:o}}function x(a,n,t){const s=t.join(",");return m.useMemo(()=>{const o=g(),e=new Set(s===""?[]:s.split(","));return a.filter(r=>I(r)&&e.has(r.calendarId)).map(r=>v(r,n[r.calendarId]??p,o))},[a,n,s])}function S({view:a,date:n,calendarIds:t,enabled:s=!0}){const{calendars:o,colorByCalendarId:e,timeZoneByCalendarId:r,shown:c,narrowed:l,resolved:u,isLoading:w}=b(t),h=D(a,n),i=s&&u,d=y({...h,calendarIds:l,enabled:i});L(a,n,l,i);const f=x(d.instances,r,c);return{calendars:o,events:f,colorByCalendarId:e,timeZoneByCalendarId:r,isLoading:w||d.isLoading,error:d.error,retry:d.refetch,instanceOf:E}}export{x as a,S as b,b as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as A,u as M,r as d,a1 as p,b$ as R,eu as _,bT as S,v as j,ev as I,a as U,ew as T,f as W,s as F}from"./index-CXzCthHG.js";import{h as G}from"./reply-B9-kr45N.js";import{u as B}from"./useQueries-gpmd3w5y.js";import{b as P}from"./useCalendars-BgSJfw8G.js";const ut=A("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]),g=480,m=1320,v=90;function $(t){return Number(t.slice(11,13))*60+Number(t.slice(14,16))}function lt(t){const n=Math.max(0,Math.min(1440,Math.round(t)));return`${String(Math.floor(n/60)).padStart(2,"0")}:${String(n%60).padStart(2,"0")}`}function dt(t){const n=Math.round(t);if(n<60)return`${n}m`;const a=Math.floor(n/60),e=n%60;return e===0?`${a}h`:`${a}h ${e}m`}function O(t,n){const a=new Date(`${t}T00:00:00Z`);return a.setUTCDate(a.getUTCDate()+n),a.toISOString().slice(0,10)}function ft(t,n){return Math.round((Date.parse(`${n}T00:00:00Z`)-Date.parse(`${t}T00:00:00Z`))/864e5)}function mt(t){const n=t.start.slice(0,10),a=t.end.slice(0,10);if(!t.allDay)return a;const e=O(a,-1);return e<n?n:e}function ht(t,n){const a=[];for(let e=t;e<=n;e=O(e,1))a.push(e);return a}function pt(t){const[n,a,e]=t.split("-").map(Number);return new Date(n,a-1,e).toLocaleDateString("en-GB",{month:"long",year:"numeric"})}function yt(t){const[n,a,e]=t.split("-").map(Number);return new Date(n,a-1,e).toLocaleDateString("en-GB",{weekday:"short",day:"numeric",month:"short"})}function gt(t){const[n,a,e]=t.split("-").map(Number);return new Date(n,a-1,e).toLocaleDateString("en-GB",{weekday:"long"})}function Dt(t,n){const[a,e,o]=t.split("-").map(Number),[r,c,s]=n.split("-").map(Number),u=new Date(a,e-1,o),l=new Date(r,c-1,s),i=u.toLocaleDateString("en-GB",{weekday:"short",day:"numeric",...e===c?{}:{month:"short"}}),b=l.toLocaleDateString("en-GB",{weekday:"short",day:"numeric",month:"short"});return`${i} – ${b}`}function Y(t){const[n,a,e]=t.split("-").map(Number);return new Date(n,a-1,e).toLocaleDateString("en-GB",{weekday:"short"})}function f(t){return new Date(t).getTime()}function Z(t,n){return t.allDay?n>=t.start.slice(0,10)&&n<t.end.slice(0,10):t.start.slice(0,10)===n}function q(t,n){return f(t.start)<f(n.end)&&f(n.start)<f(t.end)}function Q(t){const n=t.map(r=>[f(r.start),f(r.end)]).sort((r,c)=>r[0]-c[0]);let a=0,e=0,o=0;for(const[r,c]of n){if(r>o){a+=o-e,e=r,o=c;continue}o=Math.max(o,c)}return a+=o-e,Math.round(a/6e4)}function H(t){const n=[];for(const a of t){const e=t.filter(r=>r.id===a.id||q(a,r)).map(r=>r.id).sort();if(e.length<2)continue;const o=e.join("|");n.some(r=>r.join("|")===o)||n.push(e)}return n.filter(a=>!n.some(e=>e!==a&&a.every(o=>e.includes(o))))}function bt(t,n,a){const e=n.filter(r=>Z(r,t)),o=e.filter(r=>!r.allDay).sort((r,c)=>f(r.start)-f(c.start));return{date:t,weekdayLabel:Y(t),dayNumber:Number(t.slice(8)),isToday:t===a,timed:o,allDay:e.filter(r=>r.allDay),busyMinutes:Q(o),conflicts:H(o)}}function K(t){return t.timed.length===0&&t.allDay.length===0}function V(t){return x(t.timed.map(n=>({from:$(n.start),to:$(n.end)})))}function x(t){const n=[...t].sort((e,o)=>e.from-o.from),a=[];for(const e of n){const o=a[a.length-1];if(o&&e.from<=o.to){o.to=Math.max(o.to,e.to);continue}a.push({...e})}return a}function k(t){return Math.min(Math.max(t,g),m)}function z(t,n,a=v){const e=x(n);if(e.length===0)return[{date:t,startMinute:g,endMinute:m,minutes:m-g,wholeDay:!0}];const o=[];let r=g;for(const c of e){const s=k(c.from),u=k(c.to);s-r>=a&&o.push({date:t,startMinute:r,endMinute:s,minutes:s-r,wholeDay:!1}),r=Math.max(r,s,u)}return m-r>=a&&o.push({date:t,startMinute:r,endMinute:m,minutes:m-r,wholeDay:!1}),o}function J(t,n=v){return z(t.date,V(t),n)}function wt(t,n,{ignoreIds:a=[]}={}){const e=Date.parse(t.start),o=Date.parse(t.end);return n.filter(r=>r.allDay||r.myRsvp==="declined"||a.includes(r.id)?!1:Date.parse(r.start)<o&&e<Date.parse(r.end))}function $t(t,n){const a=[];let e=[];const o=()=>{e.length!==0&&(e.length===1?a.push({kind:"day",key:e[0].date,day:e[0]}):a.push({kind:"run",key:`run_${e[0].date}`,from:e[0].date,to:e[e.length-1].date,days:e.length}),e=[])};for(const r of t){if(K(r)&&!n.includes(r.date)){e.push(r);continue}o(),a.push({kind:"day",key:r.date,day:r})}return o(),a}function Mt(t){const n=[];for(const a of t){const e=n[n.length-1],o=e?Math.max(...e.map(r=>Date.parse(r.end))):0;if(e&&Date.parse(a.start)<o){e.push(a);continue}n.push([a])}return n}function Tt(t,n){const a=Date.parse(n),e=n.slice(0,10),o=t.flatMap(l=>l.timed).sort((l,i)=>Date.parse(l.start)-Date.parse(i.start)),r=o.filter(l=>Date.parse(l.start)<=a&&Date.parse(l.end)>a),c=o.filter(l=>Date.parse(l.start)>a),s=c[0],u=r.filter(l=>l.start.slice(0,10)===e).length+c.filter(l=>l.start.slice(0,10)===e).length;return{running:r,next:s,minutesUntilNext:s?Math.round((Date.parse(s.start)-a)/6e4):0,after:c[1],restOfDay:u,free:X(t,n,1)[0]}}function X(t,n,a){const e=n.slice(0,10),o=$(n),r=[];for(const c of t)if(!(c.date<e))for(const s of J(c)){if(c.date>e)r.push(s);else{const u=Math.max(s.startMinute,o);if(s.endMinute-u<v)continue;r.push({...s,startMinute:u,minutes:s.endMinute-u,wholeDay:s.wholeDay&&u===s.startMinute})}if(r.length===a)return r}return r}const tt={"cal-1":{solid:"bg-cal-1",soft:"bg-cal-1-soft",text:"text-cal-1",border:"border-cal-1",rail:"border-l-cal-1"},"cal-2":{solid:"bg-cal-2",soft:"bg-cal-2-soft",text:"text-cal-2",border:"border-cal-2",rail:"border-l-cal-2"},"cal-3":{solid:"bg-cal-3",soft:"bg-cal-3-soft",text:"text-cal-3",border:"border-cal-3",rail:"border-l-cal-3"},"cal-4":{solid:"bg-cal-4",soft:"bg-cal-4-soft",text:"text-cal-4",border:"border-cal-4",rail:"border-l-cal-4"},"cal-5":{solid:"bg-cal-5",soft:"bg-cal-5-soft",text:"text-cal-5",border:"border-cal-5",rail:"border-l-cal-5"},"cal-6":{solid:"bg-cal-6",soft:"bg-cal-6-soft",text:"text-cal-6",border:"border-cal-6",rail:"border-l-cal-6"}};function vt(t){return tt[t]}const y="/calendar/$view/$date",D="/calendar/$view/$date/suggestion/$suggestionId";function et(){const t=p({from:y,shouldThrow:!1}),n=R({from:y,shouldThrow:!1}),a=t?.view??"",e=t?.date??"",o=n?.calendarId;return d.useMemo(()=>({..._({view:a,date:e},S(new Date)),calendarIds:o??[]}),[a,e,o])}function Ct(){const t=p({from:"/calendar/$view/$date/$calendarObjectId",shouldThrow:!1}),n=p({from:"/calendar/$view/$date/$calendarObjectId/$recurrenceId",shouldThrow:!1}),a=t?.calendarObjectId,e=n?.recurrenceId;return d.useMemo(()=>a?{calendarObjectId:a,recurrenceId:e}:void 0,[a,e])}function Et(){return p({from:D,shouldThrow:!1})?.suggestionId}function kt(){const t=p({from:"/calendar/$view/$date/new",shouldThrow:!1}),n=p({from:D,shouldThrow:!1});return t!==void 0||n!==void 0}function St(){const t=M(),n=j(),a=G(),{view:e,date:o}=et(),r=d.useCallback(s=>{t({to:y,params:s,search:!0,hash:a})},[t,a]),c=d.useCallback(s=>n.buildLocation({to:y,params:{view:"day",date:s},search:!0,hash:a}).href,[n,a]);return d.useMemo(()=>({goToView:s=>r({view:s,date:o}),step:s=>r({view:e,date:I(o,e,s)}),goToToday:()=>r({view:e,date:S(new Date)}),setAnchorDate:s=>t({to:y,params:{view:e,date:s},search:!0,hash:a,replace:!0}),zoomToDay:s=>t({href:c(s)}),dayHref:c,openEvent:(s,u)=>t(u===void 0||u===""?{to:"/calendar/$view/$date/$calendarObjectId",params:{view:e,date:o,calendarObjectId:s},search:!0,hash:a}:{to:"/calendar/$view/$date/$calendarObjectId/$recurrenceId",params:{view:e,date:o,calendarObjectId:s,recurrenceId:u},search:!0,hash:a}),closeEvent:()=>r({view:e,date:o}),openComposer:()=>t({to:"/calendar/$view/$date/new",params:{view:e,date:o},search:!0,hash:a}),changeSuggestionFirst:(s,u)=>t({to:D,params:{view:e,date:u,suggestionId:s},search:!0,hash:a})}),[r,t,c,a,e,o])}function It(){const t=M();return d.useCallback((n,a,e)=>{if(e===""){t({to:"/calendar/$view/$date/$calendarObjectId",params:{view:"day",date:n,calendarObjectId:a}});return}t({to:"/calendar/$view/$date/$calendarObjectId/$recurrenceId",params:{view:"day",date:n,calendarObjectId:a,recurrenceId:e}})},[t])}function Ot(){const t=M();return d.useCallback((n,a)=>{t({to:D,params:{view:"day",date:n,suggestionId:a}})},[t])}const w=new Intl.DateTimeFormat(void 0,{weekday:"short",day:"numeric",month:"long"}),h=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1}),at=new Intl.DateTimeFormat(void 0,{weekday:"long",day:"numeric",month:"long",timeZone:"UTC"}),nt=new Intl.DateTimeFormat(void 0,{weekday:"short",day:"numeric",month:"long",timeZone:"UTC"});function rt(t){return nt.format(new Date(`${t}T00:00:00Z`))}function xt(t){if(t.allDay)return`${rt(t.start.slice(0,10))}, all day`;const n=new Date(t.start),a=new Date(t.end),e=w.format(n);return w.format(a)===e?`${e}, ${h.format(n)} – ${h.format(a)}`:`${e}, ${h.format(n)} – ${w.format(a)}, ${h.format(a)}`}function Lt(t){return at.format(new Date(`${t}T00:00:00Z`))}function Nt(t){return h.format(new Date(`1970-01-01T${t}:00`))}function At(t){return h.format(new Date(t))}const L=F(400,404),C=5*6e4,E=({from:t,to:n,calendarIds:a})=>({query:a.length===0?{from:t,to:n}:{from:t,to:n,calendarId:[...a]}});function Rt(t){const{data:n,isLoading:a,error:e,refetch:o}=U({...T(E(t)),meta:L,staleTime:C,enabled:t.enabled??!0});return{instances:n?.items??[],isLoading:a,error:e,refetch:()=>{o()}}}function _t(t,n,a){const e=B({queries:t.map(i=>({...T(E({...i,calendarIds:n})),meta:L,staleTime:C,enabled:a}))}),o=t.map(i=>i.from).join("|"),r=e.map(i=>i.data),c=e.map(i=>i.isPending).join("|"),s=e.find(i=>i.error)?.error??null,u=d.useMemo(()=>r.flatMap(i=>i?.items??[]),[o,c]),l=d.useMemo(()=>{const i=new Set;return t.forEach((b,N)=>{e[N]?.isPending&&i.add(b.from)}),i},[o,c]);return{instances:u,pendingWindows:l,error:s,refetch:()=>{for(const i of e)i.error&&i.refetch()}}}function jt(t,n,a,e){const o=W(),r=[...a].join(",");d.useEffect(()=>{if(!e)return;const c=r===""?[]:r.split(",");for(const s of[-1,1]){const u=P(t,I(n,t,s));o.prefetchQuery({...T(E({...u,calendarIds:c})),staleTime:C})}},[o,t,n,r,e])}export{x as A,ht as B,C,g as D,z as E,rt as F,xt as G,Nt as H,jt as I,ft as J,mt as K,wt as L,Et as M,ut as R,Dt as a,$t as b,vt as c,$ as d,lt as e,J as f,Mt as g,V as h,m as i,dt as j,O as k,yt as l,pt as m,St as n,Ct as o,_t as p,bt as q,Tt as r,kt as s,It as t,et as u,Ot as v,gt as w,Rt as x,At as y,Lt as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as R,o as c,j as e,r as N,X as D,af as P,dq as T,d as z,aJ as Z,et as I,s as L}from"./index-CXzCthHG.js";import{c as O,R as _,C as F}from"./useCalendarEvents-lDPF_B6_.js";import{M as C}from"./mail-CHopLOA-.js";import{G as A}from"./map-pin-DbNUeHlR.js";import{S as B}from"./useLayoutTier-CUyuK30O.js";import{N as W}from"./reply-B9-kr45N.js";import{u as q}from"./useQueries-gpmd3w5y.js";const G=R("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);function U(s){const n=O(s.color),a=s.rsvp==="tentative"||s.status==="tentative";return c("flex min-w-0 overflow-hidden rounded-sm border-l-2 px-1.5 py-0.5",n.soft,n.text,n.rail,s.layout==="column"||s.stacked?"flex-col":"items-center gap-1.5",a&&"border-y border-r border-dashed",a&&n.border,s.rsvp==="declined"&&"opacity-60",s.selected&&"ring-2 ring-ring",s.density==="compact"?"text-2xs":"text-xs")}function X({title:s,timeText:n,layout:a,rsvp:l,hasThread:d,isRecurring:m,zoneCertainty:x,trailing:t,detail:p}){const r=a==="column",i=x==="ambiguous",o=!r&&p!==void 0,u=e.jsxs("span",{className:c("flex min-w-0 items-center gap-1",r&&"w-full",l==="declined"&&"line-through"),children:[n!==""&&e.jsx("span",{className:"shrink-0 tabular-nums opacity-80",children:n}),e.jsx("span",{className:"truncate font-medium",children:s})]}),h=(m||d||i)&&e.jsxs("span",{className:c("flex shrink-0 items-center gap-1",r&&"mt-0.5",!r&&t===void 0&&"ml-auto"),children:[m&&e.jsx(_,{className:"size-2.5","aria-label":"Repeats"}),d&&e.jsx(C,{className:"size-2.5","aria-label":"From mail"}),i&&e.jsx(A,{className:"size-2.5 text-warning","aria-label":"Unclear zone"})]}),g=t!==void 0&&e.jsx("span",{className:c("shrink-0 opacity-80",!r&&"ml-auto"),children:t});return e.jsxs(e.Fragment,{children:[o?e.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[u,h,g]}):e.jsxs(e.Fragment,{children:[u,h,g]}),p]})}function re({title:s,timeText:n,color:a,layout:l,density:d,rsvp:m,status:x,hasThread:t,isRecurring:p,zoneCertainty:r,selected:i,onClick:o,leading:u,trailing:h,detail:g}){const j=l==="column";return e.jsxs("button",{type:"button",onClick:o,"aria-pressed":i,className:c("group flex w-full min-w-0 text-left outline-none transition-colors","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface",j?"h-full":"items-start",u!==void 0&&"gap-2"),children:[u,e.jsx("span",{className:c(U({color:a,layout:l,density:d,rsvp:m,status:x,selected:i,stacked:g!==void 0}),"flex-1",j&&"h-full"),children:e.jsx(X,{title:s,timeText:n,layout:l,rsvp:m,hasThread:t,isRecurring:p,zoneCertainty:r,trailing:h,detail:g})})]})}const E=96,$=6;function ie({children:s,hasCard:n,onConfirm:a,onReject:l,blocked:d,blockedReason:m,remaining:x,confirmLabel:t="Add",emptyText:p="Nothing in your mail is waiting on a decision about time.",className:r}){const[i,o]=N.useState(0),[u,h]=N.useState(null);if(!n)return e.jsxs("div",{className:c("flex flex-col items-center gap-2 p-6 text-center",r),children:[e.jsx(B,{className:"size-6 text-fg-subtle","aria-hidden":!0}),e.jsx("p",{className:"text-sm text-fg-muted",children:p})]});const g=Math.abs(i)>E,j=i>0;return e.jsxs("div",{className:c("flex flex-col gap-3",r),children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"touch-pan-y select-none",style:{transform:`translateX(${i}px) rotate(${i/40}deg)`,transition:u===null?"transform 180ms ease-out":"none"},onPointerDown:b=>{h(b.clientX)},onPointerMove:b=>{if(u===null)return;const v=b.clientX-u;Math.abs(v)>$&&!b.currentTarget.hasPointerCapture(b.pointerId)&&b.currentTarget.setPointerCapture(b.pointerId),o(v)},onPointerUp:()=>{Math.abs(i)>E&&(i>0&&!d&&a(),i<0&&l()),h(null),o(0)},onPointerCancel:()=>{h(null),o(0)},children:s}),g&&e.jsx("span",{className:c("pointer-events-none absolute top-3 rounded-md px-2 py-1 text-xs font-semibold",j?"right-3 bg-accent-soft text-accent":"left-3 bg-danger-soft text-danger"),children:j?d?m:t:"Not this"})]}),e.jsxs("p",{className:"text-center text-2xs text-fg-subtle",children:[x," left · swipe right to accept, left to drop, or use the buttons"]})]})}const H="Pick a clock first. The mail never said, and the reader will not choose for you.";function J(s,n){const a=s.zoneOptions;return a===void 0?{settled:!0,timeZone:""}:a.some(l=>l.timeZone===n)?{settled:!0,timeZone:n}:{settled:!1,reason:H}}function S(s){return s.threadSubject===""?s.sender:`${s.sender} — ${s.threadSubject}`}function K(s){return s>=.85?"Read cleanly":s>=.6?"Read with gaps":"Barely read"}function le({suggestion:s,whenText:n,onAdd:a,onReview:l,onDismiss:d,onOpenThread:m,busy:x=!1,addBlocked:t=!1,zoneChoice:p,onZoneChoice:r,addLabel:i="Add",touch:o,className:u}){const[h,g]=N.useState(""),[j,b]=N.useState(!1),v=N.useId(),k=p??h,M=f=>{b(!1),r?r(f):g(f)},y=J(s,k),w=f=>()=>{if(!y.settled){b(!0);return}f(y.timeZone)};return e.jsxs("article",{"aria-label":s.title,className:c("flex flex-col gap-2 rounded-lg border border-dashed border-line-strong bg-surface-sunken p-3",u),children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"block text-2xs uppercase tracking-wider text-fg-subtle",children:["Suggested from mail · ",K(s.confidence)]}),e.jsx("span",{className:"block truncate text-sm font-medium text-fg",children:s.title}),e.jsx("span",{className:"block text-xs text-fg-muted",children:n}),s.location!==""&&e.jsx("span",{className:"block truncate text-xs text-fg-muted",children:s.location})]}),e.jsx("button",{type:"button","aria-label":"Dismiss suggestion",onClick:d,disabled:x,className:c("flex shrink-0 items-center justify-center rounded-md text-fg-subtle outline-none hover:bg-surface hover:text-fg focus-visible:ring-2 focus-visible:ring-ring",o?"size-11":"size-7"),children:e.jsx(D,{className:"size-4"})})]}),s.ambiguity!==""&&e.jsxs("p",{className:"flex items-start gap-1.5 text-2xs text-warning",children:[e.jsx(P,{className:"mt-0.5 size-3 shrink-0","aria-hidden":!0}),s.ambiguity]}),m?e.jsxs("button",{type:"button",onClick:m,className:"flex w-full min-w-0 items-center gap-1.5 rounded-sm text-left text-2xs text-accent-2 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring",children:[e.jsx(C,{className:"size-3 shrink-0"}),e.jsx("span",{className:"truncate",children:S(s)})]}):e.jsxs("p",{className:"flex w-full min-w-0 items-center gap-1.5 text-2xs text-fg-subtle",children:[e.jsx(C,{className:"size-3 shrink-0"}),e.jsx("span",{className:"truncate",children:S(s)})]}),s.zoneOptions&&e.jsxs("div",{className:"flex flex-col gap-1.5 rounded-md border border-warning/40 p-2",children:[e.jsxs("p",{className:"flex items-center gap-1.5 text-2xs font-semibold text-warning",children:[e.jsx(A,{className:"size-3 shrink-0","aria-hidden":!0}),"Which clock is this on?"]}),s.zoneOptions.map(f=>e.jsxs("button",{type:"button","aria-pressed":k===f.timeZone,onClick:()=>M(f.timeZone),className:c("rounded-md border px-2 py-1 text-left outline-none focus-visible:ring-2 focus-visible:ring-ring",o&&"min-h-11",k===f.timeZone?"border-accent bg-accent-soft":"border-line bg-surface hover:border-line-strong"),children:[e.jsx("span",{className:"block text-xs font-medium text-fg",children:f.label}),e.jsx("span",{className:"block text-2xs text-fg-subtle",children:f.note})]},f.timeZone))]}),!y.settled&&e.jsx(T,{id:v,reason:y.reason,nudged:j,className:"text-2xs text-warning"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(z,{variant:"primary",size:o?"md":"sm",icon:e.jsx(Z,{className:"size-3.5"}),onClick:w(a),disabled:x||t,"aria-describedby":y.settled?void 0:v,className:c(o&&"min-h-11 flex-1",!y.settled&&"opacity-55"),children:i}),l&&e.jsx(z,{variant:"secondary",size:o?"md":"sm",icon:e.jsx(G,{className:"size-3.5"}),onClick:w(l),disabled:x,"aria-describedby":y.settled?void 0:v,className:c(o&&"min-h-11",!y.settled&&"opacity-55"),children:"Change first"})]})]})}function oe(s){return s.defaultCalendarId!==""?"ready":s.error!==null?"failed":s.isLoading?"loading":"none"}function ce(s,n){if(s!=="ready")return s==="loading"?"Reading your calendars…":s==="failed"?e.jsxs(e.Fragment,{children:["Couldn't read your calendars, so there is nowhere to add this yet. Reload to try again."," ",e.jsx("a",{href:n,target:"_blank",rel:"noreferrer",className:"font-medium text-accent hover:underline",children:"Report an issue"})]}):e.jsxs(e.Fragment,{children:["You have no calendar yet, so there is nowhere to add this."," ",e.jsx(W,{to:"/settings/calendars",className:"font-medium text-accent hover:underline",children:"Create a calendar"})]})}const Q=L(400,404);function de(s){const n=q({queries:s.map(t=>({...I({query:{from:t.from,to:t.to}}),meta:Q,staleTime:F}))}),a=s.map(t=>t.from).join("|"),l=n.map(t=>t.data),d=n.map(t=>t.isPending).join("|"),m=N.useMemo(()=>l.flatMap(t=>t?.items??[]),[a,d]),x=N.useMemo(()=>{const t=new Set;return s.forEach((p,r)=>{n[r]?.isPending&&t.add(p.from)}),t},[a,d]);return{spans:m,pendingWindows:x,error:n.find(t=>t.error)?.error??null,refetch:()=>{for(const t of n)t.error&&t.refetch()}}}export{re as C,le as E,H as Z,X as a,ie as b,U as c,ce as d,oe as e,J as s,de as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as C,r,g as c,eT as f,eU as g,eV as h,s as y,aW as m}from"./index-CXzCthHG.js";import{f as I}from"./ErrorState-Bi4vrhhQ.js";const o=y(400,404,412),b=new Set(["calendarEventOperationsListCalendarEvents","calendarEventDetailOperationsGetCalendarEvent","calendarFreeBusyOperationsListCalendarFreeBusy"]),d={kind:"written"},i=e=>m(e)===412?{kind:"conflict"}:{kind:"refused",message:I(e)},O={this:"This",following:"Following",all:"All"};function A(){const e=C();return r.useCallback(()=>{e.invalidateQueries({predicate:t=>{const n=t.queryKey[0];if(typeof n!="object"||n===null)return!1;const s=n._id;return typeof s=="string"&&b.has(s)}})},[e])}const p=({scope:e,recurrenceId:t})=>e===void 0?{}:{scope:O[e],recurrenceId:t};function k(){const e=A(),t=c({...f(),meta:o,onSuccess:e}),n=c({...g(),meta:o,onSuccess:e}),s=c({...h(),meta:o,onSuccess:e}),l=r.useCallback(a=>t.mutateAsync({body:a}).then(()=>d).catch(i),[t]),u=r.useCallback((a,v)=>n.mutateAsync({path:{calendarObjectId:a.calendarObjectId},query:{calendarId:a.calendarId,...p(a)},headers:{"If-Match":a.etag},body:v}).then(()=>d).catch(i),[n]),E=r.useCallback(a=>s.mutateAsync({path:{calendarObjectId:a.calendarObjectId},query:{calendarId:a.calendarId,...p(a)},headers:{"If-Match":a.etag}}).then(()=>d).catch(i),[s]);return r.useMemo(()=>({createEvent:l,updateEvent:u,deleteEvent:E,isWriting:t.isPending||n.isPending||s.isPending}),[l,u,E,t.isPending,n.isPending,s.isPending])}export{k as a,A as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as T,eE as h,r as N}from"./index-CXzCthHG.js";const o=e=>String(e).padStart(2,"0"),$=e=>`${e.getUTCFullYear()}-${o(e.getUTCMonth()+1)}-${o(e.getUTCDate())}`,m=e=>{const t=e<0?"-":"+",r=Math.abs(e);return`${t}${o(Math.floor(r/60))}:${o(r%60)}`};function D(e,t){const r=new Date(`${e}T${t}:00`);return`${e}T${t}:00${m(-r.getTimezoneOffset())}`}const i=new Map;function E(e){if(i.has(e))return i.get(e);let t;try{t=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{t=void 0}return i.set(e,t),t}function l(e,t){const r=E(e);if(!r)return Number.NaN;const n=r.formatToParts(new Date(t)),a=b=>Number(n.find(g=>g.type===b)?.value),s=a("hour")%24;return(Date.UTC(a("year"),a("month")-1,a("day"),s,a("minute"),a("second"))-t)/6e4}function L(e,t,r){if(r==="")return`${e}T${t}:00+00:00`;const n=Date.parse(`${e}T${t}:00Z`),a=l(r,n);if(Number.isNaN(a))return D(e,t);const s=l(r,n-a*6e4);return`${e}T${t}:00${m(Number.isNaN(s)?a:s)}`}function C(e,t){const r=Date.parse(e),n=l(t,r),a=Number.isNaN(n)?-new Date(r).getTimezoneOffset():n,s=new Date(r+a*6e4);return`${$(s)}T${o(s.getUTCHours())}:${o(s.getUTCMinutes())}:${o(s.getUTCSeconds())}${m(a)}`}const u=e=>D(e,"00:00");function c(e,t){const[r,n,a]=e.split("-").map(Number);return $(new Date(Date.UTC(r,n-1,a+t)))}function d(e){const[t,r,n]=e.split("-").map(Number),a=new Date(Date.UTC(t,r-1,n));return c(e,-((a.getUTCDay()+6)%7))}function U(e,t){const[r,n]=t.split("-").map(Number);if(e==="year")return[`${r}-01-01`,`${r+1}-01-01`];if(e==="month"){const s=`${r}-${o(n)}-01`,p=n===12?`${r+1}-01-01`:`${r}-${o(n+1)}-01`;return[d(s),c(d(c(p,-1)),7)]}if(e==="day")return[t,c(t,1)];const a=d(t);return[a,c(a,7)]}function M(e,t){const[r,n]=U(e,t);return{from:u(r),to:u(n)}}function F(e,t){return{from:u(e),to:u(c(e,t))}}const R=()=>Intl.DateTimeFormat().resolvedOptions().timeZone,y="";function k(e){if(e!==y)return e;const t=R();return Intl.supportedValuesOf("timeZone").includes(t)?t:y}const v={Cal1:"cal-1",Cal2:"cal-2",Cal3:"cal-3",Cal4:"cal-4",Cal5:"cal-5",Cal6:"cal-6"},w={Local:"local",Explicit:"explicit",Ambiguous:"ambiguous"},I="#";function z(e,t){return t===""?e:`${e}${I}${t}`}function f(e){const t=e.indexOf(I);return t===-1?{calendarObjectId:e,recurrenceId:""}:{calendarObjectId:e.slice(0,t),recurrenceId:e.slice(t+1)}}const O=(e,t)=>{const r=[...e].sort((n,a)=>Date.parse(n.start)-Date.parse(a.start));return r.find(n=>Date.parse(n.end)>Date.parse(t))??r[0]};function B(e,t,r){const n=O(e.filter(a=>{const s=f(a.id);return s.calendarObjectId===t&&s.recurrenceId!==""}),r);return n?f(n.id):void 0}function P(e,t,r,n){const a=O(e.filter(s=>s.calendarObjectId===t&&j(s)).map(s=>x(s,"",n)),r);if(a)return{...f(a.id),calendarId:a.calendarId,date:a.start.slice(0,10)}}function S(e){return{id:e.calendarId,accountId:e.accountConfigId,accountLabel:"",name:e.displayName,color:v[e.color]??"cal-1",...e.source==="Subscribed"?{readOnly:!0,sync:e.subscriptionEnabled?"live":"paused",syncError:e.subscriptionError}:{}}}function x(e,t,r){return{id:z(e.calendarObjectId,e.recurrenceId),calendarId:e.calendarId,title:e.summary,start:e.allDay?e.start.slice(0,10):C(e.start,r),end:e.allDay?e.end.slice(0,10):C(e.end,r),allDay:e.allDay,location:"",notes:"",attendees:[],myRsvp:"accepted",threadId:"",threadSubject:"",timeZone:t,zoneCertainty:w[e.zoneCertainty]??"explicit",recurrenceRule:e.hasRecurrence?"Repeats":"",seriesId:e.hasRecurrence?e.icalUid:"",seriesException:!1,status:e.status==="Tentative"?"tentative":"confirmed"}}const j=e=>e.status!=="Cancelled";function W(){const{data:e,isLoading:t,error:r}=T(h());return N.useMemo(()=>{const n=e?.items??[],a=n.map(S);return{calendars:a,collections:n,colorByCalendarId:Object.fromEntries(a.map(s=>[s.id,s.color])),timeZoneByCalendarId:Object.fromEntries(n.map(s=>[s.calendarId,s.timezone])),defaultCalendarId:(n.find(s=>s.source==="Default")??n[0])?.calendarId??"",isLoading:t,error:r??null}},[e,t,r])}export{y as U,F as a,M as b,z as c,R as d,c as e,k as f,L as g,C as h,j as i,P as j,f as r,B as s,x as t,W as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as a}from"./index-CXzCthHG.js";import{a as e,D as s}from"./useMediaQuery-DB2OdJvp.js";const n=a("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),o=768,h=t=>t!=="desktop",c=()=>{const t=e(`(min-width: ${o}px)`);return e(s)?"desktop":t?"tablet":"phone"};export{n as S,h as i,c as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,u as P,c0 as O,a1 as p,n as U,a0 as B,f as N,a as $,cJ as D,cy as L}from"./index-CXzCthHG.js";import{h as F,j as _,k as v}from"./reply-B9-kr45N.js";const E="/mail/brief/compose/{-$outboxMessageId}",w="/mail/flagged/compose/{-$outboxMessageId}",S="/mail/outbox/compose/{-$outboxMessageId}",R="/mail/$mailboxId/compose/{-$outboxMessageId}";function T(){const e=p({from:E,shouldThrow:!1}),t=p({from:w,shouldThrow:!1}),s=p({from:S,shouldThrow:!1}),r=p({from:R,shouldThrow:!1});return e??t??s??r}function te(){return T()!==void 0}function se(){return T()?.outboxMessageId}function K(e,t,s){return e==="flagged"?{to:w,params:{outboxMessageId:s}}:e==="outbox"?{to:S,params:{outboxMessageId:s}}:e==="mailbox"&&t?{to:R,params:{mailboxId:t,outboxMessageId:s}}:{to:E,params:{outboxMessageId:s}}}function b(){const e=P(),t=F(),{list:s,mailboxId:r}=_();return a.useCallback((o,n)=>{e({...K(s,r,o),search:O,hash:n?.keepPanels?!0:t,replace:n?.replace??!1})},[e,t,s,r])}function re(){const e=b();return a.useCallback(()=>e(void 0),[e])}function oe(){const e=b();return a.useCallback(t=>e(t),[e])}function ne(){const e=b();return a.useCallback(t=>e(t,{replace:!0,keepPanels:!0}),[e])}function ae(){return v()}const Q=new Set(["rfc822","global"]),q=e=>e.mediaType.toUpperCase()==="MESSAGE"&&Q.has(e.mediaSubtype.toLowerCase()),k=(e,t)=>e.partPath.startsWith(`${t}.`),I=e=>{const t=e.filter(q);return e.filter(s=>!t.some(r=>k(s,r.partPath)))},ce=(e,t)=>e.filter(s=>k(s,t)),G=e=>{const t=I(e).filter(o=>!o.isMultipart&&o.disposition!=="attachment"&&o.mediaType==="TEXT"&&o.contentUrl.length>0),s=t.find(o=>o.mediaSubtype.toUpperCase()==="HTML");if(s)return{kind:"html",contentUrl:s.contentUrl};const r=t.find(o=>o.mediaSubtype.toUpperCase()==="PLAIN");return r?{kind:"text",contentUrl:r.contentUrl}:null},g={all:["messages"],detail:e=>[...g.all,"detail",e],body:e=>[...g.detail(e),"body"]};class f extends Error{reason;status;retryAfterSeconds;constructor(t,s,r,o){super(s),this.name="BodyFetchError",this.reason=t,this.status=r,this.retryAfterSeconds=o}}const W=e=>{const t=Number.parseInt(e??"",10);return!Number.isFinite(t)||t<=0?1:Math.min(t,30)},X=8,H="x-remit-403-reason",Y=(e,t)=>{const s=t?.trim()??"";return e===401?"auth":e===403?s.length>0?"auth":"body-missing":e===404?"body-missing":"generic"},j=(e,t)=>(t??"").toLowerCase().startsWith("text/html")?/<div\s+id=["']root["']/i.test(e):!1,z=(e,t)=>{const s=(t??"").toLowerCase();return!!(e==="text"&&s.startsWith("text/html"))},J=async(e,t,s=async()=>null)=>{const r={},o=await s();o&&(r.Authorization=`Bearer ${o}`);const n=await L(e,{headers:r});if(n.status===202)throw new f("not-ready","Message body is still syncing",202,W(n.headers.get("Retry-After")));if(!n.ok){const l=n.headers.get(H),h=Y(n.status,l);throw new f(h,`Failed to load message body (${n.status} ${n.statusText})`,n.status)}const c=n.headers.get("content-type");if(z(t,c))throw new f("content-type-mismatch",`Refusing to render message body — expected ${t}, got Content-Type ${c}`);const m=await n.text();if(j(m,c))throw new f("spa-shell-leak","Refusing to render message body — response looks like the SPA shell (CloudFront 403/404 fallback leaked through to /content/*)");return m},V=async(e,t)=>(t.isRetryAfterNotReady&&await e.refetchDescribeMessage(),e.fetchContent(t.contentUrl,t.kind)),ie=({messageId:e,bodyParts:t,enabled:s=!0})=>{const r=t?G(t):null,o=U(),{getToken:n}=B(),c=a.useRef(null),m=N(),l=a.useRef(!1),h=a.useRef(null),C=e&&r?`${e}:${r.contentUrl}`:null;h.current!==C&&(h.current=C,l.current=!1);const i=$({queryKey:e?[...g.body(e),r?.contentUrl??null]:["messages","body","noop"],queryFn:()=>{if(!r)throw new Error("No renderable body part");if(!e)throw new Error("No messageId");const d=l.current;return l.current=!1,V({fetchContent:(u,x)=>J(u,x,n),refetchDescribeMessage:()=>m.refetchQueries({queryKey:D({path:{messageId:e}})})},{contentUrl:r.contentUrl,kind:r.kind,isRetryAfterNotReady:d})},enabled:s&&!!e&&!!r,staleTime:300*1e3,gcTime:1800*1e3,retry:(d,u)=>u instanceof f&&u.reason==="not-ready"?d<X:d<1,retryDelay:(d,u)=>u instanceof f&&u.reason==="not-ready"?(l.current=!0,(u.retryAfterSeconds??1)*1e3):1e3,meta:{softError:!0}}),y=i.isLoading&&!!r,A=t!==void 0&&r===null;a.useEffect(()=>{y&&(c.current=performance.now())},[y]),a.useEffect(()=>{i.isSuccess&&c.current!==null&&(o.recordTiming("message.body.load",Math.round(performance.now()-c.current)),c.current=null)},[i.isSuccess,o]);const M=i.data&&r?{kind:r.kind,body:i.data}:void 0;return{picked:r,data:M,isLoading:y,hasNoRenderablePart:A,isError:i.isError,error:i.error,refetch:i.refetch}};export{f as B,te as a,ie as b,Y as c,se as d,ne as e,ae as f,oe as g,ce as h,q as i,I as o,re as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c1 as Q,c2 as y,c3 as S,c4 as w,c5 as C,f as k,c6 as q,c7 as x,r as p,c8 as M,c9 as H,ca as L,cb as P,cc as O,cd as B,ce as A}from"./index-CXzCthHG.js";function R(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function T(r,e,s){const t=r.slice(0);return t[e]=s,t}var z=class extends Q{#i;#e;#n;#r;#s;#t;#o;#u;#h;#c=[];constructor(r,e,s){super(),this.#i=r,this.#r=s,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(r=>{r.subscribe(e=>{this.#d(r,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(r=>{r.destroy()})}setQueries(r,e){this.#n=r,this.#r=e,y.batch(()=>{const s=this.#s,t=this.#f(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=s.length!==i.length,a=i.some((o,d)=>o!==s[d]),f=u||a,b=f?!0:n.some((o,d)=>{const g=this.#e[d];return!g||!S(o,g)});!f&&!b||(f&&(this.#c=t,this.#s=i),this.#e=n,this.hasListeners()&&(f&&(R(s,i).forEach(o=>{o.destroy()}),R(i,s).forEach(o=>{o.subscribe(d=>{this.#d(o,d)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#f(r),t=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,e,i),()=>this.#a(t,s)]}#a(r,e){return e.map((s,t)=>{const i=r[t];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,e,s){if(e){const t=this.#h,i=s!==void 0&&t!==void 0&&(t.length!==s.length||s.some((n,u)=>n!==t[u]));return(!this.#t||this.#e!==this.#u||i||e!==this.#o)&&(this.#o=e,this.#u=this.#e,s!==void 0&&(this.#h=s),this.#t=w(this.#t,e(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#f(r){const e=new Map;this.#s.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(t):e.set(i,[t])});const s=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=e.get(i.queryHash)?.shift()??new C(this.#i,i);s.push({defaultedQueryOptions:i,observer:u})}),s}#d(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=T(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const r=this.#a(this.#e,this.#c),e=this.#b(),s=this.#t,t=e?s:this.#l(r,this.#r?.combine);(e||s!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function U({queries:r,...e},s){const t=k(),i=q(),n=x(),u=p.useMemo(()=>r.map(h=>{const c=t.defaultQueryOptions(h);return c._optimisticResults=i?"isRestoring":"optimistic",c}),[r,t,i]);u.forEach(h=>{M(h);const c=t.getQueryCache().get(h.queryHash);H(h,n,c)}),L(n);const[a]=p.useState(()=>new z(t,u,e)),[f,b,o]=a.getOptimisticResult(u,e.combine),d=!i&&e.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>d?a.subscribe(y.batchCalls(h)):P,[a,d]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setQueries(u,e)},[u,e,a]);const m=f.some((h,c)=>O(u[c],h))?f.flatMap((h,c)=>{const l=u[c];if(l&&O(l,h)){const E=new C(t,l);return B(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=f.find((h,c)=>{const l=u[c];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{U as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as E,T as K,o as Q,d as U,f as N,w as z,r as o,aM as M,z as G,C as $,n as B,G as I,H as X,J,K as V}from"./index-CXzCthHG.js";import{C as Y}from"./circle-check-big-ZwVj0mbk.js";import{R as Z}from"./refresh-cw-aweb7slK.js";import{u as L}from"./useQueries-gpmd3w5y.js";function Se({state:e,onRefresh:s,label:t,errorMessage:n,hasUpdate:a,size:u="sm",className:c}){const i=e==="refreshing",r=e==="error",h=e==="success",y=r?E.jsx(K,{className:"size-4 text-danger"}):h?E.jsx(Y,{className:"size-4 text-positive"}):E.jsx(Z,{className:Q("size-4",i&&"animate-spin")}),w=r?`${t} — failed: ${n??"try again"}`:i?`${t} — refreshing`:h?`${t} — up to date`:a?`${t} — new mail`:t;return E.jsxs("div",{className:"relative inline-flex",children:[E.jsx(U,{variant:"ghost",size:u,icon:y,onClick:s,disabled:i,"aria-label":w,"aria-busy":i||void 0,title:r?n:t,className:c}),e==="idle"&&a&&E.jsx("span",{"aria-hidden":"true",className:"absolute right-1 top-1 size-1.5 rounded-full bg-accent-2"})]})}const ee=180*1e3,we=30*1e3;let P=0;const R=new Set,te=(e=Date.now())=>{P=e+ee;for(const s of R)s()},xe=(e=Date.now())=>e<P,pe=e=>(R.add(e),()=>{R.delete(e)}),C=6e4,se=new Set(["sent","drafts","trash","archive"]),T=(e,s)=>{const t=new Map;for(const n of e){const a=s.get(n.mailboxId)?.role;a&&se.has(a)||t.set(n.mailboxId,n.highWaterMarkUid)}return t},F=(e,s)=>{const t=[];for(const[n,a]of s)a>(e.get(n)??0)&&t.push(n);return t},re=(e,s)=>F(e,s).length>0,q=o.createContext(null),ne=()=>{const e=o.useContext(q);if(!e)throw new Error("useMailFreshness must be used inside <MailFreshnessProvider>");return e};function Ee({accountIds:e,children:s}){const t=N(),{resultFolderIndex:n}=z(),a=o.useRef(new Map),u=o.useRef(new Set),c=o.useRef(new Map),[i,r]=o.useState(new Set),h=L({queries:e.map(l=>({...M({path:{accountId:l}}),refetchInterval:C,staleTime:C,meta:{softError:!0}}))}),y=h.map(l=>l.dataUpdatedAt).join(","),w=e.join(",");o.useEffect(()=>{let l=!1;const f=new Set(i);e.forEach((d,p)=>{const b=h[p]?.data;if(!b)return;const g=T(b.mailboxes??[],n),v=c.current.get(d);if(c.current.set(d,g),v){const A=F(v,g);A.length>0&&G(t,$(A))}if(!u.current.has(d)){u.current.add(d),a.current.set(d,g);return}if(f.has(d))return;const W=a.current.get(d)??new Map;re(W,g)&&(f.add(d),l=!0)}),l&&r(f)},[w,y]);const S=o.useCallback(l=>l.some(f=>i.has(f)),[i]),x=o.useCallback(l=>{r(f=>{if(l.every(p=>!f.has(p)))return f;const d=new Set(f);for(const p of l)d.delete(p);return d});for(const f of l){const d=t.getQueryData(M({path:{accountId:f}}).queryKey);a.current.set(f,T(d?.mailboxes??[],n)),u.current.add(f)}},[t,n]),m=o.useMemo(()=>({hasNewMail:S,acknowledge:x}),[S,x]);return E.jsx(q.Provider,{value:m,children:s})}const oe=new Set(["discovering_mailboxes","syncing_inbox","syncing_others"]);function j(e){return!!e&&oe.has(e)}const D=3e3,ae=D*2,_={syncing:!1,resolved:!1,synced:0,total:0};function be(e,s){const t=e.join(","),[n,a]=o.useState(!1),[u,c]=o.useState(!1);o.useEffect(()=>{a(!1),c(!1)},[t,s]),o.useEffect(()=>{if(!s)return;const m=setTimeout(()=>c(!0),ae);return()=>clearTimeout(m)},[t,s]);const i=L({queries:e.map(m=>({...M({path:{accountId:m}}),enabled:s&&!n,refetchInterval:D,meta:{softError:!0}}))}),r=i.every(m=>m.isSuccess||m.isError),h=i.length===0||r||u;let y=!1,w=0,S=0;for(const m of i)if(j(m.data?.syncPhase)){y=!0;for(const l of m.data?.mailboxes??[])w+=l.messagesSynced,S+=l.messagesTotal}const x=s&&h&&!y;return o.useEffect(()=>{x&&a(!0)},[x]),!s||!h?_:{syncing:y,resolved:!0,synced:w,total:S}}const ie=2e3,ce=45e3,ue=e=>new Promise(s=>setTimeout(s,e)),k=e=>e instanceof Error&&e.message?e.message:"Something went wrong",le=e=>{J(e,{softError:!0},"user")&&V(e)},O=(e,s)=>e.fetchQuery({...M({path:{accountId:s}}),staleTime:0}),H=e=>e.mailboxes?.find(s=>s.fullPath?.toUpperCase()==="INBOX")?.lastSyncedAt??0,fe=async({accountId:e,readStatus:s,baselineLastSyncAt:t,baselineInboxSyncedAt:n=0,onInboxSynced:a,deadline:u,pollMs:c=ie})=>{let i=!1;for(;;){const r=await s().then(S=>({ok:!0,data:S})).catch(S=>({ok:!1,error:S}));if(!r.ok)return{accountId:e,message:k(r.error)};const{syncPhase:h,lastSyncAt:y}=r.data;if((y??0)>t&&!j(h))return h==="error"?{accountId:e,message:"Sync failed for this account"}:void 0;if(!i&&H(r.data)>n&&(i=!0,a?.()),Date.now()>=u)return{accountId:e,message:"Refresh is taking longer than usual"};await ue(c)}},de=async(e,s,t,n,a)=>{const u=await O(e,t).then(r=>({ok:!0,lastSyncAt:r.lastSyncAt??0,inboxSyncedAt:H(r)})).catch(r=>({ok:!1,error:r}));if(!u.ok)return{accountId:t,enqueued:!1,ok:!1,message:k(u.error)};const c=await I({path:{accountId:t},throwOnError:!0}).then(()=>({ok:!0})).catch(r=>({ok:!1,error:r}));if(!c.ok)return le(c.error),{accountId:t,enqueued:!1,ok:!1,message:k(c.error)};s.recordEvent("sync.triggered");const i=await fe({accountId:t,readStatus:()=>O(e,t),baselineLastSyncAt:u.lastSyncAt,baselineInboxSyncedAt:u.inboxSyncedAt,onInboxSynced:()=>a(t),deadline:n});return i?{accountId:t,enqueued:!0,ok:!1,message:i.message}:{accountId:t,enqueued:!0,ok:!0}},Me=(e,s={})=>{const t=N(),n=B(),{acknowledge:a}=ne(),[u,c]=o.useState("idle"),[i,r]=o.useState(),h=o.useRef(0),y=o.useRef(e);y.current=e;const w=o.useRef(s);w.current=s,o.useEffect(()=>{if(u!=="success")return;const x=setTimeout(()=>c("idle"),2e3);return()=>clearTimeout(x)},[u]);const S=o.useCallback(()=>{const x=y.current;if(x.length===0){c("error"),r("Nothing to refresh yet");return}const m=++h.current;c("refreshing"),r(void 0),te();const l=f=>{h.current===m&&(t.invalidateQueries({queryKey:X({path:{accountId:f}})}),w.current.onSettled?.())};(async()=>{const f=Date.now()+ce,d=await Promise.all(x.map(g=>de(t,n,g,f,l)));if(h.current!==m)return;const p=d.filter(g=>g.enqueued).map(g=>g.accountId);for(const g of p)l(g);p.length>0&&a(p);const b=d.filter(g=>!g.ok);b.length===0?c("success"):(c("error"),r(b[0]?.message))})()},[a,t,n]);return{state:u,errorMessage:i,refresh:S}};export{we as H,Ee as M,Se as R,Me as a,j as b,be as c,xe as i,pe as s,ne as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{E as r,r as s,bQ as t}from"./index-CXzCthHG.js";import{u as m}from"./useQueries-gpmd3w5y.js";const a=i=>({items:i.map(e=>e.data?.items??[]),isPending:i.some(e=>e.isPending),error:i.find(e=>e.error)?.error??null});function u(i){const e=m({queries:i.map(o=>({...r({path:{accountId:o.accountId}}),staleTime:1/0})),combine:a});return{index:s.useMemo(()=>t(i.map((o,n)=>({folderAppointments:o.folderAppointments,mailboxes:e.items[n]??[]}))),[i,e]),isPending:e.isPending,error:e.error}}export{u};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{j as s,aF as v,d,aP as _,e as b,bl as N,bj as y,B as C,af as E,bC as $,bM as f,bN as A,bO as M,a as k,c as P,r as l,bP as W,aA as p,aB as x,u as z,aI as O,aK as B}from"./index-CXzCthHG.js";import{S as L}from"./settings-screen-DxN6mICP.js";import{f as q}from"./ErrorState-Bi4vrhhQ.js";import{C as D}from"./copy-BCzZpML3.js";import{E as F}from"./external-link-tmwz3hf0.js";import{B as h}from"./bug-D6xXLRSh.js";import{C as S}from"./circle-check-CQPt1U9q.js";import{S as U}from"./SignInAgain-CCZnH9Mt.js";import{u as G}from"./useResultFolderIndex-EOtkNq1e.js";import{w as H}from"./help-copy-BN4-5aIP.js";import"./avatar-qD7fcqFf.js";import"./chevron-left-Bt4eJ35K.js";import"./menu-ouYQ8aI9.js";import"./circle-help-BtMu5xYr.js";import"./useQueries-gpmd3w5y.js";import"./kbd-DxdiA2Fl.js";function Q({report:e,onClose:t,issueUrl:a,onCopy:n}){return e===null?null:s.jsx(v,{open:!0,onClose:t,title:"Report this message",children:s.jsxs("div",{className:"flex max-h-[80vh] flex-col",children:[s.jsxs("header",{className:"space-y-1 border-b border-line px-4 py-3",children:[s.jsx("h3",{className:"text-sm font-semibold text-fg",children:"Report this message"}),s.jsx("p",{className:"text-xs text-fg-muted",children:"This is everything the report contains. It describes what went wrong with the message — never its contents, addresses, subject, attachment names, folder name, or the parser's own error text."})]}),s.jsx("pre",{className:"flex-1 overflow-auto bg-surface-sunken px-4 py-3 text-2xs leading-relaxed whitespace-pre-wrap text-fg-muted",children:e}),s.jsxs("footer",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-4 py-3",children:[s.jsx(d,{variant:"ghost",size:"sm",onClick:t,children:"Cancel"}),s.jsx(d,{variant:"secondary",size:"sm",icon:s.jsx(D,{className:"size-3.5"}),onClick:()=>n(e),children:"Copy report"}),s.jsx(_,{external:!0,size:"sm",href:a,icon:s.jsx(F,{className:"size-3.5"}),children:"Open on GitHub"})]})]})})}const V={BodyParse:"The message is built in a way Remit could not read."};function Y(e){return V[e]}function R(e){return e.split(";")[0].trim()}const j=/^[A-Za-z0-9!#$%&'*+._-]+$/,T=/^[A-Za-z0-9!#$%&'*+._-]+\/[A-Za-z0-9!#$%&'*+._-]+$/;function m(e,t){return t.test(e)?`\`${e}\``:`\`${JSON.stringify(e).replace(/`/g,"\\u0060")}\` (malformed)`}function Z(e){const t=R(e);return T.test(t)?t:JSON.stringify(t)}const g="_not read_";function J(e){return e.length===0?["(no MIME structure was read)"]:e.map(t=>`${" ".repeat(t.depth)}- ${Z(t.contentType)}`)}const K="_No message content, addresses, subject, attachment names or parser output are included._";function I(e){return{head:[`### Message quarantined at \`${e.failureStage}\``,"",`- **Failure**: \`${e.failureCode}\``,`- **Folder role**: ${e.mailboxRole??"_none appointed_"}`,`- **Failing part**: ${e.failurePartPath==null?"_whole message_":`\`${e.failurePartPath}\``}`,`- **Attempts before quarantine**: ${e.attempts}`,`- **Worker build**: ${e.workerVersion}`,`- **Message-ID hash**: ${e.messageIdHash==null?"_none declared_":`\`${e.messageIdHash}\``}`,"","#### Message shape","",`- **Content-Type**: ${e.contentType==null?g:m(R(e.contentType),T)}`,`- **Content-Transfer-Encoding**: ${e.transferEncoding==null?g:m(e.transferEncoding,j)}`,`- **Charset**: ${e.charset==null?"_not declared_":m(e.charset,j)}`,`- **Size**: ${e.sizeBytes==null?g:`${e.sizeBytes} bytes`}`,"","MIME structure:"].join(`
|
|
2
|
-
`),structure:J(e.structure).join(`
|
|
3
|
-
`),disclaimer:K}}function X(e){const{head:t,structure:a,disclaimer:n}=I(e);return[t,"","```",a,"```","",n].join(`
|
|
4
|
-
`)}function ee(e){return`Message quarantined: ${e.failureCode} at ${e.failureStage}`}function se(e){return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function te({entry:e,onCutBug:t}){return s.jsxs("li",{className:"flex flex-col gap-2 border-b border-line px-row-inset py-3 last:border-b-0 sm:flex-row sm:items-start sm:justify-between",children:[s.jsxs("div",{className:"min-w-0 space-y-1",children:[s.jsx("p",{className:"text-sm text-fg",children:Y(e.failureStage)}),s.jsx("p",{className:"truncate text-xs text-fg-muted",title:e.failureMessage,children:e.failureMessage}),s.jsxs("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-2xs text-fg-subtle",children:[e.mailboxRole&&s.jsx(b,{tone:"warning",children:N(e.mailboxRole)}),s.jsx("span",{className:"truncate",title:e.mailboxPath,children:y(e.mailboxPath,e.mailboxDelimiter)}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`uid ${e.uid}`}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:se(e.quarantinedAt)}),e.attempts>1&&s.jsxs(s.Fragment,{children:[s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`${e.attempts} attempts`})]})]})]}),s.jsx(d,{variant:"secondary",size:"sm",className:"shrink-0",icon:s.jsx(h,{className:"size-3.5"}),onClick:()=>t(e),children:"Cut a bug"})]})}function ae({entries:e,onCutBug:t}){return s.jsxs("section",{className:"space-y-3",children:[s.jsxs("header",{className:"space-y-1",children:[s.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Messages set aside"}),s.jsx("p",{className:"text-xs text-fg-muted",children:"Mail Remit could not read is set aside here instead of being skipped, so nothing goes missing quietly. The rest of the folder keeps syncing. Recovering a set-aside message is a re-sync, not a per-row action."})]}),e.length===0&&s.jsxs("div",{className:"flex items-center gap-2 rounded-sm border border-line bg-surface px-row-inset py-3",children:[s.jsx(S,{className:"size-4 shrink-0 text-positive","aria-hidden":!0}),s.jsx("p",{className:"text-sm text-fg-muted",children:"Every message has been read successfully. Nothing is set aside."})]}),e.length>1&&s.jsx(C,{tone:"warning",children:s.jsxs("p",{className:"flex items-start gap-2",children:[s.jsx(E,{className:"mt-0.5 size-4 shrink-0","aria-hidden":!0}),s.jsxs("span",{children:[s.jsx("span",{className:"font-semibold",children:`${e.length} messages could not be read.`})," ","More than one means something is wrong with how Remit reads mail, not with the mail. Reporting one of these gets it fixed."]})]})}),e.length>0&&s.jsx("ul",{className:"rounded-sm border border-line bg-surface",children:e.map(a=>s.jsx(te,{entry:a,onCutBug:t},a.quarantineId))})]})}const ne={Retrying:"The message could not be synced. Remit tries again every sync.",GaveUp:"The message body could not be downloaded. Remit has stopped trying."};function re(e){return ne[e.state]}const ie="_No message content, addresses, subject, folder name or error text are included._";function oe(e){return[`### Message failed to sync at \`${e.stage}\``,"",`- **State**: \`${e.state}\``,`- **Attempts**: ${e.attempts}`,"",ie].join(`
|
|
5
|
-
`)}function le(e){return`Message failed to sync: ${e.state} at ${e.stage}`}function ce(e){return new Date(e).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function de({entry:e,onReport:t}){const a=e.state==="GaveUp";return s.jsxs("li",{className:"flex flex-col gap-2 border-b border-line px-row-inset py-3 last:border-b-0 sm:flex-row sm:items-start sm:justify-between",children:[s.jsxs("div",{className:"min-w-0 space-y-1",children:[s.jsx("p",{className:"text-sm text-fg",children:re(e)}),s.jsxs("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-2xs text-fg-subtle",children:[s.jsx(b,{tone:a?"danger":"warning",children:a?"Gave up":"Retrying"}),s.jsx("span",{className:"truncate",children:e.folderLabel}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`uid ${e.uid}`}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`since ${ce(e.createdAt)}`}),s.jsx("span",{"aria-hidden":!0,children:"·"}),s.jsx("span",{children:`${e.attempts} attempts`})]})]}),s.jsx(d,{variant:"secondary",size:"sm",className:"shrink-0",icon:s.jsx(h,{className:"size-3.5"}),onClick:()=>t(e),children:"Cut a bug"})]})}function ue({entries:e,total:t,onReport:a}){return s.jsxs("section",{className:"space-y-3",children:[s.jsxs("header",{className:"space-y-1",children:[s.jsx("h2",{className:"text-sm font-semibold text-fg",children:"Messages that failed to sync"}),s.jsx("p",{className:"text-xs text-fg-muted",children:"A message shows here after three failed rounds and leaves on its own once it syncs. The rest of the folder keeps syncing."})]}),e.length===0&&s.jsxs("div",{className:"flex items-center gap-2 rounded-sm border border-line bg-surface px-row-inset py-3",children:[s.jsx(S,{className:"size-4 shrink-0 text-positive","aria-hidden":!0}),s.jsx("p",{className:"text-sm text-fg-muted",children:"Every message is syncing. Nothing has failed."})]}),t>e.length&&s.jsx("p",{className:"text-xs text-fg-muted",children:`Showing the ${e.length} newest of ${t} messages that failed to sync.`}),e.length>0&&s.jsx("ul",{className:"rounded-sm border border-line bg-surface",children:e.map(n=>s.jsx(de,{entry:n,onReport:a},n.syncWarningId))})]})}function me(e,t){return{quarantineId:e.quarantineId,accountId:e.accountId,mailboxId:e.mailboxId,uidValidity:e.uidValidity,uid:e.uid,mailboxRole:e.mailboxRole?$[e.mailboxRole]:void 0,mailboxPath:e.mailboxPath,mailboxDelimiter:t,failureStage:e.failureStage,failureCode:e.failureCode,failureMessage:e.failureMessage,failurePartPath:e.failurePartPath,quarantinedAt:e.quarantinedAt,attempts:e.attempts,sizeBytes:e.sizeBytes,contentType:e.contentType,transferEncoding:e.transferEncoding,charset:e.charset,structure:e.structure,messageIdHash:e.messageIdHash,workerVersion:e.workerVersion}}const ge=3,pe=(e,t)=>e===A.Body&&t>=ge?f.GaveUp:f.Retrying,xe="A folder no longer listed";function he(e){return e?.role?N(e.role):e?.providerPath?y(e.providerPath,e.hierarchyDelimiter):xe}function fe(e,t){return{syncWarningId:e.syncWarningId,uid:e.uid,stage:e.stage,state:pe(e.stage,e.attempts),attempts:e.attempts,createdAt:e.createdAt,folderLabel:he(t)}}const je=[],be=[];function Ne(e){window.open(e,"_blank","noopener,noreferrer")}function ye(e){return{report:X(e),issueUrl:p(x({quarantine:I(e),title:ee(e)}))}}function Se(e){const t=oe(e);return{report:t,issueUrl:p(x({syncWarning:t,title:le(e)}))}}function Re({signIn:e}){return s.jsx("section",{role:"alert",className:"space-y-3",children:s.jsxs("div",{className:"space-y-2 rounded-sm border border-danger/40 bg-danger-soft px-row-inset py-3",children:[s.jsx("p",{className:"text-sm font-medium text-danger",children:"Your session has ended."}),s.jsx("p",{className:"text-sm text-fg-muted",children:"Sign in again to see the messages that failed to sync or were set aside."}),e]})})}function Te({error:e}){return s.jsx("section",{role:"alert",className:"space-y-3",children:s.jsxs("div",{className:"space-y-2 rounded-sm border border-danger/40 bg-danger-soft px-row-inset py-3",children:[s.jsx("p",{className:"text-sm font-medium text-danger",children:"The warnings could not be read."}),s.jsx("p",{className:"break-words text-sm text-fg-muted",children:q(e)}),s.jsx("p",{className:"text-xs text-fg-muted",children:"Mail may still be failing to sync or have been set aside — this page cannot say either way until it can read the list. Reporting this gets it fixed."}),s.jsx(d,{variant:"secondary",size:"sm",icon:s.jsx(h,{className:"size-3.5"}),onClick:()=>Ne(p(x())),children:"Report this"})]})})}function Ie({read:e,signIn:t}){const[a,n]=l.useState(null),[r,i]=l.useState(!1);if(e.kind==="Pending")return s.jsx("p",{className:"animate-pulse text-sm text-fg-subtle",children:"Checking for warnings…"});if(e.kind==="SignedOut")return s.jsx(Re,{signIn:t});if(e.kind==="Failed")return s.jsx(Te,{error:e.error});const u=o=>{navigator.clipboard.writeText(o).then(()=>{i(!1),n(null)},()=>{i(!0),n(null)})};return s.jsxs("div",{className:"space-y-6",children:[r&&s.jsx("p",{role:"alert",className:"text-sm text-danger",children:"The report was not copied — this browser refused clipboard access. Cut the bug again and use Open on GitHub, which needs no clipboard."}),s.jsx(ue,{entries:e.warnings,total:e.warningsTotal,onReport:o=>n(Se(o))}),s.jsx(ae,{entries:e.quarantine,onCutBug:o=>n(ye(o))}),s.jsx(Q,{report:a?.report??null,issueUrl:a?.issueUrl??"",onClose:()=>n(null),onCopy:u})]})}function we(e,t){return e.get(t)?.hierarchyDelimiter??""}function ve(){const e=M(),t=k(P()),a=l.useMemo(()=>t.data?.accounts??[],[t.data]),n=G(a),r=e.data?.entries??je,i=e.data?.warnings??be,u=l.useMemo(()=>r.map(c=>me(c,we(n.index,c.mailboxId))),[r,n.index]),o=l.useMemo(()=>i.map(c=>fe(c,n.index.get(c.mailboxId))),[i,n.index]),w=_e(e.error??t.error??n.error,e.isPending||t.isPending||n.isPending,{kind:"Ready",quarantine:u,warnings:o,warningsTotal:e.data?.warningsTotal??0});return s.jsx(Ie,{read:w,signIn:s.jsx(U,{})})}function _e(e,t,a){return W(e)?{kind:"SignedOut"}:e?{kind:"Failed",error:e}:t?{kind:"Pending"}:a}function Ge(){const e=z(),[t,a]=l.useState(!0),n=r=>{const i=B[r];i&&e({to:i})};return s.jsx(L,{items:O,activeId:"warnings",title:"Warnings",description:"Messages that failed to sync, and messages set aside.",help:H,helpOpen:t,onToggleHelp:()=>a(r=>!r),onSelect:n,onBackToMail:()=>{e({to:"/mail"})},children:s.jsx(ve,{})})}export{Ge as component};
|