import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./config-BYRrjYC5.mjs";import{t as n}from"./cache-DUthuMSu.mjs";import{t as r}from"./parse-date-BdYTmLpo.mjs";import{t as i}from"./comic-BVXrCMqe.mjs";import a from"p-map";const o={path:`/comic/:id`,categories:[`anime`],parameters:{id:`漫画ID`},example:`/zaimanhua/comic/57069`,features:{requireConfig:[{name:`ZAIMANHUA_TOKEN`,optional:!0,description:"用户登录后，可以从浏览器开发者工具 Network 面板中的请求信息中获取 token，使用请求中的 `Authorization` 的值，完整设置为 `Bearer <token>`，或直接设置 token 并由路由自动补齐 `Bearer ` 前缀。"}],requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1,nsfw:!0},radar:[{source:[`manhua.zaimanhua.com/details`,`manhua.zaimanhua.com/details/:id`],target:`/comic/:id`}],name:`漫画更新`,maintainers:[`kjasn`],description:"::: Warning\n未登录用户无法获取到所有漫画，需要设置`ZAIMANHUA_TOKEN`环境变量以使用 API 授权访问。\n且由于源网站本身的限制，建议尽量在部署于中国大陆网络内的 RSSHub 节点中使用本路由。若在海外网络环境中使用，即使设置了`ZAIMANHUA_TOKEN`环境变量，也可能无法获取全部漫画。\n:::",handler:s};async function s(o){let s=`https://manhua.zaimanhua.com`,c=o.req.param(`id`),l=`${s}/api/v1/comic2/comic/detail?id=${c}`,u={"user-agent":t.trueUA,referer:s},d=t.zaimanhua.token;d&&(u.Authorization=d.startsWith(`Bearer `)?d:`Bearer ${d}`);let f=(await e(l,{headers:u})).data.comicInfo,p=f.chapterList[0].title,m=f.chapterList[0].data,h=f.comicPy,g=f.title,_=await a(m,async t=>{let a=`${s}/api/v1/comic2/chapter/detail?comic_id=${c}&chapter_id=${t.chapter_id}`;return await n.tryGet(a,async()=>{let n=(await e(a,{headers:u})).data,o=i(n.chapterInfo.page_url||[]);return{title:`[${p}] | ${g} - ${t.chapter_title}`,category:[p],image:n.chapterInfo.page_url?.[0]||``,link:`${s}/view/${h}/${c}/${t.chapter_id}`,pubDate:r(t.updatetime*1e3),description:o}})},{concurrency:3});return{title:`再漫画 - ${g}`,link:`${s}/details/${c}`,item:_}}export{o as route};