import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{Fragment as n,jsx as r,jsxs as i}from"hono/jsx/jsx-runtime";import{load as a}from"cheerio";import{renderToString as o}from"hono/jsx/dom/server";import{raw as s}from"hono/html";const c=async c=>{let l=Number.parseInt(c.req.query(`limit`)??`100`,10),u=`https://www.cloudflarestatus.com`,d=a(await e(u)),f=d(`html`).attr(`lang`)??`en`;d(`div.incidents-list`).remove();let p=d(`div.update`).slice(0,l).toArray().map(e=>{let a=d(e),c=a.parent().parent().find(`a`),l=c.text(),p=a.find(`strong`).first().text(),m=a.find(`span.whitespace-pre-wrap`).first().text(),h=`${p?`${p} - `:``}${m}`,g=o(i(n,{children:[l?r(`h2`,{children:l}):null,a.html()?s(a.html()):null]})),_=a.find(`span.ago`).attr(`data-datetime-unix`),v=c.attr(`href`)?new URL(c.attr(`href`),u).toString():void 0,y=[p].filter(Boolean),b=v?`${v}#${_}`:``,x=_;return{title:h,description:g,pubDate:_?t(_,`x`):void 0,link:v,category:y,guid:b,id:b,content:{html:g,text:g},updated:x?t(x,`x`):void 0,language:f}});return{title:d(`title`).text(),description:d(`meta[name="description"]`).attr(`content`),link:u,item:p,allowEmpty:!0,language:f,id:u}},l={path:`/`,name:`Status`,url:`www.cloudflarestatus.com`,maintainers:[`nczitzk`],handler:c,example:`/cloudflarestatus`,parameters:void 0,description:void 0,categories:[`programming`],features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportRadar:!0,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`www.cloudflarestatus.com`],target:`/`}],view:5};export{c as handler,l as route};