import{B as l,l as d}from"./chunks/bookmarks-D4O59Key.js";import{o as m}from"./chunks/store-aiW_fD0x.js";const s=document.getElementById("synced-bookmarks"),a=document.getElementById("synced-bookmark-list");async function c(){if(!s||!a)return;const o=[...(await d()).bookmarks].sort((t,e)=>e.updatedAt.localeCompare(t.updatedAt)).slice(0,6);a.replaceChildren(...o.map(t=>{const e=document.createElement("a");e.className="quick-link",e.href=t.url,e.target="_blank",e.rel="noreferrer";const r=document.createElement("strong");r.textContent=t.title;const n=document.createElement("span");try{n.textContent=new URL(t.url).hostname}catch{n.textContent=t.url}return e.append(r,n),e})),s.hidden=o.length===0}m(l,()=>void c());c();
