import{t as e}from"./parse-date-BdYTmLpo.mjs";import{t}from"./got-BBDj7u1e.mjs";import*as n from"cheerio";const r={path:`/apprelease/:app`,categories:[`program-update`],example:`/f-droid/apprelease/com.termux`,parameters:{app:`App's package name`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`f-droid.org/en/packages/:app/`]}],name:`App Update`,maintainers:[`garywill`],handler:i};async function i(r){let{app:i}=r.req.param(),{data:a}=await t(`https://f-droid.org/en/packages/${i}/`),o=n.load(a),s=o(`.package-title`).find(`h3`).text().trim(),c=o(`.package-versions-list .package-version`).toArray().map(t=>{let n=o(t),r=n.find(`.package-version-header a`),a=r.eq(0).attr(`name`);return{title:a,guid:r.eq(1).attr(`name`),pubDate:e(n.find(`.package-version-header`).text().split(`Added on `)[1]),description:[n.find(`.package-version-download`).html(),n.find(`.package-version-requirement`).html(),n.find(`.package-version-source`).html()].join(`<br>`),link:`https://f-droid.org/en/packages/${i}/#${a}`}});return{title:`${s} releases on F-Droid`,discription:o(`.package-summary`).text(),link:`https://f-droid.org/en/packages/${i}/`,item:c}}export{r as route};