// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-3.0-or-later // @source: https://gitlab.com/soapbox-pub/ditto/-/tree/f0a3877c const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/RequestToVanishDialog-O3iO-HuF.js","assets/rolldown-runtime-QTnfLwEv.js","assets/lucide-icons-BdRF0moN.js","assets/jsx-runtime-By8HlURe.js","assets/dist-DQ82bf9M.js","assets/esm-CRVqHnq2.js","assets/sha256-Cx9u8cje.js","assets/useMutation-CgsR0O-3.js","assets/useQuery-rCAlChE8.js","assets/useAppContext-Ughdk2-Z.js","assets/useCurrentUser-C6OJJlWo.js","assets/preload-helper-CZgWQFsJ.js","assets/dist-DQ_zK-Nr.js","assets/button-Cs26nq0r.js","assets/utils-BFSTDHdM.js","assets/dist-CrweAx5r.js","assets/dist-BI-be9Ir.js","assets/dist-DEYuuXMO.js","assets/useLoginActions-CynKtWLl.js","assets/appRelays-Clm5NPIe.js","assets/checkbox-CM1MZiSJ.js","assets/dist-Bz2abD7M.js","assets/dist-BMrfXngQ.js","assets/dist-wmZSqlsD.js","assets/dist-CxcvWxxD.js","assets/dist-CpRh64jj.js","assets/react-dom-YCZzGcHh.js","assets/dist-CX38Lmo0.js","assets/dist-DjUhKbpW.js","assets/alert-dialog-n1eT_Aa8.js","assets/dist-DW2GM_Ig.js","assets/dist-D9YQw-T8.js","assets/dist-DTSySAaw.js","assets/dist-BeEGgqo9.js","assets/Combination-C1QBaE03.js"])))=>i.map(i=>d[i]); import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{gt as t,oi as n,qi as r}from"./lucide-icons-BdRF0moN.js";import{t as i}from"./jsx-runtime-By8HlURe.js";import{t as a}from"./preload-helper-CZgWQFsJ.js";import{t as o}from"./useAppContext-Ughdk2-Z.js";import{i as s,o as c,r as l}from"./react-intl-eZirkCBg.js";import{o as u,t as d}from"./useCurrentUser-C6OJJlWo.js";import{c as f,n as p}from"./chunk-62JRHF6Z-yJW_vgm4.js";import{c as m}from"./LayoutContext-CjQBLGO-.js";import{pt as h,w as g}from"./index-CYEZWNq6.js";import{t as _}from"./PageHeader-CMi4aeE4.js";var v=e(r(),1),y=i(),b=(0,v.lazy)(()=>a(()=>import(`./RequestToVanishDialog-O3iO-HuF.js`).then(e=>e.n).then(e=>({default:e.RequestToVanishDialog})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]))),x=[{id:`profile`,label:s({id:`settings.sections.profile.label`,defaultMessage:`Profile`}),description:s({id:`settings.sections.profile.description`,defaultMessage:`Edit your display name, bio, and avatar`}),illustration:`/profile-intro.png`,path:`/settings/profile`,requiresAuth:!0},{id:`feed`,label:s({id:`settings.sections.feed.label`,defaultMessage:`Home Feed`}),description:s({id:`settings.sections.feed.description`,defaultMessage:`Choose what types of posts appear in your home feed`}),illustration:`/community-intro.png`,path:`/settings/feed`},{id:`content`,label:s({id:`settings.sections.content.label`,defaultMessage:`Content`}),description:s({id:`settings.sections.content.description`,defaultMessage:`Muted users, hashtags, and sensitive content settings`}),illustration:`/mute-intro.png`,path:`/settings/content`},{id:`network`,label:s({id:`settings.sections.network.label`,defaultMessage:`Network`}),description:s({id:`settings.sections.network.description`,defaultMessage:`Relays and file upload servers`}),illustration:`/relay-intro.png`,path:`/settings/network`,requiresAuth:!0},{id:`data`,label:s({id:`settings.sections.data.label`,defaultMessage:`Import & Export`}),description:s({id:`settings.sections.data.description`,defaultMessage:`Back up your events, or restore them to the network`}),illustration:`/data-intro.png`,path:`/settings/data`,requiresAuth:!0},{id:`notifications`,label:s({id:`settings.sections.notifications.label`,defaultMessage:`Notifications`}),description:s({id:`settings.sections.notifications.description`,defaultMessage:`Configure push notification preferences`}),illustration:`/notification-intro.png`,path:`/settings/notifications`,requiresAuth:!0},{id:`advanced`,label:s({id:`settings.sections.advanced.label`,defaultMessage:`Advanced`}),description:s({id:`settings.sections.advanced.description`,defaultMessage:`Wallet, system, and power user settings`}),illustration:`/advanced-intro.png`,path:`/settings/advanced`},{id:`magic`,label:s({id:`settings.sections.magic.label`,defaultMessage:`Magic`}),description:s({id:`settings.sections.magic.description`,defaultMessage:`Enchanted cursor effects and mystical interface powers`}),illustration:`/magic-intro.png`,path:`/settings/magic`}];function S(){let e=c(),{user:r}=d(),{config:i,updateConfig:a}=o(),s=f(),[S,C]=(0,v.useState)(!1),[w,T]=(0,v.useState)(!1),[E,D]=(0,v.useState)(!1),O=(0,v.useRef)(null);(0,v.useEffect)(()=>{if(!i.magicMouse)return O.current=setTimeout(()=>T(!0),120*1e3),()=>{O.current&&clearTimeout(O.current)}},[i.magicMouse]),m({}),g({title:`${e.formatMessage({id:`settings.title`,defaultMessage:`Settings`})} | ${i.appName}`,description:e.formatMessage({id:`settings.metaDescription`,defaultMessage:`Manage your {appName} settings`},{appName:i.appName})});let k=x.filter(e=>(!e.requiresAuth||r)&&(e.id!==`magic`||i.magicMouse));function A(){if(i.magicMouse){s(`/settings/magic`);return}C(!0),setTimeout(()=>C(!1),1e3),a(e=>({...e,magicMouse:!0})),u({title:e.formatMessage({id:`settings.magicUnlocked`,defaultMessage:`✨ Magical potential unlocked`}),description:e.formatMessage({id:`settings.magicUnlockedDescription`,defaultMessage:`You have awakened the arcane. Your cursor now burns with enchanted fire.`})})}return(0,y.jsxs)(`main`,{className:`relative min-h-screen pb-16 sidebar:pb-0`,children:[(0,y.jsx)(_,{title:e.formatMessage({id:`settings.title`,defaultMessage:`Settings`}),icon:(0,y.jsx)(t,{className:`size-5`}),backTo:`/`}),(0,y.jsxs)(`div`,{className:`px-7 pb-4 pt-4 text-center space-y-2.5`,children:[(0,y.jsxs)(`p`,{className:`text-xs text-muted-foreground leading-relaxed select-none`,children:[(0,y.jsx)(l,{id:`settings.intro`,defaultMessage:`Shape your identity, tune your feed, and manage how you connect to the Nostr network.`}),(0,y.jsx)(`br`,{}),(0,y.jsx)(l,{id:`settings.introSub`,defaultMessage:`Everything you need to make this place feel like yours.`})]}),(0,y.jsx)(`p`,{className:`text-[10px] tracking-[0.5em] uppercase text-primary/60 select-none pt-6`,children:(0,y.jsx)(l,{id:`settings.codex`,defaultMessage:`Codex of Configuration`})})]}),(0,y.jsxs)(`div`,{className:`flex items-center gap-3 px-6 pb-5`,children:[(0,y.jsx)(`div`,{className:`h-px flex-1 bg-gradient-to-r from-transparent via-primary/40 to-primary/60`}),(0,y.jsx)(`span`,{className:`text-primary/50 text-xs tracking-[0.3em] select-none`,children:`✦`}),(0,y.jsx)(`div`,{className:`h-px flex-1 bg-gradient-to-l from-transparent via-primary/40 to-primary/60`})]}),(0,y.jsx)(`div`,{className:`px-4`,children:k.map((e,t)=>(0,y.jsxs)(`div`,{children:[(0,y.jsxs)(`div`,{className:`flex items-center gap-4 px-3 py-2 my-1 cursor-pointer rounded-xl transition-colors hover:bg-muted/60 active:bg-muted/80 group`,onClick:()=>s(e.path),children:[(0,y.jsx)(`div`,{className:`flex items-center justify-center size-20 shrink-0`,children:e.illustration&&(0,y.jsx)(h,{src:e.illustration,size:`w-22`})}),(0,y.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,y.jsx)(`p`,{className:`text-sm font-semibold`,children:(0,y.jsx)(l,{...e.label})}),(0,y.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:(0,y.jsx)(l,{...e.description})})]}),(0,y.jsx)(n,{className:`size-4 text-primary/40 shrink-0 group-hover:text-primary/70 transition-colors`,strokeWidth:4})]}),tD(!0),className:`text-xs text-destructive-foreground bg-destructive/80 hover:bg-destructive rounded-full px-4 py-1.5 transition-colors`,children:(0,y.jsx)(l,{id:`settings.deleteAccount`,defaultMessage:`Delete Account`})})}),r&&(0,y.jsx)(v.Suspense,{fallback:null,children:(0,y.jsx)(b,{open:E,onOpenChange:D})}),(0,y.jsxs)(`div`,{className:`flex items-center gap-3 px-6 pt-4 pb-2`,children:[(0,y.jsx)(`div`,{className:`h-px flex-1 bg-gradient-to-r from-transparent via-primary/20 to-primary/30`}),(0,y.jsx)(`span`,{className:`text-primary/30 text-[10px] tracking-[0.4em] select-none`,children:`◆`}),(0,y.jsx)(`div`,{className:`h-px flex-1 bg-gradient-to-l from-transparent via-primary/20 to-primary/30`})]}),(0,y.jsxs)(p,{to:`/changelog`,className:`block text-center text-[11px] text-muted-foreground/50 hover:text-muted-foreground transition-colors select-none pt-1 pb-2`,children:[`v`,`2.38.1`,`+`,` (`,new Date(`2026-09-17T19:17:00.826Z`).toLocaleDateString(),`)`]}),!i.magicMouse&&w&&(0,y.jsx)(`div`,{className:`flex justify-center pt-16 pb-12`,children:(0,y.jsxs)(`button`,{onClick:A,className:`relative group focus:outline-none`,"aria-label":i.magicMouse?e.formatMessage({id:`settings.openMagic`,defaultMessage:`Open Magic settings`}):e.formatMessage({id:`settings.unlockMagic`,defaultMessage:`Unlock magical potential`}),children:[(0,y.jsx)(`div`,{className:`absolute inset-0 rounded-full blur-xl animate-pulse-slow`,style:{background:`radial-gradient(circle, hsl(var(--primary) / 0.2), transparent 60%)`,opacity:S?1:void 0,transform:S?`scale(1.5)`:void 0,transition:`opacity 0.8s, transform 0.8s`}}),(0,y.jsx)(`div`,{className:!S&&!i.magicMouse?`animate-sigil-glow`:void 0,style:S||i.magicMouse?{opacity:S?1:.55,filter:S?`drop-shadow(0 0 20px hsl(var(--primary))) drop-shadow(0 0 40px hsl(var(--primary) / 0.4))`:`drop-shadow(0 0 8px hsl(var(--primary) / 0.7))`,transform:S?`scale(1.12)`:`scale(1)`,transition:`opacity 0.8s, filter 0.8s, transform 0.5s`}:void 0,children:(0,y.jsx)(h,{src:`/magic-intro.png`,size:`w-72`})})]})})]})}export{S as SettingsPage}; // @license-end