PageSourceSearch

https://usedeck.ai/assets/loadFont-C4ICaR32.js

js usedeck.ai collected 2026-10-05 15:13:49 UTC 2,265 bytes, 4 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a0f37e-c3c7-0000-be7f-3fe4a1107402";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="ca9c3450-a8b2-5480-bee0-690c42e33634")}catch(e){}}();import{g as d,a as p}from"./catalog-CDRZuitP.js";const i=new Set,a=(t,n)=>{const e=n.length?[...n].sort((s,o)=>s-o).join(";"):"400";return`https://fonts.googleapis.com/css2?family=${t.replace(/\s+/g,"+")}:wght@${e}&display=swap`},c=(t,n)=>{const e=t.toLowerCase().replace(/\s+/g,"-"),s=(n.length?n:[400]).join(",");return`https://api.fontshare.com/v2/css?f[]=${e}@${s}&display=swap`};function y(t){if(!t)return null;const n=t.family.replace(/['"]/g,"");return t.source==="fontshare"?c(n,t.weights):a(n,t.weights)}function f(t,n){if(typeof document>"u")return;const e=document.createElement("link");e.rel="stylesheet",e.href=t,e.setAttribute("data-font",n),document.head.appendChild(e)}function l(t){if(!t||typeof document>"u"||i.has(t.id))return;i.add(t.id);const n=t.family.replace(/['"]/g,""),e=t.source==="fontshare"?c(n,t.weights):a(n,t.weights);f(e,t.id)}const w=t=>l(d(t));function h(t){if(!t)return;const n=p(t);if(n)return l(n);const e=t.split(",")[0].replace(/['"]/g,"").trim();if(!e||!u(e))return;const s=`x-${e.toLowerCase()}`;i.has(s)||(i.add(s),f(a(e,[400,500,600,700]),s))}const u=t=>!!t&&!t.startsWith("--")&&!/[&(){};:<>@\\/="+%$#]/.test(t);function m(t){const n=new Set,e=[];for(const s of t.matchAll(/font-family:\s*([^;"')]+)/gi)){const o=s[1].split(",")[0].replace(/['"]/g,"").trim(),r=o.toLowerCase();o&&u(o)&&!n.has(r)&&(n.add(r),e.push(o))}return e}async function F(t,n=2500){if(!t||typeof document>"u"||!document.fonts)return;const e=m(t);if(!e.length)return;for(const o of e)h(o);await new Promise(o=>setTimeout(o,50));const s=[];for(const o of e)for(const r of["400","700"])s.push(document.fonts.load(`${r} 16px "${o}"`).catch(()=>{}));await Promise.race([Promise.allSettled(s),new Promise(o=>setTimeout(o,n))])}export{h as a,w as b,F as e,y as f,l};
2//# sourceMappingURL=loadFont-C4ICaR32.js.map
3
4//# chunkId=ca9c3450-a8b2-5480-bee0-690c42e33634

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.