1import{aS as w}from"./index-D5YpCUvm.js";import{p as A,a as d,_ as u,b as p}from"./pdf-C9dl9RL1.js";const _="/assets/pdf.worker.min-DGf6LXVo.mjs",k=["https://cdn.jsdelivr.net/npm/[email protected]/build/pdf.worker.min.mjs","https://unpkg.com/[email protected]/build/pdf.worker.min.mjs"],s=[_,...k];function y(){if(typeof navigator>"u")return!1;const e=navigator.userAgent,r=/iPad|iPhone|iPod/.test(e)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,n=/^((?!chrome|android|crios|fxios).)*safari/i.test(e);return r&&n}let l=0;d.workerSrc=s[0];const S="PDF_ENGINE_UNSUPPORTED_BROWSER";let i=null;function g(){if(i===null)try{new Function("class __PdfSupportTest { #m() {} run() { return this.#m; } }"),i=!0}catch{i=!1}return i}function h(e){const r=String((e==null?void 0:e.message)||e||"");return r.includes("Setting up fake worker failed")||r.includes("worker")||r.includes("Failed to fetch")||r.includes("dynamically imported module")||r.includes("NetworkError")||r.includes("Importing a module script failed")||r.includes("Invalid character")||r.includes("Unexpected token")||r.includes("SyntaxError")}async function O(e){const r=typeof e=="string"||e instanceof URL?{url:e}:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?{data:e}:e;if(!g())throw new Error(S);let n=null;const o=y()?[s[0]]:s,c=r.data instanceof Uint8Array?new Uint8Array(r.data):r.data instanceof ArrayBuffer?new Uint8Array(new Uint8Array(r.data)):ArrayBuffer.isView(r.data)?new Uint8Array(r.data.buffer.slice(r.data.byteOffset,r.data.byteOffset+r.data.byteLength)):null,f=()=>c?{...r,data:new Uint8Array(c)}:r;for(let a=l;a<o.length;a++){d.workerSrc=o[a];try{const t=await u(f()).promise;return l=a,t}catch(t){if(n=t,!h(t))throw t;console.warn(`[pdf-worker] Source ${a+1}/${o.length} failed (${o[a]}):`,String((t==null?void 0:t.message)||t))}}console.warn("[pdf-worker] All worker sources failed, falling back to main thread");try{return await b(),await u(f()).promise}catch(a){throw l=0,d.workerSrc=s[0],n??a}}let m=null;async function b(){let e=null;m||(m=(async()=>{e=await w(()=>import("./pdf.worker.min-DXNDMtgk.js"),[]),globalThis.pdfjsWorker=e})()),await m;try{const r=e??globalThis.pdfjsWorker;r&&p&&Object.defineProperty(p,"_setupFakeWorkerGlobal",{value:Promise.resolve(r),configurable:!0,writable:!0})}catch{}}export{S as UNSUPPORTED_BROWSER_ERROR,g as isPdfEngineSupported,O as loadPdf,A as pdfjsLib};
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.