import{d as F,H as T,S as X,b as V,e as f,q as K,w as u,j as w,k as s,bk as d,f as R,A as I,_ as N,y as q,Z as S,c as Q,E as j,r as ue,F as ee,u as te,x as A,h as L,a9 as we,s as oe,l as ve,am as ye}from"./@vue-CQsYufSu.js";import{c as be,a as ke,u as ce,b as Le}from"./vue-router-zwGLnBy5.js";import{c as Te,u as W}from"./vuex-DNAxYlmG.js";import{a as Pe}from"./axios-Bo0ATomq.js";import{_ as Me,N as Ae,a as pe,b as de,c as Re,d as Ee,e as me,f as Oe,g as Ce,h as he,i as Se,j as z,k as Ie,u as Ue,l as $e,m as De,n as xe,o as Ne,p as qe,q as Ke,r as ze,s as Fe,t as Ve}from"./naive-ui-DNcWoFGl.js";import{h as U}from"./moment-BqTRGcJI.js";import{S as We,M as Be,L as He,C as Ye,B as je,P as Qe,W as Ze,a as Ge,H as re,b as se,c as ne}from"./@vicons-C3A8jsfr.js";/* empty css */import"./seemly-B7f2tHrf.js";import"./vueuc-CbQ6ZCvR.js";import"./evtd-CI_DDEu_.js";import"./@css-render-CQdyXCYJ.js";import"./vooks-BQzJqMzq.js";import"./vdirs-DL8EOfHr.js";import"./@juggle-C8OzoCMD.js";import"./css-render-Ct37b3-v.js";import"./@emotion-WldOFDRm.js";import"./lodash-es-i05dkx59.js";import"./treemate-HRdUPn5m.js";import"./async-validator-DKvM95Vc.js";import"./date-fns-x7VUUoCw.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))_(n);new MutationObserver(n=>{for(const c of n)if(c.type==="childList")for(const l of c.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&_(l)}).observe(document,{childList:!0,subtree:!0});function r(n){const c={};return n.integrity&&(c.integrity=n.integrity),n.referrerPolicy&&(c.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?c.credentials="include":n.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function _(n){if(n.ep)return;n.ep=!0;const c=r(n);fetch(n.href,c)}})();const Je="modulepreload",Xe=function(e){return"/"+e},ae={},M=function(t,r,_){let n=Promise.resolve();if(r&&r.length>0){const c=document.getElementsByTagName("link");n=Promise.all(r.map(l=>{if(l=Xe(l),l in ae)return;ae[l]=!0;const P=l.endsWith(".css"),k=P?'[rel="stylesheet"]':"";if(!!_)for(let i=c.length-1;i>=0;i--){const v=c[i];if(v.href===l&&(!P||v.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${k}`))return;const m=document.createElement("link");if(m.rel=P?"stylesheet":Je,P||(m.as="script",m.crossOrigin=""),m.href=l,document.head.appendChild(m),P)return new Promise((i,v)=>{m.addEventListener("load",i),m.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${l}`)))})}))}return n.then(()=>t()).catch(c=>{const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=c,window.dispatchEvent(l),!l.defaultPrevented)throw c})},et=[{path:"/",name:"home",meta:{title:"广场",keepAlive:!0},component:()=>M(()=>import("./Home-0ukNlDWW.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45]))},{path:"/post",name:"post",meta:{title:"泡泡详情"},component:()=>M(()=>import("./Post-qFQOJJiu.js"),__vite__mapDeps([46,4,25,34,22,2,3,5,6,7,8,9,10,11,12,13,14,15,16,21,23,24,26,31,32,33,28,18,19,27,29,35,36,37,38,42,43,47,45]))},{path:"/topic",name:"topic",meta:{title:"话题"},component:()=>M(()=>import("./Topic-rFad0zit.js"),__vite__mapDeps([48,22,4,2,3,5,6,7,8,9,10,11,12,13,14,15,16,35,25,26,36,42,43,49,45]))},{path:"/anouncement",name:"anouncement",meta:{title:"公告"},component:()=>M(()=>import("./Anouncement-BBExDZeq.js"),__vite__mapDeps([50,31,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,32,35,25,26,22,36,42,43,51,45]))},{path:"/profile",name:"profile",meta:{title:"主页"},component:()=>M(()=>import("./Profile-oanYBP0F.js"),__vite__mapDeps([52,18,4,2,3,5,6,7,8,9,10,11,12,13,14,15,16,19,20,21,22,23,24,25,26,27,28,29,30,31,32,35,36,53,37,38,42,43,54,45]))},{path:"/u",name:"user",meta:{title:"用户详情"},component:()=>M(()=>import("./User-BINZKVll.js"),__vite__mapDeps([55,20,21,4,22,2,3,5,6,7,8,9,10,11,12,13,14,15,16,23,24,25,26,27,28,29,30,31,32,18,19,35,36,1,17,53,37,38,42,43,56,45]))},{path:"/messages",name:"messages",meta:{title:"消息"},component:()=>M(()=>import("./Messages-pR9E7fXn.js"),__vite__mapDeps([57,4,25,26,22,2,3,5,6,7,8,9,10,11,12,13,14,15,16,18,19,35,36,37,38,42,43,58,45]))},{path:"/collection",name:"collection",meta:{title:"收藏"},component:()=>M(()=>import("./Collection-DdDm05Jj.js"),__vite__mapDeps([59,18,4,2,3,5,6,7,8,9,10,11,12,13,14,15,16,19,20,21,22,23,24,25,26,27,28,29,30,31,32,35,36,37,38,42,43,60,45]))},{path:"/contacts",name:"contacts",meta:{title:"好友"},component:()=>M(()=>import("./Contacts-BMe_G0jw.js"),__vite__mapDeps([61,18,4,2,3,5,6,7,8,9,10,11,12,13,14,15,16,19,22,31,32,35,25,26,36,37,38,42,43,62,45]))},{path:"/following",name:"following",meta:{title:"关注"},component:()=>M(()=>import("./Following-iHn0NcLi.js"),__vite__mapDeps([63,18,4,2,3,5,6,7,8,9,10,11,12,13,14,15,16,19,22,31,32,35,25,26,36,37,38,42,43,64,45]))},{path:"/wallet",name:"wallet",meta:{title:"钱包"},component:()=>M(()=>import("./Wallet-EQJ_rp0r.js"),__vite__mapDeps([65,31,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,32,35,25,26,22,36,66,67,68,42,43,69,45]))},{path:"/setting",name:"setting",meta:{title:"设置"},component:()=>M(()=>import("./Setting-C0pZ4LXF.js"),__vite__mapDeps([70,35,25,4,26,8,6,22,2,3,5,7,9,10,11,12,13,14,15,16,36,42,43,71,45]))},{path:"/404",name:"404",meta:{title:"404"},component:()=>M(()=>import("./404-jFEq1ucs.js"),__vite__mapDeps([72,35,25,4,26,8,6,22,2,3,5,7,9,10,11,12,13,14,15,16,36,42,43,73,45]))},{path:"/:pathMatch(.*)",redirect:"/404"}],_e=be({history:ke(),routes:et});_e.beforeEach((e,t,r)=>{document.title=`${e.meta.title} | 泡泡 - 一个清新文艺的微社区`,r()});const tt=Te({state:{refresh:Date.now(),refreshTopicFollow:Date.now(),theme:localStorage.getItem("PAOPAO_THEME"),collapsedLeft:document.body.clientWidth<=821,collapsedRight:document.body.clientWidth<=821,drawerModelShow:document.body.clientWidth<=821,desktopModelShow:document.body.clientWidth>821,authModalShow:!1,authModelTab:"signin",unreadMsgCount:0,userLogined:!1,userInfo:{id:0,username:"",nickname:"",created_on:0,follows:0,followings:0,tweets_count:0,is_admin:!1},profile:{useFriendship:!0,enableTrendsBar:!0,enableWallet:!1,allowTweetAttachment:!0,allowTweetAttachmentPrice:!0,allowTweetVideo:!0,allowUserRegister:!0,allowPhoneBind:!0,defaultTweetMaxLength:2e3,tweetWebEllipsisSize:400,tweetMobileEllipsisSize:300,defaultTweetVisibility:"friend",defaultMsgLoopInterval:5e3,copyrightTop:"2023 paopao.info",copyrightLeft:"Roc's Me",copyrightLeftLink:"",copyrightRight:"泡泡(PaoPao)开源社区",copyrightRightLink:"https://www.paopao.info"}},mutations:{refresh(e,t){e.refresh=t||Date.now()},refreshTopicFollow(e){e.refreshTopicFollow=Date.now()},updateUnreadMsgCount(e,t){e.unreadMsgCount=t},triggerTheme(e,t){e.theme=t},triggerAuth(e,t){e.authModalShow=t},triggerAuthKey(e,t){e.authModelTab=t},triggerCollapsedLeft(e,t){e.collapsedLeft=t,e.drawerModelShow=t,e.desktopModelShow=!t},triggerCollapsedRight(e,t){e.collapsedRight=t},updateUserinfo(e,t){e.userInfo=t,e.userInfo.id>0&&(e.userLogined=!0)},loadDefaultSiteProfile(e){e.profile.useFriendship="true".toLowerCase()==="true",e.profile.enableTrendsBar="false".toLowerCase()==="true",e.profile.enableWallet="false".toLocaleLowerCase()==="true",e.profile.allowTweetAttachment="true".toLowerCase()==="true",e.profile.allowTweetAttachmentPrice="false".toLowerCase()==="true",e.profile.allowTweetVideo="true".toLowerCase()==="true",e.profile.allowUserRegister="true".toLowerCase()==="true",e.profile.allowPhoneBind="true".toLowerCase()==="true",e.profile.defaultTweetMaxLength=2e3,e.profile.tweetWebEllipsisSize=400,e.profile.tweetMobileEllipsisSize=300,e.profile.defaultTweetVisibility="friend".toLowerCase(),e.profile.defaultMsgLoopInterval=5e3,e.profile.copyrightTop="2023 paopao.info",e.profile.copyrightLeft="Roc's Me",e.profile.copyrightLeftLink="",e.profile.copyrightRight="泡泡(PaoPao)开源社区",e.profile.copyrightRightLink="https://www.paopao.info"},updateSiteProfile(e,t){const r=e.profile;e.profile.useFriendship=t.use_friendship??r.useFriendship,e.profile.enableTrendsBar=t.enable_trends_bar??r.enableTrendsBar,e.profile.enableWallet=t.enable_wallet??r.enableWallet,e.profile.allowTweetAttachment=t.allow_tweet_attachment??r.allowTweetAttachment,e.profile.allowTweetAttachmentPrice=t.allow_tweet_attachment_price??r.allowTweetAttachmentPrice,e.profile.allowTweetVideo=t.allow_tweet_video??r.allowTweetVideo,e.profile.allowUserRegister=t.allow_user_register??r.allowUserRegister,e.profile.allowPhoneBind=t.allow_phone_bind??r.allowPhoneBind,e.profile.defaultTweetMaxLength=t.default_tweet_max_length??r.defaultTweetMaxLength,e.profile.tweetWebEllipsisSize=t.tweet_web_ellipsis_size??r.tweetWebEllipsisSize,e.profile.tweetMobileEllipsisSize=t.tweet_mobile_ellipsis_size??r.tweetMobileEllipsisSize,e.profile.defaultTweetVisibility=t.default_tweet_visibility??r.defaultTweetVisibility,e.profile.defaultMsgLoopInterval=t.default_msg_loop_interval??r.defaultMsgLoopInterval,e.profile.copyrightTop=t.copyright_top??r.copyrightTop,e.profile.copyrightLeft=t.copyright_left??r.copyrightLeft,e.profile.copyrightLeftLink=t.copyright_left_link??r.copyrightLeftLink,e.profile.copyrightRight=t.copyright_right??r.copyrightRight,e.profile.copyrightRightLink=t.copyright_right_link??r.copyrightRightLink},userLogout(e){localStorage.removeItem("PAOPAO_TOKEN"),e.userInfo={id:0,nickname:"",username:"",created_on:0,follows:0,followings:0,tweets_count:0,is_admin:!1},e.userLogined=!1}},actions:{},modules:{}}),Z=Pe.create({baseURL:"",timeout:3e4});Z.interceptors.request.use(e=>(localStorage.getItem("PAOPAO_TOKEN")&&(e.headers.Authorization="Bearer "+localStorage.getItem("PAOPAO_TOKEN")),e),e=>Promise.reject(e));Z.interceptors.response.use(e=>{const{data:t={},code:r=0}=(e==null?void 0:e.data)||{};if(+r==0)return t||{};Promise.reject((e==null?void 0:e.data)||{})},(e={})=>{var r;const{response:t={}}=e||{};return+(t==null?void 0:t.status)==401?(localStorage.removeItem("PAOPAO_TOKEN"),(t==null?void 0:t.data.code)!==10005?window.$message.warning((t==null?void 0:t.data.msg)||"鉴权失败"):window.$store.commit("triggerAuth",!0)):window.$message.error(((r=t==null?void 0:t.data)==null?void 0:r.msg)||"请求失败"),Promise.reject((t==null?void 0:t.data)||{})});function o(e){return Z(e)}const le=e=>o({method:"post",url:"/v1/auth/login",data:e}),ot=e=>o({method:"post",url:"/v1/auth/register",data:e}),Y=(e="")=>o({method:"get",url:"/v1/user/info",headers:{Authorization:`Bearer ${e}`}}),rt={class:"auth-wrap"},st={key:0},nt=F({__name:"auth",setup(e){const t=W(),r=T(!1),_=T(),n=X({username:"",password:""}),c=T(),l=X({username:"",password:"",repassword:""}),P={username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"},repassword:[{required:!0,message:"请输入密码"},{validator:(m,i)=>!!l.password&&l.password.startsWith(i)&&l.password.length>=i.length,message:"两次密码输入不一致",trigger:"input"}]},k=m=>{var i;m.preventDefault(),m.stopPropagation(),(i=_.value)==null||i.validate(v=>{v||(r.value=!0,le({username:n.username,password:n.password}).then(h=>{const b=(h==null?void 0:h.token)||"";return localStorage.setItem("PAOPAO_TOKEN",b),Y(b)}).then(h=>{window.$message.success("登录成功"),r.value=!1,t.commit("updateUserinfo",h),t.commit("triggerAuth",!1),t.commit("refresh"),n.username="",n.password=""}).catch(h=>{r.value=!1}))})},E=m=>{var i;m.preventDefault(),m.stopPropagation(),(i=c.value)==null||i.validate(v=>{v||(r.value=!0,ot({username:l.username,password:l.password}).then(h=>le({username:l.username,password:l.password})).then(h=>{const b=(h==null?void 0:h.token)||"";return localStorage.setItem("PAOPAO_TOKEN",b),Y(b)}).then(h=>{window.$message.success("注册成功"),r.value=!1,t.commit("updateUserinfo",h),t.commit("triggerAuth",!1),l.username="",l.password="",l.repassword=""}).catch(h=>{r.value=!1}))})};return V(()=>{const m=localStorage.getItem("PAOPAO_TOKEN")||"";m?Y(m).then(i=>{t.commit("updateUserinfo",i),t.commit("triggerAuth",!1)}).catch(i=>{t.commit("userLogout")}):t.commit("userLogout")}),(m,i)=>{const v=Me,h=Ae,b=pe,a=de,g=Re,D=Ee,$=me,x=Oe,p=Ce,O=he,B=Se;return f(),K(B,{show:d(t).state.authModalShow,"onUpdate:show":i[7]||(i[7]=y=>d(t).state.authModalShow=y),class:"auth-card",preset:"card",size:"small","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:u(()=>[w("div",rt,[s(O,{bordered:!1},{default:u(()=>[d(t).state.profile.allowUserRegister?S("",!0):(f(),R("div",st,[s(b,{justify:"center"},{default:u(()=>[s(h,null,{default:u(()=>[s(v,{type:"success"},{default:u(()=>[I("账号登录")]),_:1})]),_:1})]),_:1}),s(D,{ref_key:"loginRef",ref:_,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:u(()=>[s(g,{label:"账户",path:"username"},{default:u(()=>[s(a,{value:n.username,"onUpdate:value":i[0]||(i[0]=y=>n.username=y),placeholder:"请输入用户名",onKeyup:N(q(k,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(g,{label:"密码",path:"password"},{default:u(()=>[s(a,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":i[1]||(i[1]=y=>n.password=y),placeholder:"请输入账户密码",onKeyup:N(q(k,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s($,{type:"primary",block:"",secondary:"",strong:"",loading:r.value,onClick:k},{default:u(()=>[I(" 登录 ")]),_:1},8,["loading"])])),d(t).state.profile.allowUserRegister?(f(),K(p,{key:1,"default-value":d(t).state.authModelTab,size:"large","justify-content":"space-evenly"},{default:u(()=>[s(x,{name:"signin",tab:"登录"},{default:u(()=>[s(D,{ref_key:"loginRef",ref:_,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:u(()=>[s(g,{label:"账户",path:"username"},{default:u(()=>[s(a,{value:n.username,"onUpdate:value":i[2]||(i[2]=y=>n.username=y),placeholder:"请输入用户名",onKeyup:N(q(k,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(g,{label:"密码",path:"password"},{default:u(()=>[s(a,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":i[3]||(i[3]=y=>n.password=y),placeholder:"请输入账户密码",onKeyup:N(q(k,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s($,{type:"primary",block:"",secondary:"",strong:"",loading:r.value,onClick:k},{default:u(()=>[I(" 登录 ")]),_:1},8,["loading"])]),_:1}),s(x,{name:"signup",tab:"注册"},{default:u(()=>[s(D,{ref_key:"registerRef",ref:c,model:l,rules:P},{default:u(()=>[s(g,{label:"用户名",path:"username"},{default:u(()=>[s(a,{value:l.username,"onUpdate:value":i[4]||(i[4]=y=>l.username=y),placeholder:"用户名注册后无法修改"},null,8,["value"])]),_:1}),s(g,{label:"密码",path:"password"},{default:u(()=>[s(a,{type:"password","show-password-on":"mousedown",placeholder:"密码不少于6位",value:l.password,"onUpdate:value":i[5]||(i[5]=y=>l.password=y),onKeyup:N(q(E,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(g,{label:"重复密码",path:"repassword"},{default:u(()=>[s(a,{type:"password","show-password-on":"mousedown",placeholder:"请再次输入密码",value:l.repassword,"onUpdate:value":i[6]||(i[6]=y=>l.repassword=y),onKeyup:N(q(E,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s($,{type:"primary",block:"",secondary:"",strong:"",loading:r.value,onClick:E},{default:u(()=>[I(" 注册 ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["default-value"])):S("",!0)]),_:1})])]),_:1},8,["show"])}}}),fe=(e,t)=>{const r=e.__vccOpts||e;for(const[_,n]of t)r[_]=n;return r},at=fe(nt,[["__scopeId","data-v-6f778fc4"]]),no=e=>o({method:"get",url:"/v1/posts",params:e}),lt=e=>o({method:"get",url:"/v1/tags",params:e}),ao=e=>o({method:"get",url:"/v1/post",params:e}),lo=e=>o({method:"get",url:"/v1/post/star",params:e}),io=e=>o({method:"post",url:"/v1/post/star",data:e}),uo=e=>o({method:"get",url:"/v1/post/collection",params:e}),co=e=>o({method:"post",url:"/v1/post/collection",data:e}),po=e=>o({method:"get",url:"/v1/post/comments",params:e}),mo=e=>o({method:"get",url:"/v1/user/contacts",params:e}),ho=e=>o({method:"get",url:"/v1/trends/index",params:e}),_o=e=>o({method:"post",url:"/v1/post",data:e}),fo=e=>o({method:"delete",url:"/v1/post",data:e}),go=e=>o({method:"post",url:"/v1/post/lock",data:e}),wo=e=>o({method:"post",url:"/v1/post/stick",data:e}),vo=e=>o({method:"post",url:"/v1/post/highlight",data:e}),yo=e=>o({method:"post",url:"/v1/post/visibility",data:e}),bo=e=>o({method:"post",url:"/v1/tweet/comment/thumbsup",data:e}),ko=e=>o({method:"post",url:"/v1/tweet/comment/thumbsdown",data:e}),Lo=e=>o({method:"post",url:"/v1/tweet/reply/thumbsup",data:e}),To=e=>o({method:"post",url:"/v1/tweet/reply/thumbsdown",data:e}),Po=e=>o({method:"post",url:"/v1/post/comment",data:e}),Mo=e=>o({method:"delete",url:"/v1/post/comment",data:e}),Ao=e=>o({method:"post",url:"/v1/post/comment/highlight",data:e}),Ro=e=>o({method:"post",url:"/v1/post/comment/reply",data:e}),Eo=e=>o({method:"delete",url:"/v1/post/comment/reply",data:e}),Oo=e=>o({method:"post",url:"/v1/topic/stick",data:e}),Co=e=>o({method:"post",url:"/v1/topic/pin",data:e}),So=e=>o({method:"post",url:"/v1/topic/follow",data:e}),Io=e=>o({method:"post",url:"/v1/topic/unfollow",data:e}),Uo=(e={})=>o({method:"get",url:"/v1/captcha",params:e}),$o=e=>o({method:"post",url:"/v1/captcha",data:e}),Do=e=>o({method:"post",url:"/v1/user/whisper",data:e}),xo=e=>o({method:"post",url:"/v1/friend/requesting",data:e}),No=e=>o({method:"post",url:"/v1/friend/add",data:e}),qo=e=>o({method:"post",url:"/v1/user/follow",data:e}),Ko=e=>o({method:"post",url:"/v1/user/unfollow",data:e}),zo=e=>o({method:"get",url:"/v1/user/follows",params:e}),Fo=e=>o({method:"get",url:"/v1/user/followings",params:e}),Vo=e=>o({method:"post",url:"/v1/friend/reject",data:e}),Wo=e=>o({method:"post",url:"/v1/friend/delete",data:e}),Bo=e=>o({method:"post",url:"/v1/user/phone",data:e}),Ho=e=>o({method:"post",url:"/v1/user/activate",data:e}),Yo=e=>o({method:"post",url:"/v1/user/password",data:e}),jo=e=>o({method:"post",url:"/v1/user/nickname",data:e}),Qo=e=>o({method:"post",url:"/v1/user/avatar",data:e}),ie=(e={})=>o({method:"get",url:"/v1/user/msgcount/unread",params:e}),Zo=e=>o({method:"get",url:"/v1/user/messages",params:e}),Go=e=>o({method:"post",url:"/v1/user/message/read",data:e}),Jo=()=>o({method:"post",url:"/v1/user/message/readall"}),Xo=e=>o({method:"get",url:"/v1/user/collections",params:e}),er=e=>o({method:"get",url:"/v1/user/profile",params:e}),tr=e=>o({method:"get",url:"/v1/user/posts",params:e}),or=e=>o({method:"get",url:"/v1/user/wallet/bills",params:e}),rr=e=>o({method:"post",url:"/v1/user/recharge",data:e}),sr=e=>o({method:"get",url:"/v1/user/recharge",params:e}),nr=e=>o({method:"get",url:"/v1/suggest/users",params:e}),ar=e=>o({method:"get",url:"/v1/suggest/tags",params:e}),lr=e=>o({method:"get",url:"/v1/attachment/precheck",params:e}),ir=e=>o({method:"get",url:"/v1/attachment",params:e}),ur=e=>o({method:"post",url:"/v1/admin/user/status",data:e}),it=()=>o({method:"get",url:"/v1/admin/site/status"});U.locale("zh-cn");const ut=e=>U.unix(e).fromNow(),cr=e=>{let t=U.unix(e),r=U();return t.year()!=r.year()?t.utc(!0).format("YYYY-MM-DD HH:mm"):U().diff(t,"month")>3?t.utc(!0).format("MM-DD HH:mm"):t.fromNow()},pr=e=>{let t=U.unix(e),r=U();return t.year()!=r.year()?t.utc(!0).format("YYYY-MM-DD"):U().diff(t,"month")>3?t.utc(!0).format("MM-DD"):t.fromNow()},dr=e=>U.unix(e).utc(!0).format("YYYY年MM月"),ct={key:0,class:"rightbar-wrap"},pt={class:"search-wrap"},dt={class:"post-num"},mt={class:"post-num"},ht={class:"copyright"},_t=["href"],ft=["href"],gt={class:"site-info-item"},wt=F({__name:"rightbar",setup(e){const t=T([]),r=T([]),_=T(!1),n=T(""),c=W(),l=ce(),P=T(0),k=T(0),E=T(0),m=T(0),i=T(null),v=6,h=12,b=()=>{it().then(p=>{P.value=p.register_user_count,k.value=p.online_user_count,E.value=p.history_max_online,m.value=p.server_up_time}).catch(p=>{}),x.disconnect()},a=()=>{_.value=!0,lt({type:"hot_extral",num:h,extral_num:v}).then(p=>{t.value=p.topics,r.value=p.extral_topics??[],$.value=!0,_.value=!1}).catch(p=>{_.value=!1})},g=p=>p>=1e3?(p/1e3).toFixed(1)+"k":p,D=()=>{l.push({name:"home",query:{q:n.value}})},$=Q({get:()=>c.state.userLogined&&r.value.length!==0,set:p=>{}});j(()=>({refreshTopicFollow:c.state.refreshTopicFollow,userLogined:c.state.userLogined}),(p,O)=>{(p.refreshTopicFollow!==O.refreshTopicFollow||p.userLogined)&&a(),c.state.userInfo.is_admin&&b()});const x=new IntersectionObserver(p=>{p.forEach(O=>{O.isIntersecting&&b()})},{root:null,rootMargin:"0px",threshold:1});return V(()=>{i.value&&x.observe(i.value),a()}),(p,O)=>{const B=z,y=de,G=ue("router-link"),J=Ie,H=he,ge=pe;return d(c).state.collapsedRight?S("",!0):(f(),R("div",ct,[w("div",pt,[s(y,{round:"",clearable:"",placeholder:"搜一搜...",value:n.value,"onUpdate:value":O[0]||(O[0]=C=>n.value=C),onKeyup:N(q(D,["prevent"]),["enter"])},{prefix:u(()=>[s(B,{component:d(We)},null,8,["component"])]),_:1},8,["value","onKeyup"])]),$.value?(f(),K(H,{key:0,class:"hottopic-wrap",title:"关注话题",embedded:"",bordered:!1,size:"small"},{default:u(()=>[s(J,{show:_.value},{default:u(()=>[(f(!0),R(ee,null,te(r.value,C=>(f(),R("div",{class:"hot-tag-item",key:C.id},[s(G,{class:"hash-link",to:{name:"home",query:{q:C.tag,t:"tag"}}},{default:u(()=>[I(" #"+A(C.tag),1)]),_:2},1032,["to"]),w("div",dt,A(g(C.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1})):S("",!0),s(H,{class:"hottopic-wrap",title:"热门话题",embedded:"",bordered:!1,size:"small"},{default:u(()=>[s(J,{show:_.value},{default:u(()=>[(f(!0),R(ee,null,te(t.value,C=>(f(),R("div",{class:"hot-tag-item",key:C.id},[s(G,{class:"hash-link",to:{name:"home",query:{q:C.tag,t:"tag"}}},{default:u(()=>[I(" #"+A(C.tag),1)]),_:2},1032,["to"]),w("div",mt,A(g(C.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1}),s(H,{class:"copyright-wrap",embedded:"",bordered:!1,size:"small"},{default:u(()=>[w("div",ht,"© "+A(d(c).state.profile.copyrightTop),1),w("div",null,[s(ge,null,{default:u(()=>[w("a",{href:d(c).state.profile.copyrightLeftLink,target:"_blank",class:"hash-link"},A(d(c).state.profile.copyrightLeft),9,_t),w("a",{href:d(c).state.profile.copyrightRightLink,target:"_blank",class:"hash-link"},A(d(c).state.profile.copyrightRight),9,ft)]),_:1})])]),_:1}),d(c).state.userInfo.is_admin?(f(),R("div",{key:1,class:"site-info",ref_key:"userInfoElement",ref:i},[w("span",gt,A(P.value)+" 注册用户,"+A(k.value)+" 人在线,最高在线 "+A(E.value)+" 人,站点上线于 "+A(d(ut)(m.value)),1)],512)):S("",!0)]))}}}),vt=fe(wt,[["__scopeId","data-v-181f8063"]]),yt="/assets/logo-wT_OfKx5.png",bt={class:"sidebar-wrap"},kt={class:"logo-wrap"},Lt={key:0,class:"user-wrap"},Tt={class:"user-info"},Pt={class:"nickname"},Mt={class:"nickname-txt"},At={class:"username"},Rt={class:"user-mini-wrap"},Et={key:1,class:"user-wrap"},Ot={key:0,class:"login-only-wrap"},Ct={key:1,class:"login-wrap"},St=F({__name:"sidebar",setup(e){const t=W(),r=Le(),_=ce(),n=T(!1),c=T(r.name||""),l=T(),P="false".toLowerCase()==="true";j(r,()=>{c.value=r.name}),j(t.state,()=>{n.value=t.state.unreadMsgCount>0,t.state.userInfo.id>0?l.value||(ie().then(a=>{n.value=a.count>0,t.commit("updateUnreadMsgCount",a.count)}).catch(a=>{console.log(a)}),l.value=setInterval(()=>{ie().then(a=>{n.value=a.count>0,t.commit("updateUnreadMsgCount",a.count)}).catch(a=>{console.log(a)})},t.state.profile.defaultMsgLoopInterval)):l.value&&clearInterval(l.value)}),V(()=>{window.onresize=()=>{t.commit("triggerCollapsedLeft",document.body.clientWidth<=821),t.commit("triggerCollapsedRight",document.body.clientWidth<=821)}});const k=Q(()=>{const a=[{label:"广场",key:"home",icon:()=>L(re),href:"/"},{label:"话题",key:"topic",icon:()=>L(se),href:"/topic"}];return P&&a.push({label:"公告",key:"anouncement",icon:()=>L(Be),href:"/anouncement"}),a.push({label:"主页",key:"profile",icon:()=>L(He),href:"/profile"}),a.push({label:"消息",key:"messages",icon:()=>L(Ye),href:"/messages"}),a.push({label:"收藏",key:"collection",icon:()=>L(je),href:"/collection"}),t.state.profile.useFriendship&&a.push({label:"好友",key:"contacts",icon:()=>L(Qe),href:"/contacts"}),t.state.profile.enableWallet&&a.push({label:"钱包",key:"wallet",icon:()=>L(Ze),href:"/wallet"}),a.push({label:"设置",key:"setting",icon:()=>L(Ge),href:"/setting"}),t.state.userInfo.id>0?a:[{label:"广场",key:"home",icon:()=>L(re),href:"/"},{label:"话题",key:"topic",icon:()=>L(se),href:"/topic"}]}),E=a=>"href"in a?L("div",{},a.label):a.label,m=a=>a.key==="messages"?L($e,{dot:!0,show:n.value,processing:!0},{default:()=>L(z,{color:a.key===c.value?"var(--n-item-icon-color-active)":"var(--n-item-icon-color)"},{default:a.icon})}):L(z,null,{default:a.icon}),i=(a,g={})=>{c.value=a,_.push({name:a,query:{t:new Date().getTime()}})},v=()=>{r.path==="/"&&t.commit("refresh"),i("home")},h=a=>{t.commit("triggerAuth",!0),t.commit("triggerAuthKey",a)},b=()=>{t.commit("userLogout"),t.commit("refresh"),v()};return window.$store=t,window.$message=Ue(),(a,g)=>{const D=De,$=xe,x=Ne,p=me;return f(),R("div",bt,[w("div",kt,[s(D,{class:"logo-img",width:"36",src:d(yt),"preview-disabled":!0,onClick:v},null,8,["src"])]),s($,{accordion:!0,"icon-size":24,options:k.value,"render-label":E,"render-icon":m,value:c.value,"onUpdate:value":i},null,8,["options","value"]),d(t).state.userInfo.id>0?(f(),R("div",Lt,[s(x,{class:"user-avatar",round:"",size:34,src:d(t).state.userInfo.avatar},null,8,["src"]),w("div",Tt,[w("div",Pt,[w("span",Mt,A(d(t).state.userInfo.nickname),1),s(p,{class:"logout",quaternary:"",circle:"",size:"tiny",onClick:b},{icon:u(()=>[s(d(z),null,{default:u(()=>[s(d(ne))]),_:1})]),_:1})]),w("div",At,"@"+A(d(t).state.userInfo.username),1)]),w("div",Rt,[s(p,{class:"logout",quaternary:"",circle:"",onClick:b},{icon:u(()=>[s(d(z),{size:24},{default:u(()=>[s(d(ne))]),_:1})]),_:1})])])):(f(),R("div",Et,[d(t).state.profile.allowUserRegister?S("",!0):(f(),R("div",Ot,[s(p,{strong:"",secondary:"",round:"",type:"primary",onClick:g[0]||(g[0]=O=>h("signin"))},{default:u(()=>[I(" 登录 ")]),_:1})])),d(t).state.profile.allowUserRegister?(f(),R("div",Ct,[s(p,{strong:"",secondary:"",round:"",type:"primary",onClick:g[1]||(g[1]=O=>h("signin"))},{default:u(()=>[I(" 登录 ")]),_:1}),s(p,{strong:"",secondary:"",round:"",type:"info",onClick:g[2]||(g[2]=O=>h("signup"))},{default:u(()=>[I(" 注册 ")]),_:1})])):S("",!0)]))])}}}),It=()=>o({method:"get",url:"/v1/site/profile"}),Ut={"has-sider":"",class:"main-wrap",position:"static"},$t={key:0},Dt={class:"content-wrap"},xt=F({__name:"App",setup(e){const t=W(),r=Q(()=>t.state.theme==="dark"?Ke:null);function _(){t.commit("loadDefaultSiteProfile"),"true".toLowerCase()==="true"&&It().then(n=>{t.commit("updateSiteProfile",n)}).catch(n=>{console.log(n)})}return V(()=>{_()}),(n,c)=>{const l=St,P=ue("router-view"),k=vt,E=at,m=ze,i=Fe,v=Ve,h=qe;return f(),K(h,{theme:r.value},{default:u(()=>[s(i,null,{default:u(()=>[s(m,null,{default:u(()=>{var b;return[w("div",{class:ve(["app-container",{dark:((b=r.value)==null?void 0:b.name)==="dark",mobile:!d(t).state.desktopModelShow}])},[w("div",Ut,[d(t).state.desktopModelShow?(f(),R("div",$t,[s(l)])):S("",!0),w("div",Dt,[s(P,{class:"app-wrap"},{default:u(({Component:a})=>[(f(),K(we,null,[n.$route.meta.keepAlive?(f(),K(oe(a),{key:0})):S("",!0)],1024)),n.$route.meta.keepAlive?S("",!0):(f(),K(oe(a),{key:0}))]),_:1})]),s(k)]),s(E)],2)]}),_:1})]),_:1}),s(v)]),_:1},8,["theme"])}}});ye(xt).use(_e).use(tt).mount("#app");export{Fo as $,io as A,co as B,ao as C,po as D,yt as E,Oo as F,Co as G,Io as H,So as I,lt as J,ut as K,dr as L,er as M,ur as N,xo as O,No as P,Vo as Q,Go as R,Zo as S,Jo as T,Xo as U,pr as V,lr as W,ir as X,mo as Y,zo as Z,fe as _,ar as a,Do as a0,Y as a1,or as a2,rr as a3,sr as a4,Uo as a5,Qo as a6,Yo as a7,Bo as a8,Ho as a9,jo as aa,$o as ab,St as ac,ho as b,_o as c,no as d,tr as e,qo as f,nr as g,Wo as h,cr as i,To as j,Eo as k,bo as l,ko as m,Ro as n,Mo as o,Ao as p,Po as q,lo as r,uo as s,Lo as t,Ko as u,fo as v,go as w,wo as x,vo as y,yo as z}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = ["assets/Home-0ukNlDWW.js","assets/whisper-add-friend-CuQaAOYJ.js","assets/naive-ui-DNcWoFGl.js","assets/seemly-B7f2tHrf.js","assets/@vue-CQsYufSu.js","assets/vueuc-CbQ6ZCvR.js","assets/evtd-CI_DDEu_.js","assets/@css-render-CQdyXCYJ.js","assets/vooks-BQzJqMzq.js","assets/vdirs-DL8EOfHr.js","assets/@juggle-C8OzoCMD.js","assets/css-render-Ct37b3-v.js","assets/@emotion-WldOFDRm.js","assets/lodash-es-i05dkx59.js","assets/treemate-HRdUPn5m.js","assets/async-validator-DKvM95Vc.js","assets/date-fns-x7VUUoCw.js","assets/whisper-add-friend-BHdbaWOh.css","assets/whisper-DFhobfFF.js","assets/whisper-BRTlBWW_.css","assets/post-item.vue_vue_type_style_index_0_lang-Dfn2xguO.js","assets/content-BMjusBPS.js","assets/@vicons-C3A8jsfr.js","assets/paopao-video-player-DAi68TC5.js","assets/content-DBy8w6ml.css","assets/vuex-DNAxYlmG.js","assets/vue-router-zwGLnBy5.js","assets/copy-to-clipboard-CA7crPat.js","assets/@babel-Cpj98o6Y.js","assets/toggle-selection-BHUZwh74.js","assets/post-item-DBTlFgxm.css","assets/post-skeleton-YfJeD-2o.js","assets/post-skeleton-C1jKcoiQ.css","assets/lodash-YI8ZzHBK.js","assets/IEnum-B3rDUvtK.js","assets/main-nav.vue_vue_type_style_index_0_lang-DmAlkpQJ.js","assets/main-nav-J3fW308k.css","assets/v3-infinite-loading-DK6TzcZc.js","assets/v3-infinite-loading-BnjmmxFu.css","assets/@opentiny-BMB0hRxY.js","assets/vue-C5uo8kQw.js","assets/@opentiny-B9LeG2Mi.css","assets/axios-Bo0ATomq.js","assets/moment-BqTRGcJI.js","assets/Home-U0_yubfz.css","assets/vfonts-BlXx2pb-.css","assets/Post-qFQOJJiu.js","assets/Post-DVMMdt_w.css","assets/Topic-rFad0zit.js","assets/Topic-DRp1ytzc.css","assets/Anouncement-BBExDZeq.js","assets/Anouncement-D9-ntkc4.css","assets/Profile-oanYBP0F.js","assets/count-BK58UQ2M.js","assets/Profile-Dogk38nM.css","assets/User-BINZKVll.js","assets/User-CxGJqoyU.css","assets/Messages-pR9E7fXn.js","assets/Messages-CGktZWmD.css","assets/Collection-DdDm05Jj.js","assets/Collection-CzPqeCvY.css","assets/Contacts-BMe_G0jw.js","assets/Contacts-DmwRVG9U.css","assets/Following-iHn0NcLi.js","assets/Following-z-lhddd0.css","assets/Wallet-EQJ_rp0r.js","assets/qrcode-CGiDONbL.js","assets/encode-utf8-Cn5aGd7v.js","assets/dijkstrajs-D_NXgYpA.js","assets/Wallet-CBEfdMFS.css","assets/Setting-C0pZ4LXF.js","assets/Setting-D32M9eQI.css","assets/404-jFEq1ucs.js","assets/404-BDKIy91-.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) }