import{t as e}from"./cache-DUthuMSu.mjs";import{n as t,t as n}from"./utils-B7nemv4Y.mjs";import{load as r}from"cheerio";const i={path:`/software/:name/:routeParams?`,categories:[`programming`],example:`/alternativeto/software/cpp`,parameters:{name:`Software name`,routeParams:`Filters of software type`},features:{requireConfig:!1,requirePuppeteer:!0,antiCrawler:!0,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`www.alternativeto.net/software/:name`],target:`/software/:name`}],name:`Software Alternatives`,maintainers:[`JimenezLi`],handler:a,description:"> routeParms can be copied from original site URL, example: `/alternativeto/software/cpp/license=opensource&platform=windows`"};async function a(i){let a=`https://alternativeto.net/software/${i.req.param(`name`)}/?${new URLSearchParams(i.req.param(`routeParams`)).toString()}`,o=r(await t(a,e));return{title:o(`.Heading_h1___Cf5Y`).text().trim(),description:o(`.intro-text`).text().trim(),link:a,item:o(`.AppListItem_appInfo__h9cWP`).toArray().map(e=>{let t=o(e);return{title:t.find(`.Heading_h2___LwQD`).text().trim(),link:`${n}${t.find(`.Heading_h2___LwQD a`).attr(`href`)}`,description:t.find(`.AppListItem_description__wtODK`).text().trim()}})}}export{i as route};