import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{load as n}from"cheerio";const r={name:`ASR Articles`,maintainers:[`HappyZhu99`],categories:[`journal`],path:`/journal/:journalID`,parameters:{journalID:`journal ID, can be found in the URL`},example:`/aiaa/journal/aiaaj`,handler:i};async function i(r){let i=r.req.param(`journalID`),a=`https://arc.aiaa.org`,o=n(await e(`${a}/action/showFeed?type=etoc&feed=rss&jc=${i}`),{xml:{xmlMode:!0}}),s=o(`title`).first().text().replace(`: Table of Contents`,``),c=o(`image url`).text(),l=o(`item`).toArray().map(e=>{let n=o(e);return{title:n.find(String.raw`dc\:title`).text(),link:n.find(`link`).text()||``,description:n.find(`description`).text()||``,pubDate:t(n.find(String.raw`dc\:date`).text()||``),author:n.find(String.raw`dc\:creator`).toArray().map(e=>o(e).text()).join(`, `)}});return{title:`${s} | arc.aiaa.org`,description:`List of articles from both the latest and ahead of print issues.`,image:c,link:`${a}/journal/${i}`,item:l}}export{r as route};