@remit/web-client-dist 0.0.475 → 0.0.477
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-wS4qOQ-b.js → BriefPane-BIXOlPoq.js} +1 -1
- package/assets/{ErrorState-EgHwgvIz.js → ErrorState-BB9MY89J.js} +1 -1
- package/assets/{FlaggedPane-DAlgJmsi.js → FlaggedPane-D0sn1xg_.js} +1 -1
- package/assets/{FullCompose-jofZ3Egj.js → FullCompose-Cl0FqWeX.js} +1 -1
- package/assets/{MailListHeader-BDefIcng.js → MailListHeader-CSP9YvD7.js} +1 -1
- package/assets/{MailShell-B3ZgoXYn.js → MailShell-DL8UOD47.js} +1 -1
- package/assets/{MailViewChrome-Js-ounb_.js → MailViewChrome-BHGpOjA1.js} +1 -1
- package/assets/{MailboxPane-BT8uCaoH.js → MailboxPane-BAN0Pyxe.js} +1 -1
- package/assets/{NavMenuButton-hskuD0c_.js → NavMenuButton-JNFq1cbX.js} +1 -1
- package/assets/{OnboardingWizard-C2HMZqdi.js → OnboardingWizard-DpyAj2p8.js} +1 -1
- package/assets/{OutboxPane-CwD6GQtk.js → OutboxPane-B4PWORx7.js} +1 -1
- package/assets/_mailboxId-PpSHH8W6.js +1 -0
- package/assets/_messageId-Cw8Pha4_.js +1 -0
- package/assets/_messageId-DUadzcYd.js +1 -0
- package/assets/_messageId-qCvswN_X.js +1 -0
- package/assets/_outboxMessageId-CP7R3Ikq.js +1 -0
- package/assets/_threadId-C9GsX3jV.js +1 -0
- package/assets/_threadId-ClzPCnPO.js +1 -0
- package/assets/_threadId-gxcKXuQJ.js +1 -0
- package/assets/{accounts-vyPk1ZWO.js → accounts-_QyKTDQA.js} +1 -1
- package/assets/{advanced-BqbSoihX.js → advanced-Bnpv_T5S.js} +1 -1
- package/assets/{appearance-CmaRo0z1.js → appearance-CGEMT7_K.js} +1 -1
- package/assets/{attachment-file-DNSFKRDU.js → attachment-file-DSNldAsr.js} +1 -1
- package/assets/{avatar-BSyebRlt.js → avatar-C-myt3Kd.js} +1 -1
- package/assets/{bottom-sheet-Ci89UJLB.js → bottom-sheet-DU9hyeWN.js} +1 -1
- package/assets/{brief-Cgk0wsYZ.js → brief-B__qheui.js} +1 -1
- package/assets/brief-wDiZ4Kp1.js +1 -0
- package/assets/{browser-ponyfill-DYxfqtt3.js → browser-ponyfill-ChlM_O25.js} +1 -1
- package/assets/{bug-Bd584ysu.js → bug-CLkQEpjL.js} +1 -1
- package/assets/{circle-check-D3c89pME.js → circle-check-DW4VkOSf.js} +1 -1
- package/assets/{circle-check-big-C6G1APn2.js → circle-check-big-ClvDL1Sb.js} +1 -1
- package/assets/{circle-help-CwxZFybw.js → circle-help-Cyixf-mB.js} +1 -1
- package/assets/{clock-C2k3Wuhx.js → clock-B8ngkj5W.js} +1 -1
- package/assets/compose._-_outboxMessageId_-BlYIY5sV.js +1 -0
- package/assets/compose._-_outboxMessageId_-C1SR7Pgh.js +1 -0
- package/assets/compose._-_outboxMessageId_-D4gNZfjp.js +1 -0
- package/assets/compose._-_outboxMessageId_-DHmFBDJz.js +1 -0
- package/assets/{confirm-dialog-DMqLQWxB.js → confirm-dialog-DVwz0TFh.js} +1 -1
- package/assets/{download-s1QWbdIi.js → download-B1L4VwTl.js} +1 -1
- package/assets/{filters-CFT2Tdp9.js → filters-DtKh_-wI.js} +1 -1
- package/assets/flagged-CLssvj7Y.js +1 -0
- package/assets/{flagged-B7a4PmKf.js → flagged-CfWLWjIP.js} +1 -1
- package/assets/{folders-CWZ8x-R2.js → folders-D7CpzLwM.js} +1 -1
- package/assets/{format-UD9WAYmo.js → format-BwY6euDc.js} +1 -1
- package/assets/{help-copy-CoCXFGVH.js → help-copy-vCT2UyLb.js} +1 -1
- package/assets/index-BP5jpOWs.js +1 -0
- package/assets/index-BVSELvAN.js +1 -0
- package/assets/index-CoW2cwCm.js +55 -0
- package/assets/index-D8vcdpIt.js +1 -0
- package/assets/index-DUadzcYd.js +1 -0
- package/assets/{index-Rp58rTPh.js → index-DazNGXXJ.js} +4 -4
- package/assets/index-Dk53UGIv.js +1 -0
- package/assets/index-DrLafmyt.js +1 -0
- package/assets/index-blkFd1zo.js +1 -0
- package/assets/index-qCvswN_X.js +1 -0
- package/assets/{kbd-CT1stO4M.js → kbd-r0sak2_Y.js} +1 -1
- package/assets/{labels-Cn5HXiX3.js → labels-CUyTn65p.js} +1 -1
- package/assets/mail-C9hURTcf.js +1 -0
- package/assets/{mail-CIeNzpJD.js → mail-aJo6bnGe.js} +1 -1
- package/assets/{menu-DbL1uTli.js → menu-DqpXTxWI.js} +1 -1
- package/assets/{onboarding-BqusTDyQ.js → onboarding-B7mbNjZW.js} +1 -1
- package/assets/outbox-Bab82WhU.js +1 -0
- package/assets/{pencil-BY9Rk1g5.js → pencil-C5rni6dp.js} +1 -1
- package/assets/{rich-text-DRWsIRJB.js → rich-text-BZu4rD0I.js} +2 -2
- package/assets/{rich-text-spellcheck-worker-provider-C1Hbr_SL.js → rich-text-spellcheck-worker-provider-DIjwwMZk.js} +1 -1
- package/assets/{rotate-ccw-ndDmpznm.js → rotate-ccw-CHdUOytq.js} +1 -1
- package/assets/{row-actions-CAeFpzly.js → row-actions-CXpl2oFP.js} +1 -1
- package/assets/{search-mirror-CAr8BktU.js → search-mirror-59AW-Rtk.js} +1 -1
- package/assets/{search-token-index-C9xbt7_n.js → search-token-index-Bhb4NdQX.js} +1 -1
- package/assets/{senders-jMidEIB2.js → senders-DWfDZ60X.js} +1 -1
- package/assets/settings-DnYUmqj6.js +1 -0
- package/assets/{settings-screen-CsKPBRZ0.js → settings-screen-Dj0BXno-.js} +1 -1
- package/assets/{shield-check-CQ5RiB8Q.js → shield-check-Dmh229At.js} +1 -1
- package/assets/{suggested-vips-BNMi_qpX.js → suggested-vips-BVkOU0A8.js} +1 -1
- package/assets/{useDebouncedValue-Dg9KjMim.js → useDebouncedValue-DE5ruYcg.js} +1 -1
- package/assets/{useFilters-Dqcdqd3n.js → useFilters-CZux0B59.js} +1 -1
- package/assets/{useLabels-mjU_3qzh.js → useLabels-Lbg0BLwh.js} +1 -1
- package/assets/{useMessageBodyContent-Dz8O7U1N.js → useMessageBodyContent-aHJCFwNy.js} +1 -1
- package/assets/{useQueries-DG6Tlx93.js → useQueries-BFlCkv-C.js} +1 -1
- package/assets/{useRefreshControl-Bn7QpW9P.js → useRefreshControl-B2_P8mob.js} +1 -1
- package/assets/{useSearchTokenContext-Bw3uXqAb.js → useSearchTokenContext-BTCBknjU.js} +1 -1
- package/assets/{useSemanticSearch-C38OdJpo.js → useSemanticSearch-DiCA_GKZ.js} +1 -1
- package/assets/{useSignature-ZMhm0gDR.js → useSignature-D7Bg3B3Y.js} +1 -1
- package/index.html +1 -1
- package/package.json +1 -1
- package/assets/_mailboxId-HoJJPpTK.js +0 -1
- package/assets/_messageId-B5TCAbGo.js +0 -1
- package/assets/_messageId-CyYpuass.js +0 -1
- package/assets/_messageId-uvXg9QK7.js +0 -1
- package/assets/_outboxMessageId-Dv1oa_Rv.js +0 -1
- package/assets/_threadId-ClbzFfvO.js +0 -1
- package/assets/_threadId-DjEqMEmQ.js +0 -1
- package/assets/_threadId-PcdqLwn_.js +0 -1
- package/assets/brief-BNUPDK-w.js +0 -1
- package/assets/compose._-_outboxMessageId_-CVHRLv8O.js +0 -1
- package/assets/compose._-_outboxMessageId_-CbDarrMD.js +0 -1
- package/assets/compose._-_outboxMessageId_-Cq4MG12T.js +0 -1
- package/assets/compose._-_outboxMessageId_-DNR9ODMo.js +0 -1
- package/assets/flagged-CkLyc5hK.js +0 -1
- package/assets/index-1eYIa6jB.js +0 -1
- package/assets/index-4XL0sOIc.js +0 -46
- package/assets/index-BN9Qd5aD.js +0 -1
- package/assets/index-CQYNtddQ.js +0 -1
- package/assets/index-CnkVOMbQ.js +0 -1
- package/assets/index-CyYpuass.js +0 -1
- package/assets/index-DVXti2Z1.js +0 -1
- package/assets/index-_Ld6WrbH.js +0 -1
- package/assets/index-uvXg9QK7.js +0 -1
- package/assets/mail-DcCN95E0.js +0 -1
- package/assets/outbox-DEsnnM03.js +0 -1
- package/assets/settings-DABDPGgI.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./index-DazNGXXJ.js";import{F as r}from"./FlaggedPane-D0sn1xg_.js";import"./useSearchTokenContext-BTCBknjU.js";import"./kbd-r0sak2_Y.js";import"./useMessageBodyContent-aHJCFwNy.js";import"./search-scope-DTcpOp3S.js";import"./MailListHeader-CSP9YvD7.js";import"./search-token-index-Bhb4NdQX.js";import"./useQueries-BFlCkv-C.js";import"./attachment-file-DSNldAsr.js";import"./mail-aJo6bnGe.js";import"./avatar-C-myt3Kd.js";import"./index-CoW2cwCm.js";import"./useSignature-D7Bg3B3Y.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-DE5ruYcg.js";import"./format-BwY6euDc.js";import"./ErrorState-BB9MY89J.js";import"./download-B1L4VwTl.js";import"./shield-check-Dmh229At.js";import"./useFilters-CZux0B59.js";import"./confirm-dialog-DVwz0TFh.js";import"./clock-B8ngkj5W.js";import"./menu-DqpXTxWI.js";import"./MailViewChrome-BHGpOjA1.js";import"./wizard-selection-B1bng5Jq.js";function y(){return o.jsx(r.Reading,{})}export{y as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,ac as o}from"./index-DazNGXXJ.js";const n=()=>t.jsx(o,{to:"/settings/accounts"});export{n as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./index-DazNGXXJ.js";import{O as t}from"./OutboxPane-B4PWORx7.js";import"./useSearchTokenContext-BTCBknjU.js";import"./kbd-r0sak2_Y.js";import"./useMessageBodyContent-aHJCFwNy.js";import"./search-scope-DTcpOp3S.js";import"./circle-check-big-ClvDL1Sb.js";import"./clock-B8ngkj5W.js";import"./row-actions-CXpl2oFP.js";import"./rotate-ccw-CHdUOytq.js";import"./NavMenuButton-JNFq1cbX.js";import"./menu-DqpXTxWI.js";import"./format-BwY6euDc.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function c(){return o.jsx(t.Reading,{})}export{c as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./index-DazNGXXJ.js";import{B as o}from"./BriefPane-BIXOlPoq.js";import"./useSearchTokenContext-BTCBknjU.js";import"./kbd-r0sak2_Y.js";import"./useMessageBodyContent-aHJCFwNy.js";import"./search-scope-DTcpOp3S.js";import"./MailListHeader-CSP9YvD7.js";import"./search-token-index-Bhb4NdQX.js";import"./useQueries-BFlCkv-C.js";import"./attachment-file-DSNldAsr.js";import"./mail-aJo6bnGe.js";import"./avatar-C-myt3Kd.js";import"./index-CoW2cwCm.js";import"./useSignature-D7Bg3B3Y.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-DE5ruYcg.js";import"./format-BwY6euDc.js";import"./ErrorState-BB9MY89J.js";import"./download-B1L4VwTl.js";import"./shield-check-Dmh229At.js";import"./useFilters-CZux0B59.js";import"./confirm-dialog-DVwz0TFh.js";import"./clock-B8ngkj5W.js";import"./menu-DqpXTxWI.js";import"./useRefreshControl-B2_P8mob.js";import"./circle-check-big-ClvDL1Sb.js";import"./useLabels-Lbg0BLwh.js";import"./useSemanticSearch-DiCA_GKZ.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-B1bng5Jq.js";function C(){return r.jsx(o.Reading,{})}export{C as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s,b as t}from"./index-
|
|
1
|
+
import{j as s,b as t}from"./index-DazNGXXJ.js";function x({className:e,...n}){return s.jsx("kbd",{className:t("inline-flex h-4 min-w-4 items-center justify-center rounded-xs border border-line bg-surface-sunken px-1 font-sans text-2xs text-fg-muted",e),...n})}export{x as K};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as f,j as e,aq as h,b7 as y,ap as b,bu as g,B as v,T as N,a1 as C,D as L,a2 as I,aE as D,aI as S,aF as E}from"./index-
|
|
1
|
+
import{r as f,j as e,aq as h,b7 as y,ap as b,bu as g,B as v,T as N,a1 as C,D as L,a2 as I,aE as D,aI as S,aF as E}from"./index-DazNGXXJ.js";import{C as w}from"./confirm-dialog-DVwz0TFh.js";import{S as $}from"./settings-screen-Dj0BXno-.js";import{E as j}from"./ErrorState-BB9MY89J.js";import{a as T,b as k,c as R,u as O}from"./useLabels-Lbg0BLwh.js";import"./avatar-C-myt3Kd.js";import"./menu-DqpXTxWI.js";import"./circle-help-Cyixf-mB.js";function B({labels:l,onRename:i,onRecolor:n,onDelete:m,deletingLabelId:c}){const[u,r]=f.useState(),[o,d]=f.useState("");if(l.length===0)return e.jsx("p",{className:"py-6 text-sm text-fg-muted",children:"No labels yet. Create one below, then use it in a filter or apply it to mail directly."});const t=a=>{const s=o.trim();s!==""&&i(a,s),r(void 0)};return e.jsx("ul",{className:"divide-y divide-line rounded-md border border-line",children:l.map(a=>e.jsxs("li",{className:"flex items-center gap-3 px-3 py-2.5",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[u===a.labelId?e.jsx(h,{autoFocus:!0,value:o,onChange:s=>d(s.target.value),onBlur:()=>t(a.labelId),onKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),t(a.labelId)),s.key==="Escape"&&(s.preventDefault(),r(void 0))},"aria-label":`Rename label ${a.name}`}):e.jsx("button",{type:"button",onClick:()=>{r(a.labelId),d(a.name)},"aria-label":`Rename label ${a.name}`,className:"flex items-center gap-2 rounded-sm text-left hover:opacity-80",children:e.jsx(y,{label:a})}),e.jsx("p",{className:"mt-0.5 text-xs text-fg-subtle",children:a.filterCount===0?"Not used in any filter":`Used in ${a.filterCount} ${a.filterCount===1?"filter":"filters"}`})]}),e.jsx(b,{"aria-label":`Color for ${a.name}`,value:a.color,onChange:s=>n(a.labelId,s.target.value),className:"w-28 shrink-0",children:g.map(s=>e.jsx("option",{value:s,children:s},s))}),e.jsx(v,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-4 text-danger"}),onClick:()=>m(a),disabled:c===a.labelId,"aria-label":`Delete label ${a.name}`})]},a.labelId))})}const P=(l,i)=>{if(i===0)return{title:`Delete the "${l}" label?`};const n=i===1?"filter":"filters";return{title:`Delete the "${l}" label?`,description:`This also deletes ${i} ${n} that ${i===1?"applies":"apply"} it — they can't be recovered.`}},_=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Labels mark mail without moving it — a message can carry any number of them alongside whichever folder it lives in."}),e.jsx("p",{children:"Use a label in a filter's action to have new (and existing) mail label itself automatically, or apply one to a selection directly from the mailbox."}),e.jsx("p",{children:"Deleting a label removes it from every message, and deletes every filter that applies it — the confirmation names how many."})]});function H({accountId:l}){const{createLabel:i,isPending:n,isError:m}=O(l),[c,u]=f.useState(""),[r,o]=f.useState("Default"),d=()=>{const t=c.trim();t!==""&&i(t,r).then(()=>{u(""),o("Default")})};return e.jsxs("div",{className:"space-y-2 rounded-sm border border-line bg-surface p-3",children:[e.jsx("p",{className:"text-sm font-medium text-fg",children:"New label"}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[e.jsxs("div",{className:"flex-1 space-y-1",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Name"}),e.jsx(h,{value:c,onChange:t=>u(t.target.value),placeholder:"e.g. Receipts","aria-label":"Label name",onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),d())}})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs text-fg-muted",children:"Color"}),e.jsx(b,{value:r,onChange:t=>o(t.target.value),"aria-label":"Label color",className:"w-28",children:g.map(t=>e.jsx("option",{value:t,children:t},t))})]}),e.jsx(v,{variant:"primary",onClick:d,disabled:n||c.trim()==="",children:n?"Creating…":"Create label"})]}),m&&e.jsx(E,{tone:"danger",variant:"soft",children:"Couldn't create that label. Please try again."})]})}function A({account:l}){const i=l.accountId,{labels:n,isPending:m,isError:c,error:u,refetch:r}=T(i),{updateLabel:o}=k(i),{deleteLabel:d,deletingLabelId:t}=R(i),[a,s]=f.useState();return e.jsxs("section",{className:"space-y-2",children:[e.jsx("h2",{className:"text-sm font-semibold text-fg",children:l.email}),m?e.jsx("div",{className:"h-16 animate-pulse rounded-md border border-line bg-surface","aria-busy":"true","aria-label":`Loading labels for ${l.email}`}):c?e.jsx(j,{variant:"inline",title:`Couldn't load labels for ${l.email}`,error:u,onRetry:()=>{r()}}):e.jsx(B,{labels:n,onRename:(p,x)=>o(p,{name:x}),onRecolor:(p,x)=>o(p,{color:x}),onDelete:s,deletingLabelId:t}),e.jsx(H,{accountId:i}),a&&(()=>{const p=P(a.name,a.filterCount);return e.jsx(w,{isOpen:!0,title:p.title,description:p.description,confirmLabel:"Delete label",destructive:!0,isBusy:t===a.labelId,onConfirm:()=>{d(a.labelId),s(void 0)},onCancel:()=>s(void 0)})})()]})}function V(){const l=C(),[i,n]=f.useState(!0),{data:m,isPending:c,isError:u,error:r,refetch:o}=L(I()),d=t=>{const a=S[t];a&&l({to:a})};return e.jsx($,{items:D,activeId:"labels",title:"Labels",description:"Mark mail without moving it, per account.",help:_,helpOpen:i,onToggleHelp:()=>n(t=>!t),onSelect:d,onBackToMail:()=>{l({to:"/mail"})},children:c?e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading accounts"}):u?e.jsx(j,{title:"Couldn't load accounts",error:r,onRetry:()=>{o()}}):m.accounts.length===0?e.jsx("p",{className:"py-12 text-sm text-fg-muted",children:"No accounts configured."}):e.jsx("div",{className:"space-y-8",children:m.accounts.map(t=>e.jsx(A,{account:t},t.accountId))})})}export{V as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as A,r as d,u as Pe,j as e,S as Le,a as ge,b as k,C as te,d as se,e as Ae,f as be,F as Te,g as ze,X as ve,T as Fe,O as De,M as _e,A as Be,h as Ke,I as Qe,i as ye,B as D,k as Ve,l as He,m as z,n as qe,o as U,p as ae,q as $e,s as Ue,t as We,v as je,w as Y,x as Se,y as Ge,z as J,D as Ne,E as Ye,G as Je,H as W,J as Xe,N as E,K as Ze,L as et,P as tt,Q as st,R as at,U as nt,V as rt,W as ot,Y as it,Z as lt,_ as ct,$ as ut,a0 as dt,a1 as mt,a2 as xt,a3 as ht,a4 as ft,a5 as pt}from"./index-DazNGXXJ.js";import{B as gt,S as bt,D as vt,a as yt,b as jt,u as St,i as Nt,t as Ct,s as kt,c as wt,K as It,d as Mt,e as Ce,f as Ot,g as Rt,h as Et,j as Pt}from"./search-token-index-Bhb4NdQX.js";import{u as X,a as Lt}from"./useMessageBodyContent-aHJCFwNy.js";import{P as At}from"./pencil-C5rni6dp.js";import{c as Tt,s as zt,M as Ft}from"./MailShell-DL8UOD47.js";import{u as Dt,a as _t,R as Bt,s as Kt,i as Qt,H as Vt,M as Ht}from"./useRefreshControl-B2_P8mob.js";import{M as qt}from"./menu-DqpXTxWI.js";import{B as ke}from"./bug-CLkQEpjL.js";import{A as $t}from"./avatar-C-myt3Kd.js";import{u as Ut,a as Wt}from"./index-CoW2cwCm.js";import{u as Z}from"./useQueries-BFlCkv-C.js";import{i as Gt}from"./outbox-status-BlKn6P0x.js";import{E as Yt}from"./ErrorState-BB9MY89J.js";import{K as ne}from"./kbd-r0sak2_Y.js";import{u as Jt}from"./useDebouncedValue-DE5ruYcg.js";import"./search-scope-DTcpOp3S.js";import"./FullCompose-Cl0FqWeX.js";import"./confirm-dialog-DVwz0TFh.js";import"./circle-check-big-ClvDL1Sb.js";import"./useSignature-D7Bg3B3Y.js";import"./account-form-helpers-DhckT_PN.js";import"./format-BwY6euDc.js";const Xt=A("BookmarkPlus",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}],["line",{x1:"12",x2:"12",y1:"7",y2:"13",key:"1cppfj"}],["line",{x1:"15",x2:"9",y1:"10",y2:"10",key:"1gty7f"}]]);const Zt=A("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);const we=A("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);const Ie=A("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const es=A("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]),ts="button:not([disabled]), a[href]",R="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface-sunken";function ss({active:t,dimmed:s,indent:a}){return k("flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors",R,a&&"pl-7",t?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface hover:text-fg",s&&"opacity-55")}function as({icon:t,label:s,count:a,active:n}){return e.jsxs(e.Fragment,{children:[t&&e.jsx("span",{className:k("shrink-0",n?"text-accent-2":"text-fg-subtle"),children:t}),e.jsx("span",{className:"flex-1 truncate",children:s}),a!=null&&a>0&&e.jsx("span",{className:k("text-2xs tabular-nums",n?"text-accent-2":"text-fg-subtle"),children:a})]})}function P({icon:t,label:s,count:a,active:n,dimmed:r,indent:o,navId:c,linkComponent:m,ariaLabel:x,title:u,onClick:b}){const p=ss({active:n,dimmed:r,indent:o}),h=e.jsx(as,{icon:t,label:s,count:a,active:n});return c&&m?m({navId:c,className:p,ariaLabel:x??s,title:u,onClick:b,children:h}):e.jsx("button",{type:"button",onClick:b,className:p,"aria-label":x,title:u,children:h})}const re={inbox:0,flagged:1,drafts:2,sent:3,archive:4,all:5,junk:6,trash:7};function ns(t){switch(t){case"inbox":return e.jsx(Qe,{className:"size-4"});case"flagged":return e.jsx(ge,{className:"size-4"});case"drafts":return e.jsx(Ke,{className:"size-4"});case"sent":return e.jsx(be,{className:"size-4"});case"archive":return e.jsx(Be,{className:"size-4"});case"all":return e.jsx(_e,{className:"size-4"});case"junk":return e.jsx(De,{className:"size-4"});case"trash":return e.jsx(Fe,{className:"size-4"})}}const oe=t=>t.role!=null,$=8,ie="remit.nav.folders.open.",le="remit.nav.account.open.";function ce(t,s,a){if(typeof localStorage>"u")return a;const n=localStorage.getItem(t+s);return n===null?a:n!=="0"}function ue(t,s,a){typeof localStorage>"u"||localStorage.setItem(t+s,a?"1":"0")}function rs({query:t,onSelect:s,onRemove:a}){return e.jsxs("div",{className:"group flex w-full items-center gap-1 rounded-md pr-1 hover:bg-surface",children:[e.jsxs("button",{type:"button",onClick:s,className:k("flex min-w-0 flex-1 items-center gap-2 px-2 py-1 text-left text-sm text-fg-muted transition-colors hover:text-fg",R),children:[e.jsx(ze,{className:"size-4 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:t})]}),a&&e.jsx("button",{type:"button",onClick:a,"aria-label":`Remove saved search: ${t}`,className:k("shrink-0 rounded-full p-1 text-fg-subtle opacity-0 transition-opacity hover:bg-surface-sunken hover:text-fg group-hover:opacity-100 focus-visible:opacity-100",R),children:e.jsx(ve,{className:"size-3.5"})})]})}function os({savedSearches:t,saveableQuery:s,onSelectSavedSearch:a,onRemoveSavedSearch:n,onSaveCurrentSearch:r}){return t.length===0&&!s?null:e.jsxs("div",{className:"mt-3",children:[e.jsx("div",{className:"px-2 pb-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Saved searches"}),s&&e.jsxs("button",{type:"button",onClick:r,className:k("flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm text-accent transition-colors hover:bg-surface",R),children:[e.jsx(Xt,{className:"size-4 shrink-0"}),e.jsxs("span",{className:"min-w-0 flex-1 truncate",children:["Save “",s,"”"]})]}),t.map(o=>e.jsx(rs,{query:o,onSelect:()=>a?.(o),onRemove:n?()=>n(o):void 0},o))]})}function is({account:t,selectedNavId:s,onSelectNav:a,linkComponent:n}){const[r,o]=d.useState(()=>ce(le,t.id,!0)),[c,m]=d.useState(()=>ce(ie,t.id,!0)),[x,u]=d.useState(!1),b=()=>{o(l=>{const N=!l;return ue(le,t.id,N),N})},p=()=>{m(l=>{const N=!l;return ue(ie,t.id,N),N})},h=t.mailboxes.filter(oe).sort((l,N)=>re[l.role]-re[N.role]),i=t.mailboxes.filter(l=>!oe(l)),g=x||i.length<=$?i:i.slice(0,$),j=i.length-g.length,y=t.status??"ready",S=y==="ready"&&h.length===0&&i.length===0;return e.jsxs("div",{className:"mt-3",children:[e.jsxs("button",{type:"button",onClick:b,"aria-expanded":r,className:k("flex w-full items-center gap-1.5 px-2 pb-1 text-left transition-colors hover:text-fg",R,t.muted&&"opacity-55"),children:[r?e.jsx(te,{className:"size-3 shrink-0 text-fg-subtle"}):e.jsx(se,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"truncate text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:t.label}),t.muted&&e.jsxs(e.Fragment,{children:[e.jsx(gt,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"text-2xs text-fg-subtle",children:"muted"})]})]}),r&&e.jsxs(e.Fragment,{children:[y==="loading"&&e.jsx("div",{className:"px-2 py-1 text-sm text-fg-muted",children:"Loading…"}),y==="error"&&e.jsxs("div",{role:"alert",className:"mx-2 my-1 flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft px-2 py-1.5 text-sm",children:[e.jsx(Ae,{className:"mt-0.5 size-4 shrink-0 text-danger","aria-hidden":"true"}),e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx("p",{className:"font-medium text-danger",children:"Couldn't load mailboxes"})}),t.onRetry&&e.jsx("button",{type:"button",onClick:t.onRetry,className:"shrink-0 text-sm font-medium text-accent hover:underline",children:"Retry"})]}),S&&e.jsx("div",{className:"px-2 py-1 text-sm text-fg-muted",children:"No mailboxes"}),y==="ready"&&e.jsxs(e.Fragment,{children:[h.map(l=>e.jsx(P,{navId:l.id,linkComponent:n,icon:ns(l.role),label:l.name,ariaLabel:l.name,title:l.fullPath??l.name,count:l.unseen,active:s===l.id,dimmed:t.muted,onClick:()=>a?.(l.id)},l.id)),t.outboxPending!==void 0&&e.jsx(P,{navId:"outbox",linkComponent:n,icon:e.jsx(be,{className:"size-4"}),label:"Outbox",ariaLabel:"Outbox",count:t.outboxPending>0?t.outboxPending:void 0,active:s==="outbox",dimmed:t.muted,onClick:()=>a?.("outbox")}),i.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:p,"aria-expanded":c,className:k("mt-1 flex w-full items-center gap-1 px-2 py-1 text-left text-2xs font-semibold uppercase tracking-wider text-fg-subtle transition-colors hover:text-fg",R),children:[c?e.jsx(te,{className:"size-3 shrink-0"}):e.jsx(se,{className:"size-3 shrink-0"}),e.jsx("span",{className:"flex-1",children:"Folders"}),e.jsx("span",{className:"tabular-nums opacity-70",children:i.length})]}),c&&e.jsxs(e.Fragment,{children:[g.map(l=>e.jsx(P,{navId:l.id,linkComponent:n,icon:e.jsx(Te,{className:"size-4"}),label:l.name,ariaLabel:l.name,title:l.fullPath??l.name,count:l.unseen,active:s===l.id,dimmed:t.muted,onClick:()=>a?.(l.id)},l.id)),(j>0||x)&&i.length>$&&e.jsx("button",{type:"button",onClick:()=>u(l=>!l),className:k("ml-7 flex items-center px-2 py-1 text-2xs font-medium text-accent transition-colors hover:underline",R),children:x?"Show less":`Show all (${i.length})`})]})]})]})]})]})}function ls({accounts:t,selectedNavId:s,briefUnseen:a,onSelectNav:n,variant:r="desktop",linkComponent:o,calendarNav:c="hidden",savedSearches:m=[],saveableQuery:x,onSelectSavedSearch:u,onRemoveSavedSearch:b,onSaveCurrentSearch:p}){const h=d.useRef(null);Pe({containerRef:h,itemSelector:ts});const i=r==="drawer",g=e.jsxs("nav",{ref:i?h:void 0,className:i?"px-2 py-2":"flex-1 overflow-y-auto px-2 py-2","aria-label":"Mailboxes",children:[e.jsx(P,{navId:"brief",linkComponent:o,icon:e.jsx(Le,{className:"size-4"}),label:"Daily brief",ariaLabel:"Daily brief",count:a,active:s==="brief",onClick:()=>n?.("brief")}),c==="shown"&&e.jsx(P,{navId:"calendar",linkComponent:o,icon:e.jsx(Zt,{className:"size-4"}),label:"Calendar",ariaLabel:"Calendar",active:s==="calendar",onClick:()=>n?.("calendar")}),e.jsx(P,{navId:"flagged",linkComponent:o,icon:e.jsx(ge,{className:"size-4"}),label:"Starred",ariaLabel:"Starred",active:s==="flagged",onClick:()=>n?.("flagged")}),e.jsx(os,{savedSearches:m,saveableQuery:x,onSelectSavedSearch:u,onRemoveSavedSearch:b,onSaveCurrentSearch:p}),t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-sm text-fg-muted",children:"No accounts configured"}):t.map(j=>e.jsx(is,{account:j,selectedNavId:s,onSelectNav:n,linkComponent:o},j.id))]});return i?g:e.jsx("aside",{ref:h,className:"flex h-full w-full flex-col bg-surface-sunken",children:g})}function cs({leading:t,search:s,actions:a,className:n}){return e.jsxs("header",{className:k("flex min-h-pane-header w-full shrink-0 items-center gap-2 border-b border-line bg-canvas px-row-inset py-1",n),children:[t&&e.jsx("div",{className:"flex shrink-0 items-center gap-1",children:t}),e.jsx("div",{className:"flex min-w-0 flex-1 justify-start",children:e.jsx("div",{className:"w-full max-w-xs transition-[max-width] duration-150 ease-out focus-within:max-w-lg",children:s})}),a&&e.jsx("div",{className:"flex shrink-0 items-center gap-1",children:a})]})}function us(){const t=ye();if(!t)return null;const s=t.showNavPane?!t.navCollapsed:!1;return e.jsx(D,{variant:"ghost",size:"sm",icon:e.jsx(qt,{className:"size-4"}),onClick:t.toggleNav,"aria-label":s?"Hide folders":"Show folders","aria-expanded":s,title:"Folders",className:"shrink-0"})}const ds={global:"Search all mail",pending:"Search mail",scoped:"Search this folder"};function ms({search:t,onCompose:s,onReportBug:a,onOpenSettings:n,composeShortcut:r,refreshControl:o,account:c}){return e.jsx(cs,{leading:e.jsx(us,{}),search:e.jsx(bt,{value:t.value,onChange:t.onChange,onClear:t.onClear,onClearQuery:t.onClearQuery,chips:t.chips,onRemoveChip:t.onRemoveChip,placeholder:ds[t.scope]}),actions:e.jsxs(e.Fragment,{children:[e.jsx(D,{variant:"ghost",size:"sm",icon:e.jsx(es,{className:"size-4"}),title:r?`Compose (${r})`:"Compose","aria-label":"Compose",onClick:s}),e.jsx(D,{variant:"ghost",size:"sm",icon:e.jsx(ke,{className:"size-4"}),title:"Report a bug","aria-label":"Report a bug",onClick:a}),e.jsx(D,{variant:"ghost",size:"sm",icon:e.jsx(Ie,{className:"size-4"}),title:"Settings","aria-label":"Settings",onClick:n}),o,c]})})}function xs(){const{pathname:t}=Ve(),s=He({from:"/mail/$mailboxId",shouldThrow:!1});return z(t,"/settings")?"settings":z(t,"/mail/outbox")?"outbox":z(t,"/mail/flagged")?"flagged":z(t,"/mail/brief")?"brief":s?.mailboxId??""}function hs(){const t=qe(),s=U({select:u=>ae(u.location.pathname)}),a=U({select:u=>$e(u.location.search)}),[n,r]=d.useState(a),o=Jt(n,200),[c,m]=d.useState(s);if(c!==s){const u=zt(c,s,a);m(s),u!==void 0&&r(u)}const x=d.useCallback(u=>{m(ae(t.state.location.pathname)),r(u)},[t]);return{searchInput:n,committedQuery:Tt(n,o),viewKey:s,setSearchInput:x}}const fs=()=>{const t=X();return Ue()?null:e.jsx("button",{type:"button",onClick:t,"aria-label":"Compose new message",className:"lg:hidden fixed right-4 z-30 h-14 w-14 rounded-full bg-accent text-accent-fg shadow-lg flex items-center justify-center hover:opacity-90 active:scale-95 transition-all",style:{bottom:"calc(env(safe-area-inset-bottom, 0) + 1rem)"},children:e.jsx(At,{className:"size-6"})})},Me=({children:t})=>{const{Account:s}=We();return e.jsx(s,{children:t})},ps=({email:t,onSignOut:s})=>{const a=t??"Account";return e.jsxs(vt,{trigger:e.jsx($t,{name:a,email:t??void 0,size:"sm"}),align:"right",children:[t&&e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-3 py-2 text-xs text-fg-muted truncate",title:t,"data-testid":"account-menu-email",children:t}),e.jsx(yt,{})]}),e.jsxs(jt,{onClick:s,children:[e.jsx(we,{className:"size-4"}),"Sign out"]})]})},gs=()=>e.jsx(Me,{children:({email:t,signOut:s})=>e.jsx(ps,{email:t,onSignOut:s})});function bs({accounts:t}){const{searchInput:s,onSearchChange:a,onSearchClear:n,onSearchClearQuery:r,resultFolderIndex:o}=je(),c=Y(),m=Ut(),x=X(),{scope:u,clearScope:b}=St(t),p=u.kind==="scoped"?[{id:u.chip.id,label:u.chip.label,tone:"scope"}]:void 0,h=d.useMemo(()=>t.map(S=>S.accountId),[t]),{hasNewMail:i}=Dt(),{state:g,errorMessage:j,refresh:y}=_t(h,{onSettled:()=>Nt(c,Ct(o.keys()))});return e.jsx(ms,{search:{value:s,scope:u.kind,chips:p,onChange:a,onClear:n,onClearQuery:r,onRemoveChip:b},onCompose:x,onReportBug:Se,onOpenSettings:()=>m("accounts"),composeShortcut:kt("compose"),refreshControl:e.jsx(Bt,{state:g,onRefresh:y,label:"Refresh all accounts",errorMessage:j,hasUpdate:i(h)}),account:e.jsx(gs,{})})}const ee="remit.savedSearches",vs=25;function _(){try{const t=localStorage.getItem(ee);if(!t)return[];const s=JSON.parse(t);return Array.isArray(s)?s.filter(a=>typeof a=="string"):[]}catch{return[]}}function ys(t){const s=t.trim();if(!s)return _();const a=[s,..._().filter(n=>n!==s)].slice(0,vs);try{localStorage.setItem(ee,JSON.stringify(a))}catch{return a}return a}function js(t){const s=_().filter(a=>a!==t);try{localStorage.setItem(ee,JSON.stringify(s))}catch{return s}return s}const de=t=>/^\d/.test(t),Ss=(t,s)=>{const a=de(t),n=de(s);return a&&!n?-1:!a&&n?1:t.localeCompare(s,void 0,{sensitivity:"base",numeric:!0})};function Ns(t,s,a){const n=[],r=[];for(const o of t)s.has(o.mailboxId)?n.push(o):r.push(o);return r.sort((o,c)=>Ss(W(o,void 0,a),W(c,void 0,a))),{system:n,labels:r}}function Cs(t,s,a){const n=Xe(s)&&t.unseenCount>0;return{id:t.mailboxId,name:W(t,s,a),unseen:n?t.unseenCount:void 0,role:s,fullPath:t.fullPath}}function me({accounts:t,onMailboxSelect:s,variant:a="desktop"}){const n=Y(),r=wt(),o=xs(),{searchInput:c,onSearchChange:m}=je(),[x,u]=d.useState(_),{t:b}=Ge("mail",{useSuspense:!1}),p=d.useCallback((f,C)=>b(f,{defaultValue:C}),[b]),h=Z({queries:t.map(f=>({...J({path:{accountId:f.accountId}}),staleTime:1/0}))}),{data:i}=Ne(Ye()),g=d.useMemo(()=>(i?.items??[]).filter(f=>Gt(f.status)).length,[i?.items]),j=d.useMemo(()=>t.map((f,C)=>{const v=h[C],I=v?.data?.items??[],w=Je(f.folderAppointments),{system:M,labels:V}=Ns(I,w,p),H=v?.isError?"error":v?.isLoading?"loading":"ready";return{id:f.accountId,label:f.email,email:f.email,muted:!!f.muted,outboxPending:g,status:H,onRetry:()=>v?.refetch(),mailboxes:[...M,...V].map(T=>Cs(T,w.get(T.mailboxId),p))}}),[t,h,g,p]),y=f=>{n.invalidateQueries({queryKey:Ze({path:{mailboxId:f},query:{order:"desc"}})})},S=({navId:f,className:C,ariaLabel:v,title:I,children:w,onClick:M})=>f==="brief"?e.jsx(E,{to:"/mail/brief",search:{q:void 0},activeOptions:{includeSearch:!1},onClick:()=>M?.(),className:C,"aria-label":v,title:I,children:w}):f==="outbox"?e.jsx(E,{to:"/mail/outbox",search:{q:void 0},onClick:()=>M?.(),className:C,"aria-label":v,title:I,children:w}):f==="flagged"?e.jsx(E,{to:"/mail/flagged",search:{q:void 0},onClick:()=>M?.(),className:C,"aria-label":v,title:I,children:w}):f==="settings"?e.jsx(E,{to:"/settings/accounts",onClick:()=>M?.(),className:C,"aria-label":v,title:I,children:w}):e.jsx(E,{to:"/mail/$mailboxId",params:{mailboxId:f},search:{q:void 0},onClick:()=>{y(f),M?.()},className:C,"aria-label":v,title:I,children:w}),l=()=>{m(""),s?.()},N=c.trim(),O=N.length>0&&!x.includes(N)?N:void 0,B=d.useCallback(()=>{O&&u(ys(O))},[O]),K=d.useCallback(f=>{u(js(f))},[]),Q=d.useCallback(f=>{m(f),r(f),s?.()},[m,r,s]);return e.jsx(ls,{accounts:j,selectedNavId:o,onSelectNav:l,linkComponent:S,variant:a,savedSearches:x,saveableQuery:O,onSaveCurrentSearch:B,onSelectSavedSearch:Q,onRemoveSavedSearch:K})}function ks(){return e.jsxs("button",{type:"button",onClick:Se,className:"flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm text-fg-muted transition-colors hover:bg-surface hover:text-fg",children:[e.jsx(ke,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Report a bug"})]})}function ws({accounts:t,onMailboxSelect:s}){return ye()?.showNavPane??!0?e.jsx(me,{accounts:t}):e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx(me,{accounts:t,onMailboxSelect:s,variant:"drawer"})}),e.jsxs("div",{className:"border-t border-line px-2 py-2",children:[e.jsxs(E,{to:"/settings/accounts",onClick:s,children:[e.jsx(Ie,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Settings"})]}),e.jsx(ks,{}),e.jsx(Me,{children:({signOut:r})=>e.jsxs("button",{type:"button",onClick:()=>{s?.(),r()},className:"flex min-h-11 w-full items-center gap-2 rounded-md px-2 py-1 text-sm text-fg-muted transition-colors hover:bg-surface hover:text-fg","data-testid":"sign-out-button",children:[e.jsx(we,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Sign out"})]})})]})]})}const Is=({isOpen:t,onClose:s})=>(et({id:"shortcuts",open:t,answers:{back:s}}),t?e.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[e.jsx(tt,{label:"Dismiss keyboard shortcuts",onDismiss:s,className:"backdrop-blur-sm"}),e.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Keyboard shortcuts",className:k("relative z-10 max-h-[85vh] w-full max-w-2xl overflow-y-auto","rounded-lg border border-line bg-surface shadow-lg","p-6"),children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Keyboard shortcuts"}),e.jsx("button",{type:"button",onClick:s,className:"p-1 text-fg-muted transition-colors hover:text-fg","aria-label":"Close",children:e.jsx(ve,{className:"size-5"})})]}),e.jsx("div",{className:"grid gap-x-8 gap-y-6 sm:grid-cols-2",children:It.map(a=>e.jsxs("div",{children:[e.jsx("h3",{className:"mb-3 text-sm font-medium text-fg-muted",children:a.title}),e.jsx("div",{className:"space-y-2",children:a.hints.map(n=>e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{className:"text-sm",children:n.description}),e.jsx("span",{className:"flex shrink-0 items-center gap-1",children:n.keys.map((r,o)=>e.jsxs(d.Fragment,{children:[o>0&&n.keys[0]==="g"&&e.jsx("span",{className:"text-2xs text-fg-subtle",children:"then"}),e.jsx(ne,{children:r})]},r))})]},`${n.action}-${n.keys.join("+")}`))})]},a.title))}),e.jsx("div",{className:"mt-6 border-t border-line pt-4",children:e.jsxs("p",{className:"text-center text-xs text-fg-muted",children:["Press ",e.jsx(ne,{children:"Esc"})," to close"]})})]})]}):null);function Ms(t){const s=Z({queries:t.map(a=>({...J({path:{accountId:a.accountId}}),staleTime:1/0}))});return d.useMemo(()=>Mt(s.map(a=>a.data?.items??[])),[s])}const Oe="remit:intelligence-open";function Os(){try{return localStorage.getItem(Oe)!=="closed"}catch{return!0}}function Rs(t){try{localStorage.setItem(Oe,t?"open":"closed")}catch{}}function xe({panels:t,prefersOpen:s,isDesktop:a,hasThread:n,raisedFor:r,openMessage:o}){return r!==null&&r===o?!0:t.length>0?t.includes("intelligence"):a&&n&&s}const Es=()=>{const t=Ce(),s=st(),a=at(),n=s.find(nt),r=Ot(),[o,c]=d.useState(Os),m=r?`${r.threadId}/${r.messageId??""}`:null,[x,u]=d.useState(null),b={panels:s,prefersOpen:o,isDesktop:t==="desktop",hasThread:r!==void 0,openMessage:m},p=xe({...b,raisedFor:x}),h=xe({...b,raisedFor:null}),i=d.useCallback((S,l)=>{a([...S?["intelligence"]:[],...l?[l]:[]])},[a]),g=d.useCallback(S=>{i(h,S)},[h,i]),j=d.useCallback(()=>{if(p&&!h){u(null);return}const S=!p;Rs(S),c(S),u(null),i(S,n)},[h,p,n,i]),y=d.useCallback(()=>{u(m)},[m]);return{openOverlay:n,intelligenceOpen:p,showOverlay:g,toggleIntelligence:j,raiseIntelligence:y}},Ps=t=>t.map(s=>s.data?.items??[]);function Ls(t){const s=Z({queries:t.map(a=>({...J({path:{accountId:a.accountId}}),staleTime:1/0})),combine:Ps});return d.useMemo(()=>rt(t.map((a,n)=>({folderAppointments:a.folderAppointments,mailboxes:s[n]??[]}))),[t,s])}var F={exports:{}},he;function As(){if(he)return F.exports;he=1;const t=(s,a,n)=>new Promise((r,o)=>{if(n=Object.assign({concurrency:1/0},n),typeof a!="function")throw new TypeError("Mapper function is required");const{concurrency:c}=n;if(!(typeof c=="number"&&c>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${c}\` (${typeof c})`);const m=[],x=s[Symbol.iterator]();let u=!1,b=!1,p=0,h=0;const i=()=>{if(u)return;const g=x.next(),j=h;if(h++,g.done){b=!0,p===0&&r(m);return}p++,Promise.resolve(g.value).then(y=>a(y,j)).then(y=>{m[j]=y,p--,i()},y=>{u=!0,o(y)})};for(let g=0;g<c&&(i(),!b);g++);});return F.exports=t,F.exports.default=t,F.exports}var Ts=As();const zs=ot(Ts),Fs=900*1e3,Ds=30,_s=(t,s)=>{if(!t)return s;const a=Number.parseInt(t,10);return Number.isFinite(a)&&a>0?a:s},Bs=30*1e3,Ks=t=>Math.max(_s(t,Ds)*1e3,Bs),Re=Ks(dt().mailboxPollIntervalSeconds),L=(t=Date.now(),s=Re)=>Qt(t)?Math.min(Vt,s):s,Qs=5,G=new Set,Vs=(t,s,a=Fs)=>t.filter(n=>{const r=n.lastSyncAt;return r==null?!0:s-r>a}).map(n=>n.accountId),Hs=(t,s,a=Re)=>t-s>=a,qs=(t,s)=>t.filter(a=>!s.has(a)),fe=(t,s)=>{if(G.delete(t),ct(s,{softError:!0},"nobody")){ut(s);return}console.warn("[remit] background mailbox sync failed",{accountId:t,error:s})},pe=(t,s)=>it({path:{accountId:t},throwOnError:!0}).then(()=>{s.invalidateQueries({queryKey:lt({path:{accountId:t}})})}),$s=t=>{const s=Y(),a=d.useRef(t);a.current=t;const n=t.map(r=>r.accountId).join(",");d.useEffect(()=>{const r=Date.now(),c=Vs(a.current,r).filter(m=>!G.has(m));if(c.length!==0)for(const m of c)G.add(m),pe(m,s).catch(x=>{fe(m,x)})},[n,s]),d.useEffect(()=>{let r=Date.now(),o;const c=new Set,m=()=>{r=Date.now();const h=qs(a.current.map(i=>i.accountId),c);for(const i of h)c.add(i);zs(h,i=>pe(i,s).catch(g=>{fe(i,g)}).finally(()=>{c.delete(i)}),{concurrency:Qs})},x=()=>{if(document.visibilityState==="visible"){m(),o=setTimeout(x,L());return}},u=()=>{document.visibilityState==="visible"&&Hs(Date.now(),r,L())&&(o!==void 0&&clearTimeout(o),m(),o=setTimeout(x,L()))},b=()=>{document.visibilityState==="visible"&&(o!==void 0&&clearTimeout(o),r=Date.now(),o=setTimeout(x,L()))};o=setTimeout(x,L()),document.addEventListener("visibilitychange",u);const p=Kt(b);return()=>{o!==void 0&&clearTimeout(o),document.removeEventListener("visibilitychange",u),p()}},[n,s])};function fa(){const t=mt(),s=Ce(),a=Pt(s),{openOverlay:n,intelligenceOpen:r,showOverlay:o,toggleIntelligence:c,raiseIntelligence:m}=Es(),x=n==="shortcuts",u=n==="nav",{searchInput:b,committedQuery:p,viewKey:h,setSearchInput:i}=hs(),{data:g,isLoading:j,isError:y,error:S,refetch:l}=Ne({...xt(),staleTime:1/0}),N=!!(g&&(g.accounts?.length??0)===0);d.useEffect(()=>{N&&t({to:"/onboarding",replace:!0})},[N,t]),Wt({enabled:!x,bindings:[{key:"?",action:"help",handler:()=>o("shortcuts"),noModifiers:!1,preventDefault:!0}]});const O=X(),B=Lt(),K=U({select:q=>ht(q.matches)?.list==="mailbox"}),Q=d.useMemo(()=>({compose:O}),[O]);Rt({enabled:!K&&!B,handlers:Q});const f=d.useCallback(()=>{i("")},[i]),C=d.useCallback(()=>{i("")},[i]),v=g?.accounts??[],I=d.useMemo(()=>v.map(q=>q.accountId),[v]),w=Ms(v),M=Ls(v),V=d.useMemo(()=>Et(v),[v]);$s(v);const H=d.useCallback(()=>{n==="nav"&&o(void 0)},[n,o]),T={accounts:v,mailboxNameIndex:w,accountNameIndex:V,resultFolderIndex:M,searchQuery:p,searchInput:b,searchViewKey:h,onSearchChange:i,onSearchClear:f,onSearchClearQuery:C,intelligenceOpen:r,onToggleIntelligence:c,onRaiseIntelligence:m},Ee={isSinglePane:a,isLoading:j||N,intelligenceOpen:r,nav:e.jsx(ws,{accounts:v,onMailboxSelect:H}),topBar:a?void 0:e.jsx(bs,{accounts:v}),overlay:a?e.jsx(fs,{}):void 0,navOpen:u,onOpenNav:()=>o("nav"),onCloseNav:()=>o(void 0)};return e.jsx(ft.Provider,{value:T,children:e.jsxs(Ht,{accountIds:I,children:[y?e.jsx("div",{className:"flex h-full items-center justify-center bg-canvas p-4",children:e.jsx(Yt,{title:"Couldn't load your account",error:S,onRetry:()=>{l()}})}):e.jsx(Ft,{chrome:Ee,children:e.jsx(pt,{})}),e.jsx(Is,{isOpen:x,onClose:()=>o(void 0)})]})})}export{fa as component,je as useMailContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./index-
|
|
1
|
+
import{c as e}from"./index-DazNGXXJ.js";const a=e("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);export{a as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./index-
|
|
1
|
+
import{c as e}from"./index-DazNGXXJ.js";const n=e("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);export{n as M};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a6 as n,a7 as r,w as a,r as i,j as s}from"./index-
|
|
1
|
+
import{a6 as n,a7 as r,w as a,r as i,j as s}from"./index-DazNGXXJ.js";import{O as c}from"./OnboardingWizard-DpyAj2p8.js";import"./kbd-r0sak2_Y.js";import"./account-form-helpers-DhckT_PN.js";import"./mail-aJo6bnGe.js";async function m(e){e.recordCompleted(),await e.queryClient.refetchQueries({queryKey:n()}),e.navigateToInbox()}function C(){const e=r(),o=a(),t=i.useCallback(l=>{m({queryClient:o,recordCompleted:()=>e.recordEvent("onboarding.completed"),navigateToInbox:()=>{window.location.assign("/mail")}})},[e,o]);return s.jsx(c,{skipWelcome:!1,onComplete:t})}export{C as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o,a5 as i}from"./index-DazNGXXJ.js";import{a as m}from"./MailShell-DL8UOD47.js";import{u as p,O as t}from"./OutboxPane-B4PWORx7.js";import{u as s}from"./search-mirror-59AW-Rtk.js";import"./FullCompose-Cl0FqWeX.js";import"./ErrorState-BB9MY89J.js";import"./index-CoW2cwCm.js";import"./useMessageBodyContent-aHJCFwNy.js";import"./useSignature-D7Bg3B3Y.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-DE5ruYcg.js";import"./format-BwY6euDc.js";import"./confirm-dialog-DVwz0TFh.js";import"./useSearchTokenContext-BTCBknjU.js";import"./kbd-r0sak2_Y.js";import"./search-scope-DTcpOp3S.js";import"./circle-check-big-ClvDL1Sb.js";import"./clock-B8ngkj5W.js";import"./row-actions-CXpl2oFP.js";import"./rotate-ccw-CHdUOytq.js";import"./NavMenuButton-JNFq1cbX.js";import"./menu-DqpXTxWI.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function q(){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{q as component};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./index-
|
|
1
|
+
import{c as a}from"./index-DazNGXXJ.js";const c=a("Pencil",[["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"}]]);export{c as P};
|