import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./cache-DUthuMSu.mjs";import{t as n}from"./parse-date-BdYTmLpo.mjs";import{t as r}from"./timezone-keeL11Io.mjs";import{destr as i}from"destr";const a=`https://hub.baai.ac.cn`,o=`https://event.baai.ac.cn`,s=`https://hub-api.baai.ac.cn`,c=()=>t.tryGet(`baai:tags`,async()=>{let{data:t}=await e(`${s}/api/v1/tags`);return t.map(e=>({id:e.id,title:e.title,description:e.description,brief:e.brief,iconUrl:e.icon_url}))}),l=e=>({link:e.is_event?`${o}/activities/${e.event_info.id}`:`${a}/view/${e.story_id}`,title:e.is_event?e.event_info.name:e.story_info.title,pubDate:r(n(e.is_event?e.event_info.time_desc:e.story_info.created_at.replace(`发布`,``).replace(`分享`,``)),8),author:e.is_event?e.event_info.company:e.story_info.user_name,category:e.is_event?null:e.story_info.tag_names.map(e=>e.title),eventId:e.is_event?e.event_info.id:null}),u=async t=>{let n=await e(`${o}/api/api/Activity/IntroductionTypes`,{query:{activityId:t.eventId},parseResponse:e=>i(e)});return n.data.ac_desc+n.data.ac_desc_two};export{l as a,u as i,a as n,c as r,s as t};