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-40110c61.js

2 lines
20 KiB

import{_ as Be,a as Ee}from"./post-item.vue_vue_type_style_index_0_lang-012a0d00.js";import{_ as Ue}from"./post-skeleton-57252170.js";import{d as me,H as i,b as _e,e as p,f as w,bf as B,j as b,k as t,w as n,q as x,Y as k,y as pe,A as P,x as J,F as ue,u as ce,c as de,E as Te}from"./@vue-a481fc63.js";import{u as ge}from"./vuex-44de225f.js";import{l as ve}from"./lodash-e0b37ac3.js";import{g as Ne,a as Ve,c as xe,b as Re,d as Ge,e as Oe,_ as Ye}from"./index-73ce700e.js";import{p as Fe}from"./content-e89d4904.js";import{V as G,P as j}from"./IEnum-a180d93e.js";import{I as Pe,V as qe,A as Le,d as Me,E as Se}from"./@vicons-9939c40b.js";import{o as fe,v as Ke,j as Qe,e as We,w as je,x as He,y as Ze,z as Je,A as Xe,B as $e,C as et,a as he,D as tt,E as at,F as st,G as ot,l as nt,H as lt,I as it,k as rt}from"./naive-ui-d8de3dda.js";import{_ as ut}from"./main-nav.vue_vue_type_style_index_0_lang-b101efde.js";import{b as ct,u as pt}from"./vue-router-e5a2430e.js";import{W as dt}from"./v3-infinite-loading-2c58ec2f.js";import{S as vt}from"./@opentiny-d73a2d67.js";import"./formatTime-4210fcd1.js";import"./moment-2ab8298d.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.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";import"./paopao-video-player-2fe58954.js";import"./vue-1e3b54ec.js";import"./xss-a5544f63.js";import"./cssfilter-af71ba68.js";const mt=H=>{const R=new FileReader,C=r=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(r),E=()=>{const r=new Uint8Array(R.result).subarray(0,4);let U="";for(let _=0;_<r.length;_++)U+=r[_].toString(16);switch(U){case"504b0304":case"504b0506":case"504b0708":return C("application/zip");case"504b030414":return C("application/x-zip-compressed");case"504b0508":return C("application/x-zip");case"504b5370":return C("application/octet-stream");default:return!1}};return new Promise((r,U)=>{R.onloadend=()=>{const _=H.type;r(_===""||_==="application/octet-stream"?E():C(_))},R.readAsArrayBuffer(H.slice(0,4))})},_t={key:0,class:"compose-wrap"},gt={class:"compose-line"},ft={class:"compose-user"},ht={class:"compose-line compose-options"},wt={class:"attachment"},yt={class:"submit-wrap"},At={class:"attachment-list-wrap"},kt={key:0,class:"attachment-price-wrap"},bt=b("span",null," 附件价格¥",-1),Ct={key:0,class:"eye-wrap"},zt={key:1,class:"link-wrap"},It={key:1,class:"compose-wrap"},Dt=b("div",{class:"login-wrap"},[b("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Bt={key:0,class:"login-only-wrap"},Et={key:1,class:"login-wrap"},Ut=me({__name:"compose",emits:["post-success"],setup(H,{emit:R}){const C=ge(),E=i([]),r=i(!1),U=i(!1),_=i(!1),V=i(!1),g=i(""),y=i([]),N=i(),q=i(0),f=i("public/image"),c=i([]),v=i([]),D=i([]),z=i([]),O=i(G.FRIEND),Y=i(G.FRIEND),L=[{value:G.PUBLIC,label:"公开"},{value:G.PRIVATE,label:"私密"},{value:G.FRIEND,label:"好友可见"}],M=+"400",S=i("true".toLowerCase()==="true"),F=i("true".toLowerCase()==="true"),Z=i("true".toLowerCase()==="true"),X=i("false".toLowerCase()==="true"),K=i("true".toLowerCase()==="true"),$="/v1/attachment",l=i(),d=()=>{_.value=!_.value,_.value&&V.value&&(V.value=!1)},T=()=>{V.value=!V.value,V.value&&_.value&&(_.value=!1)},A=ve.debounce(e=>{Ne({k:e}).then(a=>{let o=[];a.suggest.map(s=>{o.push({label:s,value:s})}),E.value=o,r.value=!1}).catch(a=>{r.value=!1})},200),I=ve.debounce(e=>{Ve({k:e}).then(a=>{let o=[];a.suggest.map(s=>{o.push({label:s,value:s})}),E.value=o,r.value=!1}).catch(a=>{r.value=!1})},200),ee=(e,a)=>{r.value||(r.value=!0,a==="@"?A(e):I(e))},te=e=>{e.length>M?g.value=e.substring(0,M):g.value=e},Q=e=>{f.value=e},ae=