@remit/web-client-dist 0.0.573 → 0.0.575
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-DTwqpehY.js → BriefPane-BZSeh1_P.js} +1 -1
- package/assets/{CalendarComposePane-DMpEx0pI.js → CalendarComposePane-Ca_uB60w.js} +1 -1
- package/assets/{CalendarComposeSeed-DoaW4DQP.js → CalendarComposeSeed-CuKeaazc.js} +1 -1
- package/assets/{CalendarShell-Do67E4cT.js → CalendarShell-DwhXbKOQ.js} +1 -1
- package/assets/{EmptyState-B51IVrJy.js → EmptyState-Crr_wo4g.js} +1 -1
- package/assets/{ErrorState-DsBtijJZ.js → ErrorState-B7Uz3OUw.js} +1 -1
- package/assets/FlaggedPane-CGbLmaYD.js +1 -0
- package/assets/{FullCompose-utRdyTob.js → FullCompose-UVcGYRtP.js} +1 -1
- package/assets/{MailListHeader-CDRRsdUl.js → MailListHeader-GZJaonoO.js} +2 -2
- package/assets/MailNav-DXcpue8K.js +1 -0
- package/assets/MailShell-DCQ05YEI.js +1 -0
- package/assets/{MailViewChrome-wm5gxQlP.js → MailViewChrome-BxNy64OY.js} +1 -1
- package/assets/{MailboxPane-CU_5z2WT.js → MailboxPane-gwKO47qN.js} +1 -1
- package/assets/{NavMenuButton-CNrrDR3O.js → NavMenuButton-CNkLDgVq.js} +1 -1
- package/assets/{OnboardingWizard-BGI6h1dq.js → OnboardingWizard-6RYqA1HD.js} +1 -1
- package/assets/{OpenCalendarEvent-CmcmB0nH.js → OpenCalendarEvent-Bo6GH3E3.js} +1 -1
- package/assets/{OutboxPane-Ceq0teEA.js → OutboxPane-DiFf3Cpa.js} +1 -1
- package/assets/_calendarObjectId-CtM9rWXc.js +1 -0
- package/assets/_mailboxId-Bf7Muwu1.js +1 -0
- package/assets/_messageId-D8n9llYa.js +1 -0
- package/assets/_messageId-DhqgM7-b.js +1 -0
- package/assets/_messageId-jj7xdNq4.js +1 -0
- package/assets/_outboxMessageId-Bw2WYQhj.js +1 -0
- package/assets/_recurrenceId-DvPlEXJg.js +1 -0
- package/assets/_threadId-BlVBeuEJ.js +1 -0
- package/assets/_threadId-CwrS6Taz.js +1 -0
- package/assets/_threadId-Y-tYuCOz.js +1 -0
- package/assets/{_view._date-D2dzzddn.js → _view._date-DeJ0_NYm.js} +1 -1
- package/assets/{accounts-Bwc0Mtjk.js → accounts-kiCQIjlD.js} +1 -1
- package/assets/{advanced-g_NpRk9w.js → advanced-D8-S9Ujp.js} +2 -2
- package/assets/{appearance-B-nHL9E4.js → appearance-BdHvDbzw.js} +1 -1
- package/assets/{attachment-file-D4ltwNwP.js → attachment-file-CeU5SZlG.js} +1 -1
- package/assets/{attendee-row-CGWfa3DU.js → attendee-row-BrckLld0.js} +1 -1
- package/assets/{avatar-kb7BRIj-.js → avatar-DqJEZOc2.js} +1 -1
- package/assets/{bottom-sheet-EOczQGoU.js → bottom-sheet-BXlzY1Jg.js} +1 -1
- package/assets/{brief-zbb8u79R.js → brief-CI0NrOLN.js} +1 -1
- package/assets/brief-DRGJw1ce.js +1 -0
- package/assets/{browser-ponyfill-sEWMPSAy.js → browser-ponyfill-DCJ2lXBn.js} +1 -1
- package/assets/{bug-CIR5aOCb.js → bug-1VjuxotP.js} +1 -1
- package/assets/{calendar-D48jm-2O.js → calendar-DWpn337P.js} +1 -1
- package/assets/{calendar-color-C9vd3NQU.js → calendar-color-Dk7-rom2.js} +1 -1
- package/assets/{calendar-event-chip-BBHc41iQ.js → calendar-event-chip-BNPo7QJc.js} +1 -1
- package/assets/{calendars-evJ97TLb.js → calendars-CDN5QubH.js} +1 -1
- package/assets/{card-Yo3XEg6b.js → card-DmgL_z2r.js} +1 -1
- package/assets/chevron-left-Bl_9xhE3.js +1 -0
- package/assets/{circle-check-TN2pLSAm.js → circle-check-DWChrB99.js} +1 -1
- package/assets/{circle-check-big-Li9WrqhW.js → circle-check-big-ChFngeN-.js} +1 -1
- package/assets/{circle-help-6lT0PZTp.js → circle-help-Dhtxjp8K.js} +1 -1
- package/assets/{clock-BZGi8qZp.js → clock-NcVmSDw3.js} +1 -1
- package/assets/compose._-_outboxMessageId_-Bgca6-rg.js +1 -0
- package/assets/compose._-_outboxMessageId_-CMM9adTi.js +1 -0
- package/assets/compose._-_outboxMessageId_-Dzfd4We5.js +1 -0
- package/assets/compose._-_outboxMessageId_-PT5xhm1U.js +1 -0
- package/assets/{config-import-BIsND89q.js → config-import-CuDvXNAj.js} +1 -1
- package/assets/{confirm-dialog-BP0RGVB7.js → confirm-dialog-CRf17_dR.js} +1 -1
- package/assets/{copy-CSMTIGQ5.js → copy-B8kfV-5h.js} +1 -1
- package/assets/{credential-steps-_Bfnkria.js → credential-steps-DQDKTl1P.js} +1 -1
- package/assets/{download-CkEmIWry.js → download-B-j3cLXr.js} +1 -1
- package/assets/{file-json-CGnHrwAf.js → file-json-f7lUVpB0.js} +1 -1
- package/assets/{filters-BLKSR6Xv.js → filters-CuFg-zVp.js} +1 -1
- package/assets/{flagged-CRLrZAGU.js → flagged-BW4PCz1U.js} +1 -1
- package/assets/flagged-EIDAeYrY.js +1 -0
- package/assets/{folders-NXbZhYVt.js → folders-DrlCDBR0.js} +1 -1
- package/assets/{help-copy-BnfXul_l.js → help-copy-Cp0ii5ZG.js} +1 -1
- package/assets/{import-CtxU-anM.js → import-DZo6etbe.js} +1 -1
- package/assets/index--K6bWCUX.js +1 -0
- package/assets/index-B1PlR5qP.js +1 -0
- package/assets/index-C1CDUqy0.js +1 -0
- package/assets/index-CeMnGzb8.js +1 -0
- package/assets/{index-CLDSMpwb.js → index-CgRBctxF.js} +4 -4
- package/assets/{index-Pa-PXhYt.js → index-CtDK-rUL.js} +4 -4
- package/assets/index-D-5sCFGk.js +1 -0
- package/assets/index-DhqgM7-b.js +1 -0
- package/assets/index-DmN1pqRc.js +1 -0
- package/assets/{index-CGoUhxLl.js → index-DuCYk8I7.js} +1 -1
- package/assets/index-gbMu2DOq.js +1 -0
- package/assets/index-jj7xdNq4.js +1 -0
- package/assets/{index-BqWgpRnh.css → index-nHfgj6E6.css} +1 -1
- package/assets/{kbd-BptaoNeb.js → kbd-DYG4YL2J.js} +1 -1
- package/assets/{labels-CEry7JP8.js → labels-DA6rGhnu.js} +1 -1
- package/assets/{mail-CUfpnKmW.js → mail-YM6mktcB.js} +1 -1
- package/assets/{mail-B9R0LNya.js → mail-lrrMXFaf.js} +1 -1
- package/assets/{map-pin-BAQN6x3n.js → map-pin-BqC83mp0.js} +1 -1
- package/assets/{menu-C_ItFy3L.js → menu-BY7l5ISZ.js} +1 -1
- package/assets/{new-Dh-2Su8H.js → new-DvoRMoIH.js} +1 -1
- package/assets/onboarding-DItxoxc-.js +1 -0
- package/assets/{onboarding-completion-B5FZtUux.js → onboarding-completion-DheSz3fX.js} +1 -1
- package/assets/outbox-Luwp5E9E.js +1 -0
- package/assets/{pencil-wopYA3tK.js → pencil-xMILJXp4.js} +1 -1
- package/assets/{refresh-cw-WQWjOiDL.js → refresh-cw-CjSWrnbp.js} +1 -1
- package/assets/{rich-text-D5ePDD9m.js → rich-text-CCo_PHtN.js} +1 -1
- package/assets/{rich-text-spellcheck-worker-provider-CWZtLN7v.js → rich-text-spellcheck-worker-provider-CtR9BGmx.js} +1 -1
- package/assets/{rotate-ccw-BGnoQrsd.js → rotate-ccw-Sjm0eEVU.js} +1 -1
- package/assets/{roving-focus-xdT_hFx-.js → roving-focus-BmcOTfQH.js} +1 -1
- package/assets/{row-actions-CPjrTXH5.js → row-actions-wXeetJg1.js} +1 -1
- package/assets/{search-mirror-D9T_QTSg.js → search-mirror-B-WKIBfj.js} +1 -1
- package/assets/search-token-index-Ctvtvdxh.js +1 -0
- package/assets/{sections-BbwJeaVs.js → sections-XY0TLwWE.js} +1 -1
- package/assets/{senders-VOON1QUW.js → senders-C9c2W8GP.js} +1 -1
- package/assets/settings-QKdBE18m.js +1 -0
- package/assets/{settings-screen-CJlF_Cuc.js → settings-screen-b2FwvMR5.js} +1 -1
- package/assets/{shield-check-CdBctVu5.js → shield-check-CvQ5fkxu.js} +1 -1
- package/assets/suggested-vips-BN0O4ZGD.js +1 -0
- package/assets/{useCalendarData-C2bHSfW2.js → useCalendarData-Cfp0wzD7.js} +1 -1
- package/assets/{useCalendars-300H4qIk.js → useCalendars-DCsqcGnt.js} +1 -1
- package/assets/{useDebouncedValue-B17cbPWx.js → useDebouncedValue-ubaj0ElM.js} +1 -1
- package/assets/{useFilters-EUeKL3LS.js → useFilters-CWi4lu2c.js} +1 -1
- package/assets/{useLabels-DXD0xTLQ.js → useLabels-CJLc84td.js} +1 -1
- package/assets/useLayoutTier-qcMzR38l.js +1 -0
- package/assets/{useMessageBodyContent-CqnK7vFx.js → useMessageBodyContent-DJk15jWJ.js} +1 -1
- package/assets/{useQueries-DLtTi8je.js → useQueries-DLmJ_42r.js} +1 -1
- package/assets/useRefreshControl-CQESaa55.js +1 -0
- package/assets/{useResultFolderIndex-Bl-t2uo0.js → useResultFolderIndex-A39fN0F2.js} +1 -1
- package/assets/{useSearchTokenContext-sk7n5_Wa.js → useSearchTokenContext-CTOz94Vy.js} +1 -1
- package/assets/{useSemanticSearch-681BpGBX.js → useSemanticSearch-BVL53qLC.js} +1 -1
- package/assets/{useSignature-DL3dYCSH.js → useSignature-C9tzKkLM.js} +1 -1
- package/assets/{window-vYbNZDbX.js → window-BYSthmnI.js} +1 -1
- package/index.html +2 -2
- package/package.json +1 -1
- package/assets/FlaggedPane-CeJ0lxX3.js +0 -1
- package/assets/MailNav-Ded5OdRB.js +0 -1
- package/assets/MailShell-K5p0Mrz6.js +0 -1
- package/assets/_calendarObjectId-DFvXD3oD.js +0 -1
- package/assets/_mailboxId-DO4UDB0V.js +0 -1
- package/assets/_messageId-CD4CJfdP.js +0 -1
- package/assets/_messageId-DVrmsl_R.js +0 -1
- package/assets/_messageId-DzX5ZoqJ.js +0 -1
- package/assets/_outboxMessageId-cGQVIcu3.js +0 -1
- package/assets/_recurrenceId-Dza4TSyq.js +0 -1
- package/assets/_threadId-B8z8oIj7.js +0 -1
- package/assets/_threadId-BXUkLXRD.js +0 -1
- package/assets/_threadId-CrdBXGOB.js +0 -1
- package/assets/brief-D1dcKREw.js +0 -1
- package/assets/chevron-left-CvKqvS9_.js +0 -1
- package/assets/compose._-_outboxMessageId_-8EaZCr-h.js +0 -1
- package/assets/compose._-_outboxMessageId_-BprdGL3E.js +0 -1
- package/assets/compose._-_outboxMessageId_-C3bxz31s.js +0 -1
- package/assets/compose._-_outboxMessageId_-CRcTV4_X.js +0 -1
- package/assets/flagged-5xYQDOCL.js +0 -1
- package/assets/index-CD4CJfdP.js +0 -1
- package/assets/index-CSl21pmh.js +0 -1
- package/assets/index-CsIM9j-Q.js +0 -1
- package/assets/index-DVrmsl_R.js +0 -1
- package/assets/index-DYgX7tdP.js +0 -1
- package/assets/index-Da-HpnDm.js +0 -1
- package/assets/index-TJzptkez.js +0 -1
- package/assets/index-ifhhvbnN.js +0 -1
- package/assets/index-rT6iKaqw.js +0 -1
- package/assets/onboarding-C5Ly9snk.js +0 -1
- package/assets/outbox-B0uqNR7a.js +0 -1
- package/assets/search-token-index-DH9ZHWHu.js +0 -1
- package/assets/settings-BdLYbmQe.js +0 -1
- package/assets/suggested-vips-D0pthKMY.js +0 -1
- package/assets/useLayoutTier-CqqMDWMQ.js +0 -1
- package/assets/useRefreshControl-YILSa993.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,u as S,cj as O,ck as B,
|
|
1
|
+
import{r as c,u as S,cj as O,ck as B,a9 as h,cl as N,q as P,ab as U,h as $,c as D,cG as F,cH as v}from"./index-CtDK-rUL.js";const R="/mail/brief/compose/{-$outboxMessageId}",w="/mail/flagged/compose/{-$outboxMessageId}",E="/mail/outbox/compose/{-$outboxMessageId}",k="/mail/$mailboxId/compose/{-$outboxMessageId}";function T(){const e=h({from:R,shouldThrow:!1}),t=h({from:w,shouldThrow:!1}),r=h({from:E,shouldThrow:!1}),s=h({from:k,shouldThrow:!1});return e??t??r??s}function z(){return T()!==void 0}function Y(){return T()?.outboxMessageId}function L(e,t,r){return e==="flagged"?{to:w,params:{outboxMessageId:r}}:e==="outbox"?{to:E,params:{outboxMessageId:r}}:e==="mailbox"&&t?{to:k,params:{mailboxId:t,outboxMessageId:r}}:{to:R,params:{outboxMessageId:r}}}function g(){const e=S(),t=O(),{list:r,mailboxId:s}=B();return c.useCallback((n,o)=>{e({...L(r,s,n),search:a=>a,hash:o?.keepPanels?!0:t,replace:o?.replace??!1})},[e,t,r,s])}function J(){const e=g();return c.useCallback(()=>e(void 0),[e])}function V(){const e=g();return c.useCallback(t=>e(t),[e])}function Z(){const e=g();return c.useCallback(t=>e(t,{replace:!0,keepPanels:!0}),[e])}function ee(){return N()}const _=e=>{const t=e.filter(n=>!n.isMultipart&&n.disposition!=="attachment"&&n.mediaType==="TEXT"&&n.contentUrl.length>0),r=t.find(n=>n.mediaSubtype.toUpperCase()==="HTML");if(r)return{kind:"html",contentUrl:r.contentUrl};const s=t.find(n=>n.mediaSubtype.toUpperCase()==="PLAIN");return s?{kind:"text",contentUrl:s.contentUrl}:null},b={all:["messages"],detail:e=>[...b.all,"detail",e],body:e=>[...b.detail(e),"body"]};class f extends Error{reason;status;retryAfterSeconds;constructor(t,r,s,n){super(r),this.name="BodyFetchError",this.reason=t,this.status=s,this.retryAfterSeconds=n}}const q=e=>{const t=Number.parseInt(e??"",10);return!Number.isFinite(t)||t<=0?1:Math.min(t,30)},K=8,Q="x-remit-403-reason",I=(e,t)=>{const r=t?.trim()??"";return e===401?"auth":e===403?r.length>0?"auth":"body-missing":e===404?"body-missing":"generic"},X=(e,t)=>(t??"").toLowerCase().startsWith("text/html")?/<div\s+id=["']root["']/i.test(e):!1,G=(e,t)=>{const r=(t??"").toLowerCase();return!!(e==="text"&&r.startsWith("text/html"))},H=async(e,t,r=async()=>null)=>{const s={},n=await r();n&&(s.Authorization=`Bearer ${n}`);const o=await v(e,{headers:s});if(o.status===202)throw new f("not-ready","Message body is still syncing",202,q(o.headers.get("Retry-After")));if(!o.ok){const l=o.headers.get(Q),y=I(o.status,l);throw new f(y,`Failed to load message body (${o.status} ${o.statusText})`,o.status)}const a=o.headers.get("content-type");if(G(t,a))throw new f("content-type-mismatch",`Refusing to render message body — expected ${t}, got Content-Type ${a}`);const m=await o.text();if(X(m,a))throw new f("spa-shell-leak","Refusing to render message body — response looks like the SPA shell (CloudFront 403/404 fallback leaked through to /content/*)");return m},W=async(e,t)=>(t.isRetryAfterNotReady&&await e.refetchDescribeMessage(),e.fetchContent(t.contentUrl,t.kind)),te=({messageId:e,bodyParts:t,enabled:r=!0})=>{const s=t?_(t):null,n=P(),{getToken:o}=U(),a=c.useRef(null),m=$(),l=c.useRef(!1),y=c.useRef(null),C=e&&s?`${e}:${s.contentUrl}`:null;y.current!==C&&(y.current=C,l.current=!1);const i=D({queryKey:e?[...b.body(e),s?.contentUrl??null]:["messages","body","noop"],queryFn:()=>{if(!s)throw new Error("No renderable body part");if(!e)throw new Error("No messageId");const d=l.current;return l.current=!1,W({fetchContent:(u,M)=>H(u,M,o),refetchDescribeMessage:()=>m.refetchQueries({queryKey:F({path:{messageId:e}})})},{contentUrl:s.contentUrl,kind:s.kind,isRetryAfterNotReady:d})},enabled:r&&!!e&&!!s,staleTime:300*1e3,gcTime:1800*1e3,retry:(d,u)=>u instanceof f&&u.reason==="not-ready"?d<K:d<1,retryDelay:(d,u)=>u instanceof f&&u.reason==="not-ready"?(l.current=!0,(u.retryAfterSeconds??1)*1e3):1e3,meta:{softError:!0}}),p=i.isLoading&&!!s,x=t!==void 0&&s===null;c.useEffect(()=>{p&&(a.current=performance.now())},[p]),c.useEffect(()=>{i.isSuccess&&a.current!==null&&(n.recordTiming("message.body.load",Math.round(performance.now()-a.current)),a.current=null)},[i.isSuccess,n]);const A=i.data&&s?{kind:s.kind,body:i.data}:void 0;return{picked:s,data:A,isLoading:p,hasNoRenderablePart:x,isError:i.isError,error:i.error,refetch:i.refetch}};export{f as B,z as a,te as b,Y as c,Z as d,ee as e,V as f,I as g,J as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b$ as Q,c0 as y,c1 as S,c2 as w,c3 as C,h as k,c4 as q,c5 as x,r as p,c6 as M,c7 as H,c8 as L,c9 as P,ca as O,cb as B,cc as A}from"./index-
|
|
1
|
+
import{b$ as Q,c0 as y,c1 as S,c2 as w,c3 as C,h as k,c4 as q,c5 as x,r as p,c6 as M,c7 as H,c8 as L,c9 as P,ca as O,cb as B,cc as A}from"./index-CtDK-rUL.js";function R(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function T(r,e,s){const t=r.slice(0);return t[e]=s,t}var z=class extends Q{#i;#e;#n;#r;#s;#t;#o;#u;#h;#c=[];constructor(r,e,s){super(),this.#i=r,this.#r=s,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(r=>{r.subscribe(e=>{this.#d(r,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(r=>{r.destroy()})}setQueries(r,e){this.#n=r,this.#r=e,y.batch(()=>{const s=this.#s,t=this.#f(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=s.length!==i.length,a=i.some((o,d)=>o!==s[d]),f=u||a,b=f?!0:n.some((o,d)=>{const g=this.#e[d];return!g||!S(o,g)});!f&&!b||(f&&(this.#c=t,this.#s=i),this.#e=n,this.hasListeners()&&(f&&(R(s,i).forEach(o=>{o.destroy()}),R(i,s).forEach(o=>{o.subscribe(d=>{this.#d(o,d)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#f(r),t=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,e,i),()=>this.#a(t,s)]}#a(r,e){return e.map((s,t)=>{const i=r[t];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,e,s){if(e){const t=this.#h,i=s!==void 0&&t!==void 0&&(t.length!==s.length||s.some((n,u)=>n!==t[u]));return(!this.#t||this.#e!==this.#u||i||e!==this.#o)&&(this.#o=e,this.#u=this.#e,s!==void 0&&(this.#h=s),this.#t=w(this.#t,e(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#f(r){const e=new Map;this.#s.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(t):e.set(i,[t])});const s=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=e.get(i.queryHash)?.shift()??new C(this.#i,i);s.push({defaultedQueryOptions:i,observer:u})}),s}#d(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=T(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const r=this.#a(this.#e,this.#c),e=this.#b(),s=this.#t,t=e?s:this.#l(r,this.#r?.combine);(e||s!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function U({queries:r,...e},s){const t=k(),i=q(),n=x(),u=p.useMemo(()=>r.map(h=>{const c=t.defaultQueryOptions(h);return c._optimisticResults=i?"isRestoring":"optimistic",c}),[r,t,i]);u.forEach(h=>{M(h);const c=t.getQueryCache().get(h.queryHash);H(h,n,c)}),L(n);const[a]=p.useState(()=>new z(t,u,e)),[f,b,o]=a.getOptimisticResult(u,e.combine),d=!i&&e.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>d?a.subscribe(y.batchCalls(h)):P,[a,d]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setQueries(u,e)},[u,e,a]);const m=f.some((h,c)=>O(u[c],h))?f.flatMap((h,c)=>{const l=u[c];if(l&&O(l,h)){const E=new C(t,l);return B(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=f.find((h,c)=>{const l=u[c];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{U as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as E,a0 as K,t as Q,f as U,r as o,aP as R,h as T,C as $,E as z,F as B,q as G,P as I,Q as X,R as V,S as J}from"./index-CtDK-rUL.js";import{C as Y}from"./circle-check-big-ChFngeN-.js";import{R as Z}from"./refresh-cw-CjSWrnbp.js";import{u as N}from"./useQueries-DLmJ_42r.js";function ye({state:e,onRefresh:s,label:t,errorMessage:n,hasUpdate:a,size:u="sm",className:c}){const i=e==="refreshing",r=e==="error",h=e==="success",S=r?E.jsx(K,{className:"size-4 text-danger"}):h?E.jsx(Y,{className:"size-4 text-positive"}):E.jsx(Z,{className:Q("size-4",i&&"animate-spin")}),w=r?`${t} — failed: ${n??"try again"}`:i?`${t} — refreshing`:h?`${t} — up to date`:a?`${t} — new mail`:t;return E.jsxs("div",{className:"relative inline-flex",children:[E.jsx(U,{variant:"ghost",size:u,icon:S,onClick:s,disabled:i,"aria-label":w,"aria-busy":i||void 0,title:r?n:t,className:c}),e==="idle"&&a&&E.jsx("span",{"aria-hidden":"true",className:"absolute right-1 top-1 size-1.5 rounded-full bg-accent-2"})]})}const ee=new Set(["discovering_mailboxes","syncing_inbox","syncing_others"]);function L(e){return!!e&&ee.has(e)}const F=3e3,te=F*2,C={syncing:!1,resolved:!1,synced:0,total:0};function we(e,s){const t=e.join(","),[n,a]=o.useState(!1),[u,c]=o.useState(!1);o.useEffect(()=>{a(!1),c(!1)},[t,s]),o.useEffect(()=>{if(!s)return;const m=setTimeout(()=>c(!0),te);return()=>clearTimeout(m)},[t,s]);const i=N({queries:e.map(m=>({...R({path:{accountId:m}}),enabled:s&&!n,refetchInterval:F,meta:{softError:!0}}))}),r=i.every(m=>m.isSuccess||m.isError),h=i.length===0||r||u;let S=!1,w=0,y=0;for(const m of i)if(L(m.data?.syncPhase)){S=!0;for(const l of m.data?.mailboxes??[])w+=l.messagesSynced,y+=l.messagesTotal}const x=s&&h&&!S;return o.useEffect(()=>{x&&a(!0)},[x]),!s||!h?C:{syncing:S,resolved:!0,synced:w,total:y}}const se=180*1e3,xe=30*1e3;let q=0;const M=new Set,re=(e=Date.now())=>{q=e+se;for(const s of M)s()},pe=(e=Date.now())=>e<q,Ee=e=>(M.add(e),()=>{M.delete(e)}),_=6e4,ne=new Set(["sent","drafts","trash","archive"]),O=(e,s)=>{const t=new Map;for(const n of e){const a=s.get(n.mailboxId)?.role;a&&ne.has(a)||t.set(n.mailboxId,n.highWaterMarkUid)}return t},j=(e,s)=>{const t=[];for(const[n,a]of s)a>(e.get(n)??0)&&t.push(n);return t},oe=(e,s)=>j(e,s).length>0,D=o.createContext(null),ae=()=>{const e=o.useContext(D);if(!e)throw new Error("useMailFreshness must be used inside <MailFreshnessProvider>");return e};function be({accountIds:e,children:s}){const t=T(),{resultFolderIndex:n}=$(),a=o.useRef(new Map),u=o.useRef(new Set),c=o.useRef(new Map),[i,r]=o.useState(new Set),h=N({queries:e.map(l=>({...R({path:{accountId:l}}),refetchInterval:_,staleTime:_,meta:{softError:!0}}))}),S=h.map(l=>l.dataUpdatedAt).join(","),w=e.join(",");o.useEffect(()=>{let l=!1;const f=new Set(i);e.forEach((d,p)=>{const b=h[p]?.data;if(!b)return;const g=O(b.mailboxes??[],n),v=c.current.get(d);if(c.current.set(d,g),v){const A=j(v,g);A.length>0&&z(t,B(A))}if(!u.current.has(d)){u.current.add(d),a.current.set(d,g);return}if(f.has(d))return;const W=a.current.get(d)??new Map;oe(W,g)&&(f.add(d),l=!0)}),l&&r(f)},[w,S]);const y=o.useCallback(l=>l.some(f=>i.has(f)),[i]),x=o.useCallback(l=>{r(f=>{if(l.every(p=>!f.has(p)))return f;const d=new Set(f);for(const p of l)d.delete(p);return d});for(const f of l){const d=t.getQueryData(R({path:{accountId:f}}).queryKey);a.current.set(f,O(d?.mailboxes??[],n)),u.current.add(f)}},[t,n]),m=o.useMemo(()=>({hasNewMail:y,acknowledge:x}),[y,x]);return E.jsx(D.Provider,{value:m,children:s})}const ie=2e3,ce=45e3,ue=e=>new Promise(s=>setTimeout(s,e)),k=e=>e instanceof Error&&e.message?e.message:"Something went wrong",le=e=>{V(e,{softError:!0},"user")&&J(e)},P=(e,s)=>e.fetchQuery({...R({path:{accountId:s}}),staleTime:0}),H=e=>e.mailboxes?.find(s=>s.fullPath?.toUpperCase()==="INBOX")?.lastSyncedAt??0,fe=async({accountId:e,readStatus:s,baselineLastSyncAt:t,baselineInboxSyncedAt:n=0,onInboxSynced:a,deadline:u,pollMs:c=ie})=>{let i=!1;for(;;){const r=await s().then(y=>({ok:!0,data:y})).catch(y=>({ok:!1,error:y}));if(!r.ok)return{accountId:e,message:k(r.error)};const{syncPhase:h,lastSyncAt:S}=r.data;if((S??0)>t&&!L(h))return h==="error"?{accountId:e,message:"Sync failed for this account"}:void 0;if(!i&&H(r.data)>n&&(i=!0,a?.()),Date.now()>=u)return{accountId:e,message:"Refresh is taking longer than usual"};await ue(c)}},de=async(e,s,t,n,a)=>{const u=await P(e,t).then(r=>({ok:!0,lastSyncAt:r.lastSyncAt??0,inboxSyncedAt:H(r)})).catch(r=>({ok:!1,error:r}));if(!u.ok)return{accountId:t,enqueued:!1,ok:!1,message:k(u.error)};const c=await I({path:{accountId:t},throwOnError:!0}).then(()=>({ok:!0})).catch(r=>({ok:!1,error:r}));if(!c.ok)return le(c.error),{accountId:t,enqueued:!1,ok:!1,message:k(c.error)};s.recordEvent("sync.triggered");const i=await fe({accountId:t,readStatus:()=>P(e,t),baselineLastSyncAt:u.lastSyncAt,baselineInboxSyncedAt:u.inboxSyncedAt,onInboxSynced:()=>a(t),deadline:n});return i?{accountId:t,enqueued:!0,ok:!1,message:i.message}:{accountId:t,enqueued:!0,ok:!0}},Re=(e,s={})=>{const t=T(),n=G(),{acknowledge:a}=ae(),[u,c]=o.useState("idle"),[i,r]=o.useState(),h=o.useRef(0),S=o.useRef(e);S.current=e;const w=o.useRef(s);w.current=s,o.useEffect(()=>{if(u!=="success")return;const x=setTimeout(()=>c("idle"),2e3);return()=>clearTimeout(x)},[u]);const y=o.useCallback(()=>{const x=S.current;if(x.length===0){c("error"),r("Nothing to refresh yet");return}const m=++h.current;c("refreshing"),r(void 0),re();const l=f=>{h.current===m&&(t.invalidateQueries({queryKey:X({path:{accountId:f}})}),w.current.onSettled?.())};(async()=>{const f=Date.now()+ce,d=await Promise.all(x.map(g=>de(t,n,g,f,l)));if(h.current!==m)return;const p=d.filter(g=>g.enqueued).map(g=>g.accountId);for(const g of p)l(g);p.length>0&&a(p);const b=d.filter(g=>!g.ok);b.length===0?c("success"):(c("error"),r(b[0]?.message))})()},[a,t,n]);return{state:u,errorMessage:i,refresh:y}};export{xe as H,be as M,ye as R,Re as a,L as b,we as c,pe as i,Ee as s,ae as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{K as r,r as s,
|
|
1
|
+
import{K as r,r as s,b5 as t}from"./index-CtDK-rUL.js";import{u as m}from"./useQueries-DLmJ_42r.js";const a=i=>({items:i.map(e=>e.data?.items??[]),isPending:i.some(e=>e.isPending),error:i.find(e=>e.error)?.error??null});function u(i){const e=m({queries:i.map(o=>({...r({path:{accountId:o.accountId}}),staleTime:1/0})),combine:a});return{index:s.useMemo(()=>t(i.map((o,n)=>({folderAppointments:o.folderAppointments,mailboxes:e.items[n]??[]}))),[i,e]),isPending:e.isPending,error:e.error}}export{u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{cq as Y,r as h,j as a,t as b,I as X,h as Z,
|
|
1
|
+
import{cq as Y,r as h,j as a,t as b,I as X,h as Z,at as J,i as ee,av as te,cG as se,bP as re,ab as ne,a0 as ae,X as oe,c$ as _,d0 as $,C as ie,ck as ce}from"./index-CtDK-rUL.js";import{K as A}from"./kbd-DYG4YL2J.js";import{B as le,b as de}from"./useMessageBodyContent-DJk15jWJ.js";import{i as ue}from"./search-scope-B5-OK3Cq.js";const me=(e,t)=>{const r=e==="newsletter"||e==="marketing"||t;return{framed:r,isPlain:!r}},fe=()=>`
|
|
2
2
|
/* Zero the UA default body margin and clamp the document to the iframe width so
|
|
3
3
|
wide author markup can't push the body (and the page) past the viewport. */
|
|
4
4
|
html, body {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as T,
|
|
1
|
+
import{h as T,at as L,i as k,E as I,F as E,cC as A,ef as R,r as v,dr as j,j as p,eg as h,eh as w,ei as D,C as _,ck as N,c as Q,dM as z,c$ as O}from"./index-CtDK-rUL.js";import{P}from"./attachment-file-CeU5SZlG.js";import{aj as U}from"./MailListHeader-GZJaonoO.js";import{a as q}from"./useLabels-CJLc84td.js";import{n as B}from"./search-query-Cr_ZXBCp.js";import{b as F}from"./search-scope-B5-OK3Cq.js";import{u as G,p as H}from"./useSearchTokenContext-CTOz94Vy.js";const ne=e=>{const t=new Set;for(const s of e)s&&t.add(s);return t.size>1?{accountId:void 0,restriction:"spansAccounts",moveDisabledHint:"Move only works within one account — clear selection or pick messages from a single account"}:{accountId:t.size===1?[...t][0]:void 0,restriction:void 0,moveDisabledHint:void 0}},$=e=>{const{mailboxId:t,messages:s}=e,n=T(),{pushError:l}=L(),{mutateAsync:c,isPending:a}=k({...R(),onError:(r,u)=>{l({title:u.body.action==="Remove"?"Couldn't remove label":"Couldn't apply label",detail:A(r),error:r})},onSettled:(r,u,d)=>{I(n,E(U(d.body.messageIds??[],s??[],t)))}});return{applyLabel:v.useCallback((r,u,d)=>{r.length!==0&&j(r,m=>c({body:{messageIds:m,labelId:u,action:d}}))},[c]),isPending:a}};function re({accountId:e,mailboxId:t,messageIds:s}){const{labels:n}=q(e),{applyLabel:l}=$({mailboxId:t}),c=v.useMemo(()=>n.map(a=>({key:a.labelId,label:a.name,icon:p.jsx("span",{className:`size-2.5 rounded-full ${w(a.color)?h[a.color]:h.Default}`}),onSelect:()=>l(s,a.labelId,"Apply")})),[n,s,l]);return c.length===0?null:p.jsx(P,{triggerLabel:"Apply label to selected messages",triggerIcon:p.jsx(D,{className:"size-4 text-fg-subtle"}),triggerText:"Apply label",items:c,align:"start",nested:!0,touch:!1,triggerClassName:"min-h-11 w-full justify-start gap-3 px-4 py-2.5 text-sm font-normal text-fg"})}const K=3,ie=({hasSearchQuery:e,freeText:t,residualTokenCount:s})=>{if(!e||s>0)return!1;const n=t.trim();return n.length===0||n.length>=K},ce=e=>e===void 0?{kind:"unknown"}:{kind:"exact",value:e},V=20,Y=new Set(Object.values(O)),J=e=>e!==void 0&&Y.has(e)?e:void 0,W=e=>{if(e.some(t=>t.type==="isUnread"))return!1;if(e.some(t=>t.type==="isRead"))return!0};function le({mailboxId:e,filterCategory:t}={}){const{searchQuery:s}=_(),n=G(),l=N(),c=B(s),{freeText:a,tokens:i}=H(c,n),r=a.length>0,u=i.find(o=>o.type==="category"),d=J(t)??u?.category,m=i.some(o=>o.type==="hasAttachment")?!0:void 0,f=i.some(o=>o.type==="isStarred")?!0:void 0,y=W(i),g=i.find(o=>o.type==="after"),b=i.find(o=>o.type==="before"),x=i.find(o=>o.type==="in"),S=F({browsed:l,callerMailboxId:e,inTokenMailboxId:x?.mailboxId}),{data:C,isLoading:M}=Q({...z({query:{query:a,mailboxId:S,limit:V,...d!==void 0?{category:d}:{},...m!==void 0?{hasAttachment:m}:{},...f!==void 0?{hasStars:f}:{},...y!==void 0?{isRead:y}:{},...g?{sentDateFrom:g.epochSeconds}:{},...b?{sentDateTo:b.epochSeconds}:{}}}),enabled:r,staleTime:6e4});return{hits:C?.items??[],isLoading:r&&M}}export{re as L,ne as r,ie as s,ce as t,le as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as g,
|
|
1
|
+
import{h as g,at as p,c as f,d as m,r,i as y,av as T,o as E,l as d}from"./index-CtDK-rUL.js";const i={html:"",plainText:""},x=e=>{const u=g(),{pushError:o}=p(),{data:n}=f({...m(),staleTime:1/0}),l=r.useMemo(()=>{if(!e||!n)return i;const t=n.accounts.find(a=>a.accountId===e);return t?{html:t.signatureHtml??"",plainText:t.signaturePlainText??""}:i},[e,n]),s=y({...d(),onSuccess:()=>{u.invalidateQueries({queryKey:E()})},onError:t=>{o(T("Couldn't save signature","The signature wasn't saved.",t))}}),c=r.useCallback((t,a)=>{e&&s.mutate({path:{accountId:e},body:{signatureHtml:t,signaturePlainText:a}})},[e,s]);return{signature:l,setSignature:c,isSaving:s.isPending}};export{x as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a9 as d,eD as g,r as u,eE as y,bV as m,u as D,cj as b,eC as C}from"./index-CtDK-rUL.js";const i="/calendar/$view/$date";function I(){const e=d({from:i,shouldThrow:!1}),a=g({from:i,shouldThrow:!1}),t=e?.view??"",n=e?.date??"",r=a?.calendarId;return u.useMemo(()=>({...y({view:t,date:n},m(new Date)),calendarIds:r??[]}),[t,n,r])}function j(){const e=d({from:"/calendar/$view/$date/$calendarObjectId",shouldThrow:!1}),a=d({from:"/calendar/$view/$date/$calendarObjectId/$recurrenceId",shouldThrow:!1}),t=e?.calendarObjectId,n=a?.recurrenceId;return u.useMemo(()=>t?{calendarObjectId:t,recurrenceId:n}:void 0,[t,n])}function z(){return d({from:"/calendar/$view/$date/new",shouldThrow:!1})!==void 0}function A(){const e=D(),a=b(),{view:t,date:n}=I(),r=u.useCallback(s=>{e({to:i,params:s,search:!0,hash:a})},[e,a]);return u.useMemo(()=>({goToView:s=>r({view:s,date:n}),step:s=>r({view:t,date:C(n,t,s)}),goToToday:()=>r({view:t,date:m(new Date)}),setAnchorDate:s=>e({to:i,params:{view:t,date:s},search:!0,hash:a,replace:!0}),zoomToDay:s=>r({view:"day",date:s}),openEvent:(s,o)=>e(o===void 0||o===""?{to:"/calendar/$view/$date/$calendarObjectId",params:{view:t,date:n,calendarObjectId:s},search:!0,hash:a}:{to:"/calendar/$view/$date/$calendarObjectId/$recurrenceId",params:{view:t,date:n,calendarObjectId:s,recurrenceId:o},search:!0,hash:a}),closeEvent:()=>r({view:t,date:n}),openComposer:()=>e({to:"/calendar/$view/$date/new",params:{view:t,date:n},search:!0,hash:a})}),[r,e,a,t,n])}const c=e=>String(e).padStart(2,"0"),N=e=>`${e.getUTCFullYear()}-${c(e.getUTCMonth()+1)}-${c(e.getUTCDate())}`,p=e=>{const a=e<0?"-":"+",t=Math.abs(e);return`${a}${c(Math.floor(t/60))}:${c(t%60)}`};function w(e,a){const t=new Date(`${e}T${a}:00`);return`${e}T${a}:00${p(-t.getTimezoneOffset())}`}const l=new Map;function O(e){if(l.has(e))return l.get(e);let a;try{a=new Intl.DateTimeFormat("en-US",{timeZone:e,hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{a=void 0}return l.set(e,a),a}function $(e,a){const t=O(e);if(!t)return Number.NaN;const n=t.formatToParts(new Date(a)),r=T=>Number(n.find(v=>v.type===T)?.value),s=r("hour")%24;return(Date.UTC(r("year"),r("month")-1,r("day"),s,r("minute"),r("second"))-a)/6e4}function P(e,a,t){if(t==="")return`${e}T${a}:00+00:00`;const n=Date.parse(`${e}T${a}:00Z`),r=$(t,n);if(Number.isNaN(r))return w(e,a);const s=$(t,n-r*6e4);return`${e}T${a}:00${p(Number.isNaN(s)?r:s)}`}const h=e=>w(e,"00:00");function f(e,a){const[t,n,r]=e.split("-").map(Number);return N(new Date(Date.UTC(t,n-1,r+a)))}function U(e){const[a,t,n]=e.split("-").map(Number),r=new Date(Date.UTC(a,t-1,n));return f(e,-((r.getUTCDay()+6)%7))}function E(e,a){const[t,n]=a.split("-").map(Number);if(e==="year")return[`${t}-01-01`,`${t+1}-01-01`];if(e==="month"){const s=`${t}-${c(n)}-01`,o=n===12?`${t+1}-01-01`:`${t}-${c(n+1)}-01`;return[s,o]}if(e==="day")return[a,f(a,1)];const r=U(a);return[r,f(r,7)]}function S(e,a){const[t,n]=E(e,a);return{from:h(t),to:h(n)}}export{f as a,A as b,S as c,j as d,z as e,P as i,I as u};
|
package/index.html
CHANGED
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
} catch (_) {}
|
|
39
39
|
})();
|
|
40
40
|
</script>
|
|
41
|
-
<script type="module" crossorigin src="/assets/index-
|
|
42
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
41
|
+
<script type="module" crossorigin src="/assets/index-CtDK-rUL.js"></script>
|
|
42
|
+
<link rel="stylesheet" crossorigin href="/assets/index-nHfgj6E6.css">
|
|
43
43
|
</head>
|
|
44
44
|
<body>
|
|
45
45
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ew as H,r as n,dX as G,c as J,C as V,bm as ge,cN as he,a_ as me,a$ as pe,j as r,al as fe,cZ as Ie,c_ as xe}from"./index-Pa-PXhYt.js";import{u as Te,p as U,R as ye}from"./useSearchTokenContext-sk7n5_Wa.js";import{A as be,E as ve,am as X,az as Se,aA as Ce,an as we,aB as Re,ap as Fe,b as Me,M as je,aw as Oe,aC as ke,ay as Pe,m as Ae,J as Le,O as $,N as Ne,K as Ee,d as qe,Y as De,Z as Be,$ as Y,a0 as ee,a1 as Qe,a2 as _e,a3 as Ke}from"./MailListHeader-CDRRsdUl.js";import{u as ze,l as He,b as Ge,a as Ve}from"./MailViewChrome-wm5gxQlP.js";import{f as We}from"./ErrorState-DsBtijJZ.js";import{d as z,w as Ze}from"./wizard-selection-DxUM65kM.js";import{a as Ue}from"./useMessageBodyContent-CqnK7vFx.js";import{g as Xe,h as $e}from"./search-token-index-DH9ZHWHu.js";import{u as Je}from"./sections-BbwJeaVs.js";const q=e=>({...e,starred:!0,order:"desc"}),Ye=(e={})=>G({query:q(e)});function te(e={}){const{data:t,isLoading:s,isError:a,error:l,refetch:c,fetchNextPage:i,hasNextPage:g,isFetchingNextPage:h}=ze({queryKey:Ye(e),queryFn:async({pageParam:I})=>{const{data:u}=await H({query:{...q(e),continuationToken:I},throwOnError:!0});return u},initialPageParam:void 0,getNextPageParam:I=>I.continuationToken,staleTime:6e4});return{threads:n.useMemo(()=>(t?.pages??[]).flatMap(I=>I.items??[]),[t]),isLoading:s,isError:a,error:l,refetch:c,fetchNextPage:i,hasNextPage:g,isFetchingNextPage:h}}function et(e,t){const s=e.query??"",a={...q(e),limit:t},{data:l}=J({queryKey:G({query:a}),queryFn:async()=>{const{data:c}=await H({query:a,throwOnError:!0});return c},enabled:s.length>0,staleTime:3e4});return n.useMemo(()=>l?.items??[],[l])}function tt(e={}){const t={...q(e),unread:!0,count:!0,results:!1},{data:s}=J({queryKey:G({query:t}),queryFn:async()=>{const{data:a}=await H({query:t,throwOnError:!0});return a},staleTime:6e4});return s?.count}const st=["category","unread","starred","attachments"],at=(e,t)=>{const s=be(e),{params:a,residual:l}=ve(t,{...s,starred:!0},st);return{criteria:{...a,...s},residual:l}},rt=200;function ot({rows:e,verb:t}){const{selectedIds:s,exitSelection:a}=Pe(),l=n.useMemo(()=>Ze(e,s),[e,s]);return r.jsx(Ae,{verb:t,selection:l,selectionRestriction:"spansAccounts",onFinished:a})}function nt({selectedMessageId:e,onOpenThread:t,commandsRef:s,onTriageContextChange:a,onDeleteMessages:l}){const{searchQuery:c,resultFolderIndex:i,onSearchClearQuery:g}=V(),h=Te(),k=ge(),I=he(),[u,m]=n.useState("all"),[S,P]=n.useState(new Set),w=n.useCallback(d=>{P(b=>{const f=new Set(b);return f.has(d)?f.delete(d):f.add(d),f})},[]),R=n.useCallback(()=>{m("all"),P(new Set)},[]),T=n.useCallback(()=>{R(),g()},[R,g]),{freeText:x,tokens:C}=U(c.trim().toLowerCase(),h),A=U(c.trim(),h).freeText,{criteria:F,residual:p}=n.useMemo(()=>at({category:u,attributes:S},C),[u,S,C]),M=n.useMemo(()=>x?{...F,query:x}:F,[F,x]),{threads:L,isLoading:N,isError:v,error:B,refetch:j,fetchNextPage:Q,hasNextPage:_,isFetchingNextPage:O}=te(F),E=et(M,rt),o=n.useMemo(()=>{const d=z(L).map(X),b=x?Se(d.filter(f=>Ce(f,x)),z(E).map(X)):d;return z(b).filter(f=>we(f,p))},[L,E,x,p]),y=n.useCallback((d,b)=>{const f=o.find(ue=>ue.id===d)?.threadId;f&&t?.({threadId:f,messageId:d},b)},[o,t]),K=n.useCallback(d=>{const b=d.threadId??o.find(f=>f.id===d.id)?.threadId;b&&t?.({threadId:b,messageId:d.id})},[o,t]),re=n.useMemo(()=>Re(),[]),oe=n.useMemo(()=>o.map(d=>Fe(d,i)),[o,i]),ne=tt(M)??null,ie=n.useMemo(()=>C.filter(d=>d.type!=="isStarred"),[C]),de=He({chips:{category:u,attributes:S},tokens:ie,reach:p.length>0||x?"loaded-pages":"whole-folder",onClear:T}),W=N?"loading":v?"error":o.length===0?"empty":"ready",le=n.useCallback(()=>{const d=me(pe());window.open(d,"_blank","noopener,noreferrer")},[]),Z=Me(),ce=r.jsx("div",{className:"flex h-full min-h-0 flex-col",children:r.jsxs("div",{className:"flex-1 overflow-y-auto",children:[r.jsx("div",{className:"divide-y divide-line",children:o.map(d=>r.jsx(je,{thread:d,active:d.id===e,onClick:()=>y(d.id)},d.id))}),_?r.jsx("button",{type:"button",className:"w-full py-3 text-sm text-muted hover:text-fg disabled:opacity-50",onClick:()=>Q(),disabled:O,children:O?"Loading…":"Load more"}):null]})});return r.jsx(Ge,{title:"Starred",unreadCount:ne,preset:re,selectedCategory:u,activeFilters:S,onSelectCategory:m,onToggleFilter:w,onClearFilters:R,searchResults:oe,searchLoading:N,onSelectSearchResult:K,searchResultsInBody:!0,children:r.jsxs(Oe,{selectedMessageId:e,rows:o,onOpen:y,onDeleteMessages:l,onSelectionVerb:I.start,commandsRef:s,onTriageContextChange:a,children:[r.jsx(Ve,{listTitle:"Starred",sections:[{id:"flagged",threads:o}],flatList:!0,hideHeader:!0,listState:Z.searchResults?"ready":W,listFilter:de,listScopeLabel:"Starred",searchQuery:A||void 0,errorMessage:v?We(B):void 0,onRetry:()=>j(),onReportError:le,selectedThreadId:e,onSelectThread:y,isDesktop:k,selectionBar:r.jsx(ke,{title:"Starred"}),listBody:Z.searchResults??(W==="ready"?ce:void 0)}),r.jsx(ot,{rows:o,verb:I.verb})]})})}const se=n.createContext(null);function D(){const e=n.useContext(se);if(!e)throw new Error("FlaggedPane.* must be used inside <FlaggedPane>");return e}function it({thread:e,children:t}){const s=Xe(),a=$e(),l=Je(),{searchInput:c}=V(),i=e?.threadId,g=e?.messageId,{threads:h}=te(),k=n.useMemo(()=>{if(i)return h.find(o=>o.messageId===g)??h.find(o=>o.threadId===i)},[h,i,g]),I=Le(i,g),u=k??I,m=g??u?.messageId,S=n.useMemo(()=>{if(i)return{threadId:i,mailboxId:u?.mailboxId??"",subject:u?.subject,messageId:m,authenticity:u?.authenticity}},[i,u,m]),P=n.useCallback((o,y)=>{s(o,{replace:y?.replace,query:c})},[s,c]),w=n.useCallback(o=>{m&&o.includes(m)&&a()},[m,a]),R=$({thread:u,isOpen:!0,onAfterOptimisticRemove:w}),T=Ne(),{deleteMessages:x}=Ee({mailboxId:u?.mailboxId??"",messages:h,onAfterOptimisticRemove:w}),{toggleReadFor:C}=qe({mailboxId:u?.mailboxId??"",messages:h}),A=T.focusedMessageId,p=n.useMemo(()=>h.find(o=>o.messageId===A),[h,A])??u,M=$({thread:p,isOpen:p?.messageId===m}),L=Ue(),N=fe(),v=Ie(),B=n.useMemo(()=>xe(v,i,m),[v,i,m]),j=n.useMemo(()=>{if(p)return o=>v({threadId:p.threadId,messageId:p.messageId,mode:o})},[v,p]),{nextMessageId:Q,previousMessageId:_}=De({context:T,orderedIds:T.orderedIds,selectedMessageId:m,enabled:!L&&!N,hasOpenThread:i!==void 0,onClose:a,handlers:{reply:()=>j?.("reply"),replyAll:()=>j?.("reply-all"),forward:()=>j?.("forward"),delete:()=>{T.listCommandsRef.current?.requestVerb("delete")||M.deleteThread()},toggleStar:M.toggleStar,toggleRead:()=>{T.listCommandsRef.current?.requestVerb("markRead")||p&&C([p.messageId],!p.isRead)},goBrief:()=>l("brief"),goSettings:()=>l("settings")}}),O=n.useCallback(o=>{if(!o)return;const y=h.find(K=>K.messageId===o);return y?{threadId:y.threadId,messageId:o}:void 0},[h]),E={selectedMessageId:m,selectedThread:u,conversation:S,onOpenThread:P,onCloseThread:a,nextThread:O(Q),previousThread:O(_),actions:R,onReply:B,triage:T,onDeleteMessages:x,handleDeselectIfRemoved:w};return r.jsx(se.Provider,{value:E,children:t})}function ae(){const{selectedMessageId:e,onOpenThread:t,triage:s,onDeleteMessages:a}=D();return r.jsx(nt,{selectedMessageId:e,onOpenThread:t,commandsRef:s.listCommandsRef,onTriageContextChange:s.onTriageContextChange,onDeleteMessages:a})}function dt(){const{conversation:e,selectedThread:t,actions:s,onReply:a,handleDeselectIfRemoved:l}=D(),c=!!e,i=_e(e?.threadId);return r.jsxs(r.Fragment,{children:[r.jsxs("section",{className:"flex h-full w-full min-w-0 flex-col bg-canvas",children:[r.jsx(Ke,{hasThread:c,intelligenceOpen:i.isShowing,canToggleIntelligence:i.canToggle,onToggleIntelligence:i.toggle,onReply:a?()=>a("reply"):void 0,onReplyAll:a?()=>a("reply-all"):void 0,onForward:a?()=>a("forward"):void 0,onDelete:c?s.deleteThread:void 0,onToggleStar:c?s.toggleStar:void 0,isStarred:s.isStarred,moveContext:c&&s.accountId&&s.mailboxId?{accountId:s.accountId,currentMailboxId:s.mailboxId,onMove:s.moveThread}:void 0}),r.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:e?r.jsx(Y,{threadId:e.threadId,mailboxId:e.mailboxId,subject:e.subject,selectedMessageId:e.messageId,authenticity:e.authenticity,onOpenIntelligence:i.open,listOnScreen:!0}):r.jsx(ye,{})})]}),r.jsx(ee,{isOpen:i.drawerOpen,onClose:i.closeDrawer,thread:t,mailboxId:t?.mailboxId,accountId:t?.accountId,onAfterOptimisticRemove:l})]})}function lt(){const{selectedThread:e,handleDeselectIfRemoved:t}=D(),{onToggleIntelligence:s}=V();return r.jsx(Qe,{onClose:s,thread:e,mailboxId:e?.mailboxId,accountId:e?.accountId,onAfterOptimisticRemove:t})}function ct(){const{selectedThread:e,conversation:t,onCloseThread:s,onOpenThread:a,nextThread:l,previousThread:c,handleDeselectIfRemoved:i}=D(),g=Be(t?.threadId??null);return t?r.jsxs(r.Fragment,{children:[r.jsx(Y,{threadId:t.threadId,mailboxId:t.mailboxId,subject:t.subject,selectedMessageId:t.messageId,authenticity:t.authenticity,onBack:s,onOpenIntelligence:g.toggle,onSwipeNext:l?()=>a(l):void 0,onSwipePrevious:c?()=>a(c):void 0,mobileIntelligenceOpen:g.isOpen}),r.jsx(ee,{isOpen:g.isOpen,onClose:g.close,thread:e,mailboxId:e?.mailboxId,accountId:e?.accountId,onAfterOptimisticRemove:i})]}):r.jsx("div",{className:"h-full",children:r.jsx(ae,{})})}const yt=Object.assign(it,{List:ae,Reading:dt,Intelligence:lt,Phone:ct});export{yt as F};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as D,r as h,j as e,W as ae,Y as ne,Z as U,t as N,_ as T,$ as V,a0 as re,a1 as G,a2 as ie,a3 as le,X as oe,a4 as ce,a5 as ue,a6 as de,a7 as xe,a8 as fe,I as me,a9 as he,aa as ge,ab as I,ac as pe,h as be,C as ve,ad as je,K as ye,c as Ne,ae as Se,af as ke,ag as M,ah as Ce,ai as w,aj as we,D as Oe,v as ze}from"./index-Pa-PXhYt.js";import{u as Re}from"./roving-focus-xdT_hFx-.js";import{B as Ae,a as Ie}from"./useLayoutTier-CqqMDWMQ.js";import{u as Ee}from"./useQueries-DLtTi8je.js";import{i as Le}from"./outbox-status-BlKn6P0x.js";import{B as Fe}from"./bug-CIR5aOCb.js";const Pe=D("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 Me=D("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 De=D("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"}]]),_e="button:not([disabled]), a[href]",O="outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-surface-sunken";function Be({active:s,dimmed:t,indent:a}){return N("flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors",O,a&&"pl-7",s?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface hover:text-fg",t&&"opacity-55")}function Te({icon:s,label:t,count:a,active:n}){return e.jsxs(e.Fragment,{children:[s&&e.jsx("span",{className:N("shrink-0",n?"text-accent-2":"text-fg-subtle"),children:s}),e.jsx("span",{className:"flex-1 truncate",children:t}),a!=null&&a>0&&e.jsx("span",{className:N("text-2xs tabular-nums",n?"text-accent-2":"text-fg-subtle"),children:a})]})}function A({icon:s,label:t,count:a,active:n,dimmed:o,indent:l,navId:u,linkComponent:g,ariaLabel:x,title:v,onClick:j}){const p=Be({active:n,dimmed:o,indent:l}),d=e.jsx(Te,{icon:s,label:t,count:a,active:n});return u&&g?g({navId:u,className:p,ariaLabel:x??t,title:v,onClick:j,children:d}):e.jsx("button",{type:"button",onClick:j,className:p,"aria-label":x,title:v,children:d})}const K={inbox:0,flagged:1,drafts:2,sent:3,archive:4,all:5,junk:6,trash:7};function Ve(s){switch(s){case"inbox":return e.jsx(me,{className:"size-4"});case"flagged":return e.jsx(U,{className:"size-4"});case"drafts":return e.jsx(fe,{className:"size-4"});case"sent":return e.jsx(G,{className:"size-4"});case"archive":return e.jsx(xe,{className:"size-4"});case"all":return e.jsx(de,{className:"size-4"});case"junk":return e.jsx(ue,{className:"size-4"});case"trash":return e.jsx(ce,{className:"size-4"})}}const q=s=>s.role!=null,P=8,Q="remit.nav.folders.open.",$="remit.nav.account.open.";function H(s,t,a){if(typeof localStorage>"u")return a;const n=localStorage.getItem(s+t);return n===null?a:n!=="0"}function W(s,t,a){typeof localStorage>"u"||localStorage.setItem(s+t,a?"1":"0")}function Ke({query:s,onSelect:t,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:t,className:N("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",O),children:[e.jsx(le,{className:"size-4 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:s})]}),a&&e.jsx("button",{type:"button",onClick:a,"aria-label":`Remove saved search: ${s}`,className:N("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",O),children:e.jsx(oe,{className:"size-3.5"})})]})}function qe({savedSearches:s,saveableQuery:t,onSelectSavedSearch:a,onRemoveSavedSearch:n,onSaveCurrentSearch:o}){return s.length===0&&!t?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"}),t&&e.jsxs("button",{type:"button",onClick:o,className:N("flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm text-accent transition-colors hover:bg-surface",O),children:[e.jsx(Pe,{className:"size-4 shrink-0"}),e.jsxs("span",{className:"min-w-0 flex-1 truncate",children:["Save “",t,"”"]})]}),s.map(l=>e.jsx(Ke,{query:l,onSelect:()=>a?.(l),onRemove:n?()=>n(l):void 0},l))]})}function Qe({account:s,selectedNavId:t,onSelectNav:a,linkComponent:n}){const[o,l]=h.useState(()=>H($,s.id,!0)),[u,g]=h.useState(()=>H(Q,s.id,!0)),[x,v]=h.useState(!1),j=()=>{l(r=>{const f=!r;return W($,s.id,f),f})},p=()=>{g(r=>{const f=!r;return W(Q,s.id,f),f})},d=s.mailboxes.filter(q).sort((r,f)=>K[r.role]-K[f.role]),c=s.mailboxes.filter(r=>!q(r)),S=x||c.length<=P?c:c.slice(0,P),z=c.length-S.length,R=s.status??"ready",F=R==="ready"&&d.length===0&&c.length===0;return e.jsxs("div",{className:"mt-3",children:[e.jsxs("button",{type:"button",onClick:j,"aria-expanded":o,className:N("flex w-full items-center gap-1.5 px-2 pb-1 text-left transition-colors hover:text-fg",O,s.muted&&"opacity-55"),children:[o?e.jsx(T,{className:"size-3 shrink-0 text-fg-subtle"}):e.jsx(V,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"truncate text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:s.label}),s.muted&&e.jsxs(e.Fragment,{children:[e.jsx(Ae,{className:"size-3 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"text-2xs text-fg-subtle",children:"muted"})]})]}),o&&e.jsxs(e.Fragment,{children:[R==="loading"&&e.jsx("div",{className:"px-2 py-1 text-sm text-fg-muted",children:"Loading…"}),R==="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(re,{className:"mt-0.5 size-4 shrink-0 text-danger","aria-hidden":"true"}),e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx("p",{className:"font-medium text-danger",children:"Couldn't load mailboxes"})}),s.onRetry&&e.jsx("button",{type:"button",onClick:s.onRetry,className:"shrink-0 text-sm font-medium text-accent hover:underline",children:"Retry"})]}),F&&e.jsx("div",{className:"px-2 py-1 text-sm text-fg-muted",children:"No mailboxes"}),R==="ready"&&e.jsxs(e.Fragment,{children:[d.map(r=>e.jsx(A,{navId:r.id,linkComponent:n,icon:Ve(r.role),label:r.name,ariaLabel:r.name,title:r.fullPath??r.name,count:r.unseen,active:t===r.id,dimmed:s.muted,onClick:()=>a?.(r.id)},r.id)),s.outboxPending!==void 0&&e.jsx(A,{navId:"outbox",linkComponent:n,icon:e.jsx(G,{className:"size-4"}),label:"Outbox",ariaLabel:"Outbox",count:s.outboxPending>0?s.outboxPending:void 0,active:t==="outbox",dimmed:s.muted,onClick:()=>a?.("outbox")}),c.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:p,"aria-expanded":u,className:N("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",O),children:[u?e.jsx(T,{className:"size-3 shrink-0"}):e.jsx(V,{className:"size-3 shrink-0"}),e.jsx("span",{className:"flex-1",children:"Folders"}),e.jsx("span",{className:"tabular-nums opacity-70",children:c.length})]}),u&&e.jsxs(e.Fragment,{children:[S.map(r=>e.jsx(A,{navId:r.id,linkComponent:n,icon:e.jsx(ie,{className:"size-4"}),label:r.name,ariaLabel:r.name,title:r.fullPath??r.name,count:r.unseen,active:t===r.id,dimmed:s.muted,onClick:()=>a?.(r.id)},r.id)),(z>0||x)&&c.length>P&&e.jsx("button",{type:"button",onClick:()=>v(r=>!r),className:N("ml-7 flex items-center px-2 py-1 text-2xs font-medium text-accent transition-colors hover:underline",O),children:x?"Show less":`Show all (${c.length})`})]})]})]})]})]})}function $e({accounts:s,selectedNavId:t,briefUnseen:a,onSelectNav:n,variant:o="desktop",linkComponent:l,calendarNav:u="hidden",savedSearches:g=[],saveableQuery:x,onSelectSavedSearch:v,onRemoveSavedSearch:j,onSaveCurrentSearch:p}){const d=h.useRef(null);Re({containerRef:d,itemSelector:_e});const c=o==="drawer",S=e.jsxs("nav",{ref:c?d:void 0,className:c?"px-2 py-2":"flex-1 overflow-y-auto px-2 py-2","aria-label":"Mailboxes",children:[e.jsx(A,{navId:"brief",linkComponent:l,icon:e.jsx(ae,{className:"size-4"}),label:"Daily brief",ariaLabel:"Daily brief",count:a,active:t==="brief",onClick:()=>n?.("brief")}),u==="shown"&&e.jsx(A,{navId:"calendar",linkComponent:l,icon:e.jsx(ne,{className:"size-4"}),label:"Calendar",ariaLabel:"Calendar",active:t==="calendar",onClick:()=>n?.("calendar")}),e.jsx(A,{navId:"flagged",linkComponent:l,icon:e.jsx(U,{className:"size-4"}),label:"Starred",ariaLabel:"Starred",active:t==="flagged",onClick:()=>n?.("flagged")}),e.jsx(qe,{savedSearches:g,saveableQuery:x,onSelectSavedSearch:v,onRemoveSavedSearch:j,onSaveCurrentSearch:p}),s.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-sm text-fg-muted",children:"No accounts configured"}):s.map(z=>e.jsx(Qe,{account:z,selectedNavId:t,onSelectNav:n,linkComponent:l},z.id))]});return c?S:e.jsx("aside",{ref:d,className:"flex h-full w-full flex-col bg-surface-sunken",children:S})}function He(){const{pathname:s}=he(),t=ge({from:"/mail/$mailboxId",shouldThrow:!1});return I(s,"/settings")?"settings":I(s,"/calendar")?"calendar":I(s,"/mail/outbox")?"outbox":I(s,"/mail/flagged")?"flagged":I(s,"/mail/brief")?"brief":t?.mailboxId??""}const We=({children:s})=>{const{Account:t}=pe();return e.jsx(t,{children:s})},_="remit.savedSearches",Ye=25;function L(){try{const s=localStorage.getItem(_);if(!s)return[];const t=JSON.parse(s);return Array.isArray(t)?t.filter(a=>typeof a=="string"):[]}catch{return[]}}function Je(s){const t=s.trim();if(!t)return L();const a=[t,...L().filter(n=>n!==t)].slice(0,Ye);try{localStorage.setItem(_,JSON.stringify(a))}catch{return a}return a}function Ue(s){const t=L().filter(a=>a!==s);try{localStorage.setItem(_,JSON.stringify(t))}catch{return t}return t}const Y=s=>/^\d/.test(s),Ge=(s,t)=>{const a=Y(s),n=Y(t);return a&&!n?-1:!a&&n?1:s.localeCompare(t,void 0,{sensitivity:"base",numeric:!0})};function Xe(s,t,a){const n=[],o=[];for(const l of s)t.has(l.mailboxId)?n.push(l):o.push(l);return o.sort((l,u)=>Ge(M(l,void 0,a),M(u,void 0,a))),{system:n,labels:o}}function Ze(s,t,a){const n=Ce(t)&&s.unseenCount>0;return{id:s.mailboxId,name:M(s,t,a),unseen:n?s.unseenCount:void 0,role:t,fullPath:s.fullPath}}function J({accounts:s,onMailboxSelect:t,variant:a="desktop"}){const n=be(),o=Ie(),l=He(),{searchInput:u,onSearchChange:g}=ve(),[x,v]=h.useState(L),{t:j}=je("mail",{useSuspense:!1}),p=h.useCallback((i,b)=>j(i,{defaultValue:b}),[j]),d=Ee({queries:s.map(i=>({...ye({path:{accountId:i.accountId}}),staleTime:1/0}))}),{data:c}=Ne(Se()),S=h.useMemo(()=>(c?.items??[]).filter(i=>Le(i.status)).length,[c?.items]),z=h.useMemo(()=>s.map((i,b)=>{const m=d[b],k=m?.data?.items??[],y=ke(i.folderAppointments),{system:C,labels:se}=Xe(k,y,p),te=m?.isError?"error":m?.isLoading?"loading":"ready";return{id:i.accountId,label:i.email,email:i.email,muted:!!i.muted,outboxPending:S,status:te,onRetry:()=>m?.refetch(),mailboxes:[...C,...se].map(B=>Ze(B,y.get(B.mailboxId),p))}}),[s,d,S,p]),R=i=>{n.invalidateQueries({queryKey:we({path:{mailboxId:i},query:{order:"desc"}})})},F=({navId:i,className:b,ariaLabel:m,title:k,children:y,onClick:C})=>i==="brief"?e.jsx(w,{to:"/mail/brief",search:{q:void 0},activeOptions:{includeSearch:!1},onClick:()=>C?.(),className:b,"aria-label":m,title:k,children:y}):i==="calendar"?e.jsx(w,{to:"/calendar",onClick:()=>C?.(),className:b,"aria-label":m,title:k,children:y}):i==="outbox"?e.jsx(w,{to:"/mail/outbox",search:{q:void 0},onClick:()=>C?.(),className:b,"aria-label":m,title:k,children:y}):i==="flagged"?e.jsx(w,{to:"/mail/flagged",search:{q:void 0},onClick:()=>C?.(),className:b,"aria-label":m,title:k,children:y}):i==="settings"?e.jsx(w,{to:"/settings/accounts",onClick:()=>C?.(),className:b,"aria-label":m,title:k,children:y}):e.jsx(w,{to:"/mail/$mailboxId",params:{mailboxId:i},search:{q:void 0},onClick:()=>{R(i),C?.()},className:b,"aria-label":m,title:k,children:y}),r=()=>{g(""),t?.()},f=u.trim(),E=f.length>0&&!x.includes(f)?f:void 0,X=h.useCallback(()=>{E&&v(Je(E))},[E]),Z=h.useCallback(i=>{v(Ue(i))},[]),ee=h.useCallback(i=>{g(i),o(i),t?.()},[g,o,t]);return e.jsx($e,{accounts:z,selectedNavId:l,onSelectNav:r,linkComponent:F,calendarNav:"shown",variant:a,savedSearches:x,saveableQuery:E,onSaveCurrentSearch:X,onSelectSavedSearch:ee,onRemoveSavedSearch:Z})}function es(){return e.jsxs("button",{type:"button",onClick:Oe,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(Fe,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Report a bug"})]})}function ls({accounts:s,onMailboxSelect:t}){return ze()?.showNavPane??!0?e.jsx(J,{accounts:s}):e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx(J,{accounts:s,onMailboxSelect:t,variant:"drawer"})}),e.jsxs("div",{className:"border-t border-line px-2 py-2",children:[e.jsxs(w,{to:"/settings/accounts",onClick:t,children:[e.jsx(De,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Settings"})]}),e.jsx(es,{}),e.jsx(We,{children:({signOut:o})=>e.jsxs("button",{type:"button",onClick:()=>{t?.(),o()},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(Me,{className:"size-4 shrink-0"}),e.jsx("span",{className:"flex-1 truncate text-left",children:"Sign out"})]})})]})]})}export{We as A,Me as L,ls as M,De as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ab as v,j as s,r as u,am as l,an as p}from"./index-Pa-PXhYt.js";import{F as x}from"./FullCompose-utRdyTob.js";import{a as m}from"./useMessageBodyContent-CqnK7vFx.js";function S(o,n,r){if(o!==n)return r}function d(o,n){return o===""?"":n}function j({searchInput:o,committedQuery:n,urlQuery:r,pathname:t,listPath:a}){return!v(t,a)||n!==o?!1:n!==r}const c=u.createContext(null),C=({chrome:o,children:n})=>s.jsx(c.Provider,{value:o,children:n});function M({phone:o,list:n,reading:r,intelligence:t,hasThread:a=!1}){const e=u.useContext(c),f=m();if(!e)return s.jsx(l,{});const i={nav:e.nav,overlay:e.overlay,skeleton:s.jsx(l,{}),isLoading:e.isLoading,navOpen:e.navOpen,onOpenNav:e.onOpenNav,onCloseNav:e.onCloseNav};return e.isSinglePane?s.jsx(p,{...i,list:f?s.jsx(x,{}):o,intelligenceOpen:e.intelligenceOpen}):s.jsx(p,{...i,topBar:e.topBar,list:n,reading:r,intelligence:t,intelligenceOpen:e.intelligenceOpen,hasThread:a})}export{C as M,M as a,j as b,d as c,S as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as o}from"./index-Pa-PXhYt.js";const n=o;export{n as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ak as m,j as o,O as p}from"./index-Pa-PXhYt.js";import{a}from"./MailShell-K5p0Mrz6.js";import{M as r}from"./MailboxPane-CU_5z2WT.js";import{d as e}from"./search-token-index-DH9ZHWHu.js";import{u as s}from"./search-mirror-D9T_QTSg.js";import"./FullCompose-utRdyTob.js";import"./ErrorState-DsBtijJZ.js";import"./index-CLDSMpwb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./confirm-dialog-BP0RGVB7.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-YILSa993.js";import"./circle-check-big-Li9WrqhW.js";import"./refresh-cw-WQWjOiDL.js";import"./useQueries-DLtTi8je.js";import"./MailListHeader-CDRRsdUl.js";import"./roving-focus-xdT_hFx-.js";import"./attachment-file-D4ltwNwP.js";import"./mail-CUfpnKmW.js";import"./avatar-kb7BRIj-.js";import"./EmptyState-B51IVrJy.js";import"./download-CkEmIWry.js";import"./calendar-event-chip-BBHc41iQ.js";import"./calendar-color-C9vd3NQU.js";import"./map-pin-BAQN6x3n.js";import"./attendee-row-CGWfa3DU.js";import"./clock-BZGi8qZp.js";import"./useLayoutTier-CqqMDWMQ.js";import"./shield-check-CdBctVu5.js";import"./useFilters-EUeKL3LS.js";import"./menu-C_ItFy3L.js";import"./MailViewChrome-wm5gxQlP.js";import"./NavMenuButton-CNrrDR3O.js";import"./useLabels-DXD0xTLQ.js";import"./useSemanticSearch-681BpGBX.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-EOczQGoU.js";import"./circle-help-6lT0PZTp.js";import"./circle-check-TN2pLSAm.js";function oo(){const{mailboxId:t}=m.useParams(),i=e();return s({to:"/mail/$mailboxId",params:{mailboxId:t}}),o.jsx(r,{mailboxId:t,thread:i,children:o.jsx(a,{phone:o.jsx(r.Phone,{}),list:o.jsx(r.List,{}),reading:o.jsx(p,{}),intelligence:o.jsx(r.Intelligence,{}),hasThread:!!i})})}export{oo as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-Pa-PXhYt.js";import{F as r}from"./FlaggedPane-CeJ0lxX3.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CDRRsdUl.js";import"./roving-focus-xdT_hFx-.js";import"./search-token-index-DH9ZHWHu.js";import"./useLayoutTier-CqqMDWMQ.js";import"./useQueries-DLtTi8je.js";import"./attachment-file-D4ltwNwP.js";import"./mail-CUfpnKmW.js";import"./avatar-kb7BRIj-.js";import"./index-CLDSMpwb.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./EmptyState-B51IVrJy.js";import"./ErrorState-DsBtijJZ.js";import"./download-CkEmIWry.js";import"./calendar-event-chip-BBHc41iQ.js";import"./calendar-color-C9vd3NQU.js";import"./map-pin-BAQN6x3n.js";import"./attendee-row-CGWfa3DU.js";import"./clock-BZGi8qZp.js";import"./shield-check-CdBctVu5.js";import"./useFilters-EUeKL3LS.js";import"./confirm-dialog-BP0RGVB7.js";import"./menu-C_ItFy3L.js";import"./MailViewChrome-wm5gxQlP.js";import"./refresh-cw-WQWjOiDL.js";import"./wizard-selection-DxUM65kM.js";function H(){return o.jsx(r.Reading,{})}export{H as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-Pa-PXhYt.js";import{B as o}from"./BriefPane-DTwqpehY.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CDRRsdUl.js";import"./roving-focus-xdT_hFx-.js";import"./search-token-index-DH9ZHWHu.js";import"./useLayoutTier-CqqMDWMQ.js";import"./useQueries-DLtTi8je.js";import"./attachment-file-D4ltwNwP.js";import"./mail-CUfpnKmW.js";import"./avatar-kb7BRIj-.js";import"./index-CLDSMpwb.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./EmptyState-B51IVrJy.js";import"./ErrorState-DsBtijJZ.js";import"./download-CkEmIWry.js";import"./calendar-event-chip-BBHc41iQ.js";import"./calendar-color-C9vd3NQU.js";import"./map-pin-BAQN6x3n.js";import"./attendee-row-CGWfa3DU.js";import"./clock-BZGi8qZp.js";import"./shield-check-CdBctVu5.js";import"./useFilters-EUeKL3LS.js";import"./confirm-dialog-BP0RGVB7.js";import"./menu-C_ItFy3L.js";import"./useRefreshControl-YILSa993.js";import"./circle-check-big-Li9WrqhW.js";import"./refresh-cw-WQWjOiDL.js";import"./useSemanticSearch-681BpGBX.js";import"./useLabels-DXD0xTLQ.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-DxUM65kM.js";function L(){return r.jsx(o.Reading,{})}export{L as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-Pa-PXhYt.js";import{M as r}from"./MailboxPane-CU_5z2WT.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-YILSa993.js";import"./circle-check-big-Li9WrqhW.js";import"./refresh-cw-WQWjOiDL.js";import"./useQueries-DLtTi8je.js";import"./MailListHeader-CDRRsdUl.js";import"./roving-focus-xdT_hFx-.js";import"./search-token-index-DH9ZHWHu.js";import"./useLayoutTier-CqqMDWMQ.js";import"./attachment-file-D4ltwNwP.js";import"./mail-CUfpnKmW.js";import"./avatar-kb7BRIj-.js";import"./index-CLDSMpwb.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./EmptyState-B51IVrJy.js";import"./ErrorState-DsBtijJZ.js";import"./download-CkEmIWry.js";import"./calendar-event-chip-BBHc41iQ.js";import"./calendar-color-C9vd3NQU.js";import"./map-pin-BAQN6x3n.js";import"./attendee-row-CGWfa3DU.js";import"./clock-BZGi8qZp.js";import"./shield-check-CdBctVu5.js";import"./useFilters-EUeKL3LS.js";import"./confirm-dialog-BP0RGVB7.js";import"./menu-C_ItFy3L.js";import"./MailViewChrome-wm5gxQlP.js";import"./NavMenuButton-CNrrDR3O.js";import"./useLabels-DXD0xTLQ.js";import"./useSemanticSearch-681BpGBX.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-EOczQGoU.js";import"./circle-help-6lT0PZTp.js";import"./circle-check-TN2pLSAm.js";function S(){return o.jsx(r.Reading,{})}export{S as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-Pa-PXhYt.js";import{O as t}from"./OutboxPane-Ceq0teEA.js";import"./roving-focus-xdT_hFx-.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./search-scope-B5-OK3Cq.js";import"./circle-check-big-Li9WrqhW.js";import"./clock-BZGi8qZp.js";import"./row-actions-CPjrTXH5.js";import"./rotate-ccw-BGnoQrsd.js";import"./NavMenuButton-CNrrDR3O.js";import"./menu-C_ItFy3L.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function P(){return o.jsx(t.Reading,{})}export{P as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{eK as o,j as m}from"./index-Pa-PXhYt.js";import{O as e}from"./OpenCalendarEvent-CmcmB0nH.js";import"./CalendarComposePane-DMpEx0pI.js";import"./window-vYbNZDbX.js";import"./ErrorState-DsBtijJZ.js";import"./calendar-color-C9vd3NQU.js";import"./attendee-row-CGWfa3DU.js";import"./avatar-kb7BRIj-.js";import"./clock-BZGi8qZp.js";import"./map-pin-BAQN6x3n.js";import"./mail-CUfpnKmW.js";import"./pencil-wopYA3tK.js";import"./useCalendars-300H4qIk.js";import"./useCalendarData-C2bHSfW2.js";import"./useQueries-DLtTi8je.js";function E(){const{calendarObjectId:r,recurrenceId:t}=o.useParams();return m.jsx(e,{calendarObjectId:r,recurrenceId:t})}export{E as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as o}from"./index-Pa-PXhYt.js";const n=o;export{n as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as o}from"./index-Pa-PXhYt.js";const n=o;export{n as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as o}from"./index-Pa-PXhYt.js";const n=o;export{n as component};
|
package/assets/brief-D1dcKREw.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r,O as i}from"./index-Pa-PXhYt.js";import{a as m}from"./MailShell-K5p0Mrz6.js";import{B as o}from"./BriefPane-DTwqpehY.js";import{d as p}from"./search-token-index-DH9ZHWHu.js";import{u as e}from"./search-mirror-D9T_QTSg.js";import"./FullCompose-utRdyTob.js";import"./ErrorState-DsBtijJZ.js";import"./index-CLDSMpwb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./confirm-dialog-BP0RGVB7.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CDRRsdUl.js";import"./roving-focus-xdT_hFx-.js";import"./attachment-file-D4ltwNwP.js";import"./mail-CUfpnKmW.js";import"./avatar-kb7BRIj-.js";import"./EmptyState-B51IVrJy.js";import"./download-CkEmIWry.js";import"./calendar-event-chip-BBHc41iQ.js";import"./calendar-color-C9vd3NQU.js";import"./map-pin-BAQN6x3n.js";import"./attendee-row-CGWfa3DU.js";import"./clock-BZGi8qZp.js";import"./useLayoutTier-CqqMDWMQ.js";import"./shield-check-CdBctVu5.js";import"./useFilters-EUeKL3LS.js";import"./useQueries-DLtTi8je.js";import"./menu-C_ItFy3L.js";import"./useRefreshControl-YILSa993.js";import"./circle-check-big-Li9WrqhW.js";import"./refresh-cw-WQWjOiDL.js";import"./useSemanticSearch-681BpGBX.js";import"./useLabels-DXD0xTLQ.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-DxUM65kM.js";function W(){const t=p();return e({to:"/mail/brief"}),r.jsx(o,{thread:t,children:r.jsx(m,{phone:r.jsx(o.Phone,{}),list:r.jsx(o.List,{}),reading:r.jsx(i,{}),intelligence:r.jsx(o.Intelligence,{}),hasThread:!!t})})}export{W as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e}from"./index-Pa-PXhYt.js";const t=e("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);export{t as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-utRdyTob.js";import"./index-Pa-PXhYt.js";import"./ErrorState-DsBtijJZ.js";import"./index-CLDSMpwb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./confirm-dialog-BP0RGVB7.js";const c=o;export{c as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-utRdyTob.js";import"./index-Pa-PXhYt.js";import"./ErrorState-DsBtijJZ.js";import"./index-CLDSMpwb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./confirm-dialog-BP0RGVB7.js";const c=o;export{c as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-utRdyTob.js";import"./index-Pa-PXhYt.js";import"./ErrorState-DsBtijJZ.js";import"./index-CLDSMpwb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./confirm-dialog-BP0RGVB7.js";const c=o;export{c as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as o}from"./FullCompose-utRdyTob.js";import"./index-Pa-PXhYt.js";import"./ErrorState-DsBtijJZ.js";import"./index-CLDSMpwb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./confirm-dialog-BP0RGVB7.js";const c=o;export{c as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o,O as i}from"./index-Pa-PXhYt.js";import{a as m}from"./MailShell-K5p0Mrz6.js";import{F as r}from"./FlaggedPane-CeJ0lxX3.js";import{d as p}from"./search-token-index-DH9ZHWHu.js";import{u as e}from"./search-mirror-D9T_QTSg.js";import"./FullCompose-utRdyTob.js";import"./ErrorState-DsBtijJZ.js";import"./index-CLDSMpwb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./confirm-dialog-BP0RGVB7.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CDRRsdUl.js";import"./roving-focus-xdT_hFx-.js";import"./attachment-file-D4ltwNwP.js";import"./mail-CUfpnKmW.js";import"./avatar-kb7BRIj-.js";import"./EmptyState-B51IVrJy.js";import"./download-CkEmIWry.js";import"./calendar-event-chip-BBHc41iQ.js";import"./calendar-color-C9vd3NQU.js";import"./map-pin-BAQN6x3n.js";import"./attendee-row-CGWfa3DU.js";import"./clock-BZGi8qZp.js";import"./useLayoutTier-CqqMDWMQ.js";import"./shield-check-CdBctVu5.js";import"./useFilters-EUeKL3LS.js";import"./useQueries-DLtTi8je.js";import"./menu-C_ItFy3L.js";import"./MailViewChrome-wm5gxQlP.js";import"./refresh-cw-WQWjOiDL.js";import"./wizard-selection-DxUM65kM.js";function N(){const t=p();return e({to:"/mail/flagged"}),o.jsx(r,{thread:t,children:o.jsx(m,{phone:o.jsx(r.Phone,{}),list:o.jsx(r.List,{}),reading:o.jsx(i,{}),intelligence:o.jsx(r.Intelligence,{}),hasThread:!!t})})}export{N as component};
|
package/assets/index-CD4CJfdP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-Pa-PXhYt.js";import{F as r}from"./FlaggedPane-CeJ0lxX3.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CDRRsdUl.js";import"./roving-focus-xdT_hFx-.js";import"./search-token-index-DH9ZHWHu.js";import"./useLayoutTier-CqqMDWMQ.js";import"./useQueries-DLtTi8je.js";import"./attachment-file-D4ltwNwP.js";import"./mail-CUfpnKmW.js";import"./avatar-kb7BRIj-.js";import"./index-CLDSMpwb.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./EmptyState-B51IVrJy.js";import"./ErrorState-DsBtijJZ.js";import"./download-CkEmIWry.js";import"./calendar-event-chip-BBHc41iQ.js";import"./calendar-color-C9vd3NQU.js";import"./map-pin-BAQN6x3n.js";import"./attendee-row-CGWfa3DU.js";import"./clock-BZGi8qZp.js";import"./shield-check-CdBctVu5.js";import"./useFilters-EUeKL3LS.js";import"./confirm-dialog-BP0RGVB7.js";import"./menu-C_ItFy3L.js";import"./MailViewChrome-wm5gxQlP.js";import"./refresh-cw-WQWjOiDL.js";import"./wizard-selection-DxUM65kM.js";function H(){return o.jsx(r.Reading,{})}export{H as component};
|
package/assets/index-CSl21pmh.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-Pa-PXhYt.js";import{B as o}from"./BriefPane-DTwqpehY.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CDRRsdUl.js";import"./roving-focus-xdT_hFx-.js";import"./search-token-index-DH9ZHWHu.js";import"./useLayoutTier-CqqMDWMQ.js";import"./useQueries-DLtTi8je.js";import"./attachment-file-D4ltwNwP.js";import"./mail-CUfpnKmW.js";import"./avatar-kb7BRIj-.js";import"./index-CLDSMpwb.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./EmptyState-B51IVrJy.js";import"./ErrorState-DsBtijJZ.js";import"./download-CkEmIWry.js";import"./calendar-event-chip-BBHc41iQ.js";import"./calendar-color-C9vd3NQU.js";import"./map-pin-BAQN6x3n.js";import"./attendee-row-CGWfa3DU.js";import"./clock-BZGi8qZp.js";import"./shield-check-CdBctVu5.js";import"./useFilters-EUeKL3LS.js";import"./confirm-dialog-BP0RGVB7.js";import"./menu-C_ItFy3L.js";import"./useRefreshControl-YILSa993.js";import"./circle-check-big-Li9WrqhW.js";import"./refresh-cw-WQWjOiDL.js";import"./useSemanticSearch-681BpGBX.js";import"./useLabels-DXD0xTLQ.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-DxUM65kM.js";function M(){return r.jsx(o.Reading,{})}export{M as component};
|
package/assets/index-CsIM9j-Q.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,ao as o}from"./index-Pa-PXhYt.js";const n=()=>t.jsx(o,{to:"/settings/accounts"});export{n as component};
|
package/assets/index-DVrmsl_R.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./index-Pa-PXhYt.js";import{B as o}from"./BriefPane-DTwqpehY.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CDRRsdUl.js";import"./roving-focus-xdT_hFx-.js";import"./search-token-index-DH9ZHWHu.js";import"./useLayoutTier-CqqMDWMQ.js";import"./useQueries-DLtTi8je.js";import"./attachment-file-D4ltwNwP.js";import"./mail-CUfpnKmW.js";import"./avatar-kb7BRIj-.js";import"./index-CLDSMpwb.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./EmptyState-B51IVrJy.js";import"./ErrorState-DsBtijJZ.js";import"./download-CkEmIWry.js";import"./calendar-event-chip-BBHc41iQ.js";import"./calendar-color-C9vd3NQU.js";import"./map-pin-BAQN6x3n.js";import"./attendee-row-CGWfa3DU.js";import"./clock-BZGi8qZp.js";import"./shield-check-CdBctVu5.js";import"./useFilters-EUeKL3LS.js";import"./confirm-dialog-BP0RGVB7.js";import"./menu-C_ItFy3L.js";import"./useRefreshControl-YILSa993.js";import"./circle-check-big-Li9WrqhW.js";import"./refresh-cw-WQWjOiDL.js";import"./useSemanticSearch-681BpGBX.js";import"./useLabels-DXD0xTLQ.js";import"./search-query-Cr_ZXBCp.js";import"./wizard-selection-DxUM65kM.js";function L(){return r.jsx(o.Reading,{})}export{L as component};
|
package/assets/index-DYgX7tdP.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-Pa-PXhYt.js";import{O as t}from"./OutboxPane-Ceq0teEA.js";import"./roving-focus-xdT_hFx-.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./search-scope-B5-OK3Cq.js";import"./circle-check-big-Li9WrqhW.js";import"./clock-BZGi8qZp.js";import"./row-actions-CPjrTXH5.js";import"./rotate-ccw-BGnoQrsd.js";import"./NavMenuButton-CNrrDR3O.js";import"./menu-C_ItFy3L.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function c(){return o.jsx(t.Reading,{})}export{c as component};
|
package/assets/index-Da-HpnDm.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-Pa-PXhYt.js";import{M as r}from"./MailboxPane-CU_5z2WT.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-YILSa993.js";import"./circle-check-big-Li9WrqhW.js";import"./refresh-cw-WQWjOiDL.js";import"./useQueries-DLtTi8je.js";import"./MailListHeader-CDRRsdUl.js";import"./roving-focus-xdT_hFx-.js";import"./search-token-index-DH9ZHWHu.js";import"./useLayoutTier-CqqMDWMQ.js";import"./attachment-file-D4ltwNwP.js";import"./mail-CUfpnKmW.js";import"./avatar-kb7BRIj-.js";import"./index-CLDSMpwb.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./EmptyState-B51IVrJy.js";import"./ErrorState-DsBtijJZ.js";import"./download-CkEmIWry.js";import"./calendar-event-chip-BBHc41iQ.js";import"./calendar-color-C9vd3NQU.js";import"./map-pin-BAQN6x3n.js";import"./attendee-row-CGWfa3DU.js";import"./clock-BZGi8qZp.js";import"./shield-check-CdBctVu5.js";import"./useFilters-EUeKL3LS.js";import"./confirm-dialog-BP0RGVB7.js";import"./menu-C_ItFy3L.js";import"./MailViewChrome-wm5gxQlP.js";import"./NavMenuButton-CNrrDR3O.js";import"./useLabels-DXD0xTLQ.js";import"./useSemanticSearch-681BpGBX.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-EOczQGoU.js";import"./circle-help-6lT0PZTp.js";import"./circle-check-TN2pLSAm.js";function Q(){return o.jsx(r.Reading,{})}export{Q as component};
|
package/assets/index-TJzptkez.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-Pa-PXhYt.js";import{F as r}from"./FlaggedPane-CeJ0lxX3.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./search-scope-B5-OK3Cq.js";import"./MailListHeader-CDRRsdUl.js";import"./roving-focus-xdT_hFx-.js";import"./search-token-index-DH9ZHWHu.js";import"./useLayoutTier-CqqMDWMQ.js";import"./useQueries-DLtTi8je.js";import"./attachment-file-D4ltwNwP.js";import"./mail-CUfpnKmW.js";import"./avatar-kb7BRIj-.js";import"./index-CLDSMpwb.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./EmptyState-B51IVrJy.js";import"./ErrorState-DsBtijJZ.js";import"./download-CkEmIWry.js";import"./calendar-event-chip-BBHc41iQ.js";import"./calendar-color-C9vd3NQU.js";import"./map-pin-BAQN6x3n.js";import"./attendee-row-CGWfa3DU.js";import"./clock-BZGi8qZp.js";import"./shield-check-CdBctVu5.js";import"./useFilters-EUeKL3LS.js";import"./confirm-dialog-BP0RGVB7.js";import"./menu-C_ItFy3L.js";import"./MailViewChrome-wm5gxQlP.js";import"./refresh-cw-WQWjOiDL.js";import"./wizard-selection-DxUM65kM.js";function I(){return o.jsx(r.Reading,{})}export{I as component};
|
package/assets/index-ifhhvbnN.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./index-Pa-PXhYt.js";import{M as i}from"./MailboxPane-CU_5z2WT.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./search-scope-B5-OK3Cq.js";import"./useRefreshControl-YILSa993.js";import"./circle-check-big-Li9WrqhW.js";import"./refresh-cw-WQWjOiDL.js";import"./useQueries-DLtTi8je.js";import"./MailListHeader-CDRRsdUl.js";import"./roving-focus-xdT_hFx-.js";import"./search-token-index-DH9ZHWHu.js";import"./useLayoutTier-CqqMDWMQ.js";import"./attachment-file-D4ltwNwP.js";import"./mail-CUfpnKmW.js";import"./avatar-kb7BRIj-.js";import"./index-CLDSMpwb.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./EmptyState-B51IVrJy.js";import"./ErrorState-DsBtijJZ.js";import"./download-CkEmIWry.js";import"./calendar-event-chip-BBHc41iQ.js";import"./calendar-color-C9vd3NQU.js";import"./map-pin-BAQN6x3n.js";import"./attendee-row-CGWfa3DU.js";import"./clock-BZGi8qZp.js";import"./shield-check-CdBctVu5.js";import"./useFilters-EUeKL3LS.js";import"./confirm-dialog-BP0RGVB7.js";import"./menu-C_ItFy3L.js";import"./MailViewChrome-wm5gxQlP.js";import"./NavMenuButton-CNrrDR3O.js";import"./useLabels-DXD0xTLQ.js";import"./useSemanticSearch-681BpGBX.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-EOczQGoU.js";import"./circle-help-6lT0PZTp.js";import"./circle-check-TN2pLSAm.js";function S(){return o.jsx(i.Reading,{})}export{S as component};
|
package/assets/index-rT6iKaqw.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{eI as o,j as r}from"./index-Pa-PXhYt.js";import{O as m}from"./OpenCalendarEvent-CmcmB0nH.js";import"./CalendarComposePane-DMpEx0pI.js";import"./window-vYbNZDbX.js";import"./ErrorState-DsBtijJZ.js";import"./calendar-color-C9vd3NQU.js";import"./attendee-row-CGWfa3DU.js";import"./avatar-kb7BRIj-.js";import"./clock-BZGi8qZp.js";import"./map-pin-BAQN6x3n.js";import"./mail-CUfpnKmW.js";import"./pencil-wopYA3tK.js";import"./useCalendars-300H4qIk.js";import"./useCalendarData-C2bHSfW2.js";import"./useQueries-DLtTi8je.js";function R(){const{calendarObjectId:t}=o.useParams();return r.jsx(m,{calendarObjectId:t})}export{R as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{q as n,h as i,u as a,r as m,j as s}from"./index-Pa-PXhYt.js";import{O as p}from"./OnboardingWizard-BGI6h1dq.js";import{c}from"./onboarding-completion-B5FZtUux.js";import"./kbd-BptaoNeb.js";import"./credential-steps-_Bfnkria.js";import"./card-Yo3XEg6b.js";import"./account-form-helpers-DhckT_PN.js";import"./mail-CUfpnKmW.js";import"./file-json-CGnHrwAf.js";function O(){const o=n(),e=i(),t=a(),r=m.useCallback(l=>{c({queryClient:e,recordCompleted:()=>o.recordEvent("onboarding.completed"),navigateToInbox:()=>{window.location.assign("/mail")}})},[o,e]);return s.jsx(p,{skipWelcome:!1,onComplete:r,onImportConfig:()=>{t({to:"/import"})}})}export{O as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as o,O as i}from"./index-Pa-PXhYt.js";import{a as m}from"./MailShell-K5p0Mrz6.js";import{u as p,O as t}from"./OutboxPane-Ceq0teEA.js";import{u as s}from"./search-mirror-D9T_QTSg.js";import"./FullCompose-utRdyTob.js";import"./ErrorState-DsBtijJZ.js";import"./index-CLDSMpwb.js";import"./useMessageBodyContent-CqnK7vFx.js";import"./useSignature-DL3dYCSH.js";import"./account-form-helpers-DhckT_PN.js";import"./useDebouncedValue-B17cbPWx.js";import"./sections-BbwJeaVs.js";import"./confirm-dialog-BP0RGVB7.js";import"./roving-focus-xdT_hFx-.js";import"./useSearchTokenContext-sk7n5_Wa.js";import"./kbd-BptaoNeb.js";import"./search-scope-B5-OK3Cq.js";import"./circle-check-big-Li9WrqhW.js";import"./clock-BZGi8qZp.js";import"./row-actions-CPjrTXH5.js";import"./rotate-ccw-BGnoQrsd.js";import"./NavMenuButton-CNrrDR3O.js";import"./menu-C_ItFy3L.js";import"./outbox-status-BlKn6P0x.js";import"./search-query-Cr_ZXBCp.js";function v(){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{v as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l,j as m,a3 as U,t as k,cd as V,X as _,ce as A,cf as G,cg as Q,ch as z,ci as X,aa as x,u as J,cj as Y,ck as w,cl as W,G as Z,ad as ee,K as M,af as te,ag as ne,C as se,cm as N}from"./index-Pa-PXhYt.js";import{s as oe,S as re}from"./search-scope-B5-OK3Cq.js";import{a as ae}from"./useLayoutTier-CqqMDWMQ.js";import{u as K}from"./useQueries-DLtTi8je.js";const ie=[{action:"focusNext",keys:["j","k"],label:"navigate"},{action:"muteSender",keys:["m"],label:"mute"},{action:"help",keys:["?"],label:"all shortcuts"}];function we(e){return ie.filter(t=>e[t.action]!==void 0)}const ce=[{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 le(e){for(const t of ce){const n=t.hints.find(s=>s.action===e);if(n)return n.keys}}function ue(e){const t=le(e);return!t||t.length===0?"":t.length===1?t[0]??"":t[0]==="g"?t.join(" then "):t.join("")}function Ie(e){const t=ue(e);return t===""?"":`(${t})`}function de({key:e,shiftKey:t=!1,repeat:n=!1,caretAtStart:s,hasValue:a,chipCount:o}){const i=o-1;return e==="Escape"?a?{type:"clearQuery"}:{type:"blur"}:e==="Tab"&&t?o===0?{type:"none"}:{type:"focusChip",index:i}:e==="Backspace"||e==="ArrowLeft"?!s||o===0?{type:"none"}:n?{type:"none"}:{type:"focusChip",index:i}:{type:"none"}}function fe({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 pe(e,t){const n=t-1;return n<=0?null:e<n?e:n-1}const me=e=>e instanceof HTMLElement?e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable:!1,he=({chips:e=[],onRemoveChip:t,value:n,onChange:s,onClear:a,onClearQuery:o,placeholder:i="Search mail...",globalFocusKey:u=!0,showClearButton:p=!0,size:h="sm",inputId:d,suggest:f,className:b})=>{const L=l.useId(),R=d??L,I=l.useRef(null),j=l.useRef([]),P=o??a,[F,C]=l.useState(null),v=l.useRef(void 0),[$,O]=l.useState(""),T=e.length>0;l.useEffect(()=>{C(r=>r!==null&&r>=e.length?null:r)},[e.length]),l.useEffect(()=>{const r=v.current;if(r!==void 0){if(v.current=void 0,r===null){I.current?.focus();return}j.current[r]?.focus()}});const D=l.useRef(void 0);l.useEffect(()=>{const r=f?.caret;if(!r||r===D.current)return;D.current=r;const c=I.current;!c||c.ownerDocument.activeElement!==c||(c.setSelectionRange(r.cursor,r.cursor),f?.onCaretChange(r.cursor))});const S=r=>{f?.onCaretChange(r.selectionStart??r.value.length)},g=l.useCallback(r=>{C(r),v.current=r},[]),E=l.useCallback(r=>{const c=e[r];c&&t&&(g(pe(r,e.length)),O(`${c.label} removed`),t(c.id))},[e,t,g]),q=l.useCallback(()=>{g(null),a()},[a,g]),B=l.useCallback(r=>{const c=r.currentTarget;if(f?.onKeyDown(r))return;const y=de({key:r.key,shiftKey:r.shiftKey,repeat:r.repeat,caretAtStart:c.selectionStart===0&&c.selectionEnd===0,hasValue:n.length>0,chipCount:e.length});switch(y.type){case"focusChip":r.preventDefault(),g(y.index);return;case"clearQuery":P();return;case"blur":c.blur();return;case"none":return}},[e.length,n,P,g,f]),H=l.useCallback(r=>c=>{const y=fe({key:c.key,repeat:c.repeat,index:r,chipCount:e.length});switch(y.type!=="none"&&c.preventDefault(),y.type){case"removeChip":E(y.index);return;case"focusChip":g(y.index);return;case"focusInput":g(null);return;case"activateChip":return;case"none":return}},[e,E,g]);return l.useEffect(()=>{if(!u)return;const r=c=>{c.key!=="/"||c.metaKey||c.ctrlKey||c.altKey||me(c.target)||A("focusSearch")||(c.preventDefault(),I.current?.focus())};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[u]),m.jsxs("label",{htmlFor:R,className:k("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",h==="lg"?"rounded-xl px-4 py-2":"rounded-md px-2.5 py-1",b),children:[m.jsx(U,{className:k("shrink-0 text-fg-muted pointer-events-none",h==="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((r,c)=>m.jsx(V,{ref:y=>{j.current[c]=y},label:r.label,tone:r.tone,focused:F===c,onFocusLabel:()=>C(c),onKeyDown:H(c),onRemove:()=>E(c)},r.id))}),m.jsx("input",{ref:I,id:R,name:"q",type:"text","aria-label":"Search mail",autoComplete:"off",value:n,tabIndex:F===null?0:-1,onChange:r=>{s(r.target.value),S(r.target)},onKeyDown:B,onKeyUp:r=>S(r.currentTarget),onClick:r=>S(r.currentTarget),onFocus:r=>{C(null),f?.onFocusChange?.(!0),S(r.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)&&p&&m.jsx("button",{type:"button",onClick:q,className:"shrink-0 rounded p-0.5 hover:bg-surface-raised transition-colors","aria-label":"Clear search",children:m.jsx(_,{className:k("text-fg-muted",h==="lg"?"size-5":"size-4")})}),m.jsx("span",{role:"status","aria-live":"polite",className:"sr-only",children:$})]})},Ce=({value:e,onChange:t,onClear:n,onClearQuery:s,chips:a,onRemoveChip:o,placeholder:i="Search mail...",globalFocusKey:u=!0,showClearButton:p=!0,size:h,inputId:d,suggest:f,className:b})=>m.jsx(he,{value:e,onChange:t,onClear:n,onClearQuery:s,chips:a,onRemoveChip:o,placeholder:i,globalFocusKey:u,showClearButton:p,size:h,inputId:d,suggest:f,className:b});function Se({handlers:e,enabled:t=!0,target:n,sequenceTimeoutMs:s=1e3}){const a=l.useRef(e);a.current=e;const o=l.useRef(null),i=l.useRef(null);l.useEffect(()=>{if(!t)return;const u=()=>{i.current!==null&&(clearTimeout(i.current),i.current=null)},p=d=>{const f=G({key:d.key,shiftKey:d.shiftKey,metaKey:d.metaKey,ctrlKey:d.ctrlKey,altKey:d.altKey,inEditable:z(d.target),onControl:Q(d.target)},o.current);if(X().length>0){u(),o.current=null;return}if(u(),o.current=f.nextPrefix,f.nextPrefix!==null&&(i.current=setTimeout(()=>{o.current=null,i.current=null},s)),f.action===null||A(f.action)!==null)return;const b=a.current[f.action];b&&(f.preventDefault&&d.preventDefault(),b())},h=n===void 0?window:n;if(h!==null)return h.addEventListener("keydown",p),()=>{h.removeEventListener("keydown",p),u(),o.current=null}},[t,s,n])}function ve(){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/$mailboxId/$threadId",shouldThrow:!1}),o=x({from:"/mail/$mailboxId/$threadId/$messageId",shouldThrow:!1}),i=e?.threadId??n?.threadId??a?.threadId,u=t?.messageId??s?.messageId??o?.messageId;return l.useMemo(()=>i?{threadId:i,messageId:u}:void 0,[i,u])}function Te(){const e=J(),t=Y(),{list:n,mailboxId:s}=w();return l.useCallback((a,o)=>{const i=o?.query,p={search:d=>i===void 0?d:{...d,q:i||void 0},hash:t,replace:o?.replace??!1};if(n==="flagged"){e({to:"/mail/flagged/$threadId/$messageId",params:a,...p});return}const h=o?.mailboxId??s;if(n==="mailbox"&&h){e({to:"/mail/$mailboxId/$threadId/$messageId",params:{mailboxId:h,...a},...p});return}e({to:"/mail/brief/$threadId/$messageId",params:a,...p})},[e,t,n,s])}function Ee(){return W()}const Ne=({trigger:e,children:t,align:n="right"})=>{const[s,a]=l.useState(!1),o=l.useRef(null),i=l.useCallback(u=>{o.current&&!o.current.contains(u.target)&&a(!1)},[]);return Z({id:"dropdown-menu",open:s,answers:{back:()=>a(!1)}}),l.useEffect(()=>(s&&document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)),[s,i]),m.jsxs("div",{ref:o,className:"relative",children:[m.jsx("button",{type:"button",onClick:u=>{u.stopPropagation(),a(!s)},className:k("p-1.5 min-h-11 min-w-11 inline-flex items-center justify-center rounded-md transition-colors","hover:bg-surface-raised text-fg-muted hover:text-fg"),children:e}),s&&m.jsx("div",{className:k("absolute z-50 mt-1 min-w-[180px] py-1","bg-surface border border-line rounded-md shadow-lg",n==="right"?"right-0":"left-0"),children:t})]})},Me=({onClick:e,disabled:t,destructive:n,children:s})=>m.jsx("button",{type:"button",onClick:a=>{a.stopPropagation(),t||e()},disabled:t,className:k("w-full px-3 py-2 text-left text-sm transition-colors","flex items-center gap-2",t&&"opacity-50 cursor-not-allowed",!t&&"hover:bg-surface-raised",n&&"text-danger hover:text-danger"),children:s}),Ke=()=>m.jsx("div",{className:"my-1 h-px bg-line"}),ge=({accounts:e})=>{const{list:t,mailboxId:n}=w(),{t:s}=ee("mail",{useSuspense:!1}),a=l.useCallback((i,u)=>s(i,{defaultValue:u}),[s]),o=K({queries:e.map(i=>({...M({path:{accountId:i.accountId}}),staleTime:1/0}))});if(t==="outbox")return"Outbox";if(!n)return null;for(let i=0;i<e.length;i++){const u=o[i]?.data?.items;if(!u)continue;const p=u.find(d=>d.mailboxId===n);if(!p)continue;const h=te(e[i].folderAppointments);return ne(p,h.get(n),a)}return null},Re=({accounts:e})=>{const{mailboxId:t}=w(),n=K({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 o=a.find(i=>i.mailboxId===t);if(o)return o.unseenCount}return null},je=({accounts:e})=>{const{mailboxId:t}=w(),n=K({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 o=a.find(i=>i.mailboxId===t);if(o)return o.messageCount}return 0};function Pe(e){const t=ae(),{searchInput:n}=se(),s=ge({accounts:e}),a=w(),o=l.useMemo(()=>oe(a,s),[a,s]),i=l.useCallback(u=>{u===re&&t(n)},[t,n]);return{scope:o,clearScope:i}}function Fe(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 De(e){const t=new Map;for(const n of e)for(const s of n){const a=s.fullPath?.toLowerCase();if(!a)continue;const o=N(s).toLowerCase();t.has(a)||t.set(a,s.mailboxId),t.has(o)||t.set(o,s.mailboxId)}return t}function Ae(e,t=[]){const n=e.flat().filter(o=>o.fullPath),s=new Map;for(const o of n){const i=N(o).toLowerCase();s.set(i,(s.get(i)??0)+1)}const a=new Map(t.map(o=>[o.accountId,o.email]));return n.map(o=>{const i=N(o),u=s.get(i.toLowerCase())===1,p=t.length>1?a.get(o.accountId):void 0;return{value:u?i:o.fullPath,label:o.displayNameOverride?.trim()||i,...p?{hint:p}:{}}})}function Le(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,o=n.displayName?.trim();return{value:a?s:n.email,label:o||n.email,...o?{hint:n.email}:{}}})}export{Ne as D,ce as K,Ce as S,Ke as a,Me as b,De as c,ve as d,Se as e,Fe as f,Te as g,Ee as h,ge as i,Re as j,je as k,ie as l,Ae as m,Le as n,we as o,ue as s,Ie as t,Pe as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,O as o}from"./index-Pa-PXhYt.js";const n=()=>t.jsx(o,{});export{n as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as t,ao as e}from"./index-Pa-PXhYt.js";const s=()=>t.jsx(e,{to:"/settings/senders",replace:!0});export{s as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as r,u as s,r as o,bZ as t,b_ as n}from"./index-Pa-PXhYt.js";const p=r("BellOff",[["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"}]]);function l(){const e=s();return o.useCallback(a=>{e({to:"/mail/brief",search:{q:a||void 0}})},[e])}function h(){const e=s();return o.useCallback((a,i)=>{e({to:"/mail/$mailboxId",params:{mailboxId:a},search:{q:i||void 0}})},[e])}const c=768,d=e=>e!=="desktop",b=()=>{const e=t(`(min-width: ${c}px)`);return t(n)?"desktop":e?"tablet":"phone"};export{p as B,l as a,h as b,d as i,b as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as E,a0 as K,t as W,f as U,r as o,aQ as R,h as N,C as $,E as z,F as B,q as G,P as I,Q as X,R as V,S as J}from"./index-Pa-PXhYt.js";import{C as Y}from"./circle-check-big-Li9WrqhW.js";import{R as Z}from"./refresh-cw-WQWjOiDL.js";import{u as P}from"./useQueries-DLtTi8je.js";function ye({state:e,onRefresh:s,label:t,errorMessage:r,hasUpdate:a,size:u="sm",className:c}){const i=e==="refreshing",n=e==="error",h=e==="success",S=n?E.jsx(K,{className:"size-4 text-danger"}):h?E.jsx(Y,{className:"size-4 text-positive"}):E.jsx(Z,{className:W("size-4",i&&"animate-spin")}),w=n?`${t} — failed: ${r??"try again"}`:i?`${t} — refreshing`:h?`${t} — up to date`:a?`${t} — new mail`:t;return E.jsxs("div",{className:"relative inline-flex",children:[E.jsx(U,{variant:"ghost",size:u,icon:S,onClick:s,disabled:i,"aria-label":w,"aria-busy":i||void 0,title:n?r:t,className:c}),e==="idle"&&a&&E.jsx("span",{"aria-hidden":"true",className:"absolute right-1 top-1 size-1.5 rounded-full bg-accent-2"})]})}const ee=new Set(["discovering_mailboxes","syncing_inbox","syncing_others"]);function L(e){return!!e&&ee.has(e)}const F=3e3,te=F*2,T={syncing:!1,resolved:!1,synced:0,total:0};function we(e,s){const t=e.join(","),[r,a]=o.useState(!1),[u,c]=o.useState(!1);o.useEffect(()=>{a(!1),c(!1)},[t,s]),o.useEffect(()=>{if(!s)return;const m=setTimeout(()=>c(!0),te);return()=>clearTimeout(m)},[t,s]);const i=P({queries:e.map(m=>({...R({path:{accountId:m}}),enabled:s&&!r,refetchInterval:F,meta:{softError:!0}}))}),n=i.every(m=>m.isSuccess||m.isError),h=i.length===0||n||u;let S=!1,w=0,y=0;for(const m of i)if(L(m.data?.syncPhase)){S=!0;for(const l of m.data?.mailboxes??[])w+=l.messagesSynced,y+=l.messagesTotal}const x=s&&h&&!S;return o.useEffect(()=>{x&&a(!0)},[x]),!s||!h?T:{syncing:S,resolved:!0,synced:w,total:y}}const se=180*1e3,xe=30*1e3;let q=0;const M=new Set,ne=(e=Date.now())=>{q=e+se;for(const s of M)s()},pe=(e=Date.now())=>e<q,Ee=e=>(M.add(e),()=>{M.delete(e)}),C=6e4,re=new Set(["sent","drafts","trash","archive"]),_=(e,s)=>{const t=new Map;for(const r of e){const a=s.get(r.mailboxId)?.role;a&&re.has(a)||t.set(r.mailboxId,r.messagesTotal)}return t},j=(e,s)=>{const t=[];for(const[r,a]of s)a>(e.get(r)??0)&&t.push(r);return t},oe=(e,s)=>j(e,s).length>0,D=o.createContext(null),ae=()=>{const e=o.useContext(D);if(!e)throw new Error("useMailFreshness must be used inside <MailFreshnessProvider>");return e};function be({accountIds:e,children:s}){const t=N(),{resultFolderIndex:r}=$(),a=o.useRef(new Map),u=o.useRef(new Set),c=o.useRef(new Map),[i,n]=o.useState(new Set),h=P({queries:e.map(l=>({...R({path:{accountId:l}}),refetchInterval:C,staleTime:C,meta:{softError:!0}}))}),S=h.map(l=>l.dataUpdatedAt).join(","),w=e.join(",");o.useEffect(()=>{let l=!1;const f=new Set(i);e.forEach((d,p)=>{const b=h[p]?.data;if(!b)return;const g=_(b.mailboxes??[],r),k=c.current.get(d);if(c.current.set(d,g),k){const A=j(k,g);A.length>0&&z(t,B(A))}if(!u.current.has(d)){u.current.add(d),a.current.set(d,g);return}if(f.has(d))return;const Q=a.current.get(d)??new Map;oe(Q,g)&&(f.add(d),l=!0)}),l&&n(f)},[w,S]);const y=o.useCallback(l=>l.some(f=>i.has(f)),[i]),x=o.useCallback(l=>{n(f=>{if(l.every(p=>!f.has(p)))return f;const d=new Set(f);for(const p of l)d.delete(p);return d});for(const f of l){const d=t.getQueryData(R({path:{accountId:f}}).queryKey);a.current.set(f,_(d?.mailboxes??[],r)),u.current.add(f)}},[t,r]),m=o.useMemo(()=>({hasNewMail:y,acknowledge:x}),[y,x]);return E.jsx(D.Provider,{value:m,children:s})}const ie=2e3,ce=45e3,ue=e=>new Promise(s=>setTimeout(s,e)),v=e=>e instanceof Error&&e.message?e.message:"Something went wrong",le=e=>{V(e,{softError:!0},"user")&&J(e)},O=(e,s)=>e.fetchQuery({...R({path:{accountId:s}}),staleTime:0}),H=e=>e.mailboxes?.find(s=>s.fullPath?.toUpperCase()==="INBOX")?.lastSyncedAt??0,fe=async({accountId:e,readStatus:s,baselineLastSyncAt:t,baselineInboxSyncedAt:r=0,onInboxSynced:a,deadline:u,pollMs:c=ie})=>{let i=!1;for(;;){const n=await s().then(y=>({ok:!0,data:y})).catch(y=>({ok:!1,error:y}));if(!n.ok)return{accountId:e,message:v(n.error)};const{syncPhase:h,lastSyncAt:S}=n.data;if((S??0)>t&&!L(h))return h==="error"?{accountId:e,message:"Sync failed for this account"}:void 0;if(!i&&H(n.data)>r&&(i=!0,a?.()),Date.now()>=u)return{accountId:e,message:"Refresh is taking longer than usual"};await ue(c)}},de=async(e,s,t,r,a)=>{const u=await O(e,t).then(n=>({ok:!0,lastSyncAt:n.lastSyncAt??0,inboxSyncedAt:H(n)})).catch(n=>({ok:!1,error:n}));if(!u.ok)return{accountId:t,enqueued:!1,ok:!1,message:v(u.error)};const c=await I({path:{accountId:t},throwOnError:!0}).then(()=>({ok:!0})).catch(n=>({ok:!1,error:n}));if(!c.ok)return le(c.error),{accountId:t,enqueued:!1,ok:!1,message:v(c.error)};s.recordEvent("sync.triggered");const i=await fe({accountId:t,readStatus:()=>O(e,t),baselineLastSyncAt:u.lastSyncAt,baselineInboxSyncedAt:u.inboxSyncedAt,onInboxSynced:()=>a(t),deadline:r});return i?{accountId:t,enqueued:!0,ok:!1,message:i.message}:{accountId:t,enqueued:!0,ok:!0}},Re=(e,s={})=>{const t=N(),r=G(),{acknowledge:a}=ae(),[u,c]=o.useState("idle"),[i,n]=o.useState(),h=o.useRef(0),S=o.useRef(e);S.current=e;const w=o.useRef(s);w.current=s,o.useEffect(()=>{if(u!=="success")return;const x=setTimeout(()=>c("idle"),2e3);return()=>clearTimeout(x)},[u]);const y=o.useCallback(()=>{const x=S.current;if(x.length===0){c("error"),n("Nothing to refresh yet");return}const m=++h.current;c("refreshing"),n(void 0),ne();const l=f=>{h.current===m&&(t.invalidateQueries({queryKey:X({path:{accountId:f}})}),w.current.onSettled?.())};(async()=>{const f=Date.now()+ce,d=await Promise.all(x.map(g=>de(t,r,g,f,l)));if(h.current!==m)return;const p=d.filter(g=>g.enqueued).map(g=>g.accountId);for(const g of p)l(g);p.length>0&&a(p);const b=d.filter(g=>!g.ok);b.length===0?c("success"):(c("error"),n(b[0]?.message))})()},[a,t,r]);return{state:u,errorMessage:i,refresh:y}};export{xe as H,be as M,ye as R,Re as a,L as b,we as c,pe as i,Ee as s,ae as u};
|