@remit/web-client-dist 0.0.653 → 0.0.654
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-Bnl8KWnm.js → BriefPane-BCUzDi0M.js} +1 -1
- package/assets/{CalendarComposePane-DprKFFto.js → CalendarComposePane-B1ugPLuI.js} +1 -1
- package/assets/{CalendarComposeSeed-D9pQN8cn.js → CalendarComposeSeed-ew4UkM1t.js} +1 -1
- package/assets/{CalendarShell-DK2BWBTT.js → CalendarShell-WRxn9sjQ.js} +1 -1
- package/assets/{EmptyState-CwCbNMwE.js → EmptyState-CMwh4I6q.js} +1 -1
- package/assets/{ErrorState-qRnIOayy.js → ErrorState-DNFHspWz.js} +1 -1
- package/assets/{FlaggedPane-jvSK43mR.js → FlaggedPane-aTIJMuGv.js} +1 -1
- package/assets/{FullCompose-dcB2RcRV.js → FullCompose-CUyyOEnC.js} +1 -1
- package/assets/MailListHeader-CQDSlr9k.js +1 -0
- package/assets/{MailNav-9mIaR9nW.js → MailNav-D416fImS.js} +1 -1
- package/assets/{MailShell-CpmNbM7h.js → MailShell-BIvJeWyL.js} +1 -1
- package/assets/MailViewChrome-UR-zeB42.js +1 -0
- package/assets/{MailboxPane-Dop2VAEg.js → MailboxPane-CRU0WI2x.js} +1 -1
- package/assets/{NavMenuButton-DF_D480Q.js → NavMenuButton-cJikUtSJ.js} +1 -1
- package/assets/{OnboardingWizard-BlolFeH8.js → OnboardingWizard-CvMVsMKT.js} +1 -1
- package/assets/{OpenCalendarEvent-dtjwzRgW.js → OpenCalendarEvent-D1sZ-GRa.js} +1 -1
- package/assets/{OutboxPane-CgzHrFCk.js → OutboxPane-C4u8rDUe.js} +1 -1
- package/assets/_calendarObjectId-DeczpyzI.js +1 -0
- package/assets/_mailboxId-D7I6Z8or.js +1 -0
- package/assets/_messageId-Ct8MFOUe.js +1 -0
- package/assets/_messageId-DJ-aFrnQ.js +1 -0
- package/assets/_messageId-DRWuvk3z.js +1 -0
- package/assets/_outboxMessageId-C60Dbo5n.js +1 -0
- package/assets/_recurrenceId-De85aUmF.js +1 -0
- package/assets/_threadId-DVG1-e5_.js +1 -0
- package/assets/_threadId-DxKICXZb.js +1 -0
- package/assets/_threadId-Jo0fuO40.js +1 -0
- package/assets/{_view._date-Lwq96zs_.js → _view._date-DwMOgKWO.js} +1 -1
- package/assets/{accounts-CX73Riqc.js → accounts-DnHZ103b.js} +1 -1
- package/assets/{advanced-lMbfngw0.js → advanced-BZVf3_ew.js} +1 -1
- package/assets/{appearance-BqLsfVlF.js → appearance-BkMHHUQG.js} +1 -1
- package/assets/{attendee-row-CWvzYrHl.js → attendee-row-DwrxHoUg.js} +1 -1
- package/assets/{avatar-BPBkYGiM.js → avatar--cs-SUmT.js} +1 -1
- package/assets/{bell-off-BhceOCke.js → bell-off-BKU5bR5P.js} +1 -1
- package/assets/{bottom-sheet-1LZPPKZQ.js → bottom-sheet-0Pbsps2C.js} +1 -1
- package/assets/{brief-BU42BeF8.js → brief-BQzN81ti.js} +1 -1
- package/assets/brief-DacITFQv.js +1 -0
- package/assets/{browser-ponyfill-O6nwU-ax.js → browser-ponyfill-p-64afd7.js} +1 -1
- package/assets/{bug-Dn7VhRe_.js → bug-BM6kTzR1.js} +1 -1
- package/assets/{calendar-clash-strip-Djxxy9JD.js → calendar-clash-strip-CkTpKwDu.js} +1 -1
- package/assets/{calendar-format-BTEE4x_-.js → calendar-format-D1akKqM4.js} +1 -1
- package/assets/{calendar-report-CeaS5tVm.js → calendar-report-BxH5o5N9.js} +1 -1
- package/assets/{calendar-suggestion-DmwOD7CT.js → calendar-suggestion-BBxpels5.js} +1 -1
- package/assets/{calendar-BZmNKe44.js → calendar-wEZJHgZd.js} +1 -1
- package/assets/{calendars-Dt54nxCW.js → calendars-_ehKrD55.js} +1 -1
- package/assets/{card-CD-IbYhn.js → card-BRSJ5q6Y.js} +1 -1
- package/assets/{checkbox-BUYJAWmY.js → checkbox-C0271RkP.js} +1 -1
- package/assets/chevron-left-CBtM03_z.js +1 -0
- package/assets/{circle-check-CTCuTEzZ.js → circle-check-DLOMzuPE.js} +1 -1
- package/assets/{circle-check-big-enwr5eao.js → circle-check-big-9X205Z9_.js} +1 -1
- package/assets/{circle-help-CdQnDpWa.js → circle-help-CgV1hMay.js} +1 -1
- package/assets/{clock-sCt61zmc.js → clock-ClfQ7Jbl.js} +1 -1
- package/assets/compose._-_outboxMessageId_-BNTqM-P_.js +1 -0
- package/assets/compose._-_outboxMessageId_-DI6GUA-E.js +1 -0
- package/assets/compose._-_outboxMessageId_-DOpa6FMd.js +1 -0
- package/assets/compose._-_outboxMessageId_-DZufPrdW.js +1 -0
- package/assets/{config-import-CTjPgGfx.js → config-import-DIW3FsTi.js} +1 -1
- package/assets/{confirm-dialog-3lsFfeae.js → confirm-dialog-B6ufQwtY.js} +1 -1
- package/assets/{copy-CFY2KJ76.js → copy-BZbhH6Ym.js} +1 -1
- package/assets/{credential-steps-DUKM3B_3.js → credential-steps-CLyostoZ.js} +1 -1
- package/assets/{download-BlVMjQYn.js → download-q4beFGPw.js} +1 -1
- package/assets/{file-json-Cw7Stw8Y.js → file-json-Cr3Di1SH.js} +1 -1
- package/assets/{filters-CMw54RPC.js → filters-CS7oyBbO.js} +1 -1
- package/assets/{flagged-CA8JmDLT.js → flagged-B51af1d3.js} +1 -1
- package/assets/flagged-DAH9z1uI.js +1 -0
- package/assets/{folders-IAY61u32.js → folders-CcL8X3l0.js} +1 -1
- package/assets/{help-copy-CDqz6ba_.js → help-copy-DZD1c-_z.js} +1 -1
- package/assets/{import-Bu4uKL7o.js → import-B4BXF_lv.js} +1 -1
- package/assets/index-2WD-tMjp.js +1 -0
- package/assets/{index-C5_g27B8.js → index-B4JdswHn.js} +69 -69
- package/assets/index-BKvALb75.js +1 -0
- package/assets/index-BsArebdo.js +1 -0
- package/assets/index-CTeV_UBP.js +1 -0
- package/assets/index-CgcFzoeS.js +1 -0
- package/assets/index-CkiCGHOQ.js +1 -0
- package/assets/index-Ct8MFOUe.js +1 -0
- package/assets/index-CvUHal94.js +1 -0
- package/assets/index-DJ-aFrnQ.js +1 -0
- package/assets/{index-OSjyRZxI.js → index-DJ2xR7nc.js} +4 -4
- package/assets/{index-Dvf-CvNV.js → index-Dbbydebg.js} +1 -1
- package/assets/{kbd-jqBZOlP1.js → kbd-X2f0JsWs.js} +1 -1
- package/assets/{labels-B-W2dqFl.js → labels-5t-KGkVt.js} +1 -1
- package/assets/{mail-CcvcBJbI.js → mail-D4gulnME.js} +1 -1
- package/assets/{mail-q5Rt7EqC.js → mail-DweCDR9r.js} +1 -1
- package/assets/{map-pin-BA5B_mK8.js → map-pin-FVWIN_AF.js} +1 -1
- package/assets/{menu-BIJGP4SE.js → menu-D_kqgOpb.js} +1 -1
- package/assets/minus-BSNUE9Xs.js +1 -0
- package/assets/{new-rcK9WAAO.js → new-CeGWYhgd.js} +1 -1
- package/assets/onboarding-CCI1hadb.js +1 -0
- package/assets/{onboarding-completion-geMEcl6n.js → onboarding-completion-RARiUKZ6.js} +1 -1
- package/assets/outbox-rfU6Hb7A.js +1 -0
- package/assets/{pane-header-COuq-tzv.js → pane-header-DWAz5BQu.js} +1 -1
- package/assets/{pencil-CiS5g11i.js → pencil-C6lN6xpL.js} +1 -1
- package/assets/{popover-menu-DRzy2r2Z.js → popover-menu-ScZ5sdbz.js} +1 -1
- package/assets/{refresh-cw-DKxFpmVK.js → refresh-cw-CIdgQmhu.js} +1 -1
- package/assets/{rich-text-DrHbd8fY.js → rich-text-CdZh6WQc.js} +1 -1
- package/assets/{rich-text-spellcheck-worker-provider-BBACeUvm.js → rich-text-spellcheck-worker-provider-CnL9CIvx.js} +1 -1
- package/assets/{rotate-ccw-D8zDaEwL.js → rotate-ccw-GmGf70Zg.js} +1 -1
- package/assets/{roving-focus-CqEMo3iP.js → roving-focus-D2wkvRq-.js} +1 -1
- package/assets/{row-actions-CheKNT8A.js → row-actions-bd_6I1xJ.js} +1 -1
- package/assets/{search-mirror-CjDgpnnU.js → search-mirror-B7YqORh1.js} +1 -1
- package/assets/{search-token-index-cjyDSb-j.js → search-token-index--_Rh4aFK.js} +1 -1
- package/assets/{sections-CVGX9ZC8.js → sections-CLSd-RpI.js} +1 -1
- package/assets/{senders-Bevla-YR.js → senders-D13iRAyD.js} +1 -1
- package/assets/settings-AUDdkXM6.js +1 -0
- package/assets/{settings-screen-Bz3u_NFz.js → settings-screen-4QpOPg7q.js} +1 -1
- package/assets/{shield-check-CSsuNv3u.js → shield-check-8O6tctrF.js} +1 -1
- package/assets/{suggested-vips-DGV5x7YT.js → suggested-vips-2jf6a7qF.js} +1 -1
- package/assets/{suggestion._suggestionId-BceKo3d2.js → suggestion._suggestionId-Cr0xDyLN.js} +1 -1
- package/assets/{undo-2-wdBiM3tk.js → undo-2-svU5oJQZ.js} +1 -1
- package/assets/{useCalendarData-C0AlcSoY.js → useCalendarData-BIblGP77.js} +1 -1
- package/assets/{useCalendarFreeBusy-Cx7ARe2X.js → useCalendarFreeBusy-ziLEEc7D.js} +1 -1
- package/assets/{useCalendarWrites-Czr9-Ggx.js → useCalendarWrites-T903Es4q.js} +1 -1
- package/assets/{useCalendars-D7pSspdK.js → useCalendars-D81fvJ5t.js} +1 -1
- package/assets/{useDebouncedValue-C9ilgxxS.js → useDebouncedValue--hf0UzWb.js} +1 -1
- package/assets/{useFilters--Q8YjWe3.js → useFilters-Bj038H29.js} +1 -1
- package/assets/{useLabels-di8tfGtd.js → useLabels-C4frOkLu.js} +1 -1
- package/assets/{useLayoutTier-DZ3zd0wf.js → useLayoutTier-BtYfbCqz.js} +1 -1
- package/assets/{useMessageBodyContent-DrQHQtW0.js → useMessageBodyContent-CSShNM3z.js} +1 -1
- package/assets/{useQueries-DuyXe1gN.js → useQueries-DTupFckA.js} +1 -1
- package/assets/{useRefreshControl-DLSAPce4.js → useRefreshControl-CI_8sSKm.js} +1 -1
- package/assets/{useResultFolderIndex-DgNc7wol.js → useResultFolderIndex-pmQq0fuk.js} +1 -1
- package/assets/useSearchTokenContext-Cs4q-Qex.js +84 -0
- package/assets/{useSemanticSearch-B3Tgfrug.js → useSemanticSearch-BfPYzK04.js} +1 -1
- package/assets/{useSignature-Yr0ANAix.js → useSignature-Cn0_fTIF.js} +1 -1
- package/index.html +1 -1
- package/package.json +1 -1
- package/assets/MailListHeader-yK2jlwsk.js +0 -7
- package/assets/MailViewChrome-DvSA6Vpz.js +0 -1
- package/assets/_calendarObjectId-ChTiA0rP.js +0 -1
- package/assets/_mailboxId-tkmGqcjm.js +0 -1
- package/assets/_messageId-B9MdbBjg.js +0 -1
- package/assets/_messageId-CMcwpeY8.js +0 -1
- package/assets/_messageId-mTKPiQV2.js +0 -1
- package/assets/_outboxMessageId-BpTbjf6S.js +0 -1
- package/assets/_recurrenceId-KJTs9tOi.js +0 -1
- package/assets/_threadId-452TFU46.js +0 -1
- package/assets/_threadId-DLYmJ9hM.js +0 -1
- package/assets/_threadId-DmKfzJtw.js +0 -1
- package/assets/brief-Ke1ToYMd.js +0 -1
- package/assets/chevron-left-BCVTzsio.js +0 -1
- package/assets/compose._-_outboxMessageId_-7CL-g2G5.js +0 -1
- package/assets/compose._-_outboxMessageId_-ChwleO2v.js +0 -1
- package/assets/compose._-_outboxMessageId_-DbKs6GxP.js +0 -1
- package/assets/compose._-_outboxMessageId_-dCGsKFDO.js +0 -1
- package/assets/flagged-CUMrtAWn.js +0 -1
- package/assets/index-B9MdbBjg.js +0 -1
- package/assets/index-Bc4dq-Ut.js +0 -1
- package/assets/index-CMcwpeY8.js +0 -1
- package/assets/index-CQVZkxPD.js +0 -1
- package/assets/index-CapHg8CW.js +0 -1
- package/assets/index-CjAFt8m6.js +0 -1
- package/assets/index-GY6lxSbj.js +0 -1
- package/assets/index-Lnhqc2rh.js +0 -1
- package/assets/index-blcV1DC7.js +0 -1
- package/assets/minus-Bj7slPzA.js +0 -1
- package/assets/onboarding-BT2HVJhW.js +0 -1
- package/assets/outbox-CV3An6t8.js +0 -1
- package/assets/settings-Cru8pqDa.js +0 -1
- package/assets/useSearchTokenContext-C96BRNRB.js +0 -84
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,u as M,cm as O,cn as N,cN as B,a9 as y,co as P,q as U,ab as $,h as D,c as F,cO as v,cC as L}from"./index-
|
|
1
|
+
import{r as a,u as M,cm as O,cn as N,cN as B,a9 as y,co as P,q as U,ab as $,h as D,c as F,cO as v,cC as L}from"./index-B4JdswHn.js";const w="/mail/brief/compose/{-$outboxMessageId}",R="/mail/flagged/compose/{-$outboxMessageId}",E="/mail/outbox/compose/{-$outboxMessageId}",k="/mail/$mailboxId/compose/{-$outboxMessageId}";function T(){const e=y({from:w,shouldThrow:!1}),t=y({from:R,shouldThrow:!1}),r=y({from:E,shouldThrow:!1}),s=y({from:k,shouldThrow:!1});return e??t??r??s}function j(){return T()!==void 0}function J(){return T()?.outboxMessageId}function _(e,t,r){return e==="flagged"?{to:R,params:{outboxMessageId:r}}:e==="outbox"?{to:E,params:{outboxMessageId:r}}:e==="mailbox"&&t?{to:k,params:{mailboxId:t,outboxMessageId:r}}:{to:w,params:{outboxMessageId:r}}}function g(){const e=M(),t=O(),{list:r,mailboxId:s}=N();return a.useCallback((n,o)=>{e({..._(r,s,n),search:B,hash:o?.keepPanels?!0:t,replace:o?.replace??!1})},[e,t,r,s])}function V(){const e=g();return a.useCallback(()=>e(void 0),[e])}function Z(){const e=g();return a.useCallback(t=>e(t),[e])}function ee(){const e=g();return a.useCallback(t=>e(t,{replace:!0,keepPanels:!0}),[e])}function te(){return P()}const q=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 K=e=>{const t=Number.parseInt(e??"",10);return!Number.isFinite(t)||t<=0?1:Math.min(t,30)},Q=8,I="x-remit-403-reason",X=(e,t)=>{const r=t?.trim()??"";return e===401?"auth":e===403?r.length>0?"auth":"body-missing":e===404?"body-missing":"generic"},G=(e,t)=>(t??"").toLowerCase().startsWith("text/html")?/<div\s+id=["']root["']/i.test(e):!1,H=(e,t)=>{const r=(t??"").toLowerCase();return!!(e==="text"&&r.startsWith("text/html"))},W=async(e,t,r=async()=>null)=>{const s={},n=await r();n&&(s.Authorization=`Bearer ${n}`);const o=await L(e,{headers:s});if(o.status===202)throw new f("not-ready","Message body is still syncing",202,K(o.headers.get("Retry-After")));if(!o.ok){const l=o.headers.get(I),h=X(o.status,l);throw new f(h,`Failed to load message body (${o.status} ${o.statusText})`,o.status)}const c=o.headers.get("content-type");if(H(t,c))throw new f("content-type-mismatch",`Refusing to render message body — expected ${t}, got Content-Type ${c}`);const m=await o.text();if(G(m,c))throw new f("spa-shell-leak","Refusing to render message body — response looks like the SPA shell (CloudFront 403/404 fallback leaked through to /content/*)");return m},z=async(e,t)=>(t.isRetryAfterNotReady&&await e.refetchDescribeMessage(),e.fetchContent(t.contentUrl,t.kind)),se=({messageId:e,bodyParts:t,enabled:r=!0})=>{const s=t?q(t):null,n=U(),{getToken:o}=$(),c=a.useRef(null),m=D(),l=a.useRef(!1),h=a.useRef(null),C=e&&s?`${e}:${s.contentUrl}`:null;h.current!==C&&(h.current=C,l.current=!1);const i=F({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,z({fetchContent:(u,S)=>W(u,S,o),refetchDescribeMessage:()=>m.refetchQueries({queryKey:v({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<Q: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;a.useEffect(()=>{p&&(c.current=performance.now())},[p]),a.useEffect(()=>{i.isSuccess&&c.current!==null&&(n.recordTiming("message.body.load",Math.round(performance.now()-c.current)),c.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,j as a,se as b,X as c,J as d,ee as e,te as f,Z as g,V as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c2 as Q,c3 as y,c4 as S,c5 as w,c6 as C,h as k,c7 as q,c8 as x,r as p,c9 as M,ca as H,cb as L,cc as P,cd as O,ce as B,cf as A}from"./index-
|
|
1
|
+
import{c2 as Q,c3 as y,c4 as S,c5 as w,c6 as C,h as k,c7 as q,c8 as x,r as p,c9 as M,ca as H,cb as L,cc as P,cd as O,ce as B,cf as A}from"./index-B4JdswHn.js";function R(r,e){const s=new Set(e);return r.filter(t=>!s.has(t))}function T(r,e,s){const t=r.slice(0);return t[e]=s,t}var z=class extends Q{#i;#e;#n;#r;#s;#t;#o;#u;#h;#c=[];constructor(r,e,s){super(),this.#i=r,this.#r=s,this.#n=[],this.#s=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#s.forEach(r=>{r.subscribe(e=>{this.#d(r,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#s.forEach(r=>{r.destroy()})}setQueries(r,e){this.#n=r,this.#r=e,y.batch(()=>{const s=this.#s,t=this.#f(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=s.length!==i.length,a=i.some((o,d)=>o!==s[d]),f=u||a,b=f?!0:n.some((o,d)=>{const g=this.#e[d];return!g||!S(o,g)});!f&&!b||(f&&(this.#c=t,this.#s=i),this.#e=n,this.hasListeners()&&(f&&(R(s,i).forEach(o=>{o.destroy()}),R(i,s).forEach(o=>{o.subscribe(d=>{this.#d(o,d)})})),this.#p()))})}getCurrentResult(){return this.#e}getQueries(){return this.#s.map(r=>r.getCurrentQuery())}getObservers(){return this.#s}getOptimisticResult(r,e){const s=this.#f(r),t=s.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=s.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,e,i),()=>this.#a(t,s)]}#a(r,e){return e.map((s,t)=>{const i=r[t];return s.defaultedQueryOptions.notifyOnChangeProps?i:s.observer.trackResult(i,n=>{e.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,e,s){if(e){const t=this.#h,i=s!==void 0&&t!==void 0&&(t.length!==s.length||s.some((n,u)=>n!==t[u]));return(!this.#t||this.#e!==this.#u||i||e!==this.#o)&&(this.#o=e,this.#u=this.#e,s!==void 0&&(this.#h=s),this.#t=w(this.#t,e(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#s.some((r,e)=>r.options.suspense&&this.#e[e]?.data===void 0)}#f(r){const e=new Map;this.#s.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=e.get(i);n?n.push(t):e.set(i,[t])});const s=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=e.get(i.queryHash)?.shift()??new C(this.#i,i);s.push({defaultedQueryOptions:i,observer:u})}),s}#d(r,e){const s=this.#s.indexOf(r);s!==-1&&(this.#e=T(this.#e,s,e),this.#p())}#p(){if(this.hasListeners()){const r=this.#a(this.#e,this.#c),e=this.#b(),s=this.#t,t=e?s:this.#l(r,this.#r?.combine);(e||s!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#e)})})}}};function U({queries:r,...e},s){const t=k(),i=q(),n=x(),u=p.useMemo(()=>r.map(h=>{const c=t.defaultQueryOptions(h);return c._optimisticResults=i?"isRestoring":"optimistic",c}),[r,t,i]);u.forEach(h=>{M(h);const c=t.getQueryCache().get(h.queryHash);H(h,n,c)}),L(n);const[a]=p.useState(()=>new z(t,u,e)),[f,b,o]=a.getOptimisticResult(u,e.combine),d=!i&&e.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>d?a.subscribe(y.batchCalls(h)):P,[a,d]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),p.useEffect(()=>{a.setQueries(u,e)},[u,e,a]);const m=f.some((h,c)=>O(u[c],h))?f.flatMap((h,c)=>{const l=u[c];if(l&&O(l,h)){const E=new C(t,l);return B(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=f.find((h,c)=>{const l=u[c];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{U as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as E,a0 as K,t as Q,f as U,r as o,aT 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-
|
|
1
|
+
import{j as E,a0 as K,t as Q,f as U,r as o,aT 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-B4JdswHn.js";import{C as Y}from"./circle-check-big-9X205Z9_.js";import{R as Z}from"./refresh-cw-CIdgQmhu.js";import{u as P}from"./useQueries-DTupFckA.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=P({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)}),T=6e4,ne=new Set(["sent","drafts","trash","archive"]),_=(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=N(),{resultFolderIndex:n}=$(),a=o.useRef(new Map),u=o.useRef(new Set),c=o.useRef(new Map),[i,r]=o.useState(new Set),h=P({queries:e.map(l=>({...R({path:{accountId:l}}),refetchInterval:T,staleTime:T,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??[],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,_(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)},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: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 O(e,t).then(r=>({ok:!0,lastSyncAt:r.lastSyncAt??0,inboxSyncedAt:H(r)})).catch(r=>({ok:!1,error:r}));if(!u.ok)return{accountId:t,enqueued:!1,ok:!1,message:k(u.error)};const c=await I({path:{accountId:t},throwOnError:!0}).then(()=>({ok:!0})).catch(r=>({ok:!1,error:r}));if(!c.ok)return le(c.error),{accountId:t,enqueued:!1,ok:!1,message:k(c.error)};s.recordEvent("sync.triggered");const i=await fe({accountId:t,readStatus:()=>O(e,t),baselineLastSyncAt:u.lastSyncAt,baselineInboxSyncedAt:u.inboxSyncedAt,onInboxSynced:()=>a(t),deadline:n});return i?{accountId:t,enqueued:!0,ok:!1,message:i.message}:{accountId:t,enqueued:!0,ok:!0}},Re=(e,s={})=>{const t=N(),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,b7 as t}from"./index-
|
|
1
|
+
import{K as r,r as s,b7 as t}from"./index-B4JdswHn.js";import{u as m}from"./useQueries-DTupFckA.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};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import{d6 as se,d7 as re,d8 as ne,r as h,d9 as ae,da as oe,j as a,db as ie,dc as ce,dd as le,de as ue,ct as de,t as v,I as me,h as fe,at as he,i as ge,av as pe,cO as be,bS as ye,ab as xe,a0 as we,X as ve,df as W,dg as U,C as ke,cn as Se}from"./index-B4JdswHn.js";import{K as O}from"./kbd-X2f0JsWs.js";import{B as Ee,b as Ae}from"./useMessageBodyContent-CSShNM3z.js";import{i as Ce}from"./search-scope-B5-OK3Cq.js";function Te(e,t){if(typeof e!="object"||e===null)return e;var s=e[Symbol.toPrimitive];if(s!==void 0){var r=s.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function je(e){var t=Te(e,"string");return typeof t=="symbol"?t:String(t)}function Ne(e,t,s){return t=je(t),t in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}function D(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),s.push.apply(s,r)}return s}function N(e){for(var t=1;t<arguments.length;t++){var s=arguments[t]!=null?arguments[t]:{};t%2?D(Object(s),!0).forEach(function(r){Ne(e,r,s[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):D(Object(s)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(s,r))})}return e}class _e{constructor(t,s,r,n,o){this._target=t,this._gestureKey=n,this._ctrl=new ne(s),this._ctrl.applyHandlers(s,o),this._ctrl.applyConfig(N(N({},r),{},{target:t}),n),this._ctrl.effect()}destroy(){this._ctrl.clean()}setConfig(t){this._ctrl.clean(),this._ctrl.applyConfig(N(N({},t),{},{target:this._target}),this._gestureKey),this._ctrl.effect()}}const Oe=function(t,s,r){return se(re),new _e(t,{drag:s},r||{},"drag")},Re='"Geist Variable", "Geist", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',_={light:{fg:"oklch(0.3 0.025 235)",canvas:"oklch(0.96 0.015 90)",accent:"oklch(0.55 0.14 150)"},dark:{fg:"oklch(0.88 0.02 90)",canvas:"oklch(0.22 0.025 220)",accent:"oklch(0.78 0.16 150)"}},Ie={background:!1,spacing:!1},Le="16px",De=()=>`html{padding:0}body{padding:${Le};box-sizing:border-box}`,$e=()=>"html{overflow:hidden}body{overflow-x:auto}",Me=/prefers-color-scheme\s*:\s*dark|color-scheme\s*:\s*[^;}"']*\bdark\b/i,Pe='<meta name="viewport" content="width=device-width, initial-scale=1">',Be=e=>{const t=e?_.dark:_.light;return`
|
|
2
|
+
/* Plain-email base: UI font-stack + theme-aware colors (#424) */
|
|
3
|
+
html, body {
|
|
4
|
+
font-family: ${Re};
|
|
5
|
+
font-size: 14px;
|
|
6
|
+
line-height: 1.6;
|
|
7
|
+
color: ${t.fg};
|
|
8
|
+
background-color: ${t.canvas};
|
|
9
|
+
margin: 0;
|
|
10
|
+
padding: 0;
|
|
11
|
+
}
|
|
12
|
+
/* Strip author unreadable text colors and element backgrounds, scoped to body
|
|
13
|
+
descendants so the themed html/body surface above survives this reset. */
|
|
14
|
+
body * {
|
|
15
|
+
color: inherit !important;
|
|
16
|
+
background-color: transparent !important;
|
|
17
|
+
}
|
|
18
|
+
a, a:visited {
|
|
19
|
+
color: ${t.accent} !important;
|
|
20
|
+
text-decoration: underline;
|
|
21
|
+
}
|
|
22
|
+
`},I="invert(0.92) hue-rotate(180deg)",$=`img,picture,video,svg,canvas,[style*='background-image'],[background]{filter:${I}}`,Fe=(e,t,s)=>{const r=e?_.dark.canvas:_.light.canvas;return s?e?t?`html,body{margin:0;background-color:${r};color-scheme:dark light}`:`html{margin:0;background-color:#ffffff;filter:${I}}body{margin:0}${$}`:"html,body{margin:0;background-color:#ffffff;color-scheme:light}":e?t?`html,body{margin:0;background-color:${r};color-scheme:dark light}`:`html{margin:0;background-color:${r}}body{margin:0;filter:${I}}${$}`:`html,body{margin:0;background-color:${r};color-scheme:light}`},ze=(e,t,s,r=Ie)=>{const n=t==="plain"?Be(s):Fe(s,Me.test(e),r.background),o=r.spacing?"":De();return`${Pe}<style>${n}</style>${e}<style>${$e()}${o}</style>`},M=5e4,Ke="allow-same-origin allow-popups allow-popups-to-escape-sandbox",P=(e,t,s)=>Math.min(Math.ceil(Math.max(e,t)),s),L=.5,B=(e,t)=>t>0&&e>t+1?Math.max(t/e,L):1,Ge=["box-sizing","width","max-width","transform","transform-origin","margin-bottom","overflow-x"],He=e=>{for(const c of Ge)e.style.removeProperty(c);const t=e.clientWidth,s=e.scrollWidth;if(B(s,t)===1)return 1;const r=(c,f)=>e.style.setProperty(c,f,"important");r("box-sizing","border-box"),r("max-width","none"),r("width",`${s}px`);const n=Math.max(s,e.scrollWidth),o=B(n,t);return o>L?r("overflow-x","visible"):r("width",`${t/L}px`),r("transform-origin","0 0"),r("transform",`scale(${o})`),r("margin-bottom",`${-e.offsetHeight*(1-o)}px`),o},We=new Set(["Enter","Escape","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"]),Ue=e=>e===" "?!1:e.length===1?!0:We.has(e),R=e=>{if(e.metaKey||e.ctrlKey||e.altKey||!Ue(e.key))return;const t=e.currentTarget??e.target,s=t?.defaultView?.parent;!s||s===t?.defaultView||s.dispatchEvent(new KeyboardEvent("keydown",{key:e.key,code:e.code,shiftKey:e.shiftKey,bubbles:!0,cancelable:!0}))},F=({html:e,variant:t="framed",isDark:s=!1,declares:r,className:n})=>{const o=h.useRef(null),[c,f]=h.useState(0),i=h.useContext(ae),u=h.useMemo(()=>ze(e,t,s,r),[e,t,s,r]);return h.useEffect(()=>{const d=o.current;if(!d)return;const m=()=>{const l=d.contentDocument;if(!l?.body)return;k();const y=l.documentElement,T=He(l.body)<1?P(l.body.getBoundingClientRect().height,0,M):P(l.body.scrollHeight,y?.scrollHeight??0,M);f(j=>j===T?j:T)};let g=0;const w=()=>{cancelAnimationFrame(g),g=requestAnimationFrame(m)},p=l=>{const y=l.documentElement;return le()||y.scrollWidth>y.clientWidth+1},k=()=>{const l=d.contentDocument;if(!i||!l?.body)return;const y=p(l)?"auto":"pan-y pinch-zoom";l.documentElement.style.touchAction=y,l.body.style.touchAction=y};let x,b,S;const E=i?oe(k):void 0,C=()=>{m(),x?.disconnect(),x=void 0,b?.removeEventListener("keydown",R),b?.removeEventListener("load",m,!0),b=void 0,S?.destroy(),S=void 0;const l=d.contentDocument;l?.body&&(k(),i&&(S=new Oe(l.documentElement,y=>{const A=ie(y);A&&d.dispatchEvent(new CustomEvent(ce,{bubbles:!0,detail:A}))},{...ue,axis:"x",window:l.defaultView??void 0})),x=new ResizeObserver(w),x.observe(l.body),l.documentElement&&x.observe(l.documentElement),l.addEventListener("load",m,!0),l.fonts?.ready.then(m),l.addEventListener("keydown",R),b=l)};return d.addEventListener("load",C),()=>{d.removeEventListener("load",C),b?.removeEventListener("keydown",R),b?.removeEventListener("load",m,!0),x?.disconnect(),S?.destroy(),E?.(),cancelAnimationFrame(g)}},[i]),a.jsx("iframe",{ref:o,title:"Email content",sandbox:Ke,srcDoc:u,className:n,style:{width:"100%",border:"none",display:"block",height:c===0?"1px":`${c}px`,colorScheme:"normal"}})},Ve=(e,t)=>{const r=e==="newsletter"||e==="marketing"||t;return{framed:r,isPlain:!r}},Qe=()=>`
|
|
23
|
+
/* Zero the UA default body margin and clamp the document to the iframe width so
|
|
24
|
+
wide author markup can't push the body (and the page) past the viewport. */
|
|
25
|
+
html, body {
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding: 0;
|
|
28
|
+
max-width: 100%;
|
|
29
|
+
}
|
|
30
|
+
body {
|
|
31
|
+
overflow-wrap: anywhere;
|
|
32
|
+
word-break: break-word;
|
|
33
|
+
}
|
|
34
|
+
/* Media never wider than the frame; keep aspect ratio when width is capped. */
|
|
35
|
+
img, video, iframe, svg, canvas {
|
|
36
|
+
max-width: 100% !important;
|
|
37
|
+
height: auto;
|
|
38
|
+
}
|
|
39
|
+
/* Fixed-width author tables (\`<table width="600">\`) collapse to fit. */
|
|
40
|
+
table {
|
|
41
|
+
max-width: 100% !important;
|
|
42
|
+
table-layout: auto;
|
|
43
|
+
}
|
|
44
|
+
/* Cells carry the fixed widths in real newsletters (\`<td width="600">\`);
|
|
45
|
+
cap them too or the table can't actually shrink. */
|
|
46
|
+
td, th {
|
|
47
|
+
max-width: 100% !important;
|
|
48
|
+
}
|
|
49
|
+
/* \`max-width\` alone can't beat an inline \`min-width\`; zeroing the min lets
|
|
50
|
+
flex / grid / table children actually collapse to the clamped width. */
|
|
51
|
+
* {
|
|
52
|
+
min-width: 0;
|
|
53
|
+
}
|
|
54
|
+
/* An author \`nowrap\` assumes a viewport as wide as the line. The frame is the
|
|
55
|
+
pane's width whatever the mail is, so a pinned paragraph turns reading one
|
|
56
|
+
sentence into a sideways drag — and inside an author \`overflow:hidden\` it is
|
|
57
|
+
cut mid-character with nothing left to scroll at all. Flowing text wraps. The
|
|
58
|
+
\`i\` flag is load-bearing: Outlook and older generators emit \`WHITE-SPACE:
|
|
59
|
+
NOWRAP\`, and an attribute value match is case-sensitive without it. */
|
|
60
|
+
[nowrap]:not(pre, code, pre *, code *),
|
|
61
|
+
[style*="nowrap" i]:not(pre, code, pre *, code *) {
|
|
62
|
+
white-space: normal !important;
|
|
63
|
+
}
|
|
64
|
+
/* Long unbroken strings (URLs, tokens) wrap instead of forcing a wide line. */
|
|
65
|
+
pre, code {
|
|
66
|
+
white-space: pre-wrap;
|
|
67
|
+
overflow-wrap: anywhere;
|
|
68
|
+
word-break: break-word;
|
|
69
|
+
}
|
|
70
|
+
/* Preformatted text keeps its spacing even where a nowrap is declared — on the
|
|
71
|
+
block or on a span inside it. \`normal\` would collapse the runs of spaces that
|
|
72
|
+
are the entire content of a \`pre\`, and the un-important rule above cannot
|
|
73
|
+
defend an inline style, so this wraps to \`pre-wrap\` instead of unwrapping. */
|
|
74
|
+
:is(pre, code, pre *, code *):is([nowrap], [style*="nowrap" i]) {
|
|
75
|
+
white-space: pre-wrap !important;
|
|
76
|
+
}
|
|
77
|
+
`,qe=e=>{const t=new Map;for(const s of e){if(!s.contentId||s.contentUrl.length===0)continue;const r=s.contentId.replace(/^<|>$/g,"");t.set(r,s.contentUrl)}return s=>t.get(s.replace(/^<|>$/g,""))},Ze=/^(none|transparent|inherit|initial|unset)\s*$/i,V=e=>{const t=[],s=/<style[^>]*>([\s\S]*?)<\/style>/gi;let r;for(r=s.exec(e);r!==null;)t.push(r[1]),r=s.exec(e);return t},Ye=e=>{const t=/background(?:-color)?\s*:\s*([^;}\n]+)/gi;let s;for(s=t.exec(e);s!==null;){const r=s[1].trim();if(!Ze.test(r))return!0;s=t.exec(e)}return!1},Xe=e=>{if(/\bstyle\s*=\s*["'][^"']*background/i.test(e)||/\bbgcolor\s*=/i.test(e))return!0;for(const t of V(e))if(Ye(t))return!0;return!1},Je=new Set(["auto","none","initial","inherit","unset","revert","revert-layer"]),et=new RegExp(`(?<![-\\w])(?:padding|margin)(?:-(top|right|bottom|left|block|inline)(?:-(?:start|end))?)?\\s*:\\s*([^;}"']+)`,"gi"),tt=new Set(["top","bottom","block"]),Q=e=>e.replace(/\/\*[\s\S]*?\*\//g,""),z=e=>{const t=e.toLowerCase();if(!t||Je.has(t)||t.startsWith("-"))return!1;const s=/^\+?(\d*\.?\d+)[a-z%]*$/.exec(t);return s?Number.parseFloat(s[1])!==0:!0},st=e=>{const t=e.split(/\s+/).filter(Boolean);return t.length<2?t:t.length<4?[t[1]]:[t[1],t[3]]},rt=(e,t)=>{if(e&&tt.has(e))return!1;const s=t.replace(/!\s*important/gi,"").trim();return s?e?s.split(/\s+/).some(z):st(s).some(z):!1},K=e=>{for(const t of Q(e).matchAll(et))if(rt(t[1],t[2]))return!0;return!1},q=new Set(["blockquote"]),nt=e=>e.replace(/<!--[\s\S]*?-->/g,""),at=e=>{const t=[],s=/<([a-zA-Z][\w:-]*)((?:"[^"]*"|'[^']*'|[^>"'])*)>/g,r=/\bstyle\s*=\s*(?:"([^"]*)"|'([^']*)')/gi;for(const[,n,o]of e.matchAll(s))for(const c of o.matchAll(r))t.push({tag:n.toLowerCase(),style:c[1]??c[2]??""});return t},ot=e=>[...Q(e).matchAll(/([^{}]*)\{([^{}]*)\}/g)].map(t=>({selector:t[1].trim(),body:t[2]})),it=e=>{const t=e.trim().split(/[\s>+~]+/).pop()??"";return(/^[a-zA-Z][\w-]*/.exec(t)?.[0]??"").toLowerCase()},ct=e=>e.split(",").every(t=>q.has(it(t))),lt=e=>{const t=V(e),s=nt(e);if(/\bcellpadding\s*=\s*["']?(?!0["'\s>])\d/i.test(s))return!0;for(const{tag:r,style:n}of at(s))if(!q.has(r)&&K(n))return!0;for(const r of t)for(const n of ot(r))if(!ct(n.selector)&&K(n.body))return!0;return!1},ut=["script","iframe","object","embed","form","input","button","textarea","select","meta","link","base"],dt=["onerror","onload","onclick","onmouseover","onmouseout","onfocus","onblur","onsubmit","onkeydown","onkeyup","formaction","xlink:href","data-bind"],mt="data:image/svg+xml,"+encodeURIComponent(`
|
|
78
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
|
|
79
|
+
<rect fill="#f0f0f0" width="100" height="100"/>
|
|
80
|
+
<text x="50" y="50" text-anchor="middle" dy=".3em" fill="#999" font-size="12">
|
|
81
|
+
Image blocked
|
|
82
|
+
</text>
|
|
83
|
+
</svg>
|
|
84
|
+
`),ft=e=>e.replace(/url\s*\([^)]*\)/gi,"none").replace(/expression\s*\([^)]*\)/gi,"").replace(/-moz-binding\s*:[^;]*/gi,""),ht=e=>e.replace(/@import[^;]*;/gi,"/* @import blocked */").replace(/url\s*\([^)]*\)/gi,"none").replace(/expression\s*\([^)]*\)/gi,"").replace(/-moz-binding\s*:[^;]*/gi,""),gt=(e={})=>{const t=de(),s={FORBID_TAGS:ut,FORBID_ATTR:dt,ALLOW_DATA_ATTR:!1,ALLOW_UNKNOWN_PROTOCOLS:!1};return t.addHook("afterSanitizeAttributes",r=>{if(e.allowExternalImages||(r.tagName==="IMG"&&r.removeAttribute("srcset"),r.tagName==="SOURCE"&&(r.removeAttribute("srcset"),r.removeAttribute("src")),r.tagName==="VIDEO"&&r.removeAttribute("poster")),r.tagName==="IMG"){const n=r.getAttribute("src")||"";if(n.startsWith("data:"))return;if(n.startsWith("cid:")){const c=n.slice(4).replace(/^<|>$/g,""),f=e.resolveCid?.(c);f&&(r.setAttribute("src",f),r.classList.add("inline-content"));return}e.allowExternalImages||(r.setAttribute("data-blocked-src",n),r.setAttribute("src",mt),r.setAttribute("alt","[Blocked image]"),r.classList.add("blocked-image"))}if(r.tagName==="A"){const n=r.getAttribute("href")||"";if(/^(javascript|data):/i.test(n)){r.removeAttribute("href");return}r.setAttribute("target","_blank"),r.setAttribute("rel","noopener noreferrer nofollow"),r.classList.add("external-link")}if(r.hasAttribute("style")){const n=r.getAttribute("style")||"";r.setAttribute("style",ft(n))}}),t.addHook("uponSanitizeElement",(r,n)=>{if(n.tagName==="style"){const o=r.textContent||"";r.textContent=ht(o)}}),r=>{const n=Xe(r),o=lt(r),c=t.sanitize(r,s);return{html:`<style>${Qe()}</style>${c}`,hasAuthorBackground:n,hasAuthorSpacing:o}}},G=()=>a.jsx("p",{className:"text-fg-muted text-sm italic",children:"This message has no body content."}),Wt=({className:e,children:t})=>a.jsx("div",{className:v("[&_.message-body-frame]:-mx-2 lg:[&_.message-body-frame]:-mx-4",e),children:t}),pt=({html:e,text:t,isDark:s=!1,category:r,allowImages:n=!1,resolveCid:o,className:c,renderBlockedNotice:f})=>{const i=h.useMemo(()=>!e||typeof document>"u"?null:gt({allowExternalImages:n,resolveCid:o})(e),[e,n,o]),u=i?.html??null,{framed:d,isPlain:m}=Ve(r,i?.hasAuthorBackground??!1),g=h.useMemo(()=>({background:i?.hasAuthorBackground??!1,spacing:i?.hasAuthorSpacing??!1}),[i?.hasAuthorBackground,i?.hasAuthorSpacing]),w=h.useMemo(()=>!u||n?0:(u.match(/data-blocked-src/g)||[]).length,[u,n]);return!u&&!t?a.jsx("div",{className:v("message-body",c),children:a.jsx(G,{})}):a.jsxs("div",{className:v("message-body",c),children:[w>0&&a.jsx("div",{children:f?.(w)}),u?a.jsx("div",{className:"message-body-frame",children:d?a.jsx("div",{className:"w-full max-w-full",children:a.jsx(F,{html:u,variant:"framed",isDark:s,declares:g})}):a.jsx("div",{className:"max-w-full lg:max-w-2xl",children:a.jsx(F,{html:u,variant:m?"plain":"framed",isDark:s,declares:g})})}):t?a.jsx("pre",{className:"email-text whitespace-pre-wrap text-sm leading-relaxed",children:t}):a.jsx(G,{})]})};function Ut({message:e="Select a thread to read",icon:t,showHints:s=!0,className:r}){return a.jsxs("div",{className:v("flex flex-1 flex-col items-center justify-center text-center",r),children:[t??a.jsx(me,{className:"size-10 text-fg-subtle"}),a.jsx("p",{className:"mt-3 text-sm text-fg-muted",children:e}),s&&a.jsxs("p",{className:"text-2xs text-fg-subtle",children:[a.jsx(O,{children:"j"})," / ",a.jsx(O,{children:"k"})," to move, ",a.jsx(O,{children:"Enter"})," to open"]})]})}function Z(e){const t=[];let s=-1,r=!1;for(let n=0;n<e.length;n++){const o=e[n];if(o==='"'){r=!r,s<0&&(s=n);continue}if(!r&&/\s/.test(o)){s>=0&&t.push({raw:e.slice(s,n),start:s,end:n}),s=-1;continue}s<0&&(s=n)}return s>=0&&t.push({raw:e.slice(s),start:s,end:e.length}),t}const bt=e=>{if(!e.startsWith('"'))return e;const t=e.slice(1);return t.endsWith('"')?t.slice(0,-1):t};function yt(e){const t=e.indexOf(":");if(t<=0)return;const s=e.slice(t+1);return{name:e.slice(0,t).toLowerCase(),value:bt(s),rawValue:s}}const xt=e=>/[\s"]/.test(e),wt=e=>xt(e)?`"${e.replace(/"/g,"")}"`:e,Vt=(e,t)=>`${e}:${wt(t)}`,Y=(e,t=Date.now())=>({value:e,setAt:t}),vt=(e,t,s,r)=>{if(e.addressId!==t)return e;const n={...e.flags??{}};return s?n.trusted=Y(!0,r):delete n.trusted,{...e,flags:n}},kt=(e,t,s,r)=>{const n=o=>o.map(c=>vt(c,t,s,r));return{...e,envelope:{...e.envelope,from:n(e.envelope.from),to:n(e.envelope.to),cc:n(e.envelope.cc),bcc:n(e.envelope.bcc),replyTo:n(e.envelope.replyTo)}}},St=({messageId:e})=>{const t=fe(),{pushError:s}=he(),{mutate:r,isPending:n,error:o,reset:c}=ge({...ye(),onMutate:async i=>{const u=i.path.addressId,m=i.body.flags?.trusted?.value===!0,g=be({path:{messageId:e}});await t.cancelQueries({queryKey:g});const w=t.getQueriesData({queryKey:g}).filter(p=>p[1]!==void 0).map(([p,k])=>({queryKey:p,data:k}));return t.setQueriesData({queryKey:g},p=>p&&kt(p,u,m)),{describePrefix:g,previous:w}},onError:(i,u,d)=>{if(d)for(const m of d.previous)t.setQueryData(m.queryKey,m.data);s(pe("Couldn't trust sender","The change wasn't saved.",i))},onSettled:(i,u,d,m)=>{m&&t.invalidateQueries({queryKey:m.describePrefix})}});return{toggleTrusted:(i,u)=>{r({path:{addressId:i},body:{flags:{trusted:Y(!u)}}})},isPending:n,error:o,reset:c}},Et=()=>{const[e,t]=h.useState(()=>typeof document<"u"&&document.documentElement.classList.contains("dark"));return h.useEffect(()=>{const s=document.documentElement,r=new MutationObserver(()=>{t(s.classList.contains("dark"))});return r.observe(s,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},[]),e},At=(e,t)=>{const s=`${e} image${e>1?"s":""}`;return t?`${s} hidden — you blocked this sender`:`${s} blocked for privacy`},Ct=({blockedImageCount:e,canAlwaysTrust:t,isTrustPending:s,isSenderBlocked:r,onLoadOnce:n,onAlwaysTrust:o})=>a.jsxs("div",{"data-testid":"blocked-images-notice",className:"mb-3 flex items-center justify-between rounded-md bg-surface-sunken/50 px-3 py-2 text-sm",children:[a.jsx("span",{className:"text-fg-muted",children:At(e,r)}),!r&&a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("button",{type:"button",onClick:n,className:"text-accent hover:underline",children:"Load once"}),t&&a.jsx("button",{type:"button",onClick:o,"aria-busy":s,className:"text-accent hover:underline aria-busy:opacity-50",children:s?"Trusting…":"Always trust"})]})]}),Tt=(e,t)=>{switch(e){case"auth":return{title:"Your session expired",detail:"Sign in again to reload the message body. Other parts of the app may also stop responding until you do."};case"body-missing":return{title:"Message body is missing in storage",detail:"A sync failure may have left this message without its body bytes. Contact support, or run the reconcile script to refetch from the upstream IMAP server."};case"content-type-mismatch":return{title:"Couldn't load message body",detail:"The server returned an unexpected content type for this part. The message body has not been rendered to keep you safe."};case"spa-shell-leak":return{title:"Couldn't load message body",detail:"The server returned the app shell instead of the message body. This is an infrastructure bug — please report it."};case"not-ready":return{title:"Message body is still syncing",detail:"This message's body hasn't finished downloading from the mail server yet. It should appear shortly — reopen the message to try again."};default:return{title:"Couldn't load message body",detail:t}}},jt=e=>e instanceof Ee?e.reason:"generic",Nt=e=>e instanceof Error?e.message:typeof e=="string"?e:"An unexpected error occurred while loading the message body.",_t=({error:e,onRetry:t})=>{const s=jt(e),r=Nt(e),{title:n,detail:o}=Tt(s,r),[c,f]=h.useState(!1),{Account:i}=xe();return c?null:a.jsxs("div",{role:"alert","data-testid":"message-body-error-banner","data-reason":s,className:"flex items-start gap-2 rounded-md border border-danger/40 bg-danger-soft px-3 py-2 text-sm",children:[a.jsx(we,{className:"size-4 shrink-0 text-danger mt-0.5","aria-hidden":"true"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-medium text-danger",children:n}),a.jsx("p",{className:"text-fg-muted mt-1 break-words",children:o})]}),a.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[s==="auth"&&a.jsx(i,{children:({signOut:u})=>a.jsx("button",{type:"button",onClick:()=>u(),className:"text-sm font-medium text-accent hover:underline",children:"Sign in again"})}),t&&a.jsx("button",{type:"button",onClick:t,className:"text-sm font-medium text-accent hover:underline",children:"Retry"}),a.jsx("button",{type:"button",onClick:()=>f(!0),"aria-label":"Dismiss message body error",className:"rounded-md p-1 text-fg-muted hover:bg-surface-raised hover:text-fg transition-colors",children:a.jsx(ve,{className:"size-4","aria-hidden":"true"})})]})]})},Ot=()=>a.jsxs("div",{className:"animate-pulse space-y-2",role:"status","aria-label":"Loading message body",children:[a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-full"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-11/12"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-3/4"}),a.jsx("div",{className:"h-4 bg-surface-sunken rounded w-5/6"})]}),H=()=>a.jsx("p",{className:"text-fg-muted text-sm italic",children:"This message has no body content."}),Qt=({bodyParts:e,html:t,text:s,isTrusted:r=!1,isBlocked:n=!1,messageId:o,fromAddressId:c,category:f,className:i})=>{const[u,d]=h.useState(!1),[m,g]=h.useState(o);m!==o&&(g(o),d(!1));const w=!n&&(r||u),p=Et(),{toggleTrusted:k,isPending:x}=St({messageId:o??""}),b=!!e&&e.length>0,{picked:S,data:E,isLoading:C,isError:l,error:y,refetch:A}=Ae({messageId:o,bodyParts:e,enabled:b}),T=h.useMemo(()=>qe(e??[]),[e]),j=b&&E?.kind==="html"?E.body:t,X=b&&E?.kind==="text"?E.body:s;if(b){if(C)return a.jsx("div",{className:v("message-body",i),children:a.jsx(Ot,{})});if(l)return a.jsx("div",{className:v("message-body",i),children:a.jsx(_t,{error:y,onRetry:()=>A()})});if(!S)return a.jsx("div",{className:v("message-body",i),children:a.jsx(H,{})})}else if(!t&&!s)return a.jsx("div",{className:v("message-body",i),children:a.jsx(H,{})});const J=!!(c&&o),ee=()=>{!c||x||(d(!0),k(c,!1))};return a.jsx(pt,{className:i,html:j,text:X,isDark:p,category:f,allowImages:w,resolveCid:T,renderBlockedNotice:te=>a.jsx(Ct,{blockedImageCount:te,canAlwaysTrust:J,isTrustPending:x,isSenderBlocked:n,onLoadOnce:()=>d(!0),onAlwaysTrust:ee})})},Rt=Object.values(W).map(e=>({value:e,label:U[e]})),It={unclassified:"uncategorized"},Lt=[{name:"from",label:"Sender",values:"contact"},{name:"subject",label:"Subject",values:"text"},{name:"category",label:"Category",values:"fixed",options:Rt},{name:"is",label:"State",values:"fixed",options:[{value:"unread",label:"Unread"},{value:"read",label:"Read"},{value:"starred",label:"Starred"}]},{name:"has",label:"Contents",values:"fixed",options:[{value:"attachment",label:"Has attachment"}]},{name:"in",label:"Folder",values:"mailbox"},{name:"account",label:"Account",values:"account"},{name:"after",label:"Sent on or after",values:"date"},{name:"before",label:"Sent before",values:"date"}],Dt=new Map(Lt.map(e=>[e.name,e])),qt=e=>Dt.get(e.toLowerCase()),$t=/^\d{4}-\d{2}-\d{2}$/;function Mt(e,t,s){if(!$t.test(s))return;const r=Date.parse(`${s}T00:00:00Z`);if(!Number.isNaN(r))return{type:e,raw:t,value:s,epochSeconds:Math.floor(r/1e3)}}function Pt(e){const t=e.toLowerCase(),s=It[t];return s||Object.values(W).find(n=>n===t)}function Bt(e,t){switch(t.toLowerCase()){case"unread":return{type:"isUnread",raw:e};case"read":return{type:"isRead",raw:e};case"starred":case"flagged":return{type:"isStarred",raw:e};default:return}}function Ft(e,t){const s=yt(e);if(!s||s.value.length===0)return;const{name:r,value:n}=s;switch(r){case"from":return{type:"from",raw:e,value:n};case"subject":return{type:"subject",raw:e,value:n};case"category":{const o=Pt(n);return o?{type:"category",raw:e,value:n,category:o}:void 0}case"is":return Bt(e,n);case"has":return n.toLowerCase()==="attachment"?{type:"hasAttachment",raw:e}:void 0;case"before":case"after":return Mt(r,e,n);case"in":{const o=t.mailboxesByName?.get(n.toLowerCase());return o?{type:"in",raw:e,value:n,mailboxId:o}:void 0}case"account":{const o=t.accountsByName?.get(n.toLowerCase());return o?{type:"account",raw:e,value:n,accountId:o}:void 0}default:return}}function Zt(e,t={}){const s=[],r=[];for(const n of Z(e)){const o=Ft(n.raw,t);o?s.push(o):r.push(n.raw)}return{freeText:r.join(" "),tokens:s}}function Yt(e,t){return Z(e).filter(s=>s.raw!==t.raw).map(s=>s.raw).join(" ")}function Xt(e){switch(e.type){case"from":return`From: ${e.value}`;case"subject":return`Subject: ${e.value}`;case"category":return`Category: ${U[e.category]}`;case"hasAttachment":return"Has attachment";case"isUnread":return"Unread";case"isRead":return"Read";case"isStarred":return"Starred";case"before":return`Before ${e.value}`;case"after":return`After ${e.value}`;case"in":return`In: ${e.value}`;case"account":return`Account: ${e.value}`}}function Jt(){const{mailboxNameIndex:e,accountNameIndex:t}=ke(),s=Se();return{...Ce(s)?{}:{mailboxesByName:e},accountsByName:t}}export{Wt as M,Ut as R,Lt as S,pt as a,St as b,Qt as c,qt as d,Z as e,yt as f,Vt as g,Zt as p,Yt as r,Xt as s,Jt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as L,at as M,i as k,E as I,F as E,cy as A,
|
|
1
|
+
import{h as L,at as M,i as k,E as I,F as E,cy as A,ey as R,r as v,dJ as w,j as p,ez as h,eA as D,eB as _,C as j,cn as z,c as N,e2 as Q,df as O}from"./index-B4JdswHn.js";import{c as U}from"./popover-menu-ScZ5sdbz.js";import{an as q}from"./MailListHeader-CQDSlr9k.js";import{a as B}from"./useLabels-C4frOkLu.js";import{n as P}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-Cs4q-Qex.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}},J=e=>{const{mailboxId:t,messages:s}=e,n=L(),{pushError:l}=M(),{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(q(d.body.messageIds??[],s??[],t)))}});return{applyLabel:v.useCallback((r,u,d)=>{r.length!==0&&w(r,m=>c({body:{messageIds:m,labelId:u,action:d}}))},[c]),isPending:a}};function re({accountId:e,mailboxId:t,messageIds:s}){const{labels:n}=B(e),{applyLabel:l}=J({mailboxId:t}),c=v.useMemo(()=>n.map(a=>({key:a.labelId,label:a.name,icon:p.jsx("span",{className:`size-2.5 rounded-full ${D(a.color)?h[a.color]:h.Default}`}),onSelect:()=>l(s,a.labelId,"Apply")})),[n,s,l]);return c.length===0?null:p.jsx(U,{triggerLabel:"Apply label to selected messages",triggerIcon:p.jsx(_,{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)),$=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}=j(),n=G(),l=z(),c=P(s),{freeText:a,tokens:i}=H(c,n),r=a.length>0,u=i.find(o=>o.type==="category"),d=$(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),b=i.find(o=>o.type==="after"),g=i.find(o=>o.type==="before"),x=i.find(o=>o.type==="in"),S=F({browsed:l,callerMailboxId:e,inTokenMailboxId:x?.mailboxId}),{data:T,isLoading:C}=N({...Q({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}:{},...b?{sentDateFrom:b.epochSeconds}:{},...g?{sentDateTo:g.epochSeconds}:{}}}),enabled:r,staleTime:6e4});return{hits:T?.items??[],isLoading:r&&C}}export{re as L,ne as r,ie as s,ce as t,le as u};
|
|
@@ -1 +1 @@
|
|
|
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-
|
|
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-B4JdswHn.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};
|
package/index.html
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
} catch (_) {}
|
|
39
39
|
})();
|
|
40
40
|
</script>
|
|
41
|
-
<script type="module" crossorigin src="/assets/index-
|
|
41
|
+
<script type="module" crossorigin src="/assets/index-B4JdswHn.js"></script>
|
|
42
42
|
<link rel="stylesheet" crossorigin href="/assets/index-BtYEmjxr.css">
|
|
43
43
|
</head>
|
|
44
44
|
<body>
|