import{d as h,r as m,u as N,o as v,c as r,a as o,F as _,e as a,f as B,j as y,n as C,t as d}from"./vendor-nt8ldNfT.js";import{_ as x}from"./tailwind-Bkcu6GYy.js";const I=""+new URL("../签到.png",import.meta.url).href,F={class:"w-full p-4 flex flex-wrap justify-center gap-6 bg-base-100 shadow-md"},$={key:0,class:"loading loading-spinner text-primary"},z=["href"],q={key:0,class:"w-full flex flex-wrap justify-center gap-6 p-4 text-sm text-base-content bg-base-200 shadow-inner"},D={class:"flex items-center gap-1"},L={class:"flex items-center gap-1"},S={class:"flex items-center gap-1"},U={class:"flex items-center gap-1"},A=h({__name:"NavBar",setup(w){const c=m([]),i=m(!0),n=m(null),l=N(),g=s=>location.pathname===s;function p(s){if(!s)return"";let e=s;for(let t=0;t<3;t++){const u=e.replace(/&amp;#/gi,"&#");if(u===e)break;e=u}return e=e.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#39;/g,"'").replace(/&amp;/gi,"&"),e=e.replace(/&#x([0-9a-fA-F]+);/g,(t,u)=>{try{const f=parseInt(u,16);return f?String.fromCodePoint(f):t}catch{return t}}),e=e.replace(/&#(\d+);/g,(t,u)=>{try{const f=parseInt(u,10);return f?String.fromCodePoint(f):t}catch{return t}}),e}const b=async()=>{try{const e=await(await fetch("/xiadan.html?qiandao=签到")).json();e.status===200?l.success(e.msg||"签到成功！"):l.warning(e.msg||"签到失败！")}catch{l.error("签到请求失败")}},j=async()=>{try{const e=await(await fetch("/Navigationquery")).json();e.status===200&&(c.value=e.data||[])}catch(s){console.error("导航加载失败",s)}finally{i.value=!1}},k=async()=>{try{const e=await(await fetch("/api/navigation/data")).json();if(e.status===200){const t=e.data||{};n.value={name:p(t.name||""),sid:p(t.sid||""),jinbi:p(t.jinbi||""),zaixian:p(t.zaixian||"")}}}catch(s){console.error("用户数据加载失败",s)}};return v(()=>{j(),k()}),(s,e)=>(o(),r(_,null,[a("nav",F,[i.value?(o(),r("span",$)):(o(),r(_,{key:1},[(o(!0),r(_,null,y(c.value,t=>(o(),r("a",{key:t.daohangurl,href:t.daohangurl,class:C(["text-lg font-bold transition-all",{"underline underline-offset-4 decoration-primary":g(t.daohangurl)}])},d(t.daohangming),11,z))),128)),a("button",{onClick:b,class:"ml-4 flex items-center justify-center gap-1 hover:scale-110 transition-transform",title:"每日签到"},e[0]||(e[0]=[a("img",{src:I,alt:"签到",class:"w-8 h-8 inline-block"},null,-1),a("span",{class:"text-sm font-medium"},"我要签到",-1)]))],64))]),n.value?(o(),r("div",q,[a("div",D,[a("span",null,d(n.value.name),1)]),a("div",L,[a("span",null,d(n.value.sid),1)]),a("div",S,[a("span",null,d(n.value.jinbi),1)]),a("div",U,[a("span",null,d(n.value.zaixian),1)])])):B("",!0)],64))}}),G=x(A,[["__scopeId","data-v-e3271cf0"]]),E={class:"fixed bottom-0 w-full bg-base-200 bg-opacity-80 text-center py-1 shadow-md"},J={key:0,class:"flex justify-center items-center gap-3"},M=["href"],P=["src"],R={key:1,class:"h-1"},V=h({__name:"FooterBar",setup(w){const c=m([]);return v(async()=>{try{const n=await(await fetch("/api/footer")).json();n.status===200&&n.data&&(c.value=n.data)}catch(i){console.error("页脚加载失败",i)}}),(i,n)=>(o(),r("footer",E,[c.value.length>0?(o(),r("div",J,[(o(!0),r(_,null,y(c.value,(l,g)=>(o(),r("a",{key:g,href:l.JumpURL,target:"_blank",rel:"noopener noreferrer",class:"inline-flex items-center justify-center"},[a("img",{src:l.Jumpimg,alt:"footer-icon",class:"h-12 w-auto object-contain"},null,8,P)],8,M))),128))])):(o(),r("div",R))]))}}),K=x(V,[["__scopeId","data-v-a7379620"]]);export{K as F,G as N};
