import{t as e}from"./config-BYRrjYC5.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./got-BBDj7u1e.mjs";import{r}from"./utils-Edy6dlJs.mjs";const i={path:`/fav/:uid/:fid/:embed?`,categories:[`social-media`],example:`/bilibili/fav/756508/50948568`,parameters:{uid:`用户 id, 可在 UP 主主页中找到`,fid:`收藏夹 ID, 可在收藏夹的 URL 中找到, 默认收藏夹建议使用 UP 主默认收藏夹功能`,embed:`默认为开启内嵌视频, 任意值为关闭`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`UP 主非默认收藏夹`,maintainers:[`Qixingchen`],handler:a};async function a(i){let a=i.req.param(`fid`),o=i.req.param(`uid`),s=!i.req.param(`embed`),{data:c,code:l,message:u}=(await n({url:`https://api.bilibili.com/x/v3/fav/resource/list?media_id=${a}&ps=20`,headers:{Referer:`https://space.bilibili.com/${o}/`,Cookie:e.bilibili.cookies[o]}})).data;if(l)throw Error(u??l);let d=c.info.upper.name,f=c.info.title;return{title:`${d} 的 bilibili 收藏夹 ${f}`,link:`https://space.bilibili.com/${o}/#/favlist?fid=${a}`,description:`${d} 的 bilibili 收藏夹 ${f}`,item:c.medias&&c.medias.map(e=>({title:e.title,description:r.renderUGCDescription(s,e.cover,e.intro,e.id,void 0,e.bvid),pubDate:t(e.fav_time*1e3),link:e.fav_time>r.bvidTime&&e.bvid?`https://www.bilibili.com/video/${e.bvid}`:`https://www.bilibili.com/video/av${e.id}`,author:e.upper.name}))}}export{i as route};