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-01e5e847.js

2 lines
21 KiB

import{_ as Ue}from"./whisper-24717711.js";import{_ as Te,a as Ve}from"./post-item.vue_vue_type_style_index_0_lang-369aa3bd.js";import{_ as Ee}from"./post-skeleton-73b6be04.js";import{d as _e,H as l,c as ce,b as ge,e as c,f as y,bf as U,j as A,k as a,w as i,q as O,Y as k,y as ve,A as Y,x as ee,F as pe,u as de,E as Ne}from"./@vue-a481fc63.js";import{u as fe}from"./vuex-44de225f.js";import{l as me}from"./lodash-e0b37ac3.js";import{g as xe,a as Re,c as qe,b as Ge,d as Oe,e as Pe,_ as Fe}from"./index-d9671de1.js";import{p as Le}from"./content-cbd53e51.js";import{V as B,P as H}from"./IEnum-5453a777.js";import{I as Ye,V as Se,A as Me,d as Ke,E as We}from"./@vicons-7a4ef312.js";import{o as he,v as je,j as Qe,e as He,w as Ze,x as Je,y as Xe,z as $e,A as et,B as tt,C as at,a as we,D as st,E as ot,F as nt,G as lt,l as it,H as rt,I as ut,k as ct}from"./naive-ui-d8de3dda.js";import{_ as pt}from"./main-nav.vue_vue_type_style_index_0_lang-5497f713.js";import{b as dt,u as vt}from"./vue-router-e5a2430e.js";import{W as mt}from"./v3-infinite-loading-2c58ec2f.js";import{S as _t}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 gt=Z=>{const F=new FileReader,b=r=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(r),T=()=>{const r=new Uint8Array(F.result).subarray(0,4);let V="";for(let g=0;g<r.length;g++)V+=r[g].toString(16);switch(V){case"504b0304":case"504b0506":case"504b0708":return b("application/zip");case"504b030414":return b("application/x-zip-compressed");case"504b0508":return b("application/x-zip");case"504b5370":return b("application/octet-stream");default:return!1}};return new Promise((r,V)=>{F.onloadend=()=>{const g=Z.type;r(g===""||g==="application/octet-stream"?T():b(g))},F.readAsArrayBuffer(Z.slice(0,4))})},ft={key:0,class:"compose-wrap"},ht={class:"compose-line"},wt={class:"compose-user"},yt={class:"compose-line compose-options"},kt={class:"attachment"},At={class:"submit-wrap"},bt={class:"attachment-list-wrap"},Ct={key:0,class:"attachment-price-wrap"},zt=A("span",null," 附件价格¥",-1),It={key:0,class:"eye-wrap"},Dt={key:1,class:"link-wrap"},Bt={key:1,class:"compose-wrap"},Ut=A("div",{class:"login-wrap"},[A("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Tt={key:0,class:"login-only-wrap"},Vt={key:1,class:"login-wrap"},Et=_e({__name:"compose",emits:["post-success"],setup(Z,{emit:F}){const b=fe(),T=l([]),r=l(!1),V=l(!1),g=l(!1),P=l(!1),f=l(""),R=l([]),E=l(),N=l(0),m=l("public/image"),I=l([]),p=l([]),h=l([]),C=l([]),D=l(B.PUBLIC),q=l(B.PUBLIC),K="true".toLowerCase()==="true",L=+"400",J=l("true".toLowerCase()==="true"),X=l("true".toLowerCase()==="true"),te=l("true".toLowerCase()==="true"),S=l("false".toLowerCase()==="true"),ae=l("true".toLowerCase()==="true"),W="/v1/attachment",G=ce(()=>"Bearer "+localStorage.getItem("PAOPAO_TOKEN")),$=ce(()=>{let e=[{value:B.PUBLIC,label:"公开"},{value:B.PRIVATE,label:"私密"},{value:B.Following,label:"关注可见"}];return K&&e.push({value:B.FRIEND,label:"好友可见"}),e}),se=()=>{g.value=!g.value,g.value&&P.value&&(P.value=!1)},j=()=>{P.value=!P.value,P.value&&g.value&&(g.value=!1)},oe=me.debounce(e=>{xe({k:e}).then(t=>{let n=[];t.suggest.map(o=>{n.push({label:o,value:o})}),T.value=n,r.value=!1}).catch(t=>{r.value=!1})},200),u=me.debounce(e=>{Re({k:e}).then(t=>{let n=[];t.suggest.map(o=