import{_ as m}from"./preload-helper.BlTxHScW.js";import{j as e}from"./jsx-runtime.D_zvdyIk.js";import{r as a}from"./index.BIRwh3HZ.js";import{a as u}from"./site-config.CgQ_bxrG.js";import{a as x,g as f}from"./utils.D6Ui05B2.js";import"./_commonjsHelpers.CqkleIqs.js";import"./site.Deo0TYgJ.js";const t=u.twikoo;function g(){return e.jsxs("div",{className:"twikoo-skeleton animate-pulse space-y-4 px-4","aria-hidden":"true",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"size-10 shrink-0 rounded-full bg-muted"}),e.jsxs("div",{className:"flex flex-1 gap-2",children:[e.jsx("div",{className:"h-10 flex-1 rounded bg-muted"}),e.jsx("div",{className:"hidden h-10 flex-1 rounded bg-muted sm:block"}),e.jsx("div",{className:"hidden h-10 flex-1 rounded bg-muted sm:block"})]})]}),e.jsx("div",{className:"h-[150px] rounded bg-muted"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"size-6 rounded bg-muted"}),e.jsx("div",{className:"size-6 rounded bg-muted"})]}),e.jsx("div",{className:"h-9 w-16 rounded bg-muted"})]})]})}function k(){const s=a.useRef(null),[i,r]=a.useState(!0);return a.useEffect(()=>{if(!t||!s.current)return;const n=async()=>{if(!s.current)return;r(!0),s.current.innerHTML="";const o=x(window.location.pathname),{init:d}=await m(async()=>{const{init:l}=await import("./twikoo.nocss.DLRmkcD6.js").then(c=>c.t);return{init:l}},[]);s.current&&(await d({envId:t.envId,el:s.current,region:t.region,path:t.path??window.location.pathname,lang:t.lang??f(o)}),r(!1))};return n(),document.addEventListener("astro:page-load",n),()=>{document.removeEventListener("astro:page-load",n)}},[]),t?e.jsxs("div",{className:"px-4",children:[i&&e.jsx(g,{}),e.jsx("div",{ref:s,id:"tcomment",className:i?"hidden":void 0})]}):null}export{k as default};
