@remit/web-client-dist 0.0.695 → 0.0.696
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/{BriefPane-BJLNB-w7.js → BriefPane-DqAium13.js} +1 -1
- package/assets/{CalendarEventEditor-MMNLFvjJ.js → CalendarEventEditor-53hot8oY.js} +1 -1
- package/assets/{CalendarEventPopup-DVJ9DC_Y.js → CalendarEventPopup-BBlKWgkP.js} +1 -1
- package/assets/{CalendarLoadFailed-uHGxFBGx.js → CalendarLoadFailed-D9O_t7aS.js} +1 -1
- package/assets/{CalendarQuickCreate-CzJ4lehP.js → CalendarQuickCreate-B39DWHxB.js} +1 -1
- package/assets/{CalendarSession-BVuy8A2H.js → CalendarSession-CjGsYSn3.js} +1 -1
- package/assets/CollectionPane-DH6KjfeW.js +1 -0
- package/assets/{DesktopChrome-Ct-IB4ks.js → DesktopChrome-DrLXNfAF.js} +1 -1
- package/assets/{DropdownMenu-CTCHgh4X.js → DropdownMenu-CgMO6e8h.js} +1 -1
- package/assets/{EmptyState-CN-AyHj-.js → EmptyState-FjON9Ve2.js} +1 -1
- package/assets/{ErrorState-Bk3DwNvd.js → ErrorState-DHsQU1XS.js} +1 -1
- package/assets/{FullCompose-BWiLy3Vm.js → FullCompose-karPPSLh.js} +1 -1
- package/assets/{LabelApplyTrigger-52QGuTLD.js → LabelApplyTrigger-BLIxuWTi.js} +1 -1
- package/assets/{MailShell-DAqGpnce.js → MailShell-jW6JmRUB.js} +1 -1
- package/assets/MailViewChrome-By52WjOW.js +1 -0
- package/assets/{MailboxPane-DUI-sxQF.js → MailboxPane-dO1WtQIE.js} +2 -2
- package/assets/{MessageBody-BeciCqb_.js → MessageBody-bibpHbC1.js} +2 -2
- package/assets/{MessageToolbar-BYhqv9RG.js → MessageToolbar-BK8iddsy.js} +1 -1
- package/assets/{NavMenuButton-A6v6v8tE.js → NavMenuButton-DMqlg3at.js} +1 -1
- package/assets/{OnboardingWizard-CIneAccs.js → OnboardingWizard-BVm-45mM.js} +1 -1
- package/assets/{OutboxPane-InUnHiNC.js → OutboxPane-BwIG-6n1.js} +1 -1
- package/assets/{ReportLink-q8WFRQli.js → ReportLink-DbjCeZ9_.js} +1 -1
- package/assets/_calendarObjectId-DcrqQ1pT.js +1 -0
- package/assets/_labelId-B-uoAJUi.js +1 -0
- package/assets/_mailboxId-B_BsU1d4.js +1 -0
- package/assets/_messageId-BBhFHooJ.js +1 -0
- package/assets/_messageId-BC4E5AdD.js +1 -0
- package/assets/_messageId-BFceTya0.js +1 -0
- package/assets/_messageId-CaLvmUYl.js +1 -0
- package/assets/_outboxMessageId-D3RH7suq.js +1 -0
- package/assets/_recurrenceId-BmFnTbJZ.js +1 -0
- package/assets/{_slotId-Cf-NASLE.js → _slotId-ipxsVzxt.js} +1 -1
- package/assets/_threadId-BdAvQAKq.js +1 -0
- package/assets/_threadId-Ok6MuUb2.js +1 -0
- package/assets/_threadId-PwztExmU.js +1 -0
- package/assets/_threadId-oAltpOkl.js +1 -0
- package/assets/{_view._date-dARprXsM.js → _view._date-kxLdB_iw.js} +1 -1
- package/assets/{account-service-status-DexPoUiT.js → account-service-status-jau7OHM-.js} +1 -1
- package/assets/{accounts-DPvTdrTr.js → accounts-Dv0XYTrh.js} +1 -1
- package/assets/{advanced-CDr_JOXg.js → advanced-Co1jIx2-.js} +1 -1
- package/assets/{agenda-time-BcOiQ5_R.js → agenda-time--0lz2pGX.js} +1 -1
- package/assets/{app-chrome-6ZXmy5H4.js → app-chrome-BtWv1mrl.js} +1 -1
- package/assets/{appearance-BQZnBlkc.js → appearance-CIaVIf5W.js} +1 -1
- package/assets/{avatar-B_QEsxCw.js → avatar-BLhNXW-W.js} +1 -1
- package/assets/{badge-CeCxCmzS.js → badge-CoJzTE5F.js} +1 -1
- package/assets/{bottom-sheet-DWqGf7I3.js → bottom-sheet-BSnl2giv.js} +1 -1
- package/assets/{brief-B7EfkUB4.js → brief-BIpUj9JN.js} +1 -1
- package/assets/brief-E24hWVP8.js +1 -0
- package/assets/{calendar-DxjT7IrR.js → calendar-B4zVNn1v.js} +1 -1
- package/assets/{calendar-CJGXdypt.js → calendar-BRsmtlld.js} +1 -1
- package/assets/{calendar-event-popup-y4Z860B0.js → calendar-event-popup-DsOb1y1u.js} +1 -1
- package/assets/{calendar-event-sidebar-BaAGgT2x.js → calendar-event-sidebar-Bi4U7yon.js} +1 -1
- package/assets/{calendar-failure-note-CJvPzX2o.js → calendar-failure-note-DlpRkxBL.js} +1 -1
- package/assets/{calendar-guests-DeRthr7k.js → calendar-guests-BQoxXEOG.js} +1 -1
- package/assets/{calendar-suggestion-BulekNHV.js → calendar-suggestion-CJMwfDpf.js} +1 -1
- package/assets/{calendars-D-Use38B.js → calendars-0hXvo4Yo.js} +1 -1
- package/assets/{card-0Dzt3Scs.js → card-CAuqZLKK.js} +1 -1
- package/assets/{checkbox-DIKh2-eX.js → checkbox-ImKY_DpK.js} +1 -1
- package/assets/{chevron-down-BnC2m4J6.js → chevron-down-CHMH78GK.js} +1 -1
- package/assets/{chevron-left-CNQ3caMn.js → chevron-left-Brxnh-p_.js} +1 -1
- package/assets/{circle-check-CTlM3FQo.js → circle-check-bdTVfKb7.js} +1 -1
- package/assets/{circle-check-big-DCVJA_H0.js → circle-check-big-D7T0Fr-Y.js} +1 -1
- package/assets/{circle-question-mark-CpApZe3H.js → circle-question-mark-BJ-7TUgf.js} +1 -1
- package/assets/{classification-C7_2tIfb.js → classification-IsZmGA3c.js} +1 -1
- package/assets/{clock-CTlZVcLb.js → clock-CcJSq9G-.js} +1 -1
- package/assets/{cloud-off-CtJJ9OTh.js → cloud-off-KCT2nWKe.js} +1 -1
- package/assets/compose._-_outboxMessageId_-5h4Thyui.js +1 -0
- package/assets/compose._-_outboxMessageId_-CG67dlL2.js +1 -0
- package/assets/compose._-_outboxMessageId_-Dm_l3weH.js +1 -0
- package/assets/compose._-_outboxMessageId_-TYmtS11N.js +1 -0
- package/assets/compose._-_outboxMessageId_-wdQo3fol.js +1 -0
- package/assets/{config-import-CHZ9oJuF.js → config-import-CDPSmiwE.js} +1 -1
- package/assets/{confirm-dialog-Cc446-7C.js → confirm-dialog-Nw9MwHVJ.js} +1 -1
- package/assets/{copy-jXKvwaUz.js → copy-CBfiykpW.js} +1 -1
- package/assets/{credential-steps-yT5IXLY8.js → credential-steps-DijGQsa7.js} +1 -1
- package/assets/{download-CyhaY4zL.js → download-BGcYYhWw.js} +1 -1
- package/assets/{draft-C1ufEqDz.js → draft-BIlfX99J.js} +1 -1
- package/assets/edit-DPWo7v-f.js +1 -0
- package/assets/edit-DZEKnuQ0.js +1 -0
- package/assets/{external-link-1TiTglgB.js → external-link-D7g7AAZP.js} +1 -1
- package/assets/{file-braces-CXZUVCry.js → file-braces-GrxXAr-8.js} +1 -1
- package/assets/{filters-CR0iG1ow.js → filters-DfUsL7bX.js} +1 -1
- package/assets/{flagged-DuEE_WUV.js → flagged-B833_7J0.js} +1 -1
- package/assets/flagged-zsMPG8wt.js +1 -0
- package/assets/{folder-input-kcvJkrLj.js → folder-input-uYHmZSIB.js} +1 -1
- package/assets/{folders-6mmHeM8E.js → folders-B2KHLLXQ.js} +1 -1
- package/assets/{help-copy-CIhcXCo3.js → help-copy-DWTmr8ZJ.js} +1 -1
- package/assets/{import-76KXkdMq.js → import-S0-kKNSZ.js} +1 -1
- package/assets/{index-yeSesYv-.js → index-9QMShYZC.js} +35 -35
- package/assets/index-BBhFHooJ.js +1 -0
- package/assets/index-BC4E5AdD.js +1 -0
- package/assets/{index-iXcp-mGT.js → index-Baytk5ez.js} +4 -4
- package/assets/index-BeYdWLSr.js +1 -0
- package/assets/index-BlWjdYaS.js +1 -0
- package/assets/index-CgyMBBs4.js +1 -0
- package/assets/index-D2U9KSTT.js +1 -0
- package/assets/index-DB540_Zp.js +1 -0
- package/assets/index-DX3L0os1.js +1 -0
- package/assets/index-DwKXH-XS.js +1 -0
- package/assets/index-dE8tDfaV.js +1 -0
- package/assets/index-gg1vreMW.js +1 -0
- package/assets/index-opRNV15g.js +1 -0
- package/assets/{kbd-BVK8yKhS.js → kbd-BD-ER_Yv.js} +1 -1
- package/assets/{label-chip-CrQMhpJe.js → label-chip-D6mHiJlY.js} +1 -1
- package/assets/{labels-CaXUAL8B.js → labels-SmD1KE3F.js} +1 -1
- package/assets/mail-AiBxTd_5.js +1 -0
- package/assets/{mail-CLkdzm71.js → mail-DZhnB5_L.js} +1 -1
- package/assets/{menu-Cn2tY52U.js → menu-BQAGsNoE.js} +1 -1
- package/assets/{nav-link-BvlYCbp-.js → nav-link-BaRr8ufx.js} +1 -1
- package/assets/new-CBzvvAzX.js +1 -0
- package/assets/onboarding-Boe7D95J.js +1 -0
- package/assets/{onboarding-completion-CJl9zKMA.js → onboarding-completion-CEthyLI-.js} +1 -1
- package/assets/outbox-BqHfAcnr.js +1 -0
- package/assets/{pencil-A679n1yJ.js → pencil-Dp-S5che.js} +1 -1
- package/assets/{people-C5ni4bV_.js → people-CFuQvhz_.js} +1 -1
- package/assets/{plus-D9A6i0pi.js → plus-ivySO7aD.js} +1 -1
- package/assets/{popover-menu-wrc2e8Vk.js → popover-menu-CNRsrfGN.js} +1 -1
- package/assets/{refresh-cw-BRmmCn_2.js → refresh-cw-D43K-uJ_.js} +1 -1
- package/assets/{reply-DL5kkaJs.js → reply-CdhmgK8D.js} +1 -1
- package/assets/{rich-text-EZFEOU8t.js → rich-text-BNnd4RhC.js} +1 -1
- package/assets/{rich-text-spellcheck-worker-provider-NOmoFs4G.js → rich-text-spellcheck-worker-provider-D35wa69O.js} +1 -1
- package/assets/{rotate-ccw-C2NtRHS-.js → rotate-ccw-DY-C3cnl.js} +1 -1
- package/assets/{roving-focus-CSq3MPWi.js → roving-focus-CfNxjWPW.js} +1 -1
- package/assets/{row-actions-Cthc4RCY.js → row-actions-DMyxcQFg.js} +1 -1
- package/assets/{search-mirror-CCAs_ZWe.js → search-mirror-PLEys8yY.js} +1 -1
- package/assets/{search-scope-DaiXqXNv.js → search-scope-DowTds7f.js} +1 -1
- package/assets/{search-token-index-VBBiMTaA.js → search-token-index-Qe9FLPUx.js} +1 -1
- package/assets/{sections-uFHlOXiA.js → sections-aErIO9A7.js} +1 -1
- package/assets/{segmented-control-DNxc5Ghi.js → segmented-control-CZRUmZT-.js} +1 -1
- package/assets/{select-B9t8348S.js → select-Bar5gCGO.js} +1 -1
- package/assets/{senders-uBzIqu95.js → senders-6bWn5dUX.js} +1 -1
- package/assets/settings-BfuOXGy8.js +1 -0
- package/assets/{settings-screen-CafoSGzb.js → settings-screen-DjVJZ-eS.js} +1 -1
- package/assets/{shield-check-BdZGtm0z.js → shield-check-C-ddv9so.js} +1 -1
- package/assets/{spam-DKjh33Xi.js → spam-CfM26JXy.js} +1 -1
- package/assets/{suggest-list-Do7i1-gb.js → suggest-list-BU1CAWaS.js} +1 -1
- package/assets/{suggested-vips-C-je5foZ.js → suggested-vips-CVTKxBdO.js} +1 -1
- package/assets/{suggestion._suggestionId-DF2BM_zX.js → suggestion._suggestionId-LOmWNAzV.js} +1 -1
- package/assets/{switch-1RDXcNo-.js → switch-C60zzRNi.js} +1 -1
- package/assets/{task._calendarTaskId-B7k5whQt.js → task._calendarTaskId-CwbcSZL4.js} +1 -1
- package/assets/{undo-2-B-b8_FeJ.js → undo-2-D6HzUJ41.js} +1 -1
- package/assets/{useCalendarData-BcNSn1yP.js → useCalendarData-n3x_s1Nb.js} +1 -1
- package/assets/{useCalendarScheduling-Dfk1b293.js → useCalendarScheduling-B3bHM8TC.js} +1 -1
- package/assets/{useCalendarSuggestions-D_tk6nh4.js → useCalendarSuggestions-dbmN8tRh.js} +1 -1
- package/assets/{useCalendarTasks-CX2Wh1Fn.js → useCalendarTasks-CC9jcVTp.js} +1 -1
- package/assets/{useClassificationSettings-Bi0m63-O.js → useClassificationSettings-DDXeuHc9.js} +1 -1
- package/assets/useCollectionThreads-bR-HQDXT.js +1 -0
- package/assets/{useDebouncedValue-AWe2Zncy.js → useDebouncedValue-nIbP08sa.js} +1 -1
- package/assets/{useFilters-Bp1QgyWU.js → useFilters-C3QPNclJ.js} +1 -1
- package/assets/useInfiniteQuery-CneHLmnO.js +1 -0
- package/assets/{useJunkMailboxIds-CWScvBHw.js → useJunkMailboxIds-BCvLXlA_.js} +1 -1
- package/assets/{useLabels-CGE9kc74.js → useLabels-BiYidhrJ.js} +1 -1
- package/assets/{useLayoutTier-D5MoTNho.js → useLayoutTier-c01ZWqQ0.js} +1 -1
- package/assets/{useMediaQuery-Bf7zukl9.js → useMediaQuery-BL50IiYB.js} +1 -1
- package/assets/{useMessageBodyContent-BxjoKGiE.js → useMessageBodyContent-DdX1ZZwR.js} +1 -1
- package/assets/{useQueries-Dj93detX.js → useQueries-B2w-f15M.js} +1 -1
- package/assets/{useRefreshControl-DCFTdDZz.js → useRefreshControl-C-8PJltS.js} +1 -1
- package/assets/{useResultFolderIndex-DAcbTt0T.js → useResultFolderIndex-BTY9xXDW.js} +1 -1
- package/assets/{useSignature-CA8ypw7f.js → useSignature-DQ-8mjVB.js} +1 -1
- package/assets/{warnings-C-blkf-m.js → warnings-iL5faBYa.js} +1 -1
- package/index.html +1 -1
- package/package.json +1 -1
- package/assets/CollectionPane-RUuB6sFo.js +0 -1
- package/assets/MailViewChrome-BDymWKX9.js +0 -1
- package/assets/_calendarObjectId-B3IHxxnZ.js +0 -1
- package/assets/_labelId-BX1_9FW3.js +0 -1
- package/assets/_mailboxId-BKCf6hRR.js +0 -1
- package/assets/_messageId-DGc5xyqH.js +0 -1
- package/assets/_messageId-ODP9L5rG.js +0 -1
- package/assets/_messageId-_9l1GYCG.js +0 -1
- package/assets/_messageId-t0gwqxwG.js +0 -1
- package/assets/_outboxMessageId-DGFiVWCU.js +0 -1
- package/assets/_recurrenceId-yqFEhvsn.js +0 -1
- package/assets/_threadId-Bvd5G-pJ.js +0 -1
- package/assets/_threadId-BwJQjORR.js +0 -1
- package/assets/_threadId-CFLbzDUi.js +0 -1
- package/assets/_threadId-Dj29QtLs.js +0 -1
- package/assets/brief-NsiukvBp.js +0 -1
- package/assets/compose._-_outboxMessageId_-BT2RKEAF.js +0 -1
- package/assets/compose._-_outboxMessageId_-B_NGqkpg.js +0 -1
- package/assets/compose._-_outboxMessageId_-CCPr3GjM.js +0 -1
- package/assets/compose._-_outboxMessageId_-CFBNHbeY.js +0 -1
- package/assets/compose._-_outboxMessageId_-Cw-Zq1kx.js +0 -1
- package/assets/edit-BGhTeEac.js +0 -1
- package/assets/edit-CeXJ3wiI.js +0 -1
- package/assets/flagged-B4N5fCui.js +0 -1
- package/assets/index-5PtybTMj.js +0 -1
- package/assets/index-B-gNDz7v.js +0 -1
- package/assets/index-B1AltYi_.js +0 -1
- package/assets/index-BX5kv92z.js +0 -1
- package/assets/index-CzMYehsR.js +0 -1
- package/assets/index-DT4iQTvg.js +0 -1
- package/assets/index-DZ4zN_a2.js +0 -1
- package/assets/index-Xq-TD3Lr.js +0 -1
- package/assets/index-eKzwYumy.js +0 -1
- package/assets/index-ehMMhnu5.js +0 -1
- package/assets/index-rui9BQ_f.js +0 -1
- package/assets/index-t0gwqxwG.js +0 -1
- package/assets/mail-CiuTTyMm.js +0 -1
- package/assets/new-ZEuIlDnl.js +0 -1
- package/assets/onboarding-bCsMaIPY.js +0 -1
- package/assets/outbox-BthyAXQ5.js +0 -1
- package/assets/settings-BLs90wKU.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as i,e as n,u as a,r as m,j as p}from"./index-9QMShYZC.js";import{O as s}from"./OnboardingWizard-BVm-45mM.js";import{c}from"./onboarding-completion-CEthyLI-.js";import"./credential-steps-DijGQsa7.js";import"./select-Bar5gCGO.js";import"./chevron-down-CHMH78GK.js";import"./badge-CoJzTE5F.js";import"./card-CAuqZLKK.js";import"./account-form-helpers-DhckT_PN.js";import"./mail-DZhnB5_L.js";import"./file-braces-GrxXAr-8.js";import"./kbd-BD-ER_Yv.js";import"./checkbox-ImKY_DpK.js";function k(){const o=i(),t=n(),e=a(),r=m.useCallback(l=>{c({queryClient:t,recordCompleted:()=>o.recordEvent("onboarding.completed"),navigateToInbox:()=>{window.location.assign("/mail")}})},[o,t]);return p.jsx(s,{skipWelcome:!1,onComplete:r,onImportConfig:()=>{e({to:"/import"})}})}export{k as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{k as o}from"./index-
|
|
1
|
+
import{k as o}from"./index-9QMShYZC.js";async function n(e){e.recordCompleted(),await e.queryClient.refetchQueries({queryKey:o()}),e.navigateToInbox()}export{n as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o,O as i}from"./index-9QMShYZC.js";import{a as m}from"./MailShell-jW6JmRUB.js";import{u as p,O as t}from"./OutboxPane-BwIG-6n1.js";import"./nav-link-BaRr8ufx.js";import"./reply-CdhmgK8D.js";import{u as s}from"./search-mirror-PLEys8yY.js";import"./useMessageBodyContent-DdX1ZZwR.js";import"./FullCompose-karPPSLh.js";import"./index-Baytk5ez.js";import"./useSignature-DQ-8mjVB.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-nIbP08sa.js";import"./suggest-list-BU1CAWaS.js";import"./sections-aErIO9A7.js";import"./useMediaQuery-BL50IiYB.js";import"./chevron-down-CHMH78GK.js";import"./ErrorState-DHsQU1XS.js";import"./confirm-dialog-Nw9MwHVJ.js";import"./search-scope-DowTds7f.js";import"./app-chrome-BtWv1mrl.js";import"./MessageBody-bibpHbC1.js";import"./kbd-BD-ER_Yv.js";import"./outbox-status-BlKn6P0x.js";import"./NavMenuButton-DMqlg3at.js";import"./menu-BQAGsNoE.js";import"./roving-focus-CfNxjWPW.js";import"./circle-check-big-D7T0Fr-Y.js";import"./clock-CcJSq9G-.js";import"./row-actions-DMyxcQFg.js";import"./rotate-ccw-DY-C3cnl.js";function C(){const r=p();return s({to:"/mail/outbox"}),o.jsx(t,{outboxMessageId:r,children:o.jsx(m,{phone:o.jsx(t.Phone,{}),list:o.jsx(t.List,{}),reading:o.jsx(i,{})})})}export{C as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./index-
|
|
1
|
+
import{b as e}from"./index-9QMShYZC.js";const a={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};a.node;const n=e(a);export{n as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as O,e as I,f as E,bE as R,bF as T,bG as A,bH as F,bI as L,bJ as z,bK as M,bL as v,r as c,j as e,aE as k,B as x,X as U,as as B,bM as g,bN as H,at as Q,bO as _,d as b,bP as G,bQ as C,bR as w,u as K,af as W}from"./index-yeSesYv-.js";import{R as S}from"./ReportLink-q8WFRQli.js";import{C as Y}from"./copy-jXKvwaUz.js";import{D as q,a as h,b as $}from"./DropdownMenu-CTCHgh4X.js";import{a as J}from"./sections-uFHlOXiA.js";import{S as X}from"./settings-screen-CafoSGzb.js";import"./avatar-B_QEsxCw.js";import"./badge-CeCxCmzS.js";import"./chevron-left-CNQ3caMn.js";import"./menu-Cn2tY52U.js";import"./circle-question-mark-CpApZe3H.js";const P={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};P.node;const V=O(P),Z=async({action:s,person:t},r)=>{const n={userId:t.userId};if(s==="SignOut"){const{data:a}=await L({path:n,body:{stepUpToken:r},throwOnError:!0});return{person:a,resetUrl:void 0}}if(s==="ResetPassword"){const{data:a}=await z({path:n,body:{stepUpToken:r},throwOnError:!0});return{person:a.person,resetUrl:a.resetUrl}}const{data:o}=await M({path:n,body:{status:s==="Disable"?"Disabled":"Active",stepUpToken:r},throwOnError:!0});return{person:o,resetUrl:void 0}},ee=s=>{const t=I();return E({meta:R,gcTime:0,mutationFn:async r=>{const{data:n}=await F({body:{password:s,action:r.action,userId:r.person.userId},throwOnError:!0});return Z(r,n.stepUpToken)},onSuccess:({person:r})=>{t.setQueryData(T(),n=>n&&{people:A(n.people,r)})}})},se="That is not your password. Try again.",te="Five wrong passwords in 15 minutes. Wait 15 minutes, then try again.";function ne({action:s,person:t,onCancel:r,onDone:n,onFailed:o}){const a=v(s,t.email),[l,p]=c.useState(""),[u,m]=c.useState(null),i=ee(l),d=()=>{i.isPending||r()},D=f=>{f.preventDefault(),!(i.isPending||l==="")&&(m(null),i.mutate({action:s,person:t},{onSuccess:n,onError:y=>{const j=g(y);if(j.kind==="wrongPassword"){p(""),m(se);return}if(j.kind==="locked"){p(""),m(te);return}if(j.kind==="signedOut"){r(),H();return}o(y)}}))};return e.jsx(k,{open:!0,onClose:d,title:a.title,children:e.jsxs("form",{onSubmit:D,children:[e.jsxs("header",{className:"flex items-center gap-2 border-b border-line px-5 py-3",children:[e.jsx("span",{className:"flex-1 text-sm font-semibold text-fg",children:a.title}),e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(U,{className:"size-3.5"}),onClick:d,"aria-label":"Close"})]}),e.jsxs("div",{className:"space-y-4 px-5 py-4 text-sm text-fg-muted",children:[e.jsx("p",{children:a.body}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:"people-step-up-password",className:"text-xs font-medium text-fg",children:"Your password"}),e.jsx(B,{id:"people-step-up-password",autoComplete:"current-password",value:l,onChange:f=>{p(f.target.value),m(null)},"aria-invalid":u!==null,"aria-describedby":"people-step-up-hint",required:!0}),e.jsx("p",{id:"people-step-up-hint",className:"text-xs",children:u?e.jsx("span",{className:"text-danger",role:"alert",children:u}):"Confirm with your own password. It counts for this one action."})]})]}),e.jsxs("footer",{className:"flex items-center justify-end gap-2 border-t border-line px-5 py-3",children:[e.jsx(x,{variant:"secondary",size:"sm",onClick:d,children:"Cancel"}),e.jsx(x,{type:"submit",variant:a.destructive?"danger":"primary",size:"sm",disabled:l==="","aria-busy":i.isPending,children:a.confirmLabel})]})]})})}const re=()=>{};function ae({email:s,resetUrl:t,onDone:r}){const[n,o]=c.useState(!1),[a,l]=c.useState(!1),p=()=>{navigator.clipboard.writeText(t).then(()=>{l(!1),o(!0)}).catch(()=>l(!0))};return e.jsxs(k,{open:!0,onClose:re,title:`Reset link for ${s}`,children:[e.jsxs("header",{className:"border-b border-line px-5 py-3 text-sm font-semibold text-fg",children:["Reset link for ",s]}),e.jsxs("div",{className:"space-y-4 px-5 py-4 text-sm text-fg-muted",children:[e.jsx("p",{children:"They are signed out everywhere. Give them this link, by message or in person. It works once, for 24 hours."}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsx(x,{variant:"primary",size:"sm",icon:n?e.jsx(Q,{className:"size-3.5"}):e.jsx(Y,{className:"size-3.5"}),onClick:p,children:n?"Copied":"Copy"}),e.jsx("input",{readOnly:!0,tabIndex:-1,value:t,"aria-label":`Reset link for ${s}`,onFocus:u=>u.currentTarget.select(),className:"min-w-0 flex-1 rounded-sm border border-line bg-surface px-2 py-1.5 font-mono text-xs text-fg sm:order-first"})]}),a&&e.jsx("p",{className:"text-xs text-danger",role:"alert",children:"Copying did not work in this browser. Select the link and copy it by hand."}),e.jsx("p",{children:"You see this link only now. Close this window and it is gone. Make a new one if it gets lost."})]}),e.jsx("footer",{className:"flex justify-end border-t border-line px-5 py-3",children:e.jsx(x,{variant:"secondary",size:"sm",onClick:r,children:"Done"})})]})}const N="The list of people did not load";function oe({failure:s}){const t=c.useRef(null);return c.useEffect(()=>{t.current?.focus()},[]),e.jsx("div",{ref:t,tabIndex:-1,className:"outline-none",children:e.jsxs(b,{tone:"danger",children:[e.jsx("p",{className:"font-medium",children:s.title}),e.jsx("p",{className:"mt-1 text-fg-muted",children:s.reason}),e.jsx("p",{className:"mt-1",children:e.jsx(S,{href:C(s.title,s.error)})})]})})}function ie({person:s,onPick:t}){const r=s.status==="Disabled";return e.jsxs(q,{trigger:e.jsxs(e.Fragment,{children:[e.jsx(V,{className:"size-4","aria-hidden":"true"}),e.jsxs("span",{className:"sr-only",children:["Actions for ",s.email]})]}),children:[e.jsx(h,{onClick:()=>t("SignOut"),children:"Sign out everywhere"}),e.jsx(h,{onClick:()=>t("ResetPassword"),children:"Reset password"}),e.jsx($,{}),r?e.jsx(h,{onClick:()=>t("Enable"),children:"Enable"}):e.jsx(h,{onClick:()=>t("Disable"),disabled:s.isCaller,destructive:!s.isCaller,children:e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{children:"Disable"}),s.isCaller&&e.jsx("span",{className:"text-xs text-fg-subtle",children:"Not your own account"})]})})]})}function le({people:s,onPick:t}){const r=new Date;return e.jsx("div",{className:"overflow-x-auto rounded-sm border border-line bg-surface",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"border-b border-line text-xs text-fg-muted",children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Email"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Created"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Last sign-in"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Sessions"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Status"}),e.jsx("th",{scope:"col",className:"w-12 px-1 py-2",children:e.jsx("span",{className:"sr-only",children:"Actions"})})]})}),e.jsx("tbody",{children:s.map(n=>e.jsxs("tr",{className:"border-b border-line last:border-b-0",children:[e.jsxs("td",{className:"px-3 py-1 text-fg",children:[n.email,n.isCaller&&e.jsx("span",{className:"text-fg-muted",children:" (you)"})]}),e.jsx("td",{className:"px-3 py-1 text-fg-muted",children:w(n.createdAt,r)}),e.jsx("td",{className:"px-3 py-1 text-fg-muted",children:w(n.lastSignInAt,r)}),e.jsx("td",{className:"px-3 py-1 tabular-nums text-fg-muted",children:n.sessionCount}),e.jsx("td",{className:n.status==="Disabled"?"px-3 py-1 text-danger":"px-3 py-1 text-fg-muted",children:n.status}),e.jsx("td",{className:"px-1 py-1",children:e.jsx(ie,{person:n,onPick:o=>t(o,n)})})]},n.userId))})]})})}function ce(){const s=_(),[t,r]=c.useState(null),[n,o]=c.useState(null),[a,l]=c.useState(null);if(s.isPending)return e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading people"});if(s.unavailable)return e.jsx(b,{tone:"info",children:"This server has no People page. It shows on a self-hosted server once self sign-up is turned off."});if(s.isError)return g(s.error).kind==="signedOut"?null:e.jsxs(b,{tone:"danger",children:[e.jsxs("p",{className:"font-medium",children:[N,"."]}),e.jsx("p",{className:"mt-1 text-fg-muted",children:G(s.error)}),e.jsxs("p",{className:"mt-2 flex items-center gap-3",children:[e.jsx(x,{variant:"secondary",size:"sm",onClick:()=>{s.refetch()},children:"Try again"}),e.jsx(S,{href:C(N,s.error)})]})]});const p=(i,d)=>{o(null),r({action:i,person:d})},u=i=>{i.resetUrl&&t&&l({email:t.person.email,resetUrl:i.resetUrl}),r(null)},m=i=>{if(!t)return;const d=g(i);o({title:v(t.action,t.person.email).failedTitle,reason:d.kind==="failed"?d.reason:"Something went wrong. Nothing changed. Try again.",error:i}),r(null)};return e.jsxs("div",{className:"space-y-4",children:[n&&e.jsx(oe,{failure:n}),e.jsx(le,{people:s.data.people,onPick:p}),t&&e.jsx(ne,{action:t.action,person:t.person,onCancel:()=>r(null),onDone:u,onFailed:m}),a&&e.jsx(ae,{email:a.email,resetUrl:a.resetUrl,onDone:()=>l(null)})]})}const de=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Anyone signed in here can manage every account. Each action asks for your own password first, and is recorded with who took it and from where."}),e.jsx("p",{children:"Disabling an account signs that person out within 15 minutes and stops their calendar feed links. Their mail stays. You cannot disable your own account, so one account always stays on."}),e.jsx("p",{children:"A reset link works once, for 24 hours, and is shown only once. Making one stops the old password at once."}),e.jsxs("p",{children:["The person who runs this server can turn all sign-in off with"," ",e.jsx("code",{children:"remit sign-in off"}),", and recover an account from the host with"," ",e.jsx("code",{children:"remit people enable"})," or ",e.jsx("code",{children:"remit people reset"}),"."]})]});function Ne(){const s=K(),t=W(),r=J(),[n,o]=c.useState(!0);return e.jsx(X,{items:t,activeId:"people",title:"People",description:"Everyone with an account on this server.",help:de,helpOpen:n,onToggleHelp:()=>o(a=>!a),onSelect:r,onBackToMail:()=>{s({to:"/mail"})},children:e.jsx(ce,{})})}export{Ne as component};
|
|
1
|
+
import{b as O,e as I,f as E,bE as R,bF as T,bG as A,bH as F,bI as L,bJ as z,bK as M,bL as v,r as c,j as e,aE as k,B as x,X as U,as as B,bM as g,bN as H,at as Q,bO as _,d as b,bP as G,bQ as C,bR as w,u as K,af as W}from"./index-9QMShYZC.js";import{R as S}from"./ReportLink-DbjCeZ9_.js";import{C as Y}from"./copy-CBfiykpW.js";import{D as q,a as h,b as $}from"./DropdownMenu-CgMO6e8h.js";import{a as J}from"./sections-aErIO9A7.js";import{S as X}from"./settings-screen-DjVJZ-eS.js";import"./avatar-BLhNXW-W.js";import"./badge-CoJzTE5F.js";import"./chevron-left-Brxnh-p_.js";import"./menu-BQAGsNoE.js";import"./circle-question-mark-BJ-7TUgf.js";const P={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};P.node;const V=O(P),Z=async({action:s,person:t},r)=>{const n={userId:t.userId};if(s==="SignOut"){const{data:a}=await L({path:n,body:{stepUpToken:r},throwOnError:!0});return{person:a,resetUrl:void 0}}if(s==="ResetPassword"){const{data:a}=await z({path:n,body:{stepUpToken:r},throwOnError:!0});return{person:a.person,resetUrl:a.resetUrl}}const{data:o}=await M({path:n,body:{status:s==="Disable"?"Disabled":"Active",stepUpToken:r},throwOnError:!0});return{person:o,resetUrl:void 0}},ee=s=>{const t=I();return E({meta:R,gcTime:0,mutationFn:async r=>{const{data:n}=await F({body:{password:s,action:r.action,userId:r.person.userId},throwOnError:!0});return Z(r,n.stepUpToken)},onSuccess:({person:r})=>{t.setQueryData(T(),n=>n&&{people:A(n.people,r)})}})},se="That is not your password. Try again.",te="Five wrong passwords in 15 minutes. Wait 15 minutes, then try again.";function ne({action:s,person:t,onCancel:r,onDone:n,onFailed:o}){const a=v(s,t.email),[l,p]=c.useState(""),[u,m]=c.useState(null),i=ee(l),d=()=>{i.isPending||r()},D=f=>{f.preventDefault(),!(i.isPending||l==="")&&(m(null),i.mutate({action:s,person:t},{onSuccess:n,onError:y=>{const j=g(y);if(j.kind==="wrongPassword"){p(""),m(se);return}if(j.kind==="locked"){p(""),m(te);return}if(j.kind==="signedOut"){r(),H();return}o(y)}}))};return e.jsx(k,{open:!0,onClose:d,title:a.title,children:e.jsxs("form",{onSubmit:D,children:[e.jsxs("header",{className:"flex items-center gap-2 border-b border-line px-5 py-3",children:[e.jsx("span",{className:"flex-1 text-sm font-semibold text-fg",children:a.title}),e.jsx(x,{variant:"ghost",size:"sm",icon:e.jsx(U,{className:"size-3.5"}),onClick:d,"aria-label":"Close"})]}),e.jsxs("div",{className:"space-y-4 px-5 py-4 text-sm text-fg-muted",children:[e.jsx("p",{children:a.body}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{htmlFor:"people-step-up-password",className:"text-xs font-medium text-fg",children:"Your password"}),e.jsx(B,{id:"people-step-up-password",autoComplete:"current-password",value:l,onChange:f=>{p(f.target.value),m(null)},"aria-invalid":u!==null,"aria-describedby":"people-step-up-hint",required:!0}),e.jsx("p",{id:"people-step-up-hint",className:"text-xs",children:u?e.jsx("span",{className:"text-danger",role:"alert",children:u}):"Confirm with your own password. It counts for this one action."})]})]}),e.jsxs("footer",{className:"flex items-center justify-end gap-2 border-t border-line px-5 py-3",children:[e.jsx(x,{variant:"secondary",size:"sm",onClick:d,children:"Cancel"}),e.jsx(x,{type:"submit",variant:a.destructive?"danger":"primary",size:"sm",disabled:l==="","aria-busy":i.isPending,children:a.confirmLabel})]})]})})}const re=()=>{};function ae({email:s,resetUrl:t,onDone:r}){const[n,o]=c.useState(!1),[a,l]=c.useState(!1),p=()=>{navigator.clipboard.writeText(t).then(()=>{l(!1),o(!0)}).catch(()=>l(!0))};return e.jsxs(k,{open:!0,onClose:re,title:`Reset link for ${s}`,children:[e.jsxs("header",{className:"border-b border-line px-5 py-3 text-sm font-semibold text-fg",children:["Reset link for ",s]}),e.jsxs("div",{className:"space-y-4 px-5 py-4 text-sm text-fg-muted",children:[e.jsx("p",{children:"They are signed out everywhere. Give them this link, by message or in person. It works once, for 24 hours."}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[e.jsx(x,{variant:"primary",size:"sm",icon:n?e.jsx(Q,{className:"size-3.5"}):e.jsx(Y,{className:"size-3.5"}),onClick:p,children:n?"Copied":"Copy"}),e.jsx("input",{readOnly:!0,tabIndex:-1,value:t,"aria-label":`Reset link for ${s}`,onFocus:u=>u.currentTarget.select(),className:"min-w-0 flex-1 rounded-sm border border-line bg-surface px-2 py-1.5 font-mono text-xs text-fg sm:order-first"})]}),a&&e.jsx("p",{className:"text-xs text-danger",role:"alert",children:"Copying did not work in this browser. Select the link and copy it by hand."}),e.jsx("p",{children:"You see this link only now. Close this window and it is gone. Make a new one if it gets lost."})]}),e.jsx("footer",{className:"flex justify-end border-t border-line px-5 py-3",children:e.jsx(x,{variant:"secondary",size:"sm",onClick:r,children:"Done"})})]})}const N="The list of people did not load";function oe({failure:s}){const t=c.useRef(null);return c.useEffect(()=>{t.current?.focus()},[]),e.jsx("div",{ref:t,tabIndex:-1,className:"outline-none",children:e.jsxs(b,{tone:"danger",children:[e.jsx("p",{className:"font-medium",children:s.title}),e.jsx("p",{className:"mt-1 text-fg-muted",children:s.reason}),e.jsx("p",{className:"mt-1",children:e.jsx(S,{href:C(s.title,s.error)})})]})})}function ie({person:s,onPick:t}){const r=s.status==="Disabled";return e.jsxs(q,{trigger:e.jsxs(e.Fragment,{children:[e.jsx(V,{className:"size-4","aria-hidden":"true"}),e.jsxs("span",{className:"sr-only",children:["Actions for ",s.email]})]}),children:[e.jsx(h,{onClick:()=>t("SignOut"),children:"Sign out everywhere"}),e.jsx(h,{onClick:()=>t("ResetPassword"),children:"Reset password"}),e.jsx($,{}),r?e.jsx(h,{onClick:()=>t("Enable"),children:"Enable"}):e.jsx(h,{onClick:()=>t("Disable"),disabled:s.isCaller,destructive:!s.isCaller,children:e.jsxs("span",{className:"flex flex-col",children:[e.jsx("span",{children:"Disable"}),s.isCaller&&e.jsx("span",{className:"text-xs text-fg-subtle",children:"Not your own account"})]})})]})}function le({people:s,onPick:t}){const r=new Date;return e.jsx("div",{className:"overflow-x-auto rounded-sm border border-line bg-surface",children:e.jsxs("table",{className:"w-full text-left text-sm",children:[e.jsx("thead",{className:"border-b border-line text-xs text-fg-muted",children:e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Email"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Created"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Last sign-in"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Sessions"}),e.jsx("th",{scope:"col",className:"px-3 py-2 font-medium",children:"Status"}),e.jsx("th",{scope:"col",className:"w-12 px-1 py-2",children:e.jsx("span",{className:"sr-only",children:"Actions"})})]})}),e.jsx("tbody",{children:s.map(n=>e.jsxs("tr",{className:"border-b border-line last:border-b-0",children:[e.jsxs("td",{className:"px-3 py-1 text-fg",children:[n.email,n.isCaller&&e.jsx("span",{className:"text-fg-muted",children:" (you)"})]}),e.jsx("td",{className:"px-3 py-1 text-fg-muted",children:w(n.createdAt,r)}),e.jsx("td",{className:"px-3 py-1 text-fg-muted",children:w(n.lastSignInAt,r)}),e.jsx("td",{className:"px-3 py-1 tabular-nums text-fg-muted",children:n.sessionCount}),e.jsx("td",{className:n.status==="Disabled"?"px-3 py-1 text-danger":"px-3 py-1 text-fg-muted",children:n.status}),e.jsx("td",{className:"px-1 py-1",children:e.jsx(ie,{person:n,onPick:o=>t(o,n)})})]},n.userId))})]})})}function ce(){const s=_(),[t,r]=c.useState(null),[n,o]=c.useState(null),[a,l]=c.useState(null);if(s.isPending)return e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading people"});if(s.unavailable)return e.jsx(b,{tone:"info",children:"This server has no People page. It shows on a self-hosted server once self sign-up is turned off."});if(s.isError)return g(s.error).kind==="signedOut"?null:e.jsxs(b,{tone:"danger",children:[e.jsxs("p",{className:"font-medium",children:[N,"."]}),e.jsx("p",{className:"mt-1 text-fg-muted",children:G(s.error)}),e.jsxs("p",{className:"mt-2 flex items-center gap-3",children:[e.jsx(x,{variant:"secondary",size:"sm",onClick:()=>{s.refetch()},children:"Try again"}),e.jsx(S,{href:C(N,s.error)})]})]});const p=(i,d)=>{o(null),r({action:i,person:d})},u=i=>{i.resetUrl&&t&&l({email:t.person.email,resetUrl:i.resetUrl}),r(null)},m=i=>{if(!t)return;const d=g(i);o({title:v(t.action,t.person.email).failedTitle,reason:d.kind==="failed"?d.reason:"Something went wrong. Nothing changed. Try again.",error:i}),r(null)};return e.jsxs("div",{className:"space-y-4",children:[n&&e.jsx(oe,{failure:n}),e.jsx(le,{people:s.data.people,onPick:p}),t&&e.jsx(ne,{action:t.action,person:t.person,onCancel:()=>r(null),onDone:u,onFailed:m}),a&&e.jsx(ae,{email:a.email,resetUrl:a.resetUrl,onDone:()=>l(null)})]})}const de=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Anyone signed in here can manage every account. Each action asks for your own password first, and is recorded with who took it and from where."}),e.jsx("p",{children:"Disabling an account signs that person out within 15 minutes and stops their calendar feed links. Their mail stays. You cannot disable your own account, so one account always stays on."}),e.jsx("p",{children:"A reset link works once, for 24 hours, and is shown only once. Making one stops the old password at once."}),e.jsxs("p",{children:["The person who runs this server can turn all sign-in off with"," ",e.jsx("code",{children:"remit sign-in off"}),", and recover an account from the host with"," ",e.jsx("code",{children:"remit people enable"})," or ",e.jsx("code",{children:"remit people reset"}),"."]})]});function Ne(){const s=K(),t=W(),r=J(),[n,o]=c.useState(!0);return e.jsx(X,{items:t,activeId:"people",title:"People",description:"Everyone with an account on this server.",help:de,helpOpen:n,onToggleHelp:()=>o(a=>!a),onSelect:r,onBackToMail:()=>{s({to:"/mail"})},children:e.jsx(ce,{})})}export{Ne as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a}from"./index-
|
|
1
|
+
import{b as a}from"./index-9QMShYZC.js";const e={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};e.node;const s=a(e);export{s as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as P,r as f,n as R,ci as E,j as l,p as b,B as j}from"./index-
|
|
1
|
+
import{b as P,r as f,n as R,ci as E,j as l,p as b,B as j}from"./index-9QMShYZC.js";const y={name:"ellipsis-vertical",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],aliases:["more-vertical"]};y.node;const k=P(y),g=4,v=8;function z(e,t,n){const o=Math.max(v,window.innerWidth-t.width-v),s=n==="end"?e.right-t.width:e.left,r=Math.min(Math.max(s,v),o),c=e.bottom+g,i=e.top-g-t.height,d=c+t.height<=window.innerHeight-v||i<v?c:i;return{left:r,top:d}}function L(e,t,n,o){const[s,r]=f.useState(null),c=f.useRef(o);return c.current=o,f.useLayoutEffect(()=>{if(!t){r(null);return}const i=()=>{const x=e.current,h=c.current();if(!x||!h)return;const m=x.getBoundingClientRect(),w={width:m.right-m.left,height:m.bottom-m.top},p=z(h,w,n);r(a=>a?.left===p.left&&a.top===p.top?a:{position:"fixed",left:p.left,top:p.top})};i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0);const u=e.current;let d=null;return u&&typeof ResizeObserver<"u"&&(d=new ResizeObserver(i),d.observe(u)),()=>{d?.disconnect(),window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0)}},[t,n,e]),s}function M(e,t){const[n,o]=f.useState(!1),s=f.useRef(null),r=f.useRef(null);return R({id:e,open:n,answers:{back:()=>{o(!1),t?.()}}}),f.useEffect(()=>{if(!n)return;const c=i=>{const u=i.target;s.current?.contains(u)||r.current?.contains(u)||o(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[n]),{open:n,setOpen:o,containerRef:s,panelRef:r,getAnchor:()=>s.current?.getBoundingClientRect()??null}}function N({open:e,align:t="start",getAnchor:n,panelRef:o,children:s}){const r=L(o,e,t,n);return e?E.createPortal(l.jsx("div",{className:"z-50",style:r??{position:"fixed",visibility:"hidden"},children:s}),document.body):null}function O({label:e,children:t,className:n,ref:o,onKeyDown:s,"data-testid":r}){return l.jsx("div",{ref:o,role:"menu","aria-label":e,tabIndex:-1,onKeyDown:s,"data-testid":r,className:b("z-50 flex max-h-[60dvh] min-w-44 flex-col overflow-y-auto overscroll-contain rounded-md border border-line bg-surface py-1 shadow-lg outline-none",n),children:t})}function S({label:e,icon:t,onSelect:n,className:o,lang:s,"data-testid":r}){return l.jsxs("button",{type:"button",role:"menuitem",lang:s,onClick:n,"data-testid":r,className:b("flex min-h-11 items-center gap-3 px-4 py-2.5 text-left text-sm text-fg transition-colors hover:bg-surface-sunken",o),children:[t&&l.jsx("span",{className:"shrink-0 text-fg-subtle",children:t}),e]})}function B({triggerLabel:e,triggerIcon:t,triggerText:n,items:o,align:s="end",touch:r=!0,className:c,triggerClassName:i,nested:u=!1,children:d}){const{open:x,setOpen:h,containerRef:m,panelRef:w,getAnchor:p}=M("popover-menu");return o.length===0&&!d?null:l.jsxs("div",{ref:m,className:b("relative",c),...u?{role:"none"}:{},children:[l.jsx(j,{variant:"ghost",size:"sm",icon:t??l.jsx(k,{className:"size-5"}),onClick:()=>h(a=>!a),"aria-label":e,"aria-haspopup":"menu","aria-expanded":x,...u?{role:"menuitem"}:{},className:b(r&&"min-h-11 min-w-11 px-0",i),children:n}),l.jsx(N,{open:x,align:s,panelRef:w,getAnchor:p,children:l.jsxs(O,{ref:w,children:[o.map(a=>l.jsx(S,{label:a.label,icon:a.icon,onSelect:()=>{h(!1),a.onSelect()}},a.key)),d]})})]})}export{k as E,N as P,O as a,S as b,B as c,M as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a}from"./index-
|
|
1
|
+
import{b as a}from"./index-9QMShYZC.js";const e={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};e.node;const o=a(e);export{o as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as E,cq as O,cr as A,K as i,r as u,u as m,cu as c,cs as B,cw as y}from"./index-
|
|
1
|
+
import{N as E,cq as O,cr as A,K as i,r as u,u as m,cu as c,cs as B,cw as y}from"./index-9QMShYZC.js";import{u as D,c as I}from"./nav-link-BaRr8ufx.js";function S(e){const s=E({warn:e?.router===void 0}),a=e?.router||s;return O(a.stores.__store,A(e,a))}const R="/mail/brief",L="/mail/$mailboxId",_="/mail/outbox",w="/mail/flagged",T="/mail/label/$labelId";function k(e){for(const s of e){if(s.routeId===R)return{list:"brief"};if(s.routeId===w)return{list:"flagged"};if(s.routeId===_)return{list:"outbox"};if(s.routeId===T)return{list:"label",labelId:s.params?.labelId};if(s.routeId===L)return{list:"mailbox",mailboxId:s.params?.mailboxId}}}function X(e){const s=e.split(/[?#]/)[0].split("/").filter(Boolean);if(s[0]!=="mail")return"";const a=s[1];return a?a==="brief"?R:a==="flagged"?w:a==="outbox"?_:a==="label"?`${T}:${s[2]??""}`:P(a):""}function j(e){if(typeof e!="object"||e===null)return"";const{q:s}=e;return typeof s=="string"?s:""}function P(e){return`${L}:${e}`}function q(e,s){return e===s?!0:e.startsWith(`${s}/`)}function C(e){const s=e.split(/[?#]/)[0].split("/").filter(Boolean);if(s[0]!=="mail")return!1;const a=s[1]==="label"?3:2;return s.length>a}function f(){const e=S({select:r=>k(r.matches)?.list}),a=i({from:"/mail/$mailboxId",shouldThrow:!1})?.mailboxId,t=i({from:"/mail/label/$labelId",shouldThrow:!1})?.labelId;return u.useMemo(()=>({list:e,mailboxId:a,labelId:t}),[e,a,t])}function V(){const{pathname:e}=D();return C(e)}function Q(){const e=m(),s=I(),{list:a,mailboxId:o,labelId:t}=f();return u.useCallback(()=>{const r=l=>l,n=s;if(a==="flagged"){e({to:"/mail/flagged",search:r,hash:n});return}if(a==="outbox"){e({to:"/mail/outbox",search:r,hash:n});return}if(a==="mailbox"&&o){e({to:"/mail/$mailboxId",params:{mailboxId:o},search:r,hash:n});return}if(a==="label"&&t){e({to:"/mail/label/$labelId",params:{labelId:t},search:r,hash:n});return}e({to:"/mail/brief",search:r,hash:n})},[e,s,a,o,t])}const U=["reply","reply-all","forward"],F=B(U),b="/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}",h="/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}",g="/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}",p="/mail/label/$labelId/$threadId/$messageId/$mode/{-$outboxMessageId}";function v(){const e=i({from:b,shouldThrow:!1}),s=i({from:h,shouldThrow:!1}),a=i({from:g,shouldThrow:!1}),o=i({from:p,shouldThrow:!1});return e??s??a??o}function G(){const e=c({from:b,shouldThrow:!1}),s=c({from:h,shouldThrow:!1}),a=c({from:g,shouldThrow:!1}),o=c({from:p,shouldThrow:!1});return(e??s??a??o)?.body}const $=e=>s=>e===void 0?y(s):{...y(s),body:e.body};function x(){const e=v(),s=G();return u.useMemo(()=>{if(!e)return;const a=F.safeParse(e.mode);return a.success?{kind:"reply",mode:a.data,threadId:e.threadId,sourceMessageId:e.messageId,outboxMessageId:e.outboxMessageId,seed:s===void 0?void 0:{body:s}}:{kind:"unknown",segment:e.mode}},[e,s])}function W(){return x()?.kind==="reply"}function M({list:e,mailboxId:s,labelId:a},o,t){return e==="flagged"?{to:h,params:{...o,outboxMessageId:t}}:e==="mailbox"&&s?{to:g,params:{...o,mailboxId:s,outboxMessageId:t}}:e==="label"&&a?{to:p,params:{...o,labelId:a,outboxMessageId:t}}:{to:b,params:{...o,outboxMessageId:t}}}function Y(e,s){if(e?.kind==="reply"&&e.threadId===s.threadId&&e.sourceMessageId===s.messageId)return e.outboxMessageId}function z(){const e=m(),s=I(),a=f(),o=x();return u.useCallback((t,r)=>{e({...M(a,t,r===void 0?Y(o,t):void 0),search:$(r),hash:s})},[e,s,a,o])}function H(e,s,a){if(!(!s||!a))return o=>e({threadId:s,messageId:a,mode:o})}function J(){const e=m(),s=f(),a=x();return u.useCallback(o=>{a?.kind==="reply"&&e({...M(s,{threadId:a.threadId,messageId:a.sourceMessageId,mode:a.mode},o),search:$(void 0),hash:!0,replace:!0})},[e,s,a])}function Z(){const e=m(),s=I(),{list:a,mailboxId:o,labelId:t}=f(),r=v();return u.useCallback(()=>{if(!r)return;const n=$(void 0),l=s,d={threadId:r.threadId,messageId:r.messageId};if(a==="flagged"){e({to:"/mail/flagged/$threadId/$messageId",params:d,search:n,hash:l});return}if(a==="mailbox"&&o){e({to:"/mail/$mailboxId/$threadId/$messageId",params:{...d,mailboxId:o},search:n,hash:l});return}if(a==="label"&&t){e({to:"/mail/label/$labelId/$threadId/$messageId",params:{...d,labelId:t},search:n,hash:l});return}e({to:"/mail/brief/$threadId/$messageId",params:d,search:n,hash:l})},[e,s,a,o,t,r])}export{j as a,V as b,k as c,f as d,Q as e,z as f,W as g,J as h,Z as i,x as j,q as l,X as m,H as r,S as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{b as Vr,r as z,j as F,B as uf,p as ha,d as Kp,ci as vu,n as Wp,fz as qp,y as Up,L as Hp}from"./index-
|
|
1
|
+
import{b as Vr,r as z,j as F,B as uf,p as ha,d as Kp,ci as vu,n as Wp,fz as qp,y as Up,L as Hp}from"./index-9QMShYZC.js";import{h as _l,f as Su,j as wu,k as Jp}from"./index-Baytk5ez.js";import{b as Eu,l as go,c as Vp,e as Yp}from"./useSignature-DQ-8mjVB.js";import{r as Xp,u as Gp}from"./roving-focus-CfNxjWPW.js";import{C as Zp}from"./confirm-dialog-Nw9MwHVJ.js";import{a as Qp,D as em}from"./useMediaQuery-BL50IiYB.js";import{B as tm}from"./bottom-sheet-BSnl2giv.js";import{P as nm,a as rm,b as Ps}from"./popover-menu-CNRsrfGN.js";import{U as om}from"./undo-2-D6HzUJ41.js";import{o as gv}from"./rich-text-spellcheck-provider-J8m9wz6A.js";import"./useMessageBodyContent-DdX1ZZwR.js";import"./reply-CdhmgK8D.js";import"./nav-link-BaRr8ufx.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-nIbP08sa.js";import"./suggest-list-BU1CAWaS.js";import"./sections-aErIO9A7.js";import"./chevron-down-CHMH78GK.js";const cf={name:"bold",size:24,node:[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]};cf.node;const im=Vr(cf);const df={name:"book-plus",size:24,node:[["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]};df.node;const sm=Vr(df);const ff={name:"italic",size:24,node:[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]};ff.node;const am=Vr(ff);const hf={name:"link",size:24,node:[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]};hf.node;const lm=Vr(hf);const gf={name:"quote",size:24,node:[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]};gf.node;const um=Vr(gf);const pf={name:"redo-2",size:24,node:[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]};pf.node;const cm=Vr(pf),GC={html:"",text:"",formatting:[]},dm={account:"the account default",detected:"detected from what you wrote",manual:"chosen for this message"},fm=({language:n,languages:e,source:t,onSelect:r,helpText:o})=>{const[i,s]=z.useState(!1),a=z.useRef(null),l=z.useRef(null),u=z.useRef(null),c=z.useId(),d=z.useCallback(g=>{s(!1),g&&l.current?.focus()},[]);z.useEffect(()=>{if(!i)return;const g=m=>{a.current?.contains(m.target)||s(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[i]),z.useEffect(()=>{if(!i)return;const g=u.current?.querySelector('[aria-checked="true"]'),m=u.current?.querySelector('[role="menuitemradio"]');(g??m)?.focus()},[i]);const f=g=>{if(g.key==="Escape"){g.preventDefault(),d(!0);return}const m=[...u.current?.querySelectorAll('[role="menuitemradio"]')??[]],p=m.indexOf(document.activeElement),y=Xp(g.key,p,m.length);y!==null&&(g.preventDefault(),m[y]?.focus())},h=g=>{r(g),d(!0)};return F.jsxs("div",{ref:a,className:"relative",children:[F.jsx(uf,{ref:l,variant:"ghost",size:"md","aria-label":`Message language: ${go(n)}, ${dm[t]}`,"aria-haspopup":"menu","aria-expanded":i,"aria-controls":i?c:void 0,onClick:()=>s(g=>!g),"data-testid":"compose-language-chip","data-language":n,"data-language-source":t,className:ha("min-h-11 min-w-11 shrink-0 px-2 font-medium",n!==e[0]&&"bg-accent-2-soft text-accent-2"),children:Eu(n)}),i&&F.jsxs("div",{ref:u,id:c,role:"menu","aria-label":"Message language",onKeyDown:f,"data-testid":"compose-language-menu",className:"absolute right-0 top-full z-50 mt-1 flex max-h-[60dvh] min-w-56 flex-col overflow-y-auto overscroll-contain rounded-md border border-line bg-surface py-1 shadow-lg",children:[e.map(g=>F.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":g===n,lang:g,onClick:()=>h(g),className:ha("flex min-h-11 items-center justify-between gap-3 px-4 py-2.5 text-left text-sm text-fg transition-colors hover:bg-surface-sunken",g===n&&"bg-accent-2-soft"),children:[go(g),F.jsx("span",{className:"shrink-0 text-xs text-fg-subtle",children:Eu(g)})]},g)),F.jsx("p",{"data-testid":"compose-language-help",className:"border-t border-line px-4 pb-1 pt-2 text-xs text-fg-muted",children:o??Vp(navigator.userAgent)})]})]})},hm=({mode:n,onToggle:e})=>F.jsx(uf,{variant:"ghost",size:"md","aria-pressed":n==="plain",title:"Plain text",onClick:e,"data-testid":"compose-mode-toggle",className:ha("min-h-11 shrink-0",n==="plain"&&"bg-accent-2-soft text-accent-2"),children:"Plain text"}),gm=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]),mf=n=>{const e=n.activeElement;return e?.shadowRoot?mf(e.shadowRoot)??e:e},pm=n=>{const e=n.tagName.toUpperCase();if(e==="IFRAME"||e==="FRAME"||e==="TEXTAREA"||e==="SELECT")return!0;if(e==="INPUT"){const r=(n.getAttribute("type")??"text").toLowerCase();return!gm.has(r)}const t=n.getAttribute("contenteditable");return t!==null&&t.toLowerCase()!=="false"?!0:n.isContentEditable===!0},yf=n=>{const e=n?.ownerDocument??globalThis.document;if(!e)return!1;const t=mf(e);return!t||t===n||n?.contains(t)?!1:pm(t)};function $(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);throw t.search=r.toString(),Error(`Minified Lexical error #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function _f(n,...e){const t=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",n);for(const o of e)r.append("v",o);t.search=r.toString(),console.warn(`Minified Lexical warning #${n}; visit ${t.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const nt=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,mm=nt&&"documentMode"in document?document.documentMode:null,Ft=nt&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Pt=nt&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),zr=!(!nt||!("InputEvent"in window)||mm)&&"getTargetRanges"in new window.InputEvent("input"),Tn=nt&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,bf=nt&&/Android/.test(navigator.userAgent),Po=nt&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent)&&!bf,kf=nt&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Di=nt&&bf&&kf,Lo=nt&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Ft&&!kf,ym=0,_m=1,bm=2,ga=1,pa=2,ma=4,ya=8,km=16,Ls=32,Is=64,bl=128,xm=1,Cm=2,vm=3,Sm=4,wm=5,Em=6,Co=Po||Tn||Lo?" ":"",Bn=`
|
|
2
2
|
|
|
3
3
|
`,kl=Pt?" ":Co,hn={bold:1,capitalize:1024,code:16,highlight:bl,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},Tm={directionless:1,unmergeable:2},$i={center:2,end:6,justify:4,left:1,right:3,start:5},Nm={[Cm]:"center",[Em]:"end",[Sm]:"justify",[xm]:"left",[vm]:"right",[wm]:"start"},Dm={normal:0,segmented:2,token:1},$m={[ym]:"normal",[bm]:"segmented",[_m]:"token"},Tu="$config";function Nu(){return we()._blockCursorElement}function Am(n){return n!==null&&n.nodeType===1&&n.hasAttribute("data-lexical-slot")}let xf=class yi{element;before;after;constructor(e,t,r){this.element=e,this.before=t||null,this.after=r||null}withBefore(e){return new yi(this.element,e,this.after)}withAfter(e){return new yi(this.element,this.before,e)}withElement(e){return this.element===e?this:new yi(e,this.before,this.after)}insertChild(e){const t=this.getInsertionAnchor();return t!==null&&t.parentElement!==this.element&&$(357),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&$(358),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&$(359),this.element.replaceChild(e,t),this}getFirstChild(){const e=this.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;return t===this.getInsertionAnchor()?null:t}getFirstChildAnchor(){return this.after}resolveLeafPosition(e,t,r){if(this.element===e)return t===e&&r===0?"before":"after";const o=Du(e,this.element);if(o===null)return"after";const i=Array.prototype.indexOf.call(e.childNodes,o);if(i<0)return"after";if(t===e)return r<=i?"before":"after";const s=Du(e,t);if(s===null)return"after";const a=Array.prototype.indexOf.call(e.childNodes,s);return a>=0&&a<=i?"before":"after"}getInsertionAnchor(){return this.before}};function Du(n,e){let t=e;for(;t!==null&&t.parentNode!==n;)t=t.parentNode;return t}let Cf=class _i extends xf{withBefore(e){return new _i(this.element,e,this.after)}withAfter(e){return new _i(this.element,this.before,e)}withElement(e){return this.element===e?this:new _i(e,this.before,this.after)}getInsertionAnchor(){return super.getInsertionAnchor()||this.getManagedLineBreak()}getFirstChildAnchor(){let e=super.getFirstChildAnchor(),t=e?e.nextSibling:this.element.firstChild;for(;Am(t);)e=t,t=t.nextSibling;const r=e?e.nextSibling:this.element.firstChild;return r!==null&&r===Nu()?r:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(this.element.__lexicalLastChildKind=e,e===null)this.removeManagedLineBreak();else{const t=e==="decorator"&&(Lo||Tn||Po);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){const e=this.getManagedLineBreak();if(e){const t=this.element,r=e.nodeName==="IMG"?e.nextSibling:null;r&&t.removeChild(r),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){const t=this.getManagedLineBreak();if(t){if(e===(t.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,o=this.before,i=ae().createElement("br");if(i.setAttribute("data-lexical-managed-linebreak","true"),r.insertBefore(i,o),e){const s=ae().createElement("img");s.setAttribute("data-lexical-managed-linebreak","true"),s.style.setProperty("display","inline","important"),s.style.setProperty("border","0px","important"),s.style.setProperty("margin","0px","important"),s.alt="",r.insertBefore(s,i),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=i}getFirstChildOffset(){const e=this.getFirstChild(),t=this.getInsertionAnchor();let r=0;for(let o=this.element.firstChild;o!==null&&o!==e&&o!==t;o=o.nextSibling)r++;return r}resolveChildIndex(e,t,r,o){if(r===this.element){const l=this.getFirstChildOffset(),u=Nu(),c=this.element.childNodes,d=Math.min(o,c.length);let f=0;for(let h=l;h<d;h++)c[h]!==u&&f++;return[e,Math.min(f,e.getChildrenSize())]}const i=$u(t,r);i.push(o);const s=$u(t,this.element);let a=e.getIndexWithinParent();for(let l=0;l<s.length;l++){const u=i[l],c=s[l];if(u===void 0||u<c)break;if(u>c){a+=1;break}}return[e.getParentOrThrow(),a]}};function $u(n,e){const t=[];let r=e;for(;r!==n&&r!==null;r=r.parentNode){let o=0;for(let i=r.previousSibling;i!==null;i=i.previousSibling)o++;t.push(o)}return r!==n&&$(225),t.reverse()}let vf;try{vf="0.49.0+prod.esm"}catch{}const Sf=vf??'"<unknown>+source"';let to=class{_front=new Set;_back=new Set;_cache;get size(){return this._front.size+this._back.size}addBack(e){return delete this._cache,this._front.has(e)||this._back.add(e),this}addFront(e){return delete this._cache,this._back.has(e)||this._front.add(e),this}delete(e){return delete this._cache,this._front.delete(e)||this._back.delete(e)}toArray(){const e=Array.from(this._front).reverse();for(const t of this._back)e.push(t);return e}toReadonlyArray(){return this._cache=this._cache||this.toArray(),this._cache}[Symbol.iterator](){return this.toReadonlyArray()[Symbol.iterator]()}};const jn=null;function wf(n,e=1e3){return n instanceof _a?n.clone():n.size<e?new Map(n):new _a().init(new Map(n),void 0,n.size)}let _a=class Ef{_mutable=!1;_old=void 0;_nursery=void 0;_size=0;clone(){return this._mutable=!1,new Ef().init(this._old,this._nursery,this._size)}init(e,t,r){return this._old=e,this._nursery=t,this._size=r,this}get size(){return this._size}has(e){return this.get(e)!==void 0}getWithTombstone(e){const t=this._nursery&&this._nursery.get(e);return t!==void 0?t:this._old&&this._old.get(e)}get(e){const t=this.getWithTombstone(e);return t===jn?void 0:t}shouldCompact(){return this._nursery!==void 0&&2*this._nursery.size>this._size}getNursery(){return this._mutable&&this._nursery||(this.compact(),this._nursery=new Map(this._nursery),this._mutable=!0),this._nursery}compact(e=!1){if(this._nursery&&this._nursery.size>0&&(e||this.shouldCompact())){const t=new Map(this._old);for(const[r,o]of this._nursery)o!==jn?t.set(r,o):t.delete(r);this._old=t,this._nursery=void 0}return this._mutable=!1,this}set(e,t){const r=this.getWithTombstone(e);if(r===t)return this;const o=this.getNursery();return r!==jn&&r!==void 0||(this._size++,r===jn&&o.delete(e)),o.set(e,t),this}delete(e){const t=this.has(e);return t&&(this.getNursery().set(e,jn),this._size--),t}getOrInsert(e,t){const r=this.get(e);return r!==void 0?r:(this.set(e,t),t)}getOrInsertComputed(e,t){const r=this.get(e);if(r!==void 0)return r;const o=t(e);return this.set(e,o),o}clear(){this._mutable=!1,this._old=void 0,this._nursery=void 0,this._size=0}*keys(){for(const e of this.entries())yield e[0]}*values(){for(const e of this.entries())yield e[1]}*entries(){const e=this._nursery,t=this._old;if(t)for(const r of t){const o=r[0],i=e?e.get(o):void 0;i!==jn&&(i!==void 0&&(r[1]=i),yield r)}if(e)for(const r of e)r[1]===jn||t&&t.has(r[0])||(yield r)}forEach(e,t){t!==void 0&&(e=e.bind(t));for(const[r,o]of this.entries())e(o,r,this)}get[Symbol.toStringTag](){return"GenMap"}[Symbol.iterator](){return this.entries()}};function Ai(n,e,t,r,o,i){if(x(n)){let s=n.getFirstChild();for(;s!==null;){const a=s.__key;s.__parent===e&&((x(s)||dn(s)&&s.__slots!==null)&&Ai(s,a,t,r,o,i),t.has(a)||i.delete(a),o.push(a)),s=s.getNextSibling()}}for(const s of dn(n)&&n.__slots!==null?n.__slots.values():[]){const a=r.get(s);a!==void 0&&Gn(a)&&a.__slotHost===e&&((x(a)||dn(a)&&a.__slots!==null)&&Ai(a,s,t,r,o,i),t.has(s)||i.delete(s),o.push(s))}}let ba=!1,xl=0;function Fm(n){xl=n.timeStamp}function Bs(n,e,t){const r=n.nodeName==="BR",o=e.__lexicalLineBreak;return o&&(n===o||r&&n.previousSibling===o)||r&&Gr(n,t)!==void 0}function zm(n,e,t){const r=Pe(gt(t)),o=r&&ft(r,t._rootElement);let i=null,s=null;o!==null&&o.anchorNode===n&&(i=o.anchorOffset,s=o.focusOffset);const a=n.nodeValue;a!==null&&Kl(e,a,i,s,!1)}function Om(n,e,t){if(N(n)){const r=n.anchor.getNode();if(r.is(t)&&n.format!==r.getFormat())return!1}return ht(e)&&t.isAttached()}function Mm(n,e,t){for(let r=n;r&&!Zh(r);r=sr(r)){const o=Gr(r,e);if(o!==void 0){const i=Q(o,t);if(i)return re(i)||!q(r)?void 0:[r,i]}}}function Tf(n,e,t){ba=!0;const r=performance.now()-xl>100;try{wt(n,()=>{const o=O()||(function(d){return d.read("latest",()=>{const f=O();return f!==null?f.clone():null})})(n),i=new Map,s=n._editorState,a=n._blockCursorElement;let l=!1,u="";for(let d=0;d<e.length;d++){const f=e[d],h=f.type,g=f.target,m=Mm(g,n,s);if(!m)continue;const[p,y]=m;if(h==="characterData")r&&D(y)&&ht(g)&&Om(o,g,y)&&zm(g,y,n);else if(h==="childList"){l=!0;const _=f.addedNodes;for(let S=0;S<_.length;S++){const C=_[S],w=Rh(C),v=C.parentNode;if(!(v==null||C===a||w!==null||Bs(C,v,n)||n._slotsUsed&&q(C)&&C.hasAttribute("data-lexical-slot")||Zh(C))){if(Pt){const E=(q(C)?C.innerText:null)||C.nodeValue;E&&(u+=E)}v.removeChild(C)}}const b=f.removedNodes,k=b.length;if(k>0){let S=0;for(let C=0;C<k;C++){const w=b[C];(Bs(w,g,n)||a===w)&&(g.appendChild(w),S++)}k!==S&&i.set(p,y)}}}if(i.size>0)for(const[d,f]of i)f.reconcileObservedMutation(d,n);const c=t.takeRecords();if(c.length>0){for(let d=0;d<c.length;d++){const f=c[d],h=f.addedNodes,g=f.target;for(let m=0;m<h.length;m++){const p=h[m],y=p.parentNode;y==null||p.nodeName!=="BR"||Bs(p,g,n)||y.removeChild(p)}}t.takeRecords()}o!==null&&(l&&be(o),Pt&&Wh(n)&&o.insertRawText(u))})}finally{ba=!1}}function Nf(n){const e=n._observer;e!==null&&Tf(n,e.takeRecords(),e)}function Df(n){(function(e){xl===0&>(e).addEventListener("textInput",Fm,!0)})(n),n._observer=new MutationObserver((e,t)=>{Tf(n,e,t)})}const Au="latest";let jm=class{key;parse;unparse;isEqual;defaultValue;resetOnCopyNode;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||Lm).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0),this.resetOnCopyNode=t.resetOnCopyNode||!1}};function Io(n,e){return new jm(n,e)}function Bo(n,e,t=Au){const r=(t===Au?n.getLatest():n).__state;return r?r.getValue(e):e.defaultValue}function Sr(n,e,t){let r;if(Ie(),typeof t=="function"){const i=n.getLatest(),s=Bo(i,e);if(r=t(s),e.isEqual(s,r))return i}else r=t;const o=n.getWritable();return Af(o).updateFromKnown(e,r),o}function Rm(n){const e=new Map,t=new Set;for(const{ownNodeConfig:r}of Vl(typeof n=="function"?n:n.replace))if(r&&r.stateConfigs)for(const o of r.stateConfigs){let i;"stateConfig"in o?(i=o.stateConfig,o.flat&&t.add(i.key)):i=o,e.set(i.key,i)}return{flatKeys:t,sharedConfigMap:e}}const Fu=new Set(["__proto__","constructor","prototype"]);let Pm=class $f{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,r=void 0,o=new Map,i=void 0){this.node=e,this.sharedNodeState=t,this.unknownState=r,this.knownState=o;const{sharedConfigMap:s}=this.sharedNodeState,a=i!==void 0?i:(function(l,u,c){let d=c.size;if(u)for(const f in u){const h=l.get(f);h&&c.has(h)||d++}return d})(s,r,o);this.size=a}getValue(e){const t=this.knownState.get(e);if(t!==void 0)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let r=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){const o=this.unknownState[e.key];o!==void 0&&(r=e.parse(o)),this.updateFromKnown(e,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const e={...this.unknownState},t={};for(const[r,o]of this.knownState)r.isEqual(o,r.defaultValue)?delete e[r.key]:e[r.key]=r.unparse(o);for(const r of this.sharedNodeState.flatKeys)r in e&&(t[r]=e[r],delete e[r]);return zu(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;const{sharedNodeState:t,unknownState:r}=this,o=new Map(this.knownState);return new $f(e,t,(function(i,s,a){let l;if(a)for(const[u,c]of Object.entries(a)){if(Fu.has(u))continue;const d=i.get(u);d?s.has(d)||s.set(d,d.parse(c)):(l=l||{},l[u]=c)}return l})(t.sharedConfigMap,o,r),o,this.size)}resetOnCopyNode(){for(const e of this.knownState.keys())e.resetOnCopyNode&&this.knownState.set(e,e.defaultValue);return this}updateFromKnown(e,t){const r=e.key;this.sharedNodeState.sharedConfigMap.set(r,e);const{knownState:o,unknownState:i}=this;o.has(e)||i&&r in i||(i&&(delete i[r],this.unknownState=zu(i)),this.size++),o.set(e,t)}updateFromUnknown(e,t){if(Fu.has(e))return;const r=this.sharedNodeState.sharedConfigMap.get(e);r?this.updateFromKnown(r,r.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){const{knownState:t}=this;for(const r of t.keys())t.set(r,r.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(const[r,o]of Object.entries(e))this.updateFromUnknown(r,o)}};function Af(n){const e=n.getWritable(),t=e.__state?e.__state.getWritable(e):new Pm(e,Ff(e));return e.__state=t,t}function Ff(n){return n.__state?n.__state.sharedNodeState:Oh(we(),n.getType()).sharedNodeState}function zu(n){if(n)for(const e in n)return n}function Lm(n){return n}function Ou(n,e,t){for(const[r,o]of e.knownState){if(n.has(r.key))continue;n.add(r.key);const i=t?t.getValue(r):r.defaultValue;if(i!==o&&!r.isEqual(i,o))return!0}return!1}function Mu(n,e,t){const{unknownState:r}=e,o=t?t.unknownState:void 0;if(r){for(const[i,s]of Object.entries(r))if(!n.has(i)&&(n.add(i),s!==(o?o[i]:void 0)))return!0}return!1}function ju(n,e){const t=n.__state;return t&&t.node===n?t.getWritable(e):t}function Ru(n,e){const t=n.__mode,r=n.__format,o=n.__style,i=e.__mode,s=e.__format,a=e.__style,l=n.__state,u=e.__state;return(t===null||t===i)&&(r===null||r===s)&&(o===null||o===a)&&(n.__state===null||l===u||(function(c,d){if(c===d)return!0;const f=new Set;return!(c&&Ou(f,c,d)||d&&Ou(f,d,c)||c&&Mu(f,c,d)||d&&Mu(f,d,c))})(l,u))}function Pu(n,e){const t=n.mergeWithSibling(e),r=pe()._normalizedNodes;return r.add(n.__key),r.add(e.__key),t}function Lu(n){let e,t,r=n;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(e=r.getPreviousSibling())!==null&&D(e)&&e.isSimpleText()&&!e.isUnmergeable();){if(e.__text!==""){if(Ru(e,r)){r=Pu(e,r);break}break}e.remove()}for(;(t=r.getNextSibling())!==null&&D(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(Ru(r,t)){r=Pu(r,t);break}break}t.remove()}}else r.remove()}function Kt(n){return Iu(n.anchor),Iu(n.focus),n}function Iu(n){for(;n.type==="element";){const e=n.getNode(),t=n.offset;let r,o;if(t===e.getChildrenSize()?(r=e.getChildAtIndex(t-1),o=!0):(r=e.getChildAtIndex(t),o=!1),D(r)){n.set(r.__key,o?r.getTextContentSize():0,"text",!0);break}if(!x(r))break;n.set(r.__key,o?r.getChildrenSize():0,"element",!0)}}const vo=Symbol.for("@lexical/CachedTextSize");function Bu(n,e){return xa.read(()=>{let t=0,r=n;for(let o=0;o<e&&r!==null;o++){const i=zt.get(r);if(i===void 0&&$(345,r),x(i)){const s=De.get(r);if(s!==void 0&&x(s)&&s.__parent!==i.__parent)t+=i.getTextContentSize();else{const a=Hn.get(r),l=a&&a.__lexicalTextContent;typeof l!="string"&&$(346,i.getType()),t+=l.length}o<e-1&&!i.isInline()&&(t+=2)}else{const s=i[vo];s===void 0&&$(347,i.getType(),r),t+=s}r=i.__next}return t},{editor:de})}function zf(n){x(n)||n[vo]===void 0&&(n[vo]=D(n)?n.__text.length:n.getTextContentSize())}const Im=4;let So,de,wo,ie="",ze=null,Ze=null,qe=null;function Wt(){return{firstTextKey:qe,format:ze,style:Ze}}function Ct(n){n.firstTextKey!==null&&(ze=n.format,Ze=n.style,qe=n.firstTextKey)}function ka(n){if(qe!==null)return;const e=n.__lexicalFirstTextKey;if(e===void 0&&$(348),e===null)return;const t=De.get(e);D(t)&&(ze=t.getFormat(),Ze=t.getStyle(),qe=e)}let ds,po,mo,zt,xa,De,Hn,Ca,Eo,Jn,ln=!1,Fi=!1;function Cn(n,e){const t=zt.get(n),r=De.has(n);if(e!==null){const o=Ta(n);o.parentNode===e&&e.removeChild(o)}if(!r){if(de._keyToDOMMap.delete(n),x(t)){const o=Gi(t,zt);va(o,0,o.length-1,null)}if(t!==void 0){for(const o of pt(t).values()){const i=wa(o);Cn(o,null),i!==null&&i.remove()}Wl(Eo,wo,ds,t,"destroyed")}}}function va(n,e,t,r){for(let o=e;o<=t;++o){const i=n[o];i!==void 0&&Cn(i,r)}}function Rn(n,e){n.setProperty("text-align",e)}const Bm="40px";function Of(n,e){const t=So.theme.indent;if(typeof t=="string"){const r=n.classList.contains(t);e>0&&!r?n.classList.add(t):e<1&&r&&n.classList.remove(t)}n.style.setProperty("padding-inline-start",e===0?"":`calc(${e} * var(--lexical-indent-base-value, ${Bm}))`)}function Mf(n,e){const t=n.style;e===0?Rn(t,""):e===1?Rn(t,"left"):e===2?Rn(t,"center"):e===3?Rn(t,"right"):e===4?Rn(t,"justify"):e===5?Rn(t,"start"):e===6&&Rn(t,"end")}function Sa(n,e){const t=(function(r){const o=r.__dir;if(o!==null)return o;if(Oe(r))return null;const i=r.getParent();return i===null||Se(i)&&i.__dir===null?"auto":null})(e);t!==null?n.dir=t:n.removeAttribute("dir")}function jf(n){const e=ae().createElement("div");return e.setAttribute("data-lexical-slot",n),e.style.display="none",e}function Rf(n,e,t){e||n.contentEditable==="false"?Xy(t,de):t.removeAttribute("contenteditable")}function Ku(n,e,t){const r=ie,o=Wt();ie="";let i="";const s=re(n);for(const[a,l]of t){const u=jf(a);Rf(e,s,u),e.appendChild(u),ie="";const c=Wt();vn(l,Dt(n,u,de)),Ct(c),Pf(n,a,e,u),i+=ie}return Ct(o),ie=r,i}function pt(n){return dn(n)&&n.__slots!==null?n.__slots:tg}function Pf(n,e,t,r){const o=Jn.$getSlotTargetElement(n,e,t,de);o!==null&&(r.parentElement!==o&&o.appendChild(r),r.style.display="")}function wa(n){const e=Hn.get(n);return e!==void 0?e.parentElement:null}function Wu(n,e,t){const r=pt(n),o=pt(e);for(const[c,d]of r)if(!o.has(c)){const f=wa(d);Cn(d,null),f!==null&&f.remove()}const i=ie,s=Wt();let a="",l=null;const u=re(e);for(const[c,d]of o){const f=r.get(c);let h=f!==void 0?wa(f):null;ie="";const g=Wt();if(h===null){h=jf(c);let m=null;for(const p of t.children)if(!p.hasAttribute("data-lexical-slot")){m=p;break}t.insertBefore(h,m),vn(d,Dt(e,h,de))}else f===d?an(d,h):(f!==void 0&&Cn(f,h),vn(d,Dt(e,h,de)));if(Ct(g),Rf(t,u,h),Pf(e,c,t,h),a+=ie,h.parentElement===t){const m=l===null?t.firstChild:l.nextSibling;m!==h&&t.insertBefore(h,m),l=h}}return Ct(s),ie=i,a}function vn(n,e){const t=De.get(n);if(t===void 0&&$(60),e!==null){const o=zt.get(n);if(o!==void 0){const i=Hn.get(n);if(i!==void 0){const s=Gn(o)?o.__slotHost:null,a=Gn(t)?t.__slotHost:null,l=o.__parent!==t.__parent||s!==a,u=a!==null&&i.parentElement!==e.element;if(l||u)return e.insertChild(i),an(n,e.element)}}}const r=Jn.$createDOM(t,de);if((function(o,i,s){const a=s._keyToDOMMap;Ph(i,s,o),a.set(o,i)})(n,r,de),D(t)?r.setAttribute("data-lexical-text","true"):re(t)&&(r.setAttribute("data-lexical-decorator","true"),Yi(r,{captureSelection:!0})),x(t)){const o=t.__indent,i=t.__size;Sa(r,t),o!==0&&Of(r,o);const s=pt(t),a=s.size>0?Ku(t,r,s):"";if(i===0)r.__lexicalTextContent=a,r.__lexicalFirstTextKey=null,ie+=a,s.size>0&&(r.__lexicalSlotTextLength=a.length);else{const u=ie,c=i-1;if(Ea(Gi(t,De),t,0,c,Dt(t,r,de)),a!==""){const d=r.__lexicalTextContent||"";r.__lexicalTextContent=a+d,ie=u+a+d}s.size>0&&(r.__lexicalSlotTextLength=a.length)}const l=t.__format;l!==0&&Mf(r,l),t.isInline()||Lf(null,t,r)}else{const o=t.getTextContent();if(re(t)){const i=t.decorate(de,So);i!==null&&If(n,i),r.contentEditable="false";const s=pt(t);s.size>0&&Ku(t,r,s)}ie+=o}return e!==null&&e.insertChild(r),Jn.$decorateDOM(t,null,r,de),zf(t),Wl(Eo,wo,ds,t,"created"),r}function Ea(n,e,t,r,o){const i=ie,s=Wt();ie="",ze=null,Ze=null,qe=null;let a=t;for(;a<=r;++a){const u=Wt();vn(n[a],o);const c=De.get(n[a]);c!==null&&D(c)?ze===null&&(ze=c.getFormat(),Ze=c.getStyle(),qe=c.__key):x(c)&&a<r&&!c.isInline()&&(ie+=Bn),Ct(u)}const l=de._keyToDOMMap.get(e.__key);l===void 0&&$(349,e.__key),l.__lexicalTextContent=ie,l.__lexicalFirstTextKey=qe,ie=i+ie,Ct(s)}function Lf(n,e,t){const r=Dt(e,t,de),o=r.element.__lexicalLastChildKind??null,i=(function(s,a){if(s){const l=s.__last;if(l){const u=a.get(l);if(u)return We(u)?"line-break":re(u)&&u.isInline()?"decorator":null}return pt(s).size>0?null:"empty"}return null})(e,De);o!==i&&r.setManagedLineBreak(i)}function Km(n,e,t){var r;ze=null,Ze=null,qe=null,(function(o,i,s){const a=ie,l=o.__size,u=i.__size;ie="";const c=s.element,d=de._keyToDOMMap.get(i.__key);d===void 0&&$(351,i.__key);const f=u-l;if(!ln&&Math.abs(f)<=1&&l>=Im&&o.__first===i.__first&&(f!==0||!de._cloneNotNeeded.has(o.__key))){const h=d.__lexicalTextContent,g=Ca.get(o.__key);if(!ln&&typeof h=="string"&&g!==void 0){const m=(function(p,y){const _=y.size;if(_===0||_>=p.__size)return null;let b=p.__last,k=null,S=0;for(;b!==null&&S<_;){if(!y.has(b))return null;k=b;const C=De.get(b);if(C===void 0)return null;b=C.__prev,S++}return S!==_||b!==null&&y.has(b)?null:k})(i,g);if(m!==null){const p=g.size;if(f===0){const y=Bu(m,p);let _=m,b=0;for(;_!==null&&b<p;){const v=De.get(_);if(v===void 0)break;const E=Wt();an(_,c),D(v)&&ze===null&&(ze=v.getFormat(),Ze=v.getStyle(),qe=v.__key),Ct(E),_=v.__next,b++}let k="";for(_=m,b=0;_!==null&&b<p;){const v=De.get(_);if(v===void 0)break;let E;if(x(v)){const A=de._keyToDOMMap.get(_),T=A&&A.__lexicalTextContent;typeof T!="string"&&$(352,v.getType()),E=T}else E=v.getTextContent();k+=E,b<p-1&&x(v)&&!v.isInline()&&(k+=Bn),_=v.__next,b++}const S=d.__lexicalSlotTextLength||0,C=S>0?h.slice(S):h,w=C.slice(0,C.length-y)+k;return d.__lexicalTextContent=w,ie=a+w,void qu(i,d,g)}if((function(y,_,b,k,S,C,w,v){if(v!==1&&v!==-1||w!==(v===1?2:1))return!1;const A=w-v;let T=y.__last;for(let oe=0;oe<A-1;oe++){if(T===null)return!1;const $e=zt.get(T);if($e===void 0)return!1;T=$e.__prev}if(T===null)return!1;const j=De.get(C),M=zt.get(T);if(j===void 0||M===void 0||j.__prev!==M.__prev)return!1;const R=[];let I=C;for(let oe=0;oe<w;oe++){if(I===null)return!1;R.push(I);const $e=De.get(I);I=$e?$e.__next:null}const te=[];I=T;for(let oe=0;oe<A;oe++){if(I===null)return!1;te.push(I);const $e=zt.get(I);I=$e?$e.__next:null}const se=new Set(te),ne=new Set(R),B=[];let L=0,K=0;for(;L<A&&K<w;)if(R[K]===te[L])B.push({key:R[K],kind:"reconcile"}),L++,K++;else if(ne.has(te[L])){if(se.has(R[K]))return!1;B.push({key:R[K],kind:"create",nextIndex:K}),K++}else B.push({key:te[L],kind:"destroy"}),L++;for(;L<A;)B.push({key:te[L++],kind:"destroy"});for(;K<w;)B.push({key:R[K],kind:"create",nextIndex:K}),K++;const H=Bu(T,A);for(const oe of B){const $e=Wt();if(oe.kind==="reconcile")an(oe.key,b.element);else if(oe.kind==="destroy")Cn(oe.key,b.element);else{let it=null;for(let nn=oe.nextIndex+1;nn<w;nn++){const _n=de._keyToDOMMap.get(R[nn]);if(_n!==void 0){it=_n;break}}vn(oe.key,b.withBefore(it??b.before))}if(oe.kind!=="destroy"){const it=De.get(oe.key);it&&D(it)&&ze===null&&(ze=it.getFormat(),Ze=it.getStyle(),qe=it.__key)}Ct($e)}let Y="";for(let oe=0;oe<w;oe++){const $e=De.get(R[oe]);if($e===void 0)return!1;let it;if(x($e)){const nn=de._keyToDOMMap.get(R[oe]),_n=nn&&nn.__lexicalTextContent;typeof _n!="string"&&$(350,$e.getType()),it=_n}else it=$e.getTextContent();Y+=it,oe<w-1&&x($e)&&!$e.isInline()&&(Y+=Bn)}const he=k.__lexicalSlotTextLength||0,ot=he>0?S.slice(he):S;return k.__lexicalTextContent=ot.slice(0,ot.length-H)+Y,!0})(o,0,s,d,h,m,p,f)){const y=d.__lexicalTextContent;return typeof y!="string"&&$(353),ie=a+y,void qu(i,d,g)}}}if(f===0){let m=o.__first,p=0;for(;m!==null;){const y=De.get(m);if(y===void 0)break;const _=ln||mo.has(m)||po.has(m),b=Wt();if(_)an(m,c);else{let k,S;if(x(y)){S=Hn.get(m);const C=S&&S.__lexicalTextContent;typeof C!="string"&&$(354,y.getType()),k=C}else k=y.getTextContent();ie+=k,S!==void 0&&ka(S)}D(y)?ze===null&&(ze=y.getFormat(),Ze=y.getStyle(),qe=y.__key):x(y)&&p<u-1&&!y.isInline()&&(ie+=Bn),Ct(b),m=y.__next,p++}return d.__lexicalTextContent=ie,d.__lexicalFirstTextKey=qe,void(ie=a+ie)}}if(l===1&&u===1){const h=o.__first,g=i.__first;if(h===g)an(h,c);else{const p=Ta(h),y=vn(g,null);try{p.parentNode===c?c.replaceChild(y,p):s.insertChild(y)}catch(_){if(typeof _=="object"&&_!=null){const b=`${_.toString()} Parent: ${c.tagName}, new child: {tag: ${y.tagName} key: ${g}}, old child: {tag: ${p.tagName}, key: ${h}}.`;throw new Error(b)}throw _}Cn(h,null)}const m=De.get(g);D(m)&&ze===null&&(ze=m.getFormat(),Ze=m.getStyle(),qe=m.__key)}else{const h=Gi(o,zt),g=Gi(i,De);if(h.length!==l&&$(227),g.length!==u&&$(228),l===0)u!==0&&Ea(g,i,0,u-1,s);else if(u===0){if(l!==0){const m=s.after==null&&s.before==null&&pt(i).size===0&&s.element.__lexicalLineBreak==null;va(h,0,l-1,m?null:c),m&&(c.textContent="")}}else(function(m,p,y,_,b,k){const S=_-1,C=b-1;let w,v,E=k.getFirstChild(),A=0,T=0;for(;A<=S&&T<=C;){const R=p[A],I=y[T],te=Wt();if(R===I)E=Ks(an(I,k.element)),A++,T++;else{if(v===void 0&&(v=Uu(y,T)),w===void 0)w=Uu(p,A);else if(!w.has(R)){A++,Ct(te);continue}if(!v.has(R)){E=Ks(Ta(R)),Cn(R,k.element),A++,w.delete(R),Ct(te);continue}if(w.has(I)){const ne=Lr(de,I);ne!==E&&k.withBefore(E??k.before).insertChild(ne),E=Ks(an(I,k.element)),A++,T++}else vn(I,k.withBefore(E??k.before)),T++}const se=De.get(I);se!==null&&D(se)?ze===null&&(ze=se.getFormat(),Ze=se.getStyle(),qe=se.__key):x(se)&&T<=C&&!se.isInline()&&(ie+=Bn),Ct(te)}const j=A>S,M=T>C;if(j&&!M){const R=y[C+1],I=R===void 0?null:de.getElementByKey(R);Ea(y,m,T,C,k.withBefore(I??k.before))}else M&&!j&&va(p,A,S,k.element)})(i,h,g,l,u,s)}d.__lexicalTextContent=ie,d.__lexicalFirstTextKey=qe,ie=a+ie})(n,e,Dt(e,t,de)),Se(e)||(r=e,ze==null||ze===r.__textFormat||Fi||r.setTextFormat(ze),(function(o){Ze==null||Ze===o.__textStyle||Fi||o.setTextStyle(Ze)})(e))}function qu(n,e,t){const r=e.__lexicalFirstTextKey;if(r!=null){const o=n.__key;let i=r;for(;i!==null;){const s=De.get(i);if(s===void 0){i=null;break}if(s.__parent===o)break;i=s.__parent}if(i!==null&&!t.has(i)){const s=De.get(r);if(D(s))return ze=s.getFormat(),void(Ze=s.getStyle())}}e.__lexicalFirstTextKey=qe}function an(n,e){const t=zt.get(n);let r=De.get(n);t!==void 0&&r!==void 0||$(61);const o=ln||mo.has(n)||po.has(n),i=Lr(de,n);if(t===r&&!o){let s;if(x(t)){const a=i.__lexicalTextContent;typeof a!="string"&&$(355,t.getType()),s=a,ka(i)}else s=t.getTextContent();return ie+=s,i}if(t!==r&&o&&Wl(Eo,wo,ds,r,"updated"),Jn.$updateDOM(r,t,i,de)){const s=vn(n,null);return e===null&&$(62),e.replaceChild(s,i),Cn(n,null),s}if(x(t)){x(r)||$(334,n);const s=r.__indent;(ln||s!==t.__indent)&&Of(i,s);const a=r.__format;(ln||a!==t.__format)&&Mf(i,a);const l=o&&(pt(r).size>0||pt(t).size>0)?Wu(t,r,i):"";if(o){const u=ie;if(Km(t,r,i),Oe(r)||r.isInline()||Lf(0,r,i),l!==""){const c=i.__lexicalTextContent||"";i.__lexicalTextContent=l+c,ie=u+l+c,i.__lexicalSlotTextLength=l.length}else(pt(r).size>0||pt(t).size>0)&&(i.__lexicalSlotTextLength=0)}else{const u=i.__lexicalTextContent;typeof u!="string"&&$(356,t.getType()),ie+=u,ka(i)}if((ln||r.__dir!==t.__dir||r.__parent!==t.__parent)&&(Sa(i,r),Oe(r)&&!ln))for(const u of r.getChildren())x(u)&&Sa(Lr(de,u.getKey()),u)}else{const s=r.getTextContent();if(re(r)){const a=r.decorate(de,So);a!==null&&If(n,a),o&&(pt(r).size>0||pt(t).size>0)&&Wu(t,r,i)}ie+=s}if(!Fi&&Oe(r)){const s=r.getLatest();if(s.__cachedText!==ie){const a=s.getWritable();a.__cachedText=ie,r=a}}return Jn.$decorateDOM(r,t,i,de),zf(r),i}function If(n,e){let t=de._pendingDecorators;const r=de._decorators;if(t===null){if(r[n]===e)return;t=Lh(de)}t[n]=e}function Ks(n){let e=n.nextSibling;return e!==null&&e===de._blockCursorElement&&(e=e.nextSibling),e}function Uu(n,e){const t=new Set;for(let r=e;r<n.length;r++)t.add(n[r]);return t}function Wm(n,e,t,r,o,i){ie="",ze=null,Ze=null,qe=null,ln=r===2,de=t,So=t._config,Jn=t._config.dom||qi,wo=t._nodes,ds=de._listeners.mutation,po=o,mo=i,zt=n._nodeMap,xa=n,De=e._nodeMap,Fi=e._readOnly,Hn=wf(t._keyToDOMMap),Ca=(function(){const a=new Map,l=u=>{for(const c of u){const d=De.get(c);if(d===void 0)continue;const f=d.__parent;if(f===null)continue;let h=a.get(f);h===void 0&&(h=new Set,a.set(f,h)),h.add(c)}};return l(po.keys()),l(mo),a})();const s=new Map;return Eo=s,an("root",null),de=void 0,wo=void 0,po=void 0,mo=void 0,zt=void 0,xa=void 0,De=void 0,So=void 0,Hn=void 0,Ca=void 0,Eo=void 0,Jn=qi,s}function Ta(n){const e=Hn.get(n);return e===void 0&&$(75,n),e}function W(n){return{type:n}}const qt=W("SELECTION_CHANGE_COMMAND"),Bf=W("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),fs=W("CLICK_COMMAND"),Kf=W("BEFORE_INPUT_COMMAND"),Wf=W("INPUT_COMMAND"),qf=W("COMPOSITION_START_COMMAND"),Uf=W("COMPOSITION_END_COMMAND"),Sn=W("DELETE_CHARACTER_COMMAND"),wr=W("INSERT_LINE_BREAK_COMMAND"),Vn=W("INSERT_PARAGRAPH_COMMAND"),Wn=W("CONTROLLED_TEXT_INSERTION_COMMAND"),Yr=W("PASTE_COMMAND"),bi=W("REMOVE_TEXT_COMMAND"),Or=W("DELETE_WORD_COMMAND"),Mr=W("DELETE_LINE_COMMAND"),Ot=W("FORMAT_TEXT_COMMAND"),qm=W("SET_TEXT_FORMAT_COMMAND"),hs=W("UNDO_COMMAND"),gs=W("REDO_COMMAND"),ps=W("KEYDOWN_COMMAND"),Cl=W("KEY_ARROW_RIGHT_COMMAND"),Hf=W("MOVE_TO_END"),vl=W("KEY_ARROW_LEFT_COMMAND"),Jf=W("MOVE_TO_START"),Sl=W("KEY_ARROW_UP_COMMAND"),wl=W("KEY_ARROW_DOWN_COMMAND"),zi=W("KEY_ENTER_COMMAND"),Vf=W("KEY_SPACE_COMMAND"),ms=W("KEY_BACKSPACE_COMMAND"),El=W("KEY_ESCAPE_COMMAND"),Tl=W("KEY_DELETE_COMMAND"),Nl=W("KEY_TAB_COMMAND"),Um=W("INSERT_TAB_COMMAND"),Hm=W("INDENT_CONTENT_COMMAND"),Hu=W("OUTDENT_CONTENT_COMMAND"),Yf=W("DROP_COMMAND"),Xf=W("FORMAT_ELEMENT_COMMAND"),Gf=W("DRAGSTART_COMMAND"),Zf=W("DRAGOVER_COMMAND"),Jm=W("DRAGEND_COMMAND"),Ko=W("COPY_COMMAND"),ys=W("CUT_COMMAND"),Dl=W("SELECT_ALL_COMMAND"),Vm=W("CLEAR_EDITOR_COMMAND"),Ym=W("CLEAR_HISTORY_COMMAND"),lo=W("CAN_REDO_COMMAND"),uo=W("CAN_UNDO_COMMAND"),Qf=W("FOCUS_COMMAND"),Xm=W("BLUR_COMMAND"),Gm=W("KEY_MODIFIER_COMMAND");function Zm(n){const e=new Map;return{dispose(){for(const t of e.values())t.dispose();e.clear()},register(t,r){let o=e.get(t);o===void 0&&(o={dispose:n(t,r),holders:new Set},e.set(t,o));const i=()=>{const s=e.get(t);s&&s.holders.delete(i)&&s.holders.size===0&&(e.delete(t),s.dispose())};return o.holders.add(i),i}}}function yo(n,e,t,r){return n.addEventListener(e,t,r),n.removeEventListener.bind(n,e,t,r)}const rn=Object.freeze({}),Na=[["keydown",function(n,e){const t=e._inputState;t.lastKeyDownTimeStamp=n.timeStamp,t.lastKeyCode=n.key,n.key!=="Backspace"&&To(t),!e.isComposing()&&P(e,ps,n)}],["pointerdown",function(n,e){const t=Xn(n),r=n.pointerType;Lt(t)&&r!=="touch"&&r!=="pen"&&n.button===0&&wt(e,()=>{Xi(t,e)||(e._inputState.isSelectionChangeFromMouseDown=!0)})}],["compositionstart",function(n,e){P(e,qf,n)}],["compositionend",function(n,e){const t=e._inputState;Pt?t.compositionPhase="ending-firefox":Tn||!Po&&!Lo?P(e,Uf,n):(t.compositionPhase="ending-safari",t.compositionEndData=n.data)}],["input",function(n,e){n.stopPropagation();const t=e._inputState;To(t),wt(e,()=>{rh(n,e)||e.dispatchCommand(Wf,n)},{event:n}),t.unprocessedBeforeInputData=null}],["click",function(n,e){wt(e,()=>{const t=O(),r=Pe(gt(e)),o=yt();if(r){if(N(t)){const i=t.anchor,s=i.getNode();i.type==="element"&&i.offset===0&&t.isCollapsed()&&!Oe(s)&&fe().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&o!==null&&t.is(o)&&(r.removeAllRanges(),t.dirty=!0)}else if(n.pointerType==="touch"||n.pointerType==="pen"){const i=ft(r,e._rootElement).anchorNode;(q(i)||ht(i))&&be(Do(o,r,e,n))}}if(Pt&&r!==null&&r.rangeCount===0){const i=e._rootElement;if(i!==null&&n.target===i){const s=n.clientY;let a=i.childNodes.length;for(let u=0;u<i.childNodes.length;u++){const c=i.childNodes[u];if(q(c)){const d=c.getBoundingClientRect();if(s<=(d.top+d.bottom)/2){a=u;break}}}r.setBaseAndExtent(i,a,i,a);const l=Do(o,r,e,n);l!==null?be(l):r.removeAllRanges()}}P(e,fs,n)})}],["cut",rn],["copy",rn],["dragstart",rn],["dragover",rn],["dragend",rn],["paste",rn],["focus",rn],["blur",rn],["drop",rn]];zr&&Na.push(["beforeinput",(n,e)=>(function(t,r){const o=t.inputType;o==="deleteCompositionText"||Pt&&Wh(r)||o!=="insertCompositionText"&&wt(r,()=>{rh(t,r)||P(r,Kf,t)},{event:t})})(n,e)]);const Da=new WeakMap,Oi=new WeakMap,Qm=Zm(n=>(n.addEventListener("selectionchange",Gu),()=>n.removeEventListener("selectionchange",Gu)));function eh(n,e,t,r,o,i){const s=n.anchor,a=n.focus,l=s.getNode(),u=pe();let c;if(i!==void 0)c=i;else{const m=Pe(gt(u));c=m!==null?ft(m,u._rootElement):null}const d=c!==null?c.anchorNode:null,f=s.key,h=u.getElementByKey(f),g=t.length;return f!==a.key||!D(l)||(!o&&(!zr||u._inputState.lastBeforeInputInsertTextTimeStamp<r+50)||l.isDirty()&&g<2||Ih(t))&&s.offset!==a.offset&&!l.isComposing()||Et(l)||l.isDirty()&&g>1||(o||!zr)&&h!==null&&!l.isComposing()&&d!==En(l,h,u)||c!==null&&e!==null&&(!e.collapsed||e.startContainer!==c.anchorNode||e.startOffset!==c.anchorOffset)||!l.isComposing()&&(l.getFormat()!==n.format||l.getStyle()!==n.style)||(function(m,p){if(p.isSegmented())return!0;if(!m.isCollapsed())return!1;const y=m.anchor.offset,_=p.getParentOrThrow(),b=Ui(p);return y===0?!p.canInsertTextBefore()||!_.canInsertTextBefore()&&!p.isComposing()||b||(function(k){const S=k.getPreviousSibling();return(D(S)||x(S)&&S.isInline())&&!S.canInsertTextAfter()})(p):y===p.getTextContentSize()&&(!p.canInsertTextAfter()||!_.canInsertTextAfter()&&!p.isComposing()||b)})(n,l)}function Ju(n,e){return ht(n)&&n.nodeValue!==null&&e!==0&&e!==n.nodeValue.length}function Vu(n,e,t){const{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:s}=ft(n,e._rootElement),a=e._inputState;a.isSelectionChangeFromDOMUpdate&&(a.isSelectionChangeFromDOMUpdate=!1,Ju(r,o)&&Ju(i,s)&&!a.postDeleteSelectionToRestore)||wt(e,()=>{if(!t)return void be(null);if(!Ho(e,r,i))return;let l=O();if(a.postDeleteSelectionToRestore&&N(l)&&l.isCollapsed()){const u=l.anchor,c=a.postDeleteSelectionToRestore.anchor;(u.key===c.key&&u.offset===c.offset+1||u.offset===1&&c.getNode().is(u.getNode().getPreviousSibling()))&&(l=a.postDeleteSelectionToRestore.clone(),be(l))}if(a.postDeleteSelectionToRestore=null,N(l)){const u=l.anchor,c=u.getNode();if(l.isCollapsed()){n.type==="Range"&&r===i&&(l.dirty=!0);const d=gt(e).event,f=d?d.timeStamp:performance.now(),{format:h,style:g,offset:m,key:p,timeStamp:y}=a.collapsedSelectionFormat,_=fe(),b=e.isComposing()===!1&&_.getTextContent()==="";if(f<y+200&&u.offset===m&&u.key===p)ki(l,h,g);else if(u.type==="text")D(c)||$(141),th(l,c);else if(u.type==="element"&&!b){x(c)||$(259);const k=u.getNode();k.isEmpty()?(function(S,C){const w=C.getTextFormat(),v=C.getTextStyle();ki(S,w,v)})(l,k):ki(l,l.format,"")}}else{const d=u.key,f=l.focus.key,h=l.getNodes(),g=h.length,m=l.isBackward(),p=m?s:o,y=m?o:s,_=m?f:d,b=m?d:f;let k=2047,S=!1;for(let C=0;C<g;C++){const w=h[C],v=w.getTextContentSize();if(D(w)&&v!==0&&!(C===0&&w.__key===_&&p===v||C===g-1&&w.__key===b&&y===0)&&(S=!0,k&=w.getFormat(),k===0))break}l.format=S?k:0}}P(e,qt)})}function ki(n,e,t){n.format===e&&n.style===t||(n.format=e,n.style=t,n.dirty=!0)}function th(n,e){ki(n,e.getFormat(),e.getStyle())}function nh(n){if(!n.getTargetRanges)return null;const e=n.getTargetRanges();return e.length===0?null:e[0]}function Yu(n){const{lastKeyCode:e}=pe()._inputState;if(n==null||n.length<=1||e==null)return;const t=e.length===1?e:e==="Enter"?`
|
|
4
4
|
`:e==="Tab"?" ":null;if(!t)return;const r=O();if(!N(r)||!r.isCollapsed())return;const o=r.anchor.getNode();if(!D(o))return;const{offset:i}=r.anchor;if(o.getTextContentSize()===i){const s=o.getNextSibling();if(t===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as r,s as o,g as a}from"./useSignature-
|
|
1
|
+
import{f as r,s as o,g as a}from"./useSignature-DQ-8mjVB.js";import{o as n}from"./rich-text-spellcheck-provider-J8m9wz6A.js";import"./index-9QMShYZC.js";const l=t=>({post:e=>t.postMessage(e),listen:e=>t.addEventListener("message",s=>e(s.data)),fail:e=>t.addEventListener("error",s=>e(s.message)),terminate:()=>t.terminate()}),m=async t=>{const e=r(t);if(!e)return null;const s=new Worker(new URL("/assets/rich-text-spellcheck-worker-pWkhC-WR.js",import.meta.url),{type:"module"});return n(e,o(),l(s),a(e))};export{m as openSpellcheckWorker};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a}from"./index-
|
|
1
|
+
import{b as a}from"./index-9QMShYZC.js";const e={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};e.node;const o=a(e);export{o as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d}from"./index-
|
|
1
|
+
import{r as d}from"./index-9QMShYZC.js";const E={"data-list-row":""},v="[data-list-row]";function m(e,r,s,i="vertical"){if(s===0)return null;const n=i==="vertical"?"ArrowDown":"ArrowRight",c=i==="vertical"?"ArrowUp":"ArrowLeft";return e===n?r<0?0:Math.min(r+1,s-1):e===c?r<=0?0:r-1:e==="Home"?0:e==="End"?s-1:null}function l(e,r){return Array.from(e.querySelectorAll(r))}function y({containerRef:e,itemSelector:r,orientation:s="vertical",enabled:i=!0}){d.useEffect(()=>{if(!i)return;const n=e.current;if(!n)return;const c=()=>{const t=l(n,r);if(t.length===0)return;const f=t.find(o=>o===document.activeElement)??t[0];for(const o of t)o.tabIndex=o===f?0:-1},u=t=>{if(t.shiftKey||t.metaKey||t.ctrlKey||t.altKey)return;const a=l(n,r),f=a.indexOf(document.activeElement),o=m(t.key,f,a.length,s);o===null||o===f||(t.preventDefault(),t.stopPropagation(),a[o]?.focus())};return c(),n.addEventListener("focusin",c),n.addEventListener("keydown",u),()=>{n.removeEventListener("focusin",c),n.removeEventListener("keydown",u)}})}export{v as L,E as a,m as r,y as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,j as l,B as b,p as y,L as x}from"./index-
|
|
1
|
+
import{r as e,j as l,B as b,p as y,L as x}from"./index-9QMShYZC.js";const i=()=>l.jsx(x,{className:"size-3.5 animate-spin"}),m=(s,n)=>n?l.jsx("span",{className:"sr-only",children:s}):s;function c({actions:s=[],destructive:n,className:o}){const[f,r]=e.useState(!1);return f&&n?.confirm?l.jsxs("div",{className:y("flex items-center gap-2",o),children:[l.jsx("span",{className:"text-xs text-fg-muted",children:n.confirm.prompt}),l.jsx(b,{variant:"secondary",size:"sm",onClick:()=>r(!1),children:n.confirm.cancelLabel??"Cancel"}),l.jsx(b,{variant:"danger",size:"sm","aria-busy":n.busy,icon:n.busy?i():void 0,onClick:()=>{n.busy||n.onClick()},children:n.busy?n.busyLabel??"Working…":n.confirm.confirmLabel??n.label})]}):l.jsxs("div",{className:y("flex items-center gap-2",o),children:[s.map(a=>l.jsx(b,{variant:a.variant??"ghost",size:"sm","aria-busy":a.busy,"aria-label":a.iconOnly?a.label:void 0,icon:a.busy?i():a.icon,onClick:()=>{a.busy||a.onClick()},children:a.busy&&a.busyLabel?a.busyLabel:m(a.label,a.iconOnly)},a.label)),n&&l.jsx(b,{variant:"ghost",size:"sm","aria-busy":n.busy,"aria-label":n.iconOnly?n.label:void 0,icon:n.busy?i():n.icon,onClick:()=>{if(!n.busy){if(n.confirm){r(!0);return}n.onClick()}},children:n.busy&&n.busyLabel?n.busyLabel:m(n.label,n.iconOnly)})]})}export{c as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as I,P as v,r as x}from"./index-
|
|
1
|
+
import{u as I,P as v,r as x}from"./index-9QMShYZC.js";import{u as h,a as $,g as Q}from"./reply-CdhmgK8D.js";import{b as g}from"./MailShell-jW6JmRUB.js";import{a as q}from"./useMessageBodyContent-DdX1ZZwR.js";function A(a){const r=I(),{searchInput:u,searchQuery:s}=v(),n=h({select:i=>$(i.location.search)}),c=h({select:i=>i.location.pathname}),d=q(),f=Q(),m=d||f,{to:e}=a,t=a.to==="/mail/$mailboxId"?a.params.mailboxId:void 0,o=a.to==="/mail/label/$labelId"?a.params.labelId:void 0,p=t?`/mail/${t}`:o?`/mail/label/${o}`:e;x.useEffect(()=>{if(!g({searchInput:u,committedQuery:s,urlQuery:n,pathname:c,listPath:p}))return;const b=!!s&&n!==s&&!m,l=y=>({...y,q:s||void 0});if(!b){r({to:".",search:l,hash:!0,replace:!0});return}if(e==="/mail/$mailboxId"){if(!t)return;r({to:e,params:{mailboxId:t},search:l,hash:!0,replace:!0});return}if(e==="/mail/label/$labelId"){if(!o)return;r({to:e,params:{labelId:o},search:l,hash:!0,replace:!0});return}r({to:e,search:l,hash:!0,replace:!0})},[u,s,n,r,e,t,o,p,c,m])}export{A as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u,cx as En,j as A,p as en,aE as In}from"./index-yeSesYv-.js";import{A as Rn}from"./app-chrome-6ZXmy5H4.js";const Nn=1024,An=1280;function Ln(e,n=Nn,t=An){const r=e>=n;return{nav:r,reading:r,intelligence:e>=t}}function dt(e){return e===void 0?!1:e.handlers.focusNext!==void 0&&e.handlers.focusPrevious!==void 0}function kn(e){const n=u.useRef(null),[t,r]=u.useState(e??null);return u.useEffect(()=>{const i=n.current;if(!i||typeof ResizeObserver>"u")return;const o=new ResizeObserver(a=>{const g=a[0];g&&r(g.contentRect.width)});o.observe(i);const l=getComputedStyle(i),s=Number.parseFloat(l.paddingLeft)+Number.parseFloat(l.paddingRight);return r(i.clientWidth-s),()=>o.disconnect()},[]),[n,t]}const Ee=u.createContext(null);Ee.displayName="PanelGroupContext";const H={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Ge=10,se=u.useLayoutEffect,Ve=En.useId,Dn=typeof Ve=="function"?Ve:()=>null;let Mn=0;function We(e=null){const n=Dn(),t=u.useRef(e||n||null);return t.current===null&&(t.current=""+Mn++),e??t.current}function nn({children:e,className:n="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:s,minSize:a,onCollapse:g,onExpand:w,onResize:f,order:c,style:z,tagName:h="div",...E}){const C=u.useContext(Ee);if(C===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:P,expandPanel:N,getPanelSize:k,getPanelStyle:D,groupId:O,isPanelCollapsed:I,reevaluatePanelConstraints:v,registerPanel:V,resizePanel:B,unregisterPanel:F}=C,W=We(l),L=u.useRef({callbacks:{onCollapse:g,onExpand:w,onResize:f},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:s,minSize:a},id:W,idIsFromProps:l!==void 0,order:c});u.useRef({didLogMissingDefaultSizeWarning:!1}),se(()=>{const{callbacks:j,constraints:$}=L.current,G={...$};L.current.id=W,L.current.idIsFromProps=l!==void 0,L.current.order=c,j.onCollapse=g,j.onExpand=w,j.onResize=f,$.collapsedSize=t,$.collapsible=r,$.defaultSize=i,$.maxSize=s,$.minSize=a,(G.collapsedSize!==$.collapsedSize||G.collapsible!==$.collapsible||G.maxSize!==$.maxSize||G.minSize!==$.minSize)&&v(L.current,G)}),se(()=>{const j=L.current;return V(j),()=>{F(j)}},[c,W,V,F]),u.useImperativeHandle(o,()=>({collapse:()=>{P(L.current)},expand:j=>{N(L.current,j)},getId(){return W},getSize(){return k(L.current)},isCollapsed(){return I(L.current)},isExpanded(){return!I(L.current)},resize:j=>{B(L.current,j)}}),[P,N,k,I,W,B]);const U=D(L.current,i);return u.createElement(h,{...E,children:e,className:n,id:W,style:{...U,...z},[H.groupId]:O,[H.panel]:"",[H.panelCollapsible]:r||void 0,[H.panelId]:W,[H.panelSize]:parseFloat(""+U.flexGrow).toFixed(1)})}const tn=u.forwardRef((e,n)=>u.createElement(nn,{...e,forwardedRef:n}));nn.displayName="Panel";tn.displayName="forwardRef(Panel)";let je=null,Pe=-1,ne=null;function Hn(e,n){if(n){const t=(n&an)!==0,r=(n&cn)!==0,i=(n&un)!==0,o=(n&dn)!==0;if(t)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function $n(){ne!==null&&(document.head.removeChild(ne),je=null,ne=null,Pe=-1)}function Le(e,n){var t,r;const i=Hn(e,n);if(je!==i){if(je=i,ne===null&&(ne=document.createElement("style"),document.head.appendChild(ne)),Pe>=0){var o;(o=ne.sheet)===null||o===void 0||o.removeRule(Pe)}Pe=(t=(r=ne.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&t!==void 0?t:-1}}function rn(e){return e.type==="keydown"}function on(e){return e.type.startsWith("pointer")}function ln(e){return e.type.startsWith("mouse")}function Ie(e){if(on(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(ln(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function _n(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function jn(e,n,t){return e.x<n.x+n.width&&e.x+e.width>n.x&&e.y<n.y+n.height&&e.y+e.height>n.y}function Gn(e,n){if(e===n)throw new Error("Cannot compare node with itself");const t={a:qe(e),b:qe(n)};let r;for(;t.a.at(-1)===t.b.at(-1);)e=t.a.pop(),n=t.b.pop(),r=e;S(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ue(Ke(t.a)),b:Ue(Ke(t.b))};if(i.a===i.b){const o=r.childNodes,l={a:t.a.at(-1),b:t.b.at(-1)};let s=o.length;for(;s--;){const a=o[s];if(a===l.a)return 1;if(a===l.b)return-1}}return Math.sign(i.a-i.b)}const Wn=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Fn(e){var n;const t=getComputedStyle((n=sn(e))!==null&&n!==void 0?n:e).display;return t==="flex"||t==="inline-flex"}function Bn(e){const n=getComputedStyle(e);return!!(n.position==="fixed"||n.zIndex!=="auto"&&(n.position!=="static"||Fn(e))||+n.opacity<1||"transform"in n&&n.transform!=="none"||"webkitTransform"in n&&n.webkitTransform!=="none"||"mixBlendMode"in n&&n.mixBlendMode!=="normal"||"filter"in n&&n.filter!=="none"||"webkitFilter"in n&&n.webkitFilter!=="none"||"isolation"in n&&n.isolation==="isolate"||Wn.test(n.willChange)||n.webkitOverflowScrolling==="touch")}function Ke(e){let n=e.length;for(;n--;){const t=e[n];if(S(t,"Missing node"),Bn(t))return t}return null}function Ue(e){return e&&Number(getComputedStyle(e).zIndex)||0}function qe(e){const n=[];for(;e;)n.push(e),e=sn(e);return n}function sn(e){const{parentNode:n}=e;return n&&n instanceof ShadowRoot?n.host:n}const an=1,cn=2,un=4,dn=8,Tn=_n()==="coarse";let X=[],pe=!1,le=new Map,Re=new Map;const ve=new Set;function On(e,n,t,r,i){var o;const{ownerDocument:l}=n,s={direction:t,element:n,hitAreaMargins:r,setResizeHandlerState:i},a=(o=le.get(l))!==null&&o!==void 0?o:0;return le.set(l,a+1),ve.add(s),we(),function(){var w;Re.delete(e),ve.delete(s);const f=(w=le.get(l))!==null&&w!==void 0?w:1;if(le.set(l,f-1),we(),f===1&&le.delete(l),X.includes(s)){const c=X.indexOf(s);c>=0&&X.splice(c,1),Be(),i("up",!0,null)}}}function Vn(e){const{target:n}=e,{x:t,y:r}=Ie(e);pe=!0,Fe({target:n,x:t,y:r}),we(),X.length>0&&(Ce("down",e),e.preventDefault(),fn(n)||e.stopImmediatePropagation())}function ke(e){const{x:n,y:t}=Ie(e);if(pe&&e.buttons===0&&(pe=!1,Ce("up",e)),!pe){const{target:r}=e;Fe({target:r,x:n,y:t})}Ce("move",e),Be(),X.length>0&&e.preventDefault()}function De(e){const{target:n}=e,{x:t,y:r}=Ie(e);Re.clear(),pe=!1,X.length>0&&(e.preventDefault(),fn(n)||e.stopImmediatePropagation()),Ce("up",e),Fe({target:n,x:t,y:r}),Be(),we()}function fn(e){let n=e;for(;n;){if(n.hasAttribute(H.resizeHandle))return!0;n=n.parentElement}return!1}function Fe({target:e,x:n,y:t}){X.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),ve.forEach(i=>{const{element:o,hitAreaMargins:l}=i,s=o.getBoundingClientRect(),{bottom:a,left:g,right:w,top:f}=s,c=Tn?l.coarse:l.fine;if(n>=g-c&&n<=w+c&&t>=f-c&&t<=a+c){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&Gn(r,o)>0){let h=r,E=!1;for(;h&&!h.contains(o);){if(jn(h.getBoundingClientRect(),s)){E=!0;break}h=h.parentElement}if(E)return}X.push(i)}})}function Me(e,n){Re.set(e,n)}function Be(){let e=!1,n=!1;X.forEach(r=>{const{direction:i}=r;i==="horizontal"?e=!0:n=!0});let t=0;Re.forEach(r=>{t|=r}),e&&n?Le("intersection",t):e?Le("horizontal",t):n?Le("vertical",t):$n()}let He=new AbortController;function we(){He.abort(),He=new AbortController;const e={capture:!0,signal:He.signal};ve.size&&(pe?(X.length>0&&le.forEach((n,t)=>{const{body:r}=t;n>0&&(r.addEventListener("contextmenu",De,e),r.addEventListener("pointerleave",ke,e),r.addEventListener("pointermove",ke,e))}),window.addEventListener("pointerup",De,e),window.addEventListener("pointercancel",De,e)):le.forEach((n,t)=>{const{body:r}=t;n>0&&(r.addEventListener("pointerdown",Vn,e),r.addEventListener("pointermove",ke,e))}))}function Ce(e,n){ve.forEach(t=>{const{setResizeHandlerState:r}=t,i=X.includes(t);r(e,i,n)})}function Kn(){const[e,n]=u.useState(0);return u.useCallback(()=>n(t=>t+1),[])}function S(e,n){if(!e)throw console.error(n),Error(n)}function ae(e,n,t=Ge){return e.toFixed(t)===n.toFixed(t)?0:e>n?1:-1}function Z(e,n,t=Ge){return ae(e,n,t)===0}function K(e,n,t){return ae(e,n,t)===0}function Un(e,n,t){if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++){const i=e[r],o=n[r];if(!K(i,o,t))return!1}return!0}function fe({panelConstraints:e,panelIndex:n,size:t}){const r=e[n];S(r!=null,`Panel constraints not found for index ${n}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:s=0}=r;if(ae(t,s)<0)if(o){const a=(i+s)/2;ae(t,a)<0?t=i:t=s}else t=s;return t=Math.min(l,t),t=parseFloat(t.toFixed(Ge)),t}function xe({delta:e,initialLayout:n,panelConstraints:t,pivotIndices:r,prevLayout:i,trigger:o}){if(K(e,0))return n;const l=[...n],[s,a]=r;S(s!=null,"Invalid first pivot index"),S(a!=null,"Invalid second pivot index");let g=0;if(o==="keyboard"){{const f=e<0?a:s,c=t[f];S(c,`Panel constraints not found for index ${f}`);const{collapsedSize:z=0,collapsible:h,minSize:E=0}=c;if(h){const C=n[f];if(S(C!=null,`Previous layout not found for panel index ${f}`),K(C,z)){const P=E-C;ae(P,Math.abs(e))>0&&(e=e<0?0-P:P)}}}{const f=e<0?s:a,c=t[f];S(c,`No panel constraints found for index ${f}`);const{collapsedSize:z=0,collapsible:h,minSize:E=0}=c;if(h){const C=n[f];if(S(C!=null,`Previous layout not found for panel index ${f}`),K(C,E)){const P=C-z;ae(P,Math.abs(e))>0&&(e=e<0?0-P:P)}}}}{const f=e<0?1:-1;let c=e<0?a:s,z=0;for(;;){const E=n[c];S(E!=null,`Previous layout not found for panel index ${c}`);const P=fe({panelConstraints:t,panelIndex:c,size:100})-E;if(z+=P,c+=f,c<0||c>=t.length)break}const h=Math.min(Math.abs(e),Math.abs(z));e=e<0?0-h:h}{let c=e<0?s:a;for(;c>=0&&c<t.length;){const z=Math.abs(e)-Math.abs(g),h=n[c];S(h!=null,`Previous layout not found for panel index ${c}`);const E=h-z,C=fe({panelConstraints:t,panelIndex:c,size:E});if(!K(h,C)&&(g+=h-C,l[c]=C,g.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?c--:c++}}if(Un(i,l))return i;{const f=e<0?a:s,c=n[f];S(c!=null,`Previous layout not found for panel index ${f}`);const z=c+g,h=fe({panelConstraints:t,panelIndex:f,size:z});if(l[f]=h,!K(h,z)){let E=z-h,P=e<0?a:s;for(;P>=0&&P<t.length;){const N=l[P];S(N!=null,`Previous layout not found for panel index ${P}`);const k=N+E,D=fe({panelConstraints:t,panelIndex:P,size:k});if(K(N,D)||(E-=D-N,l[P]=D),K(E,0))break;e>0?P--:P++}}}const w=l.reduce((f,c)=>c+f,0);return K(w,100)?l:i}function qn({layout:e,panelsArray:n,pivotIndices:t}){let r=0,i=100,o=0,l=0;const s=t[0];S(s!=null,"No pivot index found"),n.forEach((f,c)=>{const{constraints:z}=f,{maxSize:h=100,minSize:E=0}=z;c===s?(r=E,i=h):(o+=E,l+=h)});const a=Math.min(i,100-o),g=Math.max(r,100-l),w=e[s];return{valueMax:a,valueMin:g,valueNow:w}}function ye(e,n=document){return Array.from(n.querySelectorAll(`[${H.resizeHandleId}][data-panel-group-id="${e}"]`))}function pn(e,n,t=document){const i=ye(e,t).findIndex(o=>o.getAttribute(H.resizeHandleId)===n);return i??null}function gn(e,n,t){const r=pn(e,n,t);return r!=null?[r,r+1]:[-1,-1]}function hn(e,n=document){var t;if(n instanceof HTMLElement&&(n==null||(t=n.dataset)===null||t===void 0?void 0:t.panelGroupId)==e)return n;const r=n.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return r||null}function Ne(e,n=document){const t=n.querySelector(`[${H.resizeHandleId}="${e}"]`);return t||null}function Xn(e,n,t,r=document){var i,o,l,s;const a=Ne(n,r),g=ye(e,r),w=a?g.indexOf(a):-1,f=(i=(o=t[w])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,c=(l=(s=t[w+1])===null||s===void 0?void 0:s.id)!==null&&l!==void 0?l:null;return[f,c]}function Jn({committedValuesRef:e,eagerValuesRef:n,groupId:t,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){u.useRef({didWarnAboutMissingResizeHandle:!1}),se(()=>{if(!o)return;const s=ye(t,o);for(let a=0;a<i.length-1;a++){const{valueMax:g,valueMin:w,valueNow:f}=qn({layout:r,panelsArray:i,pivotIndices:[a,a+1]}),c=s[a];if(c!=null){const z=i[a];S(z,`No panel data found for index "${a}"`),c.setAttribute("aria-controls",z.id),c.setAttribute("aria-valuemax",""+Math.round(g)),c.setAttribute("aria-valuemin",""+Math.round(w)),c.setAttribute("aria-valuenow",f!=null?""+Math.round(f):"")}}return()=>{s.forEach((a,g)=>{a.removeAttribute("aria-controls"),a.removeAttribute("aria-valuemax"),a.removeAttribute("aria-valuemin"),a.removeAttribute("aria-valuenow")})}},[t,r,i,o]),u.useEffect(()=>{if(!o)return;const s=n.current;S(s,"Eager values not found");const{panelDataArray:a}=s,g=hn(t,o);S(g!=null,`No group found for id "${t}"`);const w=ye(t,o);S(w,`No resize handles found for group id "${t}"`);const f=w.map(c=>{const z=c.getAttribute(H.resizeHandleId);S(z,"Resize handle element has no handle id attribute");const[h,E]=Xn(t,z,a,o);if(h==null||E==null)return()=>{};const C=P=>{if(!P.defaultPrevented)switch(P.key){case"Enter":{P.preventDefault();const N=a.findIndex(k=>k.id===h);if(N>=0){const k=a[N];S(k,`No panel data found for index ${N}`);const D=r[N],{collapsedSize:O=0,collapsible:I,minSize:v=0}=k.constraints;if(D!=null&&I){const V=xe({delta:K(D,O)?v-O:O-D,initialLayout:r,panelConstraints:a.map(B=>B.constraints),pivotIndices:gn(t,z,o),prevLayout:r,trigger:"keyboard"});r!==V&&l(V)}}break}}};return c.addEventListener("keydown",C),()=>{c.removeEventListener("keydown",C)}});return()=>{f.forEach(c=>c())}},[o,e,n,t,r,i,l])}function Xe(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}function mn(e,n){const t=e==="horizontal",{x:r,y:i}=Ie(n);return t?r:i}function Yn(e,n,t,r,i){const o=t==="horizontal",l=Ne(n,i);S(l,`No resize handle element found for id "${n}"`);const s=l.getAttribute(H.groupId);S(s,"Resize handle element has no group id attribute");let{initialCursorPosition:a}=r;const g=mn(t,e),w=hn(s,i);S(w,`No group element found for id "${s}"`);const f=w.getBoundingClientRect(),c=o?f.width:f.height;return(g-a)/c*100}function Zn(e,n,t,r,i,o){if(rn(e)){const l=t==="horizontal";let s=0;e.shiftKey?s=100:i!=null?s=i:s=10;let a=0;switch(e.key){case"ArrowDown":a=l?0:s;break;case"ArrowLeft":a=l?-s:0;break;case"ArrowRight":a=l?s:0;break;case"ArrowUp":a=l?0:-s;break;case"End":a=100;break;case"Home":a=-100;break}return a}else return r==null?0:Yn(e,n,t,r,o)}function Qn({panelDataArray:e}){const n=Array(e.length),t=e.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<e.length;o++){const l=t[o];S(l,`Panel constraints not found for index ${o}`);const{defaultSize:s}=l;s!=null&&(r++,n[o]=s,i-=s)}for(let o=0;o<e.length;o++){const l=t[o];S(l,`Panel constraints not found for index ${o}`);const{defaultSize:s}=l;if(s!=null)continue;const a=e.length-r,g=i/a;r++,n[o]=g,i-=g}return n}function ue(e,n,t){n.forEach((r,i)=>{const o=e[i];S(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:s,id:a}=o,{collapsedSize:g=0,collapsible:w}=s,f=t[a];if(f==null||r!==f){t[a]=r;const{onCollapse:c,onExpand:z,onResize:h}=l;h&&h(r,f),w&&(c||z)&&(z&&(f==null||Z(f,g))&&!Z(r,g)&&z(),c&&(f==null||!Z(f,g))&&Z(r,g)&&c())}})}function be(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!=n[t])return!1;return!0}function et({defaultSize:e,dragState:n,layout:t,panelData:r,panelIndex:i,precision:o=3}){const l=t[i];let s;return l==null?s=e!=null?e.toPrecision(o):"1":r.length===1?s="1":s=l.toPrecision(o),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:"hidden",pointerEvents:n!==null?"none":void 0}}function nt(e,n=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{e(...i)},n)}}function Je(e){try{if(typeof localStorage<"u")e.getItem=n=>localStorage.getItem(n),e.setItem=(n,t)=>{localStorage.setItem(n,t)};else throw new Error("localStorage not supported in this environment")}catch(n){console.error(n),e.getItem=()=>null,e.setItem=()=>{}}}function xn(e){return`react-resizable-panels:${e}`}function zn(e){return e.map(n=>{const{constraints:t,id:r,idIsFromProps:i,order:o}=n;return i?r:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((n,t)=>n.localeCompare(t)).join(",")}function vn(e,n){try{const t=xn(e),r=n.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function tt(e,n,t){var r,i;const o=(r=vn(e,t))!==null&&r!==void 0?r:{},l=zn(n);return(i=o[l])!==null&&i!==void 0?i:null}function rt(e,n,t,r,i){var o;const l=xn(e),s=zn(n),a=(o=vn(e,i))!==null&&o!==void 0?o:{};a[s]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(l,JSON.stringify(a))}catch(g){console.error(g)}}function Ye({layout:e,panelConstraints:n}){const t=[...e],r=t.reduce((o,l)=>o+l,0);if(t.length!==n.length)throw Error(`Invalid ${n.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!K(r,100)&&t.length>0)for(let o=0;o<n.length;o++){const l=t[o];S(l!=null,`No layout data found for index ${o}`);const s=100/r*l;t[o]=s}let i=0;for(let o=0;o<n.length;o++){const l=t[o];S(l!=null,`No layout data found for index ${o}`);const s=fe({panelConstraints:n,panelIndex:o,size:l});l!=s&&(i+=l-s,t[o]=s)}if(!K(i,0))for(let o=0;o<n.length;o++){const l=t[o];S(l!=null,`No layout data found for index ${o}`);const s=l+i,a=fe({panelConstraints:n,panelIndex:o,size:s});if(l!==a&&(i-=a-l,t[o]=a,K(i,0)))break}return t}const ot=100,ze={getItem:e=>(Je(ze),ze.getItem(e)),setItem:(e,n)=>{Je(ze),ze.setItem(e,n)}},Ze={};function yn({autoSaveId:e=null,children:n,className:t="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:s=null,storage:a=ze,style:g,tagName:w="div",...f}){const c=We(o),z=u.useRef(null),[h,E]=u.useState(null),[C,P]=u.useState([]),N=Kn(),k=u.useRef({}),D=u.useRef(new Map),O=u.useRef(0),I=u.useRef({autoSaveId:e,direction:r,dragState:h,id:c,keyboardResizeBy:s,onLayout:l,storage:a}),v=u.useRef({layout:C,panelDataArray:[],panelDataArrayChanged:!1});u.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),u.useImperativeHandle(i,()=>({getId:()=>I.current.id,getLayout:()=>{const{layout:d}=v.current;return d},setLayout:d=>{const{onLayout:x}=I.current,{layout:b,panelDataArray:m}=v.current,p=Ye({layout:d,panelConstraints:m.map(y=>y.constraints)});Xe(b,p)||(P(p),v.current.layout=p,x&&x(p),ue(m,p,k.current))}}),[]),se(()=>{I.current.autoSaveId=e,I.current.direction=r,I.current.dragState=h,I.current.id=c,I.current.onLayout=l,I.current.storage=a}),Jn({committedValuesRef:I,eagerValuesRef:v,groupId:c,layout:C,panelDataArray:v.current.panelDataArray,setLayout:P,panelGroupElement:z.current}),u.useEffect(()=>{const{panelDataArray:d}=v.current;if(e){if(C.length===0||C.length!==d.length)return;let x=Ze[e];x==null&&(x=nt(rt,ot),Ze[e]=x);const b=[...d],m=new Map(D.current);x(e,b,m,C,a)}},[e,C,a]),u.useEffect(()=>{});const V=u.useCallback(d=>{const{onLayout:x}=I.current,{layout:b,panelDataArray:m}=v.current;if(d.constraints.collapsible){const p=m.map(J=>J.constraints),{collapsedSize:y=0,panelSize:R,pivotIndices:_}=ie(m,d,b);if(S(R!=null,`Panel size not found for panel "${d.id}"`),!Z(R,y)){D.current.set(d.id,R);const Y=de(m,d)===m.length-1?R-y:y-R,M=xe({delta:Y,initialLayout:b,panelConstraints:p,pivotIndices:_,prevLayout:b,trigger:"imperative-api"});be(b,M)||(P(M),v.current.layout=M,x&&x(M),ue(m,M,k.current))}}},[]),B=u.useCallback((d,x)=>{const{onLayout:b}=I.current,{layout:m,panelDataArray:p}=v.current;if(d.constraints.collapsible){const y=p.map(q=>q.constraints),{collapsedSize:R=0,panelSize:_=0,minSize:J=0,pivotIndices:Y}=ie(p,d,m),M=x??J;if(Z(_,R)){const q=D.current.get(d.id),ge=q!=null&&q>=M?q:M,Ae=de(p,d)===p.length-1?_-ge:ge-_,T=xe({delta:Ae,initialLayout:m,panelConstraints:y,pivotIndices:Y,prevLayout:m,trigger:"imperative-api"});be(m,T)||(P(T),v.current.layout=T,b&&b(T),ue(p,T,k.current))}}},[]),F=u.useCallback(d=>{const{layout:x,panelDataArray:b}=v.current,{panelSize:m}=ie(b,d,x);return S(m!=null,`Panel size not found for panel "${d.id}"`),m},[]),W=u.useCallback((d,x)=>{const{panelDataArray:b}=v.current,m=de(b,d);return et({defaultSize:x,dragState:h,layout:C,panelData:b,panelIndex:m})},[h,C]),L=u.useCallback(d=>{const{layout:x,panelDataArray:b}=v.current,{collapsedSize:m=0,collapsible:p,panelSize:y}=ie(b,d,x);return S(y!=null,`Panel size not found for panel "${d.id}"`),p===!0&&Z(y,m)},[]),U=u.useCallback(d=>{const{layout:x,panelDataArray:b}=v.current,{collapsedSize:m=0,collapsible:p,panelSize:y}=ie(b,d,x);return S(y!=null,`Panel size not found for panel "${d.id}"`),!p||ae(y,m)>0},[]),j=u.useCallback(d=>{const{panelDataArray:x}=v.current;x.push(d),x.sort((b,m)=>{const p=b.order,y=m.order;return p==null&&y==null?0:p==null?-1:y==null?1:p-y}),v.current.panelDataArrayChanged=!0,N()},[N]);se(()=>{if(v.current.panelDataArrayChanged){v.current.panelDataArrayChanged=!1;const{autoSaveId:d,onLayout:x,storage:b}=I.current,{layout:m,panelDataArray:p}=v.current;let y=null;if(d){const _=tt(d,p,b);_&&(D.current=new Map(Object.entries(_.expandToSizes)),y=_.layout)}y==null&&(y=Qn({panelDataArray:p}));const R=Ye({layout:y,panelConstraints:p.map(_=>_.constraints)});Xe(m,R)||(P(R),v.current.layout=R,x&&x(R),ue(p,R,k.current))}}),se(()=>{const d=v.current;return()=>{d.layout=[]}},[]);const $=u.useCallback(d=>{let x=!1;const b=z.current;return b&&window.getComputedStyle(b,null).getPropertyValue("direction")==="rtl"&&(x=!0),function(p){p.preventDefault();const y=z.current;if(!y)return()=>null;const{direction:R,dragState:_,id:J,keyboardResizeBy:Y,onLayout:M}=I.current,{layout:q,panelDataArray:ge}=v.current,{initialLayout:Se}=_??{},Ae=gn(J,d,y);let T=Zn(p,d,R,_,Y,y);const Te=R==="horizontal";Te&&x&&(T=-T);const wn=ge.map(Cn=>Cn.constraints),he=xe({delta:T,initialLayout:Se??q,panelConstraints:wn,pivotIndices:Ae,prevLayout:q,trigger:rn(p)?"keyboard":"mouse-or-touch"}),Oe=!be(q,he);(on(p)||ln(p))&&O.current!=T&&(O.current=T,!Oe&&T!==0?Te?Me(d,T<0?an:cn):Me(d,T<0?un:dn):Me(d,0)),Oe&&(P(he),v.current.layout=he,M&&M(he),ue(ge,he,k.current))}},[]),G=u.useCallback((d,x)=>{const{onLayout:b}=I.current,{layout:m,panelDataArray:p}=v.current,y=p.map(q=>q.constraints),{panelSize:R,pivotIndices:_}=ie(p,d,m);S(R!=null,`Panel size not found for panel "${d.id}"`);const Y=de(p,d)===p.length-1?R-x:x-R,M=xe({delta:Y,initialLayout:m,panelConstraints:y,pivotIndices:_,prevLayout:m,trigger:"imperative-api"});be(m,M)||(P(M),v.current.layout=M,b&&b(M),ue(p,M,k.current))},[]),te=u.useCallback((d,x)=>{const{layout:b,panelDataArray:m}=v.current,{collapsedSize:p=0,collapsible:y}=x,{collapsedSize:R=0,collapsible:_,maxSize:J=100,minSize:Y=0}=d.constraints,{panelSize:M}=ie(m,d,b);M!=null&&(y&&_&&Z(M,p)?Z(p,R)||G(d,R):M<Y?G(d,Y):M>J&&G(d,J))},[G]),ce=u.useCallback((d,x)=>{const{direction:b}=I.current,{layout:m}=v.current;if(!z.current)return;const p=Ne(d,z.current);S(p,`Drag handle element not found for id "${d}"`);const y=mn(b,x);E({dragHandleId:d,dragHandleRect:p.getBoundingClientRect(),initialCursorPosition:y,initialLayout:m})},[]),re=u.useCallback(()=>{E(null)},[]),oe=u.useCallback(d=>{const{panelDataArray:x}=v.current,b=de(x,d);b>=0&&(x.splice(b,1),delete k.current[d.id],v.current.panelDataArrayChanged=!0,N())},[N]),Q=u.useMemo(()=>({collapsePanel:V,direction:r,dragState:h,expandPanel:B,getPanelSize:F,getPanelStyle:W,groupId:c,isPanelCollapsed:L,isPanelExpanded:U,reevaluatePanelConstraints:te,registerPanel:j,registerResizeHandle:$,resizePanel:G,startDragging:ce,stopDragging:re,unregisterPanel:oe,panelGroupElement:z.current}),[V,h,r,B,F,W,c,L,U,te,j,$,G,ce,re,oe]),ee={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return u.createElement(Ee.Provider,{value:Q},u.createElement(w,{...f,children:n,className:t,id:o,ref:z,style:{...ee,...g},[H.group]:"",[H.groupDirection]:r,[H.groupId]:c}))}const Sn=u.forwardRef((e,n)=>u.createElement(yn,{...e,forwardedRef:n}));yn.displayName="PanelGroup";Sn.displayName="forwardRef(PanelGroup)";function de(e,n){return e.findIndex(t=>t===n||t.id===n.id)}function ie(e,n,t){const r=de(e,n),o=r===e.length-1?[r-1,r]:[r,r+1],l=t[r];return{...n.constraints,panelSize:l,pivotIndices:o}}function it({disabled:e,handleId:n,resizeHandler:t,panelGroupElement:r}){u.useEffect(()=>{if(e||t==null||r==null)return;const i=Ne(n,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),t(l);break}case"F6":{l.preventDefault();const s=i.getAttribute(H.groupId);S(s,`No group element found for id "${s}"`);const a=ye(s,r),g=pn(s,n,r);S(g!==null,`No resize element found for id "${n}"`);const w=l.shiftKey?g>0?g-1:a.length-1:g+1<a.length?g+1:0;a[w].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,e,n,t])}function bn({children:e=null,className:n="",disabled:t=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:s,onFocus:a,onPointerDown:g,onPointerUp:w,style:f={},tabIndex:c=0,tagName:z="div",...h}){var E,C;const P=u.useRef(null),N=u.useRef({onClick:l,onDragging:s,onPointerDown:g,onPointerUp:w});u.useEffect(()=>{N.current.onClick=l,N.current.onDragging=s,N.current.onPointerDown=g,N.current.onPointerUp=w});const k=u.useContext(Ee);if(k===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:O,registerResizeHandle:I,startDragging:v,stopDragging:V,panelGroupElement:B}=k,F=We(i),[W,L]=u.useState("inactive"),[U,j]=u.useState(!1),[$,G]=u.useState(null),te=u.useRef({state:W});se(()=>{te.current.state=W}),u.useEffect(()=>{if(t)G(null);else{const Q=I(F);G(()=>Q)}},[t,F,I]);const ce=(E=r?.coarse)!==null&&E!==void 0?E:15,re=(C=r?.fine)!==null&&C!==void 0?C:5;u.useEffect(()=>{if(t||$==null)return;const Q=P.current;S(Q,"Element ref not attached");let ee=!1;return On(F,Q,D,{coarse:ce,fine:re},(x,b,m)=>{if(!b){L("inactive");return}switch(x){case"down":{L("drag"),ee=!1,S(m,'Expected event to be defined for "down" action'),v(F,m);const{onDragging:p,onPointerDown:y}=N.current;p?.(!0),y?.();break}case"move":{const{state:p}=te.current;ee=!0,p!=="drag"&&L("hover"),S(m,'Expected event to be defined for "move" action'),$(m);break}case"up":{L("hover"),V();const{onClick:p,onDragging:y,onPointerUp:R}=N.current;y?.(!1),R?.(),ee||p?.();break}}})},[ce,D,t,re,I,F,$,v,V]),it({disabled:t,handleId:F,resizeHandler:$,panelGroupElement:B});const oe={touchAction:"none",userSelect:"none"};return u.createElement(z,{...h,children:e,className:n,id:i,onBlur:()=>{j(!1),o?.()},onFocus:()=>{j(!0),a?.()},ref:P,role:"separator",style:{...oe,...f},tabIndex:c,[H.groupDirection]:D,[H.groupId]:O,[H.resizeHandle]:"",[H.resizeHandleActive]:W==="drag"?"pointer":U?"keyboard":void 0,[H.resizeHandleEnabled]:!t,[H.resizeHandleId]:F,[H.resizeHandleState]:W})}bn.displayName="PanelResizeHandle";function Qe({className:e,...n}){return A.jsx(Sn,{className:en("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...n})}const me=tn;function $e({className:e,...n}){return A.jsx(bn,{className:en("relative w-px shrink-0 bg-line transition-colors cursor-col-resize","after:absolute after:inset-y-0 after:left-1/2 after:w-1.5 after:-translate-x-1/2","data-[resize-handle-state=hover]:bg-line-strong","data-[resize-handle-state=drag]:bg-accent","focus-visible:outline-none focus-visible:bg-accent",e),...n})}function lt({className:e,children:n}){const t=u.useRef(null),[r,i]=u.useState(null);return u.useEffect(()=>{const o=t.current?.parentElement;if(!o||typeof ResizeObserver>"u")return;const l=()=>{const a=Math.floor(o.getBoundingClientRect().width);i(g=>g===a?g:a)};l();const s=new ResizeObserver(l);return s.observe(o),()=>s.disconnect()},[]),A.jsx("div",{ref:t,className:e,style:r===null?void 0:{width:`${r}px`},children:n})}const Pn=u.createContext(null);function st(e,n){return e==="list"?{size:62,max:78}:e==="detail"?{size:26,max:45}:{size:n==="compact"?43:33,max:58}}function ft(){return u.useContext(Pn)}function pt({nav:e,list:n,reading:t,intelligence:r,intelligenceOpen:i=!0,hasThread:o=!0,density:l="comfortable",listBias:s="balanced",header:a,topBar:g,appBar:w,overlay:f,skeleton:c,isLoading:z=!1,initialWidth:h,navOpen:E,onOpenNav:C,onCloseNav:P}){const[N,k]=kn(h),D=Ln(k??0),[O,I]=u.useState(!1),v=D.nav,V=v&&!O,B=D.reading&&!!t,F=D.intelligence,[W,L]=u.useState(!1),U=E!==void 0,j=U?E:W,$=()=>{U||L(!0),C?.()},G=()=>{U||L(!1),P?.()},te=F&&i&&o&&!!r,re={panes:D,containerWidth:k,showNavPane:v,openNav:$,navCollapsed:O,toggleNav:()=>{if(!v){j?G():$();return}I(d=>!d)},showReadingPane:B,showIntelligencePane:F},oe=st(s,l),Q=A.jsxs(Qe,{direction:"horizontal",className:"min-h-0 flex-1",children:[A.jsx(me,{id:"list",order:1,defaultSize:B?oe.size:100,minSize:22,maxSize:B?oe.max:100,className:"min-w-0",children:n}),B&&A.jsxs(A.Fragment,{children:[A.jsx($e,{}),A.jsx(me,{id:"reading",order:2,minSize:29,className:"min-w-0",children:A.jsx(lt,{className:"h-full",children:t})})]}),te&&A.jsxs(A.Fragment,{children:[A.jsx($e,{}),A.jsx(me,{id:"intelligence",order:3,defaultSize:25,minSize:18,maxSize:39,className:"min-w-0",children:r})]})]},B?"list-reading":"list-only"),ee=A.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[!v&&a&&A.jsx("div",{className:"shrink-0",children:a}),Q]});return A.jsx(Pn.Provider,{value:re,children:A.jsxs("div",{ref:N,className:"safe-area-frame @container flex h-full w-full flex-col overflow-hidden bg-canvas font-sans text-fg",children:[A.jsx(Rn,{topBar:g,appBar:w,children:z&&c?c:V?A.jsxs(Qe,{direction:"horizontal",className:"min-h-0 flex-1",children:[A.jsx(me,{id:"nav",order:1,defaultSize:17,minSize:12,maxSize:24,className:"min-w-0",children:e}),A.jsx($e,{}),A.jsx(me,{id:"content",order:2,className:"flex min-w-0 flex-col",children:ee})]}):ee}),!(z&&c)&&A.jsxs(A.Fragment,{children:[!v&&A.jsx(In,{open:j,onClose:G,title:"Folders",anchor:"left",children:e}),f]})]})})}const _e="search-scope";function at(e){const n=e.trim().replace(/\s+/g," ").toLowerCase();return/\s/.test(n)?`in:"${n}"`:`in:${n}`}function gt(e){return e.list!==void 0&&e.list!=="brief"}function ht(e){return e.list==="mailbox"?e.mailboxId:void 0}function mt(e,n){return e.list==="flagged"?{kind:"scoped",chip:{id:_e,label:"is:starred"}}:e.list==="outbox"?{kind:"scoped",chip:{id:_e,label:"in:outbox"}}:e.list==="mailbox"||e.list==="label"?n?{kind:"scoped",chip:{id:_e,label:at(n)}}:{kind:"pending"}:{kind:"global"}}function xt(e,n,t){return n.kind==="global"?{kind:"global"}:e.list==="flagged"||e.list==="label"?{kind:"collection"}:{kind:"folder",...t?{role:t}:{}}}export{pt as A,_e as S,xt as a,gt as i,dt as k,ht as r,mt as s,ft as u};
|
|
1
|
+
import{r as u,cx as En,j as A,p as en,aE as In}from"./index-9QMShYZC.js";import{A as Rn}from"./app-chrome-BtWv1mrl.js";const Nn=1024,An=1280;function Ln(e,n=Nn,t=An){const r=e>=n;return{nav:r,reading:r,intelligence:e>=t}}function dt(e){return e===void 0?!1:e.handlers.focusNext!==void 0&&e.handlers.focusPrevious!==void 0}function kn(e){const n=u.useRef(null),[t,r]=u.useState(e??null);return u.useEffect(()=>{const i=n.current;if(!i||typeof ResizeObserver>"u")return;const o=new ResizeObserver(a=>{const g=a[0];g&&r(g.contentRect.width)});o.observe(i);const l=getComputedStyle(i),s=Number.parseFloat(l.paddingLeft)+Number.parseFloat(l.paddingRight);return r(i.clientWidth-s),()=>o.disconnect()},[]),[n,t]}const Ee=u.createContext(null);Ee.displayName="PanelGroupContext";const H={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Ge=10,se=u.useLayoutEffect,Ve=En.useId,Dn=typeof Ve=="function"?Ve:()=>null;let Mn=0;function We(e=null){const n=Dn(),t=u.useRef(e||n||null);return t.current===null&&(t.current=""+Mn++),e??t.current}function nn({children:e,className:n="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:s,minSize:a,onCollapse:g,onExpand:w,onResize:f,order:c,style:z,tagName:h="div",...E}){const C=u.useContext(Ee);if(C===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:P,expandPanel:N,getPanelSize:k,getPanelStyle:D,groupId:O,isPanelCollapsed:I,reevaluatePanelConstraints:v,registerPanel:V,resizePanel:B,unregisterPanel:F}=C,W=We(l),L=u.useRef({callbacks:{onCollapse:g,onExpand:w,onResize:f},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:s,minSize:a},id:W,idIsFromProps:l!==void 0,order:c});u.useRef({didLogMissingDefaultSizeWarning:!1}),se(()=>{const{callbacks:j,constraints:$}=L.current,G={...$};L.current.id=W,L.current.idIsFromProps=l!==void 0,L.current.order=c,j.onCollapse=g,j.onExpand=w,j.onResize=f,$.collapsedSize=t,$.collapsible=r,$.defaultSize=i,$.maxSize=s,$.minSize=a,(G.collapsedSize!==$.collapsedSize||G.collapsible!==$.collapsible||G.maxSize!==$.maxSize||G.minSize!==$.minSize)&&v(L.current,G)}),se(()=>{const j=L.current;return V(j),()=>{F(j)}},[c,W,V,F]),u.useImperativeHandle(o,()=>({collapse:()=>{P(L.current)},expand:j=>{N(L.current,j)},getId(){return W},getSize(){return k(L.current)},isCollapsed(){return I(L.current)},isExpanded(){return!I(L.current)},resize:j=>{B(L.current,j)}}),[P,N,k,I,W,B]);const U=D(L.current,i);return u.createElement(h,{...E,children:e,className:n,id:W,style:{...U,...z},[H.groupId]:O,[H.panel]:"",[H.panelCollapsible]:r||void 0,[H.panelId]:W,[H.panelSize]:parseFloat(""+U.flexGrow).toFixed(1)})}const tn=u.forwardRef((e,n)=>u.createElement(nn,{...e,forwardedRef:n}));nn.displayName="Panel";tn.displayName="forwardRef(Panel)";let je=null,Pe=-1,ne=null;function Hn(e,n){if(n){const t=(n&an)!==0,r=(n&cn)!==0,i=(n&un)!==0,o=(n&dn)!==0;if(t)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function $n(){ne!==null&&(document.head.removeChild(ne),je=null,ne=null,Pe=-1)}function Le(e,n){var t,r;const i=Hn(e,n);if(je!==i){if(je=i,ne===null&&(ne=document.createElement("style"),document.head.appendChild(ne)),Pe>=0){var o;(o=ne.sheet)===null||o===void 0||o.removeRule(Pe)}Pe=(t=(r=ne.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&t!==void 0?t:-1}}function rn(e){return e.type==="keydown"}function on(e){return e.type.startsWith("pointer")}function ln(e){return e.type.startsWith("mouse")}function Ie(e){if(on(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(ln(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function _n(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function jn(e,n,t){return e.x<n.x+n.width&&e.x+e.width>n.x&&e.y<n.y+n.height&&e.y+e.height>n.y}function Gn(e,n){if(e===n)throw new Error("Cannot compare node with itself");const t={a:qe(e),b:qe(n)};let r;for(;t.a.at(-1)===t.b.at(-1);)e=t.a.pop(),n=t.b.pop(),r=e;S(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ue(Ke(t.a)),b:Ue(Ke(t.b))};if(i.a===i.b){const o=r.childNodes,l={a:t.a.at(-1),b:t.b.at(-1)};let s=o.length;for(;s--;){const a=o[s];if(a===l.a)return 1;if(a===l.b)return-1}}return Math.sign(i.a-i.b)}const Wn=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Fn(e){var n;const t=getComputedStyle((n=sn(e))!==null&&n!==void 0?n:e).display;return t==="flex"||t==="inline-flex"}function Bn(e){const n=getComputedStyle(e);return!!(n.position==="fixed"||n.zIndex!=="auto"&&(n.position!=="static"||Fn(e))||+n.opacity<1||"transform"in n&&n.transform!=="none"||"webkitTransform"in n&&n.webkitTransform!=="none"||"mixBlendMode"in n&&n.mixBlendMode!=="normal"||"filter"in n&&n.filter!=="none"||"webkitFilter"in n&&n.webkitFilter!=="none"||"isolation"in n&&n.isolation==="isolate"||Wn.test(n.willChange)||n.webkitOverflowScrolling==="touch")}function Ke(e){let n=e.length;for(;n--;){const t=e[n];if(S(t,"Missing node"),Bn(t))return t}return null}function Ue(e){return e&&Number(getComputedStyle(e).zIndex)||0}function qe(e){const n=[];for(;e;)n.push(e),e=sn(e);return n}function sn(e){const{parentNode:n}=e;return n&&n instanceof ShadowRoot?n.host:n}const an=1,cn=2,un=4,dn=8,Tn=_n()==="coarse";let X=[],pe=!1,le=new Map,Re=new Map;const ve=new Set;function On(e,n,t,r,i){var o;const{ownerDocument:l}=n,s={direction:t,element:n,hitAreaMargins:r,setResizeHandlerState:i},a=(o=le.get(l))!==null&&o!==void 0?o:0;return le.set(l,a+1),ve.add(s),we(),function(){var w;Re.delete(e),ve.delete(s);const f=(w=le.get(l))!==null&&w!==void 0?w:1;if(le.set(l,f-1),we(),f===1&&le.delete(l),X.includes(s)){const c=X.indexOf(s);c>=0&&X.splice(c,1),Be(),i("up",!0,null)}}}function Vn(e){const{target:n}=e,{x:t,y:r}=Ie(e);pe=!0,Fe({target:n,x:t,y:r}),we(),X.length>0&&(Ce("down",e),e.preventDefault(),fn(n)||e.stopImmediatePropagation())}function ke(e){const{x:n,y:t}=Ie(e);if(pe&&e.buttons===0&&(pe=!1,Ce("up",e)),!pe){const{target:r}=e;Fe({target:r,x:n,y:t})}Ce("move",e),Be(),X.length>0&&e.preventDefault()}function De(e){const{target:n}=e,{x:t,y:r}=Ie(e);Re.clear(),pe=!1,X.length>0&&(e.preventDefault(),fn(n)||e.stopImmediatePropagation()),Ce("up",e),Fe({target:n,x:t,y:r}),Be(),we()}function fn(e){let n=e;for(;n;){if(n.hasAttribute(H.resizeHandle))return!0;n=n.parentElement}return!1}function Fe({target:e,x:n,y:t}){X.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),ve.forEach(i=>{const{element:o,hitAreaMargins:l}=i,s=o.getBoundingClientRect(),{bottom:a,left:g,right:w,top:f}=s,c=Tn?l.coarse:l.fine;if(n>=g-c&&n<=w+c&&t>=f-c&&t<=a+c){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&Gn(r,o)>0){let h=r,E=!1;for(;h&&!h.contains(o);){if(jn(h.getBoundingClientRect(),s)){E=!0;break}h=h.parentElement}if(E)return}X.push(i)}})}function Me(e,n){Re.set(e,n)}function Be(){let e=!1,n=!1;X.forEach(r=>{const{direction:i}=r;i==="horizontal"?e=!0:n=!0});let t=0;Re.forEach(r=>{t|=r}),e&&n?Le("intersection",t):e?Le("horizontal",t):n?Le("vertical",t):$n()}let He=new AbortController;function we(){He.abort(),He=new AbortController;const e={capture:!0,signal:He.signal};ve.size&&(pe?(X.length>0&&le.forEach((n,t)=>{const{body:r}=t;n>0&&(r.addEventListener("contextmenu",De,e),r.addEventListener("pointerleave",ke,e),r.addEventListener("pointermove",ke,e))}),window.addEventListener("pointerup",De,e),window.addEventListener("pointercancel",De,e)):le.forEach((n,t)=>{const{body:r}=t;n>0&&(r.addEventListener("pointerdown",Vn,e),r.addEventListener("pointermove",ke,e))}))}function Ce(e,n){ve.forEach(t=>{const{setResizeHandlerState:r}=t,i=X.includes(t);r(e,i,n)})}function Kn(){const[e,n]=u.useState(0);return u.useCallback(()=>n(t=>t+1),[])}function S(e,n){if(!e)throw console.error(n),Error(n)}function ae(e,n,t=Ge){return e.toFixed(t)===n.toFixed(t)?0:e>n?1:-1}function Z(e,n,t=Ge){return ae(e,n,t)===0}function K(e,n,t){return ae(e,n,t)===0}function Un(e,n,t){if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++){const i=e[r],o=n[r];if(!K(i,o,t))return!1}return!0}function fe({panelConstraints:e,panelIndex:n,size:t}){const r=e[n];S(r!=null,`Panel constraints not found for index ${n}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:s=0}=r;if(ae(t,s)<0)if(o){const a=(i+s)/2;ae(t,a)<0?t=i:t=s}else t=s;return t=Math.min(l,t),t=parseFloat(t.toFixed(Ge)),t}function xe({delta:e,initialLayout:n,panelConstraints:t,pivotIndices:r,prevLayout:i,trigger:o}){if(K(e,0))return n;const l=[...n],[s,a]=r;S(s!=null,"Invalid first pivot index"),S(a!=null,"Invalid second pivot index");let g=0;if(o==="keyboard"){{const f=e<0?a:s,c=t[f];S(c,`Panel constraints not found for index ${f}`);const{collapsedSize:z=0,collapsible:h,minSize:E=0}=c;if(h){const C=n[f];if(S(C!=null,`Previous layout not found for panel index ${f}`),K(C,z)){const P=E-C;ae(P,Math.abs(e))>0&&(e=e<0?0-P:P)}}}{const f=e<0?s:a,c=t[f];S(c,`No panel constraints found for index ${f}`);const{collapsedSize:z=0,collapsible:h,minSize:E=0}=c;if(h){const C=n[f];if(S(C!=null,`Previous layout not found for panel index ${f}`),K(C,E)){const P=C-z;ae(P,Math.abs(e))>0&&(e=e<0?0-P:P)}}}}{const f=e<0?1:-1;let c=e<0?a:s,z=0;for(;;){const E=n[c];S(E!=null,`Previous layout not found for panel index ${c}`);const P=fe({panelConstraints:t,panelIndex:c,size:100})-E;if(z+=P,c+=f,c<0||c>=t.length)break}const h=Math.min(Math.abs(e),Math.abs(z));e=e<0?0-h:h}{let c=e<0?s:a;for(;c>=0&&c<t.length;){const z=Math.abs(e)-Math.abs(g),h=n[c];S(h!=null,`Previous layout not found for panel index ${c}`);const E=h-z,C=fe({panelConstraints:t,panelIndex:c,size:E});if(!K(h,C)&&(g+=h-C,l[c]=C,g.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?c--:c++}}if(Un(i,l))return i;{const f=e<0?a:s,c=n[f];S(c!=null,`Previous layout not found for panel index ${f}`);const z=c+g,h=fe({panelConstraints:t,panelIndex:f,size:z});if(l[f]=h,!K(h,z)){let E=z-h,P=e<0?a:s;for(;P>=0&&P<t.length;){const N=l[P];S(N!=null,`Previous layout not found for panel index ${P}`);const k=N+E,D=fe({panelConstraints:t,panelIndex:P,size:k});if(K(N,D)||(E-=D-N,l[P]=D),K(E,0))break;e>0?P--:P++}}}const w=l.reduce((f,c)=>c+f,0);return K(w,100)?l:i}function qn({layout:e,panelsArray:n,pivotIndices:t}){let r=0,i=100,o=0,l=0;const s=t[0];S(s!=null,"No pivot index found"),n.forEach((f,c)=>{const{constraints:z}=f,{maxSize:h=100,minSize:E=0}=z;c===s?(r=E,i=h):(o+=E,l+=h)});const a=Math.min(i,100-o),g=Math.max(r,100-l),w=e[s];return{valueMax:a,valueMin:g,valueNow:w}}function ye(e,n=document){return Array.from(n.querySelectorAll(`[${H.resizeHandleId}][data-panel-group-id="${e}"]`))}function pn(e,n,t=document){const i=ye(e,t).findIndex(o=>o.getAttribute(H.resizeHandleId)===n);return i??null}function gn(e,n,t){const r=pn(e,n,t);return r!=null?[r,r+1]:[-1,-1]}function hn(e,n=document){var t;if(n instanceof HTMLElement&&(n==null||(t=n.dataset)===null||t===void 0?void 0:t.panelGroupId)==e)return n;const r=n.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return r||null}function Ne(e,n=document){const t=n.querySelector(`[${H.resizeHandleId}="${e}"]`);return t||null}function Xn(e,n,t,r=document){var i,o,l,s;const a=Ne(n,r),g=ye(e,r),w=a?g.indexOf(a):-1,f=(i=(o=t[w])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,c=(l=(s=t[w+1])===null||s===void 0?void 0:s.id)!==null&&l!==void 0?l:null;return[f,c]}function Jn({committedValuesRef:e,eagerValuesRef:n,groupId:t,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){u.useRef({didWarnAboutMissingResizeHandle:!1}),se(()=>{if(!o)return;const s=ye(t,o);for(let a=0;a<i.length-1;a++){const{valueMax:g,valueMin:w,valueNow:f}=qn({layout:r,panelsArray:i,pivotIndices:[a,a+1]}),c=s[a];if(c!=null){const z=i[a];S(z,`No panel data found for index "${a}"`),c.setAttribute("aria-controls",z.id),c.setAttribute("aria-valuemax",""+Math.round(g)),c.setAttribute("aria-valuemin",""+Math.round(w)),c.setAttribute("aria-valuenow",f!=null?""+Math.round(f):"")}}return()=>{s.forEach((a,g)=>{a.removeAttribute("aria-controls"),a.removeAttribute("aria-valuemax"),a.removeAttribute("aria-valuemin"),a.removeAttribute("aria-valuenow")})}},[t,r,i,o]),u.useEffect(()=>{if(!o)return;const s=n.current;S(s,"Eager values not found");const{panelDataArray:a}=s,g=hn(t,o);S(g!=null,`No group found for id "${t}"`);const w=ye(t,o);S(w,`No resize handles found for group id "${t}"`);const f=w.map(c=>{const z=c.getAttribute(H.resizeHandleId);S(z,"Resize handle element has no handle id attribute");const[h,E]=Xn(t,z,a,o);if(h==null||E==null)return()=>{};const C=P=>{if(!P.defaultPrevented)switch(P.key){case"Enter":{P.preventDefault();const N=a.findIndex(k=>k.id===h);if(N>=0){const k=a[N];S(k,`No panel data found for index ${N}`);const D=r[N],{collapsedSize:O=0,collapsible:I,minSize:v=0}=k.constraints;if(D!=null&&I){const V=xe({delta:K(D,O)?v-O:O-D,initialLayout:r,panelConstraints:a.map(B=>B.constraints),pivotIndices:gn(t,z,o),prevLayout:r,trigger:"keyboard"});r!==V&&l(V)}}break}}};return c.addEventListener("keydown",C),()=>{c.removeEventListener("keydown",C)}});return()=>{f.forEach(c=>c())}},[o,e,n,t,r,i,l])}function Xe(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}function mn(e,n){const t=e==="horizontal",{x:r,y:i}=Ie(n);return t?r:i}function Yn(e,n,t,r,i){const o=t==="horizontal",l=Ne(n,i);S(l,`No resize handle element found for id "${n}"`);const s=l.getAttribute(H.groupId);S(s,"Resize handle element has no group id attribute");let{initialCursorPosition:a}=r;const g=mn(t,e),w=hn(s,i);S(w,`No group element found for id "${s}"`);const f=w.getBoundingClientRect(),c=o?f.width:f.height;return(g-a)/c*100}function Zn(e,n,t,r,i,o){if(rn(e)){const l=t==="horizontal";let s=0;e.shiftKey?s=100:i!=null?s=i:s=10;let a=0;switch(e.key){case"ArrowDown":a=l?0:s;break;case"ArrowLeft":a=l?-s:0;break;case"ArrowRight":a=l?s:0;break;case"ArrowUp":a=l?0:-s;break;case"End":a=100;break;case"Home":a=-100;break}return a}else return r==null?0:Yn(e,n,t,r,o)}function Qn({panelDataArray:e}){const n=Array(e.length),t=e.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<e.length;o++){const l=t[o];S(l,`Panel constraints not found for index ${o}`);const{defaultSize:s}=l;s!=null&&(r++,n[o]=s,i-=s)}for(let o=0;o<e.length;o++){const l=t[o];S(l,`Panel constraints not found for index ${o}`);const{defaultSize:s}=l;if(s!=null)continue;const a=e.length-r,g=i/a;r++,n[o]=g,i-=g}return n}function ue(e,n,t){n.forEach((r,i)=>{const o=e[i];S(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:s,id:a}=o,{collapsedSize:g=0,collapsible:w}=s,f=t[a];if(f==null||r!==f){t[a]=r;const{onCollapse:c,onExpand:z,onResize:h}=l;h&&h(r,f),w&&(c||z)&&(z&&(f==null||Z(f,g))&&!Z(r,g)&&z(),c&&(f==null||!Z(f,g))&&Z(r,g)&&c())}})}function be(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!=n[t])return!1;return!0}function et({defaultSize:e,dragState:n,layout:t,panelData:r,panelIndex:i,precision:o=3}){const l=t[i];let s;return l==null?s=e!=null?e.toPrecision(o):"1":r.length===1?s="1":s=l.toPrecision(o),{flexBasis:0,flexGrow:s,flexShrink:1,overflow:"hidden",pointerEvents:n!==null?"none":void 0}}function nt(e,n=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{e(...i)},n)}}function Je(e){try{if(typeof localStorage<"u")e.getItem=n=>localStorage.getItem(n),e.setItem=(n,t)=>{localStorage.setItem(n,t)};else throw new Error("localStorage not supported in this environment")}catch(n){console.error(n),e.getItem=()=>null,e.setItem=()=>{}}}function xn(e){return`react-resizable-panels:${e}`}function zn(e){return e.map(n=>{const{constraints:t,id:r,idIsFromProps:i,order:o}=n;return i?r:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((n,t)=>n.localeCompare(t)).join(",")}function vn(e,n){try{const t=xn(e),r=n.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function tt(e,n,t){var r,i;const o=(r=vn(e,t))!==null&&r!==void 0?r:{},l=zn(n);return(i=o[l])!==null&&i!==void 0?i:null}function rt(e,n,t,r,i){var o;const l=xn(e),s=zn(n),a=(o=vn(e,i))!==null&&o!==void 0?o:{};a[s]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(l,JSON.stringify(a))}catch(g){console.error(g)}}function Ye({layout:e,panelConstraints:n}){const t=[...e],r=t.reduce((o,l)=>o+l,0);if(t.length!==n.length)throw Error(`Invalid ${n.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!K(r,100)&&t.length>0)for(let o=0;o<n.length;o++){const l=t[o];S(l!=null,`No layout data found for index ${o}`);const s=100/r*l;t[o]=s}let i=0;for(let o=0;o<n.length;o++){const l=t[o];S(l!=null,`No layout data found for index ${o}`);const s=fe({panelConstraints:n,panelIndex:o,size:l});l!=s&&(i+=l-s,t[o]=s)}if(!K(i,0))for(let o=0;o<n.length;o++){const l=t[o];S(l!=null,`No layout data found for index ${o}`);const s=l+i,a=fe({panelConstraints:n,panelIndex:o,size:s});if(l!==a&&(i-=a-l,t[o]=a,K(i,0)))break}return t}const ot=100,ze={getItem:e=>(Je(ze),ze.getItem(e)),setItem:(e,n)=>{Je(ze),ze.setItem(e,n)}},Ze={};function yn({autoSaveId:e=null,children:n,className:t="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:s=null,storage:a=ze,style:g,tagName:w="div",...f}){const c=We(o),z=u.useRef(null),[h,E]=u.useState(null),[C,P]=u.useState([]),N=Kn(),k=u.useRef({}),D=u.useRef(new Map),O=u.useRef(0),I=u.useRef({autoSaveId:e,direction:r,dragState:h,id:c,keyboardResizeBy:s,onLayout:l,storage:a}),v=u.useRef({layout:C,panelDataArray:[],panelDataArrayChanged:!1});u.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),u.useImperativeHandle(i,()=>({getId:()=>I.current.id,getLayout:()=>{const{layout:d}=v.current;return d},setLayout:d=>{const{onLayout:x}=I.current,{layout:b,panelDataArray:m}=v.current,p=Ye({layout:d,panelConstraints:m.map(y=>y.constraints)});Xe(b,p)||(P(p),v.current.layout=p,x&&x(p),ue(m,p,k.current))}}),[]),se(()=>{I.current.autoSaveId=e,I.current.direction=r,I.current.dragState=h,I.current.id=c,I.current.onLayout=l,I.current.storage=a}),Jn({committedValuesRef:I,eagerValuesRef:v,groupId:c,layout:C,panelDataArray:v.current.panelDataArray,setLayout:P,panelGroupElement:z.current}),u.useEffect(()=>{const{panelDataArray:d}=v.current;if(e){if(C.length===0||C.length!==d.length)return;let x=Ze[e];x==null&&(x=nt(rt,ot),Ze[e]=x);const b=[...d],m=new Map(D.current);x(e,b,m,C,a)}},[e,C,a]),u.useEffect(()=>{});const V=u.useCallback(d=>{const{onLayout:x}=I.current,{layout:b,panelDataArray:m}=v.current;if(d.constraints.collapsible){const p=m.map(J=>J.constraints),{collapsedSize:y=0,panelSize:R,pivotIndices:_}=ie(m,d,b);if(S(R!=null,`Panel size not found for panel "${d.id}"`),!Z(R,y)){D.current.set(d.id,R);const Y=de(m,d)===m.length-1?R-y:y-R,M=xe({delta:Y,initialLayout:b,panelConstraints:p,pivotIndices:_,prevLayout:b,trigger:"imperative-api"});be(b,M)||(P(M),v.current.layout=M,x&&x(M),ue(m,M,k.current))}}},[]),B=u.useCallback((d,x)=>{const{onLayout:b}=I.current,{layout:m,panelDataArray:p}=v.current;if(d.constraints.collapsible){const y=p.map(q=>q.constraints),{collapsedSize:R=0,panelSize:_=0,minSize:J=0,pivotIndices:Y}=ie(p,d,m),M=x??J;if(Z(_,R)){const q=D.current.get(d.id),ge=q!=null&&q>=M?q:M,Ae=de(p,d)===p.length-1?_-ge:ge-_,T=xe({delta:Ae,initialLayout:m,panelConstraints:y,pivotIndices:Y,prevLayout:m,trigger:"imperative-api"});be(m,T)||(P(T),v.current.layout=T,b&&b(T),ue(p,T,k.current))}}},[]),F=u.useCallback(d=>{const{layout:x,panelDataArray:b}=v.current,{panelSize:m}=ie(b,d,x);return S(m!=null,`Panel size not found for panel "${d.id}"`),m},[]),W=u.useCallback((d,x)=>{const{panelDataArray:b}=v.current,m=de(b,d);return et({defaultSize:x,dragState:h,layout:C,panelData:b,panelIndex:m})},[h,C]),L=u.useCallback(d=>{const{layout:x,panelDataArray:b}=v.current,{collapsedSize:m=0,collapsible:p,panelSize:y}=ie(b,d,x);return S(y!=null,`Panel size not found for panel "${d.id}"`),p===!0&&Z(y,m)},[]),U=u.useCallback(d=>{const{layout:x,panelDataArray:b}=v.current,{collapsedSize:m=0,collapsible:p,panelSize:y}=ie(b,d,x);return S(y!=null,`Panel size not found for panel "${d.id}"`),!p||ae(y,m)>0},[]),j=u.useCallback(d=>{const{panelDataArray:x}=v.current;x.push(d),x.sort((b,m)=>{const p=b.order,y=m.order;return p==null&&y==null?0:p==null?-1:y==null?1:p-y}),v.current.panelDataArrayChanged=!0,N()},[N]);se(()=>{if(v.current.panelDataArrayChanged){v.current.panelDataArrayChanged=!1;const{autoSaveId:d,onLayout:x,storage:b}=I.current,{layout:m,panelDataArray:p}=v.current;let y=null;if(d){const _=tt(d,p,b);_&&(D.current=new Map(Object.entries(_.expandToSizes)),y=_.layout)}y==null&&(y=Qn({panelDataArray:p}));const R=Ye({layout:y,panelConstraints:p.map(_=>_.constraints)});Xe(m,R)||(P(R),v.current.layout=R,x&&x(R),ue(p,R,k.current))}}),se(()=>{const d=v.current;return()=>{d.layout=[]}},[]);const $=u.useCallback(d=>{let x=!1;const b=z.current;return b&&window.getComputedStyle(b,null).getPropertyValue("direction")==="rtl"&&(x=!0),function(p){p.preventDefault();const y=z.current;if(!y)return()=>null;const{direction:R,dragState:_,id:J,keyboardResizeBy:Y,onLayout:M}=I.current,{layout:q,panelDataArray:ge}=v.current,{initialLayout:Se}=_??{},Ae=gn(J,d,y);let T=Zn(p,d,R,_,Y,y);const Te=R==="horizontal";Te&&x&&(T=-T);const wn=ge.map(Cn=>Cn.constraints),he=xe({delta:T,initialLayout:Se??q,panelConstraints:wn,pivotIndices:Ae,prevLayout:q,trigger:rn(p)?"keyboard":"mouse-or-touch"}),Oe=!be(q,he);(on(p)||ln(p))&&O.current!=T&&(O.current=T,!Oe&&T!==0?Te?Me(d,T<0?an:cn):Me(d,T<0?un:dn):Me(d,0)),Oe&&(P(he),v.current.layout=he,M&&M(he),ue(ge,he,k.current))}},[]),G=u.useCallback((d,x)=>{const{onLayout:b}=I.current,{layout:m,panelDataArray:p}=v.current,y=p.map(q=>q.constraints),{panelSize:R,pivotIndices:_}=ie(p,d,m);S(R!=null,`Panel size not found for panel "${d.id}"`);const Y=de(p,d)===p.length-1?R-x:x-R,M=xe({delta:Y,initialLayout:m,panelConstraints:y,pivotIndices:_,prevLayout:m,trigger:"imperative-api"});be(m,M)||(P(M),v.current.layout=M,b&&b(M),ue(p,M,k.current))},[]),te=u.useCallback((d,x)=>{const{layout:b,panelDataArray:m}=v.current,{collapsedSize:p=0,collapsible:y}=x,{collapsedSize:R=0,collapsible:_,maxSize:J=100,minSize:Y=0}=d.constraints,{panelSize:M}=ie(m,d,b);M!=null&&(y&&_&&Z(M,p)?Z(p,R)||G(d,R):M<Y?G(d,Y):M>J&&G(d,J))},[G]),ce=u.useCallback((d,x)=>{const{direction:b}=I.current,{layout:m}=v.current;if(!z.current)return;const p=Ne(d,z.current);S(p,`Drag handle element not found for id "${d}"`);const y=mn(b,x);E({dragHandleId:d,dragHandleRect:p.getBoundingClientRect(),initialCursorPosition:y,initialLayout:m})},[]),re=u.useCallback(()=>{E(null)},[]),oe=u.useCallback(d=>{const{panelDataArray:x}=v.current,b=de(x,d);b>=0&&(x.splice(b,1),delete k.current[d.id],v.current.panelDataArrayChanged=!0,N())},[N]),Q=u.useMemo(()=>({collapsePanel:V,direction:r,dragState:h,expandPanel:B,getPanelSize:F,getPanelStyle:W,groupId:c,isPanelCollapsed:L,isPanelExpanded:U,reevaluatePanelConstraints:te,registerPanel:j,registerResizeHandle:$,resizePanel:G,startDragging:ce,stopDragging:re,unregisterPanel:oe,panelGroupElement:z.current}),[V,h,r,B,F,W,c,L,U,te,j,$,G,ce,re,oe]),ee={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return u.createElement(Ee.Provider,{value:Q},u.createElement(w,{...f,children:n,className:t,id:o,ref:z,style:{...ee,...g},[H.group]:"",[H.groupDirection]:r,[H.groupId]:c}))}const Sn=u.forwardRef((e,n)=>u.createElement(yn,{...e,forwardedRef:n}));yn.displayName="PanelGroup";Sn.displayName="forwardRef(PanelGroup)";function de(e,n){return e.findIndex(t=>t===n||t.id===n.id)}function ie(e,n,t){const r=de(e,n),o=r===e.length-1?[r-1,r]:[r,r+1],l=t[r];return{...n.constraints,panelSize:l,pivotIndices:o}}function it({disabled:e,handleId:n,resizeHandler:t,panelGroupElement:r}){u.useEffect(()=>{if(e||t==null||r==null)return;const i=Ne(n,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),t(l);break}case"F6":{l.preventDefault();const s=i.getAttribute(H.groupId);S(s,`No group element found for id "${s}"`);const a=ye(s,r),g=pn(s,n,r);S(g!==null,`No resize element found for id "${n}"`);const w=l.shiftKey?g>0?g-1:a.length-1:g+1<a.length?g+1:0;a[w].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,e,n,t])}function bn({children:e=null,className:n="",disabled:t=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:s,onFocus:a,onPointerDown:g,onPointerUp:w,style:f={},tabIndex:c=0,tagName:z="div",...h}){var E,C;const P=u.useRef(null),N=u.useRef({onClick:l,onDragging:s,onPointerDown:g,onPointerUp:w});u.useEffect(()=>{N.current.onClick=l,N.current.onDragging=s,N.current.onPointerDown=g,N.current.onPointerUp=w});const k=u.useContext(Ee);if(k===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:O,registerResizeHandle:I,startDragging:v,stopDragging:V,panelGroupElement:B}=k,F=We(i),[W,L]=u.useState("inactive"),[U,j]=u.useState(!1),[$,G]=u.useState(null),te=u.useRef({state:W});se(()=>{te.current.state=W}),u.useEffect(()=>{if(t)G(null);else{const Q=I(F);G(()=>Q)}},[t,F,I]);const ce=(E=r?.coarse)!==null&&E!==void 0?E:15,re=(C=r?.fine)!==null&&C!==void 0?C:5;u.useEffect(()=>{if(t||$==null)return;const Q=P.current;S(Q,"Element ref not attached");let ee=!1;return On(F,Q,D,{coarse:ce,fine:re},(x,b,m)=>{if(!b){L("inactive");return}switch(x){case"down":{L("drag"),ee=!1,S(m,'Expected event to be defined for "down" action'),v(F,m);const{onDragging:p,onPointerDown:y}=N.current;p?.(!0),y?.();break}case"move":{const{state:p}=te.current;ee=!0,p!=="drag"&&L("hover"),S(m,'Expected event to be defined for "move" action'),$(m);break}case"up":{L("hover"),V();const{onClick:p,onDragging:y,onPointerUp:R}=N.current;y?.(!1),R?.(),ee||p?.();break}}})},[ce,D,t,re,I,F,$,v,V]),it({disabled:t,handleId:F,resizeHandler:$,panelGroupElement:B});const oe={touchAction:"none",userSelect:"none"};return u.createElement(z,{...h,children:e,className:n,id:i,onBlur:()=>{j(!1),o?.()},onFocus:()=>{j(!0),a?.()},ref:P,role:"separator",style:{...oe,...f},tabIndex:c,[H.groupDirection]:D,[H.groupId]:O,[H.resizeHandle]:"",[H.resizeHandleActive]:W==="drag"?"pointer":U?"keyboard":void 0,[H.resizeHandleEnabled]:!t,[H.resizeHandleId]:F,[H.resizeHandleState]:W})}bn.displayName="PanelResizeHandle";function Qe({className:e,...n}){return A.jsx(Sn,{className:en("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...n})}const me=tn;function $e({className:e,...n}){return A.jsx(bn,{className:en("relative w-px shrink-0 bg-line transition-colors cursor-col-resize","after:absolute after:inset-y-0 after:left-1/2 after:w-1.5 after:-translate-x-1/2","data-[resize-handle-state=hover]:bg-line-strong","data-[resize-handle-state=drag]:bg-accent","focus-visible:outline-none focus-visible:bg-accent",e),...n})}function lt({className:e,children:n}){const t=u.useRef(null),[r,i]=u.useState(null);return u.useEffect(()=>{const o=t.current?.parentElement;if(!o||typeof ResizeObserver>"u")return;const l=()=>{const a=Math.floor(o.getBoundingClientRect().width);i(g=>g===a?g:a)};l();const s=new ResizeObserver(l);return s.observe(o),()=>s.disconnect()},[]),A.jsx("div",{ref:t,className:e,style:r===null?void 0:{width:`${r}px`},children:n})}const Pn=u.createContext(null);function st(e,n){return e==="list"?{size:62,max:78}:e==="detail"?{size:26,max:45}:{size:n==="compact"?43:33,max:58}}function ft(){return u.useContext(Pn)}function pt({nav:e,list:n,reading:t,intelligence:r,intelligenceOpen:i=!0,hasThread:o=!0,density:l="comfortable",listBias:s="balanced",header:a,topBar:g,appBar:w,overlay:f,skeleton:c,isLoading:z=!1,initialWidth:h,navOpen:E,onOpenNav:C,onCloseNav:P}){const[N,k]=kn(h),D=Ln(k??0),[O,I]=u.useState(!1),v=D.nav,V=v&&!O,B=D.reading&&!!t,F=D.intelligence,[W,L]=u.useState(!1),U=E!==void 0,j=U?E:W,$=()=>{U||L(!0),C?.()},G=()=>{U||L(!1),P?.()},te=F&&i&&o&&!!r,re={panes:D,containerWidth:k,showNavPane:v,openNav:$,navCollapsed:O,toggleNav:()=>{if(!v){j?G():$();return}I(d=>!d)},showReadingPane:B,showIntelligencePane:F},oe=st(s,l),Q=A.jsxs(Qe,{direction:"horizontal",className:"min-h-0 flex-1",children:[A.jsx(me,{id:"list",order:1,defaultSize:B?oe.size:100,minSize:22,maxSize:B?oe.max:100,className:"min-w-0",children:n}),B&&A.jsxs(A.Fragment,{children:[A.jsx($e,{}),A.jsx(me,{id:"reading",order:2,minSize:29,className:"min-w-0",children:A.jsx(lt,{className:"h-full",children:t})})]}),te&&A.jsxs(A.Fragment,{children:[A.jsx($e,{}),A.jsx(me,{id:"intelligence",order:3,defaultSize:25,minSize:18,maxSize:39,className:"min-w-0",children:r})]})]},B?"list-reading":"list-only"),ee=A.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[!v&&a&&A.jsx("div",{className:"shrink-0",children:a}),Q]});return A.jsx(Pn.Provider,{value:re,children:A.jsxs("div",{ref:N,className:"safe-area-frame @container flex h-full w-full flex-col overflow-hidden bg-canvas font-sans text-fg",children:[A.jsx(Rn,{topBar:g,appBar:w,children:z&&c?c:V?A.jsxs(Qe,{direction:"horizontal",className:"min-h-0 flex-1",children:[A.jsx(me,{id:"nav",order:1,defaultSize:17,minSize:12,maxSize:24,className:"min-w-0",children:e}),A.jsx($e,{}),A.jsx(me,{id:"content",order:2,className:"flex min-w-0 flex-col",children:ee})]}):ee}),!(z&&c)&&A.jsxs(A.Fragment,{children:[!v&&A.jsx(In,{open:j,onClose:G,title:"Folders",anchor:"left",children:e}),f]})]})})}const _e="search-scope";function at(e){const n=e.trim().replace(/\s+/g," ").toLowerCase();return/\s/.test(n)?`in:"${n}"`:`in:${n}`}function gt(e){return e.list!==void 0&&e.list!=="brief"}function ht(e){return e.list==="mailbox"?e.mailboxId:void 0}function mt(e,n){return e.list==="flagged"?{kind:"scoped",chip:{id:_e,label:"is:starred"}}:e.list==="outbox"?{kind:"scoped",chip:{id:_e,label:"in:outbox"}}:e.list==="mailbox"||e.list==="label"?n?{kind:"scoped",chip:{id:_e,label:at(n)}}:{kind:"pending"}:{kind:"global"}}function xt(e,n,t){return n.kind==="global"?{kind:"global"}:e.list==="flagged"||e.list==="label"?{kind:"collection"}:{kind:"folder",...t?{role:t}:{}}}export{pt as A,_e as S,xt as a,gt as i,dt as k,ht as r,mt as s,ft as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as G,r as c,j as m,p as I,X as $,bX as X,cB as D,cO as Y,cP as J,cQ as W,cR as Z,K as x,u as R,W as ee,Y as M,_ as te,$ as ne,P as se,cS as E}from"./index-yeSesYv-.js";import{d as k,e as re}from"./reply-DL5kkaJs.js";import{c as oe}from"./nav-link-BvlYCbp-.js";import{s as ae,S as ie}from"./search-scope-DaiXqXNv.js";import{u as j}from"./useQueries-Dj93detX.js";import{u as le}from"./useLabels-CGE9kc74.js";const q={name:"bell-off",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]};q.node;const Ne=G(q),ce=[{action:"focusNext",keys:["j","k"],label:"navigate"},{action:"muteSender",keys:["m"],label:"mute"},{action:"help",keys:["?"],label:"all shortcuts"}];function Ee(e){return ce.filter(t=>e[t.action]!==void 0)}const ue=[{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 de(e){for(const t of ue){const n=t.hints.find(s=>s.action===e);if(n)return n.keys}}function fe(e){const t=de(e);return!t||t.length===0?"":t.length===1?t[0]??"":t[0]==="g"?t.join(" then "):t.join("")}function $e(e){const t=fe(e);return t===""?"":`(${t})`}function pe({key:e,shiftKey:t=!1,repeat:n=!1,caretAtStart:s,hasValue:a,chipCount:r}){const i=r-1;return e==="Escape"?a?{type:"clearQuery"}:{type:"blur"}:e==="Tab"&&t?r===0?{type:"none"}:{type:"focusChip",index:i}:e==="Backspace"||e==="ArrowLeft"?!s||r===0?{type:"none"}:n?{type:"none"}:{type:"focusChip",index:i}:{type:"none"}}function me({key:e,repeat:t=!1,index:n,chipCount:s}){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>=s-1?{type:"focusInput"}:{type:"focusChip",index:n+1}:e==="Enter"||e===" "?{type:"activateChip",index:n}:e==="Escape"?{type:"focusInput"}:{type:"none"}}function he(e,t){const n=t-1;return n<=0?null:e<n?e:n-1}const B={filter:"border-line bg-surface-sunken text-fg-muted",scope:"border-accent-2/40 bg-accent-2-soft text-accent-2"},be=({label:e,onRemove:t,tone:n="filter",className:s})=>m.jsxs("span",{className:I("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-2xs",B[n],s),children:[m.jsx("span",{children:e}),m.jsx("button",{type:"button",onClick:t,className:"shrink-0 rounded-full p-0.5 hover:bg-fg-muted/20 transition-colors","aria-label":`Remove filter: ${e}`,children:m.jsx($,{className:"size-3"})})]}),O=c.forwardRef(({label:e,onRemove:t,onActivate:n,tone:s="filter",focused:a=!1,onKeyDown:r,onFocusLabel:i,className:p},u)=>m.jsxs("span",{role:"row",tabIndex:-1,className:I("inline-flex max-w-48 items-center gap-1 rounded-full border px-2 py-0.5 text-2xs transition-colors",B[s],a&&"ring-2 ring-ring",p),children:[m.jsx("button",{ref:u,type:"button",role:"gridcell",tabIndex:a?0:-1,onClick:n,onFocus:i,onKeyDown:r,className:I("block min-w-0 max-w-full truncate rounded-full outline-none",n?"cursor-pointer":"cursor-default"),children:e}),m.jsx("button",{type:"button",role:"gridcell",tabIndex:-1,onClick:t,className:"block shrink-0 rounded-full p-0.5 transition-colors hover:bg-fg-muted/20","aria-label":`Remove filter: ${e}`,children:m.jsx($,{className:"size-3"})})]}));O.displayName="SearchChipRow";const Re=({tokens:e,className:t})=>e.length===0?null:m.jsx("div",{className:I("flex flex-wrap items-center gap-1.5 border-b border-line bg-surface px-row-inset py-1.5",t),children:e.map(n=>m.jsx(be,{label:n.label,onRemove:n.onRemove},n.label))}),ge=e=>e instanceof HTMLElement?e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable:!1,ye=({chips:e=[],onRemoveChip:t,value:n,onChange:s,onClear:a,onClearQuery:r,placeholder:i="Search mail...",globalFocusKey:p=!0,showClearButton:u=!0,size:d="sm",inputId:h,suggest:f,className:y})=>{const H=c.useId(),K=h??H,w=c.useRef(null),F=c.useRef([]),P=r??a,[L,C]=c.useState(null),v=c.useRef(void 0),[_,U]=c.useState(""),T=e.length>0;c.useEffect(()=>{C(o=>o!==null&&o>=e.length?null:o)},[e.length]),c.useEffect(()=>{const o=v.current;if(o!==void 0){if(v.current=void 0,o===null){w.current?.focus();return}F.current[o]?.focus()}});const A=c.useRef(void 0);c.useEffect(()=>{const o=f?.caret;if(!o||o===A.current)return;A.current=o;const l=w.current;!l||l.ownerDocument.activeElement!==l||(l.setSelectionRange(o.cursor,o.cursor),f?.onCaretChange(o.cursor))});const S=o=>{f?.onCaretChange(o.selectionStart??o.value.length)},b=c.useCallback(o=>{C(o),v.current=o},[]),N=c.useCallback(o=>{const l=e[o];l&&t&&(b(he(o,e.length)),U(`${l.label} removed`),t(l.id))},[e,t,b]),V=c.useCallback(()=>{b(null),a()},[a,b]),z=c.useCallback(o=>{const l=o.currentTarget;if(f?.onKeyDown(o))return;const g=pe({key:o.key,shiftKey:o.shiftKey,repeat:o.repeat,caretAtStart:l.selectionStart===0&&l.selectionEnd===0,hasValue:n.length>0,chipCount:e.length});switch(g.type){case"focusChip":o.preventDefault(),b(g.index);return;case"clearQuery":P();return;case"blur":l.blur();return;case"none":return}},[e.length,n,P,b,f]),Q=c.useCallback(o=>l=>{const g=me({key:l.key,repeat:l.repeat,index:o,chipCount:e.length});switch(g.type!=="none"&&l.preventDefault(),g.type){case"removeChip":N(g.index);return;case"focusChip":b(g.index);return;case"focusInput":b(null);return;case"activateChip":return;case"none":return}},[e,N,b]);return c.useEffect(()=>{if(!p)return;const o=l=>{l.key!=="/"||l.metaKey||l.ctrlKey||l.altKey||ge(l.target)||D("focusSearch")||(l.preventDefault(),w.current?.focus())};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[p]),m.jsxs("label",{htmlFor:K,className:I("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",d==="lg"?"rounded-xl px-4 py-2":"rounded-md px-2.5 py-1",y),children:[m.jsx(X,{className:I("shrink-0 text-fg-muted pointer-events-none",d==="lg"?"size-5":"size-4")}),m.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1",children:[T&&m.jsx("div",{role:"grid","aria-label":"Search filters",className:"flex min-w-0 flex-wrap items-center gap-1",children:e.map((o,l)=>m.jsx(O,{ref:g=>{F.current[l]=g},label:o.label,tone:o.tone,focused:L===l,onFocusLabel:()=>C(l),onKeyDown:Q(l),onRemove:()=>N(l)},o.id))}),m.jsx("input",{ref:w,id:K,name:"q",type:"text","aria-label":"Search mail",autoComplete:"off",value:n,tabIndex:L===null?0:-1,onChange:o=>{s(o.target.value),S(o.target)},onKeyDown:z,onKeyUp:o=>S(o.currentTarget),onClick:o=>S(o.currentTarget),onFocus:o=>{C(null),f?.onFocusChange?.(!0),S(o.currentTarget)},onBlur:()=>f?.onFocusChange?.(!1),...f?.comboboxProps,placeholder:T?void 0:i,className:"min-w-24 flex-1 bg-transparent text-fg outline-none placeholder:text-fg-muted"})]}),(n||T)&&u&&m.jsx("button",{type:"button",onClick:V,className:"shrink-0 rounded p-0.5 hover:bg-surface-raised transition-colors","aria-label":"Clear search",children:m.jsx($,{className:I("text-fg-muted",d==="lg"?"size-5":"size-4")})}),m.jsx("span",{role:"status","aria-live":"polite",className:"sr-only",children:_})]})},Me=({value:e,onChange:t,onClear:n,onClearQuery:s,chips:a,onRemoveChip:r,placeholder:i="Search mail...",globalFocusKey:p=!0,showClearButton:u=!0,size:d,inputId:h,suggest:f,className:y})=>m.jsx(ye,{value:e,onChange:t,onClear:n,onClearQuery:s,chips:a,onRemoveChip:r,placeholder:i,globalFocusKey:p,showClearButton:u,size:d,inputId:h,suggest:f,className:y});function je({handlers:e,enabled:t=!0,target:n,sequenceTimeoutMs:s=1e3}){const a=c.useRef(e);a.current=e;const r=c.useRef(null),i=c.useRef(null);c.useEffect(()=>{if(!t)return;const p=()=>{i.current!==null&&(clearTimeout(i.current),i.current=null)},u=h=>{const f=Y({key:h.key,shiftKey:h.shiftKey,metaKey:h.metaKey,ctrlKey:h.ctrlKey,altKey:h.altKey,inEditable:W(h.target),onControl:J(h.target)},r.current);if(Z().length>0){p(),r.current=null;return}if(p(),r.current=f.nextPrefix,f.nextPrefix!==null&&(i.current=setTimeout(()=>{r.current=null,i.current=null},s)),f.action===null||D(f.action)!==null)return;const y=a.current[f.action];y&&(f.preventDefault&&h.preventDefault(),y())},d=n===void 0?window:n;if(d!==null)return d.addEventListener("keydown",u),()=>{d.removeEventListener("keydown",u),p(),r.current=null}},[t,s,n])}function Ke(){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}),s=x({from:"/mail/flagged/$threadId/$messageId",shouldThrow:!1}),a=x({from:"/mail/label/$labelId/$threadId",shouldThrow:!1}),r=x({from:"/mail/label/$labelId/$threadId/$messageId",shouldThrow:!1}),i=x({from:"/mail/$mailboxId/$threadId",shouldThrow:!1}),p=x({from:"/mail/$mailboxId/$threadId/$messageId",shouldThrow:!1}),u=e?.threadId??n?.threadId??a?.threadId??i?.threadId,d=t?.messageId??s?.messageId??r?.messageId??p?.messageId;return c.useMemo(()=>u?{threadId:u,messageId:d}:void 0,[u,d])}function Fe(){const e=R(),t=oe(),{list:n,mailboxId:s,labelId:a}=k();return c.useCallback((r,i)=>{const p=i?.query,d={search:f=>p===void 0?f:{...f,q:p||void 0},hash:t,replace:i?.replace??!1};if(n==="flagged"){e({to:"/mail/flagged/$threadId/$messageId",params:r,...d});return}if(n==="label"&&a){e({to:"/mail/label/$labelId/$threadId/$messageId",params:{labelId:a,...r},...d});return}const h=i?.mailboxId??s;if(n==="mailbox"&&h){e({to:"/mail/$mailboxId/$threadId/$messageId",params:{mailboxId:h,...r},...d});return}e({to:"/mail/brief/$threadId/$messageId",params:r,...d})},[e,t,n,s,a])}function Pe(){return re()}function xe(){const e=R();return c.useCallback(t=>{e({to:"/mail/brief",search:{q:t||void 0}})},[e])}function Le(){const e=R();return c.useCallback((t,n)=>{e({to:"/mail/$mailboxId",params:{mailboxId:t},search:{q:n||void 0}})},[e])}const Ie=({accounts:e})=>{const{list:t,mailboxId:n,labelId:s}=k(),{labels:a}=le(e[0]?.accountId),{t:r}=ee("mail",{useSuspense:!1}),i=c.useCallback((u,d)=>r(u,{defaultValue:d}),[r]),p=j({queries:e.map(u=>({...M({path:{accountId:u.accountId}}),staleTime:1/0}))});if(t==="outbox")return"Outbox";if(t==="label")return a.find(u=>u.labelId===s)?.name??null;if(!n)return null;for(let u=0;u<e.length;u++){const d=p[u]?.data?.items;if(!d)continue;const h=d.find(y=>y.mailboxId===n);if(!h)continue;const f=te(e[u].folderAppointments);return ne(h,f.get(n),i)}return null},Ae=({accounts:e})=>{const{mailboxId:t}=k(),n=j({queries:e.map(s=>({...M({path:{accountId:s.accountId}}),staleTime:1/0}))});if(!t)return null;for(const s of n){const a=s.data?.items;if(!a)continue;const r=a.find(i=>i.mailboxId===t);if(r)return r.unseenCount}return null},De=({accounts:e})=>{const{mailboxId:t}=k(),n=j({queries:e.map(s=>({...M({path:{accountId:s.accountId}}),staleTime:1/0}))});if(!t)return 0;for(const s of n){const a=s.data?.items;if(!a)continue;const r=a.find(i=>i.mailboxId===t);if(r)return r.messageCount}return 0};function qe(e){const t=xe(),{searchInput:n}=se(),s=Ie({accounts:e}),a=k(),r=c.useMemo(()=>ae(a,s),[a,s]),i=c.useCallback(p=>{p===ie&&t(n)},[t,n]);return{scope:r,clearScope:i}}function Be(e){const t=new Map;for(const n of e){const s=n.email.toLowerCase(),a=s.split("@")[0];a&&!t.has(a)&&t.set(a,n.accountId),t.has(s)||t.set(s,n.accountId)}return t}function Oe(e){const t=new Map;for(const n of e)for(const s of n){const a=s.fullPath?.toLowerCase();if(!a)continue;const r=E(s).toLowerCase();t.has(a)||t.set(a,s.mailboxId),t.has(r)||t.set(r,s.mailboxId)}return t}function He(e,t=[]){const n=e.flat().filter(r=>r.fullPath),s=new Map;for(const r of n){const i=E(r).toLowerCase();s.set(i,(s.get(i)??0)+1)}const a=new Map(t.map(r=>[r.accountId,r.email]));return n.map(r=>{const i=E(r),p=s.get(i.toLowerCase())===1,u=t.length>1?a.get(r.accountId):void 0;return{value:p?i:r.fullPath,label:r.displayNameOverride?.trim()||i,...u?{hint:u}:{}}})}function _e(e){const t=new Map;for(const n of e){const s=n.email.toLowerCase().split("@")[0]??"";t.set(s,(t.get(s)??0)+1)}return e.map(n=>{const s=n.email.split("@")[0]??n.email,a=t.get(s.toLowerCase())===1,r=n.displayName?.trim();return{value:a?s:n.email,label:r||n.email,...r?{hint:n.email}:{}}})}export{Ne as B,ue as K,Me as S,Ke as a,Oe as b,je as c,Be as d,Fe as e,Pe as f,Ie as g,Ae as h,De as i,ce as j,Ee as k,Re as l,He as m,_e as n,Le as o,fe as s,$e as t,qe as u};
|
|
1
|
+
import{b as G,r as c,j as m,p as I,X as $,bX as X,cB as D,cO as Y,cP as J,cQ as W,cR as Z,K as x,u as R,W as ee,Y as M,_ as te,$ as ne,P as se,cS as E}from"./index-9QMShYZC.js";import{d as k,e as re}from"./reply-CdhmgK8D.js";import{c as oe}from"./nav-link-BaRr8ufx.js";import{s as ae,S as ie}from"./search-scope-DowTds7f.js";import{u as j}from"./useQueries-B2w-f15M.js";import{u as le}from"./useLabels-BiYidhrJ.js";const q={name:"bell-off",size:24,node:[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]};q.node;const Ne=G(q),ce=[{action:"focusNext",keys:["j","k"],label:"navigate"},{action:"muteSender",keys:["m"],label:"mute"},{action:"help",keys:["?"],label:"all shortcuts"}];function Ee(e){return ce.filter(t=>e[t.action]!==void 0)}const ue=[{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 de(e){for(const t of ue){const n=t.hints.find(s=>s.action===e);if(n)return n.keys}}function fe(e){const t=de(e);return!t||t.length===0?"":t.length===1?t[0]??"":t[0]==="g"?t.join(" then "):t.join("")}function $e(e){const t=fe(e);return t===""?"":`(${t})`}function pe({key:e,shiftKey:t=!1,repeat:n=!1,caretAtStart:s,hasValue:a,chipCount:r}){const i=r-1;return e==="Escape"?a?{type:"clearQuery"}:{type:"blur"}:e==="Tab"&&t?r===0?{type:"none"}:{type:"focusChip",index:i}:e==="Backspace"||e==="ArrowLeft"?!s||r===0?{type:"none"}:n?{type:"none"}:{type:"focusChip",index:i}:{type:"none"}}function me({key:e,repeat:t=!1,index:n,chipCount:s}){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>=s-1?{type:"focusInput"}:{type:"focusChip",index:n+1}:e==="Enter"||e===" "?{type:"activateChip",index:n}:e==="Escape"?{type:"focusInput"}:{type:"none"}}function he(e,t){const n=t-1;return n<=0?null:e<n?e:n-1}const B={filter:"border-line bg-surface-sunken text-fg-muted",scope:"border-accent-2/40 bg-accent-2-soft text-accent-2"},be=({label:e,onRemove:t,tone:n="filter",className:s})=>m.jsxs("span",{className:I("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-2xs",B[n],s),children:[m.jsx("span",{children:e}),m.jsx("button",{type:"button",onClick:t,className:"shrink-0 rounded-full p-0.5 hover:bg-fg-muted/20 transition-colors","aria-label":`Remove filter: ${e}`,children:m.jsx($,{className:"size-3"})})]}),O=c.forwardRef(({label:e,onRemove:t,onActivate:n,tone:s="filter",focused:a=!1,onKeyDown:r,onFocusLabel:i,className:p},u)=>m.jsxs("span",{role:"row",tabIndex:-1,className:I("inline-flex max-w-48 items-center gap-1 rounded-full border px-2 py-0.5 text-2xs transition-colors",B[s],a&&"ring-2 ring-ring",p),children:[m.jsx("button",{ref:u,type:"button",role:"gridcell",tabIndex:a?0:-1,onClick:n,onFocus:i,onKeyDown:r,className:I("block min-w-0 max-w-full truncate rounded-full outline-none",n?"cursor-pointer":"cursor-default"),children:e}),m.jsx("button",{type:"button",role:"gridcell",tabIndex:-1,onClick:t,className:"block shrink-0 rounded-full p-0.5 transition-colors hover:bg-fg-muted/20","aria-label":`Remove filter: ${e}`,children:m.jsx($,{className:"size-3"})})]}));O.displayName="SearchChipRow";const Re=({tokens:e,className:t})=>e.length===0?null:m.jsx("div",{className:I("flex flex-wrap items-center gap-1.5 border-b border-line bg-surface px-row-inset py-1.5",t),children:e.map(n=>m.jsx(be,{label:n.label,onRemove:n.onRemove},n.label))}),ge=e=>e instanceof HTMLElement?e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable:!1,ye=({chips:e=[],onRemoveChip:t,value:n,onChange:s,onClear:a,onClearQuery:r,placeholder:i="Search mail...",globalFocusKey:p=!0,showClearButton:u=!0,size:d="sm",inputId:h,suggest:f,className:y})=>{const H=c.useId(),K=h??H,w=c.useRef(null),F=c.useRef([]),P=r??a,[L,C]=c.useState(null),v=c.useRef(void 0),[_,U]=c.useState(""),T=e.length>0;c.useEffect(()=>{C(o=>o!==null&&o>=e.length?null:o)},[e.length]),c.useEffect(()=>{const o=v.current;if(o!==void 0){if(v.current=void 0,o===null){w.current?.focus();return}F.current[o]?.focus()}});const A=c.useRef(void 0);c.useEffect(()=>{const o=f?.caret;if(!o||o===A.current)return;A.current=o;const l=w.current;!l||l.ownerDocument.activeElement!==l||(l.setSelectionRange(o.cursor,o.cursor),f?.onCaretChange(o.cursor))});const S=o=>{f?.onCaretChange(o.selectionStart??o.value.length)},b=c.useCallback(o=>{C(o),v.current=o},[]),N=c.useCallback(o=>{const l=e[o];l&&t&&(b(he(o,e.length)),U(`${l.label} removed`),t(l.id))},[e,t,b]),V=c.useCallback(()=>{b(null),a()},[a,b]),z=c.useCallback(o=>{const l=o.currentTarget;if(f?.onKeyDown(o))return;const g=pe({key:o.key,shiftKey:o.shiftKey,repeat:o.repeat,caretAtStart:l.selectionStart===0&&l.selectionEnd===0,hasValue:n.length>0,chipCount:e.length});switch(g.type){case"focusChip":o.preventDefault(),b(g.index);return;case"clearQuery":P();return;case"blur":l.blur();return;case"none":return}},[e.length,n,P,b,f]),Q=c.useCallback(o=>l=>{const g=me({key:l.key,repeat:l.repeat,index:o,chipCount:e.length});switch(g.type!=="none"&&l.preventDefault(),g.type){case"removeChip":N(g.index);return;case"focusChip":b(g.index);return;case"focusInput":b(null);return;case"activateChip":return;case"none":return}},[e,N,b]);return c.useEffect(()=>{if(!p)return;const o=l=>{l.key!=="/"||l.metaKey||l.ctrlKey||l.altKey||ge(l.target)||D("focusSearch")||(l.preventDefault(),w.current?.focus())};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[p]),m.jsxs("label",{htmlFor:K,className:I("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",d==="lg"?"rounded-xl px-4 py-2":"rounded-md px-2.5 py-1",y),children:[m.jsx(X,{className:I("shrink-0 text-fg-muted pointer-events-none",d==="lg"?"size-5":"size-4")}),m.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1",children:[T&&m.jsx("div",{role:"grid","aria-label":"Search filters",className:"flex min-w-0 flex-wrap items-center gap-1",children:e.map((o,l)=>m.jsx(O,{ref:g=>{F.current[l]=g},label:o.label,tone:o.tone,focused:L===l,onFocusLabel:()=>C(l),onKeyDown:Q(l),onRemove:()=>N(l)},o.id))}),m.jsx("input",{ref:w,id:K,name:"q",type:"text","aria-label":"Search mail",autoComplete:"off",value:n,tabIndex:L===null?0:-1,onChange:o=>{s(o.target.value),S(o.target)},onKeyDown:z,onKeyUp:o=>S(o.currentTarget),onClick:o=>S(o.currentTarget),onFocus:o=>{C(null),f?.onFocusChange?.(!0),S(o.currentTarget)},onBlur:()=>f?.onFocusChange?.(!1),...f?.comboboxProps,placeholder:T?void 0:i,className:"min-w-24 flex-1 bg-transparent text-fg outline-none placeholder:text-fg-muted"})]}),(n||T)&&u&&m.jsx("button",{type:"button",onClick:V,className:"shrink-0 rounded p-0.5 hover:bg-surface-raised transition-colors","aria-label":"Clear search",children:m.jsx($,{className:I("text-fg-muted",d==="lg"?"size-5":"size-4")})}),m.jsx("span",{role:"status","aria-live":"polite",className:"sr-only",children:_})]})},Me=({value:e,onChange:t,onClear:n,onClearQuery:s,chips:a,onRemoveChip:r,placeholder:i="Search mail...",globalFocusKey:p=!0,showClearButton:u=!0,size:d,inputId:h,suggest:f,className:y})=>m.jsx(ye,{value:e,onChange:t,onClear:n,onClearQuery:s,chips:a,onRemoveChip:r,placeholder:i,globalFocusKey:p,showClearButton:u,size:d,inputId:h,suggest:f,className:y});function je({handlers:e,enabled:t=!0,target:n,sequenceTimeoutMs:s=1e3}){const a=c.useRef(e);a.current=e;const r=c.useRef(null),i=c.useRef(null);c.useEffect(()=>{if(!t)return;const p=()=>{i.current!==null&&(clearTimeout(i.current),i.current=null)},u=h=>{const f=Y({key:h.key,shiftKey:h.shiftKey,metaKey:h.metaKey,ctrlKey:h.ctrlKey,altKey:h.altKey,inEditable:W(h.target),onControl:J(h.target)},r.current);if(Z().length>0){p(),r.current=null;return}if(p(),r.current=f.nextPrefix,f.nextPrefix!==null&&(i.current=setTimeout(()=>{r.current=null,i.current=null},s)),f.action===null||D(f.action)!==null)return;const y=a.current[f.action];y&&(f.preventDefault&&h.preventDefault(),y())},d=n===void 0?window:n;if(d!==null)return d.addEventListener("keydown",u),()=>{d.removeEventListener("keydown",u),p(),r.current=null}},[t,s,n])}function Ke(){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}),s=x({from:"/mail/flagged/$threadId/$messageId",shouldThrow:!1}),a=x({from:"/mail/label/$labelId/$threadId",shouldThrow:!1}),r=x({from:"/mail/label/$labelId/$threadId/$messageId",shouldThrow:!1}),i=x({from:"/mail/$mailboxId/$threadId",shouldThrow:!1}),p=x({from:"/mail/$mailboxId/$threadId/$messageId",shouldThrow:!1}),u=e?.threadId??n?.threadId??a?.threadId??i?.threadId,d=t?.messageId??s?.messageId??r?.messageId??p?.messageId;return c.useMemo(()=>u?{threadId:u,messageId:d}:void 0,[u,d])}function Fe(){const e=R(),t=oe(),{list:n,mailboxId:s,labelId:a}=k();return c.useCallback((r,i)=>{const p=i?.query,d={search:f=>p===void 0?f:{...f,q:p||void 0},hash:t,replace:i?.replace??!1};if(n==="flagged"){e({to:"/mail/flagged/$threadId/$messageId",params:r,...d});return}if(n==="label"&&a){e({to:"/mail/label/$labelId/$threadId/$messageId",params:{labelId:a,...r},...d});return}const h=i?.mailboxId??s;if(n==="mailbox"&&h){e({to:"/mail/$mailboxId/$threadId/$messageId",params:{mailboxId:h,...r},...d});return}e({to:"/mail/brief/$threadId/$messageId",params:r,...d})},[e,t,n,s,a])}function Pe(){return re()}function xe(){const e=R();return c.useCallback(t=>{e({to:"/mail/brief",search:{q:t||void 0}})},[e])}function Le(){const e=R();return c.useCallback((t,n)=>{e({to:"/mail/$mailboxId",params:{mailboxId:t},search:{q:n||void 0}})},[e])}const Ie=({accounts:e})=>{const{list:t,mailboxId:n,labelId:s}=k(),{labels:a}=le(e[0]?.accountId),{t:r}=ee("mail",{useSuspense:!1}),i=c.useCallback((u,d)=>r(u,{defaultValue:d}),[r]),p=j({queries:e.map(u=>({...M({path:{accountId:u.accountId}}),staleTime:1/0}))});if(t==="outbox")return"Outbox";if(t==="label")return a.find(u=>u.labelId===s)?.name??null;if(!n)return null;for(let u=0;u<e.length;u++){const d=p[u]?.data?.items;if(!d)continue;const h=d.find(y=>y.mailboxId===n);if(!h)continue;const f=te(e[u].folderAppointments);return ne(h,f.get(n),i)}return null},Ae=({accounts:e})=>{const{mailboxId:t}=k(),n=j({queries:e.map(s=>({...M({path:{accountId:s.accountId}}),staleTime:1/0}))});if(!t)return null;for(const s of n){const a=s.data?.items;if(!a)continue;const r=a.find(i=>i.mailboxId===t);if(r)return r.unseenCount}return null},De=({accounts:e})=>{const{mailboxId:t}=k(),n=j({queries:e.map(s=>({...M({path:{accountId:s.accountId}}),staleTime:1/0}))});if(!t)return 0;for(const s of n){const a=s.data?.items;if(!a)continue;const r=a.find(i=>i.mailboxId===t);if(r)return r.messageCount}return 0};function qe(e){const t=xe(),{searchInput:n}=se(),s=Ie({accounts:e}),a=k(),r=c.useMemo(()=>ae(a,s),[a,s]),i=c.useCallback(p=>{p===ie&&t(n)},[t,n]);return{scope:r,clearScope:i}}function Be(e){const t=new Map;for(const n of e){const s=n.email.toLowerCase(),a=s.split("@")[0];a&&!t.has(a)&&t.set(a,n.accountId),t.has(s)||t.set(s,n.accountId)}return t}function Oe(e){const t=new Map;for(const n of e)for(const s of n){const a=s.fullPath?.toLowerCase();if(!a)continue;const r=E(s).toLowerCase();t.has(a)||t.set(a,s.mailboxId),t.has(r)||t.set(r,s.mailboxId)}return t}function He(e,t=[]){const n=e.flat().filter(r=>r.fullPath),s=new Map;for(const r of n){const i=E(r).toLowerCase();s.set(i,(s.get(i)??0)+1)}const a=new Map(t.map(r=>[r.accountId,r.email]));return n.map(r=>{const i=E(r),p=s.get(i.toLowerCase())===1,u=t.length>1?a.get(r.accountId):void 0;return{value:p?i:r.fullPath,label:r.displayNameOverride?.trim()||i,...u?{hint:u}:{}}})}function _e(e){const t=new Map;for(const n of e){const s=n.email.toLowerCase().split("@")[0]??"";t.set(s,(t.get(s)??0)+1)}return e.map(n=>{const s=n.email.split("@")[0]??n.email,a=t.get(s.toLowerCase())===1,r=n.displayName?.trim();return{value:a?s:n.email,label:r||n.email,...r?{hint:n.email}:{}}})}export{Ne as B,ue as K,Me as S,Ke as a,Oe as b,je as c,Be as d,Fe as e,Pe as f,Ie as g,Ae as h,De as i,ce as j,Re as k,He as l,_e as m,Le as n,Ee as o,fe as s,$e as t,qe as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as e,r as o}from"./index-
|
|
1
|
+
import{u as e,r as o}from"./index-9QMShYZC.js";const n={brief:"/mail/brief",flagged:"/mail/flagged",outbox:"/mail/outbox",settings:"/settings",accounts:"/settings/accounts",importConfig:"/import"};function i(){const t=e();return o.useCallback(s=>{t({to:n[s]})},[t])}function c(){const t=e();return o.useCallback(s=>{t({to:"/settings/accounts",search:{editAccountId:s,focusSmtp:!0}})},[t])}function u(){const t=e();return o.useCallback(s=>{t({to:"/settings/$slotId",params:{slotId:s}})},[t])}export{u as a,c as b,i as u};
|