@remit/web-client-dist 0.0.119 → 0.0.121

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.
Files changed (32) hide show
  1. package/assets/{ComposeBody-_ERPUtIy.js → ComposeBody-N0spa38H.js} +1 -1
  2. package/assets/{ErrorState-CpdwMHyq.js → ErrorState-DY2nBA2y.js} +1 -1
  3. package/assets/{OnboardingWizard-45vDsudg.js → OnboardingWizard-DLnTVP5l.js} +1 -1
  4. package/assets/{account-form-helpers-BLnlC9_e.js → account-form-helpers-BGj78XP_.js} +1 -1
  5. package/assets/{accounts-DheAY97l.js → accounts-wOpu19q7.js} +1 -1
  6. package/assets/{advanced-B8S3seMf.js → advanced-oKob32jx.js} +1 -1
  7. package/assets/{appearance-DzcB3iPC.js → appearance-CL3WZM8R.js} +1 -1
  8. package/assets/{avatar-BBoH-nD9.js → avatar-BRqzDai-.js} +1 -1
  9. package/assets/{browser-ponyfill-JYvWs9jo.js → browser-ponyfill-BYqy_Ah7.js} +1 -1
  10. package/assets/{filter-status-BQ9mNrvB.js → filter-status-HlYq9KVy.js} +1 -1
  11. package/assets/{filters-BnKWXsoj.js → filters-CHOaVGpS.js} +1 -1
  12. package/assets/{flagged-yWwNA92Z.js → flagged-ZvQdS_nk.js} +1 -1
  13. package/assets/{folder-BgSCQNpW.js → folder-C6jvhWTG.js} +1 -1
  14. package/assets/{folders-DqpKLC9C.js → folders-DLMoy3qM.js} +1 -1
  15. package/assets/{index-YTL2DB0M.js → index-BTaq4YvJ.js} +4 -4
  16. package/assets/{index-CFaq1imu.js → index-DSdvE-Ik.js} +1 -1
  17. package/assets/index-DTbQi67v.js +1 -0
  18. package/assets/{kbd-BKKxLDW8.js → kbd-DvMPi0vE.js} +1 -1
  19. package/assets/{mail-DRm1aaZJ.js → mail-B9-IQzkA.js} +3 -3
  20. package/assets/{onboarding-BqjqK6cK.js → onboarding-DygDfkHN.js} +1 -1
  21. package/assets/{select-BovbBSbR.js → select-CbBsrqXl.js} +1 -1
  22. package/assets/{senders-DCkgzp0i.js → senders-ChBcTvMd.js} +1 -1
  23. package/assets/settings-DlZbJQk7.js +1 -0
  24. package/assets/{settings-screen-B5JdvJPg.js → settings-screen-CuPCQCpg.js} +1 -1
  25. package/assets/{suggested-vips-C6_xqzUA.js → suggested-vips-C2uft8CK.js} +1 -1
  26. package/assets/{useDebouncedValue-DMFmEI0a.js → useDebouncedValue-D5MhK_Hb.js} +1 -1
  27. package/assets/{useMutation-DcYdAWup.js → useMutation-CyIvOZr9.js} +1 -1
  28. package/assets/{useSignature-BYoaxt5L.js → useSignature-6D9TSMMx.js} +1 -1
  29. package/index.html +1 -1
  30. package/package.json +1 -1
  31. package/assets/index-DTaU9Gfu.js +0 -1
  32. package/assets/settings-Da0A8P0b.js +0 -1
