1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/android-sync-identity-BAhJ8ODd.js","assets/dist-C5po-C0e.js","assets/chunk-CilyBKbf.js","assets/x25519-DSi3mQjw.js"])))=>i.map(i=>d[i]);2import{i as e,t}from"./dist-C5po-C0e.js";import{t as n}from"./preload-helper-D4M6sveU.js";import{A as r,B as i,D as a,E as o,F as s,G as c,H as l,I as u,J as d,K as f,L as p,M as m,N as h,P as g,R as _,T as v,U as y,V as b,a as x,d as S,i as C,j as w,k as T,n as E,r as ee,t as D,z as O}from"./index-Dc8ZpF9k.js";var te=p(`<span class=peach-pro-mark aria-label="Pro feature">✦`),ne=p(`<button class=peach-settings-cat-row><div class=peach-settings-cat-icon></div><div class=peach-settings-cat-content><span class=peach-settings-cat-name></span><span class=peach-settings-cat-desc></span></div><svg class=peach-settings-cat-chevron width=6 height=10 viewBox="0 0 6 10"fill=none stroke=currentColor stroke-width=1.1 stroke-linecap=round stroke-linejoin=round><path d="M1 1l4 4-4 4">`),re=p(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round><path d="M8 2L3 4.5V8c0 3 2.5 5 5 6 2.5-1 5-3 5-6V4.5L8 2z">`),ie=p(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round><path d="M4 10a3 3 0 100-6 3 3 0 000 6zm3-3h6m-2-2v4">`),ae=p(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round><rect x=3 y=7 width=10 height=7 rx=1.5></rect><path d="M6 7V5a3 3 0 016 0v2">`),oe=p(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round><path d="M4 8a4 4 0 014-4m4 4a4 4 0 01-4 4"></path><path d="M14 6l-2 2-2-2"></path><path d="M2 10l2-2 2 2">`),se=p(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round><circle cx=8 cy=8 r=3></circle><path d="M8 2v1m0 10v1M2 8h1m10 0h1m-2.1-4.1-.7.7M4.8 11.3l-.7.7m0-7.7.7.7m6.5 6.3-.7.7">`),ce=p(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round><rect x=2 y=5 width=5 height=4 rx=1></rect><rect x=9 y=7 width=5 height=4 rx=1></rect><path d="M7 7h2m-2 2h2">`),le=p(`<svg width=14 height=14 viewBox="0 0 16 16"fill=none stroke=currentColor stroke-width=1.2 stroke-linecap=round stroke-linejoin=round><path d="M3 4h10a1 1 0 011 1v6a1 1 0 01-1 1H5l-3 2V5a1 1 0 011-1z">`),ue=p(`<p class=peach-settings-nav-label>MOBILE`),de=p(`<div class=peach-settings-body><p class=peach-settings-nav-label>PROTECTION</p><p class=peach-settings-nav-label>VAULT</p><p class=peach-settings-nav-label>PREFERENCES</p><p class=peach-settings-nav-label>SUPPORT</p><div class=peach-settings-footer><span>Peach </span><span class=peach-divider></span><span>Browser extension`),fe=p(`<div class="peach-settings-row peach-settings-row--meta"><span>Last check</span><span class=peach-settings-value>`),pe=p(`<p class="peach-hint peach-hint-error"style=margin:0>`),me=p(`<p class=peach-hint style=margin:0;color:var(--peach-accent)>password changed ✓`),he=p(`<div class=peach-settings-stack style="padding:4px 0 2px;gap:6px"><input class=peach-settings-input type=password placeholder="current password"autocomplete=current-password><input class=peach-settings-input type=password placeholder="new password (min 12 chars)"autocomplete=new-password><input class=peach-settings-input type=password placeholder="confirm new password"autocomplete=new-password><button class="peach-btn peach-btn--accent peach-btn--sm"style=align-self:flex-start>`),ge=p(`<div class="peach-settings-row peach-settings-row--meta"><span class=peach-settings-value style=font-size:11px;line-height:1.5;color:var(--peach-t2)>If someone forces you to unlock Peach, enter the duress password instead. A decoy empty vault opens; your real vault stays hidden.`),_e=p(`<div class="peach-settings-row peach-settings-row--meta"><span class=peach-settings-value style=color:var(--peach-sync-ok)>`),ve=p(`<div class="peach-settings-row peach-settings-row--meta"><button class="peach-btn peach-btn--subtle peach-btn--sm">`),ye=p(`<label class=peach-label>new duress password`),be=p(`<input class=peach-settings-input type=password placeholder="duress password (min 8 chars)"autocomplete=new-password>`),xe=p(`<label class=peach-label>confirm duress password`),Se=p(`<input class=peach-settings-input type=password placeholder="confirm duress password"autocomplete=new-password>`),Ce=p(`<p class="peach-hint peach-hint-error">`),we=p(`<button class="peach-btn peach-btn--ghost peach-btn--sm"style=color:var(--peach-breach)>`),Te=p(`<button class="peach-btn peach-btn--accent peach-btn--sm">`),Ee=p(`<div class=peach-duress-form><label class=peach-label>main password (to confirm)</label><input class=peach-settings-input type=password placeholder="your current master password"autocomplete=current-password><div class=peach-duress-actions><button class="peach-btn peach-btn--subtle peach-btn--sm">cancel`),De=p(`<div class="peach-settings-row peach-settings-row--meta"><span class=peach-settings-value style=color:#e7b36b>`),Oe=p(`<div class=peach-settings-body><div class=peach-settings-group><p class=peach-settings-sub-label>LOCKING</p><div class=peach-settings-row><span>Lock on close</span><button aria-label="Toggle lock on close"><span class=peach-toggle-knob></span></button></div><div class=peach-settings-row><span>Auto-lock after</span><select class=peach-settings-select><option value=1>1 minute</option><option value=5>5 minutes</option><option value=15>15 minutes</option><option value=30>30 minutes</option><option value=0>Never</option></select></div><p class=peach-settings-sub-label>BREACH PROTECTION</p><div class=peach-settings-row><span>Breach monitoring</span><button aria-label="Toggle breach monitoring"><span class=peach-toggle-knob></span></button></div><div class="peach-settings-row peach-settings-row--meta"><span>Check all passwords</span><button class="peach-btn peach-btn--subtle peach-btn--sm"></button></div><p class=peach-settings-sub-label>MASTER PASSWORD</p><div class="peach-settings-row peach-settings-row--meta"><span>Master password</span><button class="peach-btn peach-btn--subtle peach-btn--sm"></button></div><p class=peach-settings-sub-label>DURESS PASSWORD</p><div class="peach-settings-row peach-settings-row--top"><div class=peach-settings-row-main><span>Duress password</span><span class=peach-settings-value style=font-size:11px;line-height:1.5;color:var(--t2)>If entered under coercion, shows a decoy empty vault instead of your real one.</span></div><div></div></div><p class=peach-settings-sub-label>CANARY ENTRIES</p><div class="peach-settings-row peach-settings-row--top"><div class=peach-settings-row-main><span>Canary entries</span><span class=peach-settings-value style=font-size:11px;line-height:1.5;color:var(--peach-t2)>Silently pings a webhook when an entry is accessed. Configure canary on any entry in your vault.</span></div><span class=peach-settings-value style=flex-shrink:0></span></div><p class=peach-settings-sub-label>PASSKEYS</p><div class="peach-settings-row peach-settings-row--top"><div class=peach-settings-row-main><span>Intercept passkey requests</span><span class=peach-settings-value style=font-size:11px;line-height:1.5;color:var(--t2)>Peach can handle passkey sign-in and creation on supported Chromium browsers.</span></div><button aria-label="Toggle passkey interception"><span class=peach-toggle-knob></span></button></div><div class="peach-settings-row peach-settings-row--meta"><span>Status</span><span class=peach-settings-value></span></div><div class="peach-settings-row peach-settings-row--meta"><span>Browser</span><span class=peach-settings-value></span></div><div class=peach-info-notice style=margin-top:8px>Only one passkey provider can be active at a time. Disable Bitwarden or 1Password passkey interception if Peach reports a conflict.`),ke=p(`<div class="peach-settings-row peach-settings-row--meta"><span style=overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0></span><button class="peach-btn peach-btn--subtle peach-btn--sm"style=flex-shrink:0>`),Ae=p(`<span class=peach-settings-value style=color:var(--peach-sync-ok)>`),je=p(`<div class="peach-settings-row peach-settings-row--meta"style=flex-direction:column;align-items:stretch;gap:6px><div class=peach-restore-warning> duplicate <!> found. The newest copy of each will be kept; older duplicates will be moved to trash.</div><div style=display:flex;gap:6px><button class="peach-btn peach-btn--subtle peach-btn--sm">cancel</button><button class="peach-btn peach-btn--accent peach-btn--sm">`),Me=p(`<div class="peach-settings-row peach-settings-row--meta"><span> card<!> set to never save</span><button class="peach-btn peach-btn--subtle peach-btn--sm">Clear`),Ne=p(`<p class=peach-settings-hint>Loading…`),Pe=p(`<p class=peach-settings-hint>No snapshots yet. Peach saves automatically before every change — saves, syncs, and imports.`),Fe=p(`<p class=peach-settings-hint>Restoring locks your vault. Unlock with the password that encrypted that snapshot to confirm.`),Ie=p(`<div class=peach-history-list>`),Le=p(`<p class=peach-history-footer> of 10 snapshots`),Re=p(`<div class=peach-danger-card><div class=peach-danger-card-head><span class=peach-danger-card-glyph aria-hidden=true>⟳</span><h3 class=peach-danger-card-title>Replace vault from backup</h3></div><p class=peach-danger-card-copy>Wipes the current vault and restores from a backup file. Recoverable only if your backup is good.</p><button class=peach-danger-card-button>Choose backup file`),ze=p(`<div class="peach-danger-card peach-danger-card--hazard"><div class=peach-danger-card-head><span class=peach-danger-card-glyph aria-hidden=true>⚠</span><h3 class=peach-danger-card-title>Destroy vault</h3></div><p class=peach-danger-card-copy>Permanently wipes every entry, setting, and license on this device. There is no recovery.</p><button class=peach-danger-card-button>Begin destruction`),Be=p(`<div class=peach-settings-body><div class=peach-settings-group><p class=peach-settings-sub-label>ENTRIES</p><div class="peach-settings-row peach-settings-row--meta"><span>Entries</span><span class=peach-settings-value></span></div><div class="peach-settings-row peach-settings-row--meta"><span>Duplicates</span></div><p class=peach-settings-sub-label>MAINTENANCE</p><div class="peach-settings-row peach-settings-row--meta"><span>Trash auto-delete</span><select class=peach-settings-select><option value=7>7 days</option><option value=30>30 days</option><option value=90>90 days</option><option value=0>Never</option></select></div><div class="peach-settings-row peach-settings-row--meta"><span>Vault Health</span><button class="peach-btn peach-btn--subtle peach-btn--sm">open</button></div><p class=peach-settings-sub-label>DATA</p><div class="peach-settings-row peach-settings-row--meta"><span>Import passwords</span><button class="peach-btn peach-btn--subtle peach-btn--sm">open</button></div><div class="peach-settings-row peach-settings-row--meta"><span>Export backup</span><button class="peach-btn peach-btn--subtle peach-btn--sm">open</button></div><p class=peach-settings-sub-label>VAULT HISTORY</p><button class=peach-settings-advanced-toggle><span class=peach-settings-sub-label style=margin:0>ADVANCED</span><span class=peach-settings-advanced-chevron>`),Ve=p(`<button class="peach-btn peach-btn--subtle peach-btn--sm">`),He=p(`<div class=peach-history-row><div class=peach-history-meta><span class=peach-history-time></span><span class=peach-history-sub></span></div><button>`),Ue=p(`<div class=peach-settings-body><div class=peach-pro-upgrade><div class=peach-pro-upgrade-hero><svg class=peach-sync-hero-icon width=36 height=36 viewBox="0 0 36 36"fill=none aria-hidden=true><circle cx=9 cy=18 r=4.5 stroke=currentColor stroke-width=1.2 opacity=0.9></circle><circle cx=27 cy=18 r=4.5 stroke=currentColor stroke-width=1.2 opacity=0.9></circle><path d="M13.5 15.5C15 12 17 10 18 10C19 10 21 12 22.5 15.5"stroke=currentColor stroke-width=1.2 stroke-linecap=round opacity=0.6></path><path d="M13.5 20.5C15 24 17 26 18 26C19 26 21 24 22.5 20.5"stroke=currentColor stroke-width=1.2 stroke-linecap=round opacity=0.6></path><path d="M13.5 18H22.5"stroke=currentColor stroke-width=1.2 stroke-linecap=round opacity=0.35></path><path d="M20 16L22.5 18L20 20"stroke=var(--peach-accent) stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></path><path d="M16 16L13.5 18L16 20"stroke=var(--peach-accent) stroke-width=1.2 stroke-linecap=round stroke-linejoin=round></path></svg><h2 class=peach-pro-upgrade-title>Peach Sync</h2><p class=peach-pro-upgrade-tagline>Encrypted · peer-to-peer · local</p></div><div class=peach-pro-features><div class=peach-pro-feature><span class=peach-pro-feature-mark>✦</span><div class=peach-pro-feature-text><span class=peach-pro-feature-name>Always in sync</span><span class=peach-pro-feature-desc>Your vault stays current across all your devices automatically</span></div></div><div class=peach-pro-feature><span class=peach-pro-feature-mark>✦</span><div class=peach-pro-feature-text><span class=peach-pro-feature-name>No cloud. No relay.</span><span class=peach-pro-feature-desc>Direct device-to-device on your local network — nothing leaves your hands</span></div></div><div class=peach-pro-feature><span class=peach-pro-feature-mark>✦</span><div class=peach-pro-feature-text><span class=peach-pro-feature-name>Tailscale supported</span><span class=peach-pro-feature-desc>Sync securely from anywhere over your private Tailscale network</span></div></div><div class=peach-pro-feature><span class=peach-pro-feature-mark>✦</span><div class=peach-pro-feature-text><span class=peach-pro-feature-name>Zero friction after setup</span><span class=peach-pro-feature-desc>Mark a network as trusted once — sync happens in the background</span></div></div></div><button class="peach-btn peach-btn--accent peach-pro-upgrade-cta">Upgrade to Pro</button><button class=peach-pro-key-link>Already have a key? Enter it →`),We=p(`<p class=peach-settings-hint>No paired devices yet. Add a device to start syncing.`),Ge=p(`<div class=peach-sync-reset-confirm><p class=peach-sync-reset-confirm-headline>Reset sync identity?</p><p class=peach-sync-reset-confirm-body>This will unpair all devices. You will need to pair them again from scratch.</p><div class=peach-settings-actions--row><button class="peach-btn peach-btn--ghost peach-btn--sm">Cancel</button><button class="peach-btn peach-btn--danger peach-btn--sm">`),Ke=p(`<div class=peach-settings-body><div class=peach-settings-group><div class=peach-settings-row><span>Status</span><span class="peach-settings-value peach-settings-value--status"><span class=peach-sync-status-dot></span></span></div><div class="peach-settings-row peach-settings-row--meta"><span>Last sync</span><span class=peach-settings-value></span></div><div class="peach-settings-row peach-settings-row--meta"><button class="peach-btn peach-btn--subtle peach-btn--sm"></button></div><p class=peach-settings-hint>If you edit on multiple devices before syncing, the most recently changed device wins. Use Vault History above to recover older versions if needed.</p><div class="peach-settings-row peach-settings-row--meta peach-settings-row--stack"><span class=peach-sync-section-label>Paired devices (<!>)</span><div class=peach-settings-actions--row><button class="peach-btn peach-btn--subtle peach-btn--sm">Add a device</button></div></div><div class="peach-settings-row peach-settings-row--meta peach-settings-row--stack"><span class=peach-sync-section-label>Trusted networks (<!>)</span><div class=peach-settings-actions--row></div></div><div class="peach-settings-row peach-settings-row--meta peach-settings-row--stack"><span class=peach-sync-section-label>Advanced`),qe=p(`<div class=peach-history-row><div class=peach-history-meta><span class=peach-history-time></span><span class=peach-history-sub></span></div><button class="peach-btn peach-btn--subtle peach-btn--sm peach-history-btn">Remove`),Je=p(`<button class="peach-btn peach-btn--ghost peach-btn--sm peach-sync-remove-btn">Remove`),Ye=p(`<div class=peach-sync-device-row><span class=peach-sync-device-name>`),Xe=p(`<span class=peach-sync-device-meta>Always trusted`),Ze=p(`<div class=peach-sync-advanced-row><div class=peach-sync-advanced-info><span class=peach-sync-advanced-name>Reset sync identity</span><span class=peach-sync-device-meta>Generates a new keypair and unpairs every device.</span></div><button class="peach-btn peach-btn--ghost peach-btn--sm peach-sync-remove-btn">Reset`),Qe=p(`<div class=peach-settings-body><div class=peach-settings-group><p class=peach-settings-sub-label>THEME</p><div class="peach-settings-row peach-settings-row--meta"><span>Theme</span><button class="peach-btn peach-btn--subtle peach-btn--sm"></button></div><p class=peach-settings-sub-label>ACCENT</p><div class="peach-settings-row peach-settings-row--meta peach-settings-row--accent"><span>Accent</span><div class=peach-accent-picker></div></div><p class=peach-settings-sub-label>DISPLAY FONT</p><div class="peach-settings-row peach-settings-row--meta peach-settings-row--font"><span>Font</span><div class=peach-font-picker></div></div><p class=peach-settings-sub-label>TEXT SIZE</p><div class="peach-settings-row peach-settings-row--meta"><span>Size</span><div class=peach-pill-group></div></div><p class=peach-settings-sub-label>MOTION</p><div class="peach-settings-row peach-settings-row--meta"><span>Reduce motion</span><button class="peach-btn peach-btn--subtle peach-btn--sm">`),$e=p(`<button class=peach-accent-swatch>`),et=p(`<button class=peach-font-swatch><span class=peach-font-swatch-glyph></span><span class=peach-font-swatch-name>`),tt=p(`<button class="peach-btn peach-btn--ghost peach-btn--sm">`),nt=p(`<div class=peach-shortcuts-conflict>`),rt=p(`<div class=peach-settings-body><div class="peach-settings-group peach-shortcuts-group"><p class=peach-settings-sub-label>ENTRY VIEW</p></div><div class="peach-settings-group peach-shortcuts-group"><p class=peach-settings-sub-label>ANYWHERE IN POPUP</p></div><div class=peach-settings-group style=display:flex;flex-direction:column;gap:8px><div class="peach-settings-row peach-settings-row--meta"><span>Inline autofill on page</span><a class=peach-settings-link href=chrome://extensions/shortcuts>⌘⇧P — customize ↗</a></div><button class="peach-btn peach-btn--subtle peach-btn--sm"style=align-self:flex-start>Reset all to defaults`),it=p(`<button class=peach-shortcut-reset title="Reset to default">↺`),at=p(`<div class=peach-shortcut-row><span class=peach-shortcut-row-label></span><button class=peach-shortcut-chip>`),ot=p(`<div class=peach-settings-license><span class=peach-settings-label>LICENSE KEY</span><div class=peach-settings-license-row><span class=peach-settings-license-key></span><button class=peach-settings-license-copy>`),st=p(`<div class=peach-pro-active><div class=peach-pro-active-hero><div class=peach-pro-active-mark-wrap></div><h2 class=peach-pro-active-title>Peach Pro</h2><p class=peach-pro-active-since></p></div><div class=peach-pro-active-features></div><button class=peach-pro-deactivate>`),ct=p(`<div class=peach-settings-body>`),lt=p(`<p class=peach-pro-key-error>That key doesn't look right.`),ut=p(`<div class=peach-pro-key-ceremony><p class=peach-pro-key-ceremony-label>Enter your license key</p><input class="peach-underline-input peach-pro-key-input"type=text placeholder=PPK-XXXX-XXXX-XXXX-XXXX-XXXX autocomplete=off><button class="peach-btn peach-btn--accent peach-pro-key-activate"></button><button class=peach-pro-key-cancel>cancel`),dt=p(`<div class=peach-pro-upgrade><div class=peach-pro-upgrade-hero><div class=peach-pro-upgrade-mark-wrap></div><h2 class=peach-pro-upgrade-title>Peach Pro</h2><p class=peach-pro-upgrade-tagline>Everything on every device.</p></div><div class=peach-pro-features></div><div class=peach-pro-upgrade-actions><p class=peach-pro-pricing>$39 · once · yours forever</p><a href=https://peachpasswords.com/#pricing target=_blank rel="noopener noreferrer"class="peach-btn peach-btn--accent peach-pro-upgrade-cta">Get Peach Pro</a><div class=peach-pro-key-divider><span>or</span></div><button class=peach-pro-key-link>Activate a license key`),ft=p(`<div class=peach-pro-feature><span class=peach-pro-feature-mark>✦</span><div class=peach-pro-feature-text><span class=peach-pro-feature-name></span><span class=peach-pro-feature-desc>`),pt=p(`<div class=peach-pro-active-feature><span class=peach-pro-active-feature-mark>✦</span><span class=peach-pro-active-feature-name>`),mt=p(`<p class="peach-feedback-result peach-feedback-result--ok">Sent — thank you`),ht=p(`<p class="peach-feedback-result peach-feedback-result--err">Failed to send — try again`),gt=p(`<div class=peach-settings-body><div class="peach-settings-group peach-feedback-group"><p class=peach-feedback-intro>Help us improve Peach. Every report goes directly to our inbox.</p><p class=peach-settings-sub-label>TYPE</p><div class=peach-feedback-chips></div><p class=peach-settings-sub-label>MESSAGE</p><textarea class=peach-feedback-textarea placeholder="Describe the issue or idea..."></textarea><p class=peach-feedback-meta>Version <!> · will be included automatically</p><button class="peach-btn peach-btn--accent peach-btn--sm peach-feedback-submit"></button><p class=peach-feedback-anon>Sent anonymously · no account required`),_t=p(`<button>`),vt=p(`<div class=peach-settings-body><div class=peach-settings-group><p class=peach-settings-label>Autofill service</p><div class=peach-mobile-row><span class=peach-mobile-status></span><button class="peach-btn peach-btn--subtle peach-btn--sm"></button></div></div><div class=peach-settings-group><p class=peach-settings-label>Biometric unlock</p><div class=peach-mobile-row><span class=peach-mobile-status>`),yt=p(`<div class="peach-overlay-view ov-enter-right"style=display:flex><div class=peach-overlay-header><button class="peach-btn peach-btn--ghost peach-btn--sm peach-icon-btn"aria-label=Back><svg width=7 height=12 viewBox="0 0 7 12"fill=none stroke=currentColor stroke-width=1.1 stroke-linecap=round stroke-linejoin=round><path d="M6 1L1 6L6 11"></path></svg></button><span class=peach-overlay-title></span><div class=peach-overlay-spacer>`),bt=[`Bug report`,`Feature request`,`Question`,`Other`];function xt(e){if(!e)return`Active`;try{let t=new Date(e);return Number.isNaN(t.getTime())?`Active`:`Active since ${t.toLocaleDateString(void 0,{month:`long`,year:`numeric`})}`}catch{return`Active`}}function St(e){return e===`security`||e===`vault`||e===`sync`||e===`appearance`||e===`shortcuts`||e===`license`||e===`feedback`||e===`mobile`}function k(p){let m=chrome.runtime.getManifest().version,k=p.initialSection,[A,Ct]=f(k&&St(k)?k:null),[wt,Tt]=f(!1),[Et,Dt]=f(null),[Ot,kt]=f(null),[At,jt]=f(``),[Mt,j]=f(null),[Nt,Pt]=f(null),[Ft,It]=f(!1),[M,N]=f([]),[Lt,Rt]=f([]),[P,zt]=f(`offline`),[Bt,F]=f(void 0),[Vt,Ht]=f(!1),I=()=>p.isPro??Vt(),[Ut,Wt]=f(!1),[L,R]=f(null),[z,Gt]=f(null),[Kt,qt]=f(!1),[B,Jt]=f(null),[V,H]=f(!1),[U,Yt]=f(null),[Xt,Zt]=f(0),[W,Qt]=f([]),[$t,en]=f(!1),[G,tn]=f(null);async function nn(){en(!0);try{Qt((await T({type:`GET_VAULT_HISTORY`})).data??[])}finally{en(!1)}}async function rn(e){if(G())return;tn(e);let t=await T({type:`RESTORE_VAULT_SNAPSHOT`,payload:{snapshotId:e}});tn(null),t.ok&&p.onBack()}function an(e){let t=Date.now()-e;if(t<6e4)return`Just now`;if(t<36e5)return`${Math.floor(t/6e4)}m ago`;let n=new Date(e),r=new Date().toDateString()===n.toDateString(),i=new Date(Date.now()-864e5).toDateString()===n.toDateString(),a=n.toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`});return r?`Today ${a}`:i?`Yesterday ${a}`:`${n.toLocaleDateString([],{month:`short`,day:`numeric`})} ${a}`}function on(e){return{local_save:`saved`,sync_received:`synced`,import:`imported`,restore:`restored`}[e]??e}let[sn,cn]=f(!1),[ln,un]=f(!1),[K,dn]=f(``),[q,fn]=f(``),[pn,mn]=f(``),[hn,gn]=f(!1),[_n,J]=f(null),[vn,yn]=f(!1),[Y,bn]=f(!1),[xn,Sn]=f(!1),[Cn,wn]=f(``),[Tn,En]=f(``),[Dn,On]=f(``),[kn,X]=f(!1),[An,Z]=f(null),[jn,Q]=f(null),[Mn,Nn]=f([]);function Pn(){try{return e(`Autofill`)}catch{return null}}let Fn=Pn(),[In,Ln]=f(!1),[Rn,zn]=f(!1),Bn=t.getPlatform()===`android`,[Vn,Hn]=f(null),[Un,Wn]=f(null),[Gn,Kn]=f(`Bug report`),[qn,Jn]=f(``),[Yn,Xn]=f(!1),[Zn,Qn]=f(null);d(async()=>{let[e,t,n,r,i,a]=await Promise.all([T({type:`GET_LICENSE`}),T({type:`GET_SYNC_STATE`}),T({type:`GET_PASSKEY_PROVIDER_STATE`}),T({type:`IS_DURESS_ENABLED`}),T({type:`GET_SETTINGS`}),T({type:`GET_LICENSE_KEY`})]);if(nn(),e.ok&&kt(e.data??null),t.ok){let e=t;e.data&&(N(e.data.pairedDevices??[]),Rt(e.data.trustedNetworks??[]),zt(e.data.status??`offline`),F(e.data.lastSyncAt),Ht(e.data.isPro??!1))}if(n.ok&&Gt(n.data??null),r.ok&&bn(r.data??!1),i.ok){let e=i.data;Zt(e?.declinedCardFingerprints?.length??0)}a.ok&&Gr(a.data??null);let o=await T({type:`GET_ENTRIES`});if(o.ok&&Nn((o.data??[]).filter(e=>e.canary?.webhookUrl).map(e=>({id:e.id,title:e.title,canary:e.canary}))),Bn){if(Fn){let{enabled:e}=await Fn.isEnabledAsAutofillService();Ln(e)}zn(await S())}chrome.runtime.onMessage.addListener(e=>{e.type===`SYNC_STATE_UPDATE`&&(N(e.pairedDevices??[]),Rt(e.trustedNetworks??[]),zt(e.status??`offline`),F(e.lastSyncAt),Ht(e.isPro??!1))})});async function $n(){if(J(null),!K().trim()){J(`enter your current password`);return}if(q().length<12){J(`new password must be at least 12 characters`);return}if(q()!==pn()){J(`new passwords do not match`);return}if(q()===K()){J(`new password must differ from current`);return}gn(!0);let e=await T({type:`CHANGE_PASSWORD`,payload:{currentPassword:K(),newPassword:q()}});e.ok?(yn(!0),dn(``),fn(``),mn(``),setTimeout(()=>{yn(!1),un(!1)},2200)):J(e.error??`failed to change password`),gn(!1)}let[er,tr]=f(!1);async function nr(e){await navigator.clipboard.writeText(e),tr(!0),setTimeout(()=>tr(!1),2e3)}async function rr(){let e=At().trim();if(!e)return;It(!0),j(null),Pt(null);let t=await T({type:`ACTIVATE_LICENSE`,payload:{key:e}});if(It(!1),t.ok){let n=t.data;n?.valid?(kt(n),Gr(e),Pt(`License activated!`),jt(``)):j(`Invalid license key`)}else j(`Activation failed`)}async function ir(){let e=z();if(!e||!e.supported)return;qt(!0);let t=await T({type:`SET_PASSKEY_PROVIDER_ENABLED`,payload:{enabled:!e.enabled}});qt(!1),t.ok&&Gt(t.data??null)}async function ar(){Tt(!0),Dt(null);let e=await T({type:`CHECK_ALL_BREACHES`});if(Tt(!1),e.ok){let t=e.data??{},n=Object.values(t).filter(e=>e>0).length;Dt(n>0?`${n} password${n>1?`s`:``} found in breaches`:`All passwords clean`),p.onBreachCheckDone()}}async function or(){if(P()===`not_trusted`)return;Wt(!0),R(null);let e=await T({type:`TRIGGER_SYNC`});if(e.ok){let t=e.data?.syncedCount??0;R({kind:`ok`,text:t>0?`Synced with ${t} ${t===1?`device`:`devices`}`:`Up to date`}),F(Date.now()),sr()}else{let t=e.error;R({kind:`err`,text:{no_paired_devices:`No paired devices`,no_devices_reachable:`No devices found`,vault_locked:`Vault is locked`,pro_required:`Sync requires Pro`}[t??``]??`Sync failed`})}setTimeout(()=>{Wt(!1),R(null)},3500)}async function sr(){let e=(await T({type:`GET_SYNC_STATE`})).data;e&&(N(e.pairedDevices??[]),Rt(e.trustedNetworks??[]),zt(e.status??`offline`),F(e.lastSyncAt))}async function cr(e){N(t=>t.filter(t=>t.deviceId!==e)),await T({type:`REMOVE_PAIRED_DEVICE`,payload:{deviceId:e}}),sr()}async function lr(e,t,n){await T({type:`REMOVE_TRUSTED_NETWORK`,payload:{ssid:e,bssid:t,isTailscale:n}}),sr()}let[ur,dr]=f(!1);async function fr(){ur()||(dr(!0),await T({type:`MARK_NETWORK_TRUSTED`}),await sr(),dr(!1))}let[pr,mr]=f(!1),[hr,gr]=f(!1);async function _r(){if(gr(!0),t.isNativePlatform()){let{clearAndroidSyncIdentity:e}=await n(async()=>{let{clearAndroidSyncIdentity:e}=await import(`./android-sync-identity-BAhJ8ODd.js`);return{clearAndroidSyncIdentity:e}},__vite__mapDeps([0,1,2,3]));await e()}let e=await T({type:`RESET_SYNC_IDENTITY`});gr(!1),e.ok&&(N([]),mr(!1))}function vr(e){if(!e)return`Never`;let t=Date.now()-e,n=Math.floor(t/6e4),r=Math.floor(t/36e5),i=Math.floor(t/864e5);return n<1?`Just now`:n<60?`${n}m ago`:r<24?`${r}h ago`:`${i}d ago`}function yr(e){switch(e){case`synced`:return`var(--peach-sync-ok)`;case`syncing`:return`var(--peach-sync-busy)`;case`no_peers`:return`var(--peach-sync-off)`;case`not_trusted`:return`var(--peach-sync-err)`;case`offline`:return`var(--peach-sync-off)`;default:return`var(--peach-sync-off)`}}function br(e){switch(e){case`synced`:return`Synced`;case`syncing`:return`Syncing`;case`no_peers`:return`No peers visible`;case`not_trusted`:return`Not on a trusted network`;case`offline`:return`Offline`;default:return`Unknown`}}function xr(){return Lt().length>0}async function Sr(){let e=Dn().trim(),t=Cn().trim(),n=Tn().trim();if(!e){Z(`enter your main password to confirm`);return}if(t.length<8){Z(`duress password must be at least 8 characters`);return}if(t===e){Z(`duress password must differ from your main password`);return}if(t!==n){Z(`passwords do not match`);return}X(!0),Z(null);let r=await T({type:`VERIFY_MAIN_PASSWORD`,payload:{password:e}});if(!r.ok||!r.data){Z(`incorrect main password`),X(!1);return}let i=await T({type:`SETUP_DURESS`,payload:{duressPassword:t}});X(!1),i.ok?(bn(!0),Sn(!1),wn(``),En(``),On(``),Q(`Duress password set. If entered, a decoy vault will be shown.`),setTimeout(()=>Q(null),5e3)):Z(i.error??`failed to set duress password`)}async function Cr(){await T({type:`UPDATE_SETTINGS`,payload:{declinedCardFingerprints:[]}}),Zt(0)}async function wr(){H(!0),Yt(null);let e=await T({type:`COUNT_DUPLICATES`});H(!1),e.ok&&Jt(e.data??0)}async function Tr(){H(!0);let e=await T({type:`DEDUPLICATE_ENTRIES`});H(!1),e.ok&&(Yt(e.data??0),Jt(0))}async function Er(){let e=Dn().trim();if(!e){Z(`enter your main password to confirm`);return}X(!0),Z(null);let t=await T({type:`VERIFY_MAIN_PASSWORD`,payload:{password:e}});if(!t.ok||!t.data){Z(`incorrect main password`),X(!1);return}let n=await T({type:`DISABLE_DURESS`});X(!1),n.ok?(bn(!1),Sn(!1),On(``),Q(`Duress password disabled.`),setTimeout(()=>Q(null),4e3)):Z(n.error??`failed to disable duress password`)}async function Dr(){if(!qn().trim()||Yn())return;Xn(!0),Qn(null);let e=await T({type:`SUBMIT_FEEDBACK`,payload:{category:Gn(),message:qn().trim(),version:m,browser:navigator.userAgent}});Xn(!1),e.ok?(Qn(`success`),Jn(``),setTimeout(()=>Qn(null),4e3)):Qn(`error`)}function Or(){A()===null?p.onBack():Ct(null)}function kr(){let e=A();return e===null?`settings`:e===`license`?`account`:e}function $(e){return(()=>{var t=ne(),n=t.firstChild,r=n.nextSibling.firstChild,i=r.nextSibling;return t.$$click=()=>Ct(e.section),h(n,()=>e.icon()),h(r,()=>e.name,null),h(r,y(b,{get when(){return g(()=>!!e.pro)()&&!I()},get children(){return te()}}),null),h(i,()=>e.desc),t})()}let Ar=()=>re(),jr=()=>ie(),Mr=()=>ae(),Nr=()=>oe(),Pr=()=>se(),Fr=()=>ce(),Ir=()=>le();function Lr(){return(()=>{var e=de(),t=e.firstChild.nextSibling,n=t.nextSibling,r=n.nextSibling,i=r.nextSibling,a=i.firstChild;return a.firstChild,h(e,()=>$({section:`security`,name:`Security`,desc:`Locking, breach monitoring, passkeys`,icon:Ar}),t),h(e,()=>$({section:`license`,name:`Peach Pro`,desc:I()?`Active · manage your license`:`Upgrade · $39 · yours forever`,icon:jr}),t),h(e,()=>$({section:`vault`,name:`Vault`,desc:`Entries, health, import & export`,icon:Mr}),n),h(e,()=>$({section:`sync`,name:`Sync`,desc:`Paired devices & trusted networks`,icon:Nr,pro:!0}),n),h(e,()=>$({section:`appearance`,name:`Appearance`,desc:`Theme & accent color`,icon:Pr}),r),h(e,()=>$({section:`shortcuts`,name:`Shortcuts`,desc:`Keyboard reference`,icon:Fr}),r),h(e,y(b,{when:Bn,get children(){return[ue(),g(()=>$({section:`mobile`,name:`Mobile`,desc:`Autofill & biometric settings`,icon:Nr}))]}}),r),h(e,()=>$({section:`feedback`,name:`Feedback`,desc:`Report issues, suggest features`,icon:Ir}),i),h(a,m,null),e})()}function Rr(){return(()=>{var e=Oe(),t=e.firstChild,n=t.firstChild.nextSibling,r=n.firstChild.nextSibling,i=n.nextSibling,a=i.firstChild.nextSibling,o=i.nextSibling.nextSibling,s=o.firstChild.nextSibling,l=o.nextSibling,u=l.firstChild.nextSibling,d=l.nextSibling,f=d.nextSibling,m=f.firstChild.nextSibling,_=f.nextSibling,v=_.nextSibling,x=v.firstChild.nextSibling,S=v.nextSibling,C=S.nextSibling,T=C.firstChild.nextSibling,E=C.nextSibling,ee=E.nextSibling,D=ee.firstChild.nextSibling,te=ee.nextSibling,ne=te.firstChild.nextSibling,re=te.nextSibling,ie=re.firstChild.nextSibling;return re.nextSibling,r.$$click=()=>void p.onLockOnCloseChange(!p.lockOnClose),a.addEventListener(`change`,e=>void p.onAutoLockMinutesChange(Number(e.currentTarget.value))),s.$$click=()=>void p.onBreachMonitoringChange(!p.breachMonitoring),u.$$click=()=>void ar(),h(u,()=>wt()?`checking...`:`run`),h(t,y(b,{get when(){return Et()},get children(){var e=fe(),t=e.firstChild.nextSibling;return h(t,Et),e}}),d),m.$$click=()=>{un(e=>!e),J(null)},h(m,()=>ln()?`cancel`:`change`),h(t,y(b,{get when(){return ln()},get children(){var e=he(),t=e.firstChild,n=t.nextSibling,r=n.nextSibling,i=r.nextSibling;return t.$$input=e=>dn(e.target.value),n.$$input=e=>fn(e.target.value),r.$$keydown=e=>{e.key===`Enter`&&$n()},r.$$input=e=>mn(e.target.value),h(e,y(b,{get when(){return _n()},get children(){var e=pe();return h(e,_n),e}}),i),h(e,y(b,{get when(){return vn()},get children(){return me()}}),i),i.$$click=()=>void $n(),h(i,()=>hn()?`saving…`:`save new password`),c(()=>i.disabled=hn()||!K()||!q()||!pn()),c(()=>t.value=K()),c(()=>n.value=q()),c(()=>r.value=pn()),e}}),_),h(x,()=>Y()?`on`:`off`),h(t,y(b,{get when(){return g(()=>!!Y())()&&!xn()},get children(){return ge()}}),S),h(t,y(b,{get when(){return jn()},get children(){var e=_e(),t=e.firstChild;return h(t,jn),e}}),S),h(t,y(b,{get when(){return!xn()},get children(){var e=ve(),t=e.firstChild;return t.$$click=()=>{Sn(!0),Z(null),Q(null),wn(``),En(``),On(``)},h(t,()=>Y()?`Change / disable`:`Set up`),e}}),S),h(t,y(b,{get when(){return xn()},get children(){var e=Ee(),t=e.firstChild.nextSibling,n=t.nextSibling,r=n.firstChild;return t.$$input=e=>On(e.currentTarget.value),h(e,y(b,{get when(){return!Y()},get children(){return[ye(),(()=>{var e=be();return e.$$input=e=>wn(e.currentTarget.value),c(()=>e.value=Cn()),e})(),xe(),(()=>{var e=Se();return e.$$input=e=>En(e.currentTarget.value),c(()=>e.value=Tn()),e})()]}}),n),h(e,y(b,{get when(){return An()},get children(){var e=Ce();return h(e,An),e}}),n),r.$$click=()=>{Sn(!1),Z(null)},h(n,y(b,{get when(){return Y()},get children(){var e=we();return e.$$click=()=>void Er(),h(e,()=>kn()?`disabling...`:`disable duress`),c(()=>e.disabled=kn()),e}}),null),h(n,y(b,{get when(){return!Y()},get children(){var e=Te();return e.$$click=()=>void Sr(),h(e,()=>kn()?`saving...`:`save`),c(()=>e.disabled=kn()||!Dn()||!Cn()||!Tn()),e}}),null),c(()=>t.value=Dn()),e}}),S),h(T,(()=>{var e=g(()=>Mn().length>0);return()=>e()?`${Mn().length} active`:`none`})()),h(t,y(b,{get when(){return Mn().length>0},get children(){return y(O,{get each(){return Mn()},children:e=>(()=>{var t=ke(),n=t.firstChild,r=n.nextSibling;return h(n,()=>e.title),r.$$click=()=>void Zr(e),h(r,(()=>{var t=g(()=>Vn()===e.id);return()=>t()?`sending…`:g(()=>Un()?.id===e.id)()?Un().ok?`sent ✓`:`failed ✗`:`test`})()),c(()=>r.disabled=Vn()===e.id),t})()})}}),E),D.$$click=()=>void ir(),h(ne,()=>z()?.statusLabel??`Unavailable`),h(ie,()=>z()?.browserLabel??`Unknown`,null),h(ie,()=>z()?.supported?` ✓`:` (interception unavailable)`,null),h(t,y(b,{get when(){return z()?.conflict},get children(){var e=De(),t=e.firstChild;return h(t,()=>z().conflict),e}}),null),c(e=>{var t=`peach-toggle ${p.lockOnClose?`is-on`:``}`,n=`peach-toggle ${p.breachMonitoring?`is-on`:``}`,i=wt(),a=`peach-duress-status-pill ${Y()?`is-active`:``}`,o=`peach-toggle ${z()?.enabled?`is-on`:``}`,c=!z()?.supported||Kt();return t!==e.e&&w(r,e.e=t),n!==e.t&&w(s,e.t=n),i!==e.a&&(u.disabled=e.a=i),a!==e.o&&w(x,e.o=a),o!==e.i&&w(D,e.i=o),c!==e.n&&(D.disabled=e.n=c),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),c(()=>a.value=String(p.autoLockMinutes)),e})()}function zr(){return(()=>{var e=Be(),t=e.firstChild,n=t.firstChild.nextSibling,i=n.firstChild.nextSibling,a=n.nextSibling;a.firstChild;var o=a.nextSibling,l=o.nextSibling,u=l.firstChild.nextSibling,d=l.nextSibling,f=d.firstChild.nextSibling,m=d.nextSibling,_=m.nextSibling,v=_.firstChild.nextSibling,x=_.nextSibling,S=x.firstChild.nextSibling,C=x.nextSibling.nextSibling,T=C.firstChild.nextSibling;return h(i,()=>p.entriesCount),h(a,y(b,{get when(){return U()!==null},get fallback(){return(()=>{var e=Ve();return e.$$click=()=>void wr(),h(e,(()=>{var e=g(()=>!!V());return()=>e()?`scanning...`:g(()=>B()===null)()?`scan`:g(()=>B()===0)()?`none found`:`${B()} found — remove?`})()),c(()=>e.disabled=V()),e})()},get children(){var e=Ae();return h(e,(()=>{var e=g(()=>U()===0);return()=>e()?`already clean`:`removed ${U()}`})()),e}}),null),h(t,y(b,{get when(){return g(()=>B()!==null&&B()>0)()&&U()===null},get children(){var e=je(),t=e.firstChild,n=t.firstChild,r=n.nextSibling;r.nextSibling;var i=t.nextSibling.firstChild,a=i.nextSibling;return h(t,B,n),h(t,()=>B()===1?`entry`:`entries`,r),i.$$click=()=>Jt(null),a.$$click=()=>void Tr(),h(a,()=>V()?`removing...`:`remove duplicates`),c(()=>a.disabled=V()),e}}),o),u.addEventListener(`change`,e=>void p.onTrashRetentionChange(Number(e.currentTarget.value))),r(f,`click`,p.onOpenHealth,!0),h(t,y(b,{get when(){return Xt()>0},get children(){var e=Me(),t=e.firstChild,n=t.firstChild,r=n.nextSibling;r.nextSibling;var i=t.nextSibling;return h(t,Xt,n),h(t,()=>Xt()===1?``:`s`,r),i.$$click=()=>void Cr(),e}}),m),r(v,`click`,p.onImport,!0),r(S,`click`,p.onExport,!0),h(t,y(b,{get when(){return $t()},get children(){return Ne()}}),C),h(t,y(b,{get when(){return g(()=>!$t())()&&W().length===0},get children(){return Pe()}}),C),h(t,y(b,{get when(){return g(()=>!$t())()&&W().length>0},get children(){return[Fe(),(()=>{var e=Ie();return h(e,y(O,{get each(){return W()},children:e=>(()=>{var t=He(),n=t.firstChild,r=n.firstChild,i=r.nextSibling,a=n.nextSibling;return h(r,()=>an(e.savedAt)),h(i,()=>[e.entryCount===null?null:`${e.entryCount} ${e.entryCount===1?`entry`:`entries`}`,on(e.reason)].filter(Boolean).join(` · `)),a.$$click=()=>void rn(e.id),h(a,y(b,{get when(){return G()===e.id},fallback:`Restore`,children:`…`})),c(t=>{var n=`peach-btn peach-btn--subtle peach-btn--sm peach-history-btn${G()===e.id?` is-busy`:``}`,r=G()!==null;return n!==t.e&&w(a,t.e=n),r!==t.t&&(a.disabled=t.t=r),t},{e:void 0,t:void 0}),t})()})),e})(),(()=>{var e=Le(),t=e.firstChild;return h(e,()=>W().length,t),e})()]}}),C),C.$$click=()=>cn(e=>!e),h(T,()=>sn()?`▲`:`▼`),h(t,y(b,{get when(){return sn()},get children(){return[(()=>{var e=Re(),t=e.firstChild.nextSibling.nextSibling;return t.$$click=()=>p.onOpenFileImport?.(),e})(),y(b,{get when(){return p.onOpenPanic},get children(){var e=ze(),t=e.firstChild.nextSibling.nextSibling;return t.$$click=()=>p.onOpenPanic?.(),e}})]}}),null),c(()=>s(C,`aria-expanded`,sn())),c(()=>u.value=String(p.trashRetentionDays)),e})()}function Br(){return I()?(()=>{var e=Ke(),t=e.firstChild.firstChild,n=t.firstChild.nextSibling,r=n.firstChild,a=t.nextSibling,o=a.firstChild.nextSibling,s=a.nextSibling,d=s.firstChild,f=s.nextSibling.nextSibling,m=f.firstChild,_=m.firstChild.nextSibling;_.nextSibling;var v=m.nextSibling,x=v.firstChild,S=f.nextSibling,C=S.firstChild,w=C.firstChild.nextSibling;w.nextSibling;var T=C.nextSibling,E=S.nextSibling;return E.firstChild,h(n,()=>br(P()),null),h(o,(()=>{var e=g(()=>!!Bt());return()=>e()?vr(Bt()):`Never synced`})()),d.$$click=()=>void or(),h(d,y(l,{get children(){return[y(i,{get when(){return Ut()},children:`Syncing…`}),y(i,{get when(){return L()?.kind===`ok`},get children(){return[`✓ `,g(()=>L().text)]}}),y(i,{get when(){return L()?.kind===`err`},get children(){return L().text}}),y(i,{when:!0,children:`Sync now`})]}})),h(m,()=>M().length,_),h(f,y(b,{get when(){return M().length===0},get children(){return We()}}),v),h(f,y(b,{get when(){return M().length>0},get children(){var e=Ie();return h(e,y(O,{get each(){return M()},children:e=>(()=>{var t=qe(),n=t.firstChild,r=n.firstChild,i=r.nextSibling,a=n.nextSibling;return h(r,()=>e.displayName),h(i,(()=>{var t=g(()=>!!e.lastSyncAt);return()=>t()?`Last synced: ${an(e.lastSyncAt)}`:`Never synced`})()),a.$$click=()=>void cr(e.deviceId),t})()})),e}}),v),x.$$click=()=>p.onOpenSyncPairing?.(),h(C,()=>Lt().length,w),h(S,y(O,{get each(){return Lt()},children:e=>(()=>{var t=Ye(),n=t.firstChild;return h(n,(()=>{var t=g(()=>!!e.isTailscale);return()=>t()?`Tailscale`:e.ssid??`Unknown network`})()),h(t,y(b,{get when(){return!e.isTailscale},get fallback(){return Xe()},get children(){var t=Je();return t.$$click=()=>void lr(e.ssid,e.bssid,e.isTailscale),t}}),null),t})()}),T),h(T,y(b,{get when(){return!xr()},get children(){var e=Ve();return e.$$click=()=>void fr(),h(e,()=>ur()?`Marking…`:`Mark current network as trusted`),c(()=>e.disabled=ur()),e}})),h(E,y(b,{get when(){return pr()},get fallback(){return(()=>{var e=Ze(),t=e.firstChild.nextSibling;return t.$$click=()=>mr(!0),e})()},get children(){var e=Ge(),t=e.firstChild.nextSibling.nextSibling.firstChild,n=t.nextSibling;return t.$$click=()=>mr(!1),n.$$click=()=>void _r(),h(n,()=>hr()?`Resetting...`:`Reset`),c(e=>{var r=hr(),i=hr();return r!==e.e&&(t.disabled=e.e=r),i!==e.t&&(n.disabled=e.t=i),e},{e:void 0,t:void 0}),e}}),null),c(e=>{var t=yr(P()),n=P()===`not_trusted`||Ut();return t!==e.e&&u(r,`background`,e.e=t),n!==e.t&&(d.disabled=e.t=n),e},{e:void 0,t:void 0}),e})():(()=>{var e=Ue(),t=e.firstChild.firstChild.nextSibling.nextSibling,n=t.nextSibling;return t.$$click=()=>Ct(`license`),n.$$click=()=>Ct(`license`),e})()}function Vr(){let e=[{id:`cormorant-italic`,label:`Cormorant Italic`,preview:`Aa`},{id:`cormorant`,label:`Cormorant`,preview:`Aa`},{id:`inter`,label:`Inter`,preview:`Aa`},{id:`system`,label:`System`,preview:`Aa`}],t=[{id:`small`,label:`Small`},{id:`medium`,label:`Default`},{id:`large`,label:`Large`}];return(()=>{var n=Qe(),r=n.firstChild.firstChild.nextSibling,i=r.firstChild.nextSibling,o=r.nextSibling.nextSibling,l=o.firstChild.nextSibling,d=o.nextSibling.nextSibling,f=d.firstChild.nextSibling,m=d.nextSibling.nextSibling,g=m.firstChild.nextSibling,_=m.nextSibling.nextSibling.firstChild.nextSibling;return i.$$click=()=>p.onThemeChange(p.theme===`dark`?`light`:`dark`),h(i,()=>p.theme===`dark`?`Switch to light`:`Switch to dark`),h(l,y(O,{each:a,children:e=>(()=>{var t=$e();return t.$$click=()=>void p.onAccentChange(e.name),c(n=>{var r=p.accentColor===e.name,i=e.hex,a=e.name,o=e.name;return r!==n.e&&t.classList.toggle(`is-active`,n.e=r),i!==n.t&&u(t,`background`,n.t=i),a!==n.a&&s(t,`aria-label`,n.a=a),o!==n.o&&s(t,`title`,n.o=o),n},{e:void 0,t:void 0,a:void 0,o:void 0}),t})()})),h(f,y(O,{each:e,children:e=>(()=>{var t=et(),n=t.firstChild,r=n.nextSibling;return t.$$click=()=>void p.onDisplayFontChange(e.id),h(n,()=>e.preview),h(r,()=>e.label),c(n=>{var r=p.displayFont===e.id,i=e.id,a=e.label,o=e.label;return r!==n.e&&t.classList.toggle(`is-active`,n.e=r),i!==n.t&&s(t,`data-font-preview`,n.t=i),a!==n.a&&s(t,`aria-label`,n.a=a),o!==n.o&&s(t,`title`,n.o=o),n},{e:void 0,t:void 0,a:void 0,o:void 0}),t})()})),h(g,y(O,{each:t,children:e=>(()=>{var t=tt();return t.$$click=()=>void p.onTextSizeChange(e.id),h(t,()=>e.label),c(()=>t.classList.toggle(`is-active`,p.textSize===e.id)),t})()})),_.$$click=()=>void p.onReduceMotionChange(!p.reduceMotion),h(_,()=>p.reduceMotion?`On`:`Off`),n})()}function Hr(){let[e,t]=f(null),[n,r]=f(null);function i(e){r(null),t(e)}function a(){t(null),r(null)}function o(e,n){let i=ee(p.shortcuts,n,e);if(i){r(`Already bound to "${E.find(e=>e.action===i)?.label??i}"`);return}let a={...p.shortcuts,[e]:n};t(null),r(null),p.onShortcutsChange(a)}function s(e){let t={...p.shortcuts,[e]:D[e]};p.onShortcutsChange(t)}function l(){p.onShortcutsChange({...D})}function u(t){if(t.preventDefault(),t.stopPropagation(),t.key===`Escape`){a();return}let n=x(t);if(!n)return;let r=e();r&&o(r,n)}return(()=>{var t=rt(),r=t.firstChild;r.firstChild;var o=r.nextSibling;o.firstChild;var c=o.nextSibling,f=c.firstChild,p=f.firstChild.nextSibling,m=f.nextSibling;return h(r,y(O,{get each(){return E.filter(e=>e.scope===`entry`)},children:t=>d(t,e,i,a,s,u)}),null),h(o,y(O,{get each(){return E.filter(e=>e.scope===`global`)},children:t=>d(t,e,i,a,s,u)}),null),h(t,y(b,{get when(){return n()},get children(){var e=nt();return h(e,n),e}}),c),p.$$click=e=>{e.preventDefault(),chrome.tabs.create({url:`chrome://extensions/shortcuts`})},m.$$click=l,t})();function d(e,t,n,r,i,a){let o=()=>t()===e.action,s=()=>p.shortcuts[e.action],l=()=>{let t=s(),n=D[e.action];return t.key!==n.key||!!t.ctrl!=!!n.ctrl||!!t.meta!=!!n.meta||!!t.shift!=!!n.shift||!!t.alt!=!!n.alt};return(()=>{var t=at(),u=t.firstChild,d=u.nextSibling;return h(u,()=>e.label),_(e=>{e&&queueMicrotask(()=>{o()&&e.focus()})},d),d.$$keydown=e=>{o()&&a(e)},d.$$click=()=>o()?r():n(e.action),h(d,(()=>{var e=g(()=>!!o());return()=>e()?`Press a key…`:C(s())})()),h(t,y(b,{get when(){return g(()=>!!l())()&&!o()},get children(){var t=it();return t.$$click=()=>i(e.action),t}}),null),c(e=>{var t=!!o(),n=!!l();return t!==e.e&&d.classList.toggle(`is-capturing`,e.e=t),n!==e.t&&d.classList.toggle(`is-custom`,e.t=n),e},{e:void 0,t:void 0}),t})()}}let Ur=[{feature:`sync`,name:`Peach Sync`,desc:`Encrypted · peer-to-peer · local`},{feature:`ios_app`,name:`Android & iOS`,desc:`Your vault everywhere`},{feature:`passkeys`,name:`Passkeys`,desc:`Zero-knowledge WebAuthn`},{feature:`advanced_health`,name:`Advanced Vault Health`,desc:`Reuse · age · exposure scoring`},{feature:`smart_password_change`,name:`Smart Password Change`,desc:`Guided reset · pre-filled · vault updated`}],[Wr,Gr]=f(null),[Kr,qr]=f(!1),[Jr,Yr]=f(!1);async function Xr(){Yr(!0),await T({type:`DEACTIVATE_LICENSE`}),kt(null),await p.onLicenseChange?.(),Yr(!1)}async function Zr(e){Hn(e.id),Wn(null);let t=await T({type:`FIRE_CANARY_PING`,payload:{webhookUrl:e.canary.webhookUrl,entryTitle:e.title,trigger:`test`}});Wn({id:e.id,ok:t.ok}),Hn(null),setTimeout(()=>Wn(t=>t?.id===e.id?null:t),3e3)}function Qr(){async function e(){await rr(),(Ot()?.valid??!1)&&Ot()?.plan===`pro`&&await p.onLicenseChange?.()}return(()=>{var t=ct();return h(t,y(b,{get when(){return I()},get fallback(){return y(b,{get when(){return Kr()},get fallback(){return(()=>{var e=dt(),t=e.firstChild,n=t.firstChild,r=t.nextSibling,i=r.nextSibling.firstChild.nextSibling.nextSibling.nextSibling;return h(n,y(v,{class:`peach-pro-upgrade-mark`})),h(r,y(O,{each:Ur,children:e=>(()=>{var t=ft(),n=t.firstChild.nextSibling.firstChild,r=n.nextSibling;return h(n,()=>e.name),h(r,()=>e.desc),c(()=>t.classList.toggle(`is-highlighted`,p.upgradeHighlight===e.feature)),t})()})),i.$$click=()=>qr(!0),e})()},get children(){var t=ut(),n=t.firstChild,r=n.nextSibling,i=r.nextSibling,a=i.nextSibling;return h(t,y(o,{}),n),r.$$keydown=t=>{t.key===`Enter`&&e()},r.$$input=e=>jt(e.currentTarget.value),s(r,`spellcheck`,!1),h(t,y(b,{get when(){return Mt()},get children(){return lt()}}),i),i.$$click=()=>void e(),h(i,()=>Ft()?`activating…`:`Activate`),a.$$click=()=>{qr(!1),j(null),jt(``)},c(()=>i.disabled=Ft()||!At().trim()),c(()=>r.value=At()),t}})},get children(){var e=st(),t=e.firstChild,n=t.firstChild,r=n.nextSibling.nextSibling,i=t.nextSibling,a=i.nextSibling;return h(n,y(v,{class:`peach-pro-active-mark`})),h(r,()=>xt(Ot()?.issued)),h(e,y(b,{get when(){return Wr()},get children(){var e=ot(),t=e.firstChild.nextSibling.firstChild,n=t.nextSibling;return h(t,()=>Wr()),n.$$click=()=>nr(Wr()),h(n,()=>er()?`✓`:`copy`),e}}),i),h(i,y(O,{each:Ur,children:e=>(()=>{var t=pt(),n=t.firstChild.nextSibling;return h(n,()=>e.name),t})()})),a.$$click=()=>void Xr(),h(a,()=>Jr()?`Deactivating…`:`Deactivate`),c(()=>a.disabled=Jr()),e}})),t})()}function $r(){return(()=>{var e=gt(),t=e.firstChild,n=t.firstChild.nextSibling.nextSibling,r=n.nextSibling.nextSibling,i=r.nextSibling,a=i.firstChild.nextSibling;a.nextSibling;var o=i.nextSibling;return h(n,y(O,{each:bt,children:e=>(()=>{var t=_t();return t.$$click=()=>Kn(e),h(t,e),c(()=>w(t,`peach-feedback-chip ${Gn()===e?`is-active`:``}`)),t})()})),r.$$input=e=>Jn(e.currentTarget.value),h(i,m,a),h(t,y(b,{get when(){return Zn()===`success`},get children(){return mt()}}),o),h(t,y(b,{get when(){return Zn()===`error`},get children(){return ht()}}),o),o.$$click=()=>void Dr(),h(o,()=>Yn()?`Sending...`:`Send feedback`),c(()=>o.disabled=Yn()||!qn().trim()),c(()=>r.value=qn()),e})()}function ei(){return(()=>{var e=vt(),t=e.firstChild,n=t.firstChild.nextSibling.firstChild,r=n.nextSibling,i=t.nextSibling.firstChild.nextSibling.firstChild;return h(n,()=>In()?`Enabled`:`Disabled`),r.$$click=()=>void Fn?.openAutofillSettings(),h(r,()=>In()?`Change`:`Enable`),h(i,()=>Rn()?`Available`:`Not available`),e})()}return(()=>{var e=yt(),t=e.firstChild.firstChild,n=t.nextSibling;return t.$$click=Or,h(n,kr),h(e,y(l,{get fallback(){return Lr()},get children(){return[y(i,{get when(){return A()===`security`},get children(){return Rr()}}),y(i,{get when(){return A()===`vault`},get children(){return zr()}}),y(i,{get when(){return A()===`sync`},get children(){return Br()}}),y(i,{get when(){return A()===`appearance`},get children(){return Vr()}}),y(i,{get when(){return A()===`shortcuts`},get children(){return Hr()}}),y(i,{get when(){return A()===`license`},get children(){return Qr()}}),y(i,{get when(){return A()===`feedback`},get children(){return $r()}}),y(i,{get when(){return A()===`mobile`},get children(){return ei()}})]}}),null),e})()}m([`click`,`input`,`keydown`]);export{k as SettingsView};