(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{196:function(e,t,a){Promise.resolve().then(a.bind(a,6856)),Promise.resolve().then(a.bind(a,5611)),Promise.resolve().then(a.t.bind(a,5288,23)),Promise.resolve().then(a.t.bind(a,8790,23)),Promise.resolve().then(a.t.bind(a,7960,23))},6856:function(e,t,a){"use strict";a.d(t,{default:function(){return o}});var r=a(7437),n=a(8774),s=a(4502),l=a(9376),i=a(2265);function c(e){return e.trim().toLowerCase()}function o(){let e=(0,l.useRouter)(),t=(0,l.usePathname)(),[a,o]=(0,i.useState)(!1),[d,m]=(0,i.useState)(""),[u,x]=(0,i.useState)("command"),h=(0,i.useRef)(null),f=(0,i.useMemo)(()=>[{k:"Ctrl+K / ~",v:"Open / close console"},{k:"go ",v:"Navigate (e.g., go donate)"},{k:"/donate",v:"Navigate by path"},{k:"donate",v:"Shortcut commands"},{k:"esc",v:"Close console"}],[]),p=(0,i.useMemo)(()=>{let e=c(d);return e?n._.filter(t=>c(t.label).includes(e)||c(t.href).includes(e)):n._},[d]);return((0,i.useEffect)(()=>{let t=t=>{let r=("k"===t.key||"K"===t.key)&&(t.ctrlKey||t.metaKey),s="`"===t.key||"~"===t.key;if(r||s){t.preventDefault(),o(e=>!e),x("command");return}if(a){if("Escape"===t.key){o(!1),x("command");return}if("help"===u){x("command");return}if("Enter"===t.key&&"command"===u){t.preventDefault();let a=function(e){let t=c(e);if(!t)return null;let a=n._.find(e=>c(e.href)===t||c(e.label)===t);if(a)return a.href;let r=t.match(/^(go|open)\s+(.+)$/);if(r){var s;let e=c(r[2]),t=n._.find(t=>c(t.href)===e||c(t.label)===e||c(t.label).replace(/\s+/g,"")===e.replace(/\s+/g,""));return null!==(s=null==t?void 0:t.href)&&void 0!==s?s:null}return"donate"===t||"coffee"===t?"/donate":"agi"===t||"story"===t?"/story":"megammind"===t||"megamind"===t?"/megammind":"chapter2"===t||"chapter 2"===t?"/chapter/2":"faq"===t?"/faq":"lab"===t?"/lab":null}(d);a?(o(!1),m(""),e.push(a)):("help"===c(d)||"?"===c(d))&&x("help")}}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[a,d,e,u]),(0,i.useEffect)(()=>{if(!a)return;let e=window.setTimeout(()=>{var e;return null===(e=h.current)||void 0===e?void 0:e.focus()},0);return()=>window.clearTimeout(e)},[a,u]),(0,i.useEffect)(()=>{a&&(m(""),x("command"))},[t]),a)?(0,r.jsxs)("div",{className:"fixed inset-0 z-[60] flex items-end justify-center px-4 pb-24 md:items-center md:pb-0",children:[(0,r.jsx)("button",{"aria-label":"Close console",className:"absolute inset-0 cursor-default bg-black/50",onClick:()=>o(!1)}),(0,r.jsxs)("div",{className:"glass brush-border relative w-full max-w-2xl overflow-hidden rounded-2xl",children:[(0,r.jsx)("div",{className:"absolute inset-0 opacity-60 [mask-image:radial-gradient(800px_circle_at_50%_0%,#000,transparent)]",children:(0,r.jsx)("div",{className:"h-full w-full animate-driftSlow bg-[radial-gradient(700px_circle_at_40%_20%,rgb(var(--cobalt)/0.18),transparent_60%),radial-gradient(700px_circle_at_70%_10%,rgb(var(--sun)/0.18),transparent_62%)]"})}),(0,r.jsxs)("div",{className:"relative p-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mono text-[11px] uppercase tracking-[0.26em] text-cream/80",children:"Type Your Command"}),(0,r.jsxs)("div",{className:"mono text-[11px] text-cream/55",children:["Example: ",(0,r.jsx)("span",{className:"text-cream/70",children:"go donate"})," \xb7"," ",(0,r.jsx)("span",{className:"text-cream/70",children:"chapter 2"})," \xb7"," ",(0,r.jsx)("span",{className:"text-cream/70",children:"help"})]})]}),(0,r.jsx)("div",{className:"mono text-[11px] text-cream/55",children:"ESC to close"})]}),(0,r.jsx)("div",{className:"mt-4",children:"command"===u?(0,r.jsx)("input",{ref:h,value:d,onChange:e=>m(e.target.value),placeholder:"> ",className:(0,s.cn)("mono w-full rounded-xl border border-white/15 bg-black/30 px-4 py-3 text-[14px] tracking-[0.08em] text-cream/90 outline-none","placeholder:text-cream/40 focus:border-white/25 focus:ring-1 focus:ring-sun/20")}):(0,r.jsxs)("div",{className:"mono rounded-xl border border-white/15 bg-black/30 px-4 py-3 text-[12px] text-cream/80",children:[(0,r.jsx)("div",{className:"mb-2 uppercase tracking-[0.22em] text-cream/70",children:"Help"}),(0,r.jsx)("div",{className:"grid gap-2",children:f.map(e=>(0,r.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,r.jsx)("div",{className:"text-cream/90",children:e.k}),(0,r.jsx)("div",{className:"text-right text-cream/65",children:e.v})]},e.k))}),(0,r.jsx)("div",{className:"mt-3 text-cream/55",children:"Press any key to return."})]})}),"command"===u?(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)("div",{className:"mono text-[11px] uppercase tracking-[0.22em] text-cream/55",children:"Suggestions"}),(0,r.jsx)("div",{className:"mt-2 grid grid-cols-1 gap-2 sm:grid-cols-2",children:p.slice(0,6).map(t=>{var a;return(0,r.jsx)("button",{onClick:()=>{o(!1),m(""),e.push(t.href)},className:"group text-left",children:(0,r.jsxs)("div",{className:"rounded-xl border border-white/12 bg-white/5 px-3 py-2 transition hover:border-white/20 hover:bg-white/7",children:[(0,r.jsx)("div",{className:"mono text-[12px] uppercase tracking-[0.22em] text-cream/85 group-hover:text-sun",children:t.label}),(0,r.jsx)("div",{className:"mono text-[11px] text-cream/55",children:null!==(a=t.hint)&&void 0!==a?a:t.href})]})},t.href)})})]}):null]})]})]}):null}},5611:function(e,t,a){"use strict";a.d(t,{default:function(){return d}});var r=a(7437),n=a(2972),s=a.n(n),l=a(9376),i=a(8774),c=a(4502),o=a(2265);function d(){let e=(0,l.usePathname)(),t=function(){let[e,t]=(0,o.useState)(()=>new Date);return(0,o.useEffect)(()=>{let e=setInterval(()=>t(new Date),1e3);return()=>clearInterval(e)},[]),e}(),a=(0,o.useMemo)(()=>(function(){let e="abcdefghijklmnopqrstuvwxyz0123456789";return"".concat(Array.from({length:2},()=>e[Math.floor(Math.random()*e.length)]).join("")).concat(Math.floor(10+89*Math.random()),"-").concat(Math.floor(1e7+89999999*Math.random()))})(),[]);return(0,r.jsx)("div",{className:"pointer-events-none fixed inset-x-0 bottom-0 z-50 px-4 pb-4",children:(0,r.jsxs)("div",{className:"pointer-events-auto mx-auto max-w-6xl",children:[(0,r.jsxs)("div",{className:"glass brush-border relative overflow-hidden rounded-2xl px-4 py-3",children:[(0,r.jsx)("div",{className:"absolute inset-0 opacity-60 [mask-image:radial-gradient(700px_circle_at_50%_100%,#000,transparent)]",children:(0,r.jsx)("div",{className:"h-full w-full animate-driftSlow bg-[radial-gradient(800px_circle_at_20%_80%,rgb(var(--sun)/0.18),transparent_60%),radial-gradient(900px_circle_at_70%_90%,rgb(var(--cyan)/0.14),transparent_62%)]"})}),(0,r.jsxs)("div",{className:"relative flex flex-col gap-3 md:flex-row md:items-center md:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mono text-[11px] uppercase tracking-[0.26em] text-cream/80",children:"Discover"}),(0,r.jsxs)("div",{className:"mono text-[11px] text-cream/60",children:["Encrypted Protocol ",(0,r.jsx)("span",{className:"text-cream/70",children:a})]})]}),(0,r.jsx)("div",{className:"mono hidden text-[11px] text-cream/55 md:block",children:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})})]}),(0,r.jsx)("nav",{className:"flex flex-wrap items-center gap-2",children:i._.map(t=>{let a=e===t.href;return(0,r.jsx)(s(),{href:t.href,className:(0,c.cn)("mono rounded-xl border border-white/10 px-3 py-2 text-[12px] uppercase tracking-[0.22em] transition","hover:border-white/20 hover:bg-white/5",a?"border-white/25 bg-white/6 text-sun shadow-glow":"text-cream/75"),children:t.label},t.href)})}),(0,r.jsx)("div",{className:"mono text-[11px] text-cream/55 md:hidden",children:t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})})]})]}),(0,r.jsx)("div",{className:"mt-3 text-center",children:(0,r.jsxs)("div",{className:"mono text-[10px] uppercase tracking-[0.26em] text-cream/45",children:["Tip: press ",(0,r.jsx)("span",{className:"text-cream/70",children:"Ctrl+K"})," (or ",(0,r.jsx)("span",{className:"text-cream/70",children:"~"}),") for the command console"]})})]})})}},4502:function(e,t,a){"use strict";a.d(t,{cn:function(){return s}});var r=a(1994),n=a(3335);function s(){for(var e=arguments.length,t=Array(e),a=0;a