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/Home--QVDyCUb.js

2 lines
24 KiB

import{W as Fe}from"./whisper-add-friend-kzktoNux.js";import{_ as Ne}from"./whisper-p-lu9vBA.js";import{_ as Re,a as qe}from"./post-item.vue_vue_type_style_index_0_lang-NAwb_d8Q.js";import{_ as Ge}from"./post-skeleton-Ci-jNNIC.js";import{d as ye,H as i,c as le,b as ke,e as r,f as k,bk as w,j as D,k as a,w as o,v as A,Z as g,y as he,t as fe,A as V,F as _e,x as ge,S as Oe,E as Se}from"./@vue-M2CzPUka.js";import{u as Ae}from"./vuex-k9agayot.js";import{l as we}from"./lodash-8cBkGte7.js";import{g as Pe,a as Me,c as Ye,b as Le,d as We,e as Ke,u as je,f as Qe,h as He,_ as Ze}from"./index-Ngk4ShPB.js";import{p as Je}from"./content-uMCu942j.js";import{V as q,P as X}from"./IEnum-u5OuruSk.js";import{I as Xe,V as $e,A as et,d as tt,E as st}from"./@vicons-t7bPon9z.js";import{o as be,v as at,j as nt,e as ze,w as ot,x as lt,y as it,z as rt,A as ut,B as ct,C as pt,a as Te,D as dt,E as vt,F as mt,G as ft,H as _t,l as gt,I as ht,J as wt,k as yt}from"./naive-ui-CFtxauK_.js";import{_ as kt}from"./main-nav.vue_vue_type_style_index_0_lang-NlSSnAqR.js";import{b as At,u as bt}from"./vue-router-iNEl8q3a.js";import{W as zt}from"./v3-infinite-loading--AB1xg2t.js";import{S as Tt}from"./@opentiny-uoOjf5Au.js";import"./copy-to-clipboard-l6UqHK6O.js";import"./@babel-5-cIlDoe.js";import"./toggle-selection-fekekO1r.js";import"./axios-zw96FDk0.js";import"./moment-jIwEdMgI.js";/* empty css */import"./seemly-hKSMrbh9.js";import"./vueuc-5-iSHcg-.js";import"./evtd-9ZCiDXyn.js";import"./@css-render-nQ5vzMKz.js";import"./vooks-RlHpQsWY.js";import"./vdirs-gz97tqc5.js";import"./@juggle--NVrOerG.js";import"./css-render-Adblu2bf.js";import"./@emotion-vV6BesBt.js";import"./lodash-es-KEIJqYRD.js";import"./treemate-hmrDCADh.js";import"./async-validator-BHjhHa7C.js";import"./date-fns-E8ESfRGG.js";import"./paopao-video-player-P8vpiOXx.js";import"./vue-l_NObxuH.js";const Ct=$=>{const _=new FileReader,p=z=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(z),h=()=>{const z=new Uint8Array(_.result).subarray(0,4);let d="";for(let b=0;b<z.length;b++)d+=z[b].toString(16);switch(d){case"504b0304":case"504b0506":case"504b0708":return p("application/zip");case"504b030414":return p("application/x-zip-compressed");case"504b0508":return p("application/x-zip");case"504b5370":return p("application/octet-stream");default:return!1}};return new Promise((z,d)=>{_.onloadend=()=>{const b=$.type;z(b===""||b==="application/octet-stream"?h():p(b))},_.readAsArrayBuffer($.slice(0,4))})},It={key:0,class:"compose-wrap"},Dt={class:"compose-line"},Bt={class:"compose-user"},Ut={class:"compose-line compose-options"},xt={class:"attachment"},Vt={class:"submit-wrap"},Et={class:"attachment-list-wrap"},Ft={key:0,class:"attachment-price-wrap"},Nt=D("span",null," 附件价格¥",-1),Rt={key:0,class:"eye-wrap"},qt={key:1,class:"link-wrap"},Gt={key:1,class:"compose-wrap"},Ot=D("div",{class:"login-wrap"},[D("span",{class:"login-banner"}," 登录后,精彩更多")],-1),St={key:0,class:"login-only-wrap"},Pt={key:1,class:"login-wrap"},Mt=ye({__name:"compose",emits:["post-success"],setup($,{emit:_}){const p=_,h=Ae(),z=i([]),d=i(!1),b=i(!1),N=i(!1),R=i(!1),E=i(""),W=i([]),B=i(),G=i(0),y=i("public/image"),T=i([]),C=i([]),U=i([]),O=i([]),P=i(q.PUBLIC),v=i(q.PUBLIC),x=i("true".toLowerCase()==="true"),K="/v1/attachment",M=le(()=>"Bearer "+localStorage.getItem("PAOPAO_TOKEN")),Q=le(()=>{let e=[{value:q.PUBLIC,label:"公开"},{value:q.PRIVATE,label:"私密"},{value:q.Following,label:"关注可见"}];return h.state.profile.useFriendship&&e.push({value:q.FRIEND,label:"好友可见"}),e}),H=()=>{N.value=!N.value,N.value&&R.value&&(R.value=!1)},ee=()=>{R.value=!R.value,R.value&&N.value&&(N.value=!1)},te=we.debounce(e=>{Pe({k:e}).then(t=>{let n=[];t.suggest.map(l=>{n.push({label:l,value:l})}),z.value=n,d.value=!1}).catch(t=>{d.value=!1})},200),ie=we.debounce(e=>{Me({k:e}).then(t=>{let n=[];t.suggest.map(l=>{n.push({label:l,value:l})}),z.value=n,d.value=!1}).catch(t=>{d.value=!1})},200),re=(e,t)=>{d.value||(d.value=!0,t==="@"?te(e):ie(e))},ue=e=>{e.len