/
opt
/
canhelp
/
node_modules
/
next
/
dist
/
compiled
/
@next
/
font
/
dist
/
google
/
/opt/canhelp/node_modules/next/dist/compiled/@next/font/dist/google
mkdir
upload
Name
Size
Mode
Actions
fetch-css-from-google-fonts.d.ts
482
0644
edit
dl
rm
fetch-css-from-google-fonts.js
1347
0644
edit
dl
rm
fetch-font-file.d.ts
226
0644
edit
dl
rm
fetch-font-file.js
957
0644
edit
dl
rm
fetch-resource.d.ts
293
0644
edit
dl
rm
fetch-resource.js
1994
0644
edit
dl
rm
find-font-files-in-css.d.ts
413
0644
edit
dl
rm
find-font-files-in-css.js
1528
0644
edit
dl
rm
font-data.json
449613
0644
edit
dl
rm
get-fallback-font-override-metrics.d.ts
518
0644
edit
dl
rm
get-fallback-font-override-metrics.js
2484
0644
edit
dl
rm
get-font-axes.d.ts
314
0644
edit
dl
rm
get-font-axes.js
3105
0644
edit
dl
rm
get-google-fonts-url.d.ts
290
0644
edit
dl
rm
get-google-fonts-url.js
2248
0644
edit
dl
rm
get-proxy-agent.d.ts
180
0644
edit
dl
rm
get-proxy-agent.js
914
0644
edit
dl
rm
google-fonts-metadata.d.ts
365
0644
edit
dl
rm
google-fonts-metadata.js
381
0644
edit
dl
rm
index.d.ts
827231
0644
edit
dl
rm
index.js
77
0644
edit
dl
rm
loader.d.ts
138
0644
edit
dl
rm
loader.js
8547
0644
edit
dl
rm
retry.d.ts
155
0644
edit
dl
rm
retry.js
674
0644
edit
dl
rm
sort-fonts-variant-values.d.ts
231
0644
edit
dl
rm
sort-fonts-variant-values.js
1148
0644
edit
dl
rm
validate-google-font-function-call.d.ts
504
0644
edit
dl
rm
validate-google-font-function-call.js
5074
0644
edit
dl
rm
Edit:
/opt/canhelp/node_modules/next/dist/compiled/@next/font/dist/google/find-font-files-in-css.js
(1528B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.findFontFilesInCss = findFontFilesInCss; /** * Find all font files in the CSS response and determine which files should be preloaded. * In Google Fonts responses, the @font-face's subset is above it in a comment. * Walk through the CSS from top to bottom, keeping track of the current subset. */ function findFontFilesInCss(css, subsetsToPreload) { var _a, _b; // Find font files to download const fontFiles = []; // Keep track of the current subset let currentSubset = ''; for (const line of css.split('\n')) { const newSubset = (_a = /\/\* (.+?) \*\//.exec(line)) === null || _a === void 0 ? void 0 : _a[1]; if (newSubset) { // Found new subset in a comment above the next @font-face declaration currentSubset = newSubset; } else { const googleFontFileUrl = (_b = /src: url\((.+?)\)/.exec(line)) === null || _b === void 0 ? void 0 : _b[1]; if (googleFontFileUrl && !fontFiles.some((foundFile) => foundFile.googleFontFileUrl === googleFontFileUrl)) { // Found the font file in the @font-face declaration. fontFiles.push({ googleFontFileUrl, preloadFontFile: !!(subsetsToPreload === null || subsetsToPreload === void 0 ? void 0 : subsetsToPreload.includes(currentSubset)), }); } } } return fontFiles; }
Save
cmd:
run