SOURCE / PINNED RELEASE
Made of little things.
Napplet Feed
- Release
- 3ea61bac8f79…
- Author-recorded commit
- Not provided
- License
- Check the original source
The hash-verified playable HTML, which may contain bundled or minified code. This view does not execute it.
<!doctype html>
<html lang="en">
<head><meta name="description" content="Napplet manifests published by your contacts, with quick naddr copy.">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Napplet Feed</title>
<script type="module" crossorigin>function e(){let e=window;if(!e.napplet?.theme)throw Error(`window.napplet.theme is unavailable -- runtime did not inject this domain`);return e.napplet.theme}function t(){return e().get()}function n(t){return e().onChanged(t)}function r(){let e=window;if(!e.napplet)throw Error(`window.napplet is unavailable -- runtime did not inject the napplet namespace`);return e.napplet}function i(e){let t=r()[e];if(!t)throw Error(`window.napplet.${String(e)} is unavailable -- runtime did not inject this domain`);return t}var a={getPublicKey(){return i(`identity`).getPublicKey()},onChanged(e){return i(`identity`).onChanged(e)},getRelays(){return i(`identity`).getRelays()},getProfile(){return i(`identity`).getProfile()},getFollows(){return i(`identity`).getFollows()},getList(e){return i(`identity`).getList(e)},getZaps(){return i(`identity`).getZaps()},getMutes(){return i(`identity`).getMutes()},getBlocked(){return i(`identity`).getBlocked()},getBadges(){return i(`identity`).getBadges()}},o={get(){return i(`config`).get()},subscribe(e){return i(`config`).subscribe(e)},openSettings(e){i(`config`).openSettings(e)},registerSchema(e,t){return i(`config`).registerSchema(e,t)},onSchemaError(e){return i(`config`).onSchemaError(e)},get schema(){return i(`config`).schema}},s={getEvent(e,t){return i(`outbox`).getEvent(e,t)},query(e,t){return i(`outbox`).query(e,t)},subscribe(e,t){return i(`outbox`).subscribe(e,t)},publish(e,t){return i(`outbox`).publish(e,t)},resolveRelays(e){return i(`outbox`).resolveRelays(e)}},c=/^#[0-9a-f]{6}$/i;function l(e){return c.test(e)}function u(e,t){if(!l(e))throw Error(`${t} must be a #rrggbb color`)}function d(e){return{r:Number.parseInt(e.slice(1,3),16),g:Number.parseInt(e.slice(3,5),16),b:Number.parseInt(e.slice(5,7),16)}}function f(e){return Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`)}function ee({r:e,g:t,b:n}){return`#${f(e)}${f(t)}${f(n)}`}function te({r:e,g:t,b:n}){let r=e/255,i=t/255,a=n/255,o=Math.max(r,i,a),s=Math.min(r,i,a),c=(o+s)/2;if(o===s)return{h:0,s:0,l:c};let l=o-s,u=c>.5?l/(2-o-s):l/(o+s),d;return d=o===r?(i-a)/l+(i<a?6:0):o===i?(a-r)/l+2:(r-i)/l+4,{h:d*60,s:u,l:c}}function p(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ne({h:e,s:t,l:n}){if(t===0){let e=n*255;return{r:e,g:e,b:e}}let r=e/360,i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;return{r:p(a,i,r+1/3)*255,g:p(a,i,r)*255,b:p(a,i,r-1/3)*255}}function re(e,t){let n=te(d(e));return ee(ne({...n,l:Math.max(0,Math.min(1,n.l+t))}))}function m(e,t,n){let r=d(e),i=d(t);return ee({r:r.r*(1-n)+i.r*n,g:r.g*(1-n)+i.g*n,b:r.b*(1-n)+i.b*n})}function h(e){let{r:t,g:n,b:r}=d(e),[i,a,o]=[t,n,r].map(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*i+.7152*a+.0722*o}function g(e){return h(e)>.5?`#111827`:`#ffffff`}function ie(e){return u(e.background,`background`),h(e.background)<=.56}function ae(e){u(e.background,`background`),u(e.text,`text`),u(e.primary,`primary`);let t=ie(e),n=re(e.background,t?.05:-.04),r=re(e.background,t?.1:-.08),i=m(e.background,e.text,t?.18:.12),a=m(e.background,e.primary,t?.26:.18),o=m(e.primary,e.text,.22);return{"color-scheme":t?`dark`:`light`,"--color-base-100":e.background,"--color-base-200":n,"--color-base-300":r,"--color-base-content":e.text,"--color-primary":e.primary,"--color-primary-content":g(e.primary),"--color-secondary":a,"--color-secondary-content":e.text,"--color-accent":o,"--color-accent-content":g(o),"--color-neutral":i,"--color-neutral-content":g(i),"--color-info":t?`#38bdf8`:`#0284c7`,"--color-info-content":t?`#082f49`:`#ffffff`,"--color-success":t?`#22c55e`:`#16a34a`,"--color-success-content":t?`#052e16`:`#ffffff`,"--color-warning":t?`#facc15`:`#d97706`,"--color-warning-content":t?`#422006`:`#ffffff`,"--color-error":t?`#f87171`:`#dc2626`,"--color-error-content":t?`#450a0a`:`#ffffff`}}function oe(e){return{...ae(e),"--radius-selector":`0.25rem`,"--radius-field":`0.25rem`,"--radius-box":`0.375rem`,"--size-selector":`0.21875rem`,"--size-field":`0.21875rem`,"--border":`1px`,"--depth":`0`,"--noise":`0`}}var se=`napplet-runtime`,ce={background:`#14110c`,text:`#f5f1e8`,primary:`#9be564`};function _(e){document.documentElement.setAttribute(`data-theme`,se);let t=document.documentElement.style;for(let[n,r]of Object.entries(e))t.setProperty(n,r)}function le(e){let t={},n=e.fonts?.body?.name;typeof n==`string`&&n.trim()&&(t[`--gm-font-body`]=n);let r={background:e.colors.background,text:e.colors.text,primary:e.colors.primary};return Object.values(r).every(e=>typeof e==`string`&&l(e))&&Object.assign(t,oe(r)),t}function ue(){if(_(oe(ce)),!globalThis.napplet?.theme)return{close:()=>void 0};try{t().then(e=>_(le(e))).catch(()=>void 0)}catch{}let e=null;try{e=n(e=>_(le(e)))}catch{}return{close:()=>e?.close()}}var de=ue;function fe(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function pe(e,t,n=``){let r=fe(e),i=e?.length,a=t!==void 0;if(!r||a&&i!==t){let o=n&&`"${n}" `,s=a?` of length ${t}`:``,c=r?`length=${i}`:`type=${typeof e}`;throw Error(o+`expected Uint8Array`+s+`, got `+c)}return e}var me=typeof Uint8Array.from([]).toHex==`function`&&typeof Uint8Array.fromHex==`function`,v={_0:48,_9:57,A:65,F:70,a:97,f:102};function he(e){if(e>=v._0&&e<=v._9)return e-v._0;if(e>=v.A&&e<=v.F)return e-(v.A-10);if(e>=v.a&&e<=v.f)return e-(v.a-10)}function ge(e){if(typeof e!=`string`)throw Error(`hex string expected, got `+typeof e);if(me)return Uint8Array.fromHex(e);let t=e.length,n=t/2;if(t%2)throw Error(`hex string expected, got unpadded hex of length `+t);let r=new Uint8Array(n);for(let t=0,i=0;t<n;t++,i+=2){let n=he(e.charCodeAt(i)),a=he(e.charCodeAt(i+1));if(n===void 0||a===void 0){let t=e[i]+e[i+1];throw Error(`hex string expected, got non-hex character "`+t+`" at index `+i)}r[t]=n*16+a}return r}function _e(...e){let t=0;for(let n=0;n<e.length;n++){let r=e[n];pe(r),t+=r.length}let n=new Uint8Array(t);for(let t=0,r=0;t<e.length;t++){let i=e[t];n.set(i,r),r+=i.length}return n}function ve(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function ye(e,t){return Array.isArray(t)?t.length===0?!0:e?t.every(e=>typeof e==`string`):t.every(e=>Number.isSafeInteger(e)):!1}function be(e){if(typeof e!=`function`)throw Error(`function expected`);return!0}function y(e,t){if(typeof t!=`string`)throw Error(`${e}: string expected`);return!0}function b(e){if(!Number.isSafeInteger(e))throw Error(`invalid integer: ${e}`)}function x(e){if(!Array.isArray(e))throw Error(`array expected`)}function S(e,t){if(!ye(!0,t))throw Error(`${e}: array of strings expected`)}function C(e,t){if(!ye(!1,t))throw Error(`${e}: array of numbers expected`)}function w(...e){let t=e=>e,n=(e,t)=>n=>e(t(n));return{encode:e.map(e=>e.encode).reduceRight(n,t),decode:e.map(e=>e.decode).reduce(n,t)}}function T(e){let t=typeof e==`string`?e.split(``):e,n=t.length;S(`alphabet`,t);let r=new Map(t.map((e,t)=>[e,t]));return{encode:r=>(x(r),r.map(r=>{if(!Number.isSafeInteger(r)||r<0||r>=n)throw Error(`alphabet.encode: digit index outside alphabet "${r}". Allowed: ${e}`);return t[r]})),decode:t=>(x(t),t.map(t=>{y(`alphabet.decode`,t);let n=r.get(t);if(n===void 0)throw Error(`Unknown letter: "${t}". Allowed: ${e}`);return n}))}}function E(e=``){return y(`join`,e),{encode:t=>(S(`join.decode`,t),t.join(e)),decode:t=>(y(`join.decode`,t),t.split(e))}}function D(e,t=`=`){return b(e),y(`padding`,t),{encode(n){for(S(`padding.encode`,n);n.length*e%8;)n.push(t);return n},decode(n){S(`padding.decode`,n);let r=n.length;if(r*e%8)throw Error(`padding: invalid, string should have whole number of bytes`);for(;r>0&&n[r-1]===t;r--)if((r-1)*e%8==0)throw Error(`padding: invalid, string has too much padding`);return n.slice(0,r)}}}function xe(e){return be(e),{encode:e=>e,decode:t=>e(t)}}var Se=(e,t)=>t===0?e:Se(t,e%t),O=(e,t)=>e+(t-Se(e,t)),k=(()=>{let e=[];for(let t=0;t<40;t++)e.push(2**t);return e})();function A(e,t,n,r){if(x(e),t<=0||t>32)throw Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw Error(`convertRadix2: wrong to=${n}`);if(O(t,n)>32)throw Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${O(t,n)}`);let i=0,a=0,o=k[t],s=k[n]-1,c=[];for(let r of e){if(b(r),r>=o)throw Error(`convertRadix2: invalid data word=${r} from=${t}`);if(i=i<<t|r,a+t>32)throw Error(`convertRadix2: carry overflow pos=${a} from=${t}`);for(a+=t;a>=n;a-=n)c.push((i>>a-n&s)>>>0);let e=k[a];if(e===void 0)throw Error(`invalid carry`);i&=e-1}if(i=i<<n-a&s,!r&&a>=t)throw Error(`Excess padding`);if(!r&&i>0)throw Error(`Non-zero padding: ${i}`);return r&&a>0&&c.push(i>>>0),c}function j(e,t=!1){if(b(e),e<=0||e>32)throw Error(`radix2: bits should be in (0..32]`);if(O(8,e)>32||O(e,8)>32)throw Error(`radix2: carry overflow`);return{encode:n=>{if(!ve(n))throw Error(`radix2.encode input should be Uint8Array`);return A(Array.from(n),8,e,!t)},decode:n=>(C(`radix2.decode`,n),Uint8Array.from(A(n,e,8,t)))}}function M(e){return be(e),function(...t){try{return e.apply(null,t)}catch{}}}w(j(4),T(`0123456789ABCDEF`),E(``)),w(j(5),T(`ABCDEFGHIJKLMNOPQRSTUVWXYZ234567`),D(5),E(``)),w(j(5),T(`ABCDEFGHIJKLMNOPQRSTUVWXYZ234567`),E(``)),w(j(5),T(`0123456789ABCDEFGHIJKLMNOPQRSTUV`),D(5),E(``)),w(j(5),T(`0123456789ABCDEFGHIJKLMNOPQRSTUV`),E(``)),w(j(5),T(`0123456789ABCDEFGHJKMNPQRSTVWXYZ`),E(``),xe(e=>e.toUpperCase().replace(/O/g,`0`).replace(/[IL]/g,`1`)));var N=typeof Uint8Array.from([]).toBase64==`function`&&typeof Uint8Array.fromBase64==`function`;N||w(j(6),T(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`),D(6),E(``)),w(j(6),T(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`),E(``)),N||w(j(6),T(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`),D(6),E(``)),w(j(6),T(`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`),E(``));var P=w(T(`qpzry9x8gf2tvdw0s3jn54khce6mua7l`),E(``)),F=[996825010,642813549,513874426,1027748829,705979059];function I(e){let t=e>>25,n=(e&33554431)<<5;for(let e=0;e<F.length;e++)(t>>e&1)==1&&(n^=F[e]);return n}function L(e,t,n=1){let r=e.length,i=1;for(let t=0;t<r;t++){let n=e.charCodeAt(t);if(n<33||n>126)throw Error(`Invalid prefix (${e})`);i=I(i)^n>>5}i=I(i);for(let t=0;t<r;t++)i=I(i)^e.charCodeAt(t)&31;for(let e of t)i=I(i)^e;for(let e=0;e<6;e++)i=I(i);return i^=n,P.encode(A([i%k[30]],30,5,!1))}function Ce(e){let t=e===`bech32`?1:734539939,n=j(5),r=n.decode,i=n.encode,a=M(r);function o(e,n,r=90){y(`bech32.encode prefix`,e),ve(n)&&(n=Array.from(n)),C(`bech32.encode`,n);let i=e.length;if(i===0)throw TypeError(`Invalid prefix length ${i}`);let a=i+7+n.length;if(r!==!1&&a>r)throw TypeError(`Length ${a} exceeds limit ${r}`);let o=e.toLowerCase(),s=L(o,n,t);return`${o}1${P.encode(n)}${s}`}function s(e,n=90){y(`bech32.decode input`,e);let r=e.length;if(r<8||n!==!1&&r>n)throw TypeError(`invalid string length: ${r} (${e}). Expected (8..${n})`);let i=e.toLowerCase();if(e!==i&&e!==e.toUpperCase())throw Error(`String must be lowercase or uppercase`);let a=i.lastIndexOf(`1`);if(a===0||a===-1)throw Error(`Letter "1" must be present between prefix and data only`);let o=i.slice(0,a),s=i.slice(a+1);if(s.length<6)throw Error(`Data must be at least 6 characters long`);let c=P.decode(s).slice(0,-6),l=L(o,c,t);if(!s.endsWith(l))throw Error(`Invalid checksum in ${e}: expected "${l}"`);return{prefix:o,words:c}}let c=M(s);function l(e){let{prefix:t,words:n}=s(e,!1);return{prefix:t,words:n,bytes:r(n)}}function u(e,t){return o(e,i(t))}return{encode:o,decode:s,encodeFromBytes:u,decodeToBytes:l,decodeUnsafe:c,fromWords:r,fromWordsUnsafe:a,toWords:i}}var we=Ce(`bech32`);Ce(`bech32m`),typeof Uint8Array.from([]).toHex==`function`&&typeof Uint8Array.fromHex==`function`||w(j(4),T(`0123456789abcdef`),E(``),xe(e=>{if(typeof e!=`string`||e.length%2!=0)throw TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})),new TextDecoder(`utf-8`);var Te=new TextEncoder,Ee=5e3;function De(e,t){let n=we.toWords(t);return we.encode(e,n,Ee)}function Oe(e){let t=new ArrayBuffer(4);return new DataView(t).setUint32(0,e.kind,!1),De(`naddr`,ke({0:[Te.encode(e.identifier)],1:(e.relays||[]).map(e=>Te.encode(e)),2:[ge(e.pubkey)],3:[new Uint8Array(t)]}))}function ke(e){let t=[];return Object.entries(e).reverse().forEach(([e,n])=>{n.forEach(n=>{let r=new Uint8Array(n.length+2);r.set([parseInt(e)],0),r.set([n.length],1),r.set(n,2),t.push(r)})}),_e(...t)}var Ae=35129;function je(e,t=[]){if(e.kind!==35129)return null;let n=R(e,`d`);if(!n)return null;let r=R(e,`title`)||n,i=R(e,`description`)||``,a=e.tags.find(e=>e[0]===`x`&&e[2]===`aggregate`)?.[1]??null,o=e.tags.filter(e=>e[0]===`path`),s=Pe(e,`requires`),c=e.tags.filter(e=>e[0]===`archetype`).map(e=>e.slice(1).filter(Boolean).join(` / `)).filter(Boolean);return{address:`${e.kind}:${e.pubkey}:${n}`,naddr:Oe({kind:e.kind,pubkey:e.pubkey,identifier:n,relays:t}),title:r,description:i,identifier:n,pubkey:e.pubkey,createdAt:e.created_at,aggregateHash:a,pathCount:o.length,isSingleFile:o.length===1&&o[0]?.[1]===`/index.html`,requires:s,archetypes:c,hasConfig:e.tags.some(e=>e[0]===`config`&&!!e[1])}}function Me(e,t){let n=e.get(t.address);return n&&n.createdAt>=t.createdAt?!1:(e.set(t.address,t),!0)}function Ne(e){return[...e].sort((e,t)=>t.createdAt-e.createdAt||e.title.localeCompare(t.title))}function R(e,t){return e.tags.find(e=>e[0]===t&&!!e[1])?.[1]??null}function Pe(e,t){return[...new Set(e.tags.filter(e=>e[0]===t&&!!e[1]).map(e=>e[1]))]}var z={scanWindowDays:30,contactBatchSize:100,includeSelf:!0},Fe=document.querySelector(`#app`);if(!Fe)throw Error(`Missing #app root`);var B=Fe,Ie=de(),V={...z},H=`loading`,U=`Starting napplet feed...`,W=0,G=0,K=0,q=0,J=``,Y=[],X=new Map;Le();async function Le(){Z(),V=await Re(),await Ve()}async function Re(){if(!Q(`config`))return{...z};try{return ze(await o.get())}catch{return{...z}}}function ze(e){return{scanWindowDays:Be(e.scanWindowDays,z.scanWindowDays,1,365),contactBatchSize:Be(e.contactBatchSize,z.contactBatchSize,25,250),includeSelf:typeof e.includeSelf==`boolean`?e.includeSelf:z.includeSelf}}function Be(e,t,n,r){return typeof e!=`number`||!Number.isInteger(e)?t:Math.min(r,Math.max(n,e))}async function Ve(){let e=q+1;q=e,Ke(),X.clear(),W=0,G=0,K=0,H=`loading`,U=`Loading identity and contacts...`,J=``,Z();let t=[`identity`,`outbox`].filter(e=>!Q(e));if(t.length>0){H=`error`,U=`Missing required NAP domain${t.length===1?``:`s`}: ${t.join(`, `)}.`,Z();return}try{let t=await a.getPublicKey();if(e!==q)return;if(!t){H=`signed-out`,U=`Connect an identity in the shell to see contacts' napplets.`,Z();return}let n=[...new Set(await a.getFollows())];if(e!==q)return;let r=V.includeSelf?Ze([t,...n]):n;if(W=n.length,r.length===0){H=`empty`,U=`No contacts to scan.`,Z();return}let i=Math.floor(Date.now()/1e3)-V.scanWindowDays*24*60*60,o=Xe(r,V.contactBatchSize);K=o.length,U=`Scanning ${r.length.toLocaleString()} author${r.length===1?``:`s`} across ${o.length.toLocaleString()} OUTBOX batch${o.length===1?``:`es`}...`,Z();for(let t of o){if(e!==q)return;He(t,i,e)}}catch(t){if(e!==q)return;H=`error`,U=t instanceof Error?t.message:`Could not load the napplet feed.`,Z()}}function He(e,t,n){let r=[{kinds:[Ae],authors:e,since:t,limit:100}],i={authors:e,timeoutMs:6e3},a=s.subscribe(r,i);Y.push(a),a.on(`event`,e=>{n===q&&(Ue(e),Ge())}),a.on(`closed`,()=>{n===q&&(Y=Y.filter(e=>e!==a))}),(async()=>{try{let{events:e}=await s.query(r,i);if(n!==q)return;for(let t of e)Ue(t)}catch{}finally{if(n!==q)return;G+=1,Ge()}})()}function Ue(e){let t=je(e.event,We(e));t&&Me(X,t)&&Z()}function We(e){let t=e.sidecar,n=t?.relayHints??t?.relays;return Array.isArray(n)?n.filter(e=>typeof e==`string`):[]}function Ge(){let e=X.size;e>0?(H=`live`,U=`Showing ${e.toLocaleString()} napplet${e===1?``:`s`} from contacts${V.includeSelf?` and you`:``}.`):G>=K&&(H=`empty`,U=`No napplet manifests found in the selected scan window.`),Z()}function Ke(){for(let e of Y)e.close();Y=[]}function Z(){let e=Ne(X.values());B.innerHTML=`
<main class="shell ${H}">
<section class="status-card" aria-live="polite">
<div>
<strong>${$(U)}</strong>
<span>${W.toLocaleString()} contacts · includes you · no artifact downloads</span>
</div>
<button class="refresh" type="button" data-action="refresh">Refresh</button>
${J?`<p class="copy-status">${$(J)}</p>`:``}
</section>
${qe(e)}
</main>
`,B.querySelector(`[data-action="refresh"]`)?.addEventListener(`click`,()=>{Ve()});for(let e of B.querySelectorAll(`[data-copy-naddr]`))e.addEventListener(`click`,()=>{Ye(e.dataset.copyNaddr??``,e.dataset.copyTitle??`napplet`)})}function qe(e){return H===`signed-out`||H===`error`||H===`empty`&&e.length===0?`<section class="empty"><h2>${Qe(H)}</h2><p>${$(U)}</p></section>`:`
<section class="feed" aria-label="Napplet manifests">
${e.map(Je).join(``)}
${e.length===0?`<article class="skeleton"><span></span><span></span><span></span></article>`:``}
</section>
`}function Je(e){let t=e.requires.length>0?e.requires:[`No special access listed`],n=e.archetypes.length>0?e.archetypes:[`General napplet`],r=e.isSingleFile?`Ready for sandboxed shells`:`${e.pathCount} files listed`,i=e.hasConfig?`Has settings`:`No settings listed`;return`
<article class="nap-card">
<div class="card-main">
<p class="publisher">Published by a contact · Updated ${$e(e.createdAt)}</p>
<h2>${$(e.title)}</h2>
<p class="description">${$(e.description||`No description tag published.`)}</p>
</div>
<div class="copy-box">
<button type="button" data-copy-naddr="${$(e.naddr)}" data-copy-title="${$(e.title)}">Copy naddr</button>
<details>
<summary>Show reference</summary>
<input readonly value="nostr:${$(e.naddr)}" aria-label="naddr for ${$(e.title)}" />
</details>
</div>
<div class="friendly-facts" aria-label="Napplet details">
<span>${$(r)}</span>
<span>${$(i)}</span>
<span>App id: ${$(e.identifier)}</span>
</div>
<p class="section-label">Needs from the shell</p>
<div class="chips" aria-label="Shell capabilities needed">
${t.map(e=>`<span>${$(e)}</span>`).join(``)}
</div>
<p class="section-label">Works well as</p>
<div class="chips subtle" aria-label="Suggested uses">
${n.map(e=>`<span>${$(e)}</span>`).join(``)}
</div>
</article>
`}async function Ye(e,t){let n=`nostr:${e}`;try{await navigator.clipboard?.writeText(n),J=`Copied ${t} naddr.`}catch{let e=[...B.querySelectorAll(`input[readonly]`)].find(e=>e.value===n);e?.focus(),e?.select(),J=`Clipboard was unavailable; the naddr field is selected for manual copy.`}Z()}function Xe(e,t){let n=[];for(let r=0;r<e.length;r+=t)n.push(e.slice(r,r+t));return n}function Ze(e){return[...new Set(e.filter(Boolean))]}function Q(e){return!!globalThis.napplet?.[e]}function Qe(e){return e===`signed-out`?`No identity connected`:e===`error`?`Feed unavailable`:`Nothing found yet`}function $e(e){return new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`}).format(new Date(e*1e3))}function $(e){return e.replace(/[&<>"]/g,e=>({"&":`&`,"<":`<`,">":`>`,'"':`"`})[e]??e)}globalThis.addEventListener(`beforeunload`,()=>{Ke(),Ie.close()});</script>
<style rel="stylesheet" crossorigin>:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--panel:color-mix(in srgb, var(--color-base-200,#241f16) 88%, transparent);--panel-strong:color-mix(in srgb, var(--color-base-300,#342c1f) 86%, transparent);--text:var(--color-base-content,#f5f1e8);--muted:color-mix(in srgb, var(--color-base-content,#f5f1e8) 62%, var(--color-base-100,#14110c) 38%);--line:color-mix(in srgb, var(--color-base-content,#f5f1e8) 18%, transparent);--accent:var(--color-primary,#9be564);--accent-ink:var(--color-primary-content,#111827);--napplet-text-selection:text}*,:before,:after{box-sizing:border-box}body{background:radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 24%, transparent), transparent 34rem), var(--color-base-100,#14110c);min-width:0;color:var(--text);font-family:var(--gm-font-body,ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace);margin:0}button,input{font:inherit}::selection{background:color-mix(in srgb, var(--accent) 38%, transparent)}.shell{min-height:100dvh;padding:clamp(.75rem,3cqi,1.5rem);container-type:inline-size}h2,p{margin-block-start:0}.refresh,.copy-box button{background:var(--accent);color:var(--accent-ink);cursor:pointer;white-space:nowrap;border:0;border-radius:999px;padding:.72rem 1rem;font-weight:800}.status-card,.empty,.nap-card,.skeleton{border:1px solid var(--line);background:color-mix(in srgb, var(--color-base-100,#14110c) 80%, transparent);border-radius:1.25rem;box-shadow:0 1rem 3rem #0000002e}.status-card{justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1rem;padding:.85rem 1rem;display:flex}.status-card span,.publisher,.section-label,.copy-status{color:var(--muted);font-size:.82rem}.status-card span{margin-top:.2rem;display:block}.copy-status{text-align:right;margin:0}.feed{grid-template-columns:repeat(auto-fit,minmax(min(100%,22rem),1fr));gap:1rem;display:grid}.nap-card{gap:.9rem;padding:clamp(.9rem,3cqi,1.2rem);display:grid}.publisher{margin-bottom:.4rem}.nap-card h2{letter-spacing:-.04em;margin-bottom:.45rem;font-size:clamp(1.25rem,5cqi,1.8rem);line-height:1}.description{color:var(--muted);margin-bottom:0}.copy-box{gap:.5rem;display:grid}.copy-box details{color:var(--muted);font-size:.84rem}.copy-box summary{cursor:pointer;width:max-content}.copy-box input{border:1px solid var(--line);background:var(--panel);width:100%;min-width:0;color:var(--text);-webkit-user-select:all;user-select:all;border-radius:.85rem;margin-top:.55rem;padding:.65rem .75rem}.friendly-facts{flex-wrap:wrap;gap:.55rem;display:flex}.friendly-facts span{background:var(--panel);color:var(--muted);border-radius:.9rem;padding:.5rem .65rem;font-size:.84rem}.section-label{margin:0 0 -.45rem;font-weight:800}.chips{flex-wrap:wrap;gap:.4rem;display:flex}.chips span{border:1px solid var(--line);background:var(--panel-strong);border-radius:999px;padding:.3rem .55rem;font-size:.78rem}.chips.subtle span{color:var(--muted);background:0 0}.empty,.skeleton{padding:clamp(1.2rem,5cqi,2rem)}.empty h2{margin-bottom:.45rem}.skeleton{gap:.7rem;display:grid}.skeleton span{background:var(--panel-strong);border-radius:999px;height:1rem}.skeleton span:first-child{width:55%}.skeleton span:last-child{width:75%}@container (width<=28rem){.status-card{display:grid}.refresh,.copy-box button{width:100%}.copy-status{text-align:left}.friendly-facts span{width:100%}}
/*$vite$:1*/</style>
</head>
<body>
<div id="app"></div>
</body>
</html>
