import{ai as N,u as g,W as e,aj as o,a6 as I,r,ak as T,af as h,al as y,am as v}from"./index.3e026b47.js";const d=25*1024*1024,f=1e3,m=1e4,F=t=>{const l=r.exports.useRef(null);r.exports.useEffect(()=>{l.current!=null&&T.highlightElement(l.current)});const n=t.input.type.extension,x=r.exports.useMemo(()=>h({file:t.input}),[t.input]),s=g(x),i=s.loading,a=r.exports.useMemo(()=>i?null:y(n,s.result,f,m),[i,n,s.result]);if(i)return e.createElement("div",null);const E=a?.truncatedLineLength,p=a?.truncatedTotalLines,L=a?.text,u=S(n);return e.createElement("div",{style:{height:"100%",display:"flex",flexDirection:"column"}},p&&e.createElement(o,{textAlign:"center"},"Warning: some lines truncated to ",f," characters for display"),E&&e.createElement(o,{textAlign:"center"},"Warning: truncated to ",m," lines for display"),e.createElement("div",{style:{background:"white",border:"1px solid #eee",padding:16,flexGrow:1,overflow:"auto"}},e.createElement("pre",{style:{maxWidth:"100%",overflowX:"hidden",textOverflow:"ellipsis"}},e.createElement("code",{ref:l,className:u!=null?`language-${u}`:void 0},L))))},w=t=>{const l=t.input,c=N({file:l}),n=g(c);return n.loading?e.createElement("div",null):(n.result??0)>d?e.createElement(o,{textAlign:"center"},"Text view limited to files less than"," ",I(d).format("0.0b")):e.createElement(F,{...t})};function S(t){return v[t]??null}export{w as default};
//# sourceMappingURL=Component.5f1d6385.js.map
