PageSourceSearch

https://agentcentre.app/assets/resource-thumbnail-BsJP663i.js

js agentcentre.app collected 2026-10-09 22:00:53 UTC 1,676 bytes, 1 lines download raw bytes

1import{_ as w}from"./index-DETwZGY0.js";function p(t){const n=t.match(/(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([A-Za-z0-9_-]{6,})/);return n?`https://img.youtube.com/vi/${n[1]}/mqdefault.jpg`:null}function f(t){const n=t.match(/(?:vimeo\.com\/(?:video\/)?|player\.vimeo\.com\/video\/)(\d+)/);return n?`https://vumbnail.com/${n[1]}.jpg`:null}function y(t){return p(t)??f(t)}async function v(t){try{const n=await w(()=>import("./pdf-CkIk37Ba.js"),[]),s=(await w(async()=>{const{default:m}=await import("./pdf.worker.min-CFOIyuof.js");return{default:m}},[])).default;n.GlobalWorkerOptions.workerSrc=s;const r=await t.arrayBuffer(),i=await(await n.getDocument({data:r}).promise).getPage(1),o=800/i.getViewport({scale:1}).width,a=i.getViewport({scale:o}),e=document.createElement("canvas");e.width=a.width,e.height=a.height;const h=e.getContext("2d");return h?(await i.render({canvasContext:h,viewport:a}).promise,await new Promise(m=>e.toBlob(g=>m(g),"image/jpeg",.85))):null}catch(n){return console.warn("PDF thumbnail failed",n),null}}async function _(t,n=800){try{const s=await new Promise((o,a)=>{const e=new FileReader;e.onload=()=>o(e.result),e.onerror=a,e.readAsDataURL(t)}),r=await new Promise((o,a)=>{const e=new Image;e.onload=()=>o(e),e.onerror=a,e.src=s}),u=Math.min(1,n/r.width),l=Math.round(r.width*u),i=Math.round(r.height*u),c=document.createElement("canvas");c.width=l,c.height=i;const d=c.getContext("2d");return d?(d.drawImage(r,0,0,l,i),await new Promise(o=>c.toBlob(a=>o(a),"image/jpeg",.85))):null}catch{return null}}async function P(t){return t.type==="application/pdf"?v(t):t.type.startsWith("image/")?_(t):null}export{P as g,y as v};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.