Upload 7 files
Browse files- .gitignore +1 -0
- index.js +344 -0
- minify.js +133 -0
- package-lock.json +1350 -0
- package.json +23 -0
- public/index.html +461 -0
- removeMedia.js +57 -0
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
node_modules
|
index.js
ADDED
@@ -0,0 +1,344 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
const express = require('express');
|
2 |
+
const bodyParser = require('body-parser');
|
3 |
+
const multer = require('multer');
|
4 |
+
const cheerio = require('cheerio');
|
5 |
+
const { minifyHtml } = require('./minify');
|
6 |
+
const { removeMedia } = require('./removeMedia');
|
7 |
+
|
8 |
+
const app = express();
|
9 |
+
const upload = multer();
|
10 |
+
|
11 |
+
app.use(express.static('public'));
|
12 |
+
app.use(bodyParser.json());
|
13 |
+
app.use(bodyParser.urlencoded({ extended: true }));
|
14 |
+
|
15 |
+
function compressHtmlForLlm(html, options = {}) {
|
16 |
+
const operationStatus = {
|
17 |
+
minification: { success: false, error: null },
|
18 |
+
cheerioLoad: { success: false, error: null },
|
19 |
+
headCleaning: { success: false, error: null },
|
20 |
+
scriptRemoval: { success: false, error: null },
|
21 |
+
styleRemoval: { success: false, error: null },
|
22 |
+
mediaRemoval: { success: false, error: null },
|
23 |
+
repeatingElements: { success: false, error: null },
|
24 |
+
textTruncation: { success: false, error: null }
|
25 |
+
};
|
26 |
+
|
27 |
+
let processed = html;
|
28 |
+
let $ = null;
|
29 |
+
|
30 |
+
// Step 1: Minification
|
31 |
+
if (options.minifyHtml) {
|
32 |
+
const minifyResult = minifyHtml(html, {
|
33 |
+
removeScripts: options.removeScripts,
|
34 |
+
removeStyles: options.removeStyles
|
35 |
+
});
|
36 |
+
|
37 |
+
if (minifyResult.success) {
|
38 |
+
processed = minifyResult.minifiedHtml;
|
39 |
+
operationStatus.minification = { success: true, error: null };
|
40 |
+
} else {
|
41 |
+
operationStatus.minification = {
|
42 |
+
success: false,
|
43 |
+
error: minifyResult.error?.message || 'Minification failed'
|
44 |
+
};
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
+
// Step 2: Load with Cheerio
|
49 |
+
try {
|
50 |
+
$ = cheerio.load(processed, {
|
51 |
+
decodeEntities: false,
|
52 |
+
xmlMode: false,
|
53 |
+
lowerCaseTags: true
|
54 |
+
});
|
55 |
+
operationStatus.cheerioLoad.success = true;
|
56 |
+
} catch (err) {
|
57 |
+
operationStatus.cheerioLoad.error = err.message.substring(0, 100);
|
58 |
+
console.error('Cheerio load failed:', err);
|
59 |
+
return { html: processed, status: operationStatus };
|
60 |
+
}
|
61 |
+
|
62 |
+
// Step 3: Remove scripts
|
63 |
+
if (options.removeScripts) {
|
64 |
+
try {
|
65 |
+
$('script').remove();
|
66 |
+
operationStatus.scriptRemoval.success = true;
|
67 |
+
} catch (err) {
|
68 |
+
operationStatus.scriptRemoval.error = err.message.substring(0, 100);
|
69 |
+
console.warn('Script removal failed:', err);
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
// Step 4: Remove styles
|
74 |
+
if (options.removeStyles) {
|
75 |
+
try {
|
76 |
+
$('style').remove();
|
77 |
+
$('link[rel="stylesheet"]').remove();
|
78 |
+
operationStatus.styleRemoval.success = true;
|
79 |
+
} catch (err) {
|
80 |
+
operationStatus.styleRemoval.error = err.message.substring(0, 100);
|
81 |
+
console.warn('Style removal failed:', err);
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
|
86 |
+
// Step 5: Remove media
|
87 |
+
if (options.removeMedia) {
|
88 |
+
try {
|
89 |
+
const mediaResult = removeMedia($);
|
90 |
+
if (mediaResult.success) {
|
91 |
+
operationStatus.mediaRemoval.success = true;
|
92 |
+
} else {
|
93 |
+
operationStatus.mediaRemoval.error = mediaResult.error.substring(0, 100);
|
94 |
+
console.warn('Media removal failed:', mediaResult.error);
|
95 |
+
}
|
96 |
+
} catch (err) {
|
97 |
+
operationStatus.mediaRemoval.error = err.message.substring(0, 100);
|
98 |
+
console.warn('Media removal failed:', err);
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
// Step 5: Clean head
|
103 |
+
if (options.cleanHead) {
|
104 |
+
try {
|
105 |
+
cleanHead($);
|
106 |
+
operationStatus.headCleaning.success = true;
|
107 |
+
} catch (err) {
|
108 |
+
operationStatus.headCleaning.error = err.message.substring(0, 100);
|
109 |
+
}
|
110 |
+
}
|
111 |
+
|
112 |
+
// Step 6: Handle repeating elements
|
113 |
+
if (options.handleRepeatingElements) {
|
114 |
+
try {
|
115 |
+
handleRepeatingElements($);
|
116 |
+
operationStatus.repeatingElements.success = true;
|
117 |
+
} catch (err) {
|
118 |
+
operationStatus.repeatingElements.error = err.message.substring(0, 100);
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
// Step 7: Truncate text
|
123 |
+
if (options.truncateText) {
|
124 |
+
try {
|
125 |
+
truncateText($, options.truncateLength);
|
126 |
+
operationStatus.textTruncation.success = true;
|
127 |
+
} catch (err) {
|
128 |
+
operationStatus.textTruncation.error = err.message.substring(0, 100);
|
129 |
+
}
|
130 |
+
}
|
131 |
+
|
132 |
+
let finalHtml = '';
|
133 |
+
try {
|
134 |
+
finalHtml = $.html();
|
135 |
+
} catch (err) {
|
136 |
+
console.error('Final HTML generation failed:', err);
|
137 |
+
finalHtml = processed;
|
138 |
+
}
|
139 |
+
|
140 |
+
const structure = generateStructureJson($);
|
141 |
+
|
142 |
+
return {
|
143 |
+
html: finalHtml,
|
144 |
+
json: JSON.stringify(structure, null, 2),
|
145 |
+
status: operationStatus
|
146 |
+
};
|
147 |
+
}
|
148 |
+
|
149 |
+
function cleanHead($) {
|
150 |
+
$('head').each((_, head) => {
|
151 |
+
$(head).find('link').remove();
|
152 |
+
$(head).find('script').remove();
|
153 |
+
$(head).find('meta').each((_, meta) => {
|
154 |
+
const name = $(meta).attr('name')?.toLowerCase();
|
155 |
+
const property = $(meta).attr('property')?.toLowerCase();
|
156 |
+
if (!['charset', 'viewport', 'description', 'keywords'].includes(name) &&
|
157 |
+
!property?.includes('og:')) {
|
158 |
+
$(meta).remove();
|
159 |
+
}
|
160 |
+
});
|
161 |
+
});
|
162 |
+
}
|
163 |
+
|
164 |
+
function handleRepeatingElements($) {
|
165 |
+
$('*').each((_, elem) => {
|
166 |
+
const $elem = $(elem);
|
167 |
+
const children = $elem.children();
|
168 |
+
if (children.length > 3 && areElementsSimilar(children, $)) {
|
169 |
+
children.slice(1, -1).each((i, child) => {
|
170 |
+
if (i !== Math.floor(children.length / 2) - 1) {
|
171 |
+
$(child).remove();
|
172 |
+
}
|
173 |
+
});
|
174 |
+
}
|
175 |
+
});
|
176 |
+
}
|
177 |
+
|
178 |
+
function truncateText($, truncateLength) {
|
179 |
+
$('*').each((_, elem) => {
|
180 |
+
const $elem = $(elem);
|
181 |
+
if ($elem.children().length === 0) {
|
182 |
+
let text = $elem.text();
|
183 |
+
if (text.length > truncateLength) {
|
184 |
+
text = text.substring(0, truncateLength/2) + '...' +
|
185 |
+
text.substring(text.length - truncateLength/2);
|
186 |
+
$elem.text(text);
|
187 |
+
}
|
188 |
+
}
|
189 |
+
});
|
190 |
+
}
|
191 |
+
|
192 |
+
function areElementsSimilar(elements, $) {
|
193 |
+
if (elements.length < 4) return false;
|
194 |
+
|
195 |
+
const firstTag = elements[0].tagName;
|
196 |
+
const firstClasses = $(elements[0]).attr('class');
|
197 |
+
|
198 |
+
let similarCount = 0;
|
199 |
+
elements.each((_, elem) => {
|
200 |
+
if (elem.tagName === firstTag && $(elem).attr('class') === firstClasses) {
|
201 |
+
similarCount++;
|
202 |
+
}
|
203 |
+
});
|
204 |
+
|
205 |
+
return similarCount / elements.length > 0.7;
|
206 |
+
}
|
207 |
+
|
208 |
+
function generateStructureJson($) {
|
209 |
+
try {
|
210 |
+
const structure = [];
|
211 |
+
$('*').each((_, el) => {
|
212 |
+
const $el = $(el);
|
213 |
+
const attributes = {};
|
214 |
+
|
215 |
+
Object.entries($el.attr() || {}).forEach(([key, value]) => {
|
216 |
+
attributes[key] = value;
|
217 |
+
});
|
218 |
+
|
219 |
+
const textContent = $el.clone().children().remove().end().text().trim();
|
220 |
+
const truncatedText = textContent.length > 50
|
221 |
+
? textContent.substring(0, 25) + '...' + textContent.substring(textContent.length - 25)
|
222 |
+
: textContent;
|
223 |
+
|
224 |
+
structure.push({
|
225 |
+
tag: el.tagName,
|
226 |
+
attributes: Object.keys(attributes).length ? attributes : undefined,
|
227 |
+
textContent: truncatedText || undefined,
|
228 |
+
childrenCount: $el.children().length,
|
229 |
+
selector: generateSelector($, el)
|
230 |
+
});
|
231 |
+
});
|
232 |
+
return structure;
|
233 |
+
} catch (err) {
|
234 |
+
console.error('Structure generation failed:', err);
|
235 |
+
return [];
|
236 |
+
}
|
237 |
+
}
|
238 |
+
|
239 |
+
function generateSelector($, element) {
|
240 |
+
try {
|
241 |
+
const $el = $(element);
|
242 |
+
let selector = element.tagName;
|
243 |
+
|
244 |
+
if ($el.attr('id')) {
|
245 |
+
selector += `#${$el.attr('id')}`;
|
246 |
+
} else if ($el.attr('class')) {
|
247 |
+
selector += `.${$el.attr('class').replace(/\s+/g, '.')}`;
|
248 |
+
}
|
249 |
+
|
250 |
+
return selector;
|
251 |
+
} catch (err) {
|
252 |
+
console.warn('Selector generation failed:', err);
|
253 |
+
return element.tagName || 'unknown';
|
254 |
+
}
|
255 |
+
}
|
256 |
+
|
257 |
+
function computeStats(html, processed) {
|
258 |
+
try {
|
259 |
+
const $ = cheerio.load(html);
|
260 |
+
const $processed = cheerio.load(processed);
|
261 |
+
|
262 |
+
const stats = {
|
263 |
+
originalElementCount: $('*').length,
|
264 |
+
processedElementCount: $processed('*').length,
|
265 |
+
originalTextLength: html.length,
|
266 |
+
processedTextLength: processed.length,
|
267 |
+
};
|
268 |
+
|
269 |
+
return {
|
270 |
+
elementReduction: `${(1 - stats.processedElementCount / stats.originalElementCount) * 100}%`,
|
271 |
+
sizeReduction: `${(1 - stats.processedTextLength / stats.originalTextLength) * 100}%`,
|
272 |
+
originalElements: stats.originalElementCount,
|
273 |
+
remainingElements: stats.processedElementCount,
|
274 |
+
originalSize: stats.originalTextLength,
|
275 |
+
processedSize: stats.processedTextLength
|
276 |
+
};
|
277 |
+
} catch (err) {
|
278 |
+
console.error('Stats computation failed:', err);
|
279 |
+
return {
|
280 |
+
elementReduction: 'N/A',
|
281 |
+
sizeReduction: 'N/A',
|
282 |
+
originalElements: 'N/A',
|
283 |
+
remainingElements: 'N/A',
|
284 |
+
originalSize: html.length,
|
285 |
+
processedSize: processed.length
|
286 |
+
};
|
287 |
+
}
|
288 |
+
}
|
289 |
+
|
290 |
+
app.post('/process', upload.single('htmlFile'), (req, res) => {
|
291 |
+
try {
|
292 |
+
const startTime = Date.now();
|
293 |
+
let htmlContent = req.file
|
294 |
+
? req.file.buffer.toString('utf8')
|
295 |
+
: req.body.html || '';
|
296 |
+
|
297 |
+
if (!htmlContent.trim()) {
|
298 |
+
return res.status(400).json({ error: 'No HTML content provided.' });
|
299 |
+
}
|
300 |
+
|
301 |
+
const options = {
|
302 |
+
cleanHead: req.body.cleanHead === 'true',
|
303 |
+
removeScripts: req.body.removeScripts === 'true',
|
304 |
+
removeStyles: req.body.removeStyles === 'true',
|
305 |
+
handleRepeatingElements: req.body.handleRepeatingElements === 'true',
|
306 |
+
truncateText: req.body.truncateText === 'true',
|
307 |
+
truncateLength: parseInt(req.body.truncateLength) || 100,
|
308 |
+
minifyHtml: req.body.minifyHtml === 'true',
|
309 |
+
removeMedia: req.body.removeMedia === 'true'
|
310 |
+
};
|
311 |
+
|
312 |
+
const processed = compressHtmlForLlm(htmlContent, options);
|
313 |
+
|
314 |
+
const stats = computeStats(htmlContent, processed.html);
|
315 |
+
|
316 |
+
return res.json({
|
317 |
+
success: true,
|
318 |
+
result: processed,
|
319 |
+
stats: {
|
320 |
+
processingTime: `${Date.now() - startTime}ms`,
|
321 |
+
elementReduction: stats.elementReduction,
|
322 |
+
sizeReduction: stats.sizeReduction,
|
323 |
+
originalElements: stats.originalElements,
|
324 |
+
remainingElements: stats.remainingElements,
|
325 |
+
originalSize: `${stats.originalSize} chars`,
|
326 |
+
processedSize: `${stats.processedSize} chars`
|
327 |
+
},
|
328 |
+
options,
|
329 |
+
operationStatus: processed.status
|
330 |
+
});
|
331 |
+
|
332 |
+
} catch (err) {
|
333 |
+
console.error('Processing failed:', err);
|
334 |
+
return res.status(500).json({
|
335 |
+
error: 'Internal server error.',
|
336 |
+
details: err.message.substring(0, 100)
|
337 |
+
});
|
338 |
+
}
|
339 |
+
});
|
340 |
+
|
341 |
+
const PORT = process.env.PORT || 3000;
|
342 |
+
app.listen(PORT, () => {
|
343 |
+
console.log(`Server running on http://localhost:${PORT}`);
|
344 |
+
});
|
minify.js
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// minify.js
|
2 |
+
const { minify } = require('html-minifier');
|
3 |
+
const cheerio = require('cheerio');
|
4 |
+
|
5 |
+
function sanitizeHtml(html) {
|
6 |
+
try {
|
7 |
+
// Remove conditional comments
|
8 |
+
html = html.replace(/<!--\[if.*?<!\[endif\]-->/gs, '');
|
9 |
+
|
10 |
+
// Fix incomplete URLs
|
11 |
+
html = html.replace(/src="https?:\/\/[^"]*\.{3}"/g, '');
|
12 |
+
|
13 |
+
// Remove problematic script tags
|
14 |
+
html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
|
15 |
+
|
16 |
+
return html;
|
17 |
+
} catch (err) {
|
18 |
+
console.warn('HTML sanitization failed:', err);
|
19 |
+
return html;
|
20 |
+
}
|
21 |
+
}
|
22 |
+
|
23 |
+
function validateHtml(html) {
|
24 |
+
try {
|
25 |
+
const $ = cheerio.load(html, {
|
26 |
+
xmlMode: false,
|
27 |
+
decodeEntities: false
|
28 |
+
});
|
29 |
+
|
30 |
+
const issues = [];
|
31 |
+
|
32 |
+
if ($('html').length === 0) issues.push('Missing html tag');
|
33 |
+
if ($('head').length === 0) issues.push('Missing head tag');
|
34 |
+
if ($('body').length === 0) issues.push('Missing body tag');
|
35 |
+
|
36 |
+
return issues;
|
37 |
+
} catch (err) {
|
38 |
+
console.warn('HTML validation failed:', err);
|
39 |
+
return ['Validation error: ' + err.message];
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
function safeMinify(html, options = {}) {
|
44 |
+
const defaultOptions = {
|
45 |
+
removeComments: true,
|
46 |
+
collapseWhitespace: true,
|
47 |
+
minifyCSS: true,
|
48 |
+
minifyJS: true,
|
49 |
+
conservativeCollapse: true,
|
50 |
+
keepClosingSlash: true,
|
51 |
+
removeAttributeQuotes: false,
|
52 |
+
removeEmptyAttributes: true,
|
53 |
+
removeRedundantAttributes: true,
|
54 |
+
removeScriptTypeAttributes: false,
|
55 |
+
removeStyleLinkTypeAttributes: false,
|
56 |
+
sortAttributes: true,
|
57 |
+
sortClassName: true
|
58 |
+
};
|
59 |
+
|
60 |
+
const minifyOptions = { ...defaultOptions, ...options };
|
61 |
+
|
62 |
+
try {
|
63 |
+
// Try full minification first
|
64 |
+
return minify(html, minifyOptions);
|
65 |
+
} catch (err) {
|
66 |
+
console.warn('Full minification failed, trying conservative mode:', err);
|
67 |
+
|
68 |
+
try {
|
69 |
+
// Fall back to conservative minification
|
70 |
+
return minify(html, {
|
71 |
+
removeComments: true,
|
72 |
+
collapseWhitespace: true,
|
73 |
+
conservativeCollapse: true,
|
74 |
+
keepClosingSlash: true,
|
75 |
+
removeAttributeQuotes: false,
|
76 |
+
removeEmptyAttributes: false,
|
77 |
+
removeRedundantAttributes: false
|
78 |
+
});
|
79 |
+
} catch (err2) {
|
80 |
+
console.error('Conservative minification also failed:', err2);
|
81 |
+
return html;
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
function minifyHtml(html, options = {}) {
|
87 |
+
const result = {
|
88 |
+
originalSize: html.length,
|
89 |
+
minifiedHtml: '',
|
90 |
+
success: false,
|
91 |
+
issues: [],
|
92 |
+
stats: {},
|
93 |
+
error: null
|
94 |
+
};
|
95 |
+
|
96 |
+
try {
|
97 |
+
// Step 1: Validate HTML
|
98 |
+
const validationIssues = validateHtml(html);
|
99 |
+
result.issues = validationIssues;
|
100 |
+
|
101 |
+
// Step 2: Sanitize HTML
|
102 |
+
const sanitized = sanitizeHtml(html);
|
103 |
+
|
104 |
+
// Step 3: Minify HTML
|
105 |
+
const minified = safeMinify(sanitized, options);
|
106 |
+
result.minifiedHtml = minified;
|
107 |
+
result.success = true;
|
108 |
+
|
109 |
+
// Step 4: Calculate stats
|
110 |
+
result.stats = {
|
111 |
+
originalSize: html.length,
|
112 |
+
minifiedSize: minified.length,
|
113 |
+
reduction: ((html.length - minified.length) / html.length * 100).toFixed(2) + '%',
|
114 |
+
validationIssues: validationIssues.length,
|
115 |
+
timestamp: new Date().toISOString()
|
116 |
+
};
|
117 |
+
|
118 |
+
} catch (err) {
|
119 |
+
result.error = {
|
120 |
+
message: err.message,
|
121 |
+
stack: err.stack
|
122 |
+
};
|
123 |
+
result.minifiedHtml = html; // Return original HTML if processing fails
|
124 |
+
}
|
125 |
+
|
126 |
+
return result;
|
127 |
+
}
|
128 |
+
|
129 |
+
module.exports = {
|
130 |
+
minifyHtml,
|
131 |
+
validateHtml,
|
132 |
+
sanitizeHtml
|
133 |
+
};
|
package-lock.json
ADDED
@@ -0,0 +1,1350 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "html-processor",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"lockfileVersion": 3,
|
5 |
+
"requires": true,
|
6 |
+
"packages": {
|
7 |
+
"": {
|
8 |
+
"name": "html-processor",
|
9 |
+
"version": "1.0.0",
|
10 |
+
"license": "ISC",
|
11 |
+
"dependencies": {
|
12 |
+
"@jill64/cf-tiktoken": "^1.0.7",
|
13 |
+
"body-parser": "^1.20.3",
|
14 |
+
"cheerio": "^1.0.0",
|
15 |
+
"express": "^4.21.2",
|
16 |
+
"html-minifier": "^4.0.0",
|
17 |
+
"html-prettify": "^1.0.7",
|
18 |
+
"multer": "^1.4.5-lts.1",
|
19 |
+
"node-html-parser": "^7.0.1",
|
20 |
+
"prettier": "^3.4.2"
|
21 |
+
}
|
22 |
+
},
|
23 |
+
"node_modules/@jill64/cf-tiktoken": {
|
24 |
+
"version": "1.0.7",
|
25 |
+
"resolved": "https://registry.npmjs.org/@jill64/cf-tiktoken/-/cf-tiktoken-1.0.7.tgz",
|
26 |
+
"integrity": "sha512-JyoQK+nkLDi4y4ZwQyem72TlHcKF3OKeb8Clrebb1GdL3vrHLQ41eUegEV63Y/nWTQ2pfCgeVdP1zQ/n9Fug4A==",
|
27 |
+
"dependencies": {
|
28 |
+
"js-tiktoken": "1.0.16"
|
29 |
+
}
|
30 |
+
},
|
31 |
+
"node_modules/accepts": {
|
32 |
+
"version": "1.3.8",
|
33 |
+
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
34 |
+
"integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
|
35 |
+
"dependencies": {
|
36 |
+
"mime-types": "~2.1.34",
|
37 |
+
"negotiator": "0.6.3"
|
38 |
+
},
|
39 |
+
"engines": {
|
40 |
+
"node": ">= 0.6"
|
41 |
+
}
|
42 |
+
},
|
43 |
+
"node_modules/append-field": {
|
44 |
+
"version": "1.0.0",
|
45 |
+
"resolved": "https://registry.npmjs.org/append-field/-/append-field-1.0.0.tgz",
|
46 |
+
"integrity": "sha512-klpgFSWLW1ZEs8svjfb7g4qWY0YS5imI82dTg+QahUvJ8YqAY0P10Uk8tTyh9ZGuYEZEMaeJYCF5BFuX552hsw=="
|
47 |
+
},
|
48 |
+
"node_modules/array-flatten": {
|
49 |
+
"version": "1.1.1",
|
50 |
+
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
51 |
+
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
|
52 |
+
},
|
53 |
+
"node_modules/base64-js": {
|
54 |
+
"version": "1.5.1",
|
55 |
+
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
56 |
+
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
57 |
+
"funding": [
|
58 |
+
{
|
59 |
+
"type": "github",
|
60 |
+
"url": "https://github.com/sponsors/feross"
|
61 |
+
},
|
62 |
+
{
|
63 |
+
"type": "patreon",
|
64 |
+
"url": "https://www.patreon.com/feross"
|
65 |
+
},
|
66 |
+
{
|
67 |
+
"type": "consulting",
|
68 |
+
"url": "https://feross.org/support"
|
69 |
+
}
|
70 |
+
]
|
71 |
+
},
|
72 |
+
"node_modules/body-parser": {
|
73 |
+
"version": "1.20.3",
|
74 |
+
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz",
|
75 |
+
"integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==",
|
76 |
+
"dependencies": {
|
77 |
+
"bytes": "3.1.2",
|
78 |
+
"content-type": "~1.0.5",
|
79 |
+
"debug": "2.6.9",
|
80 |
+
"depd": "2.0.0",
|
81 |
+
"destroy": "1.2.0",
|
82 |
+
"http-errors": "2.0.0",
|
83 |
+
"iconv-lite": "0.4.24",
|
84 |
+
"on-finished": "2.4.1",
|
85 |
+
"qs": "6.13.0",
|
86 |
+
"raw-body": "2.5.2",
|
87 |
+
"type-is": "~1.6.18",
|
88 |
+
"unpipe": "1.0.0"
|
89 |
+
},
|
90 |
+
"engines": {
|
91 |
+
"node": ">= 0.8",
|
92 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
93 |
+
}
|
94 |
+
},
|
95 |
+
"node_modules/boolbase": {
|
96 |
+
"version": "1.0.0",
|
97 |
+
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
|
98 |
+
"integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww=="
|
99 |
+
},
|
100 |
+
"node_modules/buffer-from": {
|
101 |
+
"version": "1.1.2",
|
102 |
+
"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
|
103 |
+
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
|
104 |
+
},
|
105 |
+
"node_modules/busboy": {
|
106 |
+
"version": "1.6.0",
|
107 |
+
"resolved": "https://registry.npmjs.org/busboy/-/busboy-1.6.0.tgz",
|
108 |
+
"integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==",
|
109 |
+
"dependencies": {
|
110 |
+
"streamsearch": "^1.1.0"
|
111 |
+
},
|
112 |
+
"engines": {
|
113 |
+
"node": ">=10.16.0"
|
114 |
+
}
|
115 |
+
},
|
116 |
+
"node_modules/bytes": {
|
117 |
+
"version": "3.1.2",
|
118 |
+
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
119 |
+
"integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
120 |
+
"engines": {
|
121 |
+
"node": ">= 0.8"
|
122 |
+
}
|
123 |
+
},
|
124 |
+
"node_modules/call-bind-apply-helpers": {
|
125 |
+
"version": "1.0.1",
|
126 |
+
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz",
|
127 |
+
"integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==",
|
128 |
+
"dependencies": {
|
129 |
+
"es-errors": "^1.3.0",
|
130 |
+
"function-bind": "^1.1.2"
|
131 |
+
},
|
132 |
+
"engines": {
|
133 |
+
"node": ">= 0.4"
|
134 |
+
}
|
135 |
+
},
|
136 |
+
"node_modules/call-bound": {
|
137 |
+
"version": "1.0.3",
|
138 |
+
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz",
|
139 |
+
"integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==",
|
140 |
+
"dependencies": {
|
141 |
+
"call-bind-apply-helpers": "^1.0.1",
|
142 |
+
"get-intrinsic": "^1.2.6"
|
143 |
+
},
|
144 |
+
"engines": {
|
145 |
+
"node": ">= 0.4"
|
146 |
+
},
|
147 |
+
"funding": {
|
148 |
+
"url": "https://github.com/sponsors/ljharb"
|
149 |
+
}
|
150 |
+
},
|
151 |
+
"node_modules/camel-case": {
|
152 |
+
"version": "3.0.0",
|
153 |
+
"resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz",
|
154 |
+
"integrity": "sha512-+MbKztAYHXPr1jNTSKQF52VpcFjwY5RkR7fxksV8Doo4KAYc5Fl4UJRgthBbTmEx8C54DqahhbLJkDwjI3PI/w==",
|
155 |
+
"dependencies": {
|
156 |
+
"no-case": "^2.2.0",
|
157 |
+
"upper-case": "^1.1.1"
|
158 |
+
}
|
159 |
+
},
|
160 |
+
"node_modules/cheerio": {
|
161 |
+
"version": "1.0.0",
|
162 |
+
"resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz",
|
163 |
+
"integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==",
|
164 |
+
"dependencies": {
|
165 |
+
"cheerio-select": "^2.1.0",
|
166 |
+
"dom-serializer": "^2.0.0",
|
167 |
+
"domhandler": "^5.0.3",
|
168 |
+
"domutils": "^3.1.0",
|
169 |
+
"encoding-sniffer": "^0.2.0",
|
170 |
+
"htmlparser2": "^9.1.0",
|
171 |
+
"parse5": "^7.1.2",
|
172 |
+
"parse5-htmlparser2-tree-adapter": "^7.0.0",
|
173 |
+
"parse5-parser-stream": "^7.1.2",
|
174 |
+
"undici": "^6.19.5",
|
175 |
+
"whatwg-mimetype": "^4.0.0"
|
176 |
+
},
|
177 |
+
"engines": {
|
178 |
+
"node": ">=18.17"
|
179 |
+
},
|
180 |
+
"funding": {
|
181 |
+
"url": "https://github.com/cheeriojs/cheerio?sponsor=1"
|
182 |
+
}
|
183 |
+
},
|
184 |
+
"node_modules/cheerio-select": {
|
185 |
+
"version": "2.1.0",
|
186 |
+
"resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz",
|
187 |
+
"integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==",
|
188 |
+
"dependencies": {
|
189 |
+
"boolbase": "^1.0.0",
|
190 |
+
"css-select": "^5.1.0",
|
191 |
+
"css-what": "^6.1.0",
|
192 |
+
"domelementtype": "^2.3.0",
|
193 |
+
"domhandler": "^5.0.3",
|
194 |
+
"domutils": "^3.0.1"
|
195 |
+
},
|
196 |
+
"funding": {
|
197 |
+
"url": "https://github.com/sponsors/fb55"
|
198 |
+
}
|
199 |
+
},
|
200 |
+
"node_modules/clean-css": {
|
201 |
+
"version": "4.2.4",
|
202 |
+
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz",
|
203 |
+
"integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==",
|
204 |
+
"dependencies": {
|
205 |
+
"source-map": "~0.6.0"
|
206 |
+
},
|
207 |
+
"engines": {
|
208 |
+
"node": ">= 4.0"
|
209 |
+
}
|
210 |
+
},
|
211 |
+
"node_modules/commander": {
|
212 |
+
"version": "2.20.3",
|
213 |
+
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
214 |
+
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
|
215 |
+
},
|
216 |
+
"node_modules/concat-stream": {
|
217 |
+
"version": "1.6.2",
|
218 |
+
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
|
219 |
+
"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
|
220 |
+
"engines": [
|
221 |
+
"node >= 0.8"
|
222 |
+
],
|
223 |
+
"dependencies": {
|
224 |
+
"buffer-from": "^1.0.0",
|
225 |
+
"inherits": "^2.0.3",
|
226 |
+
"readable-stream": "^2.2.2",
|
227 |
+
"typedarray": "^0.0.6"
|
228 |
+
}
|
229 |
+
},
|
230 |
+
"node_modules/content-disposition": {
|
231 |
+
"version": "0.5.4",
|
232 |
+
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
|
233 |
+
"integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
|
234 |
+
"dependencies": {
|
235 |
+
"safe-buffer": "5.2.1"
|
236 |
+
},
|
237 |
+
"engines": {
|
238 |
+
"node": ">= 0.6"
|
239 |
+
}
|
240 |
+
},
|
241 |
+
"node_modules/content-type": {
|
242 |
+
"version": "1.0.5",
|
243 |
+
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
|
244 |
+
"integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
|
245 |
+
"engines": {
|
246 |
+
"node": ">= 0.6"
|
247 |
+
}
|
248 |
+
},
|
249 |
+
"node_modules/cookie": {
|
250 |
+
"version": "0.7.1",
|
251 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz",
|
252 |
+
"integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==",
|
253 |
+
"engines": {
|
254 |
+
"node": ">= 0.6"
|
255 |
+
}
|
256 |
+
},
|
257 |
+
"node_modules/cookie-signature": {
|
258 |
+
"version": "1.0.6",
|
259 |
+
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
260 |
+
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
|
261 |
+
},
|
262 |
+
"node_modules/core-util-is": {
|
263 |
+
"version": "1.0.3",
|
264 |
+
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
265 |
+
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
266 |
+
},
|
267 |
+
"node_modules/css-select": {
|
268 |
+
"version": "5.1.0",
|
269 |
+
"resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz",
|
270 |
+
"integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==",
|
271 |
+
"dependencies": {
|
272 |
+
"boolbase": "^1.0.0",
|
273 |
+
"css-what": "^6.1.0",
|
274 |
+
"domhandler": "^5.0.2",
|
275 |
+
"domutils": "^3.0.1",
|
276 |
+
"nth-check": "^2.0.1"
|
277 |
+
},
|
278 |
+
"funding": {
|
279 |
+
"url": "https://github.com/sponsors/fb55"
|
280 |
+
}
|
281 |
+
},
|
282 |
+
"node_modules/css-what": {
|
283 |
+
"version": "6.1.0",
|
284 |
+
"resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz",
|
285 |
+
"integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==",
|
286 |
+
"engines": {
|
287 |
+
"node": ">= 6"
|
288 |
+
},
|
289 |
+
"funding": {
|
290 |
+
"url": "https://github.com/sponsors/fb55"
|
291 |
+
}
|
292 |
+
},
|
293 |
+
"node_modules/debug": {
|
294 |
+
"version": "2.6.9",
|
295 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
296 |
+
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
297 |
+
"dependencies": {
|
298 |
+
"ms": "2.0.0"
|
299 |
+
}
|
300 |
+
},
|
301 |
+
"node_modules/depd": {
|
302 |
+
"version": "2.0.0",
|
303 |
+
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
|
304 |
+
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
|
305 |
+
"engines": {
|
306 |
+
"node": ">= 0.8"
|
307 |
+
}
|
308 |
+
},
|
309 |
+
"node_modules/destroy": {
|
310 |
+
"version": "1.2.0",
|
311 |
+
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
|
312 |
+
"integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==",
|
313 |
+
"engines": {
|
314 |
+
"node": ">= 0.8",
|
315 |
+
"npm": "1.2.8000 || >= 1.4.16"
|
316 |
+
}
|
317 |
+
},
|
318 |
+
"node_modules/dom-serializer": {
|
319 |
+
"version": "2.0.0",
|
320 |
+
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz",
|
321 |
+
"integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==",
|
322 |
+
"dependencies": {
|
323 |
+
"domelementtype": "^2.3.0",
|
324 |
+
"domhandler": "^5.0.2",
|
325 |
+
"entities": "^4.2.0"
|
326 |
+
},
|
327 |
+
"funding": {
|
328 |
+
"url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
|
329 |
+
}
|
330 |
+
},
|
331 |
+
"node_modules/domelementtype": {
|
332 |
+
"version": "2.3.0",
|
333 |
+
"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz",
|
334 |
+
"integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
|
335 |
+
"funding": [
|
336 |
+
{
|
337 |
+
"type": "github",
|
338 |
+
"url": "https://github.com/sponsors/fb55"
|
339 |
+
}
|
340 |
+
]
|
341 |
+
},
|
342 |
+
"node_modules/domhandler": {
|
343 |
+
"version": "5.0.3",
|
344 |
+
"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz",
|
345 |
+
"integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
|
346 |
+
"dependencies": {
|
347 |
+
"domelementtype": "^2.3.0"
|
348 |
+
},
|
349 |
+
"engines": {
|
350 |
+
"node": ">= 4"
|
351 |
+
},
|
352 |
+
"funding": {
|
353 |
+
"url": "https://github.com/fb55/domhandler?sponsor=1"
|
354 |
+
}
|
355 |
+
},
|
356 |
+
"node_modules/domutils": {
|
357 |
+
"version": "3.2.2",
|
358 |
+
"resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz",
|
359 |
+
"integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==",
|
360 |
+
"dependencies": {
|
361 |
+
"dom-serializer": "^2.0.0",
|
362 |
+
"domelementtype": "^2.3.0",
|
363 |
+
"domhandler": "^5.0.3"
|
364 |
+
},
|
365 |
+
"funding": {
|
366 |
+
"url": "https://github.com/fb55/domutils?sponsor=1"
|
367 |
+
}
|
368 |
+
},
|
369 |
+
"node_modules/dunder-proto": {
|
370 |
+
"version": "1.0.1",
|
371 |
+
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
372 |
+
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
373 |
+
"dependencies": {
|
374 |
+
"call-bind-apply-helpers": "^1.0.1",
|
375 |
+
"es-errors": "^1.3.0",
|
376 |
+
"gopd": "^1.2.0"
|
377 |
+
},
|
378 |
+
"engines": {
|
379 |
+
"node": ">= 0.4"
|
380 |
+
}
|
381 |
+
},
|
382 |
+
"node_modules/ee-first": {
|
383 |
+
"version": "1.1.1",
|
384 |
+
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
385 |
+
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
386 |
+
},
|
387 |
+
"node_modules/encodeurl": {
|
388 |
+
"version": "2.0.0",
|
389 |
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
|
390 |
+
"integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
|
391 |
+
"engines": {
|
392 |
+
"node": ">= 0.8"
|
393 |
+
}
|
394 |
+
},
|
395 |
+
"node_modules/encoding-sniffer": {
|
396 |
+
"version": "0.2.0",
|
397 |
+
"resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz",
|
398 |
+
"integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==",
|
399 |
+
"dependencies": {
|
400 |
+
"iconv-lite": "^0.6.3",
|
401 |
+
"whatwg-encoding": "^3.1.1"
|
402 |
+
},
|
403 |
+
"funding": {
|
404 |
+
"url": "https://github.com/fb55/encoding-sniffer?sponsor=1"
|
405 |
+
}
|
406 |
+
},
|
407 |
+
"node_modules/encoding-sniffer/node_modules/iconv-lite": {
|
408 |
+
"version": "0.6.3",
|
409 |
+
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
410 |
+
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
411 |
+
"dependencies": {
|
412 |
+
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
413 |
+
},
|
414 |
+
"engines": {
|
415 |
+
"node": ">=0.10.0"
|
416 |
+
}
|
417 |
+
},
|
418 |
+
"node_modules/entities": {
|
419 |
+
"version": "4.5.0",
|
420 |
+
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
|
421 |
+
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
|
422 |
+
"engines": {
|
423 |
+
"node": ">=0.12"
|
424 |
+
},
|
425 |
+
"funding": {
|
426 |
+
"url": "https://github.com/fb55/entities?sponsor=1"
|
427 |
+
}
|
428 |
+
},
|
429 |
+
"node_modules/es-define-property": {
|
430 |
+
"version": "1.0.1",
|
431 |
+
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
432 |
+
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
|
433 |
+
"engines": {
|
434 |
+
"node": ">= 0.4"
|
435 |
+
}
|
436 |
+
},
|
437 |
+
"node_modules/es-errors": {
|
438 |
+
"version": "1.3.0",
|
439 |
+
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
440 |
+
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
441 |
+
"engines": {
|
442 |
+
"node": ">= 0.4"
|
443 |
+
}
|
444 |
+
},
|
445 |
+
"node_modules/es-object-atoms": {
|
446 |
+
"version": "1.1.1",
|
447 |
+
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
448 |
+
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
449 |
+
"dependencies": {
|
450 |
+
"es-errors": "^1.3.0"
|
451 |
+
},
|
452 |
+
"engines": {
|
453 |
+
"node": ">= 0.4"
|
454 |
+
}
|
455 |
+
},
|
456 |
+
"node_modules/escape-html": {
|
457 |
+
"version": "1.0.3",
|
458 |
+
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
459 |
+
"integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
|
460 |
+
},
|
461 |
+
"node_modules/etag": {
|
462 |
+
"version": "1.8.1",
|
463 |
+
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
464 |
+
"integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
|
465 |
+
"engines": {
|
466 |
+
"node": ">= 0.6"
|
467 |
+
}
|
468 |
+
},
|
469 |
+
"node_modules/express": {
|
470 |
+
"version": "4.21.2",
|
471 |
+
"resolved": "https://registry.npmjs.org/express/-/express-4.21.2.tgz",
|
472 |
+
"integrity": "sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==",
|
473 |
+
"dependencies": {
|
474 |
+
"accepts": "~1.3.8",
|
475 |
+
"array-flatten": "1.1.1",
|
476 |
+
"body-parser": "1.20.3",
|
477 |
+
"content-disposition": "0.5.4",
|
478 |
+
"content-type": "~1.0.4",
|
479 |
+
"cookie": "0.7.1",
|
480 |
+
"cookie-signature": "1.0.6",
|
481 |
+
"debug": "2.6.9",
|
482 |
+
"depd": "2.0.0",
|
483 |
+
"encodeurl": "~2.0.0",
|
484 |
+
"escape-html": "~1.0.3",
|
485 |
+
"etag": "~1.8.1",
|
486 |
+
"finalhandler": "1.3.1",
|
487 |
+
"fresh": "0.5.2",
|
488 |
+
"http-errors": "2.0.0",
|
489 |
+
"merge-descriptors": "1.0.3",
|
490 |
+
"methods": "~1.1.2",
|
491 |
+
"on-finished": "2.4.1",
|
492 |
+
"parseurl": "~1.3.3",
|
493 |
+
"path-to-regexp": "0.1.12",
|
494 |
+
"proxy-addr": "~2.0.7",
|
495 |
+
"qs": "6.13.0",
|
496 |
+
"range-parser": "~1.2.1",
|
497 |
+
"safe-buffer": "5.2.1",
|
498 |
+
"send": "0.19.0",
|
499 |
+
"serve-static": "1.16.2",
|
500 |
+
"setprototypeof": "1.2.0",
|
501 |
+
"statuses": "2.0.1",
|
502 |
+
"type-is": "~1.6.18",
|
503 |
+
"utils-merge": "1.0.1",
|
504 |
+
"vary": "~1.1.2"
|
505 |
+
},
|
506 |
+
"engines": {
|
507 |
+
"node": ">= 0.10.0"
|
508 |
+
},
|
509 |
+
"funding": {
|
510 |
+
"type": "opencollective",
|
511 |
+
"url": "https://opencollective.com/express"
|
512 |
+
}
|
513 |
+
},
|
514 |
+
"node_modules/finalhandler": {
|
515 |
+
"version": "1.3.1",
|
516 |
+
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz",
|
517 |
+
"integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==",
|
518 |
+
"dependencies": {
|
519 |
+
"debug": "2.6.9",
|
520 |
+
"encodeurl": "~2.0.0",
|
521 |
+
"escape-html": "~1.0.3",
|
522 |
+
"on-finished": "2.4.1",
|
523 |
+
"parseurl": "~1.3.3",
|
524 |
+
"statuses": "2.0.1",
|
525 |
+
"unpipe": "~1.0.0"
|
526 |
+
},
|
527 |
+
"engines": {
|
528 |
+
"node": ">= 0.8"
|
529 |
+
}
|
530 |
+
},
|
531 |
+
"node_modules/forwarded": {
|
532 |
+
"version": "0.2.0",
|
533 |
+
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
|
534 |
+
"integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
|
535 |
+
"engines": {
|
536 |
+
"node": ">= 0.6"
|
537 |
+
}
|
538 |
+
},
|
539 |
+
"node_modules/fresh": {
|
540 |
+
"version": "0.5.2",
|
541 |
+
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
542 |
+
"integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==",
|
543 |
+
"engines": {
|
544 |
+
"node": ">= 0.6"
|
545 |
+
}
|
546 |
+
},
|
547 |
+
"node_modules/function-bind": {
|
548 |
+
"version": "1.1.2",
|
549 |
+
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
550 |
+
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
551 |
+
"funding": {
|
552 |
+
"url": "https://github.com/sponsors/ljharb"
|
553 |
+
}
|
554 |
+
},
|
555 |
+
"node_modules/get-intrinsic": {
|
556 |
+
"version": "1.2.7",
|
557 |
+
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz",
|
558 |
+
"integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==",
|
559 |
+
"dependencies": {
|
560 |
+
"call-bind-apply-helpers": "^1.0.1",
|
561 |
+
"es-define-property": "^1.0.1",
|
562 |
+
"es-errors": "^1.3.0",
|
563 |
+
"es-object-atoms": "^1.0.0",
|
564 |
+
"function-bind": "^1.1.2",
|
565 |
+
"get-proto": "^1.0.0",
|
566 |
+
"gopd": "^1.2.0",
|
567 |
+
"has-symbols": "^1.1.0",
|
568 |
+
"hasown": "^2.0.2",
|
569 |
+
"math-intrinsics": "^1.1.0"
|
570 |
+
},
|
571 |
+
"engines": {
|
572 |
+
"node": ">= 0.4"
|
573 |
+
},
|
574 |
+
"funding": {
|
575 |
+
"url": "https://github.com/sponsors/ljharb"
|
576 |
+
}
|
577 |
+
},
|
578 |
+
"node_modules/get-proto": {
|
579 |
+
"version": "1.0.1",
|
580 |
+
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
|
581 |
+
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
582 |
+
"dependencies": {
|
583 |
+
"dunder-proto": "^1.0.1",
|
584 |
+
"es-object-atoms": "^1.0.0"
|
585 |
+
},
|
586 |
+
"engines": {
|
587 |
+
"node": ">= 0.4"
|
588 |
+
}
|
589 |
+
},
|
590 |
+
"node_modules/gopd": {
|
591 |
+
"version": "1.2.0",
|
592 |
+
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
593 |
+
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
|
594 |
+
"engines": {
|
595 |
+
"node": ">= 0.4"
|
596 |
+
},
|
597 |
+
"funding": {
|
598 |
+
"url": "https://github.com/sponsors/ljharb"
|
599 |
+
}
|
600 |
+
},
|
601 |
+
"node_modules/has-symbols": {
|
602 |
+
"version": "1.1.0",
|
603 |
+
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
|
604 |
+
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
|
605 |
+
"engines": {
|
606 |
+
"node": ">= 0.4"
|
607 |
+
},
|
608 |
+
"funding": {
|
609 |
+
"url": "https://github.com/sponsors/ljharb"
|
610 |
+
}
|
611 |
+
},
|
612 |
+
"node_modules/hasown": {
|
613 |
+
"version": "2.0.2",
|
614 |
+
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
615 |
+
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
616 |
+
"dependencies": {
|
617 |
+
"function-bind": "^1.1.2"
|
618 |
+
},
|
619 |
+
"engines": {
|
620 |
+
"node": ">= 0.4"
|
621 |
+
}
|
622 |
+
},
|
623 |
+
"node_modules/he": {
|
624 |
+
"version": "1.2.0",
|
625 |
+
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
|
626 |
+
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
627 |
+
"bin": {
|
628 |
+
"he": "bin/he"
|
629 |
+
}
|
630 |
+
},
|
631 |
+
"node_modules/html-minifier": {
|
632 |
+
"version": "4.0.0",
|
633 |
+
"resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz",
|
634 |
+
"integrity": "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==",
|
635 |
+
"dependencies": {
|
636 |
+
"camel-case": "^3.0.0",
|
637 |
+
"clean-css": "^4.2.1",
|
638 |
+
"commander": "^2.19.0",
|
639 |
+
"he": "^1.2.0",
|
640 |
+
"param-case": "^2.1.1",
|
641 |
+
"relateurl": "^0.2.7",
|
642 |
+
"uglify-js": "^3.5.1"
|
643 |
+
},
|
644 |
+
"bin": {
|
645 |
+
"html-minifier": "cli.js"
|
646 |
+
},
|
647 |
+
"engines": {
|
648 |
+
"node": ">=6"
|
649 |
+
}
|
650 |
+
},
|
651 |
+
"node_modules/html-prettify": {
|
652 |
+
"version": "1.0.7",
|
653 |
+
"resolved": "https://registry.npmjs.org/html-prettify/-/html-prettify-1.0.7.tgz",
|
654 |
+
"integrity": "sha512-99pRsP2PV2DyWnrVibNyad7gNmzCP7AANO8jw7Z9yanWyXH9dPdqdMXGefySplroqCNdk95u7j5TLxfyJ1Cbbg=="
|
655 |
+
},
|
656 |
+
"node_modules/htmlparser2": {
|
657 |
+
"version": "9.1.0",
|
658 |
+
"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz",
|
659 |
+
"integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==",
|
660 |
+
"funding": [
|
661 |
+
"https://github.com/fb55/htmlparser2?sponsor=1",
|
662 |
+
{
|
663 |
+
"type": "github",
|
664 |
+
"url": "https://github.com/sponsors/fb55"
|
665 |
+
}
|
666 |
+
],
|
667 |
+
"dependencies": {
|
668 |
+
"domelementtype": "^2.3.0",
|
669 |
+
"domhandler": "^5.0.3",
|
670 |
+
"domutils": "^3.1.0",
|
671 |
+
"entities": "^4.5.0"
|
672 |
+
}
|
673 |
+
},
|
674 |
+
"node_modules/http-errors": {
|
675 |
+
"version": "2.0.0",
|
676 |
+
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
|
677 |
+
"integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
|
678 |
+
"dependencies": {
|
679 |
+
"depd": "2.0.0",
|
680 |
+
"inherits": "2.0.4",
|
681 |
+
"setprototypeof": "1.2.0",
|
682 |
+
"statuses": "2.0.1",
|
683 |
+
"toidentifier": "1.0.1"
|
684 |
+
},
|
685 |
+
"engines": {
|
686 |
+
"node": ">= 0.8"
|
687 |
+
}
|
688 |
+
},
|
689 |
+
"node_modules/iconv-lite": {
|
690 |
+
"version": "0.4.24",
|
691 |
+
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
692 |
+
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
693 |
+
"dependencies": {
|
694 |
+
"safer-buffer": ">= 2.1.2 < 3"
|
695 |
+
},
|
696 |
+
"engines": {
|
697 |
+
"node": ">=0.10.0"
|
698 |
+
}
|
699 |
+
},
|
700 |
+
"node_modules/inherits": {
|
701 |
+
"version": "2.0.4",
|
702 |
+
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
703 |
+
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
704 |
+
},
|
705 |
+
"node_modules/ipaddr.js": {
|
706 |
+
"version": "1.9.1",
|
707 |
+
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
|
708 |
+
"integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
|
709 |
+
"engines": {
|
710 |
+
"node": ">= 0.10"
|
711 |
+
}
|
712 |
+
},
|
713 |
+
"node_modules/isarray": {
|
714 |
+
"version": "1.0.0",
|
715 |
+
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
716 |
+
"integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
|
717 |
+
},
|
718 |
+
"node_modules/js-tiktoken": {
|
719 |
+
"version": "1.0.16",
|
720 |
+
"resolved": "https://registry.npmjs.org/js-tiktoken/-/js-tiktoken-1.0.16.tgz",
|
721 |
+
"integrity": "sha512-nUVdO5k/M9llWpiaZlBBDdtmr6qWXwSD6fgaDu2zM8UP+OXxx9V37lFkI6w0/1IuaDx7WffZ37oYd9KvcWKElg==",
|
722 |
+
"dependencies": {
|
723 |
+
"base64-js": "^1.5.1"
|
724 |
+
}
|
725 |
+
},
|
726 |
+
"node_modules/lower-case": {
|
727 |
+
"version": "1.1.4",
|
728 |
+
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz",
|
729 |
+
"integrity": "sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA=="
|
730 |
+
},
|
731 |
+
"node_modules/math-intrinsics": {
|
732 |
+
"version": "1.1.0",
|
733 |
+
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
734 |
+
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
|
735 |
+
"engines": {
|
736 |
+
"node": ">= 0.4"
|
737 |
+
}
|
738 |
+
},
|
739 |
+
"node_modules/media-typer": {
|
740 |
+
"version": "0.3.0",
|
741 |
+
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
742 |
+
"integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
|
743 |
+
"engines": {
|
744 |
+
"node": ">= 0.6"
|
745 |
+
}
|
746 |
+
},
|
747 |
+
"node_modules/merge-descriptors": {
|
748 |
+
"version": "1.0.3",
|
749 |
+
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz",
|
750 |
+
"integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==",
|
751 |
+
"funding": {
|
752 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
753 |
+
}
|
754 |
+
},
|
755 |
+
"node_modules/methods": {
|
756 |
+
"version": "1.1.2",
|
757 |
+
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
758 |
+
"integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==",
|
759 |
+
"engines": {
|
760 |
+
"node": ">= 0.6"
|
761 |
+
}
|
762 |
+
},
|
763 |
+
"node_modules/mime": {
|
764 |
+
"version": "1.6.0",
|
765 |
+
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
766 |
+
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
|
767 |
+
"bin": {
|
768 |
+
"mime": "cli.js"
|
769 |
+
},
|
770 |
+
"engines": {
|
771 |
+
"node": ">=4"
|
772 |
+
}
|
773 |
+
},
|
774 |
+
"node_modules/mime-db": {
|
775 |
+
"version": "1.52.0",
|
776 |
+
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
777 |
+
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
778 |
+
"engines": {
|
779 |
+
"node": ">= 0.6"
|
780 |
+
}
|
781 |
+
},
|
782 |
+
"node_modules/mime-types": {
|
783 |
+
"version": "2.1.35",
|
784 |
+
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
785 |
+
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
786 |
+
"dependencies": {
|
787 |
+
"mime-db": "1.52.0"
|
788 |
+
},
|
789 |
+
"engines": {
|
790 |
+
"node": ">= 0.6"
|
791 |
+
}
|
792 |
+
},
|
793 |
+
"node_modules/minimist": {
|
794 |
+
"version": "1.2.8",
|
795 |
+
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
796 |
+
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
797 |
+
"funding": {
|
798 |
+
"url": "https://github.com/sponsors/ljharb"
|
799 |
+
}
|
800 |
+
},
|
801 |
+
"node_modules/mkdirp": {
|
802 |
+
"version": "0.5.6",
|
803 |
+
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
|
804 |
+
"integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
|
805 |
+
"dependencies": {
|
806 |
+
"minimist": "^1.2.6"
|
807 |
+
},
|
808 |
+
"bin": {
|
809 |
+
"mkdirp": "bin/cmd.js"
|
810 |
+
}
|
811 |
+
},
|
812 |
+
"node_modules/ms": {
|
813 |
+
"version": "2.0.0",
|
814 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
815 |
+
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
|
816 |
+
},
|
817 |
+
"node_modules/multer": {
|
818 |
+
"version": "1.4.5-lts.1",
|
819 |
+
"resolved": "https://registry.npmjs.org/multer/-/multer-1.4.5-lts.1.tgz",
|
820 |
+
"integrity": "sha512-ywPWvcDMeH+z9gQq5qYHCCy+ethsk4goepZ45GLD63fOu0YcNecQxi64nDs3qluZB+murG3/D4dJ7+dGctcCQQ==",
|
821 |
+
"dependencies": {
|
822 |
+
"append-field": "^1.0.0",
|
823 |
+
"busboy": "^1.0.0",
|
824 |
+
"concat-stream": "^1.5.2",
|
825 |
+
"mkdirp": "^0.5.4",
|
826 |
+
"object-assign": "^4.1.1",
|
827 |
+
"type-is": "^1.6.4",
|
828 |
+
"xtend": "^4.0.0"
|
829 |
+
},
|
830 |
+
"engines": {
|
831 |
+
"node": ">= 6.0.0"
|
832 |
+
}
|
833 |
+
},
|
834 |
+
"node_modules/negotiator": {
|
835 |
+
"version": "0.6.3",
|
836 |
+
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
|
837 |
+
"integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
|
838 |
+
"engines": {
|
839 |
+
"node": ">= 0.6"
|
840 |
+
}
|
841 |
+
},
|
842 |
+
"node_modules/no-case": {
|
843 |
+
"version": "2.3.2",
|
844 |
+
"resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz",
|
845 |
+
"integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==",
|
846 |
+
"dependencies": {
|
847 |
+
"lower-case": "^1.1.1"
|
848 |
+
}
|
849 |
+
},
|
850 |
+
"node_modules/node-html-parser": {
|
851 |
+
"version": "7.0.1",
|
852 |
+
"resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-7.0.1.tgz",
|
853 |
+
"integrity": "sha512-KGtmPY2kS0thCWGK0VuPyOS+pBKhhe8gXztzA2ilAOhbUbxa9homF1bOyKvhGzMLXUoRds9IOmr/v5lr/lqNmA==",
|
854 |
+
"dependencies": {
|
855 |
+
"css-select": "^5.1.0",
|
856 |
+
"he": "1.2.0"
|
857 |
+
}
|
858 |
+
},
|
859 |
+
"node_modules/nth-check": {
|
860 |
+
"version": "2.1.1",
|
861 |
+
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",
|
862 |
+
"integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==",
|
863 |
+
"dependencies": {
|
864 |
+
"boolbase": "^1.0.0"
|
865 |
+
},
|
866 |
+
"funding": {
|
867 |
+
"url": "https://github.com/fb55/nth-check?sponsor=1"
|
868 |
+
}
|
869 |
+
},
|
870 |
+
"node_modules/object-assign": {
|
871 |
+
"version": "4.1.1",
|
872 |
+
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
873 |
+
"integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
|
874 |
+
"engines": {
|
875 |
+
"node": ">=0.10.0"
|
876 |
+
}
|
877 |
+
},
|
878 |
+
"node_modules/object-inspect": {
|
879 |
+
"version": "1.13.3",
|
880 |
+
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz",
|
881 |
+
"integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==",
|
882 |
+
"engines": {
|
883 |
+
"node": ">= 0.4"
|
884 |
+
},
|
885 |
+
"funding": {
|
886 |
+
"url": "https://github.com/sponsors/ljharb"
|
887 |
+
}
|
888 |
+
},
|
889 |
+
"node_modules/on-finished": {
|
890 |
+
"version": "2.4.1",
|
891 |
+
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
|
892 |
+
"integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
|
893 |
+
"dependencies": {
|
894 |
+
"ee-first": "1.1.1"
|
895 |
+
},
|
896 |
+
"engines": {
|
897 |
+
"node": ">= 0.8"
|
898 |
+
}
|
899 |
+
},
|
900 |
+
"node_modules/param-case": {
|
901 |
+
"version": "2.1.1",
|
902 |
+
"resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz",
|
903 |
+
"integrity": "sha512-eQE845L6ot89sk2N8liD8HAuH4ca6Vvr7VWAWwt7+kvvG5aBcPmmphQ68JsEG2qa9n1TykS2DLeMt363AAH8/w==",
|
904 |
+
"dependencies": {
|
905 |
+
"no-case": "^2.2.0"
|
906 |
+
}
|
907 |
+
},
|
908 |
+
"node_modules/parse5": {
|
909 |
+
"version": "7.2.1",
|
910 |
+
"resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz",
|
911 |
+
"integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==",
|
912 |
+
"dependencies": {
|
913 |
+
"entities": "^4.5.0"
|
914 |
+
},
|
915 |
+
"funding": {
|
916 |
+
"url": "https://github.com/inikulin/parse5?sponsor=1"
|
917 |
+
}
|
918 |
+
},
|
919 |
+
"node_modules/parse5-htmlparser2-tree-adapter": {
|
920 |
+
"version": "7.1.0",
|
921 |
+
"resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz",
|
922 |
+
"integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==",
|
923 |
+
"dependencies": {
|
924 |
+
"domhandler": "^5.0.3",
|
925 |
+
"parse5": "^7.0.0"
|
926 |
+
},
|
927 |
+
"funding": {
|
928 |
+
"url": "https://github.com/inikulin/parse5?sponsor=1"
|
929 |
+
}
|
930 |
+
},
|
931 |
+
"node_modules/parse5-parser-stream": {
|
932 |
+
"version": "7.1.2",
|
933 |
+
"resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz",
|
934 |
+
"integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==",
|
935 |
+
"dependencies": {
|
936 |
+
"parse5": "^7.0.0"
|
937 |
+
},
|
938 |
+
"funding": {
|
939 |
+
"url": "https://github.com/inikulin/parse5?sponsor=1"
|
940 |
+
}
|
941 |
+
},
|
942 |
+
"node_modules/parseurl": {
|
943 |
+
"version": "1.3.3",
|
944 |
+
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
945 |
+
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
|
946 |
+
"engines": {
|
947 |
+
"node": ">= 0.8"
|
948 |
+
}
|
949 |
+
},
|
950 |
+
"node_modules/path-to-regexp": {
|
951 |
+
"version": "0.1.12",
|
952 |
+
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.12.tgz",
|
953 |
+
"integrity": "sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ=="
|
954 |
+
},
|
955 |
+
"node_modules/prettier": {
|
956 |
+
"version": "3.4.2",
|
957 |
+
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz",
|
958 |
+
"integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==",
|
959 |
+
"bin": {
|
960 |
+
"prettier": "bin/prettier.cjs"
|
961 |
+
},
|
962 |
+
"engines": {
|
963 |
+
"node": ">=14"
|
964 |
+
},
|
965 |
+
"funding": {
|
966 |
+
"url": "https://github.com/prettier/prettier?sponsor=1"
|
967 |
+
}
|
968 |
+
},
|
969 |
+
"node_modules/process-nextick-args": {
|
970 |
+
"version": "2.0.1",
|
971 |
+
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
972 |
+
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
|
973 |
+
},
|
974 |
+
"node_modules/proxy-addr": {
|
975 |
+
"version": "2.0.7",
|
976 |
+
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
|
977 |
+
"integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
|
978 |
+
"dependencies": {
|
979 |
+
"forwarded": "0.2.0",
|
980 |
+
"ipaddr.js": "1.9.1"
|
981 |
+
},
|
982 |
+
"engines": {
|
983 |
+
"node": ">= 0.10"
|
984 |
+
}
|
985 |
+
},
|
986 |
+
"node_modules/qs": {
|
987 |
+
"version": "6.13.0",
|
988 |
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz",
|
989 |
+
"integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==",
|
990 |
+
"dependencies": {
|
991 |
+
"side-channel": "^1.0.6"
|
992 |
+
},
|
993 |
+
"engines": {
|
994 |
+
"node": ">=0.6"
|
995 |
+
},
|
996 |
+
"funding": {
|
997 |
+
"url": "https://github.com/sponsors/ljharb"
|
998 |
+
}
|
999 |
+
},
|
1000 |
+
"node_modules/range-parser": {
|
1001 |
+
"version": "1.2.1",
|
1002 |
+
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
1003 |
+
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
1004 |
+
"engines": {
|
1005 |
+
"node": ">= 0.6"
|
1006 |
+
}
|
1007 |
+
},
|
1008 |
+
"node_modules/raw-body": {
|
1009 |
+
"version": "2.5.2",
|
1010 |
+
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz",
|
1011 |
+
"integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==",
|
1012 |
+
"dependencies": {
|
1013 |
+
"bytes": "3.1.2",
|
1014 |
+
"http-errors": "2.0.0",
|
1015 |
+
"iconv-lite": "0.4.24",
|
1016 |
+
"unpipe": "1.0.0"
|
1017 |
+
},
|
1018 |
+
"engines": {
|
1019 |
+
"node": ">= 0.8"
|
1020 |
+
}
|
1021 |
+
},
|
1022 |
+
"node_modules/readable-stream": {
|
1023 |
+
"version": "2.3.8",
|
1024 |
+
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz",
|
1025 |
+
"integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==",
|
1026 |
+
"dependencies": {
|
1027 |
+
"core-util-is": "~1.0.0",
|
1028 |
+
"inherits": "~2.0.3",
|
1029 |
+
"isarray": "~1.0.0",
|
1030 |
+
"process-nextick-args": "~2.0.0",
|
1031 |
+
"safe-buffer": "~5.1.1",
|
1032 |
+
"string_decoder": "~1.1.1",
|
1033 |
+
"util-deprecate": "~1.0.1"
|
1034 |
+
}
|
1035 |
+
},
|
1036 |
+
"node_modules/readable-stream/node_modules/safe-buffer": {
|
1037 |
+
"version": "5.1.2",
|
1038 |
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
1039 |
+
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
1040 |
+
},
|
1041 |
+
"node_modules/relateurl": {
|
1042 |
+
"version": "0.2.7",
|
1043 |
+
"resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
|
1044 |
+
"integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==",
|
1045 |
+
"engines": {
|
1046 |
+
"node": ">= 0.10"
|
1047 |
+
}
|
1048 |
+
},
|
1049 |
+
"node_modules/safe-buffer": {
|
1050 |
+
"version": "5.2.1",
|
1051 |
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
1052 |
+
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
1053 |
+
"funding": [
|
1054 |
+
{
|
1055 |
+
"type": "github",
|
1056 |
+
"url": "https://github.com/sponsors/feross"
|
1057 |
+
},
|
1058 |
+
{
|
1059 |
+
"type": "patreon",
|
1060 |
+
"url": "https://www.patreon.com/feross"
|
1061 |
+
},
|
1062 |
+
{
|
1063 |
+
"type": "consulting",
|
1064 |
+
"url": "https://feross.org/support"
|
1065 |
+
}
|
1066 |
+
]
|
1067 |
+
},
|
1068 |
+
"node_modules/safer-buffer": {
|
1069 |
+
"version": "2.1.2",
|
1070 |
+
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
1071 |
+
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
1072 |
+
},
|
1073 |
+
"node_modules/send": {
|
1074 |
+
"version": "0.19.0",
|
1075 |
+
"resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz",
|
1076 |
+
"integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==",
|
1077 |
+
"dependencies": {
|
1078 |
+
"debug": "2.6.9",
|
1079 |
+
"depd": "2.0.0",
|
1080 |
+
"destroy": "1.2.0",
|
1081 |
+
"encodeurl": "~1.0.2",
|
1082 |
+
"escape-html": "~1.0.3",
|
1083 |
+
"etag": "~1.8.1",
|
1084 |
+
"fresh": "0.5.2",
|
1085 |
+
"http-errors": "2.0.0",
|
1086 |
+
"mime": "1.6.0",
|
1087 |
+
"ms": "2.1.3",
|
1088 |
+
"on-finished": "2.4.1",
|
1089 |
+
"range-parser": "~1.2.1",
|
1090 |
+
"statuses": "2.0.1"
|
1091 |
+
},
|
1092 |
+
"engines": {
|
1093 |
+
"node": ">= 0.8.0"
|
1094 |
+
}
|
1095 |
+
},
|
1096 |
+
"node_modules/send/node_modules/encodeurl": {
|
1097 |
+
"version": "1.0.2",
|
1098 |
+
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
1099 |
+
"integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==",
|
1100 |
+
"engines": {
|
1101 |
+
"node": ">= 0.8"
|
1102 |
+
}
|
1103 |
+
},
|
1104 |
+
"node_modules/send/node_modules/ms": {
|
1105 |
+
"version": "2.1.3",
|
1106 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
1107 |
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
1108 |
+
},
|
1109 |
+
"node_modules/serve-static": {
|
1110 |
+
"version": "1.16.2",
|
1111 |
+
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz",
|
1112 |
+
"integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==",
|
1113 |
+
"dependencies": {
|
1114 |
+
"encodeurl": "~2.0.0",
|
1115 |
+
"escape-html": "~1.0.3",
|
1116 |
+
"parseurl": "~1.3.3",
|
1117 |
+
"send": "0.19.0"
|
1118 |
+
},
|
1119 |
+
"engines": {
|
1120 |
+
"node": ">= 0.8.0"
|
1121 |
+
}
|
1122 |
+
},
|
1123 |
+
"node_modules/setprototypeof": {
|
1124 |
+
"version": "1.2.0",
|
1125 |
+
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
|
1126 |
+
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
|
1127 |
+
},
|
1128 |
+
"node_modules/side-channel": {
|
1129 |
+
"version": "1.1.0",
|
1130 |
+
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz",
|
1131 |
+
"integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==",
|
1132 |
+
"dependencies": {
|
1133 |
+
"es-errors": "^1.3.0",
|
1134 |
+
"object-inspect": "^1.13.3",
|
1135 |
+
"side-channel-list": "^1.0.0",
|
1136 |
+
"side-channel-map": "^1.0.1",
|
1137 |
+
"side-channel-weakmap": "^1.0.2"
|
1138 |
+
},
|
1139 |
+
"engines": {
|
1140 |
+
"node": ">= 0.4"
|
1141 |
+
},
|
1142 |
+
"funding": {
|
1143 |
+
"url": "https://github.com/sponsors/ljharb"
|
1144 |
+
}
|
1145 |
+
},
|
1146 |
+
"node_modules/side-channel-list": {
|
1147 |
+
"version": "1.0.0",
|
1148 |
+
"resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz",
|
1149 |
+
"integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==",
|
1150 |
+
"dependencies": {
|
1151 |
+
"es-errors": "^1.3.0",
|
1152 |
+
"object-inspect": "^1.13.3"
|
1153 |
+
},
|
1154 |
+
"engines": {
|
1155 |
+
"node": ">= 0.4"
|
1156 |
+
},
|
1157 |
+
"funding": {
|
1158 |
+
"url": "https://github.com/sponsors/ljharb"
|
1159 |
+
}
|
1160 |
+
},
|
1161 |
+
"node_modules/side-channel-map": {
|
1162 |
+
"version": "1.0.1",
|
1163 |
+
"resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
|
1164 |
+
"integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
|
1165 |
+
"dependencies": {
|
1166 |
+
"call-bound": "^1.0.2",
|
1167 |
+
"es-errors": "^1.3.0",
|
1168 |
+
"get-intrinsic": "^1.2.5",
|
1169 |
+
"object-inspect": "^1.13.3"
|
1170 |
+
},
|
1171 |
+
"engines": {
|
1172 |
+
"node": ">= 0.4"
|
1173 |
+
},
|
1174 |
+
"funding": {
|
1175 |
+
"url": "https://github.com/sponsors/ljharb"
|
1176 |
+
}
|
1177 |
+
},
|
1178 |
+
"node_modules/side-channel-weakmap": {
|
1179 |
+
"version": "1.0.2",
|
1180 |
+
"resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
|
1181 |
+
"integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
|
1182 |
+
"dependencies": {
|
1183 |
+
"call-bound": "^1.0.2",
|
1184 |
+
"es-errors": "^1.3.0",
|
1185 |
+
"get-intrinsic": "^1.2.5",
|
1186 |
+
"object-inspect": "^1.13.3",
|
1187 |
+
"side-channel-map": "^1.0.1"
|
1188 |
+
},
|
1189 |
+
"engines": {
|
1190 |
+
"node": ">= 0.4"
|
1191 |
+
},
|
1192 |
+
"funding": {
|
1193 |
+
"url": "https://github.com/sponsors/ljharb"
|
1194 |
+
}
|
1195 |
+
},
|
1196 |
+
"node_modules/source-map": {
|
1197 |
+
"version": "0.6.1",
|
1198 |
+
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
1199 |
+
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
1200 |
+
"engines": {
|
1201 |
+
"node": ">=0.10.0"
|
1202 |
+
}
|
1203 |
+
},
|
1204 |
+
"node_modules/statuses": {
|
1205 |
+
"version": "2.0.1",
|
1206 |
+
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
1207 |
+
"integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==",
|
1208 |
+
"engines": {
|
1209 |
+
"node": ">= 0.8"
|
1210 |
+
}
|
1211 |
+
},
|
1212 |
+
"node_modules/streamsearch": {
|
1213 |
+
"version": "1.1.0",
|
1214 |
+
"resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz",
|
1215 |
+
"integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==",
|
1216 |
+
"engines": {
|
1217 |
+
"node": ">=10.0.0"
|
1218 |
+
}
|
1219 |
+
},
|
1220 |
+
"node_modules/string_decoder": {
|
1221 |
+
"version": "1.1.1",
|
1222 |
+
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
1223 |
+
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
1224 |
+
"dependencies": {
|
1225 |
+
"safe-buffer": "~5.1.0"
|
1226 |
+
}
|
1227 |
+
},
|
1228 |
+
"node_modules/string_decoder/node_modules/safe-buffer": {
|
1229 |
+
"version": "5.1.2",
|
1230 |
+
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
1231 |
+
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
1232 |
+
},
|
1233 |
+
"node_modules/toidentifier": {
|
1234 |
+
"version": "1.0.1",
|
1235 |
+
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
|
1236 |
+
"integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
|
1237 |
+
"engines": {
|
1238 |
+
"node": ">=0.6"
|
1239 |
+
}
|
1240 |
+
},
|
1241 |
+
"node_modules/type-is": {
|
1242 |
+
"version": "1.6.18",
|
1243 |
+
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
1244 |
+
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
|
1245 |
+
"dependencies": {
|
1246 |
+
"media-typer": "0.3.0",
|
1247 |
+
"mime-types": "~2.1.24"
|
1248 |
+
},
|
1249 |
+
"engines": {
|
1250 |
+
"node": ">= 0.6"
|
1251 |
+
}
|
1252 |
+
},
|
1253 |
+
"node_modules/typedarray": {
|
1254 |
+
"version": "0.0.6",
|
1255 |
+
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
1256 |
+
"integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA=="
|
1257 |
+
},
|
1258 |
+
"node_modules/uglify-js": {
|
1259 |
+
"version": "3.19.3",
|
1260 |
+
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz",
|
1261 |
+
"integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==",
|
1262 |
+
"bin": {
|
1263 |
+
"uglifyjs": "bin/uglifyjs"
|
1264 |
+
},
|
1265 |
+
"engines": {
|
1266 |
+
"node": ">=0.8.0"
|
1267 |
+
}
|
1268 |
+
},
|
1269 |
+
"node_modules/undici": {
|
1270 |
+
"version": "6.21.0",
|
1271 |
+
"resolved": "https://registry.npmjs.org/undici/-/undici-6.21.0.tgz",
|
1272 |
+
"integrity": "sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==",
|
1273 |
+
"engines": {
|
1274 |
+
"node": ">=18.17"
|
1275 |
+
}
|
1276 |
+
},
|
1277 |
+
"node_modules/unpipe": {
|
1278 |
+
"version": "1.0.0",
|
1279 |
+
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
1280 |
+
"integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
|
1281 |
+
"engines": {
|
1282 |
+
"node": ">= 0.8"
|
1283 |
+
}
|
1284 |
+
},
|
1285 |
+
"node_modules/upper-case": {
|
1286 |
+
"version": "1.1.3",
|
1287 |
+
"resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz",
|
1288 |
+
"integrity": "sha512-WRbjgmYzgXkCV7zNVpy5YgrHgbBv126rMALQQMrmzOVC4GM2waQ9x7xtm8VU+1yF2kWyPzI9zbZ48n4vSxwfSA=="
|
1289 |
+
},
|
1290 |
+
"node_modules/util-deprecate": {
|
1291 |
+
"version": "1.0.2",
|
1292 |
+
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
1293 |
+
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
1294 |
+
},
|
1295 |
+
"node_modules/utils-merge": {
|
1296 |
+
"version": "1.0.1",
|
1297 |
+
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
1298 |
+
"integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==",
|
1299 |
+
"engines": {
|
1300 |
+
"node": ">= 0.4.0"
|
1301 |
+
}
|
1302 |
+
},
|
1303 |
+
"node_modules/vary": {
|
1304 |
+
"version": "1.1.2",
|
1305 |
+
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
1306 |
+
"integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
|
1307 |
+
"engines": {
|
1308 |
+
"node": ">= 0.8"
|
1309 |
+
}
|
1310 |
+
},
|
1311 |
+
"node_modules/whatwg-encoding": {
|
1312 |
+
"version": "3.1.1",
|
1313 |
+
"resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz",
|
1314 |
+
"integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==",
|
1315 |
+
"dependencies": {
|
1316 |
+
"iconv-lite": "0.6.3"
|
1317 |
+
},
|
1318 |
+
"engines": {
|
1319 |
+
"node": ">=18"
|
1320 |
+
}
|
1321 |
+
},
|
1322 |
+
"node_modules/whatwg-encoding/node_modules/iconv-lite": {
|
1323 |
+
"version": "0.6.3",
|
1324 |
+
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
1325 |
+
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
|
1326 |
+
"dependencies": {
|
1327 |
+
"safer-buffer": ">= 2.1.2 < 3.0.0"
|
1328 |
+
},
|
1329 |
+
"engines": {
|
1330 |
+
"node": ">=0.10.0"
|
1331 |
+
}
|
1332 |
+
},
|
1333 |
+
"node_modules/whatwg-mimetype": {
|
1334 |
+
"version": "4.0.0",
|
1335 |
+
"resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz",
|
1336 |
+
"integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==",
|
1337 |
+
"engines": {
|
1338 |
+
"node": ">=18"
|
1339 |
+
}
|
1340 |
+
},
|
1341 |
+
"node_modules/xtend": {
|
1342 |
+
"version": "4.0.2",
|
1343 |
+
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
|
1344 |
+
"integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
|
1345 |
+
"engines": {
|
1346 |
+
"node": ">=0.4"
|
1347 |
+
}
|
1348 |
+
}
|
1349 |
+
}
|
1350 |
+
}
|
package.json
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"name": "html-processor",
|
3 |
+
"version": "1.0.0",
|
4 |
+
"description": "",
|
5 |
+
"main": "index.js",
|
6 |
+
"scripts": {
|
7 |
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8 |
+
},
|
9 |
+
"keywords": [],
|
10 |
+
"author": "",
|
11 |
+
"license": "ISC",
|
12 |
+
"dependencies": {
|
13 |
+
"@jill64/cf-tiktoken": "^1.0.7",
|
14 |
+
"body-parser": "^1.20.3",
|
15 |
+
"cheerio": "^1.0.0",
|
16 |
+
"express": "^4.21.2",
|
17 |
+
"html-minifier": "^4.0.0",
|
18 |
+
"html-prettify": "^1.0.7",
|
19 |
+
"multer": "^1.4.5-lts.1",
|
20 |
+
"node-html-parser": "^7.0.1",
|
21 |
+
"prettier": "^3.4.2"
|
22 |
+
}
|
23 |
+
}
|
public/index.html
ADDED
@@ -0,0 +1,461 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<meta charset="utf-8"/>
|
5 |
+
<title>HTML Compressor for LLM</title>
|
6 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.24.1/themes/prism.min.css">
|
7 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.24.1/plugins/toolbar/prism-toolbar.min.css">
|
8 |
+
<style>
|
9 |
+
:root {
|
10 |
+
--primary-color: #007bff;
|
11 |
+
--secondary-color: #6c757d;
|
12 |
+
--success-color: #28a745;
|
13 |
+
--border-color: #dee2e6;
|
14 |
+
--background-color: #f8f9fa;
|
15 |
+
}
|
16 |
+
|
17 |
+
body {
|
18 |
+
font-family: system-ui, -apple-system, sans-serif;
|
19 |
+
line-height: 1.6;
|
20 |
+
margin: 0;
|
21 |
+
padding: 20px;
|
22 |
+
background: var(--background-color);
|
23 |
+
}
|
24 |
+
|
25 |
+
.container {
|
26 |
+
max-width: 1200px;
|
27 |
+
margin: 0 auto;
|
28 |
+
background: white;
|
29 |
+
padding: 30px;
|
30 |
+
border-radius: 8px;
|
31 |
+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
32 |
+
}
|
33 |
+
|
34 |
+
textarea {
|
35 |
+
width: 100%;
|
36 |
+
height: 200px;
|
37 |
+
padding: 12px;
|
38 |
+
border: 1px solid var(--border-color);
|
39 |
+
border-radius: 4px;
|
40 |
+
font-family: 'Monaco', 'Menlo', monospace;
|
41 |
+
font-size: 14px;
|
42 |
+
resize: vertical;
|
43 |
+
margin-bottom: 15px;
|
44 |
+
}
|
45 |
+
|
46 |
+
.options-container {
|
47 |
+
background: var(--background-color);
|
48 |
+
padding: 20px;
|
49 |
+
border-radius: 8px;
|
50 |
+
margin: 20px 0;
|
51 |
+
}
|
52 |
+
|
53 |
+
.option-grid {
|
54 |
+
display: grid;
|
55 |
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
56 |
+
gap: 15px;
|
57 |
+
}
|
58 |
+
|
59 |
+
.option-item {
|
60 |
+
display: flex;
|
61 |
+
align-items: center;
|
62 |
+
gap: 10px;
|
63 |
+
}
|
64 |
+
|
65 |
+
.button-group {
|
66 |
+
display: flex;
|
67 |
+
gap: 10px;
|
68 |
+
margin: 15px 0;
|
69 |
+
}
|
70 |
+
|
71 |
+
button {
|
72 |
+
background: var(--primary-color);
|
73 |
+
color: white;
|
74 |
+
padding: 8px 16px;
|
75 |
+
border: none;
|
76 |
+
border-radius: 4px;
|
77 |
+
cursor: pointer;
|
78 |
+
transition: background 0.2s;
|
79 |
+
}
|
80 |
+
|
81 |
+
button:hover {
|
82 |
+
background: #0056b3;
|
83 |
+
}
|
84 |
+
|
85 |
+
.results-container {
|
86 |
+
margin-top: 30px;
|
87 |
+
}
|
88 |
+
|
89 |
+
.results-tabs {
|
90 |
+
display: flex;
|
91 |
+
gap: 10px;
|
92 |
+
margin-bottom: 15px;
|
93 |
+
}
|
94 |
+
|
95 |
+
.tab {
|
96 |
+
padding: 8px 16px;
|
97 |
+
cursor: pointer;
|
98 |
+
border: 1px solid var(--border-color);
|
99 |
+
border-radius: 4px;
|
100 |
+
transition: all 0.2s;
|
101 |
+
}
|
102 |
+
|
103 |
+
.tab.active {
|
104 |
+
background: var(--primary-color);
|
105 |
+
color: white;
|
106 |
+
}
|
107 |
+
|
108 |
+
.result-panel {
|
109 |
+
border: 1px solid var(--border-color);
|
110 |
+
border-radius: 4px;
|
111 |
+
overflow: hidden;
|
112 |
+
}
|
113 |
+
|
114 |
+
.result-header {
|
115 |
+
display: flex;
|
116 |
+
justify-content: space-between;
|
117 |
+
align-items: center;
|
118 |
+
padding: 10px;
|
119 |
+
background: var(--background-color);
|
120 |
+
border-bottom: 1px solid var(--border-color);
|
121 |
+
}
|
122 |
+
|
123 |
+
.result-content {
|
124 |
+
padding: 15px;
|
125 |
+
overflow: auto;
|
126 |
+
max-height: 500px;
|
127 |
+
}
|
128 |
+
|
129 |
+
.stats-grid {
|
130 |
+
display: grid;
|
131 |
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
132 |
+
gap: 15px;
|
133 |
+
margin: 20px 0;
|
134 |
+
}
|
135 |
+
|
136 |
+
.stat-item {
|
137 |
+
background: white;
|
138 |
+
padding: 15px;
|
139 |
+
border-radius: 4px;
|
140 |
+
border: 1px solid var(--border-color);
|
141 |
+
}
|
142 |
+
|
143 |
+
.stat-value {
|
144 |
+
font-size: 1.2em;
|
145 |
+
font-weight: bold;
|
146 |
+
color: var(--primary-color);
|
147 |
+
}
|
148 |
+
|
149 |
+
.copy-feedback {
|
150 |
+
position: fixed;
|
151 |
+
bottom: 20px;
|
152 |
+
right: 20px;
|
153 |
+
background: var(--success-color);
|
154 |
+
color: white;
|
155 |
+
padding: 10px 20px;
|
156 |
+
border-radius: 4px;
|
157 |
+
display: none;
|
158 |
+
}
|
159 |
+
|
160 |
+
.operation-status {
|
161 |
+
margin: 20px 0;
|
162 |
+
padding: 15px;
|
163 |
+
border: 1px solid var(--border-color);
|
164 |
+
border-radius: 4px;
|
165 |
+
}
|
166 |
+
|
167 |
+
.status-grid {
|
168 |
+
display: grid;
|
169 |
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
170 |
+
gap: 10px;
|
171 |
+
margin-top: 10px;
|
172 |
+
}
|
173 |
+
|
174 |
+
.status-item {
|
175 |
+
display: flex;
|
176 |
+
align-items: center;
|
177 |
+
gap: 8px;
|
178 |
+
padding: 8px;
|
179 |
+
border-radius: 4px;
|
180 |
+
background: var(--background-color);
|
181 |
+
}
|
182 |
+
|
183 |
+
.status-icon {
|
184 |
+
width: 20px;
|
185 |
+
height: 20px;
|
186 |
+
border-radius: 50%;
|
187 |
+
display: flex;
|
188 |
+
align-items: center;
|
189 |
+
justify-content: center;
|
190 |
+
color: white;
|
191 |
+
font-size: 12px;
|
192 |
+
}
|
193 |
+
|
194 |
+
.status-success {
|
195 |
+
background: var(--success-color);
|
196 |
+
}
|
197 |
+
|
198 |
+
.status-error {
|
199 |
+
background: #dc3545;
|
200 |
+
}
|
201 |
+
|
202 |
+
.status-message {
|
203 |
+
font-size: 0.9em;
|
204 |
+
color: #666;
|
205 |
+
margin-top: 4px;
|
206 |
+
}
|
207 |
+
|
208 |
+
pre {
|
209 |
+
margin: 0;
|
210 |
+
border-radius: 4px;
|
211 |
+
}
|
212 |
+
|
213 |
+
code {
|
214 |
+
font-family: 'Monaco', 'Menlo', monospace;
|
215 |
+
font-size: 14px;
|
216 |
+
}
|
217 |
+
</style>
|
218 |
+
</head>
|
219 |
+
<body>
|
220 |
+
<div class="container">
|
221 |
+
<h1>HTML Compressor for LLM</h1>
|
222 |
+
<p>Compress HTML content for optimal LLM processing while preserving essential structure.</p>
|
223 |
+
|
224 |
+
<form id="compressorForm">
|
225 |
+
<textarea
|
226 |
+
name="html"
|
227 |
+
id="htmlInput"
|
228 |
+
placeholder="Paste your HTML here or upload a file..."
|
229 |
+
></textarea>
|
230 |
+
|
231 |
+
<div class="options-container">
|
232 |
+
<h3>Compression Options</h3>
|
233 |
+
<div class="option-grid">
|
234 |
+
<div class="option-item">
|
235 |
+
<input type="checkbox" id="cleanHead" name="cleanHead" checked>
|
236 |
+
<label for="cleanHead">Clean head section</label>
|
237 |
+
</div>
|
238 |
+
<div class="option-item">
|
239 |
+
<input type="checkbox" id="removeScripts" name="removeScripts" checked>
|
240 |
+
<label for="removeScripts">Remove scripts</label>
|
241 |
+
</div>
|
242 |
+
<div class="option-item">
|
243 |
+
<input type="checkbox" id="removeStyles" name="removeStyles" checked>
|
244 |
+
<label for="removeStyles">Remove styles</label>
|
245 |
+
</div>
|
246 |
+
<div class="option-item">
|
247 |
+
<input type="checkbox" id="handleRepeatingElements" name="handleRepeatingElements" checked>
|
248 |
+
<label for="handleRepeatingElements">Handle repeating elements</label>
|
249 |
+
</div>
|
250 |
+
<div class="option-item">
|
251 |
+
<input type="checkbox" id="truncateText" name="truncateText" checked>
|
252 |
+
<label for="truncateText">Truncate text</label>
|
253 |
+
</div>
|
254 |
+
<div class="option-item">
|
255 |
+
<label for="truncateLength">Max text length:</label>
|
256 |
+
<input type="number" id="truncateLength" name="truncateLength" value="100" min="10" max="1000">
|
257 |
+
</div>
|
258 |
+
<div class="option-item">
|
259 |
+
<input type="checkbox" id="minifyHtml" name="minifyHtml" checked>
|
260 |
+
<label for="minifyHtml">Minify HTML</label>
|
261 |
+
</div>
|
262 |
+
<div class="option-item">
|
263 |
+
<input type="checkbox" id="removeMedia" name="removeMedia" checked>
|
264 |
+
<label for="removeMedia">Remove media</label>
|
265 |
+
</div>
|
266 |
+
</div>
|
267 |
+
</div>
|
268 |
+
|
269 |
+
<div class="button-group">
|
270 |
+
<input type="file" accept=".html,.htm" id="fileInput">
|
271 |
+
<button type="submit">Process HTML</button>
|
272 |
+
</div>
|
273 |
+
</form>
|
274 |
+
|
275 |
+
<div id="operationStatus" class="operation-status" style="display: none;">
|
276 |
+
<h3>Operation Status</h3>
|
277 |
+
<div class="status-grid"></div>
|
278 |
+
</div>
|
279 |
+
|
280 |
+
<div id="stats" class="stats-grid" style="display: none;"></div>
|
281 |
+
|
282 |
+
<div class="results-container" style="display: none;">
|
283 |
+
<div class="results-tabs">
|
284 |
+
<div class="tab active" data-view="html">Compressed HTML</div>
|
285 |
+
<div class="tab" data-view="json">JSON Structure</div>
|
286 |
+
</div>
|
287 |
+
|
288 |
+
<div class="result-panel" id="htmlView">
|
289 |
+
<div class="result-header">
|
290 |
+
<h3>HTML Output</h3>
|
291 |
+
<div class="button-group">
|
292 |
+
<button onclick="copyResult('html')">Copy</button>
|
293 |
+
<button onclick="downloadResult('html')">Download</button>
|
294 |
+
</div>
|
295 |
+
</div>
|
296 |
+
<div class="result-content">
|
297 |
+
<pre><code class="language-html" id="htmlOutput"></code></pre>
|
298 |
+
</div>
|
299 |
+
</div>
|
300 |
+
|
301 |
+
<div class="result-panel" id="jsonView" style="display: none;">
|
302 |
+
<div class="result-header">
|
303 |
+
<h3>JSON Structure</h3>
|
304 |
+
<div class="button-group">
|
305 |
+
<button onclick="copyResult('json')">Copy</button>
|
306 |
+
<button onclick="downloadResult('json')">Download</button>
|
307 |
+
</div>
|
308 |
+
</div>
|
309 |
+
<div class="result-content">
|
310 |
+
<pre><code class="language-json" id="jsonOutput"></code></pre>
|
311 |
+
</div>
|
312 |
+
</div>
|
313 |
+
</div>
|
314 |
+
|
315 |
+
<div class="copy-feedback">Copied to clipboard!</div>
|
316 |
+
</div>
|
317 |
+
|
318 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.24.1/prism.min.js"></script>
|
319 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.24.1/prism.min.js"></script>
|
320 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.24.1/components/prism-markup.min.js"></script>
|
321 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.24.1/components/prism-json.min.js"></script>
|
322 |
+
<script>
|
323 |
+
const form = document.getElementById('compressorForm');
|
324 |
+
const fileInput = document.getElementById('fileInput');
|
325 |
+
const htmlInput = document.getElementById('htmlInput');
|
326 |
+
const resultsContainer = document.querySelector('.results-container');
|
327 |
+
const statsContainer = document.getElementById('stats');
|
328 |
+
const copyFeedback = document.querySelector('.copy-feedback');
|
329 |
+
|
330 |
+
// Tab switching
|
331 |
+
document.querySelectorAll('.tab').forEach(tab => {
|
332 |
+
tab.addEventListener('click', () => {
|
333 |
+
// Update tabs
|
334 |
+
document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
|
335 |
+
tab.classList.add('active');
|
336 |
+
|
337 |
+
// Update views
|
338 |
+
const view = tab.dataset.view;
|
339 |
+
document.getElementById('htmlView').style.display = view === 'html' ? 'block' : 'none';
|
340 |
+
document.getElementById('jsonView').style.display = view === 'json' ? 'block' : 'none';
|
341 |
+
});
|
342 |
+
});
|
343 |
+
|
344 |
+
// File input handler
|
345 |
+
fileInput.addEventListener('change', (e) => {
|
346 |
+
const file = e.target.files[0];
|
347 |
+
if (file) {
|
348 |
+
const reader = new FileReader();
|
349 |
+
reader.onload = (e) => htmlInput.value = e.target.result;
|
350 |
+
reader.readAsText(file);
|
351 |
+
}
|
352 |
+
});
|
353 |
+
|
354 |
+
// Form submission
|
355 |
+
form.addEventListener('submit', async (e) => {
|
356 |
+
e.preventDefault();
|
357 |
+
|
358 |
+
const formData = new FormData(form);
|
359 |
+
|
360 |
+
// Add checkbox states
|
361 |
+
document.querySelectorAll('input[type="checkbox"]').forEach(checkbox => {
|
362 |
+
formData.set(checkbox.name, checkbox.checked);
|
363 |
+
});
|
364 |
+
|
365 |
+
try {
|
366 |
+
const response = await fetch('/process', {
|
367 |
+
method: 'POST',
|
368 |
+
body: formData,
|
369 |
+
});
|
370 |
+
|
371 |
+
const data = await response.json();
|
372 |
+
|
373 |
+
if (data.error) {
|
374 |
+
alert(data.error);
|
375 |
+
return;
|
376 |
+
}
|
377 |
+
|
378 |
+
// Display operation status
|
379 |
+
const statusContainer = document.querySelector('#operationStatus');
|
380 |
+
const statusGrid = statusContainer.querySelector('.status-grid');
|
381 |
+
statusContainer.style.display = 'block';
|
382 |
+
|
383 |
+
statusGrid.innerHTML = Object.entries(data.operationStatus)
|
384 |
+
.map(([operation, status]) => `
|
385 |
+
<div class="status-item">
|
386 |
+
<div class="status-icon ${status.success ? 'status-success' : 'status-error'}">
|
387 |
+
${status.success ? '✓' : '✗'}
|
388 |
+
</div>
|
389 |
+
<div>
|
390 |
+
<div>${formatLabel(operation)}</div>
|
391 |
+
${status.error ? `<div class="status-message">Error: ${status.error}</div>` : ''}
|
392 |
+
</div>
|
393 |
+
</div>
|
394 |
+
`).join('');
|
395 |
+
|
396 |
+
// Display stats
|
397 |
+
statsContainer.style.display = 'grid';
|
398 |
+
statsContainer.innerHTML = Object.entries(data.stats)
|
399 |
+
.map(([key, value]) => `
|
400 |
+
<div class="stat-item">
|
401 |
+
<div class="stat-label">${formatLabel(key)}</div>
|
402 |
+
<div class="stat-value">${value}</div>
|
403 |
+
</div>
|
404 |
+
`).join('');
|
405 |
+
|
406 |
+
// Show results container
|
407 |
+
resultsContainer.style.display = 'block';
|
408 |
+
|
409 |
+
// Update outputs with syntax highlighting
|
410 |
+
document.getElementById('htmlOutput').textContent = data.result.html;
|
411 |
+
document.getElementById('jsonOutput').textContent = data.result.json;
|
412 |
+
|
413 |
+
// Trigger Prism highlighting
|
414 |
+
Prism.highlightAll();
|
415 |
+
} catch (err) {
|
416 |
+
alert('Error processing HTML: ' + err.message);
|
417 |
+
}
|
418 |
+
});
|
419 |
+
|
420 |
+
// Utility functions
|
421 |
+
function formatLabel(key) {
|
422 |
+
return key
|
423 |
+
.replace(/([A-Z])/g, ' $1')
|
424 |
+
.replace(/([a-z])([A-Z])/g, '$1 $2')
|
425 |
+
.toLowerCase()
|
426 |
+
.replace(/^./, str => str.toUpperCase())
|
427 |
+
.replace('Html', 'HTML');
|
428 |
+
}
|
429 |
+
|
430 |
+
async function copyResult(type) {
|
431 |
+
const content = document.getElementById(`${type}Output`).textContent;
|
432 |
+
try {
|
433 |
+
await navigator.clipboard.writeText(content);
|
434 |
+
showCopyFeedback();
|
435 |
+
} catch (err) {
|
436 |
+
alert('Failed to copy to clipboard');
|
437 |
+
}
|
438 |
+
}
|
439 |
+
|
440 |
+
function downloadResult(type) {
|
441 |
+
const content = document.getElementById(`${type}Output`).textContent;
|
442 |
+
const blob = new Blob([content], { type: 'text/plain' });
|
443 |
+
const url = URL.createObjectURL(blob);
|
444 |
+
const a = document.createElement('a');
|
445 |
+
a.href = url;
|
446 |
+
a.download = `compressed.${type}`;
|
447 |
+
document.body.appendChild(a);
|
448 |
+
a.click();
|
449 |
+
document.body.removeChild(a);
|
450 |
+
URL.revokeObjectURL(url);
|
451 |
+
}
|
452 |
+
|
453 |
+
function showCopyFeedback() {
|
454 |
+
copyFeedback.style.display = 'block';
|
455 |
+
setTimeout(() => {
|
456 |
+
copyFeedback.style.display = 'none';
|
457 |
+
}, 2000);
|
458 |
+
}
|
459 |
+
</script>
|
460 |
+
</body>
|
461 |
+
</html>
|
removeMedia.js
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// removeMedia.js
|
2 |
+
function removeMedia($) {
|
3 |
+
try {
|
4 |
+
// Remove images
|
5 |
+
$('img').remove();
|
6 |
+
|
7 |
+
// Remove video elements
|
8 |
+
$('video, source[type^="video"], object, embed').remove();
|
9 |
+
|
10 |
+
// Remove audio elements
|
11 |
+
$('audio, source[type^="audio"]').remove();
|
12 |
+
|
13 |
+
// Remove canvas elements
|
14 |
+
$('canvas').remove();
|
15 |
+
|
16 |
+
// Remove SVG elements
|
17 |
+
$('svg').remove();
|
18 |
+
|
19 |
+
// Remove picture elements
|
20 |
+
$('picture').remove();
|
21 |
+
|
22 |
+
// Remove iframes
|
23 |
+
$('iframe').remove();
|
24 |
+
|
25 |
+
// Remove media-specific attributes from elements
|
26 |
+
$('[poster]').removeAttr('poster');
|
27 |
+
$('[background]').removeAttr('background');
|
28 |
+
|
29 |
+
// Remove inline media backgrounds
|
30 |
+
$('*[style*="background"]').each((_, el) => {
|
31 |
+
const $el = $(el);
|
32 |
+
const style = $el.attr('style');
|
33 |
+
if (style) {
|
34 |
+
const newStyle = style.replace(/background(-image)?:\s*url\([^)]+\);?/gi, '');
|
35 |
+
if (newStyle.trim()) {
|
36 |
+
$el.attr('style', newStyle);
|
37 |
+
} else {
|
38 |
+
$el.removeAttr('style');
|
39 |
+
}
|
40 |
+
}
|
41 |
+
});
|
42 |
+
|
43 |
+
return {
|
44 |
+
success: true,
|
45 |
+
error: null
|
46 |
+
};
|
47 |
+
} catch (err) {
|
48 |
+
return {
|
49 |
+
success: false,
|
50 |
+
error: err.message
|
51 |
+
};
|
52 |
+
}
|
53 |
+
}
|
54 |
+
|
55 |
+
module.exports = {
|
56 |
+
removeMedia
|
57 |
+
};
|