You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
paopao-ce/web/dist/assets/index-8d220080.js

2 lines
35 KiB

import{d as W,H as $,R as Z,b as G,e as w,q as D,w as r,j as y,k as s,f as R,A as S,Z as q,y as K,Y as U,bf as g,c as Q,E as j,r as le,F as J,u as X,x as I,h as k,a5 as he,s as ee,l as ge,ag as fe}from"./@vue-a481fc63.js";import{c as ve,a as we,u as ue,b as ye}from"./vue-router-e5a2430e.js";import{c as be,u as B}from"./vuex-44de225f.js";import{a as ke}from"./axios-4a70c6fc.js";import{_ as Pe,N as Le,a as ce,b as ie,c as Oe,d as Ae,e as de,f as Te,g as Ee,h as pe,i as Re,j as V,k as $e,u as Ce,l as Ie,m as Se,n as Ue,o as Me,p as qe,q as Ke,r as De,s as Ne,t as xe}from"./naive-ui-d8de3dda.js";import{S as Fe,M as Ve,L as ze,C as We,B as Be,P as He,W as je,a as Ge,H as te,b as oe,c as se}from"./@vicons-7a4ef312.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const n of c)if(n.type==="childList")for(const d of n.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function a(c){const n={};return c.integrity&&(n.integrity=c.integrity),c.referrerPolicy&&(n.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?n.credentials="include":c.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(c){if(c.ep)return;c.ep=!0;const n=a(c);fetch(c.href,n)}})();const Qe="modulepreload",Ye=function(e){return"/"+e},ne={},O=function(t,a,i){if(!a||a.length===0)return t();const c=document.getElementsByTagName("link");return Promise.all(a.map(n=>{if(n=Ye(n),n in ne)return;ne[n]=!0;const d=n.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(!!i)for(let b=c.length-1;b>=0;b--){const h=c[b];if(h.href===n&&(!d||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${p}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":Qe,d||(f.as="script",f.crossOrigin=""),f.href=n,document.head.appendChild(f),d)return new Promise((b,h)=>{f.addEventListener("load",b),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t()).catch(n=>{const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=n,window.dispatchEvent(d),!d.defaultPrevented)throw n})},Ze=[{path:"/",name:"home",meta:{title:"广场",keepAlive:!0},component:()=>O(()=>import("./Home-62c9b54d.js"),["assets/Home-62c9b54d.js","assets/whisper-f9793dd1.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-899852f8.js","assets/content-e3389a3a.js","assets/@vicons-7a4ef312.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-54a835d7.js","assets/post-skeleton-f1900002.css","assets/lodash-e0b37ac3.js","assets/IEnum-5453a777.js","assets/main-nav.vue_vue_type_style_index_0_lang-a402eae2.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/@opentiny-d73a2d67.js","assets/vue-1e3b54ec.js","assets/xss-a5544f63.js","assets/cssfilter-af71ba68.js","assets/@opentiny-0f942bd4.css","assets/axios-4a70c6fc.js","assets/Home-af58e3ca.css","assets/vfonts-7afd136d.css"])},{path:"/post",name:"post",meta:{title:"泡泡详情"},component:()=>O(()=>import("./Post-ed61910e.js"),["assets/Post-ed61910e.js","assets/@vue-a481fc63.js","assets/vuex-44de225f.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/IEnum-5453a777.js","assets/@vicons-7a4ef312.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/content-e3389a3a.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vue-router-e5a2430e.js","assets/post-skeleton-54a835d7.js","assets/post-skeleton-f1900002.css","assets/lodash-e0b37ac3.js","assets/@babel-725317a4.js","assets/whisper-f9793dd1.js","assets/whisper-61451957.css","assets/copy-to-clipboard-4ef7d3eb.js","assets/toggle-selection-93f4ad84.js","assets/main-nav.vue_vue_type_style_index_0_lang-a402eae2.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/Post-1ac7281c.css","assets/vfonts-7afd136d.css"])},{path:"/topic",name:"topic",meta:{title:"话题"},component:()=>O(()=>import("./Topic-0e4d12d8.js"),["assets/Topic-0e4d12d8.js","assets/@vicons-7a4ef312.js","assets/@vue-a481fc63.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-a402eae2.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Topic-384e019e.css","assets/vfonts-7afd136d.css"])},{path:"/anouncement",name:"anouncement",meta:{title:"公告"},component:()=>O(()=>import("./Anouncement-52f985c0.js"),["assets/Anouncement-52f985c0.js","assets/post-skeleton-54a835d7.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-a402eae2.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-7a4ef312.js","assets/main-nav-569a7b0c.css","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/axios-4a70c6fc.js","assets/Anouncement-662e2d95.css","assets/vfonts-7afd136d.css"])},{path:"/profile",name:"profile",meta:{title:"主页"},component:()=>O(()=>import("./Profile-6d9e62f3.js"),["assets/Profile-6d9e62f3.js","assets/whisper-f9793dd1.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-899852f8.js","assets/content-e3389a3a.js","assets/@vicons-7a4ef312.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-54a835d7.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-a402eae2.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/Profile-88292227.css","assets/vfonts-7afd136d.css"])},{path:"/u",name:"user",meta:{title:"用户详情"},component:()=>O(()=>import("./User-0e1e60bd.js"),["assets/User-0e1e60bd.js","assets/post-item.vue_vue_type_style_index_0_lang-899852f8.js","assets/content-e3389a3a.js","assets/@vue-a481fc63.js","assets/@vicons-7a4ef312.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-54a835d7.js","assets/post-skeleton-f1900002.css","assets/whisper-f9793dd1.js","assets/whisper-61451957.css","assets/main-nav.vue_vue_type_style_index_0_lang-a402eae2.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/User-e6eae837.css","assets/vfonts-7afd136d.css"])},{path:"/messages",name:"messages",meta:{title:"消息"},component:()=>O(()=>import("./Messages-e4d02674.js"),["assets/Messages-e4d02674.js","assets/@vue-a481fc63.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/@vicons-7a4ef312.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-f9793dd1.js","assets/whisper-61451957.css","assets/main-nav.vue_vue_type_style_index_0_lang-a402eae2.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Messages-3c6066fb.css","assets/vfonts-7afd136d.css"])},{path:"/collection",name:"collection",meta:{title:"收藏"},component:()=>O(()=>import("./Collection-619e8473.js"),["assets/Collection-619e8473.js","assets/whisper-f9793dd1.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-899852f8.js","assets/content-e3389a3a.js","assets/@vicons-7a4ef312.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-54a835d7.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-a402eae2.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Collection-5c3a44e2.css","assets/vfonts-7afd136d.css"])},{path:"/contacts",name:"contacts",meta:{title:"好友"},component:()=>O(()=>import("./Contacts-da926c71.js"),["assets/Contacts-da926c71.js","assets/whisper-f9793dd1.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/@vicons-7a4ef312.js","assets/post-skeleton-54a835d7.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-a402eae2.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Contacts-7fa3e0d6.css","assets/vfonts-7afd136d.css"])},{path:"/following",name:"following",meta:{title:"关注"},component:()=>O(()=>import("./Following-8e085d0b.js"),["assets/Following-8e085d0b.js","assets/whisper-f9793dd1.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/vue-router-e5a2430e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/@vicons-7a4ef312.js","assets/post-skeleton-54a835d7.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-a402eae2.js","assets/vuex-44de225f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Following-6aa7d36c.css","assets/vfonts-7afd136d.css"])},{path:"/wallet",name:"wallet",meta:{title:"钱包"},component:()=>O(()=>import("./Wallet-f3715a73.js"),["assets/Wallet-f3715a73.js","assets/post-skeleton-54a835d7.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-39372edb.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-a402eae2.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-7a4ef312.js","assets/main-nav-569a7b0c.css","assets/qrcode-9719fc56.js","assets/encode-utf8-f813de00.js","assets/dijkstrajs-f906a09e.js","assets/formatTime-4210fcd1.js","assets/moment-2ab8298d.js","assets/axios-4a70c6fc.js","assets/Wallet-77044929.css","assets/vfonts-7afd136d.css"])},{path:"/setting",name:"setting",meta:{title:"设置"},component:()=>O(()=>import("./Setting-42f80d67.js"),["assets/Setting-42f80d67.js","assets/main-nav.vue_vue_type_style_index_0_lang-a402eae2.js","assets/vuex-44de225f.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/vooks-6d99783e.js","assets/evtd-b614532e.js","assets/@vicons-7a4ef312.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/@css-render-7124a1a5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/Setting-bfd24152.css","assets/vfonts-7afd136d.css"])},{path:"/404",name:"404",meta:{title:"404"},component:()=>O(()=>import("./404-71d65ace.js"),["assets/404-71d65ace.js","assets/main-nav.vue_vue_type_style_index_0_lang-a402eae2.js","assets/vuex-44de225f.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/vooks-6d99783e.js","assets/evtd-b614532e.js","assets/@vicons-7a4ef312.js","assets/naive-ui-d8de3dda.js","assets/seemly-76b7b838.js","assets/vueuc-39372edb.js","assets/@css-render-7124a1a5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/404-020b2afd.css","assets/vfonts-7afd136d.css"])},{path:"/:pathMatch(.*)",redirect:"/404"}],me=ve({history:we(),routes:Ze});me.beforeEach((e,t,a)=>{document.title=`${e.meta.title} | 泡泡 - 一个清新文艺的微社区`,a()});const Je=be({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",userLogined:!1,userInfo:{id:0,username:"",nickname:"",created_on:0,follows:0,followings:0}},mutations:{refresh(e,t){e.refresh=t||Date.now()},refreshTopicFollow(e){e.refreshTopicFollow=Date.now()},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)},userLogout(e){localStorage.removeItem("PAOPAO_TOKEN"),e.userInfo={id:0,nickname:"",username:"",created_on:0,follows:0,followings:0},e.userLogined=!1}},actions:{},modules:{}}),Y=ke.create({baseURL:"",timeout:3e4});Y.interceptors.request.use(e=>(localStorage.getItem("PAOPAO_TOKEN")&&(e.headers.Authorization="Bearer "+localStorage.getItem("PAOPAO_TOKEN")),e),e=>Promise.reject(e));Y.interceptors.response.use(e=>{const{data:t={},code:a=0}=(e==null?void 0:e.data)||{};if(+a==0)return t||{};Promise.reject((e==null?void 0:e.data)||{})},(e={})=>{var a;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(((a=t==null?void 0:t.data)==null?void 0:a.msg)||"请求失败"),Promise.reject((t==null?void 0:t.data)||{})});function o(e){return Y(e)}const re=e=>o({method:"post",url:"/v1/auth/login",data:e}),Xe=e=>o({method:"post",url:"/v1/auth/register",data:e}),H=(e="")=>o({method:"get",url:"/v1/user/info",headers:{Authorization:`Bearer ${e}`}}),et={class:"auth-wrap"},tt={key:0},ot=W({__name:"auth",setup(e){const t=$("true".toLowerCase()==="true"),a=B(),i=$(!1),c=$(),n=Z({username:"",password:""}),d=$(),p=Z({username:"",password:"",repassword:""}),M={username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"},repassword:[{required:!0,message:"请输入密码"},{validator:(h,u)=>!!p.password&&p.password.startsWith(u)&&p.password.length>=u.length,message:"两次密码输入不一致",trigger:"input"}]},f=h=>{var u;h.preventDefault(),h.stopPropagation(),(u=c.value)==null||u.validate(A=>{A||(i.value=!0,re({username:n.username,password:n.password}).then(_=>{const L=(_==null?void 0:_.token)||"";return localStorage.setItem("PAOPAO_TOKEN",L),H(L)}).then(_=>{window.$message.success("登录成功"),i.value=!1,a.commit("updateUserinfo",_),a.commit("triggerAuth",!1),a.commit("refresh"),n.username="",n.password=""}).catch(_=>{i.value=!1}))})},b=h=>{var u;h.preventDefault(),h.stopPropagation(),(u=d.value)==null||u.validate(A=>{A||(i.value=!0,Xe({username:p.username,password:p.password}).then(_=>re({username:p.username,password:p.password})).then(_=>{const L=(_==null?void 0:_.token)||"";return localStorage.setItem("PAOPAO_TOKEN",L),H(L)}).then(_=>{window.$message.success("注册成功"),i.value=!1,a.commit("updateUserinfo",_),a.commit("triggerAuth",!1),p.username="",p.password="",p.repassword=""}).catch(_=>{i.value=!1}))})};return G(()=>{const h=localStorage.getItem("PAOPAO_TOKEN")||"";h?H(h).then(u=>{a.commit("updateUserinfo",u),a.commit("triggerAuth",!1)}).catch(u=>{a.commit("userLogout")}):a.commit("userLogout")}),(h,u)=>{const A=Pe,_=Le,L=ce,T=ie,P=Oe,v=Ae,l=de,E=Te,F=Ee,N=pe,x=Re;return w(),D(x,{show:g(a).state.authModalShow,"onUpdate:show":u[7]||(u[7]=m=>g(a).state.authModalShow=m),class:"auth-card",preset:"card",size:"small","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:r(()=>[y("div",et,[s(N,{bordered:!1},{default:r(()=>[t.value?U("",!0):(w(),R("div",tt,[s(L,{justify:"center"},{default:r(()=>[s(_,null,{default:r(()=>[s(A,{type:"success"},{default:r(()=>[S("账号登录")]),_:1})]),_:1})]),_:1}),s(v,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:r(()=>[s(P,{label:"账户",path:"username"},{default:r(()=>[s(T,{value:n.username,"onUpdate:value":u[0]||(u[0]=m=>n.username=m),placeholder:"请输入用户名",onKeyup:q(K(f,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(P,{label:"密码",path:"password"},{default:r(()=>[s(T,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[1]||(u[1]=m=>n.password=m),placeholder:"请输入账户密码",onKeyup:q(K(f,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:f},{default:r(()=>[S(" 登录 ")]),_:1},8,["loading"])])),t.value?(w(),D(F,{key:1,"default-value":g(a).state.authModelTab,size:"large","justify-content":"space-evenly"},{default:r(()=>[s(E,{name:"signin",tab:"登录"},{default:r(()=>[s(v,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:r(()=>[s(P,{label:"账户",path:"username"},{default:r(()=>[s(T,{value:n.username,"onUpdate:value":u[2]||(u[2]=m=>n.username=m),placeholder:"请输入用户名",onKeyup:q(K(f,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(P,{label:"密码",path:"password"},{default:r(()=>[s(T,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[3]||(u[3]=m=>n.password=m),placeholder:"请输入账户密码",onKeyup:q(K(f,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:f},{default:r(()=>[S(" 登录 ")]),_:1},8,["loading"])]),_:1}),s(E,{name:"signup",tab:"注册"},{default:r(()=>[s(v,{ref_key:"registerRef",ref:d,model:p,rules:M},{default:r(()=>[s(P,{label:"用户名",path:"username"},{default:r(()=>[s(T,{value:p.username,"onUpdate:value":u[4]||(u[4]=m=>p.username=m),placeholder:"用户名注册后无法修改"},null,8,["value"])]),_:1}),s(P,{label:"密码",path:"password"},{default:r(()=>[s(T,{type:"password","show-password-on":"mousedown",placeholder:"密码不少于6位",value:p.password,"onUpdate:value":u[5]||(u[5]=m=>p.password=m),onKeyup:q(K(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(P,{label:"重复密码",path:"repassword"},{default:r(()=>[s(T,{type:"password","show-password-on":"mousedown",placeholder:"请再次输入密码",value:p.repassword,"onUpdate:value":u[6]||(u[6]=m=>p.repassword=m),onKeyup:q(K(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s(l,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:b},{default:r(()=>[S(" 注册 ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["default-value"])):U("",!0)]),_:1})])]),_:1},8,["show"])}}});const _e=(e,t)=>{const a=e.__vccOpts||e;for(const[i,c]of t)a[i]=c;return a},st=_e(ot,[["__scopeId","data-v-053dfa44"]]),Zt=e=>o({method:"get",url:"/v1/posts",params:e}),nt=e=>o({method:"get",url:"/v1/tags",params:e}),Jt=e=>o({method:"get",url:"/v1/post",params:e}),Xt=e=>o({method:"get",url:"/v1/post/star",params:e}),eo=e=>o({method:"post",url:"/v1/post/star",data:e}),to=e=>o({method:"get",url:"/v1/post/collection",params:e}),oo=e=>o({method:"post",url:"/v1/post/collection",data:e}),so=e=>o({method:"get",url:"/v1/post/comments",params:e}),no=e=>o({method:"get",url:"/v1/user/contacts",params:e}),ro=e=>o({method:"post",url:"/v1/post",data:e}),ao=e=>o({method:"delete",url:"/v1/post",data:e}),lo=e=>o({method:"post",url:"/v1/post/lock",data:e}),uo=e=>o({method:"post",url:"/v1/post/stick",data:e}),co=e=>o({method:"post",url:"/v1/post/highlight",data:e}),io=e=>o({method:"post",url:"/v1/post/visibility",data:e}),po=e=>o({method:"post",url:"/v1/tweet/comment/thumbsup",data:e}),mo=e=>o({method:"post",url:"/v1/tweet/comment/thumbsdown",data:e}),_o=e=>o({method:"post",url:"/v1/tweet/reply/thumbsup",data:e}),ho=e=>o({method:"post",url:"/v1/tweet/reply/thumbsdown",data:e}),go=e=>o({method:"post",url:"/v1/post/comment",data:e}),fo=e=>o({method:"delete",url:"/v1/post/comment",data:e}),vo=e=>o({method:"post",url:"/v1/post/comment/reply",data:e}),wo=e=>o({method:"delete",url:"/v1/post/comment/reply",data:e}),yo=e=>o({method:"post",url:"/v1/topic/stick",data:e}),bo=e=>o({method:"post",url:"/v1/topic/follow",data:e}),ko=e=>o({method:"post",url:"/v1/topic/unfollow",data:e}),rt={key:0,class:"rightbar-wrap"},at={class:"search-wrap"},lt={class:"post-num"},ut={class:"post-num"},ct={class:"copyright"},it=["href"],dt=["href"],pt=W({__name:"rightbar",setup(e){const t=$([]),a=$([]),i=$(!1),c=$(""),n=B(),d=ue(),p="2023 paopao.info",M="Roc's Me",f="",b="泡泡(PaoPao)开源社区",h="https://www.paopao.info",u=+"6",A=+"12",_=()=>{i.value=!0,nt({type:"hot_extral",num:A,extral_num:u}).then(v=>{t.value=v.topics,a.value=v.extral_topics??[],P.value=!0,i.value=!1}).catch(v=>{i.value=!1})},L=v=>v>=1e3?(v/1e3).toFixed(1)+"k":v,T=()=>{d.push({name:"home",query:{q:c.value}})},P=Q({get:()=>n.state.userLogined&&a.value.length!==0,set:v=>{}});return j(()=>({refreshTopicFollow:n.state.refreshTopicFollow,userLogined:n.state.userLogined}),(v,l)=>{(v.refreshTopicFollow!==l.refreshTopicFollow||v.userLogined)&&_()}),G(()=>{_()}),(v,l)=>{const E=V,F=ie,N=le("router-link"),x=$e,m=pe,z=ce;return g(n).state.collapsedRight?U("",!0):(w(),R("div",rt,[y("div",at,[s(F,{round:"",clearable:"",placeholder:"搜一搜...",value:c.value,"onUpdate:value":l[0]||(l[0]=C=>c.value=C),onKeyup:q(K(T,["prevent"]),["enter"])},{prefix:r(()=>[s(E,{component:g(Fe)},null,8,["component"])]),_:1},8,["value","onKeyup"])]),P.value?(w(),D(m,{key:0,class:"hottopic-wrap",title:"关注话题",embedded:"",bordered:!1,size:"small"},{default:r(()=>[s(x,{show:i.value},{default:r(()=>[(w(!0),R(J,null,X(a.value,C=>(w(),R("div",{class:"hot-tag-item",key:C.id},[s(N,{class:"hash-link",to:{name:"home",query:{q:C.tag,t:"tag"}}},{default:r(()=>[S(" #"+I(C.tag),1)]),_:2},1032,["to"]),y("div",lt,I(L(C.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1})):U("",!0),s(m,{class:"hottopic-wrap",title:"热门话题",embedded:"",bordered:!1,size:"small"},{default:r(()=>[s(x,{show:i.value},{default:r(()=>[(w(!0),R(J,null,X(t.value,C=>(w(),R("div",{class:"hot-tag-item",key:C.id},[s(N,{class:"hash-link",to:{name:"home",query:{q:C.tag,t:"tag"}}},{default:r(()=>[S(" #"+I(C.tag),1)]),_:2},1032,["to"]),y("div",ut,I(L(C.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1}),s(m,{class:"copyright-wrap",embedded:"",bordered:!1,size:"small"},{default:r(()=>[y("div",ct,"© "+I(g(p)),1),y("div",null,[s(z,null,{default:r(()=>[y("a",{href:g(f),target:"_blank",class:"hash-link"},I(g(M)),9,it),y("a",{href:g(h),target:"_blank",class:"hash-link"},I(g(b)),9,dt)]),_:1})])]),_:1})]))}}});const mt=_e(pt,[["__scopeId","data-v-52b86ac0"]]),Po=(e={})=>o({method:"get",url:"/v1/captcha",params:e}),Lo=e=>o({method:"post",url:"/v1/captcha",data:e}),Oo=e=>o({method:"post",url:"/v1/user/whisper",data:e}),Ao=e=>o({method:"post",url:"/v1/friend/requesting",data:e}),To=e=>o({method:"post",url:"/v1/friend/add",data:e}),Eo=e=>o({method:"post",url:"/v1/user/follow",data:e}),Ro=e=>o({method:"post",url:"/v1/user/unfollow",data:e}),$o=e=>o({method:"get",url:"/v1/user/follows",params:e}),Co=e=>o({method:"get",url:"/v1/user/followings",params:e}),Io=e=>o({method:"post",url:"/v1/friend/reject",data:e}),So=e=>o({method:"post",url:"/v1/friend/delete",data:e}),Uo=e=>o({method:"post",url:"/v1/user/phone",data:e}),Mo=e=>o({method:"post",url:"/v1/user/activate",data:e}),qo=e=>o({method:"post",url:"/v1/user/password",data:e}),Ko=e=>o({method:"post",url:"/v1/user/nickname",data:e}),Do=e=>o({method:"post",url:"/v1/user/avatar",data:e}),ae=(e={})=>o({method:"get",url:"/v1/user/msgcount/unread",params:e}),No=e=>o({method:"get",url:"/v1/user/messages",params:e}),xo=e=>o({method:"post",url:"/v1/user/message/read",data:e}),Fo=e=>o({method:"get",url:"/v1/user/collections",params:e}),Vo=e=>o({method:"get",url:"/v1/user/profile",params:e}),zo=e=>o({method:"get",url:"/v1/user/posts",params:e}),Wo=e=>o({method:"get",url:"/v1/user/wallet/bills",params:e}),Bo=e=>o({method:"post",url:"/v1/user/recharge",data:e}),Ho=e=>o({method:"get",url:"/v1/user/recharge",params:e}),jo=e=>o({method:"get",url:"/v1/suggest/users",params:e}),Go=e=>o({method:"get",url:"/v1/suggest/tags",params:e}),Qo=e=>o({method:"get",url:"/v1/attachment/precheck",params:e}),Yo=e=>o({method:"get",url:"/v1/attachment",params:e}),Zo=e=>o({method:"post",url:"/v1/admin/user/status",data:e}),_t="/assets/logo-52afee68.png",ht={class:"sidebar-wrap"},gt={class:"logo-wrap"},ft={key:0,class:"user-wrap"},vt={class:"user-info"},wt={class:"nickname"},yt={class:"nickname-txt"},bt={class:"username"},kt={class:"user-mini-wrap"},Pt={key:1,class:"user-wrap"},Lt={key:0,class:"login-only-wrap"},Ot={key:1,class:"login-wrap"},At=W({__name:"sidebar",setup(e){const t=B(),a=ye(),i=ue(),c=$(!1),n=$(a.name||""),d=$(),p="true".toLowerCase()==="true",M="false".toLowerCase()==="true",f="false".toLocaleLowerCase()==="true",b=$("true".toLowerCase()==="true"),h=+"5000";j(a,()=>{n.value=a.name}),j(t.state,()=>{t.state.userInfo.id>0?d.value||(ae().then(l=>{c.value=l.count>0}).catch(l=>{console.log(l)}),d.value=setInterval(()=>{ae().then(l=>{c.value=l.count>0}).catch(l=>{console.log(l)})},h)):d.value&&clearInterval(d.value)}),G(()=>{window.onresize=()=>{t.commit("triggerCollapsedLeft",document.body.clientWidth<=821),t.commit("triggerCollapsedRight",document.body.clientWidth<=821)}});const u=Q(()=>{const l=[{label:"广场",key:"home",icon:()=>k(te),href:"/"},{label:"话题",key:"topic",icon:()=>k(oe),href:"/topic"}];return M&&l.push({label:"公告",key:"anouncement",icon:()=>k(Ve),href:"/anouncement"}),l.push({label:"主页",key:"profile",icon:()=>k(ze),href:"/profile"}),l.push({label:"消息",key:"messages",icon:()=>k(We),href:"/messages"}),l.push({label:"收藏",key:"collection",icon:()=>k(Be),href:"/collection"}),p&&l.push({label:"好友",key:"contacts",icon:()=>k(He),href:"/contacts"}),f&&l.push({label:"钱包",key:"wallet",icon:()=>k(je),href:"/wallet"}),l.push({label:"设置",key:"setting",icon:()=>k(Ge),href:"/setting"}),t.state.userInfo.id>0?l:[{label:"广场",key:"home",icon:()=>k(te),href:"/"},{label:"话题",key:"topic",icon:()=>k(oe),href:"/topic"}]}),A=l=>"href"in l?k("div",{},l.label):l.label,_=l=>l.key==="messages"?k(Ie,{dot:!0,show:c.value,processing:!0},{default:()=>k(V,{color:l.key===n.value?"var(--n-item-icon-color-active)":"var(--n-item-icon-color)"},{default:l.icon})}):k(V,null,{default:l.icon}),L=(l,E={})=>{n.value=l,i.push({name:l,query:{t:new Date().getTime()}})},T=()=>{a.path==="/"&&t.commit("refresh"),L("home")},P=l=>{t.commit("triggerAuth",!0),t.commit("triggerAuthKey",l)},v=()=>{t.commit("userLogout"),t.commit("refresh"),T()};return window.$store=t,window.$message=Ce(),(l,E)=>{const F=Se,N=Ue,x=Me,m=de;return w(),R("div",ht,[y("div",gt,[s(F,{class:"logo-img",width:"36",src:g(_t),"preview-disabled":!0,onClick:T},null,8,["src"])]),s(N,{accordion:!0,"icon-size":24,options:u.value,"render-label":A,"render-icon":_,value:n.value,"onUpdate:value":L},null,8,["options","value"]),g(t).state.userInfo.id>0?(w(),R("div",ft,[s(x,{class:"user-avatar",round:"",size:34,src:g(t).state.userInfo.avatar},null,8,["src"]),y("div",vt,[y("div",wt,[y("span",yt,I(g(t).state.userInfo.nickname),1),s(m,{class:"logout",quaternary:"",circle:"",size:"tiny",onClick:v},{icon:r(()=>[s(g(V),null,{default:r(()=>[s(g(se))]),_:1})]),_:1})]),y("div",bt,"@"+I(g(t).state.userInfo.username),1)]),y("div",kt,[s(m,{class:"logout",quaternary:"",circle:"",onClick:v},{icon:r(()=>[s(g(V),{size:24},{default:r(()=>[s(g(se))]),_:1})]),_:1})])])):(w(),R("div",Pt,[b.value?U("",!0):(w(),R("div",Lt,[s(m,{strong:"",secondary:"",round:"",type:"primary",onClick:E[0]||(E[0]=z=>P("signin"))},{default:r(()=>[S(" 登录 ")]),_:1})])),b.value?(w(),R("div",Ot,[s(m,{strong:"",secondary:"",round:"",type:"primary",onClick:E[1]||(E[1]=z=>P("signin"))},{default:r(()=>[S(" 登录 ")]),_:1}),s(m,{strong:"",secondary:"",round:"",type:"info",onClick:E[2]||(E[2]=z=>P("signup"))},{default:r(()=>[S(" 注册 ")]),_:1})])):U("",!0)]))])}}});const Tt={"has-sider":"",class:"main-wrap",position:"static"},Et={key:0},Rt={class:"content-wrap"},$t=W({__name:"App",setup(e){const t=B(),a=Q(()=>t.state.theme==="dark"?Ke:null);return(i,c)=>{const n=At,d=le("router-view"),p=mt,M=st,f=De,b=Ne,h=xe,u=qe;return w(),D(u,{theme:a.value},{default:r(()=>[s(b,null,{default:r(()=>[s(f,null,{default:r(()=>{var A;return[y("div",{class:ge(["app-container",{dark:((A=a.value)==null?void 0:A.name)==="dark",mobile:!g(t).state.desktopModelShow}])},[y("div",Tt,[g(t).state.desktopModelShow?(w(),R("div",Et,[s(n)])):U("",!0),y("div",Rt,[s(d,{class:"app-wrap"},{default:r(({Component:_})=>[(w(),D(he,null,[i.$route.meta.keepAlive?(w(),D(ee(_),{key:0})):U("",!0)],1024)),i.$route.meta.keepAlive?U("",!0):(w(),D(ee(_),{key:0}))]),_:1})]),s(p)]),s(M)],2)]}),_:1})]),_:1}),s(h)]),_:1},8,["theme"])}}});fe($t).use(me).use(Je).mount("#app");export{Uo as $,ko as A,bo as B,nt as C,Ao as D,Vo as E,So as F,Ro as G,Eo as H,Zo as I,To as J,Io as K,xo as L,No as M,Fo as N,Qo as O,Yo as P,$o as Q,Co as R,Oo as S,H as T,Wo as U,Bo as V,Ho as W,Po as X,Do as Y,qo as Z,_e as _,Go as a,Mo as a0,Ko as a1,Lo as a2,At as a3,no as b,ro as c,Zt as d,zo as e,ho as f,jo as g,wo as h,po as i,mo as j,vo as k,fo as l,go as m,Xt as n,to as o,ao as p,lo as q,co as r,uo as s,_o as t,eo as u,io as v,oo as w,Jt as x,so as y,yo as z};