1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([["62433"],{73066(e,t,a){Promise.resolve().then(a.bind(a,82546)),Promise.resolve().then(a.bind(a,42553)),Promise.resolve().then(a.bind(a,23250)),Promise.resolve().then(a.t.bind(a,16475,23)),Promise.resolve().then(a.t.bind(a,92306,23)),Promise.resolve().then(a.t.bind(a,60326,23)),Promise.resolve().then(a.t.bind(a,81673,23)),Promise.resolve().then(a.t.bind(a,69379,23))},42848(e,t,a){"use strict";a.d(t,{QJ:()=>u,pV:()=>c,pq:()=>d,sg:()=>m});var s=a(17328),n=a(74168),r=a(69372),l=a(68364);let i=(0,s.eU)(!1),c=()=>(0,n.useAtomValue)(o),o=(0,s.eU)(e=>e(l.Ss)?.user),d=()=>(0,n.useAtomValue)(i),u=e=>{r.Z.set(i,e)},m=()=>r.Z.get(i)},80722(e,t,a){"use strict";a.d(t,{e:()=>l});var s=a(74168),n=a(36537),r=a(71401);let l=()=>{let e=(0,s.useAtomValue)(r.KY);return(0,n.useCallback)(t=>{if(!e)return"";let a=new URL(e.replace(/\/$/,""));return`${a.protocol}//${a.host}${a.pathname}${t||""}${a.search}`},[e])}},51996(e,t,a){"use strict";a.d(t,{n:()=>l});var s=a(27181),n=a(41420),r=a(26025);let l=()=>(0,s.jsx)(s.Fragment,{children:(n.H.includes("localhost")||n.H.includes("127.0.0.1"))&&(0,s.jsx)(r.C,{type:"tooltip",triggerElement:(0,s.jsx)("div",{className:"fixed bottom-0 right-0 rounded bg-accent px-1 py-0.5 text-label-12 text-white",children:"DEV"}),children:n.H})})},48369(e,t,a){"use strict";a.d(t,{M:()=>o});var s=a(27181),n=a(36537),r=a(68364);let l=e=>{let t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},i=()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",c=()=>"light",o=()=>{let e=(0,r.ag)(e=>e.site),t=e?.favicon||"/favicon.ico",a=e?.faviconDark||"/favicon-dark.ico",o=(0,n.use
1SyncExternalStore)(l,i,c);return(0,s.jsx)("link",{href:"dark"===o?a:t,rel:"icon",sizes:"any",type:"image/x-icon"})}},43809(e,t,a){"use strict";a.d(t,{Global:()=>m});var s,n=a(84040),r=a(36537),l=a(56876),i=a(19969),c=a(14316),o=a(67366),d=a(37330);let u={Button:i.OV,MotionButtonBase:i._F,Input:c.pd,TextArea:c.fs},m=()=>((0,n.E)(()=>{let e;e=Object.assign({},l,{createPortal:x}),Object.assign(window,{React:s||(s=a.t(r,2)),ReactDOM:e,react:s||(s=a.t(r,2)),reactDom:e,dangerouslyCreatePortal:l.createPortal,yohaku:{...u,useModalStack:o.rs}})},[]),null);function x(e,t){let a;try{a=(0,r.use)(d.K)}catch{return null}if(!a)return console.error("No Shadow Root found in the document. Portal creation prevented."),null;let s=document.createElement("div");return a.append(s),l.createPortal(e,a.contains(t)?t:s)}},39813(e,t,a){"use strict";a.d(t,{b:()=>c});var s=a(27181),n=a(36537),r=a(62387),l=a(42848),i=a(6227);let c=e=>{let{shouldTrack:t=!0,...a}=e;return t?(0,s.jsx)(o,{...a}):(0,s.jsx)(s.Fragment,{children:e.children})},o=(0,n.memo)(e=>{let[t,a]=(0,n.useState)(!1),c=(0,l.pq)(),{ref:o}=(0,r.Wx)({initialInView:!1,triggerOnce:!0,onChange(t){t&&(a(!0),c||(document.dispatchEvent(new CustomEvent("impression",{detail:{action:e.action??i.x.Impression,label:e.trackerMessage}})),e.onTrack?.()))}});return(0,s.jsxs)(s.Fragment,{children:[e.children,!t&&(0,s.jsx)("span",{ref:o})]})});o.displayName="ImpressionView"},82546(e,t,a){"use strict";a.d(t,{MiSansLoader:()=>n});var s=a(36537);let n=({locale:e})=>((0,s.useEffect)(()=>{if("zh"!==e&&"zh-TW"!==e||"undefined"!=typeof navigator&&/Macintosh|Mac OS X|iPhone|iPad|iPod/.test(navigator.userAgent)||document.querySelector('link[data-font="misans"]'))return;let t=document.createElement("link");t.rel="stylesheet",t.href="/fonts/misans.css",t.dataset.font="misans",document.head.appendChild(t)},[e]),null)},23557(e,t,a){"use strict";a.d(t,{u:()=>n});var s=a(36537);let n=({contexts:e,children:t})=>e.reduceRight((e,t)=>s.cloneElement(t,{children:e}),t)},42553(e,t,a){"use strict";a.d(t,{AppShell:()=>tH});var s=a(27181),n=a(23250),r=a(36537),l=a(80239),i=a(67479);let c=()=>((0,r.useEffect)(()=>{let e=null,t=null,a=null,s=()=>{let n=(0,i.P)();if(!n){e=setTimeout(s,100);return}n.setGlobalProperties({version:l.rE,commit:"",app:"yohaku"}),t=async e=>{let t=e.target,a=t,{event:s}=t.dataset;for(;!s&&a&&a!==document.body;)s=a.dataset.event,a=a.parentElement;s&&(console.info("dom track click event",s),window.umami?.track(s,{type:"click"}),n.track(s,{type:"click"}))},document.addEventListener("click",t,!0),a=async e=>{let t=e.detail;console.info(t,"detail"),window.umami?.track(t.label,{type:"impression"}),n.track(t.label,{type:"impression"})},document.addEventListener("impression",a)};return s(),()=>{e&&clearTimeout(e),t&&document.removeEventListener("click",t,!0),a&&document.removeEventListener("impression",a)}},[]),null);var o=a(58924),d=a(43809),u=a(52831),m=a(82546);function x({clientId:e,apiUrl:t,trackScreenViews:a=!0,trackOutgoingLinks:s=!0}){return(0,r.useEffect)(()=>{(0,i.g)({clientId:e,apiUrl:t,trackScreenViews:a,trackOutgoingLinks:s})},[e,t,a,s]),null}var h=a(84040);let p=()=>((0,h.N)(()=>{(function(){if("undefined"==typeof navigator)return!1;let e=navigator.userAgent;return e.includes("Safari")&&!e.includes("Chrome")&&!e.includes("Edg")})()&&document.documentElement.classList.add("is-safari")},[]),null);var j=a(49604),g=a(18939),f=a(97303),v=a(17493);let b=(0,r.memo)(()=>{let e=(0,f.a8)();return(0,r.useEffect)(()=>{(0,v.R)()},[e]),null});b.displayName="ScrollTop";var y=a(59420);function N(){return(0,s.jsx)("aside",{"aria-hidden":!0,className:"yohaku-layout-drawer-host sticky top-[4.5rem] h-[100dvh] shrink-0 -translate-y-[4.5rem] overflow-hidden print:hidden","data-yohaku-layout-drawer-host":"",id:"layout-drawer-portal",style:{width:"var(--yohaku-panel-w, 0px)"}})}let w=({children:e})=>(0,s.jsxs)("main",{className:"fill-content relative z-[1] flex pt-[4.5rem]",children:[(0,s.jsx)("div",{className:"min-w-0 flex-1 px-4 md:px-0",children:e}),(0,s.jsx)(N,{})]});var k=a(77382),_=a(62904),C=a(26025),A=a(45268),M=a(9209),E=a(39343),I=a(92757),S=a(40920),z=a(39813),P=a(21806),D=a(48561),F=a(88427),O
1=a(6227),L=a(78639),W=a(38678),K=a(49147),Q=a(26964),T=a(96102);let R=()=>{let e=(0,k.c)("gateway");return(0,s.jsx)(C.C,{asChild:!0,mobileAsSheet:!0,as:"span",triggerElement:(0,s.jsx)("i",{className:"i-mingcute-question-line cursor-help"}),type:"tooltip",sheet:{triggerAsChild:!0},children:(0,s.jsxs)("div",{className:"space-y-2 leading-relaxed",children:[(0,s.jsxs)("p",{className:"flex items-center space-x-1 opacity-80",children:[(0,s.jsx)("i",{className:"i-mingcute-question-line"}),(0,s.jsx)("span",{className:"font-medium",children:e("how_it_works")})]}),(0,s.jsx)("p",{children:e("websocket_intro")}),(0,s.jsx)("p",{children:e("websocket_realtime")}),(0,s.jsx)(F.cG,{}),(0,s.jsxs)("p",{children:[e("socket_status"),(0,s.jsx)(U,{})]})]})})},U=()=>{let e=(0,S.ps)();return(0,s.jsxs)("div",{className:"inline-flex items-center",children:[(0,s.jsx)(z.b,{action:O.x.Impression,trackerMessage:"socket_status"}),(0,s.jsx)(q,{isConnected:e})]})};function q({isConnected:e}){let t=(0,k.c)("gateway")(e?"connected":"disconnected"),a={background:`radial-gradient(45.91% 45.91% at 49.81% 54.09%, ${e?"#00FC47":"#FC0000"} 7.13%, ${e?"rgba(174, 244, 194, 0.46)":"rgba(244, 174, 174, 0.46)"} 65.83%, rgba(252, 252, 252, 0.00) 100%)`};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"absolute size-5",style:a}),(0,s.jsx)(E.W,{className:"ml-6",text:t})]})}let B=()=>{let e=(0,k.c)("gateway"),t=(0,L.B)(),a=(0,I.Ii)(),n=(0,W.D)(),r=(0,S.ps)()&&n;return t?(0,s.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,s.jsx)(C.C,{asChild:!0,mobileAsSheet:!0,offset:10,placement:"top",trigger:"both",triggerElement:(0,s.jsxs)("span",{className:"inline-flex cursor-pointer items-center gap-1",children:[(0,s.jsx)("span",{className:"inline-block size-[5px] rounded-full",style:{backgroundColor:r?"#00FC47":"#FC0000"}}),(0,s.jsxs)("span",{children:[e("being_viewed"),(0,s.jsx)(E.W,{style:{fontVariantNumeric:"tabular-nums"},text:String(a)}),e("viewers")]})]},a),children:(0,s.jsx)(G,{})}),(0,s.jsx)(R,{})]}):null},G=()=>{let e=(0,k.c)("gateway"),{data:t}=(0,M.useQuery)({queryKey:["rooms"],refetchOnMount:!0,staleTime:1e4,queryFn:async()=>{await new Promise(e=>setTimeout(e,1e3));let e=(await Q.uE.activity.getRoomsInfo()).$serialized,t=[],a=e=>`article_${e}`;return e.objects.notes.forEach(s=>{t.push({path:(0,T.t)(T.B.Note,{...(0,K.iH)(s)}),title:s.title,count:e.roomCount[a(s.id)]})}),e.objects.posts.forEach(s=>{t.push({path:(0,T.t)(T.B.Post,{category:s.category.slug,slug:s.slug}),title:s.title,count:e.roomCount[a(s.id)]})}),e.objects.pages.forEach(s=>{t.push({path:(0,T.t)(T.B.Page,{slug:s.slug}),title:s.title,count:e.roomCount[a(s.id)]})}),t.sort((e,t)=>t.count-e.count)}});return t?0===t.length?(0,s.jsxs)("div",{className:"inline-flex items-center gap-5 text-neutral-7",children:[(0,s.jsx)("div",{className:"scale-[0.85] text-neutral-8 dark:text-neutral-3",children:(0,s.jsx)(P.F,{})}),(0,s.jsx)("span",{children:e("no_readers")})]}):(0,s.jsxs)("div",{className:"lg:max-w-[400px]",children:[(0,s.jsx)("div",{className:"mb-2 text-copy-13 font-medium",children:e("popular_content")}),(0,s.jsx)("ul",{className:"flex flex-col justify-between gap-2",children:t.map(e=>(0,s.jsxs)("li",{className:"flex items-center justify-between",children:[(0,s.jsx)(D.PeekLink,{className:"hover:underline",href:e.path,children:e.title}),!!e.count&&(0,s.jsxs)("span",{className:"ml-5 inline-flex items-center text-copy-13 text-neutral-7",children:[(0,s.jsx)("i",{className:"i-mingcute-user-visible-line"})," ",e.count]})]},e.path))})]}):(0,s.jsx)("div",{className:"center flex size-6",children:(0,s.jsx)("div",{className:"loading loading-spinner"})})};var Z=a(68364);let V=()=>(0,Z.pF)(e=>e.user.name),H=({localeSwitcher:e,themeSwitcher:t,footerConfig:a})=>{let n=(0,k.c)("common"),r=a||{linkSections:[{name:n("footer_section_about"),links:[{name:n("footer_about_site"),href:"/about-site"},{name:n("footer_about_me"),href:"/about-me"},{name:n("footer_about_project"),href:"https://github.com/Innei/Yohaku",external:!0}]},{name:n("footer_section_more"),links:[{name:n("nav_timeline"),href:"/timeline"},{name:n("nav_friends"),href:"/friends"},{name:n("footer_monitor"),href:"https://status.shizuri.net/status/main",external:!0}]},{name:n("footer_section_contact"),links:[{name:n("footer_write_message"),href:"/message"},{name:n("footer_send_email"),href:"mailto:[email protected]",external:!0},{name:"GitHub",href:"https://github.com/innei",external:!0}]}],otherInfo:{}},{otherInfo:l}
1=r,i=new Date().getFullYear().toString(),{date:c,icp:o}=l||{},d=(c||i).replace("{{now}}",i);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"hidden min-w-0 md:flex md:gap-20",children:[(0,s.jsxs)("div",{className:"w-80 max-w-[min(100%,24rem)] shrink-0",children:[(0,s.jsx)("div",{className:"text-title-20 font-semibold tracking-wide text-neutral-9",children:(0,s.jsx)("a",{href:"/",children:(0,s.jsx)(V,{})})}),(0,s.jsx)("div",{className:"mt-2 text-copy-13 leading-relaxed italic text-neutral-7",children:n("footer_motto")}),(0,s.jsx)("div",{className:"mt-7 text-copy-13 leading-normal text-neutral-6",children:(0,s.jsxs)("div",{children:["\xa9 ",d," ",(0,s.jsx)(et,{})]})}),(0,s.jsx)("div",{className:"mt-1.5 text-copy-13 text-neutral-6",children:(0,s.jsx)(B,{})})]}),(0,s.jsx)(J,{sections:r.linkSections})]}),(0,s.jsxs)("div",{className:"md:hidden",children:[(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("div",{className:"mb-1.5 text-copy-16 font-semibold text-neutral-9",children:(0,s.jsx)("a",{href:"/",children:(0,s.jsx)(V,{})})}),(0,s.jsx)("div",{className:"text-copy-13 leading-relaxed italic text-neutral-7",children:n("footer_motto")})]}),(0,s.jsx)(X,{linksLabel:n("footer_links_label"),sections:r.linkSections}),(0,s.jsxs)("div",{className:"border-t border-black/4 pt-4 dark:border-white/4",children:[(0,s.jsxs)("div",{className:"text-copy-13 leading-relaxed text-neutral-6",children:[(0,s.jsxs)("div",{children:["\xa9 ",d," ",(0,s.jsx)(et,{})]}),(0,s.jsx)("div",{className:"mt-0.5",children:(0,s.jsx)(B,{})}),o&&(0,s.jsx)("div",{className:"mt-0.5",children:(0,s.jsx)(ee,{external:!0,href:o.link,rel:"noreferrer",children:o.text})})]}),(0,s.jsxs)("div",{className:"mt-3.5 space-y-3 text-copy-13 text-neutral-6",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("a",{href:"/feed",rel:"noreferrer",target:"_blank",children:n("rss_subscribe")}),(0,s.jsx)(Y,{}),(0,s.jsx)("a",{href:"/sitemap.xml",rel:"noreferrer",target:"_blank",children:n("sitemap")}),(0,s.jsx)(_.W,{children:(0,s.jsx)(Y,{})})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[t,(0,s.jsx)($,{}),e]})]})]})]}),(0,s.jsxs)("div",{className:"mt-8 hidden border-t border-black/4 pt-4 dark:border-white/4 md:flex md:items-center md:justify-between",children:[(0,s.jsxs)("span",{className:"flex items-center gap-4 text-copy-13 text-neutral-6",children:[(0,s.jsxs)("span",{children:[(0,s.jsx)("a",{href:"/feed",rel:"noreferrer",target:"_blank",children:n("rss_subscribe")}),(0,s.jsx)(Y,{}),(0,s.jsx)("a",{href:"/sitemap.xml",rel:"noreferrer",target:"_blank",children:n("sitemap")}),(0,s.jsx)(_.W,{children:(0,s.jsx)(Y,{})})]}),(0,s.jsx)($,{}),t,(0,s.jsx)($,{}),e]}),o&&(0,s.jsx)("span",{className:"text-copy-13 text-neutral-6",children:(0,s.jsx)(ee,{external:!0,href:o.link,rel:"noreferrer",children:o.text})})]})]})},Y=()=>(0,s.jsx)("span",{"aria-hidden":!0,className:"mx-1.5 select-none text-neutral-5",children:"\xb7"}),$=()=>(0,s.jsx)("span",{"aria-hidden":!0,className:"select-none text-neutral-4",children:"|"}),J=({sections:e})=>(0,s.jsx)("div",{className:"flex min-w-0 flex-1 justify-end gap-30 pt-0.5",children:e.map(e=>(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-3.5 text-copy-13 font-medium uppercase tracking-[3px] text-neutral-6",children:e.name}),(0,s.jsx)("div",{className:"text-copy-13 leading-[2.6]",children:e.links.map(e=>(0,s.jsxs)(ee,{className:"block text-neutral-8/90 hover:underline hover:decoration-current/30 hover:underline-offset-2",external:e.external,href:e.href,children:[e.name,e.external&&(0,s.jsx)("span",{className:"ml-0.5 text-neutral-6",children:" â"})]},e.name))})]},e.name))}),X=({sections:e,linksLabel:t})=>{let a=e.flatMap(e=>e.links);return(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("div",{className:"mb-2.5 text-copy-13 font-medium uppercase tracking-[3px] text-neutral-6",children:t}),(0,s.jsx)("div",{className:"text-copy-13 leading-[2.4] text-neutral-8/90",children:a.map((e,t)=>(0,s.jsxs)("span",{children:[(0,s.jsx)(ee,{className:"underline-transparent hover:underline hover:decoration-current/30 hover:underline-offset-2",external:e.external,href:e.href,children:e.name}),t<a.length-1&&(0,s.jsx)(Y,{})]},e.name))})]})},ee=e=>{let{external:t,...a}=e,n=t?"a":f.N_;return(0,s.jsx)(n,{rel:t?"noreferrer":void 0,target:t?"_blank":e.target,...a,children:e.children})},et=()=>{let e=(0,k.c)("common");return(0,s.jsxs)("span",{children:["Powered by"," ",(0,s.jsx)(ee,{external:!0,className:"underline decoration-black/15 underline-offset-2 dark:decoration-white/10",href:"https://github.com/mx-space",children:"Mix Space"}),(0,s.jsx)("span",{className:"mx-0.5",children:"&"}),(0,s.jsx)(C.C,{mobileAsSheet:!0,type:"tooltip",triggerElement:(0,s.jsx)(ee,{external:!0,className:"cursor-help underline decoration-black/15 underline-offset-2 dark:decoration-white/10",href:"https://github.com/Innei/Yohaku",children:"ä½ç½ / Yohaku"}),children:(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("p",{children:e.rich("yohaku_footer_line",{link:e=>(0,s.jsx)(ee,{external:!0,className:"underline",href:"https://github.com/Innei/Yohaku",children:e})})}),(0,s.jsx)("p",{children:e.rich("yohaku_footer_sponsor",{link:e=>(0,s.jsx)(A._,{noIcon:!0,href:"https://github.com/sponsors/Innei",children:e})})}),"",(0,s.jsx)("p",{children:e("build_time",{time:new Date("2026-06-21T20:06:08.330Z").toLocaleDateString()})})]})}),"."]})};
1var ea=a(75857),es=a(56876),en=a(26385);let er=["light","system","dark"],el={light:"Light",system:"System",dark:"Dark"},ei=()=>{let e=(0,k.c)("common"),{theme:t,setTheme:a}=(0,ea.D)(),n=(0,W.D)(),r={light:e("aria_theme_light"),system:e("aria_theme_system"),dark:e("aria_theme_dark")};return(0,s.jsx)("span",{className:"inline-flex items-center",children:er.map((e,l)=>(0,s.jsxs)("span",{children:[(0,s.jsx)("button",{"aria-label":r[e],type:"button",className:n&&t===e?"text-neutral-8 underline decoration-current/30 underline-offset-2":"text-neutral-6 transition-colors duration-200 [transition-timing-function:cubic-bezier(0.22,1,0.36,1)] hover:text-neutral-8",onClick:()=>{(0,en.wc)(()=>{(0,es.flushSync)(()=>a(e))},{rootAnimation:!0})},children:el[e]}),l<er.length-1&&(0,s.jsx)("span",{className:"mx-1 select-none text-neutral-5",children:"\xb7"})]},e))})};var ec=a(35809),eo=a(39982),ed=a(54914);let eu=()=>{let e=(0,k.c)("common"),t=(0,ec.Ym)(),a=(0,f.rd)(),n=(0,f.a8)(),l=(0,r.useMemo)(()=>({zh:e("locale_zh"),"zh-TW":e("locale_zh_tw"),en:e("locale_en"),ja:e("locale_ja"),ko:e("locale_ko")}),[e]),i=(0,r.useMemo)(()=>eo.IB.map(e=>({code:e,label:l[e]})),[l]),c=(0,r.useCallback)(e=>{a.push(n,{locale:e})},[n,a]);return(0,s.jsx)(ed.G,{currentLanguage:t,languages:i,onLanguageChange:c})},em=({footerConfig:e})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{"data-hide-print":!0,className:"relative z-[1] mt-32 -mb-px h-9 md:h-16",style:{background:"linear-gradient(to bottom, transparent, color-mix(in oklab, var(--color-accent) 5%, var(--color-root-bg, #fff)))"}}),(0,s.jsx)("footer",{"data-hide-print":!0,className:"relative z-[1] pb-12 pt-0",style:{background:"color-mix(in oklab, var(--color-accent) 5%, var(--color-root-bg, #fff))"},children:(0,s.jsx)("div",{className:"px-4 sm:px-8",children:(0,s.jsx)("div",{className:"mx-auto min-w-0 max-w-7xl lg:px-8",children:(0,s.jsx)(H,{footerConfig:e,localeSwitcher:(0,s.jsx)(eu,{}),themeSwitcher:(0,s.jsx)(ei,{})})})})})]});a(30283);var ex=a(17895),eh=a(99300),ep=a(42848),ej=a(80722),eg=a(72103),ef=a(94333),ev=a(76143),eb=a(83273),ey=a(13980),eN=a(71701),ew=a(32776),ek=a(27508);let e_=(0,r.createContext)(null),eC="https://fastly.jsdelivr.net/gh/Innei/reporter-assets@main",eA=()=>Promise.all([fetch(`${eC}/app-icon.json`).then(e=>e.json()),fetch(`${eC}/app-desc.json`).then(e=>e.json())]),eM=()=>{let{data:e}=(0,M.useQuery)({queryKey:["app-icon","app-desc"],queryFn:eA});if(!e)return null;let[t,a]=e;return(0,s.jsx)(e_,{value:{appIcon:t,appDescription:a},children:(0,s.jsx)(eE,{})})},eE=(0,r.memo)(()=>{let e=(0,k.c)("common"),{enable:t=!1,endpoint:a="/fn/ps/update"}=(0,Z.ag)(e=>e.module.activity)||{},n=(0,ew.v5)(),l=(0,L.B)(),{data:i}=(0,M.useQuery)({queryKey:["activity"],queryFn:async()=>await Q.uE.proxy(a).post().then(e=>e).catch(()=>({processName:"",processInfo:void 0,mediaInfo:void 0})),refetchInterval:3e5,refetchOnMount:"always",retry:!1,refetchOnReconnect:!0,refetchOnWindowFocus:"always",enabled:t&&l,meta:{persist:!1}});(0,r.useEffect)(()=>{if(!i)return;i.mediaInfo&&i.mediaInfo.title?(0,eN.EC)(i.mediaInfo):(0,eN.EC)(null);let e=i.processInfo?.name||i.processName;(0,eN.z4)(e?{name:e,iconUrl:i.processInfo?.iconUrl,iconBase64:i.processInfo?.iconBase64,description:i.processInfo?.description}:null)},[i]);let c=(0,Z.pF)(e=>e.user.name)||"",{process:o,media:d}=n,u=(0,r.useDeferredValue)(o),m=u?.name||"",x=u?.iconBase64||u?.iconUrl,{appDescription:h,appIcon:p}=(0,r.use)(e_),j=u?.description||h[u?.name||""],g=(0,r.useMemo)(()=>({processName:m||"",icon:x}),[x,m]),f=(0,eg.al)(),v=(0,r.useMemo)(()=>{let e=f?32:24;return d?.processName?{processName:d?.processName||"",size:e}:{processName:"cmusic",size:e}},[d,f]),b=d?.verb||e("activity_verb_listen"),y=o?.verb||e("activity_verb_use"),N=!!m&&!!(x||p?.[m]),w=l&&N,_=!!(d&&d.title&&d.artist&&N);return(0,s.jsxs)(s.Fragment,{children:[_&&(0,s.jsx)(eh.m.div,{className:"absolute inset-y-0 left-0 z-[11] flex items-center lg:left-auto lg:right-[-55px] lg:translate-y-1",children:(0,s.jsxs)(C.C,{TriggerComponent:eI,strategy:"fixed",triggerComponentProps:v,type:"tooltip",children:[(0,s.jsx)("p",{className:"text-copy-13",children:d.processName?e("activity_media_with_app",{owner:c,app:d.processName,verb:b}):e("activity_media_without_app",{owner:c,verb:b})}),(0,s.jsxs)("p",{children:[(0,s.jsxs)("span",{className:"font-bold",children:[d.title," - ",d.artist]}),(0,s.jsx)("span",{className:"ml-4",children:d.duration?eS(d.duration):""})]})]})}),l&&(0,s.jsx)(ey.N,{children:w&&(0,s.jsx)(eh.m.div,{className:"pointer-events-auto absolute inset-y-0 right-3 z-10 flex items-center overflow-hidden lg:right-[-30px]",transition:ek.en,animate:{o
1pacity:1,x:0,y:0},exit:{opacity:0,x:-10},initial:{opacity:1e-4,y:15},children:(0,s.jsx)(C.C,{TriggerComponent:eI,strategy:"fixed",triggerComponentProps:g,type:"tooltip",children:(0,s.jsxs)(z.b,{action:O.x.Impression,trackerMessage:"Activity",children:[(0,s.jsx)("p",{className:"text-copy-13",children:e("activity_process_status",{owner:c,verb:y})}),(0,s.jsxs)("p",{children:[(0,s.jsx)("span",{className:"font-bold",children:m}),(0,s.jsx)("span",{className:"whitespace-pre-wrap break-words",children:j?` ${j}`:""})]})]})})},m)})]})});eE.displayName="Activity";let eI=(0,r.memo)(({processName:e,icon:t,className:a,size:n=36})=>{let{appIcon:l}=(0,r.use)(e_),i=!!l[e],c=!i&&t?t:i?`${eC}/apps/${l[e]}.png`:"",o=(0,eb.A)("pointer-events-none select-none",{"rounded-md":!i},a),[d,u]=r.useState(!1);return c?(0,s.jsx)("img",{alt:e,className:o,fetchPriority:"low",height:n,src:d?"data:image/png;base64,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":c,width:n,onError:()=>u(!0)}):null});eI.displayName="ActivityIcon";let eS=e=>{let t=Math.floor((e=Math.floor(e))/60),a=e%60;return`${t}:${a.toString().padStart(2,"0")}`};var ez=a(43566),eP=a(38049),eD=a(51572),eF=a(19969),eO=a(22188),eL=a(67366),eW=a(31293),eK=a(87394);let eQ=(0,eD.default)(()=>Promise.all([a.e("53445"),a.e("74143")]).then(a.bind(a,9410)).then(e=>e.EmojiPicker),{loadableGenerated:{webpack:()=>[9410]},loading:()=>(0,s.jsx)("div",{className:"h-[400px] w-[400px]"})}),eT=()=>{let e=(0,k.c)("common"),t=(0,L.B)(),{data:a,isLoading:n}=(0,M.useQuery)({queryKey:["shiro-status"],queryFn:()=>Q.uE.proxy.fn.shiro.status.get(),refetchOnWindowFocus:"always",refetchOnMount:"always",enabled:t,meta:{persist:!1}});(0,r.useEffect)(()=>{n||(a?(0,eP.m)({...a}):(0,eP.m)(null))},[a,n]);let l=(0,eP.F)(),i=(0,ep.pq)(),[c,o]=(0,r.useState)(!1),{present:d}=(0,eL.rs)(),u=(0,s.jsx)("div",{role:i?"button":"img",tabIndex:i?0:-1,className:(0,eb.A)("pointer-events-auto absolute bottom-0 right-0 z-10 flex size-4 cursor-default items-center justify-center rounded-full text-accent duration-200",i&&c&&!l?"size-6 rounded-full bg-neutral-1":"",i&&c&&"cursor-pointer"),onClick:i?t=>{t.stopPropagation(),d({title:e("status_set"),content:eU})}:en.dG,onMouseEnter:()=>{o(!0)},onMouseLeave:()=>{o(!1)},children:i&&c?(0,s.jsx)("i",{className:"i-mingcute-emoji-line"}):l?.emoji});return i||l?(0,s.jsx)(C.C,{asChild:!0,mobileAsSheet:!0,placement:"bottom",triggerElement:u,type:"tooltip",children:(0,s.jsxs)("div",{className:"flex flex-col gap-1 text-copy-16",children:[l&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{className:"font-bold",children:[e("status_current"),l?.emoji," ",l?.desc]}),!!l.untilAt&&(0,s.jsxs)("p",{className:"text-copy-13 text-neutral-7",children:[e("status_until")," ",eR(l.untilAt)]})]}),!l&&i&&(0,s.jsx)("p",{children:e("status_click_to_set")})]})}):null},eR=e=>{let t=new Date(e);return new Date().getDate()!==t.getDate()?`${t.toLocaleDateString()} ${t.toLocaleTimeString()}`:t.toLocaleTimeString()},eU=()=>{let e=(0,k.c)("common"),t=(0,eP.F)(),a=[{name:"emoji",placeholder:"Emoji *",defaultValue:t?.emoji,rules:[{validator:e=>!!e,message:e("status_emoji_required")}]},{name:"desc",placeholder:e("status_desc_placeholder"),defaultValue:t?.desc,rules:[{validator:e=>!!e,message:e("status_desc_required")}]},{name:"ttl",placeholder:e("status_duration_placeholder"),type:"number",defaultValue:1,rules:[{validator:e=>!Number.isNaN(Number(e)),message:e("status_duration_number")}],transform:e=>+e}],n=(0,r.useRef)(null),{dismiss:l}=(0,eL.eR)(),[i,c]=(0,r.useState)(!1),[o,d]=(0,r.useState)("m"),u=(0,r.useCallback)(async()=>{if(!n.current)return;let t=n.current.getCurrentValues();c(!0),await Q.uE.serverless.proxy.shiro.status.post({data:{...t,ttl:t.ttl*({m:60,s:1,h:3600,d:86400})[o]}}).finally(()=>{c(!1)}),eK.o.success(e("status_set_success")),l()},[l,o,e]),m=(0,r.useCallback)(async()=>{c(!0),await Q.uE.serverless.proxy.shiro.status.delete().finally(()=>{c(!1)}),eK.o.success(e("status_set_success")),l()},[l,e]),x=(0,r.useRef)(null);return(0,s.jsxs)(eO.lV,{className:"flex flex-col gap-2",ref:n,onSubmit:u,children:[(0,s.jsxs)("div",{className:"relative flex flex-col gap-1",ref:x,children:[(0,s.jsx)(eO.ZQ,{...a[0]}),(0,s.jsx)(C.C,{headless:!0,mobileAsSheet:!0,popoverWrapperClassNames:"z-[999]",trigger:"click",triggerElement:(0,s.jsxs)("div",{className:"center absolute right-2 top-3 flex",role:"button",tabIndex:0,children:[(0,s.jsx)("i",{className:"i-mingcute-emoji-line"}),(0,s.jsx)("span",{className:"sr-only",children:e("emoji_label")})]}),children:(0,s.jsx)(eQ,{onEmojiSelect:e=>{n.current?.setValue("emoji",e)}})})]}),a.slice(1,-1).map(e=>(0,s.jsx)(eO.ZQ,{...e},e.name)),(0,s.jsxs)("div",{className:"mb-4 flex gap-2",children:[(0,s.jsx)(eO.ZQ,{...a.at(-1)}),(0,s.jsx)(eW.l,{value:o,values:[{label:e("time_minute"),value:"m"},{label:e("time_second"),value:"s"},{label:e("time_hour"),value:"h"},{label:e("time_day"),value:"d"}],onChange:d})]}),(0,s.jsxs)("div",{className:"center flex w-full gap-2",children:[(0,s.jsx)(eF.OV,{className:"rounded-md",isLoading:i,variant:"secondary",onClick:m,children:e("actions_reset")}),(0,s.jsx)(eF.OV,{isLoading:i,type:"submit",variant:"primary",children:e("actions_submit")})]})]})},eq=()=>{let e=(0,Z.ag)(e=>e.module?.bilibili?.liveId);return(0,M.useQuery)({queryKey:["live-check"],queryFn:()=>fetch(`/api/bilibili/check_live?liveId=${e}`,{next:{revalidate:1}}).then(e=>e.json()).catch(()=>null),select:(0,r.useCallback)(e=>!!e,[]),refetchInterval:6e4,enabled:!!e,meta:{persist:!1}})},eB=({className:e})=>
1{let t=(0,k.c)("common"),a=(0,Z.pF)(e=>e.user.avatar),{data:n}=eq(),r=(0,eP.F)();if(a)return(0,s.jsxs)("div",{role:n?"button":"img",className:(0,ex.c)("pointer-events-none relative z-[9] size-[40px] select-none",n?"cursor-pointer rounded-full":"",e),children:[(0,s.jsx)("div",{className:(0,ex.c)(n?"rounded-full":"mask mask-squircle","overflow-hidden"),children:(0,s.jsx)(ez.default,{alt:t("aria_site_owner_avatar"),className:"ring-2 ring-neutral-3",height:40,src:a,width:40,style:r?{maskImage:'url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0wIDBINDBWMjcuMzQyN0MzOC4zNSAyNS4zMDM3IDM1LjgyNzMgMjQgMzMgMjRDMjguMDI5NCAyNCAyNCAyOC4wMjk0IDI0IDMzQzI0IDM1LjgyNzMgMjUuMzAzNyAzOC4zNSAyNy4zNDI3IDQwSDBWMFoiIGZpbGw9IiNEOUQ5RDkiLz4KPC9zdmc+Cg==")'}:void 0})}),!n&&(0,s.jsx)(eT,{}),n&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"absolute bottom-0 right-0 z-[1] rounded-md bg-red-400 p-1 font-[system-ui] text-caption-10 text-white dark:bg-orange-700",children:"LIVE"}),(0,s.jsx)("div",{className:"absolute inset-0 scale-100 animate-ping rounded-full ring-2 ring-red-500/80"})]})]})},eG=()=>{let e=(0,f.rd)(),t=(0,k.c)("common"),{data:a}=eq(),{liveId:n}=(0,Z.ag)(e=>e.module?.bilibili)||ev.Wb,l=(0,r.useCallback)(()=>{window.open(`https://live.bilibili.com/${n}`)},[n]),i=(0,ej.e)(),c=(0,ef.M)(()=>{if(a)return l();e.push(T.B.Home)},()=>{if((0,ep.sg)()){location.href=i();return}e.push(`${T.B.Login}?redirect=${encodeURIComponent(location.pathname)}`)});return(0,s.jsxs)("button",{onClick:c,children:[(0,s.jsx)(eB,{className:"cursor-pointer"}),(0,s.jsx)("span",{className:"sr-only",children:t("aria_site_owner_avatar")})]})},eZ=()=>{let e=(0,eg.kW)(e=>e.lg&&0!==e.w);return(0,W.D)()?e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(eG,{}),(0,s.jsx)(eM,{})]}):(0,s.jsxs)(eh.m.div,{layout:!0,animate:{opacity:1},className:"flex items-center will-change-[unset]!",exit:{opacity:0},initial:{opacity:0}
1,children:[(0,s.jsx)(eM,{}),(0,s.jsx)(eG,{})]}):null};var eV=a(85913);let eH=({children:e})=>{let t=(0,eV.BX)();return(0,s.jsx)("div",{className:(0,ex.c)("relative","header--grid__logo"),style:{opacity:1-t},children:(0,s.jsx)("div",{className:(0,ex.c)("relative flex size-full items-center justify-center"),children:e})})};a(36406);var eY=a(30756),e$=a(34500),eJ=a(17290),eX=a(22612),e0=a(51892),e1=a(40188),e2=a(48232),e3=a(25252),e4=a(58072),e5=a(35240),e6=a(45269),e8=a(91874),e9=a(68053),e7=a(31261),te=a(61951),tt=a(94853),ta=a(49237),ts=a(29598),tn=a(74168),tr=a(17328);let tl=e=>(0,r.createElement)("i",{className:e}),ti=[{title:"Home",titleKey:"nav_home",path:"/",type:"Home",icon:tl("i-mingcute-home-4-line"),subMenu:[]},{title:"Posts",titleKey:"nav_posts",path:"/posts",type:"Post",subMenu:[],icon:tl("i-mingcute-news-line"),do(){window.__POST_LIST_ANIMATED__=!0}},{title:"Notes",titleKey:"nav_notes",type:"Note",path:"/notes",icon:tl("i-mingcute-quill-pen-line"),exclude:["/notes/series"]},{title:"Timeline",titleKey:"nav_timeline",type:"Timeline",icon:tl("i-mingcute-history-line"),path:"/timeline",subMenu:[{title:"Notes",titleKey:"nav_notes",icon:tl("i-mingcute-quill-pen-line"),path:"/timeline?type=note"},{title:"Posts",titleKey:"nav_posts",icon:tl("i-mingcute-book-2-line"),path:"/timeline?type=post"},{title:"Memories",titleKey:"nav_memories",icon:tl("i-mingcute-heart-fill"),path:"/timeline?memory=1"}]},{title:"Thinking",titleKey:"nav_thinking",type:"Thinking",icon:tl("i-mingcute-bulb-line"),path:"/thinking"},{title:"More",titleKey:"nav_more",type:"More",icon:tl("i-mingcute-more-1-line"),path:"#",subMenu:[{title:"Friends",titleKey:"nav_friends",icon:tl("i-mingcute-group-line"),path:"/friends",descriptionKey:"nav_friends_desc"},{title:"Projects",titleKey:"nav_projects",icon:tl("i-mingcute-flask-line"),path:"/projects",descriptionKey:"nav_projects_desc"},{title:"Quotes",titleKey:"nav_says",path:"/says",icon:tl("i-mingcute-quote-left-line"),descriptionKey:"nav_says_desc"},{title:"Warp",titleKey:"nav_travel",icon:tl("i-mingcute-planet-line"),path:"https://travel.moe/go.html",descriptionKey:"nav_travel_desc"}]}],tc=e=>e.map(e=>({...e,icon:e.icon,titleKey:e.titleKey,search:e.search?{...e.search}:void 0,exclude:e.exclude?[...e.exclude]:void 0,subMenu:e.subMenu?tc(e.subMenu):void 0})),to=["nid","title","createdAt","slug"],td=(0,r.createContext)(null),tu=()=>(0,r.use)(td),tm=e=>{let t=tu();return(0,tn.useAtomValue)(t[e])},tx=({children:e})=>{let t,a=(0,ec.Ym)(),n=(0,Z.ag)(e=>e.module?.posts?.mode),[l,i]=(0,r.useState)(!1),[c,o]=(0,r.useState)(!1),[d,u]=(0,r.useState)(!1),[m,x]=(0,r.useState)(!1),[h]=(0,r.useState)(()=>({configAtom:(0,tr.eU)(ti),categoriesAtom:(0,tr.eU)(null),topicsAtom:(0,tr.eU)(null),recentNotesAtom:(0,tr.eU)(null),topDataAtom:(0,tr.eU)(null)})),{data:p}=(0,M.useQuery)({...ts.Lg.pages(a),enabled:l}),{data:j}=(0,M.useQuery)({...ts.Lg.posts(a),enabled:c}),{data:g}=(0,M.useQuery)({queryKey:["nav-topics"],queryFn:async()=>(await Q.uE.topic.getAll()).$serialized,staleTime:6e5,enabled:d}),{data:f}=(0,M.useQuery)({...(t=Q.uE,{queryKey:["nav-recent-notes",a],queryFn:async()=>(await t.note.getList(1,4,{select:to,lang:a})).$serialized}),enabled:d}),{data:v}=(0,M.useQuery)({queryKey:["nav-top"],queryFn:async()=>(await Q.uE.aggregate.getTop(5)).$serialized,staleTime:3e5,enabled:m}),b=j?.categories||null,y=g||null,N=f?.data||null,w=(0,tn.useSetAtom)(h.configAtom),k=(0,tn.useSetAtom)(h.categoriesAtom),_=(0,tn.useSetAtom)(h.topicsAtom),C=(0,tn.useSetAtom)(h.recentNotesAtom),A=(0,tn.useSetAtom)(h.topDataAtom);(0,r.useEffect)(()=>{w(((e,{categories:t,pages:a,postListViewMode:s})=>{let n=tc(e),r=n.findIndex(e=>"Home"===e.type);-1!==r&&a&&(n[r].subMenu=[...a].sort((e,t)=>e.order-t.order).map(e=>({path:`/${e.slug}`,title:e.title})));let l=n.findIndex(e=>"Post"===e.type);return -1!==l&&(t&&(n[l].subMenu=t.map(e=>({path:`/categories/${e.slug}`,title:e.name}))),s&&(n[l]={...n[l],search:{...n[l].search,view_mode:s}})),n})(ti,{categories:b,pages:p,postListViewMode:n}))},[b,p,n,w]),(0,r.useEffect)(()=>{k(b)},[b,k]),(0,r.useEffect)(()=>{_(y)},[y,_]),(0,r.useEffect)(()=>{C(N)},[N,C]),(0,r.useEffect)(()=>{A(v||null)},[v,A]);let E=(0,r.useCallback)(e=>{switch(e){case"Home":i(!0);break;case"Post":o(!0);break;case"Note":u(!0);break;case"Timeline":x(!0)}},[]),[I]=(0,r.useState)(()=>({...h,ensureMenuData:E}));
1return(0,s.jsx)(td,{value:I,children:e})},th={Home:({section:e})=>{let t=(0,k.c)("common"),a=(0,ec.Ym)(),n=(0,Z.pF)(e=>e.user.avatar),l=(0,Z.pF)(e=>e.user.name),i=(0,Z.pF)(e=>e.user.socialIds),c=(0,eP.F)(),o=(0,ew.v5)(),d=(0,r.useDeferredValue)(o.process),u=(0,r.useDeferredValue)(o.media),m=e.subMenu||[],x=Object.entries(i||{}).filter(([e])=>(0,tt.de)(e)).slice(0,5),{data:h}=(0,M.useQuery)({queryKey:["site-info",a],queryFn:()=>Q.uE.aggregate.proxy.site_info.get(),staleTime:3e5}),p=(h?.postCount??0)+(h?.noteCount??0),j=h?.totalWordCount?"en"===a?Math.round(h.totalWordCount/1e3):Math.round(h.totalWordCount/1e4):0,g=h?.firstPublishDate?Math.floor((Date.now()-new Date(h.firstPublishDate).getTime())/864e5):0,v=[{value:p,label:t("nav_dropdown_stat_articles")},{value:j,label:t("nav_dropdown_stat_words")},{value:g,label:t("nav_dropdown_stat_days")}],b=m.length>0,y=!!h;return(0,s.jsx)("div",{className:b?"w-[540px] p-3":"w-[280px] p-3",children:(0,s.jsxs)("div",{className:"grid gap-3",style:{gridTemplateColumns:b?"180px minmax(0,1fr)":"1fr"},children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2.5 p-2",children:[n&&(0,s.jsx)(ez.default,{alt:l??t("aria_site_owner_avatar"),className:"shrink-0 rounded-full ring-1 ring-neutral-3",height:42,src:n,width:42}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"text-copy-13 font-medium",children:l}),(0,s.jsx)("div",{className:"mt-0.5 flex items-center gap-1.5 text-label-12 text-neutral-7",children:c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{children:c.emoji}),(0,s.jsx)("span",{className:"truncate",children:c.desc})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"inline-block size-1.5 shrink-0 rounded-full bg-green-400"}),(0,s.jsx)("span",{className:"text-neutral-6",children:t("nav_dropdown_online")})]})})]}),(0,s.jsx)("div",{className:"flex gap-3.5",children:y?v.map(e=>(0,s.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,s.jsx)("span",{className:"font-mono text-copy-15 leading-none tabular-nums text-neutral-9",children:e.value}),(0,s.jsx)("span",{className:"text-caption-10 uppercase tracking-wider text-neutral-6",children:e.label})]},e.label)):[0,1,2].map(e=>(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("div",{className:"h-[13px] w-8 animate-pulse rounded bg-neutral-3/60"}),(0,s.jsx)("div",{className:"h-[9px] w-6 animate-pulse rounded bg-neutral-3/40"})]},e))}),(d?.name||u)&&(0,s.jsxs)("div",{className:"flex flex-col gap-1 border-t border-neutral-4/40 pt-2 text-label-12 text-neutral-7",children:[d?.name&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[d.iconUrl||d.iconBase64?(0,s.jsx)("img",{alt:"",className:"size-3.5 shrink-0 rounded-sm object-contain",src:d.iconUrl||`data:image/png;base64,${d.iconBase64}`}):(0,s.jsx)("i",{className:"i-mingcute-window-line shrink-0 text-copy-13 text-neutral-6"}),(0,s.jsx)("span",{className:"truncate",children:d.name})]}),u&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("i",{className:"i-mingcute-music-2-line shrink-0 text-copy-13 text-neutral-6"}),(0,s.jsxs)("span",{className:"truncate",children:[u.title,(0,s.jsxs)("span",{className:"text-neutral-6",children:[" \xb7 ",u.artist]})]})]})]}),x.length>0&&(0,s.jsx)("div",{className:"mt-auto flex flex-wrap items-center gap-1 border-t border-neutral-4/40 pt-2",children:x.map(([e,t])=>{let a=tt.xe[e];if(!a)return null;let[n,r,l,i]=a;return(0,s.jsx)(C.C,{type:"tooltip",triggerElement:(0,s.jsx)("a",{"aria-label":n,className:"center group flex size-6 rounded text-neutral-6 transition-colors hover:text-[var(--social-color)]",href:i(String(t)),rel:"noreferrer",target:"_blank",style:{"--social-color":l},children:(0,s.jsx)("span",{className:"flex items-center justify-center [&_svg]:size-3.5 [&_i]:text-copy-13",children:r})}),children:n},e)})})]}),b&&(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"mb-2 px-1 text-caption-10 font-medium uppercase tracking-wider text-neutral-6",children:t("nav_dropdown_pages")}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-x-2 gap-y-0.5",children:m.map(e=>(0,s.jsx)(e1.W,{closeOnClick:!0,className:"truncate rounded px-2 py-1.5 text-copy-13 text-neutral-8 transition hover:bg-black/[0.02] dark:hover:bg-white/[0.04] hover:text-neutral-9",render:(0,s.jsx)(f.N_,{href:e.path}),children:e.title},e.path))})]})]})})},Post:({section:e})=>{let t=(0,k.c)("common"),a=(0,ec.Ym)(),n=tm("categoriesAtom"),[l,i]=(0,r.useState)(null),c=l||n?.[0]?.slug||null,{data:o}=(0,M.useQuery)({...ts.Lg.posts(a,c),enabled:!!c}),d=o?.recentPosts;return(0,s.jsxs)("div",{className:"w-[380px] p-3",children:[(0,s.jsxs)("div",{className:"grid grid-cols-[140px_1fr] gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-2 text-caption-10 font-medium uppercase tracking-wider text-neutral-6",children:t("nav_dropdown_categories")}),(0,s.jsx)("div",{className:"flex flex-col gap-0.5",children:n?.map(e=>(0,s.jsxs)(e1.W,{closeOnClick:!0,className:"flex items-center justify-between rounded px-2.5 py-1.5 text-copy-13 transition data-[hovered]:bg-black/[0.02] dark:data-[hovered]:bg-white/[0.04] data-[hovered]:text-neutral-9","data-hovered":c===e.slug?"":void 0,render:(0,s.jsx)(f.N_,{href:`/categories/${e.slug}`}),onMouseEnter:()=>i(e.slug),children:[(0,s.jsx)("span",{children:e.name}),(0,s.jsx)("span",{className:"text-label-12 text-neutral-6",children:e.count})]},e.slug))})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"mb-2 text-caption-10 font-medium uppercase tracking-wider text-neutral-6",children:[n?.find(e=>e.slug===c)?.name,t("nav_dropdown_recent_suffix")]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[d?.map(e=>(0,s.jsxs)(e1.W,{closeOnClick:!0,className:"rounded bg-neutral-2/60 px-2.5 py-2 transition hover:bg-black/[0.02] dark:hover:bg-white/[0.04] hover:text-neutral-9",render:(0,s.jsx)(f.N_,{href:`/posts/${c}/${e.slug}`}),children:[(0,s.jsx)("div",{className:"text-copy-13 leading-snug",children:e.title}),(0,s.jsx)("div",{className:"mt-0.5 text-label-12 text-neutral-6",children:(0,s.jsx)(ta.s,{date:e.createdAt})})]},e.id)),!d?.length&&(0,s.jsx)("div",{className:"py-4 text-center text-label-12 text-neutral-6",children:"..."})]})]})]}),(0,s.jsx)("div",{className:"mt-2 border-t border-neutral-4/60 pt-2",children:(0,s.jsxs)(e1.W,{closeOnClick:!0,className:"flex items-center justify-between text-label-12 text-neutral-7 transition hover:text-neutral-9",render:(0,s.jsx)(f.N_,{href:e.path,onClick:e.do}),children:[(0,s.jsx)("span",{children:t("nav_dropdown_view_all_posts")}),(0,s.jsx)("span",{children:t("nav_dropdown_posts_count",{count:n?.reduce((e,t)=>
1e+t.count,0)??0})})]})})]})},Note:({section:e})=>{let t=(0,k.c)("common"),a=tm("topicsAtom"),n=tm("recentNotesAtom");return(0,s.jsxs)("div",{className:"w-[380px] p-3",children:[(0,s.jsxs)("div",{className:"grid grid-cols-[140px_1fr] gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-2 text-caption-10 font-medium uppercase tracking-wider text-neutral-6",children:t("nav_topics")}),a&&a.length>0?(0,s.jsx)("div",{className:"flex flex-col gap-0.5",children:a.map(e=>(0,s.jsxs)(e1.W,{closeOnClick:!0,className:"flex items-center gap-2 rounded px-2.5 py-1.5 text-copy-13 transition hover:bg-black/[0.02] dark:hover:bg-white/[0.04] hover:text-neutral-9",render:(0,s.jsx)(f.N_,{href:`/notes/series/${e.slug}`}),children:[e.icon&&(0,s.jsx)("img",{alt:"",className:"size-4 shrink-0 rounded object-cover",src:e.icon}),(0,s.jsx)("span",{className:"truncate",children:e.name})]},e.slug))}):(0,s.jsx)("div",{className:"py-4 text-center text-label-12 text-neutral-6",children:"..."})]}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"mb-2 text-caption-10 font-medium uppercase tracking-wider text-neutral-6",children:t("nav_dropdown_recent_notes")}),(0,s.jsxs)("div",{className:"flex flex-col gap-1 min-w-0",children:[n?.map(e=>(0,s.jsxs)(e1.W,{closeOnClick:!0,className:"block min-w-0 flex flex-col rounded bg-neutral-2/60 px-2.5 py-2 transition hover:bg-black/[0.02] dark:hover:bg-white/[0.04] hover:text-neutral-9",render:(0,s.jsx)(f.N_,{href:(0,K.QR)(e)}),children:[(0,s.jsx)("div",{className:"min-w-0 truncate text-copy-13 leading-snug",children:e.title}),(0,s.jsx)("div",{className:"mt-0.5 text-label-12 text-neutral-6",children:(0,s.jsx)(ta.s,{date:e.createdAt})})]},e.nid)),!n?.length&&(0,s.jsx)("div",{className:"py-4 text-center text-label-12 text-neutral-6",children:"..."})]})]})]}),(0,s.jsxs)("div",{className:"mt-2 flex items-center justify-between border-t border-neutral-4/60 pt-2",children:[(0,s.jsx)(e1.W,{closeOnClick:!0,className:"text-label-12 text-neutral-7 transition hover:text-neutral-9",render:(0,s.jsx)(f.N_,{href:e.path}),children:t("nav_dropdown_view_all_notes")}),(0,s.jsx)(e1.W,{closeOnClick:!0,className:"text-label-12 text-neutral-7 transition hover:text-neutral-9",render:(0,s.jsx)(f.N_,{href:"/notes/series"}),children:t("nav_dropdown_view_all_topics")})]})]})},Timeline:({section:e})=>{let t=(0,k.c)("common"),a=e.subMenu||[],n=function(e){if(!e)return[];let t=[];for(let a of e.posts??[])t.push({id:a.id,title:a.title,createdAt:a.createdAt,href:`/posts/${a.category.slug}/${a.slug}`,type:"post"});for(let a of e.notes??[])t.push({id:a.id,title:a.title,createdAt:a.createdAt,href:(0,K.QR)(a),type:"note"});return t.sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime()),t.slice(0,4)}(tm("topDataAtom"));return(0,s.jsxs)("div",{className:"w-[320px] p-2.5",children:[(0,s.jsx)("div",{className:"flex gap-1",children:a.map(e=>{let a=e.path.startsWith("http");return(0,s.jsxs)(e1.W,{closeOnClick:!0,className:"flex flex-1 items-center justify-center gap-2 whitespace-nowrap rounded px-3 py-2 text-copy-13 transition hover:bg-black/[0.02] dark:hover:bg-white/[0.04] hover:text-neutral-9",render:a?(0,s.jsx)("a",{href:e.path,rel:"noopener noreferrer",target:"_blank"}):(0,s.jsx)(f.N_,{href:e.path}),children:[!!e.icon&&(0,s.jsx)("span",{className:"flex shrink-0 items-center justify-center text-copy-13 opacity-70",children:e.icon}),(0,s.jsx)("span",{children:e.titleKey?t(e.titleKey):e.title})]},e.path)})}),(0,s.jsxs)("div",{className:"mt-2 border-t border-neutral-4/60 pt-2",children:[(0,s.jsx)("div",{className:"mb-1.5 text-caption-10 font-medium uppercase tracking-wider text-neutral-6",children:t("nav_dropdown_recent_activity")}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[n.map(e=>(0,s.jsxs)(e1.W,{closeOnClick:!0,className:"rounded bg-neutral-2/60 px-2.5 py-2 transition hover:bg-black/[0.02] dark:hover:bg-white/[0.04] hover:text-neutral-9",render:(0,s.jsx)(f.N_,{href:e.href}),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("div",{className:"truncate text-copy-13 leading-snug",children:e.title}),(0,s.jsx)("span",{className:"ml-2 shrink-0 text-label-12 text-neutral-6",children:"post"===e.type?t("nav_posts"):t("nav_notes")})]}),(0,s.jsx)("div",{className:"mt-0.5 text-label-12 text-neutral-6",children:(0,s.jsx)(ta.s,{date:e.createdAt})})]},e.id)),0===n.length&&(0,s.jsxs)("div",{className:"flex flex-col items-center gap-5 py-4 text-center text-label-12 text-neutral-6",children:[(0,s.jsx)("div",{className:"scale-[0.9] text-neutral-8 dark:text-neutral-3",children:(0,s.jsx)(P.F,{})}),(0,s.jsx)("span",{children:t("empty_nothing")})]})]})]})]})},More:({section:e})=>{let t=(0,k.c)("common"),a=e.subMenu||[];return(0,s.jsx)("div",{className:"p-2",children:(0,s.jsx)("div",{className:"flex flex-col gap-0.5",children:a.map(e=>{let a=e.path.startsWith("http");return(0,s.jsxs)(e1.W,{closeOnClick:!0,className:"flex items-center gap-3 rounded px-3 py-2.5 text-left transition hover:bg-black/[0.02] dark:hover:bg-white/[0.04]",render:a?(0,s.jsx)("a",{href:e.path,rel:"noopener noreferrer",target:"_blank"}):(0,s.jsx)(f.N_,{href:e.path}),children:[!!e.icon&&(0,s.jsx)("span",{className:"flex w-5 shrink-0 items-center justify-center text-copy-14 opacity-70",children:e.icon}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-copy-13",children:e.titleKey?t(e.titleKey):e.title}),(e.descriptionKey||e.description)&&(0,s.jsx)("div",{className:"text-label-12 text-neutral-7",children:e.descriptionKey?t(e.descriptionKey):e.description})]})]},e.path)})})})}},tp=()=>(0,s.jsx)("div",{className:"h-3.5 w-px shrink-0 bg-gradient-to-b from-transparent via-black/[0.06] to-transparent dark:via-white/[0.06]"}),tj=()=>{let e=(0,eV.GO)(),t=(0,eV.S)(),a=(0,te.io)(600),n=(0,e7.Q)(t&&a,120),l=(0,te.CS)(e=>e>160,[]),i=(0,e6.d)(e),c=(0,e6.d)(0);n||i.set(t?e:1);let o=(0,r.useRef)(n);(0,r.useEffect)(()=>{n!==o.current&&(o.current=n,n?(c.set(-20),i.set(0),(0,e8.i)(c,0,{type:"spring",bounce:0,duration:.4}),(0,e8.i)(i,1,{duration:.2})):(c.set(0),i.set(t?e:1)))},[n,e,t]);let d=n||!t&&l;return(0,s.jsx)(e9.RootPortal,{children:(0,s.jsx)(eh.m.div,{className:"yohaku-page-right-inset pointer-events-none fixed inset-x-0 top-4 z-10 mr-[var(--removed-body-scroll-bar-size)] hidden justify-center lg:flex",
1style:{opacity:i,y:c},children:(0,s.jsx)(tg,{solid:d})})})},tg=({className:e,shouldHideNavBg:t,animatedIcon:a=!0,solid:n})=>{let l=tm("configAtom"),{ensureMenuData:i}=tu(),c=(0,f.a8)(),o=(0,k.c)("common"),d=(()=>{let[e]=(0,r.useState)(()=>"1"===new URLSearchParams(window.location.search).get("nav_debug")||!!localStorage.getItem("nav_debug"));return e})(),[u,m]=(0,r.useState)(null),x=(0,r.useCallback)(e=>{if(!d||null!=e){if(e){let t=l.find(t=>t.path===e);t?.type&&i(t.type)}m(e)}},[i,l,d]),h=(0,r.useCallback)(e=>e.titleKey?o(e.titleKey):e.title,[o]),{activeSectionPath:p,activeIcon:j}=(0,r.useMemo)(()=>{for(let e of l){let t=e.subMenu?.findIndex(e=>e.path===c||c.slice(1)===e.path||c.startsWith(`${e.path}/`))??-1;if(c===e.path||c.startsWith(`${e.path}/`)&&!e.exclude?.includes(c)||t>-1){let a=e.subMenu?.[t];return{activeSectionPath:e.path,activeIcon:a?.icon??e.icon}}}return{activeSectionPath:void 0,activeIcon:null}},[l,c]),g=(0,r.useId)().replaceAll(/[^\da-z]/g,""),v=`--nav-active-icon-${g}`,b=`--nav-active-pill-${g}`,y=(0,r.useMemo)(()=>"undefined"!=typeof CSS&&CSS.supports?.("position-anchor","auto")===!0&&CSS.supports?.("left","anchor(left)")===!0,[]),N=y?{anchorName:b}:void 0,w=y?{anchorName:v}:void 0,_=!!p&&y,C=y?{positionAnchor:b,top:"calc(anchor(top) + 2px)",left:"calc(anchor(left) + 2px)",width:"calc(anchor-size(width) - 4px)",height:"calc(anchor-size(height) - 4px)"}:void 0,A=(0,r.useMemo)(()=>{let e="left 0.45s var(--ease-spring), top 0.45s var(--ease-spring), opacity 0.2s ease";return y?{position:"absolute",positionAnchor:v,left:"anchor(left)",top:"anchor(center)",transform:"translateY(-50%)",transition:e,opacity:+!!_}:{position:"absolute",opacity:0,transition:e}},[_,v,y]),M=(e,t)=>(0,s.jsxs)("span",{className:"relative flex items-center",style:e&&a?w:void 0,children:[e&&a&&(0,s.jsx)("span",{"aria-hidden":!0,className:"mr-2 inline-block w-[1em] shrink-0"}),(0,s.jsx)("span",{children:t})]});return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(eY.e,{closeDelay:150,delay:80,render:(0,s.jsx)("nav",{}),value:u,className:(0,ex.c)("relative","rounded-sm",n?"bg-white dark:bg-neutral-900 shadow-[0_6px_20px_-10px_rgba(0,0,0,0.12),0_2px_6px_-3px_rgba(0,0,0,0.06)] dark:shadow-[0_6px_20px_-10px_rgba(0,0,0,0.4),0_2px_6px_-3px_rgba(0,0,0,0.25)]":"bg-white/[0.38] dark:bg-neutral-900/[0.38] backdrop-blur-lg","border border-[rgba(200,180,160,0.08)] dark:border-neutral-700/20","pointer-events-auto duration-200",t&&"bg-none! border-transparent!",e),onValueChange:x,children:[(0,s.jsx)(e$.S,{className:"flex list-none items-center px-2 font-medium text-neutral-9",children:l.map((e,t)=>{let a,n=e.type?th[e.type]:void 0,l=e.subMenu?.findIndex(e=>e.path===c||c.slice(1)===e.path||c.startsWith(`${e.path}/`))??-1,i=c===e.path||c.startsWith(`${e.path}/`)&&!e.exclude?.includes(c)||l>-1||!1,o=e.subMenu?.[l],d=o?h(o):h(e),u=e.path;e.search&&(u+=`?${new URLSearchParams(e.search).toString()}`);let x="text-neutral-9",p="text-neutral-7 hover:text-neutral-9";if(n)a=(0,s.jsxs)(eJ.J,{value:e.path,children:[(0,s.jsx)(eX.w,{nativeButton:!1,style:i?N:void 0,className:(0,ex.c)("relative z-[1] inline-flex cursor-pointer items-center whitespace-nowrap border-none bg-transparent px-3 py-1.5 transition-colors duration-200",i?x:p),render:(0,s.jsx)(f.N_,{href:u,onClick:t=>{e.do?.(t),t.preventBaseUIHandler(),m(null)},onMouseDown:e=>{e.preventBaseUIHandler()}}),children:M(i,d)}),(0,s.jsx)(e0.h,{className:"nav-menu-content",children:(0,s.jsx)(n,{section:e})})]});else{let t=u.startsWith("http");a=(0,s.jsx)(eJ.J,{children:(0,s.jsx)(e1.W,{active:i,style:i?N:void 0,className:(0,ex.c)("relative z-[1] block whitespace-nowrap px-3 py-1.5 transition-colors duration-200",i?x:p),render:t?(0,s.jsx)("a",{href:u,target:"_blank"}):(0,s.jsx)(f.N_,{href:u,onClick:e.do}),children:M(i,d)})})}return(0,s.jsxs)(r.Fragment,{children:[t>0&&(0,s.jsx)(tp,{}),a]},e.path)})}),(0,s.jsx)("span",{"aria-hidden":!0,style:C,className:(0,ex.c)("pointer-events-none absolute z-0 rounded-[2px]","bg-white shadow-[0_1px_4px_rgba(0,0,0,0.10),0_0_0_0.5px_rgba(0,0,0,0.06)]","dark:bg-white/[0.12] dark:shadow-[0_1px_4px_rgba(0,0,0,0.3),0_0_0_0.5px_rgba(255,255,255,0.05)]","[transition:left_0.45s_var(--ease-spring),width_0.45s_var(--ease-spring),opacity_0.2s_ease]",p&&_?"opacity-100":"opacity-0")}
1),a&&(0,s.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none absolute z-[2] flex items-center",style:A,children:j}),(0,s.jsx)(e2.a,{children:(0,s.jsx)(e3.W,{align:"/"===u?"start":"center",className:"nav-menu-positioner",positionMethod:"fixed",side:"bottom",sideOffset:12,children:(0,s.jsx)(e4.Q,{className:(0,ex.c)("nav-menu-popup","select-none rounded bg-[var(--color-root-bg)] dark:bg-neutral-900 outline-hidden","border border-[rgba(200,180,160,0.08)] dark:border-neutral-700/20","shadow-[0_8px_32px_rgba(0,0,0,0.06),0_2px_8px_rgba(0,0,0,0.02)]","dark:shadow-[0_8px_32px_rgba(0,0,0,0.3)]"),children:(0,s.jsx)(e5.Q,{className:"nav-menu-viewport"})})})})]})})};var tf=a(44314);let tv=(0,r.createContext)({close:()=>{}}),tb={initial:{rotate:0,x:0,y:0},animate:{rotate:-45,x:-2.35,y:.35,transformOrigin:"top right",transition:{type:"spring",stiffness:200,damping:20}}},ty={initial:{opacity:1},animate:{opacity:0,transition:{ease:"easeInOut",duration:.2}}},tN={initial:{rotate:0,x:0,y:0},animate:{rotate:45,x:-2.35,y:-.35,transformOrigin:"bottom right",transition:{type:"spring",stiffness:200,damping:20}}},tw=({isOpen:e})=>{let t=e?"animate":"initial";return(0,s.jsxs)(eh.m.svg,{fill:"none",height:16,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,viewBox:"0 0 24 24",width:16,xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)(eh.m.line,{animate:t,initial:"initial",variants:tb,x1:4,x2:20,y1:6,y2:6}),(0,s.jsx)(eh.m.line,{animate:t,initial:"initial",variants:ty,x1:4,x2:20,y1:12,y2:12}),(0,s.jsx)(eh.m.line,{animate:t,initial:"initial",variants:tN,x1:4,x2:20,y1:18,y2:18})]})};var tk=a(29914),t_=a(9403);let tC=()=>{let e=tm("configAtom"),{ensureMenuData:t}=tu(),a=(0,k.c)("common"),n=(0,f.a8)(),{close:l}=(0,r.use)(tv),[i,c]=(0,r.useState)(null);(0,r.useEffect)(()=>{t("Home"),t("Post")},[t]);let o=(0,r.useCallback)(e=>e.titleKey?a(e.titleKey):e.title,[a]),d=(0,r.useCallback)(e=>{c(t=>t===e?null:e)},[]),u=e.filter(e=>"#"!==e.path),m=e.find(e=>"#"===e.path);return(0,s.jsxs)("div",{className:"px-5 pb-5 pt-6",children:[(0,s.jsxs)("div",{className:"max-h-[75svh] overflow-y-auto",children:[(0,s.jsx)("div",{className:"flex flex-col",children:u.map(e=>{let t=!!e.subMenu&&e.subMenu.length>0,a=e.path.startsWith("http"),r=e.subMenu?.findIndex(e=>e.path===n||n.slice(1)===e.path||n.startsWith(`${e.path}/`))??-1,c=n===e.path||n.startsWith(`${e.path}/`)&&!e.exclude?.includes(n)||r>-1,u=e.path;e.search&&(u+=`?${new URLSearchParams(e.search).toString()}`);let m="#"===e.path,x=i===e.path,h=m?(0,s.jsx)("button",{className:"flex min-w-0 flex-1 items-baseline py-3 text-left",onClick:()=>t&&d(e.path),children:(0,s.jsx)(tA,{isActive:c,title:o(e)})}):a?(0,s.jsx)("a",{className:"flex min-w-0 flex-1 items-baseline py-3 no-underline",href:u,rel:"noopener",target:"_blank",onClick:l,children:(0,s.jsx)(tA,{isActive:c,title:o(e)})}):(0,s.jsx)(f.N_,{className:"flex min-w-0 flex-1 items-baseline py-3 no-underline",href:u,onClick:()=>{e.do?.(),l()},children:(0,s.jsx)(tA,{isActive:c,title:o(e)})}),p=t?(0,s.jsx)("button",{"aria-expanded":x,"aria-label":`${x?"Collapse":"Expand"} ${o(e)}`,className:"flex min-w-[44px] items-center justify-end self-stretch pr-1 text-neutral-6 transition-colors active:text-neutral-8",type:"button",onClick:()=>d(e.path),children:(0,s.jsx)("i",{"aria-hidden":!0,className:(0,ex.c)("i-mingcute-down-line size-3.5 shrink-0 transition-transform duration-200",x&&"rotate-180")})}):null;return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-stretch border-b border-neutral-9/[0.05] dark:border-white/[0.05]",children:[h,p]}),(0,s.jsx)(ey.N,{mode:"wait",children:x&&e.subMenu&&(0,s.jsx)(eh.m.div,{animate:{height:"auto",opacity:1},className:"overflow-hidden",exit:{height:0,opacity:0},initial:{height:0,opacity:0},transition:{duration:.15,ease:[.22,1,.36,1]},children:(0,s.jsx)(tM,{close:l,getTitle:o,items:e.subMenu,pathname:n})},e.path)})]},e.path)})}),m?.subMenu&&m.subMenu.length>0&&(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)("div",{className:"mb-2 text-caption-10 uppercase tracking-[2px] text-neutral-5",children:o(m)}),(0,s.jsx)("div",{className:"flex flex-wrap gap-x-5 gap-y-1.5",children:m.subMenu.map(e=>{let t=e.path.startsWith("http"),a=e.path===n||n.slice(1)===e.path||n.startsWith(`${e.path}/`);return t?(0,s.jsx)("a",{href:e.path,rel:"noopener",target:"_blank",className:(0,ex.c)("py-1.5 text-copy-13 no-underline",a?"text-neutral-9":"text-neutral-7"),onClick:l,children:o(e)},e.path):(0,s.jsx)(f.N_,{href:e.path,className:(0,ex.c)("py-1.5 text-copy-13 no-underline",a?"text-neutral-9":"text-neutral-7"),onClick:()=>{e.do?.(),l()},children:o(e)},e.path)})})]})]}),(0,s.jsx)(tE,{})]})},tA=({title:e,isActive:t})=>(0,s.jsx)("span",{className:(0,ex.c)("font-serif text-copy-14",t?"font-medium text-neutral-9":"text-neutral-8"),children:e}),tM=({items:e,getTitle:t,close:a,pathname:n})=>{let r=(0,k.c)("common");return 0===e.length?(0,s.jsx)("div",{className:"py-2 pl-4",children:(0,s.jsx)("span",{className:"text-label-12 text-neutral-4",children:r("nav_drawer_loading")})}):(0,s.jsx)("div",{className:"flex flex-col border-b border-neutral-9/[0.05] py-1.5 pl-4 dark:border-white/[0.05]",children:e.map(e=>{let r=e.path.startsWith("http"),l=e.path===n||n.slice(1)===e.path||n.startsWith(`${e.path}/`),i=(0,s.jsx)("span",{className:(0,ex.c)("text-copy-13",l?"text-neutral-9":"text-neutral-7"),children:t(e)});return r?(0,s.jsx)("a",{className:"py-1.5 no-underline",href:e.path,rel:"noopener",target:"_blank",onClick:a,children:i},e.path):(0,s.jsx)(f.N_,{className:"py-1.5 no-underline",href:e.path,onClick:()=>{e.do?.(),a()},children:i},e.path)})})},tE=()=>{let e=(0,k.c)("common"),t=(0,ep.pq)(),a=(0,tf.r8)(),n=(0,W.D)(),r=(0,Z.pF)(e
1=>e.user.name),l=(0,t_.mP)(),i=(0,t_.l8)(),c=n&&(t||!!a);return(0,s.jsx)("div",{className:"mt-4 h-[34px] border-t border-neutral-9/[0.06] pt-3 dark:border-white/[0.06]",children:(0,s.jsx)(ey.N,{children:n&&(c||l)&&(0,s.jsxs)(eh.m.div,{animate:{opacity:1},className:"flex items-baseline justify-between",exit:{opacity:0},initial:{opacity:0},transition:{duration:.2,ease:[.22,1,.36,1]},children:[t?(0,s.jsx)("span",{className:"font-serif text-label-12 italic text-[rgba(168,144,106,0.85)] dark:text-[rgba(200,176,138,0.85)]",children:r}):a?(0,s.jsx)("span",{className:"font-serif text-label-12 italic text-neutral-6",children:a.name}):(0,s.jsx)("span",{}),c?(0,s.jsx)("button",{className:"text-label-12 text-neutral-5 transition-colors hover:text-neutral-7",onClick:async()=>{await Q.uE.owner.logout().catch(()=>{}),await tk.y.signOut().then(e=>{e.data?.success&&window.location.reload()})},children:e("auth_logout")}):(0,s.jsx)("button",{className:"text-label-12 font-medium text-accent transition-opacity hover:opacity-80",onClick:()=>i(),children:e("aria_login")})]})})})},tI=()=>{let e=(0,W.D)(),t=(0,eg.al)(),a=(0,eV.GO)(),n=(0,f.a8)(),l=(0,r.useRef)(null),[i,c]=(0,r.useState)(!1),o=(0,r.useCallback)(()=>c(!1),[]),d=(0,r.useCallback)(()=>c(e=>!e),[]),u=(0,r.useMemo)(()=>({close:o}),[o]);(0,r.useEffect)(()=>{c(!1)},[n]),(0,r.useEffect)(()=>{if(!i)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[i]),(0,r.useEffect)(()=>{if(!i)return;let e=e=>{"Escape"===e.key&&o()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[i,o]);let m=(0,te.io)(300),x=a>0||i||m;return e&&t?(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(eh.m.div,{initial:!1,role:"banner",animate:{opacity:+!!x,y:x?0:-6},className:(0,ex.c)("fixed inset-x-0 top-0 z-[9] px-3.5 pt-2.5",!x&&"pointer-events-none"),transition:{duration:.35,ease:[.22,1,.36,1]},children:(0,s.jsxs)("div",{className:(0,ex.c)("rounded-[20px]","bg-[#fefefb] dark:bg-neutral-2","border border-black/5 dark:border-white/[0.04]","shadow-[0_1px_2px_rgba(0,0,0,0.04),0_4px_14px_rgba(0,0,0,0.06)]","dark:shadow-[0_1px_2px_rgba(0,0,0,0.15),0_4px_12px_rgba(0,0,0,0.1)]"),children:[(0,s.jsxs)("button",{"aria-expanded":i,className:"flex w-full items-center justify-between px-4 py-2.5",onClick:d,children:[(0,s.jsx)(tS,{}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(tz,{}),(0,s.jsx)("span",{className:"flex size-8 items-center justify-center text-neutral-5",children:(0,s.jsx)(tw,{isOpen:i})})]})]}),(0,s.jsx)(ey.N,{children:i&&(0,s.jsxs)(eh.m.div,{animate:{height:"auto",opacity:1},"aria-modal":"true",className:"overflow-hidden",exit:{height:0,opacity:0},initial:{height:0,opacity:0},ref:l,role:"dialog",transition:{duration:.25,ease:[.22,1,.36,1]},children:[(0,s.jsx)("div",{className:"mx-4 h-px bg-neutral-9/[0.05] dark:bg-white/[0.05]"}),(0,s.jsx)(tv,{value:u,children:(0,s.jsx)(tC,{})})]})})]})})}):null},tS=()=>{let e=(0,Z.pF)(e=>e.seo.title);return(0,s.jsx)("span",{className:"font-serif text-copy-15 tracking-[0.05em] text-neutral-8 dark:text-neutral-8",children:e})},tz=()=>{(0,k.c)("common");let e=(0,ep.pq)(),t=(0,tf.r8)(),a=(0,W.D)(),n=(0,Z.pF)(e=>e.user.name);return a?e?(0,s.jsx)("span",{className:"font-serif text-label-12 italic text-[rgba(168,144,106,0.85)] dark:text-[rgba(200,176,138,0.85)]",children:n}):t?(0,s.jsx)("span",{className:"font-serif text-label-12 italic text-neutral-6",children:t.name}):null:null};function tP(e){return(0,s.jsx)("svg",{fill:"none",height:"1em",viewBox:"0 0 24 24",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,s.jsx)("path",{d:"M11 15H7C4.79086 15 3 16.7909 3 19C3 20.1046 3.89543 21 5 21H15M16.8744 13C16.2164 13.4935 15.6221 14.066 15.1049 14.7043C15.035 14.7906 15 14.8953 15 15M16.8744 17C16.2164 16.5065 15.6221 15.934 15.1049 15.2957C15.035 15.2094 15 15.1047 15 15M15 15H21M15 7C15 9.20914 13.2091 11 11 11C8.79086 11 7 9.20914 7 7C7 4.79086 8.79086 3 11 3C13.2091 3 15 4.79086 15 7Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}var tD=a(56797),tF=a(19885);let tO=({ref:e,children:t,...a})=>{let n=(0,k.c)("common");return(0,s.jsx)("div",{role:"button",tabIndex:1,className:(0,eb.A)("group size-10 rounded-full bg-white dark:bg-neutral-1","px-3 text-copy-13 ring-1 ring-neutral-9/5 transition","center flex"),...a,"aria-label":n("aria_header_action"),ref:e,children:t})};tO.displayName="HeaderActionButton";var tL=a(48967);let tW=()=>
1{let e=(0,k.c)("common"),t=(0,Z.pF)(e=>e.user.avatar);return(0,s.jsxs)("div",{className:"pointer-events-auto relative flex items-center justify-center",children:[(0,s.jsx)(ez.default,{alt:e("aria_site_owner_avatar"),className:"rounded-full",height:36,src:t,width:36}),(0,s.jsx)(tL.z,{className:"absolute -bottom-1 right-0"})]})};function tK(){let e=(0,k.c)("common"),t=(0,ep.pq)(),a=(0,W.D)(),n=(0,tf.r8)(),l=(0,eg.al)(),i=(0,eV.GO)(),c=(0,t_.mP)(),o=(0,t_.l8)();return a?(0,s.jsx)(ey.N,{children:(0,s.jsx)("div",{style:l&&void 0!==i?{opacity:i,visibility:0===i?"hidden":"visible"}:void 0,children:(0,s.jsxs)(tD.rI,{modal:!1,children:[(0,s.jsx)(tD.ty,{nativeButton:!1,openOnHover:!l,children:t?(0,s.jsx)(tW,{}):n?(0,s.jsx)(tQ,{}):c&&(0,s.jsx)(tO,{"aria-label":e("aria_login"),onClick:()=>{o()},children:(0,s.jsx)(tP,{className:"size-4"})})}),(n||t)&&(0,s.jsxs)(tD.SQ,{keepMounted:!0,align:"end",className:"relative flex max-w-[30ch] flex-col",positionMethod:"fixed",sideOffset:8,children:[n&&(0,s.jsxs)(r.Fragment,{children:[(0,s.jsxs)(tD.I,{children:[(0,s.jsx)(tD.lp,{className:"text-label-12 text-neutral-9/60",children:e("auth_account")}
1),(0,s.jsx)(tD.lp,{className:"min-w-0",children:(0,s.jsxs)("div",{className:"-mt-1 flex min-w-0 items-center gap-2",children:[(0,s.jsx)("img",{className:"size-8 rounded-full",src:n.image}),(0,s.jsxs)("div",{className:"min-w-0 max-w-40 leading-none",children:[(0,s.jsx)("div",{className:"truncate",children:n.name}),(0,s.jsx)(tF.O,{className:"min-w-0 truncate text-label-12 text-neutral-9/60",children:n?.handle?`@${n.handle}`:n?.email})]})]})})]}),(0,s.jsx)(tD.mB,{})]}),t&&(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)(tD._2,{icon:(0,s.jsx)("i",{className:"i-mingcute-dashboard-2-line size-4"}),onClick:()=>{let e=(0,I.hT)();e&&window.open(e,"_blank")},children:e("auth_console")}),(0,s.jsx)(tD.mB,{})]}),(0,s.jsx)(tD._2,{icon:(0,s.jsx)("i",{className:"i-mingcute-exit-line size-4"}),onClick:async()=>{await Q.uE.owner.logout().catch(()=>{}),await tk.y.signOut().then(e=>{e.data?.success&&window.location.reload()})},children:e("auth_logout")})]})]})})}):null}let tQ=()=>{let e=(0,tf.r8)();return(0,s.jsxs)("div",{className:"pointer-events-auto relative flex items-center justify-center",children:[(0,s.jsx)(ez.default,{alt:e.name,className:"rounded-full",height:36,src:e.image,width:36}),(0,s.jsx)(tL.z,{className:"absolute -bottom-1 right-0"})]})},tT=()=>(0,s.jsx)(o.t,{children:(0,s.jsx)(tx,{children:(0,s.jsx)(tR,{})})}),tR=(0,r.memo)(()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tI,{}),(0,s.jsx)(tj,{}),(0,s.jsx)("div",{"data-hide-print":!0,className:"yohaku-page-right-inset fixed top-0 z-[9] hidden h-[4.5rem] lg:inset-x-0 lg:block",children:(0,s.jsxs)("div",{className:(0,ex.c)("relative mx-auto grid h-full min-h-0 max-w-7xl grid-cols-[4.5rem_1fr_4.5rem] px-8","header--grid"),children:[(0,s.jsx)(eH,{children:(0,s.jsx)(eZ,{})}),(0,s.jsx)("div",{}),(0,s.jsx)("div",{className:"flex size-full items-center",children:(0,s.jsx)(tK,{})})]})})]}));tR.displayName="MemoedHeader";var tU=a(40099);let tq=()=>{let e=(0,tU.Ns)(),t=(0,tU.ym)(),a=(0,tU.lI)(),s=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let n=document.getElementById("root");n&&(s.current=n,n.dataset.readingMode=e?"true":"false",n.dataset.focusReading=t?"true":"false",n.dataset.immersiveReading=e&&t&&a?"true":"false")},[e,t,a]),null},tB=({children:e,footerConfig:t})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tT,{}),(0,s.jsx)(w,{children:e}),(0,s.jsx)(em,{footerConfig:t}),(0,s.jsxs)(g.Y,{children:[(0,s.jsx)(b,{}),(0,s.jsx)(y.rH,{}),(0,s.jsx)(tq,{})]})]});var tG=a(80188),tZ=a(37731),tV=a(61284);let tH=({locale:e,messages:t,data:a,children:r})=>{let l=a.theme.config.module?.openpanel;return(0,s.jsxs)(n.default,{locale:e,messages:t,timeZone:eo.vp,children:[(0,s.jsx)(d.Global,{}),(0,s.jsx)(u.W,{}),(0,s.jsx)(p,{}),(0,s.jsx)(m.MiSansLoader,{locale:e}),(0,s.jsx)(o.t,{children:(0,s.jsxs)(tV.M,{children:[l?.enable&&(0,s.jsx)(x,{apiUrl:l.url,clientId:l.id,trackOutgoingLinks:!0,trackScreenViews:!0}),(0,s.jsx)(Z.C8,{aggregationData:a,appConfig:a.theme.config}),(0,s.jsx)("div",{"data-theme":!0,id:"root",children:(0,s.jsx)(tB,{footerConfig:a.theme.footer,children:r})}),(0,s.jsx)(tG.D,{}),(0,s.jsx)(c,{}),(0,s.jsx)(j.M,{}),(0,s.jsx)("div",{className:"fixed inset-y-0 right-0 w-[var(--removed-body-scroll-bar-size)]"}),(0,s.jsx)(e9.RootPortal,{children:(0,s.jsx)(tZ.M,{})})]})})]})}},30283(){},36406(){}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.