import{t as e}from"./cache-DUthuMSu.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./got-BBDj7u1e.mjs";import{load as r}from"cheerio";const i=`https://www.tokeninsight.com/`,a=async()=>{let e=`${i}api/bulletin/selectBulletinList`,{data:t}=(await n.get(e)).data;return t},o={path:`/bulletin/:lang?`,categories:[`finance`],example:`/tokeninsight/bulletin/en`,parameters:{lang:`Language, see below, Chinese by default`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`tokeninsight.com/:lang/latest`],target:`/bulletin/:lang`}],name:`Latest`,maintainers:[],handler:s};async function s(o){let s=o.req.param(`lang`)??`zh`,c=async a=>{let{updateDate:o,titleEn:c,id:l,title:u}=a,d=`${i}${s}/latest/${l}`,f=await e.tryGet(d,async()=>r((await n(d)).data)(`.detail_html_box`).html());return{title:s===`zh`?u:c,description:f,pubDate:t(o),link:d}},l=await a(),u=await Promise.all(l.map(e=>c(e)));return{title:`${s===`zh`?`快讯`:`Latest`} | TokenInsight`,link:`https://www.tokeninsight.com/${s}/latest`,item:u}}export{o as route};