@quartz-community/encrypted-pages 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/CHANGELOG.md +37 -0
- package/LICENSE +21 -0
- package/README.md +128 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +40 -0
- package/dist/components/index.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +2413 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +63 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +137 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,2413 @@
|
|
|
1
|
+
import crypto from 'crypto';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import fs from 'fs/promises';
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __export = (target, all2) => {
|
|
7
|
+
for (var name in all2)
|
|
8
|
+
__defProp(target, name, { get: all2[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// node_modules/html-void-elements/index.js
|
|
12
|
+
var htmlVoidElements = [
|
|
13
|
+
"area",
|
|
14
|
+
"base",
|
|
15
|
+
"basefont",
|
|
16
|
+
"bgsound",
|
|
17
|
+
"br",
|
|
18
|
+
"col",
|
|
19
|
+
"command",
|
|
20
|
+
"embed",
|
|
21
|
+
"frame",
|
|
22
|
+
"hr",
|
|
23
|
+
"image",
|
|
24
|
+
"img",
|
|
25
|
+
"input",
|
|
26
|
+
"keygen",
|
|
27
|
+
"link",
|
|
28
|
+
"meta",
|
|
29
|
+
"param",
|
|
30
|
+
"source",
|
|
31
|
+
"track",
|
|
32
|
+
"wbr"
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
// node_modules/property-information/lib/util/schema.js
|
|
36
|
+
var Schema = class {
|
|
37
|
+
/**
|
|
38
|
+
* @param {SchemaType['property']} property
|
|
39
|
+
* Property.
|
|
40
|
+
* @param {SchemaType['normal']} normal
|
|
41
|
+
* Normal.
|
|
42
|
+
* @param {Space | undefined} [space]
|
|
43
|
+
* Space.
|
|
44
|
+
* @returns
|
|
45
|
+
* Schema.
|
|
46
|
+
*/
|
|
47
|
+
constructor(property, normal, space) {
|
|
48
|
+
this.normal = normal;
|
|
49
|
+
this.property = property;
|
|
50
|
+
if (space) {
|
|
51
|
+
this.space = space;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
Schema.prototype.normal = {};
|
|
56
|
+
Schema.prototype.property = {};
|
|
57
|
+
Schema.prototype.space = void 0;
|
|
58
|
+
|
|
59
|
+
// node_modules/property-information/lib/util/merge.js
|
|
60
|
+
function merge(definitions, space) {
|
|
61
|
+
const property = {};
|
|
62
|
+
const normal = {};
|
|
63
|
+
for (const definition of definitions) {
|
|
64
|
+
Object.assign(property, definition.property);
|
|
65
|
+
Object.assign(normal, definition.normal);
|
|
66
|
+
}
|
|
67
|
+
return new Schema(property, normal, space);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// node_modules/property-information/lib/normalize.js
|
|
71
|
+
function normalize(value) {
|
|
72
|
+
return value.toLowerCase();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// node_modules/property-information/lib/util/info.js
|
|
76
|
+
var Info = class {
|
|
77
|
+
/**
|
|
78
|
+
* @param {string} property
|
|
79
|
+
* Property.
|
|
80
|
+
* @param {string} attribute
|
|
81
|
+
* Attribute.
|
|
82
|
+
* @returns
|
|
83
|
+
* Info.
|
|
84
|
+
*/
|
|
85
|
+
constructor(property, attribute) {
|
|
86
|
+
this.attribute = attribute;
|
|
87
|
+
this.property = property;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
Info.prototype.attribute = "";
|
|
91
|
+
Info.prototype.booleanish = false;
|
|
92
|
+
Info.prototype.boolean = false;
|
|
93
|
+
Info.prototype.commaOrSpaceSeparated = false;
|
|
94
|
+
Info.prototype.commaSeparated = false;
|
|
95
|
+
Info.prototype.defined = false;
|
|
96
|
+
Info.prototype.mustUseProperty = false;
|
|
97
|
+
Info.prototype.number = false;
|
|
98
|
+
Info.prototype.overloadedBoolean = false;
|
|
99
|
+
Info.prototype.property = "";
|
|
100
|
+
Info.prototype.spaceSeparated = false;
|
|
101
|
+
Info.prototype.space = void 0;
|
|
102
|
+
|
|
103
|
+
// node_modules/property-information/lib/util/types.js
|
|
104
|
+
var types_exports = {};
|
|
105
|
+
__export(types_exports, {
|
|
106
|
+
boolean: () => boolean,
|
|
107
|
+
booleanish: () => booleanish,
|
|
108
|
+
commaOrSpaceSeparated: () => commaOrSpaceSeparated,
|
|
109
|
+
commaSeparated: () => commaSeparated,
|
|
110
|
+
number: () => number,
|
|
111
|
+
overloadedBoolean: () => overloadedBoolean,
|
|
112
|
+
spaceSeparated: () => spaceSeparated
|
|
113
|
+
});
|
|
114
|
+
var powers = 0;
|
|
115
|
+
var boolean = increment();
|
|
116
|
+
var booleanish = increment();
|
|
117
|
+
var overloadedBoolean = increment();
|
|
118
|
+
var number = increment();
|
|
119
|
+
var spaceSeparated = increment();
|
|
120
|
+
var commaSeparated = increment();
|
|
121
|
+
var commaOrSpaceSeparated = increment();
|
|
122
|
+
function increment() {
|
|
123
|
+
return 2 ** ++powers;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// node_modules/property-information/lib/util/defined-info.js
|
|
127
|
+
var checks = (
|
|
128
|
+
/** @type {ReadonlyArray<keyof typeof types>} */
|
|
129
|
+
Object.keys(types_exports)
|
|
130
|
+
);
|
|
131
|
+
var DefinedInfo = class extends Info {
|
|
132
|
+
/**
|
|
133
|
+
* @constructor
|
|
134
|
+
* @param {string} property
|
|
135
|
+
* Property.
|
|
136
|
+
* @param {string} attribute
|
|
137
|
+
* Attribute.
|
|
138
|
+
* @param {number | null | undefined} [mask]
|
|
139
|
+
* Mask.
|
|
140
|
+
* @param {Space | undefined} [space]
|
|
141
|
+
* Space.
|
|
142
|
+
* @returns
|
|
143
|
+
* Info.
|
|
144
|
+
*/
|
|
145
|
+
constructor(property, attribute, mask, space) {
|
|
146
|
+
let index = -1;
|
|
147
|
+
super(property, attribute);
|
|
148
|
+
mark(this, "space", space);
|
|
149
|
+
if (typeof mask === "number") {
|
|
150
|
+
while (++index < checks.length) {
|
|
151
|
+
const check = checks[index];
|
|
152
|
+
mark(this, checks[index], (mask & types_exports[check]) === types_exports[check]);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
DefinedInfo.prototype.defined = true;
|
|
158
|
+
function mark(values, key2, value) {
|
|
159
|
+
if (value) {
|
|
160
|
+
values[key2] = value;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// node_modules/property-information/lib/util/create.js
|
|
165
|
+
function create(definition) {
|
|
166
|
+
const properties = {};
|
|
167
|
+
const normals = {};
|
|
168
|
+
for (const [property, value] of Object.entries(definition.properties)) {
|
|
169
|
+
const info = new DefinedInfo(
|
|
170
|
+
property,
|
|
171
|
+
definition.transform(definition.attributes || {}, property),
|
|
172
|
+
value,
|
|
173
|
+
definition.space
|
|
174
|
+
);
|
|
175
|
+
if (definition.mustUseProperty && definition.mustUseProperty.includes(property)) {
|
|
176
|
+
info.mustUseProperty = true;
|
|
177
|
+
}
|
|
178
|
+
properties[property] = info;
|
|
179
|
+
normals[normalize(property)] = property;
|
|
180
|
+
normals[normalize(info.attribute)] = property;
|
|
181
|
+
}
|
|
182
|
+
return new Schema(properties, normals, definition.space);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// node_modules/property-information/lib/aria.js
|
|
186
|
+
var aria = create({
|
|
187
|
+
properties: {
|
|
188
|
+
ariaActiveDescendant: null,
|
|
189
|
+
ariaAtomic: booleanish,
|
|
190
|
+
ariaAutoComplete: null,
|
|
191
|
+
ariaBusy: booleanish,
|
|
192
|
+
ariaChecked: booleanish,
|
|
193
|
+
ariaColCount: number,
|
|
194
|
+
ariaColIndex: number,
|
|
195
|
+
ariaColSpan: number,
|
|
196
|
+
ariaControls: spaceSeparated,
|
|
197
|
+
ariaCurrent: null,
|
|
198
|
+
ariaDescribedBy: spaceSeparated,
|
|
199
|
+
ariaDetails: null,
|
|
200
|
+
ariaDisabled: booleanish,
|
|
201
|
+
ariaDropEffect: spaceSeparated,
|
|
202
|
+
ariaErrorMessage: null,
|
|
203
|
+
ariaExpanded: booleanish,
|
|
204
|
+
ariaFlowTo: spaceSeparated,
|
|
205
|
+
ariaGrabbed: booleanish,
|
|
206
|
+
ariaHasPopup: null,
|
|
207
|
+
ariaHidden: booleanish,
|
|
208
|
+
ariaInvalid: null,
|
|
209
|
+
ariaKeyShortcuts: null,
|
|
210
|
+
ariaLabel: null,
|
|
211
|
+
ariaLabelledBy: spaceSeparated,
|
|
212
|
+
ariaLevel: number,
|
|
213
|
+
ariaLive: null,
|
|
214
|
+
ariaModal: booleanish,
|
|
215
|
+
ariaMultiLine: booleanish,
|
|
216
|
+
ariaMultiSelectable: booleanish,
|
|
217
|
+
ariaOrientation: null,
|
|
218
|
+
ariaOwns: spaceSeparated,
|
|
219
|
+
ariaPlaceholder: null,
|
|
220
|
+
ariaPosInSet: number,
|
|
221
|
+
ariaPressed: booleanish,
|
|
222
|
+
ariaReadOnly: booleanish,
|
|
223
|
+
ariaRelevant: null,
|
|
224
|
+
ariaRequired: booleanish,
|
|
225
|
+
ariaRoleDescription: spaceSeparated,
|
|
226
|
+
ariaRowCount: number,
|
|
227
|
+
ariaRowIndex: number,
|
|
228
|
+
ariaRowSpan: number,
|
|
229
|
+
ariaSelected: booleanish,
|
|
230
|
+
ariaSetSize: number,
|
|
231
|
+
ariaSort: null,
|
|
232
|
+
ariaValueMax: number,
|
|
233
|
+
ariaValueMin: number,
|
|
234
|
+
ariaValueNow: number,
|
|
235
|
+
ariaValueText: null,
|
|
236
|
+
role: null
|
|
237
|
+
},
|
|
238
|
+
transform(_2, property) {
|
|
239
|
+
return property === "role" ? property : "aria-" + property.slice(4).toLowerCase();
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
// node_modules/property-information/lib/util/case-sensitive-transform.js
|
|
244
|
+
function caseSensitiveTransform(attributes, attribute) {
|
|
245
|
+
return attribute in attributes ? attributes[attribute] : attribute;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// node_modules/property-information/lib/util/case-insensitive-transform.js
|
|
249
|
+
function caseInsensitiveTransform(attributes, property) {
|
|
250
|
+
return caseSensitiveTransform(attributes, property.toLowerCase());
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// node_modules/property-information/lib/html.js
|
|
254
|
+
var html = create({
|
|
255
|
+
attributes: {
|
|
256
|
+
acceptcharset: "accept-charset",
|
|
257
|
+
classname: "class",
|
|
258
|
+
htmlfor: "for",
|
|
259
|
+
httpequiv: "http-equiv"
|
|
260
|
+
},
|
|
261
|
+
mustUseProperty: ["checked", "multiple", "muted", "selected"],
|
|
262
|
+
properties: {
|
|
263
|
+
// Standard Properties.
|
|
264
|
+
abbr: null,
|
|
265
|
+
accept: commaSeparated,
|
|
266
|
+
acceptCharset: spaceSeparated,
|
|
267
|
+
accessKey: spaceSeparated,
|
|
268
|
+
action: null,
|
|
269
|
+
allow: null,
|
|
270
|
+
allowFullScreen: boolean,
|
|
271
|
+
allowPaymentRequest: boolean,
|
|
272
|
+
allowUserMedia: boolean,
|
|
273
|
+
alt: null,
|
|
274
|
+
as: null,
|
|
275
|
+
async: boolean,
|
|
276
|
+
autoCapitalize: null,
|
|
277
|
+
autoComplete: spaceSeparated,
|
|
278
|
+
autoFocus: boolean,
|
|
279
|
+
autoPlay: boolean,
|
|
280
|
+
blocking: spaceSeparated,
|
|
281
|
+
capture: null,
|
|
282
|
+
charSet: null,
|
|
283
|
+
checked: boolean,
|
|
284
|
+
cite: null,
|
|
285
|
+
className: spaceSeparated,
|
|
286
|
+
cols: number,
|
|
287
|
+
colSpan: null,
|
|
288
|
+
content: null,
|
|
289
|
+
contentEditable: booleanish,
|
|
290
|
+
controls: boolean,
|
|
291
|
+
controlsList: spaceSeparated,
|
|
292
|
+
coords: number | commaSeparated,
|
|
293
|
+
crossOrigin: null,
|
|
294
|
+
data: null,
|
|
295
|
+
dateTime: null,
|
|
296
|
+
decoding: null,
|
|
297
|
+
default: boolean,
|
|
298
|
+
defer: boolean,
|
|
299
|
+
dir: null,
|
|
300
|
+
dirName: null,
|
|
301
|
+
disabled: boolean,
|
|
302
|
+
download: overloadedBoolean,
|
|
303
|
+
draggable: booleanish,
|
|
304
|
+
encType: null,
|
|
305
|
+
enterKeyHint: null,
|
|
306
|
+
fetchPriority: null,
|
|
307
|
+
form: null,
|
|
308
|
+
formAction: null,
|
|
309
|
+
formEncType: null,
|
|
310
|
+
formMethod: null,
|
|
311
|
+
formNoValidate: boolean,
|
|
312
|
+
formTarget: null,
|
|
313
|
+
headers: spaceSeparated,
|
|
314
|
+
height: number,
|
|
315
|
+
hidden: overloadedBoolean,
|
|
316
|
+
high: number,
|
|
317
|
+
href: null,
|
|
318
|
+
hrefLang: null,
|
|
319
|
+
htmlFor: spaceSeparated,
|
|
320
|
+
httpEquiv: spaceSeparated,
|
|
321
|
+
id: null,
|
|
322
|
+
imageSizes: null,
|
|
323
|
+
imageSrcSet: null,
|
|
324
|
+
inert: boolean,
|
|
325
|
+
inputMode: null,
|
|
326
|
+
integrity: null,
|
|
327
|
+
is: null,
|
|
328
|
+
isMap: boolean,
|
|
329
|
+
itemId: null,
|
|
330
|
+
itemProp: spaceSeparated,
|
|
331
|
+
itemRef: spaceSeparated,
|
|
332
|
+
itemScope: boolean,
|
|
333
|
+
itemType: spaceSeparated,
|
|
334
|
+
kind: null,
|
|
335
|
+
label: null,
|
|
336
|
+
lang: null,
|
|
337
|
+
language: null,
|
|
338
|
+
list: null,
|
|
339
|
+
loading: null,
|
|
340
|
+
loop: boolean,
|
|
341
|
+
low: number,
|
|
342
|
+
manifest: null,
|
|
343
|
+
max: null,
|
|
344
|
+
maxLength: number,
|
|
345
|
+
media: null,
|
|
346
|
+
method: null,
|
|
347
|
+
min: null,
|
|
348
|
+
minLength: number,
|
|
349
|
+
multiple: boolean,
|
|
350
|
+
muted: boolean,
|
|
351
|
+
name: null,
|
|
352
|
+
nonce: null,
|
|
353
|
+
noModule: boolean,
|
|
354
|
+
noValidate: boolean,
|
|
355
|
+
onAbort: null,
|
|
356
|
+
onAfterPrint: null,
|
|
357
|
+
onAuxClick: null,
|
|
358
|
+
onBeforeMatch: null,
|
|
359
|
+
onBeforePrint: null,
|
|
360
|
+
onBeforeToggle: null,
|
|
361
|
+
onBeforeUnload: null,
|
|
362
|
+
onBlur: null,
|
|
363
|
+
onCancel: null,
|
|
364
|
+
onCanPlay: null,
|
|
365
|
+
onCanPlayThrough: null,
|
|
366
|
+
onChange: null,
|
|
367
|
+
onClick: null,
|
|
368
|
+
onClose: null,
|
|
369
|
+
onContextLost: null,
|
|
370
|
+
onContextMenu: null,
|
|
371
|
+
onContextRestored: null,
|
|
372
|
+
onCopy: null,
|
|
373
|
+
onCueChange: null,
|
|
374
|
+
onCut: null,
|
|
375
|
+
onDblClick: null,
|
|
376
|
+
onDrag: null,
|
|
377
|
+
onDragEnd: null,
|
|
378
|
+
onDragEnter: null,
|
|
379
|
+
onDragExit: null,
|
|
380
|
+
onDragLeave: null,
|
|
381
|
+
onDragOver: null,
|
|
382
|
+
onDragStart: null,
|
|
383
|
+
onDrop: null,
|
|
384
|
+
onDurationChange: null,
|
|
385
|
+
onEmptied: null,
|
|
386
|
+
onEnded: null,
|
|
387
|
+
onError: null,
|
|
388
|
+
onFocus: null,
|
|
389
|
+
onFormData: null,
|
|
390
|
+
onHashChange: null,
|
|
391
|
+
onInput: null,
|
|
392
|
+
onInvalid: null,
|
|
393
|
+
onKeyDown: null,
|
|
394
|
+
onKeyPress: null,
|
|
395
|
+
onKeyUp: null,
|
|
396
|
+
onLanguageChange: null,
|
|
397
|
+
onLoad: null,
|
|
398
|
+
onLoadedData: null,
|
|
399
|
+
onLoadedMetadata: null,
|
|
400
|
+
onLoadEnd: null,
|
|
401
|
+
onLoadStart: null,
|
|
402
|
+
onMessage: null,
|
|
403
|
+
onMessageError: null,
|
|
404
|
+
onMouseDown: null,
|
|
405
|
+
onMouseEnter: null,
|
|
406
|
+
onMouseLeave: null,
|
|
407
|
+
onMouseMove: null,
|
|
408
|
+
onMouseOut: null,
|
|
409
|
+
onMouseOver: null,
|
|
410
|
+
onMouseUp: null,
|
|
411
|
+
onOffline: null,
|
|
412
|
+
onOnline: null,
|
|
413
|
+
onPageHide: null,
|
|
414
|
+
onPageShow: null,
|
|
415
|
+
onPaste: null,
|
|
416
|
+
onPause: null,
|
|
417
|
+
onPlay: null,
|
|
418
|
+
onPlaying: null,
|
|
419
|
+
onPopState: null,
|
|
420
|
+
onProgress: null,
|
|
421
|
+
onRateChange: null,
|
|
422
|
+
onRejectionHandled: null,
|
|
423
|
+
onReset: null,
|
|
424
|
+
onResize: null,
|
|
425
|
+
onScroll: null,
|
|
426
|
+
onScrollEnd: null,
|
|
427
|
+
onSecurityPolicyViolation: null,
|
|
428
|
+
onSeeked: null,
|
|
429
|
+
onSeeking: null,
|
|
430
|
+
onSelect: null,
|
|
431
|
+
onSlotChange: null,
|
|
432
|
+
onStalled: null,
|
|
433
|
+
onStorage: null,
|
|
434
|
+
onSubmit: null,
|
|
435
|
+
onSuspend: null,
|
|
436
|
+
onTimeUpdate: null,
|
|
437
|
+
onToggle: null,
|
|
438
|
+
onUnhandledRejection: null,
|
|
439
|
+
onUnload: null,
|
|
440
|
+
onVolumeChange: null,
|
|
441
|
+
onWaiting: null,
|
|
442
|
+
onWheel: null,
|
|
443
|
+
open: boolean,
|
|
444
|
+
optimum: number,
|
|
445
|
+
pattern: null,
|
|
446
|
+
ping: spaceSeparated,
|
|
447
|
+
placeholder: null,
|
|
448
|
+
playsInline: boolean,
|
|
449
|
+
popover: null,
|
|
450
|
+
popoverTarget: null,
|
|
451
|
+
popoverTargetAction: null,
|
|
452
|
+
poster: null,
|
|
453
|
+
preload: null,
|
|
454
|
+
readOnly: boolean,
|
|
455
|
+
referrerPolicy: null,
|
|
456
|
+
rel: spaceSeparated,
|
|
457
|
+
required: boolean,
|
|
458
|
+
reversed: boolean,
|
|
459
|
+
rows: number,
|
|
460
|
+
rowSpan: number,
|
|
461
|
+
sandbox: spaceSeparated,
|
|
462
|
+
scope: null,
|
|
463
|
+
scoped: boolean,
|
|
464
|
+
seamless: boolean,
|
|
465
|
+
selected: boolean,
|
|
466
|
+
shadowRootClonable: boolean,
|
|
467
|
+
shadowRootDelegatesFocus: boolean,
|
|
468
|
+
shadowRootMode: null,
|
|
469
|
+
shape: null,
|
|
470
|
+
size: number,
|
|
471
|
+
sizes: null,
|
|
472
|
+
slot: null,
|
|
473
|
+
span: number,
|
|
474
|
+
spellCheck: booleanish,
|
|
475
|
+
src: null,
|
|
476
|
+
srcDoc: null,
|
|
477
|
+
srcLang: null,
|
|
478
|
+
srcSet: null,
|
|
479
|
+
start: number,
|
|
480
|
+
step: null,
|
|
481
|
+
style: null,
|
|
482
|
+
tabIndex: number,
|
|
483
|
+
target: null,
|
|
484
|
+
title: null,
|
|
485
|
+
translate: null,
|
|
486
|
+
type: null,
|
|
487
|
+
typeMustMatch: boolean,
|
|
488
|
+
useMap: null,
|
|
489
|
+
value: booleanish,
|
|
490
|
+
width: number,
|
|
491
|
+
wrap: null,
|
|
492
|
+
writingSuggestions: null,
|
|
493
|
+
// Legacy.
|
|
494
|
+
// See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
|
|
495
|
+
align: null,
|
|
496
|
+
// Several. Use CSS `text-align` instead,
|
|
497
|
+
aLink: null,
|
|
498
|
+
// `<body>`. Use CSS `a:active {color}` instead
|
|
499
|
+
archive: spaceSeparated,
|
|
500
|
+
// `<object>`. List of URIs to archives
|
|
501
|
+
axis: null,
|
|
502
|
+
// `<td>` and `<th>`. Use `scope` on `<th>`
|
|
503
|
+
background: null,
|
|
504
|
+
// `<body>`. Use CSS `background-image` instead
|
|
505
|
+
bgColor: null,
|
|
506
|
+
// `<body>` and table elements. Use CSS `background-color` instead
|
|
507
|
+
border: number,
|
|
508
|
+
// `<table>`. Use CSS `border-width` instead,
|
|
509
|
+
borderColor: null,
|
|
510
|
+
// `<table>`. Use CSS `border-color` instead,
|
|
511
|
+
bottomMargin: number,
|
|
512
|
+
// `<body>`
|
|
513
|
+
cellPadding: null,
|
|
514
|
+
// `<table>`
|
|
515
|
+
cellSpacing: null,
|
|
516
|
+
// `<table>`
|
|
517
|
+
char: null,
|
|
518
|
+
// Several table elements. When `align=char`, sets the character to align on
|
|
519
|
+
charOff: null,
|
|
520
|
+
// Several table elements. When `char`, offsets the alignment
|
|
521
|
+
classId: null,
|
|
522
|
+
// `<object>`
|
|
523
|
+
clear: null,
|
|
524
|
+
// `<br>`. Use CSS `clear` instead
|
|
525
|
+
code: null,
|
|
526
|
+
// `<object>`
|
|
527
|
+
codeBase: null,
|
|
528
|
+
// `<object>`
|
|
529
|
+
codeType: null,
|
|
530
|
+
// `<object>`
|
|
531
|
+
color: null,
|
|
532
|
+
// `<font>` and `<hr>`. Use CSS instead
|
|
533
|
+
compact: boolean,
|
|
534
|
+
// Lists. Use CSS to reduce space between items instead
|
|
535
|
+
declare: boolean,
|
|
536
|
+
// `<object>`
|
|
537
|
+
event: null,
|
|
538
|
+
// `<script>`
|
|
539
|
+
face: null,
|
|
540
|
+
// `<font>`. Use CSS instead
|
|
541
|
+
frame: null,
|
|
542
|
+
// `<table>`
|
|
543
|
+
frameBorder: null,
|
|
544
|
+
// `<iframe>`. Use CSS `border` instead
|
|
545
|
+
hSpace: number,
|
|
546
|
+
// `<img>` and `<object>`
|
|
547
|
+
leftMargin: number,
|
|
548
|
+
// `<body>`
|
|
549
|
+
link: null,
|
|
550
|
+
// `<body>`. Use CSS `a:link {color: *}` instead
|
|
551
|
+
longDesc: null,
|
|
552
|
+
// `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
|
|
553
|
+
lowSrc: null,
|
|
554
|
+
// `<img>`. Use a `<picture>`
|
|
555
|
+
marginHeight: number,
|
|
556
|
+
// `<body>`
|
|
557
|
+
marginWidth: number,
|
|
558
|
+
// `<body>`
|
|
559
|
+
noResize: boolean,
|
|
560
|
+
// `<frame>`
|
|
561
|
+
noHref: boolean,
|
|
562
|
+
// `<area>`. Use no href instead of an explicit `nohref`
|
|
563
|
+
noShade: boolean,
|
|
564
|
+
// `<hr>`. Use background-color and height instead of borders
|
|
565
|
+
noWrap: boolean,
|
|
566
|
+
// `<td>` and `<th>`
|
|
567
|
+
object: null,
|
|
568
|
+
// `<applet>`
|
|
569
|
+
profile: null,
|
|
570
|
+
// `<head>`
|
|
571
|
+
prompt: null,
|
|
572
|
+
// `<isindex>`
|
|
573
|
+
rev: null,
|
|
574
|
+
// `<link>`
|
|
575
|
+
rightMargin: number,
|
|
576
|
+
// `<body>`
|
|
577
|
+
rules: null,
|
|
578
|
+
// `<table>`
|
|
579
|
+
scheme: null,
|
|
580
|
+
// `<meta>`
|
|
581
|
+
scrolling: booleanish,
|
|
582
|
+
// `<frame>`. Use overflow in the child context
|
|
583
|
+
standby: null,
|
|
584
|
+
// `<object>`
|
|
585
|
+
summary: null,
|
|
586
|
+
// `<table>`
|
|
587
|
+
text: null,
|
|
588
|
+
// `<body>`. Use CSS `color` instead
|
|
589
|
+
topMargin: number,
|
|
590
|
+
// `<body>`
|
|
591
|
+
valueType: null,
|
|
592
|
+
// `<param>`
|
|
593
|
+
version: null,
|
|
594
|
+
// `<html>`. Use a doctype.
|
|
595
|
+
vAlign: null,
|
|
596
|
+
// Several. Use CSS `vertical-align` instead
|
|
597
|
+
vLink: null,
|
|
598
|
+
// `<body>`. Use CSS `a:visited {color}` instead
|
|
599
|
+
vSpace: number,
|
|
600
|
+
// `<img>` and `<object>`
|
|
601
|
+
// Non-standard Properties.
|
|
602
|
+
allowTransparency: null,
|
|
603
|
+
autoCorrect: null,
|
|
604
|
+
autoSave: null,
|
|
605
|
+
disablePictureInPicture: boolean,
|
|
606
|
+
disableRemotePlayback: boolean,
|
|
607
|
+
prefix: null,
|
|
608
|
+
property: null,
|
|
609
|
+
results: number,
|
|
610
|
+
security: null,
|
|
611
|
+
unselectable: null
|
|
612
|
+
},
|
|
613
|
+
space: "html",
|
|
614
|
+
transform: caseInsensitiveTransform
|
|
615
|
+
});
|
|
616
|
+
|
|
617
|
+
// node_modules/property-information/lib/svg.js
|
|
618
|
+
var svg = create({
|
|
619
|
+
attributes: {
|
|
620
|
+
accentHeight: "accent-height",
|
|
621
|
+
alignmentBaseline: "alignment-baseline",
|
|
622
|
+
arabicForm: "arabic-form",
|
|
623
|
+
baselineShift: "baseline-shift",
|
|
624
|
+
capHeight: "cap-height",
|
|
625
|
+
className: "class",
|
|
626
|
+
clipPath: "clip-path",
|
|
627
|
+
clipRule: "clip-rule",
|
|
628
|
+
colorInterpolation: "color-interpolation",
|
|
629
|
+
colorInterpolationFilters: "color-interpolation-filters",
|
|
630
|
+
colorProfile: "color-profile",
|
|
631
|
+
colorRendering: "color-rendering",
|
|
632
|
+
crossOrigin: "crossorigin",
|
|
633
|
+
dataType: "datatype",
|
|
634
|
+
dominantBaseline: "dominant-baseline",
|
|
635
|
+
enableBackground: "enable-background",
|
|
636
|
+
fillOpacity: "fill-opacity",
|
|
637
|
+
fillRule: "fill-rule",
|
|
638
|
+
floodColor: "flood-color",
|
|
639
|
+
floodOpacity: "flood-opacity",
|
|
640
|
+
fontFamily: "font-family",
|
|
641
|
+
fontSize: "font-size",
|
|
642
|
+
fontSizeAdjust: "font-size-adjust",
|
|
643
|
+
fontStretch: "font-stretch",
|
|
644
|
+
fontStyle: "font-style",
|
|
645
|
+
fontVariant: "font-variant",
|
|
646
|
+
fontWeight: "font-weight",
|
|
647
|
+
glyphName: "glyph-name",
|
|
648
|
+
glyphOrientationHorizontal: "glyph-orientation-horizontal",
|
|
649
|
+
glyphOrientationVertical: "glyph-orientation-vertical",
|
|
650
|
+
hrefLang: "hreflang",
|
|
651
|
+
horizAdvX: "horiz-adv-x",
|
|
652
|
+
horizOriginX: "horiz-origin-x",
|
|
653
|
+
horizOriginY: "horiz-origin-y",
|
|
654
|
+
imageRendering: "image-rendering",
|
|
655
|
+
letterSpacing: "letter-spacing",
|
|
656
|
+
lightingColor: "lighting-color",
|
|
657
|
+
markerEnd: "marker-end",
|
|
658
|
+
markerMid: "marker-mid",
|
|
659
|
+
markerStart: "marker-start",
|
|
660
|
+
navDown: "nav-down",
|
|
661
|
+
navDownLeft: "nav-down-left",
|
|
662
|
+
navDownRight: "nav-down-right",
|
|
663
|
+
navLeft: "nav-left",
|
|
664
|
+
navNext: "nav-next",
|
|
665
|
+
navPrev: "nav-prev",
|
|
666
|
+
navRight: "nav-right",
|
|
667
|
+
navUp: "nav-up",
|
|
668
|
+
navUpLeft: "nav-up-left",
|
|
669
|
+
navUpRight: "nav-up-right",
|
|
670
|
+
onAbort: "onabort",
|
|
671
|
+
onActivate: "onactivate",
|
|
672
|
+
onAfterPrint: "onafterprint",
|
|
673
|
+
onBeforePrint: "onbeforeprint",
|
|
674
|
+
onBegin: "onbegin",
|
|
675
|
+
onCancel: "oncancel",
|
|
676
|
+
onCanPlay: "oncanplay",
|
|
677
|
+
onCanPlayThrough: "oncanplaythrough",
|
|
678
|
+
onChange: "onchange",
|
|
679
|
+
onClick: "onclick",
|
|
680
|
+
onClose: "onclose",
|
|
681
|
+
onCopy: "oncopy",
|
|
682
|
+
onCueChange: "oncuechange",
|
|
683
|
+
onCut: "oncut",
|
|
684
|
+
onDblClick: "ondblclick",
|
|
685
|
+
onDrag: "ondrag",
|
|
686
|
+
onDragEnd: "ondragend",
|
|
687
|
+
onDragEnter: "ondragenter",
|
|
688
|
+
onDragExit: "ondragexit",
|
|
689
|
+
onDragLeave: "ondragleave",
|
|
690
|
+
onDragOver: "ondragover",
|
|
691
|
+
onDragStart: "ondragstart",
|
|
692
|
+
onDrop: "ondrop",
|
|
693
|
+
onDurationChange: "ondurationchange",
|
|
694
|
+
onEmptied: "onemptied",
|
|
695
|
+
onEnd: "onend",
|
|
696
|
+
onEnded: "onended",
|
|
697
|
+
onError: "onerror",
|
|
698
|
+
onFocus: "onfocus",
|
|
699
|
+
onFocusIn: "onfocusin",
|
|
700
|
+
onFocusOut: "onfocusout",
|
|
701
|
+
onHashChange: "onhashchange",
|
|
702
|
+
onInput: "oninput",
|
|
703
|
+
onInvalid: "oninvalid",
|
|
704
|
+
onKeyDown: "onkeydown",
|
|
705
|
+
onKeyPress: "onkeypress",
|
|
706
|
+
onKeyUp: "onkeyup",
|
|
707
|
+
onLoad: "onload",
|
|
708
|
+
onLoadedData: "onloadeddata",
|
|
709
|
+
onLoadedMetadata: "onloadedmetadata",
|
|
710
|
+
onLoadStart: "onloadstart",
|
|
711
|
+
onMessage: "onmessage",
|
|
712
|
+
onMouseDown: "onmousedown",
|
|
713
|
+
onMouseEnter: "onmouseenter",
|
|
714
|
+
onMouseLeave: "onmouseleave",
|
|
715
|
+
onMouseMove: "onmousemove",
|
|
716
|
+
onMouseOut: "onmouseout",
|
|
717
|
+
onMouseOver: "onmouseover",
|
|
718
|
+
onMouseUp: "onmouseup",
|
|
719
|
+
onMouseWheel: "onmousewheel",
|
|
720
|
+
onOffline: "onoffline",
|
|
721
|
+
onOnline: "ononline",
|
|
722
|
+
onPageHide: "onpagehide",
|
|
723
|
+
onPageShow: "onpageshow",
|
|
724
|
+
onPaste: "onpaste",
|
|
725
|
+
onPause: "onpause",
|
|
726
|
+
onPlay: "onplay",
|
|
727
|
+
onPlaying: "onplaying",
|
|
728
|
+
onPopState: "onpopstate",
|
|
729
|
+
onProgress: "onprogress",
|
|
730
|
+
onRateChange: "onratechange",
|
|
731
|
+
onRepeat: "onrepeat",
|
|
732
|
+
onReset: "onreset",
|
|
733
|
+
onResize: "onresize",
|
|
734
|
+
onScroll: "onscroll",
|
|
735
|
+
onSeeked: "onseeked",
|
|
736
|
+
onSeeking: "onseeking",
|
|
737
|
+
onSelect: "onselect",
|
|
738
|
+
onShow: "onshow",
|
|
739
|
+
onStalled: "onstalled",
|
|
740
|
+
onStorage: "onstorage",
|
|
741
|
+
onSubmit: "onsubmit",
|
|
742
|
+
onSuspend: "onsuspend",
|
|
743
|
+
onTimeUpdate: "ontimeupdate",
|
|
744
|
+
onToggle: "ontoggle",
|
|
745
|
+
onUnload: "onunload",
|
|
746
|
+
onVolumeChange: "onvolumechange",
|
|
747
|
+
onWaiting: "onwaiting",
|
|
748
|
+
onZoom: "onzoom",
|
|
749
|
+
overlinePosition: "overline-position",
|
|
750
|
+
overlineThickness: "overline-thickness",
|
|
751
|
+
paintOrder: "paint-order",
|
|
752
|
+
panose1: "panose-1",
|
|
753
|
+
pointerEvents: "pointer-events",
|
|
754
|
+
referrerPolicy: "referrerpolicy",
|
|
755
|
+
renderingIntent: "rendering-intent",
|
|
756
|
+
shapeRendering: "shape-rendering",
|
|
757
|
+
stopColor: "stop-color",
|
|
758
|
+
stopOpacity: "stop-opacity",
|
|
759
|
+
strikethroughPosition: "strikethrough-position",
|
|
760
|
+
strikethroughThickness: "strikethrough-thickness",
|
|
761
|
+
strokeDashArray: "stroke-dasharray",
|
|
762
|
+
strokeDashOffset: "stroke-dashoffset",
|
|
763
|
+
strokeLineCap: "stroke-linecap",
|
|
764
|
+
strokeLineJoin: "stroke-linejoin",
|
|
765
|
+
strokeMiterLimit: "stroke-miterlimit",
|
|
766
|
+
strokeOpacity: "stroke-opacity",
|
|
767
|
+
strokeWidth: "stroke-width",
|
|
768
|
+
tabIndex: "tabindex",
|
|
769
|
+
textAnchor: "text-anchor",
|
|
770
|
+
textDecoration: "text-decoration",
|
|
771
|
+
textRendering: "text-rendering",
|
|
772
|
+
transformOrigin: "transform-origin",
|
|
773
|
+
typeOf: "typeof",
|
|
774
|
+
underlinePosition: "underline-position",
|
|
775
|
+
underlineThickness: "underline-thickness",
|
|
776
|
+
unicodeBidi: "unicode-bidi",
|
|
777
|
+
unicodeRange: "unicode-range",
|
|
778
|
+
unitsPerEm: "units-per-em",
|
|
779
|
+
vAlphabetic: "v-alphabetic",
|
|
780
|
+
vHanging: "v-hanging",
|
|
781
|
+
vIdeographic: "v-ideographic",
|
|
782
|
+
vMathematical: "v-mathematical",
|
|
783
|
+
vectorEffect: "vector-effect",
|
|
784
|
+
vertAdvY: "vert-adv-y",
|
|
785
|
+
vertOriginX: "vert-origin-x",
|
|
786
|
+
vertOriginY: "vert-origin-y",
|
|
787
|
+
wordSpacing: "word-spacing",
|
|
788
|
+
writingMode: "writing-mode",
|
|
789
|
+
xHeight: "x-height",
|
|
790
|
+
// These were camelcased in Tiny. Now lowercased in SVG 2
|
|
791
|
+
playbackOrder: "playbackorder",
|
|
792
|
+
timelineBegin: "timelinebegin"
|
|
793
|
+
},
|
|
794
|
+
properties: {
|
|
795
|
+
about: commaOrSpaceSeparated,
|
|
796
|
+
accentHeight: number,
|
|
797
|
+
accumulate: null,
|
|
798
|
+
additive: null,
|
|
799
|
+
alignmentBaseline: null,
|
|
800
|
+
alphabetic: number,
|
|
801
|
+
amplitude: number,
|
|
802
|
+
arabicForm: null,
|
|
803
|
+
ascent: number,
|
|
804
|
+
attributeName: null,
|
|
805
|
+
attributeType: null,
|
|
806
|
+
azimuth: number,
|
|
807
|
+
bandwidth: null,
|
|
808
|
+
baselineShift: null,
|
|
809
|
+
baseFrequency: null,
|
|
810
|
+
baseProfile: null,
|
|
811
|
+
bbox: null,
|
|
812
|
+
begin: null,
|
|
813
|
+
bias: number,
|
|
814
|
+
by: null,
|
|
815
|
+
calcMode: null,
|
|
816
|
+
capHeight: number,
|
|
817
|
+
className: spaceSeparated,
|
|
818
|
+
clip: null,
|
|
819
|
+
clipPath: null,
|
|
820
|
+
clipPathUnits: null,
|
|
821
|
+
clipRule: null,
|
|
822
|
+
color: null,
|
|
823
|
+
colorInterpolation: null,
|
|
824
|
+
colorInterpolationFilters: null,
|
|
825
|
+
colorProfile: null,
|
|
826
|
+
colorRendering: null,
|
|
827
|
+
content: null,
|
|
828
|
+
contentScriptType: null,
|
|
829
|
+
contentStyleType: null,
|
|
830
|
+
crossOrigin: null,
|
|
831
|
+
cursor: null,
|
|
832
|
+
cx: null,
|
|
833
|
+
cy: null,
|
|
834
|
+
d: null,
|
|
835
|
+
dataType: null,
|
|
836
|
+
defaultAction: null,
|
|
837
|
+
descent: number,
|
|
838
|
+
diffuseConstant: number,
|
|
839
|
+
direction: null,
|
|
840
|
+
display: null,
|
|
841
|
+
dur: null,
|
|
842
|
+
divisor: number,
|
|
843
|
+
dominantBaseline: null,
|
|
844
|
+
download: boolean,
|
|
845
|
+
dx: null,
|
|
846
|
+
dy: null,
|
|
847
|
+
edgeMode: null,
|
|
848
|
+
editable: null,
|
|
849
|
+
elevation: number,
|
|
850
|
+
enableBackground: null,
|
|
851
|
+
end: null,
|
|
852
|
+
event: null,
|
|
853
|
+
exponent: number,
|
|
854
|
+
externalResourcesRequired: null,
|
|
855
|
+
fill: null,
|
|
856
|
+
fillOpacity: number,
|
|
857
|
+
fillRule: null,
|
|
858
|
+
filter: null,
|
|
859
|
+
filterRes: null,
|
|
860
|
+
filterUnits: null,
|
|
861
|
+
floodColor: null,
|
|
862
|
+
floodOpacity: null,
|
|
863
|
+
focusable: null,
|
|
864
|
+
focusHighlight: null,
|
|
865
|
+
fontFamily: null,
|
|
866
|
+
fontSize: null,
|
|
867
|
+
fontSizeAdjust: null,
|
|
868
|
+
fontStretch: null,
|
|
869
|
+
fontStyle: null,
|
|
870
|
+
fontVariant: null,
|
|
871
|
+
fontWeight: null,
|
|
872
|
+
format: null,
|
|
873
|
+
fr: null,
|
|
874
|
+
from: null,
|
|
875
|
+
fx: null,
|
|
876
|
+
fy: null,
|
|
877
|
+
g1: commaSeparated,
|
|
878
|
+
g2: commaSeparated,
|
|
879
|
+
glyphName: commaSeparated,
|
|
880
|
+
glyphOrientationHorizontal: null,
|
|
881
|
+
glyphOrientationVertical: null,
|
|
882
|
+
glyphRef: null,
|
|
883
|
+
gradientTransform: null,
|
|
884
|
+
gradientUnits: null,
|
|
885
|
+
handler: null,
|
|
886
|
+
hanging: number,
|
|
887
|
+
hatchContentUnits: null,
|
|
888
|
+
hatchUnits: null,
|
|
889
|
+
height: null,
|
|
890
|
+
href: null,
|
|
891
|
+
hrefLang: null,
|
|
892
|
+
horizAdvX: number,
|
|
893
|
+
horizOriginX: number,
|
|
894
|
+
horizOriginY: number,
|
|
895
|
+
id: null,
|
|
896
|
+
ideographic: number,
|
|
897
|
+
imageRendering: null,
|
|
898
|
+
initialVisibility: null,
|
|
899
|
+
in: null,
|
|
900
|
+
in2: null,
|
|
901
|
+
intercept: number,
|
|
902
|
+
k: number,
|
|
903
|
+
k1: number,
|
|
904
|
+
k2: number,
|
|
905
|
+
k3: number,
|
|
906
|
+
k4: number,
|
|
907
|
+
kernelMatrix: commaOrSpaceSeparated,
|
|
908
|
+
kernelUnitLength: null,
|
|
909
|
+
keyPoints: null,
|
|
910
|
+
// SEMI_COLON_SEPARATED
|
|
911
|
+
keySplines: null,
|
|
912
|
+
// SEMI_COLON_SEPARATED
|
|
913
|
+
keyTimes: null,
|
|
914
|
+
// SEMI_COLON_SEPARATED
|
|
915
|
+
kerning: null,
|
|
916
|
+
lang: null,
|
|
917
|
+
lengthAdjust: null,
|
|
918
|
+
letterSpacing: null,
|
|
919
|
+
lightingColor: null,
|
|
920
|
+
limitingConeAngle: number,
|
|
921
|
+
local: null,
|
|
922
|
+
markerEnd: null,
|
|
923
|
+
markerMid: null,
|
|
924
|
+
markerStart: null,
|
|
925
|
+
markerHeight: null,
|
|
926
|
+
markerUnits: null,
|
|
927
|
+
markerWidth: null,
|
|
928
|
+
mask: null,
|
|
929
|
+
maskContentUnits: null,
|
|
930
|
+
maskUnits: null,
|
|
931
|
+
mathematical: null,
|
|
932
|
+
max: null,
|
|
933
|
+
media: null,
|
|
934
|
+
mediaCharacterEncoding: null,
|
|
935
|
+
mediaContentEncodings: null,
|
|
936
|
+
mediaSize: number,
|
|
937
|
+
mediaTime: null,
|
|
938
|
+
method: null,
|
|
939
|
+
min: null,
|
|
940
|
+
mode: null,
|
|
941
|
+
name: null,
|
|
942
|
+
navDown: null,
|
|
943
|
+
navDownLeft: null,
|
|
944
|
+
navDownRight: null,
|
|
945
|
+
navLeft: null,
|
|
946
|
+
navNext: null,
|
|
947
|
+
navPrev: null,
|
|
948
|
+
navRight: null,
|
|
949
|
+
navUp: null,
|
|
950
|
+
navUpLeft: null,
|
|
951
|
+
navUpRight: null,
|
|
952
|
+
numOctaves: null,
|
|
953
|
+
observer: null,
|
|
954
|
+
offset: null,
|
|
955
|
+
onAbort: null,
|
|
956
|
+
onActivate: null,
|
|
957
|
+
onAfterPrint: null,
|
|
958
|
+
onBeforePrint: null,
|
|
959
|
+
onBegin: null,
|
|
960
|
+
onCancel: null,
|
|
961
|
+
onCanPlay: null,
|
|
962
|
+
onCanPlayThrough: null,
|
|
963
|
+
onChange: null,
|
|
964
|
+
onClick: null,
|
|
965
|
+
onClose: null,
|
|
966
|
+
onCopy: null,
|
|
967
|
+
onCueChange: null,
|
|
968
|
+
onCut: null,
|
|
969
|
+
onDblClick: null,
|
|
970
|
+
onDrag: null,
|
|
971
|
+
onDragEnd: null,
|
|
972
|
+
onDragEnter: null,
|
|
973
|
+
onDragExit: null,
|
|
974
|
+
onDragLeave: null,
|
|
975
|
+
onDragOver: null,
|
|
976
|
+
onDragStart: null,
|
|
977
|
+
onDrop: null,
|
|
978
|
+
onDurationChange: null,
|
|
979
|
+
onEmptied: null,
|
|
980
|
+
onEnd: null,
|
|
981
|
+
onEnded: null,
|
|
982
|
+
onError: null,
|
|
983
|
+
onFocus: null,
|
|
984
|
+
onFocusIn: null,
|
|
985
|
+
onFocusOut: null,
|
|
986
|
+
onHashChange: null,
|
|
987
|
+
onInput: null,
|
|
988
|
+
onInvalid: null,
|
|
989
|
+
onKeyDown: null,
|
|
990
|
+
onKeyPress: null,
|
|
991
|
+
onKeyUp: null,
|
|
992
|
+
onLoad: null,
|
|
993
|
+
onLoadedData: null,
|
|
994
|
+
onLoadedMetadata: null,
|
|
995
|
+
onLoadStart: null,
|
|
996
|
+
onMessage: null,
|
|
997
|
+
onMouseDown: null,
|
|
998
|
+
onMouseEnter: null,
|
|
999
|
+
onMouseLeave: null,
|
|
1000
|
+
onMouseMove: null,
|
|
1001
|
+
onMouseOut: null,
|
|
1002
|
+
onMouseOver: null,
|
|
1003
|
+
onMouseUp: null,
|
|
1004
|
+
onMouseWheel: null,
|
|
1005
|
+
onOffline: null,
|
|
1006
|
+
onOnline: null,
|
|
1007
|
+
onPageHide: null,
|
|
1008
|
+
onPageShow: null,
|
|
1009
|
+
onPaste: null,
|
|
1010
|
+
onPause: null,
|
|
1011
|
+
onPlay: null,
|
|
1012
|
+
onPlaying: null,
|
|
1013
|
+
onPopState: null,
|
|
1014
|
+
onProgress: null,
|
|
1015
|
+
onRateChange: null,
|
|
1016
|
+
onRepeat: null,
|
|
1017
|
+
onReset: null,
|
|
1018
|
+
onResize: null,
|
|
1019
|
+
onScroll: null,
|
|
1020
|
+
onSeeked: null,
|
|
1021
|
+
onSeeking: null,
|
|
1022
|
+
onSelect: null,
|
|
1023
|
+
onShow: null,
|
|
1024
|
+
onStalled: null,
|
|
1025
|
+
onStorage: null,
|
|
1026
|
+
onSubmit: null,
|
|
1027
|
+
onSuspend: null,
|
|
1028
|
+
onTimeUpdate: null,
|
|
1029
|
+
onToggle: null,
|
|
1030
|
+
onUnload: null,
|
|
1031
|
+
onVolumeChange: null,
|
|
1032
|
+
onWaiting: null,
|
|
1033
|
+
onZoom: null,
|
|
1034
|
+
opacity: null,
|
|
1035
|
+
operator: null,
|
|
1036
|
+
order: null,
|
|
1037
|
+
orient: null,
|
|
1038
|
+
orientation: null,
|
|
1039
|
+
origin: null,
|
|
1040
|
+
overflow: null,
|
|
1041
|
+
overlay: null,
|
|
1042
|
+
overlinePosition: number,
|
|
1043
|
+
overlineThickness: number,
|
|
1044
|
+
paintOrder: null,
|
|
1045
|
+
panose1: null,
|
|
1046
|
+
path: null,
|
|
1047
|
+
pathLength: number,
|
|
1048
|
+
patternContentUnits: null,
|
|
1049
|
+
patternTransform: null,
|
|
1050
|
+
patternUnits: null,
|
|
1051
|
+
phase: null,
|
|
1052
|
+
ping: spaceSeparated,
|
|
1053
|
+
pitch: null,
|
|
1054
|
+
playbackOrder: null,
|
|
1055
|
+
pointerEvents: null,
|
|
1056
|
+
points: null,
|
|
1057
|
+
pointsAtX: number,
|
|
1058
|
+
pointsAtY: number,
|
|
1059
|
+
pointsAtZ: number,
|
|
1060
|
+
preserveAlpha: null,
|
|
1061
|
+
preserveAspectRatio: null,
|
|
1062
|
+
primitiveUnits: null,
|
|
1063
|
+
propagate: null,
|
|
1064
|
+
property: commaOrSpaceSeparated,
|
|
1065
|
+
r: null,
|
|
1066
|
+
radius: null,
|
|
1067
|
+
referrerPolicy: null,
|
|
1068
|
+
refX: null,
|
|
1069
|
+
refY: null,
|
|
1070
|
+
rel: commaOrSpaceSeparated,
|
|
1071
|
+
rev: commaOrSpaceSeparated,
|
|
1072
|
+
renderingIntent: null,
|
|
1073
|
+
repeatCount: null,
|
|
1074
|
+
repeatDur: null,
|
|
1075
|
+
requiredExtensions: commaOrSpaceSeparated,
|
|
1076
|
+
requiredFeatures: commaOrSpaceSeparated,
|
|
1077
|
+
requiredFonts: commaOrSpaceSeparated,
|
|
1078
|
+
requiredFormats: commaOrSpaceSeparated,
|
|
1079
|
+
resource: null,
|
|
1080
|
+
restart: null,
|
|
1081
|
+
result: null,
|
|
1082
|
+
rotate: null,
|
|
1083
|
+
rx: null,
|
|
1084
|
+
ry: null,
|
|
1085
|
+
scale: null,
|
|
1086
|
+
seed: null,
|
|
1087
|
+
shapeRendering: null,
|
|
1088
|
+
side: null,
|
|
1089
|
+
slope: null,
|
|
1090
|
+
snapshotTime: null,
|
|
1091
|
+
specularConstant: number,
|
|
1092
|
+
specularExponent: number,
|
|
1093
|
+
spreadMethod: null,
|
|
1094
|
+
spacing: null,
|
|
1095
|
+
startOffset: null,
|
|
1096
|
+
stdDeviation: null,
|
|
1097
|
+
stemh: null,
|
|
1098
|
+
stemv: null,
|
|
1099
|
+
stitchTiles: null,
|
|
1100
|
+
stopColor: null,
|
|
1101
|
+
stopOpacity: null,
|
|
1102
|
+
strikethroughPosition: number,
|
|
1103
|
+
strikethroughThickness: number,
|
|
1104
|
+
string: null,
|
|
1105
|
+
stroke: null,
|
|
1106
|
+
strokeDashArray: commaOrSpaceSeparated,
|
|
1107
|
+
strokeDashOffset: null,
|
|
1108
|
+
strokeLineCap: null,
|
|
1109
|
+
strokeLineJoin: null,
|
|
1110
|
+
strokeMiterLimit: number,
|
|
1111
|
+
strokeOpacity: number,
|
|
1112
|
+
strokeWidth: null,
|
|
1113
|
+
style: null,
|
|
1114
|
+
surfaceScale: number,
|
|
1115
|
+
syncBehavior: null,
|
|
1116
|
+
syncBehaviorDefault: null,
|
|
1117
|
+
syncMaster: null,
|
|
1118
|
+
syncTolerance: null,
|
|
1119
|
+
syncToleranceDefault: null,
|
|
1120
|
+
systemLanguage: commaOrSpaceSeparated,
|
|
1121
|
+
tabIndex: number,
|
|
1122
|
+
tableValues: null,
|
|
1123
|
+
target: null,
|
|
1124
|
+
targetX: number,
|
|
1125
|
+
targetY: number,
|
|
1126
|
+
textAnchor: null,
|
|
1127
|
+
textDecoration: null,
|
|
1128
|
+
textRendering: null,
|
|
1129
|
+
textLength: null,
|
|
1130
|
+
timelineBegin: null,
|
|
1131
|
+
title: null,
|
|
1132
|
+
transformBehavior: null,
|
|
1133
|
+
type: null,
|
|
1134
|
+
typeOf: commaOrSpaceSeparated,
|
|
1135
|
+
to: null,
|
|
1136
|
+
transform: null,
|
|
1137
|
+
transformOrigin: null,
|
|
1138
|
+
u1: null,
|
|
1139
|
+
u2: null,
|
|
1140
|
+
underlinePosition: number,
|
|
1141
|
+
underlineThickness: number,
|
|
1142
|
+
unicode: null,
|
|
1143
|
+
unicodeBidi: null,
|
|
1144
|
+
unicodeRange: null,
|
|
1145
|
+
unitsPerEm: number,
|
|
1146
|
+
values: null,
|
|
1147
|
+
vAlphabetic: number,
|
|
1148
|
+
vMathematical: number,
|
|
1149
|
+
vectorEffect: null,
|
|
1150
|
+
vHanging: number,
|
|
1151
|
+
vIdeographic: number,
|
|
1152
|
+
version: null,
|
|
1153
|
+
vertAdvY: number,
|
|
1154
|
+
vertOriginX: number,
|
|
1155
|
+
vertOriginY: number,
|
|
1156
|
+
viewBox: null,
|
|
1157
|
+
viewTarget: null,
|
|
1158
|
+
visibility: null,
|
|
1159
|
+
width: null,
|
|
1160
|
+
widths: null,
|
|
1161
|
+
wordSpacing: null,
|
|
1162
|
+
writingMode: null,
|
|
1163
|
+
x: null,
|
|
1164
|
+
x1: null,
|
|
1165
|
+
x2: null,
|
|
1166
|
+
xChannelSelector: null,
|
|
1167
|
+
xHeight: number,
|
|
1168
|
+
y: null,
|
|
1169
|
+
y1: null,
|
|
1170
|
+
y2: null,
|
|
1171
|
+
yChannelSelector: null,
|
|
1172
|
+
z: null,
|
|
1173
|
+
zoomAndPan: null
|
|
1174
|
+
},
|
|
1175
|
+
space: "svg",
|
|
1176
|
+
transform: caseSensitiveTransform
|
|
1177
|
+
});
|
|
1178
|
+
|
|
1179
|
+
// node_modules/property-information/lib/xlink.js
|
|
1180
|
+
var xlink = create({
|
|
1181
|
+
properties: {
|
|
1182
|
+
xLinkActuate: null,
|
|
1183
|
+
xLinkArcRole: null,
|
|
1184
|
+
xLinkHref: null,
|
|
1185
|
+
xLinkRole: null,
|
|
1186
|
+
xLinkShow: null,
|
|
1187
|
+
xLinkTitle: null,
|
|
1188
|
+
xLinkType: null
|
|
1189
|
+
},
|
|
1190
|
+
space: "xlink",
|
|
1191
|
+
transform(_2, property) {
|
|
1192
|
+
return "xlink:" + property.slice(5).toLowerCase();
|
|
1193
|
+
}
|
|
1194
|
+
});
|
|
1195
|
+
|
|
1196
|
+
// node_modules/property-information/lib/xmlns.js
|
|
1197
|
+
var xmlns = create({
|
|
1198
|
+
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
1199
|
+
properties: { xmlnsXLink: null, xmlns: null },
|
|
1200
|
+
space: "xmlns",
|
|
1201
|
+
transform: caseInsensitiveTransform
|
|
1202
|
+
});
|
|
1203
|
+
|
|
1204
|
+
// node_modules/property-information/lib/xml.js
|
|
1205
|
+
var xml = create({
|
|
1206
|
+
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
|
|
1207
|
+
space: "xml",
|
|
1208
|
+
transform(_2, property) {
|
|
1209
|
+
return "xml:" + property.slice(3).toLowerCase();
|
|
1210
|
+
}
|
|
1211
|
+
});
|
|
1212
|
+
|
|
1213
|
+
// node_modules/property-information/lib/find.js
|
|
1214
|
+
var cap = /[A-Z]/g;
|
|
1215
|
+
var dash = /-[a-z]/g;
|
|
1216
|
+
var valid = /^data[-\w.:]+$/i;
|
|
1217
|
+
function find(schema, value) {
|
|
1218
|
+
const normal = normalize(value);
|
|
1219
|
+
let property = value;
|
|
1220
|
+
let Type = Info;
|
|
1221
|
+
if (normal in schema.normal) {
|
|
1222
|
+
return schema.property[schema.normal[normal]];
|
|
1223
|
+
}
|
|
1224
|
+
if (normal.length > 4 && normal.slice(0, 4) === "data" && valid.test(value)) {
|
|
1225
|
+
if (value.charAt(4) === "-") {
|
|
1226
|
+
const rest = value.slice(5).replace(dash, camelcase);
|
|
1227
|
+
property = "data" + rest.charAt(0).toUpperCase() + rest.slice(1);
|
|
1228
|
+
} else {
|
|
1229
|
+
const rest = value.slice(4);
|
|
1230
|
+
if (!dash.test(rest)) {
|
|
1231
|
+
let dashes = rest.replace(cap, kebab);
|
|
1232
|
+
if (dashes.charAt(0) !== "-") {
|
|
1233
|
+
dashes = "-" + dashes;
|
|
1234
|
+
}
|
|
1235
|
+
value = "data" + dashes;
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
Type = DefinedInfo;
|
|
1239
|
+
}
|
|
1240
|
+
return new Type(property, value);
|
|
1241
|
+
}
|
|
1242
|
+
function kebab($0) {
|
|
1243
|
+
return "-" + $0.toLowerCase();
|
|
1244
|
+
}
|
|
1245
|
+
function camelcase($0) {
|
|
1246
|
+
return $0.charAt(1).toUpperCase();
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
// node_modules/property-information/index.js
|
|
1250
|
+
var html2 = merge([aria, html, xlink, xmlns, xml], "html");
|
|
1251
|
+
var svg2 = merge([aria, svg, xlink, xmlns, xml], "svg");
|
|
1252
|
+
|
|
1253
|
+
// node_modules/zwitch/index.js
|
|
1254
|
+
var own = {}.hasOwnProperty;
|
|
1255
|
+
function zwitch(key2, options) {
|
|
1256
|
+
const settings = options || {};
|
|
1257
|
+
function one2(value, ...parameters) {
|
|
1258
|
+
let fn = one2.invalid;
|
|
1259
|
+
const handlers = one2.handlers;
|
|
1260
|
+
if (value && own.call(value, key2)) {
|
|
1261
|
+
const id = String(value[key2]);
|
|
1262
|
+
fn = own.call(handlers, id) ? handlers[id] : one2.unknown;
|
|
1263
|
+
}
|
|
1264
|
+
if (fn) {
|
|
1265
|
+
return fn.call(this, value, ...parameters);
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
one2.handlers = settings.handlers || {};
|
|
1269
|
+
one2.invalid = settings.invalid;
|
|
1270
|
+
one2.unknown = settings.unknown;
|
|
1271
|
+
return one2;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
// node_modules/stringify-entities/lib/core.js
|
|
1275
|
+
var defaultSubsetRegex = /["&'<>`]/g;
|
|
1276
|
+
var surrogatePairsRegex = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
1277
|
+
var controlCharactersRegex = (
|
|
1278
|
+
// eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
|
|
1279
|
+
/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
|
|
1280
|
+
);
|
|
1281
|
+
var regexEscapeRegex = /[|\\{}()[\]^$+*?.]/g;
|
|
1282
|
+
var subsetToRegexCache = /* @__PURE__ */ new WeakMap();
|
|
1283
|
+
function core(value, options) {
|
|
1284
|
+
value = value.replace(
|
|
1285
|
+
options.subset ? charactersToExpressionCached(options.subset) : defaultSubsetRegex,
|
|
1286
|
+
basic
|
|
1287
|
+
);
|
|
1288
|
+
if (options.subset || options.escapeOnly) {
|
|
1289
|
+
return value;
|
|
1290
|
+
}
|
|
1291
|
+
return value.replace(surrogatePairsRegex, surrogate).replace(controlCharactersRegex, basic);
|
|
1292
|
+
function surrogate(pair, index, all2) {
|
|
1293
|
+
return options.format(
|
|
1294
|
+
(pair.charCodeAt(0) - 55296) * 1024 + pair.charCodeAt(1) - 56320 + 65536,
|
|
1295
|
+
all2.charCodeAt(index + 2),
|
|
1296
|
+
options
|
|
1297
|
+
);
|
|
1298
|
+
}
|
|
1299
|
+
function basic(character, index, all2) {
|
|
1300
|
+
return options.format(
|
|
1301
|
+
character.charCodeAt(0),
|
|
1302
|
+
all2.charCodeAt(index + 1),
|
|
1303
|
+
options
|
|
1304
|
+
);
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
function charactersToExpressionCached(subset) {
|
|
1308
|
+
let cached = subsetToRegexCache.get(subset);
|
|
1309
|
+
if (!cached) {
|
|
1310
|
+
cached = charactersToExpression(subset);
|
|
1311
|
+
subsetToRegexCache.set(subset, cached);
|
|
1312
|
+
}
|
|
1313
|
+
return cached;
|
|
1314
|
+
}
|
|
1315
|
+
function charactersToExpression(subset) {
|
|
1316
|
+
const groups = [];
|
|
1317
|
+
let index = -1;
|
|
1318
|
+
while (++index < subset.length) {
|
|
1319
|
+
groups.push(subset[index].replace(regexEscapeRegex, "\\$&"));
|
|
1320
|
+
}
|
|
1321
|
+
return new RegExp("(?:" + groups.join("|") + ")", "g");
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
// node_modules/stringify-entities/lib/util/to-hexadecimal.js
|
|
1325
|
+
var hexadecimalRegex = /[\dA-Fa-f]/;
|
|
1326
|
+
function toHexadecimal(code, next, omit) {
|
|
1327
|
+
const value = "&#x" + code.toString(16).toUpperCase();
|
|
1328
|
+
return omit && next && !hexadecimalRegex.test(String.fromCharCode(next)) ? value : value + ";";
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
// node_modules/stringify-entities/lib/util/to-decimal.js
|
|
1332
|
+
var decimalRegex = /\d/;
|
|
1333
|
+
function toDecimal(code, next, omit) {
|
|
1334
|
+
const value = "&#" + String(code);
|
|
1335
|
+
return omit && next && !decimalRegex.test(String.fromCharCode(next)) ? value : value + ";";
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
// node_modules/character-entities-legacy/index.js
|
|
1339
|
+
var characterEntitiesLegacy = [
|
|
1340
|
+
"AElig",
|
|
1341
|
+
"AMP",
|
|
1342
|
+
"Aacute",
|
|
1343
|
+
"Acirc",
|
|
1344
|
+
"Agrave",
|
|
1345
|
+
"Aring",
|
|
1346
|
+
"Atilde",
|
|
1347
|
+
"Auml",
|
|
1348
|
+
"COPY",
|
|
1349
|
+
"Ccedil",
|
|
1350
|
+
"ETH",
|
|
1351
|
+
"Eacute",
|
|
1352
|
+
"Ecirc",
|
|
1353
|
+
"Egrave",
|
|
1354
|
+
"Euml",
|
|
1355
|
+
"GT",
|
|
1356
|
+
"Iacute",
|
|
1357
|
+
"Icirc",
|
|
1358
|
+
"Igrave",
|
|
1359
|
+
"Iuml",
|
|
1360
|
+
"LT",
|
|
1361
|
+
"Ntilde",
|
|
1362
|
+
"Oacute",
|
|
1363
|
+
"Ocirc",
|
|
1364
|
+
"Ograve",
|
|
1365
|
+
"Oslash",
|
|
1366
|
+
"Otilde",
|
|
1367
|
+
"Ouml",
|
|
1368
|
+
"QUOT",
|
|
1369
|
+
"REG",
|
|
1370
|
+
"THORN",
|
|
1371
|
+
"Uacute",
|
|
1372
|
+
"Ucirc",
|
|
1373
|
+
"Ugrave",
|
|
1374
|
+
"Uuml",
|
|
1375
|
+
"Yacute",
|
|
1376
|
+
"aacute",
|
|
1377
|
+
"acirc",
|
|
1378
|
+
"acute",
|
|
1379
|
+
"aelig",
|
|
1380
|
+
"agrave",
|
|
1381
|
+
"amp",
|
|
1382
|
+
"aring",
|
|
1383
|
+
"atilde",
|
|
1384
|
+
"auml",
|
|
1385
|
+
"brvbar",
|
|
1386
|
+
"ccedil",
|
|
1387
|
+
"cedil",
|
|
1388
|
+
"cent",
|
|
1389
|
+
"copy",
|
|
1390
|
+
"curren",
|
|
1391
|
+
"deg",
|
|
1392
|
+
"divide",
|
|
1393
|
+
"eacute",
|
|
1394
|
+
"ecirc",
|
|
1395
|
+
"egrave",
|
|
1396
|
+
"eth",
|
|
1397
|
+
"euml",
|
|
1398
|
+
"frac12",
|
|
1399
|
+
"frac14",
|
|
1400
|
+
"frac34",
|
|
1401
|
+
"gt",
|
|
1402
|
+
"iacute",
|
|
1403
|
+
"icirc",
|
|
1404
|
+
"iexcl",
|
|
1405
|
+
"igrave",
|
|
1406
|
+
"iquest",
|
|
1407
|
+
"iuml",
|
|
1408
|
+
"laquo",
|
|
1409
|
+
"lt",
|
|
1410
|
+
"macr",
|
|
1411
|
+
"micro",
|
|
1412
|
+
"middot",
|
|
1413
|
+
"nbsp",
|
|
1414
|
+
"not",
|
|
1415
|
+
"ntilde",
|
|
1416
|
+
"oacute",
|
|
1417
|
+
"ocirc",
|
|
1418
|
+
"ograve",
|
|
1419
|
+
"ordf",
|
|
1420
|
+
"ordm",
|
|
1421
|
+
"oslash",
|
|
1422
|
+
"otilde",
|
|
1423
|
+
"ouml",
|
|
1424
|
+
"para",
|
|
1425
|
+
"plusmn",
|
|
1426
|
+
"pound",
|
|
1427
|
+
"quot",
|
|
1428
|
+
"raquo",
|
|
1429
|
+
"reg",
|
|
1430
|
+
"sect",
|
|
1431
|
+
"shy",
|
|
1432
|
+
"sup1",
|
|
1433
|
+
"sup2",
|
|
1434
|
+
"sup3",
|
|
1435
|
+
"szlig",
|
|
1436
|
+
"thorn",
|
|
1437
|
+
"times",
|
|
1438
|
+
"uacute",
|
|
1439
|
+
"ucirc",
|
|
1440
|
+
"ugrave",
|
|
1441
|
+
"uml",
|
|
1442
|
+
"uuml",
|
|
1443
|
+
"yacute",
|
|
1444
|
+
"yen",
|
|
1445
|
+
"yuml"
|
|
1446
|
+
];
|
|
1447
|
+
|
|
1448
|
+
// node_modules/character-entities-html4/index.js
|
|
1449
|
+
var characterEntitiesHtml4 = {
|
|
1450
|
+
nbsp: "\xA0",
|
|
1451
|
+
iexcl: "\xA1",
|
|
1452
|
+
cent: "\xA2",
|
|
1453
|
+
pound: "\xA3",
|
|
1454
|
+
curren: "\xA4",
|
|
1455
|
+
yen: "\xA5",
|
|
1456
|
+
brvbar: "\xA6",
|
|
1457
|
+
sect: "\xA7",
|
|
1458
|
+
uml: "\xA8",
|
|
1459
|
+
copy: "\xA9",
|
|
1460
|
+
ordf: "\xAA",
|
|
1461
|
+
laquo: "\xAB",
|
|
1462
|
+
not: "\xAC",
|
|
1463
|
+
shy: "\xAD",
|
|
1464
|
+
reg: "\xAE",
|
|
1465
|
+
macr: "\xAF",
|
|
1466
|
+
deg: "\xB0",
|
|
1467
|
+
plusmn: "\xB1",
|
|
1468
|
+
sup2: "\xB2",
|
|
1469
|
+
sup3: "\xB3",
|
|
1470
|
+
acute: "\xB4",
|
|
1471
|
+
micro: "\xB5",
|
|
1472
|
+
para: "\xB6",
|
|
1473
|
+
middot: "\xB7",
|
|
1474
|
+
cedil: "\xB8",
|
|
1475
|
+
sup1: "\xB9",
|
|
1476
|
+
ordm: "\xBA",
|
|
1477
|
+
raquo: "\xBB",
|
|
1478
|
+
frac14: "\xBC",
|
|
1479
|
+
frac12: "\xBD",
|
|
1480
|
+
frac34: "\xBE",
|
|
1481
|
+
iquest: "\xBF",
|
|
1482
|
+
Agrave: "\xC0",
|
|
1483
|
+
Aacute: "\xC1",
|
|
1484
|
+
Acirc: "\xC2",
|
|
1485
|
+
Atilde: "\xC3",
|
|
1486
|
+
Auml: "\xC4",
|
|
1487
|
+
Aring: "\xC5",
|
|
1488
|
+
AElig: "\xC6",
|
|
1489
|
+
Ccedil: "\xC7",
|
|
1490
|
+
Egrave: "\xC8",
|
|
1491
|
+
Eacute: "\xC9",
|
|
1492
|
+
Ecirc: "\xCA",
|
|
1493
|
+
Euml: "\xCB",
|
|
1494
|
+
Igrave: "\xCC",
|
|
1495
|
+
Iacute: "\xCD",
|
|
1496
|
+
Icirc: "\xCE",
|
|
1497
|
+
Iuml: "\xCF",
|
|
1498
|
+
ETH: "\xD0",
|
|
1499
|
+
Ntilde: "\xD1",
|
|
1500
|
+
Ograve: "\xD2",
|
|
1501
|
+
Oacute: "\xD3",
|
|
1502
|
+
Ocirc: "\xD4",
|
|
1503
|
+
Otilde: "\xD5",
|
|
1504
|
+
Ouml: "\xD6",
|
|
1505
|
+
times: "\xD7",
|
|
1506
|
+
Oslash: "\xD8",
|
|
1507
|
+
Ugrave: "\xD9",
|
|
1508
|
+
Uacute: "\xDA",
|
|
1509
|
+
Ucirc: "\xDB",
|
|
1510
|
+
Uuml: "\xDC",
|
|
1511
|
+
Yacute: "\xDD",
|
|
1512
|
+
THORN: "\xDE",
|
|
1513
|
+
szlig: "\xDF",
|
|
1514
|
+
agrave: "\xE0",
|
|
1515
|
+
aacute: "\xE1",
|
|
1516
|
+
acirc: "\xE2",
|
|
1517
|
+
atilde: "\xE3",
|
|
1518
|
+
auml: "\xE4",
|
|
1519
|
+
aring: "\xE5",
|
|
1520
|
+
aelig: "\xE6",
|
|
1521
|
+
ccedil: "\xE7",
|
|
1522
|
+
egrave: "\xE8",
|
|
1523
|
+
eacute: "\xE9",
|
|
1524
|
+
ecirc: "\xEA",
|
|
1525
|
+
euml: "\xEB",
|
|
1526
|
+
igrave: "\xEC",
|
|
1527
|
+
iacute: "\xED",
|
|
1528
|
+
icirc: "\xEE",
|
|
1529
|
+
iuml: "\xEF",
|
|
1530
|
+
eth: "\xF0",
|
|
1531
|
+
ntilde: "\xF1",
|
|
1532
|
+
ograve: "\xF2",
|
|
1533
|
+
oacute: "\xF3",
|
|
1534
|
+
ocirc: "\xF4",
|
|
1535
|
+
otilde: "\xF5",
|
|
1536
|
+
ouml: "\xF6",
|
|
1537
|
+
divide: "\xF7",
|
|
1538
|
+
oslash: "\xF8",
|
|
1539
|
+
ugrave: "\xF9",
|
|
1540
|
+
uacute: "\xFA",
|
|
1541
|
+
ucirc: "\xFB",
|
|
1542
|
+
uuml: "\xFC",
|
|
1543
|
+
yacute: "\xFD",
|
|
1544
|
+
thorn: "\xFE",
|
|
1545
|
+
yuml: "\xFF",
|
|
1546
|
+
fnof: "\u0192",
|
|
1547
|
+
Alpha: "\u0391",
|
|
1548
|
+
Beta: "\u0392",
|
|
1549
|
+
Gamma: "\u0393",
|
|
1550
|
+
Delta: "\u0394",
|
|
1551
|
+
Epsilon: "\u0395",
|
|
1552
|
+
Zeta: "\u0396",
|
|
1553
|
+
Eta: "\u0397",
|
|
1554
|
+
Theta: "\u0398",
|
|
1555
|
+
Iota: "\u0399",
|
|
1556
|
+
Kappa: "\u039A",
|
|
1557
|
+
Lambda: "\u039B",
|
|
1558
|
+
Mu: "\u039C",
|
|
1559
|
+
Nu: "\u039D",
|
|
1560
|
+
Xi: "\u039E",
|
|
1561
|
+
Omicron: "\u039F",
|
|
1562
|
+
Pi: "\u03A0",
|
|
1563
|
+
Rho: "\u03A1",
|
|
1564
|
+
Sigma: "\u03A3",
|
|
1565
|
+
Tau: "\u03A4",
|
|
1566
|
+
Upsilon: "\u03A5",
|
|
1567
|
+
Phi: "\u03A6",
|
|
1568
|
+
Chi: "\u03A7",
|
|
1569
|
+
Psi: "\u03A8",
|
|
1570
|
+
Omega: "\u03A9",
|
|
1571
|
+
alpha: "\u03B1",
|
|
1572
|
+
beta: "\u03B2",
|
|
1573
|
+
gamma: "\u03B3",
|
|
1574
|
+
delta: "\u03B4",
|
|
1575
|
+
epsilon: "\u03B5",
|
|
1576
|
+
zeta: "\u03B6",
|
|
1577
|
+
eta: "\u03B7",
|
|
1578
|
+
theta: "\u03B8",
|
|
1579
|
+
iota: "\u03B9",
|
|
1580
|
+
kappa: "\u03BA",
|
|
1581
|
+
lambda: "\u03BB",
|
|
1582
|
+
mu: "\u03BC",
|
|
1583
|
+
nu: "\u03BD",
|
|
1584
|
+
xi: "\u03BE",
|
|
1585
|
+
omicron: "\u03BF",
|
|
1586
|
+
pi: "\u03C0",
|
|
1587
|
+
rho: "\u03C1",
|
|
1588
|
+
sigmaf: "\u03C2",
|
|
1589
|
+
sigma: "\u03C3",
|
|
1590
|
+
tau: "\u03C4",
|
|
1591
|
+
upsilon: "\u03C5",
|
|
1592
|
+
phi: "\u03C6",
|
|
1593
|
+
chi: "\u03C7",
|
|
1594
|
+
psi: "\u03C8",
|
|
1595
|
+
omega: "\u03C9",
|
|
1596
|
+
thetasym: "\u03D1",
|
|
1597
|
+
upsih: "\u03D2",
|
|
1598
|
+
piv: "\u03D6",
|
|
1599
|
+
bull: "\u2022",
|
|
1600
|
+
hellip: "\u2026",
|
|
1601
|
+
prime: "\u2032",
|
|
1602
|
+
Prime: "\u2033",
|
|
1603
|
+
oline: "\u203E",
|
|
1604
|
+
frasl: "\u2044",
|
|
1605
|
+
weierp: "\u2118",
|
|
1606
|
+
image: "\u2111",
|
|
1607
|
+
real: "\u211C",
|
|
1608
|
+
trade: "\u2122",
|
|
1609
|
+
alefsym: "\u2135",
|
|
1610
|
+
larr: "\u2190",
|
|
1611
|
+
uarr: "\u2191",
|
|
1612
|
+
rarr: "\u2192",
|
|
1613
|
+
darr: "\u2193",
|
|
1614
|
+
harr: "\u2194",
|
|
1615
|
+
crarr: "\u21B5",
|
|
1616
|
+
lArr: "\u21D0",
|
|
1617
|
+
uArr: "\u21D1",
|
|
1618
|
+
rArr: "\u21D2",
|
|
1619
|
+
dArr: "\u21D3",
|
|
1620
|
+
hArr: "\u21D4",
|
|
1621
|
+
forall: "\u2200",
|
|
1622
|
+
part: "\u2202",
|
|
1623
|
+
exist: "\u2203",
|
|
1624
|
+
empty: "\u2205",
|
|
1625
|
+
nabla: "\u2207",
|
|
1626
|
+
isin: "\u2208",
|
|
1627
|
+
notin: "\u2209",
|
|
1628
|
+
ni: "\u220B",
|
|
1629
|
+
prod: "\u220F",
|
|
1630
|
+
sum: "\u2211",
|
|
1631
|
+
minus: "\u2212",
|
|
1632
|
+
lowast: "\u2217",
|
|
1633
|
+
radic: "\u221A",
|
|
1634
|
+
prop: "\u221D",
|
|
1635
|
+
infin: "\u221E",
|
|
1636
|
+
ang: "\u2220",
|
|
1637
|
+
and: "\u2227",
|
|
1638
|
+
or: "\u2228",
|
|
1639
|
+
cap: "\u2229",
|
|
1640
|
+
cup: "\u222A",
|
|
1641
|
+
int: "\u222B",
|
|
1642
|
+
there4: "\u2234",
|
|
1643
|
+
sim: "\u223C",
|
|
1644
|
+
cong: "\u2245",
|
|
1645
|
+
asymp: "\u2248",
|
|
1646
|
+
ne: "\u2260",
|
|
1647
|
+
equiv: "\u2261",
|
|
1648
|
+
le: "\u2264",
|
|
1649
|
+
ge: "\u2265",
|
|
1650
|
+
sub: "\u2282",
|
|
1651
|
+
sup: "\u2283",
|
|
1652
|
+
nsub: "\u2284",
|
|
1653
|
+
sube: "\u2286",
|
|
1654
|
+
supe: "\u2287",
|
|
1655
|
+
oplus: "\u2295",
|
|
1656
|
+
otimes: "\u2297",
|
|
1657
|
+
perp: "\u22A5",
|
|
1658
|
+
sdot: "\u22C5",
|
|
1659
|
+
lceil: "\u2308",
|
|
1660
|
+
rceil: "\u2309",
|
|
1661
|
+
lfloor: "\u230A",
|
|
1662
|
+
rfloor: "\u230B",
|
|
1663
|
+
lang: "\u2329",
|
|
1664
|
+
rang: "\u232A",
|
|
1665
|
+
loz: "\u25CA",
|
|
1666
|
+
spades: "\u2660",
|
|
1667
|
+
clubs: "\u2663",
|
|
1668
|
+
hearts: "\u2665",
|
|
1669
|
+
diams: "\u2666",
|
|
1670
|
+
quot: '"',
|
|
1671
|
+
amp: "&",
|
|
1672
|
+
lt: "<",
|
|
1673
|
+
gt: ">",
|
|
1674
|
+
OElig: "\u0152",
|
|
1675
|
+
oelig: "\u0153",
|
|
1676
|
+
Scaron: "\u0160",
|
|
1677
|
+
scaron: "\u0161",
|
|
1678
|
+
Yuml: "\u0178",
|
|
1679
|
+
circ: "\u02C6",
|
|
1680
|
+
tilde: "\u02DC",
|
|
1681
|
+
ensp: "\u2002",
|
|
1682
|
+
emsp: "\u2003",
|
|
1683
|
+
thinsp: "\u2009",
|
|
1684
|
+
zwnj: "\u200C",
|
|
1685
|
+
zwj: "\u200D",
|
|
1686
|
+
lrm: "\u200E",
|
|
1687
|
+
rlm: "\u200F",
|
|
1688
|
+
ndash: "\u2013",
|
|
1689
|
+
mdash: "\u2014",
|
|
1690
|
+
lsquo: "\u2018",
|
|
1691
|
+
rsquo: "\u2019",
|
|
1692
|
+
sbquo: "\u201A",
|
|
1693
|
+
ldquo: "\u201C",
|
|
1694
|
+
rdquo: "\u201D",
|
|
1695
|
+
bdquo: "\u201E",
|
|
1696
|
+
dagger: "\u2020",
|
|
1697
|
+
Dagger: "\u2021",
|
|
1698
|
+
permil: "\u2030",
|
|
1699
|
+
lsaquo: "\u2039",
|
|
1700
|
+
rsaquo: "\u203A",
|
|
1701
|
+
euro: "\u20AC"
|
|
1702
|
+
};
|
|
1703
|
+
|
|
1704
|
+
// node_modules/stringify-entities/lib/constant/dangerous.js
|
|
1705
|
+
var dangerous = [
|
|
1706
|
+
"cent",
|
|
1707
|
+
"copy",
|
|
1708
|
+
"divide",
|
|
1709
|
+
"gt",
|
|
1710
|
+
"lt",
|
|
1711
|
+
"not",
|
|
1712
|
+
"para",
|
|
1713
|
+
"times"
|
|
1714
|
+
];
|
|
1715
|
+
|
|
1716
|
+
// node_modules/stringify-entities/lib/util/to-named.js
|
|
1717
|
+
var own2 = {}.hasOwnProperty;
|
|
1718
|
+
var characters = {};
|
|
1719
|
+
var key;
|
|
1720
|
+
for (key in characterEntitiesHtml4) {
|
|
1721
|
+
if (own2.call(characterEntitiesHtml4, key)) {
|
|
1722
|
+
characters[characterEntitiesHtml4[key]] = key;
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
var notAlphanumericRegex = /[^\dA-Za-z]/;
|
|
1726
|
+
function toNamed(code, next, omit, attribute) {
|
|
1727
|
+
const character = String.fromCharCode(code);
|
|
1728
|
+
if (own2.call(characters, character)) {
|
|
1729
|
+
const name = characters[character];
|
|
1730
|
+
const value = "&" + name;
|
|
1731
|
+
if (omit && characterEntitiesLegacy.includes(name) && !dangerous.includes(name) && (!attribute || next && next !== 61 && notAlphanumericRegex.test(String.fromCharCode(next)))) {
|
|
1732
|
+
return value;
|
|
1733
|
+
}
|
|
1734
|
+
return value + ";";
|
|
1735
|
+
}
|
|
1736
|
+
return "";
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
// node_modules/stringify-entities/lib/util/format-smart.js
|
|
1740
|
+
function formatSmart(code, next, options) {
|
|
1741
|
+
let numeric = toHexadecimal(code, next, options.omitOptionalSemicolons);
|
|
1742
|
+
let named;
|
|
1743
|
+
if (options.useNamedReferences || options.useShortestReferences) {
|
|
1744
|
+
named = toNamed(
|
|
1745
|
+
code,
|
|
1746
|
+
next,
|
|
1747
|
+
options.omitOptionalSemicolons,
|
|
1748
|
+
options.attribute
|
|
1749
|
+
);
|
|
1750
|
+
}
|
|
1751
|
+
if ((options.useShortestReferences || !named) && options.useShortestReferences) {
|
|
1752
|
+
const decimal = toDecimal(code, next, options.omitOptionalSemicolons);
|
|
1753
|
+
if (decimal.length < numeric.length) {
|
|
1754
|
+
numeric = decimal;
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
return named && (!options.useShortestReferences || named.length < numeric.length) ? named : numeric;
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
// node_modules/stringify-entities/lib/index.js
|
|
1761
|
+
function stringifyEntities(value, options) {
|
|
1762
|
+
return core(value, Object.assign({ format: formatSmart }, options));
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
// node_modules/hast-util-to-html/lib/handle/comment.js
|
|
1766
|
+
var htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g;
|
|
1767
|
+
var bogusCommentEntitySubset = [">"];
|
|
1768
|
+
var commentEntitySubset = ["<", ">"];
|
|
1769
|
+
function comment(node, _1, _2, state) {
|
|
1770
|
+
return state.settings.bogusComments ? "<?" + stringifyEntities(
|
|
1771
|
+
node.value,
|
|
1772
|
+
Object.assign({}, state.settings.characterReferences, {
|
|
1773
|
+
subset: bogusCommentEntitySubset
|
|
1774
|
+
})
|
|
1775
|
+
) + ">" : "<!--" + node.value.replace(htmlCommentRegex, encode) + "-->";
|
|
1776
|
+
function encode($0) {
|
|
1777
|
+
return stringifyEntities(
|
|
1778
|
+
$0,
|
|
1779
|
+
Object.assign({}, state.settings.characterReferences, {
|
|
1780
|
+
subset: commentEntitySubset
|
|
1781
|
+
})
|
|
1782
|
+
);
|
|
1783
|
+
}
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
// node_modules/hast-util-to-html/lib/handle/doctype.js
|
|
1787
|
+
function doctype(_1, _2, _3, state) {
|
|
1788
|
+
return "<!" + (state.settings.upperDoctype ? "DOCTYPE" : "doctype") + (state.settings.tightDoctype ? "" : " ") + "html>";
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
// node_modules/ccount/index.js
|
|
1792
|
+
function ccount(value, character) {
|
|
1793
|
+
const source = String(value);
|
|
1794
|
+
if (typeof character !== "string") {
|
|
1795
|
+
throw new TypeError("Expected character");
|
|
1796
|
+
}
|
|
1797
|
+
let count = 0;
|
|
1798
|
+
let index = source.indexOf(character);
|
|
1799
|
+
while (index !== -1) {
|
|
1800
|
+
count++;
|
|
1801
|
+
index = source.indexOf(character, index + character.length);
|
|
1802
|
+
}
|
|
1803
|
+
return count;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
// node_modules/comma-separated-tokens/index.js
|
|
1807
|
+
function stringify(values, options) {
|
|
1808
|
+
const settings = options || {};
|
|
1809
|
+
const input = values[values.length - 1] === "" ? [...values, ""] : values;
|
|
1810
|
+
return input.join(
|
|
1811
|
+
(settings.padRight ? " " : "") + "," + (settings.padLeft === false ? "" : " ")
|
|
1812
|
+
).trim();
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
// node_modules/space-separated-tokens/index.js
|
|
1816
|
+
function stringify2(values) {
|
|
1817
|
+
return values.join(" ").trim();
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
// node_modules/hast-util-whitespace/lib/index.js
|
|
1821
|
+
var re = /[ \t\n\f\r]/g;
|
|
1822
|
+
function whitespace(thing) {
|
|
1823
|
+
return typeof thing === "object" ? thing.type === "text" ? empty(thing.value) : false : empty(thing);
|
|
1824
|
+
}
|
|
1825
|
+
function empty(value) {
|
|
1826
|
+
return value.replace(re, "") === "";
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
// node_modules/hast-util-to-html/lib/omission/util/siblings.js
|
|
1830
|
+
var siblingAfter = siblings(1);
|
|
1831
|
+
var siblingBefore = siblings(-1);
|
|
1832
|
+
var emptyChildren = [];
|
|
1833
|
+
function siblings(increment2) {
|
|
1834
|
+
return sibling;
|
|
1835
|
+
function sibling(parent, index, includeWhitespace) {
|
|
1836
|
+
const siblings2 = parent ? parent.children : emptyChildren;
|
|
1837
|
+
let offset = (index || 0) + increment2;
|
|
1838
|
+
let next = siblings2[offset];
|
|
1839
|
+
if (!includeWhitespace) {
|
|
1840
|
+
while (next && whitespace(next)) {
|
|
1841
|
+
offset += increment2;
|
|
1842
|
+
next = siblings2[offset];
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
return next;
|
|
1846
|
+
}
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
// node_modules/hast-util-to-html/lib/omission/omission.js
|
|
1850
|
+
var own3 = {}.hasOwnProperty;
|
|
1851
|
+
function omission(handlers) {
|
|
1852
|
+
return omit;
|
|
1853
|
+
function omit(node, index, parent) {
|
|
1854
|
+
return own3.call(handlers, node.tagName) && handlers[node.tagName](node, index, parent);
|
|
1855
|
+
}
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
// node_modules/hast-util-to-html/lib/omission/closing.js
|
|
1859
|
+
var closing = omission({
|
|
1860
|
+
body,
|
|
1861
|
+
caption: headOrColgroupOrCaption,
|
|
1862
|
+
colgroup: headOrColgroupOrCaption,
|
|
1863
|
+
dd,
|
|
1864
|
+
dt,
|
|
1865
|
+
head: headOrColgroupOrCaption,
|
|
1866
|
+
html: html3,
|
|
1867
|
+
li,
|
|
1868
|
+
optgroup,
|
|
1869
|
+
option,
|
|
1870
|
+
p,
|
|
1871
|
+
rp: rubyElement,
|
|
1872
|
+
rt: rubyElement,
|
|
1873
|
+
tbody,
|
|
1874
|
+
td: cells,
|
|
1875
|
+
tfoot,
|
|
1876
|
+
th: cells,
|
|
1877
|
+
thead,
|
|
1878
|
+
tr
|
|
1879
|
+
});
|
|
1880
|
+
function headOrColgroupOrCaption(_2, index, parent) {
|
|
1881
|
+
const next = siblingAfter(parent, index, true);
|
|
1882
|
+
return !next || next.type !== "comment" && !(next.type === "text" && whitespace(next.value.charAt(0)));
|
|
1883
|
+
}
|
|
1884
|
+
function html3(_2, index, parent) {
|
|
1885
|
+
const next = siblingAfter(parent, index);
|
|
1886
|
+
return !next || next.type !== "comment";
|
|
1887
|
+
}
|
|
1888
|
+
function body(_2, index, parent) {
|
|
1889
|
+
const next = siblingAfter(parent, index);
|
|
1890
|
+
return !next || next.type !== "comment";
|
|
1891
|
+
}
|
|
1892
|
+
function p(_2, index, parent) {
|
|
1893
|
+
const next = siblingAfter(parent, index);
|
|
1894
|
+
return next ? next.type === "element" && (next.tagName === "address" || next.tagName === "article" || next.tagName === "aside" || next.tagName === "blockquote" || next.tagName === "details" || next.tagName === "div" || next.tagName === "dl" || next.tagName === "fieldset" || next.tagName === "figcaption" || next.tagName === "figure" || next.tagName === "footer" || next.tagName === "form" || next.tagName === "h1" || next.tagName === "h2" || next.tagName === "h3" || next.tagName === "h4" || next.tagName === "h5" || next.tagName === "h6" || next.tagName === "header" || next.tagName === "hgroup" || next.tagName === "hr" || next.tagName === "main" || next.tagName === "menu" || next.tagName === "nav" || next.tagName === "ol" || next.tagName === "p" || next.tagName === "pre" || next.tagName === "section" || next.tagName === "table" || next.tagName === "ul") : !parent || // Confusing parent.
|
|
1895
|
+
!(parent.type === "element" && (parent.tagName === "a" || parent.tagName === "audio" || parent.tagName === "del" || parent.tagName === "ins" || parent.tagName === "map" || parent.tagName === "noscript" || parent.tagName === "video"));
|
|
1896
|
+
}
|
|
1897
|
+
function li(_2, index, parent) {
|
|
1898
|
+
const next = siblingAfter(parent, index);
|
|
1899
|
+
return !next || next.type === "element" && next.tagName === "li";
|
|
1900
|
+
}
|
|
1901
|
+
function dt(_2, index, parent) {
|
|
1902
|
+
const next = siblingAfter(parent, index);
|
|
1903
|
+
return Boolean(
|
|
1904
|
+
next && next.type === "element" && (next.tagName === "dt" || next.tagName === "dd")
|
|
1905
|
+
);
|
|
1906
|
+
}
|
|
1907
|
+
function dd(_2, index, parent) {
|
|
1908
|
+
const next = siblingAfter(parent, index);
|
|
1909
|
+
return !next || next.type === "element" && (next.tagName === "dt" || next.tagName === "dd");
|
|
1910
|
+
}
|
|
1911
|
+
function rubyElement(_2, index, parent) {
|
|
1912
|
+
const next = siblingAfter(parent, index);
|
|
1913
|
+
return !next || next.type === "element" && (next.tagName === "rp" || next.tagName === "rt");
|
|
1914
|
+
}
|
|
1915
|
+
function optgroup(_2, index, parent) {
|
|
1916
|
+
const next = siblingAfter(parent, index);
|
|
1917
|
+
return !next || next.type === "element" && next.tagName === "optgroup";
|
|
1918
|
+
}
|
|
1919
|
+
function option(_2, index, parent) {
|
|
1920
|
+
const next = siblingAfter(parent, index);
|
|
1921
|
+
return !next || next.type === "element" && (next.tagName === "option" || next.tagName === "optgroup");
|
|
1922
|
+
}
|
|
1923
|
+
function thead(_2, index, parent) {
|
|
1924
|
+
const next = siblingAfter(parent, index);
|
|
1925
|
+
return Boolean(
|
|
1926
|
+
next && next.type === "element" && (next.tagName === "tbody" || next.tagName === "tfoot")
|
|
1927
|
+
);
|
|
1928
|
+
}
|
|
1929
|
+
function tbody(_2, index, parent) {
|
|
1930
|
+
const next = siblingAfter(parent, index);
|
|
1931
|
+
return !next || next.type === "element" && (next.tagName === "tbody" || next.tagName === "tfoot");
|
|
1932
|
+
}
|
|
1933
|
+
function tfoot(_2, index, parent) {
|
|
1934
|
+
return !siblingAfter(parent, index);
|
|
1935
|
+
}
|
|
1936
|
+
function tr(_2, index, parent) {
|
|
1937
|
+
const next = siblingAfter(parent, index);
|
|
1938
|
+
return !next || next.type === "element" && next.tagName === "tr";
|
|
1939
|
+
}
|
|
1940
|
+
function cells(_2, index, parent) {
|
|
1941
|
+
const next = siblingAfter(parent, index);
|
|
1942
|
+
return !next || next.type === "element" && (next.tagName === "td" || next.tagName === "th");
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
// node_modules/hast-util-to-html/lib/omission/opening.js
|
|
1946
|
+
var opening = omission({
|
|
1947
|
+
body: body2,
|
|
1948
|
+
colgroup,
|
|
1949
|
+
head,
|
|
1950
|
+
html: html4,
|
|
1951
|
+
tbody: tbody2
|
|
1952
|
+
});
|
|
1953
|
+
function html4(node) {
|
|
1954
|
+
const head2 = siblingAfter(node, -1);
|
|
1955
|
+
return !head2 || head2.type !== "comment";
|
|
1956
|
+
}
|
|
1957
|
+
function head(node) {
|
|
1958
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1959
|
+
for (const child2 of node.children) {
|
|
1960
|
+
if (child2.type === "element" && (child2.tagName === "base" || child2.tagName === "title")) {
|
|
1961
|
+
if (seen.has(child2.tagName)) return false;
|
|
1962
|
+
seen.add(child2.tagName);
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
const child = node.children[0];
|
|
1966
|
+
return !child || child.type === "element";
|
|
1967
|
+
}
|
|
1968
|
+
function body2(node) {
|
|
1969
|
+
const head2 = siblingAfter(node, -1, true);
|
|
1970
|
+
return !head2 || head2.type !== "comment" && !(head2.type === "text" && whitespace(head2.value.charAt(0))) && !(head2.type === "element" && (head2.tagName === "meta" || head2.tagName === "link" || head2.tagName === "script" || head2.tagName === "style" || head2.tagName === "template"));
|
|
1971
|
+
}
|
|
1972
|
+
function colgroup(node, index, parent) {
|
|
1973
|
+
const previous = siblingBefore(parent, index);
|
|
1974
|
+
const head2 = siblingAfter(node, -1, true);
|
|
1975
|
+
if (parent && previous && previous.type === "element" && previous.tagName === "colgroup" && closing(previous, parent.children.indexOf(previous), parent)) {
|
|
1976
|
+
return false;
|
|
1977
|
+
}
|
|
1978
|
+
return Boolean(head2 && head2.type === "element" && head2.tagName === "col");
|
|
1979
|
+
}
|
|
1980
|
+
function tbody2(node, index, parent) {
|
|
1981
|
+
const previous = siblingBefore(parent, index);
|
|
1982
|
+
const head2 = siblingAfter(node, -1);
|
|
1983
|
+
if (parent && previous && previous.type === "element" && (previous.tagName === "thead" || previous.tagName === "tbody") && closing(previous, parent.children.indexOf(previous), parent)) {
|
|
1984
|
+
return false;
|
|
1985
|
+
}
|
|
1986
|
+
return Boolean(head2 && head2.type === "element" && head2.tagName === "tr");
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
// node_modules/hast-util-to-html/lib/handle/element.js
|
|
1990
|
+
var constants = {
|
|
1991
|
+
// See: <https://html.spec.whatwg.org/#attribute-name-state>.
|
|
1992
|
+
name: [
|
|
1993
|
+
[" \n\f\r &/=>".split(""), " \n\f\r \"&'/=>`".split("")],
|
|
1994
|
+
[`\0
|
|
1995
|
+
\f\r "&'/<=>`.split(""), "\0 \n\f\r \"&'/<=>`".split("")]
|
|
1996
|
+
],
|
|
1997
|
+
// See: <https://html.spec.whatwg.org/#attribute-value-(unquoted)-state>.
|
|
1998
|
+
unquoted: [
|
|
1999
|
+
[" \n\f\r &>".split(""), "\0 \n\f\r \"&'<=>`".split("")],
|
|
2000
|
+
["\0 \n\f\r \"&'<=>`".split(""), "\0 \n\f\r \"&'<=>`".split("")]
|
|
2001
|
+
],
|
|
2002
|
+
// See: <https://html.spec.whatwg.org/#attribute-value-(single-quoted)-state>.
|
|
2003
|
+
single: [
|
|
2004
|
+
["&'".split(""), "\"&'`".split("")],
|
|
2005
|
+
["\0&'".split(""), "\0\"&'`".split("")]
|
|
2006
|
+
],
|
|
2007
|
+
// See: <https://html.spec.whatwg.org/#attribute-value-(double-quoted)-state>.
|
|
2008
|
+
double: [
|
|
2009
|
+
['"&'.split(""), "\"&'`".split("")],
|
|
2010
|
+
['\0"&'.split(""), "\0\"&'`".split("")]
|
|
2011
|
+
]
|
|
2012
|
+
};
|
|
2013
|
+
function element(node, index, parent, state) {
|
|
2014
|
+
const schema = state.schema;
|
|
2015
|
+
const omit = schema.space === "svg" ? false : state.settings.omitOptionalTags;
|
|
2016
|
+
let selfClosing = schema.space === "svg" ? state.settings.closeEmptyElements : state.settings.voids.includes(node.tagName.toLowerCase());
|
|
2017
|
+
const parts = [];
|
|
2018
|
+
let last;
|
|
2019
|
+
if (schema.space === "html" && node.tagName === "svg") {
|
|
2020
|
+
state.schema = svg2;
|
|
2021
|
+
}
|
|
2022
|
+
const attributes = serializeAttributes(state, node.properties);
|
|
2023
|
+
const content = state.all(
|
|
2024
|
+
schema.space === "html" && node.tagName === "template" ? node.content : node
|
|
2025
|
+
);
|
|
2026
|
+
state.schema = schema;
|
|
2027
|
+
if (content) selfClosing = false;
|
|
2028
|
+
if (attributes || !omit || !opening(node, index, parent)) {
|
|
2029
|
+
parts.push("<", node.tagName, attributes ? " " + attributes : "");
|
|
2030
|
+
if (selfClosing && (schema.space === "svg" || state.settings.closeSelfClosing)) {
|
|
2031
|
+
last = attributes.charAt(attributes.length - 1);
|
|
2032
|
+
if (!state.settings.tightSelfClosing || last === "/" || last && last !== '"' && last !== "'") {
|
|
2033
|
+
parts.push(" ");
|
|
2034
|
+
}
|
|
2035
|
+
parts.push("/");
|
|
2036
|
+
}
|
|
2037
|
+
parts.push(">");
|
|
2038
|
+
}
|
|
2039
|
+
parts.push(content);
|
|
2040
|
+
if (!selfClosing && (!omit || !closing(node, index, parent))) {
|
|
2041
|
+
parts.push("</" + node.tagName + ">");
|
|
2042
|
+
}
|
|
2043
|
+
return parts.join("");
|
|
2044
|
+
}
|
|
2045
|
+
function serializeAttributes(state, properties) {
|
|
2046
|
+
const values = [];
|
|
2047
|
+
let index = -1;
|
|
2048
|
+
let key2;
|
|
2049
|
+
if (properties) {
|
|
2050
|
+
for (key2 in properties) {
|
|
2051
|
+
if (properties[key2] !== null && properties[key2] !== void 0) {
|
|
2052
|
+
const value = serializeAttribute(state, key2, properties[key2]);
|
|
2053
|
+
if (value) values.push(value);
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
while (++index < values.length) {
|
|
2058
|
+
const last = state.settings.tightAttributes ? values[index].charAt(values[index].length - 1) : void 0;
|
|
2059
|
+
if (index !== values.length - 1 && last !== '"' && last !== "'") {
|
|
2060
|
+
values[index] += " ";
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
return values.join("");
|
|
2064
|
+
}
|
|
2065
|
+
function serializeAttribute(state, key2, value) {
|
|
2066
|
+
const info = find(state.schema, key2);
|
|
2067
|
+
const x2 = state.settings.allowParseErrors && state.schema.space === "html" ? 0 : 1;
|
|
2068
|
+
const y2 = state.settings.allowDangerousCharacters ? 0 : 1;
|
|
2069
|
+
let quote = state.quote;
|
|
2070
|
+
let result;
|
|
2071
|
+
if (info.overloadedBoolean && (value === info.attribute || value === "")) {
|
|
2072
|
+
value = true;
|
|
2073
|
+
} else if ((info.boolean || info.overloadedBoolean) && (typeof value !== "string" || value === info.attribute || value === "")) {
|
|
2074
|
+
value = Boolean(value);
|
|
2075
|
+
}
|
|
2076
|
+
if (value === null || value === void 0 || value === false || typeof value === "number" && Number.isNaN(value)) {
|
|
2077
|
+
return "";
|
|
2078
|
+
}
|
|
2079
|
+
const name = stringifyEntities(
|
|
2080
|
+
info.attribute,
|
|
2081
|
+
Object.assign({}, state.settings.characterReferences, {
|
|
2082
|
+
// Always encode without parse errors in non-HTML.
|
|
2083
|
+
subset: constants.name[x2][y2]
|
|
2084
|
+
})
|
|
2085
|
+
);
|
|
2086
|
+
if (value === true) return name;
|
|
2087
|
+
value = Array.isArray(value) ? (info.commaSeparated ? stringify : stringify2)(value, {
|
|
2088
|
+
padLeft: !state.settings.tightCommaSeparatedLists
|
|
2089
|
+
}) : String(value);
|
|
2090
|
+
if (state.settings.collapseEmptyAttributes && !value) return name;
|
|
2091
|
+
if (state.settings.preferUnquoted) {
|
|
2092
|
+
result = stringifyEntities(
|
|
2093
|
+
value,
|
|
2094
|
+
Object.assign({}, state.settings.characterReferences, {
|
|
2095
|
+
attribute: true,
|
|
2096
|
+
subset: constants.unquoted[x2][y2]
|
|
2097
|
+
})
|
|
2098
|
+
);
|
|
2099
|
+
}
|
|
2100
|
+
if (result !== value) {
|
|
2101
|
+
if (state.settings.quoteSmart && ccount(value, quote) > ccount(value, state.alternative)) {
|
|
2102
|
+
quote = state.alternative;
|
|
2103
|
+
}
|
|
2104
|
+
result = quote + stringifyEntities(
|
|
2105
|
+
value,
|
|
2106
|
+
Object.assign({}, state.settings.characterReferences, {
|
|
2107
|
+
// Always encode without parse errors in non-HTML.
|
|
2108
|
+
subset: (quote === "'" ? constants.single : constants.double)[x2][y2],
|
|
2109
|
+
attribute: true
|
|
2110
|
+
})
|
|
2111
|
+
) + quote;
|
|
2112
|
+
}
|
|
2113
|
+
return name + (result ? "=" + result : result);
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
// node_modules/hast-util-to-html/lib/handle/text.js
|
|
2117
|
+
var textEntitySubset = ["<", "&"];
|
|
2118
|
+
function text(node, _2, parent, state) {
|
|
2119
|
+
return parent && parent.type === "element" && (parent.tagName === "script" || parent.tagName === "style") ? node.value : stringifyEntities(
|
|
2120
|
+
node.value,
|
|
2121
|
+
Object.assign({}, state.settings.characterReferences, {
|
|
2122
|
+
subset: textEntitySubset
|
|
2123
|
+
})
|
|
2124
|
+
);
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
// node_modules/hast-util-to-html/lib/handle/raw.js
|
|
2128
|
+
function raw(node, index, parent, state) {
|
|
2129
|
+
return state.settings.allowDangerousHtml ? node.value : text(node, index, parent, state);
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
// node_modules/hast-util-to-html/lib/handle/root.js
|
|
2133
|
+
function root(node, _1, _2, state) {
|
|
2134
|
+
return state.all(node);
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
// node_modules/hast-util-to-html/lib/handle/index.js
|
|
2138
|
+
var handle = zwitch("type", {
|
|
2139
|
+
invalid,
|
|
2140
|
+
unknown,
|
|
2141
|
+
handlers: { comment, doctype, element, raw, root, text }
|
|
2142
|
+
});
|
|
2143
|
+
function invalid(node) {
|
|
2144
|
+
throw new Error("Expected node, not `" + node + "`");
|
|
2145
|
+
}
|
|
2146
|
+
function unknown(node_) {
|
|
2147
|
+
const node = (
|
|
2148
|
+
/** @type {Nodes} */
|
|
2149
|
+
node_
|
|
2150
|
+
);
|
|
2151
|
+
throw new Error("Cannot compile unknown node `" + node.type + "`");
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2154
|
+
// node_modules/hast-util-to-html/lib/index.js
|
|
2155
|
+
var emptyOptions = {};
|
|
2156
|
+
var emptyCharacterReferences = {};
|
|
2157
|
+
var emptyChildren2 = [];
|
|
2158
|
+
function toHtml(tree, options) {
|
|
2159
|
+
const options_ = options || emptyOptions;
|
|
2160
|
+
const quote = options_.quote || '"';
|
|
2161
|
+
const alternative = quote === '"' ? "'" : '"';
|
|
2162
|
+
if (quote !== '"' && quote !== "'") {
|
|
2163
|
+
throw new Error("Invalid quote `" + quote + "`, expected `'` or `\"`");
|
|
2164
|
+
}
|
|
2165
|
+
const state = {
|
|
2166
|
+
one,
|
|
2167
|
+
all,
|
|
2168
|
+
settings: {
|
|
2169
|
+
omitOptionalTags: options_.omitOptionalTags || false,
|
|
2170
|
+
allowParseErrors: options_.allowParseErrors || false,
|
|
2171
|
+
allowDangerousCharacters: options_.allowDangerousCharacters || false,
|
|
2172
|
+
quoteSmart: options_.quoteSmart || false,
|
|
2173
|
+
preferUnquoted: options_.preferUnquoted || false,
|
|
2174
|
+
tightAttributes: options_.tightAttributes || false,
|
|
2175
|
+
upperDoctype: options_.upperDoctype || false,
|
|
2176
|
+
tightDoctype: options_.tightDoctype || false,
|
|
2177
|
+
bogusComments: options_.bogusComments || false,
|
|
2178
|
+
tightCommaSeparatedLists: options_.tightCommaSeparatedLists || false,
|
|
2179
|
+
tightSelfClosing: options_.tightSelfClosing || false,
|
|
2180
|
+
collapseEmptyAttributes: options_.collapseEmptyAttributes || false,
|
|
2181
|
+
allowDangerousHtml: options_.allowDangerousHtml || false,
|
|
2182
|
+
voids: options_.voids || htmlVoidElements,
|
|
2183
|
+
characterReferences: options_.characterReferences || emptyCharacterReferences,
|
|
2184
|
+
closeSelfClosing: options_.closeSelfClosing || false,
|
|
2185
|
+
closeEmptyElements: options_.closeEmptyElements || false
|
|
2186
|
+
},
|
|
2187
|
+
schema: options_.space === "svg" ? svg2 : html2,
|
|
2188
|
+
quote,
|
|
2189
|
+
alternative
|
|
2190
|
+
};
|
|
2191
|
+
return state.one(
|
|
2192
|
+
Array.isArray(tree) ? { type: "root", children: tree } : tree,
|
|
2193
|
+
void 0,
|
|
2194
|
+
void 0
|
|
2195
|
+
);
|
|
2196
|
+
}
|
|
2197
|
+
function one(node, index, parent) {
|
|
2198
|
+
return handle(node, index, parent, this);
|
|
2199
|
+
}
|
|
2200
|
+
function all(parent) {
|
|
2201
|
+
const results = [];
|
|
2202
|
+
const children = parent && parent.children || emptyChildren2;
|
|
2203
|
+
let index = -1;
|
|
2204
|
+
while (++index < children.length) {
|
|
2205
|
+
results[index] = this.one(children[index], index, parent);
|
|
2206
|
+
}
|
|
2207
|
+
return results.join("");
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
// src/transformer.ts
|
|
2211
|
+
var ALGORITHM = "aes-256-gcm";
|
|
2212
|
+
var KEY_LENGTH = 32;
|
|
2213
|
+
var IV_LENGTH = 12;
|
|
2214
|
+
var SALT_LENGTH = 16;
|
|
2215
|
+
var AUTH_TAG_LENGTH = 16;
|
|
2216
|
+
var defaultOptions = {
|
|
2217
|
+
iterations: 6e5,
|
|
2218
|
+
passwordField: "password",
|
|
2219
|
+
unlistWhenEncrypted: false
|
|
2220
|
+
};
|
|
2221
|
+
function encryptAesGcm(plaintext, password, iterations) {
|
|
2222
|
+
const salt = crypto.randomBytes(SALT_LENGTH);
|
|
2223
|
+
const iv = crypto.randomBytes(IV_LENGTH);
|
|
2224
|
+
const key2 = crypto.pbkdf2Sync(password, salt, iterations, KEY_LENGTH, "sha256");
|
|
2225
|
+
const cipher = crypto.createCipheriv(ALGORITHM, key2, iv);
|
|
2226
|
+
const encrypted = Buffer.concat([cipher.update(plaintext, "utf8"), cipher.final()]);
|
|
2227
|
+
const authTag = cipher.getAuthTag();
|
|
2228
|
+
const result = Buffer.concat([salt, iv, authTag, encrypted]);
|
|
2229
|
+
return result.toString("base64");
|
|
2230
|
+
}
|
|
2231
|
+
function decrypt(encryptedBase64, password, iterations) {
|
|
2232
|
+
const buffer = Buffer.from(encryptedBase64, "base64");
|
|
2233
|
+
const salt = buffer.subarray(0, SALT_LENGTH);
|
|
2234
|
+
const iv = buffer.subarray(SALT_LENGTH, SALT_LENGTH + IV_LENGTH);
|
|
2235
|
+
const authTag = buffer.subarray(
|
|
2236
|
+
SALT_LENGTH + IV_LENGTH,
|
|
2237
|
+
SALT_LENGTH + IV_LENGTH + AUTH_TAG_LENGTH
|
|
2238
|
+
);
|
|
2239
|
+
const ciphertext = buffer.subarray(SALT_LENGTH + IV_LENGTH + AUTH_TAG_LENGTH);
|
|
2240
|
+
const key2 = crypto.pbkdf2Sync(password, salt, iterations, KEY_LENGTH, "sha256");
|
|
2241
|
+
const decipher = crypto.createDecipheriv(ALGORITHM, key2, iv);
|
|
2242
|
+
decipher.setAuthTag(authTag);
|
|
2243
|
+
return decipher.update(ciphertext, void 0, "utf8") + decipher.final("utf8");
|
|
2244
|
+
}
|
|
2245
|
+
var rehypeEncryptedPages = (options) => {
|
|
2246
|
+
return () => (tree, file) => {
|
|
2247
|
+
const frontmatter = file.data?.frontmatter ?? {};
|
|
2248
|
+
const password = frontmatter[options.passwordField];
|
|
2249
|
+
if (typeof password !== "string" || password.length === 0) {
|
|
2250
|
+
return;
|
|
2251
|
+
}
|
|
2252
|
+
const html5 = toHtml(tree, { allowDangerousHtml: true });
|
|
2253
|
+
const encryptedData = encryptAesGcm(html5, password, options.iterations);
|
|
2254
|
+
const encryptedContainer = {
|
|
2255
|
+
type: "element",
|
|
2256
|
+
tagName: "div",
|
|
2257
|
+
properties: {
|
|
2258
|
+
className: ["encrypted-page", "popover-hint"],
|
|
2259
|
+
"data-encrypted": encryptedData,
|
|
2260
|
+
"data-iterations": String(options.iterations)
|
|
2261
|
+
},
|
|
2262
|
+
children: []
|
|
2263
|
+
};
|
|
2264
|
+
tree.children = [encryptedContainer];
|
|
2265
|
+
const data = file.data;
|
|
2266
|
+
data.encrypted = true;
|
|
2267
|
+
data.text = "";
|
|
2268
|
+
data.description = "";
|
|
2269
|
+
const frontmatterUnlisted = frontmatter.unlisted;
|
|
2270
|
+
if (typeof frontmatterUnlisted === "boolean") {
|
|
2271
|
+
data.unlisted = frontmatterUnlisted;
|
|
2272
|
+
} else if (options.unlistWhenEncrypted) {
|
|
2273
|
+
data.unlisted = true;
|
|
2274
|
+
}
|
|
2275
|
+
if (frontmatter.stealth === true) {
|
|
2276
|
+
data.stealth = true;
|
|
2277
|
+
data.unlisted = true;
|
|
2278
|
+
}
|
|
2279
|
+
};
|
|
2280
|
+
};
|
|
2281
|
+
var EncryptedPages = (userOptions) => {
|
|
2282
|
+
const options = { ...defaultOptions, ...userOptions };
|
|
2283
|
+
return {
|
|
2284
|
+
name: "EncryptedPages",
|
|
2285
|
+
htmlPlugins() {
|
|
2286
|
+
return [rehypeEncryptedPages(options)];
|
|
2287
|
+
}
|
|
2288
|
+
};
|
|
2289
|
+
};
|
|
2290
|
+
|
|
2291
|
+
// node_modules/@quartz-community/types/dist/index.js
|
|
2292
|
+
function joinSegments(...segments) {
|
|
2293
|
+
return segments.filter((segment) => segment.length > 0).join("/").replace(/\/+/g, "/");
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
// src/emitter.ts
|
|
2297
|
+
var SHADOW_INDEX_VERSION = 1;
|
|
2298
|
+
var defaultOptions2 = {
|
|
2299
|
+
outputPath: "static/encryptedContentIndex.json",
|
|
2300
|
+
passwordField: "password"
|
|
2301
|
+
};
|
|
2302
|
+
function buildShadowEntry(data) {
|
|
2303
|
+
const slug = data.slug;
|
|
2304
|
+
if (typeof slug !== "string" || slug.length === 0) return null;
|
|
2305
|
+
const frontmatter = data.frontmatter ?? {};
|
|
2306
|
+
const title = typeof frontmatter.title === "string" ? frontmatter.title : "";
|
|
2307
|
+
const tags = Array.isArray(frontmatter.tags) ? frontmatter.tags.filter((t2) => typeof t2 === "string") : [];
|
|
2308
|
+
const links = Array.isArray(data.links) ? data.links.filter((l2) => typeof l2 === "string") : [];
|
|
2309
|
+
const filePath = typeof data.relativePath === "string" ? data.relativePath : "";
|
|
2310
|
+
return {
|
|
2311
|
+
slug,
|
|
2312
|
+
entry: {
|
|
2313
|
+
slug,
|
|
2314
|
+
filePath,
|
|
2315
|
+
title,
|
|
2316
|
+
links,
|
|
2317
|
+
tags,
|
|
2318
|
+
content: "",
|
|
2319
|
+
description: ""
|
|
2320
|
+
}
|
|
2321
|
+
};
|
|
2322
|
+
}
|
|
2323
|
+
var EncryptedContentIndex = (userOptions) => {
|
|
2324
|
+
const options = { ...defaultOptions2, ...userOptions };
|
|
2325
|
+
const emitAll = async (ctx, content) => {
|
|
2326
|
+
const passwordField = options.passwordField;
|
|
2327
|
+
const entries = [];
|
|
2328
|
+
for (const [tree, file] of content) {
|
|
2329
|
+
const data = file.data ?? {};
|
|
2330
|
+
if (data.encrypted !== true) continue;
|
|
2331
|
+
if (data.unlisted !== true) continue;
|
|
2332
|
+
if (data.stealth === true) continue;
|
|
2333
|
+
const frontmatter = data.frontmatter ?? {};
|
|
2334
|
+
const password = frontmatter[passwordField];
|
|
2335
|
+
if (typeof password !== "string" || password.length === 0) continue;
|
|
2336
|
+
const iterations = extractIterationsFromTree(tree);
|
|
2337
|
+
const shadowEntry = buildShadowEntry(data);
|
|
2338
|
+
if (!shadowEntry) continue;
|
|
2339
|
+
const plaintext = JSON.stringify(shadowEntry);
|
|
2340
|
+
const ciphertext = encryptAesGcm(plaintext, password, iterations);
|
|
2341
|
+
entries.push({ ciphertext, iterations });
|
|
2342
|
+
}
|
|
2343
|
+
const shadowFile = {
|
|
2344
|
+
version: SHADOW_INDEX_VERSION,
|
|
2345
|
+
entries
|
|
2346
|
+
};
|
|
2347
|
+
const outputPath = joinSegments(ctx.argv.output, options.outputPath);
|
|
2348
|
+
const dir = path.dirname(outputPath);
|
|
2349
|
+
await fs.mkdir(dir, { recursive: true });
|
|
2350
|
+
await fs.writeFile(outputPath, JSON.stringify(shadowFile));
|
|
2351
|
+
return [outputPath];
|
|
2352
|
+
};
|
|
2353
|
+
return {
|
|
2354
|
+
name: "EncryptedContentIndex",
|
|
2355
|
+
emit: emitAll,
|
|
2356
|
+
partialEmit: emitAll
|
|
2357
|
+
};
|
|
2358
|
+
};
|
|
2359
|
+
function extractIterationsFromTree(tree) {
|
|
2360
|
+
for (const child of tree.children ?? []) {
|
|
2361
|
+
if (child.type !== "element") continue;
|
|
2362
|
+
const el = child;
|
|
2363
|
+
const props = el.properties ?? {};
|
|
2364
|
+
const dataIterations = props["data-iterations"];
|
|
2365
|
+
if (typeof dataIterations === "string") {
|
|
2366
|
+
const parsed = parseInt(dataIterations, 10);
|
|
2367
|
+
if (!Number.isNaN(parsed) && parsed > 0) return parsed;
|
|
2368
|
+
}
|
|
2369
|
+
if (typeof dataIterations === "number" && dataIterations > 0) return dataIterations;
|
|
2370
|
+
}
|
|
2371
|
+
return 6e5;
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
// src/components/styles/encrypted.scss
|
|
2375
|
+
var encrypted_default = ".encrypted-page {\n display: flex;\n align-items: center;\n justify-content: center;\n min-height: 300px;\n padding: 2rem;\n}\n\n.encrypted-page-form {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n max-width: 400px;\n width: 100%;\n text-align: center;\n}\n\n.encrypted-page-icon {\n color: var(--gray, #6b7280);\n opacity: 0.6;\n}\n\n.encrypted-page-label {\n color: var(--darkgray, #4b5563);\n font-size: 0.95rem;\n margin: 0;\n line-height: 1.5;\n}\n\n.encrypted-page-input-row {\n display: flex;\n gap: 0.5rem;\n width: 100%;\n}\n\n.encrypted-page-input {\n flex: 1;\n padding: 0.5rem 0.75rem;\n border: 1px solid var(--lightgray, #d1d5db);\n border-radius: 4px;\n font-size: 0.9rem;\n font-family: inherit;\n background: var(--light, #fff);\n color: var(--dark, #111);\n outline: none;\n transition: border-color 0.15s ease;\n}\n.encrypted-page-input:focus {\n border-color: var(--secondary, #3b82f6);\n}\n.encrypted-page-input:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.encrypted-page-submit {\n padding: 0.5rem 1.25rem;\n border: none;\n border-radius: 4px;\n font-size: 0.9rem;\n font-family: inherit;\n font-weight: 600;\n cursor: pointer;\n background: var(--secondary, #3b82f6);\n color: var(--light, #fff);\n transition: background 0.15s ease, opacity 0.15s ease;\n white-space: nowrap;\n}\n.encrypted-page-submit:hover:not(:disabled) {\n opacity: 0.9;\n}\n.encrypted-page-submit:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n\n.encrypted-page-error {\n color: var(--red, #dc2626);\n font-size: 0.85rem;\n margin: 0;\n}";
|
|
2376
|
+
|
|
2377
|
+
// src/components/scripts/encrypted.inline.ts
|
|
2378
|
+
var encrypted_inline_default = `var S="encrypted-pages-passwords",m="encrypted-pages:decryptedShadowEntries";function v(t){let e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}async function b(t,e,n){let r=new TextEncoder,o=await window.crypto.subtle.importKey("raw",r.encode(t),"PBKDF2",!1,["deriveKey"]);return window.crypto.subtle.deriveKey({name:"PBKDF2",salt:e,iterations:n,hash:"SHA-256"},o,{name:"AES-GCM",length:256},!1,["decrypt"])}async function T(t,e,n){let r=v(t),o=r.slice(0,16),i=r.slice(16,28),c=r.slice(28,44),a=r.slice(44),s=new Uint8Array(a.length+c.length);s.set(a,0),s.set(c,a.length);let d=await b(e,o,n),l=await window.crypto.subtle.decrypt({name:"AES-GCM",iv:i},d,s);return new TextDecoder().decode(l)}function h(){try{let t=sessionStorage.getItem(S);if(!t)return[];let e=JSON.parse(t);return Array.isArray(e)?e:[]}catch{return[]}}function A(t){let e=h();e.includes(t)||(e.push(t),sessionStorage.setItem(S,JSON.stringify(e)))}function L(){try{let t=sessionStorage.getItem(m);if(!t)return{};let e=JSON.parse(t);return e&&typeof e=="object"?e:{}}catch{return{}}}function N(t){try{sessionStorage.setItem(m,JSON.stringify(t))}catch{}}function I(t,e){let n=t.querySelector(".encrypted-page-error");n&&(n.textContent=e,n.style.display="block")}function _(t){let e=t.querySelector(".encrypted-page-error");e&&(e.style.display="none",e.textContent="")}function w(t,e){let n=t.querySelector(".encrypted-page-submit"),r=t.querySelector(".encrypted-page-input");n&&(n.disabled=e,n.textContent=e?"Decrypting\\u2026":"Unlock"),r&&(r.disabled=e)}function x(){let t=document.querySelectorAll("script");for(let e of t){let r=(e.textContent??"").match(/fetch\\(["']([^"']+contentIndex\\.json)["']\\)/);if(r)return r[1].replace(/contentIndex\\.json$/,"encryptedContentIndex.json")}return new URL("static/encryptedContentIndex.json",document.baseURI).toString()}var p=null;async function H(){if(p)return p;let t=x();return p=fetch(t).then(e=>{if(!e.ok)throw new Error(\`shadow index HTTP \${e.status}\`);return e.json()}).then(e=>!e||e.version!==1||!Array.isArray(e.entries)?{version:1,entries:[]}:e).catch(()=>({version:1,entries:[]})),p}async function D(t,e,n){let r={},o={...n},i=!1;for(let c=0;c<t.entries.length;c++){let a=String(c);if(n[a]){let d=n[a];d&&d.slug&&(r[d.slug]=d.entry);continue}let s=t.entries[c];if(!(!s||typeof s.ciphertext!="string"))for(let d of e)try{let l=await T(s.ciphertext,d,s.iterations),u=JSON.parse(l);u&&typeof u.slug=="string"&&u.entry&&(r[u.slug]=u.entry,o[a]=u,i=!0);break}catch{}}return i&&N(o),r}async function G(t){let e=Object.keys(t);if(e.length!==0){try{let n=await(typeof fetchData<"u"?fetchData:Promise.resolve(null));if(!n||typeof n!="object")return;let r=n.content&&typeof n.content=="object"?n.content:n;for(let o of e)o in r||(r[o]=t[o])}catch{return}document.dispatchEvent(new CustomEvent("content-index-updated",{detail:{slugs:e}})),document.dispatchEvent(new CustomEvent("render"))}}var y=!1;async function f(){if(y)return;let t=h();if(t.length!==0){y=!0;try{let e=await H();if(!e.entries||e.entries.length===0)return;let n=L(),r=await D(e,t,n);await G(r)}finally{y=!1}}}async function E(t,e){let n=t.getAttribute("data-encrypted"),r=parseInt(t.getAttribute("data-iterations")||"600000",10);if(!n)return!1;try{let o=await T(n,e,r);if(t.parentElement){let c=document.createElement("div");c.innerHTML=o,t.replaceWith(...c.childNodes)}return A(e),document.dispatchEvent(new CustomEvent("render")),f(),!0}catch{return!1}}function g(){let t=document.querySelectorAll(".encrypted-page");if(t.length===0){f();return}for(let e of t){if(e.querySelector(".encrypted-page-form")||!e.getAttribute("data-encrypted"))continue;let r=document.createElement("div");r.className="encrypted-page-form",r.innerHTML=['<div class="encrypted-page-icon" aria-hidden="true">','<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">','<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect>','<path d="M7 11V7a5 5 0 0 1 10 0v4"></path>',"</svg>","</div>",'<p class="encrypted-page-label">This page is encrypted. Enter the password to view its content.</p>','<div class="encrypted-page-input-row">','<input type="password" class="encrypted-page-input" placeholder="Password" autocomplete="off" />','<button type="button" class="encrypted-page-submit">Unlock</button>',"</div>",'<p class="encrypted-page-error" style="display:none"></p>'].join(""),e.appendChild(r);let o=r.querySelector(".encrypted-page-input"),i=r.querySelector(".encrypted-page-submit");async function c(){let s=o?.value;if(!s)return;_(e),w(e,!0),await E(e,s)||(w(e,!1),I(e,"Incorrect password. Please try again."),o&&(o.value="",o.focus()))}i&&i.addEventListener("click",c),o&&o.addEventListener("keydown",s=>{s.key==="Enter"&&(s.preventDefault(),c())});let a=h();a.length>0&&(async()=>{for(let s of a)if(await E(e,s))return})()}f()}document.addEventListener("nav",()=>{g()});document.addEventListener("render",()=>{document.querySelectorAll(".encrypted-page").length>0&&g()});var C=new MutationObserver(t=>{for(let e of t)for(let n of e.addedNodes){if(!(n instanceof HTMLElement))continue;if((n.classList?.contains("encrypted-page")?[n]:[...n.querySelectorAll(".encrypted-page")]).filter(i=>!i.querySelector(".encrypted-page-form")).length>0){g();return}}});C.observe(document.body,{childList:!0,subtree:!0});
|
|
2379
|
+
`;
|
|
2380
|
+
var l;
|
|
2381
|
+
l = { __e: function(n2, l2, u3, t2) {
|
|
2382
|
+
for (var i2, r2, o2; l2 = l2.__; ) if ((i2 = l2.__c) && !i2.__) try {
|
|
2383
|
+
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;
|
|
2384
|
+
} catch (l3) {
|
|
2385
|
+
n2 = l3;
|
|
2386
|
+
}
|
|
2387
|
+
throw n2;
|
|
2388
|
+
} }, "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Math.random().toString(8);
|
|
2389
|
+
|
|
2390
|
+
// node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs
|
|
2391
|
+
var f2 = 0;
|
|
2392
|
+
function u2(e2, t2, n2, o2, i2, u3) {
|
|
2393
|
+
t2 || (t2 = {});
|
|
2394
|
+
var a2, c2, p3 = t2;
|
|
2395
|
+
if ("ref" in p3) for (c2 in p3 = {}, t2) "ref" == c2 ? a2 = t2[c2] : p3[c2] = t2[c2];
|
|
2396
|
+
var l2 = { type: e2, props: p3, 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 };
|
|
2397
|
+
return l.vnode && l.vnode(l2), l2;
|
|
2398
|
+
}
|
|
2399
|
+
|
|
2400
|
+
// src/components/EncryptedPage.tsx
|
|
2401
|
+
var EncryptedPage_default = ((opts) => {
|
|
2402
|
+
const { className = "encrypted-page-wrapper" } = opts ?? {};
|
|
2403
|
+
const Component = (_props) => {
|
|
2404
|
+
return /* @__PURE__ */ u2("div", { class: className });
|
|
2405
|
+
};
|
|
2406
|
+
Component.css = encrypted_default;
|
|
2407
|
+
Component.afterDOMLoaded = encrypted_inline_default;
|
|
2408
|
+
return Component;
|
|
2409
|
+
});
|
|
2410
|
+
|
|
2411
|
+
export { EncryptedContentIndex, EncryptedPage_default as EncryptedPage, EncryptedPages, SHADOW_INDEX_VERSION, decrypt, encryptAesGcm };
|
|
2412
|
+
//# sourceMappingURL=index.js.map
|
|
2413
|
+
//# sourceMappingURL=index.js.map
|