PageSourceSearch

https://filewisely.lovable.app/assets/ensureBrowserImage-C3OQV4C9.js

js filewisely.lovable.app collected 2026-10-03 03:36:21 UTC 1,568 bytes, 1 lines download raw bytes

1const c=["https://cdn.jsdelivr.net/npm/[email protected]/dist/heic2any.min.js","https://unpkg.com/[email protected]/dist/heic2any.min.js"];let a=null;function s(n){return new Promise((i,e)=>{const t=document.querySelector(`script[data-heic2any-src="${n}"]`);if(t){t.addEventListener("load",()=>i(),{once:!0}),t.addEventListener("error",()=>e(new Error(`failed: ${n}`)),{once:!0});return}const r=document.createElement("script");r.async=!0,r.src=n,r.dataset.heic2anySrc=n,r.onload=()=>i(),r.onerror=()=>e(new Error(`failed: ${n}`)),document.head.appendChild(r)})}async function u(){const n=window.heic2any;return typeof n=="function"?n:a||(a=(async()=>{let i=null;for(const e of c)try{await s(e);const t=window.heic2any;if(typeof t=="function")return t;i=new Error("heic2any global missing after script load")}catch(t){i=t}throw i instanceof Error?i:new Error("All heic2any CDNs failed")})(),a.catch(()=>{a=null}),a)}async function o(n){try{const i=await n.slice(0,12).arrayBuffer(),e=new Uint8Array(i);if(e.length<12)return!1;const t=String.fromCharCode(e[4],e[5],e[6],e[7]),r=String.fromCharCode(e[8],e[9],e[10],e[11]);return t==="ftyp"&&(r==="heic"||r==="heix"||r==="mif1")}catch{return!1}}async function l(n){if(!await o(n))return n;const t=await(await u())({blob:n,toType:"image/jpeg",quality:.82}),r=Array.isArray(t)?t[0]:t;return r instanceof Blob?r:new Blob([r],{type:"image/jpeg"})}const f=Object.freeze(Object.defineProperty({__proto__:null,ensureBrowserCompatibleImageBlob:l,isHeicBlob:o},Symbol.toStringTag,{value:"Module"}));export{f as a,l as e,o as i,u as l};

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.