import{r as e}from"./norm-f7iXVy-b.js";import{t}from"./pdfUtils-BDq1qMVd.js";import{c as n,t as r}from"./proxyOps-DSvg656Q.js";var i=e=>/\.txt$|\.md$|\.markdown$|\.json$|\.csv$/i.test(e),a=(e,t)=>/\.pdf$/i.test(e)||t===`application/pdf`,o=async(o,s)=>{let c=e(o?.name)||`附件`,l=e(o?.type).toLowerCase();return i(c)?e(await o.text().catch(()=>``)):a(c,l)?await n({fileDataUrl:await r(o),fileName:c,pages:await t(o).catch(()=>1),minLength:s?.minLength,signal:s?.signal,onStage:s?.onStage}):``};export{o as t};