webfont 12.3.0 → 12.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -3
- package/dist/cli.mjs +266 -255
- package/dist/index.js +1 -1
- package/dist/index.mjs +142 -132
- package/dist/src/lib/ttfEncode.d.mts +3 -0
- package/dist/src/lib/ttfEncode.d.ts +3 -0
- package/dist/src/standalone/inputMode.d.mts +1 -1
- package/dist/src/standalone/inputMode.d.ts +1 -1
- package/dist/src/types/TranscodedFont.d.mts +1 -0
- package/dist/src/types/TranscodedFont.d.ts +1 -0
- package/package.json +2 -1
package/dist/cli.mjs
CHANGED
|
@@ -14,20 +14,21 @@ import { globby as te } from "globby";
|
|
|
14
14
|
import { cosmiconfig as ne } from "cosmiconfig";
|
|
15
15
|
import re from "deepmerge";
|
|
16
16
|
import * as ie from "fs/promises";
|
|
17
|
-
import ae from "
|
|
18
|
-
import oe from "
|
|
19
|
-
import se from "
|
|
20
|
-
import ce from "
|
|
21
|
-
import le from "
|
|
22
|
-
import ue from "
|
|
23
|
-
import
|
|
24
|
-
import me from "
|
|
25
|
-
import
|
|
26
|
-
import {
|
|
27
|
-
import _e from "
|
|
17
|
+
import { createFont as ae } from "fonteditor-core";
|
|
18
|
+
import oe from "ttf2woff";
|
|
19
|
+
import se from "wawoff2";
|
|
20
|
+
import ce from "ttf2eot";
|
|
21
|
+
import le from "fontverter";
|
|
22
|
+
import ue from "xml2js";
|
|
23
|
+
import de from "p-limit";
|
|
24
|
+
import { SVGIcons2SVGFontStream as fe, fileSorter as pe, getMetadataService as me } from "svgicons2svgfont";
|
|
25
|
+
import he from "crypto";
|
|
26
|
+
import { optimize as ge } from "svgo";
|
|
27
|
+
import { Readable as _e } from "stream";
|
|
28
|
+
import ve from "svg2ttf";
|
|
28
29
|
//#region package.json
|
|
29
|
-
var
|
|
30
|
-
|
|
30
|
+
var p, ye, be, xe, Se, Ce, we, Te, Ee, De, m, h, g, _, v, y, b, x, S, C, w, T, E, Oe, ke, Ae, je = r((() => {
|
|
31
|
+
p = "webfont", ye = "12.4.0", be = "Generator of fonts from SVG icons; decompress WOFF/WOFF2 to embedded TTF/OTF (not TTF↔OTF transcoding)", xe = {
|
|
31
32
|
lib: "dist",
|
|
32
33
|
source: "src"
|
|
33
34
|
}, Se = [
|
|
@@ -38,7 +39,7 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
38
39
|
"!**/__mocks__",
|
|
39
40
|
"README.md",
|
|
40
41
|
"NOTICE.md"
|
|
41
|
-
], Ce = "commonjs", we = "dist/index.js", Te = "dist/index.mjs", Ee = "dist/browser.js", De = "dist/cli.mjs",
|
|
42
|
+
], Ce = "commonjs", we = "dist/index.js", Te = "dist/index.mjs", Ee = "dist/browser.js", De = "dist/cli.mjs", m = "src/index.ts", h = "dist/src/index.d.ts", g = "dist/src/index.d.ts", _ = {
|
|
42
43
|
".": {
|
|
43
44
|
browser: {
|
|
44
45
|
types: "./dist/src/index.d.ts",
|
|
@@ -60,7 +61,7 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
60
61
|
}
|
|
61
62
|
},
|
|
62
63
|
"./package.json": "./package.json"
|
|
63
|
-
},
|
|
64
|
+
}, v = {
|
|
64
65
|
build: "vite build --mode library && vite build --mode library-esm && vite build --mode browser && vite build --mode cli && node scripts/emit-mts-types.mjs",
|
|
65
66
|
clean: "rm -rf dist/ temp/",
|
|
66
67
|
demo: "node dist/cli.mjs './src/fixtures/svg-icons/*.svg' -d demo -t html --normalize --center-horizontally",
|
|
@@ -83,9 +84,10 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
83
84
|
"test-debug": "vitest run src --no-file-parallelism",
|
|
84
85
|
testu: "vitest run src -u",
|
|
85
86
|
"deprecate-pre-12": "npm deprecate 'webfont@>=10.0.0 <12.0.0' 'Deprecated: upgrade to webfont@12. v10–11 enabled ligatures by default (browser hangs on large fonts, #558). 12.x: ligatures off, Node 24.14+, named import, unicode-range off, template fixes. See MIGRATION.md'"
|
|
86
|
-
},
|
|
87
|
+
}, y = {
|
|
87
88
|
cosmiconfig: "9.0.2",
|
|
88
89
|
deepmerge: "^4.2.2",
|
|
90
|
+
"fonteditor-core": "2.6.3",
|
|
89
91
|
fontverter: "2.0.0",
|
|
90
92
|
globby: "16.2.0",
|
|
91
93
|
meow: "14.1.0",
|
|
@@ -99,7 +101,7 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
99
101
|
ttf2woff: "^3.0.0",
|
|
100
102
|
wawoff2: "2.0.1",
|
|
101
103
|
xml2js: "0.6.2"
|
|
102
|
-
},
|
|
104
|
+
}, b = {
|
|
103
105
|
"@arethetypeswrong/cli": "0.18.4",
|
|
104
106
|
"@biomejs/biome": "2.5.2",
|
|
105
107
|
"@types/node": "26.1.0",
|
|
@@ -123,14 +125,14 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
123
125
|
"vite-plugin-checker": "0.14.4",
|
|
124
126
|
"vite-plugin-dts": "5.0.3",
|
|
125
127
|
vitest: "4.1.9"
|
|
126
|
-
},
|
|
128
|
+
}, x = {
|
|
127
129
|
minimatch: "10.2.5",
|
|
128
130
|
"test-exclude": "7.0.2",
|
|
129
131
|
"woff2sfnt-sfnt2woff": "1.0.0"
|
|
130
|
-
},
|
|
132
|
+
}, S = {
|
|
131
133
|
type: "git",
|
|
132
134
|
url: "git+https://github.com/itgalaxy/webfont.git"
|
|
133
|
-
},
|
|
135
|
+
}, C = "itgalaxy <development@itgalaxy.company>", w = [{
|
|
134
136
|
name: "Alexander Krasnoyarov",
|
|
135
137
|
email: "alexander.krasnoyarov@itgalaxy.company",
|
|
136
138
|
url: "https://vk.com/sterling_archer"
|
|
@@ -138,7 +140,7 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
138
140
|
name: "Jimmy Andrade",
|
|
139
141
|
email: "webfont@jimmyandrade.com",
|
|
140
142
|
url: "https://github.com/jimmyandrade"
|
|
141
|
-
}],
|
|
143
|
+
}], T = { url: "https://github.com/itgalaxy/webfont/issues" }, E = "https://github.com/itgalaxy/webfont#readme", Oe = { node: ">=24.14.0" }, ke = [
|
|
142
144
|
"cli",
|
|
143
145
|
"standalone",
|
|
144
146
|
"font",
|
|
@@ -158,8 +160,8 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
158
160
|
"scss",
|
|
159
161
|
"builder",
|
|
160
162
|
"generator"
|
|
161
|
-
],
|
|
162
|
-
name:
|
|
163
|
+
], Ae = {
|
|
164
|
+
name: p,
|
|
163
165
|
version: ye,
|
|
164
166
|
description: be,
|
|
165
167
|
directories: xe,
|
|
@@ -170,25 +172,25 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
170
172
|
module: Te,
|
|
171
173
|
browser: Ee,
|
|
172
174
|
bin: De,
|
|
173
|
-
source:
|
|
174
|
-
types:
|
|
175
|
-
typings:
|
|
176
|
-
exports:
|
|
177
|
-
scripts:
|
|
178
|
-
dependencies:
|
|
179
|
-
devDependencies:
|
|
180
|
-
overrides:
|
|
181
|
-
repository:
|
|
182
|
-
author:
|
|
175
|
+
source: m,
|
|
176
|
+
types: h,
|
|
177
|
+
typings: g,
|
|
178
|
+
exports: _,
|
|
179
|
+
scripts: v,
|
|
180
|
+
dependencies: y,
|
|
181
|
+
devDependencies: b,
|
|
182
|
+
overrides: x,
|
|
183
|
+
repository: S,
|
|
184
|
+
author: C,
|
|
183
185
|
license: "MIT",
|
|
184
|
-
contributors:
|
|
185
|
-
bugs:
|
|
186
|
-
homepage:
|
|
187
|
-
engines:
|
|
188
|
-
keywords:
|
|
186
|
+
contributors: w,
|
|
187
|
+
bugs: T,
|
|
188
|
+
homepage: E,
|
|
189
|
+
engines: Oe,
|
|
190
|
+
keywords: ke
|
|
189
191
|
};
|
|
190
|
-
})),
|
|
191
|
-
|
|
192
|
+
})), Me, Ne, Pe = r((() => {
|
|
193
|
+
Me = "\n Usage: webfont [input] [options]\n\n Input: File(s) or glob(s).\n\n SVG icons: one or more `.svg` files (default pipeline).\n Webfont decompression: one or more `.woff` / `.woff2` paths, globs, or http(s) URLs.\n You must have rights to any font file you process (see NOTICE.md).\n\n If an input argument is wrapped in quotation marks, it will be passed to \"fast-glob\"\n for cross-platform glob support.\n\n Options:\n\n --config\n\n Path to a specific configuration file (JSON, YAML, or CommonJS)\n or the name of a module in `node_modules` that points to one.\n If no `--config` argument is provided, webfont will search for\n configuration files in the following places, in this order:\n - a `webfont` property in `package.json`\n - a `.webfontrc` file (with or without filename extension:\n `.json`, `.yaml`, and `.js` are available)\n - a `webfont.config.js` file exporting a JS object\n The search will begin in the working directory and move up the\n directory tree until a configuration file is found.\n\n -u, --fontName\n\n The font family name you want, default: \"webfont\".\n\n -h, --help\n\n Output usage information.\n\n -v, --version\n\n Output the version number.\n\n -f, --formats\n\n Font formats to generate. Pass a JSON array (e.g. '[\"woff2\"]') or a\n comma-separated list (e.g. woff2 or svg, ttf, woff2).\n SVG input: svg, ttf, eot, woff, woff2 (not otf).\n WOFF/WOFF2 input: ttf and/or otf matching the embedded SFNT flavor.\n\n -d, --dest\n\n Destination for generated fonts.\n\n -m, --dest-create\n\n Create destination directory if it does not exist.\n\n -t, --template\n\n Built-in template name(s) ('css', 'scss', 'styl', 'html', 'json') or path to a custom template.\n Pass a JSON array (e.g. '[\"html\",\"scss\"]') or comma-separated list for multiple outputs.\n\n -s, --destTemplate\n\n Destination for generated template. If not passed used `dest` argument value.\n\n -c, --templateClassName\n\n Class name in css template.\n\n -p, --templateFontPath\n\n Font path in css template.\n\n -n, --templateFontName\n\n Font name in css template.\n\n --templateCacheString\n\n Specify cache string in scss/css template.\n\n --no-sort\n\n Keeps the files in the same order of entry\n\n --ligatures\n\n Add OpenType ligature glyphs (icon names as text). Off by default — large\n icon sets can hang Firefox on Windows (#558). Prefer class + codepoint CSS.\n\n --unicode-range\n\n Emit unicode-range in built-in @font-face rules (computed from glyph code points).\n Off by default — enabling may prevent ligature names from rendering; see README.\n\n --no-template-font-ligatures\n\n Omit font-feature-settings: \"liga\" from the built-in HTML preview template\n\n --optimize-svg\n\n Run a conservative SVGO pass on each SVG before font generation\n (does not convert strokes to fills; use glyphContentTransformFn for that)\n\n --verbose\n\n Tell me everything!.\n\n --svg-diagnose\n\n (Alpha) Scan SVG icons for icon-font incompatibilities (stroke-only paths,\n fill-rule: evenodd, unsupported elements) and log warnings.\n\n For \"svgicons2svgfont\":\n\n --fontId\n\n The font id you want, default as \"--fontName\".\n\n --fontStyle\n\n The font style you want.\n\n --fontWeight\n\n The font weight you want.\n\n --fixedWidth\n\n Creates a monospace font of the width of the largest input icon.\n\n --centerHorizontally\n\n Calculate the bounds of a glyph and center it horizontally.\n\n --centerVertically\n\n Center the glyphs vertically in the generated font.\n\n --normalize\n\n Normalize icons by scaling them to the height of the highest icon.\n\n --fontHeight\n\n The outputted font height [MAX(icons.height)].\n\n --round\n\n Setup the SVG path rounding [10e12].\n\n --descent\n\n The font descent [0].\n\n --ascent\n\n The font ascent [height - descent].\n\n --startUnicode\n\n The start unicode codepoint for files without prefix [0xEA01].\n\n --prependUnicode\n\n Prefix files with their automatically allocated unicode codepoint.\n\n --metadata\n\n Content of the metadata tag.\n\n --addHashInFontUrl\n\n Append an MD5 content hash to font URLs in built-in templates\n (?v=[hash]) while keeping output filenames stable (fontName.woff2, etc.).\n Use with a fixed fontName — do not randomize fontName for cache busting.\n", Ne = {
|
|
192
194
|
ascent: { type: "string" },
|
|
193
195
|
centerHorizontally: { type: "boolean" },
|
|
194
196
|
centerVertically: { type: "boolean" },
|
|
@@ -287,98 +289,102 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
287
289
|
type: "boolean"
|
|
288
290
|
}
|
|
289
291
|
};
|
|
290
|
-
})),
|
|
291
|
-
|
|
292
|
+
})), Fe, Ie, Le = r((() => {
|
|
293
|
+
je(), Pe(), Fe = { url: s(t).href }, Ie = (e = process.argv.slice(2)) => c(Me, {
|
|
292
294
|
argv: [...e],
|
|
293
295
|
autoHelp: !1,
|
|
294
296
|
autoVersion: !1,
|
|
295
|
-
flags:
|
|
296
|
-
importMeta:
|
|
297
|
-
pkg:
|
|
297
|
+
flags: Ne,
|
|
298
|
+
importMeta: Fe,
|
|
299
|
+
pkg: Ae
|
|
298
300
|
});
|
|
299
|
-
})),
|
|
300
|
-
|
|
301
|
-
})),
|
|
302
|
-
|
|
301
|
+
})), Re, ze = r((() => {
|
|
302
|
+
Le(), Pe(), Re = Ie();
|
|
303
|
+
})), Be, D, O, Ve, He, Ue, k = r((() => {
|
|
304
|
+
Be = /^https?:\/\//iu, D = (e) => Be.test(e), O = (e) => {
|
|
303
305
|
if (D(e)) try {
|
|
304
306
|
return f.extname(new URL(e).pathname).toLowerCase();
|
|
305
307
|
} catch {
|
|
306
308
|
return "";
|
|
307
309
|
}
|
|
308
310
|
return f.extname(e).toLowerCase();
|
|
309
|
-
},
|
|
311
|
+
}, Ve = (e) => {
|
|
310
312
|
let t = e;
|
|
311
313
|
D(e) && (t = new URL(e).pathname);
|
|
312
314
|
let n = f.basename(t), r = O(e);
|
|
313
315
|
return r === ".woff2" ? n.slice(0, -6) : r === ".woff" ? n.slice(0, -5) : n.replace(/\.[^.]+$/u, "");
|
|
314
|
-
},
|
|
316
|
+
}, He = {
|
|
315
317
|
".woff": "-woff",
|
|
316
318
|
".woff2": "-woff2"
|
|
317
|
-
},
|
|
318
|
-
let t = e.map((e) =>
|
|
319
|
+
}, Ue = (e) => {
|
|
320
|
+
let t = e.map((e) => Ve(e)), n = /* @__PURE__ */ new Map();
|
|
319
321
|
for (let e of t) n.set(e, (n.get(e) ?? 0) + 1);
|
|
320
322
|
return e.map((e, r) => {
|
|
321
323
|
let i = t[r], a = (n.get(i) ?? 0) > 1, o = O(e);
|
|
322
|
-
return a ? `${i}${
|
|
324
|
+
return a ? `${i}${He[o] ?? `-${r + 1}`}` : i;
|
|
323
325
|
});
|
|
324
326
|
};
|
|
325
|
-
})),
|
|
326
|
-
k(),
|
|
327
|
-
})),
|
|
328
|
-
|
|
327
|
+
})), We, Ge = r((() => {
|
|
328
|
+
k(), We = async (e) => (await Promise.all(e.map((e) => D(e) ? Promise.resolve([e]) : te(e)))).flat();
|
|
329
|
+
})), Ke, qe, Je, A, Ye = r((() => {
|
|
330
|
+
Ke = 1330926671, qe = 1953658213, Je = 65536, A = (e) => {
|
|
329
331
|
if (e.length < 4) throw Error("SFNT buffer is too short to read flavor");
|
|
330
332
|
let t = e.readUInt32BE(0);
|
|
331
|
-
if (t ===
|
|
332
|
-
if (t ===
|
|
333
|
+
if (t === Ke) return "otf";
|
|
334
|
+
if (t === qe || t === Je) return "ttf";
|
|
333
335
|
throw Error(`Unsupported SFNT flavor 0x${t.toString(16)}`);
|
|
334
336
|
};
|
|
335
|
-
})),
|
|
336
|
-
|
|
337
|
-
})), j, M, N,
|
|
338
|
-
|
|
339
|
-
|
|
337
|
+
})), Xe, Ze = r((() => {
|
|
338
|
+
Xe = (e) => Buffer.from(ce(e));
|
|
339
|
+
})), j, Qe, M, N, $e = r((() => {
|
|
340
|
+
Ze(), j = (e) => Xe(e), Qe = (e, t = {}) => ae(e, { type: "ttf" }).write({
|
|
341
|
+
type: "svg",
|
|
342
|
+
metadata: t.metadata
|
|
343
|
+
}), M = (e, t = {}) => Buffer.from(oe(e, t).buffer), N = async (e) => Buffer.from(await se.compress(e));
|
|
344
|
+
})), P, F, I, L, R, z, B, et, tt, nt, V, rt, it, at, H = r((() => {
|
|
340
345
|
k(), P = /* @__PURE__ */ new Set([".woff", ".woff2"]), F = ".svg", I = ".ttf", L = [
|
|
341
346
|
"svg",
|
|
342
347
|
"ttf",
|
|
343
348
|
"eot",
|
|
344
349
|
"woff",
|
|
345
350
|
"woff2"
|
|
346
|
-
], R = (e) => e === F, z = (e) => e === I, B = (e) => P.has(e),
|
|
351
|
+
], R = (e) => e === F, z = (e) => e === I, B = (e) => P.has(e), et = (e) => R(e) || B(e) || z(e), tt = (e) => {
|
|
347
352
|
if (e.length === 0) return "empty";
|
|
348
353
|
let t = e.map((e) => O(e));
|
|
349
|
-
if (!t.every(
|
|
354
|
+
if (!t.every(et)) return "empty";
|
|
350
355
|
let n = t.some(R), r = t.some(B), i = t.some(z);
|
|
351
356
|
return [
|
|
352
357
|
n,
|
|
353
358
|
r,
|
|
354
359
|
i
|
|
355
360
|
].filter(Boolean).length > 1 ? "mixed" : r ? "webfont" : i ? "ttf" : n ? "svg" : "empty";
|
|
356
|
-
},
|
|
361
|
+
}, nt = (e) => {
|
|
357
362
|
if (e.includes("otf")) throw Error("OTF output is only supported when converting WOFF/WOFF2 input. Request \"ttf\" for SVG icons, or pass a .woff/.woff2 file.");
|
|
358
|
-
}, V = (e, t) => t === "svg" ? e.filter((e) => O(e) === F) : t === "webfont" ? e.filter((e) => P.has(O(e))) : t === "ttf" ? e.filter((e) => O(e) === I) : [],
|
|
363
|
+
}, V = (e, t) => t === "svg" ? e.filter((e) => O(e) === F) : t === "webfont" ? e.filter((e) => P.has(O(e))) : t === "ttf" ? e.filter((e) => O(e) === I) : [], rt = /* @__PURE__ */ new Set([
|
|
359
364
|
"ttf",
|
|
365
|
+
"svg",
|
|
360
366
|
"eot",
|
|
361
367
|
"woff",
|
|
362
368
|
"woff2"
|
|
363
|
-
]),
|
|
364
|
-
let t = e.filter((e) =>
|
|
369
|
+
]), it = (e) => {
|
|
370
|
+
let t = e.filter((e) => rt.has(e));
|
|
365
371
|
if (e.length === L.length && L.every((t) => e.includes(t))) return ["woff", "woff2"];
|
|
366
|
-
if (t.length === 0) throw Error("formats must include at least one of \"ttf\", \"eot\", \"woff\", or \"woff2\" when converting TTF input");
|
|
372
|
+
if (t.length === 0) throw Error("formats must include at least one of \"svg\", \"ttf\", \"eot\", \"woff\", or \"woff2\" when converting TTF input");
|
|
367
373
|
return [...new Set(t)];
|
|
368
|
-
},
|
|
374
|
+
}, at = (e) => {
|
|
369
375
|
let t = e.filter((e) => e === "ttf" || e === "otf");
|
|
370
376
|
if (e.length === L.length && L.every((t) => e.includes(t))) return ["ttf"];
|
|
371
377
|
if (t.length === 0) throw Error("formats must include \"ttf\" and/or \"otf\" when converting WOFF/WOFF2 input");
|
|
372
378
|
return [...new Set(t)];
|
|
373
379
|
};
|
|
374
|
-
})),
|
|
375
|
-
k(),
|
|
380
|
+
})), ot, st, ct, U, lt, ut, dt, ft = r((() => {
|
|
381
|
+
k(), Ye(), $e(), H(), ot = (e) => {
|
|
376
382
|
if (e.length === 0) throw Error("No TTF files matched");
|
|
377
|
-
},
|
|
383
|
+
}, st = (e) => {
|
|
378
384
|
if (e.template) throw Error("Templates are not supported when converting TTF input");
|
|
379
385
|
if (e.glyphTransformFn) throw Error("glyphTransformFn is not supported when converting TTF input");
|
|
380
386
|
if (e.glyphContentTransformFn) throw Error("glyphContentTransformFn is not supported when converting TTF input");
|
|
381
|
-
},
|
|
387
|
+
}, ct = (e, t) => {
|
|
382
388
|
let n;
|
|
383
389
|
try {
|
|
384
390
|
n = A(e);
|
|
@@ -386,55 +392,60 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
386
392
|
throw Error(`Input is not a valid TrueType font: ${t}`);
|
|
387
393
|
}
|
|
388
394
|
if (n !== "ttf") throw Error(`OpenType (OTF) input is not supported for webfont encoding. Use a .ttf file for ${t}.`);
|
|
389
|
-
},
|
|
395
|
+
}, U = (e) => {
|
|
396
|
+
if (typeof e.metadata == "string") return e.metadata;
|
|
397
|
+
}, lt = async (e, t, n, r) => {
|
|
390
398
|
if (n === "ttf") {
|
|
391
399
|
e.ttf = t;
|
|
392
400
|
return;
|
|
393
401
|
}
|
|
402
|
+
if (n === "svg") {
|
|
403
|
+
e.svg = Qe(t, { metadata: U(r) });
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
394
406
|
if (n === "eot") {
|
|
395
407
|
e.eot = j(t);
|
|
396
408
|
return;
|
|
397
409
|
}
|
|
398
410
|
if (n === "woff") {
|
|
399
|
-
|
|
400
|
-
typeof r.metadata == "string" && (n = r.metadata), e.woff = M(t, { metadata: n });
|
|
411
|
+
e.woff = M(t, { metadata: U(r) });
|
|
401
412
|
return;
|
|
402
413
|
}
|
|
403
414
|
e.woff2 = await N(t);
|
|
404
|
-
},
|
|
415
|
+
}, ut = async (e, t, n, r) => {
|
|
405
416
|
if (D(e)) throw Error(`Remote TTF URLs are not supported. Download the file first: ${e}`);
|
|
406
417
|
r && console.log(`Encoding ${e}...`);
|
|
407
418
|
let i = await ie.readFile(e);
|
|
408
|
-
|
|
419
|
+
ct(i, e);
|
|
409
420
|
let a = { source: e };
|
|
410
|
-
return await Promise.all(t.map((e) =>
|
|
411
|
-
},
|
|
412
|
-
|
|
413
|
-
let n =
|
|
421
|
+
return await Promise.all(t.map((e) => lt(a, i, e, n))), a;
|
|
422
|
+
}, dt = async (e, t) => {
|
|
423
|
+
st(t), ot(e);
|
|
424
|
+
let n = it(t.formats), r = await Promise.all(e.map((e) => ut(e, n, t, t.verbose))), i = {
|
|
414
425
|
config: { ...t },
|
|
415
426
|
transcodedFonts: r
|
|
416
427
|
};
|
|
417
428
|
if (r.length === 1) {
|
|
418
429
|
let [e] = r;
|
|
419
|
-
i.ttf = e.ttf, i.eot = e.eot, i.woff = e.woff, i.woff2 = e.woff2;
|
|
430
|
+
i.svg = e.svg, i.ttf = e.ttf, i.eot = e.eot, i.woff = e.woff, i.woff2 = e.woff2;
|
|
420
431
|
}
|
|
421
432
|
return i;
|
|
422
433
|
};
|
|
423
|
-
})),
|
|
434
|
+
})), pt = /* @__PURE__ */ a(((e, t) => {
|
|
424
435
|
t.exports = function(e) {
|
|
425
436
|
return !e || e.length < 8 ? !1 : e[0] === 119 && e[1] === 79 && e[2] === 70 && e[3] === 70 && e[4] === 0 && e[5] === 1 && e[6] === 0 && e[7] === 0 || e[4] === 79 && e[5] === 84 && e[6] === 84 && e[7] === 79;
|
|
426
437
|
};
|
|
427
|
-
})),
|
|
438
|
+
})), mt = /* @__PURE__ */ a(((e, t) => {
|
|
428
439
|
t.exports = function(e) {
|
|
429
440
|
return !e || e.length < 8 ? !1 : e[0] === 119 && e[1] === 79 && e[2] === 70 && e[3] === 50 && e[4] === 0 && e[5] === 1 && e[6] === 0 && e[7] === 0;
|
|
430
441
|
};
|
|
431
|
-
})),
|
|
432
|
-
|
|
442
|
+
})), ht, gt, _t, vt, yt = r((() => {
|
|
443
|
+
ht = /* @__PURE__ */ n(pt()), gt = /* @__PURE__ */ n(mt()), k(), _t = (e, t) => {
|
|
433
444
|
let n = O(t);
|
|
434
|
-
if (n === ".woff2" && !(0,
|
|
435
|
-
if (n === ".woff" && !(0,
|
|
445
|
+
if (n === ".woff2" && !(0, gt.default)(e)) throw Error(`URL did not return a valid WOFF2 font: ${t}`);
|
|
446
|
+
if (n === ".woff" && !(0, ht.default)(e)) throw Error(`URL did not return a valid WOFF font: ${t}`);
|
|
436
447
|
if (e.length === 0) throw Error(`URL returned an empty response: ${t}`);
|
|
437
|
-
},
|
|
448
|
+
}, vt = async (e) => {
|
|
438
449
|
let t;
|
|
439
450
|
try {
|
|
440
451
|
t = await fetch(e);
|
|
@@ -444,16 +455,16 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
444
455
|
}
|
|
445
456
|
if (!t.ok) throw Error(`Failed to fetch font URL ${e}: HTTP ${t.status} ${t.statusText}`);
|
|
446
457
|
let n = await t.arrayBuffer(), r = Buffer.from(n);
|
|
447
|
-
return
|
|
458
|
+
return _t(r, e), r;
|
|
448
459
|
};
|
|
449
|
-
})),
|
|
450
|
-
k(),
|
|
460
|
+
})), bt, xt, St, Ct, wt, Tt, Et = r((() => {
|
|
461
|
+
k(), Ye(), yt(), H(), bt = (e) => {
|
|
451
462
|
if (e.length === 0) throw Error("No WOFF or WOFF2 files matched");
|
|
452
|
-
},
|
|
463
|
+
}, xt = (e) => {
|
|
453
464
|
if (e.template) throw Error("Templates are not supported when converting WOFF/WOFF2 input");
|
|
454
465
|
if (e.glyphTransformFn) throw Error("glyphTransformFn is not supported when converting WOFF/WOFF2 input");
|
|
455
466
|
if (e.glyphContentTransformFn) throw Error("glyphContentTransformFn is not supported when converting WOFF/WOFF2 input");
|
|
456
|
-
},
|
|
467
|
+
}, St = (e) => {
|
|
457
468
|
let { decompressed: t, sfnt: n, format: r, flavor: i, source: a } = e;
|
|
458
469
|
if (r === "ttf" && i !== "ttf") throw Error(`Input decompresses to OpenType (OTF). Request "otf" format instead of "ttf" for ${a}.`);
|
|
459
470
|
if (r === "otf" && i !== "otf") throw Error(`Input decompresses to TrueType (TTF). Request "ttf" format instead of "otf" for ${a}.`);
|
|
@@ -462,10 +473,10 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
462
473
|
return;
|
|
463
474
|
}
|
|
464
475
|
t.otf = n;
|
|
465
|
-
},
|
|
476
|
+
}, Ct = (e) => D(e) ? vt(e) : ie.readFile(e), wt = async (e, t, n) => {
|
|
466
477
|
n && console.log(`Decompressing ${e}...`);
|
|
467
|
-
let r = await
|
|
468
|
-
for (let n of t)
|
|
478
|
+
let r = await Ct(e), i = Buffer.from(await le.convert(r, "sfnt")), a = A(i), o = { source: e };
|
|
479
|
+
for (let n of t) St({
|
|
469
480
|
decompressed: o,
|
|
470
481
|
sfnt: i,
|
|
471
482
|
format: n,
|
|
@@ -473,28 +484,28 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
473
484
|
source: e
|
|
474
485
|
});
|
|
475
486
|
return o;
|
|
476
|
-
},
|
|
477
|
-
|
|
478
|
-
let n =
|
|
487
|
+
}, Tt = async (e, t) => {
|
|
488
|
+
xt(t), bt(e);
|
|
489
|
+
let n = at(t.formats), r = await Promise.all(e.map((e) => wt(e, n, t.verbose))), i = {
|
|
479
490
|
config: { ...t },
|
|
480
491
|
decompressedFonts: r
|
|
481
492
|
};
|
|
482
493
|
return r.length === 1 && (i.ttf = r[0].ttf, i.otf = r[0].otf), i;
|
|
483
494
|
};
|
|
484
|
-
})),
|
|
485
|
-
|
|
486
|
-
})),
|
|
487
|
-
|
|
495
|
+
})), Dt, Ot = r((() => {
|
|
496
|
+
Dt = de;
|
|
497
|
+
})), kt, At, jt, Mt = r((() => {
|
|
498
|
+
kt = (e) => ({
|
|
488
499
|
prependUnicode: !!e.prependUnicode,
|
|
489
500
|
startUnicode: Number(e.startUnicode)
|
|
490
|
-
}),
|
|
501
|
+
}), At = (e) => {
|
|
491
502
|
if (e == null) return;
|
|
492
503
|
if (typeof e == "number") return Number.isFinite(e) ? e : void 0;
|
|
493
504
|
let t = e.trim();
|
|
494
505
|
if (t.length === 0) return;
|
|
495
506
|
let n = Number(t);
|
|
496
507
|
if (Number.isFinite(n)) return n;
|
|
497
|
-
},
|
|
508
|
+
}, jt = (e) => ({
|
|
498
509
|
ascent: e.ascent,
|
|
499
510
|
centerHorizontally: e.centerHorizontally,
|
|
500
511
|
centerVertically: e.centerVertically,
|
|
@@ -507,14 +518,14 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
507
518
|
fontWeight: e.fontWeight,
|
|
508
519
|
metadata: e.metadata,
|
|
509
520
|
normalize: e.normalize,
|
|
510
|
-
round:
|
|
521
|
+
round: At(e.round)
|
|
511
522
|
});
|
|
512
|
-
})),
|
|
513
|
-
|
|
523
|
+
})), Nt, Pt, Ft, It = r((() => {
|
|
524
|
+
Ot(), Mt(), Nt = (e) => e === void 0 ? [] : Array.isArray(e) ? e : [e], Pt = (e) => ({
|
|
514
525
|
name: e.name,
|
|
515
|
-
unicode:
|
|
516
|
-
}),
|
|
517
|
-
let n = t.metadataProvider ||
|
|
526
|
+
unicode: Nt(e.unicode)
|
|
527
|
+
}), Ft = (e, t) => {
|
|
528
|
+
let n = t.metadataProvider || me(kt(t)), r = new ue.Parser(), i = Dt(t.maxConcurrency);
|
|
518
529
|
return Promise.all(e.map((e) => i(() => new Promise((t, n) => {
|
|
519
530
|
let i = u(e), a = "";
|
|
520
531
|
i.on("error", (e) => n(e)).on("data", (e) => {
|
|
@@ -525,20 +536,20 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
525
536
|
})));
|
|
526
537
|
})))).then((e) => {
|
|
527
538
|
let r = e;
|
|
528
|
-
t.sort && (r = e.sort((e, t) =>
|
|
539
|
+
t.sort && (r = e.sort((e, t) => pe(e.srcPath, t.srcPath)));
|
|
529
540
|
let { ligatures: i } = t;
|
|
530
541
|
return Promise.all(r.map((e) => new Promise((t, r) => {
|
|
531
542
|
n(e.srcPath, (n, a) => {
|
|
532
543
|
if (n) return r(n);
|
|
533
544
|
if (!a) return r(/* @__PURE__ */ Error(`Missing metadata for ${e.srcPath}`));
|
|
534
|
-
let o =
|
|
545
|
+
let o = Pt(a);
|
|
535
546
|
return i && o.unicode.push(a.name.replace(/-/gu, "_")), e.metadata = o, t(e);
|
|
536
547
|
});
|
|
537
548
|
})));
|
|
538
549
|
});
|
|
539
550
|
};
|
|
540
|
-
})),
|
|
541
|
-
|
|
551
|
+
})), Lt, Rt = r((() => {
|
|
552
|
+
Lt = () => ({
|
|
542
553
|
centerHorizontally: !1,
|
|
543
554
|
centerVertically: !1,
|
|
544
555
|
descent: 0,
|
|
@@ -572,16 +583,16 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
572
583
|
unicodeRange: !1,
|
|
573
584
|
verbose: !1
|
|
574
585
|
});
|
|
575
|
-
})),
|
|
576
|
-
|
|
586
|
+
})), zt, Bt = r((() => {
|
|
587
|
+
Rt(), zt = (e) => {
|
|
577
588
|
if (!e?.files) throw Error("You must pass webfont a `files` glob");
|
|
578
589
|
return {
|
|
579
|
-
...
|
|
590
|
+
...Lt(),
|
|
580
591
|
...e
|
|
581
592
|
};
|
|
582
593
|
};
|
|
583
|
-
})),
|
|
584
|
-
|
|
594
|
+
})), Vt, Ht, Ut, Wt = r((() => {
|
|
595
|
+
Vt = () => ({
|
|
585
596
|
multipass: !1,
|
|
586
597
|
plugins: [
|
|
587
598
|
"removeDoctype",
|
|
@@ -593,54 +604,54 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
593
604
|
"cleanupAttrs",
|
|
594
605
|
"removeUnusedNS"
|
|
595
606
|
]
|
|
596
|
-
}),
|
|
597
|
-
let t =
|
|
607
|
+
}), Ht = (e) => {
|
|
608
|
+
let t = Vt();
|
|
598
609
|
return e ? {
|
|
599
610
|
...t,
|
|
600
611
|
...e,
|
|
601
612
|
plugins: e.plugins ?? t.plugins
|
|
602
613
|
} : t;
|
|
603
|
-
},
|
|
604
|
-
...
|
|
614
|
+
}, Ut = (e, t, n) => ge(e, {
|
|
615
|
+
...Ht(n),
|
|
605
616
|
path: t
|
|
606
617
|
}).data;
|
|
607
|
-
})),
|
|
608
|
-
|
|
618
|
+
})), Gt, Kt = r((() => {
|
|
619
|
+
Wt(), Gt = (e, t) => e.map((e) => ({
|
|
609
620
|
...e,
|
|
610
|
-
contents:
|
|
621
|
+
contents: Ut(e.contents, e.srcPath, t)
|
|
611
622
|
}));
|
|
612
|
-
})),
|
|
613
|
-
|
|
614
|
-
})),
|
|
615
|
-
|
|
623
|
+
})), qt, Jt, Yt = r((() => {
|
|
624
|
+
qt = (e, t) => t && e > 2e3, Jt = (e) => `Warning: ${e} glyphs with ligatures enabled may cause severe browser slowdown or hangs (especially Firefox on Windows). Ligatures are off by default; enable only if needed: --ligatures or ligatures: true. See TROUBLESHOOTING.md and https://github.com/itgalaxy/webfont/issues/558`;
|
|
625
|
+
})), Xt, Zt, Qt, $t, en, tn, nn, rn = r((() => {
|
|
626
|
+
Xt = /<glyph\b([^>/]*)(?:\/>|>)/giu, Zt = /\bglyph-name=["']([^"']+)["']/iu, Qt = /\bd=["']([^"']*)["']/iu, $t = (e) => {
|
|
616
627
|
let t = [];
|
|
617
|
-
for (let n of e.matchAll(
|
|
618
|
-
let e = n[1] ?? "", r =
|
|
619
|
-
r && (
|
|
628
|
+
for (let n of e.matchAll(Xt)) {
|
|
629
|
+
let e = n[1] ?? "", r = Zt.exec(e);
|
|
630
|
+
r && (Qt.exec(e)?.[1] ?? "").trim().length === 0 && t.push(r[1]);
|
|
620
631
|
}
|
|
621
632
|
return t;
|
|
622
|
-
},
|
|
633
|
+
}, en = (e, t) => {
|
|
623
634
|
for (let n of t) {
|
|
624
635
|
let t = n.metadata?.name;
|
|
625
636
|
if (t && (e === t || e.startsWith(`${t}-`))) return n.srcPath;
|
|
626
637
|
}
|
|
627
|
-
},
|
|
638
|
+
}, tn = (e, t) => {
|
|
628
639
|
let n = /* @__PURE__ */ new Set(), r = [];
|
|
629
640
|
for (let i of e) {
|
|
630
|
-
let e =
|
|
641
|
+
let e = en(i, t), a = e ?? i;
|
|
631
642
|
n.has(a) || (n.add(a), e ? r.push(`${i} (${e})`) : r.push(i));
|
|
632
643
|
}
|
|
633
644
|
return r.join("; ");
|
|
634
|
-
},
|
|
635
|
-
let n =
|
|
645
|
+
}, nn = (e, t) => {
|
|
646
|
+
let n = $t(e);
|
|
636
647
|
if (n.length === 0) return;
|
|
637
|
-
let r =
|
|
648
|
+
let r = tn(n, t);
|
|
638
649
|
throw Error(`Empty glyph path(s) in SVG font output for: ${r}. Stroke-only SVGs (fill="none" with stroke) often produce empty glyphs because svgicons2svgfont does not convert strokes. Convert strokes to filled paths in your design tool, preprocess with glyphContentTransformFn (for example svg-outline-stroke), or run with --svg-diagnose for compatibility warnings. See TROUBLESHOOTING.md ("Stroke-only SVGs produce blank icons").`);
|
|
639
650
|
};
|
|
640
|
-
})),
|
|
641
|
-
|
|
642
|
-
})),
|
|
643
|
-
|
|
651
|
+
})), an, on, sn = r((() => {
|
|
652
|
+
an = /fill-rule\s*:\s*evenodd|fill-rule\s*=\s*["']evenodd["']/iu, on = (e) => an.test(e);
|
|
653
|
+
})), cn, ln, un, dn, fn, pn, mn, W, hn, gn, _n, vn = r((() => {
|
|
654
|
+
sn(), cn = /\bstroke\s*=|\bstroke\s*:/iu, ln = /fill\s*=\s*["']none["']|fill\s*:\s*none/iu, un = /<(line|polyline|clipPath)\b/iu, dn = /<use\b/iu, fn = (e) => cn.test(e) ? ln.test(e) : !1, pn = (e) => un.test(e), mn = (e) => dn.test(e), W = (e, t) => {
|
|
644
655
|
switch (e) {
|
|
645
656
|
case "evenodd-fill-rule": return `[webfont:diagnose] ${t} uses fill-rule: evenodd. Icon fonts render glyphs with the nonzero fill rule, so holes and counter-shapes can disappear. See TROUBLESHOOTING.md ("Icon details missing after export").`;
|
|
646
657
|
case "stroke-only": return `[webfont:diagnose] ${t} uses stroke-based paths (fill="none"). svgicons2svgfont ignores stroke; outlines may render as solid shapes or lose detail. Preprocess with glyphContentTransformFn (for example svg-outline-stroke) before conversion. See TROUBLESHOOTING.md ("Icon details missing after export").`;
|
|
@@ -648,36 +659,36 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
648
659
|
case "use-reference": return `[webfont:diagnose] ${t} contains <use> (symbol/instance references). svgicons2svgfont does not resolve <use> or apply transform on references — the glyph may be empty or wrong. Flatten to paths in your editor, or preprocess with SVGO / glyphContentTransformFn before conversion. See TROUBLESHOOTING.md ("SVG transform and <use> references", #612).`;
|
|
649
660
|
default: return e;
|
|
650
661
|
}
|
|
651
|
-
},
|
|
662
|
+
}, hn = (e, t) => {
|
|
652
663
|
let n = [];
|
|
653
|
-
return
|
|
664
|
+
return on(t) && n.push({
|
|
654
665
|
code: "evenodd-fill-rule",
|
|
655
|
-
message:
|
|
666
|
+
message: W("evenodd-fill-rule", e),
|
|
656
667
|
srcPath: e
|
|
657
|
-
}),
|
|
668
|
+
}), fn(t) && n.push({
|
|
658
669
|
code: "stroke-only",
|
|
659
|
-
message:
|
|
670
|
+
message: W("stroke-only", e),
|
|
660
671
|
srcPath: e
|
|
661
|
-
}),
|
|
672
|
+
}), pn(t) && n.push({
|
|
662
673
|
code: "unsupported-element",
|
|
663
|
-
message:
|
|
674
|
+
message: W("unsupported-element", e),
|
|
664
675
|
srcPath: e
|
|
665
|
-
}),
|
|
676
|
+
}), mn(t) && n.push({
|
|
666
677
|
code: "use-reference",
|
|
667
|
-
message:
|
|
678
|
+
message: W("use-reference", e),
|
|
668
679
|
srcPath: e
|
|
669
680
|
}), n;
|
|
670
|
-
},
|
|
671
|
-
})),
|
|
672
|
-
|
|
681
|
+
}, gn = (e) => e.flatMap((e) => hn(e.srcPath, e.contents)), _n = (e, t) => t.diagnose ? !0 : !!(t.verbose && e.code === "evenodd-fill-rule");
|
|
682
|
+
})), yn, bn = r((() => {
|
|
683
|
+
yn = (e) => {
|
|
673
684
|
if (!e || !e.diagnose) return;
|
|
674
685
|
let t = { diagnose: !0 };
|
|
675
686
|
return e.onMessage && (t.onMessage = e.onMessage), t;
|
|
676
687
|
};
|
|
677
|
-
})),
|
|
678
|
-
|
|
679
|
-
let r =
|
|
680
|
-
for (let e of i)
|
|
688
|
+
})), xn, Sn = r((() => {
|
|
689
|
+
vn(), bn(), xn = (e, t, n = {}) => {
|
|
690
|
+
let r = yn(t), i = gn(e), { reporter: a, verbose: o = !1 } = n;
|
|
691
|
+
for (let e of i) _n(e, {
|
|
681
692
|
diagnose: r?.diagnose,
|
|
682
693
|
verbose: o
|
|
683
694
|
}) && a?.(e.message);
|
|
@@ -687,24 +698,24 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
687
698
|
glyphs: e
|
|
688
699
|
};
|
|
689
700
|
};
|
|
690
|
-
})),
|
|
691
|
-
|
|
692
|
-
let { diagnostics: r, glyphs: i } =
|
|
701
|
+
})), Cn, wn = r((() => {
|
|
702
|
+
Sn(), Cn = (e, t, n = {}) => {
|
|
703
|
+
let { diagnostics: r, glyphs: i } = xn(e, t, n);
|
|
693
704
|
return {
|
|
694
705
|
diagnostics: r,
|
|
695
706
|
glyphs: i
|
|
696
707
|
};
|
|
697
708
|
};
|
|
698
|
-
})),
|
|
699
|
-
|
|
709
|
+
})), Tn, En = r((() => {
|
|
710
|
+
Mt(), Tn = (e, t) => {
|
|
700
711
|
let n = "";
|
|
701
712
|
return new Promise((r, i) => {
|
|
702
713
|
t.verbose && console.log("Generating SVG font...");
|
|
703
|
-
let a = new
|
|
714
|
+
let a = new fe(jt(t)).on("finish", () => r(n)).on("data", (e) => {
|
|
704
715
|
n += e;
|
|
705
716
|
}).on("error", (e) => i(e));
|
|
706
717
|
e.forEach((e) => {
|
|
707
|
-
let t = new
|
|
718
|
+
let t = new _e();
|
|
708
719
|
t.push(e.contents), t.push(null), t.metadata = e.metadata ?? {
|
|
709
720
|
name: "",
|
|
710
721
|
unicode: []
|
|
@@ -712,10 +723,10 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
712
723
|
}), a.end();
|
|
713
724
|
});
|
|
714
725
|
};
|
|
715
|
-
})),
|
|
716
|
-
|
|
717
|
-
})),
|
|
718
|
-
|
|
726
|
+
})), Dn, On = r((() => {
|
|
727
|
+
Dn = (e, t = {}) => Buffer.from(ve(e, t).buffer);
|
|
728
|
+
})), kn, An, jn, Mn, Nn = r((() => {
|
|
729
|
+
Kt(), Yt(), rn(), wn(), $e(), En(), On(), kn = (e) => j(e), An = (e, t) => M(e, t), jn = (e) => N(e), Mn = async (e, t) => {
|
|
719
730
|
let n = (e) => {
|
|
720
731
|
if (t.svgTools?.onMessage) {
|
|
721
732
|
t.svgTools.onMessage(e);
|
|
@@ -724,11 +735,11 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
724
735
|
(t.svgTools?.diagnose || t.verbose) && console.log(e);
|
|
725
736
|
}, r = !!(t.svgTools?.onMessage || t.svgTools?.diagnose || t.verbose), i;
|
|
726
737
|
r && (i = n);
|
|
727
|
-
let { diagnostics: a, glyphs: o } =
|
|
738
|
+
let { diagnostics: a, glyphs: o } = Cn(e, t.svgTools, {
|
|
728
739
|
reporter: i,
|
|
729
740
|
verbose: t.verbose
|
|
730
741
|
}), s = o;
|
|
731
|
-
if (t.optimizeSvg && (s =
|
|
742
|
+
if (t.optimizeSvg && (s = Gt(s, t.svgoConfig)), t.glyphContentTransformFn) {
|
|
732
743
|
let e = t.glyphContentTransformFn;
|
|
733
744
|
s = await Promise.all(s.map(async (t) => {
|
|
734
745
|
let n = await e(t);
|
|
@@ -751,12 +762,12 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
751
762
|
};
|
|
752
763
|
}));
|
|
753
764
|
}
|
|
754
|
-
|
|
765
|
+
qt(s.length, t.ligatures) && console.log(Jt(s.length));
|
|
755
766
|
let c = {};
|
|
756
767
|
t.formatsOptions?.ttf && (c = t.formatsOptions.ttf);
|
|
757
|
-
let l = await
|
|
758
|
-
|
|
759
|
-
let u =
|
|
768
|
+
let l = await Tn(s, t);
|
|
769
|
+
nn(l, s);
|
|
770
|
+
let u = Dn(l, c);
|
|
760
771
|
if (t.ttfPostProcess) {
|
|
761
772
|
let e = await t.ttfPostProcess(u, {
|
|
762
773
|
fontName: t.fontName,
|
|
@@ -767,50 +778,50 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
767
778
|
let d = {
|
|
768
779
|
config: t,
|
|
769
780
|
glyphsData: s,
|
|
770
|
-
hash:
|
|
781
|
+
hash: he.createHash("md5").update(l).digest("hex"),
|
|
771
782
|
svg: l,
|
|
772
783
|
ttf: u
|
|
773
784
|
};
|
|
774
785
|
a.length > 0 && (d.svgDiagnostics = a);
|
|
775
786
|
let { formats: f } = t;
|
|
776
|
-
if (f.includes("eot") && (d.eot =
|
|
787
|
+
if (f.includes("eot") && (d.eot = kn(u)), f.includes("woff")) {
|
|
777
788
|
let e;
|
|
778
|
-
typeof t.metadata == "string" && (e = t.metadata), d.woff =
|
|
789
|
+
typeof t.metadata == "string" && (e = t.metadata), d.woff = An(u, { metadata: e });
|
|
779
790
|
}
|
|
780
|
-
if (f.includes("woff2") && (d.woff2 = Buffer.from(await
|
|
791
|
+
if (f.includes("woff2") && (d.woff2 = Buffer.from(await jn(u))), t.template) {
|
|
781
792
|
let { renderTemplates: e } = await import("./renderTemplates-CXVKq3Op.mjs"), { templates: n, usedBuildInTemplate: r } = e(t, d, f);
|
|
782
793
|
n.length > 0 && (d.templates = n, d.template = n[0]?.content, d.usedBuildInTemplate = r);
|
|
783
794
|
}
|
|
784
795
|
return f.includes("svg") || delete d.svg, f.includes("ttf") || delete d.ttf, f.includes("otf") || delete d.otf, d;
|
|
785
796
|
};
|
|
786
|
-
})),
|
|
787
|
-
|
|
797
|
+
})), G, Pn, K, q, Fn, In = r((() => {
|
|
798
|
+
G = /* @__PURE__ */ new Set([
|
|
788
799
|
"eot",
|
|
789
800
|
"otf",
|
|
790
801
|
"svg",
|
|
791
802
|
"ttf",
|
|
792
803
|
"woff",
|
|
793
804
|
"woff2"
|
|
794
|
-
]),
|
|
795
|
-
if (typeof e != "string" || !
|
|
805
|
+
]), Pn = [...G].join(", "), K = (e) => {
|
|
806
|
+
if (typeof e != "string" || !G.has(e)) throw Error(`Invalid format "${String(e)}". Expected one of: ${Pn}`);
|
|
796
807
|
return e;
|
|
797
|
-
},
|
|
808
|
+
}, q = (e) => {
|
|
798
809
|
if (e.length === 0) throw Error("formats must not be empty");
|
|
799
|
-
return e.map(
|
|
800
|
-
},
|
|
810
|
+
return e.map(K);
|
|
811
|
+
}, Fn = (e) => {
|
|
801
812
|
if (!Array.isArray(e)) throw Error("formats must be an array of format names (e.g. [\"woff2\", \"svg\"])");
|
|
802
|
-
return
|
|
813
|
+
return q(e);
|
|
803
814
|
};
|
|
804
|
-
})),
|
|
805
|
-
|
|
815
|
+
})), J, Ln, Y, Rn, zn, Bn, Vn = r((() => {
|
|
816
|
+
In(), o(), J = (e, t) => {
|
|
806
817
|
if (t !== void 0 && typeof t != "string") throw Error(`${e} must be a string`);
|
|
807
|
-
},
|
|
818
|
+
}, Ln = (e, t) => {
|
|
808
819
|
if (t !== void 0 && typeof t != "boolean" && typeof t != "string") throw Error(`${e} must be a boolean or string`);
|
|
809
|
-
},
|
|
820
|
+
}, Y = (e, t) => {
|
|
810
821
|
if (t !== void 0 && typeof t != "boolean") throw Error(`${e} must be a boolean`);
|
|
811
|
-
},
|
|
822
|
+
}, Rn = (e, t) => {
|
|
812
823
|
if (t !== void 0 && (typeof t != "object" || !t || Array.isArray(t))) throw Error(`${e} must be an object`);
|
|
813
|
-
},
|
|
824
|
+
}, zn = (e) => {
|
|
814
825
|
if (typeof e == "string") {
|
|
815
826
|
if (e.length === 0) throw Error("files must not be empty");
|
|
816
827
|
return;
|
|
@@ -821,52 +832,52 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
821
832
|
return;
|
|
822
833
|
}
|
|
823
834
|
throw Error("files must be a string or an array of strings");
|
|
824
|
-
},
|
|
825
|
-
})),
|
|
826
|
-
|
|
835
|
+
}, Bn = (e) => (zn(e.files), e.formats = Fn(e.formats), J("fontName", e.fontName), Ln("unicodeRange", e.unicodeRange), Y("optimizeSvg", e.optimizeSvg), Rn("svgoConfig", e.svgoConfig), Y("templateFontLigatures", e.templateFontLigatures), e.template !== void 0 && i(e.template), J("templateFontPath", e.templateFontPath), e);
|
|
836
|
+
})), Hn, X, Un, Wn, Gn = r((() => {
|
|
837
|
+
Ge(), ft(), Et(), It(), H(), Bt(), Nn(), Vn(), Hn = (e) => "filepath" in e, X = async (e) => {
|
|
827
838
|
let t = ne("webfont", { searchStrategy: "global" });
|
|
828
839
|
if (e.configFile) {
|
|
829
840
|
let n = f.resolve(process.cwd(), e.configFile);
|
|
830
841
|
return await t.load(n) ?? {};
|
|
831
842
|
}
|
|
832
843
|
return await t.search(process.cwd()) ?? {};
|
|
833
|
-
},
|
|
834
|
-
let t =
|
|
844
|
+
}, Un = X, Wn = async (e) => {
|
|
845
|
+
let t = zt(e);
|
|
835
846
|
delete t.filePath;
|
|
836
|
-
let n = await
|
|
837
|
-
|
|
847
|
+
let n = await X({ configFile: t.configFile }), r;
|
|
848
|
+
Hn(n) && (t = re(t, n.config, { arrayMerge: (e, t) => t }), r = n.filepath), t = Bn(t);
|
|
838
849
|
let i;
|
|
839
850
|
i = Array.isArray(t.files) ? t.files : [t.files];
|
|
840
|
-
let a = await
|
|
851
|
+
let a = await We(i), o = tt(a);
|
|
841
852
|
if (o === "mixed") throw Error("Cannot mix SVG icons, TTF fonts, and WOFF/WOFF2 files in the same run");
|
|
842
853
|
if (o === "empty") throw Error("Files glob patterns specified did not match any supported files");
|
|
843
854
|
if (o === "webfont") {
|
|
844
|
-
let e = await
|
|
855
|
+
let e = await Tt(V(a, o), t);
|
|
845
856
|
return r && (e.config = {
|
|
846
857
|
...t,
|
|
847
858
|
filePath: r
|
|
848
859
|
}), e;
|
|
849
860
|
}
|
|
850
861
|
if (o === "ttf") {
|
|
851
|
-
let e = await
|
|
862
|
+
let e = await dt(V(a, o), t);
|
|
852
863
|
return r && (e.config = {
|
|
853
864
|
...t,
|
|
854
865
|
filePath: r
|
|
855
866
|
}), e;
|
|
856
867
|
}
|
|
857
|
-
|
|
858
|
-
let s = await
|
|
868
|
+
nt(t.formats);
|
|
869
|
+
let s = await Mn(await Ft(V(a, "svg"), t), t);
|
|
859
870
|
return r ? s.config = {
|
|
860
871
|
...t,
|
|
861
872
|
filePath: r
|
|
862
873
|
} : s.config = t, s;
|
|
863
874
|
};
|
|
864
|
-
})),
|
|
865
|
-
|
|
875
|
+
})), Kn, qn = r((() => {
|
|
876
|
+
Kn = (e) => {
|
|
866
877
|
if (e.svgDiagnose) return { diagnose: !0 };
|
|
867
878
|
};
|
|
868
|
-
})),
|
|
869
|
-
|
|
879
|
+
})), Jn, Yn = r((() => {
|
|
880
|
+
In(), Jn = (e) => {
|
|
870
881
|
if (e === void 0) return;
|
|
871
882
|
let t = e.trim();
|
|
872
883
|
if (t.length === 0) throw Error("formats must not be empty");
|
|
@@ -878,12 +889,12 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
878
889
|
throw Error("formats must be a JSON array (e.g. [\"woff2\",\"svg\"]) or comma-separated list");
|
|
879
890
|
}
|
|
880
891
|
if (!Array.isArray(e)) throw Error("formats must be a JSON array (e.g. [\"woff2\",\"svg\"]) or comma-separated list");
|
|
881
|
-
return
|
|
892
|
+
return q(e);
|
|
882
893
|
}
|
|
883
|
-
return t.split(",").map((e) => e.trim()).filter((e) => e.length > 0).map(
|
|
894
|
+
return t.split(",").map((e) => e.trim()).filter((e) => e.length > 0).map(K);
|
|
884
895
|
};
|
|
885
|
-
})),
|
|
886
|
-
o(),
|
|
896
|
+
})), Xn, Zn = r((() => {
|
|
897
|
+
o(), Xn = (e) => {
|
|
887
898
|
if (e === void 0) return;
|
|
888
899
|
let t = e.trim();
|
|
889
900
|
if (t.length === 0) throw Error("template must not be empty");
|
|
@@ -899,16 +910,16 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
899
910
|
}
|
|
900
911
|
return t.includes(",") ? i(t.split(",").map((e) => e.trim()).filter((e) => e.length > 0)) : t;
|
|
901
912
|
};
|
|
902
|
-
})),
|
|
903
|
-
|
|
913
|
+
})), Qn, $n, er = r((() => {
|
|
914
|
+
Gn(), Qn = (e) => {
|
|
904
915
|
if (!(!("config" in e) || e.config?.files === void 0)) return Array.isArray(e.config.files) ? e.config.files : [e.config.files];
|
|
905
|
-
},
|
|
906
|
-
let n = await
|
|
916
|
+
}, $n = async (e, t) => {
|
|
917
|
+
let n = await Un({ configFile: t.configFile }), r = Qn(n);
|
|
907
918
|
if (e.input.length > 0 && r !== void 0) throw Error("Cannot specify input files on the command line when `files` is set in the config file");
|
|
908
919
|
return e.input.length > 0 ? e.input : r === void 0 ? [] : r;
|
|
909
920
|
};
|
|
910
|
-
})),
|
|
911
|
-
|
|
921
|
+
})), tr, nr, Z, rr, Q, ir, ar, or, sr, cr, lr, $, ur, dr, fr, pr, mr, hr, gr, _r = r((() => {
|
|
922
|
+
Ge(), Gn(), qn(), Yn(), Zn(), er(), tr = [
|
|
912
923
|
"svg",
|
|
913
924
|
"ttf",
|
|
914
925
|
"otf",
|
|
@@ -917,37 +928,37 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
917
928
|
"woff2",
|
|
918
929
|
"hash",
|
|
919
930
|
"template"
|
|
920
|
-
],
|
|
931
|
+
], nr = (e) => {
|
|
921
932
|
let t = {};
|
|
922
|
-
typeof e.flags.config == "string" && (t.configFile = ee.silent(process.cwd(), e.flags.config) || d.join(process.cwd(), e.flags.config)), e.flags.fontName && (t.fontName = e.flags.fontName), e.flags.formats && (t.formats =
|
|
923
|
-
let n =
|
|
933
|
+
typeof e.flags.config == "string" && (t.configFile = ee.silent(process.cwd(), e.flags.config) || d.join(process.cwd(), e.flags.config)), e.flags.fontName && (t.fontName = e.flags.fontName), e.flags.formats && (t.formats = Jn(e.flags.formats)), e.flags.dest && (t.dest = e.flags.dest), e.flags.destCreate && (t.destCreate = e.flags.destCreate), e.flags.template && (t.template = Xn(e.flags.template)), e.flags.templateClassName && (t.templateClassName = e.flags.templateClassName), e.flags.templateFontPath && (t.templateFontPath = e.flags.templateFontPath), e.flags.templateFontName && (t.templateFontName = e.flags.templateFontName), e.flags.templateCacheString && (t.templateCacheString = e.flags.templateCacheString), e.flags.destTemplate && (t.destTemplate = e.flags.destTemplate), e.flags.verbose && (t.verbose = e.flags.verbose), e.flags.fontId && (t.fontId = e.flags.fontId), e.flags.fontStyle && (t.fontStyle = e.flags.fontStyle), e.flags.fontWeight && (t.fontWeight = e.flags.fontWeight), e.flags.fixedWidth && (t.fixedWidth = e.flags.fixedWidth), e.flags.centerHorizontally && (t.centerHorizontally = e.flags.centerHorizontally), e.flags.centerVertically && (t.centerVertically = e.flags.centerVertically), e.flags.normalize && (t.normalize = e.flags.normalize), e.flags.optimizeSvg && (t.optimizeSvg = e.flags.optimizeSvg), e.flags.fontHeight && (t.fontHeight = e.flags.fontHeight), e.flags.round && (t.round = e.flags.round), e.flags.descent && (t.descent = e.flags.descent), e.flags.ascent && (t.ascent = e.flags.ascent), e.flags.startUnicode && (t.startUnicode = e.flags.startUnicode), e.flags.prependUnicode && (t.prependUnicode = e.flags.prependUnicode), e.flags.metadata && (t.metadata = e.flags.metadata), e.flags.sort === !1 && (t.sort = e.flags.sort), e.flags.ligatures && (t.ligatures = e.flags.ligatures), e.flags.unicodeRange && (t.unicodeRange = e.flags.unicodeRange), e.flags.templateFontLigatures === !1 && (t.templateFontLigatures = e.flags.templateFontLigatures), e.flags.addHashInFontUrl && (t.addHashInFontUrl = e.flags.addHashInFontUrl);
|
|
934
|
+
let n = Kn(e.flags);
|
|
924
935
|
return n && (t.svgTools = n), t;
|
|
925
936
|
}, Z = (e) => {
|
|
926
937
|
if (!e.config) throw Error("Missing config in webfont result");
|
|
927
938
|
return e.config;
|
|
928
|
-
},
|
|
939
|
+
}, rr = (e, t) => (e.config = {
|
|
929
940
|
...Z(e),
|
|
930
941
|
dest: t.dest,
|
|
931
942
|
destTemplate: t.destTemplate
|
|
932
943
|
}, e), Q = (e, t, n) => {
|
|
933
944
|
let r = t.dest ?? process.cwd();
|
|
934
945
|
return typeof t.destTemplate == "string" && (r = t.destTemplate), n ? d.join(r, `${t.fontName}.${e}`) : d.join(r, d.basename(e).replace(".njk", ""));
|
|
935
|
-
},
|
|
946
|
+
}, ir = (e) => Array.isArray(e) ? e[0] : e, ar = (e, t) => {
|
|
936
947
|
if (!e.template) return;
|
|
937
|
-
let n =
|
|
948
|
+
let n = ir(t.template);
|
|
938
949
|
if (e.usedBuildInTemplate && n) return Q(n, t, !0);
|
|
939
950
|
if (n) return Q(n, t, !1);
|
|
940
951
|
let r = t.dest ?? process.cwd();
|
|
941
952
|
return typeof t.destTemplate == "string" ? t.destTemplate : r;
|
|
942
|
-
},
|
|
953
|
+
}, or = async (e, t) => {
|
|
943
954
|
await Promise.all(e.map(async (e) => {
|
|
944
955
|
let n = d.resolve(Q(e.template, t, !!e.builtIn));
|
|
945
956
|
await l.promises.mkdir(d.dirname(n), { recursive: !0 }), await l.promises.writeFile(n, e.content);
|
|
946
957
|
}));
|
|
947
|
-
},
|
|
958
|
+
}, sr = (e, t, n, r) => {
|
|
948
959
|
let i = n.fontName, a = n.dest ?? process.cwd();
|
|
949
960
|
return e === "template" ? d.resolve(r ?? a) : e === "hash" ? d.resolve(d.join(a, `${i}.hash`)) : d.resolve(d.join(a, `${i}.${e}`));
|
|
950
|
-
},
|
|
961
|
+
}, cr = (e) => /* @__PURE__ */ Error(`Destination directory "${e}" does not exist. Use --dest-create (-m) to create it.`), lr = async (e, t) => {
|
|
951
962
|
try {
|
|
952
963
|
await l.promises.access(e, l.constants.F_OK);
|
|
953
964
|
} catch {
|
|
@@ -955,42 +966,42 @@ var ve, ye, be, xe, Se, Ce, we, Te, Ee, De, p, m, h, g, _, v, y, b, x, S, C, w,
|
|
|
955
966
|
await l.promises.mkdir(e, { recursive: !0 });
|
|
956
967
|
return;
|
|
957
968
|
}
|
|
958
|
-
throw
|
|
969
|
+
throw cr(e);
|
|
959
970
|
}
|
|
960
|
-
}, $ = (e, t, n) => e.length === 1 && n.fontName ? n.fontName :
|
|
971
|
+
}, $ = (e, t, n) => e.length === 1 && n.fontName ? n.fontName : Ue(e.map((e) => e.source))[e.indexOf(t)] ?? n.fontName, ur = async (e, t, n) => {
|
|
961
972
|
await Promise.all(e.flatMap((r) => {
|
|
962
973
|
let i = $(e, r, t), a = [];
|
|
963
974
|
return r.ttf && a.push(l.promises.writeFile(d.resolve(d.join(n, `${i}.ttf`)), r.ttf)), r.otf && a.push(l.promises.writeFile(d.resolve(d.join(n, `${i}.otf`)), r.otf)), a;
|
|
964
975
|
}));
|
|
965
|
-
},
|
|
976
|
+
}, dr = (e, t, n) => $(e, t, n), fr = async (e, t, n) => {
|
|
966
977
|
await Promise.all(e.flatMap((r) => {
|
|
967
|
-
let i =
|
|
968
|
-
return r.ttf && a.push(l.promises.writeFile(d.resolve(d.join(n, `${i}.ttf`)), r.ttf)), r.eot && a.push(l.promises.writeFile(d.resolve(d.join(n, `${i}.eot`)), r.eot)), r.woff && a.push(l.promises.writeFile(d.resolve(d.join(n, `${i}.woff`)), r.woff)), r.woff2 && a.push(l.promises.writeFile(d.resolve(d.join(n, `${i}.woff2`)), r.woff2)), a;
|
|
978
|
+
let i = dr(e, r, t), a = [];
|
|
979
|
+
return r.svg && a.push(l.promises.writeFile(d.resolve(d.join(n, `${i}.svg`)), r.svg)), r.ttf && a.push(l.promises.writeFile(d.resolve(d.join(n, `${i}.ttf`)), r.ttf)), r.eot && a.push(l.promises.writeFile(d.resolve(d.join(n, `${i}.eot`)), r.eot)), r.woff && a.push(l.promises.writeFile(d.resolve(d.join(n, `${i}.woff`)), r.woff)), r.woff2 && a.push(l.promises.writeFile(d.resolve(d.join(n, `${i}.woff2`)), r.woff2)), a;
|
|
969
980
|
}));
|
|
970
|
-
},
|
|
971
|
-
let t = Z(e), n = t.dest ?? process.cwd(), r =
|
|
972
|
-
return e.template && delete e.hash, await
|
|
981
|
+
}, pr = async (e) => {
|
|
982
|
+
let t = Z(e), n = t.dest ?? process.cwd(), r = ar(e, t);
|
|
983
|
+
return e.template && delete e.hash, await lr(n, t.destCreate), e.templates && e.templates.length > 0 && await or(e.templates, t), e.transcodedFonts && e.transcodedFonts.length > 1 ? (await fr(e.transcodedFonts, t, n), e) : e.decompressedFonts && e.decompressedFonts.length > 1 ? (await ur(e.decompressedFonts, t, n), e) : (await Promise.all(tr.filter((t) => t === "template" && e.templates && e.templates.length > 0 ? !1 : e[t] !== void 0).map(async (n) => {
|
|
973
984
|
let i = e[n];
|
|
974
985
|
if (i === void 0) return;
|
|
975
|
-
let a =
|
|
986
|
+
let a = sr(n, e, t, r);
|
|
976
987
|
await l.promises.writeFile(a, i);
|
|
977
988
|
})), e);
|
|
978
|
-
},
|
|
979
|
-
|
|
980
|
-
console.log(e.stack), process.exit(
|
|
989
|
+
}, mr = (e) => typeof e == "object" && e && "code" in e && typeof e.code == "number" ? e.code : 1, hr = (e) => {
|
|
990
|
+
gr(e).catch((e) => {
|
|
991
|
+
console.log(e.stack), process.exit(mr(e));
|
|
981
992
|
});
|
|
982
|
-
},
|
|
993
|
+
}, gr = async (e) => {
|
|
983
994
|
e.flags.help && e.showHelp(), e.flags.version && e.showVersion();
|
|
984
|
-
let t =
|
|
995
|
+
let t = nr(e), n = await $n(e, t);
|
|
985
996
|
n.length === 0 && e.showHelp();
|
|
986
997
|
let r = {
|
|
987
998
|
...t,
|
|
988
999
|
files: n
|
|
989
|
-
}, i = await
|
|
990
|
-
return
|
|
1000
|
+
}, i = await Wn(r);
|
|
1001
|
+
return rr(i, r), pr(i);
|
|
991
1002
|
};
|
|
992
|
-
})),
|
|
993
|
-
|
|
1003
|
+
})), vr = /* @__PURE__ */ a((() => {
|
|
1004
|
+
ze(), _r(), hr(Re);
|
|
994
1005
|
}));
|
|
995
1006
|
//#endregion
|
|
996
|
-
export default
|
|
1007
|
+
export default vr();
|