@quartz-community/folder-page 0.1.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/dist/index.js ADDED
@@ -0,0 +1,2902 @@
1
+ import path from 'path';
2
+
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __commonJS = (cb, mod) => function __require() {
10
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
+ };
12
+ var __export = (target, all) => {
13
+ for (var name2 in all)
14
+ __defProp(target, name2, { get: all[name2], enumerable: true });
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from))
19
+ if (!__hasOwnProp.call(to, key) && key !== except)
20
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
+ }
22
+ return to;
23
+ };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ __defProp(target, "default", { value: mod, enumerable: true }) ,
30
+ mod
31
+ ));
32
+
33
+ // node_modules/inline-style-parser/cjs/index.js
34
+ var require_cjs = __commonJS({
35
+ "node_modules/inline-style-parser/cjs/index.js"(exports$1, module) {
36
+ var COMMENT_REGEX = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
37
+ var NEWLINE_REGEX = /\n/g;
38
+ var WHITESPACE_REGEX = /^\s*/;
39
+ var PROPERTY_REGEX = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/;
40
+ var COLON_REGEX = /^:\s*/;
41
+ var VALUE_REGEX = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/;
42
+ var SEMICOLON_REGEX = /^[;\s]*/;
43
+ var TRIM_REGEX = /^\s+|\s+$/g;
44
+ var NEWLINE = "\n";
45
+ var FORWARD_SLASH = "/";
46
+ var ASTERISK = "*";
47
+ var EMPTY_STRING = "";
48
+ var TYPE_COMMENT = "comment";
49
+ var TYPE_DECLARATION = "declaration";
50
+ function index2(style, options) {
51
+ if (typeof style !== "string") {
52
+ throw new TypeError("First argument must be a string");
53
+ }
54
+ if (!style) return [];
55
+ options = options || {};
56
+ var lineno = 1;
57
+ var column = 1;
58
+ function updatePosition(str) {
59
+ var lines = str.match(NEWLINE_REGEX);
60
+ if (lines) lineno += lines.length;
61
+ var i2 = str.lastIndexOf(NEWLINE);
62
+ column = ~i2 ? str.length - i2 : column + str.length;
63
+ }
64
+ function position3() {
65
+ var start2 = { line: lineno, column };
66
+ return function(node) {
67
+ node.position = new Position(start2);
68
+ whitespace2();
69
+ return node;
70
+ };
71
+ }
72
+ function Position(start2) {
73
+ this.start = start2;
74
+ this.end = { line: lineno, column };
75
+ this.source = options.source;
76
+ }
77
+ Position.prototype.content = style;
78
+ function error(msg) {
79
+ var err = new Error(
80
+ options.source + ":" + lineno + ":" + column + ": " + msg
81
+ );
82
+ err.reason = msg;
83
+ err.filename = options.source;
84
+ err.line = lineno;
85
+ err.column = column;
86
+ err.source = style;
87
+ if (options.silent) ;
88
+ else {
89
+ throw err;
90
+ }
91
+ }
92
+ function match(re2) {
93
+ var m2 = re2.exec(style);
94
+ if (!m2) return;
95
+ var str = m2[0];
96
+ updatePosition(str);
97
+ style = style.slice(str.length);
98
+ return m2;
99
+ }
100
+ function whitespace2() {
101
+ match(WHITESPACE_REGEX);
102
+ }
103
+ function comments(rules) {
104
+ var c2;
105
+ rules = rules || [];
106
+ while (c2 = comment()) {
107
+ if (c2 !== false) {
108
+ rules.push(c2);
109
+ }
110
+ }
111
+ return rules;
112
+ }
113
+ function comment() {
114
+ var pos = position3();
115
+ if (FORWARD_SLASH != style.charAt(0) || ASTERISK != style.charAt(1)) return;
116
+ var i2 = 2;
117
+ while (EMPTY_STRING != style.charAt(i2) && (ASTERISK != style.charAt(i2) || FORWARD_SLASH != style.charAt(i2 + 1))) {
118
+ ++i2;
119
+ }
120
+ i2 += 2;
121
+ if (EMPTY_STRING === style.charAt(i2 - 1)) {
122
+ return error("End of comment missing");
123
+ }
124
+ var str = style.slice(2, i2 - 2);
125
+ column += 2;
126
+ updatePosition(str);
127
+ style = style.slice(i2);
128
+ column += 2;
129
+ return pos({
130
+ type: TYPE_COMMENT,
131
+ comment: str
132
+ });
133
+ }
134
+ function declaration() {
135
+ var pos = position3();
136
+ var prop = match(PROPERTY_REGEX);
137
+ if (!prop) return;
138
+ comment();
139
+ if (!match(COLON_REGEX)) return error("property missing ':'");
140
+ var val = match(VALUE_REGEX);
141
+ var ret = pos({
142
+ type: TYPE_DECLARATION,
143
+ property: trim(prop[0].replace(COMMENT_REGEX, EMPTY_STRING)),
144
+ value: val ? trim(val[0].replace(COMMENT_REGEX, EMPTY_STRING)) : EMPTY_STRING
145
+ });
146
+ match(SEMICOLON_REGEX);
147
+ return ret;
148
+ }
149
+ function declarations() {
150
+ var decls = [];
151
+ comments(decls);
152
+ var decl;
153
+ while (decl = declaration()) {
154
+ if (decl !== false) {
155
+ decls.push(decl);
156
+ comments(decls);
157
+ }
158
+ }
159
+ return decls;
160
+ }
161
+ whitespace2();
162
+ return declarations();
163
+ }
164
+ function trim(str) {
165
+ return str ? str.replace(TRIM_REGEX, EMPTY_STRING) : EMPTY_STRING;
166
+ }
167
+ module.exports = index2;
168
+ }
169
+ });
170
+
171
+ // node_modules/style-to-object/cjs/index.js
172
+ var require_cjs2 = __commonJS({
173
+ "node_modules/style-to-object/cjs/index.js"(exports$1) {
174
+ var __importDefault = exports$1 && exports$1.__importDefault || function(mod) {
175
+ return mod && mod.__esModule ? mod : { "default": mod };
176
+ };
177
+ Object.defineProperty(exports$1, "__esModule", { value: true });
178
+ exports$1.default = StyleToObject;
179
+ var inline_style_parser_1 = __importDefault(require_cjs());
180
+ function StyleToObject(style, iterator) {
181
+ let styleObject = null;
182
+ if (!style || typeof style !== "string") {
183
+ return styleObject;
184
+ }
185
+ const declarations = (0, inline_style_parser_1.default)(style);
186
+ const hasIterator = typeof iterator === "function";
187
+ declarations.forEach((declaration) => {
188
+ if (declaration.type !== "declaration") {
189
+ return;
190
+ }
191
+ const { property, value } = declaration;
192
+ if (hasIterator) {
193
+ iterator(property, value, declaration);
194
+ } else if (value) {
195
+ styleObject = styleObject || {};
196
+ styleObject[property] = value;
197
+ }
198
+ });
199
+ return styleObject;
200
+ }
201
+ }
202
+ });
203
+
204
+ // node_modules/style-to-js/cjs/utilities.js
205
+ var require_utilities = __commonJS({
206
+ "node_modules/style-to-js/cjs/utilities.js"(exports$1) {
207
+ Object.defineProperty(exports$1, "__esModule", { value: true });
208
+ exports$1.camelCase = void 0;
209
+ var CUSTOM_PROPERTY_REGEX = /^--[a-zA-Z0-9_-]+$/;
210
+ var HYPHEN_REGEX = /-([a-z])/g;
211
+ var NO_HYPHEN_REGEX = /^[^-]+$/;
212
+ var VENDOR_PREFIX_REGEX = /^-(webkit|moz|ms|o|khtml)-/;
213
+ var MS_VENDOR_PREFIX_REGEX = /^-(ms)-/;
214
+ var skipCamelCase = function(property) {
215
+ return !property || NO_HYPHEN_REGEX.test(property) || CUSTOM_PROPERTY_REGEX.test(property);
216
+ };
217
+ var capitalize = function(match, character) {
218
+ return character.toUpperCase();
219
+ };
220
+ var trimHyphen = function(match, prefix) {
221
+ return "".concat(prefix, "-");
222
+ };
223
+ var camelCase = function(property, options) {
224
+ if (options === void 0) {
225
+ options = {};
226
+ }
227
+ if (skipCamelCase(property)) {
228
+ return property;
229
+ }
230
+ property = property.toLowerCase();
231
+ if (options.reactCompat) {
232
+ property = property.replace(MS_VENDOR_PREFIX_REGEX, trimHyphen);
233
+ } else {
234
+ property = property.replace(VENDOR_PREFIX_REGEX, trimHyphen);
235
+ }
236
+ return property.replace(HYPHEN_REGEX, capitalize);
237
+ };
238
+ exports$1.camelCase = camelCase;
239
+ }
240
+ });
241
+
242
+ // node_modules/style-to-js/cjs/index.js
243
+ var require_cjs3 = __commonJS({
244
+ "node_modules/style-to-js/cjs/index.js"(exports$1, module) {
245
+ var __importDefault = exports$1 && exports$1.__importDefault || function(mod) {
246
+ return mod && mod.__esModule ? mod : { "default": mod };
247
+ };
248
+ var style_to_object_1 = __importDefault(require_cjs2());
249
+ var utilities_1 = require_utilities();
250
+ function StyleToJS(style, options) {
251
+ var output = {};
252
+ if (!style || typeof style !== "string") {
253
+ return output;
254
+ }
255
+ (0, style_to_object_1.default)(style, function(property, value) {
256
+ if (property && value) {
257
+ output[(0, utilities_1.camelCase)(property, options)] = value;
258
+ }
259
+ });
260
+ return output;
261
+ }
262
+ StyleToJS.default = StyleToJS;
263
+ module.exports = StyleToJS;
264
+ }
265
+ });
266
+
267
+ // node_modules/@quartz-community/utils/dist/sort.js
268
+ function getDate(data) {
269
+ const defaultDateType = data.defaultDateType;
270
+ if (!defaultDateType) {
271
+ return void 0;
272
+ }
273
+ const dates = data.dates;
274
+ return dates?.[defaultDateType];
275
+ }
276
+
277
+ // node_modules/@quartz-community/utils/dist/path.js
278
+ function simplifySlug(fp) {
279
+ const res = stripSlashes(trimSuffix(fp, "index"), true);
280
+ return res.length === 0 ? "/" : res;
281
+ }
282
+ function joinSegments(...args) {
283
+ if (args.length === 0) {
284
+ return "";
285
+ }
286
+ let joined = args.filter((segment) => segment !== "" && segment !== "/").map((segment) => stripSlashes(segment)).join("/");
287
+ const first = args[0];
288
+ const last = args[args.length - 1];
289
+ if (first?.startsWith("/")) {
290
+ joined = "/" + joined;
291
+ }
292
+ if (last?.endsWith("/")) {
293
+ joined = joined + "/";
294
+ }
295
+ return joined;
296
+ }
297
+ function endsWith(s2, suffix) {
298
+ return s2 === suffix || s2.endsWith("/" + suffix);
299
+ }
300
+ function trimSuffix(s2, suffix) {
301
+ if (endsWith(s2, suffix)) {
302
+ s2 = s2.slice(0, -suffix.length);
303
+ }
304
+ return s2;
305
+ }
306
+ function stripSlashes(s2, onlyStripPrefix) {
307
+ if (s2.startsWith("/")) {
308
+ s2 = s2.substring(1);
309
+ }
310
+ if (!onlyStripPrefix && s2.endsWith("/")) {
311
+ s2 = s2.slice(0, -1);
312
+ }
313
+ return s2;
314
+ }
315
+ function isFolderPath(fplike) {
316
+ return fplike.endsWith("/") || endsWith(fplike, "index") || endsWith(fplike, "index.md") || endsWith(fplike, "index.html");
317
+ }
318
+ function pathToRoot(slug2) {
319
+ let rootPath = slug2.split("/").filter((x2) => x2 !== "").slice(0, -1).map((_2) => "..").join("/");
320
+ if (rootPath.length === 0) {
321
+ rootPath = ".";
322
+ }
323
+ return rootPath;
324
+ }
325
+ function resolveRelative(current, target) {
326
+ const res = joinSegments(pathToRoot(current), simplifySlug(target));
327
+ return res;
328
+ }
329
+
330
+ // node_modules/preact/dist/preact.mjs
331
+ var n;
332
+ var l;
333
+ var u;
334
+ var w = [];
335
+ function k(l2, u3, t2) {
336
+ var i2, r2, o2, e2 = {};
337
+ for (o2 in u3) "key" == o2 ? i2 = u3[o2] : "ref" == o2 ? r2 = u3[o2] : e2[o2] = u3[o2];
338
+ if (arguments.length > 2 && (e2.children = arguments.length > 3 ? n.call(arguments, 2) : t2), "function" == typeof l2 && null != l2.defaultProps) for (o2 in l2.defaultProps) void 0 === e2[o2] && (e2[o2] = l2.defaultProps[o2]);
339
+ return x(l2, e2, i2, r2, null);
340
+ }
341
+ function x(n2, t2, i2, r2, o2) {
342
+ var e2 = { type: n2, props: t2, key: i2, ref: r2, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: null == o2 ? ++u : o2, __i: -1, __u: 0 };
343
+ return null != l.vnode && l.vnode(e2), e2;
344
+ }
345
+ function S(n2) {
346
+ return n2.children;
347
+ }
348
+ n = w.slice, l = { __e: function(n2, l2, u3, t2) {
349
+ for (var i2, r2, o2; l2 = l2.__; ) if ((i2 = l2.__c) && !i2.__) try {
350
+ if ((r2 = i2.constructor) && null != r2.getDerivedStateFromError && (i2.setState(r2.getDerivedStateFromError(n2)), o2 = i2.__d), null != i2.componentDidCatch && (i2.componentDidCatch(n2, t2 || {}), o2 = i2.__d), o2) return i2.__E = i2;
351
+ } catch (l3) {
352
+ n2 = l3;
353
+ }
354
+ throw n2;
355
+ } }, u = 0, "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Math.random().toString(8);
356
+
357
+ // node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs
358
+ var f2 = 0;
359
+ function u2(e2, t2, n2, o2, i2, u3) {
360
+ t2 || (t2 = {});
361
+ var a2, c2, p2 = t2;
362
+ if ("ref" in p2) for (c2 in p2 = {}, t2) "ref" == c2 ? a2 = t2[c2] : p2[c2] = t2[c2];
363
+ var l2 = { type: e2, props: p2, key: n2, ref: a2, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --f2, __i: -1, __u: 0, __source: i2, __self: u3 };
364
+ if ("function" == typeof e2 && (a2 = e2.defaultProps)) for (c2 in a2) void 0 === p2[c2] && (p2[c2] = a2[c2]);
365
+ return l.vnode && l.vnode(l2), l2;
366
+ }
367
+
368
+ // src/components/PageList.tsx
369
+ function byDateAndAlphabeticalFolderFirst(_cfg) {
370
+ return (f1, f22) => {
371
+ const f1IsFolder = isFolderPath(f1.slug ?? "");
372
+ const f2IsFolder = isFolderPath(f22.slug ?? "");
373
+ if (f1IsFolder && !f2IsFolder) return -1;
374
+ if (!f1IsFolder && f2IsFolder) return 1;
375
+ if (f1.dates && f22.dates) {
376
+ return (getDate(f22)?.getTime() ?? 0) - (getDate(f1)?.getTime() ?? 0);
377
+ } else if (f1.dates && !f22.dates) {
378
+ return -1;
379
+ } else if (!f1.dates && f22.dates) {
380
+ return 1;
381
+ }
382
+ const f1Title = f1.frontmatter?.title?.toLowerCase() ?? "";
383
+ const f2Title = f22.frontmatter?.title?.toLowerCase() ?? "";
384
+ return f1Title.localeCompare(f2Title);
385
+ };
386
+ }
387
+ function DateDisplay({ date, locale }) {
388
+ return /* @__PURE__ */ u2("time", { dateTime: date.toISOString(), children: date.toLocaleDateString(locale, {
389
+ year: "numeric",
390
+ month: "short",
391
+ day: "2-digit"
392
+ }) });
393
+ }
394
+ var PageList = ({
395
+ cfg,
396
+ fileData,
397
+ allFiles,
398
+ limit,
399
+ sort
400
+ }) => {
401
+ const sorter = sort ?? byDateAndAlphabeticalFolderFirst();
402
+ let list = [...allFiles].sort(sorter);
403
+ if (limit) {
404
+ list = list.slice(0, limit);
405
+ }
406
+ const fileSlug = fileData?.slug;
407
+ return /* @__PURE__ */ u2("ul", { class: "section-ul", children: list.map((page) => {
408
+ const title = page.frontmatter?.title;
409
+ const tags = page.frontmatter?.tags ?? [];
410
+ return /* @__PURE__ */ u2("li", { class: "section-li", children: /* @__PURE__ */ u2("div", { class: "section", children: [
411
+ /* @__PURE__ */ u2("p", { class: "meta", children: page.dates && getDate(page) && /* @__PURE__ */ u2(
412
+ DateDisplay,
413
+ {
414
+ date: getDate(page),
415
+ locale: cfg?.locale ?? "en-US"
416
+ }
417
+ ) }),
418
+ /* @__PURE__ */ u2("div", { class: "desc", children: /* @__PURE__ */ u2("h3", { children: /* @__PURE__ */ u2(
419
+ "a",
420
+ {
421
+ href: resolveRelative(fileSlug ?? "", page.slug),
422
+ class: "internal",
423
+ children: title
424
+ }
425
+ ) }) }),
426
+ /* @__PURE__ */ u2("ul", { class: "tags", children: tags.map((tag) => /* @__PURE__ */ u2("li", { children: /* @__PURE__ */ u2(
427
+ "a",
428
+ {
429
+ class: "internal tag-link",
430
+ href: resolveRelative(
431
+ fileSlug ?? "",
432
+ `tags/${tag}`
433
+ ),
434
+ children: tag
435
+ }
436
+ ) })) })
437
+ ] }) });
438
+ }) });
439
+ };
440
+ PageList.css = `
441
+ .section h3 {
442
+ margin: 0;
443
+ }
444
+
445
+ .section > .tags {
446
+ margin: 0;
447
+ }
448
+ `;
449
+
450
+ // node_modules/comma-separated-tokens/index.js
451
+ function stringify(values, options) {
452
+ const settings = {};
453
+ const input = values[values.length - 1] === "" ? [...values, ""] : values;
454
+ return input.join(
455
+ (settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ")
456
+ ).trim();
457
+ }
458
+
459
+ // node_modules/devlop/lib/default.js
460
+ function ok() {
461
+ }
462
+
463
+ // node_modules/estree-util-is-identifier-name/lib/index.js
464
+ var nameRe = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u;
465
+ var nameReJsx = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u;
466
+ var emptyOptions = {};
467
+ function name(name2, options) {
468
+ const settings = emptyOptions;
469
+ const re2 = settings.jsx ? nameReJsx : nameRe;
470
+ return re2.test(name2);
471
+ }
472
+
473
+ // node_modules/hast-util-whitespace/lib/index.js
474
+ var re = /[ \t\n\f\r]/g;
475
+ function whitespace(thing) {
476
+ return typeof thing === "object" ? thing.type === "text" ? empty(thing.value) : false : empty(thing);
477
+ }
478
+ function empty(value) {
479
+ return value.replace(re, "") === "";
480
+ }
481
+
482
+ // node_modules/property-information/lib/util/schema.js
483
+ var Schema = class {
484
+ /**
485
+ * @param {SchemaType['property']} property
486
+ * Property.
487
+ * @param {SchemaType['normal']} normal
488
+ * Normal.
489
+ * @param {Space | undefined} [space]
490
+ * Space.
491
+ * @returns
492
+ * Schema.
493
+ */
494
+ constructor(property, normal, space) {
495
+ this.normal = normal;
496
+ this.property = property;
497
+ if (space) {
498
+ this.space = space;
499
+ }
500
+ }
501
+ };
502
+ Schema.prototype.normal = {};
503
+ Schema.prototype.property = {};
504
+ Schema.prototype.space = void 0;
505
+
506
+ // node_modules/property-information/lib/util/merge.js
507
+ function merge(definitions, space) {
508
+ const property = {};
509
+ const normal = {};
510
+ for (const definition of definitions) {
511
+ Object.assign(property, definition.property);
512
+ Object.assign(normal, definition.normal);
513
+ }
514
+ return new Schema(property, normal, space);
515
+ }
516
+
517
+ // node_modules/property-information/lib/normalize.js
518
+ function normalize(value) {
519
+ return value.toLowerCase();
520
+ }
521
+
522
+ // node_modules/property-information/lib/util/info.js
523
+ var Info = class {
524
+ /**
525
+ * @param {string} property
526
+ * Property.
527
+ * @param {string} attribute
528
+ * Attribute.
529
+ * @returns
530
+ * Info.
531
+ */
532
+ constructor(property, attribute) {
533
+ this.attribute = attribute;
534
+ this.property = property;
535
+ }
536
+ };
537
+ Info.prototype.attribute = "";
538
+ Info.prototype.booleanish = false;
539
+ Info.prototype.boolean = false;
540
+ Info.prototype.commaOrSpaceSeparated = false;
541
+ Info.prototype.commaSeparated = false;
542
+ Info.prototype.defined = false;
543
+ Info.prototype.mustUseProperty = false;
544
+ Info.prototype.number = false;
545
+ Info.prototype.overloadedBoolean = false;
546
+ Info.prototype.property = "";
547
+ Info.prototype.spaceSeparated = false;
548
+ Info.prototype.space = void 0;
549
+
550
+ // node_modules/property-information/lib/util/types.js
551
+ var types_exports = {};
552
+ __export(types_exports, {
553
+ boolean: () => boolean,
554
+ booleanish: () => booleanish,
555
+ commaOrSpaceSeparated: () => commaOrSpaceSeparated,
556
+ commaSeparated: () => commaSeparated,
557
+ number: () => number,
558
+ overloadedBoolean: () => overloadedBoolean,
559
+ spaceSeparated: () => spaceSeparated
560
+ });
561
+ var powers = 0;
562
+ var boolean = increment();
563
+ var booleanish = increment();
564
+ var overloadedBoolean = increment();
565
+ var number = increment();
566
+ var spaceSeparated = increment();
567
+ var commaSeparated = increment();
568
+ var commaOrSpaceSeparated = increment();
569
+ function increment() {
570
+ return 2 ** ++powers;
571
+ }
572
+
573
+ // node_modules/property-information/lib/util/defined-info.js
574
+ var checks = (
575
+ /** @type {ReadonlyArray<keyof typeof types>} */
576
+ Object.keys(types_exports)
577
+ );
578
+ var DefinedInfo = class extends Info {
579
+ /**
580
+ * @constructor
581
+ * @param {string} property
582
+ * Property.
583
+ * @param {string} attribute
584
+ * Attribute.
585
+ * @param {number | null | undefined} [mask]
586
+ * Mask.
587
+ * @param {Space | undefined} [space]
588
+ * Space.
589
+ * @returns
590
+ * Info.
591
+ */
592
+ constructor(property, attribute, mask, space) {
593
+ let index2 = -1;
594
+ super(property, attribute);
595
+ mark(this, "space", space);
596
+ if (typeof mask === "number") {
597
+ while (++index2 < checks.length) {
598
+ const check = checks[index2];
599
+ mark(this, checks[index2], (mask & types_exports[check]) === types_exports[check]);
600
+ }
601
+ }
602
+ }
603
+ };
604
+ DefinedInfo.prototype.defined = true;
605
+ function mark(values, key, value) {
606
+ if (value) {
607
+ values[key] = value;
608
+ }
609
+ }
610
+
611
+ // node_modules/property-information/lib/util/create.js
612
+ function create(definition) {
613
+ const properties = {};
614
+ const normals = {};
615
+ for (const [property, value] of Object.entries(definition.properties)) {
616
+ const info = new DefinedInfo(
617
+ property,
618
+ definition.transform(definition.attributes || {}, property),
619
+ value,
620
+ definition.space
621
+ );
622
+ if (definition.mustUseProperty && definition.mustUseProperty.includes(property)) {
623
+ info.mustUseProperty = true;
624
+ }
625
+ properties[property] = info;
626
+ normals[normalize(property)] = property;
627
+ normals[normalize(info.attribute)] = property;
628
+ }
629
+ return new Schema(properties, normals, definition.space);
630
+ }
631
+
632
+ // node_modules/property-information/lib/aria.js
633
+ var aria = create({
634
+ properties: {
635
+ ariaActiveDescendant: null,
636
+ ariaAtomic: booleanish,
637
+ ariaAutoComplete: null,
638
+ ariaBusy: booleanish,
639
+ ariaChecked: booleanish,
640
+ ariaColCount: number,
641
+ ariaColIndex: number,
642
+ ariaColSpan: number,
643
+ ariaControls: spaceSeparated,
644
+ ariaCurrent: null,
645
+ ariaDescribedBy: spaceSeparated,
646
+ ariaDetails: null,
647
+ ariaDisabled: booleanish,
648
+ ariaDropEffect: spaceSeparated,
649
+ ariaErrorMessage: null,
650
+ ariaExpanded: booleanish,
651
+ ariaFlowTo: spaceSeparated,
652
+ ariaGrabbed: booleanish,
653
+ ariaHasPopup: null,
654
+ ariaHidden: booleanish,
655
+ ariaInvalid: null,
656
+ ariaKeyShortcuts: null,
657
+ ariaLabel: null,
658
+ ariaLabelledBy: spaceSeparated,
659
+ ariaLevel: number,
660
+ ariaLive: null,
661
+ ariaModal: booleanish,
662
+ ariaMultiLine: booleanish,
663
+ ariaMultiSelectable: booleanish,
664
+ ariaOrientation: null,
665
+ ariaOwns: spaceSeparated,
666
+ ariaPlaceholder: null,
667
+ ariaPosInSet: number,
668
+ ariaPressed: booleanish,
669
+ ariaReadOnly: booleanish,
670
+ ariaRelevant: null,
671
+ ariaRequired: booleanish,
672
+ ariaRoleDescription: spaceSeparated,
673
+ ariaRowCount: number,
674
+ ariaRowIndex: number,
675
+ ariaRowSpan: number,
676
+ ariaSelected: booleanish,
677
+ ariaSetSize: number,
678
+ ariaSort: null,
679
+ ariaValueMax: number,
680
+ ariaValueMin: number,
681
+ ariaValueNow: number,
682
+ ariaValueText: null,
683
+ role: null
684
+ },
685
+ transform(_2, property) {
686
+ return property === "role" ? property : "aria-" + property.slice(4).toLowerCase();
687
+ }
688
+ });
689
+
690
+ // node_modules/property-information/lib/util/case-sensitive-transform.js
691
+ function caseSensitiveTransform(attributes, attribute) {
692
+ return attribute in attributes ? attributes[attribute] : attribute;
693
+ }
694
+
695
+ // node_modules/property-information/lib/util/case-insensitive-transform.js
696
+ function caseInsensitiveTransform(attributes, property) {
697
+ return caseSensitiveTransform(attributes, property.toLowerCase());
698
+ }
699
+
700
+ // node_modules/property-information/lib/html.js
701
+ var html = create({
702
+ attributes: {
703
+ acceptcharset: "accept-charset",
704
+ classname: "class",
705
+ htmlfor: "for",
706
+ httpequiv: "http-equiv"
707
+ },
708
+ mustUseProperty: ["checked", "multiple", "muted", "selected"],
709
+ properties: {
710
+ // Standard Properties.
711
+ abbr: null,
712
+ accept: commaSeparated,
713
+ acceptCharset: spaceSeparated,
714
+ accessKey: spaceSeparated,
715
+ action: null,
716
+ allow: null,
717
+ allowFullScreen: boolean,
718
+ allowPaymentRequest: boolean,
719
+ allowUserMedia: boolean,
720
+ alt: null,
721
+ as: null,
722
+ async: boolean,
723
+ autoCapitalize: null,
724
+ autoComplete: spaceSeparated,
725
+ autoFocus: boolean,
726
+ autoPlay: boolean,
727
+ blocking: spaceSeparated,
728
+ capture: null,
729
+ charSet: null,
730
+ checked: boolean,
731
+ cite: null,
732
+ className: spaceSeparated,
733
+ cols: number,
734
+ colSpan: null,
735
+ content: null,
736
+ contentEditable: booleanish,
737
+ controls: boolean,
738
+ controlsList: spaceSeparated,
739
+ coords: number | commaSeparated,
740
+ crossOrigin: null,
741
+ data: null,
742
+ dateTime: null,
743
+ decoding: null,
744
+ default: boolean,
745
+ defer: boolean,
746
+ dir: null,
747
+ dirName: null,
748
+ disabled: boolean,
749
+ download: overloadedBoolean,
750
+ draggable: booleanish,
751
+ encType: null,
752
+ enterKeyHint: null,
753
+ fetchPriority: null,
754
+ form: null,
755
+ formAction: null,
756
+ formEncType: null,
757
+ formMethod: null,
758
+ formNoValidate: boolean,
759
+ formTarget: null,
760
+ headers: spaceSeparated,
761
+ height: number,
762
+ hidden: overloadedBoolean,
763
+ high: number,
764
+ href: null,
765
+ hrefLang: null,
766
+ htmlFor: spaceSeparated,
767
+ httpEquiv: spaceSeparated,
768
+ id: null,
769
+ imageSizes: null,
770
+ imageSrcSet: null,
771
+ inert: boolean,
772
+ inputMode: null,
773
+ integrity: null,
774
+ is: null,
775
+ isMap: boolean,
776
+ itemId: null,
777
+ itemProp: spaceSeparated,
778
+ itemRef: spaceSeparated,
779
+ itemScope: boolean,
780
+ itemType: spaceSeparated,
781
+ kind: null,
782
+ label: null,
783
+ lang: null,
784
+ language: null,
785
+ list: null,
786
+ loading: null,
787
+ loop: boolean,
788
+ low: number,
789
+ manifest: null,
790
+ max: null,
791
+ maxLength: number,
792
+ media: null,
793
+ method: null,
794
+ min: null,
795
+ minLength: number,
796
+ multiple: boolean,
797
+ muted: boolean,
798
+ name: null,
799
+ nonce: null,
800
+ noModule: boolean,
801
+ noValidate: boolean,
802
+ onAbort: null,
803
+ onAfterPrint: null,
804
+ onAuxClick: null,
805
+ onBeforeMatch: null,
806
+ onBeforePrint: null,
807
+ onBeforeToggle: null,
808
+ onBeforeUnload: null,
809
+ onBlur: null,
810
+ onCancel: null,
811
+ onCanPlay: null,
812
+ onCanPlayThrough: null,
813
+ onChange: null,
814
+ onClick: null,
815
+ onClose: null,
816
+ onContextLost: null,
817
+ onContextMenu: null,
818
+ onContextRestored: null,
819
+ onCopy: null,
820
+ onCueChange: null,
821
+ onCut: null,
822
+ onDblClick: null,
823
+ onDrag: null,
824
+ onDragEnd: null,
825
+ onDragEnter: null,
826
+ onDragExit: null,
827
+ onDragLeave: null,
828
+ onDragOver: null,
829
+ onDragStart: null,
830
+ onDrop: null,
831
+ onDurationChange: null,
832
+ onEmptied: null,
833
+ onEnded: null,
834
+ onError: null,
835
+ onFocus: null,
836
+ onFormData: null,
837
+ onHashChange: null,
838
+ onInput: null,
839
+ onInvalid: null,
840
+ onKeyDown: null,
841
+ onKeyPress: null,
842
+ onKeyUp: null,
843
+ onLanguageChange: null,
844
+ onLoad: null,
845
+ onLoadedData: null,
846
+ onLoadedMetadata: null,
847
+ onLoadEnd: null,
848
+ onLoadStart: null,
849
+ onMessage: null,
850
+ onMessageError: null,
851
+ onMouseDown: null,
852
+ onMouseEnter: null,
853
+ onMouseLeave: null,
854
+ onMouseMove: null,
855
+ onMouseOut: null,
856
+ onMouseOver: null,
857
+ onMouseUp: null,
858
+ onOffline: null,
859
+ onOnline: null,
860
+ onPageHide: null,
861
+ onPageShow: null,
862
+ onPaste: null,
863
+ onPause: null,
864
+ onPlay: null,
865
+ onPlaying: null,
866
+ onPopState: null,
867
+ onProgress: null,
868
+ onRateChange: null,
869
+ onRejectionHandled: null,
870
+ onReset: null,
871
+ onResize: null,
872
+ onScroll: null,
873
+ onScrollEnd: null,
874
+ onSecurityPolicyViolation: null,
875
+ onSeeked: null,
876
+ onSeeking: null,
877
+ onSelect: null,
878
+ onSlotChange: null,
879
+ onStalled: null,
880
+ onStorage: null,
881
+ onSubmit: null,
882
+ onSuspend: null,
883
+ onTimeUpdate: null,
884
+ onToggle: null,
885
+ onUnhandledRejection: null,
886
+ onUnload: null,
887
+ onVolumeChange: null,
888
+ onWaiting: null,
889
+ onWheel: null,
890
+ open: boolean,
891
+ optimum: number,
892
+ pattern: null,
893
+ ping: spaceSeparated,
894
+ placeholder: null,
895
+ playsInline: boolean,
896
+ popover: null,
897
+ popoverTarget: null,
898
+ popoverTargetAction: null,
899
+ poster: null,
900
+ preload: null,
901
+ readOnly: boolean,
902
+ referrerPolicy: null,
903
+ rel: spaceSeparated,
904
+ required: boolean,
905
+ reversed: boolean,
906
+ rows: number,
907
+ rowSpan: number,
908
+ sandbox: spaceSeparated,
909
+ scope: null,
910
+ scoped: boolean,
911
+ seamless: boolean,
912
+ selected: boolean,
913
+ shadowRootClonable: boolean,
914
+ shadowRootDelegatesFocus: boolean,
915
+ shadowRootMode: null,
916
+ shape: null,
917
+ size: number,
918
+ sizes: null,
919
+ slot: null,
920
+ span: number,
921
+ spellCheck: booleanish,
922
+ src: null,
923
+ srcDoc: null,
924
+ srcLang: null,
925
+ srcSet: null,
926
+ start: number,
927
+ step: null,
928
+ style: null,
929
+ tabIndex: number,
930
+ target: null,
931
+ title: null,
932
+ translate: null,
933
+ type: null,
934
+ typeMustMatch: boolean,
935
+ useMap: null,
936
+ value: booleanish,
937
+ width: number,
938
+ wrap: null,
939
+ writingSuggestions: null,
940
+ // Legacy.
941
+ // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
942
+ align: null,
943
+ // Several. Use CSS `text-align` instead,
944
+ aLink: null,
945
+ // `<body>`. Use CSS `a:active {color}` instead
946
+ archive: spaceSeparated,
947
+ // `<object>`. List of URIs to archives
948
+ axis: null,
949
+ // `<td>` and `<th>`. Use `scope` on `<th>`
950
+ background: null,
951
+ // `<body>`. Use CSS `background-image` instead
952
+ bgColor: null,
953
+ // `<body>` and table elements. Use CSS `background-color` instead
954
+ border: number,
955
+ // `<table>`. Use CSS `border-width` instead,
956
+ borderColor: null,
957
+ // `<table>`. Use CSS `border-color` instead,
958
+ bottomMargin: number,
959
+ // `<body>`
960
+ cellPadding: null,
961
+ // `<table>`
962
+ cellSpacing: null,
963
+ // `<table>`
964
+ char: null,
965
+ // Several table elements. When `align=char`, sets the character to align on
966
+ charOff: null,
967
+ // Several table elements. When `char`, offsets the alignment
968
+ classId: null,
969
+ // `<object>`
970
+ clear: null,
971
+ // `<br>`. Use CSS `clear` instead
972
+ code: null,
973
+ // `<object>`
974
+ codeBase: null,
975
+ // `<object>`
976
+ codeType: null,
977
+ // `<object>`
978
+ color: null,
979
+ // `<font>` and `<hr>`. Use CSS instead
980
+ compact: boolean,
981
+ // Lists. Use CSS to reduce space between items instead
982
+ declare: boolean,
983
+ // `<object>`
984
+ event: null,
985
+ // `<script>`
986
+ face: null,
987
+ // `<font>`. Use CSS instead
988
+ frame: null,
989
+ // `<table>`
990
+ frameBorder: null,
991
+ // `<iframe>`. Use CSS `border` instead
992
+ hSpace: number,
993
+ // `<img>` and `<object>`
994
+ leftMargin: number,
995
+ // `<body>`
996
+ link: null,
997
+ // `<body>`. Use CSS `a:link {color: *}` instead
998
+ longDesc: null,
999
+ // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
1000
+ lowSrc: null,
1001
+ // `<img>`. Use a `<picture>`
1002
+ marginHeight: number,
1003
+ // `<body>`
1004
+ marginWidth: number,
1005
+ // `<body>`
1006
+ noResize: boolean,
1007
+ // `<frame>`
1008
+ noHref: boolean,
1009
+ // `<area>`. Use no href instead of an explicit `nohref`
1010
+ noShade: boolean,
1011
+ // `<hr>`. Use background-color and height instead of borders
1012
+ noWrap: boolean,
1013
+ // `<td>` and `<th>`
1014
+ object: null,
1015
+ // `<applet>`
1016
+ profile: null,
1017
+ // `<head>`
1018
+ prompt: null,
1019
+ // `<isindex>`
1020
+ rev: null,
1021
+ // `<link>`
1022
+ rightMargin: number,
1023
+ // `<body>`
1024
+ rules: null,
1025
+ // `<table>`
1026
+ scheme: null,
1027
+ // `<meta>`
1028
+ scrolling: booleanish,
1029
+ // `<frame>`. Use overflow in the child context
1030
+ standby: null,
1031
+ // `<object>`
1032
+ summary: null,
1033
+ // `<table>`
1034
+ text: null,
1035
+ // `<body>`. Use CSS `color` instead
1036
+ topMargin: number,
1037
+ // `<body>`
1038
+ valueType: null,
1039
+ // `<param>`
1040
+ version: null,
1041
+ // `<html>`. Use a doctype.
1042
+ vAlign: null,
1043
+ // Several. Use CSS `vertical-align` instead
1044
+ vLink: null,
1045
+ // `<body>`. Use CSS `a:visited {color}` instead
1046
+ vSpace: number,
1047
+ // `<img>` and `<object>`
1048
+ // Non-standard Properties.
1049
+ allowTransparency: null,
1050
+ autoCorrect: null,
1051
+ autoSave: null,
1052
+ disablePictureInPicture: boolean,
1053
+ disableRemotePlayback: boolean,
1054
+ prefix: null,
1055
+ property: null,
1056
+ results: number,
1057
+ security: null,
1058
+ unselectable: null
1059
+ },
1060
+ space: "html",
1061
+ transform: caseInsensitiveTransform
1062
+ });
1063
+
1064
+ // node_modules/property-information/lib/svg.js
1065
+ var svg = create({
1066
+ attributes: {
1067
+ accentHeight: "accent-height",
1068
+ alignmentBaseline: "alignment-baseline",
1069
+ arabicForm: "arabic-form",
1070
+ baselineShift: "baseline-shift",
1071
+ capHeight: "cap-height",
1072
+ className: "class",
1073
+ clipPath: "clip-path",
1074
+ clipRule: "clip-rule",
1075
+ colorInterpolation: "color-interpolation",
1076
+ colorInterpolationFilters: "color-interpolation-filters",
1077
+ colorProfile: "color-profile",
1078
+ colorRendering: "color-rendering",
1079
+ crossOrigin: "crossorigin",
1080
+ dataType: "datatype",
1081
+ dominantBaseline: "dominant-baseline",
1082
+ enableBackground: "enable-background",
1083
+ fillOpacity: "fill-opacity",
1084
+ fillRule: "fill-rule",
1085
+ floodColor: "flood-color",
1086
+ floodOpacity: "flood-opacity",
1087
+ fontFamily: "font-family",
1088
+ fontSize: "font-size",
1089
+ fontSizeAdjust: "font-size-adjust",
1090
+ fontStretch: "font-stretch",
1091
+ fontStyle: "font-style",
1092
+ fontVariant: "font-variant",
1093
+ fontWeight: "font-weight",
1094
+ glyphName: "glyph-name",
1095
+ glyphOrientationHorizontal: "glyph-orientation-horizontal",
1096
+ glyphOrientationVertical: "glyph-orientation-vertical",
1097
+ hrefLang: "hreflang",
1098
+ horizAdvX: "horiz-adv-x",
1099
+ horizOriginX: "horiz-origin-x",
1100
+ horizOriginY: "horiz-origin-y",
1101
+ imageRendering: "image-rendering",
1102
+ letterSpacing: "letter-spacing",
1103
+ lightingColor: "lighting-color",
1104
+ markerEnd: "marker-end",
1105
+ markerMid: "marker-mid",
1106
+ markerStart: "marker-start",
1107
+ navDown: "nav-down",
1108
+ navDownLeft: "nav-down-left",
1109
+ navDownRight: "nav-down-right",
1110
+ navLeft: "nav-left",
1111
+ navNext: "nav-next",
1112
+ navPrev: "nav-prev",
1113
+ navRight: "nav-right",
1114
+ navUp: "nav-up",
1115
+ navUpLeft: "nav-up-left",
1116
+ navUpRight: "nav-up-right",
1117
+ onAbort: "onabort",
1118
+ onActivate: "onactivate",
1119
+ onAfterPrint: "onafterprint",
1120
+ onBeforePrint: "onbeforeprint",
1121
+ onBegin: "onbegin",
1122
+ onCancel: "oncancel",
1123
+ onCanPlay: "oncanplay",
1124
+ onCanPlayThrough: "oncanplaythrough",
1125
+ onChange: "onchange",
1126
+ onClick: "onclick",
1127
+ onClose: "onclose",
1128
+ onCopy: "oncopy",
1129
+ onCueChange: "oncuechange",
1130
+ onCut: "oncut",
1131
+ onDblClick: "ondblclick",
1132
+ onDrag: "ondrag",
1133
+ onDragEnd: "ondragend",
1134
+ onDragEnter: "ondragenter",
1135
+ onDragExit: "ondragexit",
1136
+ onDragLeave: "ondragleave",
1137
+ onDragOver: "ondragover",
1138
+ onDragStart: "ondragstart",
1139
+ onDrop: "ondrop",
1140
+ onDurationChange: "ondurationchange",
1141
+ onEmptied: "onemptied",
1142
+ onEnd: "onend",
1143
+ onEnded: "onended",
1144
+ onError: "onerror",
1145
+ onFocus: "onfocus",
1146
+ onFocusIn: "onfocusin",
1147
+ onFocusOut: "onfocusout",
1148
+ onHashChange: "onhashchange",
1149
+ onInput: "oninput",
1150
+ onInvalid: "oninvalid",
1151
+ onKeyDown: "onkeydown",
1152
+ onKeyPress: "onkeypress",
1153
+ onKeyUp: "onkeyup",
1154
+ onLoad: "onload",
1155
+ onLoadedData: "onloadeddata",
1156
+ onLoadedMetadata: "onloadedmetadata",
1157
+ onLoadStart: "onloadstart",
1158
+ onMessage: "onmessage",
1159
+ onMouseDown: "onmousedown",
1160
+ onMouseEnter: "onmouseenter",
1161
+ onMouseLeave: "onmouseleave",
1162
+ onMouseMove: "onmousemove",
1163
+ onMouseOut: "onmouseout",
1164
+ onMouseOver: "onmouseover",
1165
+ onMouseUp: "onmouseup",
1166
+ onMouseWheel: "onmousewheel",
1167
+ onOffline: "onoffline",
1168
+ onOnline: "ononline",
1169
+ onPageHide: "onpagehide",
1170
+ onPageShow: "onpageshow",
1171
+ onPaste: "onpaste",
1172
+ onPause: "onpause",
1173
+ onPlay: "onplay",
1174
+ onPlaying: "onplaying",
1175
+ onPopState: "onpopstate",
1176
+ onProgress: "onprogress",
1177
+ onRateChange: "onratechange",
1178
+ onRepeat: "onrepeat",
1179
+ onReset: "onreset",
1180
+ onResize: "onresize",
1181
+ onScroll: "onscroll",
1182
+ onSeeked: "onseeked",
1183
+ onSeeking: "onseeking",
1184
+ onSelect: "onselect",
1185
+ onShow: "onshow",
1186
+ onStalled: "onstalled",
1187
+ onStorage: "onstorage",
1188
+ onSubmit: "onsubmit",
1189
+ onSuspend: "onsuspend",
1190
+ onTimeUpdate: "ontimeupdate",
1191
+ onToggle: "ontoggle",
1192
+ onUnload: "onunload",
1193
+ onVolumeChange: "onvolumechange",
1194
+ onWaiting: "onwaiting",
1195
+ onZoom: "onzoom",
1196
+ overlinePosition: "overline-position",
1197
+ overlineThickness: "overline-thickness",
1198
+ paintOrder: "paint-order",
1199
+ panose1: "panose-1",
1200
+ pointerEvents: "pointer-events",
1201
+ referrerPolicy: "referrerpolicy",
1202
+ renderingIntent: "rendering-intent",
1203
+ shapeRendering: "shape-rendering",
1204
+ stopColor: "stop-color",
1205
+ stopOpacity: "stop-opacity",
1206
+ strikethroughPosition: "strikethrough-position",
1207
+ strikethroughThickness: "strikethrough-thickness",
1208
+ strokeDashArray: "stroke-dasharray",
1209
+ strokeDashOffset: "stroke-dashoffset",
1210
+ strokeLineCap: "stroke-linecap",
1211
+ strokeLineJoin: "stroke-linejoin",
1212
+ strokeMiterLimit: "stroke-miterlimit",
1213
+ strokeOpacity: "stroke-opacity",
1214
+ strokeWidth: "stroke-width",
1215
+ tabIndex: "tabindex",
1216
+ textAnchor: "text-anchor",
1217
+ textDecoration: "text-decoration",
1218
+ textRendering: "text-rendering",
1219
+ transformOrigin: "transform-origin",
1220
+ typeOf: "typeof",
1221
+ underlinePosition: "underline-position",
1222
+ underlineThickness: "underline-thickness",
1223
+ unicodeBidi: "unicode-bidi",
1224
+ unicodeRange: "unicode-range",
1225
+ unitsPerEm: "units-per-em",
1226
+ vAlphabetic: "v-alphabetic",
1227
+ vHanging: "v-hanging",
1228
+ vIdeographic: "v-ideographic",
1229
+ vMathematical: "v-mathematical",
1230
+ vectorEffect: "vector-effect",
1231
+ vertAdvY: "vert-adv-y",
1232
+ vertOriginX: "vert-origin-x",
1233
+ vertOriginY: "vert-origin-y",
1234
+ wordSpacing: "word-spacing",
1235
+ writingMode: "writing-mode",
1236
+ xHeight: "x-height",
1237
+ // These were camelcased in Tiny. Now lowercased in SVG 2
1238
+ playbackOrder: "playbackorder",
1239
+ timelineBegin: "timelinebegin"
1240
+ },
1241
+ properties: {
1242
+ about: commaOrSpaceSeparated,
1243
+ accentHeight: number,
1244
+ accumulate: null,
1245
+ additive: null,
1246
+ alignmentBaseline: null,
1247
+ alphabetic: number,
1248
+ amplitude: number,
1249
+ arabicForm: null,
1250
+ ascent: number,
1251
+ attributeName: null,
1252
+ attributeType: null,
1253
+ azimuth: number,
1254
+ bandwidth: null,
1255
+ baselineShift: null,
1256
+ baseFrequency: null,
1257
+ baseProfile: null,
1258
+ bbox: null,
1259
+ begin: null,
1260
+ bias: number,
1261
+ by: null,
1262
+ calcMode: null,
1263
+ capHeight: number,
1264
+ className: spaceSeparated,
1265
+ clip: null,
1266
+ clipPath: null,
1267
+ clipPathUnits: null,
1268
+ clipRule: null,
1269
+ color: null,
1270
+ colorInterpolation: null,
1271
+ colorInterpolationFilters: null,
1272
+ colorProfile: null,
1273
+ colorRendering: null,
1274
+ content: null,
1275
+ contentScriptType: null,
1276
+ contentStyleType: null,
1277
+ crossOrigin: null,
1278
+ cursor: null,
1279
+ cx: null,
1280
+ cy: null,
1281
+ d: null,
1282
+ dataType: null,
1283
+ defaultAction: null,
1284
+ descent: number,
1285
+ diffuseConstant: number,
1286
+ direction: null,
1287
+ display: null,
1288
+ dur: null,
1289
+ divisor: number,
1290
+ dominantBaseline: null,
1291
+ download: boolean,
1292
+ dx: null,
1293
+ dy: null,
1294
+ edgeMode: null,
1295
+ editable: null,
1296
+ elevation: number,
1297
+ enableBackground: null,
1298
+ end: null,
1299
+ event: null,
1300
+ exponent: number,
1301
+ externalResourcesRequired: null,
1302
+ fill: null,
1303
+ fillOpacity: number,
1304
+ fillRule: null,
1305
+ filter: null,
1306
+ filterRes: null,
1307
+ filterUnits: null,
1308
+ floodColor: null,
1309
+ floodOpacity: null,
1310
+ focusable: null,
1311
+ focusHighlight: null,
1312
+ fontFamily: null,
1313
+ fontSize: null,
1314
+ fontSizeAdjust: null,
1315
+ fontStretch: null,
1316
+ fontStyle: null,
1317
+ fontVariant: null,
1318
+ fontWeight: null,
1319
+ format: null,
1320
+ fr: null,
1321
+ from: null,
1322
+ fx: null,
1323
+ fy: null,
1324
+ g1: commaSeparated,
1325
+ g2: commaSeparated,
1326
+ glyphName: commaSeparated,
1327
+ glyphOrientationHorizontal: null,
1328
+ glyphOrientationVertical: null,
1329
+ glyphRef: null,
1330
+ gradientTransform: null,
1331
+ gradientUnits: null,
1332
+ handler: null,
1333
+ hanging: number,
1334
+ hatchContentUnits: null,
1335
+ hatchUnits: null,
1336
+ height: null,
1337
+ href: null,
1338
+ hrefLang: null,
1339
+ horizAdvX: number,
1340
+ horizOriginX: number,
1341
+ horizOriginY: number,
1342
+ id: null,
1343
+ ideographic: number,
1344
+ imageRendering: null,
1345
+ initialVisibility: null,
1346
+ in: null,
1347
+ in2: null,
1348
+ intercept: number,
1349
+ k: number,
1350
+ k1: number,
1351
+ k2: number,
1352
+ k3: number,
1353
+ k4: number,
1354
+ kernelMatrix: commaOrSpaceSeparated,
1355
+ kernelUnitLength: null,
1356
+ keyPoints: null,
1357
+ // SEMI_COLON_SEPARATED
1358
+ keySplines: null,
1359
+ // SEMI_COLON_SEPARATED
1360
+ keyTimes: null,
1361
+ // SEMI_COLON_SEPARATED
1362
+ kerning: null,
1363
+ lang: null,
1364
+ lengthAdjust: null,
1365
+ letterSpacing: null,
1366
+ lightingColor: null,
1367
+ limitingConeAngle: number,
1368
+ local: null,
1369
+ markerEnd: null,
1370
+ markerMid: null,
1371
+ markerStart: null,
1372
+ markerHeight: null,
1373
+ markerUnits: null,
1374
+ markerWidth: null,
1375
+ mask: null,
1376
+ maskContentUnits: null,
1377
+ maskUnits: null,
1378
+ mathematical: null,
1379
+ max: null,
1380
+ media: null,
1381
+ mediaCharacterEncoding: null,
1382
+ mediaContentEncodings: null,
1383
+ mediaSize: number,
1384
+ mediaTime: null,
1385
+ method: null,
1386
+ min: null,
1387
+ mode: null,
1388
+ name: null,
1389
+ navDown: null,
1390
+ navDownLeft: null,
1391
+ navDownRight: null,
1392
+ navLeft: null,
1393
+ navNext: null,
1394
+ navPrev: null,
1395
+ navRight: null,
1396
+ navUp: null,
1397
+ navUpLeft: null,
1398
+ navUpRight: null,
1399
+ numOctaves: null,
1400
+ observer: null,
1401
+ offset: null,
1402
+ onAbort: null,
1403
+ onActivate: null,
1404
+ onAfterPrint: null,
1405
+ onBeforePrint: null,
1406
+ onBegin: null,
1407
+ onCancel: null,
1408
+ onCanPlay: null,
1409
+ onCanPlayThrough: null,
1410
+ onChange: null,
1411
+ onClick: null,
1412
+ onClose: null,
1413
+ onCopy: null,
1414
+ onCueChange: null,
1415
+ onCut: null,
1416
+ onDblClick: null,
1417
+ onDrag: null,
1418
+ onDragEnd: null,
1419
+ onDragEnter: null,
1420
+ onDragExit: null,
1421
+ onDragLeave: null,
1422
+ onDragOver: null,
1423
+ onDragStart: null,
1424
+ onDrop: null,
1425
+ onDurationChange: null,
1426
+ onEmptied: null,
1427
+ onEnd: null,
1428
+ onEnded: null,
1429
+ onError: null,
1430
+ onFocus: null,
1431
+ onFocusIn: null,
1432
+ onFocusOut: null,
1433
+ onHashChange: null,
1434
+ onInput: null,
1435
+ onInvalid: null,
1436
+ onKeyDown: null,
1437
+ onKeyPress: null,
1438
+ onKeyUp: null,
1439
+ onLoad: null,
1440
+ onLoadedData: null,
1441
+ onLoadedMetadata: null,
1442
+ onLoadStart: null,
1443
+ onMessage: null,
1444
+ onMouseDown: null,
1445
+ onMouseEnter: null,
1446
+ onMouseLeave: null,
1447
+ onMouseMove: null,
1448
+ onMouseOut: null,
1449
+ onMouseOver: null,
1450
+ onMouseUp: null,
1451
+ onMouseWheel: null,
1452
+ onOffline: null,
1453
+ onOnline: null,
1454
+ onPageHide: null,
1455
+ onPageShow: null,
1456
+ onPaste: null,
1457
+ onPause: null,
1458
+ onPlay: null,
1459
+ onPlaying: null,
1460
+ onPopState: null,
1461
+ onProgress: null,
1462
+ onRateChange: null,
1463
+ onRepeat: null,
1464
+ onReset: null,
1465
+ onResize: null,
1466
+ onScroll: null,
1467
+ onSeeked: null,
1468
+ onSeeking: null,
1469
+ onSelect: null,
1470
+ onShow: null,
1471
+ onStalled: null,
1472
+ onStorage: null,
1473
+ onSubmit: null,
1474
+ onSuspend: null,
1475
+ onTimeUpdate: null,
1476
+ onToggle: null,
1477
+ onUnload: null,
1478
+ onVolumeChange: null,
1479
+ onWaiting: null,
1480
+ onZoom: null,
1481
+ opacity: null,
1482
+ operator: null,
1483
+ order: null,
1484
+ orient: null,
1485
+ orientation: null,
1486
+ origin: null,
1487
+ overflow: null,
1488
+ overlay: null,
1489
+ overlinePosition: number,
1490
+ overlineThickness: number,
1491
+ paintOrder: null,
1492
+ panose1: null,
1493
+ path: null,
1494
+ pathLength: number,
1495
+ patternContentUnits: null,
1496
+ patternTransform: null,
1497
+ patternUnits: null,
1498
+ phase: null,
1499
+ ping: spaceSeparated,
1500
+ pitch: null,
1501
+ playbackOrder: null,
1502
+ pointerEvents: null,
1503
+ points: null,
1504
+ pointsAtX: number,
1505
+ pointsAtY: number,
1506
+ pointsAtZ: number,
1507
+ preserveAlpha: null,
1508
+ preserveAspectRatio: null,
1509
+ primitiveUnits: null,
1510
+ propagate: null,
1511
+ property: commaOrSpaceSeparated,
1512
+ r: null,
1513
+ radius: null,
1514
+ referrerPolicy: null,
1515
+ refX: null,
1516
+ refY: null,
1517
+ rel: commaOrSpaceSeparated,
1518
+ rev: commaOrSpaceSeparated,
1519
+ renderingIntent: null,
1520
+ repeatCount: null,
1521
+ repeatDur: null,
1522
+ requiredExtensions: commaOrSpaceSeparated,
1523
+ requiredFeatures: commaOrSpaceSeparated,
1524
+ requiredFonts: commaOrSpaceSeparated,
1525
+ requiredFormats: commaOrSpaceSeparated,
1526
+ resource: null,
1527
+ restart: null,
1528
+ result: null,
1529
+ rotate: null,
1530
+ rx: null,
1531
+ ry: null,
1532
+ scale: null,
1533
+ seed: null,
1534
+ shapeRendering: null,
1535
+ side: null,
1536
+ slope: null,
1537
+ snapshotTime: null,
1538
+ specularConstant: number,
1539
+ specularExponent: number,
1540
+ spreadMethod: null,
1541
+ spacing: null,
1542
+ startOffset: null,
1543
+ stdDeviation: null,
1544
+ stemh: null,
1545
+ stemv: null,
1546
+ stitchTiles: null,
1547
+ stopColor: null,
1548
+ stopOpacity: null,
1549
+ strikethroughPosition: number,
1550
+ strikethroughThickness: number,
1551
+ string: null,
1552
+ stroke: null,
1553
+ strokeDashArray: commaOrSpaceSeparated,
1554
+ strokeDashOffset: null,
1555
+ strokeLineCap: null,
1556
+ strokeLineJoin: null,
1557
+ strokeMiterLimit: number,
1558
+ strokeOpacity: number,
1559
+ strokeWidth: null,
1560
+ style: null,
1561
+ surfaceScale: number,
1562
+ syncBehavior: null,
1563
+ syncBehaviorDefault: null,
1564
+ syncMaster: null,
1565
+ syncTolerance: null,
1566
+ syncToleranceDefault: null,
1567
+ systemLanguage: commaOrSpaceSeparated,
1568
+ tabIndex: number,
1569
+ tableValues: null,
1570
+ target: null,
1571
+ targetX: number,
1572
+ targetY: number,
1573
+ textAnchor: null,
1574
+ textDecoration: null,
1575
+ textRendering: null,
1576
+ textLength: null,
1577
+ timelineBegin: null,
1578
+ title: null,
1579
+ transformBehavior: null,
1580
+ type: null,
1581
+ typeOf: commaOrSpaceSeparated,
1582
+ to: null,
1583
+ transform: null,
1584
+ transformOrigin: null,
1585
+ u1: null,
1586
+ u2: null,
1587
+ underlinePosition: number,
1588
+ underlineThickness: number,
1589
+ unicode: null,
1590
+ unicodeBidi: null,
1591
+ unicodeRange: null,
1592
+ unitsPerEm: number,
1593
+ values: null,
1594
+ vAlphabetic: number,
1595
+ vMathematical: number,
1596
+ vectorEffect: null,
1597
+ vHanging: number,
1598
+ vIdeographic: number,
1599
+ version: null,
1600
+ vertAdvY: number,
1601
+ vertOriginX: number,
1602
+ vertOriginY: number,
1603
+ viewBox: null,
1604
+ viewTarget: null,
1605
+ visibility: null,
1606
+ width: null,
1607
+ widths: null,
1608
+ wordSpacing: null,
1609
+ writingMode: null,
1610
+ x: null,
1611
+ x1: null,
1612
+ x2: null,
1613
+ xChannelSelector: null,
1614
+ xHeight: number,
1615
+ y: null,
1616
+ y1: null,
1617
+ y2: null,
1618
+ yChannelSelector: null,
1619
+ z: null,
1620
+ zoomAndPan: null
1621
+ },
1622
+ space: "svg",
1623
+ transform: caseSensitiveTransform
1624
+ });
1625
+
1626
+ // node_modules/property-information/lib/xlink.js
1627
+ var xlink = create({
1628
+ properties: {
1629
+ xLinkActuate: null,
1630
+ xLinkArcRole: null,
1631
+ xLinkHref: null,
1632
+ xLinkRole: null,
1633
+ xLinkShow: null,
1634
+ xLinkTitle: null,
1635
+ xLinkType: null
1636
+ },
1637
+ space: "xlink",
1638
+ transform(_2, property) {
1639
+ return "xlink:" + property.slice(5).toLowerCase();
1640
+ }
1641
+ });
1642
+
1643
+ // node_modules/property-information/lib/xmlns.js
1644
+ var xmlns = create({
1645
+ attributes: { xmlnsxlink: "xmlns:xlink" },
1646
+ properties: { xmlnsXLink: null, xmlns: null },
1647
+ space: "xmlns",
1648
+ transform: caseInsensitiveTransform
1649
+ });
1650
+
1651
+ // node_modules/property-information/lib/xml.js
1652
+ var xml = create({
1653
+ properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
1654
+ space: "xml",
1655
+ transform(_2, property) {
1656
+ return "xml:" + property.slice(3).toLowerCase();
1657
+ }
1658
+ });
1659
+
1660
+ // node_modules/property-information/lib/hast-to-react.js
1661
+ var hastToReact = {
1662
+ classId: "classID",
1663
+ dataType: "datatype",
1664
+ itemId: "itemID",
1665
+ strokeDashArray: "strokeDasharray",
1666
+ strokeDashOffset: "strokeDashoffset",
1667
+ strokeLineCap: "strokeLinecap",
1668
+ strokeLineJoin: "strokeLinejoin",
1669
+ strokeMiterLimit: "strokeMiterlimit",
1670
+ typeOf: "typeof",
1671
+ xLinkActuate: "xlinkActuate",
1672
+ xLinkArcRole: "xlinkArcrole",
1673
+ xLinkHref: "xlinkHref",
1674
+ xLinkRole: "xlinkRole",
1675
+ xLinkShow: "xlinkShow",
1676
+ xLinkTitle: "xlinkTitle",
1677
+ xLinkType: "xlinkType",
1678
+ xmlnsXLink: "xmlnsXlink"
1679
+ };
1680
+
1681
+ // node_modules/property-information/lib/find.js
1682
+ var cap = /[A-Z]/g;
1683
+ var dash = /-[a-z]/g;
1684
+ var valid = /^data[-\w.:]+$/i;
1685
+ function find(schema, value) {
1686
+ const normal = normalize(value);
1687
+ let property = value;
1688
+ let Type = Info;
1689
+ if (normal in schema.normal) {
1690
+ return schema.property[schema.normal[normal]];
1691
+ }
1692
+ if (normal.length > 4 && normal.slice(0, 4) === "data" && valid.test(value)) {
1693
+ if (value.charAt(4) === "-") {
1694
+ const rest = value.slice(5).replace(dash, camelcase);
1695
+ property = "data" + rest.charAt(0).toUpperCase() + rest.slice(1);
1696
+ } else {
1697
+ const rest = value.slice(4);
1698
+ if (!dash.test(rest)) {
1699
+ let dashes = rest.replace(cap, kebab);
1700
+ if (dashes.charAt(0) !== "-") {
1701
+ dashes = "-" + dashes;
1702
+ }
1703
+ value = "data" + dashes;
1704
+ }
1705
+ }
1706
+ Type = DefinedInfo;
1707
+ }
1708
+ return new Type(property, value);
1709
+ }
1710
+ function kebab($0) {
1711
+ return "-" + $0.toLowerCase();
1712
+ }
1713
+ function camelcase($0) {
1714
+ return $0.charAt(1).toUpperCase();
1715
+ }
1716
+
1717
+ // node_modules/property-information/index.js
1718
+ var html2 = merge([aria, html, xlink, xmlns, xml], "html");
1719
+ var svg2 = merge([aria, svg, xlink, xmlns, xml], "svg");
1720
+
1721
+ // node_modules/space-separated-tokens/index.js
1722
+ function stringify2(values) {
1723
+ return values.join(" ").trim();
1724
+ }
1725
+
1726
+ // node_modules/hast-util-to-jsx-runtime/lib/index.js
1727
+ var import_style_to_js = __toESM(require_cjs3());
1728
+ var pointStart = point("start");
1729
+ function point(type) {
1730
+ return point3;
1731
+ function point3(node) {
1732
+ const point4 = node && node.position && node.position[type] || {};
1733
+ if (typeof point4.line === "number" && point4.line > 0 && typeof point4.column === "number" && point4.column > 0) {
1734
+ return {
1735
+ line: point4.line,
1736
+ column: point4.column,
1737
+ offset: typeof point4.offset === "number" && point4.offset > -1 ? point4.offset : void 0
1738
+ };
1739
+ }
1740
+ }
1741
+ }
1742
+
1743
+ // node_modules/unist-util-stringify-position/lib/index.js
1744
+ function stringifyPosition(value) {
1745
+ if (!value || typeof value !== "object") {
1746
+ return "";
1747
+ }
1748
+ if ("position" in value || "type" in value) {
1749
+ return position2(value.position);
1750
+ }
1751
+ if ("start" in value || "end" in value) {
1752
+ return position2(value);
1753
+ }
1754
+ if ("line" in value || "column" in value) {
1755
+ return point2(value);
1756
+ }
1757
+ return "";
1758
+ }
1759
+ function point2(point3) {
1760
+ return index(point3 && point3.line) + ":" + index(point3 && point3.column);
1761
+ }
1762
+ function position2(pos) {
1763
+ return point2(pos && pos.start) + "-" + point2(pos && pos.end);
1764
+ }
1765
+ function index(value) {
1766
+ return value && typeof value === "number" ? value : 1;
1767
+ }
1768
+
1769
+ // node_modules/vfile-message/lib/index.js
1770
+ var VFileMessage = class extends Error {
1771
+ /**
1772
+ * Create a message for `reason`.
1773
+ *
1774
+ * > 🪦 **Note**: also has obsolete signatures.
1775
+ *
1776
+ * @overload
1777
+ * @param {string} reason
1778
+ * @param {Options | null | undefined} [options]
1779
+ * @returns
1780
+ *
1781
+ * @overload
1782
+ * @param {string} reason
1783
+ * @param {Node | NodeLike | null | undefined} parent
1784
+ * @param {string | null | undefined} [origin]
1785
+ * @returns
1786
+ *
1787
+ * @overload
1788
+ * @param {string} reason
1789
+ * @param {Point | Position | null | undefined} place
1790
+ * @param {string | null | undefined} [origin]
1791
+ * @returns
1792
+ *
1793
+ * @overload
1794
+ * @param {string} reason
1795
+ * @param {string | null | undefined} [origin]
1796
+ * @returns
1797
+ *
1798
+ * @overload
1799
+ * @param {Error | VFileMessage} cause
1800
+ * @param {Node | NodeLike | null | undefined} parent
1801
+ * @param {string | null | undefined} [origin]
1802
+ * @returns
1803
+ *
1804
+ * @overload
1805
+ * @param {Error | VFileMessage} cause
1806
+ * @param {Point | Position | null | undefined} place
1807
+ * @param {string | null | undefined} [origin]
1808
+ * @returns
1809
+ *
1810
+ * @overload
1811
+ * @param {Error | VFileMessage} cause
1812
+ * @param {string | null | undefined} [origin]
1813
+ * @returns
1814
+ *
1815
+ * @param {Error | VFileMessage | string} causeOrReason
1816
+ * Reason for message, should use markdown.
1817
+ * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]
1818
+ * Configuration (optional).
1819
+ * @param {string | null | undefined} [origin]
1820
+ * Place in code where the message originates (example:
1821
+ * `'my-package:my-rule'` or `'my-rule'`).
1822
+ * @returns
1823
+ * Instance of `VFileMessage`.
1824
+ */
1825
+ // eslint-disable-next-line complexity
1826
+ constructor(causeOrReason, optionsOrParentOrPlace, origin) {
1827
+ super();
1828
+ if (typeof optionsOrParentOrPlace === "string") {
1829
+ origin = optionsOrParentOrPlace;
1830
+ optionsOrParentOrPlace = void 0;
1831
+ }
1832
+ let reason = "";
1833
+ let options = {};
1834
+ let legacyCause = false;
1835
+ if (optionsOrParentOrPlace) {
1836
+ if ("line" in optionsOrParentOrPlace && "column" in optionsOrParentOrPlace) {
1837
+ options = { place: optionsOrParentOrPlace };
1838
+ } else if ("start" in optionsOrParentOrPlace && "end" in optionsOrParentOrPlace) {
1839
+ options = { place: optionsOrParentOrPlace };
1840
+ } else if ("type" in optionsOrParentOrPlace) {
1841
+ options = {
1842
+ ancestors: [optionsOrParentOrPlace],
1843
+ place: optionsOrParentOrPlace.position
1844
+ };
1845
+ } else {
1846
+ options = { ...optionsOrParentOrPlace };
1847
+ }
1848
+ }
1849
+ if (typeof causeOrReason === "string") {
1850
+ reason = causeOrReason;
1851
+ } else if (!options.cause && causeOrReason) {
1852
+ legacyCause = true;
1853
+ reason = causeOrReason.message;
1854
+ options.cause = causeOrReason;
1855
+ }
1856
+ if (!options.ruleId && !options.source && typeof origin === "string") {
1857
+ const index2 = origin.indexOf(":");
1858
+ if (index2 === -1) {
1859
+ options.ruleId = origin;
1860
+ } else {
1861
+ options.source = origin.slice(0, index2);
1862
+ options.ruleId = origin.slice(index2 + 1);
1863
+ }
1864
+ }
1865
+ if (!options.place && options.ancestors && options.ancestors) {
1866
+ const parent = options.ancestors[options.ancestors.length - 1];
1867
+ if (parent) {
1868
+ options.place = parent.position;
1869
+ }
1870
+ }
1871
+ const start2 = options.place && "start" in options.place ? options.place.start : options.place;
1872
+ this.ancestors = options.ancestors || void 0;
1873
+ this.cause = options.cause || void 0;
1874
+ this.column = start2 ? start2.column : void 0;
1875
+ this.fatal = void 0;
1876
+ this.file = "";
1877
+ this.message = reason;
1878
+ this.line = start2 ? start2.line : void 0;
1879
+ this.name = stringifyPosition(options.place) || "1:1";
1880
+ this.place = options.place || void 0;
1881
+ this.reason = this.message;
1882
+ this.ruleId = options.ruleId || void 0;
1883
+ this.source = options.source || void 0;
1884
+ this.stack = legacyCause && options.cause && typeof options.cause.stack === "string" ? options.cause.stack : "";
1885
+ this.actual = void 0;
1886
+ this.expected = void 0;
1887
+ this.note = void 0;
1888
+ this.url = void 0;
1889
+ }
1890
+ };
1891
+ VFileMessage.prototype.file = "";
1892
+ VFileMessage.prototype.name = "";
1893
+ VFileMessage.prototype.reason = "";
1894
+ VFileMessage.prototype.message = "";
1895
+ VFileMessage.prototype.stack = "";
1896
+ VFileMessage.prototype.column = void 0;
1897
+ VFileMessage.prototype.line = void 0;
1898
+ VFileMessage.prototype.ancestors = void 0;
1899
+ VFileMessage.prototype.cause = void 0;
1900
+ VFileMessage.prototype.fatal = void 0;
1901
+ VFileMessage.prototype.place = void 0;
1902
+ VFileMessage.prototype.ruleId = void 0;
1903
+ VFileMessage.prototype.source = void 0;
1904
+
1905
+ // node_modules/hast-util-to-jsx-runtime/lib/index.js
1906
+ var own2 = {}.hasOwnProperty;
1907
+ var emptyMap = /* @__PURE__ */ new Map();
1908
+ var cap2 = /[A-Z]/g;
1909
+ var tableElements = /* @__PURE__ */ new Set(["table", "tbody", "thead", "tfoot", "tr"]);
1910
+ var tableCellElement = /* @__PURE__ */ new Set(["td", "th"]);
1911
+ var docs = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
1912
+ function toJsxRuntime(tree, options) {
1913
+ if (!options || options.Fragment === void 0) {
1914
+ throw new TypeError("Expected `Fragment` in options");
1915
+ }
1916
+ const filePath = options.filePath || void 0;
1917
+ let create2;
1918
+ if (options.development) {
1919
+ if (typeof options.jsxDEV !== "function") {
1920
+ throw new TypeError(
1921
+ "Expected `jsxDEV` in options when `development: true`"
1922
+ );
1923
+ }
1924
+ create2 = developmentCreate(filePath, options.jsxDEV);
1925
+ } else {
1926
+ if (typeof options.jsx !== "function") {
1927
+ throw new TypeError("Expected `jsx` in production options");
1928
+ }
1929
+ if (typeof options.jsxs !== "function") {
1930
+ throw new TypeError("Expected `jsxs` in production options");
1931
+ }
1932
+ create2 = productionCreate(filePath, options.jsx, options.jsxs);
1933
+ }
1934
+ const state = {
1935
+ Fragment: options.Fragment,
1936
+ ancestors: [],
1937
+ components: options.components || {},
1938
+ create: create2,
1939
+ elementAttributeNameCase: options.elementAttributeNameCase || "react",
1940
+ evaluater: options.createEvaluater ? options.createEvaluater() : void 0,
1941
+ filePath,
1942
+ ignoreInvalidStyle: options.ignoreInvalidStyle || false,
1943
+ passKeys: options.passKeys !== false,
1944
+ passNode: options.passNode || false,
1945
+ schema: options.space === "svg" ? svg2 : html2,
1946
+ stylePropertyNameCase: options.stylePropertyNameCase || "dom",
1947
+ tableCellAlignToStyle: options.tableCellAlignToStyle !== false
1948
+ };
1949
+ const result = one(state, tree, void 0);
1950
+ if (result && typeof result !== "string") {
1951
+ return result;
1952
+ }
1953
+ return state.create(
1954
+ tree,
1955
+ state.Fragment,
1956
+ { children: result || void 0 },
1957
+ void 0
1958
+ );
1959
+ }
1960
+ function one(state, node, key) {
1961
+ if (node.type === "element") {
1962
+ return element(state, node, key);
1963
+ }
1964
+ if (node.type === "mdxFlowExpression" || node.type === "mdxTextExpression") {
1965
+ return mdxExpression(state, node);
1966
+ }
1967
+ if (node.type === "mdxJsxFlowElement" || node.type === "mdxJsxTextElement") {
1968
+ return mdxJsxElement(state, node, key);
1969
+ }
1970
+ if (node.type === "mdxjsEsm") {
1971
+ return mdxEsm(state, node);
1972
+ }
1973
+ if (node.type === "root") {
1974
+ return root(state, node, key);
1975
+ }
1976
+ if (node.type === "text") {
1977
+ return text(state, node);
1978
+ }
1979
+ }
1980
+ function element(state, node, key) {
1981
+ const parentSchema = state.schema;
1982
+ let schema = parentSchema;
1983
+ if (node.tagName.toLowerCase() === "svg" && parentSchema.space === "html") {
1984
+ schema = svg2;
1985
+ state.schema = schema;
1986
+ }
1987
+ state.ancestors.push(node);
1988
+ const type = findComponentFromName(state, node.tagName, false);
1989
+ const props = createElementProps(state, node);
1990
+ let children = createChildren(state, node);
1991
+ if (tableElements.has(node.tagName)) {
1992
+ children = children.filter(function(child) {
1993
+ return typeof child === "string" ? !whitespace(child) : true;
1994
+ });
1995
+ }
1996
+ addNode(state, props, type, node);
1997
+ addChildren(props, children);
1998
+ state.ancestors.pop();
1999
+ state.schema = parentSchema;
2000
+ return state.create(node, type, props, key);
2001
+ }
2002
+ function mdxExpression(state, node) {
2003
+ if (node.data && node.data.estree && state.evaluater) {
2004
+ const program = node.data.estree;
2005
+ const expression = program.body[0];
2006
+ ok(expression.type === "ExpressionStatement");
2007
+ return (
2008
+ /** @type {Child | undefined} */
2009
+ state.evaluater.evaluateExpression(expression.expression)
2010
+ );
2011
+ }
2012
+ crashEstree(state, node.position);
2013
+ }
2014
+ function mdxEsm(state, node) {
2015
+ if (node.data && node.data.estree && state.evaluater) {
2016
+ return (
2017
+ /** @type {Child | undefined} */
2018
+ state.evaluater.evaluateProgram(node.data.estree)
2019
+ );
2020
+ }
2021
+ crashEstree(state, node.position);
2022
+ }
2023
+ function mdxJsxElement(state, node, key) {
2024
+ const parentSchema = state.schema;
2025
+ let schema = parentSchema;
2026
+ if (node.name === "svg" && parentSchema.space === "html") {
2027
+ schema = svg2;
2028
+ state.schema = schema;
2029
+ }
2030
+ state.ancestors.push(node);
2031
+ const type = node.name === null ? state.Fragment : findComponentFromName(state, node.name, true);
2032
+ const props = createJsxElementProps(state, node);
2033
+ const children = createChildren(state, node);
2034
+ addNode(state, props, type, node);
2035
+ addChildren(props, children);
2036
+ state.ancestors.pop();
2037
+ state.schema = parentSchema;
2038
+ return state.create(node, type, props, key);
2039
+ }
2040
+ function root(state, node, key) {
2041
+ const props = {};
2042
+ addChildren(props, createChildren(state, node));
2043
+ return state.create(node, state.Fragment, props, key);
2044
+ }
2045
+ function text(_2, node) {
2046
+ return node.value;
2047
+ }
2048
+ function addNode(state, props, type, node) {
2049
+ if (typeof type !== "string" && type !== state.Fragment && state.passNode) {
2050
+ props.node = node;
2051
+ }
2052
+ }
2053
+ function addChildren(props, children) {
2054
+ if (children.length > 0) {
2055
+ const value = children.length > 1 ? children : children[0];
2056
+ if (value) {
2057
+ props.children = value;
2058
+ }
2059
+ }
2060
+ }
2061
+ function productionCreate(_2, jsx, jsxs) {
2062
+ return create2;
2063
+ function create2(_3, type, props, key) {
2064
+ const isStaticChildren = Array.isArray(props.children);
2065
+ const fn = isStaticChildren ? jsxs : jsx;
2066
+ return key ? fn(type, props, key) : fn(type, props);
2067
+ }
2068
+ }
2069
+ function developmentCreate(filePath, jsxDEV) {
2070
+ return create2;
2071
+ function create2(node, type, props, key) {
2072
+ const isStaticChildren = Array.isArray(props.children);
2073
+ const point3 = pointStart(node);
2074
+ return jsxDEV(
2075
+ type,
2076
+ props,
2077
+ key,
2078
+ isStaticChildren,
2079
+ {
2080
+ columnNumber: point3 ? point3.column - 1 : void 0,
2081
+ fileName: filePath,
2082
+ lineNumber: point3 ? point3.line : void 0
2083
+ },
2084
+ void 0
2085
+ );
2086
+ }
2087
+ }
2088
+ function createElementProps(state, node) {
2089
+ const props = {};
2090
+ let alignValue;
2091
+ let prop;
2092
+ for (prop in node.properties) {
2093
+ if (prop !== "children" && own2.call(node.properties, prop)) {
2094
+ const result = createProperty(state, prop, node.properties[prop]);
2095
+ if (result) {
2096
+ const [key, value] = result;
2097
+ if (state.tableCellAlignToStyle && key === "align" && typeof value === "string" && tableCellElement.has(node.tagName)) {
2098
+ alignValue = value;
2099
+ } else {
2100
+ props[key] = value;
2101
+ }
2102
+ }
2103
+ }
2104
+ }
2105
+ if (alignValue) {
2106
+ const style = (
2107
+ /** @type {Style} */
2108
+ props.style || (props.style = {})
2109
+ );
2110
+ style[state.stylePropertyNameCase === "css" ? "text-align" : "textAlign"] = alignValue;
2111
+ }
2112
+ return props;
2113
+ }
2114
+ function createJsxElementProps(state, node) {
2115
+ const props = {};
2116
+ for (const attribute of node.attributes) {
2117
+ if (attribute.type === "mdxJsxExpressionAttribute") {
2118
+ if (attribute.data && attribute.data.estree && state.evaluater) {
2119
+ const program = attribute.data.estree;
2120
+ const expression = program.body[0];
2121
+ ok(expression.type === "ExpressionStatement");
2122
+ const objectExpression = expression.expression;
2123
+ ok(objectExpression.type === "ObjectExpression");
2124
+ const property = objectExpression.properties[0];
2125
+ ok(property.type === "SpreadElement");
2126
+ Object.assign(
2127
+ props,
2128
+ state.evaluater.evaluateExpression(property.argument)
2129
+ );
2130
+ } else {
2131
+ crashEstree(state, node.position);
2132
+ }
2133
+ } else {
2134
+ const name2 = attribute.name;
2135
+ let value;
2136
+ if (attribute.value && typeof attribute.value === "object") {
2137
+ if (attribute.value.data && attribute.value.data.estree && state.evaluater) {
2138
+ const program = attribute.value.data.estree;
2139
+ const expression = program.body[0];
2140
+ ok(expression.type === "ExpressionStatement");
2141
+ value = state.evaluater.evaluateExpression(expression.expression);
2142
+ } else {
2143
+ crashEstree(state, node.position);
2144
+ }
2145
+ } else {
2146
+ value = attribute.value === null ? true : attribute.value;
2147
+ }
2148
+ props[name2] = /** @type {Props[keyof Props]} */
2149
+ value;
2150
+ }
2151
+ }
2152
+ return props;
2153
+ }
2154
+ function createChildren(state, node) {
2155
+ const children = [];
2156
+ let index2 = -1;
2157
+ const countsByName = state.passKeys ? /* @__PURE__ */ new Map() : emptyMap;
2158
+ while (++index2 < node.children.length) {
2159
+ const child = node.children[index2];
2160
+ let key;
2161
+ if (state.passKeys) {
2162
+ const name2 = child.type === "element" ? child.tagName : child.type === "mdxJsxFlowElement" || child.type === "mdxJsxTextElement" ? child.name : void 0;
2163
+ if (name2) {
2164
+ const count = countsByName.get(name2) || 0;
2165
+ key = name2 + "-" + count;
2166
+ countsByName.set(name2, count + 1);
2167
+ }
2168
+ }
2169
+ const result = one(state, child, key);
2170
+ if (result !== void 0) children.push(result);
2171
+ }
2172
+ return children;
2173
+ }
2174
+ function createProperty(state, prop, value) {
2175
+ const info = find(state.schema, prop);
2176
+ if (value === null || value === void 0 || typeof value === "number" && Number.isNaN(value)) {
2177
+ return;
2178
+ }
2179
+ if (Array.isArray(value)) {
2180
+ value = info.commaSeparated ? stringify(value) : stringify2(value);
2181
+ }
2182
+ if (info.property === "style") {
2183
+ let styleObject = typeof value === "object" ? value : parseStyle(state, String(value));
2184
+ if (state.stylePropertyNameCase === "css") {
2185
+ styleObject = transformStylesToCssCasing(styleObject);
2186
+ }
2187
+ return ["style", styleObject];
2188
+ }
2189
+ return [
2190
+ state.elementAttributeNameCase === "react" && info.space ? hastToReact[info.property] || info.property : info.attribute,
2191
+ value
2192
+ ];
2193
+ }
2194
+ function parseStyle(state, value) {
2195
+ try {
2196
+ return (0, import_style_to_js.default)(value, { reactCompat: true });
2197
+ } catch (error) {
2198
+ if (state.ignoreInvalidStyle) {
2199
+ return {};
2200
+ }
2201
+ const cause = (
2202
+ /** @type {Error} */
2203
+ error
2204
+ );
2205
+ const message = new VFileMessage("Cannot parse `style` attribute", {
2206
+ ancestors: state.ancestors,
2207
+ cause,
2208
+ ruleId: "style",
2209
+ source: "hast-util-to-jsx-runtime"
2210
+ });
2211
+ message.file = state.filePath || void 0;
2212
+ message.url = docs + "#cannot-parse-style-attribute";
2213
+ throw message;
2214
+ }
2215
+ }
2216
+ function findComponentFromName(state, name2, allowExpression) {
2217
+ let result;
2218
+ if (!allowExpression) {
2219
+ result = { type: "Literal", value: name2 };
2220
+ } else if (name2.includes(".")) {
2221
+ const identifiers = name2.split(".");
2222
+ let index2 = -1;
2223
+ let node;
2224
+ while (++index2 < identifiers.length) {
2225
+ const prop = name(identifiers[index2]) ? { type: "Identifier", name: identifiers[index2] } : { type: "Literal", value: identifiers[index2] };
2226
+ node = node ? {
2227
+ type: "MemberExpression",
2228
+ object: node,
2229
+ property: prop,
2230
+ computed: Boolean(index2 && prop.type === "Literal"),
2231
+ optional: false
2232
+ } : prop;
2233
+ }
2234
+ result = node;
2235
+ } else {
2236
+ result = name(name2) && !/^[a-z]/.test(name2) ? { type: "Identifier", name: name2 } : { type: "Literal", value: name2 };
2237
+ }
2238
+ if (result.type === "Literal") {
2239
+ const name3 = (
2240
+ /** @type {string | number} */
2241
+ result.value
2242
+ );
2243
+ return own2.call(state.components, name3) ? state.components[name3] : name3;
2244
+ }
2245
+ if (state.evaluater) {
2246
+ return state.evaluater.evaluateExpression(result);
2247
+ }
2248
+ crashEstree(state);
2249
+ }
2250
+ function crashEstree(state, place) {
2251
+ const message = new VFileMessage(
2252
+ "Cannot handle MDX estrees without `createEvaluater`",
2253
+ {
2254
+ ancestors: state.ancestors,
2255
+ place,
2256
+ ruleId: "mdx-estree",
2257
+ source: "hast-util-to-jsx-runtime"
2258
+ }
2259
+ );
2260
+ message.file = state.filePath || void 0;
2261
+ message.url = docs + "#cannot-handle-mdx-estrees-without-createevaluater";
2262
+ throw message;
2263
+ }
2264
+ function transformStylesToCssCasing(domCasing) {
2265
+ const cssCasing = {};
2266
+ let from;
2267
+ for (from in domCasing) {
2268
+ if (own2.call(domCasing, from)) {
2269
+ cssCasing[transformStyleToCssCasing(from)] = domCasing[from];
2270
+ }
2271
+ }
2272
+ return cssCasing;
2273
+ }
2274
+ function transformStyleToCssCasing(from) {
2275
+ let to = from.replace(cap2, toDash);
2276
+ if (to.slice(0, 3) === "ms-") to = "-" + to;
2277
+ return to;
2278
+ }
2279
+ function toDash($0) {
2280
+ return "-" + $0.toLowerCase();
2281
+ }
2282
+
2283
+ // node_modules/@quartz-community/utils/dist/jsx.js
2284
+ function childrenToString(children) {
2285
+ if (typeof children === "string") return children;
2286
+ if (Array.isArray(children)) return children.map(childrenToString).join("");
2287
+ return String(children ?? "");
2288
+ }
2289
+ var builtinComponents = {
2290
+ table: (props) => /* @__PURE__ */ u2("div", {
2291
+ class: "table-container",
2292
+ children: /* @__PURE__ */ u2("table", { ...props })
2293
+ }),
2294
+ style: ({ children, ...rest }) => k("style", { ...rest, dangerouslySetInnerHTML: { __html: childrenToString(children) } }),
2295
+ script: ({ children, ...rest }) => k("script", { ...rest, dangerouslySetInnerHTML: { __html: childrenToString(children) } })
2296
+ };
2297
+ function htmlToJsx(tree, components) {
2298
+ return toJsxRuntime(tree, {
2299
+ Fragment: S,
2300
+ jsx: u2,
2301
+ jsxs: u2,
2302
+ elementAttributeNameCase: "html",
2303
+ components: { ...builtinComponents, ...components }
2304
+ });
2305
+ }
2306
+
2307
+ // src/i18n/locales/en-US.ts
2308
+ var en_US_default = {
2309
+ pages: {
2310
+ folderContent: {
2311
+ folder: "Folder",
2312
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 item under this folder." : `${count} items under this folder.`
2313
+ }
2314
+ },
2315
+ components: {}
2316
+ };
2317
+
2318
+ // src/i18n/locales/ar-SA.ts
2319
+ var ar_SA_default = {
2320
+ pages: {
2321
+ folderContent: {
2322
+ folder: "\u0645\u062C\u0644\u062F",
2323
+ itemsUnderFolder: ({ count }) => count === 1 ? "\u064A\u0648\u062C\u062F \u0639\u0646\u0635\u0631 \u0648\u0627\u062D\u062F \u0641\u0642\u0637 \u062A\u062D\u062A \u0647\u0630\u0627 \u0627\u0644\u0645\u062C\u0644\u062F" : `\u064A\u0648\u062C\u062F ${count} \u0639\u0646\u0627\u0635\u0631 \u062A\u062D\u062A \u0647\u0630\u0627 \u0627\u0644\u0645\u062C\u0644\u062F.`
2324
+ }
2325
+ },
2326
+ components: {}
2327
+ };
2328
+
2329
+ // src/i18n/locales/ca-ES.ts
2330
+ var ca_ES_default = {
2331
+ pages: {
2332
+ folderContent: {
2333
+ folder: "Carpeta",
2334
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 article en aquesta carpeta." : `${count} articles en esta carpeta.`
2335
+ }
2336
+ },
2337
+ components: {}
2338
+ };
2339
+
2340
+ // src/i18n/locales/cs-CZ.ts
2341
+ var cs_CZ_default = {
2342
+ pages: {
2343
+ folderContent: {
2344
+ folder: "Slo\u017Eka",
2345
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 polo\u017Eka v t\xE9to slo\u017Ece." : `${count} polo\u017Eek v t\xE9to slo\u017Ece.`
2346
+ }
2347
+ },
2348
+ components: {}
2349
+ };
2350
+
2351
+ // src/i18n/locales/de-DE.ts
2352
+ var de_DE_default = {
2353
+ pages: {
2354
+ folderContent: {
2355
+ folder: "Ordner",
2356
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 Datei in diesem Ordner." : `${count} Dateien in diesem Ordner.`
2357
+ }
2358
+ },
2359
+ components: {}
2360
+ };
2361
+
2362
+ // src/i18n/locales/en-GB.ts
2363
+ var en_GB_default = {
2364
+ pages: {
2365
+ folderContent: {
2366
+ folder: "Folder",
2367
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 item under this folder." : `${count} items under this folder.`
2368
+ }
2369
+ },
2370
+ components: {}
2371
+ };
2372
+
2373
+ // src/i18n/locales/es-ES.ts
2374
+ var es_ES_default = {
2375
+ pages: {
2376
+ folderContent: {
2377
+ folder: "Carpeta",
2378
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 art\xEDculo en esta carpeta." : `${count} art\xEDculos en esta carpeta.`
2379
+ }
2380
+ },
2381
+ components: {}
2382
+ };
2383
+
2384
+ // src/i18n/locales/fa-IR.ts
2385
+ var fa_IR_default = {
2386
+ pages: {
2387
+ folderContent: {
2388
+ folder: "\u067E\u0648\u0634\u0647",
2389
+ itemsUnderFolder: ({ count }) => count === 1 ? ".\u06CC\u06A9 \u0645\u0637\u0644\u0628 \u062F\u0631 \u0627\u06CC\u0646 \u067E\u0648\u0634\u0647 \u0627\u0633\u062A" : `${count} \u0645\u0637\u0644\u0628 \u062F\u0631 \u0627\u06CC\u0646 \u067E\u0648\u0634\u0647 \u0627\u0633\u062A.`
2390
+ }
2391
+ },
2392
+ components: {}
2393
+ };
2394
+
2395
+ // src/i18n/locales/fi-FI.ts
2396
+ var fi_FI_default = {
2397
+ pages: {
2398
+ folderContent: {
2399
+ folder: "Kansio",
2400
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 kohde t\xE4ss\xE4 kansiossa." : `${count} kohdetta t\xE4ss\xE4 kansiossa.`
2401
+ }
2402
+ },
2403
+ components: {}
2404
+ };
2405
+
2406
+ // src/i18n/locales/fr-FR.ts
2407
+ var fr_FR_default = {
2408
+ pages: {
2409
+ folderContent: {
2410
+ folder: "Dossier",
2411
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 \xE9l\xE9ment sous ce dossier." : `${count} \xE9l\xE9ments sous ce dossier.`
2412
+ }
2413
+ },
2414
+ components: {}
2415
+ };
2416
+
2417
+ // src/i18n/locales/he-IL.ts
2418
+ var he_IL_default = {
2419
+ pages: {
2420
+ folderContent: {
2421
+ folder: "\u05EA\u05D9\u05E7\u05D9\u05D9\u05D4",
2422
+ itemsUnderFolder: ({ count }) => count === 1 ? "\u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3 \u05EA\u05D7\u05EA \u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D6\u05D5." : `${count} \u05E4\u05E8\u05D9\u05D8\u05D9\u05DD \u05EA\u05D7\u05EA \u05EA\u05D9\u05E7\u05D9\u05D9\u05D4 \u05D6\u05D5.`
2423
+ }
2424
+ },
2425
+ components: {}
2426
+ };
2427
+
2428
+ // src/i18n/locales/hu-HU.ts
2429
+ var hu_HU_default = {
2430
+ pages: {
2431
+ folderContent: {
2432
+ folder: "Mappa",
2433
+ itemsUnderFolder: ({ count }) => `Ebben a mapp\xE1ban ${count} elem tal\xE1lhat\xF3.`
2434
+ }
2435
+ },
2436
+ components: {}
2437
+ };
2438
+
2439
+ // src/i18n/locales/id-ID.ts
2440
+ var id_ID_default = {
2441
+ pages: {
2442
+ folderContent: {
2443
+ folder: "Folder",
2444
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 item di bawah folder ini." : `${count} item di bawah folder ini.`
2445
+ }
2446
+ },
2447
+ components: {}
2448
+ };
2449
+
2450
+ // src/i18n/locales/it-IT.ts
2451
+ var it_IT_default = {
2452
+ pages: {
2453
+ folderContent: {
2454
+ folder: "Cartella",
2455
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 oggetto in questa cartella." : `${count} oggetti in questa cartella.`
2456
+ }
2457
+ },
2458
+ components: {}
2459
+ };
2460
+
2461
+ // src/i18n/locales/ja-JP.ts
2462
+ var ja_JP_default = {
2463
+ pages: {
2464
+ folderContent: {
2465
+ folder: "\u30D5\u30A9\u30EB\u30C0",
2466
+ itemsUnderFolder: ({ count }) => `${count}\u4EF6\u306E\u30DA\u30FC\u30B8`
2467
+ }
2468
+ },
2469
+ components: {}
2470
+ };
2471
+
2472
+ // src/i18n/locales/kk-KZ.ts
2473
+ var kk_KZ_default = {
2474
+ pages: {
2475
+ folderContent: {
2476
+ folder: "\u049A\u0430\u043B\u0442\u0430",
2477
+ itemsUnderFolder: ({ count }) => count === 1 ? "\u0411\u04B1\u043B \u049B\u0430\u043B\u0442\u0430\u0434\u0430 1 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u0431\u0430\u0440." : `\u0411\u04B1\u043B \u049B\u0430\u043B\u0442\u0430\u0434\u0430 ${count} \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u0431\u0430\u0440.`
2478
+ }
2479
+ },
2480
+ components: {}
2481
+ };
2482
+
2483
+ // src/i18n/locales/ko-KR.ts
2484
+ var ko_KR_default = {
2485
+ pages: {
2486
+ folderContent: {
2487
+ folder: "\uD3F4\uB354",
2488
+ itemsUnderFolder: ({ count }) => `${count}\uAC74\uC758 \uD56D\uBAA9`
2489
+ }
2490
+ },
2491
+ components: {}
2492
+ };
2493
+
2494
+ // src/i18n/locales/lt-LT.ts
2495
+ var lt_LT_default = {
2496
+ pages: {
2497
+ folderContent: {
2498
+ folder: "Aplankas",
2499
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 elementas \u0161iame aplanke." : count < 10 ? `${count} elementai \u0161iame aplanke.` : `${count} element\u0173 \u0161iame aplanke.`
2500
+ }
2501
+ },
2502
+ components: {}
2503
+ };
2504
+
2505
+ // src/i18n/locales/nb-NO.ts
2506
+ var nb_NO_default = {
2507
+ pages: {
2508
+ folderContent: {
2509
+ folder: "Mappe",
2510
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 gjenstand i denne mappen." : `${count} gjenstander i denne mappen.`
2511
+ }
2512
+ },
2513
+ components: {}
2514
+ };
2515
+
2516
+ // src/i18n/locales/nl-NL.ts
2517
+ var nl_NL_default = {
2518
+ pages: {
2519
+ folderContent: {
2520
+ folder: "Map",
2521
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 item in deze map." : `${count} items in deze map.`
2522
+ }
2523
+ },
2524
+ components: {}
2525
+ };
2526
+
2527
+ // src/i18n/locales/pl-PL.ts
2528
+ var pl_PL_default = {
2529
+ pages: {
2530
+ folderContent: {
2531
+ folder: "Folder",
2532
+ itemsUnderFolder: ({ count }) => count === 1 ? "W tym folderze jest 1 element." : `Element\xF3w w folderze: ${count}.`
2533
+ }
2534
+ },
2535
+ components: {}
2536
+ };
2537
+
2538
+ // src/i18n/locales/pt-BR.ts
2539
+ var pt_BR_default = {
2540
+ pages: {
2541
+ folderContent: {
2542
+ folder: "Arquivo",
2543
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 item neste arquivo." : `${count} items neste arquivo.`
2544
+ }
2545
+ },
2546
+ components: {}
2547
+ };
2548
+
2549
+ // src/i18n/locales/ro-RO.ts
2550
+ var ro_RO_default = {
2551
+ pages: {
2552
+ folderContent: {
2553
+ folder: "Dosar",
2554
+ itemsUnderFolder: ({ count }) => count === 1 ? "1 articol \xEEn acest dosar." : `${count} elemente \xEEn acest dosar.`
2555
+ }
2556
+ },
2557
+ components: {}
2558
+ };
2559
+
2560
+ // src/i18n/locales/ru-RU.ts
2561
+ var ru_RU_default = {
2562
+ pages: {
2563
+ folderContent: {
2564
+ folder: "\u041F\u0430\u043F\u043A\u0430",
2565
+ itemsUnderFolder: ({ count }) => `\u0432 \u044D\u0442\u043E\u0439 \u043F\u0430\u043F\u043A\u0435 ${count} \u044D\u043B\u0435\u043C\u0435\u043D\u0442${getForm(count, "", "\u0430", "\u043E\u0432")}`
2566
+ }
2567
+ },
2568
+ components: {}
2569
+ };
2570
+ function getForm(number2, form1, form2, form5) {
2571
+ const remainder100 = number2 % 100;
2572
+ const remainder10 = remainder100 % 10;
2573
+ if (remainder100 >= 10 && remainder100 <= 20) return form5;
2574
+ if (remainder10 > 1 && remainder10 < 5) return form2;
2575
+ if (remainder10 == 1) return form1;
2576
+ return form5;
2577
+ }
2578
+
2579
+ // src/i18n/locales/th-TH.ts
2580
+ var th_TH_default = {
2581
+ pages: {
2582
+ folderContent: {
2583
+ folder: "\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C",
2584
+ itemsUnderFolder: ({ count }) => `\u0E21\u0E35 ${count} \u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E43\u0E19\u0E42\u0E1F\u0E25\u0E40\u0E14\u0E2D\u0E23\u0E4C\u0E19\u0E35\u0E49`
2585
+ }
2586
+ },
2587
+ components: {}
2588
+ };
2589
+
2590
+ // src/i18n/locales/tr-TR.ts
2591
+ var tr_TR_default = {
2592
+ pages: {
2593
+ folderContent: {
2594
+ folder: "Klas\xF6r",
2595
+ itemsUnderFolder: ({ count }) => count === 1 ? "Bu klas\xF6r alt\u0131nda 1 \xF6\u011Fe." : `Bu klas\xF6r alt\u0131ndaki ${count} \xF6\u011Fe.`
2596
+ }
2597
+ },
2598
+ components: {}
2599
+ };
2600
+
2601
+ // src/i18n/locales/uk-UA.ts
2602
+ var uk_UA_default = {
2603
+ pages: {
2604
+ folderContent: {
2605
+ folder: "\u0422\u0435\u043A\u0430",
2606
+ itemsUnderFolder: ({ count }) => count === 1 ? "\u0423 \u0446\u0456\u0439 \u0442\u0435\u0446\u0456 1 \u0435\u043B\u0435\u043C\u0435\u043D\u0442." : `\u0415\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432 \u0443 \u0446\u0456\u0439 \u0442\u0435\u0446\u0456: ${count}.`
2607
+ }
2608
+ },
2609
+ components: {}
2610
+ };
2611
+
2612
+ // src/i18n/locales/vi-VN.ts
2613
+ var vi_VN_default = {
2614
+ pages: {
2615
+ folderContent: {
2616
+ folder: "Th\u01B0 m\u1EE5c",
2617
+ itemsUnderFolder: ({ count }) => `C\xF3 ${count} trang trong th\u01B0 m\u1EE5c n\xE0y.`
2618
+ }
2619
+ },
2620
+ components: {}
2621
+ };
2622
+
2623
+ // src/i18n/locales/zh-CN.ts
2624
+ var zh_CN_default = {
2625
+ pages: {
2626
+ folderContent: {
2627
+ folder: "\u6587\u4EF6\u5939",
2628
+ itemsUnderFolder: ({ count }) => `\u6B64\u6587\u4EF6\u5939\u4E0B\u6709${count}\u6761\u7B14\u8BB0\u3002`
2629
+ }
2630
+ },
2631
+ components: {}
2632
+ };
2633
+
2634
+ // src/i18n/locales/zh-TW.ts
2635
+ var zh_TW_default = {
2636
+ pages: {
2637
+ folderContent: {
2638
+ folder: "\u8CC7\u6599\u593E",
2639
+ itemsUnderFolder: ({ count }) => `\u6B64\u8CC7\u6599\u593E\u4E0B\u6709 ${count} \u689D\u7B46\u8A18\u3002`
2640
+ }
2641
+ },
2642
+ components: {}
2643
+ };
2644
+
2645
+ // src/i18n/index.ts
2646
+ var locales = {
2647
+ "en-US": en_US_default,
2648
+ "ar-SA": ar_SA_default,
2649
+ "ca-ES": ca_ES_default,
2650
+ "cs-CZ": cs_CZ_default,
2651
+ "de-DE": de_DE_default,
2652
+ "en-GB": en_GB_default,
2653
+ "es-ES": es_ES_default,
2654
+ "fa-IR": fa_IR_default,
2655
+ "fi-FI": fi_FI_default,
2656
+ "fr-FR": fr_FR_default,
2657
+ "he-IL": he_IL_default,
2658
+ "hu-HU": hu_HU_default,
2659
+ "id-ID": id_ID_default,
2660
+ "it-IT": it_IT_default,
2661
+ "ja-JP": ja_JP_default,
2662
+ "kk-KZ": kk_KZ_default,
2663
+ "ko-KR": ko_KR_default,
2664
+ "lt-LT": lt_LT_default,
2665
+ "nb-NO": nb_NO_default,
2666
+ "nl-NL": nl_NL_default,
2667
+ "pl-PL": pl_PL_default,
2668
+ "pt-BR": pt_BR_default,
2669
+ "ro-RO": ro_RO_default,
2670
+ "ru-RU": ru_RU_default,
2671
+ "th-TH": th_TH_default,
2672
+ "tr-TR": tr_TR_default,
2673
+ "uk-UA": uk_UA_default,
2674
+ "vi-VN": vi_VN_default,
2675
+ "zh-CN": zh_CN_default,
2676
+ "zh-TW": zh_TW_default
2677
+ };
2678
+ function i18n(locale) {
2679
+ return locales[locale] || en_US_default;
2680
+ }
2681
+
2682
+ // src/components/styles/listPage.scss
2683
+ var listPage_default = "ul.section-ul {\n list-style: none;\n margin-top: 2em;\n padding-left: 0;\n}\n\nli.section-li {\n margin-bottom: 1em;\n}\nli.section-li > .section {\n display: grid;\n grid-template-columns: fit-content(8em) 3fr 1fr;\n}\n@media all and (max-width: 600px) {\n li.section-li > .section > .tags {\n display: none;\n }\n}\nli.section-li > .section > .desc > h3 > a {\n background-color: transparent;\n}\nli.section-li > .section .meta {\n margin: 0 1em 0 0;\n opacity: 0.6;\n}\n\n.popover .section {\n grid-template-columns: fit-content(8em) 1fr !important;\n}\n.popover .section > .tags {\n display: none;\n}";
2684
+
2685
+ // src/components/FolderContent.tsx
2686
+ var defaultOptions = {
2687
+ showFolderCount: true,
2688
+ showSubfolders: true
2689
+ };
2690
+ function concatenateResources(...resources) {
2691
+ const result = resources.filter((r2) => r2 !== void 0).flat();
2692
+ return result.length === 0 ? void 0 : result;
2693
+ }
2694
+ function pagesFromTrie(folder, showSubfolders) {
2695
+ return folder.children.map((node) => {
2696
+ const nodeData = node.data;
2697
+ if (nodeData) {
2698
+ if (nodeData.unlisted === true) return void 0;
2699
+ return nodeData;
2700
+ }
2701
+ if (node.isFolder && showSubfolders) {
2702
+ return {
2703
+ slug: node.slug,
2704
+ dates: mostRecentDatesFromChildren(node.children),
2705
+ frontmatter: { title: node.displayName, tags: [] }
2706
+ };
2707
+ }
2708
+ return void 0;
2709
+ }).filter((page) => page !== void 0);
2710
+ }
2711
+ function pagesFromAllFiles(allFiles, folderSlug, showSubfolders) {
2712
+ const folderPrefix = folderSlug.endsWith("/index") ? folderSlug.slice(0, -"index".length) : folderSlug.endsWith("/") ? folderSlug : folderSlug + "/";
2713
+ const directChildren = [];
2714
+ const subfolderFiles = /* @__PURE__ */ new Map();
2715
+ for (const file of allFiles) {
2716
+ if (file.unlisted === true) continue;
2717
+ const fileSlug = file.slug;
2718
+ if (!fileSlug || !fileSlug.startsWith(folderPrefix)) continue;
2719
+ const relativePath = fileSlug.slice(folderPrefix.length);
2720
+ if (!relativePath || relativePath === "index") continue;
2721
+ const segments = relativePath.split("/");
2722
+ if (segments.length === 1) {
2723
+ directChildren.push(file);
2724
+ } else if (showSubfolders) {
2725
+ const subfolderName = segments[0];
2726
+ if (!subfolderFiles.has(subfolderName)) {
2727
+ subfolderFiles.set(subfolderName, []);
2728
+ }
2729
+ subfolderFiles.get(subfolderName).push(file);
2730
+ }
2731
+ }
2732
+ for (const [subfolderName, files] of subfolderFiles) {
2733
+ const indexFile = files.find((f3) => f3.slug === `${folderPrefix}${subfolderName}/index`);
2734
+ if (indexFile) continue;
2735
+ directChildren.push({
2736
+ slug: `${folderPrefix}${subfolderName}/index`,
2737
+ dates: mostRecentDatesFromEntries(files),
2738
+ frontmatter: { title: subfolderName, tags: [] }
2739
+ });
2740
+ }
2741
+ return directChildren;
2742
+ }
2743
+ function mostRecentDatesFromChildren(children) {
2744
+ let maybeDates;
2745
+ for (const child of children) {
2746
+ const childDates = child.data?.dates;
2747
+ if (childDates) {
2748
+ if (!maybeDates) {
2749
+ maybeDates = { ...childDates };
2750
+ } else {
2751
+ if (childDates.created > maybeDates.created) maybeDates.created = childDates.created;
2752
+ if (childDates.modified > maybeDates.modified) maybeDates.modified = childDates.modified;
2753
+ if (childDates.published > maybeDates.published)
2754
+ maybeDates.published = childDates.published;
2755
+ }
2756
+ }
2757
+ }
2758
+ return maybeDates ?? { created: /* @__PURE__ */ new Date(), modified: /* @__PURE__ */ new Date(), published: /* @__PURE__ */ new Date() };
2759
+ }
2760
+ function mostRecentDatesFromEntries(entries) {
2761
+ let maybeDates;
2762
+ for (const entry of entries) {
2763
+ if (entry.dates) {
2764
+ if (!maybeDates) {
2765
+ maybeDates = { ...entry.dates };
2766
+ } else {
2767
+ if (entry.dates.created > maybeDates.created) maybeDates.created = entry.dates.created;
2768
+ if (entry.dates.modified > maybeDates.modified) maybeDates.modified = entry.dates.modified;
2769
+ if (entry.dates.published > maybeDates.published)
2770
+ maybeDates.published = entry.dates.published;
2771
+ }
2772
+ }
2773
+ }
2774
+ return maybeDates ?? { created: /* @__PURE__ */ new Date(), modified: /* @__PURE__ */ new Date(), published: /* @__PURE__ */ new Date() };
2775
+ }
2776
+ var FolderContent_default = ((opts) => {
2777
+ const options = { ...defaultOptions, ...opts };
2778
+ const FolderContent = (props) => {
2779
+ const { tree, fileData, allFiles, cfg } = props;
2780
+ const ctx = props.ctx;
2781
+ const slug2 = fileData?.slug;
2782
+ if (!slug2) return null;
2783
+ const trie = ctx?.trie;
2784
+ let allPagesInFolder;
2785
+ if (trie) {
2786
+ const folder = trie.findNode(slug2.split("/"));
2787
+ if (!folder) return null;
2788
+ allPagesInFolder = pagesFromTrie(folder, options.showSubfolders);
2789
+ } else {
2790
+ allPagesInFolder = pagesFromAllFiles(allFiles ?? [], slug2, options.showSubfolders);
2791
+ }
2792
+ const cssClasses = fileData?.frontmatter?.cssclasses ?? [];
2793
+ const classes = cssClasses.join(" ");
2794
+ const listProps = {
2795
+ ...props,
2796
+ sort: options.sort,
2797
+ allFiles: allPagesInFolder
2798
+ };
2799
+ const hastRoot = tree;
2800
+ const content = hastRoot.children.length === 0 ? fileData?.description : htmlToJsx(hastRoot);
2801
+ const pageListContent = PageList(listProps);
2802
+ return /* @__PURE__ */ u2("div", { class: "popover-hint", children: [
2803
+ /* @__PURE__ */ u2("article", { class: classes, children: /* @__PURE__ */ u2("div", { class: "markdown-preview-view markdown-rendered", children: content }) }),
2804
+ /* @__PURE__ */ u2("div", { class: "page-listing", children: [
2805
+ options.showFolderCount && /* @__PURE__ */ u2("p", { children: i18n(
2806
+ cfg?.locale ?? "en-US"
2807
+ ).pages.folderContent.itemsUnderFolder({
2808
+ count: allPagesInFolder.length
2809
+ }) }),
2810
+ /* @__PURE__ */ u2("div", { children: pageListContent })
2811
+ ] })
2812
+ ] });
2813
+ };
2814
+ FolderContent.css = concatenateResources(listPage_default, PageList.css);
2815
+ return FolderContent;
2816
+ });
2817
+ var folderMatcher = ({ slug: slug2 }) => {
2818
+ return slug2.endsWith("/index");
2819
+ };
2820
+ function getFolders(slug2) {
2821
+ let folderName = path.dirname(slug2 ?? "");
2822
+ const parentFolderNames = [folderName];
2823
+ while (folderName !== ".") {
2824
+ folderName = path.dirname(folderName ?? "");
2825
+ parentFolderNames.push(folderName);
2826
+ }
2827
+ return parentFolderNames;
2828
+ }
2829
+ var FolderPage = (opts) => {
2830
+ const body = () => FolderContent_default(opts);
2831
+ return {
2832
+ name: "FolderPage",
2833
+ priority: 10,
2834
+ match: folderMatcher,
2835
+ generate({ content, cfg }) {
2836
+ const allFiles = content.map((c2) => c2[1].data).filter((d2) => d2?.unlisted !== true);
2837
+ const locale = cfg?.locale ?? "en-US";
2838
+ const folders = /* @__PURE__ */ new Set();
2839
+ const folderDisplayNames = /* @__PURE__ */ new Map();
2840
+ for (const file of allFiles) {
2841
+ const slug2 = file?.slug;
2842
+ if (!slug2) continue;
2843
+ const fileFolders = getFolders(slug2).filter((f3) => f3 !== "." && f3 !== "tags");
2844
+ for (const f3 of fileFolders) {
2845
+ folders.add(f3);
2846
+ }
2847
+ const relativePath = file?.relativePath;
2848
+ if (relativePath) {
2849
+ const slugParts = path.dirname(slug2).split("/").filter((s2) => s2 !== ".");
2850
+ const pathParts = path.dirname(relativePath).split("/").filter((s2) => s2 !== ".");
2851
+ for (let i2 = 0; i2 < slugParts.length && i2 < pathParts.length; i2++) {
2852
+ const slugPart = slugParts[i2];
2853
+ const pathPart = pathParts[i2];
2854
+ if (slugPart && pathPart && !folderDisplayNames.has(slugPart)) {
2855
+ folderDisplayNames.set(slugPart, pathPart);
2856
+ }
2857
+ }
2858
+ }
2859
+ }
2860
+ const foldersWithIndex = /* @__PURE__ */ new Set();
2861
+ for (const [, file] of content) {
2862
+ const data = file.data;
2863
+ if (data?.unlisted === true) continue;
2864
+ const slug2 = data?.slug;
2865
+ if (slug2 && slug2.endsWith("/index")) {
2866
+ const folder = slug2.slice(0, -"/index".length);
2867
+ foldersWithIndex.add(folder);
2868
+ }
2869
+ }
2870
+ for (const [, file] of content) {
2871
+ const slug2 = file.data?.slug;
2872
+ if (!slug2 || !slug2.endsWith("/index")) continue;
2873
+ const frontmatter = file.data.frontmatter;
2874
+ if (!frontmatter || frontmatter.title && frontmatter.title !== "index") continue;
2875
+ const folder = slug2.slice(0, -"/index".length);
2876
+ const slugSegment = folder.split("/").pop() ?? folder;
2877
+ const folderName = folderDisplayNames.get(slugSegment) ?? slugSegment;
2878
+ frontmatter.title = opts?.prefixFolders ? `${i18n(locale).pages.folderContent.folder}: ${folderName}` : folderName;
2879
+ }
2880
+ const virtualPages = [];
2881
+ for (const folder of folders) {
2882
+ if (foldersWithIndex.has(folder)) continue;
2883
+ const slug2 = joinSegments(folder, "index");
2884
+ const slugSegment = folder.split("/").pop() ?? folder;
2885
+ const folderName = folderDisplayNames.get(slugSegment) ?? slugSegment;
2886
+ const title = opts?.prefixFolders ? `${i18n(locale).pages.folderContent.folder}: ${folderName}` : folderName;
2887
+ virtualPages.push({
2888
+ slug: slug2,
2889
+ title,
2890
+ data: {}
2891
+ });
2892
+ }
2893
+ return virtualPages;
2894
+ },
2895
+ layout: "folder",
2896
+ body
2897
+ };
2898
+ };
2899
+
2900
+ export { FolderContent_default as FolderContent, FolderPage };
2901
+ //# sourceMappingURL=index.js.map
2902
+ //# sourceMappingURL=index.js.map