@@ -1 +1 @@
1
- import{j as e,bC as o,bD as c,bE as d,aa as l,r as m,bz as p,bA as u}from"./index-YTL2DB0M.js";import{S as x}from"./settings-screen-B5JdvJPg.js";import"./avatar-BBoH-nD9.js";function f(t){try{return new Date(t).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return t}}function h({sha:t=c,commitUrl:n=o,buildTime:a=d}){return e.jsxs("p",{className:"text-xs text-fg-subtle",children:["Version"," ",n?e.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"font-mono hover:text-fg-muted hover:underline",children:t}):e.jsx("span",{className:"font-mono",children:t})," · ",e.jsxs("span",{children:["Built ",f(a)]})]})}const g=e.jsx("div",{className:"space-y-3",children:e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Notification rules"}),", data export, and per-account diagnostics are coming in a future release."]})});function j(){const t=l(),[n,a]=m.useState(!0),i=s=>{const r=u[s];r&&t({to:r})};return e.jsxs(x,{items:p,activeId:"advanced",title:"Advanced",description:"Notification rules, export, and diagnostics.",help:g,helpOpen:n,onToggleHelp:()=>a(s=>!s),onSelect:i,onBackToMail:()=>{t({to:"/mail"})},children:[e.jsx("p",{className:"text-sm text-fg-muted",children:"Advanced options — notification rules, data export, and raw sync diagnostics — are coming in a future release."}),e.jsxs("div",{className:"border-t border-line pt-4 mt-4",children:[e.jsx("p",{className:"text-sm font-medium text-fg mb-1",children:"About"}),e.jsx(h,{})]})]})}export{j as component};
1
+ import{j as e,bC as o,bD as c,bE as d,aa as l,r as m,bz as p,bA as u}from"./index-BTaq4YvJ.js";import{S as x}from"./settings-screen-CuPCQCpg.js";import"./avatar-BRqzDai-.js";function f(t){try{return new Date(t).toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}catch{return t}}function h({sha:t=c,commitUrl:n=o,buildTime:a=d}){return e.jsxs("p",{className:"text-xs text-fg-subtle",children:["Version"," ",n?e.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"font-mono hover:text-fg-muted hover:underline",children:t}):e.jsx("span",{className:"font-mono",children:t})," · ",e.jsxs("span",{children:["Built ",f(a)]})]})}const g=e.jsx("div",{className:"space-y-3",children:e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Notification rules"}),", data export, and per-account diagnostics are coming in a future release."]})});function j(){const t=l(),[n,a]=m.useState(!0),i=s=>{const r=u[s];r&&t({to:r})};return e.jsxs(x,{items:p,activeId:"advanced",title:"Advanced",description:"Notification rules, export, and diagnostics.",help:g,helpOpen:n,onToggleHelp:()=>a(s=>!s),onSelect:i,onBackToMail:()=>{t({to:"/mail"})},children:[e.jsx("p",{className:"text-sm text-fg-muted",children:"Advanced options — notification rules, data export, and raw sync diagnostics — are coming in a future release."}),e.jsxs("div",{className:"border-t border-line pt-4 mt-4",children:[e.jsx("p",{className:"text-sm font-medium text-fg mb-1",children:"About"}),e.jsx(h,{})]})]})}export{j as component};
@@ -1 +1 @@
1
- import{j as e,b as u,aa as g,r as h,bF as b,bz as y,bA as v,bG as S}from"./index-YTL2DB0M.js";import{S as j}from"./settings-screen-B5JdvJPg.js";import"./avatar-BBoH-nD9.js";const N={sm:"min-h-9 px-3 text-xs",md:"min-h-11 px-4 text-sm"};function f({name:l,options:a,value:r,onChange:i,size:c="md","aria-label":m}){const d=a.findIndex(s=>s.value===r);return e.jsx("div",{role:"radiogroup","aria-label":m,className:"inline-flex rounded-md border border-line bg-surface-sunken p-0.5",children:a.map((s,o)=>{const n=s.value===r,t=!n&&o<a.length-1&&d!==o+1;return e.jsxs("label",{className:u("relative flex cursor-pointer items-center justify-center rounded-[5px] font-medium transition-colors",N[c],n?"bg-surface text-fg shadow":"text-fg-muted hover:text-fg",t&&"after:pointer-events-none after:absolute after:right-0 after:top-1/4 after:h-1/2 after:w-px after:bg-line"),children:[e.jsx("input",{type:"radio",name:l,value:s.value,checked:n,onChange:()=>i(s.value),className:"sr-only"}),s.label]},s.value)})})}const x="remit.density";function T(){return typeof localStorage>"u"?"comfortable":localStorage.getItem(x)??"comfortable"}const D=e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Density"})," controls how much information fits on screen. Compact is great on smaller displays; Comfortable gives each item more breathing room."]}),e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Theme"})," switches between light, dark, and system-preference modes instantly. The change takes effect across the whole app immediately."]}),e.jsx("p",{className:"text-2xs text-fg-subtle",children:"Preferences are stored locally in this browser. Server-side sync is coming soon."})]});function k(){const l=g(),[a,r]=h.useState(!0),[i,c]=h.useState(T),[m,d]=h.useState(b),s=t=>{c(t),typeof localStorage<"u"&&localStorage.setItem(x,t)},o=t=>{d(t),S(t)},n=t=>{const p=v[t];p&&l({to:p})};return e.jsx(j,{items:y,activeId:"appearance",title:"Appearance",description:"Display density and colour theme — instant-apply.",help:D,helpOpen:a,onToggleHelp:()=>r(t=>!t),onSelect:n,onBackToMail:()=>{l({to:"/mail"})},children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-fg",children:"Density"}),e.jsx(f,{name:"density","aria-label":"Density",value:i,onChange:s,options:[{value:"comfortable",label:"Comfortable"},{value:"compact",label:"Compact"}]}),e.jsx("p",{className:"text-xs text-fg-subtle",children:"Controls the spacing of message rows in the mail list."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-fg",children:"Theme"}),e.jsx(f,{name:"theme","aria-label":"Theme",value:m,onChange:o,options:[{value:"system",label:"System"},{value:"light",label:"Light"},{value:"dark",label:"Dark"}]}),e.jsx("p",{className:"text-xs text-fg-subtle",children:"Applies immediately. System default follows your OS preference."})]})]})})}export{k as component};
1
+ import{j as e,b as u,aa as g,r as h,bF as b,bz as y,bA as v,bG as S}from"./index-BTaq4YvJ.js";import{S as j}from"./settings-screen-CuPCQCpg.js";import"./avatar-BRqzDai-.js";const N={sm:"min-h-9 px-3 text-xs",md:"min-h-11 px-4 text-sm"};function f({name:l,options:a,value:r,onChange:i,size:c="md","aria-label":m}){const d=a.findIndex(s=>s.value===r);return e.jsx("div",{role:"radiogroup","aria-label":m,className:"inline-flex rounded-md border border-line bg-surface-sunken p-0.5",children:a.map((s,o)=>{const n=s.value===r,t=!n&&o<a.length-1&&d!==o+1;return e.jsxs("label",{className:u("relative flex cursor-pointer items-center justify-center rounded-[5px] font-medium transition-colors",N[c],n?"bg-surface text-fg shadow":"text-fg-muted hover:text-fg",t&&"after:pointer-events-none after:absolute after:right-0 after:top-1/4 after:h-1/2 after:w-px after:bg-line"),children:[e.jsx("input",{type:"radio",name:l,value:s.value,checked:n,onChange:()=>i(s.value),className:"sr-only"}),s.label]},s.value)})})}const x="remit.density";function T(){return typeof localStorage>"u"?"comfortable":localStorage.getItem(x)??"comfortable"}const D=e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Density"})," controls how much information fits on screen. Compact is great on smaller displays; Comfortable gives each item more breathing room."]}),e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Theme"})," switches between light, dark, and system-preference modes instantly. The change takes effect across the whole app immediately."]}),e.jsx("p",{className:"text-2xs text-fg-subtle",children:"Preferences are stored locally in this browser. Server-side sync is coming soon."})]});function k(){const l=g(),[a,r]=h.useState(!0),[i,c]=h.useState(T),[m,d]=h.useState(b),s=t=>{c(t),typeof localStorage<"u"&&localStorage.setItem(x,t)},o=t=>{d(t),S(t)},n=t=>{const p=v[t];p&&l({to:p})};return e.jsx(j,{items:y,activeId:"appearance",title:"Appearance",description:"Display density and colour theme — instant-apply.",help:D,helpOpen:a,onToggleHelp:()=>r(t=>!t),onSelect:n,onBackToMail:()=>{l({to:"/mail"})},children:e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-fg",children:"Density"}),e.jsx(f,{name:"density","aria-label":"Density",value:i,onChange:s,options:[{value:"comfortable",label:"Comfortable"},{value:"compact",label:"Compact"}]}),e.jsx("p",{className:"text-xs text-fg-subtle",children:"Controls the spacing of message rows in the mail list."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-fg",children:"Theme"}),e.jsx(f,{name:"theme","aria-label":"Theme",value:m,onChange:o,options:[{value:"system",label:"System"},{value:"light",label:"Light"},{value:"dark",label:"Dark"}]}),e.jsx("p",{className:"text-xs text-fg-subtle",children:"Applies immediately. System default follows your OS preference."})]})]})})}export{k as component};
@@ -1 +1 @@
1
- import{a as l,r as h,j as p,b as u}from"./index-YTL2DB0M.js";const f=l("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const m=l("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),y={sm:"size-7 text-2xs",md:"size-9 text-sm",lg:"size-11 text-md"},r=["oklch(0.6 0.08 150)","oklch(0.6 0.08 185)","oklch(0.6 0.08 215)","oklch(0.6 0.07 250)","oklch(0.6 0.07 310)","oklch(0.62 0.07 110)"],k="oklch(0.97 0.012 90)";function x(t){const e=t.trim().split(/\s+/).filter(Boolean);return e.length===0?"?":e.length===1?e[0].slice(0,2).toUpperCase():(e[0][0]+e[e.length-1][0]).toUpperCase()}function g({name:t,email:e,size:c="md",className:i}){const a=h.useMemo(()=>{const o=e??t;let s=0;for(let n=0;n<o.length;n++)s=s*31+o.charCodeAt(n)>>>0;return r[s%r.length]},[t,e]);return p.jsx("span",{className:u("inline-flex shrink-0 items-center justify-center rounded-full font-semibold select-none",y[c],i),style:{backgroundColor:a,color:k},"aria-hidden":!0,children:x(t)})}export{g as A,f as C,m as M};
1
+ import{a as l,r as h,j as p,b as u}from"./index-BTaq4YvJ.js";const f=l("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const m=l("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),y={sm:"size-7 text-2xs",md:"size-9 text-sm",lg:"size-11 text-md"},r=["oklch(0.6 0.08 150)","oklch(0.6 0.08 185)","oklch(0.6 0.08 215)","oklch(0.6 0.07 250)","oklch(0.6 0.07 310)","oklch(0.62 0.07 110)"],k="oklch(0.97 0.012 90)";function x(t){const e=t.trim().split(/\s+/).filter(Boolean);return e.length===0?"?":e.length===1?e[0].slice(0,2).toUpperCase():(e[0][0]+e[e.length-1][0]).toUpperCase()}function g({name:t,email:e,size:c="md",className:i}){const a=h.useMemo(()=>{const o=e??t;let s=0;for(let n=0;n<o.length;n++)s=s*31+o.charCodeAt(n)>>>0;return r[s%r.length]},[t,e]);return p.jsx("span",{className:u("inline-flex shrink-0 items-center justify-center rounded-full font-semibold select-none",y[c],i),style:{backgroundColor:a,color:k},"aria-hidden":!0,children:x(t)})}export{g as A,f as C,m as M};
@@ -1,2 +1,2 @@
1
- import{bX as A,bd as X}from"./index-YTL2DB0M.js";function $(_,d){for(var b=0;b<d.length;b++){const y=d[b];if(typeof y!="string"&&!Array.isArray(y)){for(const l in y)if(l!=="default"&&!(l in _)){const p=Object.getOwnPropertyDescriptor(y,l);p&&Object.defineProperty(_,l,p.get?p:{enumerable:!0,get:()=>y[l]})}}}return Object.freeze(Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}},H;function J(){return H||(H=1,(function(_,d){var b=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof A<"u"&&A,y=(function(){function p(){this.fetch=!1,this.DOMException=b.DOMException}return p.prototype=b,new p})();(function(p){(function(h){var a=typeof p<"u"&&p||typeof self<"u"&&self||typeof A<"u"&&A||{},u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function F(e){return e&&DataView.prototype.isPrototypeOf(e)}if(u.arrayBuffer)var q=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],C=ArrayBuffer.isView||function(e){return e&&q.indexOf(Object.prototype.toString.call(e))>-1};function v(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function T(e){return typeof e!="string"&&(e=String(e)),e}function B(e){var t={next:function(){var r=e.shift();return{done:r===void 0,value:r}}};return u.iterable&&(t[Symbol.iterator]=function(){return t}),t}function i(e){this.map={},e instanceof i?e.forEach(function(t,r){this.append(r,t)},this):Array.isArray(e)?e.forEach(function(t){if(t.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}i.prototype.append=function(e,t){e=v(e),t=T(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},i.prototype.delete=function(e){delete this.map[v(e)]},i.prototype.get=function(e){return e=v(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(v(e))},i.prototype.set=function(e,t){this.map[v(e)]=T(t)},i.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),B(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),B(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),B(e)},u.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);function O(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}}function D(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function I(e){var t=new FileReader,r=D(t);return t.readAsArrayBuffer(e),r}function M(e){var t=new FileReader,r=D(t),n=/charset=([A-Za-z0-9_-]+)/.exec(e.type),s=n?n[1]:"utf-8";return t.readAsText(e,s),r}function L(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}function R(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function U(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:u.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:u.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u.arrayBuffer&&u.blob&&F(e)?(this._bodyArrayBuffer=R(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||C(e))?this._bodyArrayBuffer=R(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var e=O(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=O(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(u.blob)return this.blob().then(I);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var e=O(this);if(e)return e;if(this._bodyBlob)return M(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(L(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(z)}),this.json=function(){return this.text().then(JSON.parse)},this}var N=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function k(e){var t=e.toUpperCase();return N.indexOf(t)>-1?t:e}function w(e,t){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var r=t.body;if(e instanceof w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!r&&e._bodyInit!=null&&(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new i(t.headers)),this.method=k(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||(function(){if("AbortController"in a){var o=new AbortController;return o.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var s=/\?/;this.url+=(s.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})};function z(e){var t=new FormData;return e.trim().split("&").forEach(function(r){if(r){var n=r.split("="),s=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(s),decodeURIComponent(o))}}),t}function G(e){var t=new i,r=e.replace(/\r?\n[\t ]+/g," ");return r.split("\r").map(function(n){return n.indexOf(`
1
+ import{bX as A,bd as X}from"./index-BTaq4YvJ.js";function $(_,d){for(var b=0;b<d.length;b++){const y=d[b];if(typeof y!="string"&&!Array.isArray(y)){for(const l in y)if(l!=="default"&&!(l in _)){const p=Object.getOwnPropertyDescriptor(y,l);p&&Object.defineProperty(_,l,p.get?p:{enumerable:!0,get:()=>y[l]})}}}return Object.freeze(Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}))}var E={exports:{}},H;function J(){return H||(H=1,(function(_,d){var b=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof A<"u"&&A,y=(function(){function p(){this.fetch=!1,this.DOMException=b.DOMException}return p.prototype=b,new p})();(function(p){(function(h){var a=typeof p<"u"&&p||typeof self<"u"&&self||typeof A<"u"&&A||{},u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function F(e){return e&&DataView.prototype.isPrototypeOf(e)}if(u.arrayBuffer)var q=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],C=ArrayBuffer.isView||function(e){return e&&q.indexOf(Object.prototype.toString.call(e))>-1};function v(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||e==="")throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function T(e){return typeof e!="string"&&(e=String(e)),e}function B(e){var t={next:function(){var r=e.shift();return{done:r===void 0,value:r}}};return u.iterable&&(t[Symbol.iterator]=function(){return t}),t}function i(e){this.map={},e instanceof i?e.forEach(function(t,r){this.append(r,t)},this):Array.isArray(e)?e.forEach(function(t){if(t.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+t.length);this.append(t[0],t[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}i.prototype.append=function(e,t){e=v(e),t=T(t);var r=this.map[e];this.map[e]=r?r+", "+t:t},i.prototype.delete=function(e){delete this.map[v(e)]},i.prototype.get=function(e){return e=v(e),this.has(e)?this.map[e]:null},i.prototype.has=function(e){return this.map.hasOwnProperty(v(e))},i.prototype.set=function(e,t){this.map[v(e)]=T(t)},i.prototype.forEach=function(e,t){for(var r in this.map)this.map.hasOwnProperty(r)&&e.call(t,this.map[r],r,this)},i.prototype.keys=function(){var e=[];return this.forEach(function(t,r){e.push(r)}),B(e)},i.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),B(e)},i.prototype.entries=function(){var e=[];return this.forEach(function(t,r){e.push([r,t])}),B(e)},u.iterable&&(i.prototype[Symbol.iterator]=i.prototype.entries);function O(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}}function D(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function I(e){var t=new FileReader,r=D(t);return t.readAsArrayBuffer(e),r}function M(e){var t=new FileReader,r=D(t),n=/charset=([A-Za-z0-9_-]+)/.exec(e.type),s=n?n[1]:"utf-8";return t.readAsText(e,s),r}function L(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n<t.length;n++)r[n]=String.fromCharCode(t[n]);return r.join("")}function R(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function U(){return this.bodyUsed=!1,this._initBody=function(e){this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?typeof e=="string"?this._bodyText=e:u.blob&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:u.formData&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():u.arrayBuffer&&u.blob&&F(e)?(this._bodyArrayBuffer=R(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||C(e))?this._bodyArrayBuffer=R(e):this._bodyText=e=Object.prototype.toString.call(e):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof e=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var e=O(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=O(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(u.blob)return this.blob().then(I);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var e=O(this);if(e)return e;if(this._bodyBlob)return M(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(L(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(z)}),this.json=function(){return this.text().then(JSON.parse)},this}var N=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function k(e){var t=e.toUpperCase();return N.indexOf(t)>-1?t:e}function w(e,t){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t=t||{};var r=t.body;if(e instanceof w){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new i(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,!r&&e._bodyInit!=null&&(r=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",(t.headers||!this.headers)&&(this.headers=new i(t.headers)),this.method=k(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal||(function(){if("AbortController"in a){var o=new AbortController;return o.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&r)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(r),(this.method==="GET"||this.method==="HEAD")&&(t.cache==="no-store"||t.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var s=/\?/;this.url+=(s.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})};function z(e){var t=new FormData;return e.trim().split("&").forEach(function(r){if(r){var n=r.split("="),s=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(s),decodeURIComponent(o))}}),t}function G(e){var t=new i,r=e.replace(/\r?\n[\t ]+/g," ");return r.split("\r").map(function(n){return n.indexOf(`
2
2
  `)===0?n.substr(1,n.length):n}).forEach(function(n){var s=n.split(":"),o=s.shift().trim();if(o){var g=s.join(":").trim();try{t.append(o,g)}catch(x){console.warn("Response "+x.message)}}}),t}U.call(w.prototype);function c(e,t){if(!(this instanceof c))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=t.status===void 0?200:t.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText===void 0?"":""+t.statusText,this.headers=new i(t.headers),this.url=t.url||"",this._initBody(e)}U.call(c.prototype),c.prototype.clone=function(){return new c(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new i(this.headers),url:this.url})},c.error=function(){var e=new c(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var V=[301,302,303,307,308];c.redirect=function(e,t){if(V.indexOf(t)===-1)throw new RangeError("Invalid status code");return new c(null,{status:t,headers:{location:e}})},h.DOMException=a.DOMException;try{new h.DOMException}catch{h.DOMException=function(t,r){this.message=t,this.name=r;var n=Error(t);this.stack=n.stack},h.DOMException.prototype=Object.create(Error.prototype),h.DOMException.prototype.constructor=h.DOMException}function P(e,t){return new Promise(function(r,n){var s=new w(e,t);if(s.signal&&s.signal.aborted)return n(new h.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function g(){o.abort()}o.onload=function(){var f={statusText:o.statusText,headers:G(o.getAllResponseHeaders()||"")};s.url.indexOf("file://")===0&&(o.status<200||o.status>599)?f.status=200:f.status=o.status,f.url="responseURL"in o?o.responseURL:f.headers.get("X-Request-URL");var m="response"in o?o.response:o.responseText;setTimeout(function(){r(new c(m,f))},0)},o.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},o.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request timed out"))},0)},o.onabort=function(){setTimeout(function(){n(new h.DOMException("Aborted","AbortError"))},0)};function x(f){try{return f===""&&a.location.href?a.location.href:f}catch{return f}}if(o.open(s.method,x(s.url),!0),s.credentials==="include"?o.withCredentials=!0:s.credentials==="omit"&&(o.withCredentials=!1),"responseType"in o&&(u.blob?o.responseType="blob":u.arrayBuffer&&(o.responseType="arraybuffer")),t&&typeof t.headers=="object"&&!(t.headers instanceof i||a.Headers&&t.headers instanceof a.Headers)){var j=[];Object.getOwnPropertyNames(t.headers).forEach(function(f){j.push(v(f)),o.setRequestHeader(f,T(t.headers[f]))}),s.headers.forEach(function(f,m){j.indexOf(m)===-1&&o.setRequestHeader(m,f)})}else s.headers.forEach(function(f,m){o.setRequestHeader(m,f)});s.signal&&(s.signal.addEventListener("abort",g),o.onreadystatechange=function(){o.readyState===4&&s.signal.removeEventListener("abort",g)}),o.send(typeof s._bodyInit>"u"?null:s._bodyInit)})}return P.polyfill=!0,a.fetch||(a.fetch=P,a.Headers=i,a.Request=w,a.Response=c),h.Headers=i,h.Request=w,h.Response=c,h.fetch=P,h})({})})(y),y.fetch.ponyfill=!0,delete y.fetch.polyfill;var l=b.fetch?b:y;d=l.fetch,d.default=l.fetch,d.fetch=l.fetch,d.Headers=l.Headers,d.Request=l.Request,d.Response=l.Response,_.exports=d})(E,E.exports)),E.exports}var S=J();const Z=X(S),Q=$({__proto__:null,default:Z},[S]);export{Q as b};
@@ -1 +1 @@
1
- import{am as y,bH as v,V as p,bI as x,r as d,bJ as N,bK as S}from"./index-YTL2DB0M.js";import{u as m}from"./useMutation-DcYdAWup.js";const o="None",O=e=>e.moveMailboxId!==void 0&&e.moveMailboxId!==o,I=e=>({...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:o,actionMailboxId:e.moveMailboxId??o}),F=(e,t,r)=>({name:r,scope:t==="standing"?"Standing":"Temporary",...t==="temporary"&&e.expiresAt?{expiresAt:e.expiresAt}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:o,actionMailboxId:e.moveMailboxId??o,...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{}}),b=e=>N({path:{accountId:e}}),D=e=>{const t=y({...v({path:{accountId:e??""}}),enabled:!!e});return{filters:t.data?.items??[],isPending:t.isPending,isError:t.isError,error:t.error,refetch:t.refetch}},E=e=>{const t=p(),r=m({...S(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:b(e)})}}),{mutate:i}=r;return{createFilter:d.useCallback((a,s,l)=>{e&&i({path:{accountId:e},body:F(a,s,l)})},[e,i]),isPending:r.isPending,isSuccess:r.isSuccess,isError:r.isError,error:r.error,reset:r.reset}},$=e=>{const t=p(),r=m({...x(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:b(e)})}}),{mutate:i}=r;return{deleteFilter:d.useCallback(a=>{e&&i({path:{accountId:e,filterId:a}})},[e,i]),isPending:r.isPending,deletingFilterId:r.isPending?r.variables?.path.filterId:void 0}},L=(e,t)=>{if(e.state==="Expired")return"Expired";if(e.scope!=="Temporary"||!e.expiresAt)return"Active";const r=Date.parse(e.expiresAt);return Number.isNaN(r)?"Active":r<=t?"Expired":"Active"},P=e=>{if(!e)return;const t=Date.parse(e);if(!Number.isNaN(t))return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},T=(e,t=new Date)=>{if(!e)return;const r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!r)return;const[,i,u,a]=r,s=new Date(Number(i),Number(u)-1,Number(a),23,59,59,0);if(Number.isNaN(s.getTime()))return;const l=-t.getTimezoneOffset(),g=l>=0?"+":"-",c=Math.abs(l),h=String(Math.floor(c/60)).padStart(2,"0"),f=String(c%60).padStart(2,"0"),n=M=>String(M).padStart(2,"0");return`${s.getFullYear()}-${n(s.getMonth()+1)}-${n(s.getDate())}T${n(s.getHours())}:${n(s.getMinutes())}:${n(s.getSeconds())}${g}${h}:${f}`};export{o as N,P as a,I as b,D as c,$ as d,L as f,O as h,T as p,E as u};
1
+ import{am as y,bH as v,V as p,bI as x,r as d,bJ as N,bK as S}from"./index-BTaq4YvJ.js";import{u as m}from"./useMutation-CyIvOZr9.js";const o="None",O=e=>e.moveMailboxId!==void 0&&e.moveMailboxId!==o,I=e=>({...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:o,actionMailboxId:e.moveMailboxId??o}),F=(e,t,r)=>({name:r,scope:t==="standing"?"Standing":"Temporary",...t==="temporary"&&e.expiresAt?{expiresAt:e.expiresAt}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:o,actionMailboxId:e.moveMailboxId??o,...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{}}),b=e=>N({path:{accountId:e}}),D=e=>{const t=y({...v({path:{accountId:e??""}}),enabled:!!e});return{filters:t.data?.items??[],isPending:t.isPending,isError:t.isError,error:t.error,refetch:t.refetch}},E=e=>{const t=p(),r=m({...S(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:b(e)})}}),{mutate:i}=r;return{createFilter:d.useCallback((a,s,l)=>{e&&i({path:{accountId:e},body:F(a,s,l)})},[e,i]),isPending:r.isPending,isSuccess:r.isSuccess,isError:r.isError,error:r.error,reset:r.reset}},$=e=>{const t=p(),r=m({...x(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:b(e)})}}),{mutate:i}=r;return{deleteFilter:d.useCallback(a=>{e&&i({path:{accountId:e,filterId:a}})},[e,i]),isPending:r.isPending,deletingFilterId:r.isPending?r.variables?.path.filterId:void 0}},L=(e,t)=>{if(e.state==="Expired")return"Expired";if(e.scope!=="Temporary"||!e.expiresAt)return"Active";const r=Date.parse(e.expiresAt);return Number.isNaN(r)?"Active":r<=t?"Expired":"Active"},P=e=>{if(!e)return;const t=Date.parse(e);if(!Number.isNaN(t))return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},T=(e,t=new Date)=>{if(!e)return;const r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!r)return;const[,i,u,a]=r,s=new Date(Number(i),Number(u)-1,Number(a),23,59,59,0);if(Number.isNaN(s.getTime()))return;const l=-t.getTimezoneOffset(),g=l>=0?"+":"-",c=Math.abs(l),h=String(Math.floor(c/60)).padStart(2,"0"),f=String(c%60).padStart(2,"0"),n=M=>String(M).padStart(2,"0");return`${s.getFullYear()}-${n(s.getMonth()+1)}-${n(s.getDate())}T${n(s.getHours())}:${n(s.getMinutes())}:${n(s.getSeconds())}${g}${h}:${f}`};export{o as N,P as a,I as b,D as c,$ as d,L as f,O as h,T as p,E as u};
@@ -1 +1 @@
1
- import{j as e,d as b,B as j,T as N,aa as y,r as x,am as u,at as v,bz as S,bA as I,ab as T,aJ as E}from"./index-YTL2DB0M.js";import{S as O}from"./settings-screen-B5JdvJPg.js";import{f as w,N as A,a as F,c as k,d as D}from"./filter-status-BQ9mNrvB.js";import{E as h}from"./ErrorState-CpdwMHyq.js";import"./avatar-BBoH-nD9.js";import"./useMutation-DcYdAWup.js";function M({filters:a,mailboxName:i,onDelete:d,deletingFilterId:r,now:c=Date.now()}){return a.length===0?e.jsx("p",{className:"py-6 text-sm text-fg-muted",children:"No filters yet. Select a few messages in the inbox and choose Organize to make one."}):e.jsx("ul",{className:"divide-y divide-line rounded-md border border-line",children:a.map(t=>{const o=w(t,c),n=o==="Expired",l=t.actionMailboxId!==A?i(t.actionMailboxId):void 0,s=F(t.expiresAt);return e.jsxs("li",{className:"flex items-start gap-3 px-3 py-2.5",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`truncate text-sm font-medium ${n?"text-fg-muted":"text-fg"}`,children:t.name}),e.jsx(b,{tone:n?"neutral":"positive",dot:!0,children:o})]}),e.jsxs("p",{className:"mt-0.5 text-xs text-fg-subtle",children:[l?`Moves matches to ${l}`:"No move action",t.scope==="Temporary"&&s?n?` · expired ${s}`:` · until ${s}`:t.scope==="Standing"?" · always":""]})]}),e.jsx(j,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-4 text-danger"}),onClick:()=>d(t.filterId),disabled:r===t.filterId,"aria-label":`Delete filter ${t.name}`})]},t.filterId)})})}const $=e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:["Filters are the standing rules Organize creates. A"," ",e.jsx("strong",{children:"Standing"})," filter keeps working on new mail; a"," ",e.jsx("strong",{children:"Temporary"})," one stops on its own at the date you picked."]}),e.jsx("p",{children:"An expired filter isn't deleted the instant it lapses — it stays here, marked Expired, so you can see what it did and when it stopped."})]});function z({account:a}){const i=a.accountId,{filters:d,isPending:r,isError:c,error:t,refetch:o}=k(i),{deleteFilter:n,deletingFilterId:l}=D(i),{data:s}=u({...T({path:{accountId:i}}),staleTime:1/0}),m=x.useCallback(g=>{const p=s?.items.find(f=>f.mailboxId===g);return p?E(p.fullPath):void 0},[s?.items]);return e.jsxs("section",{className:"space-y-2",children:[e.jsx("h2",{className:"text-sm font-semibold text-fg",children:a.email}),r?e.jsx("div",{className:"h-16 animate-pulse rounded-md border border-line bg-surface","aria-busy":"true","aria-label":`Loading filters for ${a.email}`}):c?e.jsx(h,{variant:"inline",title:`Couldn't load filters for ${a.email}`,error:t,onRetry:()=>{o()}}):e.jsx(M,{filters:d,mailboxName:m,onDelete:n,deletingFilterId:l})]})}function G(){const a=y(),[i,d]=x.useState(!0),{data:r,isPending:c,isError:t,error:o,refetch:n}=u(v()),l=s=>{const m=I[s];m&&a({to:m})};return e.jsx(O,{items:S,activeId:"filters",title:"Filters",description:"Standing and temporary rules created by Organize, per account.",help:$,helpOpen:i,onToggleHelp:()=>d(s=>!s),onSelect:l,onBackToMail:()=>{a({to:"/mail"})},children:c?e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading accounts"}):t?e.jsx(h,{title:"Couldn't load accounts",error:o,onRetry:()=>{n()}}):r.accounts.length===0?e.jsx("p",{className:"py-12 text-sm text-fg-muted",children:"No accounts configured."}):e.jsx("div",{className:"space-y-8",children:r.accounts.map(s=>e.jsx(z,{account:s},s.accountId))})})}export{G as component};
1
+ import{j as e,d as b,B as j,T as N,aa as y,r as x,am as u,at as v,bz as S,bA as I,ab as T,aJ as E}from"./index-BTaq4YvJ.js";import{S as O}from"./settings-screen-CuPCQCpg.js";import{f as w,N as A,a as F,c as k,d as D}from"./filter-status-HlYq9KVy.js";import{E as h}from"./ErrorState-DY2nBA2y.js";import"./avatar-BRqzDai-.js";import"./useMutation-CyIvOZr9.js";function M({filters:a,mailboxName:i,onDelete:d,deletingFilterId:r,now:c=Date.now()}){return a.length===0?e.jsx("p",{className:"py-6 text-sm text-fg-muted",children:"No filters yet. Select a few messages in the inbox and choose Organize to make one."}):e.jsx("ul",{className:"divide-y divide-line rounded-md border border-line",children:a.map(t=>{const o=w(t,c),n=o==="Expired",l=t.actionMailboxId!==A?i(t.actionMailboxId):void 0,s=F(t.expiresAt);return e.jsxs("li",{className:"flex items-start gap-3 px-3 py-2.5",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`truncate text-sm font-medium ${n?"text-fg-muted":"text-fg"}`,children:t.name}),e.jsx(b,{tone:n?"neutral":"positive",dot:!0,children:o})]}),e.jsxs("p",{className:"mt-0.5 text-xs text-fg-subtle",children:[l?`Moves matches to ${l}`:"No move action",t.scope==="Temporary"&&s?n?` · expired ${s}`:` · until ${s}`:t.scope==="Standing"?" · always":""]})]}),e.jsx(j,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-4 text-danger"}),onClick:()=>d(t.filterId),disabled:r===t.filterId,"aria-label":`Delete filter ${t.name}`})]},t.filterId)})})}const $=e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:["Filters are the standing rules Organize creates. A"," ",e.jsx("strong",{children:"Standing"})," filter keeps working on new mail; a"," ",e.jsx("strong",{children:"Temporary"})," one stops on its own at the date you picked."]}),e.jsx("p",{children:"An expired filter isn't deleted the instant it lapses — it stays here, marked Expired, so you can see what it did and when it stopped."})]});function z({account:a}){const i=a.accountId,{filters:d,isPending:r,isError:c,error:t,refetch:o}=k(i),{deleteFilter:n,deletingFilterId:l}=D(i),{data:s}=u({...T({path:{accountId:i}}),staleTime:1/0}),m=x.useCallback(g=>{const p=s?.items.find(f=>f.mailboxId===g);return p?E(p.fullPath):void 0},[s?.items]);return e.jsxs("section",{className:"space-y-2",children:[e.jsx("h2",{className:"text-sm font-semibold text-fg",children:a.email}),r?e.jsx("div",{className:"h-16 animate-pulse rounded-md border border-line bg-surface","aria-busy":"true","aria-label":`Loading filters for ${a.email}`}):c?e.jsx(h,{variant:"inline",title:`Couldn't load filters for ${a.email}`,error:t,onRetry:()=>{o()}}):e.jsx(M,{filters:d,mailboxName:m,onDelete:n,deletingFilterId:l})]})}function G(){const a=y(),[i,d]=x.useState(!0),{data:r,isPending:c,isError:t,error:o,refetch:n}=u(v()),l=s=>{const m=I[s];m&&a({to:m})};return e.jsx(O,{items:S,activeId:"filters",title:"Filters",description:"Standing and temporary rules created by Organize, per account.",help:$,helpOpen:i,onToggleHelp:()=>d(s=>!s),onSelect:l,onBackToMail:()=>{a({to:"/mail"})},children:c?e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading accounts"}):t?e.jsx(h,{title:"Couldn't load accounts",error:o,onRetry:()=>{n()}}):r.accounts.length===0?e.jsx("p",{className:"py-12 text-sm text-fg-muted",children:"No accounts configured."}):e.jsx("div",{className:"space-y-8",children:r.accounts.map(s=>e.jsx(z,{account:s},s.accountId))})})}export{G as component};
@@ -1 +1 @@
1
- import{j as r}from"./index-YTL2DB0M.js";import{E as o}from"./ErrorState-CpdwMHyq.js";const l=({error:t,reset:e})=>r.jsx("div",{className:"flex h-full items-center justify-center bg-canvas p-4",children:r.jsx(o,{title:"Couldn't load your starred mail",error:t,onRetry:e})});export{l as errorComponent};
1
+ import{j as r}from"./index-BTaq4YvJ.js";import{E as o}from"./ErrorState-DY2nBA2y.js";const l=({error:t,reset:e})=>r.jsx("div",{className:"flex h-full items-center justify-center bg-canvas p-4",children:r.jsx(o,{title:"Couldn't load your starred mail",error:t,onRetry:e})});export{l as errorComponent};
@@ -1 +1 @@
1
- import{a}from"./index-YTL2DB0M.js";const o=a("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);export{o as F};
1
+ import{a}from"./index-BTaq4YvJ.js";const o=a("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);export{o as F};
@@ -1 +1 @@
1
- import{j as e,bL as v,r as j,bM as C,t as S,B as A,bN as E,aa as R,am as y,at as k,bz as L,bA as P,V as T,ab as _,bl as M,bO as w,aE as F,bP as D,bQ as Q,g as $,bR as B}from"./index-YTL2DB0M.js";import{S as z,C as G}from"./select-BovbBSbR.js";import{F as H}from"./folder-BgSCQNpW.js";import{S as K}from"./settings-screen-B5JdvJPg.js";import{u as N}from"./useMutation-DcYdAWup.js";import{E as O}from"./ErrorState-CpdwMHyq.js";import"./avatar-BBoH-nD9.js";const V=["inbox","drafts","sent","archive","junk","trash"],x="";function q(a){const n=a.messageCount===1?"msg":"msgs";return`${v(a.providerPath)} · ${a.messageCount} ${n}`}function J({role:a,folders:n,appointedId:r,displayName:i,onAppoint:m,onRename:p}){const[c,d]=j.useState(i),s=n.find(l=>l.mailboxId===r)??null,t=E(a),u=s!=null&&c.trim()!==i.trim();return e.jsxs("div",{className:"flex flex-col gap-1 border-b border-line px-row-inset py-2.5 last:border-b-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"flex w-28 shrink-0 items-center gap-2 text-sm font-medium text-fg",children:[C(a),t]}),e.jsxs(z,{className:"w-56 shrink-0",value:r??x,"aria-label":`Folder for ${t}`,onChange:l=>m(a,l.target.value===x?null:l.target.value),children:[e.jsx("option",{value:x,children:"None"}),n.map(l=>e.jsx("option",{value:l.mailboxId,children:q(l)},l.mailboxId))]}),s&&e.jsxs(e.Fragment,{children:[e.jsx(S,{className:"flex-1",value:c,placeholder:t,"aria-label":`Display name for ${t}`,onChange:l=>d(l.target.value)}),u&&e.jsx(A,{variant:"ghost",size:"sm",className:"shrink-0",icon:e.jsx(G,{className:"size-4"}),"aria-label":"Save display name",onClick:()=>p(s.mailboxId,c)})]})]}),s&&e.jsxs("span",{className:"truncate pl-[7.5rem] text-2xs text-fg-subtle",title:s.providerPath,children:[s.providerPath," · ",s.messageCount," ",s.messageCount===1?"message":"messages"]})]})}function U({accountEmail:a,folders:n,appointments:r,displayNames:i={},onAppoint:m,onRename:p}){const c=new Set(Object.values(r).filter(s=>s!=null)),d=n.filter(s=>!c.has(s.mailboxId));return e.jsxs("section",{className:"space-y-3",children:[e.jsxs("header",{className:"space-y-1",children:[e.jsxs("h2",{className:"text-sm font-semibold text-fg",children:["Folder roles — ",a]}),e.jsx("p",{className:"text-xs text-fg-muted",children:"Each role points to one folder. Pick the folder that holds the mail — the counts help you tell real folders from empty look-alikes. Appointing a folder here removes it from any other role."})]}),e.jsx("div",{className:"rounded-sm border border-line bg-surface",children:V.map(s=>{const t=r[s]??null;return e.jsx(J,{role:s,folders:n,appointedId:t,displayName:t?i[t]??"":"",onAppoint:m,onRename:p},s)})}),d.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("h3",{className:"text-xs font-medium text-fg-muted",children:"Other folders"}),e.jsx("ul",{className:"rounded-sm border border-line bg-surface",children:d.map(s=>e.jsxs("li",{className:"flex items-center gap-2 border-b border-line px-row-inset py-2 text-sm text-fg last:border-b-0",children:[e.jsx(H,{className:"size-4 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"truncate",children:v(s.providerPath)}),e.jsxs("span",{className:"ml-auto shrink-0 text-2xs text-fg-subtle",children:[s.messageCount," ",s.messageCount===1?"message":"messages"]})]},s.mailboxId))})]})]})}const W=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Each canonical role — Inbox, Drafts, Sent, Archive, Spam, Trash — points at one of your account's real folders. Pick the one that actually holds the mail; the message counts tell real folders from empty look-alikes."}),e.jsx("p",{children:`Appointing a folder to a role here doesn't touch any other role, and doesn't move or rename anything on the server — it just tells Remit which folder to treat as e.g. "Drafts" everywhere (sidebar, unread badges, the compose flow).`}),e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Display name"})," renames the appointed folder for the sidebar. Leave it blank to use the role's canonical name."]})]});function X({account:a}){const n=T(),r=a.accountId,{data:i,isPending:m,isError:p,error:c,refetch:d}=y(_({path:{accountId:r}})),s=N({...w(),onSuccess:()=>{n.invalidateQueries({queryKey:M()})}}),t=N({...D(),onSuccess:()=>{n.invalidateQueries({queryKey:F({path:{accountId:r}})})}}),u=(o,h)=>{s.mutate({path:{accountId:r,role:B[o]},body:{mailboxId:h}})},l=(o,h)=>{const g=h.trim();t.mutate({path:{accountId:r,mailboxId:o},body:{displayNameOverride:g===""?null:g}})};if(m)return e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":`Loading folders for ${a.email}`});if(p)return e.jsx(O,{variant:"inline",title:`Couldn't load folders for ${a.email}`,error:c,onRetry:()=>{d()}});const I=i.items.map(o=>({mailboxId:o.mailboxId,providerPath:o.fullPath,messageCount:o.messageCount})),f={};for(const o of a.folderAppointments){const h=Q[o.role];h&&(f[h]=o.mailboxId??null)}const b={};for(const o of i.items)o.displayNameOverride&&(b[o.mailboxId]=o.displayNameOverride);return e.jsxs("div",{className:"space-y-2",children:[(s.isError||t.isError)&&e.jsx($,{tone:"danger",variant:"soft",children:"Couldn't save that change. Please try again."}),e.jsx(U,{accountEmail:a.email,folders:I,appointments:f,displayNames:b,onAppoint:u,onRename:l})]})}function ne(){const a=R(),[n,r]=j.useState(!0),{data:i,isPending:m,isError:p,error:c,refetch:d}=y(k()),s=t=>{const u=P[t];u&&a({to:u})};return e.jsx(K,{items:L,activeId:"folders",title:"Folder roles",description:"Appoint which real folder fills each canonical role, per account.",help:W,helpOpen:n,onToggleHelp:()=>r(t=>!t),onSelect:s,onBackToMail:()=>{a({to:"/mail"})},children:m?e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading accounts"}):p?e.jsx(O,{title:"Couldn't load accounts",error:c,onRetry:()=>{d()}}):i.accounts.length===0?e.jsx("p",{className:"py-12 text-sm text-fg-muted",children:"No accounts configured."}):e.jsx("div",{className:"space-y-8",children:i.accounts.map(t=>e.jsx(X,{account:t},t.accountId))})})}export{ne as component};
1
+ import{j as e,bL as v,r as j,bM as C,t as S,B as A,bN as E,aa as R,am as y,at as k,bz as L,bA as P,V as T,ab as _,bl as M,bO as w,aE as F,bP as D,bQ as Q,g as $,bR as B}from"./index-BTaq4YvJ.js";import{S as z,C as G}from"./select-CbBsrqXl.js";import{F as H}from"./folder-C6jvhWTG.js";import{S as K}from"./settings-screen-CuPCQCpg.js";import{u as N}from"./useMutation-CyIvOZr9.js";import{E as O}from"./ErrorState-DY2nBA2y.js";import"./avatar-BRqzDai-.js";const V=["inbox","drafts","sent","archive","junk","trash"],x="";function q(a){const n=a.messageCount===1?"msg":"msgs";return`${v(a.providerPath)} · ${a.messageCount} ${n}`}function J({role:a,folders:n,appointedId:r,displayName:i,onAppoint:m,onRename:p}){const[c,d]=j.useState(i),s=n.find(l=>l.mailboxId===r)??null,t=E(a),u=s!=null&&c.trim()!==i.trim();return e.jsxs("div",{className:"flex flex-col gap-1 border-b border-line px-row-inset py-2.5 last:border-b-0",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"flex w-28 shrink-0 items-center gap-2 text-sm font-medium text-fg",children:[C(a),t]}),e.jsxs(z,{className:"w-56 shrink-0",value:r??x,"aria-label":`Folder for ${t}`,onChange:l=>m(a,l.target.value===x?null:l.target.value),children:[e.jsx("option",{value:x,children:"None"}),n.map(l=>e.jsx("option",{value:l.mailboxId,children:q(l)},l.mailboxId))]}),s&&e.jsxs(e.Fragment,{children:[e.jsx(S,{className:"flex-1",value:c,placeholder:t,"aria-label":`Display name for ${t}`,onChange:l=>d(l.target.value)}),u&&e.jsx(A,{variant:"ghost",size:"sm",className:"shrink-0",icon:e.jsx(G,{className:"size-4"}),"aria-label":"Save display name",onClick:()=>p(s.mailboxId,c)})]})]}),s&&e.jsxs("span",{className:"truncate pl-[7.5rem] text-2xs text-fg-subtle",title:s.providerPath,children:[s.providerPath," · ",s.messageCount," ",s.messageCount===1?"message":"messages"]})]})}function U({accountEmail:a,folders:n,appointments:r,displayNames:i={},onAppoint:m,onRename:p}){const c=new Set(Object.values(r).filter(s=>s!=null)),d=n.filter(s=>!c.has(s.mailboxId));return e.jsxs("section",{className:"space-y-3",children:[e.jsxs("header",{className:"space-y-1",children:[e.jsxs("h2",{className:"text-sm font-semibold text-fg",children:["Folder roles — ",a]}),e.jsx("p",{className:"text-xs text-fg-muted",children:"Each role points to one folder. Pick the folder that holds the mail — the counts help you tell real folders from empty look-alikes. Appointing a folder here removes it from any other role."})]}),e.jsx("div",{className:"rounded-sm border border-line bg-surface",children:V.map(s=>{const t=r[s]??null;return e.jsx(J,{role:s,folders:n,appointedId:t,displayName:t?i[t]??"":"",onAppoint:m,onRename:p},s)})}),d.length>0&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("h3",{className:"text-xs font-medium text-fg-muted",children:"Other folders"}),e.jsx("ul",{className:"rounded-sm border border-line bg-surface",children:d.map(s=>e.jsxs("li",{className:"flex items-center gap-2 border-b border-line px-row-inset py-2 text-sm text-fg last:border-b-0",children:[e.jsx(H,{className:"size-4 shrink-0 text-fg-subtle"}),e.jsx("span",{className:"truncate",children:v(s.providerPath)}),e.jsxs("span",{className:"ml-auto shrink-0 text-2xs text-fg-subtle",children:[s.messageCount," ",s.messageCount===1?"message":"messages"]})]},s.mailboxId))})]})]})}const W=e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{children:"Each canonical role — Inbox, Drafts, Sent, Archive, Spam, Trash — points at one of your account's real folders. Pick the one that actually holds the mail; the message counts tell real folders from empty look-alikes."}),e.jsx("p",{children:`Appointing a folder to a role here doesn't touch any other role, and doesn't move or rename anything on the server — it just tells Remit which folder to treat as e.g. "Drafts" everywhere (sidebar, unread badges, the compose flow).`}),e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Display name"})," renames the appointed folder for the sidebar. Leave it blank to use the role's canonical name."]})]});function X({account:a}){const n=T(),r=a.accountId,{data:i,isPending:m,isError:p,error:c,refetch:d}=y(_({path:{accountId:r}})),s=N({...w(),onSuccess:()=>{n.invalidateQueries({queryKey:M()})}}),t=N({...D(),onSuccess:()=>{n.invalidateQueries({queryKey:F({path:{accountId:r}})})}}),u=(o,h)=>{s.mutate({path:{accountId:r,role:B[o]},body:{mailboxId:h}})},l=(o,h)=>{const g=h.trim();t.mutate({path:{accountId:r,mailboxId:o},body:{displayNameOverride:g===""?null:g}})};if(m)return e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":`Loading folders for ${a.email}`});if(p)return e.jsx(O,{variant:"inline",title:`Couldn't load folders for ${a.email}`,error:c,onRetry:()=>{d()}});const I=i.items.map(o=>({mailboxId:o.mailboxId,providerPath:o.fullPath,messageCount:o.messageCount})),f={};for(const o of a.folderAppointments){const h=Q[o.role];h&&(f[h]=o.mailboxId??null)}const b={};for(const o of i.items)o.displayNameOverride&&(b[o.mailboxId]=o.displayNameOverride);return e.jsxs("div",{className:"space-y-2",children:[(s.isError||t.isError)&&e.jsx($,{tone:"danger",variant:"soft",children:"Couldn't save that change. Please try again."}),e.jsx(U,{accountEmail:a.email,folders:I,appointments:f,displayNames:b,onAppoint:u,onRename:l})]})}function ne(){const a=R(),[n,r]=j.useState(!0),{data:i,isPending:m,isError:p,error:c,refetch:d}=y(k()),s=t=>{const u=P[t];u&&a({to:u})};return e.jsx(K,{items:L,activeId:"folders",title:"Folder roles",description:"Appoint which real folder fills each canonical role, per account.",help:W,helpOpen:n,onToggleHelp:()=>r(t=>!t),onSelect:s,onBackToMail:()=>{a({to:"/mail"})},children:m?e.jsx("div",{className:"h-24 animate-pulse rounded-sm border border-line bg-surface","aria-busy":"true","aria-label":"Loading accounts"}):p?e.jsx(O,{title:"Couldn't load accounts",error:c,onRetry:()=>{d()}}):i.accounts.length===0?e.jsx("p",{className:"py-12 text-sm text-fg-muted",children:"No accounts configured."}):e.jsx("div",{className:"space-y-8",children:i.accounts.map(t=>e.jsx(X,{account:t},t.accountId))})})}export{ne as component};